<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE ArticleSet PUBLIC "-//NLM//DTD PubMed 2.7//EN" "https://dtd.nlm.nih.gov/ncbi/pubmed/in/PubMed.dtd">
<ArticleSet>
<Article>
<Journal>
<PublisherName>OICC Press</PublisherName>
<JournalTitle>International Journal of Mathematical Modelling &amp; Computations</JournalTitle>
<Issn>2228-6233</Issn>
<Volume></Volume>
<Issue></Issue>
<PubDate PubStatus="epublish">
<Year>2026</Year>
<Month>07</Month>
<Day>22</Day>
</PubDate>
</Journal>
<ArticleTitle>SpecPatch: Specification-Aware Fault Localization and Constraint-Guided Program Repair for C/C++ Systems</ArticleTitle>
<VernacularTitle></VernacularTitle>
<FirstPage></FirstPage>
<LastPage></LastPage>
<ELocationID EIdType="doi">10.57647/ijm2c.2027.1702.12</ELocationID>
<Language>EN</Language>
<AuthorList>
<Author>
<FirstName>Amir</FirstName>
<LastName>Ghanati</LastName>
<Affiliation>Department of Computer Engineering and Information Technology, Qa.C., Islamic Azad University, Qazvin, Iran</Affiliation>
<Identifier Source="ORCID"></Identifier>
</Author>
<Author>
<FirstName>Saeed</FirstName>
<LastName>Parsa</LastName>
<Affiliation>Department of Computer Engineering, Iran University of Science and Technology, Tehran, Iran</Affiliation>
<Identifier Source="ORCID">https://orcid.org/0000-0003-4381-2773</Identifier>
</Author>
<Author>
<FirstName>Habib</FirstName>
<LastName>Izadkhah</LastName>
<Affiliation>Department of Computer Science, Faculty of Mathematical Sciences, University of Tabriz, Tabriz, Iran</Affiliation>
<Identifier Source="ORCID"></Identifier>
</Author>
</AuthorList>
<PublicationType>Journal Article</PublicationType>
<History>
<PubDate PubStatus="received">
<Year>2026</Year>
<Month>07</Month>
<Day>22</Day>
</PubDate>
</History>
<Abstract>Automated program repair (APR) for C/C++ remains challenging because fault-localization signals are uncertain, candidate spaces are large, validation is costly, and learned, neural, or large language model (LLM)-based repair decisions are often difficult to audit. This paper presents SpecPatch, an uncertainty-aware fuzzy learning-to-rank framework that prioritizes explicit repair-pattern families before candidate generation. Unlike open-ended neural or LLM-based code generation, SpecPatch does not synthesize arbitrary source code. Instead, it represents each suspicious code region using 40 Boolean fault-local and contextual features and ranks 13 auditable abstract syntax tree (AST)-level repair-pattern families, including nine adapted families and four proposed C/C++ patterns: Library-Function Repair, Enum Repair, For-Statement Repair, and Neighbourhood Repair. The central contribution is a fuzzy inference layer that converts overlapping syntactic, data-dependence, control-context, API-call, enumeration, loop-header, and structural-risk evidence into interpretable repair-suitability scores. These scores are fused with pairwise learning-to-rank relevance, while syntactic, type, scope, and structural preconditions remain hard validity constraints. Evaluation on 2,244 held-out pattern-selection samples and a 69-defect C/C++ benchmark shows that the balanced fuzzy-LTR configuration improves rank-aware ordering and reduces search effort. Compared with the LTR-only SpecPatch baseline, it improves Recall@1 from 0.45 to 0.50, Recall@3 from 0.74 to 0.80, and NDCG@5 from 0.78 to 0.84. It also reduces generated candidates from 914 to 620 per defect, compilation attempts from 337 to 238, and mean runtime from 49.38 to 41.70 minutes. Observed differences in plausible and correct-first repairs are reported as secondary outcomes and are not used as the main superiority claim. LLM-based repair is treated as a contextual reference point; the primary contribution of SpecPatch is a complementary, auditable, reproducible, and cost-aware repair-pattern ranking method rather than unrestricted code generation.</Abstract>
<ObjectList>
<Object Type="keyword">
<Param Name="value">Automated program repair</Param>
</Object>
<Object Type="keyword">
<Param Name="value">C/C++</Param>
</Object>
<Object Type="keyword">
<Param Name="value">Fuzzy logic</Param>
</Object>
<Object Type="keyword">
<Param Name="value">Learning to rank</Param>
</Object>
<Object Type="keyword">
<Param Name="value">Interpretable machine learning</Param>
</Object>
<Object Type="keyword">
<Param Name="value">Repair patterns</Param>
</Object>
<Object Type="keyword">
<Param Name="value">Patch ranking</Param>
</Object>
<Object Type="keyword">
<Param Name="value">Program analysis</Param>
</Object>
</ObjectList>
</Article>
</ArticleSet>