SlideShare a Scribd company logo
1 of 30
Download to read offline
How to Design a Program Repair Bot?
Insights from the Repairnator Project
Simon Urli, Zhongxing Yu, Lionel Seinturier, Martin Monperrus
simon.urli@inria.fr
February, 26st
, 2018
Inria & University of Lille
Proceedings of ICSE, SEIP track, 2018
Motivation
After one year of operating a repair
bot: what pitfall should you avoid?
1/23
What is Repairnator?
Repairnator
If the main objective of Terminator
was “Seek and Destroy”, the main
goal of Repairnator is “Scan and
Repair”.
→ Fix a maximum of failing builds
from TravisCI.
2/23
Overview & Design choices
Overview
Travis CI
GitHub Projects
Commits
Builds with
failing tests
List of
projects
Repairnator Bot
CI Build
Analysis
Bug
Reproduction
Patches
collected
repair data
Developers
Repairnator
patch analyst
Research
community
Patch Synthesis
Nopol Astor NPEFix
3/23
Design choices
Repairnator targets:
• Java projects using Maven
• Expertise in program repair for Java
• Standard build tool
• Build-based repairing bot
• GitHub projects using TravisCI
4/23
Design choices
Repairnator targets:
• Java projects using Maven
• Build-based repairing bot
• Easy oracle: failing builds → project to repair
• Long-term view: Repairnator as part of the CI
• GitHub projects using TravisCI
4/23
Design choices
Repairnator targets:
• Java projects using Maven
• Build-based repairing bot
• GitHub projects using TravisCI
• GitHub: largest open-source code hosting service
• TravisCI: standard CI for open-source on GitHub & open API
4/23
Step 1 : CI Build Analysis
Considered Projects
Different ways to produce the list:
• TravisTorrent
• GHTorrent
• GitHub API & Trends
Criteria to be selected:
1. Open-source and available on Github
2. Use Java and Maven
3. With a test suite
4. Popular and active: the most starred first and activity in
previous months
5/23
Considered Projects
List of projects to consider
from:
• TravisTorrent:
not so many data
• GHTorrent:
needs to be filtered
• GitHub Trends:
no API
The usage of tools over 14 188 Java projects
hosted on GitHub.
Results: 1609 projects selected.
6/23
Build analysis
Date
Numberofbuilds
Collected builds to be analyzed Builds identified as Java with CI failure Builds with JUnit test failure (called “interesting builds”).
Feb '17 Mar '17 Apr '17 May '17 Jun '17 Jul '17 Aug '17 Sep '17 Oct '17 Nov '17 Dec '17
0
500
1000
1500
2000
2500
3000
3500
4000
4500
5000
5500
6000
6500
7000
7500
8000
8500
9000
9500
10 000
10 500
11 000
11 500
12 000
12 500
13 000
13 500
14 000
14 500
15 000
Highcharts.com
Not filtered list
(> 14 000 projects)
Filtered list
(1 609 projects)
Second filtering
(281 projects)
Process: builds are pulled from Travis, then status and language
are checked and finally logs are analyzed for test failure. 7/23
Build analysis
Problem: Current build analysis is tedious and time-consuming.
What can we do?
• trigger bot from the test-failing build if possible
• it might depend on the considered CI
• avoid as much as possible log analysis
• get test results from CI
• launch reproduction even when not sure
8/23
Step 2 : Local bug reproduction
Steps for local bug reproduction
1. Clone the repository
2. Checkout the right commit
3. Compile the build (i.e. mvn install -DskipTest)
4. Run test (i.e. mvn test)
5. Parse test information (i.e. read xml files)
All steps are done inside a docker container and if a bug is
successfully reproduced all data are pushed to a repository.
9/23
Local bug reproduction: obtained results 1/2
Values
Build statuses (all times - 14385 builds)
5215 (36.3%)5215 (36.3%)
4510 (31.4%)4510 (31.4%)
2874 (20.0%)2874 (20.0%)
1415 (9.8%)1415 (9.8%)
337 (2.3%)337 (2.3%)
34 (0.2%)34 (0.2%)
Error when compiling
Successful Bug Reproduction
Test without failure
Error when testing
Error when checking out
Error when cloning
0 1k 2k 3k 4k 5k 6k
Highcharts.com
10/23
Local bug reproduction: obtained results 2/2
Rank Project Builds with Rank Reproduced
test failure (test failure) bugs
1 druid-io/druid 579 2 359 (62.00%)
2 apache/flink 477 3 326 (68.34%)
3 prestodb/presto 1000 1 194 (19.40%)
4 hubspot/singularity 437 5 182 (41.65%)
5 corfudb/corfudb 313 7 126 (40.26%)
6 apache/storm 349 6 111 (31.81%)
7 geoserver/geoserver 118 18 109 (92.37%)
8 spotify/docker-client 111 21 99 (89.19%)
9 xetorthio/jedis 100 25 94 (94.00%)
10 4pr0n/ripme 94 28 87 (92.55%)
11/23
Local bug reproduction
Bug reproduction is HARD.
Build failure reproduction errors can come from:
• build environment (OS, JDK, ...)
• build setup (bash script to start a server, ...)
• flaky tests or custom failing goals (checkstyle, coverage
threshold...)
• right source code version not found
• timeout (after 24 hours we kill build)
12/23
Local bug reproduction
Bug reproduction is HARD.
What can we do?
• reproduce in sandboxed environment (docker)
• use the same setup as in the CI
• don’t try to get back missing commits
13/23
Step 3 : Patch Synthesis
Repair tools
Nopol:
dedicated to repair conditionnal bugs by modifying exisiting
conditions or inserting preconditions.
Astor:
a generate-and-validate repair tool derived from Genprog.
NPEFix:
dedicated to repair only NullPointerException by inserting
preconditions.
14/23
Patch synthesis steps
1. Analyze test information from bug reproduction step
2. if a NullPointerException is detected: run NPEFix
3. Run Astor & Nopol (budget based)
At each point, send an email if a Patch is found.
15/23
Patch synthesis
Patch synthesis is even HARDER
Successful Reproduction Builds (all times - 14307 builds)
Bug reproduction without patch: 99.6% (4464)Bug reproduction without patch: 99.6% (4464)
Bug reproduction and patch created: 0.4% (17)Bug reproduction and patch created: 0.4% (17)
Highcharts.com 16/23
Obtained patches
Project Builds w/ Nopol NPEFix Rank
patches patches patches (rep. build)
jamesagnew/hapi-fhir 1 35 0 88
spotify/cassandra-reaper 1 1 0 121
xmlunit/xmlunit 1 145 0 203
apache/pdfbox 1 120 0 95
LiveRamp/hank 1 4 0 225
spring-cloud/spring-cloud-
dataflow
1 0 1 56
IQSS/dataverse 2 0 16 40
bonigarcia/webdrivermanager 3 30 0 27
GeoWebCache/geowebcache 1 0 2 107
timmolter/XChange 1 0 4 58
phax/jcodemodel 1 624 0 193
phoenixnap/springmvc-
raml-plugin
1 348 0 66
Total 15 1 307 23
17/23
Valid patches
todo am´eliorer image?
Total 15 1 307 23
Number of valid patch obtained and accepted: 1.
18/23
Valid patches
Total 15 1 307 23
Number of valid patch obtained and accepted: 1.
19/23
Top 10 error types
Rank Exception Occurrences
1 java.lang.AssertionError 2 162
2 java.lang.NullPointerException 641
3 org.junit.ComparisonFailure 419
4 java.lang.Exception 250
5 java.lang.IllegalStateException 202
6 java.lang.NoClassDefFoundError 197
7 java.lang.RuntimeException 191
8 junit.framework.AssertionFailedError 163
9 java.lang.ExceptionInInitializerError 117
10 java.io.IOException 110
20/23
Patch synthesis: discussion
• Current generic repair tools (Astor & Nopol) are really time
and resources consuming
• Repairing assertion errors = guessing a behaviour which is
pretty hard
• Repairing explicit errors (NPE, NumberFormatException, ...)
seems easier to achieve
• For production-readiness, repair tools should use sophisticated
setups (multimodule, external resources, ...)
21/23
Future of Repairnator
1. Bigger scope & faster response time: use directly last finished
builds on TravisCI instead of relying on a list of projects. "
2. Avoid false positive: Use directly TravisCI to reproduce
failures AND to produce patches.
3. Integrate Repairnator into the CI.
22/23
Play with it
• Repairnator sourcecode:
https://github.com/Spirals-Team/repairnator
• Repository of bugs:
https://github.com/Spirals-Team/seip-2018
(consolidated data from february 2017 to january 2018)
• Live data: http://repairnator.lille.inria.fr (almost
15 000 builds this morning. 14 385 two weeks ago)
• Want to integrate your own program repair tool? contact us!
23/23

More Related Content

What's hot

Agile analysis development
Agile analysis developmentAgile analysis development
Agile analysis developmentsetitesuk
 
DCSF 19 eBPF Superpowers
DCSF 19 eBPF SuperpowersDCSF 19 eBPF Superpowers
DCSF 19 eBPF SuperpowersDocker, Inc.
 
Shift Remote: Mobile - Devops-ify your life with Github Actions - Nicola Cort...
Shift Remote: Mobile - Devops-ify your life with Github Actions - Nicola Cort...Shift Remote: Mobile - Devops-ify your life with Github Actions - Nicola Cort...
Shift Remote: Mobile - Devops-ify your life with Github Actions - Nicola Cort...Shift Conference
 
Linux Kernel - Let's Contribute!
Linux Kernel - Let's Contribute!Linux Kernel - Let's Contribute!
Linux Kernel - Let's Contribute!Levente Kurusa
 
The Bash Dashboard (Or: How to Use Bash for Data Analysis)
The Bash Dashboard (Or: How to Use Bash for Data Analysis)The Bash Dashboard (Or: How to Use Bash for Data Analysis)
The Bash Dashboard (Or: How to Use Bash for Data Analysis)Bram Adams
 
Debugging Effectively - SunshinePHP 2017
Debugging Effectively - SunshinePHP 2017Debugging Effectively - SunshinePHP 2017
Debugging Effectively - SunshinePHP 2017Colin O'Dell
 
Safety on the Max: How to Write Reliable C/C++ Code for Embedded Systems
Safety on the Max: How to Write Reliable C/C++ Code for Embedded SystemsSafety on the Max: How to Write Reliable C/C++ Code for Embedded Systems
Safety on the Max: How to Write Reliable C/C++ Code for Embedded SystemsAndrey Karpov
 
Advanced windows debugging
Advanced windows debuggingAdvanced windows debugging
Advanced windows debuggingchrisortman
 
No more video loss - Alex Rivkin, Motorola Solutions
No more video loss - Alex Rivkin, Motorola SolutionsNo more video loss - Alex Rivkin, Motorola Solutions
No more video loss - Alex Rivkin, Motorola SolutionsDroidConTLV
 
SANER 2015 ERA track: Differential Flame Graphs
SANER 2015 ERA track: Differential Flame GraphsSANER 2015 ERA track: Differential Flame Graphs
SANER 2015 ERA track: Differential Flame Graphscorpaulbezemer
 
Meet the Eclipse SmartHome powered Mars Rover
Meet the Eclipse SmartHome powered Mars RoverMeet the Eclipse SmartHome powered Mars Rover
Meet the Eclipse SmartHome powered Mars RoverMichael Vorburger
 
GateKeeper - bypass or not bypass?
GateKeeper - bypass or not bypass?GateKeeper - bypass or not bypass?
GateKeeper - bypass or not bypass?Csaba Fitzl
 
Smoke Tests @ DevOps-Hamburg 06.02.2017
Smoke Tests @ DevOps-Hamburg 06.02.2017Smoke Tests @ DevOps-Hamburg 06.02.2017
Smoke Tests @ DevOps-Hamburg 06.02.2017tech.kartenmacherei
 
Simon Laws – Apache Flink Cluster Deployment on Docker and Docker-Compose
Simon Laws – Apache Flink Cluster Deployment on Docker and Docker-ComposeSimon Laws – Apache Flink Cluster Deployment on Docker and Docker-Compose
Simon Laws – Apache Flink Cluster Deployment on Docker and Docker-ComposeFlink Forward
 
The Scientific Filesystem
The Scientific FilesystemThe Scientific Filesystem
The Scientific FilesystemVanessa S
 

What's hot (18)

Agile analysis development
Agile analysis developmentAgile analysis development
Agile analysis development
 
DCSF 19 eBPF Superpowers
DCSF 19 eBPF SuperpowersDCSF 19 eBPF Superpowers
DCSF 19 eBPF Superpowers
 
Shift Remote: Mobile - Devops-ify your life with Github Actions - Nicola Cort...
Shift Remote: Mobile - Devops-ify your life with Github Actions - Nicola Cort...Shift Remote: Mobile - Devops-ify your life with Github Actions - Nicola Cort...
Shift Remote: Mobile - Devops-ify your life with Github Actions - Nicola Cort...
 
Linux Kernel - Let's Contribute!
Linux Kernel - Let's Contribute!Linux Kernel - Let's Contribute!
Linux Kernel - Let's Contribute!
 
The Bash Dashboard (Or: How to Use Bash for Data Analysis)
The Bash Dashboard (Or: How to Use Bash for Data Analysis)The Bash Dashboard (Or: How to Use Bash for Data Analysis)
The Bash Dashboard (Or: How to Use Bash for Data Analysis)
 
Debugging Effectively - SunshinePHP 2017
Debugging Effectively - SunshinePHP 2017Debugging Effectively - SunshinePHP 2017
Debugging Effectively - SunshinePHP 2017
 
Safety on the Max: How to Write Reliable C/C++ Code for Embedded Systems
Safety on the Max: How to Write Reliable C/C++ Code for Embedded SystemsSafety on the Max: How to Write Reliable C/C++ Code for Embedded Systems
Safety on the Max: How to Write Reliable C/C++ Code for Embedded Systems
 
Versions
VersionsVersions
Versions
 
Advanced windows debugging
Advanced windows debuggingAdvanced windows debugging
Advanced windows debugging
 
VS Debugging Tricks
VS Debugging TricksVS Debugging Tricks
VS Debugging Tricks
 
JavaCro'14 - Profile any environment with Java Flight Recorder – Johan Janssen
JavaCro'14 - Profile any environment with Java Flight Recorder – Johan JanssenJavaCro'14 - Profile any environment with Java Flight Recorder – Johan Janssen
JavaCro'14 - Profile any environment with Java Flight Recorder – Johan Janssen
 
No more video loss - Alex Rivkin, Motorola Solutions
No more video loss - Alex Rivkin, Motorola SolutionsNo more video loss - Alex Rivkin, Motorola Solutions
No more video loss - Alex Rivkin, Motorola Solutions
 
SANER 2015 ERA track: Differential Flame Graphs
SANER 2015 ERA track: Differential Flame GraphsSANER 2015 ERA track: Differential Flame Graphs
SANER 2015 ERA track: Differential Flame Graphs
 
Meet the Eclipse SmartHome powered Mars Rover
Meet the Eclipse SmartHome powered Mars RoverMeet the Eclipse SmartHome powered Mars Rover
Meet the Eclipse SmartHome powered Mars Rover
 
GateKeeper - bypass or not bypass?
GateKeeper - bypass or not bypass?GateKeeper - bypass or not bypass?
GateKeeper - bypass or not bypass?
 
Smoke Tests @ DevOps-Hamburg 06.02.2017
Smoke Tests @ DevOps-Hamburg 06.02.2017Smoke Tests @ DevOps-Hamburg 06.02.2017
Smoke Tests @ DevOps-Hamburg 06.02.2017
 
Simon Laws – Apache Flink Cluster Deployment on Docker and Docker-Compose
Simon Laws – Apache Flink Cluster Deployment on Docker and Docker-ComposeSimon Laws – Apache Flink Cluster Deployment on Docker and Docker-Compose
Simon Laws – Apache Flink Cluster Deployment on Docker and Docker-Compose
 
The Scientific Filesystem
The Scientific FilesystemThe Scientific Filesystem
The Scientific Filesystem
 

Similar to How to Design a Program Repair Bot? Insights from the Repairnator Project

How to Design a Program Repair Bot? Insights from the Repairnator Project
How to Design a Program Repair Bot? Insights from the Repairnator ProjectHow to Design a Program Repair Bot? Insights from the Repairnator Project
How to Design a Program Repair Bot? Insights from the Repairnator ProjectSimon Urli
 
DevOps: Find Solutions, Not More Defects
DevOps: Find Solutions, Not More DefectsDevOps: Find Solutions, Not More Defects
DevOps: Find Solutions, Not More DefectsTechWell
 
Рахманов Александр "Что полезного в разборе дампов для .NET-разработчиков?"
Рахманов Александр "Что полезного в разборе дампов для .NET-разработчиков?"Рахманов Александр "Что полезного в разборе дампов для .NET-разработчиков?"
Рахманов Александр "Что полезного в разборе дампов для .NET-разработчиков?"Yulia Tsisyk
 
Continuous delivery applied
Continuous delivery appliedContinuous delivery applied
Continuous delivery appliedMike McGarr
 
Modern Release Engineering in a Nutshell - Why Researchers should Care!
Modern Release Engineering in a Nutshell - Why Researchers should Care!Modern Release Engineering in a Nutshell - Why Researchers should Care!
Modern Release Engineering in a Nutshell - Why Researchers should Care!Bram Adams
 
Continuous delivery applied (DC CI User Group)
Continuous delivery applied (DC CI User Group)Continuous delivery applied (DC CI User Group)
Continuous delivery applied (DC CI User Group)Mike McGarr
 
Continuous Delivery Applied (AgileDC)
Continuous Delivery Applied (AgileDC)Continuous Delivery Applied (AgileDC)
Continuous Delivery Applied (AgileDC)Mike McGarr
 
Keynote VST2020 (Workshop on Validation, Analysis and Evolution of Software ...
Keynote VST2020 (Workshop on  Validation, Analysis and Evolution of Software ...Keynote VST2020 (Workshop on  Validation, Analysis and Evolution of Software ...
Keynote VST2020 (Workshop on Validation, Analysis and Evolution of Software ...University of Antwerp
 
Code quality par Simone Civetta
Code quality par Simone CivettaCode quality par Simone Civetta
Code quality par Simone CivettaCocoaHeads France
 
Crash dump analysis - experience sharing
Crash dump analysis - experience sharingCrash dump analysis - experience sharing
Crash dump analysis - experience sharingJames Hsieh
 
Kandroid for nhn_deview_20131013_v5_final
Kandroid for nhn_deview_20131013_v5_finalKandroid for nhn_deview_20131013_v5_final
Kandroid for nhn_deview_20131013_v5_finalNAVER D2
 
Ship code like a keptn
Ship code like a keptnShip code like a keptn
Ship code like a keptnRob Jahn
 
Introduction to Civil Infrastructure Platform
Introduction to Civil Infrastructure PlatformIntroduction to Civil Infrastructure Platform
Introduction to Civil Infrastructure PlatformSZ Lin
 
State ofappdevelopment
State ofappdevelopmentState ofappdevelopment
State ofappdevelopmentgillygize
 
Bounded Model Checking for C Programs in an Enterprise Environment
Bounded Model Checking for C Programs in an Enterprise EnvironmentBounded Model Checking for C Programs in an Enterprise Environment
Bounded Model Checking for C Programs in an Enterprise EnvironmentAdaCore
 
Pharo Virtual Machine: News from the Front
Pharo Virtual Machine: News from the FrontPharo Virtual Machine: News from the Front
Pharo Virtual Machine: News from the FrontESUG
 
Intro to open source telemetry linux con 2016
Intro to open source telemetry   linux con 2016Intro to open source telemetry   linux con 2016
Intro to open source telemetry linux con 2016Matthew Broberg
 

Similar to How to Design a Program Repair Bot? Insights from the Repairnator Project (20)

How to Design a Program Repair Bot? Insights from the Repairnator Project
How to Design a Program Repair Bot? Insights from the Repairnator ProjectHow to Design a Program Repair Bot? Insights from the Repairnator Project
How to Design a Program Repair Bot? Insights from the Repairnator Project
 
Rakuten openstack
Rakuten openstackRakuten openstack
Rakuten openstack
 
DevOps: Find Solutions, Not More Defects
DevOps: Find Solutions, Not More DefectsDevOps: Find Solutions, Not More Defects
DevOps: Find Solutions, Not More Defects
 
Рахманов Александр "Что полезного в разборе дампов для .NET-разработчиков?"
Рахманов Александр "Что полезного в разборе дампов для .NET-разработчиков?"Рахманов Александр "Что полезного в разборе дампов для .NET-разработчиков?"
Рахманов Александр "Что полезного в разборе дампов для .NET-разработчиков?"
 
Guides To Analyzing WebKit Performance
Guides To Analyzing WebKit PerformanceGuides To Analyzing WebKit Performance
Guides To Analyzing WebKit Performance
 
Continuous delivery applied
Continuous delivery appliedContinuous delivery applied
Continuous delivery applied
 
Modern Release Engineering in a Nutshell - Why Researchers should Care!
Modern Release Engineering in a Nutshell - Why Researchers should Care!Modern Release Engineering in a Nutshell - Why Researchers should Care!
Modern Release Engineering in a Nutshell - Why Researchers should Care!
 
Continuous delivery applied (DC CI User Group)
Continuous delivery applied (DC CI User Group)Continuous delivery applied (DC CI User Group)
Continuous delivery applied (DC CI User Group)
 
Continuous Delivery Applied (AgileDC)
Continuous Delivery Applied (AgileDC)Continuous Delivery Applied (AgileDC)
Continuous Delivery Applied (AgileDC)
 
Keynote VST2020 (Workshop on Validation, Analysis and Evolution of Software ...
Keynote VST2020 (Workshop on  Validation, Analysis and Evolution of Software ...Keynote VST2020 (Workshop on  Validation, Analysis and Evolution of Software ...
Keynote VST2020 (Workshop on Validation, Analysis and Evolution of Software ...
 
Code quality par Simone Civetta
Code quality par Simone CivettaCode quality par Simone Civetta
Code quality par Simone Civetta
 
Crash dump analysis - experience sharing
Crash dump analysis - experience sharingCrash dump analysis - experience sharing
Crash dump analysis - experience sharing
 
Kandroid for nhn_deview_20131013_v5_final
Kandroid for nhn_deview_20131013_v5_finalKandroid for nhn_deview_20131013_v5_final
Kandroid for nhn_deview_20131013_v5_final
 
Ship code like a keptn
Ship code like a keptnShip code like a keptn
Ship code like a keptn
 
Introduction to Civil Infrastructure Platform
Introduction to Civil Infrastructure PlatformIntroduction to Civil Infrastructure Platform
Introduction to Civil Infrastructure Platform
 
Ultimate Git Workflow - Seoul 2015
Ultimate Git Workflow - Seoul 2015Ultimate Git Workflow - Seoul 2015
Ultimate Git Workflow - Seoul 2015
 
State ofappdevelopment
State ofappdevelopmentState ofappdevelopment
State ofappdevelopment
 
Bounded Model Checking for C Programs in an Enterprise Environment
Bounded Model Checking for C Programs in an Enterprise EnvironmentBounded Model Checking for C Programs in an Enterprise Environment
Bounded Model Checking for C Programs in an Enterprise Environment
 
Pharo Virtual Machine: News from the Front
Pharo Virtual Machine: News from the FrontPharo Virtual Machine: News from the Front
Pharo Virtual Machine: News from the Front
 
Intro to open source telemetry linux con 2016
Intro to open source telemetry   linux con 2016Intro to open source telemetry   linux con 2016
Intro to open source telemetry linux con 2016
 

More from Simon Urli

Spoon: Open Source Library to analyze, rewrite, transform, transpile Java Sou...
Spoon: Open Source Library to analyze, rewrite, transform, transpile Java Sou...Spoon: Open Source Library to analyze, rewrite, transform, transpile Java Sou...
Spoon: Open Source Library to analyze, rewrite, transform, transpile Java Sou...Simon Urli
 
A Visual Support for Decomposing Complex Feature Models
A Visual Support for Decomposing Complex Feature ModelsA Visual Support for Decomposing Complex Feature Models
A Visual Support for Decomposing Complex Feature ModelsSimon Urli
 
GDR GPL 2015 - Processus de Configuration Flexible pour Lignes de Produits Lo...
GDR GPL 2015 - Processus de Configuration Flexible pour Lignes de Produits Lo...GDR GPL 2015 - Processus de Configuration Flexible pour Lignes de Produits Lo...
GDR GPL 2015 - Processus de Configuration Flexible pour Lignes de Produits Lo...Simon Urli
 
Handling Complex Configurations in Software Product Lines: a Tooled Approach
Handling Complex Configurations in Software Product Lines: a Tooled ApproachHandling Complex Configurations in Software Product Lines: a Tooled Approach
Handling Complex Configurations in Software Product Lines: a Tooled ApproachSimon Urli
 
Managing a Software Ecosystem Using a Multiple Software Product Line: a Case ...
Managing a Software Ecosystem Using a Multiple Software Product Line: a Case ...Managing a Software Ecosystem Using a Multiple Software Product Line: a Case ...
Managing a Software Ecosystem Using a Multiple Software Product Line: a Case ...Simon Urli
 
Vers des interfaces graphiques flexibles de configurations
Vers des interfaces graphiques flexibles de configurationsVers des interfaces graphiques flexibles de configurations
Vers des interfaces graphiques flexibles de configurationsSimon Urli
 
Using Composite Feature Models to Support Agile Software Product Line Evoluti...
Using Composite Feature Models to Support Agile Software Product Line Evoluti...Using Composite Feature Models to Support Agile Software Product Line Evoluti...
Using Composite Feature Models to Support Agile Software Product Line Evoluti...Simon Urli
 

More from Simon Urli (7)

Spoon: Open Source Library to analyze, rewrite, transform, transpile Java Sou...
Spoon: Open Source Library to analyze, rewrite, transform, transpile Java Sou...Spoon: Open Source Library to analyze, rewrite, transform, transpile Java Sou...
Spoon: Open Source Library to analyze, rewrite, transform, transpile Java Sou...
 
A Visual Support for Decomposing Complex Feature Models
A Visual Support for Decomposing Complex Feature ModelsA Visual Support for Decomposing Complex Feature Models
A Visual Support for Decomposing Complex Feature Models
 
GDR GPL 2015 - Processus de Configuration Flexible pour Lignes de Produits Lo...
GDR GPL 2015 - Processus de Configuration Flexible pour Lignes de Produits Lo...GDR GPL 2015 - Processus de Configuration Flexible pour Lignes de Produits Lo...
GDR GPL 2015 - Processus de Configuration Flexible pour Lignes de Produits Lo...
 
Handling Complex Configurations in Software Product Lines: a Tooled Approach
Handling Complex Configurations in Software Product Lines: a Tooled ApproachHandling Complex Configurations in Software Product Lines: a Tooled Approach
Handling Complex Configurations in Software Product Lines: a Tooled Approach
 
Managing a Software Ecosystem Using a Multiple Software Product Line: a Case ...
Managing a Software Ecosystem Using a Multiple Software Product Line: a Case ...Managing a Software Ecosystem Using a Multiple Software Product Line: a Case ...
Managing a Software Ecosystem Using a Multiple Software Product Line: a Case ...
 
Vers des interfaces graphiques flexibles de configurations
Vers des interfaces graphiques flexibles de configurationsVers des interfaces graphiques flexibles de configurations
Vers des interfaces graphiques flexibles de configurations
 
Using Composite Feature Models to Support Agile Software Product Line Evoluti...
Using Composite Feature Models to Support Agile Software Product Line Evoluti...Using Composite Feature Models to Support Agile Software Product Line Evoluti...
Using Composite Feature Models to Support Agile Software Product Line Evoluti...
 

Recently uploaded

Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providermohitmore19
 
Engage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyEngage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyFrank van der Linden
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...MyIntelliSource, Inc.
 
Project Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationProject Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationkaushalgiri8080
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdfWave PLM
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxbodapatigopi8531
 
Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...aditisharan08
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataBradBedford3
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxComplianceQuest1
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEOrtus Solutions, Corp
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantAxelRicardoTrocheRiq
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfkalichargn70th171
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfjoe51371421
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about usDynamic Netsoft
 
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfThe Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfkalichargn70th171
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsAlberto González Trastoy
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...harshavardhanraghave
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)OPEN KNOWLEDGE GmbH
 
chapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptchapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptkotipi9215
 

Recently uploaded (20)

Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
Engage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyEngage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The Ugly
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
 
Project Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationProject Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanation
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptx
 
Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service Consultant
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdf
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about us
 
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfThe Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)
 
chapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptchapter--4-software-project-planning.ppt
chapter--4-software-project-planning.ppt
 

How to Design a Program Repair Bot? Insights from the Repairnator Project

  • 1. How to Design a Program Repair Bot? Insights from the Repairnator Project Simon Urli, Zhongxing Yu, Lionel Seinturier, Martin Monperrus simon.urli@inria.fr February, 26st , 2018 Inria & University of Lille Proceedings of ICSE, SEIP track, 2018
  • 2. Motivation After one year of operating a repair bot: what pitfall should you avoid? 1/23
  • 3. What is Repairnator? Repairnator If the main objective of Terminator was “Seek and Destroy”, the main goal of Repairnator is “Scan and Repair”. → Fix a maximum of failing builds from TravisCI. 2/23
  • 5. Overview Travis CI GitHub Projects Commits Builds with failing tests List of projects Repairnator Bot CI Build Analysis Bug Reproduction Patches collected repair data Developers Repairnator patch analyst Research community Patch Synthesis Nopol Astor NPEFix 3/23
  • 6. Design choices Repairnator targets: • Java projects using Maven • Expertise in program repair for Java • Standard build tool • Build-based repairing bot • GitHub projects using TravisCI 4/23
  • 7. Design choices Repairnator targets: • Java projects using Maven • Build-based repairing bot • Easy oracle: failing builds → project to repair • Long-term view: Repairnator as part of the CI • GitHub projects using TravisCI 4/23
  • 8. Design choices Repairnator targets: • Java projects using Maven • Build-based repairing bot • GitHub projects using TravisCI • GitHub: largest open-source code hosting service • TravisCI: standard CI for open-source on GitHub & open API 4/23
  • 9. Step 1 : CI Build Analysis
  • 10. Considered Projects Different ways to produce the list: • TravisTorrent • GHTorrent • GitHub API & Trends Criteria to be selected: 1. Open-source and available on Github 2. Use Java and Maven 3. With a test suite 4. Popular and active: the most starred first and activity in previous months 5/23
  • 11. Considered Projects List of projects to consider from: • TravisTorrent: not so many data • GHTorrent: needs to be filtered • GitHub Trends: no API The usage of tools over 14 188 Java projects hosted on GitHub. Results: 1609 projects selected. 6/23
  • 12. Build analysis Date Numberofbuilds Collected builds to be analyzed Builds identified as Java with CI failure Builds with JUnit test failure (called “interesting builds”). Feb '17 Mar '17 Apr '17 May '17 Jun '17 Jul '17 Aug '17 Sep '17 Oct '17 Nov '17 Dec '17 0 500 1000 1500 2000 2500 3000 3500 4000 4500 5000 5500 6000 6500 7000 7500 8000 8500 9000 9500 10 000 10 500 11 000 11 500 12 000 12 500 13 000 13 500 14 000 14 500 15 000 Highcharts.com Not filtered list (> 14 000 projects) Filtered list (1 609 projects) Second filtering (281 projects) Process: builds are pulled from Travis, then status and language are checked and finally logs are analyzed for test failure. 7/23
  • 13. Build analysis Problem: Current build analysis is tedious and time-consuming. What can we do? • trigger bot from the test-failing build if possible • it might depend on the considered CI • avoid as much as possible log analysis • get test results from CI • launch reproduction even when not sure 8/23
  • 14. Step 2 : Local bug reproduction
  • 15. Steps for local bug reproduction 1. Clone the repository 2. Checkout the right commit 3. Compile the build (i.e. mvn install -DskipTest) 4. Run test (i.e. mvn test) 5. Parse test information (i.e. read xml files) All steps are done inside a docker container and if a bug is successfully reproduced all data are pushed to a repository. 9/23
  • 16. Local bug reproduction: obtained results 1/2 Values Build statuses (all times - 14385 builds) 5215 (36.3%)5215 (36.3%) 4510 (31.4%)4510 (31.4%) 2874 (20.0%)2874 (20.0%) 1415 (9.8%)1415 (9.8%) 337 (2.3%)337 (2.3%) 34 (0.2%)34 (0.2%) Error when compiling Successful Bug Reproduction Test without failure Error when testing Error when checking out Error when cloning 0 1k 2k 3k 4k 5k 6k Highcharts.com 10/23
  • 17. Local bug reproduction: obtained results 2/2 Rank Project Builds with Rank Reproduced test failure (test failure) bugs 1 druid-io/druid 579 2 359 (62.00%) 2 apache/flink 477 3 326 (68.34%) 3 prestodb/presto 1000 1 194 (19.40%) 4 hubspot/singularity 437 5 182 (41.65%) 5 corfudb/corfudb 313 7 126 (40.26%) 6 apache/storm 349 6 111 (31.81%) 7 geoserver/geoserver 118 18 109 (92.37%) 8 spotify/docker-client 111 21 99 (89.19%) 9 xetorthio/jedis 100 25 94 (94.00%) 10 4pr0n/ripme 94 28 87 (92.55%) 11/23
  • 18. Local bug reproduction Bug reproduction is HARD. Build failure reproduction errors can come from: • build environment (OS, JDK, ...) • build setup (bash script to start a server, ...) • flaky tests or custom failing goals (checkstyle, coverage threshold...) • right source code version not found • timeout (after 24 hours we kill build) 12/23
  • 19. Local bug reproduction Bug reproduction is HARD. What can we do? • reproduce in sandboxed environment (docker) • use the same setup as in the CI • don’t try to get back missing commits 13/23
  • 20. Step 3 : Patch Synthesis
  • 21. Repair tools Nopol: dedicated to repair conditionnal bugs by modifying exisiting conditions or inserting preconditions. Astor: a generate-and-validate repair tool derived from Genprog. NPEFix: dedicated to repair only NullPointerException by inserting preconditions. 14/23
  • 22. Patch synthesis steps 1. Analyze test information from bug reproduction step 2. if a NullPointerException is detected: run NPEFix 3. Run Astor & Nopol (budget based) At each point, send an email if a Patch is found. 15/23
  • 23. Patch synthesis Patch synthesis is even HARDER Successful Reproduction Builds (all times - 14307 builds) Bug reproduction without patch: 99.6% (4464)Bug reproduction without patch: 99.6% (4464) Bug reproduction and patch created: 0.4% (17)Bug reproduction and patch created: 0.4% (17) Highcharts.com 16/23
  • 24. Obtained patches Project Builds w/ Nopol NPEFix Rank patches patches patches (rep. build) jamesagnew/hapi-fhir 1 35 0 88 spotify/cassandra-reaper 1 1 0 121 xmlunit/xmlunit 1 145 0 203 apache/pdfbox 1 120 0 95 LiveRamp/hank 1 4 0 225 spring-cloud/spring-cloud- dataflow 1 0 1 56 IQSS/dataverse 2 0 16 40 bonigarcia/webdrivermanager 3 30 0 27 GeoWebCache/geowebcache 1 0 2 107 timmolter/XChange 1 0 4 58 phax/jcodemodel 1 624 0 193 phoenixnap/springmvc- raml-plugin 1 348 0 66 Total 15 1 307 23 17/23
  • 25. Valid patches todo am´eliorer image? Total 15 1 307 23 Number of valid patch obtained and accepted: 1. 18/23
  • 26. Valid patches Total 15 1 307 23 Number of valid patch obtained and accepted: 1. 19/23
  • 27. Top 10 error types Rank Exception Occurrences 1 java.lang.AssertionError 2 162 2 java.lang.NullPointerException 641 3 org.junit.ComparisonFailure 419 4 java.lang.Exception 250 5 java.lang.IllegalStateException 202 6 java.lang.NoClassDefFoundError 197 7 java.lang.RuntimeException 191 8 junit.framework.AssertionFailedError 163 9 java.lang.ExceptionInInitializerError 117 10 java.io.IOException 110 20/23
  • 28. Patch synthesis: discussion • Current generic repair tools (Astor & Nopol) are really time and resources consuming • Repairing assertion errors = guessing a behaviour which is pretty hard • Repairing explicit errors (NPE, NumberFormatException, ...) seems easier to achieve • For production-readiness, repair tools should use sophisticated setups (multimodule, external resources, ...) 21/23
  • 29. Future of Repairnator 1. Bigger scope & faster response time: use directly last finished builds on TravisCI instead of relying on a list of projects. " 2. Avoid false positive: Use directly TravisCI to reproduce failures AND to produce patches. 3. Integrate Repairnator into the CI. 22/23
  • 30. Play with it • Repairnator sourcecode: https://github.com/Spirals-Team/repairnator • Repository of bugs: https://github.com/Spirals-Team/seip-2018 (consolidated data from february 2017 to january 2018) • Live data: http://repairnator.lille.inria.fr (almost 15 000 builds this morning. 14 385 two weeks ago) • Want to integrate your own program repair tool? contact us! 23/23