gets the set of registers used for parameters

@param obj
the context object for the method to find the parameter registers of

@return the set of registers that parameters are using
176313
public static int[] getParameterRegisters(Method obj) {
        Type[] argTypes = obj.getArgumentTypes();
        int[] regs = new int[argTypes.length];

        int curReg = obj.isStatic() ? 0 : 1;
        for (int t = 0; t < argTypes.length; t++) {
            String sig = argTypes[t].getSignature();
            regs[t] = curReg;
            curReg += SignatureUtils.getSignatureSize(sig);
        }
        return regs;
    }
1069084
public static List<Container> getRegisteredContainers() {
        CONTAINERS_LOCK.lock();
        try {
            return ImmutableList.copyOf(CONTAINERS.values());
        } finally {
            CONTAINERS_LOCK.unlock();
        }
    }
213134
static int getRegisteredID (Connection connection, Object object) {
		ObjectSpace[] instances = ObjectSpace.instances;
		for (int i = 0, n = instances.length; i < n; i++) {
			ObjectSpace objectSpace = instances[i];
			// Check if the connection is in this ObjectSpace.
			Connection[] connections = objectSpace.connections;
			for (int j = 0; j < connections.length; j++) {
				if (connections[j] != connection) continue;
				// Find an ID with the object.
				int id = objectSpace.objectToID.get(object, Integer.MAX_VALUE);
				if (id != Integer.MAX_VALUE) return id;
			}
		}
		return Integer.MAX_VALUE;
	}
31620
@Override
    public void visitMethod(Method obj) {
        suspectLocals.clear();
        int[] parmRegs = RegisterUtils.getParameterRegisters(obj);
        for (int pr : parmRegs) {
            suspectLocals.put(Integer.valueOf(pr), new RegisterInfo(RegisterUtils.getLocalVariableEndRange(obj.getLocalVariableTable(), pr, 0)));
        }
    }
421136
public static byte[] intToRegisters(int v) {
        byte[] registers = new byte[4];
        registers[0] = (byte)(0xff & (v >> 24));
        registers[1] = (byte)(0xff & (v >> 16));
        registers[2] = (byte)(0xff & (v >> 8));
        registers[3] = (byte)(0xff & v);
        return registers;
    }
849120
public String getNameByReflection(Object obj)
    {
        Object name = null;
        try {
            java.lang.reflect.Method method = obj.getClass().getMethod("getName");
            
            if (method != null)
                name = method.invoke(obj);
        } catch (Exception e) {
            e.printStackTrace();
        }
        if (name == null)
            return null;
        else
            return name.toString();
    }
1352923
static Object getRegisteredObject (Connection connection, int objectID) {
		ObjectSpace[] instances = ObjectSpace.instances;
		for (int i = 0, n = instances.length; i < n; i++) {
			ObjectSpace objectSpace = instances[i];
			// Check if the connection is in this ObjectSpace.
			Connection[] connections = objectSpace.connections;
			for (int j = 0; j < connections.length; j++) {
				if (connections[j] != connection) continue;
				// Find an object with the objectID.
				Object object = objectSpace.idToObject.get(objectID);
				if (object != null) return object;
			}
		}
		return null;
	}
1245643
private Object[] getObjectIdsImpl(Context cx, Object object) {
        if (!(object instanceof Scriptable) || object == Undefined.instance) {
            return Context.emptyArgs;
        }

        Object[] ids;
        Scriptable scriptable = (Scriptable)object;
        if (scriptable instanceof DebuggableObject) {
            ids = ((DebuggableObject)scriptable).getAllIds();
        } else {
            ids = scriptable.getIds();
        }

        Scriptable proto = scriptable.getPrototype();
        Scriptable parent = scriptable.getParentScope();
        int extra = 0;
        if (proto != null) {
            ++extra;
        }
        if (parent != null) {
            ++extra;
        }
        if (extra != 0) {
            Object[] tmp = new Object[extra + ids.length];
            System.arraycopy(ids, 0, tmp, extra, ids.length);
            ids = tmp;
            extra = 0;
            if (proto != null) {
                ids[extra++] = "__proto__";
            }
            if (parent != null) {
                ids[extra++] = "__parent__";
            }
        }

        return ids;
    }
103413
public static int getArrayLength( Object obj )
  {
    if( obj == null )
    {
      return 0;
    }

    IType type = TypeLoaderAccess.instance().getIntrinsicTypeFromObject( obj );
    if( type.isArray() )
    {
      return type.getArrayLength( obj );
    }

    if( obj instanceof CharSequence )
    {
      return ((CharSequence)obj).length();
    }

    if( obj instanceof Collection )
    {
      return ((Collection)obj).size();
    }

    if( obj instanceof Iterable )
    {
      int iCount = 0;
      //noinspection UnusedDeclaration
      for( Object o : (Iterable)obj )
      {
        iCount++;
      }
      return iCount;
    }

    return 0;
  }
734923
public static ASN1Sequence getInstance(
        Object  obj)
    {
        if (obj == null || obj instanceof ASN1Sequence)
        {
            return (ASN1Sequence)obj;
        }

        throw new IllegalArgumentException("unknown object in getInstance");
    }
501682
protected Integer findOrder(Object obj) {
		// Check for regular Ordered interface
		Integer order = super.findOrder(obj);
		if (order != null) {
			return order;
		}

		// Check for @Order annotation on various kinds of elements
		if (obj instanceof Class) {
			return OrderUtils.getOrder((Class) obj);
		}
		else if (obj instanceof Method) {
			Order ann = AnnotationUtils.findAnnotation((Method) obj, Order.class);
			if (ann != null) {
				return ann.value();
			}
		}
		else if (obj instanceof AnnotatedElement) {
			Order ann = AnnotationUtils.getAnnotation((AnnotatedElement) obj, Order.class);
			if (ann != null) {
				return ann.value();
			}
		}
		else if (obj != null) {
			return OrderUtils.getOrder(obj.getClass());
		}

		return null;
	}
965626
@Override
    public void visitCode(Code obj) {
        try {
            possibleParmRegs.clear();
            Method m = getMethod();
            String methodSignature = m.getSignature();
            String retSignature = SignatureUtils.getReturnSignature(methodSignature);
            JavaClass returnClass = null;
            int[] parmRegs = null;

            if (retSignature.startsWith(Values.SIG_QUALIFIED_CLASS_PREFIX) && !knownImmutables.contains(retSignature)) {
                List<String> parmTypes = SignatureUtils.getParameterSignatures(methodSignature);
                for (int p = 0; p < parmTypes.size(); p++) {
                    String parmSignature = parmTypes.get(p);
                    if (parmSignature.startsWith(Values.SIG_QUALIFIED_CLASS_PREFIX) && !knownImmutables.contains(parmSignature)) {
                        if (returnClass == null) {
                            returnClass = Repository.lookupClass(SignatureUtils.trimSignature(retSignature));
                            parmRegs = RegisterUtils.getParameterRegisters(m);
                        }

                        if (parmRegs != null) {
                            JavaClass parmClass = Repository.lookupClass(SignatureUtils.stripSignature(parmSignature));
                            if (parmClass.instanceOf(returnClass)) {
                                possibleParmRegs.put(Integer.valueOf(parmRegs[p]), new ParmUsage());
                            }
                        }
                    }
                }

                if (!possibleParmRegs.isEmpty()) {
                    try {
                        stack.resetForMethodEntry(this);
                        super.visitCode(obj);
                        for (ParmUsage pu : possibleParmRegs.values()) {
                            if ((pu.returnPC >= 0) && (pu.alteredPC >= 0) && (pu.returnPC > pu.alteredPC)) {
                                bugReporter.reportBug(new BugInstance(this, BugType.CFS_CONFUSING_FUNCTION_SEMANTICS.name(), NORMAL_PRIORITY).addClass(this)
                                        .addMethod(this).addSourceLine(this, pu.returnPC).addSourceLine(this, pu.alteredPC));
                            }
                        }
                    } catch (StopOpcodeParsingException e) {
                        // no parm regs left
                    }
                }
            }
        } catch (ClassNotFoundException cnfe) {
            bugReporter.reportMissingClass(cnfe);
        }
    }
590107
public static Stream<Map.Entry<Method, Object>> getters(Object obj) {
		return getters(obj, Predicates.alwaysTrue());
	}
505225
public List<Variable> getUsedVariables() {
        ArrayList<Variable> vars = new ArrayList<Variable>();

        for (Operand o : getOperands()) {
            o.addUsedVariables(vars);
        }

        return vars;
    }
542155
def get_pixel_register_objects(self, do_sort=None, reverse=False, **kwargs):
        
        # speed up of the most often used keyword name
        try:
            names = iterable(kwargs.pop('name'))
        except KeyError:
            register_objects = []
        else:
            register_objects = [self.pixel_registers[reg] for reg in names]
        for keyword in kwargs.iterkeys():
            allowed_values = iterable(kwargs[keyword])
            register_objects.extend(filter(lambda pixel_register: pixel_register[keyword] in allowed_values, self.pixel_registers.itervalues()))
        if not register_objects and filter(None, kwargs.itervalues()):
            raise ValueError('Pixel register objects empty')
        if do_sort:
            return sorted(register_objects, key=itemgetter(*do_sort), reverse=reverse)
        else:
            return register_objects
1094080
public java.util.List<ParameterObject> getParameterObjects() {
        if (parameterObjects == null) {
            parameterObjects = new com.amazonaws.internal.SdkInternalList<ParameterObject>();
        }
        return parameterObjects;
    }
987564
public static ASN1Set getInstance(
        Object  obj)
    {
        if (obj == null || obj instanceof ASN1Set)
        {
            return (ASN1Set)obj;
        }

        throw new IllegalArgumentException("unknown object in getInstance");
    }