Previous CloneSet | Next CloneSet | Back to Main Report |
Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
---|---|---|---|---|
13 | 2 | 3 | 0.975 | class_body_declaration |
Clone Abstraction | Parameter Bindings |
Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
---|---|---|---|
1 | 13 | 750 | plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/structure/ExtractInterfaceProcessor.java |
2 | 13 | 772 | plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/structure/ExtractInterfaceProcessor.java |
| ||||
/** * Returns the extracted fields from the compilation unit. * * @param unit * the compilation unit * @return the extracted fields */ protected final IField[] getExtractedFields( final ICompilationUnit unit) { Assert.isNotNull(unit); final List list = new ArrayList(); for (int index = 0; index < fMembers.length; index++) { if (fMembers[index] instanceof IField) { final IJavaElement element = JavaModelUtil.findInCompilationUnit(unit, fMembers[index]); if (element instanceof IField) list.add(element); } } final IField[] fields = new IField[list.size()]; list.toArray(fields); return fields; } |
| ||||
/** * Returns the extracted methods from the compilation unit. * * @param unit * the compilation unit * @return the extracted methods */ protected final IMethod[] getExtractedMethods( final ICompilationUnit unit) { Assert.isNotNull(unit); final List list = new ArrayList(); for (int index = 0; index < fMembers.length; index++) { if (fMembers[index] instanceof IMethod) { final IJavaElement element = JavaModelUtil.findInCompilationUnit(unit, fMembers[index]); if (element instanceof IMethod) list.add(element); } } final IMethod[] methods = new IMethod[list.size()]; list.toArray(methods); return methods; } |
| |||
/** * Returns the extracted fields from the compilation unit. * * @param unit * the compilation unit * @return the extracted fields */ /** * Returns the extracted methods from the compilation unit. * * @param unit * the compilation unit * @return the extracted methods */ protected final [[#variable9e737420]][] [[#variable5b2e4b00]]( final ICompilationUnit unit) { Assert.isNotNull(unit); final List list = new ArrayList(); for (int index = 0; index < fMembers.length; index++) { if (fMembers[index] instanceof [[#variable9e737420]]) { final IJavaElement element = JavaModelUtil.findInCompilationUnit(unit, fMembers[index]); if (element instanceof [[#variable9e737420]]) list.add(element); } } final [[#variable9e737420]][] [[#variable5b2e5800]]= new [[#variable9e737420]][list.size()]; list.toArray( [[#variable5b2e5800]]); return [[#variable5b2e5800]]; } |
CloneAbstraction |
Parameter Index | Clone Instance | Parameter Name | Value |
---|---|---|---|
1 | 1 | [[#9e737420]] | IField |
1 | 2 | [[#9e737420]] | IMethod |
2 | 1 | [[#5b2e4b00]] | getExtractedFields |
2 | 2 | [[#5b2e4b00]] | getExtractedMethods |
3 | 1 | [[#5b2e5800]] | fields |
3 | 2 | [[#5b2e5800]] | methods |