File path: /columba-1.4-src/mail/src/main/java/org/columba/mail/gui/message/action/OpenAttachmentAction.java | File path: /columba-1.4-src/mail/src/main/java/org/columba/mail/gui/message/action/SaveAsAttachmentAction.java | |||
Method name: void actionPerformed(ActionEvent)
|
Method name: void actionPerformed(ActionEvent)
|
|||
Number of AST nodes: 4 | Number of AST nodes: 4 | |||
1 | IMailFolderCommandReference ref = mediator.getSelectedReference();↵ | 1 | IMailFolderCommandReference ref = mediator.getSelectedReference();↵ | |
2 | if (attachmentViewer != null) {↵ | 2 | if (attachmentViewer != null)↵ | |
3 | address = attachmentViewer.getSelected();↵ | 3 | address = attachmentViewer.getSelected();↵ | |
4 | }↵ | |||
5 | CommandProcessor.getInstance().addOp(↵ | 4 | CommandProcessor.getInstance().addOp(↵ | |
6 | new OpenAttachmentCommand(new MailFolderCommandReference(ref↵ | 5 | new SaveAttachmentAsCommand(new MailFolderCommandReference(ref↵ | |
7 | .getSourceFolder(), ref.getUids(), address))); | 6 |
| |
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.1 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 8 |
Number of mapped statements | 4 |
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 2 |
ID | Statement | ID | Statement | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | IMailFolderCommandReference ref = mediator.getSelectedReference(); | 1 | IMailFolderCommandReference ref = mediator.getSelectedReference(); | |||||||||||||
2 | if (attachmentViewer != null) | 2 | if (attachmentViewer != null) | |||||||||||||
3 | address = attachmentViewer.getSelected(); | 3 | address = attachmentViewer.getSelected(); | |||||||||||||
4 | CommandProcessor.getInstance().addOp(new OpenAttachmentCommand(new MailFolderCommandReference(ref.getSourceFolder(), ref.getUids(), address))); |
| 4 | CommandProcessor.getInstance().addOp(new SaveAttachmentAsCommand(new MailFolderCommandReference(ref.getSourceFolder(), ref.getUids(), address))); |
Row | Violation |
---|---|
1 | Expression new OpenAttachmentCommand(new MailFolderCommandReference(ref.getSourceFolder(),ref.getUids(),address)) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression new SaveAttachmentAsCommand(new MailFolderCommandReference(ref.getSourceFolder(),ref.getUids(),address)) cannot be parameterized, because it has dependencies to/from statements that will be extracted |