首页> 外文会议>Machine Learning and Knowledge Extraction >Detecting and Ranking API Usage Pattern in Large Source Code Repository: A LFM Based Approach
【24h】

Detecting and Ranking API Usage Pattern in Large Source Code Repository: A LFM Based Approach

机译:在大型源代码存储库中对API使用模式进行检测和排名:一种基于LFM的方法

获取原文
获取原文并翻译 | 示例
获取外文期刊封面目录资料

摘要

Code examples are key resources for helping programmers to learn correct Application Programming Interface (API) usages efficiently. However, most framework and library APIs fail in providing sufficient and adequate code examples in corresponding official documentations. Thus, it takes great programmers' efforts to browse and extract API usage examples from websites. To reduce such effort, this paper proposes a graph-based pattern-oriented mining approach, LFM-OUPD (Local fitness measure for detecting overlapping usage patterns) for API usage facility, that recommends proper API code examples from data analytics. API method queries are accepted from programmers and corresponding code files are collected from related API dataset. The detailed structural links among API method elements in conceptual source codes are captured and generate a code graph structure. Lancichinetti et al. proposed an overlapping community detecting algorithm (Local fitness measure, LFM), based on the local optimization of a fitness function. In LFM-OUPD, a mining algorithm based on LFM is presented to explore the division of method sequences in the directed source code element graph and detect candidates of different API usage patterns. Then a ranking approach is applied to obtain appropriate API usage pattern and code example candidates. A case study on Google Guava is conducted to evaluate the effectiveness of this approach.
机译:代码示例是帮助程序员有效学习正确的应用程序编程接口(API)用法的关键资源。但是,大多数框架和库API未能在相应的官方文档中提供足够充分的代码示例。因此,需要大量的程序员努力才能从网站上浏览和提取API使用示例。为了减少此类工作,本文提出了一种基于图的面向模式的挖掘方法,即用于API使用工具的LFM-OUPD(用于检测重叠使用模式的局部适应性度量),该方法从数据分析中推荐了正确的API代码示例。程序员接受API方法查询,并从相关API数据集中收集相应的代码文件。捕获概念性源代码中API方法元素之间的详细结构链接,并生成代码图结构。 Lancichinetti等。基于适应度函数的局部优化,提出了一种重叠的社区检测算法(局部适应度测度,LFM)。在LFM-OUPD中,提出了一种基于LFM的挖掘算法,以探索有向源代码元素图中的方法序列划分,并检测不同API使用模式的候选对象。然后,应用排名方法以获得适当的API使用模式和代码示例候选。在Google Guava上进行了案例研究,以评估这种方法的有效性。

著录项

相似文献

  • 外文文献
  • 中文文献
  • 专利
获取原文

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号