if (_spellEngine != null) { _spellEngine.stop(); _spellEngine = null; }
if (timer != null) { timer.stop(); timer = null; }
Clone fragments detected by clone detection tool
File path: /columba-1.4-src/mail/src/main/java/org/columba/mail/spellcheck/cswilly/FileSpellChecker.java File path: /columba-1.4-src/mail/src/main/java/org/columba/mail/mailchecking/AbstractMailCheckingAction.java
Method name: void stop() Method name: void restartTimer()
Number of AST nodes: 3 Number of AST nodes: 3
1
if (_spellEngine != null) {
1
if (
2
            _spellEngine.stop();
3
            _spellEngine = null;
4
        
2
timer != null) {
3
				timer.stop();
4
				timer = null;
5
}
5
			}
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 different classes
Number of node comparisons9
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements2
    Number of unmapped statements in the first code fragment1
    Number of unmapped statements in the second code fragment1
    Time elapsed for statement mapping (ms)1.0
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    if (_spellEngine != null)
    1
    if (_spellEngine != null)
    12
    if (timer != null)
    Differences
    Expression1Expression2Difference
    _spellEnginetimerVARIABLE_NAME_MISMATCH
    org.columba.mail.spellcheck.cswilly.AspellEnginejavax.swing.TimerVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type org.columba.mail.spellcheck.cswilly.AspellEngine of variable _spellEngine does not match with type javax.swing.Timer of variable timer
    • Make classes org.columba.mail.spellcheck.cswilly.AspellEngine and javax.swing.Timer extend a common superclass
    12
    if (timer != null)
    2
    _spellEngine.stop();
    2
    _spellEngine.stop();
    13
    timer.stop();
    Differences
    Expression1Expression2Difference
    _spellEnginetimerVARIABLE_NAME_MISMATCH
    org.columba.mail.spellcheck.cswilly.AspellEnginejavax.swing.TimerVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type org.columba.mail.spellcheck.cswilly.AspellEngine of variable _spellEngine does not match with type javax.swing.Timer of variable timer
    • Make classes org.columba.mail.spellcheck.cswilly.AspellEngine and javax.swing.Timer extend a common superclass
    13
    timer.stop();
    3
    _spellEngine = null;
    3
    _spellEngine = null;
    Preondition Violations
    Unmatched statement _spellEngine=null; cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
                                              
                                  
    14
    timer = null;
    Preondition Violations
    Unmatched statement timer=null; cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
    14
    timer = null;
    Precondition Violations (4)
    Row Violation
    1Type org.columba.mail.spellcheck.cswilly.AspellEngine of variable _spellEngine does not match with type javax.swing.Timer of variable timer
    2Type org.columba.mail.spellcheck.cswilly.AspellEngine of variable _spellEngine does not match with type javax.swing.Timer of variable timer
    3Unmatched statement _spellEngine=null; cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
    4Unmatched statement timer=null; cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted