--- GET NEXT ENDPOINT ---
761529
@Override
	public Endpoint next(Endpoint[] array) {

		// Generate pseudo random long (XORShift is the fastest random method)
		long start;
		long next;
		do {
			start = rnd.get();
			next = start + 1;
			next ^= (next << 21);
			next ^= (next >>> 35);
			next ^= (next << 4);
		} while (!rnd.compareAndSet(start, next));

		// Return ActionEndpoint
		return array[(int) Math.abs(next % array.length)];
	}
1171608
def get_list_endpoint(self, rel=u"instances"):
        
        schema_loaded = not self.schema is None
        links_present = "links" in self.schema.keys()
        if (schema_loaded and links_present):
             for row in self.schema['links']:
                  if row['rel'] == rel:
                      #print "row %s" % row
                      return row
        raise APIException("ENDPOINT_NOTFOUND","invalid endpoint")
1082371
@Override
    public int getHostPort(Object endPoint)
    {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(this, tc, "getHostPort", endPoint);

        int port = 0;
        if (endPoint instanceof CFEndPoint)
        {
            port = ((CFEndPoint) endPoint).getPort();
        }

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(this, tc, "getHostPort", Integer.valueOf(port));
        return port;
    }
1128475
@Override
    public E next()
    {
        if (fetchSize <= 0 || count > fetchSize || scrollComplete)
        {
            throw new NoSuchElementException("Nothing to scroll further for:" + m.getEntityClazz());
        }
        else
        {
            E objectToReturn = currentObject;
            currentObject = null;
            return objectToReturn;
        }
    }
804086
public String next() {
        if (!hasNext()) {
            throw new NoSuchElementException();
        }

        String next = this.next;
        this.next = fetchNext();

        return next;
    }
1212247
def next(self):
        """"""
        # Where this link is in the chain:
        location = self.chain.index(self)
        if not self.end():
            return self.chain[location + 1]
462919
@Override
	public Long next() {
		if (!hasNext()) {
			throw new NoSuchElementException(toString() + " ended");
		}

		current = next;
		next = next + increment;

		return current();
	}
1106123
def next(self):
        
        result = javabridge.call(
            self.loader.jobject, "getNextInstance",
            "(Lweka/core/Instances;)Lweka/core/Instance;", self.structure.jobject)
        if result is None:
            raise StopIteration()
        else:
            return Instance(result)
957020
def getEndpoints(self,typeOfEndpoint=""):
		
		q = {}
		result = asyncResult()
		if typeOfEndpoint:
			q['type'] = typeOfEndpoint
			result.extra['type'] = typeOfEndpoint
		data = self._getURL("/endpoints", query = q)
		result.fill(data)
		if data.status_code == 200:
			result.error = False
		else:
			result.error = response_codes("get_endpoints",data.status_code)
		result.is_done = True
		return result
171625
def get_next(self):
        """"""
        url = self._get_link('next')
        resource = self.object_type.get_resource_class(self.client)
        resp = resource.perform_api_call(resource.REST_READ, url)
        return List(resp, self.object_type, self.client)
298639
@Override
  public synchronized Integer next() {
    if (availablePorts.isEmpty()) {
      return null;
    }
    Collections.sort(availablePorts);
    Integer port = availablePorts.get(0);
    portsInUse.add(port);
    availablePorts.remove(port);
    return port;
  }
95513
public static CompletableFuture<EndpointDescription[]> getEndpoints(String endpointUrl) {
        UaTcpStackClientConfig config = UaTcpStackClientConfig.builder()
                .setEndpointUrl(endpointUrl)
                .build();

        UaTcpStackClient client = new UaTcpStackClient(config);

        GetEndpointsRequest request = new GetEndpointsRequest(
                new RequestHeader(null, DateTime.now(), uint(1), uint(0), null, uint(5000), null),
                endpointUrl, null, new String[]{Stack.UA_TCP_BINARY_TRANSPORT_URI});

        return client.<GetEndpointsResponse>sendRequest(request)
                .whenComplete((r, ex) -> client.disconnect())
                .thenApply(GetEndpointsResponse::getEndpoints);
    }
1021799
def get(self, endpoint, **kwargs):
        
        return self._request(requests.get, endpoint, **kwargs)
13419
def get_endpoints():
        
        LOGGER.debug("EndpointService.get_endpoints")
        params = SessionService.complete_transactional_req(None)
        if params is None:
            if MappingService.driver_type != DriverFactory.DRIVER_REST:
                params = {'OPERATION': 'getEndpoints'}
                args = {'properties': params}
            else:
                args = {'http_operation': 'GET', 'operation_path': ''}
        else:
            if MappingService.driver_type != DriverFactory.DRIVER_REST:
                params['OPERATION'] = 'getEndpoints'
                args = {'properties': params}
            else:
                args = {'http_operation': 'GET', 'operation_path': '', 'parameters': params}

        response = EndpointService.requester.call(args)

        if MappingService.driver_type != DriverFactory.DRIVER_REST:
            response = response.get()

        ret = None
        if response.rc == 0:
            ret = []
            for endpoint in response.response_content['endpoints']:
                ret.append(Endpoint.json_2_endpoint(endpoint))
        elif response.rc != 404:
            err_msg = 'EndpointService.get_endpoints - Problem while getting nodes. ' \
                      'Reason: ' + str(response.response_content) + ' - ' + str(response.error_message) + \
                      " (" + str(response.rc) + ")"
            LOGGER.warning(err_msg)
            if response.rc == 500 and ArianeMappingOverloadError.ERROR_MSG in response.error_message:
                raise ArianeMappingOverloadError("EndpointService.get_endpoints",
                                                 ArianeMappingOverloadError.ERROR_MSG)
            # traceback.print_stack()
        return ret
974378
private Endpoint getEndpoint(String serviceName) {
        Endpoint cachedEndpoint = endpointCache.get(serviceName);

        if (cachedEndpoint == null) {
            cachedEndpoint = computeEndpoint(serviceName);
            if (cachedEndpoint == null) {
                return null;
            }
        }

        endpointCache.put(serviceName, cachedEndpoint);
        return cachedEndpoint;
    }
1341339
@SuppressWarnings("unchecked")
	@Override
	public List<T> getAllEndpoints() {
		ArrayList<T> list = new ArrayList<>(endpoints.length);
		for (int i = 0; i < endpoints.length; i++) {
			list.add((T) endpoints[i]);
		}
		return list;
	}
136105
function next() {
		var u;
		if ( count === len ) {
			debug( 'Finished all queries.' );
			out.meta.success = scount;
			out.meta.failure = fcount;
			return clbk( null, out, ratelimit );
		}
		if ( idx < len ) {
			u = users[ idx ];
			debug( 'Querying for username: `%s` (%d).', u, idx );
			opts.pathname = '/users/' + u;
			request( opts, onResponse( u, idx ) );
			idx += 1;
		}
	}