Identifying Auto-Generated Code by Using Machine Learning Techniques
Kento Shimonaka, Soichi Sumi, Yoshiki Higo, Shinji Kusumoto
Abstract
Kento Shimonaka, Soichi Sumi, Yoshiki Higo, Shinji Kusumoto
Abstract
Recently, many researchers have conducted mining source code repositories to retrieve useful information about software development. Source code repositories often include auto-generated code, and auto-generated code is usually removed in a preprocessing phase because the presence of auto-generated code is harmful to source code analysis. A usual way to removeauto-generated code is searching particular comments which existamong auto-generated code. However, we cannot identify auto-generated code automatically with such a way if comments have disappeared. In addition, it takes too much time to identify auto-generated code manually. Therefore, we propose a techniqueto identify auto-generated code automatically by using machinelearning techniques. In our proposed technique, we can identifywhether source code is auto-generated code or not by utilizingsyntactic information of source code. In order to evaluate theproposed technique, we conducted experiments on source codegenerated by four kinds of code generators. As a result, weconfirmed that the proposed technique was able to identify auto-generated code with high accuracy.
OpenAlex reports 19 citations for this work. Citation counts describe recorded attention and do not establish research quality.
A contribution statement is not available in the OpenAlex record.
Method details are not available in the OpenAlex metadata.
Findings are not separately available in the OpenAlex metadata.
Limitations are not available in the OpenAlex metadata.
Application details are not available in the OpenAlex metadata.
Recently, many researchers have conducted mining source code repositories to retrieve useful information about software development. Source code repositories often include auto-generated code, and auto-generated code is usually removed in a preprocessing phase because the presence of auto-generated code is harmful to source code analysis. A usual way to removeauto-generated code is searching particular comments which existamong auto-generated code. However, we cannot identify auto-generated code automatically with such a way if comments have disappeared. In addition, it takes too much time to identify auto-generated code manually. Therefore, we propose a techniqueto identify auto-generated code automatically by using machinelearning techniques. In our proposed technique, we can identifywhether source code is auto-generated code or not by utilizingsyntactic information of source code. In order to evaluate theproposed technique, we conducted experiments on source codegenerated by four kinds of code generators. As a result, weconfirmed that the proposed technique was able to identify auto-generated code with high accuracy.
Key concepts: Computer science, KPI-driven code analysis, Source code, Code (set theory), Redundant code, Preprocessor, Code review, Dead code