File path: /columba-1.4-src/mail/src/main/java/org/columba/mail/gui/config/subscribe/SubscribeDialog.java | File path: /columba-1.4-src/mail/src/main/java/org/columba/mail/gui/config/filter/ConfigFrame.java | |||
Method name: void initComponents()
|
Method name: void initComponents()
|
|||
Number of AST nodes: 23 | Number of AST nodes: 23 | |||
1 | tree.setRootVisible(false);↵ | 1 | listView.setDragEnabled(true);↵ | |
2 | JScrollPane scrollPane = new JScrollPane(tree);↵ | 2 | JScrollPane scrollPane = new JScrollPane(listView);↵ | |
3 | scrollPane.setPreferredSize(new Dimension(300, 250));↵ | 3 | scrollPane.setPreferredSize(new Dimension(300, 250));↵ | |
4 | scrollPane.getViewport().setBackground(Color.white);↵ | 4 | scrollPane.getViewport().setBackground(Color.white);↵ | |
5 | scrollPane.setTransferHandler(new FilterTransferHandler());↵ | 5 | scrollPane.setTransferHandler(new FilterTransferHandler());↵ | |
6 | centerPanel.add(scrollPane);↵ | 6 | centerPanel.add(scrollPane);↵ | |
7 | mainPanel.add(centerPanel);↵ | 7 | mainPanel.add(centerPanel);↵ | |
8 | JPanel bottomPanel = new JPanel(new BorderLayout());↵ | 8 | JPanel bottomPanel = new JPanel(new BorderLayout());↵ | |
9 | bottomPanel.setBorder(new SingleSideEtchedBorder(SwingConstants.TOP));↵ | 9 | bottomPanel.setBorder(new SingleSideEtchedBorder(SwingConstants.TOP));↵ | |
10 | JPanel buttonPanel = new JPanel(new GridLayout(1, 2, 6, 0));↵ | 10 | JPanel buttonPanel = new JPanel(new GridLayout(1, 2, 6, 0));↵ | |
11 | buttonPanel.setBorder(BorderFactory.createEmptyBorder(12, 12, 12, 12));↵ | 11 | buttonPanel.setBorder(BorderFactory.createEmptyBorder(12, 12, 12, 12));↵ | |
12 | ButtonWithMnemonic closeButton = new ButtonWithMnemonic(↵ | 12 | ButtonWithMnemonic closeButton = new ButtonWithMnemonic(↵ | |
13 | MailResourceLoader.getString("global", "close"));↵ | 13 | MailResourceLoader.getString("global", "close"));↵ | |
14 | closeButton.setActionCommand("CLOSE"); //$NON-NLS-1$↵ | 14 | closeButton.setActionCommand("CLOSE"); //$NON-NLS-1$↵ | |
15 | closeButton.addActionListener(this);↵ | 15 | closeButton.addActionListener(this);↵ | |
16 | buttonPanel.add(closeButton);↵ | 16 | buttonPanel.add(closeButton);↵ | |
17 | ButtonWithMnemonic helpButton = new ButtonWithMnemonic(↵ | 17 | ButtonWithMnemonic helpButton = new ButtonWithMnemonic(↵ | |
18 | MailResourceLoader.getString("global", "help"));↵ | 18 | MailResourceLoader.getString("global", "help"));↵ | |
19 | buttonPanel.add(helpButton);↵ | 19 | buttonPanel.add(helpButton);↵ | |
20 | bottomPanel.add(buttonPanel, BorderLayout.EAST);↵ | 20 | bottomPanel.add(buttonPanel, BorderLayout.EAST);↵ | |
21 | getContentPane().add(bottomPanel, BorderLayout.SOUTH);↵ | 21 | getContentPane().add(bottomPanel, BorderLayout.SOUTH);↵ | |
22 | getRootPane().setDefaultButton(closeButton);↵ | 22 | getRootPane().setDefaultButton(closeButton);↵ | |
23 | getRootPane().registerKeyboardAction(this, "CLOSE",↵ | 23 | getRootPane().registerKeyboardAction(this, "CLOSE",↵ | |
24 | KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0),↵ | 24 | KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0),↵ | |
25 | JComponent.WHEN_IN_FOCUSED_WINDOW);↵ | 25 | JComponent.WHEN_IN_FOCUSED_WINDOW);↵ | |
26 | // associate with JavaHelp↵ | 26 | // associate with JavaHelp↵ | |
27 | HelpManager.getInstance().enableHelpOnButton(helpButton,↵ | 27 | HelpManager.getInstance().enableHelpOnButton(helpButton,↵ | |
28 | "organising_and_managing_your_email_3");↵ | 28 | "organising_and_managing_your_email_3");↵ | |
29 | HelpManager.getInstance().enableHelpKey(getRootPane(),↵ | 29 | HelpManager.getInstance().enableHelpKey(getRootPane(),↵ | |
30 | "organising_and_managing_your_email_3"); | 30 |
| |
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 | 204 |
Number of mapped statements | 23 |
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 | ||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
55 | tree.setRootVisible(false); |
| 101 | listView.setDragEnabled(true); | |||||||||||||||||||||
56 | JScrollPane scrollPane = new JScrollPane(tree); |
| 102 | JScrollPane scrollPane = new JScrollPane(listView); | |||||||||||||||||||||
57 | scrollPane.setPreferredSize(new Dimension(300, 250)); | 103 | scrollPane.setPreferredSize(new Dimension(300, 250)); | ||||||||||||||||||||||
58 | scrollPane.getViewport().setBackground(Color.white); | 104 | scrollPane.getViewport().setBackground(Color.white); | ||||||||||||||||||||||
59 | scrollPane.setTransferHandler(new FilterTransferHandler()); | 105 | scrollPane.setTransferHandler(new FilterTransferHandler()); | ||||||||||||||||||||||
60 | centerPanel.add(scrollPane); | 106 | centerPanel.add(scrollPane); | ||||||||||||||||||||||
61 | mainPanel.add(centerPanel); | 107 | mainPanel.add(centerPanel); | ||||||||||||||||||||||
62 | JPanel bottomPanel = new JPanel(new BorderLayout()); | 108 | JPanel bottomPanel = new JPanel(new BorderLayout()); | ||||||||||||||||||||||
63 | bottomPanel.setBorder(new SingleSideEtchedBorder(SwingConstants.TOP)); | 109 | bottomPanel.setBorder(new SingleSideEtchedBorder(SwingConstants.TOP)); | ||||||||||||||||||||||
64 | JPanel buttonPanel = new JPanel(new GridLayout(1, 2, 6, 0)); | 110 | JPanel buttonPanel = new JPanel(new GridLayout(1, 2, 6, 0)); | ||||||||||||||||||||||
65 | buttonPanel.setBorder(BorderFactory.createEmptyBorder(12, 12, 12, 12)); | 111 | buttonPanel.setBorder(BorderFactory.createEmptyBorder(12, 12, 12, 12)); | ||||||||||||||||||||||
66 | ButtonWithMnemonic closeButton = new ButtonWithMnemonic(MailResourceLoader.getString("global", "close")); | 112 | ButtonWithMnemonic closeButton = new ButtonWithMnemonic(MailResourceLoader.getString("global", "close")); | ||||||||||||||||||||||
67 | closeButton.setActionCommand("CLOSE"); | 113 | closeButton.setActionCommand("CLOSE"); | ||||||||||||||||||||||
68 | closeButton.addActionListener(this); | 114 | closeButton.addActionListener(this); | ||||||||||||||||||||||
69 | buttonPanel.add(closeButton); | 115 | buttonPanel.add(closeButton); | ||||||||||||||||||||||
70 | ButtonWithMnemonic helpButton = new ButtonWithMnemonic(MailResourceLoader.getString("global", "help")); | 116 | ButtonWithMnemonic helpButton = new ButtonWithMnemonic(MailResourceLoader.getString("global", "help")); | ||||||||||||||||||||||
71 | buttonPanel.add(helpButton); | 117 | buttonPanel.add(helpButton); | ||||||||||||||||||||||
72 | bottomPanel.add(buttonPanel, BorderLayout.EAST); | 118 | bottomPanel.add(buttonPanel, BorderLayout.EAST); | ||||||||||||||||||||||
73 | getContentPane().add(bottomPanel, BorderLayout.SOUTH); | 119 | getContentPane().add(bottomPanel, BorderLayout.SOUTH); | ||||||||||||||||||||||
74 | getRootPane().setDefaultButton(closeButton); | 120 | getRootPane().setDefaultButton(closeButton); | ||||||||||||||||||||||
75 | getRootPane().registerKeyboardAction(this, "CLOSE", KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0), JComponent.WHEN_IN_FOCUSED_WINDOW); | 121 | getRootPane().registerKeyboardAction(this, "CLOSE", KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0), JComponent.WHEN_IN_FOCUSED_WINDOW); | ||||||||||||||||||||||
76 | HelpManager.getInstance().enableHelpOnButton(helpButton, "organising_and_managing_your_email_3"); | 122 | HelpManager.getInstance().enableHelpOnButton(helpButton, "organising_and_managing_your_email_3"); | ||||||||||||||||||||||
77 | HelpManager.getInstance().enableHelpKey(getRootPane(), "organising_and_managing_your_email_3"); | 123 | HelpManager.getInstance().enableHelpKey(getRootPane(), "organising_and_managing_your_email_3"); |
Row | Violation |
---|---|
1 | Expression tree.setRootVisible(false) is a void method call, and thus it cannot be parameterized |
2 | Expression listView.setDragEnabled(true) is a void method call, and thus it cannot be parameterized |