SlideShare uma empresa Scribd logo
1 de 44
Towards Providing Automated Supports to
Developers on Making Logging Decisions
Tse-Hsun (Peter) Chen
peterc@encs.concordia.ca
About myself
BSc
MSc, PhD
Associate
professor
Experiences
working in the
field
3
Industry collaboration and research outcome adoption
Main research area: improving
software quality and testing process
Software System
Performance
counters
System logs
Software tests Bug reports
…
Software
developers
Applying code analysis, machine learning, and
data analytics to provide automated support to
developers
I will focus on my research on
software logging in this talk
Logs are often the only source of
information for production systems
System running in
production
Operator Developer
Logs can be used to assist various
software development tasks
Performance
Analysis
Requirement
Tracking
Debugging
Monitoring
LOG.warn(“Can not parse job id from {} ”, path, e);
Verbosity Level Static Message Dynamic Variables
…
} catch (Exception e) {
}
Logging
Too much: performance overhead;
too many trivial logs
Too little: missing important information
What is a Logging Statement & Trade-off of Logging
Logs record important runtime info,
but with trade-offs
8
What is a Logging Statement & Trade-off of Logging
Deciding where to log is
challenging
“Logging and tracing is (IMO) a fine art, knowing what
to log and where takes experience.”
Where do developers log?
Studying where do developers log and
provide recommendations
Can we leverage existing code to
recommend logging locations?
Source Code Logging statements
(with surrounding code)
Our process of studying and
providing logging suggestions
Cassandra
Our Studied Systems
Elasticsearch Flink
HBase Kafka Wicket Zookeeper
We study where do developers log in 7 large-
scale open source systems
Source Code Logging statements
(with surrounding code)
Manual study on
logging code
Our process of studying and
providing logging suggestions
Manual study to
understand their
characteristics
Randomly sample 375
out of 14.9K logging
statements and their
surrendering code
Manually studying logging code
and its location
Manual study to
understand their
characteristics
Randomly sample 375
out of 14.9K logging
statements and their
surrendering code
Manually studying logging code
and its location
We uncover 6 categories of logging
locations, and the relationship between
logging statements and code
Category 1: Exception information logging in catch blocks
Categories of logging locations
Semantic information
Syntactic
information
The logging statements often record messages
or execution info related to the prior try block.
Categories of logging locations
Category 2: Execution state logging in branch blocks
Semantic information
Syntactic
information
Logging statements often record execution
states in different branches.
Categories of logging locations
Category 3: Logging the beginning/end of a method block
(method execution)
public void removeJob(JobID jobId){
...
// the end of the method
log.info(“Removed jobId {} from Zookeeper”, jobId);
}
Logging statements often record the
beginning or end of method execution.
Related to the semantic
of the method
Source Code Logging statements
(with surrounding code)
Manual study on
logging code
Our process of studying and
providing logging suggestions
Extracting Code Block
Feature
(Syntactic, Semantic,
Fusion)
if(Strings.isEmpty(sessionID)) {
LOG.error(“failed to get session ID”);
handleError();
return;
}
Syntactic
Semantic
Fusion
Extracting code block features
IfStatement, MethodInvocation,
string, is, empti, session, id,
if(Strings.isEmpty(sessionID)) {
handleError();
return;
}
Syntactic
Semantic
Fusion
MethodInvocation,
ReturnStatement
handle, error
IfStatement, MethodInvocation, string, is, empty, session, id
MethodInvocation, handle, error,
ReturnStatement
Extracting code block features
Source Code Logging statements
(with surrounding code)
Manual study on
logging code
Our process of studying and
providing logging suggestions
Extracting Code Block
Feature
(Syntactic, Semantic,
Fusion)
Deep Learning
Framework
Source Code
Code Block Features
……
Word Embedding Layer
RNN
Cell
RNN
Cell
RNN
Cell
…… RNN
Cell
RNN Layer (LSTM)
Output Layer
Our process of studying and
providing logging suggestions
Source Code Logging statements
(with surrounding code)
Manual study on
logging code
Our process of studying and
providing logging suggestions
Extracting Code Block
Feature
(Syntactic, Semantic,
Fusion)
Deep Learning
Framework
Suggestion Results
(logged vs. non-logged block)
Research Questions
RQ1 RQ2
How effective are different block
features when suggesting logging
locations?
Are the trained models
transferable to other systems?
Evaluation of our logging location
suggestion models
Research Questions
RQ1 RQ2
How effective are different block
features when suggesting logging
locations?
Are the trained models
transferable to other systems?
Evaluation of our logging location
suggestion models
• For each system, we use 60% for training, 20%
for validation, and 20% for testing.
• Compute balanced accuracy for evaluation
• How well can the model suggest logged and
non-logged code blocks
Process and metrics for DL model
evaluation
Balanced Accuracy of different block features
50
60
70
80
90
Try-Catch Branching Looping Method
Syntactic Semantic Fusion
85.8
77.4
69.0
63.2
Process and metrics for DL model
evaluation
Models trained using syntactic features
achieve the best results.
True Positive
(TP)
True Negative
(TN)
False Positive
(FP)
False Negative
(FN)
High overlaps in TN shows non-logged code has distinct characteristics
that are captured by all features. Syntactics has the lowest FNs.
20.1% of the TPs are missed by syntactic but captured by two other
block features. Only small overlaps on FPs among the features.
Studying the overlap among the results
using three different features
Manually Studying FPs and FNs
We further manually study a sample of False Positive and
False Negative in our suggestion results
We find that a large portion of the
FPs and FNs may be considered as TPs and TNs.
An example of FP:
Some misclassifications may
actually be correct
The object state is saved to a JSON files instead
of log files
The actual performance of our model may be
even better due to the diverse nature of how
developers write logging code.
Research Questions
RQ1 RQ2
How effective are different block
features when suggesting logging
locations?
Are the trained models
transferable to other systems?
Evaluation of our logging location
suggestion models
We suggest logging
locations with reasonable
accuracy. Different features
capture different logging
info in the code.
Research Questions
RQ1 RQ2
How effective are different block
features when suggesting logging
locations?
Are the trained models
transferable to other systems?
Evaluation of our logging location
suggestion models
We suggest logging
locations with reasonable
accuracy. Different features
capture different logging
info in the code.
Training a model using
syntactic features
Training cross-system models
Apply the models on
other systems
Balanced Accuracy for cross-system suggestions
RQ2: Are the trained models transferable to other systems?
10
30
50
70
90
Cassandra Flink Kafka Zookeeper
Within Cross
81.7% 80.0% 84.6% 83.9% 88.4% 80.1% 91.7%
The percentage is the ratio of Cross against Within
Although decreased, cross system suggestion still achieves
reasonable performance compared to within-system suggestion.
Results of cross system suggestion
Research Questions
RQ1 RQ2
How effective are different block
features when suggesting logging
locations?
Are the trained models
transferable to other systems?
Evaluation of our logging location
suggestion models
We suggest logging
locations with reasonable
accuracy. Different features
capture different logging
info in the code.
Different systems may
share a similar implicit
logging guideline.
Tse-Hsun (Peter) Chen
https://petertsehsun.github.io

Mais conteúdo relacionado

Mais procurados

MBSE and Model-Based Testing with Capella
MBSE and Model-Based Testing with CapellaMBSE and Model-Based Testing with Capella
MBSE and Model-Based Testing with CapellaObeo
 
Rcm of compressor
Rcm of compressorRcm of compressor
Rcm of compressorKaram Ali
 
CapellaDays2022 | COMAC - PGM | How We Use Capella for Collaborative Design i...
CapellaDays2022 | COMAC - PGM | How We Use Capella for Collaborative Design i...CapellaDays2022 | COMAC - PGM | How We Use Capella for Collaborative Design i...
CapellaDays2022 | COMAC - PGM | How We Use Capella for Collaborative Design i...Obeo
 
Rcm 4 hour overview for rcm teams
Rcm 4 hour overview for rcm teamsRcm 4 hour overview for rcm teams
Rcm 4 hour overview for rcm teamsMatthew Clemens
 
Total Productive Maintenance (TPM)
Total Productive Maintenance (TPM)Total Productive Maintenance (TPM)
Total Productive Maintenance (TPM)Sanjeev Deshmukh
 
Improving MBSE maturity with open-source tool Capella
Improving MBSE maturity with open-source tool Capella Improving MBSE maturity with open-source tool Capella
Improving MBSE maturity with open-source tool Capella Obeo
 
Enabling Corporate Failure Metrics at Nexen Energy with ISO 14224
Enabling Corporate Failure Metrics at Nexen Energy with ISO 14224Enabling Corporate Failure Metrics at Nexen Energy with ISO 14224
Enabling Corporate Failure Metrics at Nexen Energy with ISO 14224Tony Ciliberti PE
 
Simulation with Python and MATLAB® in Capella
Simulation with Python and MATLAB® in CapellaSimulation with Python and MATLAB® in Capella
Simulation with Python and MATLAB® in CapellaObeo
 

Mais procurados (8)

MBSE and Model-Based Testing with Capella
MBSE and Model-Based Testing with CapellaMBSE and Model-Based Testing with Capella
MBSE and Model-Based Testing with Capella
 
Rcm of compressor
Rcm of compressorRcm of compressor
Rcm of compressor
 
CapellaDays2022 | COMAC - PGM | How We Use Capella for Collaborative Design i...
CapellaDays2022 | COMAC - PGM | How We Use Capella for Collaborative Design i...CapellaDays2022 | COMAC - PGM | How We Use Capella for Collaborative Design i...
CapellaDays2022 | COMAC - PGM | How We Use Capella for Collaborative Design i...
 
Rcm 4 hour overview for rcm teams
Rcm 4 hour overview for rcm teamsRcm 4 hour overview for rcm teams
Rcm 4 hour overview for rcm teams
 
Total Productive Maintenance (TPM)
Total Productive Maintenance (TPM)Total Productive Maintenance (TPM)
Total Productive Maintenance (TPM)
 
Improving MBSE maturity with open-source tool Capella
Improving MBSE maturity with open-source tool Capella Improving MBSE maturity with open-source tool Capella
Improving MBSE maturity with open-source tool Capella
 
Enabling Corporate Failure Metrics at Nexen Energy with ISO 14224
Enabling Corporate Failure Metrics at Nexen Energy with ISO 14224Enabling Corporate Failure Metrics at Nexen Energy with ISO 14224
Enabling Corporate Failure Metrics at Nexen Energy with ISO 14224
 
Simulation with Python and MATLAB® in Capella
Simulation with Python and MATLAB® in CapellaSimulation with Python and MATLAB® in Capella
Simulation with Python and MATLAB® in Capella
 

Semelhante a Towards better software quality assurance by providing intelligent support

SLM (Sample Lifecycle Manager)
SLM (Sample Lifecycle Manager)SLM (Sample Lifecycle Manager)
SLM (Sample Lifecycle Manager)limscoder
 
A Source Code Similarity System For Plagiarism Detection
A Source Code Similarity System For Plagiarism DetectionA Source Code Similarity System For Plagiarism Detection
A Source Code Similarity System For Plagiarism DetectionJames Heller
 
OORPT Dynamic Analysis
OORPT Dynamic AnalysisOORPT Dynamic Analysis
OORPT Dynamic Analysislienhard
 
Presenter manual embedded systems (specially for summer interns)
Presenter manual   embedded systems (specially for summer interns)Presenter manual   embedded systems (specially for summer interns)
Presenter manual embedded systems (specially for summer interns)XPERT INFOTECH
 
Top TCS Interview Questions And Answers | How to Crack An Interview At TCS | ...
Top TCS Interview Questions And Answers | How to Crack An Interview At TCS | ...Top TCS Interview Questions And Answers | How to Crack An Interview At TCS | ...
Top TCS Interview Questions And Answers | How to Crack An Interview At TCS | ...Simplilearn
 
Large Language Models for Test Case Evolution and Repair
Large Language Models for Test Case Evolution and RepairLarge Language Models for Test Case Evolution and Repair
Large Language Models for Test Case Evolution and RepairLionel Briand
 
Generative AI in CSharp with Semantic Kernel.pptx
Generative AI in CSharp with Semantic Kernel.pptxGenerative AI in CSharp with Semantic Kernel.pptx
Generative AI in CSharp with Semantic Kernel.pptxAlon Fliess
 
Example PseudocodeProblem Given a sorted array a with n elements .docx
Example PseudocodeProblem Given a sorted array a with n elements .docxExample PseudocodeProblem Given a sorted array a with n elements .docx
Example PseudocodeProblem Given a sorted array a with n elements .docxcravennichole326
 
Best practices in enterprise applications
Best practices in enterprise applicationsBest practices in enterprise applications
Best practices in enterprise applicationsChandra Sekhar Saripaka
 
Beyond PITS, Functional Principles for Software Architecture
Beyond PITS, Functional Principles for Software ArchitectureBeyond PITS, Functional Principles for Software Architecture
Beyond PITS, Functional Principles for Software ArchitectureJayaram Sankaranarayanan
 
Experiments on Design Pattern Discovery
Experiments on Design Pattern DiscoveryExperiments on Design Pattern Discovery
Experiments on Design Pattern DiscoveryTim Menzies
 
CORRELATING FEATURES AND CODE BY DYNAMIC AND SEMANTIC ANALYSIS
CORRELATING FEATURES AND CODE BY DYNAMIC AND SEMANTIC ANALYSISCORRELATING FEATURES AND CODE BY DYNAMIC AND SEMANTIC ANALYSIS
CORRELATING FEATURES AND CODE BY DYNAMIC AND SEMANTIC ANALYSISijseajournal
 
Mechanisms for Database Intrusion Detection and Response
Mechanisms for Database Intrusion Detection and ResponseMechanisms for Database Intrusion Detection and Response
Mechanisms for Database Intrusion Detection and ResponseAshish Kamra
 
NNUG Certification Presentation
NNUG Certification PresentationNNUG Certification Presentation
NNUG Certification PresentationNiall Merrigan
 
Example PseudocodeProblem Given a sorted array a with n elements .docx
Example PseudocodeProblem Given a sorted array a with n elements .docxExample PseudocodeProblem Given a sorted array a with n elements .docx
Example PseudocodeProblem Given a sorted array a with n elements .docxelbanglis
 

Semelhante a Towards better software quality assurance by providing intelligent support (20)

SLM (Sample Lifecycle Manager)
SLM (Sample Lifecycle Manager)SLM (Sample Lifecycle Manager)
SLM (Sample Lifecycle Manager)
 
A Source Code Similarity System For Plagiarism Detection
A Source Code Similarity System For Plagiarism DetectionA Source Code Similarity System For Plagiarism Detection
A Source Code Similarity System For Plagiarism Detection
 
OORPT Dynamic Analysis
OORPT Dynamic AnalysisOORPT Dynamic Analysis
OORPT Dynamic Analysis
 
Ss ui lecture 2
Ss ui lecture 2Ss ui lecture 2
Ss ui lecture 2
 
Presenter manual embedded systems (specially for summer interns)
Presenter manual   embedded systems (specially for summer interns)Presenter manual   embedded systems (specially for summer interns)
Presenter manual embedded systems (specially for summer interns)
 
Logic programming in python
Logic programming in pythonLogic programming in python
Logic programming in python
 
Java basics
Java basicsJava basics
Java basics
 
Top TCS Interview Questions And Answers | How to Crack An Interview At TCS | ...
Top TCS Interview Questions And Answers | How to Crack An Interview At TCS | ...Top TCS Interview Questions And Answers | How to Crack An Interview At TCS | ...
Top TCS Interview Questions And Answers | How to Crack An Interview At TCS | ...
 
Large Language Models for Test Case Evolution and Repair
Large Language Models for Test Case Evolution and RepairLarge Language Models for Test Case Evolution and Repair
Large Language Models for Test Case Evolution and Repair
 
Generative AI in CSharp with Semantic Kernel.pptx
Generative AI in CSharp with Semantic Kernel.pptxGenerative AI in CSharp with Semantic Kernel.pptx
Generative AI in CSharp with Semantic Kernel.pptx
 
Cpcs302 1
Cpcs302  1Cpcs302  1
Cpcs302 1
 
Example PseudocodeProblem Given a sorted array a with n elements .docx
Example PseudocodeProblem Given a sorted array a with n elements .docxExample PseudocodeProblem Given a sorted array a with n elements .docx
Example PseudocodeProblem Given a sorted array a with n elements .docx
 
Best practices in enterprise applications
Best practices in enterprise applicationsBest practices in enterprise applications
Best practices in enterprise applications
 
Beyond PITS, Functional Principles for Software Architecture
Beyond PITS, Functional Principles for Software ArchitectureBeyond PITS, Functional Principles for Software Architecture
Beyond PITS, Functional Principles for Software Architecture
 
Experiments on Design Pattern Discovery
Experiments on Design Pattern DiscoveryExperiments on Design Pattern Discovery
Experiments on Design Pattern Discovery
 
CORRELATING FEATURES AND CODE BY DYNAMIC AND SEMANTIC ANALYSIS
CORRELATING FEATURES AND CODE BY DYNAMIC AND SEMANTIC ANALYSISCORRELATING FEATURES AND CODE BY DYNAMIC AND SEMANTIC ANALYSIS
CORRELATING FEATURES AND CODE BY DYNAMIC AND SEMANTIC ANALYSIS
 
Mechanisms for Database Intrusion Detection and Response
Mechanisms for Database Intrusion Detection and ResponseMechanisms for Database Intrusion Detection and Response
Mechanisms for Database Intrusion Detection and Response
 
NNUG Certification Presentation
NNUG Certification PresentationNNUG Certification Presentation
NNUG Certification Presentation
 
Example PseudocodeProblem Given a sorted array a with n elements .docx
Example PseudocodeProblem Given a sorted array a with n elements .docxExample PseudocodeProblem Given a sorted array a with n elements .docx
Example PseudocodeProblem Given a sorted array a with n elements .docx
 
args_types
args_typesargs_types
args_types
 

Mais de Concordia University

A first look at the integration of machine learning models in complex autonom...
A first look at the integration of machine learning models in complex autonom...A first look at the integration of machine learning models in complex autonom...
A first look at the integration of machine learning models in complex autonom...Concordia University
 
iPerfDetector: Characterizing and Detecting Performance Anti-patterns in iOS ...
iPerfDetector: Characterizing and Detecting Performance Anti-patterns in iOS ...iPerfDetector: Characterizing and Detecting Performance Anti-patterns in iOS ...
iPerfDetector: Characterizing and Detecting Performance Anti-patterns in iOS ...Concordia University
 
TSE 2016 - Finding and Evaluating the Performance Impact of Redundant Data Ac...
TSE 2016 - Finding and Evaluating the Performance Impact of Redundant Data Ac...TSE 2016 - Finding and Evaluating the Performance Impact of Redundant Data Ac...
TSE 2016 - Finding and Evaluating the Performance Impact of Redundant Data Ac...Concordia University
 
ICSE2017 - Analytics Driven Load Testing: An Industrial Experience Report on ...
ICSE2017 - Analytics Driven Load Testing: An Industrial Experience Report on ...ICSE2017 - Analytics Driven Load Testing: An Industrial Experience Report on ...
ICSE2017 - Analytics Driven Load Testing: An Industrial Experience Report on ...Concordia University
 
FSE2016 - CacheOptimizer: Helping Developers Configure Caching Frameworks for...
FSE2016 - CacheOptimizer: Helping Developers Configure Caching Frameworks for...FSE2016 - CacheOptimizer: Helping Developers Configure Caching Frameworks for...
FSE2016 - CacheOptimizer: Helping Developers Configure Caching Frameworks for...Concordia University
 
CSER2016 - Detecting Problems in Database Access Code of Large Scale Systems
CSER2016 - Detecting Problems in Database Access Code of Large Scale SystemsCSER2016 - Detecting Problems in Database Access Code of Large Scale Systems
CSER2016 - Detecting Problems in Database Access Code of Large Scale SystemsConcordia University
 
ICSE2016 - Detecting Problems in Database Access Code of Large Scale Systems ...
ICSE2016 - Detecting Problems in Database Access Code of Large Scale Systems ...ICSE2016 - Detecting Problems in Database Access Code of Large Scale Systems ...
ICSE2016 - Detecting Problems in Database Access Code of Large Scale Systems ...Concordia University
 
MSR2016 - An Empirical Study on the Practice of Maintaining Object-Relational...
MSR2016 - An Empirical Study on the Practice of Maintaining Object-Relational...MSR2016 - An Empirical Study on the Practice of Maintaining Object-Relational...
MSR2016 - An Empirical Study on the Practice of Maintaining Object-Relational...Concordia University
 
ICDE2015PhD - Improving the Quality of Large-Scale Database-Centric Software ...
ICDE2015PhD - Improving the Quality of Large-Scale Database-Centric Software ...ICDE2015PhD - Improving the Quality of Large-Scale Database-Centric Software ...
ICDE2015PhD - Improving the Quality of Large-Scale Database-Centric Software ...Concordia University
 
ICSE2014 - Detecting Performance Anti-patterns for Applications Developed usi...
ICSE2014 - Detecting Performance Anti-patterns for Applications Developed usi...ICSE2014 - Detecting Performance Anti-patterns for Applications Developed usi...
ICSE2014 - Detecting Performance Anti-patterns for Applications Developed usi...Concordia University
 
MSR2014 - An Empirical Study of Dormant Bugs
MSR2014 - An Empirical Study of Dormant BugsMSR2014 - An Empirical Study of Dormant Bugs
MSR2014 - An Empirical Study of Dormant BugsConcordia University
 
MSR2012 - Explaining Software Defects Using Topic Models
MSR2012 - Explaining Software Defects Using Topic ModelsMSR2012 - Explaining Software Defects Using Topic Models
MSR2012 - Explaining Software Defects Using Topic ModelsConcordia University
 

Mais de Concordia University (13)

A first look at the integration of machine learning models in complex autonom...
A first look at the integration of machine learning models in complex autonom...A first look at the integration of machine learning models in complex autonom...
A first look at the integration of machine learning models in complex autonom...
 
iPerfDetector: Characterizing and Detecting Performance Anti-patterns in iOS ...
iPerfDetector: Characterizing and Detecting Performance Anti-patterns in iOS ...iPerfDetector: Characterizing and Detecting Performance Anti-patterns in iOS ...
iPerfDetector: Characterizing and Detecting Performance Anti-patterns in iOS ...
 
Icse2018 autonomic
Icse2018 autonomicIcse2018 autonomic
Icse2018 autonomic
 
TSE 2016 - Finding and Evaluating the Performance Impact of Redundant Data Ac...
TSE 2016 - Finding and Evaluating the Performance Impact of Redundant Data Ac...TSE 2016 - Finding and Evaluating the Performance Impact of Redundant Data Ac...
TSE 2016 - Finding and Evaluating the Performance Impact of Redundant Data Ac...
 
ICSE2017 - Analytics Driven Load Testing: An Industrial Experience Report on ...
ICSE2017 - Analytics Driven Load Testing: An Industrial Experience Report on ...ICSE2017 - Analytics Driven Load Testing: An Industrial Experience Report on ...
ICSE2017 - Analytics Driven Load Testing: An Industrial Experience Report on ...
 
FSE2016 - CacheOptimizer: Helping Developers Configure Caching Frameworks for...
FSE2016 - CacheOptimizer: Helping Developers Configure Caching Frameworks for...FSE2016 - CacheOptimizer: Helping Developers Configure Caching Frameworks for...
FSE2016 - CacheOptimizer: Helping Developers Configure Caching Frameworks for...
 
CSER2016 - Detecting Problems in Database Access Code of Large Scale Systems
CSER2016 - Detecting Problems in Database Access Code of Large Scale SystemsCSER2016 - Detecting Problems in Database Access Code of Large Scale Systems
CSER2016 - Detecting Problems in Database Access Code of Large Scale Systems
 
ICSE2016 - Detecting Problems in Database Access Code of Large Scale Systems ...
ICSE2016 - Detecting Problems in Database Access Code of Large Scale Systems ...ICSE2016 - Detecting Problems in Database Access Code of Large Scale Systems ...
ICSE2016 - Detecting Problems in Database Access Code of Large Scale Systems ...
 
MSR2016 - An Empirical Study on the Practice of Maintaining Object-Relational...
MSR2016 - An Empirical Study on the Practice of Maintaining Object-Relational...MSR2016 - An Empirical Study on the Practice of Maintaining Object-Relational...
MSR2016 - An Empirical Study on the Practice of Maintaining Object-Relational...
 
ICDE2015PhD - Improving the Quality of Large-Scale Database-Centric Software ...
ICDE2015PhD - Improving the Quality of Large-Scale Database-Centric Software ...ICDE2015PhD - Improving the Quality of Large-Scale Database-Centric Software ...
ICDE2015PhD - Improving the Quality of Large-Scale Database-Centric Software ...
 
ICSE2014 - Detecting Performance Anti-patterns for Applications Developed usi...
ICSE2014 - Detecting Performance Anti-patterns for Applications Developed usi...ICSE2014 - Detecting Performance Anti-patterns for Applications Developed usi...
ICSE2014 - Detecting Performance Anti-patterns for Applications Developed usi...
 
MSR2014 - An Empirical Study of Dormant Bugs
MSR2014 - An Empirical Study of Dormant BugsMSR2014 - An Empirical Study of Dormant Bugs
MSR2014 - An Empirical Study of Dormant Bugs
 
MSR2012 - Explaining Software Defects Using Topic Models
MSR2012 - Explaining Software Defects Using Topic ModelsMSR2012 - Explaining Software Defects Using Topic Models
MSR2012 - Explaining Software Defects Using Topic Models
 

Último

%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...masabamasaba
 
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfonteinmasabamasaba
 
Define the academic and professional writing..pdf
Define the academic and professional writing..pdfDefine the academic and professional writing..pdf
Define the academic and professional writing..pdfPearlKirahMaeRagusta1
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Steffen Staab
 
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park masabamasaba
 
%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrandmasabamasaba
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfkalichargn70th171
 
%+27788225528 love spells in Vancouver Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Vancouver Psychic Readings, Attraction spells,Br...%+27788225528 love spells in Vancouver Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Vancouver Psychic Readings, Attraction spells,Br...masabamasaba
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesVictorSzoltysek
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Modelsaagamshah0812
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnAmarnathKambale
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️Delhi Call girls
 
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfonteinmasabamasaba
 
%in Durban+277-882-255-28 abortion pills for sale in Durban
%in Durban+277-882-255-28 abortion pills for sale in Durban%in Durban+277-882-255-28 abortion pills for sale in Durban
%in Durban+277-882-255-28 abortion pills for sale in Durbanmasabamasaba
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...Health
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...panagenda
 
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrainmasabamasaba
 
8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech studentsHimanshiGarg82
 
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...masabamasaba
 

Último (20)

%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
 
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
Define the academic and professional writing..pdf
Define the academic and professional writing..pdfDefine the academic and professional writing..pdf
Define the academic and professional writing..pdf
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
 
%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
%+27788225528 love spells in Vancouver Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Vancouver Psychic Readings, Attraction spells,Br...%+27788225528 love spells in Vancouver Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Vancouver Psychic Readings, Attraction spells,Br...
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learn
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
 
%in Durban+277-882-255-28 abortion pills for sale in Durban
%in Durban+277-882-255-28 abortion pills for sale in Durban%in Durban+277-882-255-28 abortion pills for sale in Durban
%in Durban+277-882-255-28 abortion pills for sale in Durban
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
 
8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students
 
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
 

Towards better software quality assurance by providing intelligent support

  • 1. Towards Providing Automated Supports to Developers on Making Logging Decisions Tse-Hsun (Peter) Chen peterc@encs.concordia.ca
  • 4. Industry collaboration and research outcome adoption
  • 5. Main research area: improving software quality and testing process Software System Performance counters System logs Software tests Bug reports … Software developers Applying code analysis, machine learning, and data analytics to provide automated support to developers I will focus on my research on software logging in this talk
  • 6. Logs are often the only source of information for production systems System running in production Operator Developer
  • 7. Logs can be used to assist various software development tasks Performance Analysis Requirement Tracking Debugging Monitoring
  • 8. LOG.warn(“Can not parse job id from {} ”, path, e); Verbosity Level Static Message Dynamic Variables … } catch (Exception e) { } Logging Too much: performance overhead; too many trivial logs Too little: missing important information What is a Logging Statement & Trade-off of Logging Logs record important runtime info, but with trade-offs 8
  • 9. What is a Logging Statement & Trade-off of Logging Deciding where to log is challenging “Logging and tracing is (IMO) a fine art, knowing what to log and where takes experience.”
  • 10. Where do developers log? Studying where do developers log and provide recommendations Can we leverage existing code to recommend logging locations?
  • 11. Source Code Logging statements (with surrounding code) Our process of studying and providing logging suggestions
  • 12. Cassandra Our Studied Systems Elasticsearch Flink HBase Kafka Wicket Zookeeper We study where do developers log in 7 large- scale open source systems
  • 13. Source Code Logging statements (with surrounding code) Manual study on logging code Our process of studying and providing logging suggestions
  • 14. Manual study to understand their characteristics Randomly sample 375 out of 14.9K logging statements and their surrendering code Manually studying logging code and its location
  • 15. Manual study to understand their characteristics Randomly sample 375 out of 14.9K logging statements and their surrendering code Manually studying logging code and its location We uncover 6 categories of logging locations, and the relationship between logging statements and code
  • 16. Category 1: Exception information logging in catch blocks Categories of logging locations Semantic information Syntactic information The logging statements often record messages or execution info related to the prior try block.
  • 17. Categories of logging locations Category 2: Execution state logging in branch blocks Semantic information Syntactic information Logging statements often record execution states in different branches.
  • 18. Categories of logging locations Category 3: Logging the beginning/end of a method block (method execution) public void removeJob(JobID jobId){ ... // the end of the method log.info(“Removed jobId {} from Zookeeper”, jobId); } Logging statements often record the beginning or end of method execution. Related to the semantic of the method
  • 19. Source Code Logging statements (with surrounding code) Manual study on logging code Our process of studying and providing logging suggestions Extracting Code Block Feature (Syntactic, Semantic, Fusion)
  • 20. if(Strings.isEmpty(sessionID)) { LOG.error(“failed to get session ID”); handleError(); return; } Syntactic Semantic Fusion Extracting code block features
  • 21. IfStatement, MethodInvocation, string, is, empti, session, id, if(Strings.isEmpty(sessionID)) { handleError(); return; } Syntactic Semantic Fusion MethodInvocation, ReturnStatement handle, error IfStatement, MethodInvocation, string, is, empty, session, id MethodInvocation, handle, error, ReturnStatement Extracting code block features
  • 22. Source Code Logging statements (with surrounding code) Manual study on logging code Our process of studying and providing logging suggestions Extracting Code Block Feature (Syntactic, Semantic, Fusion) Deep Learning Framework
  • 23. Source Code Code Block Features …… Word Embedding Layer RNN Cell RNN Cell RNN Cell …… RNN Cell RNN Layer (LSTM) Output Layer Our process of studying and providing logging suggestions
  • 24. Source Code Logging statements (with surrounding code) Manual study on logging code Our process of studying and providing logging suggestions Extracting Code Block Feature (Syntactic, Semantic, Fusion) Deep Learning Framework Suggestion Results (logged vs. non-logged block)
  • 25. Research Questions RQ1 RQ2 How effective are different block features when suggesting logging locations? Are the trained models transferable to other systems? Evaluation of our logging location suggestion models
  • 26. Research Questions RQ1 RQ2 How effective are different block features when suggesting logging locations? Are the trained models transferable to other systems? Evaluation of our logging location suggestion models
  • 27. • For each system, we use 60% for training, 20% for validation, and 20% for testing. • Compute balanced accuracy for evaluation • How well can the model suggest logged and non-logged code blocks Process and metrics for DL model evaluation
  • 28. Balanced Accuracy of different block features 50 60 70 80 90 Try-Catch Branching Looping Method Syntactic Semantic Fusion 85.8 77.4 69.0 63.2 Process and metrics for DL model evaluation Models trained using syntactic features achieve the best results.
  • 29. True Positive (TP) True Negative (TN) False Positive (FP) False Negative (FN) High overlaps in TN shows non-logged code has distinct characteristics that are captured by all features. Syntactics has the lowest FNs. 20.1% of the TPs are missed by syntactic but captured by two other block features. Only small overlaps on FPs among the features. Studying the overlap among the results using three different features
  • 30. Manually Studying FPs and FNs We further manually study a sample of False Positive and False Negative in our suggestion results We find that a large portion of the FPs and FNs may be considered as TPs and TNs. An example of FP: Some misclassifications may actually be correct The object state is saved to a JSON files instead of log files The actual performance of our model may be even better due to the diverse nature of how developers write logging code.
  • 31. Research Questions RQ1 RQ2 How effective are different block features when suggesting logging locations? Are the trained models transferable to other systems? Evaluation of our logging location suggestion models We suggest logging locations with reasonable accuracy. Different features capture different logging info in the code.
  • 32. Research Questions RQ1 RQ2 How effective are different block features when suggesting logging locations? Are the trained models transferable to other systems? Evaluation of our logging location suggestion models We suggest logging locations with reasonable accuracy. Different features capture different logging info in the code.
  • 33. Training a model using syntactic features Training cross-system models Apply the models on other systems
  • 34. Balanced Accuracy for cross-system suggestions RQ2: Are the trained models transferable to other systems? 10 30 50 70 90 Cassandra Flink Kafka Zookeeper Within Cross 81.7% 80.0% 84.6% 83.9% 88.4% 80.1% 91.7% The percentage is the ratio of Cross against Within Although decreased, cross system suggestion still achieves reasonable performance compared to within-system suggestion. Results of cross system suggestion
  • 35. Research Questions RQ1 RQ2 How effective are different block features when suggesting logging locations? Are the trained models transferable to other systems? Evaluation of our logging location suggestion models We suggest logging locations with reasonable accuracy. Different features capture different logging info in the code. Different systems may share a similar implicit logging guideline.
  • 36.
  • 37.
  • 38.
  • 39.
  • 40.
  • 41.
  • 42.
  • 43.