public int read() throws IOException { if (!getInitialized()) { initialize(); setInitialized(true); } while (line == null || line.length() == 0) { line = lineTokenizer.getToken(in); if (line == null) { return -1; } line = headFilter(line); linePos = 0; } int ch = line.charAt(linePos); linePos++; if (linePos == line.length()) { line = null; } return ch;
public int read() throws IOException { if (!getInitialized()) { initialize(); setInitialized(true); } while (line == null || line.length() == 0) { line = lineTokenizer.getToken(in); line = tailFilter(line); if (line == null) { return -1; } linePos = 0; } int ch = line.charAt(linePos); linePos++; if (linePos == line.length()) { line = null; } return ch;
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/filters/HeadFilter.java File path: /apache-ant-1.7.0/src/org/apache/tools/ant/filters/TailFilter.java
Method name: Method name:
Number of AST nodes: 0 Number of AST nodes: 0
1
public int read() throws IOException {
1
public int read() throws IOException {
2
        if (!getInitialized()) {
2
        if (!getInitialized()) {
3
            initialize();
3
            initialize();
4
            setInitialized(true);
4
            setInitialized(true);
5
        }
5
        }
6
        while (line == null || line.length() == 0) {
6
        while (line == null || line.length() == 0) {
7
            line = lineTokenizer.getToken(in);
7
            line = lineTokenizer.getToken(in);
8
            line = tailFilter(line);
8
            if (line == null) {
9
            if (line == null) {
9
                return -1;
10
                return -1;
10
            }
11
            }
11
            line = headFilter(line);
12
            linePos = 0;
12
            linePos = 0;
13
        }
13
        }
14
        int ch = line.charAt(linePos);
14
        int ch = line.charAt(linePos);
15
        linePos++;
15
        linePos++;
16
        if (linePos == line.length()) {
16
        if (linePos == line.length()) {
17
            line = null;
17
            line = null;
18
        }
18
        }
19
        return ch;
19
        return ch;
20
    
20
    
Summary
Number of common nesting structure subtrees0
Number of refactorable cases0
Number of non-refactorable cases0
Time elapsed for finding largest common nesting structure subtrees (ms)0.0
Clones location
Number of node comparisons0