String attrUri = attrs.getURI(i); if (attrUri != null && !attrUri.equals("") && !attrUri.equals(uri)) { continue; // Ignore attributes from unknown uris } String key = attrs.getLocalName(i); String value = attrs.getValue(i);
String attrUri = attrs.getURI(i); if (attrUri != null && !attrUri.equals("") && !attrUri.equals(uri)) { continue; // Ignore attributes from unknown uris } String key = attrs.getLocalName(i); String value = attrs.getValue(i);
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/helper/ProjectHelper2.java File path: /apache-ant-1.7.0/src/org/apache/tools/ant/helper/ProjectHelper2.java
Method name: void onStartElement(String, String, String, Attributes, AntXMLContext) Method name: void onStartElement(String, String, String, Attributes, AntXMLContext)
Number of AST nodes: 5 Number of AST nodes: 5
1
String attrUri = attrs.getURI(i);
1
String attrUri = attrs.getURI(i);
2
                if (attrUri != null
2
                if (attrUri != null
3
                    && !attrUri.equals("")
3
                    && !attrUri.equals("")
4
                    && !attrUri.equals(uri)) {
4
                    && !attrUri.equals(uri)) {
5
                    continue; // Ignore attributes from unknown uris
5
                    continue; // Ignore attributes from unknown uris
6
                }
6
                }
7
                String key = attrs.getLocalName(i);
7
                String key = attrs.getLocalName(i);
8
                String value = attrs.getValue(i);
8
                String value = attrs.getValue(i);
Summary
Number of common nesting structure subtrees1
Number of refactorable cases0
Number of non-refactorable cases1
Time elapsed for finding largest common nesting structure subtrees (ms)0.5
Clones locationClones are in the same java file
Number of node comparisons14
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements5
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)1.6
    Clone typeType 1
    Mapped Statements
    ID Statement ID Statement
    6
    String attrUri = attrs.getURI(i);
    9
    String attrUri = attrs.getURI(i);
    7
    if (attrUri != null && !attrUri.equals("") && !attrUri.equals(uri))
    10
    if (attrUri != null && !attrUri.equals("") && !attrUri.equals(uri))
    8
    continue;
    8
    continue;
    11
    continue;
    Preondition Violations
    Statement continue; without innermost loop
    Statement continue; without innermost loop
    11
    continue;
    9
    String key = attrs.getLocalName(i);
    12
    String key = attrs.getLocalName(i);
    10
    String value = attrs.getValue(i);
    13
    String value = attrs.getValue(i);
    Precondition Violations (3)
    Row Violation
    1Statement continue; without innermost loop
    2Statement continue; without innermost loop
    3Clone fragment #1 returns variables key, value , while Clone fragment #2 returns variables key, value