Towards understanding code readability and its impact on design quality

Readability of code is commonly believed to impact the overall quality of software. Poor readability not only hinders developers from understanding what the code is doing but also can cause developers to make sub-optimal changes and introduce bugs. Developers also recognize this risk and state readability among their top information needs. Researchers have modeled readability scores. However, thus far, no one has investigated how readability evolves over time and how that impacts design quality of software. We perform a large scale study of 49 open source Java projects, spanning 8296 commits and 1766 files. We find that readability is high in open source projects and does not fluctuate over project’s lifetime unlike design quality of a project. Also readability has a non-significant correlation of 0.151 (Kendall’s τ ) with code smell count (indicator of design quality). Since current readability measure is unable to capture the increased difficulty in reading code due to the degraded design quality, our results hint towards the need of a better measurement and modeling of code readability.

[1]  Rajiv D. Banker,et al.  Software complexity and maintenance costs , 1993, CACM.

[2]  James M. Bieman,et al.  How Software Designs Decay: A Pilot Study of Pattern Evolution , 2007, First International Symposium on Empirical Software Engineering and Measurement (ESEM 2007).

[3]  James M. Bieman,et al.  Testing Consequences of Grime Buildup in Object Oriented Design Patterns , 2008, 2008 1st International Conference on Software Testing, Verification, and Validation.

[4]  Maurice H. Halstead,et al.  Elements of software science , 1977 .

[5]  Francesca Arcelli Fontana,et al.  On Investigating Code Smells Correlations , 2011, 2011 IEEE Fourth International Conference on Software Testing, Verification and Validation Workshops.

[6]  Emily Hill,et al.  Mining source code to automatically split identifiers for software analysis , 2009, 2009 6th IEEE International Working Conference on Mining Software Repositories.

[7]  Francesca Arcelli Fontana,et al.  An Experience Report on Using Code Smells Detection Tools , 2011, 2011 IEEE Fourth International Conference on Software Testing, Verification and Validation Workshops.

[8]  Raymond P. L. Buse,et al.  A metric for software readability , 2008, ISSTA '08.

[9]  Mauricio A. Saca Refactoring improving the design of existing code , 2017, 2017 IEEE 37th Central America and Panama Convention (CONCAPAN XXXVII).

[10]  Aiko Fallas Yamashita,et al.  Do developers care about code smells? An exploratory survey , 2013, 2013 20th Working Conference on Reverse Engineering (WCRE).

[11]  David W. Binkley,et al.  Syntactic Identifier Conciseness and Consistency , 2006, 2006 Sixth IEEE International Workshop on Source Code Analysis and Manipulation.

[12]  Forrest Shull,et al.  Investigating the impact of design debt on software quality , 2011, MTD '11.

[13]  Premkumar T. Devanbu,et al.  A simpler model of software readability , 2011, MSR '11.

[14]  Baldoino Fonseca dos Santos Neto,et al.  Using developers' feedback to improve code smell detection , 2015, SAC.

[15]  Václav Rajlich,et al.  Hidden dependencies in program comprehension and change propagation , 2001, Proceedings 9th International Workshop on Program Comprehension. IWPC 2001.

[16]  Thomas Zimmermann,et al.  Information needs for software development analytics , 2012, 2012 34th International Conference on Software Engineering (ICSE).

[17]  Iftekhar Ahmed,et al.  An Empirical Study of Design Degradation: How Software Projects Get Worse over Time , 2015, 2015 ACM/IEEE International Symposium on Empirical Software Engineering and Measurement (ESEM).

[18]  Raed Shatnawi,et al.  An empirical study of the bad smells and class error probability in the post-release object-oriented system evolution , 2007, J. Syst. Softw..

[19]  Gordon Fraser,et al.  Modeling readability to improve unit tests , 2015, ESEC/SIGSOFT FSE.

[20]  Daniela Cruzes,et al.  The evolution and impact of code smells: A case study of two open source systems , 2009, 2009 3rd International Symposium on Empirical Software Engineering and Measurement.

[21]  Robert L. Nord,et al.  Technical Debt: From Metaphor to Theory and Practice , 2012, IEEE Software.

[22]  Aaron Marcus,et al.  Human factors and typography for more readable programs , 1990 .

[23]  Yi Sun,et al.  Some Code Smells Have a Significant but Small Effect on Faults , 2014, TSEM.

[24]  David W. Binkley,et al.  Effective identifier names for comprehension and memory , 2007, Innovations in Systems and Software Engineering.

[25]  Yijun Yu,et al.  Exploring the Influence of Identifier Names on Code Quality: An Empirical Study , 2010, 2010 14th European Conference on Software Maintenance and Reengineering.

[26]  K. K. Aggarwal,et al.  An integrated measure of software maintainability , 2002, Annual Reliability and Maintainability Symposium. 2002 Proceedings (Cat. No.02CH37318).

[27]  Gabriele Bavota,et al.  Detecting bad smells in source code using change history information , 2013, 2013 28th IEEE/ACM International Conference on Automated Software Engineering (ASE).

[28]  Foutse Khomh,et al.  An exploratory study of the impact of antipatterns on class change- and fault-proneness , 2011, Empirical Software Engineering.

[29]  F Arcelli Fontana,et al.  Is it a Real Code Smell to be Removed or not , 2013 .

[30]  Daniela E. Damian,et al.  The promises and perils of mining GitHub , 2009, MSR 2014.