File path: /sql12/fw/src/net/sourceforge/squirrel_sql/fw/codereformat/CodeReformatorKernel.java | File path: /sql12/fw/src/net/sourceforge/squirrel_sql/fw/codereformat/CodeReformatorKernel.java | |||
Method name: String[] toPieces(String)
|
Method name: String[] toPieces(String)
|
|||
Number of AST nodes: 3 | Number of AST nodes: 3 | |||
1 | if(p.beginsAt + p.spec.getLengthRightSpaced() < in.length())↵ | 1 | if(p.beginsAt + p.spec.getLengthRightSpaced() < in.length())↵ | |
2 | {↵ | 2 | {↵ | |
3 | ret.add( in.substring(begin, p.beginsAt + p.spec.getLengthRightSpaced() ).trim() );↵ | 3 | ret.add( in.substring(p.beginsAt, p.beginsAt + p.spec.getLengthRightSpaced() ).trim() );↵ | |
4 | }↵ | 4 | }↵ | |
5 | else↵ | 5 | else↵ | |
6 | {↵ | 6 | {↵ | |
7 | ret.add( in.substring(begin).trim() );↵ | 7 | ret.add( in.substring(p.beginsAt).trim() );↵ | |
8 | } | 8 |
| |
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.4 |
Clones location | Clones are in the same method |
Number of node comparisons | 11 |
Number of mapped statements | 3 |
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) | 2.3 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
30 | if (p.beginsAt + p.spec.getLengthRightSpaced() < in.length()) | 38 | if (p.beginsAt + p.spec.getLengthRightSpaced() < in.length()) | ||||||||||||
31 | ret.add(in.substring(begin, p.beginsAt + p.spec.getLengthRightSpaced()).trim()); |
| 39 | ret.add(in.substring(p.beginsAt, p.beginsAt + p.spec.getLengthRightSpaced()).trim()); | |||||||||||
else | else | ||||||||||||||
32 | ret.add(in.substring(begin).trim()); |
| 40 | ret.add(in.substring(p.beginsAt).trim()); |
Row | Violation |
---|---|
1 | Expression p.beginsAt cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression p.beginsAt cannot be parameterized, because it has dependencies to/from statements that will be extracted |