File path: /sql12/plugins/mysql/src/net/sourceforge/squirrel_sql/plugins/mysql/tokenizer/MysqlQueryTokenizer.java | File path: /sql12/plugins/oracle/src/net/sourceforge/squirrel_sql/plugins/oracle/tokenizer/OracleQueryTokenizer.java | |||
Method name: void joinFragments(Pattern, boolean)
|
Method name: void joinFragments(Pattern, boolean)
|
|||
Number of AST nodes: 10 | Number of AST nodes: 9 | |||
1 | if (next.startsWith(procSep)) {↵ | |||
2 | inMultiSQLStatement = false;↵ | 1 | inMultiSQLStatement = false;↵ | |
3 | if (collector != null) {↵ | 2 | if (collector != null)↵ | |
4 | ↵ | |||
3 | {↵ | |||
5 | tmp.add(collector.toString());↵ | 4 | tmp.add(collector.toString());↵ | |
6 | collector = null;↵ | 5 | collector = null;↵ | |
7 | } else {↵ | |||
8 | if (skipStraySep) {↵ | |||
9 | ↵ | 6 | } else↵ | |
7 | {↵ | |||
8 | if (skipStraySlash)↵ | |||
9 | {↵ | |||
10 | // Stray sep - or we failed to find pattern↵ | 10 | // Stray sep - or we failed to find pattern↵ | |
11 | if (s_log.isDebugEnabled()) {↵ | 11 | if (s_log.isDebugEnabled())↵ | |
12 | s_log.debug(↵ | |||
13 | ↵ | |||
12 | {↵ | |||
14 | "Detected stray proc separator("+procSep+"). Skipping");↵ | 13 | s_log.debug("Detected stray proc separator(" + sep + "). Skipping");↵ | |
15 | }↵ | |||
16 | } else {↵ | |||
17 | tmp.add(next);↵ | |||
18 | }↵ | |||
19 | }↵ | |||
20 | continue;↵ | |||
21 | } | 14 | }↵ | |
15 | } else↵ | |||
16 | {↵ | |||
17 | tmp.add(next);↵ | |||
18 | }↵ | |||
19 | }↵ | |||
20 |
| |||
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.5 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 23 |
Number of mapped statements | 9 |
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) | 10.3 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
19 | inMultiSQLStatement = false; | 13 | inMultiSQLStatement = false; | |||||||||||
20 | if (collector != null) |
| 14 | if (collector != null) | ||||||||||
21 | tmp.add(collector.toString()); |
| 15 | tmp.add(collector.toString()); | ||||||||||
22 | collector = null; |
| 16 | collector = null; | ||||||||||
else | else | |||||||||||||
23 | if (skipStraySep) |
| 17 | if (skipStraySlash) | ||||||||||
24 | if (s_log.isDebugEnabled()) | 18 | if (s_log.isDebugEnabled()) | |||||||||||
25 | s_log.debug("Detected stray proc separator(" + procSep + "). Skipping"); |
| 19 | s_log.debug("Detected stray proc separator(" + sep + "). Skipping"); | ||||||||||
else | else | |||||||||||||
26 | tmp.add(next); | 20 | tmp.add(next); | |||||||||||
27 | continue; |
| 21 | continue; |
Row | Violation |
---|---|
1 | Statement continue; without innermost loop |
2 | Statement continue; without innermost loop |
3 | Clone fragment #1 returns variables inMultiSQLStatement, collector , while Clone fragment #2 returns variables inMultiSQLStatement, collector |