String noWordSep = buffer.getStringProperty("noWordSep"); newCaret = TextUtilities.findWordStart(lineText, newCaret - 1,noWordSep,true,eatWhitespace); newCaret += lineStart;
String noWordSep = buffer.getStringProperty("noWordSep"); newCaret = TextUtilities.findWordEnd(lineText, newCaret + 1,noWordSep,true,eatWhitespace); newCaret += lineStart;
Clone fragments detected by clone detection tool
File path: /jEdit-4.2/src/org/gjt/sp/jedit/textarea/JEditTextArea.java File path: /jEdit-4.2/src/org/gjt/sp/jedit/textarea/JEditTextArea.java
Method name: void goToPrevWord(boolean, boolean) Method name: void goToNextWord(boolean, boolean)
Number of AST nodes: 3 Number of AST nodes: 3
1
String noWordSep = buffer.getStringProperty("noWordSep");
1
String noWordSep = buffer.getStringProperty("noWordSep");
2
			newCaret = TextUtilities.findWordStart(lineText,
2
			newCaret = TextUtilities.findWordEnd(lineText,
3
				newCaret - 1,noWordSep,true,eatWhitespace);
3
				newCaret + 1,noWordSep,true,eatWhitespace);
4
			newCaret += lineStart;
4
			newCaret += lineStart;
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.0
Clones locationClones are declared in the same class
Number of node comparisons9
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements2
    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.0
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    13
    String noWordSep = buffer.getStringProperty("noWordSep");
    10
    String noWordSep = buffer.getStringProperty("noWordSep");
                                                                                                                                                                                          
    11
    newCaret = TextUtilities.findWordEnd(lineText, newCaret + 1, noWordSep, true, eatWhitespace);
    Preondition Violations
    Unmatched statement newCaret=TextUtilities.findWordEnd(lineText,newCaret + 1,noWordSep,true,eatWhitespace); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    11
    newCaret = TextUtilities.findWordEnd(lineText, newCaret + 1, noWordSep, true, eatWhitespace);
    14
    newCaret = TextUtilities.findWordStart(lineText, newCaret - 1, noWordSep, true, eatWhitespace);
    14
    newCaret = TextUtilities.findWordStart(lineText, newCaret - 1, noWordSep, true, eatWhitespace);
    Preondition Violations
    Unmatched statement newCaret=TextUtilities.findWordStart(lineText,newCaret - 1,noWordSep,true,eatWhitespace); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
                                                                                                                                                                                              
    15
    newCaret += lineStart;
    12
    newCaret += lineStart;
    Precondition Violations (3)
    Row Violation
    1Unmatched statement newCaret=TextUtilities.findWordEnd(lineText,newCaret + 1,noWordSep,true,eatWhitespace); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    2Unmatched statement newCaret=TextUtilities.findWordStart(lineText,newCaret - 1,noWordSep,true,eatWhitespace); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    3Clone fragment #1 returns variables noWordSep, newCaret , while Clone fragment #2 returns variables noWordSep, newCaret