2015 IntelligentCodeCompletionwithBa

From GM-RKB
Jump to navigation Jump to search

Subject Headings: Intelligent Code Completion System; Bayesian Network Based Intelligent Code Completion System; Code Completion System.

Notes

Cited By

Quotes

`

Abstract

Code completion is an integral part of modern Integrated Development Environments (IDEs). Developers often use it to explore Application Programming Interfaces (APIs). It is also useful to reduce the required amount of typing and to help avoid typos. Traditional code completion systems propose all type-correct methods to the developer. Such a list is often very long with many irrelevant items. More intelligent code completion systems have been proposed in prior work to reduce the list of proposed methods to relevant items.

 This work extends one of these existing approaches, the Best Matching Neighbor (BMN) algorithm. We introduce Bayesian networks as an alternative underlying model, use additional context information for more precise recommendations, and apply clustering techniques to improve model sizes. We compare our new approach, Pattern-based Bayesian Networks (PBN), to the existing BMN algorithm. We extend previously used evaluation methodologies and, in addition to prediction quality, we also evaluate model size and inference speed.

 Our results show that the additional context information we collect improves prediction quality, especially for queries that do not contain method calls. We also show that PBN can obtain comparable prediction quality to BMN, while model size and inference speed scale better with large input sizes.

1. Introduction

(...)

Intelligent code completions better target the needs of developers that are unfamiliar with an API. The FrUiT tool [Bruch et al. 2006] and its successor using the Best-Matching Neighbor (BMN) algorithm [Bruch et al. 2009], which resulted in Eclipse Code Recommenders[1], are examples of intelligent code completion systems. They use code repositories containing clients of an API to build a knowledge base that contains common usages for different types of that API. On a completion event, the models learned from the repositories are used to show relevant proposals. Besides the static type of the variable on which code completion is triggered, these systems also consider some structural context of the code being developed to select the models from which to extract the recommendations. The method within which the completion system was triggered is an example of such a structural context. (...)

2. Static Analysis Of Repositories

3. Models For Intelligent Code Completion

3.1. Best Matching Neighbor

3.2. Pattern-based Bayesian Network

4. Evaluation

4.1. Methodology

4.2. Analyzing Impact of Additional Context Information

4.3. Distance Thresholds of the Clustering for PBN

4.4. Scale to Large Input Sizes

4.5. Closer Look at the Prediction Quality

5. Threats To Validity

6. Related Work

7. Future Work

8. Conclusions

Acknowledgments

The work presented in this paper was partially funded by the German Federal Ministry of Education and Research (BMBF) within the Software Campus project KaVE, grant no. 01ISl2054, as well as within EC SPRIDE. The authors assume responsibility for the content. Special thanks to Andreas Sewe and Sarah Nadi for valuable feedback on this paper.

Footnotes

References

;

 AuthorvolumeDate ValuetitletypejournaltitleUrldoinoteyear
2015 IntelligentCodeCompletionwithBaMira Mezini
Sebastian Proksch
Johannes Lerch
Intelligent Code Completion with Bayesian Networks10.1145/27442002015