if (_app.getDesktopStyle().isInternalFrameStyle())
{
final JLabel lbl = new JLabel(getWindowTitle(), SwingConstants.CENTER);
lbl.setBorder(BorderFactory.createEmptyBorder(0, 5, 0, 5));
_tb.add(lbl, 0);
}
if (_app.getDesktopStyle().isInternalFrameStyle())
{
final JLabel lbl = new JLabel(getWindowTitle(), SwingConstants.CENTER);
lbl.setBorder(BorderFactory.createEmptyBorder(0, 5, 0, 5));
_tb.add(lbl, 0);
}
Clone fragments detected by clone detection tool
File path: /sql12/app/src/net/sourceforge/squirrel_sql/client/gui/db/AliasesListInternalFrame.java
|
|
File path: /sql12/app/src/net/sourceforge/squirrel_sql/client/gui/db/DriversListInternalFrame.java
|
Method name: void createToolBar()
|
|
Method name: void createToolBar()
|
Number of AST nodes: 4
|
|
Number of AST nodes: 4
|
|
1 | if (_app.getDesktopStyle().isInternalFrameStyle())↵ | | 1 | if (_app.getDesktopStyle().isInternalFrameStyle())↵
|
2 | {↵ | | 2 | {↵
|
3 | final JLabel lbl = new JLabel(getWindowTitle(), SwingConstants.CENTER);↵ | | 3 | final JLabel lbl = new JLabel(getWindowTitle(), SwingConstants.CENTER);↵
|
4 | lbl.setBorder(BorderFactory.createEmptyBorder(0, 5, 0, 5));↵ | | 4 | lbl.setBorder(BorderFactory.createEmptyBorder(0, 5, 0, 5));↵
|
5 | _tb.add(lbl, 0);↵ | | 5 | _tb.add(lbl, 0);↵
|
6 | } | | 6 | }
|
See real code fragment |
|
See real code fragment |
Summary
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 in different classes |
Number of node comparisons | 16 |
-
{Refactorable}
Mapping Summary
Number of mapped statements | 4 |
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.2 |
Clone type | Type 1 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
4 | if (_app.getDesktopStyle().isInternalFrameStyle()) | | 4 | if (_app.getDesktopStyle().isInternalFrameStyle()) |
5 | final JLabel lbl = new JLabel(getWindowTitle(), SwingConstants.CENTER); | | 5 | final JLabel lbl = new JLabel(getWindowTitle(), SwingConstants.CENTER); |
6 | lbl.setBorder(BorderFactory.createEmptyBorder(0, 5, 0, 5)); | | 6 | lbl.setBorder(BorderFactory.createEmptyBorder(0, 5, 0, 5)); |
7 | | | 7 | |
Precondition Violations (0)
Row |
Violation |