Skip to content
Open access

Test-Free Fault Localization Through Deep Source Code Analysis Using Encoder-Based Language Models

Jul 2026 · Applied Sciences · 0 citations · 20 references

TL;DR

A refined training strategy is presented, leveraging an encoder-based approach, to address two key challenges in FL: (1) the accurate classification of lines of code according to their suspiciousness scores, and (2) the class imbalance inherent in this type of problem.

Abstract

Fault Localization (FL) has evolved with the emergence of the Transformer architecture. Traditionally, FL relied on generating a ranking of suspiciousness scores for each code unit using information obtained during program execution from a set of test cases. However, Language Models trained with source code have enabled approaches that avoid the need for test suites, which are, sometimes, difficult or time-consuming to obtain. In this work, we present a refined training strategy tested on DeBERTa-v3-base, leveraging an encoder-based approach, to address two key challenges in FL: (1) the accurate classification of lines of code according to their suspiciousness scores, and (2) the class imbalance inherent in this type of problem. To this end, we extract the last hidden state corresponding to the embeddings of the new line tokens to generate a suspiciousness score for each line. This score then classifies each line as defective or not. The evaluation of our approach on the ConDefects dataset, repeated over ten random seeds, shows promising results compared to existing approaches, with ROC AUC gains up to 0.27 in cross-dataset comparisons. Thereby, we offer a competitive baseline for future test-free fault localization research while using language models that are approximately 200 times smaller than those used in prior work.

Read PDF

Similar papers

Open access Jul 2026

Leveraging Code Language Models for Code Smells Detection

This study investigates multiple experimental configurations based on CodeBERT, GraphCodeBERT, and CodeT5, including direct transformer-based classification, sliding window processing for long code sequences, and hybrid approaches combining transformer embeddings with classical machine learning classifiers.

Soumia Zellagui, Abderrezak Kenniche, Samiha Fadloun et al. · 0 citations
Open access Aug 2026

Applying Cost-Sensitive Learning to Mitigate the Effect of Class Imbalance for Deep Learning-based Fault Localization

This work proposes applying cost-sensitive learning to set different weights for each sample to optimize the performance of fault localization and demonstrates that applying cost-sensitive learning can effectively alleviate the class imbalance problem in DLFL.

Yue Yan, Shu-Juan Jiang, Yanmei Zhang et al. · 0 citations
Jul 2026

A deep learning framework for vulnerability detection in open-source repositories using code embeddings

A deep learning based framework that can be effectively integrate code embeddings including Word2Vec, TF-IDF representations, and handcrafted contextual features to detect vulnerabilities over multiple Common Weakness Enumeration (CWE) classes is proposed.

Nasika Ijaz, Mehwish Naseer, Usman Qamar · 0 citations

CodeBERT-SENet: Adaptive Syntax-Semantic Fusion via Gated Attention for Python Bug Detection and Localization

This research proposes the first end-to-end multi-task architecture that jointly detects Python syntax errors and localizes their exact line position by adaptively fusing CodeBERT’s semantic embeddings with handcrafted syntactic features via a lightweight gating mechanism, without relying on Abstract Syntax Trees.

Rozali Ilham, Bahtiar Imran, Hasan Basri et al. · 0 citations
Open access Aug 2026

Multilingual Source Code Vulnerability Detection Using Deep Learning: A Semantic Representation and Transfer Learning Approach

This work presents a deep learning approach for multilingual vulnerability detection that emphasizes semantic transfer rather than architectural complexity and suggests that stabilizing semantic representations during transfer is key to improving generalization while maintaining practical efficiency under moderate comp...

Tuan Nguyen Kim, Nin Ho Le Viet, Chieu Ta Quang · 0 citations
Open access 2026

TokenGated-CodeBERT With Lightweight Attention-Based Token Selection for Software Defect Prediction

TokenGated-CodeBERT is proposed, a new methodology designed for scenarios with severe class imbalance that supports full end-to-end training, keeps the original CodeBERT encoder intact, requires no additional auxiliary optimization objectives, and features a lightweight architecture.

Bin Shuai, De-Quan Xu, Yuan-Lin Yang · 0 citations

We use cookies to run the site and, with your consent, for analytics and to show ads. See our Cookie Policy.