try { while (bufsize <= index) bufsize += BUFFER_INCREMENT; br.reset(); br.mark(bufsize); br.skip(index-1); } catch (IOException e) { }
try { while (bufsize <= index) bufsize += BUFFER_INCREMENT; br.reset(); br.mark(bufsize); br.skip(index-1); } catch (IOException e) { }
Clone fragments detected by clone detection tool
File path: /jEdit-4.2/src/gnu/regexp/CharIndexedReader.java File path: /jEdit-4.2/src/gnu/regexp/CharIndexedInputStream.java
Method name: char charAt(int) Method name: char charAt(int)
Number of AST nodes: 6 Number of AST nodes: 6
1
try {
1
try {
2
		while (bufsize <= index) bufsize += BUFFER_INCREMENT;
2
		while (bufsize <= index) bufsize += BUFFER_INCREMENT;
3
		br.reset();
3
		br.reset();
4
		br.mark(bufsize);
4
		br.mark(bufsize);
5
		br.skip(index-1);
5
		br.skip(index-1);
6
	    } catch (IOException e) { }
6
	    } catch (IOException e) { }
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.2
Clones locationClones are in different classes
Number of node comparisons21
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements6
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)5.1
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    6
    try
    12
    try
    7
    while (bufsize <= index)
    13
    while (bufsize <= index)
    8
    bufsize += BUFFER_INCREMENT;
    14
    bufsize += BUFFER_INCREMENT;
    9
    br.reset();
    9
    br.reset();
    15
    br.reset();
    Differences
    Expression1Expression2Difference
    java.io.BufferedReaderjava.io.BufferedInputStreamSUBCLASS_TYPE_MISMATCH
    Preondition Violations
    Expression br cannot be unified with expression br , because common superclass java.io.Closeable does not declare member(s) public void reset() throws java.io.IOException
    15
    br.reset();
    10
    br.mark(bufsize);
    10
    br.mark(bufsize);
    16
    br.mark(bufsize);
    Differences
    Expression1Expression2Difference
    java.io.BufferedReaderjava.io.BufferedInputStreamSUBCLASS_TYPE_MISMATCH
    Preondition Violations
    Expression br cannot be unified with expression br , because common superclass java.io.Closeable does not declare member(s) public void mark(int) throws java.io.IOException
    16
    br.mark(bufsize);
    11
    br.skip(index - 1);
    11
    br.skip(index - 1);
    17
    br.skip(index - 1);
    Differences
    Expression1Expression2Difference
    java.io.BufferedReaderjava.io.BufferedInputStreamSUBCLASS_TYPE_MISMATCH
    Preondition Violations
    Expression br cannot be unified with expression br , because common superclass java.io.Closeable does not declare member(s) public long skip(long) throws java.io.IOException
    17
    br.skip(index - 1);
    Precondition Violations (3)
    Row Violation
    1Expression br cannot be unified with expression br , because common superclass java.io.Closeable does not declare member(s) public void reset() throws java.io.IOException
    2Expression br cannot be unified with expression br , because common superclass java.io.Closeable does not declare member(s) public void mark(int) throws java.io.IOException
    3Expression br cannot be unified with expression br , because common superclass java.io.Closeable does not declare member(s) public long skip(long) throws java.io.IOException