File path: /columba-1.4-src/core/src/main/java/org/columba/core/gui/context/ContextResultBox.java | File path: /columba-1.4-src/core/src/main/java/org/columba/core/gui/search/ComponentBoxContainer.java | |||
Method name: void ContextResultBox(IFrameMediator, IContextProvider, IContextSearchManager)
|
Method name: void ComponentBoxContainer(IComponentBox)
|
|||
Number of AST nodes: 13 | Number of AST nodes: 13 | |||
1 | collapsible = new JXCollapsiblePane();↵ | 1 | collapsible = new JXCollapsiblePane();↵ | |
2 | // collapsible.getContentPane().setBackground(Color.WHITE);↵ | 2 | collapsible.↵ | |
3 | collapsible.add(provider.getView());↵ | 3 | add(compBox.getView());↵ | |
4 | collapsible.setCollapsed(true);↵ | 4 | collapsible.setCollapsed(true);↵ | |
5 | Action toggleAction = collapsible.getActionMap().get(↵ | 5 | Action toggleAction = collapsible.getActionMap().get(↵ | |
6 | JXCollapsiblePane.TOGGLE_ACTION);↵ | 6 | JXCollapsiblePane.TOGGLE_ACTION);↵ | |
7 | // use the collapse/expand icons from the JTree UI↵ | 7 | // use the collapse/expand icons from the JTree UI↵ | |
8 | toggleAction.putValue(JXCollapsiblePane.COLLAPSE_ICON, UIManager↵ | 8 | toggleAction.putValue(JXCollapsiblePane.COLLAPSE_ICON, UIManager↵ | |
9 | .getIcon("Tree.expandedIcon"));↵ | 9 | .getIcon("Tree.expandedIcon"));↵ | |
10 | toggleAction.putValue(JXCollapsiblePane.EXPAND_ICON, UIManager↵ | 10 | toggleAction.putValue(JXCollapsiblePane.EXPAND_ICON, UIManager↵ | |
11 | .getIcon("Tree.collapsedIcon"));↵ | 11 | .getIcon("Tree.collapsedIcon"));↵ | |
12 | link = new JXHyperlink(toggleAction);↵ | 12 | link = new JXHyperlink(toggleAction);↵ | |
13 | link.setText(provider.getName());↵ | 13 | link.setText(compBox.getName());↵ | |
14 | link.setToolTipText(provider.getDescription());↵ | 14 | link.setToolTipText(compBox.getDescription());↵ | |
15 | // link.setFont(link.getFont().deriveFont(Font.BOLD));↵ | 15 | ↵ | |
16 | link.setOpaque(true);↵ | |||
17 | // link.setBackground(titleBackground);↵ | 16 | link.setOpaque(true);↵ | |
18 | link.setFocusPainted(false);↵ | 17 | link.setFocusPainted(false);↵ | |
19 | link.setUnclickedColor(UIManager.getColor("Label.foreground"));↵ | 18 | link.setUnclickedColor(UIManager.getColor("Label.foreground"));↵ | |
20 | link.setClickedColor(UIManager.getColor("Label.foreground")); | 19 |
| |
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.0 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 82 |
Number of mapped statements | 13 |
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) | 0.0 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
5 | collapsible = new JXCollapsiblePane(); | 2 | collapsible = new JXCollapsiblePane(); | |||||||||||||||
6 | collapsible.add(provider.getView()); |
| 3 | collapsible.add(compBox.getView()); | ||||||||||||||
7 | collapsible.setCollapsed(true); | 4 | collapsible.setCollapsed(true); | |||||||||||||||
8 | Action toggleAction = collapsible.getActionMap().get(JXCollapsiblePane.TOGGLE_ACTION); | 5 | Action toggleAction = collapsible.getActionMap().get(JXCollapsiblePane.TOGGLE_ACTION); | |||||||||||||||
9 | toggleAction.putValue(JXCollapsiblePane.COLLAPSE_ICON, UIManager.getIcon("Tree.expandedIcon")); | 6 | toggleAction.putValue(JXCollapsiblePane.COLLAPSE_ICON, UIManager.getIcon("Tree.expandedIcon")); | |||||||||||||||
10 | toggleAction.putValue(JXCollapsiblePane.EXPAND_ICON, UIManager.getIcon("Tree.collapsedIcon")); | 7 | toggleAction.putValue(JXCollapsiblePane.EXPAND_ICON, UIManager.getIcon("Tree.collapsedIcon")); | |||||||||||||||
11 | link = new JXHyperlink(toggleAction); | 8 | link = new JXHyperlink(toggleAction); | |||||||||||||||
12 | link.setText(provider.getName()); |
| 9 | link.setText(compBox.getName()); | ||||||||||||||
13 | link.setToolTipText(provider.getDescription()); |
| 10 | link.setToolTipText(compBox.getDescription()); | ||||||||||||||
14 | link.setOpaque(true); | 11 | link.setOpaque(true); | |||||||||||||||
15 | link.setFocusPainted(false); | 12 | link.setFocusPainted(false); | |||||||||||||||
16 | link.setUnclickedColor(UIManager.getColor("Label.foreground")); | 13 | link.setUnclickedColor(UIManager.getColor("Label.foreground")); | |||||||||||||||
17 | link.setClickedColor(UIManager.getColor("Label.foreground")); | 14 | link.setClickedColor(UIManager.getColor("Label.foreground")); |
Row | Violation |
---|---|
1 | Type org.columba.core.context.api.IContextProvider of variable provider does not match with type org.columba.core.gui.frame.api.IComponentBox of variable compBox |
2 | Type org.columba.core.context.api.IContextProvider of variable provider does not match with type org.columba.core.gui.frame.api.IComponentBox of variable compBox |
3 | Type org.columba.core.context.api.IContextProvider of variable provider does not match with type org.columba.core.gui.frame.api.IComponentBox of variable compBox |