Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
68 commits
Select commit Hold shift + click to select a range
7793d51
Add checker-qual for running impurity obj fuzzing
776styjsu Jul 30, 2025
8f604c2
Move all subject program jars into jars/
776styjsu Jul 31, 2025
c69ea5d
Add the jars back
776styjsu Jul 31, 2025
8eda5bd
Remove version number for CF to reduce potential future refactor effort
776styjsu Jul 31, 2025
a7485fe
Less indentation for comments
mernst Aug 6, 2025
3ea8f45
Add annotated jars; use them when GRT_FUZZING is on
776styjsu Aug 8, 2025
2d08e1f
Merge branch 'impurity-annotation' of github.com:776styjsu/grt-testin…
776styjsu Aug 8, 2025
3d1d11a
Add annotated jars; use them when GRT_FUZZING is on; Merge
776styjsu Aug 8, 2025
5905a5a
Add missing separator
776styjsu Aug 8, 2025
ea2a440
Fix jdom dependencies path
776styjsu Aug 9, 2025
37bbb96
Update slf4j jar namespace; remove binders
776styjsu Aug 9, 2025
8b7c211
Merge branch 'randoop:main' into main
776styjsu Aug 10, 2025
cde99c4
Merge ../grt-testing-branch-main into impurity-annotation
mernst Aug 11, 2025
12cea4d
Merge branch 'main' into impurity-annotation
776styjsu Aug 11, 2025
5e6cc7d
Merge ../grt-testing-branch-main into impurity-annotation
mernst Aug 20, 2025
5e6e92e
Merge ../grt-testing-branch-main into impurity-annotation
mernst Sep 1, 2025
c5c5f91
Abstract out version number
mernst Sep 1, 2025
a35c932
Merge ../grt-testing-branch-main into impurity-annotation
mernst Sep 1, 2025
41297e7
Fix make issues
776styjsu Sep 11, 2025
0e3f50e
Fix make
776styjsu Sep 11, 2025
a9f0f73
Update scripts/Makefile
mernst Sep 11, 2025
659177e
Remove stray command-line arguments
mernst Sep 11, 2025
dd22826
Merge ../grt-testing-branch-main into impurity-annotation
mernst Oct 30, 2025
353d40c
Merge branch 'randoop:main' into impurity-annotation
776styjsu Oct 31, 2025
260ce15
Add README.md on building annotated subject-program jars
776styjsu Nov 1, 2025
79545fd
Update README.md
776styjsu Nov 1, 2025
4c6a19f
Update README.md
776styjsu Nov 1, 2025
ceb5b82
Update README.md
776styjsu Nov 1, 2025
5cc6053
Merge ../grt-testing-branch-main into impurity-annotation
mernst Nov 1, 2025
cc23b13
Merge ../grt-testing-branch-main into impurity-annotation
mernst Nov 13, 2025
7672dd7
Merge main into impurity-annotation
Nov 16, 2025
035b0c1
Fix linter
Nov 16, 2025
be4b6c6
Fix bug in grt fuzzing check
Nov 16, 2025
fab2301
Fix last linter
Nov 16, 2025
66b6429
Merge ../grt-testing-branch-main into impurity-annotation
mernst Nov 26, 2025
4635465
Only `sh` is needed, not full `bash`
mernst Nov 26, 2025
9fa1783
Fill paragraph
mernst Nov 26, 2025
a26c382
Brevity, fix `CHECKERFRAMEWORK` environment variable
mernst Nov 26, 2025
89e1db0
Checkpoint
mernst Dec 3, 2025
aa39829
Checkpoint
mernst Dec 4, 2025
affffe7
Linting
mernst Dec 4, 2025
8ead668
Use virtual environment
mernst Dec 4, 2025
c9b3bb3
Update .gitignore
mernst Dec 4, 2025
bd99141
Update subject-programs/get-grt-source.sh
mernst Dec 4, 2025
a8ed0f7
Update subject-programs/get-upstream-source.py
mernst Dec 4, 2025
59dde89
Update subject-programs/get-upstream-source.py
mernst Dec 4, 2025
6a42cb6
Update subject-programs/get-upstream-source.py
mernst Dec 4, 2025
462b22a
Update subject-programs/get-upstream-source.py
mernst Dec 4, 2025
02da047
Use local plume-scripts
mernst Dec 4, 2025
786ef0a
Use shlex
mernst Dec 4, 2025
5e87351
Merge branch 'impurity-annotation' of github.com:mernst/grt-testing i…
mernst Dec 4, 2025
41943cb
Diagnostics
mernst Dec 4, 2025
3bea3fc
Build more quietly
mernst Dec 4, 2025
c4c83e2
Use `uv`
mernst Dec 4, 2025
6f86438
ty typechecking
mernst Dec 4, 2025
d1253d1
Update instructions
mernst Dec 4, 2025
e216c95
Resolve CodeRabbit suggestions
mernst Dec 4, 2025
f73b8b2
Makefile
mernst Dec 5, 2025
50215bf
Merge ../grt-testing-branch-main into impurity-annotation
mernst Dec 5, 2025
c5870ae
Reduce duplication
mernst Dec 5, 2025
02b1993
Require Python 3.10
mernst Dec 6, 2025
e3465e2
Merge ../grt-testing-branch-main into impurity-annotation
mernst Dec 9, 2025
c7b8867
Exclude `subject-programs` from style checking
mernst Dec 9, 2025
1586c5c
Don't use GNU-specific feature
mernst Dec 13, 2025
fb4dce7
Merge ../grt-testing-branch-main into impurity-annotation
mernst Dec 13, 2025
96ae8c4
Make `pyyaml` a dev dependency
mernst Dec 13, 2025
b1e3bc7
Remove no-longer-needed target
mernst Dec 13, 2025
a1c6d39
Remove files
mernst Dec 15, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .github/workflows/make.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,8 @@ jobs:
run: sudo apt -y install shfmt shellcheck devscripts
- name: Install markdownlint
run: npm install markdownlint-cli2 --global
- name: Install Python `uv`
run: curl -LsSf https://astral.sh/uv/install.sh | sh
- name: style check
run: make style-check
run: |
make style-check
15 changes: 9 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,13 @@ Thumbs.db

# subdirectory with source repositories
tests/src
subject-programs/src
subject-programs/src-grt/
subject-programs/src-upstream/
# temporary
subject-programs/src-upstream-OLD/
subject-programs/src-upstream-GOOD/
subject-programs/src-grt-SAVE/
subject-programs/files.diff

# subdirectory created by scripts/mutation-randoop.sh and scripts/mutation-evosuite.sh
scripts/jarfiles
Expand All @@ -25,11 +31,8 @@ scripts/build/
scripts/results/
checkbashisms

# output from runnin jacoco
# output from running jacoco
jacoco.exec

# For code formatting
# Obtained via Git
.plume-scripts
.markdownlint-cli2.yaml
.pymarkdown
.ruff.toml
71 changes: 0 additions & 71 deletions .markdownlint-cli2.yaml

This file was deleted.

2 changes: 1 addition & 1 deletion .python-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.14
3.10
13 changes: 0 additions & 13 deletions .ruff.toml

This file was deleted.

6 changes: 6 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
[build-system]
requires = ["uv_build >= 0.9.11, <0.10.0"]
build-backend = "uv_build"

[project]
name = "grt-testing"
version = "0.1.0"
Expand All @@ -13,5 +17,7 @@ dependencies = [
[dependency-groups]
dev = [
"pymarkdownlnt>=0.9.33",
"pyyaml>=6.0.3",
"ty>=0.0.1a31",
]
# dynamic = ["version"]
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick | 🔵 Trivial

Consider removing or documenting the commented line.

The commented # dynamic = ["version"] line suggests future work with dynamic versioning. If this is planned, consider adding a TODO comment explaining the intent. Otherwise, consider removing it to reduce clutter.

🤖 Prompt for AI Agents
In pyproject.toml around line 22, there is a commented line "# dynamic =
[\"version\"]"; either remove this commented line if it's not needed to reduce
clutter, or replace it with a short TODO comment documenting intent (e.g., note
that dynamic versioning via setuptools_scm or similar is planned and link to
issue/PR) so future readers know whether it's intentional work-in-progress.

11 changes: 10 additions & 1 deletion scripts/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
MAKEFILE_DIR := $(dir $(realpath $(lastword $(MAKEFILE_LIST))))

all: \
build/checker-framework/checker/dist/checker-qual.jar \
build/evosuite-1.2.0.jar \
build/evosuite-standalone-runtime-1.2.0.jar \
build/hamcrest-core-1.3.jar \
Expand Down Expand Up @@ -64,13 +65,21 @@ build/junit-4.12.jar:

build/hamcrest-core-1.3.jar:
mkdir -p build
cp ../subject-programs/hamcrest-core-1.3.jar build/
cp ../subject-programs/jars/hamcrest-core-1.3.jar build/

build/major/bin/ant-replacecall:
LATEST_RELEASE=$$(curl -s https://api.github.com/repos/randoop/grt-replacecall/releases/latest | grep -o '"tag_name": "[^"]*' | cut -d'"' -f4) && \
wget "https://github.com/randoop/grt-replacecall/releases/download/$${LATEST_RELEASE}/ant-replacecall" && \
mv ant-replacecall build/major/bin/

build/checker-framework/checker/dist/checker-qual.jar:
mkdir -p build
CFVER=3.50.0 && \
cd build && wget "https://github.com/typetools/checker-framework/releases/download/checker-framework-$${CFVER}/checker-framework-$${CFVER}.zip" && \
unzip -o checker-framework-$${CFVER}.zip && \
rm -rf checker-framework && \
mv checker-framework-$${CFVER} checker-framework

build/defects4j:
mkdir -p build
cd build && git clone https://github.com/rjust/defects4j && cd defects4j && cpanm --installdeps . && ./init.sh
Expand Down
54 changes: 0 additions & 54 deletions scripts/get-all-subject-src.sh

This file was deleted.

4 changes: 2 additions & 2 deletions scripts/mutation-evosuite.sh
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ echo
SRC_BASE_DIR="$(realpath "$SCRIPT_DIR/../subject-programs/src/$SUBJECT_PROGRAM")"

# Path to the jar file of the subject program.
SRC_JAR=$(realpath "$SCRIPT_DIR/../subject-programs/$SUBJECT_PROGRAM.jar")
SRC_JAR=$(realpath "$SCRIPT_DIR/../subject-programs/jars/$SUBJECT_PROGRAM.jar")

# Number of classes in given jar file.
NUM_CLASSES=$(jar -tf "$SRC_JAR" | grep -c '.class')
Expand Down Expand Up @@ -318,7 +318,7 @@ case "$SUBJECT_PROGRAM" in
"$SRC_BASE_DIR/lib/jaxen-core.jar" \
"$SRC_BASE_DIR/lib/jaxen-jdom.jar" \
"$SRC_BASE_DIR/lib/saxpath.jar" \
"$SCRIPT_DIR/../subject-programs/jaxen-1.1.6.jar"
"$SCRIPT_DIR/../subject-programs/jars/jaxen-1.1.6.jar"
;;

"joda-time-2.3")
Expand Down
31 changes: 21 additions & 10 deletions scripts/mutation-randoop.sh
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,12 @@ set -o pipefail
Generator=Randoop
generator=randoop
SCRIPT_DIR="$(CDPATH='' cd -- "$(dirname -- "$0")" && pwd -P)"
SCRIPT_NAME=$(basename -- "$0")
MAJOR_HOME=$(realpath "${SCRIPT_DIR}/build/major/") # Major home directory, for mutation testing
RANDOOP_JAR=$(realpath "${SCRIPT_DIR}/build/randoop-all-4.3.4.jar") # Randoop jar file
JACOCO_AGENT_JAR=$(realpath "${SCRIPT_DIR}/build/jacocoagent.jar") # For Bloodhound
JACOCO_CLI_JAR=$(realpath "${SCRIPT_DIR}/build/jacococli.jar") # For coverage report generation
REPLACECALL_JAR=$(realpath "${SCRIPT_DIR}/build/replacecall-4.3.4.jar") # For replacing undesired method calls
MAJOR_HOME=$(realpath "${SCRIPT_DIR}/build/major/") # Major home directory, for mutation testing
RANDOOP_JAR=$(realpath "${SCRIPT_DIR}/build/randoop-all-4.3.4.jar") # Randoop jar file
JACOCO_AGENT_JAR=$(realpath "${SCRIPT_DIR}/build/jacocoagent.jar") # For Bloodhound
JACOCO_CLI_JAR=$(realpath "${SCRIPT_DIR}/build/jacococli.jar") # For coverage report generation
REPLACECALL_JAR=$(realpath "${SCRIPT_DIR}/build/replacecall-4.3.4.jar") # For replacing undesired method calls
CHECKER_QUAL_JAR=$(realpath "${SCRIPT_DIR}/build/checker-framework/checker/dist/checker-qual.jar") # For Randoop Impurity

. "$SCRIPT_DIR/defs.sh" # Define shell functions.

Expand All @@ -70,6 +70,7 @@ require_file "$RANDOOP_JAR"
require_file "$JACOCO_AGENT_JAR"
require_file "$JACOCO_CLI_JAR"
require_file "$REPLACECALL_JAR"
require_file "$CHECKER_QUAL_JAR"

usejdk8
JAVA_VER=$(java -version 2>&1 | awk -F '"' '/version/ {print $2}' | awk -F '.' '{sub("^$", "0", $2); print ($1=="1")?$2:$1}')
Expand Down Expand Up @@ -219,8 +220,18 @@ echo
# Path to the base directory of the source code.
SRC_BASE_DIR="$(realpath "$SCRIPT_DIR/../subject-programs/src/$SUBJECT_PROGRAM")"

# Path to the jar file of the subject program.
SRC_JAR=$(realpath "$SCRIPT_DIR/../subject-programs/$SUBJECT_PROGRAM.jar")
if [[ " ${RANDOOP_FEATURES[*]} " =~ " GRT_FUZZING " ]]; then
# If randoop features contain "GRT_FUZZING", use annotated subject program jar.
ANNOTATED_JAR="$SCRIPT_DIR/../subject-programs/annotated-jars/$SUBJECT_PROGRAM.jar"
if [ ! -f "$ANNOTATED_JAR" ]; then
echo "${SCRIPT_NAME}: error: GRT_FUZZING enabled but annotated JAR not found: $ANNOTATED_JAR" >&2
exit 2
fi
SRC_JAR=$(realpath "$ANNOTATED_JAR")
else
# Else, use the original subject program jar.
SRC_JAR=$(realpath "$SCRIPT_DIR/../subject-programs/jars/$SUBJECT_PROGRAM.jar")
fi

# Number of classes in given jar file.
NUM_CLASSES=$(jar -tf "$SRC_JAR" | grep -c '.class')
Expand Down Expand Up @@ -353,7 +364,7 @@ case "$SUBJECT_PROGRAM" in
"$SRC_BASE_DIR/lib/jaxen-core.jar" \
"$SRC_BASE_DIR/lib/jaxen-jdom.jar" \
"$SRC_BASE_DIR/lib/saxpath.jar" \
"$SCRIPT_DIR/../subject-programs/jaxen-1.1.6.jar"
"$SCRIPT_DIR/../subject-programs/jars/jaxen-1.1.6.jar"
;;

"joda-time-2.3")
Expand Down Expand Up @@ -456,7 +467,7 @@ RANDOOP_BASE_COMMAND=(
-Xbootclasspath/a:"$JACOCO_AGENT_JAR:$REPLACECALL_JAR"
-javaagent:"$JACOCO_AGENT_JAR"
-javaagent:"$REPLACECALL_COMMAND"
-classpath "$RANDOOP_CLASSPATH:$RANDOOP_JAR"
-classpath "$RANDOOP_CLASSPATH:$RANDOOP_JAR:$CHECKER_QUAL_JAR"
randoop.main.Main
gentests
--testjar="$TARGET_JAR"
Expand Down
Empty file added src/grt_testing/__init__.py
Empty file.
5 changes: 5 additions & 0 deletions subject-programs/README
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
Run Python scripts in this directory via:

uv run SCRIPTNAME


This directory contains compiled versions (jar files) of projects that the GRT
paper used as subject programs. The paper's Table II lists 32 projects. We
have located 30 of them.
Expand Down
Loading