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: 5 | Number of AST nodes: 5 | |||
1 | if (rawBuffer.Buffer.length - rawBuffer.Position < dataBuffer.Count↵ | 1 | if (columnBuffer.Buffer.length - columnBuffer.Position < dataBuffer.Position↵ | |
2 | - dataBuffer.LineStart) {↵ | 2 | - dataBuffer.ColumnStart) {↵ | |
3 | int newLength = rawBuffer.Buffer.length↵ | 3 | int newLength = columnBuffer.Buffer.length↵ | |
4 | + Math.max(↵ | 4 | + Math.max(↵ | |
5 | dataBuffer.Count - dataBuffer.LineStart,↵ | 5 | dataBuffer.Position - dataBuffer.ColumnStart,↵ | |
6 | rawBuffer.Buffer.length);↵ | 6 | columnBuffer.Buffer.length);↵ | |
7 | char[] holder = new char[newLength];↵ | 7 | char[] holder = new char[newLength];↵ | |
8 | System.arraycopy(rawBuffer.Buffer, 0, holder, 0,↵ | 8 | System.arraycopy(columnBuffer.Buffer, 0, holder, 0,↵ | |
9 | rawBuffer.Position);↵ | 9 | columnBuffer.Position);↵ | |
10 | rawBuffer.Buffer = holder;↵ | 10 | columnBuffer.Buffer = holder;↵ | |
11 | } | 11 |
| |
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.8 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 26 |
Number of mapped statements | 5 |
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) | 3.9 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
8 | if (rawBuffer.Buffer.length - rawBuffer.Position < dataBuffer.Count - dataBuffer.LineStart) |
| 2 | if (columnBuffer.Buffer.length - columnBuffer.Position < dataBuffer.Position - dataBuffer.ColumnStart) | |||||||||||||||||||||||||||||||||||
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 int of variable rawBuffer.Position does not match with type int of variable columnBuffer.Position |
3 | Expression rawBuffer.Buffer cannot be parameterized, because it has dependencies to/from statements that will be extracted |
4 | Expression columnBuffer.Buffer cannot be parameterized, because it has dependencies to/from statements that will be extracted |
5 | Type char[] of variable rawBuffer.Buffer does not match with type char[] of variable columnBuffer.Buffer |
6 | Expression dataBuffer.Count cannot be parameterized, because it has dependencies to/from statements that will be extracted |
7 | Expression dataBuffer.Position cannot be parameterized, because it has dependencies to/from statements that will be extracted |
8 | Expression dataBuffer.LineStart cannot be parameterized, because it has dependencies to/from statements that will be extracted |
9 | Expression dataBuffer.ColumnStart cannot be parameterized, because it has dependencies to/from statements that will be extracted |
10 | Expression rawBuffer.Buffer cannot be parameterized, because it has dependencies to/from statements that will be extracted |
11 | Expression columnBuffer.Buffer cannot be parameterized, because it has dependencies to/from statements that will be extracted |
12 | Type char[] of variable rawBuffer.Buffer does not match with type char[] of variable columnBuffer.Buffer |
13 | Expression rawBuffer.Buffer cannot be parameterized, because it has dependencies to/from statements that will be extracted |
14 | Expression columnBuffer.Buffer cannot be parameterized, because it has dependencies to/from statements that will be extracted |
15 | Type char[] of variable rawBuffer.Buffer does not match with type char[] of variable columnBuffer.Buffer |
16 | Expression rawBuffer.Position cannot be parameterized, because it has dependencies to/from statements that will be extracted |
17 | Expression columnBuffer.Position cannot be parameterized, because it has dependencies to/from statements that will be extracted |
18 | Type int of variable rawBuffer.Position does not match with type int of variable columnBuffer.Position |
19 | Expression rawBuffer.Buffer cannot be parameterized, because it has dependencies to/from statements that will be extracted |
20 | Expression columnBuffer.Buffer cannot be parameterized, because it has dependencies to/from statements that will be extracted |
21 | Type char[] of variable rawBuffer.Buffer does not match with type char[] of variable columnBuffer.Buffer |