Identifying Patch Correctness in Test-Based Program Repair

被引:93
|
作者
Xiong, Yingfei [1 ]
Liu, Xinyuan [1 ]
Zeng, Muhan [1 ]
Zhang, Lu [1 ]
Huang, Gang [1 ]
机构
[1] Peking Univ, EECS, Inst Software, Key Lab High Confidence Software Technol,MoE, Beijing 100871, Peoples R China
基金
中国国家自然科学基金;
关键词
GENERATION; SYSTEM;
D O I
10.1145/3180155.3180182
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
Test-based automatic program repair has attracted a lot of attention in recent years. However, the test suites in practice are often too weak to guarantee correctness and existing approaches often generate a large number of incorrect patches. To reduce the number of incorrect patches generated, we propose a novel approach that heuristically determines the correctness of the generated patches. The core idea is to exploit the behavior similarity of test case executions. The passing tests on original and patched programs are likely to behave similarly while the failing tests on original and patched programs are likely to behave differently. Also, if two tests exhibit similar runtime behavior, the two tests are likely to have the same test results. Based on these observations, we generate new test inputs to enhance the test suites and use their behavior similarity to determine patch correctness. Our approach is evaluated on a dataset consisting of 139 patches generated from existing program repair systems including jGenProg, Nopol, jKali, ACS and HDRepair. Our approach successfully prevented 56.3% of the incorrect patches to be generated, without blocking any correct patches.
引用
收藏
页码:789 / 799
页数:11
相关论文
共 50 条
  • [1] Patch Correctness Assessment in Automated Program Repair Based on the Impact of Patches on Production and Test Code
    Ghanbari, Ali
    Marcus, Andrian
    [J]. PROCEEDINGS OF THE 31ST ACM SIGSOFT INTERNATIONAL SYMPOSIUM ON SOFTWARE TESTING AND ANALYSIS, ISSTA 2022, 2022, : 654 - 665
  • [2] Shibboleth: Hybrid Patch Correctness Assessment in Automated Program Repair
    Ghanbari, Ali
    Marcus, Andrian
    [J]. PROCEEDINGS OF THE 37TH IEEE/ACM INTERNATIONAL CONFERENCE ON AUTOMATED SOFTWARE ENGINEERING, ASE 2022, 2022,
  • [3] An Analysis of the Suitability of Test-based Patch Acceptance Criteria
    Zemin, Luciano
    Gutierrez Brida, Simon
    Godio, Ariel
    Cornejo, Cesar
    Degiovanni, Renzo
    Regis, German
    Aguirre, Nazareno
    Frias, Marcelo
    [J]. 2017 IEEE/ACM 10TH INTERNATIONAL WORKSHOP ON SEARCH-BASED SOFTWARE TESTING (SBST), 2017, : 14 - 20
  • [4] Evaluating Representation Learning of Code Changes for Predicting Patch Correctness in Program Repair
    Tian, Haoye
    Liu, Kui
    Kabore, Abdoul Kader
    Koyuncu, Anil
    Li, Li
    Klein, Jacques
    Bissyande, Tegawende F.
    [J]. 2020 35TH IEEE/ACM INTERNATIONAL CONFERENCE ON AUTOMATED SOFTWARE ENGINEERING (ASE 2020), 2020, : 981 - 992
  • [5] Predicting Patch Correctness Based on the Similarity of Failing Test Cases
    Tian, Haoye
    Li, Yinghua
    Pian, Weiguo
    Kabore, Abdoul Kader
    Liu, Kui
    Habib, Andrew
    Klein, Jacques
    Bissyande, Tegawende F.
    [J]. ACM TRANSACTIONS ON SOFTWARE ENGINEERING AND METHODOLOGY, 2022, 31 (04)
  • [6] Test-based patch clustering for automatically-generated patches assessment
    Martinez, Matias
    Kechagia, Maria
    Perera, Anjana
    Petke, Justyna
    Sarro, Federica
    Aleti, Aldeida
    [J]. EMPIRICAL SOFTWARE ENGINEERING, 2024, 29 (05)
  • [7] Program Repair by Stepwise Correctness Enhancement
    Diallo, Nafi
    Ghardallou, Wided
    Mili, Ali
    [J]. ELECTRONIC PROCEEDINGS IN THEORETICAL COMPUTER SCIENCE, 2016, (208): : 1 - 15
  • [8] Test-Based Educational Accountability
    Koretz, Daniel
    [J]. ZEITSCHRIFT FUR PADAGOGIK, 2008, 54 (06): : 777 - 790
  • [9] TEST DATA AS AN AID IN PROVING PROGRAM CORRECTNESS
    GELLER, M
    [J]. COMMUNICATIONS OF THE ACM, 1978, 21 (05) : 368 - 375
  • [10] Fault localization for automated program repair: effectiveness, performance, repair correctness
    Assiri, Fatmah Yousef
    Bieman, James M.
    [J]. SOFTWARE QUALITY JOURNAL, 2017, 25 (01) : 171 - 199