if (ref2 != null && ((IMailbox)ref2.getSourceFolder()).exists(ref2.getUids()[0])) { // mark message as answered ref2.setMarkVariant(MarkMessageCommand.MARK_AS_ANSWERED); MarkMessageCommand c1 = new MarkMessageCommand(ref2); CommandProcessor.getInstance().addOp(c1); }
if (ref2 != null && ((IMailbox) ref2.getSourceFolder()).exists(ref2 .getUids()[0])) { // mark message as answered ref2.setMarkVariant(MarkMessageCommand.MARK_AS_ANSWERED); MarkMessageCommand c1 = new MarkMessageCommand(ref2); CommandProcessor.getInstance().addOp(c1); }
Clone fragments detected by clone detection tool
File path: /columba-1.4-src/mail/src/main/java/org/columba/mail/gui/composer/action/SendLaterAction.java File path: /columba-1.4-src/mail/src/main/java/org/columba/mail/smtp/command/SendMessageCommand.java
Method name: void actionPerformed(ActionEvent) Method name: void execute(IWorkerStatusController)
Number of AST nodes: 4 Number of AST nodes: 4
1
if (ref2 != null 
1
if (ref2 != null
2
&& ((IMailbox)ref2.getSourceFolder()).exists(ref2
2
					&& ((IMailbox) ref2.getSourceFolder()).exists(ref2
3
.getUids()[0])) {
3
							.getUids()[0])) {
4
				// mark message as answered
4
				// mark message as answered
5
				ref2.setMarkVariant(MarkMessageCommand.MARK_AS_ANSWERED);
5
				ref2.setMarkVariant(MarkMessageCommand.MARK_AS_ANSWERED);
6
				MarkMessageCommand c1 = new MarkMessageCommand(ref2);
6
				MarkMessageCommand c1 = new MarkMessageCommand(ref2);
7
				CommandProcessor.getInstance().addOp(c1);
7
				CommandProcessor.getInstance().addOp(c1);
8
			}
8
			}
Summary
Number of common nesting structure subtrees1
Number of refactorable cases0
Number of non-refactorable cases1
Time elapsed for finding largest common nesting structure subtrees (ms)0.4
Clones locationClones are in different classes
Number of node comparisons17
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements4
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)0.8
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    12
    if (ref2 != null && ((IMailbox)ref2.getSourceFolder()).exists(ref2.getUids()[0]))
    12
    if (ref2 != null && ((IMailbox)ref2.getSourceFolder()).exists(ref2.getUids()[0]))
    34
    if (ref2 != null && ((IMailbox)ref2.getSourceFolder()).exists(ref2.getUids()[0]))
    Differences
    Expression1Expression2Difference
    org.columba.mail.command.MailFolderCommandReferenceorg.columba.mail.command.IMailFolderCommandReferenceVARIABLE_TYPE_MISMATCH
    org.columba.mail.command.MailFolderCommandReferenceorg.columba.mail.command.IMailFolderCommandReferenceVARIABLE_TYPE_MISMATCH
    org.columba.mail.command.MailFolderCommandReferenceorg.columba.mail.command.IMailFolderCommandReferenceVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type org.columba.mail.command.MailFolderCommandReference of variable ref2 does not match with type org.columba.mail.command.IMailFolderCommandReference of variable ref2
    • Make classes org.columba.mail.command.MailFolderCommandReference and org.columba.mail.command.IMailFolderCommandReference extend a common superclass
    Type org.columba.mail.command.MailFolderCommandReference of variable ref2 does not match with type org.columba.mail.command.IMailFolderCommandReference of variable ref2
    • Make classes org.columba.mail.command.MailFolderCommandReference and org.columba.mail.command.IMailFolderCommandReference extend a common superclass
    Type org.columba.mail.command.MailFolderCommandReference of variable ref2 does not match with type org.columba.mail.command.IMailFolderCommandReference of variable ref2
    • Make classes org.columba.mail.command.MailFolderCommandReference and org.columba.mail.command.IMailFolderCommandReference extend a common superclass
    34
    if (ref2 != null && ((IMailbox)ref2.getSourceFolder()).exists(ref2.getUids()[0]))
    13
    ref2.setMarkVariant(MarkMessageCommand.MARK_AS_ANSWERED);
    13
    ref2.setMarkVariant(MarkMessageCommand.MARK_AS_ANSWERED);
    35
    ref2.setMarkVariant(MarkMessageCommand.MARK_AS_ANSWERED);
    Differences
    Expression1Expression2Difference
    org.columba.mail.command.MailFolderCommandReferenceorg.columba.mail.command.IMailFolderCommandReferenceVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type org.columba.mail.command.MailFolderCommandReference of variable ref2 does not match with type org.columba.mail.command.IMailFolderCommandReference of variable ref2
    • Make classes org.columba.mail.command.MailFolderCommandReference and org.columba.mail.command.IMailFolderCommandReference extend a common superclass
    35
    ref2.setMarkVariant(MarkMessageCommand.MARK_AS_ANSWERED);
    14
    MarkMessageCommand c1 = new MarkMessageCommand(ref2);
    14
    MarkMessageCommand c1 = new MarkMessageCommand(ref2);
    36
    MarkMessageCommand c1 = new MarkMessageCommand(ref2);
    Differences
    Expression1Expression2Difference
    org.columba.mail.command.MailFolderCommandReferenceorg.columba.mail.command.IMailFolderCommandReferenceVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type org.columba.mail.command.MailFolderCommandReference of variable ref2 does not match with type org.columba.mail.command.IMailFolderCommandReference of variable ref2
    • Make classes org.columba.mail.command.MailFolderCommandReference and org.columba.mail.command.IMailFolderCommandReference extend a common superclass
    36
    MarkMessageCommand c1 = new MarkMessageCommand(ref2);
    15
    CommandProcessor.getInstance().addOp(c1);
    37
    CommandProcessor.getInstance().addOp(c1);
    Precondition Violations (5)
    Row Violation
    1Type org.columba.mail.command.MailFolderCommandReference of variable ref2 does not match with type org.columba.mail.command.IMailFolderCommandReference of variable ref2
    2Type org.columba.mail.command.MailFolderCommandReference of variable ref2 does not match with type org.columba.mail.command.IMailFolderCommandReference of variable ref2
    3Type org.columba.mail.command.MailFolderCommandReference of variable ref2 does not match with type org.columba.mail.command.IMailFolderCommandReference of variable ref2
    4Type org.columba.mail.command.MailFolderCommandReference of variable ref2 does not match with type org.columba.mail.command.IMailFolderCommandReference of variable ref2
    5Type org.columba.mail.command.MailFolderCommandReference of variable ref2 does not match with type org.columba.mail.command.IMailFolderCommandReference of variable ref2