Creates looping path.

@param {CodePathState} state - The instance.
@param {CodePathSegment[]} fromSegments - Segments which are source.
@param {CodePathSegment[]} toSegments - Segments which are destination.
@returns {void}
14539
function makeLooped(state, fromSegments, toSegments) {
		var end = Math.min(fromSegments.length, toSegments.length);

		for (var i = 0; i < end; ++i) {
			var fromSegment = fromSegments[i];
			var toSegment = toSegments[i];

			if (toSegment.reachable) {
				fromSegment.nextSegments.push(toSegment);
			}
			if (fromSegment.reachable) {
				toSegment.prevSegments.push(fromSegment);
			}
			fromSegment.allNextSegments.push(toSegment);
			toSegment.allPrevSegments.push(fromSegment);

			if (toSegment.allPrevSegments.length >= 2) {
				CodePathSegment.markPrevSegmentAsLooped(toSegment, fromSegment);
			}

			state.notifyLooped(fromSegment, toSegment);
		}
	}
1085237
private void compactSegment(Segment segment, OffsetPredicate predicate, Segment compactSegment) {
    for (long i = segment.firstIndex(); i <= segment.lastIndex(); i++) {
      checkEntry(i, segment, predicate, compactSegment);
    }
  }
773054
function () {
      var path = Immutable.List();
      for (var i = 0; i < arguments.length - 1; i++) {
        path = path.concat(arguments[i]);
      }
      var value = arguments[arguments.length - 1];
      this.state = this.state.mergeIn(path, Immutable.fromJS(value));
      this.emitChange();
    }
640753
function mapStateToProps(state) {

				// initialize return object
				var mappedState = {};

				// populate return object
				keys.forEach(function (key) {

					// add selector connection
					if (key.split(':').length === 2 && selectors[key.split(':')[1]]) {
						mappedState[key.split(':')[0]] = selectors[key.split(':')[1]](state);

						// add branch connection
					} else if (state[key]) {
						mappedState[key] = state[key].toJS();
					}
				});

				return shouldReturnAFunction ? function (state, props) {
					return mappedState;
				} : mappedState;
			}
687381
function(from, letter) {
        const transitionMap = this.transitionGraph[from];
        if (!transitionMap || transitionMap[letter] === undefined) return -1;
        return transitionMap[letter];
    }
513994
function postProcess(state) {
    var i,
        foundStart = false,
        foundEnd = false,
        delim,
        token,
        delimiters = state.delimiters,
        max = state.delimiters.length;

    for (i = 0; i < max; i++) {
      delim = delimiters[i];
      if (delim.marker === '->') {
        foundStart = true;
      } else if (delim.marker === '<-') {
        foundEnd = true;
      }
    }
    if (foundStart && foundEnd) {
      for (i = 0; i < max; i++) {
        delim = delimiters[i];

        if (delim.marker === '->') {
          foundStart = true;
          token         = state.tokens[delim.token];
          token.type    = 'centertext_open';
          token.tag     = 'div';
          token.nesting = 1;
          token.markup  = '->';
          token.content = '';
          token.attrs = [ [ 'class', 'text-align-center' ] ];
        } else if (delim.marker === '<-') {
          if (foundStart) {
            token         = state.tokens[delim.token];
            token.type    = 'centertext_close';
            token.tag     = 'div';
            token.nesting = -1;
            token.markup  = '<-';
            token.content = '';
          }
        }
      }
    }
  }
114406
function () {						// <<<<<< public
		var newMono, newMonoTo, toFirstOutSeg, fromRevSeg;
		for ( var i = 0, j = this.segments.length; i < j; i++) {
			newMono = this.segments[i];
			if ( this.PolyLeftArr[newMono.chainId] ) {
				// preserve winding order
				newMonoTo = newMono.vTo;			// target of segment
				newMono.mprev = newMono.sprev;		// doubly linked list for monotone chains (sub-polygons)
				newMono.mnext = newMono.snext;
			} else {
				// reverse winding order
				newMonoTo = newMono.vFrom;
				newMono = newMono.snext;
				newMono.mprev = newMono.snext;
				newMono.mnext = newMono.sprev;
			}
			if ( fromRevSeg = newMono.vFrom.lastInDiag ) {		// assignment !
				fromRevSeg.mnext = newMono;
				newMono.mprev = fromRevSeg;
				newMono.vFrom.lastInDiag = null;		// cleanup
			}
			if ( toFirstOutSeg = newMonoTo.firstOutDiag ) {		// assignment !
				toFirstOutSeg.mprev = newMono;
				newMono.mnext = toFirstOutSeg;
				newMonoTo.firstOutDiag = null;			// cleanup
			}
		}
	}
14652
@SuppressWarnings({ "unchecked", "rawtypes" })
	@Pure
	protected GP newPath(PT startPoint, ST segment) {
		if (this.pathFactory != null) {
			return this.pathFactory.newPath(startPoint, segment);
		}
		try {
			return (GP) new GraphPath(segment, startPoint);
		} catch (Throwable e) {
			throw new IllegalStateException(Locale.getString("E2"), e); //$NON-NLS-1$
		}
	}
749039
private function transition(TransitionalStateInterface $fromState, EventInterface $event)
    {
        if ($fromState instanceof StateActionInterface) {
            $exitEvent = $fromState->getExitEvent();
            if ($exitEvent !== null) {
                if ($this->eventDispatcher !== null) {
                    $this->eventDispatcher->dispatch(StateMachineEvents::EVENT_EXIT, new StateMachineEvent($this, $fromState, $exitEvent));
                }

                $this->runAction($exitEvent);
            }
        }

        $transition = $this->getTransition($fromState, $event);
        $transition->setToken($fromState->getToken());
        $this->previousState = $fromState;
        $this->currentState = null;
        if ($this->eventDispatcher !== null) {
            $this->eventDispatcher->dispatch(StateMachineEvents::EVENT_TRANSITION, new StateMachineEvent($this, null, $event, $transition));
        }
        $this->runAction($event, $transition);
        $transition->getToState()->setToken($transition->getToken());
        $toState = $this->stateCollection->getCurrentState();
        $this->currentState = $toState;
        $this->transitionLog[] = $this->createTransitionLogEntry($transition);

        if ($toState instanceof StateActionInterface) {
            $entryEvent = $toState->getEntryEvent();
            if ($entryEvent !== null) {
                if ($this->eventDispatcher !== null) {
                    $this->eventDispatcher->dispatch(StateMachineEvents::EVENT_ENTRY, new StateMachineEvent($this, $toState, $entryEvent));
                }

                $this->runAction($entryEvent);
            }
        }
    }
460185
function() {

            var segments = this.segments;
            var numSegments = segments.length;
            // works even if path has no segments

            var path = new Path();
            for (var i = 0; i < numSegments; i++) {

                var segment = segments[i].clone();
                path.appendSegment(segment);
            }

            return path;
        }
503554
function(path, state) {
        if (t.isStringLiteral(path.node.source, { value: 'react-dom' })) {
          path.node.source = t.StringLiteral('react-native');
        }
      }
288048
public SDVariable unsortedSegmentProd(SDVariable data, SDVariable segmentIds, int numSegments) {
        return unsortedSegmentProd(null, data, segmentIds, numSegments);
    }
440296
function (from, to) {
      return rename(path.resolve(target, from), path.resolve(target, to))
    }
642267
EdgeIteratorState copyProperties(EdgeIteratorState from, CommonEdgeIterator to) {
        boolean reverse = from.get(REVERSE_STATE);
        if (to.reverse)
            reverse = !reverse;
        // in case reverse is true we have to swap the nodes to store flags correctly in its "storage direction"
        int nodeA = reverse ? from.getAdjNode() : from.getBaseNode();
        int nodeB = reverse ? from.getBaseNode() : from.getAdjNode();
        long edgePointer = edgeAccess.toPointer(to.getEdge());
        int linkA = reverse ? edgeAccess.getLinkB(edgePointer) : edgeAccess.getLinkA(edgePointer);
        int linkB = reverse ? edgeAccess.getLinkA(edgePointer) : edgeAccess.getLinkB(edgePointer);
        edgeAccess.writeEdge(to.getEdge(), nodeA, nodeB, linkA, linkB);
        edgeAccess.writeFlags(edgePointer, from.getFlags());

        // copy the rest with higher level API
        to.setDistance(from.getDistance()).
                setName(from.getName()).
                setWayGeometry(from.fetchWayGeometry(0));

        if (E_ADDITIONAL >= 0)
            to.setAdditionalField(from.getAdditionalField());
        return to;
    }
984787
Stream<SegmentWithState> getSegmentWithStates(Collection<String> sequenceNames)
  {
    synchronized (segments) {
      return sequenceNames
          .stream()
          .map(segments::get)
          .filter(Objects::nonNull)
          .flatMap(segmentsForSequence -> segmentsForSequence.intervalToSegmentStates.values().stream())
          .flatMap(segmentsOfInterval -> segmentsOfInterval.getAllSegments().stream());
    }
  }
302667
function(arg) {

            var segments = this.segments;
            var numSegments = segments.length;
            // works even if path has no segments

            var currentSegment;

            var previousSegment = ((numSegments !== 0) ? segments[numSegments - 1] : null); // if we are appending to an empty path, previousSegment is null
            var nextSegment = null;

            if (!Array.isArray(arg)) { // arg is a segment
                if (!arg || !arg.isSegment) throw new Error('Segment required.');

                currentSegment = this.prepareSegment(arg, previousSegment, nextSegment);
                segments.push(currentSegment);

            } else { // arg is an array of segments
                if (!arg[0].isSegment) throw new Error('Segments required.');

                var n = arg.length;
                for (var i = 0; i < n; i++) {

                    var currentArg = arg[i];
                    currentSegment = this.prepareSegment(currentArg, previousSegment, nextSegment);
                    segments.push(currentSegment);
                    previousSegment = currentSegment;
                }
            }
        }
329630
function UMLState() {
        UMLVertex.apply(this, arguments);

        /** @member {Array.<UMLRegion>} */
        this.regions = [];

        /** @member {Array.<UMLBehavior>} */
        this.entryActivities = [];

        /** @member {Array.<UMLBehavior>} */
        this.doActivities = [];

        /** @member {Array.<UMLBehavior>} */
        this.exitActivities = [];

        /** @member {UMLStateMachine} */
        this.submachine = null;

        /** @member {UMLConnectionPointReference} */
        this.connections = [];
    }