An Empirical Study on the Occurrences of Code Smells in Open Source and Industrial Projects

被引:2
|
作者
Rahman, Md. Masudur [1 ]
Satter, Abdus [1 ]
Joarder, Md. Mahbubul Alam [1 ]
Sakib, Kazi [1 ]
机构
[1] Univ Dhaka, Inst Informat Technol, Dhaka, Bangladesh
关键词
code smell; open source system; industrial system; empirical study;
D O I
10.1145/3544902.3546634
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
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.
引用
收藏
页码:289 / 294
页数:6
相关论文
共 50 条
  • [21] An Empirical Study of Open Source Virtual Reality Software Projects
    Rodriguez, Irving
    Wang, Xiaoyin
    11TH ACM/IEEE INTERNATIONAL SYMPOSIUM ON EMPIRICAL SOFTWARE ENGINEERING AND MEASUREMENT (ESEM 2017), 2017, : 474 - 475
  • [22] A taxonomy and an initial empirical study of bad smells in code
    Mäntylä, M
    Vanhanen, J
    Lassenius, C
    INTERNATIONAL CONFERENCE ON SOFTWARE MAINTENANCE, PROCEEDINGS, 2003, : 381 - 384
  • [23] An Empirical Study of Code Smells in Transformer-based Code Generation Techniques
    Siddiq, Mohammed Latif
    Majumder, Shafayat H.
    Mim, Maisha R.
    Jajodia, Sourov
    Santos, Joanna C. S.
    2022 IEEE 22ND INTERNATIONAL WORKING CONFERENCE ON SOURCE CODE ANALYSIS AND MANIPULATION (SCAM 2022), 2022, : 71 - 82
  • [24] An Empirical Study of the Landscape of Open Source Projects in Baidu, Alibaba, and Tencent
    Han, Junxiao
    Deng, Shuiguang
    Lo, David
    Zhi, Chen
    Yin, Jianwei
    Xia, Xin
    2021 IEEE/ACM 43RD INTERNATIONAL CONFERENCE ON SOFTWARE ENGINEERING: SOFTWARE ENGINEERING IN PRACTICE (ICSE-SEIP 2021), 2021, : 298 - 307
  • [25] An empirical study of the first contributions of developers to open source projects on GitHub
    Subramanian, Vikram N.
    Proceedings - 2020 ACM/IEEE 42nd International Conference on Software Engineering: Companion, ICSE-Companion 2020, 2020, : 116 - 118
  • [26] Empirical study of the relationship between design patterns and code smells
    Alfadel, Mahmoud
    Aljasser, Khalid
    Alshayeb, Mohammad
    PLOS ONE, 2020, 15 (04):
  • [27] On the Effectiveness of Concern Metrics to Detect Code Smells: An Empirical Study
    Padilha, Juliana
    Pereira, Juliana
    Figueiredo, Eduardo
    Almeida, Jussara
    Garcia, Alessandro
    Sant'Anna, Claudio
    ADVANCED INFORMATION SYSTEMS ENGINEERING (CAISE 2014), 2014, 8484 : 656 - 671
  • [28] An empirical study of the first contributions of developers to open source projects on GitHub
    Subramanian, Vikram N.
    2020 ACM/IEEE 42ND INTERNATIONAL CONFERENCE ON SOFTWARE ENGINEERING: COMPANION PROCEEDINGS (ICSE-COMPANION 2020), 2020, : 116 - 118
  • [29] Are Existing Code Smells Relevant in Web Games? An Empirical Study
    Khanve, Vaishali
    ESEC/FSE'2019: PROCEEDINGS OF THE 2019 27TH ACM JOINT MEETING ON EUROPEAN SOFTWARE ENGINEERING CONFERENCE AND SYMPOSIUM ON THE FOUNDATIONS OF SOFTWARE ENGINEERING, 2019, : 1241 - 1243
  • [30] Are existing code smells relevant in web games? An empirical study
    Khanve, Vaishali
    ESEC/FSE 2019 - Proceedings of the 2019 27th ACM Joint Meeting European Software Engineering Conference and Symposium on the Foundations of Software Engineering, 2019, : 1241 - 1243