Automated program repair (APR) is an emerging technique that can automatically generate patches for fixing bugs or vulnerabilities. To ensure correctness, the auto-generated patches are usually sent to developers for verification before applied in the program. To review patches, developers must figure out the root cause of a bug and understand the semantic impact of the patch, which is not straightforward and easy even for expert programmers. In this position paper, we envision an interactive patch suggestion approach that avoids such complex reasoning by instead enabling developers to review patches with a few clicks. We first automatically translate patch semantics into a set of what and how questions. Basically, the what questions formulate the expected program behaviors, while the how questions represent how to modify the program to realize the expected behaviors. We could leverage the existing APR technique to generate those questions and corresponding answers. Then, to evaluate the correctness of patches, developers just need to ask questions and click the corresponding answers.
[1]
Emina Torlak,et al.
Angelic debugging
,
2011,
2011 33rd International Conference on Software Engineering (ICSE).
[2]
Mark Harman,et al.
SapFix: Automated End-to-End Repair at Scale
,
2019,
2019 IEEE/ACM 41st International Conference on Software Engineering: Software Engineering in Practice (ICSE-SEIP).
[3]
Johannes Bader,et al.
Getafix: learning to fix bugs automatically
,
2019,
Proc. ACM Program. Lang..
[4]
Xiang Gao,et al.
Crash-avoiding program repair
,
2019,
ISSTA.
[5]
Brad A. Myers,et al.
Debugging reinvented
,
2008,
2008 ACM/IEEE 30th International Conference on Software Engineering.
[6]
Matias Martinez,et al.
Repairnator patches programs automatically
,
2019,
Ubiquity.