-
- 前言
- preface
- 熊英飞老师2017-18年部分文章 [1]
- 一、《Shaping Program Repair Space with Existing Patches and Similar Code》
-
- 简要概括文章主题:
- 实验效果:
- 引用文章:
- 背景相关:
- 贡献
- 具体算法
- Research Questions
- Related work
- conclusion
-
- 参考文献
前言
在很晚的晚上写下这篇简略的记录,实在不是因为我勤奋,而是我不想再“明日复明日,明日何其多”,既然昨天下的决心,昨天应该做的事,就不能再推导今天。
但是已经是今天了,所以…那就不要再拖到下一秒了吧。
preface
熊英飞老师2017-18年部分文章 [1]
[ICSME18] Ruru Yue, Zhe Gao, Na Meng, Yingfei Xiong, Xiaoyin Wang, David Morgenthaler. Automatic Clone Recommendation for Refactoring Based on the Present and the Past . ICSME’18: 34th IEEE International Conference on Software Maintenance and Evolution, September 2018.
[ISSTA18a] Jiajun Jiang, Yingfei Xiong, Hongyu Zhang, Qing Gao, Xiangqun Chen. Shaping Program Repair Space with Existing Patches and Similar Code. ISSTA’18: International Symposium on Software Testing and Analysis, July 2018.
[ISSTA18b] Yuhao Zhang, Yifan Chen, Shing-Chi Cheung, Yingfei Xiong, Lu Zhang. An Empirical Study on TensorFlow Program Bugs. ISSTA’18: International Symposium on Software Testing and Analysis, July 2018.
[ICSE18a] Yingfei Xiong, Xinyuan Liu#, Muhan Zeng#, Lu Zhang, Gang Huang. Identifying Patch Correctness in Test-Based Program Repair. ICSE’18: 40th International Conference on Software Engineering, Gothenburg, Sweden, May 2018.
[ICSE18b] Shurui Zhou, efan Stciulescu, Olaf Leenich, Yingfei Xiong, Andrzej Wowski, Christian Ktner. Identifying Features in Forks. ICSE’18: 40th International Conference on Software Engineering, Gothenburg, Sweden, May 2018.
[ISSTA17] Bo Wang, Yingfei Xiong, Yangqingwei Shi, Lu Zhang, Dan Hao. Faster Mutation Analysis via Equivalence Modulo States. ISSTA’17: International Symposium on Software Testing and Analysis, Santa Barbara, CA, USA, pages 295-306, July 2017. ACM SIGSOFT Distinguished Paper Award
除[ICSME 18]文章不可见之外,剩余5篇文章都可以在老师的主页下载。
综上,下面我重点介绍能够下载到的这五篇论文。
一、《Shaping Program Repair Space with Existing Patches and Similar Code》
automated program repair: automatically finding and resolving defects that prevent correct operation of software.
programming transformation: more concretely focusing on API adaption and program migration.
简要概括文章主题:
APR现阶段还是一个搜索的问题(search space – related problem),很多techniques用了data-driven approach 以及 analyze data sources such as existing patches and similar source code to help identify the correct patch. 然而,现有的补丁和相似的源代码是互补的,但是呢现有的技术只用了二者中的一个。
所以,我们提出了一种利用两种资源的先进方法,即:”our approach mines an abstract search space from existing patches and obtains a concrete search space by differencing with similar code snippets. Then we search within the intersection of the two search spaces. We have implemented our approach as a tool called SimFix.”
实验效果:
Our tool successfully fixed 34 bugs. To our best knowledge, this is the largest number of bugs fixed by a single technology on the Defects4J bechmark. 更酷的是,
Furthermore, as far as I know, 13 bugs fixed by our approach have never been fixed by the current approaches.
引用文章:
Software automation: [41] Hong Mei and Lu Zhang. 2018. Can big data bring a breakthrough for software automationScience China Information Sciences 61(5), 056101 (2018). https://doi.org/10.1007/s11432-017-9355-3
Repair tools : [11, 14, 22, 32, 36, 40, 45, 59, 60, 65, 68] 值得关注,因为里面好多文章我都没看过诶,今天才知道。。
[11] Qing Gao, Yingfei Xiong, Yaqing Mi, Lu Zhang, Weikun Yang, Zhaoping Zhou, Bing Xie, and Hong Mei. 2015. Safe Memory-Leak Fixing for C Programs. In ICSE
[14] Divya Gopinath, Muhammad Zubair Malik, and Sarfraz Khurshid. 2011. Specifcation-based Program Repair Using SAT (TACAS’11/ETAPS’11). 173–188.
[22] Shalini Kaleeswaran, Varun Tulsian, Aditya Kanade, and Alessandro Orso. 2014. MintHint: Automated Synthesis of Repair Hints. In ICSE. 266–276. https://doi.org/10.1145/2568225.2568258
[32] Chen Liu, Jinqiu Yang, Lin Tan, and Munawar Hafz. 2013. R2Fix: Automatically Generating Bug Fixes from Bug Reports. In ICST. https://doi.org/10.1109/ICST.2013.24
[36] Fan Long and Martin Rinard. 2016. Automatic patch generation by learning correct code. In Proceedings of the 43rd Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages. 298–312. https://doi.org/10.1145/2837614.2837617
[40] Sergey Mechtaev, Jooyong Yi, and Abhik Roychoudhury. 2016. Angelix: Scalable Multiline Program Patch Synthesis via Symbolic Analysis. In ICSE.
[45] Tung Thanh Nguyen, Hoan Anh Nguyen, Nam H. Pham, Jafar Al-Kofahi, and Tien N. Nguyen. 2010. Recurring Bug Fixes in Object-oriented Programs (ICSE). 315–324.
[59] W. Weimer, Z.P. Fry, and S. Forrest. 2013. Leveraging program equivalence for adaptive program repair: Models and frst results. In ASE. 356–366. https://doi.org/10.1109/ASE.2013.6693094
[60] Westley Weimer, ThanhVu Nguyen, Claire Le Goues, and Stephanie Forrest. 2009. Automatically fnding patches using genetic programming. In ICSE. 364–374.
[65] Yingfei Xiong, Zhenjiang Hu, Haiyan Zhao, Hui Song, Masato Takeichi, and Hong Mei. 2009. Supporting automatic model inconsistency fxing. In ESEC/FSE. 315–324.
[68] Yingfei Xiong, Hansheng Zhang, Arnaud Hubaux, Steven She, Jie Wang, and Krzysztof Czarnecki. 2015. Range fxes: Interactive error resolution for software confguration. Software Engineering, IEEE Transactions on 41, 6 (2015), 603–619.
- Question:为什么不放更新的文献呢/li>
背景相关:
Typical approaches include PAR [25], Genesis [34], QAFix [12] and SOFix [33], which confne the search space based on repair patterns, and Prophet [36] and HDRepair [28] that rank the patches by learned models.
- 这个我了解的也比较少。
Analyzing the source code helps us understand the internal structures of the program to be repaired (including the common and context-specifc code), thus we can select the patches that fit the local programming context.
- 分析源代码可以帮助我们了解程序内部结构,从而找到适合程序上下文的补丁。
Typical approaches include GenProg [30] and its variants [17, 71], which combine statements from (similar) code snippets in the same project, as well as SearchRepair [24] that performs semantic search in a code base and ACS [67] that ranks patch ingredients based on statistical results from GitHub.
- Question:为什么没有RSRepair
Within the fnal space, the system searches patches using basic heuristics such as syntactic distance [39, 40].
- [39, 40]分别是DirectFix和Angelix ICSE 15, 16
Then the space is defned by the frequent abstract patches. This abstract space defnition abstracts away project-specifc details and thus is likely to generalize from a small set of patches. Furthermore, this space can be mined automatically and efciently.
- 感觉像软件移植。
To obtain a search space from source code, we follow existing approaches that reuse repair ingredients from similar code [17, 24, 30, 71]
-
[17] T. Ji, L. Chen, X. Mao, and X. Yi. 2016. Automated Program Repair by Using Similar Code Containing Fix Ingredients. In COMPSAC, Vol. 1. 197–202
[24] Y. Ke, K. T. Stolee, C. L. Goues, and Y. Brun. 2015. Repairing Programs with Semantic Code Search (T). In ASE. 295–306. https://doi.org/10.1109/ASE.2015.60
[30] C. Le Goues, ThanhVu Nguyen, S. Forrest, and W. Weimer. 2012. GenProg: A Generic Method for Automatic Software Repair. TSE 38, 1 (Jan 2012), 54–72
[71] Haruki Yokoyama, Yoshiki Higo, Keisuke Hotta, Takafumi Ohta, Kozo Okano, and Shinji Kusumoto. 2016. Toward Improving Ability to Repair Bugs Automatically: A Patch Candidate Location Mechanism Using Code Similarity (SAC ’16). 1364–1370. -
绝对不要轻视以前的论文,工作,如果有好的idea,在技术上可以借鉴以前的工作。此外,想法上也可以向之前的论文学习。
For a similar code snippet that has a shorter distance (called a donor), we compare the two code snippets and obtain modifcations from the faulty snippet to the donor snippet.
- 进一步相信是软件移植相关。donor
贡献
An automated program repair approach based on the intersection of two search spaces: the search space from existing
patches and the search space from similar code.
A method to obtain a search space from existing patches,
based on an abstract space defnition on AST types.
A method to obtain a search space from similar code based
on code direncing.
An experiment on Defects4J that shows the ectiveness of
our approach.
- an experiment on Defects4J that shows the effectiveness of our approach.
具体算法
We use similar code to shrink the search space. However, it is difficult to find a proper granularity, as using the statement granularity may fail to repair the bug and using the fine-grained level (e.g., AST node level) may lead to a still large search space. To deal with this problem, we combine variable matching and code differencing to generate the search space. Our algorithm is adapted from GumTree [9] and can extract modifcations at the level of AST subtree.
To exclude as many plausible but incorrect patches as possible, we derive a search space from existing patches to cover only common repair patterns. In more detail, we define abstract modifications that include only AST node types.
-
Question:以后会出现那种能够修复各种bug的修复工具吗。general-purpose repair tools
-
[9] Jean-Rémy Falleri, Floréal Morandat, Xavier Blanc, Matias Martinez, and Martin Monperrus. 2014. Fine-grained and accurate source code direncing. In ASE. 313–324. https://doi.org/10.1145/2642937.2642982
Our approach consists of an offline mining stage and an online repairing stage. Note that the repairing stage consists of five phases: fault localization; locate similar code in the same project from donor snippets; variable matching; code differencing; generate patches in the intersection of both search spaces.
Research Questions
RQ 4. How do deletion operations act automatic program repair
We implemented another variant of SimFix, called SimFix-D, where we include deletions into the search space and modify the differencing algorithm such that deletions are generated. SimFix repaired 5 less bugs and its precision decreases 14 percentage points.The reason of the performance loss is: the enlarged search space contains more patches and more plausible patches.
RQ 5: How effective is the fine-grained granularity
We found that 17 less bugs would be repaired. The results suggest that the fine-grained code differencing and reusing contributed significantly to the effectiveness of our approach.RQ 1: What are the frequent abstract modification
insert an if statement, replace a method invocation, and insert a method call.
Related work
相关工作给了三个方面:
Automatic program repair
Similar code analysis
Extracting transformations from patches
第一个很精彩,讲了ssFix, genprog, rsrepair, searchrepair, PAR, HDR, ELIXIR 工具之多,感觉很酷,非常之详细。
第二、三个也值得细细一读。
conclusion
这一段更加详细,我感觉自己进一步理解了concrete search space和Abstract search space。
By analyzing existing patches, we obtain a set of frequent abstract modifications, which form an abstract space for program repair. By analyzing similar code snippets in the same program we extract concrete modifications which forms a concrete space. Finally, we use the intersections between the two spaces and perform fine-grained code adaptations for patch generation.
内容详实,精彩。
参考文献
[1] Publications by Year. http://sei.pku.edu.cn/~xiongyf04/publications.html
[2] Jiajun Jiang. https://xgdsmileboy.github.io/
声明:本站部分文章及图片源自用户投稿,如本站任何资料有侵权请您尽早请联系jinwei@zod.com.cn进行处理,非常感谢!