/* (non-Javadoc)
@see org.apache.commons.logging.LogFactory#getInstance(java.lang.String)
501141
public Log getInstance(String name) throws LogConfigurationException
    {
        String match="";
        for (int i=prefixes.size();name!=null && i-->0;)
        {
            String prefix=(String)prefixes.get(i);
            if (name.startsWith(prefix) && prefix.length()>match.length())
                match=prefix;
        }
        if (match.length()>0)
            name=match+".*";
        
        // Get value
        Object o = attributes.get(name);
        
        // Dereference string attributes
        while(o!=null && o instanceof String)
            o=attributes.get(o);
        
        // return actual log.
        if (o instanceof Log)
            return (Log)o;
        return log;
    }
160405
def getInstance(cls, *args):
        '''
        
        '''
        if not cls.__singleton:
            cls.__singleton = DriverManager(*args)
        return cls.__singleton
1225654
@Override
	public Object getInstance() {
		final String sourceMethod = "getInstance"; //$NON-NLS-1$
		boolean isTraceLogging = log.isLoggable(Level.FINER);
		if (isTraceLogging) {
			log.entering(AggregatorExtension.class.getName(), sourceMethod);
			log.exiting(AggregatorExtension.class.getName(), sourceMethod, instance);
		}
		return instance;
	}
1367284
@Override
    public Object getObjectInstance(Object o, Name n, Context c, Hashtable<?, ?> envmt) throws Exception {
        @SuppressWarnings("unchecked")
        Hashtable<String, Object> env = (Hashtable<String, Object>) envmt;
        return (o instanceof Reference) ? resolve((Reference) o, env) : null;
    }
521750
public static SystemUtil getInstance() {

    if (instance == null) {
      synchronized (SystemUtilImpl.class) {
        if (instance == null) {
          instance = new SystemUtilImpl();
        }
      }
    }
    return instance;
  }
989079
String getInstanceName(String clsName) {
		return clsName.substring(0, 1).toLowerCase(Locale.ENGLISH) + clsName.substring(1);
	}
200589
public static StringUtil getInstance() {

    if (instance == null) {
      synchronized (StringUtilImpl.class) {
        if (instance == null) {
          instance = new StringUtilImpl();
        }
      }
    }
    return instance;
  }
679642
public static DateFormat getInstance() {
        if (instance == null) {
            synchronized (instanceLock) {
                if (instance == null) {
                    instance = new ResqueDateFormatThreadLocal();
                }
            }
        }
        return instance.get();
    }
1056071
static BlockCanaryInternals getInstance() {
        if (sInstance == null) {
            synchronized (BlockCanaryInternals.class) {
                if (sInstance == null) {
                    sInstance = new BlockCanaryInternals();
                }
            }
        }
        return sInstance;
    }
974209
@SneakyThrows
    public BaseHttpServletRequestXMLMessageDecoder getInstance(final HttpMethod method) {
        val decoder = get(method);
        return (BaseHttpServletRequestXMLMessageDecoder) BeanUtils.cloneBean(decoder);
    }
747765
protected Instance getInstance(int index) {
        return heap.getInstanceByID(dumpBuffer.getID(offset + ((long)index * (long)idSize)));
    }
458068
public java.lang.String getInstanceTag() {
    java.lang.Object ref = instanceTag_;
    if (ref instanceof java.lang.String) {
      return (java.lang.String) ref;
    } else {
      com.google.protobuf.ByteString bs = 
          (com.google.protobuf.ByteString) ref;
      java.lang.String s = bs.toStringUtf8();
      instanceTag_ = s;
      return s;
    }
  }
23601
public static final SyslogIF getInstance(String protocol) throws SyslogRuntimeException {
        String _protocol = protocol.toLowerCase();

        if (instances.containsKey(_protocol)) {
            return (SyslogIF) instances.get(_protocol);

        } else {
            StringBuffer message = new StringBuffer("Syslog protocol \"" + protocol + "\" not defined; call Syslogger.createSyslogInstance(protocol,config) first");

            if (instances.size() > 0) {
                message.append(" or use one of the following instances: ");

                Iterator i = instances.keySet().iterator();
                while (i.hasNext()) {
                    String k = (String) i.next();

                    message.append(k);
                    if (i.hasNext()) {
                        message.append(' ');
                    }
                }
            }

            throwRuntimeException(message.toString());
            return null;
        }
    }
790773
def getInstance(cls, *args):
        '''
        
        '''
        if not cls.__singleton:
            cls.__singleton = Openshift(*args)
        return cls.__singleton
1060954
@SuppressWarnings("unchecked")
	public static <T> T getInstance(String beanName) {
		return (T) getInstanceProvider().getInstance(beanName);
	}
840983
public static <T> T getInstance(Class<T> beanClass, String beanName) {
		return (T) getInstanceProvider().getInstance(beanClass, beanName);
	}
919033
@Override
    public Set<Object> getInstances() {
        Set<Object> set = new HashSet<>();
        ClassLoader cl = Thread.currentThread().getContextClassLoader();

        Consumer<JsonArray> reader = array -> {
            if (array != null && array.size() > 0) {
                for (int i = 0; i < array.size(); i++) {
                    try {
                        Class<?> clazz = cl.loadClass(array.getString(i));
                        set.add(clazz.newInstance());
                    } catch (ClassNotFoundException | InstantiationException | IllegalAccessException e) {
                        throw new RuntimeException(e);
                    }
                }
            }
        };

        JsonArray binders = config.getJsonArray(CONFIG_BINDERS, null);
        JsonArray instances = config.getJsonArray(CONFIG_INSTANCES, null);

        reader.accept(binders);
        reader.accept(instances);

        return set;
    }