Previous CloneSet | Next CloneSet | Back to Main Report |
Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
---|---|---|---|---|
26 | 6 | 4 | 0.961 | statement_sequence[5] |
Clone Abstraction | Parameter Bindings |
Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
---|---|---|---|
1 | 26 | 849 | plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/code/ExtractConstantRefactoring.java |
2 | 32 | 961 | plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/code/ExtractMethodRefactoring.java |
3 | 26 | 960 | plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/code/ExtractTempRefactoring.java |
4 | 26 | 533 | plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/code/IntroduceParameterRefactoring.java |
5 | 26 | 849 | plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/code/PromoteTempToFieldRefactoring.java |
6 | 26 | 1484 | plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/structure/ChangeTypeRefactoring.java |
| ||||
final String selection = extended.getAttribute(JavaRefactoringDescriptor.ATTRIBUTE_SELECTION); if (selection != null) { int offset = -1; int length = -1; final StringTokenizer tokenizer = new StringTokenizer(selection); if (tokenizer.hasMoreTokens()) offset = Integer.valueOf(tokenizer.nextToken()).intValue(); if (tokenizer.hasMoreTokens()) length = Integer.valueOf(tokenizer.nextToken()).intValue(); if (offset >= 0 && length >= 0) { fSelectionStart = offset; fSelectionLength = length; } else return RefactoringStatus.createFatalErrorStatus(Messages.format(RefactoringCoreMessages.InitializableRefactoring_illegal_argument, new Object[] { selection, JavaRefactoringDescriptor.ATTRIBUTE_SELECTION } )); } else return RefactoringStatus.createFatalErrorStatus(Messages.format(RefactoringCoreMessages.InitializableRefactoring_argument_not_exist, JavaRefactoringDescriptor.ATTRIBUTE_SELECTION)); final String handle = extended.getAttribute(JavaRefactoringDescriptor.ATTRIBUTE_INPUT); if (handle != null) { final IJavaElement element = JavaRefactoringDescriptor.handleToElement(extended.getProject(), handle, false); if (element == null || !element.exists() || element.getElementType() != IJavaElement.COMPILATION_UNIT) return createInputFatalStatus(element, ID_EXTRACT_CONSTANT); else fCu = (ICompilationUnit) element; } else return RefactoringStatus.createFatalErrorStatus(Messages.format(RefactoringCoreMessages.InitializableRefactoring_argument_not_exist, JavaRefactoringDescriptor.ATTRIBUTE_INPUT)); final String visibility = extended.getAttribute(ATTRIBUTE_VISIBILITY); |
| ||||
final String selection = extended.getAttribute(JavaRefactoringDescriptor.ATTRIBUTE_SELECTION); if (selection != null) { int offset = -1; int length = -1; final StringTokenizer tokenizer = new StringTokenizer(selection); if (tokenizer.hasMoreTokens()) offset = Integer.valueOf(tokenizer.nextToken()).intValue(); if (tokenizer.hasMoreTokens()) length = Integer.valueOf(tokenizer.nextToken()).intValue(); if (offset >= 0 && length >= 0) { fSelectionStart = offset; fSelectionLength = length; } else return RefactoringStatus.createFatalErrorStatus(Messages.format(RefactoringCoreMessages.InitializableRefactoring_illegal_argument, new Object[] { selection, JavaRefactoringDescriptor.ATTRIBUTE_SELECTION } )); } else return RefactoringStatus.createFatalErrorStatus(Messages.format(RefactoringCoreMessages.InitializableRefactoring_argument_not_exist, JavaRefactoringDescriptor.ATTRIBUTE_SELECTION)); final String handle = extended.getAttribute(JavaRefactoringDescriptor.ATTRIBUTE_INPUT); if (handle != null) { final IJavaElement element = JavaRefactoringDescriptor.handleToElement(extended.getProject(), handle, false); if (element == null || !element.exists() || element.getElementType() != IJavaElement.COMPILATION_UNIT) return createInputFatalStatus(element, ID_EXTRACT_METHOD); else { fCUnit = (ICompilationUnit) element; try { initialize(fCUnit); } catch (CoreException exception) { JavaPlugin.log(exception); } } } else return RefactoringStatus.createFatalErrorStatus(Messages.format(RefactoringCoreMessages.InitializableRefactoring_argument_not_exist, JavaRefactoringDescriptor.ATTRIBUTE_INPUT)); final String visibility = extended.getAttribute(ATTRIBUTE_VISIBILITY); |
| ||||
final String selection = extended.getAttribute(JavaRefactoringDescriptor.ATTRIBUTE_SELECTION); if (selection != null) { int offset = -1; int length = -1; final StringTokenizer tokenizer = new StringTokenizer(selection); if (tokenizer.hasMoreTokens()) offset = Integer.valueOf(tokenizer.nextToken()).intValue(); if (tokenizer.hasMoreTokens()) length = Integer.valueOf(tokenizer.nextToken()).intValue(); if (offset >= 0 && length >= 0) { fSelectionStart = offset; fSelectionLength = length; } else return RefactoringStatus.createFatalErrorStatus(Messages.format(RefactoringCoreMessages.InitializableRefactoring_illegal_argument, new Object[] { selection, JavaRefactoringDescriptor.ATTRIBUTE_SELECTION } )); } else return RefactoringStatus.createFatalErrorStatus(Messages.format(RefactoringCoreMessages.InitializableRefactoring_argument_not_exist, JavaRefactoringDescriptor.ATTRIBUTE_SELECTION)); final String handle = extended.getAttribute(JavaRefactoringDescriptor.ATTRIBUTE_INPUT); if (handle != null) { final IJavaElement element = JavaRefactoringDescriptor.handleToElement(extended.getProject(), handle, false); if (element == null || !element.exists() || element.getElementType() != IJavaElement.COMPILATION_UNIT) return createInputFatalStatus(element, ID_EXTRACT_TEMP); else fCu = (ICompilationUnit) element; } else return RefactoringStatus.createFatalErrorStatus(Messages.format(RefactoringCoreMessages.InitializableRefactoring_argument_not_exist, JavaRefactoringDescriptor.ATTRIBUTE_INPUT)); final String name = extended.getAttribute(JavaRefactoringDescriptor.ATTRIBUTE_NAME); |
| ||||
final String selection = extended.getAttribute(JavaRefactoringDescriptor.ATTRIBUTE_SELECTION); if (selection != null) { int offset = -1; int length = -1; final StringTokenizer tokenizer = new StringTokenizer(selection); if (tokenizer.hasMoreTokens()) offset = Integer.valueOf(tokenizer.nextToken()).intValue(); if (tokenizer.hasMoreTokens()) length = Integer.valueOf(tokenizer.nextToken()).intValue(); if (offset >= 0 && length >= 0) { fSelectionStart = offset; fSelectionLength = length; } else return RefactoringStatus.createFatalErrorStatus(Messages.format(RefactoringCoreMessages.InitializableRefactoring_illegal_argument, new Object[] { selection, JavaRefactoringDescriptor.ATTRIBUTE_SELECTION } )); } else return RefactoringStatus.createFatalErrorStatus(Messages.format(RefactoringCoreMessages.InitializableRefactoring_argument_not_exist, JavaRefactoringDescriptor.ATTRIBUTE_SELECTION)); final String handle = extended.getAttribute(JavaRefactoringDescriptor.ATTRIBUTE_INPUT); if (handle != null) { final IJavaElement element = JavaRefactoringDescriptor.handleToElement(extended.getProject(), handle, false); if (element == null || !element.exists() || element.getElementType() != IJavaElement.COMPILATION_UNIT) return createInputFatalStatus(element, ID_INTRODUCE_PARAMETER); else fSourceCU = ((IMethod) element).getCompilationUnit(); } else return RefactoringStatus.createFatalErrorStatus(Messages.format(RefactoringCoreMessages.InitializableRefactoring_argument_not_exist, JavaRefactoringDescriptor.ATTRIBUTE_INPUT)); final String name = extended.getAttribute(ATTRIBUTE_ARGUMENT); |
| ||||
final String selection = extended.getAttribute(JavaRefactoringDescriptor.ATTRIBUTE_SELECTION); if (selection != null) { int offset = -1; int length = -1; final StringTokenizer tokenizer = new StringTokenizer(selection); if (tokenizer.hasMoreTokens()) offset = Integer.valueOf(tokenizer.nextToken()).intValue(); if (tokenizer.hasMoreTokens()) length = Integer.valueOf(tokenizer.nextToken()).intValue(); if (offset >= 0 && length >= 0) { fSelectionStart = offset; fSelectionLength = length; } else return RefactoringStatus.createFatalErrorStatus(Messages.format(RefactoringCoreMessages.InitializableRefactoring_illegal_argument, new Object[] { selection, JavaRefactoringDescriptor.ATTRIBUTE_SELECTION } )); } else return RefactoringStatus.createFatalErrorStatus(Messages.format(RefactoringCoreMessages.InitializableRefactoring_argument_not_exist, JavaRefactoringDescriptor.ATTRIBUTE_SELECTION)); final String handle = extended.getAttribute(JavaRefactoringDescriptor.ATTRIBUTE_INPUT); if (handle != null) { final IJavaElement element = JavaRefactoringDescriptor.handleToElement(extended.getProject(), handle, false); if (element == null || !element.exists() || element.getElementType() != IJavaElement.COMPILATION_UNIT) return createInputFatalStatus(element, ID_PROMOTE_TEMP); else fCu = (ICompilationUnit) element; } else return RefactoringStatus.createFatalErrorStatus(Messages.format(RefactoringCoreMessages.InitializableRefactoring_argument_not_exist, JavaRefactoringDescriptor.ATTRIBUTE_INPUT)); final String visibility = extended.getAttribute(ATTRIBUTE_VISIBILITY); |
| ||||
final String selection = extended.getAttribute(JavaRefactoringDescriptor.ATTRIBUTE_SELECTION); if (selection != null) { int offset = -1; int length = -1; final StringTokenizer tokenizer = new StringTokenizer(selection); if (tokenizer.hasMoreTokens()) offset = Integer.valueOf(tokenizer.nextToken()).intValue(); if (tokenizer.hasMoreTokens()) length = Integer.valueOf(tokenizer.nextToken()).intValue(); if (offset >= 0 && length >= 0) { fSelectionStart = offset; fSelectionLength = length; } else return RefactoringStatus.createFatalErrorStatus(Messages.format(RefactoringCoreMessages.InitializableRefactoring_illegal_argument, new Object[] { selection, JavaRefactoringDescriptor.ATTRIBUTE_SELECTION } )); } else return RefactoringStatus.createFatalErrorStatus(Messages.format(RefactoringCoreMessages.InitializableRefactoring_argument_not_exist, JavaRefactoringDescriptor.ATTRIBUTE_SELECTION)); final String handle = extended.getAttribute(JavaRefactoringDescriptor.ATTRIBUTE_INPUT); if (handle != null) { final IJavaElement element = JavaRefactoringDescriptor.handleToElement(extended.getProject(), handle, false); if (element == null || !element.exists() || element.getElementType() != IJavaElement.COMPILATION_UNIT) return createInputFatalStatus(element, ID_CHANGE_TYPE); else fCu = (ICompilationUnit) element; } else return RefactoringStatus.createFatalErrorStatus(Messages.format(RefactoringCoreMessages.InitializableRefactoring_argument_not_exist, JavaRefactoringDescriptor.ATTRIBUTE_INPUT)); final String type = extended.getAttribute(ATTRIBUTE_TYPE); |
| |||
final String selection = extended.getAttribute(JavaRefactoringDescriptor.ATTRIBUTE_SELECTION); if (selection != null) { int offset = -1; int length = -1; final StringTokenizer tokenizer = new StringTokenizer(selection); if (tokenizer.hasMoreTokens()) offset = Integer.valueOf(tokenizer.nextToken()).intValue(); if (tokenizer.hasMoreTokens()) length = Integer.valueOf(tokenizer.nextToken()).intValue(); if (offset >= 0 && length >= 0) { fSelectionStart = offset; fSelectionLength = length; } else return RefactoringStatus.createFatalErrorStatus(Messages.format(RefactoringCoreMessages.InitializableRefactoring_illegal_argument, new Object[] { selection, JavaRefactoringDescriptor.ATTRIBUTE_SELECTION } )); } else return RefactoringStatus.createFatalErrorStatus(Messages.format(RefactoringCoreMessages.InitializableRefactoring_argument_not_exist, JavaRefactoringDescriptor.ATTRIBUTE_SELECTION)); final String handle = extended.getAttribute(JavaRefactoringDescriptor.ATTRIBUTE_INPUT); if (handle != null) { final IJavaElement element = JavaRefactoringDescriptor.handleToElement(extended.getProject(), handle, false); if (element == null || !element.exists() || element.getElementType() != IJavaElement.COMPILATION_UNIT) return createInputFatalStatus(element, [[#variableb2bab3a0]]); else [[#variableb2bab360]] } else return RefactoringStatus.createFatalErrorStatus(Messages.format(RefactoringCoreMessages.InitializableRefactoring_argument_not_exist, JavaRefactoringDescriptor.ATTRIBUTE_INPUT)); final String [[#variableb2bab3c0]]= extended.getAttribute( [[#variableb2bab500]]); |
CloneAbstraction |
Parameter Index | Clone Instance | Parameter Name | Value |
---|---|---|---|
1 | 1 | [[#b2bab3a0]] | ID_CHANGE_TYPE |
1 | 2 | [[#b2bab3a0]] | ID_PROMOTE_TEMP |
1 | 3 | [[#b2bab3a0]] | ID_INTRODUCE_PARAMETER |
1 | 4 | [[#b2bab3a0]] | ID_EXTRACT_TEMP |
1 | 5 | [[#b2bab3a0]] | ID_EXTRACT_METHOD |
1 | 6 | [[#b2bab3a0]] | ID_EXTRACT_CONSTANT |
2 | 1 | [[#b2bab360]] | fCu = (ICompilationUnit) element; |
2 | 2 | [[#b2bab360]] | fCu = (ICompilationUnit) element; |
2 | 3 | [[#b2bab360]] | fSourceCU = ((IMethod) element).getCompilationUnit(); |
2 | 4 | [[#b2bab360]] | fCu = (ICompilationUnit) element; |
2 | 5 | [[#b2bab360]] | { fCUnit = (ICompilationUnit) element; try { initialize(fCUnit); } catch (CoreException exception) { JavaPlugin.log(exception); } } |
2 | 6 | [[#b2bab360]] | fCu = (ICompilationUnit) element; |
3 | 1 | [[#b2bab3c0]] | type |
3 | 2 | [[#b2bab3c0]] | visibility |
3 | 3 | [[#b2bab3c0]] | name |
3 | 4 | [[#b2bab3c0]] | name |
3 | 5 | [[#b2bab3c0]] | visibility |
3 | 6 | [[#b2bab3c0]] | visibility |
4 | 1 | [[#b2bab500]] | ATTRIBUTE_TYPE |
4 | 2 | [[#b2bab500]] | ATTRIBUTE_VISIBILITY |
4 | 3 | [[#b2bab500]] | ATTRIBUTE_ARGUMENT |
4 | 4 | [[#b2bab500]] | JavaRefactoringDescriptor.ATTRIBUTE_NAME |
4 | 5 | [[#b2bab500]] | ATTRIBUTE_VISIBILITY |
4 | 6 | [[#b2bab500]] | ATTRIBUTE_VISIBILITY |