Journal of Computer Research and Development ›› 2021, Vol. 58 ›› Issue (1): 178-188.doi: 10.7544/issn1000-1239.2021.20190836
Previous Articles Next Articles
Wang Jina, Chen Junhua, Gao Jianhua
Online:
Supported by:
Abstract: Code smell is a software feature of bad code or design problem, which seriously affects the reliability and maintainability of software systems. In a software system, a piece of code element may be affected by multiple code smells at the same time, which makes the quality of the software significantly reduced. Multi-label classification is suitable for this case, by placing multiple code smells with high co-occurrence in one label group, the correlation of code smells can be better considered, but the existing multi-label code smell detection methods do not consider the influence of the code smell detection order in the same code element. As a result, an ECC multi-label code smell detection method based on ranking loss is proposed. This method aims at minimizing ranking loss and chooses an optimal set of label sequences to optimize code smell detection order problem and simulate the mechanism of code smell generation by selecting random forest as the basic classifier and adopting multiple iterations of ECC to detect whether a piece of code element has long method-long parameter list, complex class-message chain or message chain-blob simultaneously. Finally, nine evaluation metrics are used and experimental results show that the proposed method is superior to the existing multi-label code smell detection method with an average F1 of 97.16%.
Key words: code smell, random forest, ranking loss, ensemble of classifier chains (ECC), multi-label classification
CLC Number:
TP311.5
Wang Jina, Chen Junhua, Gao Jianhua. ECC Multi-Label Code Smell Detection Method Based on Ranking Loss[J]. Journal of Computer Research and Development, 2021, 58(1): 178-188.
0 / / Recommend
Add to citation manager EndNote|Reference Manager|ProCite|BibTeX|RefWorks
URL: https://crad.ict.ac.cn/EN/10.7544/issn1000-1239.2021.20190836
https://crad.ict.ac.cn/EN/Y2021/V58/I1/178