Existing studies solve software engineering tasks using code infilling through LLMC. They utilize context information, which refers to data near the target code of infilling, as input prompts. Although prompts are essential for infilling the target code, current studies use them without analyzing the impact of the representation and scope of context on code infilling. In this study, we analyzed how context representation and scope affect the performance of code infilling. We used XLCost, which contains code, comments, and a function comment for various programming languages. The combination of code and a function comment for context representation yielded the best code infilling performance. Furthermore, we found that the context scope is proportional to performance. Our analysis results can be applied in various tasks that involve code infilling in the future.
No takes yet. Share an insight, caveat, or question.
Heo et al. (2024) studied this question.
Synapse has enriched 5 closely related papers on similar clinical questions. Consider them for comparative context: