Get the first predecessor reachable from given edge type.

@param target
the target block
@param edgeType
the edge type leading from the predecessor
@return the predecessor, or null if there is no incoming edge with the
specified edge type
427103
public BasicBlock getPredecessorWithEdgeType(BasicBlock target, @Type int edgeType) {
        Edge edge = getIncomingEdgeWithType(target, edgeType);
        return edge != null ? edge.getSource() : null;
    }
1280701
public static <V> Set<V> getIncomingVertices(DirectedGraph<V, DefaultEdge> graph, V target) {
        Set<DefaultEdge> edges = graph.incomingEdgesOf(target);
        Set<V> sources = new LinkedHashSet<V>();
        for (DefaultEdge edge : edges) {
            sources.add(graph.getEdgeSource(edge));
        }
        return sources;
    }
1288224
@Override
	public KdTree.Node findNeighbor(P target) {
		if( tree.root == null )
			return null;

		this.target = target;
		this.closest = null;
		this.bestDistanceSq = maxDistanceSq;

		stepClosest(tree.root);

		return closest;
	}
798985
public static <T extends AbstractJaxb> List<T> getDescendants(T target,
            List<T> resultList, String clazz) {
        return execute(target, resultList, null, clazz);
    }
223319
public ManagementGroupEdge getBackwardEdge(final int index) {

		if (index < this.backwardEdges.size()) {
			return this.backwardEdges.get(index);
		}

		return null;
	}
223039
public CMISInfo getCMISInfo(final Class<? extends GraphObject> type) {

		try { return type.newInstance().getCMISInfo(); } catch (Throwable t) {}

		return null;
	}
925662
public Edge getIncomingEdgeWithType(BasicBlock basicBlock, @Type int edgeType) {
        return getEdgeWithType(incomingEdgeIterator(basicBlock), edgeType);
    }
594859
final long internalEdgeDisconnect(int edgeToRemove, long edgeToUpdatePointer, int baseNode) {
        long edgeToRemovePointer = toPointer(edgeToRemove);
        // an edge is shared across the two nodes even if the edge is not in both directions
        // so we need to know two edge-pointers pointing to the edge before edgeToRemovePointer
        int nextEdgeId = getNodeA(edgeToRemovePointer) == baseNode ? getLinkA(edgeToRemovePointer) : getLinkB(edgeToRemovePointer);
        if (edgeToUpdatePointer < 0) {
            setEdgeRef(baseNode, nextEdgeId);
        } else {
            // adjNode is different for the edge we want to update with the new link
            long link = getNodeA(edgeToUpdatePointer) == baseNode ? edgeToUpdatePointer + E_LINKA : edgeToUpdatePointer + E_LINKB;
            edges.setInt(link, nextEdgeId);
        }
        return edgeToRemovePointer;
    }
605049
public static Predicate<Number> getLessOrEqual(Number target) {
		return number -> number.doubleValue() <= target.doubleValue();
	}
303685
@Override
    public BufferByteOutput<T> target(final T target) {
        return (BufferByteOutput<T>) super.target(target);
    }
280511
@Override
    public Tree getAncestor(int ttype) {
        Tree t = this;
        t = t.getParent();
        while ( t!=null ) {
            if ( t.getType()==ttype ) return t;
            t = t.getParent();
        }
        return null;
    }
820739
public static <T> T orElseGetIfNull(T target, Supplier<T> elseGetSupplier) {
        return Optional.ofNullable(target).orElseGet(elseGetSupplier);
    }
370275
protected int getFirstFreeOutputGateIndex() {

		for (int i = 0; i < this.forwardEdges.size(); i++) {

			if (this.forwardEdges.get(i) == null) {
				return i;
			}
		}

		return this.forwardEdges.size();
	}
1071272
public static Predicate<Class<?>> classIsDescendantOf(Class<?> ancestor) {
        return candidate -> candidate != null && candidate != ancestor && ancestor
                .isAssignableFrom(candidate);
    }
671576
public BaseTypeId getBaseTypeId(final Class<? extends GraphObject> type) {

		final CMISInfo info = getCMISInfo(type);
		if (info != null) {

			return info.getBaseTypeId();
		}

		return null;
	}
1242969
private Iterator<Edge> logicalPredecessorEdgeIterator(BasicBlock block) {
        return isForwards ? cfg.incomingEdgeIterator(block) : cfg.outgoingEdgeIterator(block);
    }
500640
public RouterLike CONNECT_FIRST(String path, T target) {
    return patternFirst(CONNECT(), path, target);
  }