File path: /jEdit-4.2/src/org/gjt/sp/jedit/gui/BufferOptions.java | File path: /jEdit-4.2/src/org/gjt/sp/jedit/gui/FontSelector.java | |||
Method name: void BufferOptions(View, Buffer)
|
Method name: void init(Font)
|
|||
Number of AST nodes: 17 | Number of AST nodes: 17 | |||
1 | JPanel buttons = new JPanel(); ↵ | 1 | JPanel buttons = new JPanel();↵ | |
2 | buttons.setLayout(new BoxLayout(buttons,BoxLayout.X_AXIS)); ↵ | 2 | buttons.setLayout(new BoxLayout(buttons,BoxLayout.X_AXIS));↵ | |
3 | buttons.setBorder(new EmptyBorder(12,0,0,0)); ↵ | 3 | buttons.setBorder(new EmptyBorder(12,0,0,0));↵ | |
4 | buttons.add(Box.createGlue()); ↵ | 4 | buttons.add(Box.createGlue());↵ | |
5 | ok = new JButton(jEdit.getProperty("common.ok")); ↵ | 5 | ok = new JButton(jEdit.getProperty("common.ok"));↵ | |
6 | ok.addActionListener(actionListener); ↵ | 6 | ok.addActionListener(new ActionHandler());↵ | |
7 | getRootPane().setDefaultButton(ok); ↵ | 7 | getRootPane().setDefaultButton(ok);↵ | |
8 | buttons.add(ok); ↵ | 8 | buttons.add(ok);↵ | |
9 | buttons.add(Box.createHorizontalStrut(6)); ↵ | 9 | buttons.add(Box.createHorizontalStrut(6));↵ | |
10 | cancel = new JButton(jEdit.getProperty("common.cancel")); ↵ | 10 | cancel = new JButton(jEdit.getProperty("common.cancel"));↵ | |
11 | cancel.addActionListener(actionListener); ↵ | 11 | cancel.addActionListener(new ActionHandler());↵ | |
12 | buttons.add(cancel); ↵ | 12 | buttons.add(cancel);↵ | |
13 | buttons.add(Box.createGlue()); ↵ | 13 | buttons.add(Box.createGlue());↵ | |
14 | content.add(BorderLayout.SOUTH,buttons);↵ | 14 | content.add(BorderLayout.SOUTH,buttons);↵ | |
15 | //}}}↵ | |||
16 | ↵ | |||
17 | pack(); ↵ | 15 | pack();↵ | |
18 | setLocationRelativeTo(view); ↵ | 16 | setLocationRelativeTo(getParent());↵ | |
19 | setVisible(true); | 17 |
| |
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 | 132 |
Number of mapped statements | 15 |
Number of unmapped statements in the first code fragment | 2 |
Number of unmapped statements in the second code fragment | 2 |
Time elapsed for statement mapping (ms) | 0.0 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
67 | JPanel buttons = new JPanel(); | 35 | JPanel buttons = new JPanel(); | |||||||||||||||||||||||
68 | buttons.setLayout(new BoxLayout(buttons, BoxLayout.X_AXIS)); | 36 | buttons.setLayout(new BoxLayout(buttons, BoxLayout.X_AXIS)); | |||||||||||||||||||||||
69 | buttons.setBorder(new EmptyBorder(12, 0, 0, 0)); | 37 | buttons.setBorder(new EmptyBorder(12, 0, 0, 0)); | |||||||||||||||||||||||
70 | buttons.add(Box.createGlue()); | 38 | buttons.add(Box.createGlue()); | |||||||||||||||||||||||
71 | ok = new JButton(jEdit.getProperty("common.ok")); | 39 | ok = new JButton(jEdit.getProperty("common.ok")); | |||||||||||||||||||||||
| 40 | ok.addActionListener(new ActionHandler()); | ||||||||||||||||||||||||
72 | ok.addActionListener(actionListener); |
| 49 | pack(); | ||||||||||||||||||||||
73 | getRootPane().setDefaultButton(ok); | 41 | getRootPane().setDefaultButton(ok); | |||||||||||||||||||||||
74 | buttons.add(ok); | 42 | buttons.add(ok); | |||||||||||||||||||||||
75 | buttons.add(Box.createHorizontalStrut(6)); | 43 | buttons.add(Box.createHorizontalStrut(6)); | |||||||||||||||||||||||
76 | cancel = new JButton(jEdit.getProperty("common.cancel")); | 44 | cancel = new JButton(jEdit.getProperty("common.cancel")); | |||||||||||||||||||||||
| 45 | cancel.addActionListener(new ActionHandler()); | ||||||||||||||||||||||||
77 | cancel.addActionListener(actionListener); | | ||||||||||||||||||||||||
78 | buttons.add(cancel); | 46 | buttons.add(cancel); | |||||||||||||||||||||||
79 | buttons.add(Box.createGlue()); | 47 | buttons.add(Box.createGlue()); | |||||||||||||||||||||||
80 | content.add(BorderLayout.SOUTH, buttons); | 48 | content.add(BorderLayout.SOUTH, buttons); | |||||||||||||||||||||||
81 | pack(); |
| 51 | setVisible(true); | ||||||||||||||||||||||
82 | setLocationRelativeTo(view); |
| 50 | setLocationRelativeTo(getParent()); | ||||||||||||||||||||||
83 | setVisible(true); | |
Row | Violation |
---|---|
1 | Expression ok.addActionListener(actionListener) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression ok.addActionListener(actionListener) is a void method call, and thus it cannot be parameterized |
3 | Expression pack() is a void method call, and thus it cannot be parameterized |
4 | Expression ok.addActionListener(actionListener) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
5 | Expression ok.addActionListener(actionListener) is a void method call, and thus it cannot be parameterized |
6 | Expression pack() is a void method call, and thus it cannot be parameterized |
7 | Expression pack() is a void method call, and thus it cannot be parameterized |
8 | Expression setVisible(true) is a void method call, and thus it cannot be parameterized |
9 | Expression pack() is a void method call, and thus it cannot be parameterized |
10 | Expression setVisible(true) is a void method call, and thus it cannot be parameterized |