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 setFrameMediator(IFrameMediator)
|
Method name: void switchFrameMediator(IFrameMediator)
|
|||
Number of AST nodes: 10 | Number of AST nodes: 10 | |||
1 | setContentPane(m.getContentPane());↵ | 1 | setContentPane(m.getContentPane());↵ | |
2 | try {↵ | 2 | try {↵ | |
3 | IExtensionHandler handler = PluginManager↵ | 3 | IExtensionHandler handler = PluginManager↵ | |
4 | .getInstance().getExtensionHandler(IExtensionHandlerKeys.ORG_COLUMBA_CORE_STATUSBAR);↵ | 4 | .getInstance().getExtensionHandler(IExtensionHandlerKeys.ORG_COLUMBA_CORE_STATUSBAR);↵ | |
5 | Enumeration e = handler.getExtensionEnumeration();↵ | 5 | Enumeration e = handler.getExtensionEnumeration();↵ | |
6 | while (e.hasMoreElements()) {↵ | 6 | while (e.hasMoreElements()) {↵ | |
7 | Extension ext = (Extension) e.nextElement();↵ | 7 | Extension ext = (Extension) e.nextElement();↵ | |
8 | try {↵ | 8 | try {↵ | |
9 | IStatusBarExtension comp = (IStatusBarExtension) ext↵ | 9 | IStatusBarExtension comp = (IStatusBarExtension) ext↵ | |
10 | .instanciateExtension(new Object[] { m });↵ | 10 | .instanciateExtension(new Object[] { m });↵ | |
11 | statusBar.addComponent(comp);↵ | 11 | statusBar.addComponent(comp);↵ | |
12 | } catch (PluginException e1) {↵ | 12 | } catch (PluginException e1) {↵ | |
13 | e1.printStackTrace();↵ | 13 | e1.printStackTrace();↵ | |
14 | }↵ | 14 | }↵ | |
15 | }↵ | 15 | }↵ | |
16 | } catch (PluginHandlerNotFoundException e) {↵ | 16 | } catch (PluginHandlerNotFoundException e) {↵ | |
17 | e.printStackTrace();↵ | 17 | e.printStackTrace();↵ | |
18 | }↵ | 18 | }↵ | |
19 | // add to new mediator's listener list↵ | 19 | // add to new mediator's listener list↵ | |
20 | mediator.addListener(this); | 20 |
| |
See real code fragment | See real code fragment |
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.4 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 24 |
Number of mapped statements | 10 |
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) | 5.7 |
Clone type | Type 1 |
ID | Statement | ID | Statement | |
---|---|---|---|---|
10 | setContentPane(m.getContentPane()); | 15 | setContentPane(m.getContentPane()); | |
11 | try | 16 | try | |
12 | IExtensionHandler handler = PluginManager.getInstance().getExtensionHandler(IExtensionHandlerKeys.ORG_COLUMBA_CORE_STATUSBAR); | 17 | IExtensionHandler handler = PluginManager.getInstance().getExtensionHandler(IExtensionHandlerKeys.ORG_COLUMBA_CORE_STATUSBAR); | |
13 | Enumeration e = handler.getExtensionEnumeration(); | 18 | Enumeration e = handler.getExtensionEnumeration(); | |
14 | while (e.hasMoreElements()) | 19 | while (e.hasMoreElements()) | |
15 | Extension ext = (Extension)e.nextElement(); | 20 | Extension ext = (Extension)e.nextElement(); | |
16 | try | 21 | try | |
17 | IStatusBarExtension comp = (IStatusBarExtension)ext.instanciateExtension(new Object[] {m}); | 22 | IStatusBarExtension comp = (IStatusBarExtension)ext.instanciateExtension(new Object[] {m}); | |
18 | statusBar.addComponent(comp); | 23 | statusBar.addComponent(comp); | |
19 | mediator.addListener(this); | 24 | mediator.addListener(this); |
Row | Violation |
---|