fr.inria.gforge.spirals
Open-science code of the program repair tool described in "Dynamic Patch Generation for Null Pointer Exceptions Using Metaprogramming" (SANER'17)
Science Score: 67.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
✓DOI references
Found 4 DOI reference(s) in README -
○Academic publication links
-
✓Committers with academic emails
3 of 10 committers (30.0%) from academic institutions -
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (11.8%) to scientific vocabulary
Keywords
Keywords from Contributors
Repository
Open-science code of the program repair tool described in "Dynamic Patch Generation for Null Pointer Exceptions Using Metaprogramming" (SANER'17)
Basic Info
- Host: GitHub
- Owner: SpoonLabs
- Language: Java
- Default Branch: master
- Homepage: https://hal.archives-ouvertes.fr/hal-01419861/document
- Size: 458 KB
Statistics
- Stars: 14
- Watchers: 13
- Forks: 9
- Open Issues: 11
- Releases: 4
Topics
Metadata Files
README.md
NPEFix
NPEFix is a system that automatically generates patches for NullPointerException, aka automatic bug fixing for NPE. This code is research code, released under the GPL licence, developed at Inria Lille.
If you use this code, please cite:
Thomas Durieux, Benoit Cornu, Lionel Seinturier and Martin Monperrus, "Dynamic Patch Generation for Null Pointer Exceptions Using Metaprogramming", In IEEE International Conference on Software Analysis, Evolution and Reengineering, 2017, doi:10.1109/SANER.2017.7884635.
bibtex
@inproceedings{durieuxNpeFix,
title = {{Dynamic Patch Generation for Null Pointer Exceptions Using Metaprogramming}},
author = {Durieux, Thomas and Cornu, Benoit and Seinturier, Lionel and Monperrus, Martin},
url = {https://hal.archives-ouvertes.fr/hal-01419861/document},
booktitle = {{IEEE International Conference on Software Analysis, Evolution and Reengineering}},
doi = {10.1109/SANER.2017.7884635},
year = {2017},
}
Command line
As of August 2024, NpeFix expects Java 17:
$ export JAVA_HOME=/usr/lib/jvm/java-17-openjdk-amd64/
$± java --version
openjdk 11.0.24 2024-07-16
OpenJDK Runtime Environment (build 11.0.24+8-post-Ubuntu-1ubuntu324.04.1)
OpenJDK 64-Bit Server VM (build 11.0.24+8-post-Ubuntu-1ubuntu324.04.1, mixed mode, sharing)
Install:
git clone https://github.com/Spirals-Team/npefix/
cd npefix
mvn install
Run:
java -jar target/npefix.jar \\
--test failing_test
--iteration 100
--complianceLevel 8
--workingdirectory .
--source path_source:path_test
--classpath a.jar:b.jar;
--repairStrategy <fully qualified name of a repair strategy>
Reproduce the Scientific Evaluation
To reproduce the evaluation from the paper:
1. Gets the NPE Dataset: https://github.com/Spirals-Team/npe-dataset
2. Installs each bug on your system, in order to download the dependencies
3. Configures the location of the dataset in src/main/resources/config.ini
4. Creates the jar with all dependencies: mvn clean compile assembly:single
5. Execute java -jar target/npefix-0.3-jar-with-dependencies.jar (see the execution usage below)
Execution usage
```Bash
java -jar target/npefix-0.2-jar-with-dependencies.jar
(-p|--project)
(-p|--project)
[(-m|--mode)
[(-x|--working)
[(-k|--m2) <~/.m2>] The m2 folder. (default: ~/.m2)
[(-e|--epsilon) <0.2>] The Epsilon-Greedy epsilon (the probability to use the exploration vs exploitation). (default: 0.2)
[(-s|--seed)
[(-l|--laps)
[(-t|--timeout)
Execution output
js
{
"executions": [
/* all laps */
{
"result": {
"error": "<the exception>",
"type": "<the oracle type>",
"success": true
},
/* all decisions points */
"locations": [{
"sourceEnd": 12234,
"executionCount": 0,
"line": 352,
"class": "org.apache.commons.collections.iterators.CollatingIterator",
"sourceStart": 12193
}],
/* the runned test */
"test": {
"name": "testNullComparator",
"class": "org.apache.commons.collections.iterators.TestCollatingIterator"
},
/* all decision made during the laps */
"decisions": [{
/* the location of the laps */
"location": {
"sourceEnd": 12234,
"line": 352,
"class": "org.apache.commons.collections.iterators.CollatingIterator",
"sourceStart": 12193
},
/* the value used by the decision */
"value": {
"variableName": "leastObject",
"value": "leastObject",
"type": "int"
},
/* the value of the epsilon */
"epsilon": 0.4,
// the name of the strategy
"strategy": "Strat4 VAR",
"used": true,
/* the decision type (new, best, random) */
"decisionType": "new"
}],
"startDate": 1453918743999,
"endDate": 1453918744165,
"metadata": {"seed": 10}
},
...
],
"searchSpace": [
/* all detected decisions */
{
"location": {
"sourceEnd": 12234,
"line": 352,
"class": "org.apache.commons.collections.iterators.CollatingIterator",
"sourceStart": 12193
},
"value": {
"value": "1",
"type": "int"
},
"epsilon": 0,
"strategy": "Strat4 NEW",
"used": false,
"decisionType": "random"
},
...
],
"date": "Wed Jan 27 19:19:37 CET 2016"
}
Other usages
Maven-repair is a Maven plugin for bug-fixing, see https://github.com/Spirals-Team/repairnator/tree/master/maven-repair
Owner
- Name: SpoonLabs
- Login: SpoonLabs
- Kind: organization
- Repositories: 22
- Profile: https://github.com/SpoonLabs
The laboratory for Java source code analysis and transformation using Spoon
Citation (CITATION.cff)
cff-version: 1.2.0
preferred-citation:
title: "Dynamic Patch Generation for Null Pointer Exceptions Using Metaprogramming"
doi: "10.1109/SANER.2017.7884635"
year: "2017"
type: conference-paper
conference: "IEEE International Conference on Software Analysis, Evolution and Reengineering"
authors:
- family-names: Durieux
given-names: Thomas
- family-names: Cornu
given-names: Benoit
- family-names: Seinturier
given-names: Lionel
- family-names: Monperrus
given-names: Martin
GitHub Events
Total
- Issues event: 2
- Issue comment event: 12
- Push event: 4
- Fork event: 1
Last Year
- Issues event: 2
- Issue comment event: 12
- Push event: 4
- Fork event: 1
Committers
Last synced: about 2 years ago
Top Committers
| Name | Commits | |
|---|---|---|
| tdurieux | d****s@h****m | 164 |
| Martin Monperrus | m****s@g****g | 10 |
| Martin Monperrus | m****s | 8 |
| Benjamin DANGLOT | b****t@i****r | 4 |
| Simon Urli | s****i@i****r | 3 |
| Simon Urli | s****i@g****m | 2 |
| André Silva | a****e@h****m | 1 |
| bcornu | b****u@i****r | 1 |
| dependabot[bot] | 4****] | 1 |
| Benjamin Tellström | 3****m | 1 |
Issues and Pull Requests
Last synced: 8 months ago
All Time
- Total issues: 17
- Total pull requests: 12
- Average time to close issues: 8 months
- Average time to close pull requests: about 1 month
- Total issue authors: 8
- Total pull request authors: 6
- Average comments per issue: 2.65
- Average comments per pull request: 3.5
- Merged pull requests: 10
- Bot issues: 0
- Bot pull requests: 1
Past Year
- Issues: 1
- Pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Issue authors: 1
- Pull request authors: 0
- Average comments per issue: 12.0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- monperrus (6)
- andre15silva (3)
- jose (3)
- surli (1)
- DehengYang (1)
- Peanu11 (1)
- tdurieux (1)
- Kaka727 (1)
Pull Request Authors
- danglotb (4)
- surli (3)
- btellstrom (2)
- andre15silva (1)
- dependabot[bot] (1)
- ghost (1)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 1
- Total downloads: unknown
- Total dependent packages: 1
- Total dependent repositories: 4
- Total versions: 2
repo1.maven.org: fr.inria.gforge.spirals:npefix
Automatic repair of NPE
- Homepage: https://github.com/SpoonLabs/npefix
- Documentation: https://appdoc.app/artifact/fr.inria.gforge.spirals/npefix/
- License: MIT License
-
Latest release: 0.8
published over 3 years ago
Rankings
Dependencies
- org.eclipse.core:org.eclipse.core.resources 3.6.0.v20100526-0737 compile
- org.eclipse.core:org.eclipse.core.runtime 3.6.0.v20100505 compile
- com.cloudbees:diff4j 1.2
- fr.inria.gforge.spoon:spoon-core 10.2.0-SNAPSHOT
- junit:junit 4.13.1
- log4j:log4j 1.2.17
- org.apache.maven:maven-model 3.5.0
- org.glassfish.tyrus.bundles:tyrus-standalone-client 1.13.1
- org.hamcrest:hamcrest-core 1.3
- org.json:json 20160212
- org.slf4j:slf4j-simple 1.7.6