MARKER START: Here GraphqlOperation.g4 specific methods begin
190113
public Document createDocument(GraphqlParser.DocumentContext ctx) {
        Document.Builder document = Document.newDocument();
        addCommonData(document, ctx);
        document.definitions(ctx.definition().stream().map(this::createDefinition)
                .collect(toList()));
        return document.build();
    }
427180
public void start() {
		firstObject = true;
		featureCollection = null;
		currentFeature = null;
		currentPoint = null;

		geoJSON = null;
		currentFeatureGeoJSON = null;
		currentGeometryGeoJSON = null;

		if (writerContentHandler != null)
			this.geoJSON = writerContentHandler.startFeatureCollection();
		featureCollection = contentHandler.startFeatureCollection();
		this.currentFeatureType = this.service.getFeatureTypes().get(this.service.getType());
	}
405947
function(mapId, markersToRender, oldModels, map, layers, leafletMarkers, leafletScope,
                                 watchOptions, maybeLayerName, skips) {
        for (var newName in markersToRender) {
          if (skips[newName])
              continue;

          if (newName.search('-') !== -1) {
            $log.error('The marker can\'t use a "-" on his key name: "' + newName + '".');
            continue;
          }

          var model = Helpers.copy(markersToRender[newName]);
          var pathToMarker = Helpers.getObjectDotPath(maybeLayerName ? [maybeLayerName, newName] : [newName]);
          var maybeLMarker = _getLMarker(leafletMarkers, newName, maybeLayerName);
          if (!isDefined(maybeLMarker)) {
            //(nmccready) very important to not have model changes when lObject is changed
            //this might be desirable in some cases but it causes two-way binding to lObject which is not ideal
            //if it is left as the reference then all changes from oldModel vs newModel are ignored
            //see _destroy (where modelDiff becomes meaningless if we do not copy here)
            var marker = createMarker(model);
            var layerName = (model ? model.layer : undefined) || maybeLayerName; //original way takes pref
            if (!isDefined(marker)) {
              $log.error(errorHeader + ' Received invalid data on the marker ' + newName + '.');
              continue;
            }

            _setLMarker(marker, leafletMarkers, newName, maybeLayerName);

            // Bind message
            if (isDefined(model.message)) {
              marker.bindPopup(model.message, model.popupOptions);
            }

            // Add the marker to a cluster group if needed
            if (isDefined(model.group)) {
              var groupOptions = isDefined(model.groupOption) ? model.groupOption : null;
              addMarkerToGroup(marker, model.group, groupOptions, map);
            }

            // Show label if defined
            if (Helpers.LabelPlugin.isLoaded() && isDefined(model.label) && isDefined(model.label.message)) {
              marker.bindLabel(model.label.message, model.label.options);
            }

            // Check if the marker should be added to a layer
            if (isDefined(model) && (isDefined(model.layer) || isDefined(maybeLayerName))) {

              var pass = _maybeAddMarkerToLayer(layerName, layers, model, marker,
                  watchOptions.individual.doWatch, map);
              if (!pass)
                  continue; //something went wrong move on in the loop
            } else if (!isDefined(model.group)) {
              // We do not have a layer attr, so the marker goes to the map layer
              map.addLayer(marker);
              if (!watchOptions.individual.doWatch && model.focus === true) {
                marker.openPopup();
              }
            }

            if (watchOptions.individual.doWatch) {
              addMarkerWatcher(marker, pathToMarker, leafletScope, layers, map,
                  watchOptions.individual.isDeep);
            }

            listenMarkerEvents(marker, model, leafletScope, watchOptions.individual.doWatch, map);
            leafletMarkerEvents.bindEvents(mapId, marker, pathToMarker, model, leafletScope, layerName);
          }          else {
            var oldModel = isDefined(oldModel) ? oldModels[newName] : undefined;
            updateMarker(model, oldModel, maybeLMarker, pathToMarker, leafletScope, layers, map);
          }
        }
      }
379733
async function start() {
  // Make sure the database tables are up to date
  await models.sequelize.sync({ force: true });

  // Create sample data
  const foo = await models.User.create({ name: 'Foo' });
  const bar = await models.User.create({ name: 'Bar' });
  await foo.createPet({ name: 'Bat' });
  await bar.createPet({ name: 'Baz' });

  // Start the GraphQL server
  server.start(() => {
    console.log('Server is running on localhost:4000');
  });
}
348662
@Override
    public void start() {
        int port = getIntSetting(SETTING_PORT, DEFAULT_GRAPHITE_SERVER_PORT);
        String host = getStringSetting(SETTING_HOST);
        graphiteServerHostAndPort = new HostAndPort(host, port);

        logger.info("Start Graphite writer connected to '{}'...", graphiteServerHostAndPort);

        metricPathPrefix = getStringSetting(SETTING_NAME_PREFIX, DEFAULT_NAME_PREFIX);
        metricPathPrefix = getStrategy().resolveExpression(metricPathPrefix);
        if (!metricPathPrefix.isEmpty() && !metricPathPrefix.endsWith(".")) {
            metricPathPrefix = metricPathPrefix + ".";
        }

        GenericKeyedObjectPoolConfig config = new GenericKeyedObjectPoolConfig();
        config.setTestOnBorrow(getBooleanSetting("pool.testOnBorrow", true));
        config.setTestWhileIdle(getBooleanSetting("pool.testWhileIdle", true));
        config.setMaxTotal(getIntSetting("pool.maxActive", -1));
        config.setMaxIdlePerKey(getIntSetting("pool.maxIdle", -1));
        config.setMinEvictableIdleTimeMillis(getLongSetting("pool.minEvictableIdleTimeMillis", TimeUnit.MINUTES.toMillis(5)));
        config.setTimeBetweenEvictionRunsMillis(getLongSetting("pool.timeBetweenEvictionRunsMillis", TimeUnit.MINUTES.toMillis(5)));
        config.setJmxNameBase("org.jmxtrans.embedded:type=GenericKeyedObjectPool,writer=GraphiteWriter,name=");
        config.setJmxNamePrefix(graphiteServerHostAndPort.getHost() + "_" + graphiteServerHostAndPort.getPort());

        int socketConnectTimeoutInMillis = getIntSetting("graphite.socketConnectTimeoutInMillis", SocketWriterPoolFactory.DEFAULT_SOCKET_CONNECT_TIMEOUT_IN_MILLIS);

        String protocol = getStringSetting(SETTING_PROTOCOL, null);
        if (protocol != null && protocol.equalsIgnoreCase(PROTOCOL_UDP)) {
            socketWriterPool = new GenericKeyedObjectPool<HostAndPort, SocketWriter>(new UDPSocketWriterPoolFactory(UTF_8), config);
        } else {
            if (protocol == null) {
                // protocol not specified, use default one
                logger.info("Protocol unspecified, default protocol '{}' will be used.", PROTOCOL_TCP);
            } else if (PROTOCOL_TCP.equalsIgnoreCase(protocol) == false) {
                // unknown or protocol, use default one
                logger.warn("Unknown protocol specified '{}', default protocol '{}' will be used instead.", protocol, PROTOCOL_TCP);
            }
            String socketFactoryClassName = getStringSetting(SETTING_SOCKET_FACTORY, null);
            boolean useTls = getBooleanSetting(SETTING_USE_TLS, false);
            SocketFactory socketFactory;

            if (!StringUtils2.isNullOrEmpty(socketFactoryClassName)) {
                try {
                    socketFactory = (SocketFactory) Class.forName(socketFactoryClassName, true, Thread.currentThread().getContextClassLoader()).newInstance();
                } catch (Exception e) {
                    throw new RuntimeException("Exception instantiating SocketFactory '" + socketFactoryClassName + "'");
                }
            } else if (useTls) {
                boolean tlsInsecure = getBooleanSetting(SETTING_TLS_INSECURE, false);
                if (tlsInsecure) {
                    socketFactory = SslUtils.getTrustAllSSLSocketFactory();
                } else {
                    String keyStore = getStringSetting(SETTING_TLS_KEY_STORE, null);
                    String keyStorePassword = getStringSetting(SETTING_TLS_KEY_STORE_PASSWORD, null);
                    String trustStore = getStringSetting(SETTING_TLS_TRUST_STORE, null);
                    String trustStorePassword = getStringSetting(SETTING_TLS_TRUST_STORE_PASSWORD, null);
                    socketFactory = SslUtils.getSSLSocketFactory(keyStore, keyStorePassword, trustStore, trustStorePassword);
                }
            } else {
                socketFactory = SocketFactory.getDefault();
            }
            socketWriterPool = new GenericKeyedObjectPool<HostAndPort, SocketWriter>(new SocketWriterPoolFactory(socketFactory, UTF_8, socketConnectTimeoutInMillis), config);
        }

        if (isEnabled()) {
            try {
                SocketWriter socketWriter = socketWriterPool.borrowObject(graphiteServerHostAndPort);
                socketWriterPool.returnObject(graphiteServerHostAndPort, socketWriter);
            } catch (Exception e) {
                logger.warn("Test Connection: FAILURE to connect to Graphite server '{}'", graphiteServerHostAndPort, e);
            }
        }
    }
33901
@Override
	public void trackCheckpoint(String startToken, String checkpointToken) {
	    tokenMap.put(startToken, checkpointToken);
	}
701149
function(geometry){
      if (geometry.viewport){
        this.map.fitBounds(geometry.viewport);
        if (this.map.getZoom() > this.options.maxZoom){
          this.map.setZoom(this.options.maxZoom);
        }
      } else {
        this.map.setZoom(this.options.maxZoom);
        this.map.setCenter(geometry.location);
      }

      if (this.marker){
        this.marker.setPosition(geometry.location);
        this.marker.setAnimation(this.options.markerOptions.animation);
      }
    }
1158337
public void onGeometryEditStart(GeometryEditStartEvent event) {
		isBusyEditing = true;

		// Initialize controllers and painters:
		previousController = mapWidget.getController();
		mapWidget.setController(baseController);

		if (zoomOnStart) {
			// TODO Zoom darnit...
		}
		if (isBusyEditing && isSnapOnDrag()) {
			Bbox bounds = mapWidget.getMapModel().getMapView().getBounds();
			snappingService.update(new org.geomajas.geometry.Bbox(bounds.getX(), bounds.getY(), bounds.getWidth(),
					bounds.getHeight()));
		}
	}
16439
protected void internalEndpointInitialization(final CountDownLatch endpointLatch) {
		if (this.isWeb()) {
			WebRtcEndpoint.Builder builder = new WebRtcEndpoint.Builder(pipeline);
			/*
			 * if (this.dataChannels) { builder.useDataChannels(); }
			 */
			builder.buildAsync(new Continuation<WebRtcEndpoint>() {
				@Override
				public void onSuccess(WebRtcEndpoint result) throws Exception {
					webEndpoint = result;

					webEndpoint.setMaxVideoRecvBandwidth(maxRecvKbps);
					webEndpoint.setMinVideoRecvBandwidth(minRecvKbps);
					webEndpoint.setMaxVideoSendBandwidth(maxSendKbps);
					webEndpoint.setMinVideoSendBandwidth(minSendKbps);

					endpointLatch.countDown();
					log.trace("EP {}: Created a new WebRtcEndpoint", endpointName);
					endpointSubscription = registerElemErrListener(webEndpoint);
				}

				@Override
				public void onError(Throwable cause) throws Exception {
					endpointLatch.countDown();
					log.error("EP {}: Failed to create a new WebRtcEndpoint", endpointName, cause);
				}
			});
		} else {
			new RtpEndpoint.Builder(pipeline).buildAsync(new Continuation<RtpEndpoint>() {
				@Override
				public void onSuccess(RtpEndpoint result) throws Exception {
					endpoint = result;
					endpointLatch.countDown();
					log.trace("EP {}: Created a new RtpEndpoint", endpointName);
					endpointSubscription = registerElemErrListener(endpoint);
				}

				@Override
				public void onError(Throwable cause) throws Exception {
					endpointLatch.countDown();
					log.error("EP {}: Failed to create a new RtpEndpoint", endpointName, cause);
				}
			});
		}
	}
665815
public GraphHopper setGraphHopperLocation(String ghLocation) {
        ensureNotLoaded();
        if (ghLocation == null)
            throw new IllegalArgumentException("graphhopper location cannot be null");

        this.ghLocation = ghLocation;
        return this;
    }
329887
protected void initMouseHandler(MouseOptions options) {
    this.options = options;

    for (final Element e : elements()) {

      $(e).as(Events).bind(Event.ONMOUSEDOWN, getPluginName(), (Object) null, new Function() {
        @Override
        public boolean f(com.google.gwt.user.client.Event event) {
          if (touchSupported) {
            return true;
          }
          return mouseDown(e, GqEvent.create(event));
        }
      }).bind(Event.ONTOUCHSTART, getPluginName(), (Object) null, new Function() {
        public boolean f(com.google.gwt.user.client.Event event) {
          if (event.getTouches().length() > 1) {
            return true;
          }

          touchSupported = true;
          return mouseDown(e, GqEvent.create(event));
        }
      }).bind(Event.ONCLICK, getPluginName(), (Object) null, new Function() {
        @Override
        public boolean f(com.google.gwt.user.client.Event event) {
          preventClickEvent |= !mouseClick(e, GqEvent.create(event));

          if (preventClickEvent) {

            preventClickEvent = false;
            event.stopPropagation();
            event.preventDefault();
            return false;
          }

          return true;
        }
      });
    }
  }
141295
public void startMcGregorIteration(int largestMappingSize, List<Integer> cliqueVector,
            List<Integer> compGraphNodes) throws IOException {
        this.globalMCSSize = (largestMappingSize / 2);
        List<String> cTab1Copy = McGregorChecks.generateCTabCopy(source);

        List<String> cTab2Copy = McGregorChecks.generateCTabCopy(target);

        //find mapped atoms of both molecules and store these in mappedAtoms
        List<Integer> mappedAtoms = new ArrayList<Integer>();

        int mappedAtomCount = 0;

        List<Integer> iBondNeighborAtomsA = new ArrayList<Integer>();
        List<String> cBondNeighborsA = new ArrayList<String>();

        List<Integer> iBondSetA = new ArrayList<Integer>();
        List<String> cBondSetA = new ArrayList<String>();

        List<Integer> iBondNeighborAtomsB = new ArrayList<Integer>();
        List<Integer> iBondSetB = new ArrayList<Integer>();
        List<String> cBondNeighborsB = new ArrayList<String>();
        List<String> cBondSetB = new ArrayList<String>();

        int cliqueSize = cliqueVector.size();
        int vecSize = compGraphNodes.size();

        int cliqueNumber = 0;

        for (int a = 0; a < cliqueSize; a++) {
            //go through all clique nodes
            cliqueNumber = cliqueVector.get(a);
            for (int b = 0; b < vecSize; b += 3) {
                //go through all nodes in the compatibility graph
                if (cliqueNumber == compGraphNodes.get(b + 2)) {
                    mappedAtoms.add(compGraphNodes.get(b));
                    mappedAtoms.add(compGraphNodes.get(b + 1));
                    mappedAtomCount++;
                }
            }
        }

        //find unmapped atoms of molecule A
        List<Integer> unmappedAtomsMolA = McGregorChecks.markUnMappedAtoms(true, source, mappedAtoms, cliqueSize);

        int counter = 0;
        int setNumA = 0;
        int setNumB = 0;
        int localNeighborBondnumA = 0; //number of remaining molecule A bonds after the clique search, which are neighbors of the MCS_1
        int localNeighborBondNumB = 0; //number of remaining molecule B bonds after the clique search, which are neighbors of the MCS_1

        //Extract bonds which are related with unmapped atoms of molecule A.
        //In case that unmapped atoms are connected with already mapped atoms, the mapped atoms are labelled with
        //new special signs -> the result are two vectors: cBondNeighborsA and int_bonds_molA, which contain those
        //bonds of molecule A, which are relevant for the McGregorBondTypeInSensitive algorithm.
        //The special signs must be transfered to the corresponding atoms of molecule B

        QueryProcessor queryProcess = new QueryProcessor(cTab1Copy, cTab2Copy, SIGNS, localNeighborBondnumA,
                setNumA, iBondNeighborAtomsA, cBondNeighborsA, cliqueSize, iBondSetA, cBondSetA);

        queryProcess.process(source, target, unmappedAtomsMolA, mappedAtoms, counter);

        cTab1Copy = queryProcess.getCTab1();
        cTab2Copy = queryProcess.getCTab2();
        setNumA = queryProcess.getBondNumA();
        localNeighborBondnumA = queryProcess.getNeighborBondNumA();
        iBondNeighborAtomsA = queryProcess.getIBondNeighboursA();
        cBondNeighborsA = queryProcess.getCBondNeighborsA();

        //find unmapped atoms of molecule B
        List<Integer> unmappedAtomsMolB = McGregorChecks.markUnMappedAtoms(false, target, mappedAtoms, cliqueSize);

        //Extract bonds which are related with unmapped atoms of molecule B.
        //In case that unmapped atoms are connected with already mapped atoms, the mapped atoms are labelled with
        //new special signs -> the result are two vectors: cBondNeighborsA and int_bonds_molB, which contain those
        //bonds of molecule B, which are relevant for the McGregorBondTypeInSensitive algorithm.
        //The special signs must be transfered to the corresponding atoms of molecule A

        TargetProcessor targetProcess = new TargetProcessor(cTab1Copy, cTab2Copy, SIGNS, localNeighborBondNumB,
                setNumB, iBondNeighborAtomsB, cBondNeighborsB, localNeighborBondnumA, iBondNeighborAtomsA,
                cBondNeighborsA);

        targetProcess.process(target, unmappedAtomsMolB, cliqueSize, iBondSetB, cBondSetB, mappedAtoms, counter);

        cTab1Copy = targetProcess.getCTab1();
        cTab2Copy = targetProcess.getCTab2();
        setNumB = targetProcess.getBondNumB();
        localNeighborBondNumB = targetProcess.getNeighborBondNumB();
        iBondNeighborAtomsB = targetProcess.getIBondNeighboursB();
        cBondNeighborsB = targetProcess.getCBondNeighborsB();

        boolean dummy = false;

        McgregorHelper mcGregorHelper = new McgregorHelper(dummy, mappedAtomCount, mappedAtoms, localNeighborBondnumA,
                localNeighborBondNumB, iBondNeighborAtomsA, iBondNeighborAtomsB, cBondNeighborsA, cBondNeighborsB,
                setNumA, setNumB, iBondSetA, iBondSetB, cBondSetA, cBondSetB);
        iterator(mcGregorHelper);

    }
930338
function metricStart(ctx) {
	ctx.startTime = Date.now();
	ctx.startHrTime = process.hrtime();
	ctx.duration = 0;

	if (ctx.metrics) {
		const payload = generateMetricPayload(ctx);
		ctx.broker.emit("metrics.trace.span.start", payload);
	}
}
394875
public void trace( Marker marker, String msg )
    {
        if( m_delegate.isTraceEnabled() )
        {
            setMDCMarker( marker );
            m_delegate.trace( msg, null );
            resetMDCMarker();
        }
    }
1277223
def start(self):
        """"""
        # TODO (NM 2015-03-12) Some checking to prevent multiple calls to start()
        host, port = self.address
        ic = self._inspecting_client = self.inspecting_client_factory(
            host, port, self._ioloop_set_to)
        self.ioloop = ic.ioloop
        if self._preset_protocol_flags:
            ic.preset_protocol_flags(self._preset_protocol_flags)
        ic.katcp_client.auto_reconnect_delay = self.auto_reconnect_delay
        ic.set_state_callback(self._inspecting_client_state_callback)
        ic.request_factory = self._request_factory
        self._sensor_manager = KATCPClientResourceSensorsManager(
            ic, self.name, logger=self._logger)
        ic.handle_sensor_value()
        ic.sensor_factory = self._sensor_manager.sensor_factory

        # Steal some methods from _sensor_manager
        self.reapply_sampling_strategies = self._sensor_manager.reapply_sampling_strategies
        log_future_exceptions(self._logger, ic.connect())
801316
public void error(Marker marker, String msg) {
        if (!logger.isErrorEnabled(marker))
            return;
        if (instanceofLAL) {
            ((LocationAwareLogger) logger).log(marker, fqcn, LocationAwareLogger.ERROR_INT, msg, null, null);
        } else {
            logger.error(marker, msg);
        }
    }
682590
function(kgraph) {
        zoomToFit(kgraph);
        var nodeMap = {};
        // convert to absolute positions
        toAbsolutePositions(kgraph, {x: 0, y:0}, nodeMap);
        toAbsolutePositionsEdges(kgraph, nodeMap);
        // invoke the 'finish' event
        dispatch.finish({graph: kgraph});
      }