Are you sure you are using this method correctly? Usage Pattern Mining of Code Methods

Zhipeng Xue, Chen Zeng, Chenglong Zhou, Yangtao Ge, Lei Wang

Programmers sometimes need to use some methods they are not familiar with like methods from other projects or written by others. However, it is hard to obtain usage information of a general method that is not a commonly used API or in the project with high impact, since this method may only have a brief comment and several usage examples. In this paper, we propose an approach to mine the usage information of a general method. Our approach collects the usage examples not only from the target method but also from its cloned methods. Based on the usage examples, we mine the usage of the target method by frequent subsequence mining technology after program slicing and code normalization. Our evaluation shows that our approach can mine 4 types of usage with an average precision of 0.65.

picture_as_pdf flag

Knowledge Graph

arrow_drop_up

Comments

Sign up or login to leave a comment