File path: /columba-1.4-src/contact/src/main/java/org/columba/addressbook/gui/dialog/importfilter/LocationStep.java | File path: /columba-1.4-src/mail/src/main/java/org/columba/mail/gui/config/mailboximport/LocationStep.java | |||
Method name: JComponent createComponent()
|
Method name: JComponent createComponent()
|
|||
Number of AST nodes: 21 | Number of AST nodes: 21 | |||
1 | JComponent component = new JPanel();↵ | 1 | JComponent component = new JPanel();↵ | |
2 | component.setLayout(new BoxLayout(component, BoxLayout.Y_AXIS));↵ | 2 | component.setLayout(new BoxLayout(component, BoxLayout.Y_AXIS));↵ | |
3 | component.add(new MultiLineLabel(AddressbookResourceLoader.getString(↵ | 3 | component.add(new MultiLineLabel(MailResourceLoader.getString(↵ | |
4 | "dialog", "addressbookimport", "location_text")));↵ | 4 | "dialog", "mailboximport", "location_text")));↵ | |
5 | component.add(Box.createVerticalStrut(40));↵ | 5 | component.add(Box.createVerticalStrut(40));↵ | |
6 | WizardTextField middlePanel = new WizardTextField();↵ | 6 | WizardTextField middlePanel = new WizardTextField();↵ | |
7 | LabelWithMnemonic sourceLabel = new LabelWithMnemonic(AddressbookResourceLoader.getString(↵ | 7 | LabelWithMnemonic sourceLabel = new LabelWithMnemonic(MailResourceLoader.getString(↵ | |
8 | "dialog", "addressbookimport", "source"));↵ | 8 | "dialog", "mailboximport", "source"));↵ | |
9 | middlePanel.addLabel(sourceLabel);↵ | 9 | middlePanel.addLabel(sourceLabel);↵ | |
10 | sourceButton = new JButton("...");↵ | 10 | sourceButton = new JButton("...");↵ | |
11 | sourceButton.addActionListener(this);↵ | 11 | source↵ | |
12 | sourceLabel.setLabelFor(sourceButton↵ | 12 | Label.setLabelFor(sourceButton);↵ | |
13 | );↵ | 13 | sourceButton.addActionListener(this);↵ | |
14 | middlePanel.addTextField(sourceButton);↵ | 14 | middlePanel.addTextField(sourceButton);↵ | |
15 | middlePanel.addExample(new JLabel());↵ | 15 | middlePanel.addExample(new JLabel());↵ | |
16 | LabelWithMnemonic destinationLabel = new LabelWithMnemonic(AddressbookResourceLoader.getString(↵ | 16 | LabelWithMnemonic destinationLabel = new LabelWithMnemonic(MailResourceLoader.getString(↵ | |
17 | "dialog", "addressbookimport", "destination"));↵ | 17 | "dialog", "mailboximport", "destination"));↵ | |
18 | middlePanel.addLabel(destinationLabel);↵ | 18 | middlePanel.addLabel(destinationLabel);↵ | |
19 | destinationButton = new JButton("...");↵ | 19 | destinationButton = new JButton("...");↵ | |
20 | destinationButton.addActionListener(this);↵ | 20 | destination↵ | |
21 | destinationLabel.setLabelFor(destinationButton↵ | 21 | Label.setLabelFor(destinationButton);↵ | |
22 | );↵ | 22 | destinationButton.addActionListener(this);↵ | |
23 | middlePanel.addTextField(destinationButton);↵ | 23 | middlePanel.addTextField(destinationButton);↵ | |
24 | middlePanel.addExample(new JLabel(AddressbookResourceLoader.getString(↵ | 24 | middlePanel.addExample(new JLabel(MailResourceLoader.getString(↵ | |
25 | "dialog", "addressbookimport", "explanation")));↵ | 25 | "dialog", "mailboximport", "explanation")));↵ | |
26 | component.add(middlePanel);↵ | 26 | component.add(middlePanel);↵ | |
27 | return component; | 27 |
| |
See real code fragment | See real code fragment |
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 1 |
Number of non-refactorable cases | 0 |
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 | 21 |
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 | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | JComponent component = new JPanel(); | 1 | JComponent component = new JPanel(); | ||||||||||||||
2 | component.setLayout(new BoxLayout(component, BoxLayout.Y_AXIS)); | 2 | component.setLayout(new BoxLayout(component, BoxLayout.Y_AXIS)); | ||||||||||||||
3 | component.add(new MultiLineLabel(AddressbookResourceLoader.getString("dialog", "addressbookimport", "location_text"))); |
| 3 | component.add(new MultiLineLabel(MailResourceLoader.getString("dialog", "mailboximport", "location_text"))); | |||||||||||||
4 | component.add(Box.createVerticalStrut(40)); | 4 | component.add(Box.createVerticalStrut(40)); | ||||||||||||||
5 | WizardTextField middlePanel = new WizardTextField(); | 5 | WizardTextField middlePanel = new WizardTextField(); | ||||||||||||||
6 | LabelWithMnemonic sourceLabel = new LabelWithMnemonic(AddressbookResourceLoader.getString("dialog", "addressbookimport", "source")); |
| 6 | LabelWithMnemonic sourceLabel = new LabelWithMnemonic(MailResourceLoader.getString("dialog", "mailboximport", "source")); | |||||||||||||
7 | middlePanel.addLabel(sourceLabel); | 7 | middlePanel.addLabel(sourceLabel); | ||||||||||||||
8 | sourceButton = new JButton("..."); | 8 | sourceButton = new JButton("..."); | ||||||||||||||
9 | sourceButton.addActionListener(this); | 10 | sourceButton.addActionListener(this); | ||||||||||||||
10 | sourceLabel.setLabelFor(sourceButton); | 9 | sourceLabel.setLabelFor(sourceButton); | ||||||||||||||
11 | middlePanel.addTextField(sourceButton); | 11 | middlePanel.addTextField(sourceButton); | ||||||||||||||
12 | middlePanel.addExample(new JLabel()); | 12 | middlePanel.addExample(new JLabel()); | ||||||||||||||
13 | LabelWithMnemonic destinationLabel = new LabelWithMnemonic(AddressbookResourceLoader.getString("dialog", "addressbookimport", "destination")); |
| 13 | LabelWithMnemonic destinationLabel = new LabelWithMnemonic(MailResourceLoader.getString("dialog", "mailboximport", "destination")); | |||||||||||||
14 | middlePanel.addLabel(destinationLabel); | 14 | middlePanel.addLabel(destinationLabel); | ||||||||||||||
15 | destinationButton = new JButton("..."); | 15 | destinationButton = new JButton("..."); | ||||||||||||||
16 | destinationButton.addActionListener(this); | 17 | destinationButton.addActionListener(this); | ||||||||||||||
17 | destinationLabel.setLabelFor(destinationButton); | 16 | destinationLabel.setLabelFor(destinationButton); | ||||||||||||||
18 | middlePanel.addTextField(destinationButton); | 18 | middlePanel.addTextField(destinationButton); | ||||||||||||||
19 | middlePanel.addExample(new JLabel(AddressbookResourceLoader.getString("dialog", "addressbookimport", "explanation"))); |
| 19 | middlePanel.addExample(new JLabel(MailResourceLoader.getString("dialog", "mailboximport", "explanation"))); | |||||||||||||
20 | component.add(middlePanel); | 20 | component.add(middlePanel); | ||||||||||||||
21 | return component; | 21 | return component; |
Row | Violation |
---|