Affect Recognition in Code Review: An In-situ Biometric Study of Reviewer's Affect

Abstract Code reviews are an important practice in software development that increases team productivity and improves product quality. They are also examples of remote, computer-mediated asynchronous communications which are prone to the loss of affective information. Prior research has focused on sentiment analysis in source codes, as positive affect has been linked to developer productivity. Although methods of sentiment analysis have advanced, challenges remain due to numerous domain-specific expressions, subtle nuance, and indications of sentiment. In this paper, we uncover the potential for 1) nonverbal behavioral signals such as conventional typing, and 2) indirect physiological measures (eye gaze, GSR, touch pressure) to reveal genuine affective states in in situ code review in a large software company. Nonverbal behavioral signals of 33 professional software developers were recorded unobtrusively while they worked on their daily code reviews. After analyzing these signals using Linear Mixed Effect Models, we observe that affect presented in the written comments is associated with prolonged typing duration. Using physiological features, a trained Random Forest classifier can predict post-task valence with 90.0% accuracy (F1-score = 0.937) and arousal with 83.9% accuracy (F1-score = 0.856). The results show promise for the creation of intelligent affect-aware interfaces for code review.

[1]  Michael E. Fagan Design and Code Inspections to Reduce Errors in Program Development , 1976, IBM Syst. J..

[2]  Akito Monden,et al.  Analyzing individual performance of source code review using reviewers' eye movement , 2006, ETRA.

[3]  Pekka Abrahamsson,et al.  What happens when software developers are (un)happy , 2017, J. Syst. Softw..

[4]  Kristof Van Laerhoven,et al.  Labelling Affective States "in the Wild": Practical Guidelines and Lessons Learned , 2018, UbiComp/ISWC Adjunct.

[5]  Audris Mockus,et al.  An Empirical Study of Speed and Communication in Globally Distributed Software Development , 2003, IEEE Trans. Software Eng..

[6]  Miikka Kuutila,et al.  Using experience sampling to link software repositories with emotions and work well-being , 2018, ESEM.

[7]  Nicole Novielli,et al.  Sentiment Polarity Detection for Software Development , 2017, Empirical Software Engineering.

[8]  James D. Herbsleb,et al.  Object-Oriented Analysis and Design in Software Project Teams , 1995, Hum. Comput. Interact..

[9]  Thomas Fritz,et al.  Stuck and Frustrated or in Flow and Happy: Sensing Developers' Emotions and Progress , 2015, 2015 IEEE/ACM 37th IEEE International Conference on Software Engineering.

[10]  Emer P. Doheny,et al.  SHIMMER™: An extensible platform for physiological signal capture , 2010, 2010 Annual International Conference of the IEEE Engineering in Medicine and Biology.

[11]  Kenneth Holmqvist,et al.  Eye tracking: a comprehensive guide to methods and measures , 2011 .

[12]  Rosalind W. Picard Affective Computing for HCI , 1999, HCI.

[13]  Agostino Gibaldi,et al.  Evaluation of the Tobii EyeX Eye tracking controller and Matlab toolkit for research , 2016, Behavior Research Methods.

[14]  Anindya Iqbal,et al.  SentiCR: A customized sentiment analysis tool for code review interactions , 2017, 2017 32nd IEEE/ACM International Conference on Automated Software Engineering (ASE).

[15]  Monica A. Riordan,et al.  Overconfidence at the Keyboard: Confidence and Accuracy in Interpreting Affect in E‐Mail Exchanges , 2017 .

[16]  Nicole Novielli,et al.  Confusion in Code Reviews: Reasons, Impacts, and Coping Strategies , 2019, 2019 IEEE 26th International Conference on Software Analysis, Evolution and Reengineering (SANER).

[17]  Gaël Varoquaux,et al.  Scikit-learn: Machine Learning in Python , 2011, J. Mach. Learn. Res..

[18]  Sidney K. D'Mello,et al.  A Review and Meta-Analysis of Multimodal Affect Detection Systems , 2015, ACM Comput. Surv..

[19]  Hillary Anger Elfenbein,et al.  On the universality and cultural specificity of emotion recognition: a meta-analysis. , 2002, Psychological bulletin.

[20]  Andrew Begel,et al.  Using psycho-physiological measures to assess task difficulty in software development , 2014, ICSE.

[21]  Kelly Blincoe,et al.  Socio-Technical Work-Rate Increase Associates With Changes in Work Patterns in Online Projects , 2019, 2019 IEEE/ACM 41st International Conference on Software Engineering (ICSE).

[22]  Paul Johns,et al.  MoodTracker: Monitoring collective emotions in the workplace , 2015, 2015 International Conference on Affective Computing and Intelligent Interaction (ACII).

[23]  Nicole Novielli,et al.  A Benchmark Study on Sentiment Analysis for Software Engineering Research , 2018, 2018 IEEE/ACM 15th International Conference on Mining Software Repositories (MSR).

[24]  Michal R. Wróbel,et al.  Emotions in the software development process , 2013, 2013 6th International Conference on Human System Interactions (HSI).

[25]  Mika V. Mäntylä,et al.  The evolution of sentiment analysis - A review of research topics, venues, and top cited papers , 2016, Comput. Sci. Rev..

[26]  M. A. Rowe,et al.  Guide for Analysing Electrodermal Activity & Skin Conductance Responses for Psychological Experiments , 2013 .

[27]  Munmun De Choudhury,et al.  Understanding affect in the workplace via social media , 2013, CSCW.

[28]  Michael E. Fagan Design and Code Inspections to Reduce Errors in Program Development (Reprint) , 2002, Software Pioneers.

[29]  E. Vesterinen,et al.  Affective Computing , 2009, Encyclopedia of Biometrics.

[30]  S. Hart,et al.  Development of NASA-TLX (Task Load Index): Results of Empirical and Theoretical Research , 1988 .

[31]  Karin Ackermann,et al.  The Nature Of Emotion Fundamental Questions , 2016 .

[32]  Fei Peng,et al.  An Eye Tracking Research on Debugging Strategies towards Different Types of Bugs , 2016, 2016 IEEE 40th Annual Computer Software and Applications Conference (COMPSAC).

[33]  Jil Klünder,et al.  Positive affect through interactions in meetings: The role of proactive and supportive statements , 2018, J. Syst. Softw..

[34]  Songbo Tan,et al.  A survey on sentiment detection of reviews , 2009, Expert Syst. Appl..

[35]  Akane Sano,et al.  Designing opportune stress intervention delivery timing using multi-modal data , 2017, 2017 Seventh International Conference on Affective Computing and Intelligent Interaction (ACII).

[36]  R Core Team,et al.  R: A language and environment for statistical computing. , 2014 .

[37]  Samuel Kaski,et al.  Extracting relevance and affect information from physiological text annotation , 2016, User Modeling and User-Adapted Interaction.

[38]  Prasun Dewan,et al.  Towards Emotion-Based Collaborative Software Engineering , 2015, 2015 IEEE/ACM 8th International Workshop on Cooperative and Human Aspects of Software Engineering.

[39]  Leif Singer,et al.  How Social and Communication Channels Shape and Challenge a Participatory Culture in Software Development , 2017, IEEE Transactions on Software Engineering.

[40]  John P. Pollak,et al.  PAM: a photographic affect meter for frequent, in situ measurement of affect , 2011, CHI.

[41]  Nicole Novielli,et al.  Communicative Intention in Code Review Questions , 2018, 2018 IEEE International Conference on Software Maintenance and Evolution (ICSME).

[42]  Gaël Varoquaux,et al.  The NumPy Array: A Structure for Efficient Numerical Computation , 2011, Computing in Science & Engineering.

[43]  Nitesh V. Chawla,et al.  SMOTE: Synthetic Minority Over-sampling Technique , 2002, J. Artif. Intell. Res..

[44]  Joseph T. Coyne,et al.  Investigating the Use of Two Low Cost Eye Tracking Systems for Detecting Pupillary Response to Changes in Mental Workload , 2016 .

[45]  D. Bates,et al.  Fitting Linear Mixed-Effects Models Using lme4 , 2014, 1406.5823.

[46]  D. Watson,et al.  Development and validation of brief measures of positive and negative affect: the PANAS scales. , 1988, Journal of personality and social psychology.

[47]  Nicole Novielli,et al.  Sensing Developers’ Emotions: The Design of a Replicated Experiment , 2018, 2018 IEEE/ACM 3rd International Workshop on Emotion Awareness in Software Engineering (SEmotion).

[48]  Pekka Abrahamsson,et al.  Do feelings matter? On the correlation of affects and the self‐assessed productivity in software engineering , 2014, J. Softw. Evol. Process..

[49]  Zhihong Zeng,et al.  A Survey of Affect Recognition Methods: Audio, Visual, and Spontaneous Expressions , 2007, IEEE Transactions on Pattern Analysis and Machine Intelligence.

[50]  Minhaz Fahim Zibran,et al.  SentiStrength-SE: Exploiting domain specificity for improved sentiment analysis in software engineering text , 2018, J. Syst. Softw..

[51]  Mary Czerwinski,et al.  Under pressure: sensing stress of computer users , 2014, CHI.

[52]  Wes McKinney,et al.  Data Structures for Statistical Computing in Python , 2010, SciPy.

[53]  Zhenqi Li,et al.  A Review of Emotion Recognition Using Physiological Signals , 2018, Sensors.

[54]  Ryan O. Murphy,et al.  Using Skin Conductance in Judgment and Decision Making Research , 2011 .

[55]  Malvina Nissim,et al.  Sentiment Polarity Classification at EVALITA: Lessons Learned and Open Challenges , 2018, IEEE Transactions on Affective Computing.

[56]  Nicole Novielli,et al.  Anger and Its Direction in Collaborative Software Development , 2017, 2017 IEEE/ACM 39th International Conference on Software Engineering: New Ideas and Emerging Technologies Results Track (ICSE-NIER).

[57]  Alberto Bacchelli,et al.  Expectations, outcomes, and challenges of modern code review , 2013, 2013 35th International Conference on Software Engineering (ICSE).

[58]  Jeffrey T. Hancock,et al.  Expressing emotion in text-based communication , 2007, CHI.

[59]  Stephen Chi-fai Chan,et al.  Building a Personalized, Auto-Calibrating Eye Tracker from User Interactions , 2016, CHI.