CloneSet2876


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
9210.995class_body_declaration
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
19205
plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/ui/JUnitPlugin.java
29586
plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/JavaPluginImages.java
Clone Instance
1
Line Count
9
Source Line
205
Source File
plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/ui/JUnitPlugin.java

        /**
         * Creates an image descriptor for the given path in a bundle. The path can
         * contain variables like $NL$. If no image could be found,
         * <code>useMissingImageDescriptor</code> decides if either the 'missing
         * image descriptor' is returned or <code>null</code>.
         * 
         * @param bundle
         * @param path
         * @param useMissingImageDescriptor
         * @return an {@link ImageDescriptor}, or <code>null</code> iff there's
         *         no image at the given location and
         *         <code>useMissingImageDescriptor</code> is <code>true</code>
         */
        private static ImageDescriptor createImageDescriptor(Bundle bundle, IPath path, boolean useMissingImageDescriptor) {
                URL url = FileLocator.find(bundle, path, null);
                if (url != null) {
                        return ImageDescriptor.createFromURL(url);
                }
                if (useMissingImageDescriptor) {
                        return ImageDescriptor.getMissingImageDescriptor();
                }
                return null;
        }


Clone Instance
2
Line Count
9
Source Line
586
Source File
plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/JavaPluginImages.java

        /*
         * Creates an image descriptor for the given path in a bundle. The path can contain variables
         * like $NL$.
         * If no image could be found, <code>useMissingImageDescriptor</code> decides if either
         * the 'missing image descriptor' is returned or <code>null</code>.
         * Added for 3.1.1.
         */
        public static ImageDescriptor createImageDescriptor(Bundle bundle, IPath path, boolean useMissingImageDescriptor) {
                URL url = FileLocator.find(bundle, path, null);
                if (url != null) {
                        return ImageDescriptor.createFromURL(url);
                }
                if (useMissingImageDescriptor) {
                        return ImageDescriptor.getMissingImageDescriptor();
                }
                return null;
        }


Clone AbstractionParameter Count: 1Parameter Bindings

 [[#variableb0da9ac0]]static ImageDescriptor createImageDescriptor(Bundle bundle, IPath path, boolean useMissingImageDescriptor) {
  URL url = FileLocator.find(bundle, path, null);
  if (url != null) {
    return ImageDescriptor.createFromURL(url);
  }
  if (useMissingImageDescriptor) {
    return ImageDescriptor.getMissingImageDescriptor();
  }
  return null;
}
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#b0da9ac0]]
/**
 * Creates an image descriptor for the given path in a bundle. The path can
 * contain variables like $NL$. If no image could be found,
 * <code>useMissingImageDescriptor</code> decides if either the 'missing
 * image descriptor' is returned or <code>null</code>.
 * 
 * @param bundle
 * @param path
 * @param useMissingImageDescriptor
 * @return an {@link ImageDescriptor}, or <code>null</code> iff there's
 *         no image at the given location and
 *         <code>useMissingImageDescriptor</code> is <code>true</code>
 */
private 
12[[#b0da9ac0]]
/*
 * Creates an image descriptor for the given path in a bundle. The path can contain variables
 * like $NL$.
 * If no image could be found, <code>useMissingImageDescriptor</code> decides if either
 * the 'missing image descriptor' is returned or <code>null</code>.
 * Added for 3.1.1.
 */
public