File path: /sql12/app/src/net/sourceforge/squirrel_sql/client/db/AliasGroup.java | File path: /sql12/plugins/syntax/src/net/sourceforge/squirrel_sql/plugins/syntax/SyntaxPreferences.java | |||
Method name: Object clone()
|
Method name: Object clone()
|
|||
Number of AST nodes: 4 | Number of AST nodes: 4 | |||
1 | try↵ | 1 | try↵ | |
2 | {↵ | 2 | {↵ | |
3 | final AliasGroup obj = (AliasGroup)super.clone();↵ | 3 | SyntaxPreferences prefs = (SyntaxPreferences)super.clone();↵ | |
4 | obj._propChgReporter = null;↵ | 4 | prefs._propChgReporter = null;↵ | |
5 | return obj;↵ | 5 | return prefs;↵ | |
6 | }↵ | 6 | }↵ | |
7 | catch (CloneNotSupportedException ex)↵ | 7 | catch (CloneNotSupportedException ex)↵ | |
8 | {↵ | 8 | {↵ | |
9 | throw new InternalError(ex.getMessage()); // Impossible.↵ | 9 | throw new InternalError(ex.getMessage()); // Impossible.↵ | |
10 | } | 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 | 16 |
Number of mapped statements | 2 |
Number of unmapped statements in the first code fragment | 2 |
Number of unmapped statements in the second code fragment | 2 |
Time elapsed for statement mapping (ms) | 1.0 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | try | 1 | try | |||||||||||||||||
|
| 2 | SyntaxPreferences prefs = (SyntaxPreferences)super.clone(); | |||||||||||||||||
2 | final AliasGroup obj = (AliasGroup)super.clone(); |
| | |||||||||||||||||
3 | obj._propChgReporter = null; |
| 3 | prefs._propChgReporter = null; | ||||||||||||||||
| 4 | return prefs; | ||||||||||||||||||
4 | return obj; | |
Row | Violation |
---|---|
1 | Unmatched statement SyntaxPreferences prefs=(SyntaxPreferences)super.clone(); cannot be moved before or after the extracted code, because it throws exception(s) that should be caught by a try block that will be extracted |
2 | Unmatched statement final AliasGroup obj=(AliasGroup)super.clone(); cannot be moved before or after the extracted code, because it throws exception(s) that should be caught by a try block that will be extracted |
3 | Expression obj._propChgReporter cannot be parameterized, because it has dependencies to/from statements that will be extracted |
4 | Expression prefs._propChgReporter cannot be parameterized, because it has dependencies to/from statements that will be extracted |
5 | Type net.sourceforge.squirrel_sql.fw.util.PropertyChangeReporter of variable obj._propChgReporter does not match with type net.sourceforge.squirrel_sql.fw.util.PropertyChangeReporter of variable prefs._propChgReporter |