Clone-Writer: An effective editor for developing code by using code clones

Hammad, Muhammad; Babur, Önder; Basit, Hamid Abdul; Brand, Mark van den


“Code completion” is an important feature of code editors. Such editors usually provide recommendations in terms of next likely code token(s) of fixed length on the basis of code written so far. Code clones (similar code fragments), which play an important role in rapid development, are traditionally neglected as part of code completion. To facilitate code clone reuse, we propose an automated software development tool, called Clone-Writer. The tool helps develop code swiftly by recommending code clones on the basis of code written so far. Moreover, developers can perform code clone search based on a search query written either as source code terms, or as natural language. The tool also contains different visualization features supporting code completion. We have evaluated our tool by considering the classification framework of visualization methods along with user goals and information needs.