for (int i = 0; (i < rule.count()) && b; i++) { IFilterCriteria criteria = rule.get(i); String type = criteria.getTypeString(); b &= processRule(uid, criteria, type); }
for (int i = 0; (i < rule.count()) && !b; i++) { IFilterCriteria criteria = rule.get(i); String type = criteria.getTypeString(); b = processRule(uid, criteria, type); }
Clone fragments detected by clone detection tool
File path: /columba-1.4-src/mail/src/main/java/org/columba/mail/folder/search/DefaultSearchEngine.java File path: /columba-1.4-src/mail/src/main/java/org/columba/mail/folder/search/DefaultSearchEngine.java
Method name: List processCriteria(IFilterRule, List) Method name: List processCriteria(IFilterRule, List)
Number of AST nodes: 4 Number of AST nodes: 4
1
for (int i = 0; (i < rule.count()) && b; i++) {
1
for (int i = 0; (i < rule.count()) && !b; i++) {
2
					IFilterCriteria criteria = rule.get(i);
2
					IFilterCriteria criteria = rule.get(i);
3
					String type = criteria.getTypeString();
3
					String type = criteria.getTypeString();
4
					b &= processRule(uid, criteria, type);
4
					b = processRule(uid, criteria, type);
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.3
Clones locationClones are in the same method
Number of node comparisons18
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements3
    Number of unmapped statements in the first code fragment1
    Number of unmapped statements in the second code fragment1
    Time elapsed for statement mapping (ms)3.6
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    10
    for (int i = 0; (i < rule.count()) && b; i++)
    10
    for (int i = 0; (i < rule.count()) && b; i++)
    19
    for (int i = 0; (i < rule.count()) && !b; i++)
    Differences
    Expression1Expression2Difference
    b!bTYPE_COMPATIBLE_REPLACEMENT
    Preondition Violations
    Expression b cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression !b cannot be parameterized, because it has dependencies to/from statements that will be extracted
    19
    for (int i = 0; (i < rule.count()) && !b; i++)
    11
    IFilterCriteria criteria = rule.get(i);
    20
    IFilterCriteria criteria = rule.get(i);
    12
    String type = criteria.getTypeString();
    21
    String type = criteria.getTypeString();
    13
    b &= processRule(uid, criteria, type);
    13
    b &= processRule(uid, criteria, type);
    Preondition Violations
    Unmatched statement b&=processRule(uid,criteria,type); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    Unmatched statement b&=processRule(uid,criteria,type); cannot be moved before or after the extracted code, because it throws exception(s) that should be caught by a try block that will be extracted
                                                                                
                                                                              
    22
    b = processRule(uid, criteria, type);
    Preondition Violations
    Unmatched statement b=processRule(uid,criteria,type); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    Unmatched statement b=processRule(uid,criteria,type); cannot be moved before or after the extracted code, because it throws exception(s) that should be caught by a try block that will be extracted
    22
    b = processRule(uid, criteria, type);
    Precondition Violations (7)
    Row Violation
    1Expression b cannot be parameterized, because it has dependencies to/from statements that will be extracted
    2Expression !b cannot be parameterized, because it has dependencies to/from statements that will be extracted
    3Unmatched statement b&=processRule(uid,criteria,type); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    4Unmatched statement b&=processRule(uid,criteria,type); cannot be moved before or after the extracted code, because it throws exception(s) that should be caught by a try block that will be extracted
    5Unmatched statement b=processRule(uid,criteria,type); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    6Unmatched statement b=processRule(uid,criteria,type); cannot be moved before or after the extracted code, because it throws exception(s) that should be caught by a try block that will be extracted
    7Clone fragment #1 returns variables criteria, type , while Clone fragment #2 returns variables criteria, type