case 7: c = MailFilterFactory.createUnreadMessages(); break; case 8: c = MailFilterFactory.createFlaggedMessages(); break; case 9: c = MailFilterFactory.createHighPriority(); break; case 10: c = MailFilterFactory.createSpamMessages();
case 0: value = record.getLevel(); break; case 1: value = record.getMessage(); break; case 2: value = record.getSourceClassName(); break; case 3: value = record.getSourceMethodName();
Clone fragments detected by clone detection tool
File path: /columba-1.4-src/mail/src/main/java/org/columba/mail/gui/filtertoolbar/FilterToolbar.java File path: /columba-1.4-src/plugins/org.columba.core.LogDisplay/src/org/columba/core/gui/logdisplay/LogRecordList.java
Method name: FilterCriteria createFilterCriteria(int) Method name: Object getValueAt(int, int)
Number of AST nodes: 11 Number of AST nodes: 11
1
case 7:
1
case 0:
2
			c = MailFilterFactory.createUnreadMessages();
3
			break;
4
		
2
                    value = record.getLevel();
3
                    break;
5
case 8:
4
                case 1:
6
			c = MailFilterFactory.createFlaggedMessages();
5
                    value = record.getMessage();
7
			break;
8
		
6
                    break;
9
case 9:
7
                case 2:
10
			c = MailFilterFactory.createHighPriority();
11
			break;
12
		case 10:
13
			c = MailFilterFactory.createSpamMessages
8
                    value = record.getSourceClassName();
9
                    break;
10
                case 3:
14
();
11
                    value = record.getSourceMethodName();
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
                                                          
    8
    value = record.getLevel();
    Preondition Violations
    Unmatched statement value=record.getLevel(); cannot be moved, because it updates a variable modified in other unmapped statements
    8
    value = record.getLevel();
                                                                
    11
    value = record.getMessage();
    Preondition Violations
    Unmatched statement value=record.getMessage(); cannot be moved, because it updates a variable modified in other unmapped statements
    11
    value = record.getMessage();
    22
    case 7:
    22
    case 7:
    13
    case 2:
    Differences
    Expression1Expression2Difference
    72LITERAL_VALUE_MISMATCH
    13
    case 2:
    23
    c = MailFilterFactory.createUnreadMessages();
    23
    c = MailFilterFactory.createUnreadMessages();
    Preondition Violations
    Unmatched statement c=MailFilterFactory.createUnreadMessages(); cannot be moved, because it updates a variable modified in other unmapped statements
                                                                                                  
    24
    break;
    15
    break;
    25
    case 8:
    25
    case 8:
    10
    case 1:
    Differences
    Expression1Expression2Difference
    81LITERAL_VALUE_MISMATCH
    10
    case 1:
    26
    c = MailFilterFactory.createFlaggedMessages();
    26
    c = MailFilterFactory.createFlaggedMessages();
    Preondition Violations
    Unmatched statement c=MailFilterFactory.createFlaggedMessages(); cannot be moved, because it updates a variable modified in other unmapped statements
                                                                                                    
    27
    break;
    12
    break;
    28
    case 9:
    28
    case 9:
    7
    case 0:
    Differences
    Expression1Expression2Difference
    90LITERAL_VALUE_MISMATCH
    7
    case 0:
    29
    c = MailFilterFactory.createHighPriority();
    29
    c = MailFilterFactory.createHighPriority();
    Preondition Violations
    Unmatched statement c=MailFilterFactory.createHighPriority(); cannot be moved, because it updates a variable modified in other unmapped statements
                                                                                              
    30
    break;
    9
    break;
                                                                                
    14
    value = record.getSourceClassName();
    Preondition Violations
    Unmatched statement value=record.getSourceClassName(); cannot be moved, because it updates a variable modified in other unmapped statements
    14
    value = record.getSourceClassName();
    31
    case 10:
    31
    case 10:
    16
    case 3:
    Differences
    Expression1Expression2Difference
    103LITERAL_VALUE_MISMATCH
    16
    case 3:
                                                                                  
    17
    value = record.getSourceMethodName();
    Preondition Violations
    Unmatched statement value=record.getSourceMethodName(); cannot be moved, because it updates a variable modified in other unmapped statements
    17
    value = record.getSourceMethodName();
    32
    c = MailFilterFactory.createSpamMessages();
    32
    c = MailFilterFactory.createSpamMessages();
    Preondition Violations
    Unmatched statement c=MailFilterFactory.createSpamMessages(); cannot be moved, because it updates a variable modified in other unmapped statements
                                                                                              
    Precondition Violations (8)
    Row Violation
    1Unmatched statement c=MailFilterFactory.createUnreadMessages(); cannot be moved, because it updates a variable modified in other unmapped statements
    2Unmatched statement c=MailFilterFactory.createFlaggedMessages(); cannot be moved, because it updates a variable modified in other unmapped statements
    3Unmatched statement c=MailFilterFactory.createHighPriority(); cannot be moved, because it updates a variable modified in other unmapped statements
    4Unmatched statement c=MailFilterFactory.createSpamMessages(); cannot be moved, because it updates a variable modified in other unmapped statements
    5Unmatched statement value=record.getLevel(); cannot be moved, because it updates a variable modified in other unmapped statements
    6Unmatched statement value=record.getMessage(); cannot be moved, because it updates a variable modified in other unmapped statements
    7Unmatched statement value=record.getSourceClassName(); cannot be moved, because it updates a variable modified in other unmapped statements
    8Unmatched statement value=record.getSourceMethodName(); cannot be moved, because it updates a variable modified in other unmapped statements