• 中国精品科技期刊
  • CCF推荐A类中文期刊
  • 计算领域高质量科技期刊T1类
高级检索

基于排序损失的ECC多标签代码异味检测方法

王继娜, 陈军华, 高建华

王继娜, 陈军华, 高建华. 基于排序损失的ECC多标签代码异味检测方法[J]. 计算机研究与发展, 2021, 58(1): 178-188. DOI: 10.7544/issn1000-1239.2021.20190836
引用本文: 王继娜, 陈军华, 高建华. 基于排序损失的ECC多标签代码异味检测方法[J]. 计算机研究与发展, 2021, 58(1): 178-188. DOI: 10.7544/issn1000-1239.2021.20190836
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. DOI: 10.7544/issn1000-1239.2021.20190836
Citation: 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. DOI: 10.7544/issn1000-1239.2021.20190836
王继娜, 陈军华, 高建华. 基于排序损失的ECC多标签代码异味检测方法[J]. 计算机研究与发展, 2021, 58(1): 178-188. CSTR: 32373.14.issn1000-1239.2021.20190836
引用本文: 王继娜, 陈军华, 高建华. 基于排序损失的ECC多标签代码异味检测方法[J]. 计算机研究与发展, 2021, 58(1): 178-188. CSTR: 32373.14.issn1000-1239.2021.20190836
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. CSTR: 32373.14.issn1000-1239.2021.20190836
Citation: 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. CSTR: 32373.14.issn1000-1239.2021.20190836

基于排序损失的ECC多标签代码异味检测方法

基金项目: 国家自然科学基金项目(61672355)
详细信息
  • 中图分类号: TP311.5

ECC Multi-Label Code Smell Detection Method Based on Ranking Loss

Funds: This work was supported by the National Natural Science Foundation of China (61672355).
  • 摘要: 代码异味是由糟糕的代码或设计问题引起的一种软件特征,严重影响了软件系统的可靠性和可维护性.在软件系统中,一段代码元素可能同时受到多种代码异味的影响,使得软件质量明显下降.多标签分类适用该情况,将高共现的多个代码异味置于同一标签组,可以更好地考虑代码异味的相关性,但现有的多标签代码异味检测方法未考虑同一段代码元素中多种代码异味检测顺序的影响.对此,提出了一种基于排序损失的集成分类器链(ensemble of classifier chains, ECC)多标签代码异味检测方法,该方法选择随机森林作为基础分类器并采取多次迭代ECC的方式,以排序损失最小化为目标,选择一个较优的标签序列集,优化代码异味检测顺序问题,模拟其生成机理,检测一段代码元素是否同时存在长方法-长参数列表、复杂类-消息链或消息链-过大类这3组代码异味.实验采用9个评价指标,结果表明所提出的检测方法优于现有的多标签代码异味检测方法,F1平均值达97.16%.
    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%.
  • 期刊类型引用(12)

    1. 武家辉,李科研,陈丽新,张家诺,刘帅兵,逯鹏. 神经架构搜索技术研究综述. 计算机应用研究. 2025(01): 11-18 . 百度学术
    2. 刘倩男,闫佳,刘诚. 基于改进MobileNetV3的岩石薄片分类研究. 电脑知识与技术. 2025(07): 26-28 . 百度学术
    3. 吴艳灵,汤宝平,邓蕾,付豪. 低通筛选优化神经架构搜索的风电齿轮箱边缘侧故障诊断方法. 机械工程学报. 2025(07): 361-372 . 百度学术
    4. 宋玉红,沙行勉,诸葛晴凤,许瑞,王寒. RR-SC:边缘设备中基于随机计算神经网络的运行时可重配置框架. 计算机研究与发展. 2024(04): 840-855 . 本站查看
    5. 蒋鹏程,薛羽. 基于排序得分预测的演化神经架构搜索方法. 计算机学报. 2024(11): 2522-2535 . 百度学术
    6. 刘威,郭直清,王东,刘光伟,姜丰,牛英杰,马灵潇. 改进鲸鱼算法及其在浅层神经网络搜索中的权值阈值优化. 控制与决策. 2023(04): 1144-1152 . 百度学术
    7. 鞠翰文,邓扬,李爱群. 桥梁结构挠度-温度-车辆荷载监测数据相关性模型. 振动与冲击. 2023(06): 79-89 . 百度学术
    8. 丁熠,郑伟,耿技,邱泸谊,秦志光. 基于多层级并行神经网络的多模态脑肿瘤图像分割框架. 中国图象图形学报. 2023(07): 2182-2194 . 百度学术
    9. 王上,唐欢容. 一种基于混合粒子群优化算法的深度卷积神经网络架构搜索方法. 计算机应用研究. 2023(07): 2019-2024 . 百度学术
    10. 朱光辉,祁加豪,朱振南,袁春风,黄宜华. 渐进式深度集成架构搜索算法研究. 计算机学报. 2023(10): 2041-2065 . 百度学术
    11. 钟运琴,朱月琴,焦守涛. 边缘大数据分析预测建模方法研究. 高技术通讯. 2022(10): 1067-1075 . 百度学术
    12. 包振山,秘博闻,张文博. 基于人工经验网络架构为初始化的NAS算法. 北京工业大学学报. 2021(08): 854-862 . 百度学术

    其他类型引用(51)

计量
  • 文章访问数:  755
  • HTML全文浏览量:  3
  • PDF下载量:  353
  • 被引次数: 63
出版历程
  • 发布日期:  2020-12-31

目录

    /

    返回文章
    返回