Computing Reviews

Analyzing program readability based on WordNet
Liu Y., Sun X., Duan Y.  EASE 2015 (Proceedings of the 19th International Conference on Evaluation and Assessment in Software Engineering, Nanjing, China, Apr 27-29, 2015)1-2,2015.Type:Proceedings
Date Reviewed: 08/19/15

Software readability is concerned with how easily source code can be read and understood, which can be of great importance for software maintainability. Considering that comments can play an important role in code understanding, the authors propose a way to evaluate the readability of source code by verifying the agreement between code and comments.

The proposed approach can be described as follows. First, it is necessary to identify and preprocess verbs and nouns obtained from: (1) the names of the methods and of the respective return data types and (2) the comments. The result is code and comments keywords. Second, using a tool called WordNet, the code and comments keywords, respectively from (1) and (2), are compared to verify if they are synonymous.

The possible matches between comments and code keywords are classified according to a defined scale of three points: valid comment, non-recommended comment, and invalid comment. Readability is analyzed through the computation of the ratios among the three kinds of values and using three formulas: (1) global percentage of valid comments, (2) percentage of valid comments for each class, and (3) sum of all from results from (2). The authors consider that readability is lower when the results of (2) or (3) are lower than the result from (1).

To evaluate their approach, the authors applied it to one package of the Jedit source code project and, next, compared the results with the results obtained by human judgment. The results proved to be identical. Strangely, the formulas above were not used.

The approach described in the paper is interesting and deserves attention, but there are some obvious limitations of which the reader should be aware. First, the “non-recommended” scale point was not well defined. Second, as the authors noted, the level of granularity used (the method) can be a limitation. Third, this is a single study and it uses a very limited sample of code. Also, it should be noted that this is an indirect measure of readability; that is, the authors only evaluate a factor that possibly impacts readability. To conclude, it is necessary to wait for more studies using this approach based on tools like WordNet.

Reviewers:  Alberto Sampaio, Isabel Braga Sampaio Review #: CR143703 (1511-0978)

Reproduction in whole or in part without permission is prohibited.   Copyright 2024 ComputingReviews.com™
Terms of Use
| Privacy Policy