collector-sahab

Augmenting Diffs With Runtime Information, TSE 2023 http://arxiv.org/pdf/2212.11077

https://github.com/assert-kth/collector-sahab

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
Last synced: 7 months ago · JSON representation ·

Repository

Augmenting Diffs With Runtime Information, TSE 2023 http://arxiv.org/pdf/2212.11077

Basic Info
  • Host: GitHub
  • Owner: ASSERT-KTH
  • License: unlicense
  • Language: HTML
  • Default Branch: main
  • Homepage:
  • Size: 35.7 MB
Statistics
  • Stars: 10
  • Watchers: 2
  • Forks: 2
  • Open Issues: 19
  • Releases: 20
Created about 4 years ago · Last pushed 7 months ago
Metadata Files
Readme Changelog License Citation

README.md

Collector Sahab

test integration-test maven central

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

example-diff.png

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

  1. Package the entire project bash $ mvn package -DskipTests
  2. (Optional) Run the tests bash $ mvn test

  3. Prepare for execution of collector sahab by 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.

    1. --execution-depth (integer): The depth of the stack trace to be collected. Default is 0.
    2. --selected-test (list of tests separated by comma): The tests to be executed. Default is [] which runs every test in the target project.
    3. --output-path (string): The path where the output will be stored. Default is output.html.
    4. --cleanup (boolean): Whether to clean up the temporary files created during execution. Default is false.
    5. --exclude-random-values (boolean): Whether to exclude random values in trace. Example: path to temporary files. Default is false.

Following parameters have not been added to main, but planned to be added in the future if needed.

  1. numberOfArrayElements: The number of array elements to be collected. Default is 20.

  2. extractParameters: Whether to extract parameters of the method. Default is false.

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

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

pom.xml maven
  • 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
.github/workflows/tests.yml actions
  • actions/checkout v2 composite
  • actions/setup-java v1 composite
  • codecov/codecov-action v1 composite
.github/workflows/it.yml actions
  • actions/checkout v4 composite
  • s4u/setup-maven-action v1.11.0 composite
.github/workflows/jreleaser.yml actions
  • 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
commons/pom.xml maven
  • com.fasterxml.jackson.core:jackson-databind
main/pom.xml maven
  • 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
matched-line-finder/pom.xml maven
  • 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
trace-collector/pom.xml maven
  • 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
trace-collector/src/test/resources/anonymous-class/pom.xml maven
  • org.junit.jupiter:junit-jupiter 5.8.2 test
trace-collector/src/test/resources/arguments/pom.xml maven
  • org.junit.jupiter:junit-jupiter 5.8.2 test
trace-collector/src/test/resources/array-of-objects/pom.xml maven
  • org.junit.jupiter:junit-jupiter 5.8.2 test
trace-collector/src/test/resources/array-value/pom.xml maven
  • org.junit.jupiter:junit-jupiter 5.8.2 test
trace-collector/src/test/resources/basic-math/pom.xml maven
  • org.junit.jupiter:junit-jupiter 5.8.2 test
trace-collector/src/test/resources/collections/pom.xml maven
  • org.junit.jupiter:junit-jupiter 5.8.2 test
trace-collector/src/test/resources/copy-array/pom.xml maven
  • joda-time:joda-time 2.2
  • org.junit.jupiter:junit-jupiter 5.8.2 test
trace-collector/src/test/resources/init/pom.xml maven
  • org.junit.jupiter:junit-jupiter 5.8.2 test
trace-collector/src/test/resources/liveness-and-death/pom.xml maven
  • org.junit.jupiter:junit-jupiter 5.8.2 test
trace-collector/src/test/resources/multi-threading/pom.xml maven
  • org.junit.jupiter:junit-jupiter 5.8.2 test
trace-collector/src/test/resources/non-static-field/pom.xml maven
  • org.junit.jupiter:junit-jupiter 5.8.2 test
trace-collector/src/test/resources/our-own-code/pom.xml maven
  • org.junit.jupiter:junit-jupiter 5.8.2 test
trace-collector/src/test/resources/special-floating-point-value/pom.xml maven
  • org.junit.jupiter:junit-jupiter 5.8.2 test
trace-collector/src/test/resources/twins/pom.xml maven
  • org.junit.jupiter:junit-jupiter 5.8.2 test
trace-collector/src/test/resources/use-yourself/pom.xml maven
  • org.junit.jupiter:junit-jupiter 5.8.2 test
trace-collector/src/test/resources/void-method/pom.xml maven
  • org.junit.jupiter:junit-jupiter 5.8.2 test
trace-collector/src/test/resources/volatile/pom.xml maven
  • org.junit.jupiter:junit-jupiter 5.8.2 test
trace-diff/pom.xml maven
  • 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
trace-diff/src/main/resources/test_projects/TestProj/pom.xml maven
  • junit:junit 4.13.2 test
trace-diff/src/main/resources/test_projects/TestProj2/pom.xml maven
  • junit:junit 4.13.2 test