On the Influence of Human Factors for Identifying Code Smells: A Multi-Trial Empirical Study

Context: Code smells are symptoms in the source code that represent poor design choices. Professional developers often perceive several types of code smells as indicators of actual design problems. However, the identification of code smells involves multiple steps that are subjective in nature, requiring the engagement of humans. Human factors are likely to play a key role in the precise identification of code smells in industrial settings. Unfortunately, there is limited knowledge about the influence of human factors on smell identification. Goal: We aim at investigating whether the precision of smell identification is influenced by three key human factors, namely reviewer's professional background, reviewer's module knowledge and collaboration of reviewers during the task. We also aim at deriving recommendations for allocating human resources to smell identification tasks. Method: We performed 19 comparisons among different subsamples from two trials of a controlled experiment conducted in the context of an empirical study on code smell identification. One trial was conducted in industrial settings while the other had involved graduate students. The diversity of the samples allowed us to analyze the influence of the three factors in isolation and in conjunction. Results: We found that (i) reviewers' collaboration significantly increases the precision of smell identification, but (ii) some professional background is required from the reviewers to reach high precision. Surprisingly, we also found that: (iii) having previous knowledge of the reviewed module does not affect the precision of reviewers with higher professional background. However, this factor was influential on successful identification of more complex smells. Conclusion: We expect that our findings are helpful to support researchers in conducting proper experimental procedures in the future. Besides, they may also be useful for supporting project managers in allocating resources for smell identification tasks.

[1]  Rafael Prikladnicki,et al.  Software Kaizen: Using Agile to Form High-Perfomance Software Development Teams , 2014, 2014 Agile Conference.

[2]  Audris Mockus,et al.  Quantifying the Effect of Code Smells on Maintenance Effort , 2013, IEEE Transactions on Software Engineering.

[3]  Nenad Medvidovic,et al.  Are automatically-detected code anomalies relevant to architectural modularity?: an exploratory analysis of evolving systems , 2012, AOSD.

[4]  Cláudio Sant'Anna,et al.  On the Effectiveness of Concern Metrics to Detect Code Smells: An Empirical Study , 2014, CAiSE.

[5]  Aiko Fallas Yamashita,et al.  To what extent can maintenance problems be predicted by code smell detection? - An empirical study , 2013, Inf. Softw. Technol..

[6]  Daniela Cruzes,et al.  Are all code smells harmful? A study of God Classes and Brain Classes in the evolution of three open source systems , 2010, 2010 IEEE International Conference on Software Maintenance.

[7]  Per Runeson,et al.  A quantitative analysis of the unit verification perspective on fault distributions in complex software systems: an operational replication , 2016, Software Quality Journal.

[8]  Eduardo Figueiredo,et al.  A review-based comparative study of bad smell detection tools , 2016, EASE.

[9]  Natalia Juristo Juzgado,et al.  Understanding replication of experiments in software engineering: A classification , 2014, Inf. Softw. Technol..

[10]  Alessandro F. Garcia,et al.  Towards Effective Teams for the Identification of Code Smells , 2017, 2017 IEEE/ACM 10th International Workshop on Cooperative and Human Aspects of Software Engineering (CHASE).

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

[12]  Michel Wermelinger,et al.  Assessing the effect of clones on changeability , 2008, 2008 IEEE International Conference on Software Maintenance.

[13]  Carlos José Pereira de Lucena,et al.  Identifying Code Smells with Collaborative Practices: A Controlled Experiment , 2016, 2016 X Brazilian Symposium on Software Components, Architectures and Reuse (SBCARS).

[14]  Mika Mäntylä,et al.  Bad smells - humans as code critics , 2004, 20th IEEE International Conference on Software Maintenance, 2004. Proceedings..

[15]  Carlos José Pereira de Lucena,et al.  Collaborative Identification of Code Smells: A Multi-Case Study , 2017, 2017 IEEE/ACM 39th International Conference on Software Engineering: Software Engineering in Practice Track (ICSE-SEIP).

[16]  Alessandro F. Garcia,et al.  On the relationship of code-anomaly agglomerations and architectural problems , 2015, Journal of Software Engineering Research and Development.

[17]  Guilherme Horta Travassos,et al.  Investigating Samples Representativeness for an Online Experiment in Java Code Search , 2015, 2015 ACM/IEEE International Symposium on Empirical Software Engineering and Measurement (ESEM).

[18]  Gabriele Bavota,et al.  An experimental investigation on the innate relationship between quality and refactoring , 2015, J. Syst. Softw..

[19]  Gabriele Bavota,et al.  An empirical analysis of the distribution of unit test smells and their impact on software maintenance , 2012, 2012 28th IEEE International Conference on Software Maintenance (ICSM).

[20]  Katsuro Inoue,et al.  c-JRefRec: Change-based identification of Move Method refactoring opportunities , 2017, 2017 IEEE 24th International Conference on Software Analysis, Evolution and Reengineering (SANER).

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

[22]  Andrea De Lucia,et al.  A textual-based technique for Smell Detection , 2016, 2016 IEEE 24th International Conference on Program Comprehension (ICPC).

[23]  Gabriele Bavota,et al.  Do They Really Smell Bad? A Study on Developers' Perception of Bad Code Smells , 2014, 2014 IEEE International Conference on Software Maintenance and Evolution.

[24]  Foutse Khomh,et al.  An Exploratory Study of the Impact of Code Smells on Software Change-proneness , 2009, 2009 16th Working Conference on Reverse Engineering.

[25]  Alessandro F. Garcia,et al.  Detecting architecturally-relevant code anomalies: a case study of effectiveness and effort , 2014, SAC.

[26]  Raed Shatnawi,et al.  An Investigation of Bad Smells in Object-Oriented Design , 2006, Third International Conference on Information Technology: New Generations (ITNG'06).