Gets the build if still in memory.
@return the actual build, or null if it has been collected
@see Holder#get
172587
public @CheckForNull R get() {
        Holder<R> h = holder; // capture
        return h!=null ? h.get() : null;
    }
1212413
public IoSession getSession() {
        synchronized (lock) {
            if (sessions.isEmpty()) {
                return null;
            } else {
                final Object[] keys = sessions.keySet().toArray();
                for (int i = 0; i < sessions.size(); i++) { //
                    counter++;
                    final int pos = Math.abs(counter % sessions.size());
                    final IoSession session = sessions.get(keys[pos]);
                    if (isAvailable(session)) {
                        return session;
                    }
                }
                return null;
            }
        }
    }
435662
public final T build() {
        T dialog = buildDialog();
        if(!extraWindowHints.isEmpty()) {
            Set<Window.Hint> combinedHints = new HashSet<Window.Hint>(dialog.getHints());
            combinedHints.addAll(extraWindowHints);
            dialog.setHints(combinedHints);
        }
        return dialog;
    }
1330213
@Override
	public E get() {
		if (originalElements.isEmpty()) {
			return null;
		}
		if (!priorityElements.isEmpty()) {
			return priorityElements.remove(0);
		}
		if (currentElements.size() <= originalElements.size()) {
			currentElements.addAll(originalElements);
		}
		int index = random.getInt(currentElements.size() - 1);
		return currentElements.remove(index);
	}
145832
public RunT getBuild(String id) {
        for (RunT r : _getRuns().values()) {
            if (r.getId().equals(id))
                return r;
        }
        return null;
    }
1044085
public T get() throws E {
		// use a temporary variable to reduce the number of reads of the volatile field
		// see commons-lang3
		T result = object;
		if (object == null) {
			synchronized (this) {
				result = object;
				if (object == null) {
					object = result = initializer.get();
				}
			}
		}
		return result;
	}
465684
public Object get()
    {
        Object data = null;
        if (this.getMessage() != null)
            data = this.getMessage().getNative(this.getFullKey(null));
        try {
            data = DataConverters.convertObjectToDatatype(data, this.getRawClassType(), this.getDefault());
        } catch (Exception ex) {
            data = null;
        }
        return data;
    }
764779
@Override
	public T get() {
		try {
			return clazz.getConstructor(CharStream.class).newInstance(new Object[] { null });
		}
		catch (Exception e) {
			throw new RuntimeException(e);
		}
	}
688928
public Query build() {
            Query.Builder root = this;
            while (true) {
                if (root.parent == null) {
                    break;
                }
                root = root.parent;
            }

            root.done();
            return root.tree;
        }
1183309
public final R getSomeBuildWithWorkspace() {
        int cnt=0;
        for (R b = getLastBuild(); cnt<5 && b!=null; b=b.getPreviousBuild()) {
            FilePath ws = b.getWorkspace();
            if (ws!=null)   return b;
        }
        return null;
    }
401213
public final T build() {
    getParser().parseImpl(this);
    // There was a gap in the parameters if either:
    // 1) the mask had a gap, e.g. ..00110111
    // 2) there were more than 32 parameters and the mask wasn't full.
    // Gaps above the 32nd parameter are not detected.
    if ((pmask & (pmask + 1)) != 0 || (maxIndex > 31 && pmask != -1)) {
      int firstMissing = Integer.numberOfTrailingZeros(~pmask);
      throw ParseException.generic(
          String.format("unreferenced arguments [first missing index=%d]", firstMissing),
          getMessage());
    }
    return buildImpl();
  }
550905
public T get() {
        T object;

        while (true) {
            // 1. get the next free object
            int p = m_put.get();
            int g = m_get.get();
            if (g >= p) {
                // get index hits the put index, implying empty pool
                if (p >= LIMIT) {
                    // put pointer wrapped around. rewind both indexes.
                    m_get.set(0);
                    m_put.set(0);
                }
                return null;
            }

            // 2. conquer this cell by incrementing the get index
            if (!m_get.compareAndSet(g, g + 1)) {
                // some other thread got here first. try again.
                continue;
            }

            // 3. retrieve the object at the get index
            int index = g % m_arraySize;
            AtomicReference<T> reference = m_array[index];
            object = reference.get();
            if (object == null) {
                // getting here is rare. it happens when:
                // 1. put() is called on an empty pool (p==g)
                // 2. put() increments the put pointer (p==g+1)
                // 3. get() is called and finds g < p
                // 4. get() takes the object at g (which is null)
                // 5. put() puts the object at g
                continue;
            }

            // 4. change the reference to null so no other get() takes the
            // same element, and no other put() replaces it with another.
            if (reference.compareAndSet(object, null)) {
                return object;
            }

            // getting here is rare. the object that was supposedly conquered
            // locally was either replaced by a different object or replaced
            // with null, in the same cell.
        }
    }
1357962
public synchronized Object get() {
        Object o = null;

        while ((o = tryGet()) == null) {
            try {
                this.wait();
            } catch (final InterruptedException e) {
            }
        }
        return o;
    }
366128
public synchronized BuildDiscarder getBuildDiscarder() {
        BuildDiscarderProperty prop = _getProperty(BuildDiscarderProperty.class);
        return prop != null ? prop.getStrategy() : /* settings compatibility */ logRotator;
    }
219764
@Nullable
    public final String getDefProject() {
        if (getProject() == null) {
            if (parent == null) {
                return null;
            }
            return parent.getProject();
        }
        return getProject();
    }
961956
@Override
    protected BuildHistory createBuildHistory() {
        AbstractBuild<?, ?> lastFinishedBuild = getLastFinishedBuild();
        if (lastFinishedBuild == null) {
            return new NullBuildHistory();
        }
        else {
            return createHistory(lastFinishedBuild);
        }
    }
446057
public String build() {
        String fieldsString = this.fields == null ? null : Helpers.quote(this.fields);
        String sortString = this.sort == null ? null : quoteSort(this.sort);
        String limitString = this.limit == null ? null : Helpers.quote(this.limit);
        String skipString = this.skip == null ? null : Helpers.quote(this.skip);
        String bookmarkString = this.bookmark == null ? null : Helpers.quote(this.bookmark);
        String useIndexString = this.useIndex == null ? null : Helpers.quote(this.useIndex);
        StringBuilder builder = new StringBuilder();
        // build up components...
        // selector
        builder.append(Helpers.withKey(Helpers.SELECTOR, this.selector));
        // fields
        if (fieldsString != null) {
            builder.append(String.format(", \"fields\": %s", fieldsString));
        }
        // sort
        if (sortString != null) {
            builder.append(String.format(", \"sort\": %s", sortString));
        }
        // limit
        if (limitString != null) {
            builder.append(String.format(", \"limit\": %s", limitString));
        }
        // skip
        if (skipString != null) {
            builder.append(String.format(", \"skip\": %s", skipString));
        }
        if (bookmarkString != null) {
            builder.append(String.format(", \"bookmark\": %s", bookmarkString));
        }
        if (!this.update) {
            builder.append(", \"update\": false");
        }
        if (this.stable) {
            builder.append(", \"stable\": true");
        }
        // execution_stats
        if (this.executionStats) {
            builder.append(", \"execution_stats\": true");
        }
        if (useIndexString != null) {
            builder.append(String.format(", \"use_index\": %s", useIndexString));
        }
        return String.format("{%s}", builder.toString());
    }