protected void TraceDottedIdent(String[] target, StringBuilder sb) { String dot = ""; for(String s:target) { sb.append(dot + s); dot = "."; } }
public void ToSource(StringBuilder sb) { String dot = ""; for (int i = 0; i < Identifier.length; i++) { sb.append(dot + Identifier[i]); dot = "."; } }
Clone fragments detected by clone detection tool
File path: /ArgoUML-0.34-src/argouml-csharp/src/org/argouml/language/csharp/importer/csparser/nodes/expressions/BaseNode.java File path: /ArgoUML-0.34-src/argouml-csharp/src/org/argouml/language/csharp/importer/csparser/nodes/expressions/IdentifierExpression.java
Method name: void TraceDottedIdent(String[], StringBuilder) Method name: void ToSource(StringBuilder)
Number of AST nodes: 3 Number of AST nodes: 3
1
protected void TraceDottedIdent(String[] target, StringBuilder sb)
1
public void ToSource(StringBuilder sb)
2
        {
2
        {
3
            String dot = "";
3
            String dot = "";
4
            for(String s:target)
4
            for (int i = 0; i < Identifier.length; i++)
5
            {
5
            {
6
                sb.append(dot + s);
6
                sb.append(dot + Identifier[i]);
7
                dot = ".";
7
                dot = ".";
8
            }
8
            }
9
        }
9
        }
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements3
    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
    Similarity Score0.750
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    2
    for (String s : target)
    2
    for (String s : target)
    2
    for (int i = 0; i < Identifier.length; i++)
    Differences
    Expression1Expression2Difference
    targetIdentifierVARIABLE_NAME_MISMATCH
    targetIdentifierVARIABLE_NAME_MISMATCH
    2
    for (int i = 0; i < Identifier.length; i++)
    3
    sb.append(dot + s);
    3
    sb.append(dot + s);
    3
    sb.append(dot + Identifier[i]);
    Differences
    Expression1Expression2Difference
    sIdentifier[i]TYPE_COMPATIBLE_REPLACEMENT
    Preondition Violations
    Expression s cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression Identifier[i] cannot be parameterized, because it has dependencies to/from statements that will be extracted
    3
    sb.append(dot + Identifier[i]);
    4
    dot = ".";
    4
    dot = ".";
    Precondition Violations (2)
    Row Violation
    1Expression s cannot be parameterized, because it has dependencies to/from statements that will be extracted
    2Expression Identifier[i] cannot be parameterized, because it has dependencies to/from statements that will be extracted