Recording concerns in source code using annotations

A concern can be characterized as a developer's intent behind a piece of code, often not explicitly captured in it. We discuss a technique of recording concerns using source code annotations (concern annotations). Using two studies and two controlled experiments, we seek to answer the following 3 research questions: (1) Do programmers' mental models overlap? (2) How do developers use shared concern annotations when they are available? (3) Does using annotations created by others improve program comprehension and maintenance correctness, time and confidence? The first study shows that developers' mental models, recorded using concern annotations, overlap and thus can be shared. The second study shows that shared concern annotations can be used during program comprehension for the following purposes: hypotheses confirmation, feature location, obtaining new knowledge, finding relationships and maintenance notes. The first controlled experiment with students showed that the presence of annotations significantly reduced program comprehension and maintenance time by 34%. The second controlled experiment was a differentiated replication of the first one, focused on industrial developers. It showed a 33% significant improvement in correctness. We conclude that concern annotations are a viable way to share developers' thoughts. HighlightsWe present a technique to record developers' concerns using source code annotations.To evaluate it, we performed two studies and two controlled experiments.Developers' mental models, recorded using annotations, overlap to a certain degree.Developers use the annotations, e.g., to confirm hypotheses or for feature location.Shared concern annotations improve program maintenance time and correctness.

[1]  Vasian Cepa Attribute Enabled Software Development , 2007 .

[2]  Tore Dybå,et al.  A systematic review of quasi-experiments in software engineering , 2009, Inf. Softw. Technol..

[3]  Susan T. Dumais,et al.  The vocabulary problem in human-system communication , 1987, CACM.

[4]  J. Mixter Fast , 2012 .

[5]  Dietmar Pfahl,et al.  Reporting guidelines for controlled experiments in software engineering , 2005, 2005 International Symposium on Empirical Software Engineering, 2005..

[6]  Görel Hedin Language Support for Design Patterns Using Attribute Extension , 1997, ECOOP Workshops.

[7]  Vasian Cepa Attribute enabled software development: illustrated with mobile software applications , 2007 .

[8]  Jaroslav Porubän,et al.  Annotation based parser generator , 2009, 2009 International Multiconference on Computer Science and Information Technology.

[9]  Edoardo Vacchi,et al.  @Java: Bringing a richer annotation model to Java , 2014, Comput. Lang. Syst. Struct..

[10]  Margaret M. Burnett,et al.  A practical guide to controlled experiments of software engineering tools with human participants , 2013, Empirical Software Engineering.

[11]  Oscar Nierstrasz,et al.  Bounded seas , 2015, Comput. Lang. Syst. Struct..

[12]  Vladimir I. Levenshtein,et al.  Binary codes capable of correcting deletions, insertions, and reversals , 1965 .

[13]  Jeffrey C. Carver,et al.  A checklist for integrating student empirical studies with research and teaching goals , 2010, Empirical Software Engineering.

[14]  Jeffrey C. Carver,et al.  Program comprehension of domain-specific and general-purpose languages: comparison using a family of experiments , 2011, Empirical Software Engineering.

[15]  Jaroslav Porubän,et al.  Reusable software documentation with phrase annotations , 2014, Central European Journal of Computer Science.

[16]  Roman Taborskyand Feature Model Driven Generation of Software Artifacts , 2015 .

[17]  Michaela Bacíková,et al.  Declarative specification of references in DSLs , 2013, 2013 Federated Conference on Computer Science and Information Systems.

[18]  Michal Antkiewicz,et al.  Maintaining feature traceability with embedded annotations , 2015, SPLC.

[19]  Li-Te Cheng,et al.  Shared waypoints and social tagging to support collaboration in software development , 2006, CSCW '06.

[20]  Markus Pizka,et al.  Concise and consistent naming , 2005, 13th International Workshop on Program Comprehension (IWPC'05).

[21]  Anneliese Amschler Andrews,et al.  Program Comprehension During Software Maintenance and Evolution , 1995, Computer.

[22]  Xiaoyong Yang,et al.  Faceted Navigation for Software Exploration , 2011, 2011 IEEE 19th International Conference on Program Comprehension.

[23]  Claes Wohlin,et al.  Experimentation in Software Engineering , 2000, The Kluwer International Series in Software Engineering.

[24]  Liviu Codrut Stancu Safe and efficient hybrid memory management for Java , 2015, ISMM.

[25]  Janice Singer,et al.  TODO or to bug , 2008, 2008 ACM/IEEE 30th International Conference on Software Engineering.

[26]  R. Likert “Technique for the Measurement of Attitudes, A” , 2022, The SAGE Encyclopedia of Research Design.

[27]  Jack Greenfield,et al.  Software factories: assembling applications with patterns, models, frameworks and tools , 2004, OOPSLA '03.

[28]  Sebastian Erdweg,et al.  Language composition untangled , 2012, LDTA.

[29]  Pavol Návrat,et al.  Design Pattern Support Based on the Source Code Annotations and Feature Models , 2012, SOFSEM.

[30]  Matús Sulír,et al.  Source code annotations as formal languages , 2015, 2015 Federated Conference on Computer Science and Information Systems (FedCSIS).

[31]  João P. Cachopo Separation of concerns through semantic annotations , 2002, OOPSLA '02.

[32]  Klaus Meffert Supporting design patterns with annotations , 2006, 13th Annual IEEE International Symposium and Workshop on Engineering of Computer-Based Systems (ECBS'06).

[33]  Kenneth E. Iverson,et al.  A programming language , 1899, AIEE-IRE '62 (Spring).

[34]  Edoardo Vacchi,et al.  Neverlang: A framework for feature-oriented language development , 2015, Comput. Lang. Syst. Struct..

[35]  Amela Karahasanovic,et al.  A survey of controlled experiments in software engineering , 2005, IEEE Transactions on Software Engineering.

[36]  Matús Sulír,et al.  Sharing developers' mental models through source code annotations , 2015, 2015 Federated Conference on Computer Science and Information Systems (FedCSIS).

[37]  Roberto da Silva Bigonha,et al.  An on-the-fly grammar modification mechanism for composing and defining extensible languages , 2015, Comput. Lang. Syst. Struct..

[38]  Shutao Xia,et al.  On the Average Hamming Distance for Binary Codes , 1999, Discret. Appl. Math..

[39]  Miguel Goulão,et al.  Quality in use of domain-specific languages: a case study , 2011, PLATEAU '11.

[40]  Per Runeson,et al.  Guidelines for conducting and reporting case study research in software engineering , 2009, Empirical Software Engineering.

[41]  David Coppit,et al.  Understanding concerns in software: insights gained from two case studies , 2005, 13th International Workshop on Program Comprehension (IWPC'05).

[42]  Mira Mezini,et al.  Separation of Concerns with Procedures, Annotations, Advice and Pointcuts , 2005, ECOOP.

[43]  Jaroslav Porubän,et al.  Leveraging Program Comprehension with Concern-oriented Source Code Projections , 2014, SLATE.