# Investigating Novice Developers' Code Commenting Trends Using Machine Learning Techniques
## 6 Conclusions  
In this study, initially, we manually classified the source code comments and then presented a machine-learning approach to classify source code comments written by novice developers/students enrolled at Mohammad Ali Jinnah University. This work is inspired by many aspects, such as student metacognition, focusing on internal student processes while writing code; teacher-student feedback activity, introducing automated feedback and reducing teacher dependency; and studying the machine learning approach to code-comment analysis. The results of our study depicted that novice developers/students' comments are mainly related to _Literal_ (26.66%) and _Insufficient_ (26.66%). Further, we proposed and extended a taxonomy of such source code comments by adding a few more categories, i.e., _License_ (5.18%), _Profile_ (4.80%), _Irrelevant_ (4.80%), _Commented Code_ (4.44%),  
Figure 8: The precision and recall for Random Forest and Decision Tree.  
\begin{table}
\begin{tabular}{c c c c c c c} \hline \hline \multicolumn{3}{c}{**Random Forest**} & \multicolumn{5}{c}{**Decision Trees**} \\ \hline  & Precision & Recall & F1-score & Precision & Recall & F1-score \\ \hline Autogenerated & 1 & 0.5 & 0.67 & 1 & 0.5 & 0.67 \\ \hline Commented code & 1 & 0.75 & 0.86 & 1 & 1 & 1 \\ \hline Conceptual & 0.75 & 0.9 & 0.82 & 0.75 & 0.9 & 0.82 \\ \hline Improper & 0 & 0 & 0 & 0 & 0 & 0 \\ \hline Insufficient & 0.86 & 0.95 & 0.9 & 0.9 & 0.95 & 0.92 \\ \hline Irrelevant & 1 & 0.67 & 0.8 & 0.67 & 0.67 & 0.67 \\ \hline License & 1 & 1 & 1 & 1 & 1 & 1 \\ \hline Literal & 0.78 & 0.74 & 0.76 & 0.82 & 0.74 & 0.78 \\ \hline Organizational & 1 & 1 & 1 & 1 & 1 & 1 \\ \hline Profile & 1 & 0.67 & 0.67 & 1 & 0.67 & 0.8 \\ \hline \multicolumn{3}{c}{**Overall Accuracy**} & \multicolumn{5}{c}{**Overall Accuracy**} \\  & 0.84 & \multicolumn{5}{c}{0.85} \\ \hline \hline \end{tabular}
\end{table}
Table 9: The Precision, Recall anf F1-Score for Random Forest and Decision Tree.  
_Autogenerated_ (1.48%), and _Improper_ (1.10%). Moreover, after applying different machine learning algorithms, we found that the _Decision Tree_ has the overall highest accuracy, i.e., 85%, and performed better than other studied techniques. Classification of source code comments is important from the perspective of how students utilize this important code convention in providing the documentation for their programming code. This study helps not only in predicting the type of code comments using the machine learning approach but also can serve as a basis for designing a utility that can be implemented to generate automated feedback for students, thus, saving teachers' time for manual one-on-one feedback, which is a time-consuming activity. The objectives of this study included building a source code parser, designing a taxonomy for the categorization of source code comments, and implementing the different machine learning models and their results and evaluations. The datasets for this research study were not available. Therefore, they were extracted from the raw source code of student programming tasks. The machine learning models performed classification with a reasonably good accuracy of 85%, achieved by _Decision Tree_, and hence, outperformed the other two algorithms.