| Previous CloneSet | Next CloneSet | Back to Main Report |
| Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
|---|---|---|---|---|
| 15 | 4 | 5 | 0.984 | class_body_declarations[2] |
| Clone Abstraction | Parameter Bindings |
| Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
|---|---|---|---|
| 1 | 15 | 69 | plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/ExtractConstantAction.java |
| 2 | 15 | 70 | plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/ExtractMethodAction.java |
| 3 | 15 | 69 | plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/ExtractTempAction.java |
| 4 | 15 | 68 | plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/IntroduceParameterAction.java |
| ||||
/**
* Note: This method is for internal use only. Clients should not call this method.
*/
public void selectionChanged(JavaTextSelection selection) {
setEnabled(RefactoringAvailabilityTester.isExtractConstantAvailable(selection));
}
/* (non-Javadoc)
* Method declared on SelectionDispatchAction
*/
public void run(ITextSelection selection) {
if ( !ActionUtil.isProcessable(getShell(), fEditor))
return;
try {
final ExtractConstantRefactoring refactoring = new ExtractConstantRefactoring(SelectionConverter.getInputAsCompilationUnit(fEditor), selection.getOffset(), selection.getLength());
new RefactoringStarter().activate(refactoring, new ExtractConstantWizard(refactoring), getShell(), DIALOG_MESSAGE_TITLE, false);
} catch (JavaModelException e) {
ExceptionHandler.handle(e, DIALOG_MESSAGE_TITLE, RefactoringMessages.NewTextRefactoringAction_exception);
}
}
|
| ||||
/**
* Note: This method is for internal use only. Clients should not call this method.
*/
public void selectionChanged(JavaTextSelection selection) {
setEnabled(RefactoringAvailabilityTester.isExtractMethodAvailable(selection));
}
/* (non-Javadoc)
* Method declared on SelectionDispatchAction
*/
public void run(ITextSelection selection) {
if ( !ActionUtil.isProcessable(getShell(), fEditor))
return;
try {
final ExtractMethodRefactoring refactoring = new ExtractMethodRefactoring(SelectionConverter.getInputAsCompilationUnit(fEditor), selection.getOffset(), selection.getLength());
new RefactoringStarter().activate(refactoring, new ExtractMethodWizard(refactoring), getShell(), DIALOG_MESSAGE_TITLE, false);
} catch (CoreException e) {
ExceptionHandler.handle(e, DIALOG_MESSAGE_TITLE, RefactoringMessages.NewTextRefactoringAction_exception);
}
}
|
| ||||
/**
* Note: This method is for internal use only. Clients should not call this method.
*/
public void selectionChanged(JavaTextSelection selection) {
setEnabled(RefactoringAvailabilityTester.isExtractTempAvailable(selection));
}
/* (non-Javadoc)
* Method declared on SelectionDispatchAction
*/
public void run(ITextSelection selection) {
if ( !ActionUtil.isProcessable(getShell(), fEditor))
return;
try {
final ExtractTempRefactoring refactoring = new ExtractTempRefactoring(SelectionConverter.getInputAsCompilationUnit(fEditor), selection.getOffset(), selection.getLength());
new RefactoringStarter().activate(refactoring, new ExtractTempWizard(refactoring), getShell(), DIALOG_MESSAGE_TITLE, false);
} catch (JavaModelException e) {
ExceptionHandler.handle(e, DIALOG_MESSAGE_TITLE, RefactoringMessages.NewTextRefactoringAction_exception);
}
}
|
| ||||
/**
* Note: This method is for internal use only. Clients should not call this method.
*/
public void selectionChanged(JavaTextSelection selection) {
setEnabled(RefactoringAvailabilityTester.isIntroduceParameterAvailable(selection));
}
/* (non-Javadoc)
* Method declared on SelectionDispatchAction
*/
public void run(ITextSelection selection) {
if ( !ActionUtil.isProcessable(getShell(), fEditor))
return;
try {
final IntroduceParameterRefactoring refactoring = new IntroduceParameterRefactoring(SelectionConverter.getInputAsCompilationUnit(fEditor), selection.getOffset(), selection.getLength());
new RefactoringStarter().activate(refactoring, new IntroduceParameterWizard(refactoring), getShell(), DIALOG_MESSAGE_TITLE, true);
} catch (CoreException e) {
ExceptionHandler.handle(e, DIALOG_MESSAGE_TITLE, RefactoringMessages.NewTextRefactoringAction_exception);
}
}
|
| |||
/**
* Note: This method is for internal use only. Clients should not call this method.
*/
public void selectionChanged(JavaTextSelection selection) {
setEnabled(RefactoringAvailabilityTester. [[#variableb4282da0]](selection));
}
/* (non-Javadoc)
* Method declared on SelectionDispatchAction
*/
public void run(ITextSelection selection) {
if ( !ActionUtil.isProcessable(getShell(), fEditor))
return;
try {
final [[#variable598176c0]] refactoring = new [[#variable598176c0]](SelectionConverter.getInputAsCompilationUnit(fEditor), selection.getOffset(), selection.getLength());
new RefactoringStarter().activate(refactoring, new [[#variableb4282d00]](refactoring), getShell(), DIALOG_MESSAGE_TITLE, [[#variable9628d3e0]]);
}
catch ( [[#variableb5819ee0]] e) {
ExceptionHandler.handle(e, DIALOG_MESSAGE_TITLE, RefactoringMessages.NewTextRefactoringAction_exception);
}
}
|
| CloneAbstraction |
| Parameter Index | Clone Instance | Parameter Name | Value |
|---|---|---|---|
| 1 | 1 | [[#b4282da0]] | isExtractConstantAvailable |
| 1 | 2 | [[#b4282da0]] | isExtractMethodAvailable |
| 1 | 3 | [[#b4282da0]] | isExtractTempAvailable |
| 1 | 4 | [[#b4282da0]] | isIntroduceParameterAvailable |
| 2 | 1 | [[#598176c0]] | ExtractConstantRefactoring |
| 2 | 2 | [[#598176c0]] | ExtractMethodRefactoring |
| 2 | 3 | [[#598176c0]] | ExtractTempRefactoring |
| 2 | 4 | [[#598176c0]] | IntroduceParameterRefactoring |
| 3 | 1 | [[#b4282d00]] | ExtractConstantWizard |
| 3 | 2 | [[#b4282d00]] | ExtractMethodWizard |
| 3 | 3 | [[#b4282d00]] | ExtractTempWizard |
| 3 | 4 | [[#b4282d00]] | IntroduceParameterWizard |
| 4 | 1 | [[#9628d3e0]] | false |
| 4 | 2 | [[#9628d3e0]] | false |
| 4 | 3 | [[#9628d3e0]] | false |
| 4 | 4 | [[#9628d3e0]] | true |
| 5 | 1 | [[#b5819ee0]] | JavaModelException |
| 5 | 2 | [[#b5819ee0]] | CoreException |
| 5 | 3 | [[#b5819ee0]] | JavaModelException |
| 5 | 4 | [[#b5819ee0]] | CoreException |