| Previous CloneSet | Next CloneSet | Back to Main Report |
| Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
|---|---|---|---|---|
| 8 | 2 | 3 | 0.986 | class_body_declaration |
| Clone Abstraction | Parameter Bindings |
| Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
|---|---|---|---|
| 1 | 8 | 270 | Basic_Class1.java |
| 2 | 8 | 284 | Basic_Class1.java |
| ||||
// Example 2A - Type 2 Clone - Cordy
void sumProd2A(int n) {
double s = 0.0; //C1
double p = 1.0;
for (int j = 1; j <= n; j++)
{
s = s + j;
p = p * j;
foo(s, p);
}
}
|
| ||||
// Example 2B - Type 2 Clone - Cordy
void sumProd2B(int n) {
double s = 0.0; //C1
double p = 1.0;
for (int j = 1; j <= n; j++)
{
s = s + j;
p = p * j;
foo(p, s);
}
}
|
| |||
// Example 2B - Type 2 Clone - Cordy
// Example 2A - Type 2 Clone - Cordy
void [[#variable6a587a0]](int n) {
double s = 0.0; //C1
double p = 1.0;
for (int j = 1; j <= n; j++) {
s = s + j;
p = p * j;
foo( [[#variable6a586c0]], [[#variable6a58700]]);
}
}
|
| CloneAbstraction |
| Parameter Index | Clone Instance | Parameter Name | Value |
|---|---|---|---|
| 1 | 1 | [[#6a587a0]] | sumProd2B |
| 1 | 2 | [[#6a587a0]] | sumProd2A |
| 2 | 1 | [[#6a586c0]] | p |
| 2 | 2 | [[#6a586c0]] | s |
| 3 | 1 | [[#6a58700]] | s |
| 3 | 2 | [[#6a58700]] | p |