Matcher withLinkMatcher = EMAIL_PATTERN_INC_LINK.matcher(s); int pos = 0; // current position in s int length = s.length(); StringBuffer buf = new StringBuffer();
Matcher withLinkMatcher = URL_PATTERN_INC_LINK.matcher(s); int pos = 0; // current position in s int length = s.length(); StringBuffer buf = new StringBuffer();
Clone fragments detected by clone detection tool
File path: /columba-1.4-src/mail/src/main/java/org/columba/mail/parser/text/HtmlParser.java File path: /columba-1.4-src/mail/src/main/java/org/columba/mail/parser/text/HtmlParser.java
Method name: String substituteEmailAddress(String, boolean) Method name: String substituteURL(String, boolean)
Number of AST nodes: 4 Number of AST nodes: 4
1
Matcher withLinkMatcher = EMAIL_PATTERN_INC_LINK.matcher(s);
1
Matcher withLinkMatcher = URL_PATTERN_INC_LINK.matcher(s);
2
        int pos = 0; // current position in s
2
        int pos = 0; // current position in s
3
        int length = s.length();
3
        int length = s.length();
4
        StringBuffer buf = new StringBuffer();
4
        StringBuffer buf = new StringBuffer();
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 declared in the same class
Number of node comparisons11
  1. {Non-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)0.0
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    4
    Matcher withLinkMatcher = EMAIL_PATTERN_INC_LINK.matcher(s);
    4
    Matcher withLinkMatcher = EMAIL_PATTERN_INC_LINK.matcher(s);
    4
    Matcher withLinkMatcher = URL_PATTERN_INC_LINK.matcher(s);
    Differences
    Expression1Expression2Difference
    EMAIL_PATTERN_INC_LINKURL_PATTERN_INC_LINKVARIABLE_NAME_MISMATCH
    4
    Matcher withLinkMatcher = URL_PATTERN_INC_LINK.matcher(s);
    5
    int pos = 0;
    5
    int pos = 0;
    6
    int length = s.length();
    6
    int length = s.length();
    7
    StringBuffer buf = new StringBuffer();
    7
    StringBuffer buf = new StringBuffer();
    Precondition Violations (1)
    Row Violation
    1Clone fragment #1 returns variables pos, length, withLinkMatcher, buf , while Clone fragment #2 returns variables pos, length, withLinkMatcher, buf