Automated Program Repair (APR) is a technique that can effectively reduce the cost of the software development process. APR is generally composed of two stages: fault localization and patch generation. Recently, research on APR has been actively condu...
Automated Program Repair (APR) is a technique that can effectively reduce the cost of the software development process. APR is generally composed of two stages: fault localization and patch generation. Recently, research on APR has been actively conducted by leveraging Code Pretrained Language Model (CodePLM). Within this context, this paper conducts two studies. First, existing studies that fine-tune CodePLMs for APR mainly focus on patch generation and do not address fault localization and patch generation in an integrated manner. However, in realistic scenarios, a model should be capable of handling both tasks jointly. To this end, this paper proposes a fine-tuning methodology that performs fault localization and patch generation simultaneously, and applies it to encoder-based, decoder-based, and encoder-decoder-based models to analyze their performance. Exeperimental results show that the proposed methodology achieves the best performance with the encoder-decoder-based model, and further confirmed the critical role of fault localization. Second, motivated by the observation that different layers of language models capture information at different levels and with different characteristics, a fine-tuning methodology that utilizes early layers has been proposed for code classification tasks. While this approach has shown performance improvements in bug detection tasks, its effectiveness for fault localization—an area closely related to bug detection—has not yet been explored. Accordingly, this paper analyzes whether the early layers of CodePLMs are effective for fault localization. Experimental results indicate that performance improvements are not consistently observed and that the magnitude of improvement is limited, suggesting that this approach is not effective. In summary, although strong fault localization capability is essential for jointly performing fault localization and patch generation, the results suggest that current CodePLMs have inherent limitations in sufficiently capturing the information required for accurate fault localization.