# Investigating Novice Developers' Code Commenting Trends Using Machine Learning Techniques
## 5 Results and Discussion  
### RQ-1 Which Kind of Code Activities Are Performed by Novice Students/Developers in the Source Code? In order to answer this research question, we manually analyzed each comment's content and assigned them a suitable category. The category should be a representation of the whole source code comment. Master's students performed this activity for all the source code comments. The student's supervisor and co-supervisor cross-checked the labels to verify this activity. The outcome of this labeling activity was a taxonomy of categories representing different aspects of the source code. According to our results, the source code comments are mainly distributed in the categories such as _Literal_, _Insufficient_, _Conceptual_, _License_, _Profile_, _Irrelevant_, _Commented code_, _Autogenerated_, _Improper_, _and Empty_. The distribution of the dataset according to the \"category\" is reported in Table 4 and Figure 4. We observed that the more frequent source code comment categories in our dataset are _\"Insufficient\" and \"Literal\"_ (1333, 26.66% each). This may be due to students' inability to write better comments as the large proportion of comments falls in the \"Insufficient\" and \"Literal\" categories. The _Literal_ category just restates the source code and does not provide any additional insight into the program logic. Whereas in the _Insufficient_ category, comments either do not provide enough information for understanding or are verbose, i.e., adding no value. Moreover, large numbers of _conceptual_ comments (1111, 22.22%) are present in our dataset, followed by _License_ (259, 5.18%). This makes sense because, generally, students write some _conceptual_ comments to explain the functionality of source code in detail without simply restating the code. _License_ comments are more focused on the terms of use and the licensing of the source code. It usually appears at the top of the source code. Figure 4: Distribution of code-comments data by the type column feature. _Empty_ (41, 0.82%) category source code comments are rare in our dataset. We presume that developers very rarely write \"//\" or does not write any comment on the source code. Furthermore, as discussed, Table 4 depicts the complete taxonomy that is obtained after pre-processing, carefully analyzing, and annotation of the source code comments. The _bold_ category type, frequency, and description are indicated as our _contribution_ as new categories to the existing taxonomy. The new categories of the taxonomy that emerged from our dataset are:  
* **License (259, 5.18%):** License is the code comments that contain information on the terms of use and the licensing of the source code. It usually appears at the top of the source code. * **Profile (240,4.80%):** This comment contains the information of authors and the ownership of the work; it usually begins with the \"@author\" tag. * **Irrelevant (240, 4.80%):** It is not easy to comprehend the meaning of the comment. This type of comment does not describe the associated code. * **Commented code (222, 4.44%):** This category contains all the comments that contain source code which were commented out by the developer. * **Auto-generated (74, 1.48%):** This category contains metadata left behind by an IDE and contains only the skeleton with a placeholder provided by the IDE. * **Improper (55, 1.10%):** This category includes comments that are not properly implemented, e.g., a comment should have an associated code directly below the comment body without any empty lines in between. From the above results, these obtained categories can be used as a checklist for novice developers to check what types of comments developers focus on during software development. It is interesting to note that novice developers frequently mention the _Literal_ type of comments in their source code. This is reasonable because the comments of novice developers are more specific to what they are implementing in their source code.