Supporting Selective Undo for Refactoring

被引:40
作者
Cheng, Xiao [1 ]
Chen, Yuting [1 ]
Hu, Zhenjiang [2 ]
Zan, Tao [3 ]
Liu, Mengyu [1 ]
Zhong, Hao [1 ]
Zhao, Jianjun [1 ]
机构
[1] Shanghai Jiao Tong Univ, Dept Comp Sci & Engn, Shanghai 200030, Peoples R China
[2] Natl Inst Informat, Tokyo, Japan
[3] Grad Univ Adv Studies, Miura Dist, Kanagawa, Japan
来源
2016 IEEE 23RD INTERNATIONAL CONFERENCE ON SOFTWARE ANALYSIS, EVOLUTION, AND REENGINEERING (SANER), VOL 1 | 2016年
关键词
D O I
10.1109/SANER.2016.20
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
Due to various considerations, programmers often need to backtrack their code. Furthermore, as the most recent edit may not be the wrong edit, programmers sometimes have to backtrack their code for arbitrary edits, which is referred as a selective undo in this paper. To meet the needs, researchers have proposed various approaches to support selective undo. However, to the best of our knowledge, these approaches can support only simple edits, and cannot handle refactoring, although most code editors already provide various refactoring actions. Indeed, it is challenging to support selective undoes for refactoring, since multiple code elements and complicated actions can be involved. In this paper, we present a novel approach that leverages Bidirectional Transformation (BX) to support selective undoes for refactoring. We evaluate our approach on a recent refactoring tool that transfers enhanced for loops to lambda expressions. Our results show that our approach achieves success ratio of up to 89%.
引用
收藏
页码:13 / 23
页数:11
相关论文
共 32 条
[1]   UPDATE SEMANTICS OF RELATIONAL VIEWS [J].
BANCILHON, F ;
SPYRATOS, N .
ACM TRANSACTIONS ON DATABASE SYSTEMS, 1981, 6 (04) :557-575
[2]  
Berlage T.A., 1994, ACM Transactions on Computer-Human Interaction, V1, P269
[3]   Boomerang: Resourceful Lenses for String Data [J].
Bohannon, Aaron ;
Foster, J. Nathan ;
Pierce, Benjamin C. ;
Pilkiewicz, Alexandre ;
Schmitt, Alan .
POPL'08: PROCEEDINGS OF THE 35TH ANNUAL ACM SIGPLAN-SIGACT SYMPOSIUM ON PRINCIPLES OF PROGRAMMING LANGUAGES, 2008, :407-419
[4]  
Collard M.L., 2010, IEEE International Conference on Software Maintenance, IEEE Computer Society, P1
[5]  
Foster JN, 2008, ICFP'08: PROCEEDINGS OF THE 2008 SIGPLAN INTERNATIONAL CONFERENCE ON FUNCTIONAL PROGRAMMING, P383
[6]   Combinators for bi-directional tree transformations - A linguistic approach to the view update problem [J].
Foster, JN ;
Greenwald, MB ;
Moore, JT ;
Pierce, BC ;
Schmitt, A .
ACM SIGPLAN NOTICES, 2005, 40 (01) :233-246
[7]  
Fowler M., 1999, Refactoring: Improving the design of existing code
[8]  
Gyori A., 2013, P 9 JOINT M FDN SOFT, P543, DOI DOI 10.1145/2491411.2491461
[9]  
Hidaka S., 2011, 2011 26th IEEE/ACM International Conference on Automated Software Engineering, P480, DOI 10.1109/ASE.2011.6100104
[10]  
Hofmann M, 2012, POPL 12: PROCEEDINGS OF THE 39TH ANNUAL ACM SIGPLAN-SIGACT SYMPOSIUM ON PRINCIPLES OF PROGRAMMING LANGUAGES, P495