case 0: value = record.getLevel(); break; case 1: value = record.getMessage(); break; case 2: value = record.getSourceClassName(); break; case 3: value = record.getSourceMethodName();
case 7: c = MailFilterFactory.createUnreadMessages(); break; case 8: c = MailFilterFactory.createFlaggedMessages(); break; case 9: c = MailFilterFactory.createHighPriority(); break; case 10: c = MailFilterFactory.createSpamMessages();
Clone fragments detected by clone detection tool
File path: /columba-1.4-src/plugins/org.columba.core.LogDisplay/src/org/columba/core/gui/logdisplay/LogRecordList.java File path: /columba-1.4-src/mail/src/main/java/org/columba/mail/gui/filtertoolbar/FilterToolbar.java
Method name: Object getValueAt(int, int) Method name: FilterCriteria createFilterCriteria(int)
Number of AST nodes: 11 Number of AST nodes: 11
1
case 0:
1
case 7:
2
                    value = record.getLevel();
3
                    break;
4
                
2
			c = MailFilterFactory.createUnreadMessages();
3
			break;
5
case 1:
4
		case 8:
6
                    value = record.getMessage();
5
			c = MailFilterFactory.createFlaggedMessages();
7
                    break;
8
                
6
			break;
9
case 2:
7
		case 9:
10
                    value = record.getSourceClassName();
11
                    break;
12
                case 3:
13
                    value = record.getSourceMethodName
8
			c = MailFilterFactory.createHighPriority();
9
			break;
10
		case 10:
14
();
11
			c = MailFilterFactory.createSpamMessages();
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.0
Clones locationClones are in different classes
Number of node comparisons82
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements7
    Number of unmapped statements in the first code fragment4
    Number of unmapped statements in the second code fragment4
    Time elapsed for statement mapping (ms)0.0
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    7
    case 0:
    7
    case 0:
    22
    case 7:
    Differences
    Expression1Expression2Difference
    07LITERAL_VALUE_MISMATCH
    Preondition Violations
    Switch case 0: without corresponding switch
    Switch case 7: without corresponding switch
    22
    case 7:
    8
    value = record.getLevel();
    8
    value = record.getLevel();
    Preondition Violations
    Unmatched statement value=record.getLevel(); cannot be moved, because it updates a variable modified in other unmapped statements
                                                          
                                                                                                  
    23
    c = MailFilterFactory.createUnreadMessages();
    Preondition Violations
    Unmatched statement c=MailFilterFactory.createUnreadMessages(); cannot be moved, because it updates a variable modified in other unmapped statements
    23
    c = MailFilterFactory.createUnreadMessages();
    9
    break;
    9
    break;
    24
    break;
    Preondition Violations
    Statement break; without innermost loop
    Statement break; without innermost loop
    24
    break;
    10
    case 1:
    10
    case 1:
    25
    case 8:
    Differences
    Expression1Expression2Difference
    18LITERAL_VALUE_MISMATCH
    Preondition Violations
    Switch case 1: without corresponding switch
    Switch case 8: without corresponding switch
    25
    case 8:
    11
    value = record.getMessage();
    11
    value = record.getMessage();
    Preondition Violations
    Unmatched statement value=record.getMessage(); cannot be moved, because it updates a variable modified in other unmapped statements
                                                                
                                                                                                    
    26
    c = MailFilterFactory.createFlaggedMessages();
    Preondition Violations
    Unmatched statement c=MailFilterFactory.createFlaggedMessages(); cannot be moved, because it updates a variable modified in other unmapped statements
    26
    c = MailFilterFactory.createFlaggedMessages();
    12
    break;
    12
    break;
    27
    break;
    Preondition Violations
    Statement break; without innermost loop
    Statement break; without innermost loop
    27
    break;
    13
    case 2:
    13
    case 2:
    28
    case 9:
    Differences
    Expression1Expression2Difference
    29LITERAL_VALUE_MISMATCH
    Preondition Violations
    Switch case 2: without corresponding switch
    Switch case 9: without corresponding switch
    28
    case 9:
    14
    value = record.getSourceClassName();
    14
    value = record.getSourceClassName();
    Preondition Violations
    Unmatched statement value=record.getSourceClassName(); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
                                                                                
                                                                                              
    29
    c = MailFilterFactory.createHighPriority();
    Preondition Violations
    Unmatched statement c=MailFilterFactory.createHighPriority(); cannot be moved, because it updates a variable modified in other unmapped statements
    29
    c = MailFilterFactory.createHighPriority();
    15
    break;
    15
    break;
    30
    break;
    Preondition Violations
    Statement break; without innermost loop
    Statement break; without innermost loop
    30
    break;
    16
    case 3:
    16
    case 3:
    31
    case 10:
    Differences
    Expression1Expression2Difference
    310LITERAL_VALUE_MISMATCH
    Preondition Violations
    Switch case 3: without corresponding switch
    Switch case 10: without corresponding switch
    31
    case 10:
    17
    value = record.getSourceMethodName();
    17
    value = record.getSourceMethodName();
    Preondition Violations
    Unmatched statement value=record.getSourceMethodName(); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
                                                                                  
                                                                                              
    32
    c = MailFilterFactory.createSpamMessages();
    Preondition Violations
    Unmatched statement c=MailFilterFactory.createSpamMessages(); cannot be moved, because it updates a variable modified in other unmapped statements
    32
    c = MailFilterFactory.createSpamMessages();
    Precondition Violations (23)
    Row Violation
    1Switch case 0: without corresponding switch
    2Switch case 7: without corresponding switch
    3Statement break; without innermost loop
    4Statement break; without innermost loop
    5Switch case 1: without corresponding switch
    6Switch case 8: without corresponding switch
    7Statement break; without innermost loop
    8Statement break; without innermost loop
    9Switch case 2: without corresponding switch
    10Switch case 9: without corresponding switch
    11Unmatched statement value=record.getSourceClassName(); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
    12Statement break; without innermost loop
    13Statement break; without innermost loop
    14Switch case 3: without corresponding switch
    15Switch case 10: without corresponding switch
    16Unmatched statement value=record.getSourceMethodName(); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
    17Unmatched statement value=record.getLevel(); cannot be moved, because it updates a variable modified in other unmapped statements
    18Unmatched statement value=record.getMessage(); cannot be moved, because it updates a variable modified in other unmapped statements
    19Unmatched statement c=MailFilterFactory.createUnreadMessages(); cannot be moved, because it updates a variable modified in other unmapped statements
    20Unmatched statement c=MailFilterFactory.createFlaggedMessages(); cannot be moved, because it updates a variable modified in other unmapped statements
    21Unmatched statement c=MailFilterFactory.createHighPriority(); cannot be moved, because it updates a variable modified in other unmapped statements
    22Unmatched statement c=MailFilterFactory.createSpamMessages(); cannot be moved, because it updates a variable modified in other unmapped statements
    23The refactoring of the clones is infeasible, because classes org.columba.core.gui.logdisplay.LogRecordList and org.columba.mail.gui.filtertoolbar.FilterToolbar do not have a common superclass