File path: /columba-1.4-src/core/src/main/java/org/columba/core/gui/themes/plugin/PlasticLookAndFeelConfigPlugin.java | File path: /columba-1.4-src/mail/src/main/java/org/columba/mail/gui/config/accountwizard/FinishStep.java | |||
Method name: JPanel createPanel()
|
Method name: JComponent createComponent()
|
|||
Number of AST nodes: 7 | Number of AST nodes: 6 | |||
1 | list = new JList(computeThemes());↵ | 1 | JComponent component = new JPanel();↵ | |
2 | list.setCellRenderer(createThemeRenderer());↵ | 2 | ↵ | |
3 | JPanel panel = new JPanel();↵ | |||
4 | panel.setLayout(new BorderLayout(↵ | 3 | component.setLayout(new BoxLayout(component, BoxLayout.Y_AXIS));↵ | |
4 | MultiLineLabel label = new MultiLineLabel(MailResourceLoader.getString(↵ | |||
5 | ));↵ | 5 | "dialog", "accountwizard", "finish_text"));↵ | |
6 | JScrollPane pane = new JScrollPane(list);↵ | 6 | ↵ | |
7 | panel.add(pane, BorderLayout.NORTH↵ | 7 | component.add(label);↵ | |
8 | );↵ | 8 | component.add(Box.createVerticalGlue());↵ | |
9 | return panel; | 9 | return component; | |
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 |
Number of node comparisons | 32 |
Number of mapped statements | 3 |
Number of unmapped statements in the first code fragment | 4 |
Number of unmapped statements in the second code fragment | 3 |
Time elapsed for statement mapping (ms) | 0.0 |
Clone type | Type 3 |
ID | Statement | ID | Statement | ||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | list = new JList(computeThemes()); | | |||||||||||||||||||||||||||||
2 | list.setCellRenderer(createThemeRenderer()); | | |||||||||||||||||||||||||||||
3 | JPanel panel = new JPanel(); |
| 1 | JComponent component = new JPanel(); | |||||||||||||||||||||||||||
4 | panel.setLayout(new BorderLayout()); |
| | ||||||||||||||||||||||||||||
5 | JScrollPane pane = new JScrollPane(list); | | |||||||||||||||||||||||||||||
6 | panel.add(pane, BorderLayout.NORTH); |
| 2 | component.setLayout(new BoxLayout(component, BoxLayout.Y_AXIS)); | |||||||||||||||||||||||||||
| 3 | MultiLineLabel label = new MultiLineLabel(MailResourceLoader.getString("dialog", "accountwizard", "finish_text")); | |||||||||||||||||||||||||||||
| 4 | component.add(label); | |||||||||||||||||||||||||||||
| 5 | component.add(Box.createVerticalGlue()); | |||||||||||||||||||||||||||||
7 | return panel; |
| 6 | return component; |
Row | Violation |
---|---|
1 | Unmatched statement panel.setLayout(new BorderLayout()); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
2 | Expression panel.add(pane,BorderLayout.NORTH) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Expression component.setLayout(new BoxLayout(component,BoxLayout.Y_AXIS)) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
4 | Expression panel.add(pane,BorderLayout.NORTH) is a void method call, and thus it cannot be parameterized |
5 | Expression component.setLayout(new BoxLayout(component,BoxLayout.Y_AXIS)) is a void method call, and thus it cannot be parameterized |
6 | Expression panel.add(pane,BorderLayout.NORTH) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
7 | Expression component.setLayout(new BoxLayout(component,BoxLayout.Y_AXIS)) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
8 | Expression panel.add(pane,BorderLayout.NORTH) is a void method call, and thus it cannot be parameterized |
9 | Expression component.setLayout(new BoxLayout(component,BoxLayout.Y_AXIS)) is a void method call, and thus it cannot be parameterized |
10 | Clone fragment #1 returns variable panel with type javax.swing.JPanel , while Clone fragment #2 returns variable component with type javax.swing.JComponent |