Previous CloneSet | Next CloneSet | Back to Main Report |
Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
---|---|---|---|---|
17 | 2 | 3 | 0.976 | class_body_declaration |
Clone Abstraction | Parameter Bindings |
Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
---|---|---|---|
1 | 17 | 70 | plugins/org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/ChangeExceptionsControl.java |
2 | 17 | 96 | plugins/org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/ChangeParametersControl.java |
| ||||
//TODO: cleanup, adapt NLS strings private static class ExceptionInfoContentProvider implements IStructuredContentProvider { public Object[] getElements(Object inputElement) { return removeMarkedAsDeleted((List) inputElement); } private ExceptionInfo[] removeMarkedAsDeleted(List exceptionInfos) { List result = new ArrayList(exceptionInfos.size()); for (Iterator iter = exceptionInfos.iterator(); iter.hasNext();) { ExceptionInfo info = (ExceptionInfo) iter.next(); if ( ! info.isDeleted()) result.add(info); } return (ExceptionInfo[]) result.toArray(new ExceptionInfo[result.size()]); } public void dispose() { // do nothing } public void inputChanged(Viewer viewer, Object oldInput, Object newInput) { // do nothing } } |
| ||||
private static class ParameterInfoContentProvider implements IStructuredContentProvider { public Object[] getElements(Object inputElement) { return removeMarkedAsDeleted((List) inputElement); } private ParameterInfo[] removeMarkedAsDeleted(List paramInfos) { List result = new ArrayList(paramInfos.size()); for (Iterator iter = paramInfos.iterator(); iter.hasNext();) { ParameterInfo info = (ParameterInfo) iter.next(); if ( ! info.isDeleted()) result.add(info); } return (ParameterInfo[]) result.toArray(new ParameterInfo[result.size()]); } public void dispose() { // do nothing } public void inputChanged(Viewer viewer, Object oldInput, Object newInput) { // do nothing } } |
| |||
//TODO: cleanup, adapt NLS strings private static class [[#variable6010e4a0]]implements IStructuredContentProvider { public Object[] getElements(Object inputElement) { return removeMarkedAsDeleted((List) inputElement); } private [[#variable6010e440]][] removeMarkedAsDeleted(List [[#variable6010e3e0]]) { List result = new ArrayList( [[#variable6010e3e0]].size()); for (Iterator iter = [[#variable6010e3e0]].iterator(); iter.hasNext();) { [[#variable6010e440]] info = ( [[#variable6010e440]]) iter.next(); if ( !info.isDeleted()) result.add(info); } return ( [[#variable6010e440]][]) result.toArray(new [[#variable6010e440]][result.size()]); } public void dispose() { // do nothing } public void inputChanged(Viewer viewer, Object oldInput, Object newInput) { // do nothing } } |
CloneAbstraction |
Parameter Index | Clone Instance | Parameter Name | Value |
---|---|---|---|
1 | 1 | [[#6010e4a0]] | ParameterInfoContentProvider |
1 | 2 | [[#6010e4a0]] | ExceptionInfoContentProvider |
2 | 1 | [[#6010e440]] | ParameterInfo |
2 | 2 | [[#6010e440]] | ExceptionInfo |
3 | 1 | [[#6010e3e0]] | paramInfos |
3 | 2 | [[#6010e3e0]] | exceptionInfos |