基于图神经网络的多粒度软件系统交互关系预测
CSTR:
作者:
作者单位:

作者简介:

通讯作者:

中图分类号:

TP311

基金项目:

国家自然科学基金(62032016); 湖北省自然科学基金青年项目(2023AFB374)


Interaction Prediction of Multi-granularity Software System Based on Graph Neural Network
Author:
Affiliation:

Fund Project:

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

    当下, 软件系统中元素间的交互错综复杂, 涵盖了包间、类间和函数间等多种关系. 准确理解这些关系对于优化系统结构以及提高软件质量至关重要. 分析包间关系有助于揭示模块间的依赖性, 有利于开发者更好地管理和组织软件架构; 而类间关系的明晰理解则有助于构建更具扩展性和可维护性的代码库; 清晰了解函数间关系则能够迅速定位和解决程序中的逻辑错误, 提升软件的鲁棒性和可靠性. 然而, 现有的软件系统交互关系预测存在着粒度差异、特征不足和版本变化等问题. 针对这一挑战, 从软件包、类和函数这3种粒度构建相应的软件网络模型, 并提出一种结合局部和全局特征的全新方法, 通过软件网络的特征提取和链路预测方式, 来增强对软件系统的分析和预测. 该方法基于软件网络的构建和处理, 具体步骤包括利用node2vec方法学习软件网络的局部特征, 并结合拉普拉斯特征向量编码以综合表征节点的全局位置信息. 随后, 利用Graph Transformer模型进一步优化节点属性的特征向量, 最终完成软件系统的交互关系预测任务. 在3个Java开源项目上进行广泛的实验验证, 包括版本内和跨版本的交互关系预测任务. 实验结果显示, 相较于基准方法, 所提方法在版本内的预测任务中, 平均AUCAP值分别提升8.2%和8.5%; 在跨版本预测任务中, 平均AUCAP值分别提升3.5%和2.4%.

    Abstract:

    The interactions between elements in contemporary software systems are notably intricate, encompassing relationships between packages, classes, and functions. Accurate comprehension of these relationships is pivotal for optimizing system structures and enhancing software quality. Analyzing inter-package relationships can help unveil dependencies between modules, thereby assisting developers in more effectively managing and organizing software architectures. On the other hand, a clear understanding of inter-class relationships contributes to the creation of code repositories that are more scalable and maintainable. Moreover, a clear understanding of inter-function relationships facilitates rapid identification and resolution of logical errors within programs, consequently enhancing the robustness and reliability of the software. However, current predictions of software system interaction confront challenges such as granularity disparities, inadequate features, and version changes. To address this challenge, this study constructs corresponding software network models based on the three granularities, including software packages, classes, and functions. It introduces a novel approach combining local and global features to reinforce the analysis and prediction of software systems through feature extraction and link prediction of software networks. This approach is based on the construction and handling of software networks, involving specific steps such as leveraging the node2vec method to learn local features of software networks and combining Laplacian feature vector encoding to comprehensively represent the global positional information of nodes. Subsequently, the Graph Transformer model is employed to further optimize the feature vectors of node attributes, culminating in the completion of the interaction prediction task of the software system. Extensive experimental validations are conducted on three Java open-source projects, encompassing within-version and cross-version interaction prediction tasks. The experimental results demonstrate that, compared to benchmark methods, the proposed approach achieves an average increase of 8.2% and 8.5% in AUC and AP values, respectively in within-version prediction tasks. This approach reaches an average rise of 3.5% and 2.4% in AUC and AP values, respectively, in cross-version prediction tasks.

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

邓文涛,程璨,何鹏,陈孟瑶,李兵.基于图神经网络的多粒度软件系统交互关系预测.软件学报,,():1-21

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

京公网安备 11040202500063号