An Empirical Study of Code Smells in Java']JavaScript Projects

被引:0
|
作者
Saboury, Amir [1 ]
Musavi, Pooya [1 ]
Khomh, Foutse [1 ]
Antoniol, Giulio [1 ]
机构
[1] Polytech Montreal, Quebec City, PQ, Canada
关键词
D O I
暂无
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
JavaScript is a powerful scripting programming language that has gained a lot of attention this past decade. Initially used exclusively for client-side web development, it has evolved to become one of the most popular programming languages, with developers now using it for both client-side and server-side application development. Similar to applications written in other programming languages, JavaScript applications contain code smells, which are poor design choices that can negatively impact the quality of an application. In this paper, we investigate code smells in JavaScript server-side applications with the aim to understand how they impact the fault-proneness of applications. We detect 12 types of code smells in 537 releases of five popular JavaScript applications (i.e., express, grunt, bower, less. js, and request) and perform survival analysis, comparing the time until a fault occurrence, in files containing code smells and files without code smells. Results show that (1) on average, files without code smells have hazard rates 65% lower than files with code smells. (2) Among the studied smells, "Variable Re-assign" and "Assignment In Conditional statements" code smells have the highest hazard rates. Additionally, we conduct a survey with 1,484 JavaScript developers, to understand the perception of developers towards our studied code smells. We found that developers consider "Nested Callbacks", "Variable Re-assign" and "Long Parameter List" code smells to be serious design problems that hinder the maintainability and reliability of applications. This assessment is in line with the findings of our quantitative analysis. Overall, code smells affect negatively the quality of JavaScript applications and developers should consider tracking and removing them early on before the release of applications to the public.
引用
收藏
页码:294 / 305
页数:12
相关论文
共 50 条
  • [21] Empirical study of the dynamic behavior of Java']JavaScript objects
    Wei, Shiyi
    Xhakaj, Franceska
    Ryder, Barbara G.
    SOFTWARE-PRACTICE & EXPERIENCE, 2016, 46 (07): : 867 - 889
  • [22] Performance Issues and Optimizations in Java']JavaScript: An Empirical Study
    Selakovic, Marija
    Pradel, Michael
    2016 IEEE/ACM 38TH INTERNATIONAL CONFERENCE ON SOFTWARE ENGINEERING (ICSE), 2016, : 61 - 72
  • [23] Java']Java quality assurance by detecting code smells
    van Emden, E
    Moonen, L
    NINTH WORKING CONFERENCE ON REVERSE ENGINEERING, PROCEEDINGS, 2002, : 97 - 106
  • [24] An Empirical Study of the Performance Impacts of Android Code Smells
    Hecht, Geoffrey
    Moha, Naouel
    Rouvoy, Romain
    2016 IEEE/ACM INTERNATIONAL CONFERENCE ON MOBILE SOFTWARE ENGINEERING AND SYSTEMS (MOBILESOFT 2016), 2016, : 59 - 69
  • [25] An empirical study of Android behavioural code smells detection
    Prestat, Dimitri
    Moha, Naouel
    Villemaire, Roger
    EMPIRICAL SOFTWARE ENGINEERING, 2022, 27 (07)
  • [26] An empirical study of Android behavioural code smells detection
    Dimitri Prestat
    Naouel Moha
    Roger Villemaire
    Empirical Software Engineering, 2022, 27
  • [27] 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
  • [28] An Exploratory Study of Analyzing Java']JavaScript Online Code Clones
    Misu, Md Rakib Hossain
    Satter, Abdus
    30TH IEEE/ACM INTERNATIONAL CONFERENCE ON PROGRAM COMPREHENSION (ICPC 2022), 2022, : 94 - 98
  • [29] Naming Practices in Java']Java Projects: An Empirical Study
    Gresta, Remo
    Durelli, Vinicius
    Cirilo, Elder
    PROCEEDINGS OF THE 20TH BRAZILIAN SYMPOSIUM ON SOFTWARE QUALITY, SBOS 2021, 2021,
  • [30] A Systematic Literature Review: Code Bad Smells in Java']Java Source Code
    Gupta, Aakanshi
    Suri, Bharti
    Misra, Sanjay
    COMPUTATIONAL SCIENCE AND ITS APPLICATIONS - ICCSA 2017, PT V, 2017, 10408 : 665 - 682