File path: /columba-1.4-src/mail/src/main/java/org/columba/mail/gui/message/command/OpenAttachmentCommand.java | File path: /columba-1.4-src/mail/src/main/java/org/columba/mail/gui/message/command/SaveAttachmentAsCommand.java | |||
Method name: File getDestinationFile(MimeHeader)
|
Method name: File getDestinationFile(MimeHeader)
|
|||
Number of AST nodes: 9 | Number of AST nodes: 9 | |||
1 | while (true) {↵ | 1 | while (true) {↵ | |
2 | if (fileChooser.showSaveDialog(null) != JFileChooser.APPROVE_OPTION) {↵ | 2 | if (fileChooser.showSaveDialog(null) != JFileChooser.APPROVE_OPTION) {↵ | |
3 | return null;↵ | |||
4 | }↵ | |||
5 | ↵ | 3 | return null;↵ | |
4 | }↵ | |||
6 | tempFile = fileChooser.getSelectedFile();↵ | 5 | tempFile = fileChooser.getSelectedFile();↵ | |
7 | lastDir = tempFile.getParentFile();↵ | 6 | lastDir = tempFile.getParentFile();↵ | |
8 | if (tempFile.exists()) {↵ | 7 | if (tempFile.exists()) {↵ | |
9 | if (JOptionPane.showConfirmDialog(FrameManager.getInstance()↵ | 8 | if (JOptionPane.showConfirmDialog(FrameManager.getInstance()↵ | |
10 | .getActiveFrame(), "Overwrite File?",↵ | 9 | .getActiveFrame(), "Overwrite File?",↵ | |
11 | "Warning", JOptionPane.YES_NO_OPTION,↵ | 10 | "Warning", JOptionPane.YES_NO_OPTION,↵ | |
12 | JOptionPane.WARNING_MESSAGE) == JOptionPane.YES_OPTION) {↵ | 11 | JOptionPane.WARNING_MESSAGE) == JOptionPane.YES_OPTION) {↵ | |
13 | break;↵ | |||
14 | }↵ | |||
15 | } else {↵ | |||
16 | break;↵ | |||
17 | }↵ | |||
18 | ↵ | 12 | break;↵ | |
13 | }↵ | |||
14 | } else {↵ | |||
15 | break;↵ | |||
16 | }↵ | |||
19 | } | 17 | } | |
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.6 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 21 |
Number of mapped statements | 9 |
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.9 |
Clone type | Type 1 |
ID | Statement | ID | Statement | |
---|---|---|---|---|
13 | while (true) | 13 | while (true) | |
14 | if (fileChooser.showSaveDialog(null) != JFileChooser.APPROVE_OPTION) | 14 | if (fileChooser.showSaveDialog(null) != JFileChooser.APPROVE_OPTION) | |
15 | return null; | 15 | return null; | |
16 | tempFile = fileChooser.getSelectedFile(); | 16 | tempFile = fileChooser.getSelectedFile(); | |
17 | lastDir = tempFile.getParentFile(); | 17 | lastDir = tempFile.getParentFile(); | |
18 | if (tempFile.exists()) | 18 | if (tempFile.exists()) | |
19 | if (JOptionPane.showConfirmDialog(FrameManager.getInstance().getActiveFrame(), "Overwrite File?", "Warning", JOptionPane.YES_NO_OPTION, JOptionPane.WARNING_MESSAGE) == JOptionPane.YES_OPTION) | 19 | if (JOptionPane.showConfirmDialog(FrameManager.getInstance().getActiveFrame(), "Overwrite File?", "Warning", JOptionPane.YES_NO_OPTION, JOptionPane.WARNING_MESSAGE) == JOptionPane.YES_OPTION) | |
20 | break; | 20 | break; | |
else | else | |||
21 | break; | 21 | break; |
Row | Violation |
---|