if (signatureFile != null) { String signature = getSignature(signatureFile); if (signature != null) { buf.append("\r\n\r\n"); // TODO: Should we take some action to ensure signature is valid // html? buf.append(signature); } }
if (appendSignature && signatureFile != null) { String signature = getSignature(signatureFile); if (signature != null) { body = body + "\r\n\r\n" + signature; } }
Clone fragments detected by clone detection tool
File path: /columba-1.4-src/mail/src/main/java/org/columba/mail/composer/MessageComposer.java File path: /columba-1.4-src/mail/src/main/java/org/columba/mail/composer/MessageComposer.java
Method name: StreamableMimePart composeHtmlMimePart(boolean) Method name: StreamableMimePart composeTextMimePart(boolean)
Number of AST nodes: 5 Number of AST nodes: 4
1
if (signatureFile != null) {
1
if (appendSignature && signatureFile != null) {
2
			String signature = getSignature(signatureFile);
2
			String signature = getSignature(signatureFile);
3
			if (signature != null) {
3
			if (signature != null) {
4
				buf.append("\r\n\r\n");
4
				b
5
				// TODO: Should we take some action to ensure signature is valid
6
				// html?
7
				buf.append(signature);
5
ody = body + "\r\n\r\n" + signature;
8
			}
6
			}
9
		}
7
		}
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 declared in the same class
Number of node comparisons8
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements2
    Number of unmapped statements in the first code fragment2
    Number of unmapped statements in the second code fragment1
    Time elapsed for statement mapping (ms)0.8
    Clone typeType 3
    Mapped Statements
    ID Statement ID Statement
    30
    String signature = getSignature(signatureFile);
    10
    String signature = getSignature(signatureFile);
    31
    if (signature != null)
    11
    if (signature != null)
                                                                                  
    12
    body = body + "\r\n\r\n" + signature;
    Preondition Violations
    Unmatched statement body=body + "\r\n\r\n" + signature; cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
    12
    body = body + "\r\n\r\n" + signature;
    32
    buf.append("\r\n\r\n");
                                                          
    33
    buf.append(signature);
    33
    buf.append(signature);
    Preondition Violations
    Unmatched statement buf.append(signature); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
                                                        
    Precondition Violations (2)
    Row Violation
    1Unmatched statement body=body + "\r\n\r\n" + signature; cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
    2Unmatched statement buf.append(signature); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted