int[] result = new int[length];
Arrays.fill(result, value);
return result;
int[] trimmed = new int[count];
System.arraycopy( results, 0, trimmed, 0, count );
return trimmed;
Clone fragments detected by clone detection tool
File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/util/ArrayHelper.java
|
|
File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/type/TypeFactory.java
|
Method name: int[] fillArray(int, int)
|
|
Method name: int[] findModified(StandardProperty[], Object[], Object[], boolean[][], boolean, SessionImplementor)
|
Number of AST nodes: 3
|
|
Number of AST nodes: 3
|
|
1 | int[] result = new int[length];↵ | | 1 | int[] trimmed = new int[↵
|
2 | Arrays.fill(result, value↵ | | 2 | count];↵
|
3 | );↵ | | 3 | System.arraycopy( results, 0, trimmed, 0, count );↵
|
4 | return result; | | 4 | return trimmed;
|
See real code fragment |
|
See real code fragment |
Summary
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 1 |
Number of non-refactorable cases | 0 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.0 |
Clones location | Clones are in different classes |
Number of node comparisons | 9 |
-
{Refactorable}
Mapping Summary
Number of mapped statements | 2 |
Number of unmapped statements in the first code fragment | 1 |
Number of unmapped statements in the second code fragment | 1 |
Time elapsed for statement mapping (ms) | 0.0 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
1 | int[] result = new int[length]; | | 12 | int[] trimmed = new int[count]; |
2 | Arrays.fill(result, value); | | | |
| | | 13 | System.arraycopy(results, 0, trimmed, 0, count); |
3 | return result; | | 14 | return trimmed; |
Precondition Violations (0)
Row |
Violation |