PhD Seminar: Improving Automated Program Repair by Leveraging Human Knowledge

Thursday, January 4, 2018 2:00 pm - 2:00 pm EST (GMT -05:00)

Candidate: Jinqiu Yang

Title: Improving Automated Program Repair by Leveraging Human Knowledge

Date: January 4, 2018

Time: 2:00 PM

Place: EIT 3145

Supervisor(s): Tan, Lin

Abstract:

Developers spend much of their time fixing bugs in software programs. Automated program repair (APR) techniques aim to alleviate the burden of bug fixing from developers by generating patches at source-code level. Recently, Generate-and-Validate (G&V) APR techniques show great potential to repair general bugs in real-world applications. G&V techniuqes locate the patches in a hypothesized space of patches and utilize readily-available test suites to validate the quality of the generated patches. Despite the promising results (G&V techniques repair 8–17.7% of the collected bugs from mature Java or C open-source projects), two primary limitations prohibit the advances of automated program repair. First, G&V may generate incorrect patches (i.e., fail to fix the bugs while passing the test-suite-based validation due to the weakness of test suites). Second, the repair capability of each G&V technique is limited by the hypothesized space of patches. Therefore, there still exist bug fixes that cannot be handled well (i.e., not in the hypothesized space) by current automated program repair techniques.

This thesis makes contributions to advance APR in two phases. First, this thesis investigates whether improving the test-suite-based validation can precisely identify incorrect patches that are generated by G&V, and whether it can help G&V generate more correct patches. The result of this investigation–Opad, which combines new fuzz-generated test cases and additional oracles (i.e., memory oracles), is proposed to identify incorrect patches and help G&V repair more bugs correctly. The evaluation of Opad shows that the improved test-suite-based validation identifies 75.2% incorrect patches from G&V techniques. With the integration of Opad, SPR, one of the most promising G&V techniques, repairs one additional bug. Furthermore, the inspection of the new automatically-generated test cases highlights that adding new test cases have great potential in identifying incorrect patches, although the potential is not fully explored due to the limitations of test oracles. The problem of weak test suites cannot be fully addressed due to the challenging oracle problem. Meanwhile, improving the hypothesized space of patches, from both quantity and quality aspects, could further advance automated program repair by targeting at different types of bugs.

Second, this thesis makes contributions to enrich hypothesized space of patches of automated program repair, by leveraging human knowledge. Thus, APR techniques can repair new types of bugs that are not currently targeted by G&V APR techniuqes. Human knowledge in bug-fixing activities is noted in the forms such as commits of bug fixes, developers’ expertise, and documentation pages. Two techniques (APARE and Priv) are proposed to target at two types of defects respectively: project-specific recurring bugs and vulnerability warnings by static analysis.