A Naive Approach for Automatic Line-level Code Completion
Coding is an integral aspect of programming. A programmer can automatically complete a code fragment after writing a few tokens and the process of automatically completing a code fragment is known as code completion. A number of research on code completion have previously been conducted for method b...
Saved in:
Published in | IEEE International WIE Conference on Electrical and Computer Engineering (Online) pp. 137 - 142 |
---|---|
Main Authors | , |
Format | Conference Proceeding |
Language | English |
Published |
IEEE
25.11.2023
|
Subjects | |
Online Access | Get full text |
ISSN | 2837-8245 |
DOI | 10.1109/WIECON-ECE60392.2023.10456476 |
Cover
Summary: | Coding is an integral aspect of programming. A programmer can automatically complete a code fragment after writing a few tokens and the process of automatically completing a code fragment is known as code completion. A number of research on code completion have previously been conducted for method body completion and method parameter completion. However, this fundamental study explores the idea of automatically completing any program statement that might not even be part of a method. The goal of this study is to provide a number of suggestions to the programmer for completing code throughout the codebase by identifying and analyzing code similarities. The proposed methodology of this study can be regarded as a fundamental framework for code completion in the field of automated code completion. From the investigation of hundreds of revisions of four subject systems written in C and Java, it is observed that the proposed method can automatically complete around 22% of code statements with an average accuracy of 87% that a programmer writes during development which will accelerate software development time. This paper's empirical analysis further demonstrated that the proposed approach can be used with programming language neutrality. The study concludes by illustrating that taking 10 characters as prefixes before invoking completion provides maximum precision. |
---|---|
ISSN: | 2837-8245 |
DOI: | 10.1109/WIECON-ECE60392.2023.10456476 |