Improving code readability models with textual features
The DOI matches its Crossref record; 45 of the 46 references it cites were found in a registry or an index, and 1 are not checked yet.
Abstract
Code reading is one of the most frequent activities in software maintenance; before implementing changes, it is necessary to fully understand source code often written by other developers. Thus, readability is a crucial aspect of source code that may significantly influence program comprehension effort. In general, models used to estimate software readability take into account only structural aspects of source code, e.g., line length and a number of comments. However, source code is a particular form of text; therefore, a code readability model should not ignore the textual aspects of source code encapsulated in identifiers and comments. In this paper, we propose a set of textual features aimed at measuring code readability. We evaluated the proposed textual features on 600 code snippets manually evaluated (in terms of readability) by 5K+ people. The results demonstrate that the proposed features complement classic structural features when predicting code readability judgments. Consequently, a code readability model based on a richer set of features, including the ones proposed in this paper, achieves a significantly higher accuracy as compared to all of the state-of-the-art readability models.
Overview
Integrity signals
Registry
Cites
Statistics
Verification
Claims the paper makes
Claims other papers make about this one
Each is checked against this paper’s own text: does it say what the citing paper says it does?
In the citing paper
“Prior works categorize code features into three dimensions: code naming [64], code format [55], and implementation details [13].”
From What Makes In-Context Examples Effective for Code Generation? (2026) · cites this paper as [64]
In the citing paper
“Prior works indicated that identifier names may largely affect code comprehension for both humans and LLMs [8, 64].”
From What Makes In-Context Examples Effective for Code Generation? (2026) · cites this paper as [64]
In the citing paper
“we refer to prior works focusing on code readability, which propose clear definitions regarding factors contained in code snippets [7, 55, 64], systematically categorize code features into three fundamental dimensions (semantics, format, and implementation details) based on established literature [9, 10, 16, 29, 82], and design mutation operators that comprehensively cover each dimension.”
From What Makes In-Context Examples Effective for Code Generation? (2026) · cites this paper as [64]
Citations
Cites
A Simple Sequentially Rejective Multiple Test Procedure
(1979) · Scandinavian Journal of Statistics · doi:10.2307/4615733 · Cited by 21,526
WordNet: a lexical database for English
Miller, G. A. (1995) · Communications of the ACM · doi:10.1145/219717.219748 · Cited by 14,015 · cited 3×
“For each term in the source code, we measure its number of meanings derived from WordNet [35] .”
MethodInfluentialFlesch, R. (1948) · Journal of Applied Psychology · doi:10.1037/h0057532 · Cited by 5,391 · cited 2×
“Thus, we introduced a feature that calculates the readability of comments (CR) using the Flesch-Kincaid [33] index, commonly used to assess readability of natural language texts.”
MethodCohen, J. (1994) · American Psychologist · doi:10.1037/0003-066x.49.12.997 · Cited by 4,003 · cited 2×
“issue of no statistical significance with large effect size is an artifact of the size of the samples used with the test, which has been reported previously by Cohen [44] and Harlow et al.”
Method5.7 The WORDNET lexical database of English
(2019) · Computer Corpus Lexicography · doi:10.1515/9781474471459-050 · Cited by 1,865
Kleinberg, J. M., & Eva Tardos, D. (2005) · Cited by 1,400
Recovering traceability links between code and documentation
Antoniol, G., Canfora, G., Casazza, G., De Lucia, A., & Merlo, E. (2002) · IEEE Transactions on Software Engineering · doi:10.1109/tse.2002.1041053 · Cited by 967 · cited 1×
“Consequently, identifiers and comments can be used to measure the conceptual cohesion and coupling of classes [18], [19], and to recover traceability links between documentation artifacts (e.g., requirements) and source code (e.g., [20]).”
BackgroundEffect sizes for research: A broad practical approach.
Grissom, R. J., & Kim, J. J. (2005) · Cited by 732
Classifying Software Changes: Clean or Buggy?
Kim, S., Whitehead, & Zhang, Y. (2008) · IEEE Transactions on Software Engineering · doi:10.1109/tse.2007.70773 · Cited by 672 · cited 1×
“We chose accuracy because it is widely used in the literature [46], and in particular for readability metrics [8].”
MethodWhat If There Were No Significance Tests?
(2013) · Psychology Press eBooks · doi:10.4324/9781315827353 · Cited by 667 · cited 1×
“[45]; in fact, the size of the samples used in our tests for each dataset is 10 measurements (note that we performed 10-fold cross validation).”
BackgroundSoftware maintenance and evolution: a roadmap
Bennett, K. H., & Rajlich, V. T. (2000) · Proceedings of the Conference on The Future of Software Engineering · doi:10.1145/336512.336534 · Cited by 606 · cited 1×
“Reading code is the very first step during incremental change [5], [6], [7], which is required to perform concept location, impact analysis, and the corresponding change implementation/propagation.”
BackgroundWhat If There Were No Significance Tests?
(2016) · Routledge eBooks · doi:10.4324/9781315629049 · Cited by 542
Grissom, R. J., & Kim, J. J. (2012) · doi:10.4324/9780203803233 · Cited by 470
Leveraging legacy system dollars for e-business
Erlikh, L. (2000) · IT Professional · doi:10.1109/6294.846201 · Cited by 400 · cited 1×
“In fact, having “great/clean/good/beautiful code” is more important during software evolution and maintenance tasks, because developers spend a lot of time maintaining code (which can be written by others), far more than writing the code from scratch [4].”
BackgroundLearning 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×
“Unfortunately, such a bad practice is quite common since very often developers do not update comments when they maintain source code [26], [27] proposed the first model of software readability and provided evidence that a subjective aspect like TABLE I FEATURES USED BY BUSE AND WEIMER FOR THEIR READABILITY MODEL [7]).”
BackgroundMethodResultInfluentialDeissenboeck, F., & Pizka, M. (2006) · Software Quality Journal · doi:10.1007/s11219-006-9219-1 · Cited by 315
Using the Conceptual Cohesion of Classes for Fault Prediction in Object-Oriented Systems
Marcus, A., Poshyvanyk, D., & Ferenc, R. (2008) · IEEE Transactions on Software Engineering · doi:10.1109/tse.2007.70768 · Cited by 294 · cited 2×
“The lack of cohesion of classes negatively impacts the source code quality and correlates with the number of defects [20].”
BackgroundSelf-citationLarge-scale attribute selection using wrappers
Gutlein, M., Frank, E., Hall, M., & Karwath, A. (2009) · 2009 IEEE Symposium on Computational Intelligence and Data Mining · doi:10.1109/cidm.2009.4938668 · Cited by 264 · cited 2×
“To avoid over-fitting, we performed feature selection using a wrapper strategy [40] available in the Weka machine learning toolbox.”
MethodWhats in a Name? A Study of Identifiers
Lawrie, D., Morrell, C., Feild, H., & Binkley, D. (2006) · 14th IEEE International Conference on Program Comprehension (ICPC'06) · doi:10.1109/icpc.2006.51 · Cited by 248
Combining Formal Concept Analysis with Information Retrieval for Concept Location in Source Code
Poshyvanyk, D., & Marcus, A. (2007) · 15th IEEE International Conference on Program Comprehension (ICPC '07) · doi:10.1109/icpc.2007.13 · Cited by 235 · cited 1×
“Reading code is the very first step during incremental change [5], [6], [7], which is required to perform concept location, impact analysis, and the corresponding change implementation/propagation.”
BackgroundSelf-citationDo Code and Comments Co-Evolve? On the Relation between Source Code and Comment Changes
Fluri, B., Wursch, M., & Gall, H. C. (2007) · 14th Working Conference on Reverse Engineering (WCRE 2007) · doi:10.1109/wcre.2007.21 · Cited by 228 · cited 1×
“Unfortunately, such a practice is quite common since developers often do not update comments when they maintain code [28], [29], [30].”
BackgroundA 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
Mining source code to automatically split identifiers for software analysis
Enslen, E., Hill, E., Pollock, L., & Vijay-Shanker, K. (2009) · 2009 6th IEEE International Working Conference on Mining Software Repositories · doi:10.1109/msr.2009.5069482 · Cited by 170 · cited 2×
“, variables and methods) [11], [12], [13], [15], [16].”
BackgroundHandbook of Parametric and Nonparametric Statistical Procedures: Third Edition
Sheskin, D. J. (2000) · Cited by 165
The Conceptual Coupling Metrics for Object-Oriented Systems
Poshyvanyk, D., & Marcus, A. (2006) · 2006 22nd IEEE International Conference on Software Maintenance · doi:10.1109/icsm.2006.67 · Cited by 159 · cited 1×
“Consequently, identifiers and comments can be used to measure the conceptual cohesion and coupling of classes [20], [21], and to recover traceability links between documentation artifacts (e.”
BackgroundSelf-citationProgram readability: procedures versus comments
Tenny, T. (1988) · IEEE Transactions on Software Engineering · doi:10.1109/32.6171 · Cited by 150 · cited 1×
“While the previous studies pointed out that comments make source code more readable [23], [24], [25], the more recent study by Buse and Weimer [8] showed that the number of commented lines is not an important factor in their readability model.”
ResultRestructuring program identifier names
Caprile, & Tonella (2000) · Proceedings International Conference on Software Maintenance ICSM-94 · doi:10.1109/icsm.2000.883022 · Cited by 147 · cited 2×
“, variables and methods) [11], [12], [13], [15], [16].”
BackgroundCode Quality: The Open Source Perspective
Spinellis, D. D. (2006) · Cited by 146
Modeling readability to improve unit tests
Daka, E., Campos, J., Fraser, G., Dorn, J., & Weimer, W. (2015) · Proceedings of the 2015 10th Joint Meeting on Foundations of Software Engineering · doi:10.1145/2786805.2786838 · Cited by 143 · cited 1×
“[19] proposed a specialized readability model for test cases, which is used to improve the readability of automatically generated test suites.”
MethodIncremental change in object-oriented programming
Rajlich, V., & Gosavi, P. S. (2004) · IEEE Software · doi:10.1109/ms.2004.17 · Cited by 133 · cited 1×
“Reading code is the very first step during incremental change [5], [6], [7], which is required to perform concept location, impact analysis, and the corresponding change implementation/propagation.”
BackgroundBinkley, 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], [31], [32], [33].”
BackgroundEffective identifier names for comprehension and memory
Lawrie, D., Morrell, C. H., Feild, H. A., & Binkley, D. (2007) · Innovations in Systems and Software Engineering · doi:10.1007/s11334-007-0031-2 · Cited by 112 · cited 4×
“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], [31], [32], [33].”
BackgroundInfluentialDeisenbock, F., & Pizka, M. (2005) · 13th International Workshop on Program Comprehension (IWPC'05) · doi:10.1109/wpc.2005.14 · Cited by 98
Code Quality: The Open Source Perspective
Spinellis, D. D. (2006) · Cited by 78
On the Use of Domain Terms in Source Code
Haiduc, S., & Marcus, A. (2008) · 2008 16th IEEE International Conference on Program Comprehension · doi:10.1109/icpc.2008.29 · Cited by 74 · 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], [31], [32], [33].”
BackgroundOn the relationship between comment update practices and Software Bugs
Ibrahim, W. M., Bettenburg, N., Adams, B., & Hassan, A. E. (2011) · Journal of Systems and Software · doi:10.1016/j.jss.2011.09.019 · Cited by 73 · cited 1×
“[27]; the authors mined the history of three”
BackgroundAutomatically Documenting Unit Test Cases
Li, B., Vendome, C., Linares‐Vásquez, M., Poshyvanyk, D., & Kraft, N. A. (2016) · IEEE International Conference on Software Testing, Verification and Validation (ICST) · doi:10.1109/icst.2016.30 · Cited by 65 · cited 1×
“Unfortunately, such a practice is quite common since developers often do not update comments when they maintain code [28], [29], [30].”
BackgroundSelf-citationSyntactic Identifier Conciseness and Consistency
Lawrie, D., Feild, H. A., & Binkley, D. (2006) · IEEE International Working Conference on Source Code Analysis and Manipulation (SCAM) · doi:10.1109/scam.2006.31 · Cited by 63 · cited 3×
“, variables and methods) [11], [12], [13], [15], [16].”
BackgroundImproving computer program readability to aid modification
Elshoff, J. L., & Marcotty, M. (1982) · Communications of the ACM · doi:10.1145/358589.358596 · Cited by 56 · cited 1×
“While the previous studies pointed out that comments make source code more readable [23], [24], [25], the more recent study by Buse and Weimer [8] showed that the number of commented lines is not an important factor in their readability model.”
ResultLabeling source code with information retrieval methods: an empirical study
Lucia, A. D., Penta, M. D., Oliveto, R., Panichella, A., & Panichella, S. (2013) · Empirical Software Engineering · doi:10.1007/s10664-013-9285-5 · Cited by 53 · cited 1×
“, the method body and its comment) are expected to have a very limited verbosity, thus making the application of IR techniques challenging [34].”
MethodSelf-citationBeck, K. L. (2007) · CERN Document Server (European Organization for Nuclear Research) · Cited by 52
Beautiful Code. Leading Programmers Explain How They Think
(2009) · Journal of Workplace Learning · doi:10.1108/13665620910985568 · Cited by 43 · cited 2×
“Beatiful, Clean, Great, or Good code [1], [2], [3] are common expressions that describe the type of code that software developers expect/hope to write or read.”
BackgroundHow do Developers Document Database Usages in Source Code? (N)
Linares‐Vásquez, M., Li, B., Vendome, C., & Poshyvanyk, D. (2015) · IEEE/ACM International Conference on Automated Software Engineering (ASE) · doi:10.1109/ase.2015.67 · Cited by 34 · cited 1×
“Unfortunately, such a practice is quite common since developers often do not update comments when they maintain code [28], [29], [30].”
BackgroundSelf-citationPhysical and conceptual identifier dispersion: Measures and relation to fault proneness
Arnaoudova, V., Eshkevari, L. M., Oliveto, R., Guéhéneuc, Y., & Antoniol, G. (2010) · IEEE International Conference on Software Maintenance (ICSM) · doi:10.1109/icsm.2010.5609748 · Cited by 31
Self-citationIncreasing diversity: Natural language measures for software fault prediction
Binkley, D., Feild, H. A., Lawrie, D., & Pighin, M. (2009) · Journal of Systems and Software · doi:10.1016/j.jss.2009.06.036 · Cited by 28
(2008) · Kybernetes · doi:10.1108/03684920810851258 · Cited by 26
Research works printed but not linked: 4
- Martin, 2009, Clean Code: A Handbook of Agile Sofware Craftsmanship
- Takang, 1996, The effects of comments and identifier names on program comprehensibility: an experiential study, Journal of Program Languages, 4, 143
- Collins american dictionary
- 2007, Handbook of Parametric and Nonparametric Statistical Procedures
Cited by
On Learning Meaningful Code Changes Via Neural Machine Translation
Tufano, M., Pantiuchina, J., Watson, C., Bavota, G., & Poshyvanyk, D. (2019) · 2019 IEEE/ACM 41st International Conference on Software Engineering (ICSE) · doi:10.1109/icse.2019.00021 · Cited by 207
“5) Readability: Readable code is easier to understand and maintain [59].”
BackgroundSelf-citationA comprehensive model for code readability
Scalabrino, S., Linares‐Vásquez, M., Oliveto, R., & Poshyvanyk, D. (2018) · Journal of Software: Evolution and Process · doi:10.1002/smr.1958 · Cited by 110
“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-citationThe effect of poor source code lexicon and readability on developers' cognitive load
Fakhoury, S., Ma, Y., Arnaoudova, V., & Adesope, O. (2018) · IEEE International Conference on Program Comprehension (ICPC) · doi:10.1145/3196321.3196347 · Cited by 159
“Table 1 lists method level metrics that have been shown to correlate with readability and comprehensibility [7, 20, 25, 30, 33], The '+' symbol indicates that a feature is positively correlated with high readability and comprehensibility of the code, and the '-' symbol indicates the opposite.”
BackgroundAutomatically Assessing Code Understandability
Scalabrino, S., Bavota, G., Vendome, C., Linares‐Vásquez, M., Poshyvanyk, D., & Oliveto, R. (2019) · IEEE Transactions on Software Engineering · doi:10.1109/tse.2019.2901468 · Cited by 126
“Scalabrino et al. [14] define Narrow Meaning Identifiers (NMI), Number of Meanings (NM), Identifiers Terms In Dictionary (ITID) and Textual Coherence (TC) to capture the readability of a code snippet.”
BackgroundMethodInfluentialSelf-citationA Large-Scale Empirical Study on Code-Comment Inconsistencies
Wen, F., Nagy, C., Bavota, G., & Lanza, M. (2019) · 2019 IEEE/ACM 27th International Conference on Program Comprehension (ICPC) · doi:10.1109/icpc.2019.00019 · Cited by 105
“On a similar line of research, Scalabrino et al. [9] used the semantic (textual) consistency between source code and comments to assess code readability, conjecturing that the higher this consistency, the higher the readability of the commented code.”
BackgroundResult
Metadata
- Authors
- Scalabrino, S., Linares-Vasquez, M., Poshyvanyk, D., & Oliveto, R.
- Affiliations
- University of Molise (IT)
- William & Mary (US)
- Venue
- 2016 IEEE 24th International Conference on Program Comprehension (ICPC)
- Publisher
- IEEE
- Published
- 2016-05
- Pages
- 1-10
- OpenAlex
- W2463537704
- Semantic Scholar
- 2cfbff01dcdda10fc5743daeaf13eb94fc96e33f
- Cited by
- 114
- References
- 45
- Citations by year
- 2026: 6 · 2025: 7 · 2024: 10 · 2023: 14 · 2022: 15 · 2021: 12 · 2020: 17 · 2019: 15 · 2018: 13 · 2017: 3 · 2016: 2
- FWCI
- 9.34
- Type
- conference paper
- Language
- en
- Open access
- closed
- Locations
- IEEE International Conference on Program Comprehension (ICPC) (publishedVersion)
- Archivio Istituzionale della Ricerca - Università degli Studi del Molise (submittedVersion)
- Topics
- Physical Sciences › Computer Science › Information Systems › Software Engineering Research
- Social Sciences › Linguistics and Language › Text Readability and Simplification
- Physical Sciences › Computer Science › Information Systems › Software Engineering Techniques and Practices
- Keywords
- code readability, text features, readability prediction, program comprehension, software maintenance, identifiers, structural features
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
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.