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 setUrl(String)
|
Method name: void setName(String)
|
|||
Number of AST nodes: 7 | Number of AST nodes: 7 | |||
1 | String data = getString(url);↵ | 1 | String data = getString(↵ | |
2 | ↵ | 2 | name);↵ | |
3 | if (data.length() == 0)↵ | 3 | if (data.length() == 0)↵ | |
4 | {↵ | |||
5 | ↵ | 4 | {↵ | |
6 | throw new ValidationException(IStrings.ERR_BLANK_URL);↵ | 5 | throw new ValidationException(i18n.ERR_BLANK_↵ | |
7 | }↵ | |||
8 | ↵ | 6 | NAME);↵ | |
7 | }↵ | |||
9 | if (_url != data)↵ | 8 | if (_name != data)↵ | |
10 | {↵ | |||
11 | ↵ | 9 | {↵ | |
12 | final String oldValue = _url;↵ | 10 | final String oldValue = _↵ | |
13 | _url = data;↵ | |||
14 | ↵ | 11 | name;↵ | |
12 | _name = data;↵ | |||
15 | getPropertyChangeReporter().firePropertyChange(IPropNames.URL,↵ | 13 | getPropertyChangeNotifier().firePropertyChange(IPropertyNames.↵ | |
16 | oldValue, _url);↵ | |||
17 | ↵ | 14 | NAME, oldValue, _name);↵ | |
18 | } | 15 | } | |
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 |
Number of node comparisons | 23 |
Number of mapped statements | 6 |
Number of unmapped statements in the first code fragment | 1 |
Number of unmapped statements in the second code fragment | 1 |
Time elapsed for statement mapping (ms) | 3.3 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | String data = getString(url); |
| 1 | String data = getString(name); | ||||||||||||||
2 | if (data.length() == 0) | 2 | if (data.length() == 0) | |||||||||||||||
3 | throw new ValidationException(IStrings.ERR_BLANK_URL); |
| 3 | throw new ValidationException(i18n.ERR_BLANK_NAME); | ||||||||||||||
4 | if (_url != data) |
| 4 | if (_name != data) | ||||||||||||||
5 | final String oldValue = _url; |
| 5 | final String oldValue = _name; | ||||||||||||||
6 | _url = data; |
| 6 | _name = data; | ||||||||||||||
|
| 7 | getPropertyChangeNotifier().firePropertyChange(IPropertyNames.NAME, oldValue, _name); | |||||||||||||||
7 | getPropertyChangeReporter().firePropertyChange(IPropNames.URL, oldValue, _url); |
| |
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 | Unmatched statement getPropertyChangeNotifier().firePropertyChange(IPropertyNames.NAME,oldValue,_name); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
3 | Unmatched statement getPropertyChangeReporter().firePropertyChange(IPropNames.URL,oldValue,_url); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |