CloneSet438


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
19350.967block
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
1191429
plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/reorg/ReorgPolicyFactory.java
2191453
plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/reorg/ReorgPolicyFactory.java
3191475
plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/reorg/ReorgPolicyFactory.java
Clone Instance
1
Line Count
19
Source Line
1429
Source File
plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/reorg/ReorgPolicyFactory.java

                                                                                              {
                        if (isNewNameOk(destination, cu.getElementName()))
                                return null;
                        if ( ! ReorgUtils.isParentInWorkspaceOrOnDisk(cu, destination))
                                return null;
                        int i = 1;
                        while (true) {
                                String newName;
                                if (i == 1)
                                        newName = Messages.format(RefactoringCoreMessages.CopyRefactoring_cu_copyOf1, 
                                                                 cu.getElementName());
                                else
                                        newName = Messages.format(RefactoringCoreMessages.CopyRefactoring_cu_copyOfMore, 
                                                                 new String[] {
                                                                               String.valueOf(i), cu.getElementName()
                                                                              } );
                                if (isNewNameOk(destination, newName) && ! fAutoGeneratedNewNames.contains(newName)) {
                                        fAutoGeneratedNewNames.add(newName);
                                        return removeTrailingJava(newName);
                                }
                                i++;
                        }
                                                                                              }


Clone Instance
2
Line Count
19
Source Line
1453
Source File
plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/reorg/ReorgPolicyFactory.java

                                                                                  {
                        if (isNewNameOk(destination, res.getName()))
                                return null;
                        if ( ! ReorgUtils.isParentInWorkspaceOrOnDisk(res, destination))
                                return null;
                        int i = 1;
                        while (true) {
                                String newName;
                                if (i == 1)
                                        newName = Messages.format(RefactoringCoreMessages.CopyRefactoring_resource_copyOf1, 
                                                                 res.getName());
                                else
                                        newName = Messages.format(RefactoringCoreMessages.CopyRefactoring_resource_copyOfMore, 
                                                                 new String[] {
                                                                               String.valueOf(i), res.getName()
                                                                              } );
                                if (isNewNameOk(destination, newName) && ! fAutoGeneratedNewNames.contains(newName)) {
                                        fAutoGeneratedNewNames.add(newName);
                                        return newName;
                                }
                                i++;
                        }
                                                                                  }


Clone Instance
3
Line Count
19
Source Line
1475
Source File
plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/reorg/ReorgPolicyFactory.java

                                                                                                    {
                        if (isNewNameOk(destination, pack.getElementName()))
                                return null;
                        if ( ! ReorgUtils.isParentInWorkspaceOrOnDisk(pack, destination))
                                return null;
                        int i = 1;
                        while (true) {
                                String newName;
                                if (i == 1)
                                        newName = Messages.format(RefactoringCoreMessages.CopyRefactoring_package_copyOf1, 
                                                                 pack.getElementName());
                                else
                                        newName = Messages.format(RefactoringCoreMessages.CopyRefactoring_package_copyOfMore, 
                                                                 new String[] {
                                                                               String.valueOf(i), pack.getElementName()
                                                                              } );
                                if (isNewNameOk(destination, newName) && ! fAutoGeneratedNewNames.contains(newName)) {
                                        fAutoGeneratedNewNames.add(newName);
                                        return newName;
                                }
                                i++;
                        }
                                                                                                    }


Clone AbstractionParameter Count: 5Parameter Bindings

{
  if (isNewNameOk(destination,  [[#variableb2415680]]. [[#variableb2415560]]()))
    return null;
  if ( !ReorgUtils.isParentInWorkspaceOrOnDisk( [[#variableb2415680]], destination))
    return null;
  int i = 1;
  while (true) {
    String newName;
    if (i == 1)
      newName = Messages.format(RefactoringCoreMessages. [[#variable59d87160]],  [[#variableb2415680]]. [[#variableb2415560]]());
    else
      newName = Messages.format(RefactoringCoreMessages. [[#variable59d87100]], new String[] {
                                                                                               String.valueOf(i),
                                                                                                [[#variableb2415680]]. [[#variableb2415560]]()
                                                                                             } );
    if (isNewNameOk(destination, newName) && !fAutoGeneratedNewNames.contains(newName)) {
      fAutoGeneratedNewNames.add(newName);
      return [[#variableb2415580]];
    }
    i++;
  }
}
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#b2415680]]
cu 
12[[#b2415680]]
res 
13[[#b2415680]]
pack 
21[[#b2415560]]
getElementName 
22[[#b2415560]]
getName 
23[[#b2415560]]
getElementName 
31[[#59d87160]]
CopyRefactoring_cu_copyOf1 
32[[#59d87160]]
CopyRefactoring_resource_copyOf1 
33[[#59d87160]]
CopyRefactoring_package_copyOf1 
41[[#59d87100]]
CopyRefactoring_cu_copyOfMore 
42[[#59d87100]]
CopyRefactoring_resource_copyOfMore 
43[[#59d87100]]
CopyRefactoring_package_copyOfMore 
51[[#b2415580]]
removeTrailingJava(newName) 
52[[#b2415580]]
newName 
53[[#b2415580]]
newName