File path: /columba-1.4-src/core/src/main/java/org/columba/core/gui/frame/DefaultContainer.java | File path: /columba-1.4-src/core/src/main/java/org/columba/core/gui/frame/DefaultContainer.java | |||
Method name: void switchFrameMediator(IFrameMediator)
|
Method name: void setFrameMediator(IFrameMediator)
|
|||
Number of AST nodes: 10 | Number of AST nodes: 9 | |||
1 | setToolBar(toolbar);↵ | |||
2 | // update content-pane↵ | |||
3 | setContentPane(m.getContentPane());↵ | 1 | setContentPane(m.getContentPane());↵ | |
4 | try {↵ | 2 | try {↵ | |
5 | IExtensionHandler handler = PluginManager↵ | 3 | IExtensionHandler handler = PluginManager↵ | |
6 | .getInstance().getExtensionHandler(IExtensionHandlerKeys.ORG_COLUMBA_CORE_STATUSBAR);↵ | 4 | .getInstance().getExtensionHandler(IExtensionHandlerKeys.ORG_COLUMBA_CORE_STATUSBAR);↵ | |
7 | Enumeration e = handler.getExtensionEnumeration();↵ | 5 | Enumeration e = handler.getExtensionEnumeration();↵ | |
8 | while (e.hasMoreElements()) {↵ | 6 | while (e.hasMoreElements()) {↵ | |
9 | Extension ext = (Extension) e.nextElement();↵ | 7 | Extension ext = (Extension) e.nextElement();↵ | |
10 | try {↵ | 8 | try {↵ | |
11 | IStatusBarExtension comp = (IStatusBarExtension) ext↵ | 9 | IStatusBarExtension comp = (IStatusBarExtension) ext↵ | |
12 | .instanciateExtension(new Object[] { m });↵ | 10 | .instanciateExtension(new Object[] { m });↵ | |
13 | statusBar.addComponent(comp);↵ | 11 | statusBar.addComponent(comp);↵ | |
14 | } catch (PluginException e1) {↵ | 12 | } catch (PluginException e1) {↵ | |
15 | e1.printStackTrace();↵ | 13 | e1.printStackTrace();↵ | |
16 | }↵ | 14 | }↵ | |
17 | }↵ | 15 | }↵ | |
18 | } catch (PluginHandlerNotFoundException e) {↵ | 16 | } catch (PluginHandlerNotFoundException e) {↵ | |
19 | e.printStackTrace();↵ | 17 | e.printStackTrace();↵ | |
20 | } | 18 |
| |
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.3 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 23 |
Number of mapped statements | 9 |
Number of unmapped statements in the first code fragment | 1 |
Number of unmapped statements in the second code fragment | 0 |
Time elapsed for statement mapping (ms) | 2.7 |
Clone type | Type 3 |
ID | Statement | ID | Statement | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
14 | setToolBar(toolbar); |
| 10 | setContentPane(m.getContentPane()); | |||||||||||||||
15 | setContentPane(m.getContentPane()); | | |||||||||||||||||
16 | try | 11 | try | ||||||||||||||||
17 | IExtensionHandler handler = PluginManager.getInstance().getExtensionHandler(IExtensionHandlerKeys.ORG_COLUMBA_CORE_STATUSBAR); | 12 | IExtensionHandler handler = PluginManager.getInstance().getExtensionHandler(IExtensionHandlerKeys.ORG_COLUMBA_CORE_STATUSBAR); | ||||||||||||||||
18 | Enumeration e = handler.getExtensionEnumeration(); | 13 | Enumeration e = handler.getExtensionEnumeration(); | ||||||||||||||||
19 | while (e.hasMoreElements()) | 14 | while (e.hasMoreElements()) | ||||||||||||||||
20 | Extension ext = (Extension)e.nextElement(); | 15 | Extension ext = (Extension)e.nextElement(); | ||||||||||||||||
21 | try | 16 | try | ||||||||||||||||
22 | IStatusBarExtension comp = (IStatusBarExtension)ext.instanciateExtension(new Object[] {m}); | 17 | IStatusBarExtension comp = (IStatusBarExtension)ext.instanciateExtension(new Object[] {m}); | ||||||||||||||||
23 | statusBar.addComponent(comp); | 18 | statusBar.addComponent(comp); |
Row | Violation |
---|---|
1 | Expression setToolBar(toolbar) is a void method call, and thus it cannot be parameterized |
2 | Expression setContentPane(m.getContentPane()) is a void method call, and thus it cannot be parameterized |