String uidnext = property.getAttribute("uidnext"); if (uidnext != null) { info.setUidNext(Integer.parseInt(uidnext)); } String uidvalidity = property.getAttribute("uidvalidty"); if (uidvalidity != null) { info.setUidValidity(Integer.parseInt(uidvalidity)); }
String exists = property.getAttribute("exists"); if (exists != null) { info.setExists(Integer.parseInt(exists)); } String recent = property.getAttribute("recent"); if (recent != null) { info.setRecent(Integer.parseInt(recent)); }
Clone fragments detected by clone detection tool
File path: /columba-1.4-src/mail/src/main/java/org/columba/mail/folder/AbstractMessageFolder.java File path: /columba-1.4-src/mail/src/main/java/org/columba/mail/folder/AbstractMessageFolder.java
Method name: void loadMessageFolderInfo() Method name: void loadMessageFolderInfo()
Number of AST nodes: 6 Number of AST nodes: 6
1
String uidnext = property.getAttribute("uidnext");
1
String exists = property.getAttribute("exists");
2
		if (uidnext != null) {
2
		if (exists != null) {
3
			info.setUidNext(Integer.parseInt(uidnext));
3
			info.setExists(Integer.parseInt(exists));
4
		}
4
		}
5
		String uidvalidity = property.getAttribute("uidvalidty");
5
		String recent = property.getAttribute("recent");
6
		if (uidvalidity != null) {
6
		if (recent != null) {
7
			info.setUidValidity(Integer.parseInt(uidvalidity));
7
			info.setRecent(Integer.parseInt(recent));
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.2
Clones locationClones are in the same method
Number of node comparisons17
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements6
    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.4
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    14
    String uidnext = property.getAttribute("uidnext");
    14
    String uidnext = property.getAttribute("uidnext");
    8
    String recent = property.getAttribute("recent");
    Differences
    Expression1Expression2Difference
    uidnextrecentVARIABLE_NAME_MISMATCH
    "uidnext""recent"LITERAL_VALUE_MISMATCH
    8
    String recent = property.getAttribute("recent");
    15
    if (uidnext != null)
    15
    if (uidnext != null)
    9
    if (recent != null)
    Differences
    Expression1Expression2Difference
    uidnextrecentVARIABLE_NAME_MISMATCH
    9
    if (recent != null)
    16
    info.setUidNext(Integer.parseInt(uidnext));
    16
    info.setUidNext(Integer.parseInt(uidnext));
    10
    info.setRecent(Integer.parseInt(recent));
    Differences
    Expression1Expression2Difference
    setUidNextsetRecentMETHOD_INVOCATION_NAME_MISMATCH
    uidnextrecentVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression info.setUidNext(Integer.parseInt(uidnext)) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression info.setRecent(Integer.parseInt(recent)) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression info.setUidNext(Integer.parseInt(uidnext)) is a void method call, and thus it cannot be parameterized
    Expression info.setRecent(Integer.parseInt(recent)) is a void method call, and thus it cannot be parameterized
    10
    info.setRecent(Integer.parseInt(recent));
    17
    String uidvalidity = property.getAttribute("uidvalidty");
    17
    String uidvalidity = property.getAttribute("uidvalidty");
    5
    String exists = property.getAttribute("exists");
    Differences
    Expression1Expression2Difference
    uidvalidityexistsVARIABLE_NAME_MISMATCH
    "uidvalidty""exists"LITERAL_VALUE_MISMATCH
    5
    String exists = property.getAttribute("exists");
    18
    if (uidvalidity != null)
    18
    if (uidvalidity != null)
    6
    if (exists != null)
    Differences
    Expression1Expression2Difference
    uidvalidityexistsVARIABLE_NAME_MISMATCH
    6
    if (exists != null)
    19
    info.setUidValidity(Integer.parseInt(uidvalidity));
    19
    info.setUidValidity(Integer.parseInt(uidvalidity));
    7
    info.setExists(Integer.parseInt(exists));
    Differences
    Expression1Expression2Difference
    setUidValiditysetExistsMETHOD_INVOCATION_NAME_MISMATCH
    uidvalidityexistsVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression info.setUidValidity(Integer.parseInt(uidvalidity)) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression info.setExists(Integer.parseInt(exists)) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression info.setUidValidity(Integer.parseInt(uidvalidity)) is a void method call, and thus it cannot be parameterized
    Expression info.setExists(Integer.parseInt(exists)) is a void method call, and thus it cannot be parameterized
    7
    info.setExists(Integer.parseInt(exists));
    Precondition Violations (8)
    Row Violation
    1Expression info.setUidNext(Integer.parseInt(uidnext)) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    2Expression info.setRecent(Integer.parseInt(recent)) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    3Expression info.setUidNext(Integer.parseInt(uidnext)) is a void method call, and thus it cannot be parameterized
    4Expression info.setRecent(Integer.parseInt(recent)) is a void method call, and thus it cannot be parameterized
    5Expression info.setUidValidity(Integer.parseInt(uidvalidity)) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    6Expression info.setExists(Integer.parseInt(exists)) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    7Expression info.setUidValidity(Integer.parseInt(uidvalidity)) is a void method call, and thus it cannot be parameterized
    8Expression info.setExists(Integer.parseInt(exists)) is a void method call, and thus it cannot be parameterized