This fault localization concept uses as an additional context the frequency of the investigated method occurring in call stack instances during the course of executing the failing test cases.
- Defects4J bug dataset (available)
- Java instrumenter (available)
- measurements framework (available)
-
Start Docker
-
clone this repository
-
build docker:
docker build -t d4j --build-arg AGENT_VERSION=0.0.4 .
-
-
Create unique deepest call stacks (UDCS)
-
Docker image-id:
docker image ls
-
Start docker
docker run -i -t [IMAGE ID]
- For example: docker run -i -t 25a0b0ce79a0 /bin/bash
-
[Docker is running...]
-
Download a Defects4J-bug
defects4j checkout -p [project] -v [bug][version] -w [output folder]
- For example: defects4j checkout -p Lang -v 1b -w /defects4j/Lang_1b
-
Enter bug's directory
cd [output folder]
- For example: cd /defects4j/Lang_1b
-
Compile project
defects4j compile
-
Run tests
defects4j test
-
Set permissions
chmod -R [XXX] ./coverage
- For example: chmod -R 777 ./coverage
-
-
Calculate the FL-scores/ranks:
-
Enter (python) script directory:
cd /python_scripts
-
Run main.py
python3 -W ignore main.py --cov-folder=[output folder]/coverage/ --nameMapping=[output folder]/coverage/trace.trc.names --change=./changed_methods/Lang-changes.csv --bugID=[bug]
- For example: python3 -W ignore main.py --cov-folder=/defects4j/Lang_1b/coverage/ --nameMapping=/defects4j/Lang_1b/coverage/trace.trc.names --change=./changed_methods/Lang-changes.csv --bugID=1
-
Result of python scipt:
bugID | Barinel | Barinel-C | Jaccard | Jaccard-C | ... |
---|---|---|---|---|---|
[ID] | [rank] | [rank] | [rank] | [rank] | [rank] |
- Rank(name):
- without
-C
: the rank based on "original" (hit) - with
-C
: the rank based on call frequency
- without
The result.csv
contains the average rank for all bugs.