CloneSet1132


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
19260.951class_body_declaration
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
119464
plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/SourceAttachmentBlock.java
218485
plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/SourceAttachmentBlock.java
Clone Instance
1
Line Count
19
Source Line
464
Source File
plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/SourceAttachmentBlock.java

        /*
         * Opens a dialog to choose a jar from the file system.
         */
        private IPath chooseExtJarFile() {
                IPath currPath = getFilePath();
                if (currPath.segmentCount() == 0) {
                        currPath = fEntry.getPath();
                }

                if (ArchiveFileFilter.isArchivePath(currPath)) {
                        currPath = currPath.removeLastSegments(1);
                }

                FileDialog dialog = new FileDialog(getShell());
                dialog.setText(NewWizardMessages.SourceAttachmentBlock_extjardialog_text);
                dialog.setFilterExtensions(new String[] {
                                                         "*.jar;*.zip"
                                                        } );              //$NON-NLS-1$
                dialog.setFilterPath(currPath.toOSString());
                String res = dialog.open();
                if (res != null) {
                        return Path.fromOSString(res).makeAbsolute();
                }
                return null;
        }


Clone Instance
2
Line Count
18
Source Line
485
Source File
plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/SourceAttachmentBlock.java

        private IPath chooseExtFolder() {
                IPath currPath = getFilePath();
                if (currPath.segmentCount() == 0) {
                        currPath = fEntry.getPath();
                }
                if (ArchiveFileFilter.isArchivePath(currPath)) {
                        currPath = currPath.removeLastSegments(1);
                }

                DirectoryDialog dialog = new DirectoryDialog(getShell());
                dialog.setMessage(NewWizardMessages.SourceAttachmentBlock_extfolderdialog_message);
                dialog.setText(NewWizardMessages.SourceAttachmentBlock_extfolderdialog_text);
                dialog.setFilterPath(currPath.toOSString());
                String res = dialog.open();
                if (res != null) {
                        return Path.fromOSString(res).makeAbsolute();
                }
                return null;
        }


Clone AbstractionParameter Count: 6Parameter Bindings

/*
         * Opens a dialog to choose a jar from the file system.
         */
private IPath  [[#variable6447ec00]]() {
  IPath currPath = getFilePath();
  if (currPath.segmentCount() == 0) {
    currPath = fEntry.getPath();
  }
  if (ArchiveFileFilter.isArchivePath(currPath)) {
    currPath = currPath.removeLastSegments(1);
  }
   [[#variable6447eb60]] dialog = new [[#variable6447eb60]](getShell());
  dialog. [[#variable6447eac0]](NewWizardMessages. [[#variable6447ea40]]);
  dialog. [[#variable6447e9e0]]( [[#variable6447e980]]); //$NON-NLS-1$
  dialog.setFilterPath(currPath.toOSString());
  String res = dialog.open();
  if (res != null) {
    return Path.fromOSString(res).makeAbsolute();
  }
  return null;
}
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#6447ec00]]
chooseExtJarFile 
12[[#6447ec00]]
chooseExtFolder 
21[[#6447eb60]]
FileDialog 
22[[#6447eb60]]
DirectoryDialog 
31[[#6447eac0]]
setText 
32[[#6447eac0]]
setMessage 
41[[#6447ea40]]
SourceAttachmentBlock_extjardialog_text 
42[[#6447ea40]]
SourceAttachmentBlock_extfolderdialog_message 
51[[#6447e9e0]]
setFilterExtensions 
52[[#6447e9e0]]
setText 
61[[#6447e980]]
new String[] {
               "*.jar;*.zip"
             } 
62[[#6447e980]]
NewWizardMessages.SourceAttachmentBlock_extfolderdialog_text