int newCount = textArea.chunkCache .getLineSubregionCount(line); setScreenLineCount(line,newCount); return newCount;
StringBuffer buf = new StringBuffer(); getDescriptor(buf); return buf.toString();
Clone fragments detected by clone detection tool
File path: /jEdit-4.2/src/org/gjt/sp/jedit/textarea/DisplayManager.java File path: /jEdit-4.2/src/org/objectweb/asm/Type.java
Method name: int getScreenLineCount(int) Method name: String getDescriptor()
Number of AST nodes: 3 Number of AST nodes: 3
1
int newCount = textArea.chunkCache
2
				.getLineSubregionCount(line);
3
			setScreenLineCount(line,newCount);
4
			return newCount
1
StringBuffer buf = new StringBuffer();
2
    getDescriptor(buf);
5
;
3
    return buf.toString();
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 in different classes
Number of node comparisons9
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements1
    Number of unmapped statements in the first code fragment2
    Number of unmapped statements in the second code fragment2
    Time elapsed for statement mapping (ms)0.0
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
                                                                                  
    1
    StringBuffer buf = new StringBuffer();
    3
    int newCount = textArea.chunkCache.getLineSubregionCount(line);
                                                                                                                                    
    4
    setScreenLineCount(line, newCount);
    4
    setScreenLineCount(line, newCount);
    2
    getDescriptor(buf);
    Differences
    Expression1Expression2Difference
    setScreenLineCountgetDescriptorMETHOD_INVOCATION_NAME_MISMATCH
    setScreenLineCount(line,newCount)getDescriptor(buf)ARGUMENT_NUMBER_MISMATCH
    Preondition Violations
    Expression setScreenLineCount(line,newCount) is a void method call, and thus it cannot be parameterized
    Expression getDescriptor(buf) is a void method call, and thus it cannot be parameterized
    Expression setScreenLineCount(line,newCount) is a void method call, and thus it cannot be parameterized
    Expression getDescriptor(buf) is a void method call, and thus it cannot be parameterized
    2
    getDescriptor(buf);
                                                      
    3
    return buf.toString();
    Preondition Violations
    Unmatched statement return buf.toString(); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    Unmatched return buf.toString();
    3
    return buf.toString();
    5
    return newCount;
    5
    return newCount;
    Preondition Violations
    Unmatched return newCount;
                                          
    Precondition Violations (7)
    Row Violation
    1Expression setScreenLineCount(line,newCount) is a void method call, and thus it cannot be parameterized
    2Expression getDescriptor(buf) is a void method call, and thus it cannot be parameterized
    3Expression setScreenLineCount(line,newCount) is a void method call, and thus it cannot be parameterized
    4Expression getDescriptor(buf) is a void method call, and thus it cannot be parameterized
    5Unmatched statement return buf.toString(); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    6Unmatched return buf.toString();
    7Unmatched return newCount;