for (Entry<Object, IFolder> entry : mails.entrySet()) { AssociationStore.getInstance().addAssociation("tagging", id, createURI(entry.getValue().getId(), entry.getKey()).toString()); }
if (type == REMOVE_TAG) { for (Entry<Object, IFolder> entry : mails.entrySet()) { AssociationStore.getInstance().removeAssociation("tagging", id, createURI(entry.getValue().getId(), entry.getKey()).toString()); } }
Clone fragments detected by clone detection tool
File path: /columba-1.4-src/mail/src/main/java/org/columba/mail/folder/command/TagMessageCommand.java File path: /columba-1.4-src/mail/src/main/java/org/columba/mail/folder/command/TagMessageCommand.java
Method name: void execute(IWorkerStatusController) Method name: void execute(IWorkerStatusController)
Number of AST nodes: 2 Number of AST nodes: 3
1
if (type == REMOVE_TAG) {
1
for (Entry<Object, IFolder> entry : mails.entrySet()) {
2
			for (Entry<Object, IFolder> entry : mails.entrySet()) {
2
				AssociationStore.getInstance().addAssociation("tagging", id,
3
				AssociationStore.getInstance().removeAssociation("tagging", id,
3
						createURI(entry.getValue().getId(), entry.getKey()).toString());
4
						createURI(entry.getValue().getId(), entry.getKey()).toString());
4
			}
5
			}
6
		}
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.2
Clones locationClones are in the same method
Number of node comparisons5
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements2
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)1.0
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    12
    for (Entry<Object, IFolder> entry : mails.entrySet())
    15
    for (Entry<Object, IFolder> entry : mails.entrySet())
    13
    AssociationStore.getInstance().addAssociation("tagging", id, createURI(entry.getValue().getId(), entry.getKey()).toString());
    13
    AssociationStore.getInstance().addAssociation("tagging", id, createURI(entry.getValue().getId(), entry.getKey()).toString());
    16
    AssociationStore.getInstance().removeAssociation("tagging", id, createURI(entry.getValue().getId(), entry.getKey()).toString());
    Differences
    Expression1Expression2Difference
    addAssociationremoveAssociationMETHOD_INVOCATION_NAME_MISMATCH
    Preondition Violations
    Expression AssociationStore.getInstance().addAssociation("tagging",id,createURI(entry.getValue().getId(),entry.getKey()).toString()) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression AssociationStore.getInstance().removeAssociation("tagging",id,createURI(entry.getValue().getId(),entry.getKey()).toString()) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression AssociationStore.getInstance().addAssociation("tagging",id,createURI(entry.getValue().getId(),entry.getKey()).toString()) is a void method call, and thus it cannot be parameterized
    Expression AssociationStore.getInstance().removeAssociation("tagging",id,createURI(entry.getValue().getId(),entry.getKey()).toString()) is a void method call, and thus it cannot be parameterized
    16
    AssociationStore.getInstance().removeAssociation("tagging", id, createURI(entry.getValue().getId(), entry.getKey()).toString());
    Precondition Violations (4)
    Row Violation
    1Expression AssociationStore.getInstance().addAssociation("tagging",id,createURI(entry.getValue().getId(),entry.getKey()).toString()) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    2Expression AssociationStore.getInstance().removeAssociation("tagging",id,createURI(entry.getValue().getId(),entry.getKey()).toString()) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    3Expression AssociationStore.getInstance().addAssociation("tagging",id,createURI(entry.getValue().getId(),entry.getKey()).toString()) is a void method call, and thus it cannot be parameterized
    4Expression AssociationStore.getInstance().removeAssociation("tagging",id,createURI(entry.getValue().getId(),entry.getKey()).toString()) is a void method call, and thus it cannot be parameterized