Automatic summarization has advanced rapidly, but summarizing software design patterns remains unexplored. We introduce DPS, the first approach to generate natural-language summaries of design patterns directly from code. Using JavaParser, we extract pattern structures into JSON, then apply an NLG library to produce concise, context-aware summaries capturing roles, relationships, and usage intent. Empirical evaluation shows DPS summaries align closely with human-written ones (high ROUGE-L, BLEU-4, NIST, FrugalScore). A developer survey confirms DPS better preserves context than manual summaries. A timed task reveals summaries significantly reduce comprehension time.


翻译:自动摘要技术发展迅速,但针对软件设计模式的摘要生成仍属空白。本文提出DPS,首次实现直接从代码生成设计模式的自然语言摘要。我们利用JavaParser将模式结构解析为JSON格式,随后通过自然语言生成库生成简洁、上下文感知的摘要,涵盖角色定义、关联关系及使用意图。实证评估表明,DPS生成的摘要与人工撰写的摘要高度吻合(在ROUGE-L、BLEU-4、NIST和FrugalScore指标上表现优异)。开发者调研证实,相较于人工摘要,DPS能更好地保持上下文完整性。限时任务实验进一步揭示,该摘要能显著缩短代码理解时间。

0
下载
关闭预览

相关内容

代码(Code)是专知网的一个重要知识资料文档板块,旨在整理收录论文源代码、复现代码,经典工程代码等,便于用户查阅下载使用。
DeepSeek模型综述:V1 V2 V3 R1-Zero
专知会员服务
116+阅读 · 2025年2月11日
Single-Shot Object Detection with Enriched Semantics
统计学习与视觉计算组
14+阅读 · 2018年8月29日
语义分割中的深度学习方法全解:从FCN、SegNet到DeepLab
炼数成金订阅号
26+阅读 · 2017年7月10日
国家自然科学基金
4+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
VIP会员
相关资讯
相关基金
国家自然科学基金
4+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员