<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>improving AI accuracy in bug detection &#8211; Science</title>
	<atom:link href="https://scienmag.com/tag/improving-ai-accuracy-in-bug-detection/feed/" rel="self" type="application/rss+xml" />
	<link>https://scienmag.com</link>
	<description></description>
	<lastBuildDate>Sun, 13 Sep 2026 03:08:42 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.1</generator>

<image>
	<url>https://scienmag.com/wp-content/uploads/2024/07/cropped-scienmag_ico-32x32.jpg</url>
	<title>improving AI accuracy in bug detection &#8211; Science</title>
	<link>https://scienmag.com</link>
	<width>32</width>
	<height>32</height>
</image> 
<site xmlns="com-wordpress:feed-additions:1">73899611</site>	<item>
		<title>Refactoring Trick Supercharges AI Detection of Bad Code, Study Finds</title>
		<link>https://scienmag.com/refactoring-trick-supercharges-ai-detection-of-bad-code-study-finds/</link>
		
		<dc:creator><![CDATA[Blake Davidson]]></dc:creator>
		<pubDate>Sun, 13 Sep 2026 03:08:42 +0000</pubDate>
				<category><![CDATA[Technology and Engineering]]></category>
		<category><![CDATA[AI code smell detection]]></category>
		<category><![CDATA[BERT]]></category>
		<category><![CDATA[class imbalance]]></category>
		<category><![CDATA[code embedding]]></category>
		<category><![CDATA[code refactoring]]></category>
		<category><![CDATA[code smell]]></category>
		<category><![CDATA[code smell dataset augmentation]]></category>
		<category><![CDATA[CodeBERT]]></category>
		<category><![CDATA[data augmentation]]></category>
		<category><![CDATA[deep learning]]></category>
		<category><![CDATA[deep learning in software engineering]]></category>
		<category><![CDATA[enhancing]]></category>
		<category><![CDATA[GraphCodeBERT]]></category>
		<category><![CDATA[improving AI accuracy in bug detection]]></category>
		<category><![CDATA[innovative methods in AI-based code analysis]]></category>
		<category><![CDATA[large language models]]></category>
		<category><![CDATA[machine learning for code quality]]></category>
		<category><![CDATA[neural network class imbalance]]></category>
		<category><![CDATA[software maintenance cost reduction]]></category>
		<category><![CDATA[software quality]]></category>
		<category><![CDATA[software refactoring for AI]]></category>
		<category><![CDATA[structural code weaknesses identification]]></category>
		<category><![CDATA[synthetic training data generation]]></category>
		<category><![CDATA[tackling data scarcity in software AI]]></category>
		<guid isPermaLink="false">https://scienmag.com/?p=201156</guid>

					<description><![CDATA[Turkish researchers show that behavior-preserving code refactoring used to synthesize training data, combined with GraphCodeBERT embeddings, markedly improves deep learning models that detect underrepresented code smells.]]></description>
										<content:encoded><![CDATA[<p>Software has an odor problem, at least metaphorically. So-called code smells—structural weaknesses such as oversized classes, duplicated logic, and tangled methods—are early warning signs that a codebase is rotting from within, and they cost the software industry billions in maintenance and rework every year. Now a research team from Fatih Sultan Mehmet Vakif University and Samsun University in Türkiye reports a surprisingly elegant fix for the Achilles heel of artificial intelligence systems designed to sniff out these flaws: a chronic shortage of labeled training data. In a study published in Knowledge and Information Systems, the researchers show that systematically refactoring code to create new, synthetic training examples can substantially sharpen the accuracy of deep learning classifiers that detect code smells, particularly for the rare smell categories that machine learning models normally fumble.</p>
<p>The core challenge the team tackled is one that haunts deep learning across domains: neural networks are insatiably hungry for large, diverse, well-labeled datasets. In software engineering, that hunger is hard to satisfy. Annotated code smell datasets are scarce, expensive to produce, and heavily skewed—some smell types dominate the labeled examples while others appear only in tiny numbers. Class imbalance of this kind pushes a neural network toward the majority categories, leaving it nearly blind to the minority ones, which are often the most damaging defects. Data augmentation, the technique of programmatically expanding a training set without collecting new real-world samples, has transformed fields like image recognition and natural language processing, but translating it to source code has proven far trickier, because code must remain syntactically valid and semantically faithful after any transformation.</p>
<p>The researchers&#8217; solution leans on a practice every programmer already knows: refactoring, the discipline-preserving rearrangement of code that changes its internal structure without altering its external behavior. Because a refactor is guaranteed to keep a program&#8217;s functionality intact while reshaping its form, it provides a principled way to generate legitimate new training variants of the same code. The team compared two augmentation engines: a rule-based approach that applies classical refactoring operations directly, and a large language model-based approach that uses generative models to produce refactored variants of source code. Crucially, they paired these with a loss penalty, an algorithmic balancing scheme for neural network training that penalizes errors on underrepresented classes more heavily, aiming to counteract the dataset&#8217;s skew from the optimization side as well as the data side.</p>
<p>To represent code in a form a neural network can digest, the team turned to pre-trained transformer models from the BERT family: the original BERT, which treats code as plain text; CodeBERT, which was pre-trained jointly on programming and natural languages; and GraphCodeBERT, which additionally incorporates the data-flow structure of programs during pre-training. Each model converts snippets of source code into dense numerical embeddings—vector fingerprints of a program&#8217;s semantics—which then serve as inputs to the downstream classification network. This embedding stage matters because two pieces of code that differ only in formatting or naming should map to nearby points in the embedding space, and the more structurally aware the embedding model, the more stable that mapping should be under refactoring.</p>
<p>The experimental results delivered a clear verdict. Code refactoring-based augmentation powered by GraphCodeBERT embeddings and large language models measurably enhanced classifier performance, and its benefits were most pronounced precisely where deep learning models are weakest: the imbalanced, underrepresented smell classes. When the team analyzed how the volume of augmented data influenced outcomes, they discovered a pattern of diminishing returns with an important twist. The greatest improvement arrived with the first increments of augmentation applied to minority classes; beyond that point, adding more synthetic examples yielded progressively smaller gains. The impact of augmentation volume also varied depending on the size of the class being boosted, a finding the researchers argue should inform how practitioners budget their augmentation efforts rather than blanket-duplicating synthetic data across all categories.</p>
<p>Equally instructive were the negative results. The loss penalty mechanism, which was expected to amplify the benefit of augmentation by rebalancing training dynamics, had a negligible effect on overall performance—and in some configurations proved actively detrimental. Augmentation based on vanilla BERT and CodeBERT embeddings likewise failed to move the needle or even hurt accuracy in certain settings. The implication is that not all code-aware embeddings are created equal: models that ignore program structure, such as plain BERT, appear unable to fully exploit refactored variants, while GraphCodeBERT&#8217;s data-flow-informed pre-training gives it the structural sensitivity needed to recognize that a refactored snippet and its original are two faces of the same entity.</p>
<p>Beyond the headline results, the study makes a methodological contribution of its own. Evaluating augmentation strategies requires repeatedly testing how performance responds to different volumes of synthetic data across multiple classes, a combinatorially expensive process. To tame this, the team developed a novel weighting strategy that optimizes the evaluation of augmentation volume distribution, cutting the computational overhead of the analysis while preserving its analytical precision. This kind of efficiency matters in practice, because organizations auditing large industrial codebases cannot afford exhaustive, compute-hungry tuning cycles for every detection model they deploy. The weighting scheme, the authors suggest, could become a reusable tool for anyone designing augmentation pipelines for code intelligence systems.</p>
<p>The broader significance of the work lies in what it says about the mechanics of learning from code. The findings reinforce a growing consensus that source code should not be treated as ordinary text. Programs carry rich graph-structured semantics—call graphs, data dependencies, inheritance hierarchies—and augmentation strategies that respect and exploit those structures deliver gains that text-level tricks cannot match. The results align with a wave of recent research on code-specific augmentation, from clone-aware contrastive learning to mixup-based transformations, but they are among the first to systematically quantify the relationship between augmentation volume, class size, and model architecture in the code smell domain, and to do so while comparing rule-based and LLM-based generation head to head.</p>
<p>For software engineering teams, the practical takeaway is immediately actionable. Code smell detection models trained with refactoring-based augmentation and structure-aware embeddings should be more reliable at flagging underrepresented defect patterns—precisely the smells that human reviewers most often miss. Because refactoring transformations are behavior-preserving by construction, the synthetic data they generate avoids the hallucination risks that come with purely generative augmentation, offering a safer middle ground between hand-crafted rules and free-form LLM generation. The researchers have also made their work reproducible, releasing all related source code and data through public repositories on GitHub and Zenodo, lowering the barrier for other teams to adopt and extend the technique.</p>
<p>Looking ahead, the authors suggest that code refactoring-based augmentation could drive the development of more efficient data augmentation strategies not only for code smell classification but for deep learning applications across software engineering more broadly—vulnerability detection, code search, clone detection, and automated repair among them. The lesson generalizes: when real-world labeled data is scarce, the discipline of software engineering itself, with its guarantees of behavioral equivalence, can become the engine that manufactures trustworthy training data. In a field racing to replace human code reviewers with machines, teaching models to see the same code through many refactored lenses may prove one of the most cost-effective ways to give them the experience they need—without a single additional line of manually annotated code.</p>
<p><strong>Subject of Research:</strong> Data augmentation via code refactoring to improve deep learning-based code smell classification.</p>
<p><strong>Article Title:</strong> Enhancing code smell classification with code refactoring-based data augmentation</p>
<p><strong>Article References:</strong> Nizam, A., Aydin, M., Islamoglu, E., Sahmoud, S., &amp; Ozaydin, S. B. (2026). Enhancing code smell classification with code refactoring-based data augmentation. <em>Knowledge and Information Systems, 68</em>(1), Article 254. <a href="https://doi.org/10.1007/s10115-026-02859-2" rel="noopener noreferrer">https://doi.org/10.1007/s10115-026-02859-2</a></p>
<p><strong>Image Credits:</strong> AI Generated</p>
<p><strong>DOI:</strong> <a href="https://doi.org/10.1007/s10115-026-02859-2" rel="noopener noreferrer">10.1007/s10115-026-02859-2</a></p>
<p><strong>Keywords:</strong> code smell, data augmentation, code refactoring, code embedding, GraphCodeBERT, CodeBERT, BERT, large language models, class imbalance, deep learning, software quality, Enhancing</p>
]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">201156</post-id>	</item>
	</channel>
</rss>
