Programmer-Friendly Refactoring Errors | IEEE Journals & Magazine | IEEE Xplore

Programmer-Friendly Refactoring Errors


Abstract:

Refactoring tools, common to many integrated development environments, can help programmers to restructure their code. These tools sometimes refuse to restructure the pro...Show More

Abstract:

Refactoring tools, common to many integrated development environments, can help programmers to restructure their code. These tools sometimes refuse to restructure the programmer's code, instead giving the programmer a textual error message that she must decode if she wishes to understand the reason for the tool's refusal and what corrective action to take. This paper describes a graphical alternative to textual error messages called Refactoring Annotations. It reports on two experiments, one using an integrated development environment and the other using paper mockups, that show that programmers can use Refactoring Annotations to quickly and accurately understand the cause of refactoring errors.
Published in: IEEE Transactions on Software Engineering ( Volume: 38, Issue: 6, Nov.-Dec. 2012)
Page(s): 1417 - 1431
Date of Publication: 08 November 2011

ISSN Information:

References is not available for this document.

1 Introduction

Refactoring is the process of changing the structure of code without changing the way that it behaves [6]. Refactoring is considered a best practice when creating and maintaining software, and indeed, research suggests that programmers practice it regularly [16], [22]. Examples of refactoring include renaming a variable, moving a method from a superclass to its subclasses, and taking a few statements and extracting them into a new method. Each kind of refactoring has a name: These examples are called Rename, Push Down Method, and Extract Method [6].

Select All
1.
T.R. Andersen, "Extract Method: Error Message Should Indicate Offending Variables", bug report, Apr. 2005, [online] Available: https://bugs.eclipse.org/89942.
2.
B. Daniel, D. Dig, K. Garcia and D. Marinov, "Automated Testing of Refactoring Engines", Proc. Sixth Joint Meeting of the European Software Eng. Conference and the ACM SIGSOFT Symp. The Foundations of Software Eng, pp. 185-194, 2007.
3.
M.D. Ernst, "Practical Fine-Grained Static Slicing of Optimized Code", Technical Report MSR-TR-94-14 Microsoft Research Redmond Wash, July 1994.
4.
J. Ferrante, K.J. Ottenstein and J.D. Warren, "The Program Dependence Graph and Its Use in Optimization", ACM Trans. Programming Languages and Systems, vol. 9, pp. 319-349, July 1987.
5.
R.B. Findler, J. Clements, C. Flanagan, M. Flatt, S. Krishnamurthi, P. Steckler, et al., "DrScheme: A Programming Environment for Scheme", J. Functional Programming, vol. 12, pp. 369-388, 2002.
6.
M. Fowler, Refactoring: Improving the Design of Existing Code, Addison-Wesley, 1999.
7.
W.G. Griswold, "Program Restructuring as an Aid to Software Maintenance", 1992.
8.
T.D. Hendrix, J.H.C., S. Maghsoodloo and M.L. McKinney, "Do Visualizations Improve Program Comprehensibility? Experiments with Control Structure Diagrams for Java", Proc. 31st SIGCSE Technical Symp. Computer Science Education, pp. 382-386, 2000.
9.
M. Hitz and B. Montazeri, "Measuring Coupling and Cohesion in Object-Oriented Systems", Proc. Int'l. Symp. Applied Corporate Computing, 1995.
10.
W. Joy and M. Horton, "An Introduction to Display Editing with vi", 1984.
11.
G. Kniesel and H. Koch, "Static Composition of Refactorings", Science of Computer Programming, vol. 52, pp. 9-51, Aug. 2004.
12.
S.K. Kummerfeld and J. Kay, "The Neglected Battle Fields of Syntax Errors", Proc. Fifth Australasian Conf. Computing Education, pp. 105-111, 2003.
13.
E. Mealy, D. Carrington, P. Strooper and P. Wyeth, "Improving Usability of Software Refactoring Tools", Proc. Australian Software Eng. Conf, pp. 307-318, 2007.
14.
E. Murphy-Hill, "Programmer-Friendly Refactoring Tools", 2009.
15.
E. Murphy-Hill and A.P. Black, "Breaking the Barriers to Successful Refactoring: Observations and Tools for Extract Method", Proc. 30th Int'l Conf. Software Eng, pp. 421-430, 2008.
16.
E. Murphy-Hill, C. Parnin and A.P. Black, "How We Refactor and How We Know it", Proc. 31st Int'l Conf. Software Eng, 2009.
17.
J. Nielsen, "Ten Usability Heuristics", Internet, 2005, [online] Available: http://www.useit.com/papers/heuristic/heuristic_list.html.
18.
W.F. Opdyke, "Refactoring Object-Oriented Frameworks", 1992.
19.
P.C. Rigby and S. Thompson, "Study of Novice Programmers Using Eclipse and Gild", Proc. OOPSLA Workshop Eclipse Technology eXchange, pp. 105-109, 2005.
20.
D. Roberts, J. Brant and R. Johnson, "A Refactoring Tool for Smalltalk", Theory and Practice of Object Systems, vol. 3, no. 4, pp. 253-263, 1997.
21.
B. Shneiderman, "System Message Design: Guidelines and Experimental Results" in Directions in Human/Computer Interaction, Ablex Publishing Corporation, pp. 55-78, 1982.
22.
Z. Xing and E. Stroulia, "Refactoring Practice: How It Is and How It Should Be Supported—An Eclipse Case Study", Proc. IEEE 22nd Int'l Conf. Software Maintenance, pp. 458-468, 2006.
Contact IEEE to Subscribe

References

References is not available for this document.