Fine-tuned encoder-only models such as CodeBERT outperform zero-shot and few-shot LLMs at semantic line-level segmentation of R code, and a new annotated R dataset, StatCodeSeg, is introduced.
Logical Segmentation of Source Code
1 Pith paper cite this work. Polarity classification is still indexing.
abstract
Many software analysis methods have come to rely on machine learning approaches. Code segmentation - the process of decomposing source code into meaningful blocks - can augment these methods by featurizing code, reducing noise, and limiting the problem space. Traditionally, code segmentation has been done using syntactic cues; current approaches do not intentionally capture logical content. We develop a novel deep learning approach to generate logical code segments regardless of the language or syntactic correctness of the code. Due to the lack of logically segmented source code, we introduce a unique data set construction technique to approximate ground truth for logically segmented code. Logical code segmentation can improve tasks such as automatically commenting code, detecting software vulnerabilities, repairing bugs, labeling code functionality, and synthesizing new code.
fields
cs.SE 1years
2025 1verdicts
CONDITIONAL 1representative citing papers
citing papers explorer
-
Semantic Source Code Segmentation using Small and Large Language Models
Fine-tuned encoder-only models such as CodeBERT outperform zero-shot and few-shot LLMs at semantic line-level segmentation of R code, and a new annotated R dataset, StatCodeSeg, is introduced.