An Empirical Study on the Occurrences of Code Smells in Open Source and Industrial Projects
Background: Reusing source code containing code smells can induce significant amount of maintenance time and cost. A list of code smells has been identified in the literature and developers are encouraged to avoid the smells from the very beginning while writing new code or reusing existing code, and it increases time and cost to identify and refactor the code after the development of a system. Again, remembering a long list of smells is difficult specially for the new developers. Besides, two different types of software development environment - open source and industry, might have an effect on the occurrences of code smells. Aims: A study on the occurrences of code smells in open source and industrial systems can provide insights about the most frequently occurring smells in each type of software system. The insights can make developers aware of the most frequent occurring smells, and researchers to focus on the improvement and innovation of automatic refactoring tools or techniques for the smells on priority basis. Method: We have conducted a study on 40 large scale Java systems, where 25 are open source and 15 are industrial systems, for 18 code smells. Results: The results show that 6 smells have not occurred in any system, and 12 smells have occurred 21,182 times in total where 60.66% in the open source systems and 39.34% in the industrial systems. Long Method, Complex Class and Long Parameter List have been seen as frequently occurring code smells. The one tailed t-test with 5% level of significant analysis has shown that there is no difference between the occurrences of 10 code smells in industrial and open source systems, and 2 smells are occurred more frequently in open source systems than industrial systems. Conclusions: Our findings conclude that all smells do not occur at the same frequency and some smells are very frequent. The short list of most frequently occurred smells can help developers to write or reuse source code carefully without inducing the smells from the beginning during software development. Our study also concludes that industry and open source environments do not have significant impact on the occurrences of code smells.
Thu 22 SepDisplayed time zone: Athens change
13:30 - 15:00 | Session 2B - Technical Debt & Effort EstimationESEM Industry Forum / ESEM Emerging Results and Vision Papers / ESEM Technical Papers at Sonck Chair(s): Carolyn Seaman University of Maryland Baltimore County | ||
13:30 20mFull-paper | Asking about Technical Debt: Characteristics and Automatic Identification of Technical Debt Questions on Stack Overflow ESEM Technical Papers Nicholas Kozanidis Vrije Universiteit Amsterdam, Roberto Verdecchia Vrije Universiteit Amsterdam, Emitzá Guzmán Vrije Universiteit Amsterdam Pre-print | ||
13:50 15mVision and Emerging Results | An Experience Report on Technical Debt in Pull Requests: Challenges and Lessons Learned ESEM Emerging Results and Vision Papers Shubhashis Karmakar University of Saskatchewan, Zadia Codabux University of Saskatchewan, Melina Vidoni Australian National University DOI | ||
14:05 20mFull-paper | Bayesian Analysis of Bug-Fixing Time using Report Data ESEM Technical Papers Renan Vieira Federal University of Ceará, Diego Mesquita Getulio Vargas Foundation, César Lincoln Mattos Federal University of Ceará, Ricardo Britto Ericsson / Blekinge Institute of Technology, Lincoln Rocha Federal University of Ceará, João Gomes Federal University of Ceará | ||
14:25 15mTalk | Investigating a NASA Cyclomatic Complexity Policy on Maintenance of a Critical System ESEM Industry Forum | ||
14:40 15mVision and Emerging Results | An Empirical Study on the Occurrences of Code Smells in Open Source and Industrial Projects ESEM Emerging Results and Vision Papers Md. Masudur Rahman Institute of Information Technology (IIT), University of Dhaka, Abdus Satter University of Dhaka, Mahbubul Alam Joarder Institute of Information Technology (IIT), University of Dhaka, Kazi Sakib Institute of Information Technology, University of Dhaka DOI Media Attached |