File path: /sql12/fw/src/net/sourceforge/squirrel_sql/fw/sql/SQLDriver.java | File path: /sql12/fw/src/net/sourceforge/squirrel_sql/fw/sql/SQLDriver.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 (!data.equals(_url))↵ | 6 | if (!data.equals(_name))↵ | |
7 | {↵ | 7 | {↵ | |
8 | final String oldValue = _url;↵ | 8 | final String oldValue = _name;↵ | |
9 | _url = data;↵ | 9 | _name = data;↵ | |
10 | getPropertyChangeReporter().firePropertyChange(↵ | 10 | getPropertyChangeReporter().firePropertyChange(↵ | |
11 | ISQLDriver.IPropertyNames.URL,↵ | 11 | ISQLDriver.IPropertyNames.NAME,↵ | |
12 | oldValue,↵ | 12 | oldValue,↵ | |
13 | _url);↵ | 13 | _name);↵ | |
14 | } | 14 |
| |
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.4 |
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.5 |
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 (!data.equals(_url)) |
| 4 | if (!data.equals(_name)) | |||||||||||||
5 | final String oldValue = _url; |
| 5 | final String oldValue = _name; | |||||||||||||
6 | _url = data; |
| 6 | _name = data; | |||||||||||||
7 | getPropertyChangeReporter().firePropertyChange(ISQLDriver.IPropertyNames.URL, oldValue, _url); |
| 7 | getPropertyChangeReporter().firePropertyChange(ISQLDriver.IPropertyNames.NAME, oldValue, _name); |
Row | Violation |
---|