Symmetry (Dec 2020)

Priority Measurement of Patches for Program Repair Based on Semantic Distance

  • Yukun Dong,
  • Meng Wu,
  • Li Zhang,
  • Wenjing Yin,
  • Mengying Wu,
  • Haojie Li

DOI
https://doi.org/10.3390/sym12122102
Journal volume & issue
Vol. 12, no. 12
p. 2102

Abstract

Read online

Automated program repair is an effective way to ensure software quality and improve software development efficiency. At present, there are many methods and tools of automated program reapir in real world, but most of them have low repair accuracy, resulting in a large number of incorrect patches in the generated patches. To solve this problem, we propose a patch quality evaluation method based on semantic distance, which measures the semantic distance of patches by using features of interval distance, output coverage, and path matching. For each evaluation feature, we give a quantitative formula to obtain a specific distance value and use the distance to calculate the recommended patch value to measure the quality of the patch. Our quality evaluation method evaluated 279 patches from previous program repair tools, including Nopol, DynaMoth, ACS, jGenProg, and CapGen. This quality evaluation method successfully arranged the correct patches before the plausible but incorrect patches, and it recommended the higher-ranked patches to users first. On this basis, we compared our evaluation method with the existing evaluation methods and judged the evaluation ability of each feature. We showed that our proposed patch quality evaluation method can improve the repair accuracy of repair tools.

Keywords