File path: /sql12/test/src/net/sourceforge/squirrel_sql/client/update/gui/AbstractTableModelTest.java | File path: /sql12/plugins/syntax/src/net/sourceforge/squirrel_sql/plugins/syntax/KeyManager.java | |||
Method name: boolean isEditableColumn(int)
|
Method name: boolean isInStopAtArray(char)
|
|||
Number of AST nodes: 4 | Number of AST nodes: 4 | |||
1 | for (int i = 0; i < editableColumns.length; i++) {↵ | 1 | for (int i = 0; i < ↵ | |
2 | if (colIdx == editableColumns[i]) {↵ | |||
3 | ↵ | 2 | STOP_AT.length; i++)↵ | |
3 | {↵ | |||
4 | if(toCheck == STOP_AT[i])↵ | |||
5 | {↵ | |||
4 | return true;↵ | 6 | return true;↵ | |
5 | }↵ | 7 | ↵ | |
6 | }↵ | 8 | }↵ | |
9 | }↵ | |||
7 | return false; | 10 |
| |
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.2 |
Clones location | Clones are in different classes |
Number of node comparisons | 6 |
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.7 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | for (int i = 0; i < editableColumns.length; i++) |
| 1 | for (int i = 0; i < STOP_AT.length; i++) | |||||||||||||||||||||
2 | if (colIdx == editableColumns[i]) |
| 2 | if (toCheck == STOP_AT[i]) | |||||||||||||||||||||
3 | return true; | 3 | return true; | ||||||||||||||||||||||
4 | return false; | 4 | return false; |
Row | Violation |
---|---|
1 | Type int of variable editableColumns.length does not match with type int of variable STOP_AT.length |
2 | Type int of variable colIdx does not match with type char of variable toCheck |
3 | Type int[] of variable editableColumns does not match with type char[] of variable STOP_AT |