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: 10 | Number of AST nodes: 10 | |||
1 | updateCurrentNode();↵ | 1 | updateCurrentNode();↵ | |
2 | // Forget about all GUIs we've created so far: we'll need to re-created↵ | 2 | // Forget about all GUIs we've created so far: we'll need to re-created↵ | |
3 | // them all!↵ | 3 | // them all!↵ | |
4 | guis = new HashMap();↵ | 4 | guis = new HashMap();↵ | |
5 | nodesToGui = new HashMap();↵ | 5 | nodesToGui = new HashMap();↵ | |
6 | testBeanGUIs = new HashMap();↵ | 6 | testBeanGUIs = new HashMap();↵ | |
7 | // BeanInfo objects also contain locale-sensitive data -- flush them↵ | 7 | // BeanInfo objects also contain locale-sensitive data -- flush them↵ | |
8 | // away:↵ | 8 | // away:↵ | |
9 | Introspector.flushCaches();↵ | 9 | Introspector.flushCaches();↵ | |
10 | // Now put the current GUI in place. [This code was copied from the↵ | 10 | // Now put the current GUI in place. [This code was copied from the↵ | |
11 | // EditCommand action -- we can't just trigger the action because that↵ | 11 | // EditCommand action -- we can't just trigger the action because that↵ | |
12 | // would populate the current node with the contents of the new GUI --↵ | 12 | // would populate the current node with the contents of the new GUI --↵ | |
13 | // which is empty.]↵ | 13 | // which is empty.]↵ | |
14 | MainFrame mf = getMainFrame(); // Fetch once↵ | 14 | ReportMainFrame mf = getMainFrame(); // Fetch once↵ | |
15 | if (mf == null) // Probably caused by unit testing on headless system↵ | 15 | if (mf == null) // Probably caused by unit testing on headless system↵ | |
16 | {↵ | 16 | {↵ | |
17 | log.warn("Mainframe is null");↵ | 17 | log.warn("Mainframe is null");↵ | |
18 | } else {↵ | 18 | } else {↵ | |
19 | mf.setMainPanel((javax.swing.JComponent) getCurrentGui());↵ | 19 | mf.setMainPanel((javax.swing.JComponent) getCurrentGui());↵ | |
20 | mf.setEditMenu(getTreeListener().getCurrentNode().createPopupMenu());↵ | 20 | mf.setEditMenu(getTreeListener().getCurrentNode().createPopupMenu());↵ | |
21 | } | 21 |
| |
See real code fragment | See real code fragment |
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 | 31 |
Number of mapped statements | 9 |
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) | 14.7 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | updateCurrentNode(); | 1 | updateCurrentNode(); | ||||||||||||||
2 | guis = new HashMap(); | 2 | guis = new HashMap(); | ||||||||||||||
3 | nodesToGui = new HashMap(); | 3 | nodesToGui = new HashMap(); | ||||||||||||||
4 | testBeanGUIs = new HashMap(); | 4 | testBeanGUIs = new HashMap(); | ||||||||||||||
5 | Introspector.flushCaches(); | 5 | Introspector.flushCaches(); | ||||||||||||||
6 | MainFrame mf = getMainFrame(); |
| 6 | ReportMainFrame mf = getMainFrame(); | |||||||||||||
7 | if (mf == null) |
| 7 | if (mf == null) | |||||||||||||
8 | log.warn("Mainframe is null"); | 8 | log.warn("Mainframe is null"); | ||||||||||||||
else | else | ||||||||||||||||
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()); | |
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) |
2 | Clone fragment #1 returns variable mf with type org.apache.jmeter.gui.MainFrame , while Clone fragment #2 returns variable mf with type org.apache.jmeter.gui.ReportMainFrame |