s = str.get(i).toString(); if(prefixLength >= s.length()) break loop; if(!compareChars(s.charAt(prefixLength),ch,ignoreCase)) break loop;
String s = str[i].toString(); if(prefixLength >= s.length()) break loop; if(!compareChars(s.charAt(prefixLength),ch,ignoreCase)) break loop;
Clone fragments detected by clone detection tool
File path: /jEdit-4.2/src/org/gjt/sp/jedit/MiscUtilities.java File path: /jEdit-4.2/src/org/gjt/sp/jedit/MiscUtilities.java
Method name: String getLongestPrefix(List, boolean) Method name: String getLongestPrefix(Object[], boolean)
Number of AST nodes: 5 Number of AST nodes: 5
1
s = str.get(i).toString();
1
String s = str[i].toString();
2
				if(prefixLength >= s.length())
2
				if(prefixLength >= s.length())
3
					break loop;
3
					break loop;
4
				if(!compareChars(s.charAt(prefixLength),ch,ignoreCase))
4
				if(!compareChars(s.charAt(prefixLength),ch,ignoreCase))
5
					break loop;
5
					break loop;
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 declared in the same class
Number of node comparisons17
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements4
    Number of unmapped statements in the first code fragment1
    Number of unmapped statements in the second code fragment1
    Time elapsed for statement mapping (ms)0.7
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
                                                                  
    10
    String s = str[i].toString();
    Preondition Violations
    Unmatched statement String s=str[i].toString(); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    10
    String s = str[i].toString();
    10
    s = str.get(i).toString();
    10
    s = str.get(i).toString();
    Preondition Violations
    Unmatched statement s=str.get(i).toString(); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
                                                            
    11
    if (prefixLength >= s.length())
    11
    if (prefixLength >= s.length())
    12
    break loop;
    12
    break loop;
    12
    break loop;
    Preondition Violations
    Statement break loop; without innermost loop
    Statement break loop; without innermost loop
    12
    break loop;
    13
    if (!compareChars(s.charAt(prefixLength), ch, ignoreCase))
    13
    if (!compareChars(s.charAt(prefixLength), ch, ignoreCase))
    14
    break loop;
    14
    break loop;
    14
    break loop;
    Preondition Violations
    Statement break loop; without innermost loop
    Statement break loop; without innermost loop
    14
    break loop;
    Precondition Violations (6)
    Row Violation
    1Unmatched statement String s=str[i].toString(); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    2Unmatched statement s=str.get(i).toString(); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    3Statement break loop; without innermost loop
    4Statement break loop; without innermost loop
    5Statement break loop; without innermost loop
    6Statement break loop; without innermost loop