Ontology-based code snippets management in a cloud environment

Jianjun Shi, Weixing Ji*, Zhiwei Gao, Yujin Gao, Yizhuo Wang, Xinyi Liao, Feng Shi

*此作品的通讯作者

科研成果: 期刊稿件文章同行评审

1 引用 (Scopus)

摘要

A code snippet is a small region of reusable source code that is common to many functions. Skilled management and reuse of snippets can improve programming efficiency in practice. However, we find that most snippets are posted to online blogs or snippet management systems with little description and tagging, which leads to an embarrassing situation in which existing snippets are difficult to reuse. This occurs because snippets are usually hastily pushed to online services or saved in text files by programmers and also because existing management systems do not provide efficient labeling and reusing frameworks. In this paper, we propose to annotate snippets with a well-formed domain-specific ontology—programming ontology. With a thorough investigation of real world snippets, we designed a programming ontology to annotate and recommend snippets. We show how to annotate a snippet with ontology terms based on text classification models. In addition, we built a snippet management system that stores user snippets in the cloud and automatically recommends snippets, so that the retrieval of snippets becomes trivial in popular integrated developing environments, such as Eclipse and Visual Studio. Our evaluation results demonstrate that the ontology annotation algorithm is able to automatically annotate a snippet with a high degree of accuracy. The shared domain knowledge also makes it possible to share snippets among programmers and systems. As the number of labeled snippets increases, deep learning models can be trained and used to annotate code snippets with high accuracy.

源语言英语
页(从-至)2971-2985
页数15
期刊Journal of Ambient Intelligence and Humanized Computing
10
8
DOI
出版状态已出版 - 1 8月 2019

指纹

探究 'Ontology-based code snippets management in a cloud environment' 的科研主题。它们共同构成独一无二的指纹。

引用此