File path: /sql12/app/src/net/sourceforge/squirrel_sql/client/gui/mainframe/MainFrameToolBar.java | File path: /sql12/app/src/net/sourceforge/squirrel_sql/client/gui/mainframe/MainFrameToolBar.java | |||
Method name: void addAlias(ISQLAlias)
|
Method name: void removeAlias(ISQLAlias)
|
|||
Number of AST nodes: 5 | Number of AST nodes: 5 | |||
1 | _aliasDropDown.setEnabled(false);↵ | 1 | _aliasDropDown.setEnabled(false);↵ | |
2 | addElement(alias);↵ | 2 | removeElement(alias);↵ | |
3 | if (_aliasDropDown.getModel().getSize() > 0) {↵ | 3 | if (_aliasDropDown.getModel().getSize() > 0) {↵ | |
4 | _aliasDropDown.setSelectedIndex(0);↵ | 4 | _aliasDropDown.setSelectedIndex(0);↵ | |
5 | }↵ | 5 | }↵ | |
6 | _aliasDropDown.setEnabled(true); | 6 |
| |
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.2 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 13 |
Number of mapped statements | 5 |
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) | 4.3 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | _aliasDropDown.setEnabled(false); | 1 | _aliasDropDown.setEnabled(false); | |||||||||||||
2 | addElement(alias); |
| 2 | removeElement(alias); | ||||||||||||
3 | if (_aliasDropDown.getModel().getSize() > 0) | 3 | if (_aliasDropDown.getModel().getSize() > 0) | |||||||||||||
4 | _aliasDropDown.setSelectedIndex(0); | 4 | _aliasDropDown.setSelectedIndex(0); | |||||||||||||
5 | _aliasDropDown.setEnabled(true); | 5 | _aliasDropDown.setEnabled(true); |
Row | Violation |
---|---|
1 | Expression addElement(alias) is a void method call, and thus it cannot be parameterized |
2 | Expression removeElement(alias) is a void method call, and thus it cannot be parameterized |