arrow
返回

DiffSearch: A Scalable and Precise Search Engine for Code Changes

delete2023-04-01
delete3
delete
OA
AI
L
Luca Di Grazia *
P
Paul Bredl
M
Michael Pradel
DOI:10.1109/TSE.2022.3218859delete
delete原文链接
delete原文求助
delete分享
delete收藏
摘要

摘要

En 中文
The source code of successful projects is evolving all the time, resulting in hundreds of thousands of code changes stored in source code repositories. This wealth of data can be useful, e.g., to find changes similar to a planned code change or examples of recurring code improvements. This paper presents DiffSearch, a search engine that, given a query that describes a code change, returns a set of changes that match the query. The approach is enabled by three key contributions. First, we present a query language that extends the underlying programming language with wildcards and placeholders, providing an intuitive way of formulating queries that is easy to adapt to different programming languages. Second, to ensure scalability, the approach indexes code changes in a one-time preprocessing step, mapping them into a feature space, and then performs an efficient search in the feature space for each query. Third, to guarantee precision, i.e., that any returned code change indeed matches the given query, we present a tree-based matching algorithm that checks whether a query can be expanded to a concrete code change. We present implementations for Java, JavaScript, and Python, and show that the approach responds within seconds to queries across one million code changes, has a recall of 80.7% for Java, 89.6% for Python, and 90.4% for JavaScript, enables users to find relevant code changes more effectively than a regular expression-based search and GitHub's search feature, and is helpful for gathering a large-scale dataset of real-world bug fixes.
Keyword:
Codes
Database languages
Search problems
Java
Python
Indexing
Feature extraction
Software engineering
program analysis
software maintenance

期刊

IEEE Transactions on Software Engineering 封面图
IEEE Transactions on Software Engineering
IF:
5.6
论文数:
2.9K
被引数:
1.1W

机构

U
University of Stuttgart
学者数:
1.1W
论文数: 9.4K
被引数: 1.3W
引用论文

引用论文

err分享
err收藏
err
IF0
err
err0
PREAI
err
err分享
err收藏
A Socially Responsible Islamic Finance
err
IF0
err2017-01-01
err0
PREAI
errUmar F. Moghul
err分享
err收藏
Neuroscience research in Africa: Current status
err2016-06-01
err0
errOAAI
errFoad Abd-Allah; Najib Kissani; Anthony William; Mohammed Ibrahim Oraby; Ramez Reda Moustafa; Ehab Shaker; Mohamed Soliman El-Tamawy; Raad Shakir
err分享
err收藏
Best Management Practices and Nutrient Reduction: An Integrated Economic-Hydrologic Model of the Western Lake Erie Basin
err2020-12-18
err0
errOAAI
errHongxing Liu; Wendong Zhang; Elena Irwin; Jeffrey Kast; Noel Aloysius; Jay Martin; Margaret Kalcic
err分享
err收藏
Continental smokers couple mantle degassing and distinctive microbiology within continents
err2016-02-01
err0
errOAAI
errLaura J. Crossey; Karl E. Karlstrom; Brandon Schmandt; Ryan R. Crow; Daniel R. Colman; Brandi Cron; Cristina D. Takacs-Vesbach; Clifford N. Dahm; Diana E. Northup; David R. Hilton; Jason W. Ricketts; Anthony R. Lowry
err分享
err收藏
err
IF0
err
err0
PREAI
err
err分享
err收藏
Enzymatic analysis of total- and HDL-cholesterol: Comparison with the standardized Liebermann-Burchard method used by the lipid research clinics program
err1988-06-01
err0
errOAAI
errPaul S. Bachorik; Donna G. Virgil; Carol Derby; David Widman; Robert McMahon; Robinson P. Fulwood; Trena Ezzati
err分享
err收藏
学者 查看更多内容