File path: /sql12/plugins/dataimport/src/com/csvreader/CsvReader.java | File path: /sql12/plugins/dataimport/src/com/csvreader/CsvReader.java | |||
Method name: void checkDataLength()
|
Method name: void updateCurrentValue()
|
|||
Number of AST nodes: 4 | Number of AST nodes: 4 | |||
1 | int newLength = rawBuffer.Buffer.length↵ | 1 | int newLength = columnBuffer.Buffer.length↵ | |
2 | + Math.max(↵ | 2 | + Math.max(↵ | |
3 | dataBuffer.Count - dataBuffer.LineStart,↵ | 3 | dataBuffer.Position - dataBuffer.ColumnStart,↵ | |
4 | rawBuffer.Buffer.length);↵ | 4 | columnBuffer.Buffer.length);↵ | |
5 | char[] holder = new char[newLength];↵ | 5 | char[] holder = new char[newLength];↵ | |
6 | System.arraycopy(rawBuffer.Buffer, 0, holder, 0,↵ | 6 | System.arraycopy(columnBuffer.Buffer, 0, holder, 0,↵ | |
7 | rawBuffer.Position);↵ | 7 | columnBuffer.Position);↵ | |
8 | rawBuffer.Buffer = holder; | 8 | columnBuffer.Buffer = holder; | |
See real code fragment | See real code fragment |
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 0 |
Number of non-refactorable cases | 1 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.0 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 16 |
Number of mapped statements | 4 |
Number of unmapped statements in the first code fragment | 0 |
Number of unmapped statements in the second code fragment | 0 |
Time elapsed for statement mapping (ms) | 0.0 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
9 | int newLength = rawBuffer.Buffer.length + Math.max(dataBuffer.Count - dataBuffer.LineStart, rawBuffer.Buffer.length); |
| 3 | int newLength = columnBuffer.Buffer.length + Math.max(dataBuffer.Position - dataBuffer.ColumnStart, columnBuffer.Buffer.length); | |||||||||||||||||||||||||||
10 | char[] holder = new char[newLength]; | 4 | char[] holder = new char[newLength]; | ||||||||||||||||||||||||||||
11 | System.arraycopy(rawBuffer.Buffer, 0, holder, 0, rawBuffer.Position); |
| 5 | System.arraycopy(columnBuffer.Buffer, 0, holder, 0, columnBuffer.Position); | |||||||||||||||||||||||||||
12 | rawBuffer.Buffer = holder; |
| 6 | columnBuffer.Buffer = holder; |
Row | Violation |
---|---|
1 | Type char[] of variable rawBuffer.Buffer does not match with type char[] of variable columnBuffer.Buffer |
2 | Type char[] of variable rawBuffer.Buffer does not match with type char[] of variable columnBuffer.Buffer |
3 | Type char[] of variable rawBuffer.Buffer does not match with type char[] of variable columnBuffer.Buffer |
4 | Type int of variable rawBuffer.Position does not match with type int of variable columnBuffer.Position |
5 | Type char[] of variable rawBuffer.Buffer does not match with type char[] of variable columnBuffer.Buffer |