diff parsing

Parsing and aggregating low-level edit signals (tokens, lines, hunks) into interpretable code-change units, reconstructing original commit episodes from squashed changes, and identifying file types and edit patterns that drive merge conflicts and other structural issues.

diffparsing

12-Month Skill Trend

Momentum and market value over time
Trending
Score
+20 in 12 mo
96
12 mo agoNow
Career
Value
+$12K in 12 mo
$42K/year
12 mo agoNow

Recommended Survey Paper

Quick overview of the field
View more

Must-Read Papers

Most classic and influential ideas
View more

Brevity is the Soul of Wit: Condensing Code Changes to Improve Commit Message Generation

Sep 19, 2025
HK
Hongyu Kuang
🏛️ Nanjing University | North Carolina State University

Developers often neglect writing high-quality commit messages, hindering code comprehension and maintenance. To address limitations in existing automated approaches—particularly in change representation and organization—this paper proposes a three-part structured textual template comprising a change summary, comment prompts, and key identifiers. We introduce ChangeScribe to generate concise, semantically accurate change summaries and employ heuristic rules to compress code changes into the template. Furthermore, we fine-tune CodeLlama-7B to effectively process this structured input. Our method preserves human readability while substantially unlocking the capabilities of large language models. Evaluated on standard benchmarks, it outperforms six state-of-the-art baselines across all metrics: BLEU-Norm improves by 51.7%, METEOR by 78.7%, and ROUGE-L by 62.5%. These results empirically validate the efficacy of structured compression for commit message generation.

Automating commit message generation for code changesCondensing code changes into concise text templatesImproving readability and quality of generated commit messages

CodeFuse-CommitEval: Towards Benchmarking LLM's Power on Commit Message and Code Change Inconsistency Detection

Nov 24, 2025
QZ
Qingyu Zhang
🏛️ Ant Group | The University of Hong Kong | Tsinghua University | The University of New South Wales

This paper addresses the problem of Message-Change Inconsistency (MCI)—a critical issue where commit messages misrepresent actual code changes—leading to flawed code reviews, degraded maintainability, contamination of empirical software engineering datasets, and obfuscation of security patches. To tackle this, we introduce CodeFuse-CommitEval, the first benchmark dedicated to MCI detection. Methodologically, we propose seven rule-guided strategies for generating diverse inconsistent samples and ensure high data quality via human-in-the-loop and LLM-based dual validation. Leveraging the ApacheCM dataset, we evaluate large language models (LLMs) using three enhancement techniques: few-shot prompting, chain-of-thought reasoning, and extended context windows. Experimental results show that the best-performing model, gpt-oss-20B, achieves 85.95% recall and 80.28% precision on MCI detection. Furthermore, our analysis reveals substantial variation in detection difficulty and contextual dependency across MCI types.

Benchmarking large language models for message-code inconsistency detectionDetecting inconsistencies between commit messages and code changesEvaluating model performance across different types of commit inconsistencies

BDiff: Block-aware and Accurate Text-based Code Differencing

Oct 23, 2025
YL
Yao Lu
🏛️ National University of Defense Technology | The Chinese University of Hong Kong

Existing code diff tools decompose multi-line block-level edits—such as method moves/copies or conditional branch relocations—into fragmented line-level operations, impairing change comprehension. To address this, we propose BDiff, a text-based diff analysis method that supports fine-grained edit operation identification. BDiff is the first to jointly model two categories of block-level edits (move, copy) and five categories of line-level edits (insert, delete, replace, wrap, unwrap). It generates candidate line/block mappings via classical diff algorithms and refines them into an optimal alignment using the Kuhn–Munkres algorithm, minimizing the resulting edit script size. We further implement an interactive web-based visualization tool. Evaluation shows that BDiff significantly outperforms state-of-the-art diff tools—including LLM-based baselines—in edit script quality (accuracy and readability), while maintaining efficient runtime performance and better aligning with developer intent and practical workflow needs.

Identifies block-level edit actions in code changesImproves accuracy over line-based and LLM differencing methodsReduces edit script size while preserving developer intent

This work addresses the limitations of traditional line-based merging algorithms, which often generate spurious conflicts during code refactoring or concurrent editing, and existing syntax- or semantics-aware approaches that suffer from language specificity, formatting loss, and poor cross-file adaptability. The paper proposes Summer, a document-format-agnostic, token-level merging algorithm that decomposes text into universal tokens and models branch changes as string rewrite and move operations. Without relying on language-specific parsers, Summer supports structured edits such as function extraction and inlining. Evaluated on the ConflictBench benchmark, Summer achieves 36% accuracy—the highest among evaluated tools—in precisely reproducing developers’ actual merge outcomes across both Java and non-Java files, while ranking second in semantic correctness, thereby demonstrating the first text-level merging approach that effectively balances generality with semantic awareness.

heterogeneous artifactsmerge conflictsrefactoring

This work addresses the limitation of current large language models for code, which are trained on incomplete Git commit data and lack high-quality corpora that authentically capture developers’ editing behaviors on AI-generated code. To bridge this gap, the authors introduce DECODE, a novel dataset comprising 53.6K fine-grained edit trajectories collected at scale from real-world IDE usage, covering Python, TypeScript, and JavaScript. Analysis reveals that 31% of AI-suggested completions are ultimately deleted in full by developers. A 3B-parameter open-source model fine-tuned on DECODE significantly outperforms state-of-the-art, non-fine-tuned large models on code editing prediction tasks, demonstrating the critical value of developer-centric editing data for enhancing the performance of AI programming assistants.

AI-generated codecode editingdeveloper behavior

Latest Papers

What's happening recently
View more

Existing change impact analysis approaches rely solely on semantic similarity or structural dependencies, limiting their ability to comprehensively identify affected artifacts across heterogeneous software assets such as requirements, configurations, services, and tests. This work proposes a novel, training-free, and interpretable method that uniquely integrates semantic priors with multi-hop graph propagation. Specifically, it constructs a typed heterogeneous graph via static analysis, derives semantic priors from embedding-based cosine similarity, and diffuses impact through a row-normalized, decay-weighted propagation matrix controlled by a single parameter λ to balance precision and recall. Evaluation on five real-world change scenarios in a payment subsystem demonstrates the method’s capability to capture both structurally reachable yet textually disjoint artifacts and semantically related but structurally isolated ones, with demonstrated extensibility to operational assets such as container images and monitoring metrics.

change-impact-analysisheterogeneous-graphsemantic-similarity

This study addresses the challenge that rationales for code changes are often fragmented across multiple sources—such as commit messages, issue reports, and pull requests—making them difficult to fully reconstruct. The work presents the first systematic characterization of this fragmentation and introduces ARGUS, a novel system that leverages large language models (LLMs) to extract fine-grained rationale components—including goals, requirements, and alternative solutions—from heterogeneous documents and synthesize them into concise summaries. Empirical evaluation on 63 real-world commits demonstrates that ARGUS achieves a precision of 51.4% and a recall of 93.2%. Furthermore, user studies confirm that the generated summaries are both accurate and effective in supporting software maintenance tasks such as code review and debugging.

code change rationaledeveloper comprehensionmulti-document extraction

Accurately distinguishing between semantics-preserving and semantics-altering code commits remains an open challenge in software evolution, as existing approaches struggle to identify refactorings entangled with behavioral changes. This work proposes a behavior-comparison-based detection method that leverages large language models to automatically generate both invocation code and test cases for pre- and post-commit versions. By executing these artifacts and comparing cross-version behavioral consistency, the approach determines whether semantic changes have occurred. Notably, it is the first to employ large language models for the joint generation of invocations and tests, effectively disentangling refactoring from functional modifications. Evaluated on 183 manually annotated Java commits, the method achieves an overall accuracy of 76% and perfect precision (100%) in detecting semantic-altering changes.

behavioral differencecode commitssemantic-changing commits

Software source code often harbours"hotspots": small portions of the code that change far more often than the rest of the project and thus concentrate maintenance activity. We mine the complete version histories of 91 evolving, actively developed GitHub repositories and identify 15 recurring line-level hotspot patterns that explain why these hotspots emerge. The three most prevalent patterns are Pinned Version Bump (26%), revealing brittle release practices; Long Line Change (17%), signalling deficient layout; and Formatting Ping-Pong (9%), indicating missing or inconsistent style automation. Surprisingly, automated accounts generate 74% of all hotspot edits, suggesting that bot activity is a dominant but largely avoidable source of noise in change histories. By mapping each pattern to concrete refactoring guidelines and continuous integration checks, our taxonomy equips practitioners with actionable steps to curb hotspots and systematically improve software quality in terms of configurability, stability, and changeability.

change historycode churnmaintenance activity

Although Git tags are commonly regarded as immutable references, they can in fact be altered or deleted via force pushes, thereby jeopardizing build reproducibility and software supply chain security. This study presents the first large-scale empirical analysis of tag mutability across more than 300 million public repositories, leveraging the Software Heritage dataset to identify 10.2 million tag modification events spanning 189,000 repositories. Through cross-validation with the Nixpkgs package management system, the research confirms that seven packages experienced build failures directly attributable to tag changes. The work systematically exposes the non-immutability of Git tags, quantifies their real-world impact, and offers actionable recommendations for improving software integrity and secure development practices.

Git tagsimmutabilityreproducible builds

Hot Scholars

TD

Thomas Degueule

CNRS, LaBRI, Université de Bordeaux
Software EvolutionEmpirical Software EngineeringDomain-Specific Languages
EB

Egor Bogomolov

JetBrains Research
machine learning for software engineering
YG

Yaroslav Golubev

JetBrains Research
OSS licensescode changesrefactoringssoftware ecosystems