A Study on Cross-Language Static Defect Analysis with Fine-Tuned Large Language Models
摘要
Static analysis is a crucial component of software testing. The realization of static analysis across languages is crucial for enhancing the efficiency of automated software testing. However, existing static analysis tools are limited in terms of supported programming languages, rely on language-specific rules, involve complex configurations, and lack a deep understanding of program context, semantics, and syntax. As a result, they are incapable of performing cross-language static analysis for general coding rules or common defects. As a result, they fail to perform cross-language static analysis based on general rules and common errors. This paper conducts research on the application of fine-tuning LLM to assist in cross-language static defect analysis. We conduct experiments and analyses on six widely used programming languages, evaluating two common types of static errors: array out-of-bounds and defined but unused variables/functions. The experimental results show that fine-tuning effectively improves the efficiency of static analysis and provides a new method for cross-language static error detection.