Obtain MAC instance.
@return Initialized MAC
@throws IOException If algorithm missed or invalid key
978407
private Mac mac() throws IOException {
        try {
            final Mac mac = Mac.getInstance(this.alg);
            mac.init(this.key);
            return mac;
        } catch (final NoSuchAlgorithmException | InvalidKeyException err) {
            throw new IOException(err);
        }
    }
208451
@SuppressWarnings("unchecked")
    public final V get(String key) {
        V value = mMemCache.get(key);
        if (mDiskCache != null && value == null) {
            Snapshot snapshot = null;
            InputStream in = null;
            try {
                snapshot = mDiskCache.get(key);
                if (snapshot != null) {
                    in = snapshot.getInputStream(INDEX_VALUE);
                    byte[] bytes = IOUtils.toByteArray(in);
                    value = mConverter.from(bytes);
                }
            } catch (IOException e) {
                System.out.println("Unable to get entry from disk cache. key: "
                        + key);
            } catch (Exception e) {
                System.out.println("Unable to get entry from disk cache. key: "
                        + key);
            } catch (OutOfMemoryError e) {
                System.out.println("Unable to get entry from disk cache. key: "
                    + key);
            } finally {
                IOUtils.closeQuietly(in);
                IOUtils.closeQuietly(snapshot);
            }
            if (value != null) {
                // write back to mem cache
                mMemCache.put(key, value);
            }
        }
        return value;
    }
837868
public byte[] getBytes() throws IOException {
        if(cachedData == null){
            if(getReader().available() > 0) {
                cachedData = getReader().read();
            }
            else{
                cachedData = new byte[0];
            }
        }
        return cachedData;
    }
221306
public Mac getMac(final @NotNull String alias) {
        try {
            final Key secretKey = keys.get(alias);

            Mac mac = Mac.getInstance(secretKey.getAlgorithm());
            mac.init(secretKey);

            return mac;
        } catch (NoSuchAlgorithmException | InvalidKeyException e) {
            throw new RuntimeException(e);
        }
    }
1061816
public static FileUtil getInstance() {

    if (instance == null) {
      synchronized (FileUtilImpl.class) {
        if (instance == null) {
          FileUtilImpl util = new FileUtilImpl();
          util.initialize();
          instance = util;
        }
      }
    }
    return instance;
  }
134769
public static final RecoveryProcessor getInstance() {

    if (tc.isEntryEnabled()) {
      SibTr.entry(tc, "getInstance");
    }

    if (_processor == null) {
      try {
        Class c = Class.forName("com.ibm.ws.sib.processor.impl.RecoveryProcessorImpl");
        _processor = (RecoveryProcessor) c.newInstance();
      }
      catch (Exception e) {
        e.printStackTrace();
        
      }
    }

    if (tc.isEntryEnabled()) {
      SibTr.exit(tc, "getMBean", _processor);
    }

    return _processor;
  }
899951
public static function getInstance() {
		if (is_null(self::$_instance)) {
			$id_cache = is_memcache_available() ? new Memcache() : new FileCache();
			self::$_instance = new self($id_cache);
		}
		return self::$_instance;
	}
669558
public Instance getInstance() {
    System.out.println("\nGet Instance");
    // [START bigtable_get_instance]
    Instance instance = null;
    try {
      instance = adminClient.getInstance(instanceId);
      System.out.println("Instance ID: " + instance.getId());
      System.out.println("Display Name: " + instance.getDisplayName());
      System.out.print("Labels: ");
      Map<String, String> labels = instance.getLabels();
      for (String key : labels.keySet()) {
        System.out.printf("%s - %s", key, labels.get(key));
      }
      System.out.println("\nState: " + instance.getState());
      System.out.println("Type: " + instance.getType());
    } catch (NotFoundException e) {
      System.err.println("Failed to get non-existent instance: " + e.getMessage());
    }
    // [END bigtable_get_instance]
    return instance;
  }
1111645
def get_mac(self):
        '''  '''
        ifreq = struct.pack('16sH14s', self.name, AF_UNIX, b'\x00'*14)
        res = fcntl.ioctl(sockfd, SIOCGIFHWADDR, ifreq)
        address = struct.unpack('16sH14s', res)[2]
        mac = struct.unpack('6B8x', address)

        return ":".join(['%02X' % i for i in mac])
591490
public Instance getInstance() {
        DescribeInstancesRequest req = new DescribeInstancesRequest();
        req.setInstanceIds(Collections.singleton(this.getInstanceId()));
        DescribeInstancesResult result = this.ec2Client.describeInstances(req);
        if (result.getReservations().size() != 1) {
            throw new IllegalStateException("Found multiple instances");
        }
        List<Instance> instances = result.getReservations().get(0).getInstances();
        if (instances.size() != 1) {
            throw new IllegalStateException("Found multiple instances");
        }
        return instances.get(0);
    }
1077765
@Override
  public I get()
  {
    I instance = _instance;
    
    if (instance == null || instance.isModified()) {
      _instance = instance = service().get();
    }
    
    return instance;
  }
366150
public synchronized static Mimetypes getInstance() {
        if (mimetypes != null) return mimetypes;

        mimetypes = new Mimetypes();
        InputStream is = mimetypes.getClass().getResourceAsStream("/mime.types");
        if (is != null) {
            if (log.isDebugEnabled()) {
                log.debug("Loading mime types from file in the classpath: mime.types");
            }
            try {
                mimetypes.loadAndReplaceMimetypes(is);
            } catch (IOException e) {
                if (log.isErrorEnabled()) {
                    log.error("Failed to load mime types from file in the classpath: mime.types", e);
                }
            } finally {
                try { is.close(); } catch (IOException ex) { log.debug("", ex); }
            }
        } else {
            if (log.isWarnEnabled()) {
                log.warn("Unable to find 'mime.types' file in classpath");
            }
        }
        return mimetypes;
    }
1126027
public static CommandProcessor getInstance() {
        if (null == instance) {
            synchronized (CommandProcessor.class) {
                if (null == instance) {
                    instance = new CommandProcessor();
                }
            }
        }
        return instance;
    }
24446
def instance():
        
        if not hasattr(IOLoop, "_instance"):
            with IOLoop._instance_lock:
                if not hasattr(IOLoop, "_instance"):
                    # New instance after double check
                    IOLoop._instance = IOLoop()
        return IOLoop._instance
51279
@SuppressWarnings("unchecked")
    public final V get() {
        InternalThreadLocalMap threadLocalMap = InternalThreadLocalMap.get();
        Object v = threadLocalMap.indexedVariable(index);
        if (v != InternalThreadLocalMap.UNSET) {
            return (V) v;
        }

        return initialize(threadLocalMap);
    }
297641
public Object getInstance(String name) throws SshException {
		if (supported.containsKey(name)) {
			try {
				return createInstance(name, (Class<?>) supported.get(name));
			} catch (Throwable t) {
				throw new SshException(t.getMessage(),
						SshException.INTERNAL_ERROR);
			}
		}
		throw new SshException(name + " is not supported",
				SshException.UNSUPPORTED_ALGORITHM);
	}
1344460
public Stream<LabelledInstance> instances() throws IOException {
        if (single()) {
            return Collections.singletonList(instance(new File(instance))).stream();
        }

        @SuppressWarnings("resource")
        Stream<String> s = Files.lines(Paths.get(instances), StandardCharsets.UTF_8);
        return s.map(x -> instance(new File(x)));
    }