Method

Posnett

The published three-feature model of Posnett et al. uses source lines, Halstead volume, and byte entropy. We apply its original coefficients without retraining and use the predicted probability of readable code as the score.

Score scale: 0–1; higher is more readable.

Dataset results

DatasetCoverageSpearman ρ
MBJP17/170.5
Buse100/1000.751
Scalabrino200/2000.519
Dorn360/3600.47
Schnappinger300/3040.6
JetBrains119/1190.324
Java transformations1400/1400—
Python transformations1400/1400—