CloneSet855


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
21260.988statement_sequence[8]
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
121242
plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/EditVariableEntryDialog.java
221380
plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/SourceAttachmentBlock.java
Clone Instance
1
Line Count
21
Source Line
242
Source File
plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/EditVariableEntryDialog.java

                        String varName = filePath.segment(0);
                        if (varName == null) {
                                status.setError(NewWizardMessages.EditVariableEntryDialog_filename_error_notvalid);
                                return status;
                        }
                        fFileVariablePath = JavaCore.getClasspathVariable(varName);
                        if (fFileVariablePath == null) {
                                status.setError(NewWizardMessages.EditVariableEntryDialog_filename_error_varnotexists);
                                return status;
                        }
                        resolvedPath = fFileVariablePath.append(filePath.removeFirstSegments(1));

                        if (resolvedPath.isEmpty()) {
                                status.setWarning(NewWizardMessages.EditVariableEntryDialog_filename_warning_varempty);
                                return status;
                        }
                        File file = resolvedPath.toFile();
                        if ( !file.isFile()) {
                                String message = Messages.format(NewWizardMessages.EditVariableEntryDialog_filename_error_filenotexists, resolvedPath.toOSString());
                                status.setInfo(message);
                                return status;
                        }


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

                                String varName = filePath.segment(0);
                                if (varName == null) {
                                        status.setError(NewWizardMessages.SourceAttachmentBlock_filename_error_notvalid);
                                        return status;
                                }
                                fFileVariablePath = JavaCore.getClasspathVariable(varName);
                                if (fFileVariablePath == null) {
                                        status.setError(NewWizardMessages.SourceAttachmentBlock_filename_error_varnotexists);
                                        return status;
                                }
                                resolvedPath = fFileVariablePath.append(filePath.removeFirstSegments(1));

                                if (resolvedPath.isEmpty()) {
                                        status.setWarning(NewWizardMessages.SourceAttachmentBlock_filename_warning_varempty);
                                        return status;
                                }
                                File file = resolvedPath.toFile();
                                if ( !file.exists()) {
                                        String message = Messages.format(NewWizardMessages.SourceAttachmentBlock_filename_error_filenotexists, resolvedPath.toOSString());
                                        status.setWarning(message);
                                        return status;
                                }


Clone AbstractionParameter Count: 6Parameter Bindings

String varName = filePath.segment(0);
if (varName == null) {
  status.setError(NewWizardMessages. [[#variable9823aac0]]);
  return status;
}
fFileVariablePath = JavaCore.getClasspathVariable(varName);
if (fFileVariablePath == null) {
  status.setError(NewWizardMessages. [[#variable9823aa00]]);
  return status;
}
resolvedPath = fFileVariablePath.append(filePath.removeFirstSegments(1));
if (resolvedPath.isEmpty()) {
  status.setWarning(NewWizardMessages. [[#variable9823aa60]]);
  return status;
}
File file = resolvedPath.toFile();
if ( !file. [[#variablebb03b780]]()) {
  String message = Messages.format(NewWizardMessages. [[#variableb71be7c0]], resolvedPath.toOSString());
  status. [[#variable9823aa40]](message);
  return status;
}
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#9823aac0]]
EditVariableEntryDialog_filename_error_notvalid 
12[[#9823aac0]]
SourceAttachmentBlock_filename_error_notvalid 
21[[#9823aa00]]
EditVariableEntryDialog_filename_error_varnotexists 
22[[#9823aa00]]
SourceAttachmentBlock_filename_error_varnotexists 
31[[#9823aa60]]
EditVariableEntryDialog_filename_warning_varempty 
32[[#9823aa60]]
SourceAttachmentBlock_filename_warning_varempty 
41[[#bb03b780]]
isFile 
42[[#bb03b780]]
exists 
51[[#b71be7c0]]
EditVariableEntryDialog_filename_error_filenotexists 
52[[#b71be7c0]]
SourceAttachmentBlock_filename_error_filenotexists 
61[[#9823aa40]]
setInfo 
62[[#9823aa40]]
setWarning