if (mf == null) // Probably caused by unit testing on headless system
{
log.warn("Mainframe is null");
} else {
mf.setMainPanel((javax.swing.JComponent) getCurrentGui());
mf.setEditMenu(getTreeListener().getCurrentNode().createPopupMenu());
}
if (mf == null) // Probably caused by unit testing on headless system
{
log.warn("Mainframe is null");
} else {
mf.setMainPanel((javax.swing.JComponent) getCurrentGui());
mf.setEditMenu(getTreeListener().getCurrentNode().createPopupMenu());
}
Clone fragments detected by clone detection tool
File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/gui/GuiPackage.java
|
|
File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/gui/ReportGuiPackage.java
|
Method name: void localeChanged(LocaleChangeEvent)
|
|
Method name: void localeChanged(LocaleChangeEvent)
|
Number of AST nodes: 4
|
|
Number of AST nodes: 4
|
|
1 | if (mf == null) // Probably caused by unit testing on headless system↵ | | 1 | if (mf == null) // Probably caused by unit testing on headless system↵
|
2 | {↵ | | 2 | {↵
|
3 | log.warn("Mainframe is null");↵ | | 3 | log.warn("Mainframe is null");↵
|
4 | } else {↵ | | 4 | } else {↵
|
5 | mf.setMainPanel((javax.swing.JComponent) getCurrentGui());↵ | | 5 | mf.setMainPanel((javax.swing.JComponent) getCurrentGui());↵
|
6 | mf.setEditMenu(getTreeListener().getCurrentNode().createPopupMenu());↵ | | 6 | mf.setEditMenu(getTreeListener().getCurrentNode().createPopupMenu());↵
|
7 | } | | 7 | }
|
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.2 |
Clones location | Clones are in different classes |
Number of node comparisons | 16 |
-
{Non-refactorable}
Mapping Summary
Number of mapped statements | 3 |
Number of unmapped statements in the first code fragment | 1 |
Number of unmapped statements in the second code fragment | 1 |
Time elapsed for statement mapping (ms) | 12.6 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
7 | if (mf == null) | | 7 | if (mf == null) |
8 | log.warn("Mainframe is null"); | | 8 | log.warn("Mainframe is null"); |
| | | | |
9 | mf.setMainPanel((javax.swing.JComponent)getCurrentGui()); | | 9 | mf.setMainPanel((javax.swing.JComponent)getCurrentGui()); |
| | | 10 | mf.setEditMenu(getTreeListener().getCurrentNode().createPopupMenu()); |
10 | mf.setEditMenu(getTreeListener().getCurrentNode().createPopupMenu()); | | | |
Precondition Violations (1)
Row |
Violation |
1 | Expression mf cannot be unified with expression mf , because common superclass javax.swing.JFrame does not declare member(s) public void setMainPanel(javax.swing.JComponent) |