File path: /jEdit-4.2/src/org/gjt/sp/jedit/options/ContextOptionPane.java | File path: /jEdit-4.2/src/org/gjt/sp/jedit/options/ToolBarOptionPane.java | |||
Method name: void ContextAddDialog(Component)
|
Method name: void ToolBarEditDialog(Component, DefaultComboBoxModel, ToolBarOptionPane.Button)
|
|||
Number of AST nodes: 16 | Number of AST nodes: 16 | |||
1 | typePanel.add(action);↵ | 1 | typePanel.add(action);↵ | |
2 | content.add(BorderLayout.NORTH,typePanel);↵ | 2 | content.add(BorderLayout.NORTH,typePanel);↵ | |
3 | JPanel actionPanel = new JPanel(new BorderLayout(6,6));↵ | 3 | JPanel actionPanel = new JPanel(new BorderLayout(6,6));↵ | |
4 | ActionSet[] actionsList = jEdit.getActionSets();↵ | 4 | ActionSet[] actionsList = jEdit.getActionSets();↵ | |
5 | Vector vec = new Vector(actionsList.length);↵ | 5 | Vector vec = new Vector(actionsList.length);↵ | |
6 | for(int i = 0; i < actionsList.length; i++)↵ | 6 | for(int i = 0; i < actionsList.length; i++)↵ | |
7 | {↵ | 7 | {↵ | |
8 | ActionSet actionSet = actionsList[i];↵ | 8 | ActionSet actionSet = actionsList[i];↵ | |
9 | if(actionSet.getActionCount() != 0)↵ | 9 | if(actionSet.getActionCount() != 0)↵ | |
10 | vec.addElement(actionSet);↵ | 10 | vec.addElement(actionSet);↵ | |
11 | }↵ | 11 | }↵ | |
12 | combo = new JComboBox(vec);↵ | 12 | combo = new JComboBox(vec);↵ | |
13 | combo.addActionListener(actionHandler);↵ | 13 | combo.addActionListener(actionHandler);↵ | |
14 | actionPanel.add(BorderLayout.NORTH,combo);↵ | 14 | actionPanel.add(BorderLayout.NORTH,combo);↵ | |
15 | list = new JList();↵ | 15 | list = new JList();↵ | |
16 | list.setVisibleRowCount(8);↵ | 16 | list.setVisibleRowCount(8);↵ | |
17 | list.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);↵ | 17 | list.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);↵ | |
18 | actionPanel.add(BorderLayout.CENTER,new JScrollPane(list)); | 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.4 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 68 |
Number of mapped statements | 16 |
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) | 8.8 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
18 | typePanel.add(action); | 17 | typePanel.add(action); | ||||||||||||
19 | content.add(BorderLayout.NORTH, typePanel); | 18 | content.add(BorderLayout.NORTH, typePanel); | ||||||||||||
20 | JPanel actionPanel = new JPanel(new BorderLayout(6, 6)); | 19 | JPanel actionPanel = new JPanel(new BorderLayout(6, 6)); | ||||||||||||
21 | ActionSet[] actionsList = jEdit.getActionSets(); | 20 | ActionSet[] actionsList = jEdit.getActionSets(); | ||||||||||||
22 | Vector vec = new Vector(actionsList.length); | 21 | Vector vec = new Vector(actionsList.length); | ||||||||||||
23 | for (int i = 0; i < actionsList.length; i++) | 22 | for (int i = 0; i < actionsList.length; i++) | ||||||||||||
24 | ActionSet actionSet = actionsList[i]; | 23 | ActionSet actionSet = actionsList[i]; | ||||||||||||
25 | if (actionSet.getActionCount() != 0) | 24 | if (actionSet.getActionCount() != 0) | ||||||||||||
26 | vec.addElement(actionSet); | 25 | vec.addElement(actionSet); | ||||||||||||
27 | combo = new JComboBox(vec); | 26 | combo = new JComboBox(vec); | ||||||||||||
28 | combo.addActionListener(actionHandler); |
| 27 | combo.addActionListener(actionHandler); | |||||||||||
29 | actionPanel.add(BorderLayout.NORTH, combo); | 28 | actionPanel.add(BorderLayout.NORTH, combo); | ||||||||||||
30 | list = new JList(); | 29 | list = new JList(); | ||||||||||||
31 | list.setVisibleRowCount(8); | 30 | list.setVisibleRowCount(8); | ||||||||||||
32 | list.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); | 31 | list.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); | ||||||||||||
33 | actionPanel.add(BorderLayout.CENTER, new JScrollPane(list)); | 32 | actionPanel.add(BorderLayout.CENTER, new JScrollPane(list)); |
Row | Violation |
---|---|
1 | Type org.gjt.sp.jedit.options.ContextAddDialog.ActionHandler of variable actionHandler does not match with type org.gjt.sp.jedit.options.ToolBarEditDialog.ActionHandler of variable actionHandler |