Java依赖异味的实证研究与统一检测技术
作者:
作者单位:

作者简介:

通讯作者:

许畅,E-mail:changxu@nju.edu.cn

中图分类号:

TP311

基金项目:

国家自然科学基金(62141210); 江苏省前沿引领技术基础研究专项(BK20202001)


Empirical Study and Unified Detection Technique of Dependency Smells in Java
Author:
Affiliation:

Fund Project:

  • 摘要
  • |
  • 图/表
  • |
  • 访问统计
  • |
  • 参考文献
  • |
  • 相似文献
  • |
  • 引证文献
  • |
  • 资源附件
  • |
  • 文章评论
    摘要:

    Java语言因丰富的依赖库和便捷的构建工具(如Maven和Gradle)已成为当今最流行的应用项目开发语言之一. 然而, 随着依赖库规模的持续增大, Java项目的依赖管理变得愈益复杂, 也不断超越现有工具的管理能力, 其潜藏问题容易在未预期情况下触发, 严重影响当前项目及所在Java生态中其他项目的构建和运行, 如造成构建错误、运行崩溃或语义冲突等后果. 针对现有调研和技术工作对Java语言依赖管理问题分析不足的缺陷, 提出依赖异味(dependency smell)的概念, 统一建模此类问题, 并对涉及Maven和Gradle构建工具所有类别的依赖管理问题开展大规模实证研究, 分析来自开源社区(如GitHub)、官方文档(如Maven依赖管理手册)和系列调研及技术论文的各类依赖管理问题, 最终总结出13类依赖异味及其触发根源和影响特征等. 基于该实证研究发现, 设计了面向Java项目依赖异味的统一检测算法, 并实现了适配于Maven和Gradle构建工具的专项检测工具JDepAna. 实验结果表明, 对已知依赖异味, JDepAna达到95.9%的检测召回率, 对新的上百个Java项目, JDepAna检测出30689个依赖异味实例, 从中选出360个实例, 人工验证真阳率达到96.1%, 其中, 进一步汇报48个实例给开发者, 42个已被快速确认, 21个已被及时修复, 充分验证了所提出的Java依赖异味检测算法和工具的效果和实用性以及对Java项目质量保障的有效支撑.

    Abstract:

    Java has become one of the most popular programming languages for application project development nowadays, due to its rich dependency libraries and convenient build tools such as Maven and Gradle. However, with the continuous increase in the scale of dependency libraries, the dependency management of Java projects becomes increasingly complex and constantly exceeds the management capabilities of existing tools. The potential problems are likely to be triggered unexpectedly, seriously affecting the building and running of the current project and other projects in the Java ecosystem, such as causing build errors, runtime crashes, or semantic conflicts. This study aims to address the gaps in the analysis of dependency management issues found in existing research and technical literature by introducing the concept of “dependency smell”, to build a unified model for these challenges. This study conducts a comprehensive empirical study on dependency management issues, covering all categories of Maven and Gradle related problems. This study analyzes diverse dependency management issues gathered from open-source communities (e.g., GitHub), official documentation (e.g., Maven manual), as well as various surveys and technical papers. Finally, 13 types of dependency smell, as well as their triggering roots and impact characteristics, are summarized. Based on the findings of this empirical study, a unified detection algorithm for dependency smells in Java projects is designed, and a special detection tool JDepAna suitable for Maven and Gradle build tools is implemented. Experimental results demonstrate that for known dependency smells, JDepAna achieves a detection recall rate of 95.9%. For hundreds of new Java projects, JDepAna detects 30689 instances of dependency smells. 360 instances are selected, and the true positive rate of manual verification reaches 96.1%. Additionally, this study reports 48 instances to developers, with 42 instances promptly confirmed and 21 promptly fixed, thereby validating the efficacy and practicality of the proposed Java dependency smell detection algorithm and tool in facilitating quality assurance for Java projects.

    参考文献
    相似文献
    引证文献
引用本文

孙伟杰,许畅,王莹. Java依赖异味的实证研究与统一检测技术.软件学报,2025,36(7):3041-3086

复制
相关视频

分享
文章指标
  • 点击次数:
  • 下载次数:
  • HTML阅读次数:
  • 引用次数:
历史
  • 收稿日期:2024-08-25
  • 最后修改日期:2024-10-15
  • 录用日期:
  • 在线发布日期: 2024-12-10
  • 出版日期:
文章二维码
您是第位访问者
版权所有:中国科学院软件研究所 京ICP备05046678号-3
地址:北京市海淀区中关村南四街4号,邮政编码:100190
电话:010-62562563 传真:010-62562533 Email:jos@iscas.ac.cn
技术支持:北京勤云科技发展有限公司

京公网安备 11040202500063号