An Empirical Study on Rule Violation History of JavaScript Code Blocks on Stack Overflow.

Saved in:
Bibliographic Details
Title: An Empirical Study on Rule Violation History of JavaScript Code Blocks on Stack Overflow.
Authors: Kim, Jungil, Lee, Eunjoo
Source: International Journal of Software Engineering & Knowledge Engineering; May2022, Vol. 32 Issue 5, p693-712, 20p
Subject Terms: BLOCK codes, EMPIRICAL research, JAVASCRIPT programming language, QUANTITATIVE research
Abstract: JavaScript code blocks on Stack Overflow (SO) are often used in software projects. However, little is known about the issue of rule violation risk in SO JavaScript code blocks. Rule violation is one of the factors which degrades the quality of Java Script code. To prevent prevalence of rule violation by reusing SO JavaScript code blocks, it is needed to investigate how secure SO JavaScript code blocks are against rule violation. To examine the issue, we performed a quantitative analysis to investigate how many rule violations are, when first rule violation occurs and what is the trend of rule violations in evolution history of Stack Overflow JavaScript code blocks. We collected SO posts related to JavaScript and extracted the code blocks contained in the posts. By using ESLint, the most popular rule violation detection tool, we identified rule violations in the evolution history of our target code blocks. We then performed quantitative analyses on the identified rule violations. As the results of the analyses, we found that: (1) 60% of the studied code blocks evolve with any rule violations. (2) In the rule violated code blocks, 92% of the code blocks get first rule violation occurrence in the early phase of their evolution. (3) 80% of the rule violated code blocks never fix existing rule violations during their evolution. Our findings suggest that SO should provide a policy which can reduce rule violations in submitted JavaScript code blocks. The findings can also make SO users attend to rule violations when reusing SO JavaScript code blocks. [ABSTRACT FROM AUTHOR]
Copyright of International Journal of Software Engineering & Knowledge Engineering is the property of World Scientific Publishing Company and its content may not be copied or emailed to multiple sites without the copyright holder's express written permission. Additionally, content may not be used with any artificial intelligence tools or machine learning technologies. However, users may print, download, or email articles for individual use. This abstract may be abridged. No warranty is given about the accuracy of the copy. Users should refer to the original published version of the material for the full abstract. (Copyright applies to all Abstracts.)
Database: Complementary Index
Description
Abstract:JavaScript code blocks on Stack Overflow (SO) are often used in software projects. However, little is known about the issue of rule violation risk in SO JavaScript code blocks. Rule violation is one of the factors which degrades the quality of Java Script code. To prevent prevalence of rule violation by reusing SO JavaScript code blocks, it is needed to investigate how secure SO JavaScript code blocks are against rule violation. To examine the issue, we performed a quantitative analysis to investigate how many rule violations are, when first rule violation occurs and what is the trend of rule violations in evolution history of Stack Overflow JavaScript code blocks. We collected SO posts related to JavaScript and extracted the code blocks contained in the posts. By using ESLint, the most popular rule violation detection tool, we identified rule violations in the evolution history of our target code blocks. We then performed quantitative analyses on the identified rule violations. As the results of the analyses, we found that: (1) 60% of the studied code blocks evolve with any rule violations. (2) In the rule violated code blocks, 92% of the code blocks get first rule violation occurrence in the early phase of their evolution. (3) 80% of the rule violated code blocks never fix existing rule violations during their evolution. Our findings suggest that SO should provide a policy which can reduce rule violations in submitted JavaScript code blocks. The findings can also make SO users attend to rule violations when reusing SO JavaScript code blocks. [ABSTRACT FROM AUTHOR]
ISSN:02181940
DOI:10.1142/S0218194022500310