API code recommendation using statistical learning from fine-grained changes
@article{Nguyen2016APICR, title={API code recommendation using statistical learning from fine-grained changes}, author={Anh Tuan Nguyen and Michael C Hilton and Mihai Codoban and Hoan Anh Nguyen and Lily Mast and Eli Rademacher and Tien Nhut Nguyen and Danny Dig}, journal={Proceedings of the 2016 24th ACM SIGSOFT International Symposium on Foundations of Software Engineering}, year={2016} }
Learning and remembering how to use APIs is difficult. While code-completion tools can recommend API methods, browsing a long list of API method names and their documentation is tedious. Moreover, users can easily be overwhelmed with too much information. We present a novel API recommendation approach that taps into the predictive power of repetitive code changes to provide relevant API recommendations for developers. Our approach and tool, APIREC, is based on statistical learning from fine…
Figures and Tables from this paper
109 Citations
Effective API Recommendation without Historical Software Repositories
- Computer Science2018 33rd IEEE/ACM International Conference on Automated Software Engineering (ASE)
- 2018
Empirical evaluation on a large corpus of open source projects shows that RecRank significantly improves top-1 API recommendation accuracy and mean reciprocal rank when compared to state-of-the-art API recommendation approaches.
Revisiting, Benchmarking and Exploring API Recommendation: How Far Are We?
- Computer ScienceArXiv
- 2021
This paper revisits the API recommendation task and groups the approaches into two categories according to the task definition, i.e., query-based API recommendation and code- based API recommendation, and builds a benchmark named APIBench, which distill some actionable insights and challenges for API recommendation.
Generative API usage code recommendation with parameter concretization
- Computer ScienceScience China Information Sciences
- 2019
An engine called DeepAPIRec is developed, which automatically recommends the API usage code for Java programs based on a tree-based long short-term memory (LSTM) neural network inspired by recent developments in the machine-learning community.
Learning APIs through Mining Code Snippet Examples
- Computer Science
- 2020
A Bi-LSTM based encoder-decoder model with attention mechanism and beam search, DAMCA is proposed that takes all three lexical, syntactic and semantic contexts of a method call and returns a list of method call sequences as the completion suggestions.
APIRecX: Cross-Library API Recommendation via Pre-Trained Language Model
- Computer ScienceEMNLP
- 2021
APIRecX is proposed, the first cross-library API recommendation approach, which uses BPE to split each API call in each API sequence and pre-trains a GPT based language model, and then recommends APIs by fine-tuning the pre-trained model.
Query expansion based on statistical learning from code changes
- Computer ScienceSoftw. Pract. Exp.
- 2018
It is discovered that code changes can imply what users want and proposed a novel query expansion technique with code changes (QECC), which exploits (changes, contexts) pairs from changed methods and recommends the query results that meet actual needs perfectly.
Personalized API Recommendations
- Computer ScienceInt. J. Softw. Eng. Knowl. Eng.
- 2021
This work proposes a personalized API recommendation method that considers developers’ differences and achieves better accuracy in recommending both library APIs and self-defined APIs compared with the state-of-the-art.
An analysis of correctness for API recommendation: are the unmatched results useless?
- Computer ScienceScience China Information Sciences
- 2020
The online evaluation confirms that some unmatched APIs can also benefit to programming due to the functional correlation with ground-truth APIs, and proposes an approach to improve the measurement of correctness based on API functional correlation.
Holistic Combination of Structural and Textual Code Information for Context based API Recommendation
- Computer ScienceArXiv
- 2020
APIRec-CST is a deep learning model that combines the API usage with the text information in the source code based on an API Context Graph Network and a Code Token Network that simultaneously learn structural and textual features for API recommendation.
Learning from Examples to Find Fully Qualified Names of API Elements in Code Snippets
- Computer Science2019 34th IEEE/ACM International Conference on Automated Software Engineering (ASE)
- 2019
This paper proposes a novel context-sensitive technique, called COSTER, to resolve FQNs of API elements in such code snippets, which significantly reduces the training time compared to the StatType, a state-of-the-art technique, without sacrificing accuracy.
References
SHOWING 1-10 OF 55 REFERENCES
Automatic recommendation of API methods from feature requests
- Computer Science2013 28th IEEE/ACM International Conference on Automated Software Engineering (ASE)
- 2013
This work proposes an automated approach that takes as input a textual description of a feature request, and recommends methods in library APIs that developers can use to implement the feature.
Automatic parameter recommendation for practical API usage
- Computer Science2012 34th International Conference on Software Engineering (ICSE)
- 2012
An automated technique, called Precise, is proposed, which mines existing code bases, uses an abstract usage instance representation for each API usage example, and then builds a parameter usage database and generates parameter candidates by concretizing the instances adaptively.
ExPort: Detecting and visualizing API usages in large source code repositories
- Computer Science2013 28th IEEE/ACM International Conference on Automated Software Engineering (ASE)
- 2013
This paper presents a technique for automatically mining and visualizing API usage examples capable of finding examples of API usage that occur across several functions in a program by representing software as a Relational Topic Model.
Exploring API method parameter recommendations
- Computer Science2015 IEEE International Conference on Software Maintenance and Evolution (ICSME)
- 2015
A study is presented that helps to understand how developers complete method parameters and a recommendation technique is developed, called Parc, that collects parameter usage context using a source code localness property that suggests that developers tend to collocate related code fragments.
Mining fine-grained code changes to detect unknown change patterns
- Computer ScienceICSE
- 2014
This work presents the first approach that identifies previously unknown frequent code change patterns from a fine-grained sequence of code changes, and effectively handles challenges that distinguish continuous code change pattern mining from the existing data mining techniques.
A Dataset for API Usage
- Computer Science2015 IEEE/ACM 12th Working Conference on Mining Software Repositories
- 2015
This work introduces an approach that takes type information into account while mining API method invocations and annotation usages, and accurately makes a connection between a method invocation and the class of the API to which the method belongs to.
Using Structure-Based Recommendations to Facilitate Discoverability in APIs
- Computer ScienceECOOP
- 2011
The results provide evidence that relevant API elements not accessible from the type a developer is working with could be efficiently located through guidance based on structural relationships, and help developers overcome discoverability hurdles in multiple tasks and various contexts.
An evaluation of the strategies of sorting, filtering, and grouping API methods for Code Completion
- Computer Science2011 27th IEEE International Conference on Software Maintenance (ICSM)
- 2011
Three ways to enhance the current code-completion systems to work more effectively with large APIs are proposed, including two methods for sorting APIs, by type hierarchy and by use count, and a proposal to group API proposals by their functional roles which can help maintain a well-ordered, meaningful list of API proposals in the presence of dynamic reordering.
Lase: Locating and applying systematic edits by learning from examples
- Computer Science2013 35th International Conference on Software Engineering (ICSE)
- 2013
The results indicate that LASE should help developers in automating systematic editing, as it is the first to do both for nontrivial program edits.
Mining source code repositories at massive scale using language modeling
- Computer Science2013 10th Working Conference on Mining Software Repositories (MSR)
- 2013
This paper builds the first giga-token probabilistic language model of source code, based on 352 million lines of Java, and proposes new metrics that measure the complexity of a code module and the topical centrality of a module to a software project.