Abstract

Android applications must evolve quickly to meet new user requirements, to facilitate bug fixing or to adapt to technological changes. This evolution can lead to various software quality problems that may hinder maintenance and further evolution. Code refactoring is a key practice that is employed to ensure that the intent of a code change is properly achieved without compromising internal software quality. While the impact of refactoring on software quality has been widely studied in object-oriented software in general, its impact in the specific context of mobile applications is still unclear. This paper reports on a large empirical study that aims to understand the impact of single and co-occurrent refactorings on quality metrics in Android applications. We analyze the evolution history of 800 open-source Android applications containing a total of 84,841 refactoring operations. We first analyze the impact of single refactoring operations on 21 common quality metrics using the Difference-in-Difference (DiD) statistical model. Then, we identify the most common co-occurrent refactorings using association rule mining, and investigate their impact on quality metrics using the DiD model. Our investigations deliver several important findings. Our results reveal that co-occurrent refactorings are quite prevalent in Android applications. Overall, 60% of the total number of refactoring commits contain multiple refactoring types, and 16 co-occurrent refactoring pairs tend to be applied together leading to a higher impact than single refactorings. We found that single refactorings have no statistically significant impact on quality metrics in 74.7% of the cases, a positive impact in 23.1% of the cases, and a negative impact in 2.2% of the cases. Whereas, co-occurrent refactorings have no statistically significant impact on quality metrics in 54.3% of the cases, a positive impact in 42.4% of the cases, and a negative impact in 3.3% of the cases. Our findings provide practical insights and suggest directions for researchers, practitioners, and tool builders to improve refactoring practices in the context of Android applications development.

Full Text
Published version (Free)

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call