WSEAS Transactions on Information Science and Applications
Print ISSN: 1790-0832, E-ISSN: 2224-3402
Volume 22, 2025
A Machine Learning Approach to Analyze Patterns and Comments in Java Code using Python
Authors: , , , ,
Search Articles
Abstract: This study introduces a detailed methodology to enhance code comprehension by examining comments and blank spaces in the program code. Through the analysis of comments within Java source code, developers can understand if the documentation coverage is efficient. The choice between single-line and multi-line comment type gives an understanding of how programmers chose to communicate information. Analysis of length of comment lines assess the level of details in the documentation. Blank spaces and blank-lines help in evaluating how well the code is structured. Together, these features help in improving the overall coding experience. The integration of the Naive Bayes algorithm refines the system's capabilities, enabling accurate comment classification and length assessment. In conclusion, the proposed system, bolstered by the Naive Bayes algorithm, presents a sophisticated approach to code comprehension and documentation enhancement in software development.
Keywords:
Code comprehension, comments, blank spaces, Java class files, comment length, whitespace analysis, software development, Naive Bayes algorithm
Pages: 665-674
DOI: 10.37394/23209.2025.22.54