CloneSet635


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
20260.978class_body_declaration
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
1201637
plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/JavaModelManager.java
2201662
plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/JavaModelManager.java
Clone Instance
1
Line Count
20
Source Line
1637
Source File
plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/JavaModelManager.java

        /**
         * Returns the name of the variables for which an CP variable initializer is registered through an extension point
         */
        public static String[] getRegisteredVariableNames() {

                Plugin jdtCorePlugin = JavaCore.getPlugin();
                if (jdtCorePlugin == null) return null;

                ArrayList variableList = new ArrayList(5);
                IExtensionPoint extension = Platform.getExtensionRegistry().getExtensionPoint(JavaCore.PLUGIN_ID, JavaModelManager.CPVARIABLE_INITIALIZER_EXTPOINT_ID);
                if (extension != null) {
                        IExtension[] extensions =  extension.getExtensions();
                        for (int i = 0; i < extensions.length; i++) {
                                IConfigurationElement [] configElements = extensions[i].getConfigurationElements();
                                for (int j = 0; j < configElements.length; j++) {
                                        String varAttribute = configElements[j].getAttribute("variable"); //$NON-NLS-1$
                                        if (varAttribute != null) variableList.add(varAttribute);
                                }
                        }
                }
                String[] variableNames = new String[variableList.size()];
                variableList.toArray(variableNames);
                return variableNames;
        }


Clone Instance
2
Line Count
20
Source Line
1662
Source File
plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/JavaModelManager.java

        /**
         * Returns the name of the container IDs for which an CP container initializer is registered through an extension point
         */
        public static String[] getRegisteredContainerIDs() {

                Plugin jdtCorePlugin = JavaCore.getPlugin();
                if (jdtCorePlugin == null) return null;

                ArrayList containerIDList = new ArrayList(5);
                IExtensionPoint extension = Platform.getExtensionRegistry().getExtensionPoint(JavaCore.PLUGIN_ID, JavaModelManager.CPCONTAINER_INITIALIZER_EXTPOINT_ID);
                if (extension != null) {
                        IExtension[] extensions =  extension.getExtensions();
                        for (int i = 0; i < extensions.length; i++) {
                                IConfigurationElement [] configElements = extensions[i].getConfigurationElements();
                                for (int j = 0; j < configElements.length; j++) {
                                        String idAttribute = configElements[j].getAttribute("id"); //$NON-NLS-1$
                                        if (idAttribute != null) containerIDList.add(idAttribute);
                                }
                        }
                }
                String[] containerIDs = new String[containerIDList.size()];
                containerIDList.toArray(containerIDs);
                return containerIDs;
        }


Clone AbstractionParameter Count: 6Parameter Bindings

/**
         * Returns the name of the variables for which an CP variable initializer is registered through an extension point
         */
/**
         * Returns the name of the container IDs for which an CP container initializer is registered through an extension point
         */
public static String[]  [[#variableb25b7e60]]() {
  Plugin jdtCorePlugin = JavaCore.getPlugin();
  if (jdtCorePlugin == null)
    return null;
  ArrayList  [[#variableb25b7dc0]]= new ArrayList(5);
  IExtensionPoint extension = Platform.getExtensionRegistry().getExtensionPoint(JavaCore.PLUGIN_ID, JavaModelManager. [[#variableb25b6240]]);
  if (extension != null) {
    IExtension[] extensions = extension.getExtensions();
    for (int i = 0; i < extensions.length; i++) {
      IConfigurationElement[] configElements = extensions[i].getConfigurationElements();
      for (int j = 0; j < configElements.length; j++) {
        String  [[#variableb25b61e0]]= configElements[j].getAttribute( [[#variableb25b6340]]); //$NON-NLS-1$
        if ( [[#variableb25b61e0]]!= null)
           [[#variableb25b7dc0]].add( [[#variableb25b61e0]]);
      }
    }
  }
  String[]  [[#variableb25b7e00]]= new String[ [[#variableb25b7dc0]].size()];
   [[#variableb25b7dc0]].toArray( [[#variableb25b7e00]]);
  return [[#variableb25b7e00]];
}
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#b25b7e60]]
getRegisteredVariableNames 
12[[#b25b7e60]]
getRegisteredContainerIDs 
21[[#b25b7dc0]]
variableList 
22[[#b25b7dc0]]
containerIDList 
31[[#b25b6240]]
CPVARIABLE_INITIALIZER_EXTPOINT_ID 
32[[#b25b6240]]
CPCONTAINER_INITIALIZER_EXTPOINT_ID 
41[[#b25b61e0]]
varAttribute 
42[[#b25b61e0]]
idAttribute 
51[[#b25b6340]]
"variable" 
52[[#b25b6340]]
"id" 
61[[#b25b7e00]]
variableNames 
62[[#b25b7e00]]
containerIDs