YourCoLo: Leveraging One-to-Many Relationships and Inter-Code Connections for User Review-Based Code Localization
In an era where mobile devices are ubiquitous, digital distribution platforms such as the Google Play Store have become integral to our daily lives, hosting millions of applications and serving billions of users. Users can leave reviews to provide developers with valuable feedback, including requests for new features and reports of issues. These user reviews play a crucial role in software development, testing, and maintenance by informing developers about user needs and potential problems, which motivates us to revisit a key problem: given user reviews, how can we automatically identify the relevant code snippets from software codebases to assist developers in addressing the reviews? Existing practices to address this problem typically involve calculating the similarity between user reviews and code snippets. However, we identify three key limitations. First, although existing methods show promising results on individual projects, their high performance cannot be generalized across projects. Second, the state-of-the-art approach models the problem as a one-to-one relationship between a user review and code snippets, ignoring the one-to-many relationship that often exists. Third, the state-of-the-art approach focuses solely on the direct relationship between reviews and code snippets, overlooking the interconnections among code snippets themselves, which contain valuable information that can aid in accurately identifying relevant code. To address these limitations and advance the state of the art, we propose YourCoLo , a novel approach that fully leverages contextual information, one-to-many relationships, and inter-code connections. Specifically, YourCoLo is powered by three novel designs: (1) a prompt-enhanced mechanism to incorporate rich project-level context into code localization, (2) a new loss function designed to handle the one-to-many relationships between user reviews and multiple relevant code snippets, and (3) a ranking strategy that considers interconnections among related code snippets. Our experimental evaluation shows that YourCoLo substantially outperforms state-of-the-art models, surpassing CodeBERT, CodeLlama, and GraphCodeBERT by 18.3, 9.3, and 7.7 percentage points at the method level and by 18.4, 7.7, and 7.0 percentage points at the file level (in terms of mean reciprocal rank). In addition, YourCoLo also achieves improvements of 8.8 percentage points and 6.8 percentage points in mean average precision (MAP) at the method and file levels, respectively, compared to the state-of-the-art method. These results underscore YourCoLo ’s effectiveness and its potential to guide developers more accurately toward the code snippets most pertinent to user feedback.
Authors
- Zhou Yang (ORCID: https://orcid.org/0000-0001-5938-1918)
- Changan Niu (ORCID: https://orcid.org/0000-0003-4358-5451)
- Jidong Ge (ORCID: https://orcid.org/0000-0003-1773-0942)
- David Lo (ORCID: https://orcid.org/0000-0002-4367-7201)
- Bin Luo (ORCID: https://orcid.org/0009-0001-1102-9584)
- Vincent Ng (ORCID: https://orcid.org/0000-0001-8237-429X)
- Chuanyi Li (ORCID: https://orcid.org/0000-0001-9270-5072)
- Yi Feng (ORCID: https://orcid.org/0000-0002-3538-5516)
- Kuo Chi
Institutions
- Singapore Management University (SG)
- University of North Texas at Dallas (US)
- Nanjing University (CN)
Publication Details
- Journal
- ACM Transactions on Software Engineering and Methodology
- Published
- 2025-09-22
- DOI
- https://doi.org/10.1145/3769010
- Primary Topic
- Software Engineering Research
- Type
- article
- Field-Weighted Citation Impact
- 0.00