Abstract:
"The current tech era is rapidly evolving due to generative AI. The increase in AI- generated code in the industry raises questions about the nature and quality of AI-assisted programming. Especially when the future is headed towards; the majority of code in the world being AIgenerated. Currently developed code analysis tools are built using object-oriented metrics and templates that check against a pre-set of coding rules and guidelines. Majority of the code quality tools developed still have limitations and constraints in their ability and they are built on top of
code that is not AI-generated.
To adapt to the era of generative AI, recent research has demonstrated effectiveness in using deep learning techniques to detect code smells and software vulnerabilities accurately. So the author explores a novel approach to design and execute a CNN trained on AI-generated code. This project would be the first in its nature to apply deep learning in identifying code quality issues particularly with AI-generated code.
The test results indicated that the proposed system successfully detected code quality issues providing accurate predictions with an accuracy of 95% and 94% for the code quality issues ‘AvoidReassigningParameters’ and ‘ForLoopCanBeForEach’ respectively. 82% and 80% accuracy were obtained for ‘MultipleVariableDeclarations’ and the no issues classification along with other well-performing evaluation metrics. This suggests that the proposed architecture achieves outstanding performance in detecting code quality issues in AI-generated code."