super();
setText(msg);
setBackground(ErrorDialog.getTextAreaBackgroundColor());
if (_updateableModel != null && allowEditing==false) {
addSeparator();
add(_insertRow);
add(_deleteRows);
}
Clone fragments detected by clone detection tool
File path: /sql12/fw/src/net/sourceforge/squirrel_sql/fw/gui/ErrorDialog.java
|
|
File path: /sql12/fw/src/net/sourceforge/squirrel_sql/fw/gui/TablePopupMenu.java
|
Method name: void MessagePanel(String)
|
|
Method name: void TablePopupMenu(boolean, IDataSetUpdateableModel, DataSetViewerTablePanel)
|
Number of AST nodes: 3
|
|
Number of AST nodes: 4
|
|
1 | supe↵ | | 1 | if (_updateableModel != null && allowEditing==false) {↵
|
2 | r();↵ | | 2 | addSeparator();↵
|
3 | setText(msg);↵ | | 3 | ↵
|
4 | setBackground(ErrorDialog.getTextAreaBackgroundColor()); | | 4 | add(_insertRow);↵
|
| | | 5 | add(_deleteRows);↵
|
| | | 6 | }
|
See real code fragment |
|
See real code fragment |
Summary
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.0 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 9 |
-
{Non-refactorable}
Mapping Summary
Number of mapped statements | 1 |
Number of unmapped statements in the first code fragment | 2 |
Number of unmapped statements in the second code fragment | 2 |
Time elapsed for statement mapping (ms) | 0.0 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
1 | super(); | | | |
2 | setText(msg); | | 33 | addSeparator(); |
3 | setBackground(ErrorDialog.getTextAreaBackgroundColor()); | | | |
| | | 34 | add(_insertRow); |
| | | 35 | add(_deleteRows); |
Precondition Violations (5)
Row |
Violation |
1 | Expression setText(msg) is a void method call, and thus it cannot be parameterized |
2 | Expression addSeparator() is a void method call, and thus it cannot be parameterized |
3 | Expression setText(msg) is a void method call, and thus it cannot be parameterized |
4 | Expression addSeparator() is a void method call, and thus it cannot be parameterized |
5 | The refactoring of the clones is infeasible, because classes net.sourceforge.squirrel_sql.fw.gui.ErrorDialog.MessagePanel and net.sourceforge.squirrel_sql.fw.gui.TablePopupMenu do not have a common superclass |