A fine-grained approach for automated conversion of JUnit assertions to English

Danielle Gonzalez, Suzanne Prentice, Mehdi Mirakhorli
{"title":"A fine-grained approach for automated conversion of JUnit assertions to English","authors":"Danielle Gonzalez, Suzanne Prentice, Mehdi Mirakhorli","doi":"10.1145/3283812.3283819","DOIUrl":null,"url":null,"abstract":"Converting source or unit test code to English has been shown to improve the maintainability, understandability, and analysis of software and tests. Code summarizers identify 'important' statements in the source/tests and convert them to easily understood English sentences using static analysis and NLP techniques. However, current test summarization approaches handle only a subset of the variation and customization allowed in the JUnit assert API (a critical component of test cases) which may affect the accuracy of conversions. In this paper, we present our work towards improving JUnit test summarization with a detailed process for converting a total of 45 unique JUnit assertions to English, including 37 previously-unhandled variations of the assertThat method. This process has also been implemented and released as the AssertConvert tool. Initial evaluations have shown that this tool generates English conversions that accurately represent a wide variety of assertion statements which could be used for code summarization or other NLP analyses.","PeriodicalId":231305,"journal":{"name":"Proceedings of the 4th ACM SIGSOFT International Workshop on NLP for Software Engineering","volume":"48 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2018-11-04","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"5","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Proceedings of the 4th ACM SIGSOFT International Workshop on NLP for Software Engineering","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1145/3283812.3283819","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 5

Abstract

Converting source or unit test code to English has been shown to improve the maintainability, understandability, and analysis of software and tests. Code summarizers identify 'important' statements in the source/tests and convert them to easily understood English sentences using static analysis and NLP techniques. However, current test summarization approaches handle only a subset of the variation and customization allowed in the JUnit assert API (a critical component of test cases) which may affect the accuracy of conversions. In this paper, we present our work towards improving JUnit test summarization with a detailed process for converting a total of 45 unique JUnit assertions to English, including 37 previously-unhandled variations of the assertThat method. This process has also been implemented and released as the AssertConvert tool. Initial evaluations have shown that this tool generates English conversions that accurately represent a wide variety of assertion statements which could be used for code summarization or other NLP analyses.
查看原文
分享 分享
微信好友 朋友圈 QQ好友 复制链接
本刊更多论文
将JUnit断言自动转换为英语的细粒度方法
将源代码或单元测试代码转换为英语已被证明可以提高软件和测试的可维护性、可理解性和分析性。代码总结器识别源代码/测试中的“重要”语句,并使用静态分析和NLP技术将它们转换为易于理解的英语句子。然而,当前的测试总结方法只处理JUnit断言API(测试用例的关键组件)中允许的变化和定制的一个子集,这可能会影响转换的准确性。在本文中,我们通过将总共45个唯一的JUnit断言转换为英语的详细过程,介绍了我们为改进JUnit测试摘要所做的工作,其中包括assertThat方法以前未处理的37个变体。这个过程也已经作为AssertConvert工具实现和发布。最初的评估表明,该工具生成的英语转换可以准确地表示各种各样的断言语句,这些断言语句可用于代码摘要或其他NLP分析。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 去求助
来源期刊
自引率
0.00%
发文量
0
期刊最新文献
Mining monitoring concerns implementation in Java-based software systems Learning from code with graphs (keynote) Two perspectives on software documentation quality in stack overflow Natural language processing (NLP) applied on issue trackers Towards understanding code readability and its impact on design quality
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
现在去查看 取消
×
提示
确定
0
微信
客服QQ
Book学术公众号 扫码关注我们
反馈
×
意见反馈
请填写您的意见或建议
请填写您的手机或邮箱
已复制链接
已复制链接
快去分享给好友吧!
我知道了
×
扫码分享
扫码分享
Book学术官方微信
Book学术文献互助
Book学术文献互助群
群 号:481959085
Book学术
文献互助 智能选刊 最新文献 互助须知 联系我们:info@booksci.cn
Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。
Copyright © 2023 Book学术 All rights reserved.
ghs 京公网安备 11010802042870号 京ICP备2023020795号-1