https://github.com/assert-kth/ppd-ext
Science Score: 10.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
○codemeta.json file
-
○.zenodo.json file
-
○DOI references
-
✓Academic publication links
Links to: arxiv.org -
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (13.6%) to scientific vocabulary
Last synced: 10 months ago
·
JSON representation
Repository
Basic Info
- Host: GitHub
- Owner: ASSERT-KTH
- Language: Java
- Default Branch: master
- Size: 95.7 MB
Statistics
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
- Releases: 0
Fork of lascam-UFU/automatic-diff-dissection
Created almost 7 years ago
· Last pushed over 6 years ago
https://github.com/ASSERT-KTH/ppd-ext/blob/master/
# ADD; Automatic Diff Dissection [](https://travis-ci.org/lascam-UFU/automatic-diff-dissection) [](https://coveralls.io/github/lascam-UFU/automatic-diff-dissection?branch=master)
This project extracts features from patches such as repair patterns.
## PPD; Patch Pattern Detector
PPD is the part of this project responsible for the detection of repair patterns in patches.
```bibtex
@inproceedings{Madeiral2018,
author = {Fernanda Madeiral and Thomas Durieux and Victor Sobreira and Marcelo Maia},
title = {Towards an automated approach for bug fix pattern detection},
booktitle = {Proceedings of the VI Workshop on Software Visualization, Evolution and Maintenance (VEM '18)},
year = {2018},
url = {https://arxiv.org/abs/1807.11286}
}
```
## Usage
### Setup ADD
1. Clone this repository:
```bash
$ git clone https://github.com/lascam-UFU/automatic-diff-dissection.git
```
2. Run the script `./init.sh`:
```bash
$ cd automatic-diff-dissection
$ chmod +x ./scripts/*.sh
$ ./scripts/init.sh
```
### Running ADD
To run ADD, you need to compile it, to locate the .jar file, and to call it:
```bash
$ cd automatic-diff-dissection
$ mvn package -DskipTests
$ ls target/*jar
target/automatic-diff-dissection-0.1-SNAPSHOT.jar
target/automatic-diff-dissection-0.1-SNAPSHOT-jar-with-dependencies.jar
target/automatic-diff-dissection-0.1-SNAPSHOT-sources.jar
$ java -jar target/automatic-diff-dissection-0.1-SNAPSHOT-jar-with-dependencies.jar
```
Note that ADD receives a set of arguments to run. The argument options are:
```bash
(-m|--launcherMode)
Provide the launcher mode, which is the type of the features that will
be extracted.
(-b|--bugId)
Provide the bug id (this is used only for information presentation).
--buggySourceDirectory
Provide the path to the buggy source code directory of the bug.
--diff
Provide the path to the diff file.
[(-o|--output) ]
Provide an existing path to output the extracted features as a JSON file
(optional).
```
The results will be printed in the terminal, and if a path was provided to the argument `outputDirectory`, the results will be saved in a JSON file.
TODO: to show an usage case with one bug.
### Example on a dataset: extract features from Defects4J patches
1. Clone `tdurieux/pattern-detector-experiment` anywhere:
```bash
$ git clone https://github.com/tdurieux/pattern-detector-experiment.git
```
2. Change the configuration in `/automatic-diff-dissection/scripts/defects4j/run-tool-on-defects4j/config.cfg` file:
- `checkout` must be set with the path of the repository cloned in step 1 plus `/benchmark/defects4j`.
- `output` should be set with an existing path to output the extracted features as a JSON file (optional).
3. Enter in the directory where this project was cloned and compile this project:
```bash
$ mvn package -DskipTests
```
4. Run the feature extractor:
```bash
$ python scripts/defects4j/run-tool-on-defects4j/Launch.py
```
5. Check out the folder you set `output` to in step 2.
Owner
- Name: ASSERT
- Login: ASSERT-KTH
- Kind: organization
- Location: Sweden
- Website: https://github.com/ASSERT-KTH/
- Repositories: 87
- Profile: https://github.com/ASSERT-KTH
assertEquals("Research group at KTH Royal Institute of Technology, Stockholm, Sweden", description);