Skip to content

Commit

Permalink
Merge pull request #13 from tahiat/sp_json
Browse files Browse the repository at this point in the history
separating json file specimin issues to be run in a separate job
  • Loading branch information
kelloggm authored Feb 29, 2024
2 parents a9d64f6 + b0f12ce commit 445e4d4
Show file tree
Hide file tree
Showing 3 changed files with 154 additions and 141 deletions.
13 changes: 12 additions & 1 deletion main.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import json
import os
import sys
import subprocess
import shutil
from Keyvalue import JsonKeys
Expand Down Expand Up @@ -334,7 +335,17 @@ def main():
print("Local Specimin not found. Cloning a Specimin copy")
clone_specimin(issue_folder_dir, specimin_source_url)

json_file_path = 'resources/test_data.json'
args = sys.argv
specified_targets: str = ""
if (len(args) - 1) >= 1:
specified_targets = args[1] # paper_target/bug_target

json_file_path: str
if specified_targets.lower() == "bugs":
json_file_path = os.path.join("resources", "sp_issue.json")
else:
json_file_path = os.path.join("resources", "test_data.json")

parsed_data = read_json_from_file(json_file_path)

evaluation_results = []
Expand Down
142 changes: 142 additions & 0 deletions resources/sp_issue.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,142 @@
[
{
"issue_id" : "sp-151",
"url": "https://github.com/typetools/checker-framework.git",
"branch": "",
"commit_hash": "",
"project_name": "checker-framework",
"build_command": "",
"root_dir": "dataflow/src/main/java/",
"targets": [
{
"method": "getReturnStatementStores()",
"file": "ForwardAnalysisImpl.java",
"package": "org.checkerframework.dataflow.analysis",
"inner_class": ""
}
],
"cf_version": "",
"java_version": "jdk-17",
"note": ""
},
{
"issue_id" : "sp-150",
"url": "https://github.com/typetools/checker-framework.git",
"branch": "",
"commit_hash": "",
"project_name": "checker-framework",
"build_command": "",
"root_dir": "dataflow/src/main/java/",
"targets": [
{
"method": "performAnalysisBlock(Block)",
"file": "ForwardAnalysisImpl.java",
"package": "org.checkerframework.dataflow.analysis",
"inner_class": ""
}
],
"cf_version": "",
"java_version": "jdk-17",
"note": ""
},
{
"issue_id" : "sp-149",
"url": "https://github.com/typetools/checker-framework.git",
"branch": "",
"commit_hash": "",
"project_name": "checker-framework",
"build_command": "",
"root_dir": "dataflow/src/main/java/",
"targets": [
{
"method": "performAnalysis(ControlFlowGraph)",
"file": "ForwardAnalysisImpl.java",
"package": "org.checkerframework.dataflow.analysis",
"inner_class": ""
}
],
"cf_version": "",
"java_version": "jdk-17",
"note": ""
},
{
"issue_id" : "sp-148",
"url": "https://github.com/typetools/checker-framework.git",
"branch": "",
"commit_hash": "",
"project_name": "checker-framework",
"build_command": "",
"root_dir": "dataflow/src/main/java/",
"targets": [
{
"method": "getStoreAfter(Block)",
"file": "AnalysisResult.java",
"package": "org.checkerframework.dataflow.analysis",
"inner_class": ""
}
],
"cf_version": "",
"java_version": "jdk-17",
"note": ""
},
{
"issue_id" : "sp-152",
"url": "https://github.com/typetools/checker-framework.git",
"branch": "",
"commit_hash": "",
"project_name": "checker-framework",
"build_command": "",
"root_dir": "dataflow/src/main/java/",
"targets": [
{
"method": "getValue(Tree)",
"file": "AbstractAnalysis.java",
"package": "org.checkerframework.dataflow.analysis",
"inner_class": ""
}
],
"cf_version": "",
"java_version": "jdk-17",
"note": ""
},
{
"issue_id" : "sp-153",
"url": "https://github.com/randoop/randoop.git",
"branch": "",
"commit_hash": "",
"project_name": "randoop",
"build_command": "",
"root_dir": "agent/replacecall/src/main/java/",
"targets": [
{
"method": "toString()",
"file": "MethodSignature.java",
"package": "randoop.instrument",
"inner_class": ""
}
],
"cf_version": "",
"java_version": "jdk-17",
"note": ""
},
{
"issue_id" : "sp-154",
"url": "https://github.com/randoop/randoop.git",
"branch": "",
"commit_hash": "",
"project_name": "randoop",
"build_command": "",
"root_dir": "agent/replacecall/src/main/java/",
"targets": [
{
"method": "premain(String, Instrumentation)",
"file": "ReplaceCallAgent.java",
"package": "randoop.instrument",
"inner_class": ""
}
],
"cf_version": "",
"java_version": "jdk-17",
"note": ""
}
]
140 changes: 0 additions & 140 deletions resources/test_data.json
Original file line number Diff line number Diff line change
Expand Up @@ -345,145 +345,5 @@
"cf_version": "3.40.0",
"java_version": "jdk-17",
"note": ""
},
{
"issue_id" : "sp-151",
"url": "https://github.com/typetools/checker-framework.git",
"branch": "",
"commit_hash": "",
"project_name": "checker-framework",
"build_command": "",
"root_dir": "dataflow/src/main/java/",
"targets": [
{
"method": "getReturnStatementStores()",
"file": "ForwardAnalysisImpl.java",
"package": "org.checkerframework.dataflow.analysis",
"inner_class": ""
}
],
"cf_version": "",
"java_version": "jdk-17",
"note": ""
},
{
"issue_id" : "sp-150",
"url": "https://github.com/typetools/checker-framework.git",
"branch": "",
"commit_hash": "",
"project_name": "checker-framework",
"build_command": "",
"root_dir": "dataflow/src/main/java/",
"targets": [
{
"method": "performAnalysisBlock(Block)",
"file": "ForwardAnalysisImpl.java",
"package": "org.checkerframework.dataflow.analysis",
"inner_class": ""
}
],
"cf_version": "",
"java_version": "jdk-17",
"note": ""
},
{
"issue_id" : "sp-149",
"url": "https://github.com/typetools/checker-framework.git",
"branch": "",
"commit_hash": "",
"project_name": "checker-framework",
"build_command": "",
"root_dir": "dataflow/src/main/java/",
"targets": [
{
"method": "performAnalysis(ControlFlowGraph)",
"file": "ForwardAnalysisImpl.java",
"package": "org.checkerframework.dataflow.analysis",
"inner_class": ""
}
],
"cf_version": "",
"java_version": "jdk-17",
"note": ""
},
{
"issue_id" : "sp-148",
"url": "https://github.com/typetools/checker-framework.git",
"branch": "",
"commit_hash": "",
"project_name": "checker-framework",
"build_command": "",
"root_dir": "dataflow/src/main/java/",
"targets": [
{
"method": "getStoreAfter(Block)",
"file": "AnalysisResult.java",
"package": "org.checkerframework.dataflow.analysis",
"inner_class": ""
}
],
"cf_version": "",
"java_version": "jdk-17",
"note": ""
},
{
"issue_id" : "sp-152",
"url": "https://github.com/typetools/checker-framework.git",
"branch": "",
"commit_hash": "",
"project_name": "checker-framework",
"build_command": "",
"root_dir": "dataflow/src/main/java/",
"targets": [
{
"method": "getValue(Tree)",
"file": "AbstractAnalysis.java",
"package": "org.checkerframework.dataflow.analysis",
"inner_class": ""
}
],
"cf_version": "",
"java_version": "jdk-17",
"note": ""
},
{
"issue_id" : "sp-153",
"url": "https://github.com/randoop/randoop.git",
"branch": "",
"commit_hash": "",
"project_name": "randoop",
"build_command": "",
"root_dir": "agent/replacecall/src/main/java/",
"targets": [
{
"method": "toString()",
"file": "MethodSignature.java",
"package": "randoop.instrument",
"inner_class": ""
}
],
"cf_version": "",
"java_version": "jdk-17",
"note": ""
},
{
"issue_id" : "sp-154",
"url": "https://github.com/randoop/randoop.git",
"branch": "",
"commit_hash": "",
"project_name": "randoop",
"build_command": "",
"root_dir": "agent/replacecall/src/main/java/",
"targets": [
{
"method": "premain(String, Instrumentation)",
"file": "ReplaceCallAgent.java",
"package": "randoop.instrument",
"inner_class": ""
}
],
"cf_version": "",
"java_version": "jdk-17",
"note": ""
}
]

0 comments on commit 445e4d4

Please sign in to comment.