一句话:提出 StatGen,混合统计机器翻译与树结构翻译,实现行为异常 API 文档与代码之间的双向推断。
自动生成行为异常(BE)API 文档能帮助开发者正确使用库,但现有方法要么基于规则、适用性受限,要么基于深度学习、依赖大规模训练数据。本文提出 StatGen,一种统计机器翻译(SMT)与树结构翻译相结合的混合方法,用于为任意代码生成 BE 文档,并支持从文档反向推断实现。该方法将 API 方法的文档与源代码视为同一意图的两个抽象层次,并针对这种双向推断进行设计,利用二者的结构信息提高准确率。摘要未报告具体实验数据,但其目标是在减少对大规模标注数据依赖的同时,克服规则方法的限制。
Automatically producing behavioral exception (BE) API documentation helps developers correctly use the libraries. The state-of-the-art approaches are either rule-based, which is too restrictive in its applicability, or deep learning (DL)-based, which requires large training dataset. To address that, we propose StatGen, a novel hybrid approach between statistical machine translation (SMT) and tree-structured translation to generate the BE documentation for any code and vice versa. We consider the documentation and source code of an API method as the two abstraction levels of the same intent. StatGen is specifically designed for this two-way inference, and takes advantage of their structures for higher accuracy.
@inproceedings{paperbot7369,
title = {A Hybrid Approach for Inference between Behavioral Exception API Documentation and Implementations, and Its Applications},
author = {Hoan Anh Nguyen and Hung Dang Phan and Samantha Syeda Khairunnesa and Son Nguyen and Aashish Yadavally and Shaohua Wang and Hridesh Rajan and Tien Nguyen},
booktitle = {ASE},
year = {2022},
doi = {10.1145/3551349.3560434}
}