Abstract
“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.
•“Code completion” is an important feature of code editors.•Code clones are traditionally neglected as part of code completion in code editor.•To facilitate code clone reuse, we propose a software tool, called Clone-Writer.•The tool helps develop code swiftly by recommending code clones.