if (Boolean.TRUE.equals(clause.enableSystemAssertions)) { getProject().log("Enabling system assertions", Project.MSG_DEBUG); commandList.add("-enablesystemassertions"); } else if (Boolean.FALSE.equals(clause.enableSystemAssertions)) { getProject().log("disabling system assertions", Project.MSG_DEBUG); commandList.add("-disablesystemassertions"); }
if (Boolean.TRUE.equals(clause.enableSystemAssertions)) { getProject().log("Enabling system assertions", Project.MSG_DEBUG); commandIterator.add("-enablesystemassertions"); } else if (Boolean.FALSE.equals(clause.enableSystemAssertions)) { getProject().log("disabling system assertions", Project.MSG_DEBUG); commandIterator.add("-disablesystemassertions"); }
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/types/Assertions.java File path: /apache-ant-1.7.0/src/org/apache/tools/ant/types/Assertions.java
Method name: void applyAssertions(List) Method name: void applyAssertions(ListIterator)
Number of AST nodes: 6 Number of AST nodes: 6
1
if (Boolean.TRUE.equals(clause.enableSystemAssertions)) {
1
if (Boolean.TRUE.equals(clause.enableSystemAssertions)) {
2
            getProject().log("Enabling system assertions", Project.MSG_DEBUG);
2
            getProject().log("Enabling system assertions", Project.MSG_DEBUG);
3
            commandList.add("-enablesystemassertions");
3
            commandIterator.add("-enablesystemassertions");
4
        } else if (Boolean.FALSE.equals(clause.enableSystemAssertions)) {
4
        } else if (Boolean.FALSE.equals(clause.enableSystemAssertions)) {
5
            getProject().log("disabling system assertions", Project.MSG_DEBUG);
5
            getProject().log("disabling system assertions", Project.MSG_DEBUG);
6
            commandList.add("-disablesystemassertions");
6
            commandIterator.add("-disablesystemassertions");
7
        }
7
        }
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.4
Clones locationClones are declared in the same class
Number of node comparisons28
  1. {Refactorable}
    Mapping Summary
    Number of mapped statements4
    Number of unmapped statements in the first code fragment2
    Number of unmapped statements in the second code fragment2
    Time elapsed for statement mapping (ms)1.1
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    3
    if (Boolean.TRUE.equals(clause.enableSystemAssertions))
    3
    if (Boolean.TRUE.equals(clause.enableSystemAssertions))
    4
    getProject().log("Enabling system assertions", Project.MSG_DEBUG);
    4
    getProject().log("Enabling system assertions", Project.MSG_DEBUG);
                                                                                                        
    5
    commandIterator.add("-enablesystemassertions");
    5
    commandList.add("-enablesystemassertions");
                                                                                                
    6
    else if (Boolean.FALSE.equals(clause.enableSystemAssertions))
    6
    else if (Boolean.FALSE.equals(clause.enableSystemAssertions))
    7
    getProject().log("disabling system assertions", Project.MSG_DEBUG);
    7
    getProject().log("disabling system assertions", Project.MSG_DEBUG);
                                                                                                          
    8
    commandIterator.add("-disablesystemassertions");
    8
    commandList.add("-disablesystemassertions");
                                                                                                  
    Precondition Violations (0)
    Row Violation