API(application programming interface,应用程序编程接口)在现代软件开发过程中被广泛使用.开发人员通过调用API快速构建项目,节省了大量的时间.但由于API数量众多、文档不够完善、维护更新不及时等原因,开发人员在学习使用API的过程中面临着严峻的挑战.一旦API使用不正确,程序可能会出现缺陷甚至严重的安全问题.通过对API相关文献的深入调研,对近些年来国内外学者在该研究领域取得的成果进行了系统总结.首先,介绍了API的基本概念并分析出影响API使用的3个关键问题:API文档质量不高、调用规约不完整以及API调用序列难以确定;接着,从API文档、调用规约和API推荐这3个主要方面对研究成果进行全面的分析;最后,对未来研究可能面临的挑战进行了展望.
API (application programming interface) is widely used in modern software development process. Developers save a lot of time when they quickly build projects through invoking APIs. However, API is often difficult to use for many reasons, such as the presence of large number of interfaces, lack of perfect document, and no timely maintenance and updates. Further, API is often used incorrectly, resulting in bugs and sometimes significant security problems.This paper summarizes the recent domestic and overseas research results based on a thorough survey of the API related literatures. Firstly, it introduces the API concept and recognizes the three key issues that affect the API usage:poor API documentation, incomplete invocation specification and undetermined API call sequence. Next, it analyzes the latest advances from these three main aspects:API document, invocation specification and API recommendation. Finally, this paper outlines the challenges of the future research.
API(application programming interface, 应用程序编程接口)在现代软件开发过程中被广泛使用.开发人员通过调用API快速构建项目, 节省了大量的时间.然而随着软件规模扩大, 公开的API数量巨大, 例如:GEF(graphical editing framework)作为一个常用的Eclipse的图形类库, 就涉及6万多个API方法.开发人员在学习以及使用这些不熟悉的API时面临挑战, 即使是编程专家, 也需要花费很多时间学习这些API.研究显示, 开发人员学习API的时间占用了整个开发过程的40%[
很多学者针对API的使用问题进行了深入分析[
同时, 一旦API使用不正确, 将会使程序出现缺陷甚至严重的安全问题[
为了对该研究问题进行系统性的分析、总结和比较, 通过在IEEE, ACM, Springer和Elsevier等论文数据库中进行检索, 最终选择出与该研究问题直接相关的高质量论文共138篇(截止到2017年8月), 从选择出的论文所发表的会议和期刊来看, 其中将近一半的论文发表在软件工程领域的权威会议或期刊上, 见
主要参考文献汇总
Major references summary
刊物/会议名称 | CORE2017排名 | CCF级别 | 参考文献数目 |
Int’l Conf. on Software Engineering (ICSE) | A* | A | 30 |
ACM SIGSOFT Symp. on the Foundation of Software Engineering/European Software Engineering Conf. (FSE/ESEC) | B | A | 13 |
Int’l Conf. on Automated Software Engineering (ASE) | A | A | 10 |
IEEE Trans. on Software Engineering (TSE) | A* | A | 7 |
Int’l Symp. on Software Testing and Analysis (ISSTA) | A | B | 3 |
Int’l Conf. on Software Maintenance and Evolution (ICSME) | A | B | 2 |
ACM SIGPLAN Symp. on Programming Language Design & Implementation (PLDI) | A* | A | 1 |
ACM Conf. on Object-Oriented Programming Systems, Languages, and Applications (OOPSLA) | A* | A | 1 |
本文综述了API使用相关研究的历史、目前面临的主要问题以及今后的发展方向, 试图为该研究方向勾画出一个较为全面和清晰的概貌, 为API使用相关领域的研究人员提供有益参考.本文识别出影响API使用的3个关键问题:文档质量不高、调用规约不完整以及API调用序列难以确定, 并从API文档、调用规约以及API推荐这3个主要方面对研究成果进行了全面的总结和分析.
API是软件库提供的一组可访问的接口, 软件库通过API向外提供服务, 开发人员通过使用API实现代码复用, 提高生产效率[
API被广泛使用有以下原因:(1) API提供了一种代码复用机制, 开发人员直接复用已有的程序, 节省了大量的时间; (2) API提供了一种信息隐藏的机制, 用户不需要知道具体的实现细节, 直接调用API完成相应的功能; (3) API提供了访问某些资源的接口, 用户只有通过设备驱动、操作系统API等接口才能够访问到某类资源.不同的组织或者开发人员使用了不同的术语来表示API, 并没有形成统一的标准:(1)类库, 如C语言的标准库, Math库等; (2)框架, 如.Net框架, Eclipse框架等; (3)工具包, 如Google Web Toolkit, GIMP Toolkit等; (4) API, 如Win32 APIs, Google Maps APIs等.
(1) 可用性
可用性是衡量API质量的重要指标, 通常包括API是否容易被开发人员使用、是否能够完成指定的功能等.文献[
(2) 稳定性
随着软件库演化速度不断加快, API存在失效或者消失的情况.API的稳定性直接关系到系统的质量.例如, Android平台平均一个月就会更新115个API[
(3) 安全性
API的不规范使用会对系统带来安全风险.例如, Android平台有很多未公开的API, APP使用这些API会造成隐私泄露等安全风险.2016年, Li等人[
开发人员使用API完成指定任务时, 通常会通过阅读文档或者搜索引擎选择合适的类库, 了解如何正确地调用API(如何设置参数、返回值的含义等), 寻找针对特定应用场景API的调用序列或者示例程序, 甚至需要了解API内部的设计原理.研究显示, 开发人员在这一系列过程面临挑战[
(1) API文档质量不高
API文档是软件复用的关键, 也是开发人员学习使用API最为重要的材料.1994年, Parnas[
(2) API调用规约不完整
API调用规约描述了开发人员调用API时应遵循的规则和约束条件.开发人员如果没有按照规约调用API, 程序将引入缺陷甚至严重的安全问题.2015年, Saied等人[
文档中描述的规约vs未描述的规约
Documented vs non-documented specification
(3) API调用序列难以确定
开发人员完成任务的时候通常是以调用API序列为基础的, 文献[
API使用场景
API usage scenario
使用场景 | 例子 | API | |
类 | 创建类对象 | ||
变量声明 | |||
使用静态类 | |||
继承 | |||
返回类型 | |||
异常 | |||
方法 | 调用实例方法 | ||
调用静态方法 | |||
调用构造函数 | |||
属性 | 访问实例属性 | ||
访问静态属性 |
开发人员遇到不熟悉的API时, 通常需要阅读文档学习API的使用方法.Parnas[
(1) API参考文档(API reference documentation):软件生产商官方提供API参考文档, 与软件库一起发行. API参考文档通常以API元素作为索引, 包括概念、指示信息、示例程序等内容, 见
API文档研究
Research on API documentation
重要工作 | 年份 | 研究对象 | 研究问题 | 工作数量统计 |
Sacramento, |
2006 | .NET参考文档 | 文档内容不完整, 缺少示例程序、指示信息等 | 6 |
Rubio-González, |
2010 | Linux手册 | ||
Kim, |
2013 | JDK参考文档 | ||
Subramanian, |
2014 | Android API文档等 | ||
Chen, |
2014 | JDK参考文档、Stack Overflow | ||
Treude, |
2016 | JDK参考文档、Stack Overflow | ||
Zhou, |
2016 | 开源类库参考文档 | 内容失效 | 1 |
Zhou, |
2017 | JDK参考文档 | 内容不一致 | 1 |
Zhong & Su[ |
2013 | JDK参考文档 | 内容不正确 | 1 |
Dekel & Herbsleb[ |
2009 | JDK参考文档 | 内容冗余, 无效信息多 | 3 |
Monperrus, |
2012 | JDK参考文档、Jface参考文档 | ||
Maalej & Robillard[ |
2013 | .NET参考文档、JDK参考文档 | ||
Petrosyan, |
2015 | JodaTime教程等 | 信息碎片化 | 2 |
Jiang, |
2017 | JodaTime教程等 |
(2) 其他文档:包括API教程(API tutorial)、FAQ、论坛讨论等多种形式的辅助资料, 这些文档的内容通常以实例、问答等内容为基础, 帮助开发人员解决使用API过程中的实际问题.
研究[
API参考文档是开发人员学习使用API的最权威指导, 文献[
API参考文档存在内容冗余、无效信息过多等问题[
API参考文档中的指示信息(directive)描述了开发人员使用API的正确方法以及需要注意的约束.2009年, Dekel和Herbsleb[
eMoose基于API设计人员对指示信息的手工标记, 并没有对API参考文档中的指示信息进行系统分析. 2011年, Monperrus等人[
2013年, Maalej和Robillard[
API参考文档内容分类
Knowledge types taxonomy of API reference documentation
内容类型 | 描述 |
功能行为 | 描述API能够做什么 |
概念 | 解释API元素的含义 |
指示信息 | 描述如何正确调用API等信息 |
目的 | 解释提供该API元素的目的 |
质量 | 描述API的质量性质(性能等) |
控制流程 | 描述API具体的控制流程(触发了哪些事件等) |
组织结构 | 描述内部组织结构(继承等) |
使用模式 | 描述如何使用API实现一个场景 |
代码示例 | 提供实现某一功能的代码示例 |
环境 | 描述API使用的环境(包括兼容性、版本等信息) |
参考引用 | 指向外部文档的链接 |
其他 | 非相关信息 |
维护全面完整的文档资料是一项艰巨的任务, 即使微软、苹果等公司也很难完成.研究[
API设计人员通常会在参考文档中提供描述性文字来说明如何使用这些API, 但单纯的文字性描述有时会带来歧义, 开发人员通常会通过示例程序来学习使用这些API[
当开发人员使用API遇到困难时, 经常向Stack Overflow等社区寻求帮助[
软件库开发升级速度越来越快, 撰写校对文档需要大量的时间和投入, 很难及时维护.与此同时, 撰写文档的人员很多时候并不参与实际的项目开发.在这种情况下, API参考文档非常容易存在一些错误或信息不一致等情况, 严重误导开发人员.但手工分析这些错误非常耗时, 研究人员开始尝试自动化地发现这些问题.
2013年, Zhong和Su[
结果显示:针对5个常用的JAVA类库文档, 该方法成功检测出了1 000多个文档错误.类似的, 2016年, Zhou等人[
2017年, 南京航空航天大学的周宇等人[
上节主要介绍了关于API参考文档的研究.近年来, 研究人员也开始关注API教程[
2015年, 加拿大麦吉尔大学的研究人员[
(1) 段落解析器解析API教程中的段落信息、预处理文字信息, 利用API名称或本体名称替换代词等;
(2) 段落过滤器过滤所有与API信息无关的段落, 同时使用主题模型以及PageRank算法对段落与API的相关度进行评分.根据评分得到与API真正相关的段落.
综合以上研究, 结合
API调用规约描述了开发人员调用API时应遵循的规则和约束条件.如果没有按照规约调用API, 程序将引入缺陷甚至严重的安全问题.但是, 编写维护API调用规约代价非常高, 官方文档很少会提供完整的API调用规约.为此, 研究人员提出了很多方法自动推断API调用规约, 用于缺陷检测、程序验证、文档增强等领域.
API调用规约推断工具
Tools of API specification inference
重点工作 | 年份 | 工具名称 | 技术特点 | 规约模型 | 工作数量统计 |
Cook & Wolf[ |
1998 | FSA | 关联规则 | 14 | |
Dallmeier, |
2006 | ADABU | FSA | ||
Pradel & Gross[ |
2009 | PFSA | |||
Li & Zhou[ |
2005 | PR-Miner | 数据挖掘 | ||
Livshits & Zimmermann[ |
2005 | DynaMine | 数据挖掘 | ||
Yang, |
2006 | Perracotta | 数据挖掘 | ||
Thummalapenta & Xie[ |
2009 | Alattin | 数据挖掘 | ||
Liang, |
2016 | AntMiner | 数据挖掘 | ||
Murali, |
2017 | Salento | 贝叶斯模型 | ||
Gabel & Su[ |
2008 | Javert | ( |
||
Gabel & Su[ |
2009 | ( |
|||
Gabel & Su[ |
2010 | OCD | ( |
||
Zhong, |
2010 | Doc2Spec | NLP+模板 | ||
Nguyen, |
2009 | GrouMiner | 图模型 | ||
Wasylkowski & Zeller[ |
2009 | Tikanga | 静态分析 | Pre/Post条件 | 3 |
Wei, |
2012 | AutoInfer | 动态分析 | ||
Nguyen, |
2014 | 静态分析 | |||
Henkel & Diwan[ |
2007 | 动态分析 | 行为模型 | 4 | |
Ramanathan, |
2007 | Chronicler | 静态分析 | ||
Lorenzoli, |
2008 | GK-tail | |||
Krka, |
2014 | 动态分析 |
1999年, Dwyer等人[
API调用规约模式
API specification pattern
(1) 基于关联规则的调用规约:此类规约主要描述API间的调用关系.例如:调用函数
(2) 基于Floyd-Hoare逻辑的pre/post条件规约:pre/post条件规约明确指出每一条API调用的前置以及后置条件, 包括参数、返回值等约束条件;
(3) 基于行为模型的调用规约:基于行为模型的调用规约以更加正式的形式描述API的行为, 强调API调用对于程序状态的影响, 常见形式包括契约式规约(contract)、代数式规约(algebraic specification)等.
基于关联规则的调用规约主要描述API间的关联关系, 例如:调用函数
2001年, 斯坦福大学的Engler等人[
研究人员将调用规约的提取问题转化为频繁子项的数据挖掘问题, 利用数据挖掘技术推断API调用规约.基于频繁项集的数据挖掘算法在这些研究中起到关键作用.该类算法旨在从大量事务数据库中发现事务之间的关联关系, 以揭示隐藏其中的行为模式, 强调行为的共现性.通过计算频繁子项得到类似
2005年, Li和Zhou[
基于频繁项集的挖掘方法依赖于数据源的质量, 如果数据源噪声过多, 将严重影响结果的准确性.2016年, 中国人民大学的梁彬博士团队研发了AntMiner[
第3.1.1节介绍的基于频繁项集的挖掘方法强调子项的共现性, 主要表现在一个子项出现的同时必然会伴随其他子项的出现, 并未强调API调用的先后次序.最简单的API调用次序表示为(
2007年, Kagdi等人[
2009年, 谢涛等人[
自动机模型能够描述API之间的调用关系.1998年, Cook和Wolf[
自动机模型
Automaton model
研究人员采用基于模板的挖掘方法寻找符合特定模板的API调用规约.但模式匹配算法的开销很大, 大部分研究都是针对(
(
Template representing (
2009年, Zhong等人[
资源使用模板
Template of resource usage
(1) 从API文档中抽取关于方法的描述;
(2) 利用NLP技术, 从每一个方法的描述中构建(资源-行为)的对应关系;
(3) 最后, 针对一种资源的所有操作分类到一个集合中, 根据预先定义的模板推断出API调用规约.
图模型相比较自动机等模型能够表达更加复杂的信息, 图的边不仅可以表示控制依赖关系, 还可以表示数据依赖关系.2007年, Chang等人[
图模型
Graph models
开发人员使用API完成软件功能时, 需要遵守其前置及后置条件.例如:JDK中的String类, 在调用
Wasylkowski和Zeller[
2014年, Nguyen等人[
在控制流程图中, 判断式
(1) 对于每一个方法, 利用静态分析技术构建控制依赖关系, 分析出API调用的前置条件;
(2) 将这些前置条件进行规范化处理, 对等价的关系进行合并;
(3) 对不经常使用的条件进行过滤, 得到最终的前置条件.
结果显示:该方法达到了82%的条件覆盖率, 同时发现了5个官方文档缺失的前置条件.相比较于前置条件, 开发人员更容易忽视后置条件的使用.Wei等人[
基于行为模型的调用规约以更加正式的形式描述API的行为, 强调API对于程序状态的影响.常见的形式包括契约式规约(contract)、代数式规约(algebraic specification)等.
契约式规约是程序验证的基础性技术[
Contract of
2000年, Ernst博士[
Daikon整体框架
Daikon framework
文献[
2008年, Lorenzoli等人[
除了契约式规约, 代数式规约也用来描述API的行为.代数式规约更加强调API调用对于程序状态的影响以及API之间的关系.1978年, Guttag等人[
Algebraic specification of
2007年, Henkel和Diwan[
综合以上研究, 结合
现有研究主要针对API调用规约的某些模式进行了推断分析, 例如:PRMiner[
同时, API调用规约的有效性需要进一步加强.2016年, 伊利诺伊大学的Legunsen等人[
随着软件系统的规模和复杂性急剧增长, 软件开发和维护的代价也在持续加大[
API推荐工具
Tools of API Recommendation
重点工作 | 年份 | 工具名称 | 技术特点 | 推荐类型 | 工作数量统计 |
Teyton, |
2012 | 关联规则 | 类库推荐 | 3 | |
Thung, |
2013 | 关联规则 | |||
Chen & Xing[ |
2016 | SimilarTech | NLP技术 | ||
Xie & Pei[ |
2006 | MAPO | 关联规则 | 方法推荐 | 8 |
Hindle, |
2012 | 自然语言处理 | |||
Wang, |
2013 | UP-Miner | 关联规则 | ||
Raychev, |
2014 | SLANG | 自然语言处理+RNN | ||
Nguyen, |
2015 | GraLan | 图模型 | ||
Nguyen, |
2016 | SALAD | 隐马尔科夫模型 | ||
Fowkes & Sutton[ |
2016 | PAM | 概率模型 | ||
White, |
2016 | DeepAPI | 深度学习 | ||
Zhang, |
2012 | Precise | KNN | 参数推荐 | 2 |
Asaduzzaman, |
2015 | Parc | SimHash | ||
Xing, |
2007 | Diff-CatchUp | 文本相似度 | API映射推荐 | 4 |
Dagenais & Robillard[ |
2008 | SemDiff | API上下文关系 | ||
Zhong, |
2010 | MAM | 文本相似度 | ||
Nguyen[ |
2017 | API2API | Word2Vec |
文献[
Wang和Godfrey[
2006年, Xie和Pei[
MAPO算法返回的结果存在较大的冗余性, 会出现很多类似的API调用序列.UP-Miner扩展了MAPO算法试图降低结果的冗余性[
(1) 使用BIDE闭合频繁序列挖掘算法来挖掘API调用序列;
(2) 根据两个API调用序列的子项的重复性来度量相似性;
(3) 采用概率图模型来表示API调用序列, 同时根据出现的频次进行排名.
序列模式挖掘算法在API调用序列挖掘过程中起着至关重要的作用, 也一直是研究的热点问题.Agrawal和Srikant[
自然语言处理技术广泛应用于机器翻译、语音识别、拼写纠错等领域, 并且取得了良好的效果[
(1) 假设序列中的子项是完全有序的;
(2) 假设一个子项的产生概率依赖于该子项前
但使用
基于
2016年, Nguyen等人[
HAPI for
以上研究主要针对客户程序的分析, 2016年, Nguyen等人[
神经网络模型有效地解决了自然语言处理中长距离依赖问题, 被广泛应用于模式识别、自动问答等领域. 2014年, Raychev等人[
RNN模型
Model of a recurrent neural network (RNN)
(1) 首先, 在输入层将当前的API方法
(2) 根据之前的隐藏层状态
(3) 最后, 根据隐藏层的状态计算
输出的结果是第
研究[
(1) 首先, Precise通过分析代码库抽取参数实例的特征创建参数基础库, 特征包括参数抽象表示特征以及参数使用上下文特征;
(2) Precise利用
(3) 最后, 根据上下文的相似性以及使用频率对候选集合进行排序, 帮助开发人员选择合适的参数.
Precise针对布尔型参数, 简单的实参推荐效果并不理想, 例如
参数使用实例
Parameter usage instance
软件类库版本发生演化或变迁均会造成原有推荐方案的失效.例如简单方法重构以及软件架构更新等.高频率的软件库修改和演化, 必然会引发开发人员对已有失效推荐方案的检测和更新.开发人员需要挖掘不同软件库版本间的API映射迁移关系, 利用映射关系对客户程序进行变更推荐.相关工作将迁移映射关系形式化为规则“
API版本演化过程中, 85%的映射模式为简单重构[
Diff-CatchUp[
2010年, 钟浩博士[
基于文本相似度的方法对于方法名完全不一致的情况难以取得理想的结果.文献[
2017年, 爱荷华州立大学的的Nguyen等人[
综合以上研究, 结合
随着软件库不断发展, 可使用的API数量急剧增长.伴随着API更新速度快、维护成本高等原因, 形成了API文档质量低、调用规约不明确等问题, 严重影响了工作效率, 甚至会使程序出现严重的安全问题.API相关领域问题成为了研究的热点问题, 并日益得到了学术界和工业界的广泛关注.本文识别出影响API使用的3个关键问题:API文档质量不高、调用规约不完整和API调用序列难以确定, 并从API文档、调用规约以及API推荐这3个主要方面出发对研究成果进行了全面的总结和分析, 仍有一些问题值得进一步深入研究.
软件生产商撰写校对文档需要大量的时间和投入, 很难及时维护.与此同时, 撰写文档的人员很多时候并不参与实际的项目开发, 对很多细节并不真正了解.这样的矛盾使API文档质量难以保证.
(1) 多技术融合解决现有矛盾.如果能够从程序自动提取关于功能、规约的描述, 将极大减少维护文档的工作量, 人工智能技术在这个方面开始了初步尝试[
(2) API参考文档没有形成统一的标准.例如JDK文档中, 43%的内容对于开发人员并没有太高的使用价值[
(3) API教程、StackOverFlow社区等资源发挥越来越重要的作用, 但还没有研究评估这些资源的质量.
编写维护更新API调用规约代价非常高, 官方很少会提供已编写好的API调用规约.现有研究虽然采用了很多方法推断API调用规约, 但仍旧存在以下问题.
(1) 现有工作主要针对API调用规约的某些模式进行了推断, 这样得到的结果只体现了规约的一个方面, 很难完整概括API调用规约, 并没有形成统一的标准;
(2) 目前, 还没有方法能够客观评价调用规约的价值.挖掘到的调用规约的价值在于增加未了解的知识和经验, 目前主要通过人工确认的方式, 无法自动化评价这些结果;
(3) API调用规约目前主要应用于缺陷检测领域, 在增强文档、测试等领域应用还不广泛, 这些应用对API调用规约的表示以及准确度等方面提出了更高的要求.
API推荐旨在帮助开发人员更加便捷地完成复杂的任务.如何优化API推荐值得继续关注.
(1) 现有IDE集成的API推荐工具并不完善.例如, 输入JDK 8中的
(2) 如果能够建立以社区为基础的API使用模式库, 能够很好地实现API使用模式资源共享以及标准化, 同时促进API相关领域的研究.
本文从API的定义、性质以及主要问题出发, 对API文档、API调用规约和API推荐等3个重点领域中经典的技术和方法进行了详细的综述, 试图为该研究方向勾画出一个较为全面和清晰的概貌, 为API领域的研究人员提供有益的参考.
Ko AJ, Myers BA, Coblenz MJ, Aung HH. An exploratory study of how developers seek, relate, and collect relevant information during software maintenance tasks. IEEE Trans. on Software Engineering, 2006, 32(12):971-987.[doi:10.1109/tse.2006.116]
doi:10.1145/2884781.2884790]]]>
Robillard MP, Deline R. A field study of API learning obstacles. Empirical Software Engineering, 2011, 16(6):703-732.[doi:10.1007/s10664-010-9150-8]
doi:10.1109/vlhcc.2004.47]]]>
doi:10.1145/2637166.2637237]]]>
doi:10.1145/2508859.2516693]]]>
doi:10.1145/2382196.2382204]]]>
doi:10.1145/2508859.2516655]]]>
Parnas DL, Madey J, Iglewski M. Precise documentation of well-structured programs. IEEE Trans. on Software Engineering, 1994, 20(12):948-976.[doi:10.1109/32.368133]
doi:10.1109/SANER.2015.7081813]]]>
Maalej W, Robillard MP. Patterns of knowledge in API reference documentation. IEEE Trans. on Software Engineering, 2013, 39(9):1264-1282.[doi:10.1109/tse.2013.12]
Sacramento P, Cabral B, Marques P. Unchecked exceptions: Can the programmer be trusted to document exceptions. In: Proc. of the 2nd Int'l Conf. on Innovative Views of. NET Technologies. 2006.
doi:10.1145/1806672.1806687]]]>
Kim J, Lee S, Hwang SW, Kim S. Enriching documents with examples:A corpus mining approach. ACM Trans. on Information Systems, 2013, 31(1):1-27.[doi:10.1145/2414782.2414783]
doi:10.1145/2568225.2568313]]]>
doi:10.1145/2884781.2884800]]]>
doi:10.1145/2591062.2591128]]]>
doi:10.1145/2950290.2950298]]]>
doi:10.1109/icse.2017.11]]]>
Zhong H, Su Z. Detecting API documentation errors. ACM SIGPLAN Notices, 2013, 48(10):803-816.[doi:10.1145/2544173. 2509523]
doi:10.1109/icse.2009.5070532]]]>
Monperrus M, Eichberg M, Tekes E, Mezini M. What should developers be aware of? An empirical study on the directives of API documentation. Empirical Software Engineering, 2012, 17(6):703-737.[doi:10.1007/s10664-011-9186-4]
Petrosyan G, Robillard MP, Mori RD. Discovering information explaining API types using text classification. In: Proc. of the 37th Int'l Conf. on Software Engineering-Vol. 1. Piscataway: IEEE Press, 2015. 869-879.
doi:10.1109/icse.2017.12]]]>
Parnas DL. Precise documentation: The key to better software. In: Proc. of the Future of Software Engineering. Berlin: Springer-Verlag, 2011. 125-148.
doi:10.1109/msr.2009.5069489]]]>
doi:10.1145/1882291.1882312]]]>
Dagenais B, Robillard MP. Recovering traceability links between an API and its learning resources. In: Proc. of the 34th Int'l Conf. on Software Engineering. Piscataway: IEEE Press, 2012. 47-57.
Rigby PC, Robillard MP. Discovering essential code elements in informal documentation. In: Proc. of the 2013 Int'l Conf. on Software Engineering. Piscataway: IEEE Press, 2013. 832-841.
Antoniol G, Canfora G, Casazza G, Lucia AD, Merlo E. Recovering traceability links between code and documentation. IEEE Trans. on Software Engineering, 2002, 28(10):970-983.[doi:10.1109/tse.2002.1041053]
Duala-Ekoko E, Robillard MP. Asking and answering questions about unfamiliar APIs: An exploratory study. In: Proc. of the 34th Int'l Conf. on Software Engineering. Piscataway: IEEE Press, 2012. 266-276.
Shi L, Zhong H, Xie T, Li M. An empirical study on evolution of API documentation. In: Proc. of the 14th Int'l Conf. on Fundamental Approaches to Software Engineering: Part of the Joint European Conf. on Theory and Practice of Software. Berlin: Springer-Verlag, 2011. 416-431.
doi:10.1145/1984701.1984706]]]>
Cook JE, Wolf AL. Discovering models of software processes from event-based data. ACM Trans. on Software Engineering and Methodology, 1998, 7(3):215-249.[doi:10.1145/287000.287001]
doi:10.1145/1138912.1138918]]]>
doi:10.1109/ase.2009.60]]]>
Li Z, Zhou Y. PR-Miner:Automatically extracting implicit programming rules and detecting violations in large software code. SIGSOFT Software Engineering Notes, 2005, 30(5):306-315.[doi:10.1145/1095430.1081755]
Livshits B, Zimmermann T. DynaMine:Finding common error patterns by mining software revision histories. SIGSOFT Software Engineering Notes, 2005, 30(5):296-305.[doi:10.1145/1095430.1081754]
doi:10.1145/1134285.1134325]]]>
Thummalapenta S, Xie T. Alattin:Mining alternative patterns for defect detection. Automated Software Engineering, 2011, 18(3):293-323.[doi:10.1007/s10515-011-0086-z]
doi:10.1145/2884781.2884870]]]>
doi:10.1145/3106237.3106284]]]>
doi:10.1145/1368088.1368096]]]>
doi:10.1145/1453101.1453150]]]>
doi:10.1145/1806799.1806806]]]>
doi:10.1109/ase.2009.94]]]>
doi:10.1145/1595696.1595767]]]>
doi:10.1109/ase.2009.30]]]>
doi:10.1145/1985793.1985820]]]>
doi:10.1145/2635868.2635924]]]>
Henkel J, Reichenbach C, Diwan A. Discovering documentation for Java container classes. IEEE Trans. on Software Engineering, 2007, 33(8):526-543.[doi:10.1109/tse.2007.70705].
doi:10.1109/icse.2007.63]]]>
doi:10.1145/1368088.1368157]]]>
doi:10.1145/2635868.2635890]]]>
doi:10.1145/302405.302672]]]>
Robillard MP, Bodden E, Kawrykow D, Mezini M, Ratchford T. Automated API property inference techniques. IEEE Trans. on Software Engineering, 2013, 39(5):613-637.[doi:10.1109/tse.2012.63]
Engler D, Chen DY, Hallem S, Chou A, Chelf B. Bugs as deviant behavior:A general approach to inferring errors in systems code. SIGOPS Operating Systems Review, 2001, 35(5):57-72.[doi:10.1145/502059.502041]
doi:10.1007/978-3-642-32600-4_34]]]>
Agrawal R, Srikant R. Fast algorithms for mining association rules in large databases. In: Proc. of the 20th Int'l Conf. on Very Large Data Bases. San Francisco: Morgan Kaufmann Publishers Inc., 1994. 487-499.
doi:10.1109/msr.2007.3]]]>
doi:10.1145/1321631.1321708]]]>
doi:10.1109/icse.2009.5070548]]]>
doi:10.1145/1181775.1181808]]]>
doi:10.1145/1368088.1368157]]]>
doi:10.1109/ase.2008.35]]]>
Ammons G, Bod R, #237, Larus JR. Mining specifications. SIGPLAN Notices, 2002, 37(1):4-16.[doi:10.1145/565816.503275]
doi:10.1145/1273463.1273486]]]>
doi:10.1109/APSEC.2008.54]]]>
Meyer B. Applying "Design by Contract". Computer, 1992, 25(10):40-51.[doi:10.1109/2.161279]
doi:10.1145/302405.302467]]]>
doi:10.1145/1368088.1368127]]]>
Ernst MD, Perkins JH, Guo PJ, McCamant S, Pacheco C, Tschantz MS, Xiao C. The Daikon system for dynamic detection of likely invariants. Science of Computer Programming, 2007, 69(1-3):35-45.[doi:10.1016/j.scico.2007.01.015]
Flanagan C, Leino KRM. Houdini, an annotation assistant for ESC/Java. In: Proc. of the Int'l Symp. of Formal Methods Europe on Formal Methods for Increasing Software Productivity. London: Springer-Verlag, 2001. 500-517.
Guttag JV, Horning JJ. The algebraic specification of abstract data types. Acta informatica, 1978, 10(1):27-52.[doi:10.1007/bf 00260922]
Bagge AH, Haveraaen M. Specification of generic APIs, or:Why algebraic may be better than pre/post. Ada Letters, 2014, 34(3):71-80.[doi:10.1145/2692956.2663183]
doi:10.1145/2970276.2970356]]]>
doi:10.1145/2970276.2975940]]]>
doi:10.1109/wcre.2012.38]]]>
Thung F, Lo D, Lawall J. Automated library recommendation. In: Proc. of the 201320th Working Conf. on Reverse Engineering (WCRE). 2013. 182-191.
doi:10.1145/2970276.2970290]]]>
doi:10.1145/1137983.1137997]]]>
Hindle A, Barr ET, Su Z, Gabel M, Devanbu P. On the naturalness of software. In: Proc. of the 34th Int'l Conf. on Software Engineering. Piscataway: IEEE Press, 2012. 837-847.
Wang J, Dang Y, Zhang H, Chen K, Xie T, Zhang D. Mining succinct and high-coverage API usage patterns from source code. In: Proc. of the 10th Working Conf. on Mining Software Repositories. Piscataway: IEEE Press, 2013. 319-328.
Raychev V, Vechev M, Yahav E. Code completion with statistical language models. SIGPLAN Notices, 2014, 49(6):419-428.[doi:10.1145/2666356.2594321]
Nguyen AT, Nguyen TN. Graph-Based statistical language model for code. In: Proc. of the 37th Int'l Conf. on Software Engineering-Vol. 1. Piscataway: IEEE Press, 2015. 858-868.
doi:10.1145/2884781.2884873]]]>
doi:10.1145/2950290.2950319]]]>
doi:10.1145/2950290.2950334]]]>
Zhang C, Yang J, Zhang Y, Fan J, Zhang X, Zhao J, Ou P. Automatic parameter recommendation for practical API usage. In: Proc. of the 34th Int'l Conf. on Software Engineering. Piscataway: IEEE Press, 2012. 826-836.
doi:10.1109/icsm.2015.7332473]]]>
Dig D, Johnson R. How do APIs evolve a story of refactoring:Research articles. Journal of Software Maintenance and Evolution, 2006, 18(2):83-107.[doi:10.1002/smr.v18:2]
Dagenais B, Robillard MP. Recommending adaptive changes for framework evolution. ACM Transactions on Software Engineering and Methodology, 2011, 20(4):1-35.[doi:10.1145/2000799.2000805]
doi:10.1145/1806799.1806831]]]>
doi:10.1109/icse.2017.47]]]>
Wang W, Godfrey MW. Detecting API usage obstacles: A study of iOS and Android developer questions. In: Proc. of the 10th Working Conf. on Mining Software Repositories. Piscataway: IEEE Press, 2013. 61-64.
Agrawal R, Srikant R. Mining sequential patterns. In: Proc. of the 11th Int'l Conf. on Data Engineering. Washington: IEEE Computer Society, 1995. 3-14.
Srikant R, Agrawal R. Mining sequential patterns: Generalizations and performance improvements. In: Proc. of the 5th Int'l Conf. on Extending Database Technology: Advances in Database Technology. London: Springer-Verlag, 1996. 3-17.
Pei J, Han J, Mortazavi-Asl B, Pinto H, Chen Q, Dayal U, Hsu MC. PrefixSpan: Mining sequential patterns efficiently by prefix-projected pattern growth. In: Proc. of the 17th Int'l Conf. on Data Engineering. IEEE, 2001. 215-224.
Zaki MJ. SPADE:An efficient algorithm for mining frequent sequences. Machine Learning, 2001, 42(1-2):31-60.[doi:10.1023/a:1007652502315]
doi:10.1145/775047.775109]]]>
Wang J, Han J. BIDE: Efficient mining of frequent closed sequences. In: Proc. of the 20th Int'l Conf. on Data Engineering. Washington: IEEE Computer Society, 2004. 79.
doi:10.1145/2339530.2339606]]]>
Lam HT, Mörchen F, Fradkin D, Calders T. Mining compressing sequential patterns. Statistical Analysis and Data Mining:The ASA Data Science Journal, 2014, 7(1):34-52.
Rosenfeld R. Two decades of statistical language modeling:Where do we go from here? Proc. of the IEEE, 2000, 88(8):1270-1278.
doi:10.1145/2950290.2950333]]]>
Elman JL. Finding structure in time. Cognitive Science, 1990, 14(2):179-211.
Mikolov T, Karafiát M, Burget L, Cernocký J, Khudanpur S. Recurrent neural network based language model. In: Proc. of the INTERSPEECH 2010, Conf. of the Int'l Speech Communication Association. 2010. 1045-1048.
Cho K, Van Merriënboer B, Gulcehre C, Bahdanau D, Bougares F, Schwenk H, Bengio Y. Learning phrase representations using RNN encoder-decoder for statistical machine translation. In: Proc. of the EMNLP. 2014. 1724-1734.
doi:10.1145/2338965.2336785]]]>
doi:10.1145/2001420.2001448]]]>
Xing Z, Stroulia E. API-Evolution support with diff-CatchUp. IEEE Trans. on Software Engineering, 2007, 33(12):818-836.[doi:10.1109/tse.2007.70747]
doi:10.1007/11785477_24]]]>
doi:10.1145/1368088.1368153]]]>
doi:10.1109/ICPC.2013.6613843]]]>
McIlroy MD. Mass-Produced software components. In: Proc. of the 1st Int'l Conf. on Software Engineering. 1968. 88-98.
Parnas DL. On the criteria to be used in decomposing systems into modules. Communications of the ACM, 1972, 15(12):1053-1058.[doi:10.1145/361598.361623]
Plauger PJ. The Standard C Library. Prentice Hall PTR, 1991. 17-415.
doi:10.1145/2901318.2901341]]]>
doi:10.1145/2901318.2901350]]]>
Qiu D, Li B, Leung H. Understanding the API usage in Java. Information and Software Technology, 2016, 73(C):81-100.[doi:10.1016/j.infsof. 2016.01.011]
Bissyandé TF, Réveillère L, Lawall JL, Muller G. Ahead of time static analysis for automatic generation of debugging interfaces to the Linux kernel. Automated Software Engineering, 2016, 23(1):3-41.[doi:10.1007/s10515-014-0152-4]
doi:10.1145/2351676.2351686]]]>
Jezek K, Dietrich J, Brada P. How Java APIs break-An empirical study. Information and Software Technology, 2015, 65(C):129-146.[doi:10.1016/j.infsof.2015.02.014]
doi:10.1145/2970276.2970355]]]>
doi:10.1109/CSMR.2013.14]]]>
Businge J, Serebrenik A, van den Brand MGJ. Eclipse API usage:The good and the bad. Software Quality Journal, 2015, 23(1):107-141.[doi:10.1007/s11219-013-9221-3]
doi:10.1109/icsm.2012.6405295]]]>
doi:10.1109/icsm.2013.18]]]>
Bavota G, Linares-Vasquez M, Bernal-Cardenas CE, Di Penta M, Oliveto R, Poshyvanyk D. The impact of API change-and fault-proneness on the user ratings of android apps. IEEE Trans. on Software Engineering, 2015, 41(4):384-407.[doi:10.1109/TSE.2014. 2367027]
Li L, Bissyandé TF, Le Traon Y, Klein J. Accessing inaccessible android APIs: An empirical study. In: Proc. of the 2016 IEEE Int'l Conf. on Software Maintenance and Evolution (ICSME). IEEE, 2016. 411-422.
doi:10.1007/978-3-642-38980-1_17]]]>
Wang T, Lu K, Lu L, Chung S, Lee W. Jekyll on iOS: When benign apps become evil. In: Proc. of the 22nd USENIX Conf. on Security. Berkeley: USENIX Association, 2013. 559-572.
doi:10.1145/2810103.2813675]]]>
doi:10.1109/wcre.2011.26]]]>
doi:10.1109/icse.2007.85]]]>
doi:10.1145/1453101.1453117]]]>
doi:10.1145/1806799.1806848]]]>
Iyer S, Konstas I, Cheung A, Zettlemoyer L. Summarizing source code using a neural attention model. In: Proc. of the Meeting of the Association for Computational Linguistics. 2016. 2073-2083.