A framework for writing trigger-action todo comments in executable format

A framework for writing trigger-action todo comments in executable format
复制标题

DOI:
10.1145/3338906.3338965
复制
发表时间:
2019-08
期刊:
Proceedings of the 2019 27th ACM Joint Meeting on European Software Engineering Conference and Symposium on the Foundations of Software Engineering
影响因子:
--
通讯作者:
Pengyu Nie;Rishabh Rai;Junyi Jessy Li;S. Khurshid;R. Mooney;Miloš Gligorić
Pengyu Nie;Rishabh Rai;Junyi Jessy Li;S. Khurshid;R. Mooney;Miloš Gligorić
中科院分区:
其他
文献类型:
--
作者:
Pengyu Nie;Rishabh Rai;Junyi Jessy Li;S. Khurshid;R. Mooney;Miloš Gligorić

文献摘要

被引文献

相似文献

自然语言元素,例如,待办事项注释经常用于在开发者之间进行通信,并且用于描述当特定条件对与代码储存库(触发器)相关的人工产物成立时需要执行的任务(动作),例如,在Apache Struts项目中:“在切换到Java 1.6后删除expectedJDK 15和if()”。随着项目的发展,开发过程的改变,以及开发团队的重组,这些注释,由于其非正式的性质,经常变得无关紧要或被遗忘。我们提出了第一个框架,称为TrigIt,指定可执行格式的命令-动作todo注释。因此,当触发器的计算结果为true时,将自动执行操作。TrigIt规范是用主机语言编写的(例如,Java),并作为构建过程的一部分进行评估。触发器被指定为抽象语法树上的查询语句、构建配置脚本的抽象表示、问题跟踪系统和系统时钟时间。这些操作要么是给开发人员的通知,要么是代码转换步骤。我们为Java编程语言实现了TrigIt,并从几个流行的开源项目中迁移了44个现有的编译器操作注释。通过一项用户研究对TrigIt进行的评价表明,用户认为TrigIt易于学习和使用。TrigIt有可能在大型代码存储库中编写和维护注释时强制执行更多的纪律。
Natural language elements, e.g., todo comments, are frequently used to communicate among developers and to describe tasks that need to be performed (actions) when specific conditions hold on artifacts related to the code repository (triggers), e.g., from the Apache Struts project: “remove expectedJDK15 and if() after switching to Java 1.6”. As projects evolve, development processes change, and development teams reorganize, these comments, because of their informal nature, frequently become irrelevant or forgotten. We present the first framework, dubbed TrigIt, to specify trigger-action todo comments in executable format. Thus, actions are executed automatically when triggers evaluate to true. TrigIt specifications are written in the host language (e.g., Java) and are evaluated as part of the build process. The triggers are specified as query statements over abstract syntax trees, abstract representation of build configuration scripts, issue tracking systems, and system clock time. The actions are either notifications to developers or code transformation steps. We implemented TrigIt for the Java programming language and migrated 44 existing trigger-action comments from several popular open-source projects. Evaluation of TrigIt, via a user study, showed that users find TrigIt easy to learn and use. TrigIt has the potential to enforce more discipline in writing and maintaining comments in large code repositories.