A Compositional Paradigm of Automating Refactorings

Recent studies suggest that programmers greatly underuse refactoring tools, especially for complex refactorings. Complex refactorings tend to be tedious and error-prone to perform by hand. To promote the use of refactoring tools for complex changes, we propose a new paradigm for automating refactorings called compositional refactoring. The key idea is to perform small, predictable changes using a tool and manually compose them into complex changes. This paradigm trades off some level of automation by higher predictability and control. We show that this paradigm is natural, because our analysis of programmers' use of the Eclipse refactoring tool in the wild shows that they frequently batch and compose automated refactorings. We then show that programmers are receptive to this new paradigm through a survey of 100 respondents. Finally, we show that the compositional paradigm is effective through a controlled study of 13 professional programmers, comparing this paradigm to the existing wizard-based one.

[1]  Ralph E. Johnson,et al.  Drag-and-drop refactoring: Intuitive and efficient program transformation , 2013, 2013 35th International Conference on Software Engineering (ICSE).

[2]  Michael D. Ernst,et al.  Refactoring sequential Java code for concurrency via concurrent libraries , 2009, 2009 IEEE 31st International Conference on Software Engineering.

[3]  Frank Tip,et al.  Refactoring Java programs for flexible locking , 2011, 2011 33rd International Conference on Software Engineering (ICSE).

[4]  Stas Negara,et al.  Use, disuse, and misuse of automated refactorings , 2012, 2012 34th International Conference on Software Engineering (ICSE).

[5]  Torbjörn Ekman,et al.  Stepping Stones over the Refactoring Rubicon , 2009, ECOOP.

[6]  Frank Tip,et al.  Refactoring for reentrancy , 2009, ESEC/FSE '09.

[7]  Ralph E. Johnson,et al.  A Refactoring Tool for Smalltalk , 1997, Theory Pract. Object Syst..

[8]  Oege de Moor,et al.  JunGL: a scripting language for refactoring , 2006, ICSE.

[9]  P. Carayon,et al.  Human Factors and Ergonomics , 2013 .

[10]  Andrew P. Black,et al.  Breaking the barriers to successful refactoring: observations and tools for extract method , 2008, ICSE.

[11]  Emerson R. Murphy-Hill,et al.  Reconciling manual and automatic refactoring , 2012, 2012 34th International Conference on Software Engineering (ICSE).

[12]  Huiqing Li,et al.  A Domain-Specific Language for Scripting Refactorings in Erlang , 2012, FASE.

[13]  Joshua Kerievsky,et al.  Refactoring to Patterns , 2004, XP/Agile Universe.

[14]  Mik Kersten,et al.  How are Java software developers using the Elipse IDE? , 2006, IEEE Software.

[15]  Don Roberts,et al.  Practical analysis for refactoring , 1999 .

[16]  Günter Kniesel,et al.  Static composition of refactorings , 2004, Sci. Comput. Program..

[17]  N. Denzin,et al.  Handbook of Qualitative Research , 1994 .

[18]  Spencer Rugaber,et al.  CodePad: interactive spaces for maintaining concentration in programming environments , 2010, SOFTVIS '10.

[19]  Sophia Drossopoulou ECOOP 2009 - Object-Oriented Programming, 23rd European Conference, Genoa, Italy, July 6-10, 2009. Proceedings , 2009, ECOOP.

[20]  R. Suganya,et al.  Data Mining Concepts and Techniques , 2010 .

[21]  A Kirlik,et al.  Modeling Strategic Behavior in Human-Automation Interaction: Why an "Aid" Can (and Should) Go Unused , 1993, Human factors.

[22]  William F. Opdyke,et al.  Refactoring object-oriented frameworks , 1992 .

[23]  M. Miles,et al.  Data management and analysis methods. , 1994 .

[24]  Zhenchang Xing,et al.  Refactoring Practice: How it is and How it Should be Supported - An Eclipse Case Study , 2006, 2006 22nd IEEE International Conference on Software Maintenance.

[25]  Mik Kersten,et al.  How are lava software developers using the eclipse IDE , 2006 .

[26]  L. Bainbridge Ironies of Automation , 1982 .

[27]  Marc Snir,et al.  Transformation for class immutability , 2011, 2011 33rd International Conference on Software Engineering (ICSE).

[28]  William G. Griswold Program restructuring as an aid to software maintenance , 1992 .

[29]  Stas Negara,et al.  A Comparative Study of Manual and Automated Refactorings , 2013, ECOOP.

[30]  Mel O Cinn eide Automated application of design patterns: a refactoring approach , 2001 .

[31]  William G. Griswold,et al.  WitchDoctor: IDE support for real-time auto-completion of refactorings , 2012, 2012 34th International Conference on Software Engineering (ICSE).

[32]  Andrew P. Black,et al.  How We Refactor, and How We Know It , 2012, IEEE Trans. Software Eng..

[33]  Jian Pei,et al.  Data Mining: Concepts and Techniques, 3rd edition , 2006 .

[34]  K J Vicente,et al.  Less is (sometimes) more in cognitive engineering: the role of automation technology in improving patient safety , 2003, Quality & safety in health care.

[35]  Stas Negara,et al.  The need for richer refactoring usage data , 2011, PLATEAU '11.

[36]  Ralph Johnson,et al.  design patterns elements of reusable object oriented software , 2019 .

[37]  Jeffrey Overbey,et al.  Inferring Method Effect Summaries for Nested Heap Regions , 2009, 2009 IEEE/ACM International Conference on Automated Software Engineering.