try { sendMail(getFromAddress(), addressVector, getFailureSubject(), "URL Failed: " + sample.getSampleLabel(), getSmtpHost()); } catch (Exception e) { log.error("Problem sending mail", e); } siteDown = true; failureMsgSent = true; successCount = 0; successMsgSent = false;
try { sendMail(getFromAddress(), addressVector, getSuccessSubject(), "URL Restarted: " + sample.getSampleLabel(), getSmtpHost()); } catch (Exception e) { log.error("Problem sending mail", e); } siteDown = false; successMsgSent = true; failureCount = 0; failureMsgSent = false;
Clone fragments detected by clone detection tool
File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/reporters/MailerModel.java File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/reporters/MailerModel.java
Method name: void add(SampleResult) Method name: void add(SampleResult)
Number of AST nodes: 6 Number of AST nodes: 6
1
try {
1
try {
2
					sendMail(getFromAddress(), addressVector, getFailureSubject(), "URL Failed: "
2
					sendMail(getFromAddress(), addressVector, getSuccessSubject(), "URL Restarted: "
3
							+ sample.getSampleLabel(), getSmtpHost());
3
							+ sample.getSampleLabel(), getSmtpHost());
4
				} catch (Exception e) {
4
				} catch (Exception e) {
5
					log.error("Problem sending mail", e);
5
					log.error("Problem sending mail", e);
6
				}
6
				}
7
				siteDown = true;
7
				siteDown = false;
8
				failureMsgSent = true;
8
				successMsgSent = true;
9
				successCount = 0;
9
				failureCount = 0;
10
				successMsgSent = false;
10
				failureMsgSent = false;
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.3
Clones locationClones are in the same method
Number of node comparisons15
  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)2.0
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    8
    try
    17
    try
    9
    sendMail(getFromAddress(), addressVector, getFailureSubject(), "URL Failed: " + sample.getSampleLabel(), getSmtpHost());
    9
    sendMail(getFromAddress(), addressVector, getFailureSubject(), "URL Failed: " + sample.getSampleLabel(), getSmtpHost());
    18
    sendMail(getFromAddress(), addressVector, getSuccessSubject(), "URL Restarted: " + sample.getSampleLabel(), getSmtpHost());
    Differences
    Expression1Expression2Difference
    getFailureSubjectgetSuccessSubjectMETHOD_INVOCATION_NAME_MISMATCH
    "URL Failed: ""URL Restarted: "LITERAL_VALUE_MISMATCH
    18
    sendMail(getFromAddress(), addressVector, getSuccessSubject(), "URL Restarted: " + sample.getSampleLabel(), getSmtpHost());
    10
    siteDown = true;
    10
    siteDown = true;
    19
    siteDown = false;
    Differences
    Expression1Expression2Difference
    truefalseLITERAL_VALUE_MISMATCH
    19
    siteDown = false;
    11
    failureMsgSent = true;
    11
    failureMsgSent = true;
    22
    failureMsgSent = false;
    Differences
    Expression1Expression2Difference
    truefalseLITERAL_VALUE_MISMATCH
    22
    failureMsgSent = false;
    12
    successCount = 0;
    12
    successCount = 0;
    21
    failureCount = 0;
    Differences
    Expression1Expression2Difference
    successCountfailureCountVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression successCount is a field being modified, and thus it cannot be parameterized
    Expression failureCount is a field being modified, and thus it cannot be parameterized
    21
    failureCount = 0;
    13
    successMsgSent = false;
    13
    successMsgSent = false;
    20
    successMsgSent = true;
    Differences
    Expression1Expression2Difference
    falsetrueLITERAL_VALUE_MISMATCH
    20
    successMsgSent = true;
    Precondition Violations (2)
    Row Violation
    1Expression successCount is a field being modified, and thus it cannot be parameterized
    2Expression failureCount is a field being modified, and thus it cannot be parameterized