RefSearch: A Search Engine for Refactoring
- URL: http://arxiv.org/abs/2308.14273v1
- Date: Mon, 28 Aug 2023 03:04:47 GMT
- Title: RefSearch: A Search Engine for Refactoring
- Abstract summary: RefSearch enables users to search for cases through a user-friendly query language.
System collects instances using two detectors and provides a web interface for querying and browsing the cases.
- Score: 1.5519338281670214
- License: http://arxiv.org/licenses/nonexclusive-distrib/1.0/
- Abstract: Developers often refactor source code to improve its quality during software
development. A challenge in refactoring is to determine if it can be applied or
not. To help with this decision-making process, we aim to search for past
refactoring cases that are similar to the current refactoring scenario. We have
designed and implemented a system called RefSearch that enables users to search
for refactoring cases through a user-friendly query language. The system
collects refactoring instances using two refactoring detectors and provides a
web interface for querying and browsing the cases. We used four refactoring
scenarios as test cases to evaluate the expressiveness of the query language
and the search performance of the system. RefSearch is available at
https://github.com/salab/refsearch.
Related papers
- CodeTaste: Can LLMs Generate Human-Level Code Refactorings? [2.447746234944228]
Large language model (LLM) coding agents can generate working code, but their solutions often accumulate complexity, duplication, and architectural debt.<n>Human developers address such issues through: behavior-preserving program that improve structure and maintainability.<n>We present CodeTaste, a benchmark of tasks mined from large-scale multi-file changes in open-source repositories.
arXiv Detail & Related papers (2026-03-04T15:34:18Z) - AlignCoder: Aligning Retrieval with Target Intent for Repository-Level Code Completion [55.21541958868449]
We propose AlignCoder, a repository-level code completion framework.<n>Our framework generates an enhanced query that bridges the semantic gap between the initial query and the target code.<n>We employ reinforcement learning to train an AlignRetriever that learns to leverage inference information in the enhanced query for more accurate retrieval.
arXiv Detail & Related papers (2026-01-27T15:23:14Z) - RefModel: Detecting Refactorings using Foundation Models [2.2670483018110366]
We investigate the viability of using foundation models for detection, implemented in a tool named RefModel.<n>We evaluate Phi4-14B, and Claude 3.5 Sonnet on a dataset of 858 single-operation transformations applied to artificially generated Java programs.<n>In real-world settings, Claude 3.5 Sonnet and Gemini 2.5 Pro jointly identified 97% of all transformations, surpassing the best-performing static-analysis-based tools.
arXiv Detail & Related papers (2025-07-15T14:20:56Z) - Turning the Tide: Repository-based Code Reflection [52.13709676656648]
We introduce LiveRepoReflection, a benchmark for evaluating code understanding and generation in multi-file repository contexts.<n>1,888 rigorously filtered test cases across $6$ programming languages to ensure diversity, correctness, and high difficulty.<n>We also create RepoReflection-Instruct, a large-scale, quality-filtered instruction-tuning dataset derived from diverse sources.
arXiv Detail & Related papers (2025-07-14T02:36:27Z) - Refactoring Codebases through Library Design [21.039476331720312]
We investigate code agents' capacity to code in ways that support growth and reusability.<n>We present both a benchmark and a method for generating reusable libraries.<n>We compare Librarian to state-of-the-art library generation methods, and study it on real-world code bases.
arXiv Detail & Related papers (2025-05-26T07:26:33Z) - Assessing the Bug-Proneness of Refactored Code: A Longitudinal Multi-Project Study [43.65862440745159]
Refactoring is a common practice in software development, aimed at improving the internal code structure in order to make it easier to understand and modify.<n>It is often assumed that makes the code less prone to bugs.<n>However, in practice, is a complex task and applied in different ways. Therefore, certains can inadvertently make the code more prone to bugs.
arXiv Detail & Related papers (2025-05-12T19:12:30Z) - Refactoring Detection in C++ Programs with RefactoringMiner++ [45.045206894182776]
We present RefactoringMiner++, a detection tool based on the current state of the art: RefactoringMiner 3.
While the latter focuses exclusively on Java, our tool is seeded -- to the best of our knowledge -- the first publicly available detection tool for C++ projects.
arXiv Detail & Related papers (2025-02-24T23:17:35Z) - CodeXEmbed: A Generalist Embedding Model Family for Multiligual and Multi-task Code Retrieval [103.116634967815]
We introduce CodeXEmbed, a family of large-scale code embedding models ranging from 400M to 7B parameters.
Our novel training pipeline unifies multiple programming languages and transforms various code-related tasks into a common retrieval framework.
Our 7B model sets a new state-of-the-art (SOTA) in code retrieval, outperforming the previous leading model, Voyage-Code, by over 20% on CoIR benchmark.
arXiv Detail & Related papers (2024-11-19T16:54:45Z) - Diagnosing Refactoring Dangers [0.7036032466145112]
Existing behavior preservation analyses often lack comprehensive insights into rejections and do not provide actionable solutions.
We developed a conceptual model to detect dangers, and created an Eclipse plugin based upon this model, called ReFD.
ReFD evaluates a given code to identify if these potential risks are present, making them actual risks, and employs a verdict mechanism to reduce false positives.
arXiv Detail & Related papers (2024-11-13T14:39:37Z) - RethinkMCTS: Refining Erroneous Thoughts in Monte Carlo Tree Search for Code Generation [71.88883580383039]
We propose RethinkMCTS, a framework that explores and refines the reasoning process for code generation.<n>Specifically, we employ MCTS to search for thoughts before code generation and integrate MCTS with a refinement mechanism called rethink.<n>We demonstrate that RethinkMCTS outperforms previous search-based and feedback-enhanced code generation baselines.
arXiv Detail & Related papers (2024-09-15T02:07:28Z) - In Search of Metrics to Guide Developer-Based Refactoring Recommendations [13.063733696956678]
Motivation is a well-established approach to improving source code quality without compromising its external behavior.
We propose an empirical study into the metrics that study the developer's willingness to apply operations.
We will quantify the value of product and process metrics in grasping developers' motivations to perform.
arXiv Detail & Related papers (2024-07-25T16:32:35Z) - Evaluating Generative Ad Hoc Information Retrieval [58.800799175084286]
generative retrieval systems often directly return a grounded generated text as a response to a query.
Quantifying the utility of the textual responses is essential for appropriately evaluating such generative ad hoc retrieval.
arXiv Detail & Related papers (2023-11-08T14:05:00Z) - State of Refactoring Adoption: Better Understanding Developer Perception
of Refactoring [5.516979718589074]
We aim to explore how developers document their activities during the software life cycle.
We call such activity Self-Affirmed Refactoring (SAR), which indicates developers' documentation of their activities.
We propose an approach to identify whether a commit describes developer-related events to classify them according to the common quality improvement categories.
arXiv Detail & Related papers (2023-06-09T16:38:20Z) - RefBERT: A Two-Stage Pre-trained Framework for Automatic Rename
Refactoring [57.8069006460087]
We study automatic rename on variable names, which is considered more challenging than other rename activities.
We propose RefBERT, a two-stage pre-trained framework for rename on variable names.
We show that the generated variable names of RefBERT are more accurate and meaningful than those produced by the existing method.
arXiv Detail & Related papers (2023-05-28T12:29:39Z) - ReFIT: Relevance Feedback from a Reranker during Inference [109.33278799999582]
Retrieve-and-rerank is a prevalent framework in neural information retrieval.
We propose to leverage the reranker to improve recall by making it provide relevance feedback to the retriever at inference time.
arXiv Detail & Related papers (2023-05-19T15:30:33Z) - Opti Code Pro: A Heuristic Search-based Approach to Code Refactoring [0.0]
The motivation for code could be to improve the design, structure, or implementation of an existing program without changing its functionality.
To solve a very specific problem of coupling and cohesion, we propose using search-based techniques on an approximation of the full code problem.
arXiv Detail & Related papers (2023-05-12T16:39:38Z) - Do code refactorings influence the merge effort? [80.1936417993664]
Multiple contributors frequently change the source code in parallel to implement new features, fix bugs, existing code, and make other changes.
These simultaneous changes need to be merged into the same version of the source code.
Studies show that 10 to 20 percent of all merge attempts result in conflicts, which require the manual developer's intervention to complete the process.
arXiv Detail & Related papers (2023-05-10T13:24:59Z) - How We Refactor and How We Document it? On the Use of Supervised Machine
Learning Algorithms to Classify Refactoring Documentation [25.626914797750487]
Refactoring is the art of improving the design of a system without altering its external behavior.
This study categorizes commits into 3 categories, namely, Internal QA, External QA, and Code Smell Resolution, along with the traditional BugFix and Functional categories.
To better understand our classification results, we analyzed commit messages to extract patterns that developers regularly use to describe their smells.
arXiv Detail & Related papers (2020-10-26T20:33:17Z) - Query Resolution for Conversational Search with Limited Supervision [63.131221660019776]
We propose QuReTeC (Query Resolution by Term Classification), a neural query resolution model based on bidirectional transformers.
We show that QuReTeC outperforms state-of-the-art models, and furthermore, that our distant supervision method can be used to substantially reduce the amount of human-curated data required to train QuReTeC.
arXiv Detail & Related papers (2020-05-24T11:37:22Z)
This list is automatically generated from the titles and abstracts of the papers in this site.
This site does not guarantee the quality of this site (including all information) and is not responsible for any consequences.