archiveSeparator = urlString.indexOf("!/", archiveSeparator + 2); if (archiveSeparator < 0) { throw new MalformedURLException("too few archive separators " + urlString); } ++i;
archiveSeparator = specification.indexOf("!/", archiveSeparator + 2); if (archiveSeparator < 0) { throw new IllegalArgumentException("too few archive separators " + specification); }
Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/common/archive/ArchiveURLConnection.java File path: /emf-2.4.1/src/org/eclipse/emf/common/archive/Handler.java
Method name: String getNestedURL() Method name: void parseURL(URL, String, int, int)
Number of AST nodes: 4 Number of AST nodes: 3
1
archiveSeparator = urlString.indexOf("!/", archiveSeparator + 2);
1
archiveSeparator = specification.indexOf("!/", archiveSeparator + 2);
2
        if (archiveSeparator < 0)
2
      if (archiveSeparator < 0)
3
        {
3
      
4
  
4
{
5
        throw new MalformedURLException("too few archive separators " + urlString);
5
        throw new IllegalArgumentException("too few archive separators " + 
6
        }
7
        ++i;
6
specification);
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.1
Clones locationClones are in different classes
Number of node comparisons7
  1. {Refactorable}
    Mapping Summary
    Number of mapped statements3
    Number of unmapped statements in the first code fragment1
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)1.0
    Clone typeType 3
    Mapped Statements
    ID Statement ID Statement
    10
    archiveSeparator = urlString.indexOf("!/", archiveSeparator + 2);
    10
    archiveSeparator = urlString.indexOf("!/", archiveSeparator + 2);
    8
    archiveSeparator = specification.indexOf("!/", archiveSeparator + 2);
    Differences
    Expression1Expression2Difference
    urlStringspecificationVARIABLE_NAME_MISMATCH
    8
    archiveSeparator = specification.indexOf("!/", archiveSeparator + 2);
    11
    if (archiveSeparator < 0)
    9
    if (archiveSeparator < 0)
    12
    throw new MalformedURLException("too few archive separators " + urlString);
    12
    throw new MalformedURLException("too few archive separators " + urlString);
    10
    throw new IllegalArgumentException("too few archive separators " + specification);
    Differences
    Expression1Expression2Difference
    java.net.MalformedURLExceptionjava.lang.IllegalArgumentExceptionSUBCLASS_TYPE_MISMATCH
    urlStringspecificationVARIABLE_NAME_MISMATCH
    10
    throw new IllegalArgumentException("too few archive separators " + specification);
    13
    ++i;
                    
    Precondition Violations (0)
    Row Violation