if (endOfBaseName < 0) { // baseNameTerminator not found: the descriptor use the // JOnAS naming convention, ie [Foo.xml,jonas-Foo.xml] and // not [Foo<baseNameTerminator>-ejb-jar.xml, // Foo<baseNameTerminator>-jonas-ejb-jar.xml]. endOfBaseName = descriptorName.lastIndexOf('.') - 1; if (endOfBaseName < 0) { // no . found endOfBaseName = descriptorName.length() - 1; } jonasConvention = true; }
if (endOfBaseName < 0) { endOfBaseName = descriptorName.lastIndexOf('.') - 1; if (endOfBaseName < 0) { endOfBaseName = descriptorName.length() - 1; } }
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/optional/ejb/JonasDeploymentTool.java File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/optional/ejb/IPlanetDeploymentTool.java
Method name: String getJonasDescriptorName() Method name: String getIasDescriptorName()
Number of AST nodes: 5 Number of AST nodes: 4
1
if (endOfBaseName < 0) {
1
if (endOfBaseName < 0) {
2
            // baseNameTerminator not found: the descriptor use the
2
    
3
            // JOnAS naming convention, ie [Foo.xml,jonas-Foo.xml] and
4
            // not [Foo<baseNameTerminator>-ejb-jar.xml,
5
            // Foo<baseNameTerminator>-jonas-ejb-jar.xml].
6
            endOfBaseName = descriptorName.lastIndexOf('.') - 1;
3
            endOfBaseName = descriptorName.lastIndexOf('.') - 1;
7
            if (endOfBaseName < 0) {
4
                if (endOfBaseName < 0) {
8
                // no . found
5
           
9
                endOfBaseName = descriptorName.length() - 1;
6
         endOfBaseName = descriptorName.length() - 1;
10
            }
7
            
11
    
8
    }
12
        jonasConvention = true;
9
    
13
        }
10
        }
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.1
Clones locationClones are in different classes having the same super class
Number of node comparisons10
  1. {Refactorable}
    Mapping Summary
    Number of mapped statements4
    Number of unmapped statements in the first code fragment1
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)0.6
    Clone typeType 3
    Mapped Statements
    ID Statement ID Statement
    16
    if (endOfBaseName < 0)
    13
    if (endOfBaseName < 0)
    17
    endOfBaseName = descriptorName.lastIndexOf('.') - 1;
    14
    endOfBaseName = descriptorName.lastIndexOf('.') - 1;
    18
    if (endOfBaseName < 0)
    15
    if (endOfBaseName < 0)
    19
    endOfBaseName = descriptorName.length() - 1;
    16
    endOfBaseName = descriptorName.length() - 1;
    20
    jonasConvention = true;
                                                      
    Precondition Violations (0)
    Row Violation