CloneSet1257


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
8220.989statement_sequence[5]
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
18115
plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/CopyResourceElementsOperation.java
2860
plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/DeleteResourceElementsOperation.java
Clone Instance
1
Line Count
8
Source Line
115
Source File
plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/CopyResourceElementsOperation.java

                // Gather non-java resources
                Object[] nonJavaResources = source.getNonJavaResources();
                int actualNonJavaResourceCount = 0;
                for (int i = 0, max = nonJavaResources.length; i < max; i++) {
                        if (nonJavaResources[i] instanceof IResource) actualNonJavaResourceCount++;
                }
                IResource[] actualNonJavaResources = new IResource[actualNonJavaResourceCount];
                for (int i = 0, max = nonJavaResources.length, index = 0; i < max; i++) {
                        if (nonJavaResources[i] instanceof IResource) actualNonJavaResources[index++ ] = (IResource) nonJavaResources[i];
                }


Clone Instance
2
Line Count
8
Source Line
60
Source File
plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/DeleteResourceElementsOperation.java

                // Discard non-java resources
                Object[] nonJavaResources = frag.getNonJavaResources();
                int actualResourceCount = 0;
                for (int i = 0, max = nonJavaResources.length; i < max; i++) {
                        if (nonJavaResources[i] instanceof IResource) actualResourceCount++;
                }
                IResource[] actualNonJavaResources = new IResource[actualResourceCount];
                for (int i = 0, max = nonJavaResources.length, index = 0; i < max; i++) {
                        if (nonJavaResources[i] instanceof IResource) actualNonJavaResources[index++ ] = (IResource) nonJavaResources[i];
                }


Clone AbstractionParameter Count: 2Parameter Bindings

// Gather non-java resources
// Discard non-java resources
Object[] nonJavaResources = [[#variableb8cd81c0]].getNonJavaResources();
int  [[#variableb8cd80a0]]= 0;
for (int i = 0, max = nonJavaResources.length; i < max; i++) {
  if (nonJavaResources[i] instanceof IResource)
     [[#variableb8cd80a0]]++;
}
IResource[] actualNonJavaResources = new IResource[ [[#variableb8cd80a0]]];
for (int i = 0, max = nonJavaResources.length, index = 0; i < max; i++) {
  if (nonJavaResources[i] instanceof IResource)
    actualNonJavaResources[index++ ] = (IResource) nonJavaResources[i];
}
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#b8cd81c0]]
source 
12[[#b8cd81c0]]
frag 
21[[#b8cd80a0]]
actualNonJavaResourceCount 
22[[#b8cd80a0]]
actualResourceCount