Despite recent research efforts, the vision of automatic code generation through API recommendation has not been realized. Accuracy and expressiveness challenges of API recommendation needs to be systematically addressed. We present a new neural network-based approach, Multi-HyLSTM for API recommendation --targeting cryptography-related code. Multi-HyLSTM leverages program analysis to guide the API embedding and recommendation. By analyzing the data dependence paths of API methods, we train embedding and specialize a multi-path neural network architecture for API recommendation tasks that accurately predict the next API method call. We address two previously unreported programming language-specific challenges, differentiating functionally similar APIs and capturing low-frequency long-range influences. Our results confirm the effectiveness of our design choices, including program-analysis-guided embedding, multi-path code suggestion architecture, and low-frequency long-range-enhanced sequence learning, with high accuracy on top-1 recommendations. We achieve a top-1 accuracy of 91.41% compared with 77.44% from the state-of-the-art tool SLANG. In an analysis of 245 test cases, compared with the commercial tool Codota, we achieve a top-1 recommendation accuracy of 88.98%, which is significantly better than Codota's accuracy of 64.90%. We publish our data and code as a large Java cryptographic code dataset.


翻译:尽管最近进行了研究努力,但通过API建议自动代码生成的愿景尚未实现。需要系统地应对API建议的准确性和清晰度挑战。我们展示了一种新的神经网络方法,即多HyLSTM,用于AIP建议 -- -- 定位密码相关代码。多HyLSTM利用程序分析来指导API嵌入和建议。通过分析API方法的数据依赖路径,我们为API建议任务培训嵌入并专门建立一个多路神经网络架构,以准确预测下一个API方法电话。我们应对了两个先前未报告的针对语言的具体编程挑战,在功能上相似的API和捕捉低频远程影响。我们的结果证实了我们设计选择的有效性,包括程序分析引导嵌入、多路码建议架构和低频远程强化序列学习。通过分析,在头1级建议中,我们实现了91.41%的最高准确度,而从最新工具SLING中获得了77.44%的准确度。在对245个测试案例的分析中,我们做了一个高度的精确度的COIAI的准确度数据,比我们做了一个高度的COBI的精确度数据,我们实现了一个高度数据,我们为285的精确度为88。我们的一个高度的CODOVAVAV的精确度数据,我们实现了一个高度数据,比我们的CO值的精确度为8。

0
下载
关闭预览

相关内容

机器学习系统设计系统评估标准
专知会员服务
42+阅读 · 2021年3月21日
【ECML/PKDD20教程】图表示学习与应用,200页ppt
专知会员服务
91+阅读 · 2020年10月18日
专知会员服务
61+阅读 · 2020年3月19日
自然语言生成资源列表
专知
17+阅读 · 2020年1月4日
计算机 | USENIX Security 2020等国际会议信息5条
Call4Papers
7+阅读 · 2019年4月25日
计算机类 | ISCC 2019等国际会议信息9条
Call4Papers
5+阅读 · 2018年12月25日
A Technical Overview of AI & ML in 2018 & Trends for 2019
待字闺中
17+阅读 · 2018年12月24日
阿里巴巴ET城市大脑
智能交通技术
6+阅读 · 2018年12月23日
disentangled-representation-papers
CreateAMind
26+阅读 · 2018年9月12日
计算机类 | 期刊专刊截稿信息9条
Call4Papers
4+阅读 · 2018年1月26日
【计算机类】期刊专刊/国际会议截稿信息6条
Call4Papers
3+阅读 · 2017年10月13日
Arxiv
0+阅读 · 2021年5月6日
SepNE: Bringing Separability to Network Embedding
Arxiv
3+阅读 · 2019年2月26日
A Compact Embedding for Facial Expression Similarity
Arxiv
6+阅读 · 2018年2月7日
Arxiv
7+阅读 · 2018年1月30日
VIP会员
相关VIP内容
专知会员服务
42+阅读 · 2021年3月21日
【ECML/PKDD20教程】图表示学习与应用,200页ppt
专知会员服务
91+阅读 · 2020年10月18日
专知会员服务
61+阅读 · 2020年3月19日
相关资讯
自然语言生成资源列表
专知
17+阅读 · 2020年1月4日
计算机 | USENIX Security 2020等国际会议信息5条
Call4Papers
7+阅读 · 2019年4月25日
计算机类 | ISCC 2019等国际会议信息9条
Call4Papers
5+阅读 · 2018年12月25日
A Technical Overview of AI & ML in 2018 & Trends for 2019
待字闺中
17+阅读 · 2018年12月24日
阿里巴巴ET城市大脑
智能交通技术
6+阅读 · 2018年12月23日
disentangled-representation-papers
CreateAMind
26+阅读 · 2018年9月12日
计算机类 | 期刊专刊截稿信息9条
Call4Papers
4+阅读 · 2018年1月26日
【计算机类】期刊专刊/国际会议截稿信息6条
Call4Papers
3+阅读 · 2017年10月13日
Top
微信扫码咨询专知VIP会员