Context: Recent studies empirically revealed a relationship between source code comments and code quality. Some studies showed well-written source code comments could be a sign of problematic methods. Other studies also show that source code files with comments confessing a technical debt (called self-admitted technical debt, SATD) could be fixed more times. The former studies only considered the amount of comments, and their findings might be due to a specific type of comments, namely, SATD comments used in the latter studies. Objective: Toclarify the relationship between comments other than SATD comments and code quality. Method: Replicate a part of the latter studies with such comments of methods on four OSS projects. Results: At both the file-level and the method-level, the presence of comments could be related to more code fixings even if the comments were not SATD comments. However, SATD comments were more effective to spot fix-prone files and methods than the non-SATD comments. Conclusions: Source code comments other than SATD comments could still be a sign of problematic code. This study demonstrates a need for further analysis on the contents of comments and its relation to code quality.
CITATION STYLE
Miyake, Y., Amasaki, S., Aman, H., & Yokogawa, T. (2017). A replicated study on relationship between code quality and method comments. In Studies in Computational Intelligence (Vol. 695, pp. 17–30). Springer Verlag. https://doi.org/10.1007/978-3-319-51472-7_2
Mendeley helps you to discover research relevant for your work.