CloneSet791


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
31201.000class_body_declarations[2]
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
131131
plugins/org.eclipse.jdt.debug/jdi/org/eclipse/jdi/internal/jdwp/JdwpReplyPacket.java
231130
plugins/org.eclipse.jdt.debug/jdi/org/eclipse/jdi/internal/spy/JdwpReplyPacket.java
Clone Instance
1
Line Count
31
Source Line
131
Source File
plugins/org.eclipse.jdt.debug/jdi/org/eclipse/jdi/internal/jdwp/JdwpReplyPacket.java

        /**
         * Retrieves constant mappings.
         */
        public static void getConstantMaps() {
                if (fErrorMap != null) {
                        return;
                }

                Field[] fields = JdwpReplyPacket.class .getDeclaredFields();
                fErrorMap = new HashMap(fields.length);
                for (int i = 0; i < fields.length; i++) {
                        Field field = fields[i];
                        if ((field.getModifiers()&  Modifier.PUBLIC) == 0 || (field.getModifiers()&  Modifier.STATIC) == 0 || (field.getModifiers()&  Modifier.FINAL) == 0)
                                continue ;

                        try {
                                Integer intValue = new Integer(field.getInt(null));
                                fErrorMap.put(intValue, field.getName());
                        } catch (IllegalAccessException e) {
                                // Will not occur for own class.
                          }
                          catch (IllegalArgumentException e) {
                                // Should not occur.
                                // We should take care that all public static final constants
                                // in this class are numbers that are convertible to int.
                          }
                }
        }

        /**
         * @return Returns a map with string representations of error codes.
         */
        public static Map errorMap() {
                getConstantMaps();
                return fErrorMap;
        }


Clone Instance
2
Line Count
31
Source Line
130
Source File
plugins/org.eclipse.jdt.debug/jdi/org/eclipse/jdi/internal/spy/JdwpReplyPacket.java

        /**
         * Retrieves constant mappings.
         */
        public static void getConstantMaps() {
                if (fErrorMap != null) {
                        return;
                }

                Field[] fields = JdwpReplyPacket.class .getDeclaredFields();
                fErrorMap = new HashMap(fields.length);
                for (int i = 0; i < fields.length; i++) {
                        Field field = fields[i];
                        if ((field.getModifiers()&  Modifier.PUBLIC) == 0 || (field.getModifiers()&  Modifier.STATIC) == 0 || (field.getModifiers()&  Modifier.FINAL) == 0)
                                continue ;

                        try {
                                Integer intValue = new Integer(field.getInt(null));
                                fErrorMap.put(intValue, field.getName());
                        } catch (IllegalAccessException e) {
                                // Will not occur for own class.
                          }
                          catch (IllegalArgumentException e) {
                                // Should not occur.
                                // We should take care that all public static final constants
                                // in this class are numbers that are convertible to int.
                          }
                }
        }

        /**
         * @return Returns a map with string representations of error codes.
         */
        public static Map errorMap() {
                getConstantMaps();
                return fErrorMap;
        }


Clone AbstractionParameter Count: 0Parameter Bindings

/**
         * Retrieves constant mappings.
         */
public static void getConstantMaps() {
  if (fErrorMap != null) {
    return;
  }
  Field[] fields = JdwpReplyPacket.class .getDeclaredFields();
  fErrorMap = new HashMap(fields.length);
  for (int i = 0; i < fields.length; i++) {
    Field field = fields[i];
    if ((field.getModifiers()&Modifier.PUBLIC) == 0 || (field.getModifiers()&Modifier.STATIC) == 0 || (field.getModifiers()&Modifier.FINAL) == 0)
      continue ;
    try {
      Integer intValue = new Integer(field.getInt(null));
      fErrorMap.put(intValue, field.getName());
    }
    catch (IllegalAccessException e) {
    // Will not occur for own class.
    }
    catch (IllegalArgumentException e) {
    // Should not occur.
    // We should take care that all public static final constants
    // in this class are numbers that are convertible to int.
    }
  }
}

/**
         * @return Returns a map with string representations of error codes.
         */
public static Map errorMap() {
  getConstantMaps();
  return fErrorMap;
}
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
None