if(s.charAt(6) == 'r') permissions += 04; if(s.charAt(7) == 'w') permissions += 02; if(s.charAt(8) == 'x') permissions += 01;
if(s.charAt(0) == 'r') permissions += 0400; if(s.charAt(1) == 'w') permissions += 0200; if(s.charAt(2) == 'x') permissions += 0100;
Clone fragments detected by clone detection tool
File path: /jEdit-4.2/src/org/gjt/sp/jedit/MiscUtilities.java File path: /jEdit-4.2/src/org/gjt/sp/jedit/MiscUtilities.java
Method name: int parsePermissions(String) Method name: int parsePermissions(String)
Number of AST nodes: 5 Number of AST nodes: 5
1
if(s.charAt(6) == 'r')
1
if(s.charAt(0) == 'r')
2
				permissions += 04;
2
				permissions += 0400;
3
			if(s.charAt(7) == 'w')
3
			if(s.charAt(1) == 'w')
4
				permissions += 02;
4
				permissions += 0200;
5
			if(s.charAt(8) == 'x')
5
			if(s.charAt(2) == 'x')
6
				permissions += 01;
6
				permissions += 0100;
Summary
Number of common nesting structure subtrees1
Number of refactorable cases1
Number of non-refactorable cases0
Time elapsed for finding largest common nesting structure subtrees (ms)0.5
Clones locationClones are in the same method
Number of node comparisons14
  1. {Refactorable}
    Mapping Summary
    Number of mapped statements4
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)2.1
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    23
    if (s.charAt(6) == 'r')
    23
    if (s.charAt(6) == 'r')
    3
    if (s.charAt(0) == 'r')
    Differences
    Expression1Expression2Difference
    60LITERAL_VALUE_MISMATCH
    3
    if (s.charAt(0) == 'r')
    24
    permissions += 04;
    24
    permissions += 04;
    4
    permissions += 0400;
    Differences
    Expression1Expression2Difference
    040400LITERAL_VALUE_MISMATCH
    4
    permissions += 0400;
    25
    if (s.charAt(7) == 'w')
    25
    if (s.charAt(7) == 'w')
    5
    if (s.charAt(1) == 'w')
    Differences
    Expression1Expression2Difference
    71LITERAL_VALUE_MISMATCH
    5
    if (s.charAt(1) == 'w')
    26
    permissions += 02;
    26
    permissions += 02;
    6
    permissions += 0200;
    Differences
    Expression1Expression2Difference
    020200LITERAL_VALUE_MISMATCH
    6
    permissions += 0200;
    Precondition Violations (0)
    Row Violation