TY - JOUR
T1 - On the impact of single and co-occurrent refactorings on quality attributes in android applications
AU - Ouni, Ali
AU - AlOmar, Eman Abdullah
AU - Hamdi, Oumayma
AU - Cinnéide, Mel
AU - Mkaouer, Mohamed Wiem
AU - Saied, Mohamed Aymen
N1 - Publisher Copyright:
© 2023 Elsevier Inc.
PY - 2023/11
Y1 - 2023/11
N2 - 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.
AB - 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.
KW - Android
KW - Co-occurrence
KW - Empirical study
KW - Mobile app
KW - Quality metrics
KW - Refactoring
UR - http://www.scopus.com/inward/record.url?scp=85172468450&partnerID=8YFLogxK
UR - http://www.scopus.com/inward/citedby.url?scp=85172468450&partnerID=8YFLogxK
U2 - 10.1016/j.jss.2023.111817
DO - 10.1016/j.jss.2023.111817
M3 - Article
AN - SCOPUS:85172468450
SN - 0164-1212
VL - 205
JO - The Journal of Systems and Software
JF - The Journal of Systems and Software
M1 - 111817
ER -