Clone-based code method usage pattern mining
Open Access
- 16 May 2022
- conference paper
- Published by Association for Computing Machinery (ACM)
- Vol. 19, 543-547
Abstract
When programmers retrieve a code method and want to reuse it, they need to understand the usage patterns of the retrieved method. However, it is difficult to obtain usage information of the retrieved method since this method may only have a brief comment and few available usage examples. In this paper, we propose an approach, called LUPIN (cLone-based Usage Pattern mIniNg), to mine the usage patterns of these methods, which do not widely appeared in the code repository. The key idea of LUPIN is that the cloned code of the target method may have a similar usage pattern, and we can collect more usage information of the target method from cloned code usage examples. From the amplified usage examples, we mine the usage pattern of the target method by frequent subsequence mining after program slicing and code normalization. Our evaluation shows that LUPIN can mine four categories of usage patterns with an average precision of 0.65.Keywords
All Related Versions
Funding Information
- National Nature Science Foundation of China (61872373)
This publication has 17 references indexed in Scilit:
- CloneWorks: A Fast and Flexible Large-Scale Near-Miss Clone Detection Tool2017
- Towards Building API Usage Example Metrics2016
- PortfolioACM Transactions on Software Engineering and Methodology, 2013
- Mining succinct and high-coverage API usage patterns from source code2013
- How Good is Your Comment? A Study of Comments in Java Programs2011
- Graph-based mining of multiple object usage patterns2009
- MAPO: Mining and Recommending API Usage Patterns2009
- Context-based detection of clone-related bugs2007
- CP-Miner: finding copy-paste and related bugs in large-scale software codeIEEE Transactions on Software Engineering, 2006
- Program SlicingIEEE Transactions on Software Engineering, 1984