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)); } String unseen = property.getAttribute("unseen"); if (unseen != null) { info.setUnseen(Integer.parseInt(unseen)); } String uidnext = property.getAttribute("uidnext"); if (uidnext != null) { info.setUidNext(Integer.parseInt(uidnext)); }
String recent = property.getAttribute("recent"); if (recent != null) { info.setRecent(Integer.parseInt(recent)); } String unseen = property.getAttribute("unseen"); if (unseen != null) { info.setUnseen(Integer.parseInt(unseen)); } 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)); }
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: 12 Number of AST nodes: 12
1
String exists = property.getAttribute("exists");
2
		if (exists != null) {
3
			info.setExists(Integer.parseInt(exists));
4
		}
5
		String recent = property.getAttribute("recent");
1
String recent = property.getAttribute("recent");
6
		if (recent != null) {
2
		if (recent != null) {
7
			info.setRecent(Integer.parseInt(recent));
3
			info.setRecent(Integer.parseInt(recent));
8
		}
4
		}
9
		String unseen = property.getAttribute("unseen");
5
		String unseen = property.getAttribute("unseen");
10
		if (unseen != null) {
6
		if (unseen != null) {
11
			info.setUnseen(Integer.parseInt(unseen));
7
			info.setUnseen(Integer.parseInt(unseen));
12
		}
8
		}
13
		String uidnext = property.getAttribute("uidnext");
9
		String uidnext = property.getAttribute("uidnext");
14
		if (uidnext != null) {
10
		if (uidnext != null) {
15
			info.setUidNext(Integer.parseInt(uidnext));
11
			info.setUidNext(Integer.parseInt(uidnext));
16
		}
12
		}
13
		String uidvalidity = property.getAttribute("uidvalidty");
14
		if (uidvalidity != null) {
15
			info.setUidValidity(Integer.parseInt(uidvalidity));
16
		}
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.5
Clones locationClones are in the same method
Number of node comparisons62
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements12
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)3.1
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    5
    String exists = property.getAttribute("exists");
    5
    String exists = property.getAttribute("exists");
    8
    String recent = property.getAttribute("recent");
    Differences
    Expression1Expression2Difference
    existsrecentVARIABLE_NAME_MISMATCH
    "exists""recent"LITERAL_VALUE_MISMATCH
    8
    String recent = property.getAttribute("recent");
    6
    if (exists != null)
    6
    if (exists != null)
    9
    if (recent != null)
    Differences
    Expression1Expression2Difference
    existsrecentVARIABLE_NAME_MISMATCH
    9
    if (recent != null)
    7
    info.setExists(Integer.parseInt(exists));
    7
    info.setExists(Integer.parseInt(exists));
    10
    info.setRecent(Integer.parseInt(recent));
    Differences
    Expression1Expression2Difference
    setExistssetRecentMETHOD_INVOCATION_NAME_MISMATCH
    existsrecentVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression info.setExists(Integer.parseInt(exists)) 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.setExists(Integer.parseInt(exists)) 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));
    8
    String recent = property.getAttribute("recent");
    8
    String recent = property.getAttribute("recent");
    11
    String unseen = property.getAttribute("unseen");
    Differences
    Expression1Expression2Difference
    recentunseenVARIABLE_NAME_MISMATCH
    "recent""unseen"LITERAL_VALUE_MISMATCH
    11
    String unseen = property.getAttribute("unseen");
    9
    if (recent != null)
    9
    if (recent != null)
    12
    if (unseen != null)
    Differences
    Expression1Expression2Difference
    recentunseenVARIABLE_NAME_MISMATCH
    12
    if (unseen != null)
    10
    info.setRecent(Integer.parseInt(recent));
    10
    info.setRecent(Integer.parseInt(recent));
    13
    info.setUnseen(Integer.parseInt(unseen));
    Differences
    Expression1Expression2Difference
    setRecentsetUnseenMETHOD_INVOCATION_NAME_MISMATCH
    recentunseenVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression info.setRecent(Integer.parseInt(recent)) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression info.setUnseen(Integer.parseInt(unseen)) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression info.setRecent(Integer.parseInt(recent)) is a void method call, and thus it cannot be parameterized
    Expression info.setUnseen(Integer.parseInt(unseen)) is a void method call, and thus it cannot be parameterized
    13
    info.setUnseen(Integer.parseInt(unseen));
    11
    String unseen = property.getAttribute("unseen");
    11
    String unseen = property.getAttribute("unseen");
    14
    String uidnext = property.getAttribute("uidnext");
    Differences
    Expression1Expression2Difference
    unseenuidnextVARIABLE_NAME_MISMATCH
    "unseen""uidnext"LITERAL_VALUE_MISMATCH
    14
    String uidnext = property.getAttribute("uidnext");
    12
    if (unseen != null)
    12
    if (unseen != null)
    15
    if (uidnext != null)
    Differences
    Expression1Expression2Difference
    unseenuidnextVARIABLE_NAME_MISMATCH
    15
    if (uidnext != null)
    13
    info.setUnseen(Integer.parseInt(unseen));
    13
    info.setUnseen(Integer.parseInt(unseen));
    16
    info.setUidNext(Integer.parseInt(uidnext));
    Differences
    Expression1Expression2Difference
    setUnseensetUidNextMETHOD_INVOCATION_NAME_MISMATCH
    unseenuidnextVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression info.setUnseen(Integer.parseInt(unseen)) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression info.setUidNext(Integer.parseInt(uidnext)) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression info.setUnseen(Integer.parseInt(unseen)) is a void method call, and thus it cannot be parameterized
    Expression info.setUidNext(Integer.parseInt(uidnext)) is a void method call, and thus it cannot be parameterized
    16
    info.setUidNext(Integer.parseInt(uidnext));
    14
    String uidnext = property.getAttribute("uidnext");
    14
    String uidnext = property.getAttribute("uidnext");
    17
    String uidvalidity = property.getAttribute("uidvalidty");
    Differences
    Expression1Expression2Difference
    uidnextuidvalidityVARIABLE_NAME_MISMATCH
    "uidnext""uidvalidty"LITERAL_VALUE_MISMATCH
    17
    String uidvalidity = property.getAttribute("uidvalidty");
    15
    if (uidnext != null)
    15
    if (uidnext != null)
    18
    if (uidvalidity != null)
    Differences
    Expression1Expression2Difference
    uidnextuidvalidityVARIABLE_NAME_MISMATCH
    18
    if (uidvalidity != null)
    16
    info.setUidNext(Integer.parseInt(uidnext));
    16
    info.setUidNext(Integer.parseInt(uidnext));
    19
    info.setUidValidity(Integer.parseInt(uidvalidity));
    Differences
    Expression1Expression2Difference
    setUidNextsetUidValidityMETHOD_INVOCATION_NAME_MISMATCH
    uidnextuidvalidityVARIABLE_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.setUidValidity(Integer.parseInt(uidvalidity)) 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.setUidValidity(Integer.parseInt(uidvalidity)) is a void method call, and thus it cannot be parameterized
    19
    info.setUidValidity(Integer.parseInt(uidvalidity));
    Precondition Violations (16)
    Row Violation
    1Expression info.setExists(Integer.parseInt(exists)) 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.setExists(Integer.parseInt(exists)) 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.setRecent(Integer.parseInt(recent)) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    6Expression info.setUnseen(Integer.parseInt(unseen)) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    7Expression info.setRecent(Integer.parseInt(recent)) is a void method call, and thus it cannot be parameterized
    8Expression info.setUnseen(Integer.parseInt(unseen)) is a void method call, and thus it cannot be parameterized
    9Expression info.setUnseen(Integer.parseInt(unseen)) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    10Expression info.setUidNext(Integer.parseInt(uidnext)) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    11Expression info.setUnseen(Integer.parseInt(unseen)) is a void method call, and thus it cannot be parameterized
    12Expression info.setUidNext(Integer.parseInt(uidnext)) is a void method call, and thus it cannot be parameterized
    13Expression info.setUidNext(Integer.parseInt(uidnext)) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    14Expression info.setUidValidity(Integer.parseInt(uidvalidity)) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    15Expression info.setUidNext(Integer.parseInt(uidnext)) is a void method call, and thus it cannot be parameterized
    16Expression info.setUidValidity(Integer.parseInt(uidvalidity)) is a void method call, and thus it cannot be parameterized