| Previous CloneSet | Next CloneSet | Back to Main Report |
| Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
|---|---|---|---|---|
| 12 | 2 | 5 | 0.964 | class_body_declaration |
| Clone Abstraction | Parameter Bindings |
| Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
|---|---|---|---|
| 1 | 12 | 275 | plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/codemanipulation/AddGetterSetterOperation.java |
| 2 | 12 | 296 | plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/codemanipulation/AddGetterSetterOperation.java |
| ||||
/**
* Queries the user whether to skip existing methods.
*
* @param method the method in question
* @return <code>true</code> to skip existing methods, <code>false</code> otherwise
* @throws OperationCanceledException if the operation has been cancelled
*/
private boolean querySkipExistingMethods( final IMethod method) throws OperationCanceledException {
if ( !fSkipAllExisting) {
switch (fSkipExistingQuery.doQuery(method)) {
case IRequestQuery.CANCEL:
throw new OperationCanceledException();
case IRequestQuery.NO:
return false;
case IRequestQuery.YES_ALL:
fSkipAllExisting = true;
}
}
return true;
}
|
| ||||
/**
* Queries the user whether to skip final setters of existing fields.
*
* @param field the field in question
* @return <code>true</code> to skip final setters, <code>false</code> otherwise
* @throws OperationCanceledException if the operation has been cancelled
*/
private boolean querySkipFinalSetters( final IField field) throws OperationCanceledException {
if ( !fSkipAllFinalSetters) {
switch (fSkipFinalSettersQuery.doQuery(field)) {
case IRequestQuery.CANCEL:
throw new OperationCanceledException();
case IRequestQuery.NO:
return false;
case IRequestQuery.YES_ALL:
fSkipAllFinalSetters = true;
}
}
return true;
}
|
| |||
/**
* Queries the user whether to skip existing methods.
*
* @param method the method in question
* @return <code>true</code> to skip existing methods, <code>false</code> otherwise
* @throws OperationCanceledException if the operation has been cancelled
*/
/**
* Queries the user whether to skip final setters of existing fields.
*
* @param field the field in question
* @return <code>true</code> to skip final setters, <code>false</code> otherwise
* @throws OperationCanceledException if the operation has been cancelled
*/
private boolean [[#variablea45d5100]]( final [[#variablea45d5040]] [[#variablea45d4fe0]]) throws OperationCanceledException {
if ( ! [[#variablea45d4f60]]) {
switch ( [[#variablea45d4ec0]].doQuery( [[#variablea45d4fe0]])) {
case IRequestQuery.CANCEL:
throw new OperationCanceledException();
case IRequestQuery.NO:
return false;
case IRequestQuery.YES_ALL:
[[#variablea45d4f60]]= true;
}
}
return true;
}
|
| CloneAbstraction |
| Parameter Index | Clone Instance | Parameter Name | Value |
|---|---|---|---|
| 1 | 1 | [[#a45d5100]] | querySkipExistingMethods |
| 1 | 2 | [[#a45d5100]] | querySkipFinalSetters |
| 2 | 1 | [[#a45d5040]] | IMethod |
| 2 | 2 | [[#a45d5040]] | IField |
| 3 | 1 | [[#a45d4fe0]] | method |
| 3 | 2 | [[#a45d4fe0]] | field |
| 4 | 1 | [[#a45d4f60]] | fSkipAllExisting |
| 4 | 2 | [[#a45d4f60]] | fSkipAllFinalSetters |
| 5 | 1 | [[#a45d4ec0]] | fSkipExistingQuery |
| 5 | 2 | [[#a45d4ec0]] | fSkipFinalSettersQuery |