Actively comparing clones inside the code editor

  • Authors:
  • Ferosh Jacob;Daqing Hou;Patricia Jablonski

  • Affiliations:
  • University of Alabama at Birmingham, Birmingham, AL;Clarkson University, Potsdam, NY;Clarkson University, Potsdam, NY

  • Venue:
  • Proceedings of the 4th International Workshop on Software Clones
  • Year:
  • 2010

Quantified Score

Hi-index 0.00

Visualization

Abstract

Tool support for code clones can improve software quality and maintainability. While significant research has been done in locating clones in existing source code, there has been less of a research focus on proactively tracking and supporting copy-paste-modify operations, even though copying and pasting is a major source of clone formation and the resulting clones are then often modified. We designed and implemented a programming editor, based on the Eclipse integrated development environment, named CSeR (Code Segment Reuse), which keeps a record of copy-and-paste-induced clones and then tracks and visualizes the changes made to a clone with distinct colors. The core of CSeR is an algorithm that actively compares two clones for detailed differences as a programmer edits either one of them. This edit-based comparison algorithm is unique to CSeR and produces more immediate, accurate, and natural results than other differencing tools.