File path: /sql12/fw/src/net/sourceforge/squirrel_sql/fw/util/DefaultExceptionFormatter.java | File path: /sql12/plugins/dbcopy/src/net/sourceforge/squirrel_sql/plugins/dbcopy/util/ScriptWriter.java | |||
Method name: String buildMessage(String, SQLException)
|
Method name: String constructFilename(ISession, ISession)
|
|||
Number of AST nodes: 8 | Number of AST nodes: 7 | |||
1 | StringBuilder result = new StringBuilder();↵ | 1 | StringBuffer result = new StringBuffer(scriptsDirName);↵ | |
2 | result.append(prefix);↵ | 2 | result.append(File.separator);↵ | |
3 | result.append(ex.getMessage());↵ | 3 | result.append(source.getAlias().getUserName());↵ | |
4 | result.append("\nSQLState: ");↵ | 4 | result.append("_to_");↵ | |
5 | result.append(ex.getSQLState());↵ | 5 | result.append(↵ | |
6 | result.append("\nErrorCode: ");↵ | 6 | dest.getAlias().getUserName());↵ | |
7 | result.append(ex.getErrorCode());↵ | 7 | result.append(".sql");↵ | |
8 | return result.toString(); | 8 |
| |
See real code fragment | See real code fragment |
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 1 |
Number of non-refactorable cases | 0 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.0 |
Clones location | Clones are in different classes |
Number of node comparisons | 43 |
Number of mapped statements | 6 |
Number of unmapped statements in the first code fragment | 2 |
Number of unmapped statements in the second code fragment | 1 |
Time elapsed for statement mapping (ms) | 0.0 |
Clone type | Type 3 |
ID | Statement | ID | Statement | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | StringBuilder result = new StringBuilder(); |
| 1 | StringBuffer result = new StringBuffer(scriptsDirName); | |||||||||||||||||||
2 | result.append(prefix); |
| 2 | result.append(File.separator); | |||||||||||||||||||
3 | result.append(ex.getMessage()); |
| | ||||||||||||||||||||
4 | result.append("\nSQLState: "); |
| 4 | result.append("_to_"); | |||||||||||||||||||
|
| 5 | result.append(dest.getAlias().getUserName()); | ||||||||||||||||||||
5 | result.append(ex.getSQLState()); |
| 6 | result.append(".sql"); | |||||||||||||||||||
6 | result.append("\nErrorCode: "); |
| 3 | result.append(source.getAlias().getUserName()); | |||||||||||||||||||
7 | result.append(ex.getErrorCode()); |
| | ||||||||||||||||||||
8 | return result.toString(); |
| 7 | return result.toString(); |
Row | Violation |
---|---|
1 | Unmatched statement result.append(ex.getMessage()); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
2 | Unmatched statement result.append(dest.getAlias().getUserName()); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
3 | Unmatched statement result.append(ex.getErrorCode()); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |