Using Snackbar.make returns async so we have to 
        initialize it later.
421432
def on_widget_created(self, ref):
        
        d = self.declaration
        self.widget = Snackbar(__id__=ref)
        self.init_widget()
830002
@Override
  public final void onDismissed(Snackbar snackbar, int dismissEvent) {
    super.onDismissed(snackbar, dismissEvent);

    notifySnackbarCallback(snackbar, dismissEvent);
  }
927680
@Override public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_tv_shows_sample);
    ButterKnife.inject(this);
    initializeDraggableView();
    initializeGridView();
    hookListeners();
  }
260227
public void awaitStartupCompletion() {
        try {
            Object obj = startedStatusQueue.take();
            if(obj instanceof Throwable)
                throw new VoldemortException((Throwable) obj);
        } catch(InterruptedException e) {
            // this is okay, if we are interrupted we can stop waiting
        }
    }
525185
function async() {
    var args = Array.prototype.slice.call(arguments);
    return setTimeout.apply(null, [args[0], 0].concat(args.slice(1)));
  }
356682
protected static void lazyInit() {
        // noinspection DoubleCheckedLocking
        if (instance == null) {
            try {
                STARTUP_LOCK.lockInterruptibly();
                try {
                    if (instance == null) {
                        instance = new ProviderUtil();
                    }
                } finally {
                    STARTUP_LOCK.unlock();
                }
            } catch (final InterruptedException e) {
                LOGGER.fatal("Interrupted before Log4j Providers could be loaded.", e);
                Thread.currentThread().interrupt();
            }
        }
    }
120825
function init(ctx) {
        _.each(resources, function (resource) {
            _.each(resource.tasks, function (taskInfo, taskName) {
                taskInfo.name = taskName;
                taskInfo.service = pancakes.getService(resource.name);
                taskHandlers[taskName] = taskInfo;
            });
        });

        return new Q(ctx);
    }
1119036
function init(options){

    return Promise.resolve()
      .then(function() {

        if(!_.get(parameters,'process.source')){
          return;
        }

        return Promise.resolve()
          .then(function() {
            return updateAllKeys(options);
          })
          .then(function() {
            return createMissingFolders(options);
          })
          .then(function() {
            return deleteUnused(options);
          })
          .then(function() {
            return deleteEmptyFolders(options);
          });

      })
      .then(function() {

        if(!_.get(parameters,'process.search')){
          return;
        }

        return require('./search')(util,options);

      })
      .then(function() {
        util.log('Sync is complete');
      });

  }
744073
private void init() {
        assertUnlocked();
        
        lock.lock();
        try {
            httpSender.init(cfg);

            LOG.info(
                "Starting with "
                    + DEFAULT_REQ_PROC_COUNT + " request processors");

            procThreads = new RequestProcessor[DEFAULT_REQ_PROC_COUNT];

            for (int i = 0; i < procThreads.length; i++) {
                procThreads[i] = new RequestProcessor(i);
                procThreads[i].start();
            }

        } finally {
            lock.unlock();
        }
    }
255462
@Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_changelog);

        mAppbar = ButterKnife.findById(this, R.id.appbar);
        mContainer = ButterKnife.findById(this, R.id.container);

        configAppBar();
        parseExtras(savedInstanceState);
    }
1335177
private T getOrCreate() throws E {
    try {
      T client = elements.poll();
      // a client was available, all good. otherwise, create one
      if (client != null) {
        return client;
      }
      return create();
    } catch (Exception e) {
      // if an exception is thrown after acquiring the semaphore, release the
      // semaphore before propagating the exception
      semaphore.release();
      throw e;
    }
  }
1097256
private void initializeViews() {
        buttonContainer = (LinearLayout) findViewById(R.id.button_container);

        selectButton = (Button) findViewById(R.id.select_button);
        selectButton.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                if (requestCode == Request.DIRECTORY) {
                    if (currentFile.isDirectory()) {
                        curDirectory = currentFile;
                        data = new Intent();
                        data.putExtra(FILE_EXTRA_DATA_PATH, currentFile.getAbsolutePath());
                        setResult(RESULT_OK, data);
                        finish();
                    } else {
                        Snackbar.make(getWindow().getDecorView(), R.string.file_picker_snackbar_select_directory_message, Snackbar.LENGTH_SHORT).show();
                    }
                } else { //request code is for a file
                    if (currentFile.isDirectory()) {
                        curDirectory = currentFile;
                        new UpdateFilesTask(FilePicker.this).execute(curDirectory);
                    } else {
                        if (!TextUtils.isEmpty(mimeType)) {
                            MimeTypeMap mimeTypeMap = MimeTypeMap.getSingleton();
                            String requiredExtension = "." + mimeTypeMap.getExtensionFromMimeType(mimeType);
                            if (requiredExtension.equalsIgnoreCase(fileExt(currentFile.toString()))) {
                                data = new Intent();
                                data.putExtra(FILE_EXTRA_DATA_PATH, currentFile.getAbsolutePath());
                                setResult(RESULT_OK, data);
                                finish();
                            } else {
                                Snackbar.make(getWindow().getDecorView(), String.format(getString(R.string.file_picker_snackbar_select_file_ext_message), requiredExtension), Snackbar.LENGTH_SHORT).show();
                            }
                        } else {
                            data = new Intent();
                            data.putExtra(FILE_EXTRA_DATA_PATH, currentFile.getAbsolutePath());
                            setResult(RESULT_OK, data);
                            finish();
                        }
                    }
                }
            }
        });

        openButton = (Button) findViewById(R.id.open_button);
        openButton.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                if (currentFile.isDirectory()) {
                    curDirectory = currentFile;
                    toolbar.setTitle(curDirectory.getName());
                    new UpdateFilesTask(FilePicker.this).execute(curDirectory);
                } else {
                    Intent newIntent = new Intent(Intent.ACTION_VIEW);
                    String file = currentFile.toString();
                    if (file != null) {
                        newIntent.setDataAndType(Uri.fromFile(currentFile), mimeType);
                        newIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
                        try {
                            startActivity(newIntent);
                        } catch (ActivityNotFoundException e) {
                            Snackbar.make(getWindow().getDecorView(), R.string.file_picker_snackbar_no_file_type_handler, Snackbar.LENGTH_SHORT).show();
                        }
                    } else {
                        Snackbar.make(getWindow().getDecorView(), R.string.file_picker_snackbar_no_read_type, Snackbar.LENGTH_SHORT).show();
                    }

                }
            }
        });

        buttonContainer.setVisibility(View.INVISIBLE);
    }
361057
public void initNavDrawer(Toolbar appBar) {
		if (getActivityIf().isNavDrawerEnabled()) {
			navDrawer = getActivityIf().createNavDrawer(activity, appBar);
			navDrawer.init();
		}
	}
904309
def _thread_init(cls):
    """"""
    if not hasattr(cls._local, '_in_order_futures'):
      cls._local._in_order_futures = set()
      cls._local._activated = False
277033
private void waitForInitialization(long timeout) {
        LOGGER.entering();
        long time = 0;
        while (!getLauncher().isInitialized() && (time < timeout)) {
            try {
                // SeLion Grid could still be downloading dependencies.. Wait for it.
                Thread.sleep(1000);
                time += 1000;
            } catch (InterruptedException e) {
                throw new IllegalStateException(e.getMessage(), e);
            }
        }

        if (time == timeout) {
            throw new IllegalStateException(String.format("Timed out waiting for %s to initialize.",
                    getLocalServerComponent().getClass().getSimpleName()));
        }
        LOGGER.exiting();
    }
1374043
private void lazyInitWriting() {
        if (!writeInitialized) {
            this.writeInitialized = true;
            this.bulkProcessor = new BulkProcessor(client, resources.getResourceWrite(), settings);
            this.trivialBytesRef = new BytesRef();
            this.bulkEntryWriter = new BulkEntryWriter(settings, BulkCommands.create(settings, metaExtractor, client.clusterInfo.getMajorVersion()));
        }
    }
469664
@SuppressWarnings("WeakerAccess")
  public SnackbarBuilder showCallback(final SnackbarShowCallback callback) {
    callbacks.add(new SnackbarCallback() {
      public void onSnackbarShown(Snackbar snackbar) {
        callback.onSnackbarShown(snackbar);
      }
    });
    return this;
  }