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