File path: /sql12/app/src/net/sourceforge/squirrel_sql/client/gui/db/SQLAlias.java | File path: /sql12/app/src/net/sourceforge/squirrel_sql/client/gui/db/SQLAlias.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(name);↵ | |
2 | if (data.length() == 0)↵ | 2 | if (data.length() == 0)↵ | |
3 | {↵ | 3 | {↵ | |
4 | throw new ValidationException(IStrings.ERR_BLANK_URL);↵ | 4 | throw new ValidationException(IStrings.ERR_BLANK_NAME);↵ | |
5 | }↵ | 5 | }↵ | |
6 | if (_url != data)↵ | 6 | if (_name != data)↵ | |
7 | {↵ | 7 | {↵ | |
8 | final String oldValue = _url;↵ | 8 | final String oldValue = _name;↵ | |
9 | _url = data;↵ | 9 | _name = data;↵ | |
10 | getPropertyChangeReporter().firePropertyChange(IPropNames.URL,↵ | 10 | getPropertyChangeReporter().firePropertyChange(IPropNames.↵ | |
11 | ↵ | 11 | NAME,↵ | |
12 | oldValue, _url);↵ | 12 | oldValue, _name);↵ | |
13 | } | 13 |
| |
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.5 |
Clones location | Clones are declared in the same class |
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.4 |
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(IStrings.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 | getPropertyChangeReporter().firePropertyChange(IPropNames.URL, oldValue, _url); |
| 7 | getPropertyChangeReporter().firePropertyChange(IPropNames.NAME, oldValue, _name); |
Row | Violation |
---|