collector-sahab
Augmenting Diffs With Runtime Information, TSE 2023 http://arxiv.org/pdf/2212.11077
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 3 DOI reference(s) in README -
✓Academic publication links
Links to: arxiv.org -
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (13.8%) to scientific vocabulary
Repository
Augmenting Diffs With Runtime Information, TSE 2023 http://arxiv.org/pdf/2212.11077
Basic Info
Statistics
- Stars: 10
- Watchers: 2
- Forks: 2
- Open Issues: 19
- Releases: 20
Metadata Files
README.md
Collector Sahab
Collector Sahab is a tool to augment code diffs with runtime information. It works by instrumenting and running the versions before and after a commit, and then report the differences found in the runtime values. For more information, see our paper Augmenting Diffs With Runtime Information (IEEE Transactions on Software Engineering, 2023, doi:10.1109/TSE.2023.3324258).
Example Diff

Releases
Our releases are signed using travis-gumtree-spoon's GPG key. The key is hosted
here.
You may run the following commands to verify the signature of a release.
shell
gpg --recv-keys 1429025e3eda19a5
gpg --verify collector-sahab-<VERSION>-jar-with-dependencies.jar.asc
This signature is a type of detached signature, so you need to have the JAR file as well to verify the signature.
Structure of the project
The project is divided into multiple submodules.
1. commons: Contains common classes used by other modules.
1. main: The main module which contains the CLI and runs all the following modules.
1. matched-line-finder: A submodule which is used to find the non-diffed line numbers
in the left and right commits.
1. trace-collector: A submodule which is a java agent which collects runtime data
and writes it to a file.
1. trace-diff: A submodule which is used to find the diff between the runtime data
collected by trace-collector in the left and right commits.
Execution
Prerequisites
Please install gawk before proceeding. Use the following command.
shell
$ sudo apt install gawk
You also need to have ChromeDriver installed at path /usr/bin/chromedriver.
Run the following command to get it:
shell
$ sudo apt install chromium-chromedriver
And finally, a maven project hosted on GitHub. :smile:
Setup project for collecting runtime statistics
- Package the entire project
bash $ mvn package -DskipTests (Optional) Run the tests
bash $ mvn testPrepare for execution of
collector sahabby running. The following are the required parameters.bash $ java -jar main/target/collector-sahab-1.0-SNAPSHOT-jar-with-dependencies.jar \ -p <path/to/project> -l <left-commit> -r <right-commit> -c <relative/path/to/classfile> --slug <orgName/repoName>The following are the optional parameters.--execution-depth(integer): The depth of the stack trace to be collected. Default is0.--selected-test(list of tests separated by comma): The tests to be executed. Default is[]which runs every test in the target project.--output-path(string): The path where the output will be stored. Default isoutput.html.--cleanup(boolean): Whether to clean up the temporary files created during execution. Default isfalse.--exclude-random-values(boolean): Whether to exclude random values in trace. Example: path to temporary files. Default isfalse.
Following parameters have not been added to main, but planned to be added in the future if needed.
numberOfArrayElements: The number of array elements to be collected. Default is20.extractParameters: Whether to extract parameters of the method. Default isfalse.
Example trace
json
{
"breakpoint": [
{
"file": "foo/BasicMath.java",
"lineNumber": 5,
"stackFrameContext": [
{
"positionFromTopInStackTrace": 1,
"location": "foo.BasicMath:5",
"stackTrace": [
"add:5, foo.BasicMath",
"test_add:11, foo.BasicMathTest",
"runTest:40, se.kth.debug.JUnitTestRunner",
"lambda$main$0:16, se.kth.debug.JUnitTestRunner",
"call:-1, se.kth.debug.JUnitTestRunner$$Lambda$1.81628611"
],
"runtimeValueCollection": [
{
"kind": "LOCAL_VARIABLE",
"name": "x",
"type": "int",
"value": 23,
"fields": null,
"arrayElements": null
},
{
"kind": "LOCAL_VARIABLE",
"name": "y",
"type": "int",
"value": 2,
"fields": null,
"arrayElements": null
}
]
}
]
},
{
"file": "foo/BasicMath.java",
"lineNumber": 9,
"stackFrameContext": [
{
"positionFromTopInStackTrace": 1,
"location": "foo.BasicMath:9",
"stackTrace": [
"subtract:9, foo.BasicMath",
"test_subtract:16, foo.BasicMathTest",
"runTest:40, se.kth.debug.JUnitTestRunner",
"lambda$main$0:16, se.kth.debug.JUnitTestRunner",
"call:-1, se.kth.debug.JUnitTestRunner$$Lambda$1.81628611"
],
"runtimeValueCollection": [
{
"kind": "LOCAL_VARIABLE",
"name": "x",
"type": "int",
"value": 2,
"fields": null,
"arrayElements": null
},
{
"kind": "LOCAL_VARIABLE",
"name": "y",
"type": "int",
"value": 1,
"fields": null,
"arrayElements": null
}
]
}
]
}
]
}
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);
Citation (CITATION.cff)
cff-version: 1.2.0
preferred-citation:
title: "Augmenting Diffs With Runtime Information"
doi: "https://doi.org/10.1109/TSE.2023.3324258"
year: "2023"
type: article
journal: "IEEE Transactions on Software Engineering"
authors:
- family-names: Etemadi
given-names: Khashayar
- family-names: Sharma
given-names: Aman
- family-names: Madeiral
given-names: Fernanda
- family-names: Monperrus
given-names: Martin
GitHub Events
Total
- Watch event: 1
- Delete event: 36
- Push event: 163
- Pull request event: 70
- Create event: 40
Last Year
- Watch event: 1
- Delete event: 36
- Push event: 163
- Pull request event: 70
- Create event: 40
Issues and Pull Requests
Last synced: 7 months ago
All Time
- Total issues: 0
- Total pull requests: 15
- Average time to close issues: N/A
- Average time to close pull requests: about 3 hours
- Total issue authors: 0
- Total pull request authors: 1
- Average comments per issue: 0
- Average comments per pull request: 0.0
- Merged pull requests: 9
- Bot issues: 0
- Bot pull requests: 15
Past Year
- Issues: 0
- Pull requests: 15
- Average time to close issues: N/A
- Average time to close pull requests: about 3 hours
- Issue authors: 0
- Pull request authors: 1
- Average comments per issue: 0
- Average comments per pull request: 0.0
- Merged pull requests: 9
- Bot issues: 0
- Bot pull requests: 15
Top Authors
Issue Authors
- Sunhui26yeah (1)
- renovate[bot] (1)
Pull Request Authors
- renovate[bot] (129)
- algomaster99 (1)
Top Labels
Issue Labels
Pull Request Labels
Dependencies
- com.google.code.gson:gson 2.9.0
- fr.inria.gforge.spoon:spoon-core 10.0.1-beta-6
- info.picocli:picocli 4.6.3
- org.junit.platform:junit-platform-console-standalone 1.9.0
- org.slf4j:slf4j-nop 1.7.36
- org.hamcrest:hamcrest 2.2 test
- org.junit.jupiter:junit-jupiter 5.9.0 test
- actions/checkout v2 composite
- actions/setup-java v1 composite
- codecov/codecov-action v1 composite
- actions/checkout v4 composite
- s4u/setup-maven-action v1.11.0 composite
- actions-js/push master composite
- actions/checkout b4ffde65f46336ab88eb53be808477a3936bae11 composite
- actions/setup-go 4d34df0c2316fe8122ab82dc22947d607c0c91f9 composite
- actions/setup-java 5ffc13f4174014e2d4d4572b3d74c3fa61aeb2c2 composite
- actions/upload-artifact 0b7f8abb1508181956e8e162db84b466c27e18ce composite
- jreleaser/release-action v2 composite
- com.fasterxml.jackson.core:jackson-databind
- info.picocli:picocli
- io.github.chains-project:collector-sahab-commons 0.5.4-SNAPSHOT
- io.github.chains-project:matched-line-finder 0.5.4-SNAPSHOT
- io.github.chains-project:trace-collector 0.5.4-SNAPSHOT
- io.github.chains-project:trace-diff 0.5.4-SNAPSHOT
- org.apache.maven.shared:maven-invoker 3.2.0
- org.apache.maven:maven-model 3.9.6
- org.hamcrest:hamcrest test
- org.junit.jupiter:junit-jupiter test
- fr.inria.gforge.spoon:spoon-core 10.4.2
- io.github.chains-project:collector-sahab-commons 0.5.4-SNAPSHOT
- org.hamcrest:hamcrest test
- org.junit.jupiter:junit-jupiter test
- com.fasterxml.jackson.core:jackson-databind
- io.github.chains-project:collector-sahab-commons 0.5.4-SNAPSHOT
- net.bytebuddy:byte-buddy-dep 1.14.10
- org.ow2.asm:asm 9.6
- org.ow2.asm:asm-tree 9.6
- org.ow2.asm:asm-util 9.6
- org.apache.maven.shared:maven-invoker test
- org.hamcrest:hamcrest test
- org.junit.jupiter:junit-jupiter test
- org.junit.jupiter:junit-jupiter 5.8.2 test
- org.junit.jupiter:junit-jupiter 5.8.2 test
- org.junit.jupiter:junit-jupiter 5.8.2 test
- org.junit.jupiter:junit-jupiter 5.8.2 test
- org.junit.jupiter:junit-jupiter 5.8.2 test
- org.junit.jupiter:junit-jupiter 5.8.2 test
- joda-time:joda-time 2.2
- org.junit.jupiter:junit-jupiter 5.8.2 test
- org.junit.jupiter:junit-jupiter 5.8.2 test
- org.junit.jupiter:junit-jupiter 5.8.2 test
- org.junit.jupiter:junit-jupiter 5.8.2 test
- org.junit.jupiter:junit-jupiter 5.8.2 test
- org.junit.jupiter:junit-jupiter 5.8.2 test
- org.junit.jupiter:junit-jupiter 5.8.2 test
- org.junit.jupiter:junit-jupiter 5.8.2 test
- org.junit.jupiter:junit-jupiter 5.8.2 test
- org.junit.jupiter:junit-jupiter 5.8.2 test
- org.junit.jupiter:junit-jupiter 5.8.2 test
- com.fasterxml.jackson.core:jackson-databind
- commons-io:commons-io 2.15.1
- fr.inria.gforge.spoon.labs:gumtree-spoon-ast-diff 1.69
- info.picocli:picocli
- io.github.chains-project:collector-sahab-commons 0.5.4-SNAPSHOT
- org.jsoup:jsoup 1.17.1
- org.kohsuke:github-api 1.318
- org.seleniumhq.selenium:selenium-java 4.16.1
- org.junit.jupiter:junit-jupiter test
- junit:junit 4.13.2 test
- junit:junit 4.13.2 test