Skip to main content
QUICK REVIEW

[Paper Review] Detecting Multiple Semantic Concerns in Tangled Code Commits

Beomsu Koh, Neil E. Walkinshaw|arXiv (Cornell University)|Jan 29, 2026
Software Engineering ResearchComputer Science0 citations
TL;DR

The paper investigates detecting multiple semantic concerns in tangled commits using small language models fine-tuned with LoRA, comparing against GPT-4.1, and showing commit messages significantly aid detection, especially for fine-tuned SLMs.

ABSTRACT

Code commits in a version control system (e.g., Git) should be atomic, i.e., focused on a single goal, such as adding a feature or fixing a bug. In practice, however, developers often bundle multiple concerns into tangled commits, obscuring intent and complicating maintenance. Recent studies have used Conventional Commits Specification (CCS) and Language Models (LMs) to capture commit intent, demonstrating that Small Language Models (SLMs) can approach the performance of Large Language Models (LLMs) while maintaining efficiency and privacy. However, they do not address tangled commits involving multiple concerns, leaving the feasibility of using LMs for multi-concern detection unresolved. In this paper, we frame multi-concern detection in tangled commits as a multi-label classification problem and construct a controlled dataset of artificially tangled commits based on real-world data. We then present an empirical study using SLMs to detect multiple semantic concerns in tangled commits, examining the effects of fine-tuning, concern count, commit-message inclusion, and header-preserving truncation under practical token-budget limits. Our results show that a fine-tuned 14B-parameter SLM is competitive with a state-of-the-art LLM for single-concern commits and remains usable for up to three concerns. In particular, including commit messages improves detection accuracy by up to 44% (in terms of Hamming Loss) with negligible latency overhead, establishing them as important semantic cues.

Motivation & Objective

  • Define and detect multiple semantic concerns within tangled commits as a multi-label classification task.
  • Construct a controlled, synthetic tangled-commit dataset derived from CCS-labeled real-world data.
  • Evaluate the effectiveness and efficiency of small language models (SLMs) versus a large language model (LLM) baseline for multi-label detection.
  • Assess the impact of commit messages, concern count, and token-budget truncation on detection accuracy and latency.

Proposed method

  • Refine Conventional Commits Specification (CCS) into seven targeted types to reduce ambiguity.
  • Create a tangled-commit dataset by synthesizing commits from atomic CCS-labeled data with controlled concern counts (1–5).
  • Fine-tune a 14B-class SLM (Qwen3-14B) using LoRA on the synthetic data and perform on-device inference with deterministic decoding.
  • Develop a structured prompt that separates purpose and object CCS labels and enforces explicit disambiguation rules.
  • Evaluate models (GPT-4.1, Qwen3-14B base, Qwen3-14B LoRA-tuned) on multi-label classification using Hamming Loss and measure end-to-end latency under various input conditions.
  • Analyze the impact of including commit messages, varying concern counts, and header-preserving truncation under token-budget limits.

Experimental results

Research questions

  • RQ1RQ1: How does the number of semantic concerns in a commit affect multi-label detection accuracy and the competitiveness of an SLM versus an LLM?
  • RQ2RQ2: How much do commit messages contribute to detection accuracy compared to diffs alone?
  • RQ3RQ3: How robust is detection accuracy under token-budget constrained diff truncation with a header-preserving policy?
  • RQ4RQ4: How do the same factors affect inference efficiency (latency) for fine-tuned SLMs?

Key findings

  • A fine-tuned 14B SLM remains competitive with an LLM for single-concern commits and usable for up to three concerns.
  • Including commit messages improves detection performance across models, with the largest gains for the fine-tuned SLM.
  • Under header-preserving truncation, reducing token budget has limited effect on accuracy and latency within tested ranges.
  • Commit messages provide semantic cues that substantially aid multi-label detection for the fine-tuned SLM compared to the base model.
  • Multi-concern detection becomes harder as the number of concerns increases, with a larger performance gap between SLMs and GPT-4.1 at higher complexity, though fine-tuning narrows the gap.
  • The authors release a replication package including a synthetic tangled-commit dataset (1750 samples) and LoRA-finetuned models to support future research.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.