Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(java): commons-lang M-classes #141

Merged
merged 4 commits into from
Dec 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
18 changes: 18 additions & 0 deletions Java/commons-lang-MethodUtilsTest_711/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
FROM ghcr.io/kupl/starlab-benchmarks/java-base:commons-lang

ENV TZ=Asia/Seoul

COPY ./metadata.json .
COPY ./npe.json .
COPY ./buggy.java /tmp/buggy.java
RUN export BUGGY_PATH=$(cat metadata.json | jq -r ".npe.filepath") \
&& export BUGGY_LINE=$(cat metadata.json | jq -r ".npe.line") \
&& export BUGGY_MTHD=$(cat metadata.json | jq -r ".npe.npe_method") \
&& mv /tmp/buggy.java $BUGGY_PATH \
&& echo "[{\"filepath\": \"$BUGGY_PATH\", \"line\": $BUGGY_LINE, \"method_name\": \"$BUGGY_MTHD\"}]" | jq . > traces.json

RUN git init . && git add -A

RUN $(cat metadata.json | jq -r ".buildCommand")

RUN $(cat metadata.json | jq -r ".testCommand"); if [ $? -eq 0 ]; then exit 1; fi
788 changes: 788 additions & 0 deletions Java/commons-lang-MethodUtilsTest_711/buggy.java

Large diffs are not rendered by default.

21 changes: 21 additions & 0 deletions Java/commons-lang-MethodUtilsTest_711/metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"language": "java",
"id": "commons-lang-MethodUtilsTest_711",
"buggyPath": ".",
"referencePath": null,
"buildCommand": "mvn package -V -B -Denforcer.skip=true -Dcheckstyle.skip=true -Dcobertura.skip=true -Drat.skip=true -Dlicense.skip=true -Dfindbugs.skip=true -Dgpg.skip=true -Dskip.npm=true -Dskip.gulp=true -Dskip.bower=true -Drat.numUnapprovedLicenses=100 -DskipTests=true -DskipITs=true -Dtest=None -DfailIfNoTests=false",
"testCommand": "mvn clean test -V -B -Denforcer.skip=true -Dcheckstyle.skip=true -Dcobertura.skip=true -Drat.skip=true -Dlicense.skip=true -Dfindbugs.skip=true -Dgpg.skip=true -Dskip.npm=true -Dskip.gulp=true -Dskip.bower=true -Drat.numUnapprovedLicenses=100",
"categories": [
"safety",
"npe"
],
"npe": {
"filepath": "src/test/java/org/apache/commons/lang3/reflect/MethodUtilsTest.java",
"line": 709,
"npe_method": "expectMatchingAccessibleMethodParameterTypes",
"deref_field": "requestTypes",
"npe_class": "MethodUtilsTest",
"repo": "commons-lang",
"bug_id": "MethodUtilsTest_711"
}
}
7 changes: 7 additions & 0 deletions Java/commons-lang-MethodUtilsTest_711/npe.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"filepath": "src/test/java/org/apache/commons/lang3/reflect/MethodUtilsTest.java",
"line": 709,
"npe_method": "expectMatchingAccessibleMethodParameterTypes",
"deref_field": "requestTypes",
"npe_class": "MethodUtilsTest"
}
18 changes: 18 additions & 0 deletions Java/commons-lang-MethodUtils_229/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
FROM ghcr.io/kupl/starlab-benchmarks/java-base:commons-lang

ENV TZ=Asia/Seoul

COPY ./metadata.json .
COPY ./npe.json .
COPY ./buggy.java /tmp/buggy.java
RUN export BUGGY_PATH=$(cat metadata.json | jq -r ".npe.filepath") \
&& export BUGGY_LINE=$(cat metadata.json | jq -r ".npe.line") \
&& export BUGGY_MTHD=$(cat metadata.json | jq -r ".npe.npe_method") \
&& mv /tmp/buggy.java $BUGGY_PATH \
&& echo "[{\"filepath\": \"$BUGGY_PATH\", \"line\": $BUGGY_LINE, \"method_name\": \"$BUGGY_MTHD\"}]" | jq . > traces.json

RUN git init . && git add -A

RUN $(cat metadata.json | jq -r ".buildCommand")

RUN $(cat metadata.json | jq -r ".testCommand"); if [ $? -eq 0 ]; then exit 1; fi
Loading