Intent-Aware Defect Pattern Extraction from Singular Examples

As software systems grow in complexity, particularly in safety-critical domains, detecting defects early is crucial to prevent severe failures. Among existing automated defect detection methods, rule-based systems excel at catching well-understood mistakes but are hard to generalize beyond their predefined rules. To address this challenge, we introduce DslGen, a novel approach that automatically extracts high-quality defect patterns from singular defect repair examples by leveraging large language models (LLMs). Specifically, it first infers the semantic intent of a defect repair for capturing the defect’s essential characteristics via LLM-powered analysis, then generates precise constraint rules to define the defect pattern. Unlike prior methods, DslGen does not require numerous examples or rigid abstraction schemes, enabling robust generalization even from a single fix. To evaluate the effectiveness of DslGen, we evaluated it in two distinct scenarios: (1) controlled experiments and (2) a simulated real-world defect detection pipeline. In the controlled setting, results show that DslGen outperforms all baselines, achieving a precision up to 81.1% and a recall of over 73.0%. In the simulated scenario, DslGen also performed best with an average improvement of 425.1% over state-of-the-art competitors (including GPT-4o). A user study with 15 experienced developers further confirmed DslGen’s practicality, with participants praising the readability and generalizability of its generated DSLs and expressing strong adoption intent.

Authors

Institutions

Publication Details

Journal
ACM Transactions on Software Engineering and Methodology
Published
2026-06-25
DOI
https://doi.org/10.1145/3820049
Primary Topic
Software Engineering Research
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Intent-Aware Defect Pattern Extraction from Singular Examples

Fengjie Li, Jiajun Jiang, Junjie Chen, Yingfei Xiong et al.
ACM Transactions on Software Engineering and Methodology
Software Engineering Research
article

Intent-Aware Defect Pattern Extraction from Singular Examples

Fengjie Li, Jiajun Jiang, Junjie Chen, Yingfei Xiong, Jiachen Han, Linjie Pan, Bilian Wang, Ruihang Fan
article en

Abstract

As software systems grow in complexity, particularly in safety-critical domains, detecting defects early is crucial to prevent severe failures. Among existing automated defect detection methods, rule-based systems excel at catching well-understood mistakes but are hard to generalize beyond their predefined rules. To address this challenge, we introduce DslGen, a novel approach that automatically extracts high-quality defect patterns from singular defect repair examples by leveraging large language models (LLMs). Specifically, it first infers the semantic intent of a defect repair for capturing the defect’s essential characteristics via LLM-powered analysis, then generates precise constraint rules to define the defect pattern. Unlike prior methods, DslGen does not require numerous examples or rigid abstraction schemes, enabling robust generalization even from a single fix. To evaluate the effectiveness of DslGen, we evaluated it in two distinct scenarios: (1) controlled experiments and (2) a simulated real-world defect detection pipeline. In the controlled setting, results show that DslGen outperforms all baselines, achieving a precision up to 81.1% and a recall of over 73.0%. In the simulated scenario, DslGen also performed best with an average improvement of 425.1% over state-of-the-art competitors (including GPT-4o). A user study with 15 experienced developers further confirmed DslGen’s practicality, with participants praising the readability and generalizability of its generated DSLs and expressing strong adoption intent.

ACM Transactions on Software Engineering and Methodology
Tianjin University (CN), Peking University (CN), Huawei Technologies (China) (CN)
Openalex Percentile: Top 3%
Software Engineering Research
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.