CloneSet1486


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
12210.997class_body_declarations[2]
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
11230
plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/changes/CreateCompilationUnitChange.java
21972
plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/changes/MultiStateCompilationUnitChange.java
Clone Instance
1
Line Count
12
Source Line
30
Source File
plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/changes/CreateCompilationUnitChange.java

        public String getName() {
                return Messages.format(RefactoringCoreMessages.CompilationUnitChange_label, new String[] {
                                                                                                           fUnit.getElementName(), getPath(fUnit.getResource())
                                                                                                         } );
        }

        private String getPath(IResource resource) {
                final StringBuffer buffer = new StringBuffer(resource.getProject().getName());
                final String path = resource.getParent().getProjectRelativePath().toString();
                if (path.length() > 0) {
                        buffer.append('/');
                        buffer.append(path);
                }
                return buffer.toString();
        }


Clone Instance
2
Line Count
19
Source Line
72
Source File
plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/changes/MultiStateCompilationUnitChange.java

        /**
         * {@inheritDoc}
         */
        public String getName() {
                return Messages.format(RefactoringCoreMessages.MultiStateCompilationUnitChange_name_pattern, new String[] {
                                                                                                                            fUnit.getElementName(), getPath(fUnit.getResource())
                                                                                                                          } );
        }

        /**
         * Returns the path of the resource to display.
         * 
         * @param resource
         *            the resource
         * @return the path
         */
        private String getPath(IResource resource) {
                final StringBuffer buffer = new StringBuffer(resource.getProject().getName());
                final String path = resource.getParent().getProjectRelativePath().toString();
                if (path.length() > 0) {
                        buffer.append('/');
                        buffer.append(path);
                }
                return buffer.toString();
        }


Clone AbstractionParameter Count: 1Parameter Bindings

/**
         * {@inheritDoc}
         */
public String getName() {
  return Messages.format(RefactoringCoreMessages. [[#variablebb07dfa0]], new String[] {
                                                                                        fUnit.getElementName(),
                                                                                        getPath(fUnit.getResource())
                                                                                      } );
}

/**
         * Returns the path of the resource to display.
         * 
         * @param resource
         *            the resource
         * @return the path
         */
private String getPath(IResource resource) {
  final StringBuffer buffer = new StringBuffer(resource.getProject().getName());
  final String path = resource.getParent().getProjectRelativePath().toString();
  if (path.length() > 0) {
    buffer.append('/');
    buffer.append(path);
  }
  return buffer.toString();
}
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#bb07dfa0]]
CompilationUnitChange_label 
12[[#bb07dfa0]]
MultiStateCompilationUnitChange_name_pattern