STALL+: Boosting LLM-based Repository-level Code Completion with Static Analysis

STALL+: Boosting LLM-based Repository-level Code Completion with Static Analysis

2017-07-17 | Junwei Liu, Yixuan Chen, Mingwei Liu, Xin Peng, Yiling Lou
This paper presents a framework called STALL $ ^{+} $ for integrating static analysis into LLM-based repository-level code completion. The framework supports the integration of static analysis in three phases: prompting, decoding, and post-processing. The study investigates the effectiveness and efficiency of different static analysis integration strategies across these phases. The results show that integrating static analysis in the prompting phase, particularly with file-level dependencies, achieves the best performance, while integration in the post-processing phase performs the worst. The study also finds that static analysis integration complements RAG techniques and is more effective than RAG in repository-level code completion. Additionally, the study shows that integrating static analysis in the prompting phase is the most efficient strategy, and combining it with RAG provides the best cost-effectiveness. The findings suggest that static analysis integration can significantly improve the accuracy of LLM-based repository-level code completion, especially for static languages like Java, while dynamic languages like Python benefit from different integration strategies. The study also highlights the importance of considering the limitations of static analysis when dealing with dynamic languages. Overall, the framework STALL $ ^{+} $ provides a customizable and extendable solution for integrating static analysis into LLM-based repository-level code completion, leading to improved accuracy and efficiency.This paper presents a framework called STALL $ ^{+} $ for integrating static analysis into LLM-based repository-level code completion. The framework supports the integration of static analysis in three phases: prompting, decoding, and post-processing. The study investigates the effectiveness and efficiency of different static analysis integration strategies across these phases. The results show that integrating static analysis in the prompting phase, particularly with file-level dependencies, achieves the best performance, while integration in the post-processing phase performs the worst. The study also finds that static analysis integration complements RAG techniques and is more effective than RAG in repository-level code completion. Additionally, the study shows that integrating static analysis in the prompting phase is the most efficient strategy, and combining it with RAG provides the best cost-effectiveness. The findings suggest that static analysis integration can significantly improve the accuracy of LLM-based repository-level code completion, especially for static languages like Java, while dynamic languages like Python benefit from different integration strategies. The study also highlights the importance of considering the limitations of static analysis when dealing with dynamic languages. Overall, the framework STALL $ ^{+} $ provides a customizable and extendable solution for integrating static analysis into LLM-based repository-level code completion, leading to improved accuracy and efficiency.
Reach us at info@study.space