Identifying Auto-Generated Code by Using Machine Learning Techniques

Kento Shimonaka, Soichi Sumi, Yoshiki Higo, Shinji Kusumoto · 2016

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.

Read the paper · More papers on PaperTik