Automatic summarisation has been used efficiently in recent years to condense texts, conversations, audio, code, and various other artefacts. A range of methods, from simple template-based summaries to complex machine learning techniques -- and more recently, large language models -- have been employed to generate these summaries. Summarising software design patterns is important because it helps developers quickly understand and reuse complex design concepts, thereby improving software maintainability and development efficiency. However, the generation of summaries for software design patterns has not yet been explored. Our approach utilises code features and JavaParser to parse the code and create a JSON representation. Using an NLG library on this JSON representation, we convert it into natural language text that acts as a summary of the code, capturing the contextual information of the design pattern. Our empirical results indicate that the summaries generated by our approach capture the context in which patterns are applied in the codebase. Statistical evaluations demonstrate that our summaries closely align with human-written summaries, as evident from high values in the ROUGE-L, BLEU-4, NIST, and FrugalScore metrics. A follow-up survey further shows that DPS summaries were rated as capturing context better than human-generated summaries. Additionally, a time based task activity shows that summaries increase the time of understanding of design pattern for developer better than when the summaries are not present.


翻译:近年来,自动摘要技术已广泛应用于文本、对话、音频、代码等多种工件的压缩与概括。从基于简单模板的摘要方法到复杂的机器学习技术,再到近期兴起的大语言模型,多种方法被用于生成这些摘要。对软件设计模式进行摘要生成具有重要意义,因为它能帮助开发者快速理解并复用复杂的设计概念,从而提升软件的可维护性与开发效率。然而,针对软件设计模式的摘要生成尚未得到充分探索。本研究提出一种方法,利用代码特征和JavaParser解析代码并构建JSON表示,随后通过自然语言生成(NLG)库将该JSON表示转换为自然语言文本,作为代码的摘要,以捕捉设计模式的上下文信息。实证结果表明,本方法生成的摘要能够有效捕获设计模式在代码库中的应用语境。统计评估显示,本方法生成的摘要与人工撰写的摘要高度一致,这体现在ROUGE-L、BLEU-4、NIST和FrugalScore等指标的高分值上。后续调查进一步表明,DPS生成的摘要在捕捉上下文方面优于人工生成的摘要。此外,一项基于时间的任务活动表明,与无摘要的情况相比,摘要能更有效地帮助开发者理解设计模式,从而缩短理解时间。

0
下载
关闭预览

相关内容

设计是对现有状的一种重新认识和打破重组的过程,设计让一切变得更美。
ChatAug: 利用ChatGPT进行文本数据增强
专知会员服务
81+阅读 · 2023年3月4日
Python分布式计算,171页pdf,Distributed Computing with Python
专知会员服务
108+阅读 · 2020年5月3日
论文报告 | Graph-based Neural Multi-Document Summarization
科技创新与创业
15+阅读 · 2017年12月15日
LibRec 每周算法:LDA主题模型
LibRec智能推荐
29+阅读 · 2017年12月4日
神经网络机器翻译原理:LSTM、seq2seq到Zero-Shot
北京思腾合力科技有限公司
11+阅读 · 2017年8月10日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
6+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
VIP会员
相关资讯
论文报告 | Graph-based Neural Multi-Document Summarization
科技创新与创业
15+阅读 · 2017年12月15日
LibRec 每周算法:LDA主题模型
LibRec智能推荐
29+阅读 · 2017年12月4日
神经网络机器翻译原理:LSTM、seq2seq到Zero-Shot
北京思腾合力科技有限公司
11+阅读 · 2017年8月10日
相关基金
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
6+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员