Saved in:
Bibliographic Details
Main Authors: Jia, Yiping, Hassan, Safwat, Zou, Ying
Format: Preprint
Published: 2024
Subjects:
Online Access:https://arxiv.org/abs/2411.19099
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866913590120808448
author Jia, Yiping
Hassan, Safwat
Zou, Ying
author_facet Jia, Yiping
Hassan, Safwat
Zou, Ying
contents With the increasing complexity of large-scale software systems, identifying all necessary modifications for a specific change is challenging. Co-changed methods, which are methods frequently modified together, are crucial for understanding software dependencies. However, existing methods often produce large results with high false positives. Focusing on pull requests instead of individual commits provides a more comprehensive view of related changes, capturing essential co-change relationships. To address these challenges, we propose a learning-to-rank approach that combines source code features and change history to predict and rank co-changed methods at the pull-request level. Experiments on 150 open-source Java projects, totaling 41.5 million lines of code and 634,216 pull requests, show that the Random Forest model outperforms other models by 2.5 to 12.8 percent in NDCG@5. It also surpasses baselines such as file proximity, code clones, FCP2Vec, and StarCoder 2 by 4.7 to 537.5 percent. Models trained on longer historical data (90 to 180 days) perform consistently, while accuracy declines after 60 days, highlighting the need for bi-monthly retraining. This approach provides an effective tool for managing co-changed methods, enabling development teams to handle dependencies and maintain software quality.
format Preprint
id arxiv_https___arxiv_org_abs_2411_19099
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle Enhancing Software Maintenance: A Learning to Rank Approach for Co-changed Method Identification
Jia, Yiping
Hassan, Safwat
Zou, Ying
Software Engineering
With the increasing complexity of large-scale software systems, identifying all necessary modifications for a specific change is challenging. Co-changed methods, which are methods frequently modified together, are crucial for understanding software dependencies. However, existing methods often produce large results with high false positives. Focusing on pull requests instead of individual commits provides a more comprehensive view of related changes, capturing essential co-change relationships. To address these challenges, we propose a learning-to-rank approach that combines source code features and change history to predict and rank co-changed methods at the pull-request level. Experiments on 150 open-source Java projects, totaling 41.5 million lines of code and 634,216 pull requests, show that the Random Forest model outperforms other models by 2.5 to 12.8 percent in NDCG@5. It also surpasses baselines such as file proximity, code clones, FCP2Vec, and StarCoder 2 by 4.7 to 537.5 percent. Models trained on longer historical data (90 to 180 days) perform consistently, while accuracy declines after 60 days, highlighting the need for bi-monthly retraining. This approach provides an effective tool for managing co-changed methods, enabling development teams to handle dependencies and maintain software quality.
title Enhancing Software Maintenance: A Learning to Rank Approach for Co-changed Method Identification
topic Software Engineering
url https://arxiv.org/abs/2411.19099