Authors
Yun Lin, Xin Peng, Zhenchang Xing, Diwen Zheng, Wenyun Zhao
Publication date
2015/8/30
Book
Proceedings of the 2015 10th Joint Meeting on Foundations of Software Engineering
Pages
520-531
Description
Developers often need to modify pasted code when programming with copy-and-paste practice. Some modifications on pasted code could involve lots of editing efforts, and any missing or wrong edit could incur bugs. In this paper, we propose a clone-based and interactive approach to recommending where and how to modify the pasted code. In our approach, we regard clones of the pasted code as the results of historical copy-and-paste operations and their differences as historical modifications on the same piece of code. Our approach first retrieves clones of the pasted code from a clone repository and detects syntactically complete differences among them. Then our approach transfers each clone difference into a modification slot on the pasted code, suggests options for each slot, and further mines modifying regulations from the clone differences. Based on the mined modifying regulations, our approach …
Total citations
201620172018201920202021202220232024324396422
Scholar articles
Y Lin, X Peng, Z Xing, D Zheng, W Zhao - Proceedings of the 2015 10th Joint Meeting on …, 2015