TestCommand command1 = new TestCommand(this, 1); command1.setPriority(Command.NORMAL_PRIORITY); processor.addOp(command1, Command.FIRST_EXECUTION); TestCommand command2 = new TestCommand(this, 2); command2.setPriority(Command.NORMAL_PRIORITY); command2.setSynchronize(true); processor.addOp(command2, Command.FIRST_EXECUTION); processor.startOperation();
TestCommand command1 = new TestCommand(this, 1); command1.setPriority(Command.NORMAL_PRIORITY); processor.addOp(command1, Command.FIRST_EXECUTION); TestCommand command2 = new TestCommand(this, 2); command2.setPriority(Command.NORMAL_PRIORITY); command2.setSynchronize(true); processor.addOp(command2, Command.FIRST_EXECUTION); processor.startOperation();
Clone fragments detected by clone detection tool
File path: /columba-1.4-src/core/src/test/java/org/columba/core/command/DefaultProcessorTest.java File path: /columba-1.4-src/core/src/test/java/org/columba/core/command/DefaultProcessorTest.java
Method name: void testRunOne() Method name: void testRunMultiple()
Number of AST nodes: 8 Number of AST nodes: 8
1
TestCommand command1 = new TestCommand(this, 1);
1
TestCommand command1 = new TestCommand(this, 1);
2
		command1.setPriority(Command.NORMAL_PRIORITY);
2
		command1.setPriority(Command.NORMAL_PRIORITY);
3
		processor.addOp(command1, Command.FIRST_EXECUTION);
3
		processor.addOp(command1, Command.FIRST_EXECUTION);
4
		TestCommand command2 = new TestCommand(this, 2);
4
		TestCommand command2 = new TestCommand(this, 2);
5
		command2.setPriority(Command.NORMAL_PRIORITY);
5
		command2.setPriority(Command.NORMAL_PRIORITY);
6
		command2.setSynchronize(true);
6
		command2.setSynchronize(true);
7
		processor.addOp(command2, Command.FIRST_EXECUTION);
7
		processor.addOp(command2, Command.FIRST_EXECUTION);
8
		processor.startOperation();
8
		processor.startOperation();
Summary
Number of common nesting structure subtrees1
Number of refactorable cases1
Number of non-refactorable cases0
Time elapsed for finding largest common nesting structure subtrees (ms)0.0
Clones locationClones are declared in the same class
Number of node comparisons28
  1. {Refactorable}
    Mapping Summary
    Number of mapped statements8
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)0.0
    Clone typeType 1
    Mapped Statements
    ID Statement ID Statement
    2
    TestCommand command1 = new TestCommand(this, 1);
    2
    TestCommand command1 = new TestCommand(this, 1);
    3
    command1.setPriority(Command.NORMAL_PRIORITY);
    3
    command1.setPriority(Command.NORMAL_PRIORITY);
    4
    processor.addOp(command1, Command.FIRST_EXECUTION);
    4
    processor.addOp(command1, Command.FIRST_EXECUTION);
    5
    TestCommand command2 = new TestCommand(this, 2);
    5
    TestCommand command2 = new TestCommand(this, 2);
    6
    command2.setPriority(Command.NORMAL_PRIORITY);
    6
    command2.setPriority(Command.NORMAL_PRIORITY);
    7
    command2.setSynchronize(true);
    7
    command2.setSynchronize(true);
    8
    processor.addOp(command2, Command.FIRST_EXECUTION);
    8
    processor.addOp(command2, Command.FIRST_EXECUTION);
    9
    processor.startOperation();
    9
    processor.startOperation();
    Precondition Violations (0)
    Row Violation