Drag-and-drop refactoring: Intuitive and efficient program transformation

Refactoring is a disciplined technique for restructuring code to improve its readability and maintainability. Almost all modern integrated development environments (IDEs) offer built-in support for automated refactoring tools. However, the user interface for refactoring tools has remained largely unchanged from the menu and dialog approach introduced in the Smalltalk Refactoring Browser, the first automated refactoring tool, more than a decade ago. As the number of supported refactorings and their options increase, invoking and configuring these tools through the traditional methods have become increasingly unintuitive and inefficient. The contribution of this paper is a novel approach that eliminates the use of menus and dialogs altogether. We streamline the invocation and configuration process through direct manipulation of program elements via drag-and-drop. We implemented and evaluated this approach in our tool, Drag-and-Drop Refactoring (DNDRefactoring), which supports up to 12 of 23 refactorings in the Eclipse IDE. Empirical evaluation through surveys and controlled user studies demonstrates that our approach is intuitive, more efficient, and less error-prone compared to traditional methods available in IDEs today. Our results bolster the need for researchers and tool developers to rethink the design of future refactoring tools.

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

[2]  Anselm L. Strauss,et al.  Basics of qualitative research : techniques and procedures for developing grounded theory , 1998 .

[3]  C MurphyGail,et al.  How Are Java Software Developers Using the Eclipse IDE , 2006 .

[4]  Andrew P. Black,et al.  Restructuring software with gestures , 2011, 2011 IEEE Symposium on Visual Languages and Human-Centric Computing (VL/HCC).

[5]  Takeo Igarashi,et al.  Boomerang: suspendable drag-and-drop interactions based on a throw-and-catch metaphor , 2007, UIST.

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

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

[8]  A. Strauss Basics Of Qualitative Research , 1992 .

[9]  John Maloney,et al.  The Scratch Programming Language and Environment , 2010, TOCE.

[10]  Matthew J. Conway,et al.  Alice: Easy-to-Learn 3D Scripting for Novices , 1998 .

[11]  E. Murphy-Hill,et al.  Refactoring Tools: Fitness for Purpose , 2006, IEEE Software.

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

[13]  Andrew P. Black,et al.  How we refactor, and how we know it , 2009, 2009 IEEE 31st International Conference on Software Engineering.

[14]  Stephan Diehl,et al.  Are refactorings less error-prone than other changes? , 2006, MSR '06.

[15]  Allen Newell,et al.  The psychology of human-computer interaction , 1983 .

[16]  Patrick Baudisch,et al.  Improving drag-and-drop on wall-size displays , 2005, Graphics Interface.

[17]  Maxime Collomb,et al.  Extending drag-and-drop to new interactive environments: A multi-display, multi-instrument and multi-user approach , 2008, Interact. Comput..

[18]  Serge Demeyer,et al.  The LAN-simulation: A Refactoring Lab Session , 2007, WRT.

[19]  N. Hoffart Basics of Qualitative Research: Techniques and Procedures for Developing Grounded Theory , 2000 .

[20]  William G. Griswold,et al.  Star diagram with automated refactorings for Eclipse , 2005, eclipse '05.

[21]  Peta Wyeth,et al.  Improving Usability of Software Refactoring Tools , 2007, 2007 Australian Software Engineering Conference (ASWEC'07).

[22]  Chris Parnin,et al.  A catalogue of lightweight visualizations to support code smell inspection , 2008, SOFTVIS.