Discover the SciOpen Platform and Achieve Your Research Goals with Ease.
Search articles, authors, keywords, DOl and etc.
Block-based visual programming languages enable programmers to focus on programming thinking without excessive coding or syntax attention. We find that projects written in visual programming languages like Scratch also have bugs and code smells that cannot be avoided automatically. Existing studies analyze these problems by converting code into Abstract Syntax Trees (ASTs) before analysis. This process is time-consuming and analyzing the AST directly can be complex. In this paper, we propose a novel code image-based static analysis approach for visual programming languages, which mines code patterns in images to pre-determine whether there are problems in projects without parsing them first. We train a code image object detection network to judge whether the input projects are likely to have bugs or smells. Further analysis is performed only on potentially problematic projects. Based on the proposals of the detection network, we analyze the key areas of the AST and identify the specific code problems. Experiments show that compared with others, our method can quickly determine code problems and accurately locate them. For the code image detection task, the improved model can achieve higher mean average precision (MAP) faster in the training phase, while the model is smaller and faster in inference.
The articles published in this open access journal are distributed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/).
Comments on this article