cdata.append(NEW_LINE); cdata.append("To: "); // $NON-NLS-1$ Address[] recips = message.getAllRecipients(); for (int j = 0; j < recips.length; j++) { cdata.append(recips[j].toString()); if (j < recips.length - 1) { cdata.append("; "); // $NON-NLS-1$ } } cdata.append(NEW_LINE); cdata.append("From: ");
cdata.append(NEW_LINE); cdata.append("From: "); // $NON-NLS-1$ Address[] from = message.getFrom(); for (int j = 0; j < from.length; j++) { cdata.append(from[j].toString()); if (j < from.length - 1) { cdata.append("; "); // $NON-NLS-1$ } } cdata.append(NEW_LINE); cdata.append("Subject: ");
Clone fragments detected by clone detection tool
File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/protocol/mail/sampler/MailReaderSampler.java File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/protocol/mail/sampler/MailReaderSampler.java
Method name: SampleResult sample(Entry) Method name: SampleResult sample(Entry)
Number of AST nodes: 9 Number of AST nodes: 9
1
cdata.append(NEW_LINE);
1
cdata.append(NEW_LINE);
2
				cdata.append("To: "); // $NON-NLS-1$
2
				cdata.append("From: "); // $NON-NLS-1$
3
				Address[] recips = message.getAllRecipients();
3
				Address[] from = message.getFrom();
4
				for (int j = 0; j < recips.length; j++) {
4
				for (int j = 0; j < from.length; j++) {
5
					cdata.append(recips[j].toString());
5
					cdata.append(from[j].toString());
6
					if (j < recips.length - 1) {
6
					if (j < from.length - 1) {
7
						cdata.append("; "); // $NON-NLS-1$
7
						cdata.append("; "); // $NON-NLS-1$
8
					}
8
					}
9
				}
9
				}
10
				cdata.append(NEW_LINE);
10
				cdata.append(NEW_LINE);
11
				cdata.append("From: ");
11
				cdata.append("Subject: ");
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 comparisons26
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements9
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment1
    Time elapsed for statement mapping (ms)3.8
    Clone typeType 3
    Mapped Statements
    ID Statement ID Statement
    37
    cdata.append(NEW_LINE);
    44
    cdata.append(NEW_LINE);
    38
    cdata.append("To: ");
    38
    cdata.append("To: ");
    51
    cdata.append(NEW_LINE);
    Differences
    Expression1Expression2Difference
    "To: "NEW_LINETYPE_COMPATIBLE_REPLACEMENT
    51
    cdata.append(NEW_LINE);
    39
    Address[] recips = message.getAllRecipients();
    39
    Address[] recips = message.getAllRecipients();
    46
    Address[] from = message.getFrom();
    Differences
    Expression1Expression2Difference
    recipsfromVARIABLE_NAME_MISMATCH
    getAllRecipientsgetFromMETHOD_INVOCATION_NAME_MISMATCH
    46
    Address[] from = message.getFrom();
    40
    for (int j = 0; j < recips.length; j++)
    40
    for (int j = 0; j < recips.length; j++)
    47
    for (int j = 0; j < from.length; j++)
    Differences
    Expression1Expression2Difference
    recipsfromVARIABLE_NAME_MISMATCH
    47
    for (int j = 0; j < from.length; j++)
    41
    cdata.append(recips[j].toString());
    41
    cdata.append(recips[j].toString());
    48
    cdata.append(from[j].toString());
    Differences
    Expression1Expression2Difference
    recipsfromVARIABLE_NAME_MISMATCH
    48
    cdata.append(from[j].toString());
    42
    if (j < recips.length - 1)
    42
    if (j < recips.length - 1)
    49
    if (j < from.length - 1)
    Differences
    Expression1Expression2Difference
    recipsfromVARIABLE_NAME_MISMATCH
    49
    if (j < from.length - 1)
    43
    cdata.append("; ");
    50
    cdata.append("; ");
    44
    cdata.append(NEW_LINE);
    44
    cdata.append(NEW_LINE);
    45
    cdata.append("From: ");
    45
    cdata.append("From: ");
                                                                
    52
    cdata.append("Subject: ");
    Preondition Violations
    Unmatched statement cdata.append("Subject: "); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    52
    cdata.append("Subject: ");
    Precondition Violations (1)
    Row Violation
    1Unmatched statement cdata.append("Subject: "); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted