CloneSet278


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
17420.996statement_sequence[2]
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
117236
plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/codemanipulation/AddCustomConstructorOperation.java
217238
plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/codemanipulation/AddDelegateMethodsOperation.java
317383
plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/codemanipulation/AddGetterSetterOperation.java
418377
plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/codemanipulation/GenerateHashCodeEqualsOperation.java
Clone Instance
1
Line Count
17
Source Line
236
Source File
plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/codemanipulation/AddCustomConstructorOperation.java

                                        final Change result = rewrite.createChange();
                                        if (result instanceof CompilationUnitChange) {
                                                final CompilationUnitChange change = (CompilationUnitChange) result;
                                                final TextEdit edit = change.getEdit();
                                                if (edit != null) {
                                                        try {
                                                                fEdit = edit;
                                                                if (fApply)
                                                                        edit.apply(document, TextEdit.UPDATE_REGIONS);
                                                                if (fSave) {
                                                                        if (buffer != null)
                                                                                buffer.commit(new SubProgressMonitor(monitor, 1), true);
                                                                        else
                                                                                unit.getBuffer().setContents(document.get());
                                                                }
                                                        } catch (Exception exception) {
                                                                throw new CoreException(new Status(IStatus.ERROR, JavaPlugin.getPluginId(), 0, exception.getLocalizedMessage(), exception));
                                                          }
                                                }
                                        }


Clone Instance
2
Line Count
17
Source Line
238
Source File
plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/codemanipulation/AddDelegateMethodsOperation.java

                                                final Change result = rewrite.createChange();
                                                if (result instanceof CompilationUnitChange) {
                                                        final CompilationUnitChange change = (CompilationUnitChange) result;
                                                        final TextEdit edit = change.getEdit();
                                                        if (edit != null) {
                                                                try {
                                                                        fEdit = edit;
                                                                        if (fApply)
                                                                                edit.apply(document, TextEdit.UPDATE_REGIONS);
                                                                        if (fSave) {
                                                                                if (buffer != null)
                                                                                        buffer.commit(new SubProgressMonitor(monitor, 1), true);
                                                                                else
                                                                                        unit.getBuffer().setContents(document.get());
                                                                        }
                                                                } catch (Exception exception) {
                                                                        throw new CoreException(new Status(IStatus.ERROR, JavaPlugin.getPluginId(), 0, exception.getLocalizedMessage(), exception));
                                                                  }
                                                        }
                                                }


Clone Instance
3
Line Count
17
Source Line
383
Source File
plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/codemanipulation/AddGetterSetterOperation.java

                                        final Change result = rewrite.createChange();
                                        if (result instanceof CompilationUnitChange) {
                                                final CompilationUnitChange change = (CompilationUnitChange) result;
                                                final TextEdit edit = change.getEdit();
                                                if (edit != null) {
                                                        try {
                                                                fEdit = edit;
                                                                if (fApply)
                                                                        edit.apply(document, TextEdit.UPDATE_REGIONS);
                                                                if (fSave) {
                                                                        if (buffer != null)
                                                                                buffer.commit(new SubProgressMonitor(monitor, 1), true);
                                                                        else
                                                                                unit.getBuffer().setContents(document.get());
                                                                }
                                                        } catch (Exception exception) {
                                                                throw new CoreException(new Status(IStatus.ERROR, JavaPlugin.getPluginId(), 0, exception.getLocalizedMessage(), exception));
                                                          }
                                                }
                                        }


Clone Instance
4
Line Count
18
Source Line
377
Source File
plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/codemanipulation/GenerateHashCodeEqualsOperation.java

                                        // add 'em
                                        final Change result = fRewrite.createChange();
                                        if (result instanceof CompilationUnitChange) {
                                                final CompilationUnitChange change = (CompilationUnitChange) result;
                                                final TextEdit edit = change.getEdit();
                                                if (edit != null) {
                                                        try {
                                                                fEdit = edit;
                                                                if (fApply)
                                                                        edit.apply(document, TextEdit.UPDATE_REGIONS);
                                                                if (fSave) {
                                                                        if (buffer != null)
                                                                                buffer.commit(new SubProgressMonitor(monitor, 1), true);
                                                                        else
                                                                                cu.getBuffer().setContents(document.get());
                                                                }
                                                        } catch (Exception exception) {
                                                                throw new CoreException(new Status(IStatus.ERROR, JavaPlugin.getPluginId(), 0, exception.getLocalizedMessage(), 
                                                                                exception         ));
                                                          }
                                                }
                                        }


Clone AbstractionParameter Count: 2Parameter Bindings

// add 'em
final Change result = [[#variablea35aaa40]].createChange();
if (result instanceof CompilationUnitChange) {
  final CompilationUnitChange change = (CompilationUnitChange) result;
  final TextEdit edit = change.getEdit();
  if (edit != null) {
    try {
      fEdit = edit;
      if (fApply)
        edit.apply(document, TextEdit.UPDATE_REGIONS);
      if (fSave) {
        if (buffer != null)
          buffer.commit(new SubProgressMonitor(monitor, 1), true);
        else
           [[#variablea35aa8c0]].getBuffer().setContents(document.get());
      }
    }
    catch (Exception exception) {
      throw new CoreException(new Status(IStatus.ERROR, JavaPlugin.getPluginId(), 0, exception.getLocalizedMessage(), exception));
    }
  }
}
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#a35aaa40]]
rewrite 
12[[#a35aaa40]]
fRewrite 
13[[#a35aaa40]]
rewrite 
14[[#a35aaa40]]
rewrite 
21[[#a35aa8c0]]
unit 
22[[#a35aa8c0]]
cu 
23[[#a35aa8c0]]
unit 
24[[#a35aa8c0]]
unit