Previous CloneSet | Next CloneSet | Back to Main Report |
Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
---|---|---|---|---|
27 | 2 | 5 | 0.962 | class_body_declaration |
Clone Abstraction | Parameter Bindings |
Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
---|---|---|---|
1 | 27 | 617 | plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/CPListElement.java |
2 | 27 | 420 | plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/NewSourceFolderWizardPage.java |
| ||||
public static void insert(CPListElement element, List cpList) { int length = cpList.size(); CPListElement[] elements = (CPListElement[]) cpList.toArray(new CPListElement[length]); int i = 0; while (i < length && elements[i].getEntryKind() != element.getEntryKind()) { i++; } if (i < length) { i++; while (i < length && elements[i].getEntryKind() == element.getEntryKind()) { i++; } cpList.add(i, element); return; } switch (element.getEntryKind()) { case IClasspathEntry.CPE_SOURCE: cpList.add(0, element); break; case IClasspathEntry.CPE_CONTAINER: case IClasspathEntry.CPE_LIBRARY: case IClasspathEntry.CPE_PROJECT: case IClasspathEntry.CPE_VARIABLE: default: cpList.add(element); break; } } |
| ||||
private void insertAtEndOfCategory(IClasspathEntry entry, List entries) { int length = entries.size(); IClasspathEntry[] elements = (IClasspathEntry[]) entries.toArray(new IClasspathEntry[length]); int i = 0; while (i < length && elements[i].getEntryKind() != entry.getEntryKind()) { i++; } if (i < length) { i++; while (i < length && elements[i].getEntryKind() == entry.getEntryKind()) { i++; } entries.add(i, entry); return; } switch (entry.getEntryKind()) { case IClasspathEntry.CPE_SOURCE: entries.add(0, entry); break; case IClasspathEntry.CPE_CONTAINER: case IClasspathEntry.CPE_LIBRARY: case IClasspathEntry.CPE_PROJECT: case IClasspathEntry.CPE_VARIABLE: default: entries.add(entry); break; } } |
| |||
[[#variableb4373e40]]void [[#variableb4373dc0]]( [[#variableb4373d20]] [[#variableb4373c60]], List [[#variableb4373be0]]) { int length = [[#variableb4373be0]].size(); [[#variableb4373d20]][] elements = ( [[#variableb4373d20]][]) [[#variableb4373be0]].toArray(new [[#variableb4373d20]][length]); int i = 0; while (i < length && elements[i].getEntryKind() != [[#variableb4373c60]].getEntryKind()) { i++; } if (i < length) { i++; while (i < length && elements[i].getEntryKind() == [[#variableb4373c60]].getEntryKind()) { i++; } [[#variableb4373be0]].add(i, [[#variableb4373c60]]); return; } switch ( [[#variableb4373c60]].getEntryKind()) { case IClasspathEntry.CPE_SOURCE: [[#variableb4373be0]].add(0, [[#variableb4373c60]]); break; case IClasspathEntry.CPE_CONTAINER: case IClasspathEntry.CPE_LIBRARY: case IClasspathEntry.CPE_PROJECT: case IClasspathEntry.CPE_VARIABLE: default: [[#variableb4373be0]].add( [[#variableb4373c60]]); break; } } |
CloneAbstraction |
Parameter Index | Clone Instance | Parameter Name | Value |
---|---|---|---|
1 | 1 | [[#b4373e40]] | private |
1 | 2 | [[#b4373e40]] | public static |
2 | 1 | [[#b4373dc0]] | insertAtEndOfCategory |
2 | 2 | [[#b4373dc0]] | insert |
3 | 1 | [[#b4373d20]] | IClasspathEntry |
3 | 2 | [[#b4373d20]] | CPListElement |
4 | 1 | [[#b4373c60]] | entry |
4 | 2 | [[#b4373c60]] | element |
5 | 1 | [[#b4373be0]] | entries |
5 | 2 | [[#b4373be0]] | cpList |