CoChat

A comprehensive model for code readability

Scalabrino, Simone, Linares‐Vásquez, Mario, Oliveto, Rocco, Poshyvanyk, Denys · 2018 · Journal of Software: Evolution and Process
Cited by 110

The DOI matches its Crossref record; 8 of the 8 references it cites were found in a registry or an index.

Abstract

Unreadable code could compromise program comprehension, and it could cause the introduction of bugs. Code consists of mostly natural language text, both in identifiers and comments, and it is a particular form of text. Nevertheless, the models proposed to estimate code readability take into account only structural aspects and visual nuances of source code, such as line length and alignment of characters. In this paper, we extend our previous work in which we use textual features to improve code readability models. We introduce 2 new textual features, and we reassess the readability prediction power of readability models on more than 600 code snippets manually evaluated, in terms of readability, by 5K+ people. We also replicate a study by Buse and Weimer on the correlation between readability and FindBugs warnings, evaluating different models on 20 software systems, for a total of 3M lines of code. The results demonstrate that (1) textual features complement other features and (2) a model containing all the features achieves a significantly higher accuracy as compared with all the other state‐of‐the‐art models. Also, readability estimation resulting from a more accurate model, ie, the combined model, is able to predict more accurately FindBugs warnings.

Overview

The claims and statistics of this paper haven’t been checked yet.

Free: it reads the open-access text and checks the first 5 claims that cite a source we can check. Create a free account to check every claim.

A few free checks a day · papers already verified open instantly · results are public

Integrity signals

Registry

Crossref · 10.1002/smr.1958

Cites

8 of 8 references verified0 citation errors · 0 not checkable

Statistics

Verification

Claims the paper makes

The claims and statistics of this paper haven’t been checked yet.

Free: it reads the open-access text and checks the first 5 claims that cite a source we can check. Create a free account to check every claim.

A few free checks a day · papers already verified open instantly · results are public

Self-check

Percentages, sums and reported differences re-computed from the paper’s own numbers.

The self-check needs the paper’s full text.

Citations

Cites

  • WordNet: a lexical database for English

    Miller, G. A. (1995) · Communications of the ACM · doi:10.1145/219717.219748 · Cited by 14,015 · cited 2×

    “41 To compute the feature Number of Meanings for an entire snippet S , it is possible to aggregate the NI(l) values — computed for each line of code l of the snippet — considering the max or the average of such values.”
    BackgroundMethod
  • An algorithm for suffix stripping

    Porter, M. F. (1980) · Program · doi:10.1108/eb046814 · Cited by 8,096 · cited 1×

    “Extract stems from words by using the Porter algorithm [38].”
    Method
  • A new readability yardstick.

    Flesch, R. (1948) · Journal of Applied Psychology · doi:10.1037/h0057532 · Cited by 5,391 · cited 1×

    “Thus, we introduced a feature that calculates the readability of comments (CR) using the Flesch-Kincaid [42] index, commonly used to assess readability of natural language texts.”
    Method
  • The earth is round (p < .05).

    Cohen, J. (1994) · American Psychologist · doi:10.1037/0003-066x.49.12.997 · Cited by 4,003

  • Learning a Metric for Code Readability

    Buse, R. P. L., & Weimer, W. R. (2010) · IEEE Transactions on Software Engineering · doi:10.1109/tse.2009.70 · Cited by 396 · cited 10×

    “• The replication of an empirical study originally performed by Buse and Weimer [8], conducted on 20 software systems, totaling in 3M lines of code, in which we wanted to check if readability predicted by a model which achieves higher accuracy (i.”
    BackgroundMethodResultInfluential
  • A simpler model of software readability

    Posnett, D., Hindle, A., & Devanbu, P. (2011) · Proceedings of the 8th Working Conference on Mining Software Repositories · doi:10.1145/1985441.1985454 · Cited by 182 · cited 8×

    “In summary, given the 200 methods in mi ∈ Dnew and nine human taggers tj ∈ T , we collected readability rankings r(mi, tj),∀i,j , i ∈ [1, 200], j ∈ [1, 9].”
    BackgroundMethodInfluential
  • To camelcase or under_score

    Binkley, D., Davis, M., Lawrie, D., & Morrell, C. (2009) · 2009 IEEE 17th International Conference on Program Comprehension · doi:10.1109/icpc.2009.5090039 · Cited by 115 · cited 1×

    “Well-commented source code and high-quality identifiers, carefully chosen and consistently used in their contexts, are likely to improve program comprehension and support developers in building consistent and coherent conceptual models of the code [11, 12, 17, 34, 35, 36].”
    Background
  • Improving code readability models with textual features

    Scalabrino, S., Linares-Vasquez, M., Poshyvanyk, D., & Oliveto, R. (2016) · 2016 IEEE 24th International Conference on Program Comprehension (ICPC) · doi:10.1109/icpc.2016.7503707 · Cited by 114 · cited 6×

    “With respect to our previous study, 18 we increased the “ search termination ” parameter from 5 to 10, in order to search more deeply in the possible features subsets.”
    BackgroundMethodResultInfluentialSelf-citation

Show all 8 references

Cited by

See all 110

Metadata

Authors
Scalabrino, S., Linares‐Vásquez, M., Oliveto, R., & Poshyvanyk, D.
Venue
Journal of Software: Evolution and Process
Publisher
Wiley
Published
2018-06
Volume
30
Issue
6
ISSN
  • 2047-7473 (ISSN-L)
  • 2047-7481
OpenAlex
W2889391561
Cited by
110
References
8
FWCI
15.27
Type
journal article
Language
en
Open access
closed

About these checks

Registry, retraction, Cites and statistics results are computed, not judged, with one exception: a printed reference that no index lists is read once by a model before it counts as a citation error. Claims are extracted by a model and kept only when their quote appears verbatim in the text; each cited source is then checked, with a model’s help, for whether it says what the claim relies on. Those verdicts can be wrong — read the claim’s quote and the cited source before relying on one.

Statistics and arithmetic are recomputed, not judged.

Confidence bands are shown only for fields calibrated on our annotated test set. None is calibrated yet, so no band is shown.

What counts as a claim ›How we measure confidence ›How we check this ›

Are you an author, or do you see a problem with this page? Request a review

How to cite

Cite CoChat for the checks on this page, and the paper for its own findings.

This page
CoChat. (2026). Citation check: A comprehensive model for code readability. https://app.cochat.ai/papers/10.1002/smr.1958
The paper
Scalabrino, S., Linares‐Vásquez, M., Oliveto, R., & Poshyvanyk, D. (2018). A comprehensive model for code readability. Journal of Software: Evolution and Process. https://doi.org/10.1002/smr.1958

Data sources

Bibliographic data: Semantic Scholar, OpenAlex, Crossref.

Contains information from the Semantic Scholar Academic Graph Datasets, made available under the ODC Attribution License (ODC-BY 1.0).

Semantic Scholar’s data is described in: Kinney, R., et al. (2023). The Semantic Scholar Open Data Platform. arXiv:2301.10140.