SlideShare ist ein Scribd-Unternehmen logo
1 von 26
TBar: Revisiting Template-based
Automated Program Repair
Kui LIU, Anil Koyuncu, Dongsun Kim and Tegawendé F. Bissyandé
SnT, University of Luxembourg, Luxembourg
2019-07-17, Wednesday @ISSTA 2019, Beijing, China
1
> Fix Pattern
Fix pattern: e.g., PAR, kim2013ICSE [23].
Fix template: e.g., SOFix, liu2018SANER [40].
Abstract modification: e.g., SimFix, jiang2018ISSTA [18].
Mutation operator: e.g., CapGen, wen2018ICSE [69].
Modification rule: e.g., ssFix, xin2017ASE [74].
Code transform: e.g., Genesis, long2017FSE [41].
Program transformation schemas: e.g., SketchFix, hua2018ICSE[17].
“A fix pattern is a pair of a code context representing a buggy code entity
and a set of related change operations, which can be applied to a given
buggy code entity to generate fixing code.” ---- Liu et al. TSE 2018 [35].
FP: <Code Context, {Change Operations}>
2
> Limited Characterization of Fix Patterns
APR Tool Venue Number of Fix Patterns
PAR [23] ICSE-2013 10
jMutRepair [40] ISSTA-2016 2
HDRepair [29] SANER-2016 11
NPEfix [13] SANER-2017 9
ssFix [74] ASE-2017 34
Genesis [41] FSE-2017 108
S3 [25] ASE-2017 4
ELIXIR [62] ASE-2017 8
SketchFix [17] ICSE-2018 6
SOFix [40] SANER-2018 12
SimFix [18] ISSTA-2018 16
CapGen [69] ICSE-2018 30
AVATAR [39] SANER-2019 13
1.Diversity of fix
patterns.
2.Bug fix performance
of each fix pattern.
3.Fault localization
sensitiveness of fix
patterns.
3
> Study Methodology
1. SLR: Systematically review the APR literature related to fix patterns.
2. Taxonomy: enumerate and summarize fix patterns.
3. A Baseline Repair Tool: implement a comprehensive pattern based APR tool.
4. Empirical Study on Performance and Sensitiveness.
4
SLR and Taxonomy
5
> Fix Pattern Inference in the Literature
1. Manual Summarization.
2. Automated Mining.
3. Pre-definition.
4. Statistics of Actions.
1) Pan et al. EMSE-2009, 27 fix patterns, 5 Java projects.
2) Kim et al. ICSE-2013, 10 fix patterns, 62,656 patches.
1) Long et al. FSE-2017, 108 fix patterns for 3 kinds of defects.
2) Liu and Zhong, SANER-2018, 12 fix patterns, Stack Overflow.
1) Saha et al. ASE-2017, 11 fix patterns, on the top of PAR.
2) Hua et al. ICSE-2018, 6 fix patterns.
1) Wen et al. ICSE-2018, top-30 frequent code change actions.
2) Jiang et al. ISSTA-2018, top-16 frequent code change actions.
6
> Fixing a Bug with a Fix Pattern
--- a/source/org/jfree/chart/renderer/category/AbstractCategoryItemRenderer.java
+++ b/source/org/jfree/chart/renderer/category/AbstractCategoryItemRenderer.java
@ -1796,4 +1796,4 @
CategoryDataset dataset = this.plot.getDataset(index);
- if (dataset != null) {
+ if (dataset == null) {
return result;
}
A Defects4J Bug Chart-1.
Action Type: Update,
Granularity: Expression.
Spread: Single statement.
Fix Pattern: Mutate Operator.
7
> Fix Pattern Taxonomy
FP1. Insert Cast Checker.
FP2. Insert Null Pointer Checker.
FP3. Insert Range Checker.
FP4. Insert Missed Statement.
FP5. Mutate Class Instance Creation.
FP6. Mutate Conditional Expression.
FP7. Mutate Data Type.
FP8. Mutate Integer Division Operation.
FP9. Mutate Literal Expression.
FP10. Mutate Method Invocation Expression.
FP11. Mutate Operator.
FP12. Mutate Return Statement.
FP13. Mutate Variable.
FP14. Move Statement.
FP15. Remove Statement.
15 Fix Pattern Categories  35 fix patterns.
8
> Change Properties of Fix Patterns
Action Type # fix patterns
Update 17
Delete 4
Insert 13
Move 1
Granularity # fix patterns
Expression 21
Statement 17
Method 1
Spread # fix patterns
Single-
statement
30
Multi-
statement
7
9
TBar: a Baseline APR System
10
> TBar: Template-Based automated program repair
Overall Workflow of TBar.
GZoltar and Ochiai
11
> Fix Pattern Selection
Selected
fix pattern
A ranked
list of
suspicious
statements
Fix pattern
data base
Code AST
…
// Buggy code of Closure-13 in Defects4J dataset.
if(options.dependencyOptions.needsManagement() &&
!options.skipAllPasses &&
options.closurePass) {
// AST.
IfStatement
---InfixExpression
------MethodInvocation
--------- ……
------Operator
------PrefixExpression
--------- ……
------Operator
------QualifiedName
--------- ……
FP6. Mutate Conditional Expression.
FP6.1: - ...condExp1...
+ ...condExp2...
FP6.2: - ...condExp1 Op condExp2...
+ ...condExp1...
FP6.3: - ...condExp1...
+ ...condExp1 Op condExp2...
Breadth First Search
12
> Patch Generation
// Buggy code of Closure-13 in Defects4J dataset.
if(options.dependencyOptions.needsManagement() &&
!options.skipAllPasses &&
options.closurePass) {
// Patch Candidate I.
- if(options.dependencyOptions.needsManagement() &&
- !options.skipAllPasses &&
+ if(!options.skipAllPasses &&
options.closurePass) {
// Patch Candidate II.
if (options.dependencyOptions.needsManagement() &&
- !options.skipAllPasses &&
options.closurePass) {
// Patch Candidate III.
if (options.dependencyOptions.needsManagement() &&
- !options.skipAllPasses &&
- options.closurePass) {
+ !options.skipAllPasses) {
FP6.2: - ...condExp1 Op condExp2...
+ ...condExp1...
Patch CandidatesSelected
fix pattern
Mutate
suspicious code
FP6. Mutate Conditional Expression.
FP6.1: - ...condExp1...
+ ...condExp2...
FP6.2: - ...condExp1 Op condExp2...
+ ...condExp1...
FP6.3: - ...condExp1...
+ ...condExp1 Op condExp2...
13
> Assessment Benchmark
Project Chart
(C)
Closure
(Cl)
Lang
(L)
Math
(M)
Mockito
(Mc)
Time
(T)
Total
# bugs 26 133 65 106 38 27 395
# test cases 2,205 7,927 2,245 3,602 1,457 4,130 21,566
Benchmark Defects4J dataset information
14
Repair Suitability of Fix Patterns
15
> Experiment #1: TBar with Perfect Fault Localization
Research Questions :
RQ1. How many bugs from Defects4J can be correctly fixed by
fix patterns from our taxonomy?
RQ2. Can each Defects4J bug be fixed by different fix patterns?
RQ3. What are the properties of fix patterns that are successfully
used to fix bugs?
16
> RQ1: Number of Fixed Bugs
Project Chart
(C)
Closure
(Cl)
Lang
(L)
Math
(M)
Mockito
(Mc)
Time
(T)
Total
# fully
fixed bugs
12/13 20/26 13/18 23/25 3/3 3/6 74/101
# partially
fixed bugs
2/4 3/6 1/4 0/4 0/0 1/1 7/20
Number of bugs fixed by fix patterns in TBar with perfect fault localization
17
> Limitation and Discussion
1. Insufficient fix patterns.
2. Less effective search of fix ingredients.
public String generateToolTipFragment(String toolTipText) {
- return " title="" + toolTipText
+ return " title="" + ImageMapUtilities.htmlEscape(toolTipText)
+ "" alt=""";
}
Matchable fix pattern: FP9.2.
Donor code searching
in “local” file
18
> RQ2: Number of Fix Patterns vs. Fixing Bugs
28
9
2
1
38
10
5
3
10
4
4
3
1
1
1
1
1
2
3
4
5
>5#FIX
PATTERNS
P #1 #2 #3 #4
It is important to select appropriate fix patterns for different bugs.
19
> RQ3: Fix Pattern Properties
85
49
24
4
43
32
18
2
Update Insert Delete Move
#fixedbugs
122
38
2
54
39
2
Expression Statement Method
140
22
71
24
Single Multiple
Plausibly BUT Incorrectly fixed bugs. Correctly fixed bugs.
a. Change Actions b. Change Granularity c. Changed Spread
Repair performance is different among fix patterns properties.
20
Repair Performance Comparison
21
> Experiment #2: TBar with Normal Fault Localization
Research Questions:
RQ4. What performance can be achieved by TBar in a standard
and practical repair scenario?
RQ5. To what extent are the fix pattern based repair tool sensitive
to noise in fault localization (i.e., spotting bug positions)?
22
> RQ4: Performance Comparison with the State-of-the-Art
TBar outperforms all recent state-of-the-art APR tools
that were evaluated on the Defects4J dataset.
23
> RQ5: Fault Localization Sensitiveness
Fault localization noise has a significant impact on
the performance of TBar.
Plausibly but incorrectly fixed bugs
24 1514
1
Fully fixed Partially fixed
#fixed
bugs
incorrect position
correct position
24
> DISCUSSION
1. Fix pattern diversity.
2. Fix pattern selection.
3. Donor code searching.
4. Patch prioritization.
5. Fault Localization Sensitiveness.
25
> SUMMARY
10
> TBar: Template-Based automated program repair
Overall Workflow of TBar.
GZoltar and Ochiai
23
> Standard Practical Performance
https://github.com/SerVal-DTF/TBar

Weitere ähnliche Inhalte

Was ist angesagt?

AVATAR : Fixing Semantic Bugs with Fix Patterns of Static Analysis Violations
AVATAR : Fixing Semantic Bugs with Fix Patterns of Static Analysis ViolationsAVATAR : Fixing Semantic Bugs with Fix Patterns of Static Analysis Violations
AVATAR : Fixing Semantic Bugs with Fix Patterns of Static Analysis ViolationsDongsun Kim
 
Automated Program Repair Keynote talk
Automated Program Repair Keynote talkAutomated Program Repair Keynote talk
Automated Program Repair Keynote talkAbhik Roychoudhury
 
Code Analysis-run time error prediction
Code Analysis-run time error predictionCode Analysis-run time error prediction
Code Analysis-run time error predictionNIKHIL NAWATHE
 
Test final jav_aaa
Test final jav_aaaTest final jav_aaa
Test final jav_aaaBagusBudi11
 
SherLog: Error Diagnosis by Connecting Clues from Run-time Logs
SherLog: Error Diagnosis by Connecting Clues from Run-time LogsSherLog: Error Diagnosis by Connecting Clues from Run-time Logs
SherLog: Error Diagnosis by Connecting Clues from Run-time LogsDacong (Tony) Yan
 
150412 38 beamer methods of binary analysis
150412 38 beamer methods of  binary analysis150412 38 beamer methods of  binary analysis
150412 38 beamer methods of binary analysisRaghu Palakodety
 
Headache from using mathematical software
Headache from using mathematical softwareHeadache from using mathematical software
Headache from using mathematical softwarePVS-Studio
 
Crowd debugging (FSE 2015)
Crowd debugging (FSE 2015)Crowd debugging (FSE 2015)
Crowd debugging (FSE 2015)Sung Kim
 
STAR: Stack Trace based Automatic Crash Reproduction
STAR: Stack Trace based Automatic Crash ReproductionSTAR: Stack Trace based Automatic Crash Reproduction
STAR: Stack Trace based Automatic Crash ReproductionSung Kim
 
Static analysis works for mission-critical systems, why not yours?
Static analysis works for mission-critical systems, why not yours? Static analysis works for mission-critical systems, why not yours?
Static analysis works for mission-critical systems, why not yours? Rogue Wave Software
 
Dissertation Defense
Dissertation DefenseDissertation Defense
Dissertation DefenseSung Kim
 
Effective Fault-Localization Techniques for Concurrent Software
Effective Fault-Localization Techniques for Concurrent SoftwareEffective Fault-Localization Techniques for Concurrent Software
Effective Fault-Localization Techniques for Concurrent SoftwareSangmin Park
 
Griffin: Grouping Suspicious Memory-Access Patterns to Improve Understanding...
Griffin: Grouping Suspicious Memory-Access Patterns to Improve Understanding...Griffin: Grouping Suspicious Memory-Access Patterns to Improve Understanding...
Griffin: Grouping Suspicious Memory-Access Patterns to Improve Understanding...Sangmin Park
 
Partitioning Composite Code Changes to Facilitate Code Review (MSR2015)
Partitioning Composite Code Changes to Facilitate Code Review (MSR2015)Partitioning Composite Code Changes to Facilitate Code Review (MSR2015)
Partitioning Composite Code Changes to Facilitate Code Review (MSR2015)Sung Kim
 
"Быстрое обнаружение вредоносного ПО для Android с помощью машинного обучения...
"Быстрое обнаружение вредоносного ПО для Android с помощью машинного обучения..."Быстрое обнаружение вредоносного ПО для Android с помощью машинного обучения...
"Быстрое обнаружение вредоносного ПО для Android с помощью машинного обучения...Yandex
 

Was ist angesagt? (20)

AVATAR : Fixing Semantic Bugs with Fix Patterns of Static Analysis Violations
AVATAR : Fixing Semantic Bugs with Fix Patterns of Static Analysis ViolationsAVATAR : Fixing Semantic Bugs with Fix Patterns of Static Analysis Violations
AVATAR : Fixing Semantic Bugs with Fix Patterns of Static Analysis Violations
 
Automated Program Repair Keynote talk
Automated Program Repair Keynote talkAutomated Program Repair Keynote talk
Automated Program Repair Keynote talk
 
Code Analysis-run time error prediction
Code Analysis-run time error predictionCode Analysis-run time error prediction
Code Analysis-run time error prediction
 
Test final jav_aaa
Test final jav_aaaTest final jav_aaa
Test final jav_aaa
 
SherLog: Error Diagnosis by Connecting Clues from Run-time Logs
SherLog: Error Diagnosis by Connecting Clues from Run-time LogsSherLog: Error Diagnosis by Connecting Clues from Run-time Logs
SherLog: Error Diagnosis by Connecting Clues from Run-time Logs
 
Repair dagstuhl jan2017
Repair dagstuhl jan2017Repair dagstuhl jan2017
Repair dagstuhl jan2017
 
Mobilesoft 2017 Keynote
Mobilesoft 2017 KeynoteMobilesoft 2017 Keynote
Mobilesoft 2017 Keynote
 
c++ lab manual
c++ lab manualc++ lab manual
c++ lab manual
 
150412 38 beamer methods of binary analysis
150412 38 beamer methods of  binary analysis150412 38 beamer methods of  binary analysis
150412 38 beamer methods of binary analysis
 
Headache from using mathematical software
Headache from using mathematical softwareHeadache from using mathematical software
Headache from using mathematical software
 
Crowd debugging (FSE 2015)
Crowd debugging (FSE 2015)Crowd debugging (FSE 2015)
Crowd debugging (FSE 2015)
 
STAR: Stack Trace based Automatic Crash Reproduction
STAR: Stack Trace based Automatic Crash ReproductionSTAR: Stack Trace based Automatic Crash Reproduction
STAR: Stack Trace based Automatic Crash Reproduction
 
Static analysis works for mission-critical systems, why not yours?
Static analysis works for mission-critical systems, why not yours? Static analysis works for mission-critical systems, why not yours?
Static analysis works for mission-critical systems, why not yours?
 
Dissertation Defense
Dissertation DefenseDissertation Defense
Dissertation Defense
 
Effective Fault-Localization Techniques for Concurrent Software
Effective Fault-Localization Techniques for Concurrent SoftwareEffective Fault-Localization Techniques for Concurrent Software
Effective Fault-Localization Techniques for Concurrent Software
 
Symbexecsearch
SymbexecsearchSymbexecsearch
Symbexecsearch
 
Griffin: Grouping Suspicious Memory-Access Patterns to Improve Understanding...
Griffin: Grouping Suspicious Memory-Access Patterns to Improve Understanding...Griffin: Grouping Suspicious Memory-Access Patterns to Improve Understanding...
Griffin: Grouping Suspicious Memory-Access Patterns to Improve Understanding...
 
Abhik-Satish-dagstuhl
Abhik-Satish-dagstuhlAbhik-Satish-dagstuhl
Abhik-Satish-dagstuhl
 
Partitioning Composite Code Changes to Facilitate Code Review (MSR2015)
Partitioning Composite Code Changes to Facilitate Code Review (MSR2015)Partitioning Composite Code Changes to Facilitate Code Review (MSR2015)
Partitioning Composite Code Changes to Facilitate Code Review (MSR2015)
 
"Быстрое обнаружение вредоносного ПО для Android с помощью машинного обучения...
"Быстрое обнаружение вредоносного ПО для Android с помощью машинного обучения..."Быстрое обнаружение вредоносного ПО для Android с помощью машинного обучения...
"Быстрое обнаружение вредоносного ПО для Android с помощью машинного обучения...
 

Ähnlich wie TBar: Revisiting Template-based Automated Program Repair

The Use of Development History in Software Refactoring Using a Multi-Objectiv...
The Use of Development History in Software Refactoring Using a Multi-Objectiv...The Use of Development History in Software Refactoring Using a Multi-Objectiv...
The Use of Development History in Software Refactoring Using a Multi-Objectiv...Ali Ouni
 
Pragmatic Optimization in Modern Programming - Demystifying the Compiler
Pragmatic Optimization in Modern Programming - Demystifying the CompilerPragmatic Optimization in Modern Programming - Demystifying the Compiler
Pragmatic Optimization in Modern Programming - Demystifying the CompilerMarina Kolpakova
 
Pune University MCA [Management] 2020-Sample Questions
Pune University MCA [Management] 2020-Sample QuestionsPune University MCA [Management] 2020-Sample Questions
Pune University MCA [Management] 2020-Sample Questionsshailendrashinde9
 
C programming language tutorial
C programming language tutorial C programming language tutorial
C programming language tutorial javaTpoint s
 
Model-Based Optimization / INFORMS International
Model-Based Optimization / INFORMS InternationalModel-Based Optimization / INFORMS International
Model-Based Optimization / INFORMS InternationalBob Fourer
 
C basic questions&amp;ansrs by shiva kumar kella
C basic questions&amp;ansrs by shiva kumar kellaC basic questions&amp;ansrs by shiva kumar kella
C basic questions&amp;ansrs by shiva kumar kellaManoj Kumar kothagulla
 
Refactoring for Software Design Smells - Tech Talk
Refactoring for Software Design Smells - Tech Talk Refactoring for Software Design Smells - Tech Talk
Refactoring for Software Design Smells - Tech Talk Ganesh Samarthyam
 
Refactoring for Software Design Smells - Tech Talk
Refactoring for Software Design Smells - Tech TalkRefactoring for Software Design Smells - Tech Talk
Refactoring for Software Design Smells - Tech TalkCodeOps Technologies LLP
 
Memories of Bug Fixes
Memories of Bug FixesMemories of Bug Fixes
Memories of Bug FixesSung Kim
 
C Languages FAQ's
C Languages FAQ'sC Languages FAQ's
C Languages FAQ'sSriram Raj
 
VCE Unit 01 (1).pptx
VCE Unit 01 (1).pptxVCE Unit 01 (1).pptx
VCE Unit 01 (1).pptxskilljiolms
 
Polymer Brush Data Processor
Polymer Brush Data ProcessorPolymer Brush Data Processor
Polymer Brush Data ProcessorCory Bethrant
 
Tesseract. Recognizing Errors in Recognition Software
Tesseract. Recognizing Errors in Recognition SoftwareTesseract. Recognizing Errors in Recognition Software
Tesseract. Recognizing Errors in Recognition SoftwareAndrey Karpov
 
100 bugs in Open Source C/C++ projects
100 bugs in Open Source C/C++ projects 100 bugs in Open Source C/C++ projects
100 bugs in Open Source C/C++ projects Andrey Karpov
 
Introduction of Feature Hashing
Introduction of Feature HashingIntroduction of Feature Hashing
Introduction of Feature HashingWush Wu
 
Testing the Numerical Precisions Required to Execute Real World Programs
Testing the Numerical Precisions Required to Execute Real World Programs Testing the Numerical Precisions Required to Execute Real World Programs
Testing the Numerical Precisions Required to Execute Real World Programs ijseajournal
 
A NOVEL APPROACH TO MINE FREQUENT PATTERNS FROM LARGE VOLUME OF DATASET USING...
A NOVEL APPROACH TO MINE FREQUENT PATTERNS FROM LARGE VOLUME OF DATASET USING...A NOVEL APPROACH TO MINE FREQUENT PATTERNS FROM LARGE VOLUME OF DATASET USING...
A NOVEL APPROACH TO MINE FREQUENT PATTERNS FROM LARGE VOLUME OF DATASET USING...IAEME Publication
 
C, C++ Interview Questions Part - 1
C, C++ Interview Questions Part - 1C, C++ Interview Questions Part - 1
C, C++ Interview Questions Part - 1ReKruiTIn.com
 

Ähnlich wie TBar: Revisiting Template-based Automated Program Repair (20)

The Use of Development History in Software Refactoring Using a Multi-Objectiv...
The Use of Development History in Software Refactoring Using a Multi-Objectiv...The Use of Development History in Software Refactoring Using a Multi-Objectiv...
The Use of Development History in Software Refactoring Using a Multi-Objectiv...
 
TiReX: Tiled Regular eXpression matching architecture
TiReX: Tiled Regular eXpression matching architectureTiReX: Tiled Regular eXpression matching architecture
TiReX: Tiled Regular eXpression matching architecture
 
Pragmatic Optimization in Modern Programming - Demystifying the Compiler
Pragmatic Optimization in Modern Programming - Demystifying the CompilerPragmatic Optimization in Modern Programming - Demystifying the Compiler
Pragmatic Optimization in Modern Programming - Demystifying the Compiler
 
Pune University MCA [Management] 2020-Sample Questions
Pune University MCA [Management] 2020-Sample QuestionsPune University MCA [Management] 2020-Sample Questions
Pune University MCA [Management] 2020-Sample Questions
 
C programming language tutorial
C programming language tutorial C programming language tutorial
C programming language tutorial
 
Model-Based Optimization / INFORMS International
Model-Based Optimization / INFORMS InternationalModel-Based Optimization / INFORMS International
Model-Based Optimization / INFORMS International
 
C basic questions&amp;ansrs by shiva kumar kella
C basic questions&amp;ansrs by shiva kumar kellaC basic questions&amp;ansrs by shiva kumar kella
C basic questions&amp;ansrs by shiva kumar kella
 
Refactoring for Software Design Smells - Tech Talk
Refactoring for Software Design Smells - Tech Talk Refactoring for Software Design Smells - Tech Talk
Refactoring for Software Design Smells - Tech Talk
 
Refactoring for Software Design Smells - Tech Talk
Refactoring for Software Design Smells - Tech TalkRefactoring for Software Design Smells - Tech Talk
Refactoring for Software Design Smells - Tech Talk
 
Memories of Bug Fixes
Memories of Bug FixesMemories of Bug Fixes
Memories of Bug Fixes
 
C Languages FAQ's
C Languages FAQ'sC Languages FAQ's
C Languages FAQ's
 
VCE Unit 01 (1).pptx
VCE Unit 01 (1).pptxVCE Unit 01 (1).pptx
VCE Unit 01 (1).pptx
 
06slide.ppt
06slide.ppt06slide.ppt
06slide.ppt
 
Polymer Brush Data Processor
Polymer Brush Data ProcessorPolymer Brush Data Processor
Polymer Brush Data Processor
 
Tesseract. Recognizing Errors in Recognition Software
Tesseract. Recognizing Errors in Recognition SoftwareTesseract. Recognizing Errors in Recognition Software
Tesseract. Recognizing Errors in Recognition Software
 
100 bugs in Open Source C/C++ projects
100 bugs in Open Source C/C++ projects 100 bugs in Open Source C/C++ projects
100 bugs in Open Source C/C++ projects
 
Introduction of Feature Hashing
Introduction of Feature HashingIntroduction of Feature Hashing
Introduction of Feature Hashing
 
Testing the Numerical Precisions Required to Execute Real World Programs
Testing the Numerical Precisions Required to Execute Real World Programs Testing the Numerical Precisions Required to Execute Real World Programs
Testing the Numerical Precisions Required to Execute Real World Programs
 
A NOVEL APPROACH TO MINE FREQUENT PATTERNS FROM LARGE VOLUME OF DATASET USING...
A NOVEL APPROACH TO MINE FREQUENT PATTERNS FROM LARGE VOLUME OF DATASET USING...A NOVEL APPROACH TO MINE FREQUENT PATTERNS FROM LARGE VOLUME OF DATASET USING...
A NOVEL APPROACH TO MINE FREQUENT PATTERNS FROM LARGE VOLUME OF DATASET USING...
 
C, C++ Interview Questions Part - 1
C, C++ Interview Questions Part - 1C, C++ Interview Questions Part - 1
C, C++ Interview Questions Part - 1
 

Kürzlich hochgeladen

Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdfChristopherTHyatt
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdflior mazor
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 

Kürzlich hochgeladen (20)

Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdf
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 

TBar: Revisiting Template-based Automated Program Repair

  • 1. TBar: Revisiting Template-based Automated Program Repair Kui LIU, Anil Koyuncu, Dongsun Kim and Tegawendé F. Bissyandé SnT, University of Luxembourg, Luxembourg 2019-07-17, Wednesday @ISSTA 2019, Beijing, China
  • 2. 1 > Fix Pattern Fix pattern: e.g., PAR, kim2013ICSE [23]. Fix template: e.g., SOFix, liu2018SANER [40]. Abstract modification: e.g., SimFix, jiang2018ISSTA [18]. Mutation operator: e.g., CapGen, wen2018ICSE [69]. Modification rule: e.g., ssFix, xin2017ASE [74]. Code transform: e.g., Genesis, long2017FSE [41]. Program transformation schemas: e.g., SketchFix, hua2018ICSE[17]. “A fix pattern is a pair of a code context representing a buggy code entity and a set of related change operations, which can be applied to a given buggy code entity to generate fixing code.” ---- Liu et al. TSE 2018 [35]. FP: <Code Context, {Change Operations}>
  • 3. 2 > Limited Characterization of Fix Patterns APR Tool Venue Number of Fix Patterns PAR [23] ICSE-2013 10 jMutRepair [40] ISSTA-2016 2 HDRepair [29] SANER-2016 11 NPEfix [13] SANER-2017 9 ssFix [74] ASE-2017 34 Genesis [41] FSE-2017 108 S3 [25] ASE-2017 4 ELIXIR [62] ASE-2017 8 SketchFix [17] ICSE-2018 6 SOFix [40] SANER-2018 12 SimFix [18] ISSTA-2018 16 CapGen [69] ICSE-2018 30 AVATAR [39] SANER-2019 13 1.Diversity of fix patterns. 2.Bug fix performance of each fix pattern. 3.Fault localization sensitiveness of fix patterns.
  • 4. 3 > Study Methodology 1. SLR: Systematically review the APR literature related to fix patterns. 2. Taxonomy: enumerate and summarize fix patterns. 3. A Baseline Repair Tool: implement a comprehensive pattern based APR tool. 4. Empirical Study on Performance and Sensitiveness.
  • 6. 5 > Fix Pattern Inference in the Literature 1. Manual Summarization. 2. Automated Mining. 3. Pre-definition. 4. Statistics of Actions. 1) Pan et al. EMSE-2009, 27 fix patterns, 5 Java projects. 2) Kim et al. ICSE-2013, 10 fix patterns, 62,656 patches. 1) Long et al. FSE-2017, 108 fix patterns for 3 kinds of defects. 2) Liu and Zhong, SANER-2018, 12 fix patterns, Stack Overflow. 1) Saha et al. ASE-2017, 11 fix patterns, on the top of PAR. 2) Hua et al. ICSE-2018, 6 fix patterns. 1) Wen et al. ICSE-2018, top-30 frequent code change actions. 2) Jiang et al. ISSTA-2018, top-16 frequent code change actions.
  • 7. 6 > Fixing a Bug with a Fix Pattern --- a/source/org/jfree/chart/renderer/category/AbstractCategoryItemRenderer.java +++ b/source/org/jfree/chart/renderer/category/AbstractCategoryItemRenderer.java @ -1796,4 +1796,4 @ CategoryDataset dataset = this.plot.getDataset(index); - if (dataset != null) { + if (dataset == null) { return result; } A Defects4J Bug Chart-1. Action Type: Update, Granularity: Expression. Spread: Single statement. Fix Pattern: Mutate Operator.
  • 8. 7 > Fix Pattern Taxonomy FP1. Insert Cast Checker. FP2. Insert Null Pointer Checker. FP3. Insert Range Checker. FP4. Insert Missed Statement. FP5. Mutate Class Instance Creation. FP6. Mutate Conditional Expression. FP7. Mutate Data Type. FP8. Mutate Integer Division Operation. FP9. Mutate Literal Expression. FP10. Mutate Method Invocation Expression. FP11. Mutate Operator. FP12. Mutate Return Statement. FP13. Mutate Variable. FP14. Move Statement. FP15. Remove Statement. 15 Fix Pattern Categories  35 fix patterns.
  • 9. 8 > Change Properties of Fix Patterns Action Type # fix patterns Update 17 Delete 4 Insert 13 Move 1 Granularity # fix patterns Expression 21 Statement 17 Method 1 Spread # fix patterns Single- statement 30 Multi- statement 7
  • 10. 9 TBar: a Baseline APR System
  • 11. 10 > TBar: Template-Based automated program repair Overall Workflow of TBar. GZoltar and Ochiai
  • 12. 11 > Fix Pattern Selection Selected fix pattern A ranked list of suspicious statements Fix pattern data base Code AST … // Buggy code of Closure-13 in Defects4J dataset. if(options.dependencyOptions.needsManagement() && !options.skipAllPasses && options.closurePass) { // AST. IfStatement ---InfixExpression ------MethodInvocation --------- …… ------Operator ------PrefixExpression --------- …… ------Operator ------QualifiedName --------- …… FP6. Mutate Conditional Expression. FP6.1: - ...condExp1... + ...condExp2... FP6.2: - ...condExp1 Op condExp2... + ...condExp1... FP6.3: - ...condExp1... + ...condExp1 Op condExp2... Breadth First Search
  • 13. 12 > Patch Generation // Buggy code of Closure-13 in Defects4J dataset. if(options.dependencyOptions.needsManagement() && !options.skipAllPasses && options.closurePass) { // Patch Candidate I. - if(options.dependencyOptions.needsManagement() && - !options.skipAllPasses && + if(!options.skipAllPasses && options.closurePass) { // Patch Candidate II. if (options.dependencyOptions.needsManagement() && - !options.skipAllPasses && options.closurePass) { // Patch Candidate III. if (options.dependencyOptions.needsManagement() && - !options.skipAllPasses && - options.closurePass) { + !options.skipAllPasses) { FP6.2: - ...condExp1 Op condExp2... + ...condExp1... Patch CandidatesSelected fix pattern Mutate suspicious code FP6. Mutate Conditional Expression. FP6.1: - ...condExp1... + ...condExp2... FP6.2: - ...condExp1 Op condExp2... + ...condExp1... FP6.3: - ...condExp1... + ...condExp1 Op condExp2...
  • 14. 13 > Assessment Benchmark Project Chart (C) Closure (Cl) Lang (L) Math (M) Mockito (Mc) Time (T) Total # bugs 26 133 65 106 38 27 395 # test cases 2,205 7,927 2,245 3,602 1,457 4,130 21,566 Benchmark Defects4J dataset information
  • 15. 14 Repair Suitability of Fix Patterns
  • 16. 15 > Experiment #1: TBar with Perfect Fault Localization Research Questions : RQ1. How many bugs from Defects4J can be correctly fixed by fix patterns from our taxonomy? RQ2. Can each Defects4J bug be fixed by different fix patterns? RQ3. What are the properties of fix patterns that are successfully used to fix bugs?
  • 17. 16 > RQ1: Number of Fixed Bugs Project Chart (C) Closure (Cl) Lang (L) Math (M) Mockito (Mc) Time (T) Total # fully fixed bugs 12/13 20/26 13/18 23/25 3/3 3/6 74/101 # partially fixed bugs 2/4 3/6 1/4 0/4 0/0 1/1 7/20 Number of bugs fixed by fix patterns in TBar with perfect fault localization
  • 18. 17 > Limitation and Discussion 1. Insufficient fix patterns. 2. Less effective search of fix ingredients. public String generateToolTipFragment(String toolTipText) { - return " title="" + toolTipText + return " title="" + ImageMapUtilities.htmlEscape(toolTipText) + "" alt="""; } Matchable fix pattern: FP9.2. Donor code searching in “local” file
  • 19. 18 > RQ2: Number of Fix Patterns vs. Fixing Bugs 28 9 2 1 38 10 5 3 10 4 4 3 1 1 1 1 1 2 3 4 5 >5#FIX PATTERNS P #1 #2 #3 #4 It is important to select appropriate fix patterns for different bugs.
  • 20. 19 > RQ3: Fix Pattern Properties 85 49 24 4 43 32 18 2 Update Insert Delete Move #fixedbugs 122 38 2 54 39 2 Expression Statement Method 140 22 71 24 Single Multiple Plausibly BUT Incorrectly fixed bugs. Correctly fixed bugs. a. Change Actions b. Change Granularity c. Changed Spread Repair performance is different among fix patterns properties.
  • 22. 21 > Experiment #2: TBar with Normal Fault Localization Research Questions: RQ4. What performance can be achieved by TBar in a standard and practical repair scenario? RQ5. To what extent are the fix pattern based repair tool sensitive to noise in fault localization (i.e., spotting bug positions)?
  • 23. 22 > RQ4: Performance Comparison with the State-of-the-Art TBar outperforms all recent state-of-the-art APR tools that were evaluated on the Defects4J dataset.
  • 24. 23 > RQ5: Fault Localization Sensitiveness Fault localization noise has a significant impact on the performance of TBar. Plausibly but incorrectly fixed bugs 24 1514 1 Fully fixed Partially fixed #fixed bugs incorrect position correct position
  • 25. 24 > DISCUSSION 1. Fix pattern diversity. 2. Fix pattern selection. 3. Donor code searching. 4. Patch prioritization. 5. Fault Localization Sensitiveness.
  • 26. 25 > SUMMARY 10 > TBar: Template-Based automated program repair Overall Workflow of TBar. GZoltar and Ochiai 23 > Standard Practical Performance https://github.com/SerVal-DTF/TBar

Hinweis der Redaktion

  1. Good morning, every one, my name is Kui Liu. I am a PhD student from University of Luxembourg. In a recent decade, different APR tools have been proposed to fix bugs in different ways. Our work is to build a new base line to encourage people for advancing program repair.
  2. Fix Pattern is defined as a pair … It is also names as ..
  3. In the literature, fix patterns have been widely used in program repair. And have achieved promising results. However, different tools use different fix patterns. It is not qualified. How diverse are the fix patterns used by the state-of-the-art? This study is trying to answer these questions.
  4. To answer these questions, this work consists of four parts.
  5. Forum like stack overflow.
  6. Looking at this patch, we can find that the action type is “update”, replacing the buggy operator with another one. The directly impacted granularity is an operator, which is a kind of expression, so the granularity of this fix pattern is Expression. This fix pattern is mutating operator, that means, only one statement will be impacted by it. So the spread is single statement.
  7. According to a literature review, we summarized fix patterns into 15 categories. So that, the 15 categories include 35 fix patterns.
  8. Let’s take a look at the properties of these 35 fix patterns. From the aspect of action types. There are 4 types.
  9. With the AST node information, we will match fix patterns for the statement in terms of breadth first search.
  10. Change condExp1 with condExp2, the question is where do we find the ccocndExp2.
  11. Now, let us take a look at the repair …
  12. In this experiment, we focus on these three questions.
  13. We have two kinds of results: fully fixed bugs and partially fixed bugs. There results are very promising.
  14. However,
  15. Y-axis
  16. The correct patches are mainly generated by update and insert action type fix patterns. Expresion, and Statement, and Single, However, they also can generate more plausible patches than others.
  17. We further compare the performance of TBar with the state-of-the-art.
  18. Assessment of TBar
  19. Checking ICSE2019 Paper This baseline outperforms the state-of-the-art in terms of the number of fixed bugs.
  20. Why they are plausible?