Abstract

AbstractBad smells are bad practices in developing software. These poor solutions significantly influence the understandability and maintainability of source code. Therefore, bad smell detection plays a vital role in the refactoring, maintaining, and measuring the quality of large and complex software systems. Researchers believe that bad smells should be precisely identified and addressed. However, bad smell detection is complicated by issues such as informal and inconsistent specifications of bad smells and high false positive rates in the detection process, all of which affect the success rate in detection. In this paper, we present a new method to detect bad smells in code by addressing the aforementioned issues. Our proposed method is a multi‐step process using software quality metrics and refactoring opportunities. In this method, after obtaining the bad smell formal specifications based on software metrics, we utilize them to achieve a set of candidates for each bad smell. Afterwards, each of the instances will be examined and compared with the corresponding refactoring situations specified for that bad smell. This examination strikes out the false positives created in the previous step. The evaluation of this method on four open‐source systems demonstrates the improved effectiveness of bad smell detection in code.

Full Text
Published version (Free)

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call