Vector vec = new Vector(); getEditPanes(vec,splitPane); EditPane[] ep = new EditPane[vec.size()]; vec.copyInto(ep); return ep;
int newCount = textArea.chunkCache .getLineSubregionCount(line); setScreenLineCount(line,newCount); return newCount;
Clone fragments detected by clone detection tool
File path: /jEdit-4.2/src/org/gjt/sp/jedit/View.java File path: /jEdit-4.2/src/org/gjt/sp/jedit/textarea/DisplayManager.java
Method name: EditPane[] getEditPanes() Method name: int getScreenLineCount(int)
Number of AST nodes: 5 Number of AST nodes: 3
1
Vector vec = new Vector();
1
int newCount = textArea.chunkCache
2
			getEditPanes(vec,splitPane);
2
				.getLineSubregionCount(line);
3
			EditPane[] ep = new EditPane[vec.size()];
3
			
4
			vec.copyInto(ep);
4
setScreenLineCount(line,newCount);
5
			return ep;
5
			return newCount;
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 comparisons15
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements1
    Number of unmapped statements in the first code fragment4
    Number of unmapped statements in the second code fragment2
    Time elapsed for statement mapping (ms)0.0
    Clone typeType 3
    Mapped Statements
    ID Statement ID Statement
                                                                                                                                    
    3
    int newCount = textArea.chunkCache.getLineSubregionCount(line);
    4
    Vector vec = new Vector();
                                                          
                                          
    5
    return newCount;
    Preondition Violations
    Unmatched return newCount;
    5
    return newCount;
    5
    getEditPanes(vec, splitPane);
                                                                  
    6
    EditPane[] ep = new EditPane[vec.size()];
                                                                                        
    7
    vec.copyInto(ep);
    7
    vec.copyInto(ep);
    4
    setScreenLineCount(line, newCount);
    Differences
    Expression1Expression2Difference
    copyIntosetScreenLineCountMETHOD_INVOCATION_NAME_MISMATCH
    vec.copyInto(ep)setScreenLineCount(line,newCount)ARGUMENT_NUMBER_MISMATCH
    vecMISSING_METHOD_INVOCATION_EXPRESSION
    Preondition Violations
    Expression vec.copyInto(ep) 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 vec.copyInto(ep) 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
    4
    setScreenLineCount(line, newCount);
    8
    return ep;
    8
    return ep;
    Preondition Violations
    Unmatched return ep;
                              
    Precondition Violations (6)
    Row Violation
    1Unmatched return newCount;
    2Expression vec.copyInto(ep) 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 vec.copyInto(ep) is a void method call, and thus it cannot be parameterized
    5Expression setScreenLineCount(line,newCount) is a void method call, and thus it cannot be parameterized
    6Unmatched return ep;