XSnippet

Author:

Sahavechaphan Naiyana1,Claypool Kajal2

Affiliation:

1. National Electronics and Computer Technology Center, Thailand

2. Oracle Corporation, Nashua, NH

Abstract

It is common practice for software developers to use examples to guide development efforts. This largely unwritten, yet standard, practice of "develop by example" is often supported by examples bundled with library or framework packages, provided in textbooks, and made available for download on both official and unofficial web sites. However, the vast number of examples that are embedded in the billions of lines of already developed library and framework code are largely untapped. We have developed XSnippet , a context-sensitive code assistant framework that allows developers to query a sample repository for code snippets that are relevant to the programming task at hand. In particular, our work makes three primary contributions. First, a range of queries is provided to allow developers to switch between a context-independent retrieval of code snippets to various degrees of context-sensitive retrieval for object instantiation queries. Second, a novel graph-based code mining algorithm is provided to support the range of queries and enable mining within and across method boundaries. Third, an innovative context-sensitive ranking heuristic is provided that has been experimentally proven to provide better ranking for best-fit code snippets than context-independent heuristics such as shortest path and frequency. Our experimental evaluation has shown that XSnippet has significant potential to assist developers, and provides better coverage of tasks and better rankings for best-fit snippets than other code assistant systems.

Publisher

Association for Computing Machinery (ACM)

Subject

Computer Graphics and Computer-Aided Design,Software

Reference19 articles.

1. How reuse influences productivity in object-oriented systems

2. Algorithm for documents ranking

3. P. Freeman. Software Reusability. IEEE Computer Society Press 10662 Los Vaqueros Circle Los Alamitos CA 90720 USA 1987. P. Freeman. Software Reusability. IEEE Computer Society Press 10662 Los Vaqueros Circle Los Alamitos CA 90720 USA 1987.

4. Software component search

Cited by 98 articles. 订阅此论文施引文献 订阅此论文施引文献,注册后可以免费订阅5篇论文的施引文献,订阅后可以查看论文全部施引文献

1. ASTSDL: predicting the functionality of incomplete programming code via an AST-sequence-based deep learning model;Science China Information Sciences;2023-12-27

2. Big Code Search: A Bibliography;ACM Computing Surveys;2023-08-26

3. An empirical study on API usages from code search engine and local library;Empirical Software Engineering;2023-04-13

4. Context-aware code recommendation in Intellij IDEA;Proceedings of the 30th ACM Joint European Software Engineering Conference and Symposium on the Foundations of Software Engineering;2022-11-07

5. Generating Examples from CLI Usage: Can Transformers Help?;Proceedings of the 28th ACM SIGKDD Conference on Knowledge Discovery and Data Mining;2022-08-14

同舟云学术

1.学者识别学者识别

2.学术分析学术分析

3.人才评估人才评估

"同舟云学术"是以全球学者为主线,采集、加工和组织学术论文而形成的新型学术文献查询和分析系统,可以对全球学者进行文献检索和人才价值评估。用户可以通过关注某些学科领域的顶尖人物而持续追踪该领域的学科进展和研究前沿。经过近期的数据扩容,当前同舟云学术共收录了国内外主流学术期刊6万余种,收集的期刊论文及会议论文总量共计约1.5亿篇,并以每天添加12000余篇中外论文的速度递增。我们也可以为用户提供个性化、定制化的学者数据。欢迎来电咨询!咨询电话:010-8811{复制后删除}0370

www.globalauthorid.com

TOP

Copyright © 2019-2024 北京同舟云网络信息技术有限公司
京公网安备11010802033243号  京ICP备18003416号-3