CloneSet2194


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
15220.992statement_sequence[3]
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
115140
plugins/org.eclipse.jdt.apt.core/src/org/eclipse/jdt/apt/core/internal/generatedfile/GeneratedSourceFolderManager.java
213176
plugins/org.eclipse.jdt.apt.core/src/org/eclipse/jdt/apt/core/internal/generatedfile/GeneratedSourceFolderManager.java
Clone Instance
1
Line Count
15
Source Line
140
Source File
plugins/org.eclipse.jdt.apt.core/src/org/eclipse/jdt/apt/core/internal/generatedfile/GeneratedSourceFolderManager.java

                IFolder srcFolder = getFolderPreference();
                if (srcFolder == null) {
                        IStatus status = AptPlugin.createStatus(null, "Could not create generated source folder (" + //$NON-NLS-1$
                                                                       AptConfig.getGenSrcDir(_aptProject.getJavaProject()) + ")"); //$NON-NLS-1$
                        AptPlugin.log(status);
                        return;
                }

                // Ensure that the new folder exists on disk.
                if (createOnDisk(srcFolder)) {
                        // Add it to the classpath.
                        if (addToClasspath(srcFolder)) {
                                // Only if we get this far do we actually set _generatedSourceFolder.
                                synchronized ( this ) {
                                        _generatedSourceFolder = srcFolder;
                                }
                        }
                }


Clone Instance
2
Line Count
13
Source Line
176
Source File
plugins/org.eclipse.jdt.apt.core/src/org/eclipse/jdt/apt/core/internal/generatedfile/GeneratedSourceFolderManager.java

                // In principle we could bail out here, if (_generatedSourceFolder != null).
                // However, this method is an opportunity to detect and fix problems such 
                // as the folder getting deleted without generatedSourceFolderDeleted() 
                // getting called (e.g., without user having done a refresh).
                IFolder srcFolder = getFolder();
                if (srcFolder == null) {
                        IStatus status = AptPlugin.createStatus(null, "Could not create generated source folder (" + //$NON-NLS-1$
                                                                       AptConfig.getGenSrcDir(_aptProject.getJavaProject()) + ")"); //$NON-NLS-1$
                        AptPlugin.log(status);
                        return;
                }

                if (createOnDisk(srcFolder)) {
                        if (isOnClasspath(srcFolder)) {
                                synchronized (this ) {
                                        // Only set _generatedSourceFolder if folder is on disk and on classpath.
                                        _generatedSourceFolder = srcFolder;
                                }
                        }
                }


Clone AbstractionParameter Count: 2Parameter Bindings

// In principle we could bail out here, if (_generatedSourceFolder != null).
// However, this method is an opportunity to detect and fix problems such 
// as the folder getting deleted without generatedSourceFolderDeleted() 
// getting called (e.g., without user having done a refresh).
IFolder srcFolder = [[#variable5693fae0]]();
if (srcFolder == null) {
  IStatus status = AptPlugin.createStatus(null, "Could not create generated source folder (" + //$NON-NLS-1$
                                                 AptConfig.getGenSrcDir(_aptProject.getJavaProject()) + ")"); //$NON-NLS-1$
  AptPlugin.log(status);
  return;
}
// Ensure that the new folder exists on disk.
if (createOnDisk(srcFolder)) {
  // Add it to the classpath.
  if ( [[#variable5693fb00]](srcFolder)) {
    // Only if we get this far do we actually set _generatedSourceFolder.
    synchronized (this ) {
      // Only set _generatedSourceFolder if folder is on disk and on classpath.
      _generatedSourceFolder = srcFolder;
    }
  }
}
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#5693fae0]]
getFolderPreference 
12[[#5693fae0]]
getFolder 
21[[#5693fb00]]
addToClasspath 
22[[#5693fb00]]
isOnClasspath