if (!validSegments(segments)) { String s = segments == null ? "invalid segments: null" : "invalid segment: " + firstInvalidSegment(segments); throw new IllegalArgumentException(s); }
if (!validSegments(segments)) { String s = segments == null ? "invalid segments: null" : "invalid segment: " + firstInvalidSegment(segments); throw new IllegalArgumentException(s); }
Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/common/util/URI.java File path: /emf-2.4.1/src/org/eclipse/emf/common/util/URI.java
Method name: void validateURI(boolean, String, String, String, boolean, String[], String, String) Method name: URI appendSegments(String[])
Number of AST nodes: 3 Number of AST nodes: 3
1
if (!validSegments(segments))
1
if (!validSegments(segments))
2
    {
2
    {
3
      String s = segments == null ? "invalid segments: null" :
3
      String s = segments == null ? "invalid segments: null" :
4
        "invalid segment: " + firstInvalidSegment(segments);
4
        "invalid segment: " + firstInvalidSegment(segments);
5
      throw new IllegalArgumentException(s);
5
      throw new IllegalArgumentException(s);
6
    }
6
    }
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.2
Clones locationClones are declared in the same class
Number of node comparisons9
  1. {Refactorable}
    Mapping Summary
    Number of mapped statements3
    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.8
    Clone typeType 1
    Mapped Statements
    ID Statement ID Statement
    11
    if (!validSegments(segments))
    1
    if (!validSegments(segments))
    12
    String s = segments == null ? "invalid segments: null" : "invalid segment: " + firstInvalidSegment(segments);
    2
    String s = segments == null ? "invalid segments: null" : "invalid segment: " + firstInvalidSegment(segments);
    13
    throw new IllegalArgumentException(s);
    3
    throw new IllegalArgumentException(s);
    Precondition Violations (0)
    Row Violation