File path: /sql12/plugins/sqlscript/src/net/sourceforge/squirrel_sql/plugins/sqlscript/table_script/CreateDataScriptCommand.java | File path: /sql12/plugins/example/src/net/sourceforge/squirrel_sql/plugins/example/ScriptDB2ProcedureAction.java | |||
Method name: String getStatementSeparator()
|
Method name: String getStatementSeparator()
|
|||
Number of AST nodes: 4 | Number of AST nodes: 4 | |||
1 | String statementSeparator = ↵ | 1 | String statementSeparator = ↵ | |
2 | _session.getQueryTokenizer()↵ | 2 | _session.getQueryTokenizer()↵ | |
3 | .getSQLStatementSeparator();↵ | 3 | .getSQLStatementSeparator();↵ | |
4 | if (1 < statementSeparator.length())↵ | 4 | if (1 < statementSeparator.length())↵ | |
5 | ↵ | 5 | {↵ | |
6 | {↵ | 6 | ↵ | |
7 | statementSeparator = "\n" + statementSeparator + "\n";↵ | 7 | statementSeparator = "\n" + statementSeparator + "\n";↵ | |
8 | }↵ | 8 | }↵ | |
9 | return statementSeparator; | 9 | return statementSeparator; | |
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.1 |
Clones location | Clones are in different classes |
Number of node comparisons | 8 |
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.8 |
Clone type | Type 1 |
ID | Statement | ID | Statement | |
---|---|---|---|---|
1 | String statementSeparator = _session.getQueryTokenizer().getSQLStatementSeparator(); | 1 | String statementSeparator = _session.getQueryTokenizer().getSQLStatementSeparator(); | |
2 | if (1 < statementSeparator.length()) | 2 | if (1 < statementSeparator.length()) | |
3 | statementSeparator = "\n" + statementSeparator + "\n"; | 3 | statementSeparator = "\n" + statementSeparator + "\n"; | |
4 | return statementSeparator; | 4 | return statementSeparator; |
Row | Violation |
---|---|
1 | The refactoring of the clones is infeasible, because classes net.sourceforge.squirrel_sql.plugins.sqlscript.table_script.CreateDataScriptCommand and net.sourceforge.squirrel_sql.plugins.example.ScriptDB2ProcedureAction do not have a common superclass |