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 | } |
See real code fragment |
|
See real code fragment |
-
{Non-refactorable}
Mapping Summary
Number of mapped statements | 3 |
Number of unmapped statements in the first code fragment | 0 |
Number of unmapped statements in the second code fragment | 0 |
Time elapsed for statement mapping (ms) | 0.0 |
Similarity Score | 0.750 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
2 | for (String s : target) | | 2 | for (int i = 0; i < Identifier.length; i++) |
3 | | | 3 | sb.append(dot + Identifier[i]); |
4 | | | 4 | |
Precondition Violations (2)
Row |
Violation |
1 | Expression s cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression Identifier[i] cannot be parameterized, because it has dependencies to/from statements that will be extracted |