Abstract
Given the wide adoption of the agile software development paradigm, where efficient collaboration as well as effective maintenance are of utmost importance, the need to produce readable source code is evident. To that end, several research efforts aspire to assess the extent to which a software component is readable. Several metrics and evaluation criteria have been proposed; however, they are mostly empirical or rely on experts who are responsible for determining the ground truth and/or set custom thresholds, leading to results that are context-dependent and subjective. In this work, we employ a large set of static analysis metrics along with various coding violations towards interpreting readability as perceived by developers. Unlike already existing approaches, we refrain from using experts and we provide a fully automated and extendible methodology built upon data residing in online code hosting facilities. We perform static analysis at two levels (method and class) and construct a benchmark dataset that includes more than one million methods and classes covering diverse development scenarios. After performing clustering based on source code size, we employ Support Vector Regression in order to interpret the extent to which a software component is readable against the source code properties: cohesion, inheritance, complexity, coupling, and documentation. The evaluation of our methodology indicates that our models effectively interpret readability as perceived by developers against the above mentioned source code properties.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
References
Buse, R., Weimer, W.: Learning a metric for code readability. IEEE Transactions on Software Engineering 36, 546–558 (07 2010). https://doi.org/10.1109/TSE.2009.70
Choi, S., Kim, S., Kim, J., Park, S.: Metric and tool support for instant feedback of source code readability. Tehnicki vjesnik - Technical Gazette 27(1), 221–228 (2020). 10.17559/tv-20181030091239
Dorn, J.: A general software readability model. Master Thesis, University of Virginia, Department of Computer Science (2012)
Drucker, H., Burges, C.J.C., Kaufman, L., Smola, A.J., Vapnik, V.: Support vector regression machines. In: Mozer, M.C., Jordan, M.I., Petsche, T. (eds.) Advances in Neural Information Processing Systems 9, pp. 155–161. MIT Press (1997), http://papers.nips.cc/paper/1238-support-vector-regression-machines.pdf
Fakhoury, S., Roy, D., Hassan, S.A., Arnaoudova, V.: Improving source code readability: Theory and practice. In: Proceedings of the 27th International Conference on Program Comprehension. p. 2–12. ICPC ’19, IEEE Press (2019). https://doi.org/10.1109/ICPC.2019.00014, https://doi.org/10.1109/ICPC.2019.00014
Halstead, M.H.: Elements of software science (operating and programming systems series). Elsevier Science Inc., USA (1977)
ISO: ISO/IEC 25010. https://iso25000.com/index.php/en/iso-25000-standards/iso-25010 (2020), accessed: 2020–03-20
Karanikiotis, T., Papamichail, M., Gonidelis, I., Karatza, D., Symeonidis, A.: A data-driven methodology towards interpreting readability against software properties. In: ICSOFT. pp. 61–72 (2020). https://doi.org/10.5220/0009891000610072
Knight, J.C., Myers, E.A.: An improved inspection technique. Communications of the ACM 36(11), 50–61 (1993)
Mannan, U.A., Ahmed, I., Sarma, A.: Towards understanding code readability and its impact on design quality. pp. 18–21 (11 2018). https://doi.org/10.1145/3283812.3283820
Pantiuchina, J., Lanza, M., Bavota, G.: Improving code: The (mis) perception of quality metrics. pp. 80–91 (09 2018). https://doi.org/10.1109/ICSME.2018.00017
PMD tool. https://pmd.github.io (2020), [Online; accessed March 2020]
Posnett, D., Hindle, A., Devanbu, P.: A simpler model of software readability. In: Proceedings of the 8th Working Conference on Mining Software Repositories. p. 73–82. MSR ’11, Association for Computing Machinery, New York, NY, USA (2011). DOI: 10.1145/1985441.1985454, https://doi.org/10.1145/1985441.1985454
Prabhu, R., Phutane, N., Dhar, S., Doiphode, S.: Dynamic formatting of source code in editors. In: 2017 International Conference on Innovations in Information, Embedded and Communication Systems (ICIIECS). pp. 1–6 (2017). https://doi.org/10.1109/ICIIECS.2017.8276008
Raymond, D.R.: Reading source code. In: Proceedings of the 1991 Conference on Centre for Advanced Studies on Collaborative Research. pp. 3–16 (1991)
Rousseeuw, P.: Rousseeuw, p.j.: Silhouettes: A graphical aid to the interpretation and validation of cluster analysis. comput. appl. math. 20, 53–65. Journal of Computational and Applied Mathematics 20, 53–65 (11 1987). https://doi.org/10.1016/0377-0427(87)90125-7
Rugaber, S.: The use of domain knowledge in program understanding. Annals of Software Engineering 9, 143–192 (07 2000)
Scalabrino, S., Linares-Vásquez, M., Poshyvanyk, D., Oliveto, R.: Improving code readability models with textual features. In: 2016 IEEE 24th International Conference on Program Comprehension (ICPC). pp. 1–10 (May 2016). https://doi.org/10.1109/ICPC.2016.7503707
Scalabrino, S., Linares-Vásquez, M., Oliveto, R., Poshyvanyk, D.: A comprehensive model for code readability. Journal of Software: Evolution and Process 30(6),(2018)
SourceMeter static analysis tool. https://www.sourcemeter.com/ (2020), [Online; accessed March 2020]
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2021 Springer Nature Switzerland AG
About this paper
Cite this paper
Karanikiotis, T., Papamichail, M.D., Symeonidis, A.L. (2021). Multilevel Readability Interpretation Against Software Properties: A Data-Centric Approach. In: van Sinderen, M., Maciaszek, L.A., Fill, HG. (eds) Software Technologies. ICSOFT 2020. Communications in Computer and Information Science, vol 1447. Springer, Cham. https://doi.org/10.1007/978-3-030-83007-6_10
Download citation
DOI: https://doi.org/10.1007/978-3-030-83007-6_10
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-030-83006-9
Online ISBN: 978-3-030-83007-6
eBook Packages: Computer ScienceComputer Science (R0)