st = new StringTokenizer(titlesStr, ","); while (st.hasMoreTokens()) { titles.add(st.nextToken()); } TITLES = titles.toArray(new String[titles.size()]);
while (st.hasMoreTokens()) { salutations.add(st.nextToken()); } SALUTATIONS = salutations.toArray(new String[salutations.size()]);
Clone fragments detected by clone detection tool
File path: /columba-1.4-src/core/src/main/java/org/columba/core/util/NameParser.java File path: /columba-1.4-src/core/src/main/java/org/columba/core/util/NameParser.java
Method name: void NameParser() Method name: void NameParser()
Number of AST nodes: 4 Number of AST nodes: 3
1
st = new StringTokenizer(titlesStr, ",");
2
		while (st.hasMoreTokens()) {
1
while (st.hasMoreTokens()) {
3
			titles.add(st.nextToken());
2
			salutations.add(st.nextToken());
4
		}
3
		}
5
		TITLES = titles.toArray(new String[titles.size()]);
4
		SALUTATIONS = salutations.toArray(new String[salutations.size()]);
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.1
Clones locationClones are in the same method
Number of node comparisons6
  1. {Refactorable}
    Mapping Summary
    Number of mapped statements3
    Number of unmapped statements in the first code fragment1
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)4.0
    Clone typeType 3
    Mapped Statements
    ID Statement ID Statement
    9
    st = new StringTokenizer(titlesStr, ",");
                                                                                      
    10
    while (st.hasMoreTokens())
    4
    while (st.hasMoreTokens())
    11
    titles.add(st.nextToken());
    11
    titles.add(st.nextToken());
    5
    salutations.add(st.nextToken());
    Differences
    Expression1Expression2Difference
    titlessalutationsVARIABLE_NAME_MISMATCH
    5
    salutations.add(st.nextToken());
    12
    TITLES = titles.toArray(new String[titles.size()]);
    12
    TITLES = titles.toArray(new String[titles.size()]);
    6
    SALUTATIONS = salutations.toArray(new String[salutations.size()]);
    Differences
    Expression1Expression2Difference
    TITLESSALUTATIONSVARIABLE_NAME_MISMATCH
    titlessalutationsVARIABLE_NAME_MISMATCH
    titlessalutationsVARIABLE_NAME_MISMATCH
    6
    SALUTATIONS = salutations.toArray(new String[salutations.size()]);
    Precondition Violations (0)
    Row Violation