Revision of ConFix with patch recommendation data instead of change pool
Inspired by Automated Patch Generation with Context-based Change Application
- Checkout defects4j data
- Use git blame to get hash id of BFIC and FIC
-
list FIC in csv format path: /home/DPMiner/ConPatFix/TEYH_pool/FicCollect/{Project_name}_withFIC.csv columns: [DefectsfJ ID,Faulty file path,faulty line,FIC]
-
list BFIC in csv format path: /home/DPMiner/ConPatFix/TEYH_pool/PatchSuggestion/output/{Project_name}_withBFIC.csv columns: [DefectsfJ ID,Faulty file path,faulty line,FIC,BFIC,project,dummy,lable]
- Use change-vector-colletor: Collect change vectors between BFICs and FICs.
- Use SimFin: Use change collected change vectors to get suggested patches.
- change-vector-collector output path: /home/DPMiner/ConPatFix/TEYH_pool/PatchSuggestion/output/testset/X_test.csv /home/DPMiner/ConPatFix/TEYH_pool/PatchSuggestion/output/testset/Y_test.csv columns: X_test.csv: list of change vectors Y_test.csv: [index, path_BBIC, path_BIC, sha_BBIC, sha_BIC, path_BBFC, path_BFC, sha_BBFC, sha_BFC, key, project, label] but, [path_BBFC, path_BFC, sha_BBFC, sha_BFC, key] is replaced with {Project_name}-{ID}
SimFin results in csv format
- SHA of BFICs
- File path in BFICs
- SHA of suggested patches
- File path of suggested patches
- Project names path: /home/DPMiner/ConPatFix/TEYH_pool/PatchSuggestion/output/eval/test_result.csv columns: [ Y_BIC_SHA, Y_BIC_Path, Y_Project, Y_BugId, Y^_Project, dummy, Rank, Sim-Score, BI_lines,Label, Project, Y^_BIC_SHA, Y^_BIC_Path, Y^_BIC_Hunk, Y^_BFC_SHA, Y^_BFC_Path, Y^_BFC_Hunk ] but, the columns are modified from original SimFin result format. also, Y^BFC_Hunk is replaced with '' ro make the csv simple. it can be restored.
- Checkout all necessary projects with SHA from commit db in defects4j.
- Copy all the buggy and clean files into
code_dir
directory. - Checkout all necessary projects of suggested patch.
- Copy all the buggy and clean files into
code_dir
directory. - Put all the file path into
LAS_input.csv
. path: /home/DPMiner/ConPatFix/TEYH_pool/LAS_input.csv columns: [DFJ ID, neighbor rank, orig_BIC path, orig_BFC path, rec_BIC path, rec_BFC path]
- Read LAS_input.csv.
- Run LAS twice for each from original patch and suggested patch.
- Put all the change info into
LAS_output.csv
path: /home/DPMiner/ConPatFix/TEYH_pool/LAS_output.csv columns: [DFJ ID, Rank, orig change info, suggested change info]