Developers’ perception matters: machine learning to detect developer-sensitive smells
Code smells are symptoms of poor design that hamper software evolution and maintenance. Hence, code smells should be detected as early as possible to avoid software quality degradation. However, the notion of whether a design and/or implementation choice is smelly is subjective, varying for different projects and developers. In practice, developers may have different perceptions about the presence (or not) of a smell, which we call developer-sensitive smell detection. Although Machine Learning (ML) techniques are promising to detect smells, there is little knowledge regarding the accuracy of these techniques to detect developer-sensitive smells. Besides, companies may change developers frequently, and the models should adapt quickly to the preferences of new developers, i.e., using few training instances. Based on that, we present an investigation of the behavior of ML techniques in detecting developer-sensitive smells. We evaluated seven popular ML techniques based on their accuracy and efficiency for identifying 10 smell types according to individual perceptions of 63 developers, with some divergent agreement on the presence of smells. The results showed that five out of seven techniques had statistically similar behavior, being able to properly detect smells. However, the accuracy of all ML techniques was affected by developers’ opinion agreement and smell types. We also observed that the detection rules generated for developers individually have more metrics than in related studies. We can conclude that code smells detection tools should consider the individual perception of each developer to reach higher accuracy. However, untrained developers or developers with high disagreement can introduce bias in the smell detection, which can be risky for overall software quality. Moreover, our findings shed light on improving the state of the art and practice for the detection of code smells, contributing to multiple stakeholders.
Wed 17 MayDisplayed time zone: Hobart change
13:45 - 15:15 | Code smells and clonesTechnical Track / Journal-First Papers / SEIP - Software Engineering in Practice at Level G - Plenary Room 1 Chair(s): Sigrid Eldh Ericsson AB, Mälardalen University, Carleton Unviersity | ||
13:45 15mTalk | Comparison and Evaluation of Clone Detection Techniques with Different Code Representations Technical Track Yuekun Wang University of Science and Technology of China, Yuhang Ye University of Science and Technology of China, Yueming Wu Nanyang Technological University, Weiwei Zhang University of Science and Technology of China, Yinxing Xue University of Science and Technology of China, Yang Liu Nanyang Technological University | ||
14:00 15mTalk | Learning Graph-based Code Representations for Source-level Functional Similarity Detection Technical Track Jiahao Liu National University of Singapore, Jun Zeng National University of Singapore, Xiang Wang University of Science and Technology of China, Zhenkai Liang National University of Singapore | ||
14:15 15mTalk | The Smelly Eight: An Empirical Study on the Prevalence of Code Smells in Quantum Computing Technical Track Qihong Chen University of California, Irvine, Rúben Câmara LASIGE and Department of Informatics are Faculdade Ciências Universidade de Lisboa,, José Campos University of Porto, Portugal, André Souto LaSiGE & FCUL, University of Lisbon, Iftekhar Ahmed University of California at Irvine Pre-print | ||
14:30 15mTalk | An Empirical Comparison on the Results of Different Clone Detection Setups for C-based Projects SEIP - Software Engineering in Practice Yan Zhou Huawei, Jinfu Chen Centre for Software Excellence, Huawei, Canada, Yong Shi Huawei Technologies, Boyuan Chen Centre for Software Excellence, Huawei Canada, Zhen Ming (Jack) Jiang York University | ||
14:45 7mTalk | Developers’ perception matters: machine learning to detect developer-sensitive smells Journal-First Papers Daniel Oliveira PUC-Rio, Wesley Assunção Johannes Kepler University Linz, Austria & Pontifical Catholic University of Rio de Janeiro, Brazil, Alessandro Garcia PUC-Rio, Baldoino Fonseca Federal University of Alagoas (UFAL), Márcio Ribeiro Federal University of Alagoas, Brazil | ||
14:52 7mTalk | Smells in system user interactive tests Journal-First Papers Renaud Rwemalika University of Luxembourg, Sarra Habchi Ubisoft, Mike Papadakis University of Luxembourg, Luxembourg, Yves Le Traon University of Luxembourg, Luxembourg, Marie-Claude Brasseur BGL BNP Paribas | ||
15:00 7mTalk | Bash in the Wild: Language Usage, Code Smells, and Bugs Journal-First Papers Yiwen Dong University of Waterloo, Zheyang Li University of Waterloo, Yongqiang Tian University of Waterloo, Chengnian Sun University of Waterloo, Michael W. Godfrey University of Waterloo, Canada, Mei Nagappan University of Waterloo | ||
15:07 7mTalk | 1-to-1 or 1-to-n? Investigating the effect of function inlining on binary similarity analysis Journal-First Papers Ang Jia Xi'an Jiaotong University, Ming Fan Xi'an Jiaotong University, Wuxia Jin Xi'an Jiaotong University, Xi Xu Xi'an Jiaotong University, Zhaohui Zhou Xi'an Jiaotong University, Qiyi Tang Tencent Security Keen Lab, Sen Nie Keen Security Lab, Tencent, Shi Wu Tencent Security Keen Lab, Ting Liu Xi'an Jiaotong University |