Please use this identifier to cite or link to this item: http://bura.brunel.ac.uk/handle/2438/24932
Title: Code smells detection via modern code review: a study of the OpenStack and Qt communities
Authors: Han, X
Tahir, A
Liang, P
Counsell, S
Blincoe, K
Li, B
Luo, Y
Keywords: Modern code review;Code smell;Mining software repositories;Empirical study
Issue Date: 4-Jun-2022
Publisher: SpringerLink
Citation: Han, X., Tahir, A., Liang, P., Counsell, S., Blincoe, K., Li, B., Luo, Y. (2022) 'Code smells detection via modern code review: a study of the OpenStack and Qt communities', Empirical Software Engineering, 27(6), pp. 1 - 42. doi:10.1007/s10664-022-10178-7.
Abstract: Code review plays an important role in software quality control. A typical review process involves a careful check of a piece of code in an attempt to detect and locate defects and other quality issues/violations. One type of issue that may impact the quality of software is code smells - i.e., bad coding practices that may lead to defects or maintenance issues. Yet, little is known about the extent to which code smells are identified during modern code review. To investigate the concept behind code smells identified in modern code review and what actions reviewers suggest and developers take in response to the identified smells, we conducted an empirical study of code smells in code reviews by analysing reviews from four, large open source projects from the OpenStack (Nova and Neutron) and Qt (Qt Base and Qt Creator) communities. We manually checked a total of 25,415 code review comments obtained by keywords search and random selection; this resulted in the identification of 1,539 smell-related reviews which then allowed the study of the causes of code smells, actions taken against identified smells, time taken to fix identified smells and reasons why developers ignored fixing identified smells. Our analysis found that 1) code smells were not commonly identified in code reviews, 2) smells were usually caused by violation of coding conventions, 3) reviewers usually provided constructive feedback, including fixing (refactoring) recommendations to help developers remove smells, 4) developers generally followed those recommendations and actioned the changes, 5) once identified by reviewers, it usually takes developers less than one week to fix the smells and 6) the main reason why developers chose to ignore the identified smells is that it is not worth fixing the smell. Our results suggest the following: 1) developers should closely follow coding conventions in their projects to avoid introducing code smells, 2) review-based detection of code smells is perceived to be a trustworthy approach by developers, mainly because reviews are context-sensitive (as reviewers are more aware of the context of the code given that they are part of the project’s development team) and 3) program context needs to be fully considered in order to make a decision of whether to fix the identified code smell immediately.
URI: http://bura.brunel.ac.uk/handle/2438/24932
DOI: http://dx.doi.org/10.1007/s10664-022-10178-7
ISSN: 1382-3256
Other Identifiers: 127
127
Appears in Collections:Dept of Computer Science Research Papers

Files in This Item:
File Description SizeFormat 
FullText.pdf2.36 MBAdobe PDFView/Open


Items in BURA are protected by copyright, with all rights reserved, unless otherwise indicated.