Internet-scale Real-time Code Clone Search Via Multi-level Indexing

Iman Keivanloo, Juergen Rilling, Philippe Charland
2011 2011 18th Working Conference on Reverse Engineering  
Finding lines of code similar to a code fragment across large knowledge bases in fractions of a second is a new branch of code clone research also known as real-time code clone search. Among the requirements real-time code clone search has to meet are scalability, short response time, scalable incremental corpus updates, and support for type-1, type-2, and type-3 clones. We conducted a set of empirical studies on a large open source code corpus to gain insight about its characteristics. We used
more » ... these results to design and optimize a multi-level indexing approach using hash table-based and binary search to improve Internet-scale real-time code clone search response time. Finally, we performed an evaluation on an Internet-scale corpus (1.5 million Java files and 266 MLOC). Our approach maintains a response time for 99.9% of clone searches in the microseconds range, while supporting the aforementioned requirements.
doi:10.1109/wcre.2011.13 dblp:conf/wcre/KeivanlooRC11 fatcat:avzefpsrwrbyxpmlkicdrfhc7e