Skip to main content

How actively do programmers use refactoring tools?

30 Jan 2013 - planet-eclipse

The short answer is: "not so much".

To find out how actively programmers use the refactoring tool, we analyzed the invocations of the Eclipse refactoring tool for Java in the huge data set of the Eclipse foundation. Over the years, the Eclipse foundation has collected data about invocations of commands, views, and perspectives of Eclipse through the Usage Data Collector (UDC). The Eclipse foundation has released the data from a total of 195,105 programmers who used the Eclipse refactoring tool for Java at least once during 20 months from January 2009 until August 2010. We refer to these programmers as refactoring tool users. Our analysis shows that most refactoring tool users rarely invoke the refactoring tool and invoke few kinds of automated refactorings. This is consistent with prior studies, which showed that programmers do not use the refactoring tool as much as one would expect them to [1, 2, 3].

The above graph shows the proportion of the refactoring tool users who invoked the refactoring tool at most r times, for r = 10, 20, 30, ..., 200.

As shown in this graph, 98.6% of the the refactoring tool users invoked the refactoring tool at most 50 times.

The above graph shows the proportion of the refactoring tool users who have used at most r (1 ≤ r ≤ 23) distinct kinds of automated refactorings. UDC records invocations of 23 refactorings.

As shown in this graph, 98.9% of the refactoring tool users invoked at most five different kinds of automated refactorings. Each of Rename, Extract Local Variable, and Extract Method is a kind of automated refactoring.

If you're curious why programmers do not use the refactoring tools more, read our paper.