File path: /sql12/app/src/net/sourceforge/squirrel_sql/client/gui/db/SQLAlias.java | File path: /sql12/plugins/favs/src/net/sourceforge/squirrel_sql/plugins/favs/Folder.java | |||
Method name: void setName(String)
|
Method name: void setName(String)
|
|||
Number of AST nodes: 7 | Number of AST nodes: 7 | |||
1 | String data = getString(name);↵ | 1 | String data = getString(name);↵ | |
2 | if (data.length() == 0)↵ | 2 | if (data.length() == 0)↵ | |
3 | {↵ | |||
4 | ↵ | 3 | {↵ | |
5 | throw new ValidationException(IStrings.ERR_BLANK_NAME);↵ | 4 | throw new ValidationException(i18n.ERR_BLANK_NAME);↵ | |
6 | }↵ | |||
7 | ↵ | 5 | }↵ | |
8 | if (_name != data)↵ | 6 | if (_name != data)↵ | |
9 | {↵ | |||
10 | ↵ | 7 | {↵ | |
11 | final String oldValue = _name;↵ | 8 | final String oldValue = _name;↵ | |
12 | _name = data;↵ | 9 | _name = data;↵ | |
13 | getPropertyChangeReporter().firePropertyChange(IPropNames.NAME,↵ | 10 | getPropertyChangeNotifier().firePropertyChange(IPropertyNames.NAME,↵ | |
14 | oldValue, _name);↵ | 11 | oldValue, _name);↵ | |
15 | } | 12 | } | |
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 different classes |
Number of node comparisons | 23 |
Number of mapped statements | 7 |
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.8 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | String data = getString(name); | 1 | String data = getString(name); | |||||||||||||||||||||
2 | if (data.length() == 0) | 2 | if (data.length() == 0) | |||||||||||||||||||||
3 | throw new ValidationException(IStrings.ERR_BLANK_NAME); |
| 3 | throw new ValidationException(i18n.ERR_BLANK_NAME); | ||||||||||||||||||||
4 | if (_name != data) | 4 | if (_name != data) | |||||||||||||||||||||
5 | final String oldValue = _name; | 5 | final String oldValue = _name; | |||||||||||||||||||||
6 | _name = data; | 6 | _name = data; | |||||||||||||||||||||
7 | getPropertyChangeReporter().firePropertyChange(IPropNames.NAME, oldValue, _name); |
| 7 | getPropertyChangeNotifier().firePropertyChange(IPropertyNames.NAME, oldValue, _name); |
Row | Violation |
---|---|
1 | Type net.sourceforge.squirrel_sql.client.gui.db.SQLAlias.IStrings does not match with type net.sourceforge.squirrel_sql.plugins.favs.Folder.i18n |
2 | Type net.sourceforge.squirrel_sql.client.gui.db.SQLAlias.IPropNames does not match with type net.sourceforge.squirrel_sql.plugins.favs.Folder.IPropertyNames |
3 | Expression getPropertyChangeReporter() cannot be parameterized, because it has dependencies to/from statements that will be extracted |
4 | Expression getPropertyChangeNotifier() 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 getPropertyChangeReporter() does not match with type java.beans.PropertyChangeSupport of variable getPropertyChangeNotifier() |