idx
int32
46
1.86M
input
stringlengths
321
6.6k
target
stringlengths
9
1.24k
1,843,150
public void recover() {<NEW_LINE>// Always recover in the default mode -- otherwise, the parser can get stuck in an infinite<NEW_LINE>// loop, e.g. if separator is not valid in the current mode.<NEW_LINE>_lexer._mode = Lexer.DEFAULT_MODE;<NEW_LINE>int tokenStartMarker = _lexer._input.mark();<NEW_LINE>try {<NEW_LINE>_lexer._token = null;<NEW_LINE>_lexer._channel = Token.DEFAULT_CHANNEL;<NEW_LINE>_lexer._tokenStartCharIndex = _lexer._input.index();<NEW_LINE>_lexer._tokenStartCharPositionInLine = _lexer.getInterpreter().getCharPositionInLine();<NEW_LINE>_lexer._tokenStartLine = _lexer.getInterpreter().getLine();<NEW_LINE>_lexer._text = null;<NEW_LINE>_lexer._type = BatfishLexer.UNMATCHABLE_TOKEN;<NEW_LINE>for (int nextChar = _lexer._input.LA(1); !_separatorChars.contains(nextChar); nextChar = _lexer._input.LA(1)) {<NEW_LINE>if (nextChar == IntStream.EOF) {<NEW_LINE>_lexer._hitEOF = true;<NEW_LINE>_lexer.emitEOF();<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>_lexer.getInterpreter(<MASK><NEW_LINE>}<NEW_LINE>_lexer.emit();<NEW_LINE>} finally {<NEW_LINE>// make sure we release marker after match or<NEW_LINE>// unbuffered char stream will keep buffering<NEW_LINE>_lexer._input.release(tokenStartMarker);<NEW_LINE>}<NEW_LINE>}
).consume(_lexer._input);
541,785
public static DateTime civilDate(ThreadContext context, final int y, final int m, final int d, final Chronology chronology) {<NEW_LINE>DateTime dt;<NEW_LINE>try {<NEW_LINE>if (d >= 0) {<NEW_LINE>// let d == 0 fail (raise 'invalid date')<NEW_LINE>dt = new DateTime(y, m, <MASK><NEW_LINE>} else {<NEW_LINE>dt = new DateTime(y, m, 1, 0, 0, chronology);<NEW_LINE>long ms = dt.getMillis();<NEW_LINE>int last = chronology.dayOfMonth().getMaximumValue(ms);<NEW_LINE>// d < 0 (d == -1 -> d == 31)<NEW_LINE>ms = chronology.dayOfMonth().set(ms, last + d + 1);<NEW_LINE>dt = dt.withMillis(ms);<NEW_LINE>}<NEW_LINE>} catch (IllegalArgumentException ex) {<NEW_LINE>debug(context, "invalid date", ex);<NEW_LINE>throw context.runtime.newArgumentError("invalid date");<NEW_LINE>}<NEW_LINE>return dt;<NEW_LINE>}
d, 0, 0, chronology);
819,645
private void addUsedByExtensionAttribute(HttpServletRequest request, AttributeList attributeList, HttpServletResponse response) throws OAuth20BadParameterException {<NEW_LINE>String usedBy = <MASK><NEW_LINE>if (usedBy == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (!checkParamLength(OAuth20Constants.USED_BY, usedBy, request.getRequestURI(), response)) {<NEW_LINE>String errorMsg = Tr.formatMessage(tc, "OAUTH_PARAMETER_VALUE_LENGTH_TOO_LONG", new Object[] { OAuth20Constants.USED_BY, request.getRequestURI(), PARAM_MAX_LENGTH });<NEW_LINE>throw new OAuth20BadParameterException(errorMsg, new Object[] { OAuth20Constants.USED_BY, usedBy });<NEW_LINE>}<NEW_LINE>usedBy = WebUtils.htmlEncode(usedBy);<NEW_LINE>String[] usedByArray = usedBy.split(",");<NEW_LINE>String key = OAuth20Constants.EXTERNAL_CLAIMS_PREFIX + OAuth20Constants.USED_BY;<NEW_LINE>attributeList.setAttribute(key, OAuth20Constants.EXTERNAL_CLAIMS, usedByArray);<NEW_LINE>}
request.getParameter(OAuth20Constants.USED_BY);
172,001
// snippet-start:[workdocs.java2.upload_user_doc.main]<NEW_LINE>public static void uploadDoc(WorkDocsClient workDocs, String orgId, String userEmail, String docName, String docPath) {<NEW_LINE>String docId;<NEW_LINE>String versionId;<NEW_LINE>String uploadUrl;<NEW_LINE>int statusValue = 0;<NEW_LINE>Map<String, String> map = getDocInfo(workDocs, orgId, userEmail, docName);<NEW_LINE>docId = map.get("doc_id");<NEW_LINE>versionId = map.get("version_id");<NEW_LINE>uploadUrl = map.get("upload_url");<NEW_LINE>statusValue = startDocUpload(uploadUrl, docPath);<NEW_LINE>if (statusValue != 200) {<NEW_LINE>System.out.println("Error code uploading: " + statusValue);<NEW_LINE>} else {<NEW_LINE>System.out.println("Success uploading doc " + docName);<NEW_LINE>}<NEW_LINE><MASK><NEW_LINE>}
completeUpload(workDocs, docId, versionId);
1,406,518
final BatchStopJobRunResult executeBatchStopJobRun(BatchStopJobRunRequest batchStopJobRunRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(batchStopJobRunRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<BatchStopJobRunRequest> request = null;<NEW_LINE>Response<BatchStopJobRunResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new BatchStopJobRunRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(batchStopJobRunRequest));<NEW_LINE>// Binds the request metrics to the current request.<NEW_LINE>request.setAWSRequestMetrics(awsRequestMetrics);<NEW_LINE>request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);<NEW_LINE>request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());<NEW_LINE>request.<MASK><NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "BatchStopJobRun");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<BatchStopJobRunResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new BatchStopJobRunResultJsonUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
addHandlerContext(HandlerContextKey.SERVICE_ID, "Glue");
912,198
public static long parseLong(final CharSequence s) {<NEW_LINE>if (s == null)<NEW_LINE>throw new NumberFormatException("Null string");<NEW_LINE>// Check for a sign.<NEW_LINE>long num = 0;<NEW_LINE>long sign = -1;<NEW_LINE>final int len = s.length();<NEW_LINE>final char ch = s.charAt(0);<NEW_LINE>if (ch == '-') {<NEW_LINE>if (len == 1)<NEW_LINE>throw new NumberFormatException("Missing digits: " + s);<NEW_LINE>sign = 1;<NEW_LINE>} else {<NEW_LINE>final int d = ch - '0';<NEW_LINE>if (d < 0 || d > 9)<NEW_LINE>throw new NumberFormatException("Malformed: " + s);<NEW_LINE>num = -d;<NEW_LINE>}<NEW_LINE>// Build the number.<NEW_LINE>final long max = (sign == -1L) ? -Long.MAX_VALUE : Long.MIN_VALUE;<NEW_LINE>final long multmax = max / 10;<NEW_LINE>int i = 1;<NEW_LINE>while (i < len) {<NEW_LINE>long d = s.charAt(i++) - '0';<NEW_LINE>if (d < 0L || d > 9L)<NEW_LINE>throw new NumberFormatException("Malformed: " + s);<NEW_LINE>if (num < multmax)<NEW_LINE>throw new NumberFormatException("Over/underflow: " + s);<NEW_LINE>num *= 10;<NEW_LINE>if (num < (max + d))<NEW_LINE><MASK><NEW_LINE>num -= d;<NEW_LINE>}<NEW_LINE>return sign * num;<NEW_LINE>}
throw new NumberFormatException("Over/underflow: " + s);
948,160
private void sendAppendRequest(final RaftMemberContext member, final AppendRequest request) {<NEW_LINE>// If this is a heartbeat message and a heartbeat is already in progress, skip the request.<NEW_LINE>if (request.entries().isEmpty() && !member.canHeartbeat()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>// Start the append to the member.<NEW_LINE>member.startAppend();<NEW_LINE>final long timestamp = System.currentTimeMillis();<NEW_LINE>log.trace("Sending {} to {}", request, member.getMember().memberId());<NEW_LINE>raft.getProtocol().append(member.getMember().memberId(), request).whenCompleteAsync((response, error) -> {<NEW_LINE>// Complete the append to the member.<NEW_LINE>final long appendLatency = System.currentTimeMillis() - timestamp;<NEW_LINE>metrics.appendComplete(appendLatency, member.getMember().memberId().id());<NEW_LINE>if (!request.entries().isEmpty()) {<NEW_LINE>member.completeAppend(appendLatency);<NEW_LINE>} else {<NEW_LINE>member.completeAppend();<NEW_LINE>}<NEW_LINE>if (open) {<NEW_LINE>if (error == null) {<NEW_LINE>log.trace("Received {} from {}", response, member.<MASK><NEW_LINE>handleAppendResponse(member, request, response, timestamp);<NEW_LINE>} else {<NEW_LINE>handleAppendResponseFailure(member, request, error);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}, raft.getThreadContext());<NEW_LINE>if (!request.entries().isEmpty() && hasMoreEntries(member)) {<NEW_LINE>appendEntries(member);<NEW_LINE>}<NEW_LINE>}
getMember().memberId());
789,961
private int find(MethodNode method, InjectionPoint injectionPoint, int defaultValue, int failValue, String description) {<NEW_LINE>if (injectionPoint == null) {<NEW_LINE>return defaultValue;<NEW_LINE>}<NEW_LINE>Deque<AbstractInsnNode> nodes <MASK><NEW_LINE>InsnListReadOnly insns = new InsnListReadOnly(method.instructions);<NEW_LINE>boolean result = injectionPoint.find(method.desc, insns, nodes);<NEW_LINE>Selector select = injectionPoint.getSelector();<NEW_LINE>if (nodes.size() != 1 && select == Selector.ONE) {<NEW_LINE>throw new InvalidSliceException(this.owner, String.format("%s requires 1 result but found %d", this.describe(description), nodes.size()));<NEW_LINE>}<NEW_LINE>if (!result) {<NEW_LINE>if (this.owner.getMixin().getOption(Option.DEBUG_VERBOSE)) {<NEW_LINE>MethodSlice.logger.warn("{} did not match any instructions", this.describe(description));<NEW_LINE>}<NEW_LINE>return failValue;<NEW_LINE>}<NEW_LINE>return method.instructions.indexOf(select == Selector.FIRST ? nodes.getFirst() : nodes.getLast());<NEW_LINE>}
= new LinkedList<AbstractInsnNode>();
1,439,151
public State convertToState(RFXComValueSelector valueSelector) throws RFXComException {<NEW_LINE>org.openhab.core.types.State state = UnDefType.UNDEF;<NEW_LINE>if (valueSelector.getItemClass() == NumberItem.class) {<NEW_LINE>if (valueSelector == RFXComValueSelector.SIGNAL_LEVEL) {<NEW_LINE>state = new DecimalType(signalLevel);<NEW_LINE>} else if (valueSelector == RFXComValueSelector.BATTERY_LEVEL) {<NEW_LINE>state = new DecimalType(batteryLevel);<NEW_LINE>} else if (valueSelector == RFXComValueSelector.RAIN_RATE) {<NEW_LINE>state = new DecimalType(rainRate);<NEW_LINE>} else if (valueSelector == RFXComValueSelector.RAIN_TOTAL) {<NEW_LINE>state = new DecimalType(rainTotal);<NEW_LINE>} else {<NEW_LINE>throw new RFXComException("Can't convert " + valueSelector + " to NumberItem");<NEW_LINE>}<NEW_LINE>} else if (valueSelector.getItemClass() == StringItem.class) {<NEW_LINE>if (valueSelector == RFXComValueSelector.RAW_DATA) {<NEW_LINE>state = new StringType(DatatypeConverter.printHexBinary(rawMessage));<NEW_LINE>} else {<NEW_LINE>throw new RFXComException("Can't convert " + valueSelector + " to StringItem");<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>throw new RFXComException("Can't convert " + valueSelector + <MASK><NEW_LINE>}<NEW_LINE>return state;<NEW_LINE>}
" to " + valueSelector.getItemClass());
258,412
final ListEventIntegrationsResult executeListEventIntegrations(ListEventIntegrationsRequest listEventIntegrationsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listEventIntegrationsRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<ListEventIntegrationsRequest> request = null;<NEW_LINE>Response<ListEventIntegrationsResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new ListEventIntegrationsRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listEventIntegrationsRequest));<NEW_LINE>// Binds the request metrics to the current request.<NEW_LINE>request.setAWSRequestMetrics(awsRequestMetrics);<NEW_LINE>request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);<NEW_LINE>request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());<NEW_LINE>request.addHandlerContext(<MASK><NEW_LINE>request.addHandlerContext(HandlerContextKey.SERVICE_ID, "AppIntegrations");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListEventIntegrations");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<ListEventIntegrationsResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListEventIntegrationsResultJsonUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
HandlerContextKey.SIGNING_REGION, getSigningRegion());
1,808,203
static <K, A, E> MapDifference<K, A, E> create(Map<? extends K, ? extends A> actual, Map<? extends K, ? extends E> expected, boolean allowUnexpected, ValueTester<? super A, ? super E> valueTester) {<NEW_LINE>Map<K, A> unexpected = new LinkedHashMap<>(actual);<NEW_LINE>Map<K, E> missing = new LinkedHashMap<>();<NEW_LINE>Map<K, ValueDifference<A, E>> wrongValues = new LinkedHashMap<>();<NEW_LINE>for (Map.Entry<? extends K, ? extends E> expectedEntry : expected.entrySet()) {<NEW_LINE>K expectedKey = expectedEntry.getKey();<NEW_LINE>E expectedValue = expectedEntry.getValue();<NEW_LINE>if (actual.containsKey(expectedKey)) {<NEW_LINE>A actualValue = unexpected.remove(expectedKey);<NEW_LINE>if (!valueTester.test(actualValue, expectedValue)) {<NEW_LINE>wrongValues.put(expectedKey, new ValueDifference<>(actualValue, expectedValue));<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>missing.put(expectedKey, expectedValue);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (allowUnexpected) {<NEW_LINE>unexpected.clear();<NEW_LINE>}<NEW_LINE>return new MapDifference<>(missing, unexpected, wrongValues, Sets.union(actual.keySet()<MASK><NEW_LINE>}
, expected.keySet()));
587,588
protected void channelRead0(ChannelHandlerContext ctx, FullHttpRequest msg) throws Exception {<NEW_LINE>String uri = msg.uri();<NEW_LINE>HttpMethod httpMethod = msg.method();<NEW_LINE>HttpHeaders headers = msg.headers();<NEW_LINE>if (HttpMethod.GET == httpMethod) {<NEW_LINE>String[] uriComponents = uri.split("[?]");<NEW_LINE>String endpoint = uriComponents[0];<NEW_LINE>String[] queryParams = uriComponents<MASK><NEW_LINE>if ("/calculate".equalsIgnoreCase(endpoint)) {<NEW_LINE>String[] firstQueryParam = queryParams[0].split("=");<NEW_LINE>String[] secondQueryParam = queryParams[1].split("=");<NEW_LINE>Integer a = Integer.valueOf(firstQueryParam[1]);<NEW_LINE>Integer b = Integer.valueOf(secondQueryParam[1]);<NEW_LINE>String operator = headers.get("operator");<NEW_LINE>Operation operation = new Operation(a, b, operator);<NEW_LINE>ctx.fireChannelRead(operation);<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>throw new UnsupportedOperationException("HTTP method not supported");<NEW_LINE>}<NEW_LINE>}
[1].split("&");
321,010
public void updatePet(Pet body, final Response.Listener<String> responseListener, final Response.ErrorListener errorListener) {<NEW_LINE>Object postBody = body;<NEW_LINE>// verify the required parameter 'body' is set<NEW_LINE>if (body == null) {<NEW_LINE>VolleyError error = new VolleyError("Missing the required parameter 'body' when calling updatePet", new ApiException(400, "Missing the required parameter 'body' when calling updatePet"));<NEW_LINE>}<NEW_LINE>// create path and map variables<NEW_LINE>String path = "/pet".replaceAll("\\{format\\}", "json");<NEW_LINE>// query params<NEW_LINE>List<Pair> queryParams = new ArrayList<Pair>();<NEW_LINE>// header params<NEW_LINE>Map<String, String> headerParams = new HashMap<String, String>();<NEW_LINE>// form params<NEW_LINE>Map<String, String> formParams = new HashMap<String, String>();<NEW_LINE>String[] contentTypes = { "application/json", "application/xml" };<NEW_LINE>String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json";<NEW_LINE>if (contentType.startsWith("multipart/form-data")) {<NEW_LINE>// file uploading<NEW_LINE><MASK><NEW_LINE>HttpEntity httpEntity = localVarBuilder.build();<NEW_LINE>postBody = httpEntity;<NEW_LINE>} else {<NEW_LINE>// normal form params<NEW_LINE>}<NEW_LINE>String[] authNames = new String[] { "petstore_auth" };<NEW_LINE>try {<NEW_LINE>apiInvoker.invokeAPI(basePath, path, "PUT", queryParams, postBody, headerParams, formParams, contentType, authNames, new Response.Listener<String>() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void onResponse(String localVarResponse) {<NEW_LINE>responseListener.onResponse(localVarResponse);<NEW_LINE>}<NEW_LINE>}, new Response.ErrorListener() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void onErrorResponse(VolleyError error) {<NEW_LINE>errorListener.onErrorResponse(error);<NEW_LINE>}<NEW_LINE>});<NEW_LINE>} catch (ApiException ex) {<NEW_LINE>errorListener.onErrorResponse(new VolleyError(ex));<NEW_LINE>}<NEW_LINE>}
MultipartEntityBuilder localVarBuilder = MultipartEntityBuilder.create();
1,063,913
public void onMessage(Message message) {<NEW_LINE>if (!endpoint.isAlive()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (!(message instanceof DataAwareMessage)) {<NEW_LINE>throw new IllegalArgumentException("Expecting: DataAwareMessage, Found: " + message.getClass().getSimpleName());<NEW_LINE>}<NEW_LINE>DataAwareMessage dataAwareMessage = (DataAwareMessage) message;<NEW_LINE>Data messageData = dataAwareMessage.getMessageData();<NEW_LINE>UUID publisherUuid = message.getPublishingMember().getUuid();<NEW_LINE>ClientMessage eventMessage = TopicAddMessageListenerCodec.encodeTopicEvent(messageData, message.getPublishTime(), publisherUuid);<NEW_LINE>boolean isMultithreaded = nodeEngine.getConfig().findTopicConfig(parameters.name).isMultiThreadingEnabled();<NEW_LINE>if (isMultithreaded) {<NEW_LINE>int key = rand.nextInt();<NEW_LINE>int partitionId = hashToIndex(key, nodeEngine.<MASK><NEW_LINE>eventMessage.setPartitionId(partitionId);<NEW_LINE>sendClientMessage(eventMessage);<NEW_LINE>} else {<NEW_LINE>sendClientMessage(partitionKey, eventMessage);<NEW_LINE>}<NEW_LINE>}
getPartitionService().getPartitionCount());
1,007,771
protected void loadConstraints(ParsedNode constraintsNode) throws ParsedNodeException {<NEW_LINE>if (constraintsNode == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>ConstraintsConfig constraints = new ConstraintsConfig();<NEW_LINE>constraints.setNullable(constraintsNode.getChildValue(null, "nullable", Boolean.class));<NEW_LINE>constraints.setNotNullConstraintName(constraintsNode.getChildValue(null, "notNullConstraintName", String.class));<NEW_LINE>constraints.setPrimaryKey(constraintsNode.getChildValue(null, "primaryKey", Boolean.class));<NEW_LINE>constraints.setPrimaryKeyName(constraintsNode.getChildValue(null, "primaryKeyName", String.class));<NEW_LINE>constraints.setPrimaryKeyTablespace(constraintsNode.getChildValue(null, "primaryKeyTablespace", String.class));<NEW_LINE>constraints.setReferences(constraintsNode.getChildValue(null, "references", String.class));<NEW_LINE>constraints.setReferencedTableCatalogName(constraintsNode.getChildValue(null, "referencedTableCatalogName", String.class));<NEW_LINE>constraints.setReferencedTableSchemaName(constraintsNode.getChildValue(null<MASK><NEW_LINE>constraints.setReferencedTableName(constraintsNode.getChildValue(null, "referencedTableName", String.class));<NEW_LINE>constraints.setReferencedColumnNames(constraintsNode.getChildValue(null, "referencedColumnNames", String.class));<NEW_LINE>constraints.setUnique(constraintsNode.getChildValue(null, "unique", Boolean.class));<NEW_LINE>constraints.setUniqueConstraintName(constraintsNode.getChildValue(null, "uniqueConstraintName", String.class));<NEW_LINE>constraints.setCheckConstraint(constraintsNode.getChildValue(null, "checkConstraint", String.class));<NEW_LINE>constraints.setDeleteCascade(constraintsNode.getChildValue(null, "deleteCascade", Boolean.class));<NEW_LINE>constraints.setForeignKeyName(constraintsNode.getChildValue(null, "foreignKeyName", String.class));<NEW_LINE>constraints.setInitiallyDeferred(constraintsNode.getChildValue(null, "initiallyDeferred", Boolean.class));<NEW_LINE>constraints.setDeferrable(constraintsNode.getChildValue(null, "deferrable", Boolean.class));<NEW_LINE>constraints.setValidateNullable(constraintsNode.getChildValue(null, "validateNullable", Boolean.class));<NEW_LINE>constraints.setValidateUnique(constraintsNode.getChildValue(null, "validateUnique", Boolean.class));<NEW_LINE>constraints.setValidatePrimaryKey(constraintsNode.getChildValue(null, "validatePrimaryKey", Boolean.class));<NEW_LINE>constraints.setValidateForeignKey(constraintsNode.getChildValue(null, "validateForeignKey", Boolean.class));<NEW_LINE>setConstraints(constraints);<NEW_LINE>}
, "referencedTableSchemaName", String.class));
1,032,239
public ResourceEntity createDiagramForProcessDefinition(ProcessDefinitionEntity processDefinition, BpmnParse bpmnParse) {<NEW_LINE>if (StringUtils.isEmpty(processDefinition.getKey()) || StringUtils.isEmpty(processDefinition.getResourceName())) {<NEW_LINE>throw new IllegalStateException("Provided process definition must have both key and resource name set.");<NEW_LINE>}<NEW_LINE>ResourceEntity resource = createResourceEntity();<NEW_LINE><MASK><NEW_LINE>try {<NEW_LINE>byte[] diagramBytes = IoUtil.readInputStream(processEngineConfiguration.getProcessDiagramGenerator().generateDiagram(bpmnParse.getBpmnModel(), "png", processEngineConfiguration.getActivityFontName(), processEngineConfiguration.getLabelFontName(), processEngineConfiguration.getAnnotationFontName(), processEngineConfiguration.getClassLoader(), processEngineConfiguration.isDrawSequenceFlowNameWithNoLabelDI()), null);<NEW_LINE>String diagramResourceName = ResourceNameUtil.getProcessDiagramResourceName(processDefinition.getResourceName(), processDefinition.getKey(), "png");<NEW_LINE>resource.setName(diagramResourceName);<NEW_LINE>resource.setBytes(diagramBytes);<NEW_LINE>resource.setDeploymentId(processDefinition.getDeploymentId());<NEW_LINE>// Mark the resource as 'generated'<NEW_LINE>resource.setGenerated(true);<NEW_LINE>} catch (Throwable t) {<NEW_LINE>// if anything goes wrong, we don't store the image (the process will still be executable).<NEW_LINE>LOGGER.warn("Error while generating process diagram, image will not be stored in repository", t);<NEW_LINE>resource = null;<NEW_LINE>}<NEW_LINE>return resource;<NEW_LINE>}
ProcessEngineConfiguration processEngineConfiguration = CommandContextUtil.getProcessEngineConfiguration();
1,558,854
// InitDNSName should be called to initialize the DNSName before calling this function<NEW_LINE>byte[] generateClientContext(byte[] pin, boolean[] done) throws SQLServerException {<NEW_LINE>byte[] pOut;<NEW_LINE>// This is where the size of the filled data returned<NEW_LINE>int[] outsize;<NEW_LINE>outsize = new int[1];<NEW_LINE>outsize[0] = getMaxSSPIBlobSize();<NEW_LINE>pOut = new byte[outsize[0]];<NEW_LINE>// assert DNSName cant be null<NEW_LINE>assert dnsName != null;<NEW_LINE>int failure = SNISecGenClientContext(sniSec, sniSecLen, pin, pin.length, pOut, outsize, done, dnsName, port, null, null, authLogger);<NEW_LINE>if (failure != 0) {<NEW_LINE>if (authLogger.isLoggable(Level.WARNING)) {<NEW_LINE>authLogger.warning(<MASK><NEW_LINE>}<NEW_LINE>con.terminate(SQLServerException.DRIVER_ERROR_NONE, SQLServerException.getErrString("R_integratedAuthenticationFailed"), linkError);<NEW_LINE>}<NEW_LINE>// allocate space based on the size returned<NEW_LINE>byte[] output = new byte[outsize[0]];<NEW_LINE>System.arraycopy(pOut, 0, output, 0, outsize[0]);<NEW_LINE>return output;<NEW_LINE>}
toString() + " Authentication failed code : " + failure);
838,219
protected void writeFrame() {<NEW_LINE>if (pixelWriter != null) {<NEW_LINE>while (!imageState.compareAndSet(WAITING_STATE, RUNNING_STATE)) {<NEW_LINE>if (imageState.get() == DISPOSED_STATE) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>final int[] imageDataBuffer = getImageByteBuffer();<NEW_LINE>synchronized (byteBuffer) {<NEW_LINE>for (int i = 0; i < width * height; i++) {<NEW_LINE>// Alpha<NEW_LINE>imageDataBuffer[i] = // Red<NEW_LINE>((0xff & byteBuffer[i * 4 + 3]) << 24) | // Green<NEW_LINE>((0xff & byteBuffer[i * 4]) << 16) | // BLue<NEW_LINE>((0xff & byteBuffer[i * 4 + 1]) << 8) | ((0xff & byteBuffer[i * 4 + 2]));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>DataBuffer buffer = new DataBufferInt(imageDataBuffer, imageDataBuffer.length);<NEW_LINE>SampleModel sm = new SinglePixelPackedSampleModel(DataBuffer.TYPE_INT, getWidth(), getHeight(), new int[] { 0x00ff0000, 0x0000ff00, 0x000000ff, 0xff000000 });<NEW_LINE>WritableRaster raster = Raster.createWritableRaster(sm, buffer, null);<NEW_LINE>BufferedImage img = new BufferedImage(<MASK><NEW_LINE>BufferedImage img2 = new BufferedImage(getWidth(), getHeight(), BufferedImage.TYPE_INT_ARGB);<NEW_LINE>offGraphics = img2.createGraphics();<NEW_LINE>offGraphics.setColor(component.getBackground());<NEW_LINE>img2.createGraphics().fillRect(0, 0, getWidth(), getHeight());<NEW_LINE>img2.createGraphics().drawImage(img, null, null);<NEW_LINE>component.getGraphics().drawImage(img2, 0, 0, null);<NEW_LINE>} finally {<NEW_LINE>if (!imageState.compareAndSet(RUNNING_STATE, WAITING_STATE)) {<NEW_LINE>throw new RuntimeException("unknown problem with the image state");<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>System.out.println("No graphics context available for rendering.");<NEW_LINE>}<NEW_LINE>}
colorModel, raster, false, null);
1,573,824
protected void updatePlayer(final Server server, final CommandSource sender, final User user, final String[] args) throws PlayerExemptException {<NEW_LINE>try {<NEW_LINE>final Player player = user.getBase();<NEW_LINE>if (player.getHealth() == 0) {<NEW_LINE>throw new PlayerExemptException(tl("healDead"));<NEW_LINE>}<NEW_LINE>final double amount = player.getMaxHealth() - player.getHealth();<NEW_LINE>final EntityRegainHealthEvent erhe = new EntityRegainHealthEvent(player, amount, RegainReason.CUSTOM);<NEW_LINE>ess.getServer().getPluginManager().callEvent(erhe);<NEW_LINE>if (erhe.isCancelled()) {<NEW_LINE>throw new QuietAbortException();<NEW_LINE>}<NEW_LINE>double newAmount = player.getHealth() + erhe.getAmount();<NEW_LINE>if (newAmount > player.getMaxHealth()) {<NEW_LINE>newAmount = player.getMaxHealth();<NEW_LINE>}<NEW_LINE>player.setHealth(newAmount);<NEW_LINE>player.setFoodLevel(20);<NEW_LINE>player.setFireTicks(0);<NEW_LINE>user.sendMessage(tl("heal"));<NEW_LINE>if (ess.getSettings().isRemovingEffectsOnHeal()) {<NEW_LINE>for (final PotionEffect effect : player.getActivePotionEffects()) {<NEW_LINE>player.removePotionEffect(effect.getType());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>sender.sendMessage(tl("healOther"<MASK><NEW_LINE>} catch (final QuietAbortException e) {<NEW_LINE>// Handle Quietly<NEW_LINE>}<NEW_LINE>}
, user.getDisplayName()));
957,455
// ---------------------------------------------------------------------------<NEW_LINE>@Override<NEW_LINE>public boolean onCreateOptionsMenu(Menu menu) {<NEW_LINE>// Log.i("DEBUGGER_TAG", "onCreateOptionsMenu");<NEW_LINE>// We don't use Qt menu system, since it does not support ActionBar.<NEW_LINE>// We handle ActionBar here, in standard Android manner<NEW_LINE>//<NEW_LINE>// QtApplication.InvokeResult res = QtApplication.invokeDelegate(menu);<NEW_LINE>// if (res.invoked)<NEW_LINE>// return (Boolean)res.methodReturns;<NEW_LINE>// else<NEW_LINE>// return super.onCreateOptionsMenu(menu);<NEW_LINE>MenuInflater inflater = getMenuInflater();<NEW_LINE>inflater.inflate(R.menu.activity_main_actions, menu);<NEW_LINE>itemRouteAnnunciator = menu.findItem(R.id.ocpn_route_create_active);<NEW_LINE>if (null != itemRouteAnnunciator) {<NEW_LINE>itemRouteAnnunciator.setVisible(m_showRouteAnnunciator);<NEW_LINE>}<NEW_LINE>itemRouteMenuItem = menu.findItem(R.id.ocpn_action_createroute);<NEW_LINE>if (null != itemRouteMenuItem) {<NEW_LINE>itemRouteMenuItem.setVisible(!m_showRouteAnnunciator);<NEW_LINE>}<NEW_LINE>// Auto follow icon<NEW_LINE>itemFollowActive = menu.findItem(R.id.ocpn_action_follow_active);<NEW_LINE>if (null != itemFollowActive) {<NEW_LINE>itemFollowActive.setVisible(m_isFollowActive);<NEW_LINE>}<NEW_LINE>itemFollowInActive = menu.findItem(R.id.ocpn_action_follow);<NEW_LINE>if (null != itemFollowInActive) {<NEW_LINE>itemFollowInActive.setVisible(!m_isFollowActive);<NEW_LINE>}<NEW_LINE>// Track icon<NEW_LINE>itemTrackActive = menu.<MASK><NEW_LINE>if (null != itemTrackActive) {<NEW_LINE>itemTrackActive.setVisible(m_isTrackActive);<NEW_LINE>}<NEW_LINE>itemTrackInActive = menu.findItem(R.id.ocpn_action_track_toggle_isoff);<NEW_LINE>if (null != itemTrackInActive) {<NEW_LINE>itemTrackInActive.setVisible(!m_isTrackActive);<NEW_LINE>}<NEW_LINE>return super.onCreateOptionsMenu(menu);<NEW_LINE>}
findItem(R.id.ocpn_action_track_toggle_ison);
714,741
private void generateBitwiseOrIns(BIRNonTerminator.BinaryOp binaryIns) {<NEW_LINE>BType opType1 = JvmCodeGenUtil.getReferredType(binaryIns.rhsOp1.variableDcl.type);<NEW_LINE>BType opType2 = JvmCodeGenUtil.getReferredType(<MASK><NEW_LINE>if (opType1.tag == TypeTags.BYTE && opType2.tag == TypeTags.BYTE) {<NEW_LINE>this.loadVar(binaryIns.rhsOp1.variableDcl);<NEW_LINE>this.loadVar(binaryIns.rhsOp2.variableDcl);<NEW_LINE>this.mv.visitInsn(IOR);<NEW_LINE>this.storeToVar(binaryIns.lhsOp.variableDcl);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>this.loadVar(binaryIns.rhsOp1.variableDcl);<NEW_LINE>jvmCastGen.generateCheckCast(this.mv, opType1, symbolTable.intType, this.indexMap);<NEW_LINE>this.loadVar(binaryIns.rhsOp2.variableDcl);<NEW_LINE>jvmCastGen.generateCheckCast(this.mv, opType2, symbolTable.intType, this.indexMap);<NEW_LINE>this.mv.visitInsn(LOR);<NEW_LINE>if (!TypeTags.isSignedIntegerTypeTag(opType1.tag) && !TypeTags.isSignedIntegerTypeTag(opType2.tag) && opType1.tag != TypeTags.UNION && opType2.tag != TypeTags.UNION) {<NEW_LINE>generateIntToUnsignedIntConversion(this.mv, getSmallestBuiltInUnsignedIntSubTypeContainingTypes(opType1, opType2));<NEW_LINE>}<NEW_LINE>this.storeToVar(binaryIns.lhsOp.variableDcl);<NEW_LINE>}
binaryIns.rhsOp2.variableDcl.type);
1,517,207
private void remove() {<NEW_LINE>preview.removeAll();<NEW_LINE>preview.revalidate();<NEW_LINE>preview.repaint();<NEW_LINE>int dpi = DPIS[this.dpi.getSelectedIndex()];<NEW_LINE>int[] dpis = multi.getDpi();<NEW_LINE>com.codename1.ui.EncodedImage[] imgs = multi.getInternalImages();<NEW_LINE>for (int iter = 0; iter < dpis.length; iter++) {<NEW_LINE>if (dpis[iter] == dpi) {<NEW_LINE>com.codename1.ui.EncodedImage[] newImages = new com.codename1.ui.EncodedImage[imgs.length - 1];<NEW_LINE>int[] newDpis = new int[dpis.length - 1];<NEW_LINE>int originalOffset = 0;<NEW_LINE>for (int x = 0; x < newImages.length; x++) {<NEW_LINE>if (originalOffset == iter) {<NEW_LINE>originalOffset++;<NEW_LINE>}<NEW_LINE>newImages[x] = imgs[originalOffset];<NEW_LINE>newDpis<MASK><NEW_LINE>originalOffset++;<NEW_LINE>}<NEW_LINE>multi = new EditableResources.MultiImage();<NEW_LINE>multi.setDpi(newDpis);<NEW_LINE>multi.setInternalImages(newImages);<NEW_LINE>res.setMultiImage(name, multi);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
[x] = dpis[originalOffset];
363,873
public static void encodeCheckbox(FacesContext context, boolean checked, boolean partialSelected, boolean disabled, String styleClass) throws IOException {<NEW_LINE>ResponseWriter writer = context.getResponseWriter();<NEW_LINE>String icon;<NEW_LINE>String boxClass = disabled ? HTML.CHECKBOX_BOX_CLASS + " ui-state-disabled" : HTML.CHECKBOX_BOX_CLASS;<NEW_LINE>boxClass += checked ? " ui-state-active" : "";<NEW_LINE>String containerClass = (styleClass == null) ? HTML.CHECKBOX_CLASS : HTML.CHECKBOX_CLASS + " " + styleClass;<NEW_LINE>if (checked) {<NEW_LINE>icon = HTML.CHECKBOX_CHECKED_ICON_CLASS;<NEW_LINE>} else if (partialSelected) {<NEW_LINE>icon = HTML.CHECKBOX_PARTIAL_CHECKED_ICON_CLASS;<NEW_LINE>} else {<NEW_LINE>icon = HTML.CHECKBOX_UNCHECKED_ICON_CLASS;<NEW_LINE>}<NEW_LINE>writer.startElement("div", null);<NEW_LINE>writer.writeAttribute("class", containerClass, null);<NEW_LINE>writer.startElement("div", null);<NEW_LINE>writer.<MASK><NEW_LINE>writer.startElement("span", null);<NEW_LINE>writer.writeAttribute("class", icon, null);<NEW_LINE>writer.endElement("span");<NEW_LINE>writer.endElement("div");<NEW_LINE>writer.endElement("div");<NEW_LINE>}
writeAttribute("class", boxClass, null);
807,389
public static void main(String[] args) throws Exception {<NEW_LINE>// String s = new String(FileUtil.readAll(new File("d:/tmp/sample-query2.sql")), "EUC_KR");<NEW_LINE>// new<NEW_LINE>String s = "select aa_1 ,( a - b) as b from tab";<NEW_LINE>// String(FileUtil.readAll(new<NEW_LINE>// File("d:/tmp/sample-query2.sql")),"EUC_KR");<NEW_LINE>long time = System.currentTimeMillis();<NEW_LINE>EscapeLiteralSQL ec = new EscapeLiteralSQL(s).process();<NEW_LINE>long etime = System.currentTimeMillis();<NEW_LINE>// FileUtil.save("d:/tmp/sample-query2.out", ec.parsedSql.toString().getBytes());<NEW_LINE>System.out.println("SQL Orgin: " + s);<NEW_LINE>System.out.println("SQL Parsed: " + ec.getParsedSql());<NEW_LINE>System.out.println("PARAM: " + ec.param);<NEW_LINE>s = "select 1 / 2 from dual";<NEW_LINE>ec = new EscapeLiteralSQL(s).process();<NEW_LINE>System.out.println("SQL Orgin: " + s);<NEW_LINE>System.out.println("SQL Parsed: " + ec.getParsedSql());<NEW_LINE>System.out.println("PARAM: " + ec.param);<NEW_LINE>s = "select 1/2 from dual";<NEW_LINE>ec = new EscapeLiteralSQL(s).process();<NEW_LINE>System.out.println("SQL Orgin: " + s);<NEW_LINE>System.out.println("SQL Parsed: " + ec.getParsedSql());<NEW_LINE>System.out.<MASK><NEW_LINE>s = "select 1/2 /* 3/4 3 / 4*/ from dual";<NEW_LINE>ec = new EscapeLiteralSQL(s).process();<NEW_LINE>System.out.println("SQL Orgin: " + s);<NEW_LINE>System.out.println("SQL Parsed: " + ec.getParsedSql());<NEW_LINE>System.out.println("PARAM: " + ec.param);<NEW_LINE>}
println("PARAM: " + ec.param);
224,338
public void crossValidateSetSigma(GeneralDataset<L, F> dataset, int kfold, final Scorer<L> scorer, LineSearcher minimizer) {<NEW_LINE>logger.info("##in Cross Validate, folds = " + kfold);<NEW_LINE>logger.info("##Scorer is " + scorer);<NEW_LINE>featureIndex = dataset.featureIndex;<NEW_LINE>labelIndex = dataset.labelIndex;<NEW_LINE>final CrossValidator<L, F> crossValidator = new CrossValidator<>(dataset, kfold);<NEW_LINE>final ToDoubleFunction<Triple<GeneralDataset<L, F>, GeneralDataset<L, F>, CrossValidator.SavedState>> scoreFn = fold -> {<NEW_LINE>GeneralDataset<L, F<MASK><NEW_LINE>GeneralDataset<L, F> devSet = fold.second();<NEW_LINE>double[] weights = (double[]) fold.third().state;<NEW_LINE>double[][] weights2D;<NEW_LINE>// must of course bypass sigma tuning here.<NEW_LINE>weights2D = trainWeights(trainSet, weights, true);<NEW_LINE>fold.third().state = ArrayUtils.flatten(weights2D);<NEW_LINE>LinearClassifier<L, F> classifier = new LinearClassifier<>(weights2D, trainSet.featureIndex, trainSet.labelIndex);<NEW_LINE>double score = scorer.score(classifier, devSet);<NEW_LINE>// System.out.println("score: "+score);<NEW_LINE>System.out.print(".");<NEW_LINE>return score;<NEW_LINE>};<NEW_LINE>DoubleUnaryOperator negativeScorer = sigmaToTry -> {<NEW_LINE>// sigma = sigmaToTry;<NEW_LINE>setSigma(sigmaToTry);<NEW_LINE>Double averageScore = crossValidator.computeAverage(scoreFn);<NEW_LINE>logger.info("##sigma = " + getSigma() + " -> average Score: " + averageScore);<NEW_LINE>return -averageScore;<NEW_LINE>};<NEW_LINE>double bestSigma = minimizer.minimize(negativeScorer);<NEW_LINE>logger.info("##best sigma: " + bestSigma);<NEW_LINE>setSigma(bestSigma);<NEW_LINE>}
> trainSet = fold.first();
1,829,488
private void forEachReplicatedRecord(List keyRecordExpiry, MapContainer mapContainer, RecordStore recordStore, boolean populateIndexes, long nowInMillis) {<NEW_LINE>long ownedEntryCountOnThisNode = entryCountOnThisNode(mapContainer);<NEW_LINE>EvictionConfig evictionConfig = mapContainer.getMapConfig().getEvictionConfig();<NEW_LINE>boolean perNodeEvictionConfigured = mapContainer.getEvictor() != Evictor.NULL_EVICTOR <MASK><NEW_LINE>for (int i = 0; i < keyRecordExpiry.size(); i += 3) {<NEW_LINE>Data dataKey = (Data) keyRecordExpiry.get(i);<NEW_LINE>Record record = (Record) keyRecordExpiry.get(i + 1);<NEW_LINE>ExpiryMetadata expiryMetadata = (ExpiryMetadata) keyRecordExpiry.get(i + 2);<NEW_LINE>if (perNodeEvictionConfigured) {<NEW_LINE>if (ownedEntryCountOnThisNode >= evictionConfig.getSize()) {<NEW_LINE>if (operation.getReplicaIndex() == 0) {<NEW_LINE>recordStore.doPostEvictionOperations(dataKey, record.getValue(), ExpiryReason.NOT_EXPIRED);<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>recordStore.putOrUpdateReplicatedRecord(dataKey, record, expiryMetadata, populateIndexes, nowInMillis);<NEW_LINE>ownedEntryCountOnThisNode++;<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>recordStore.putOrUpdateReplicatedRecord(dataKey, record, expiryMetadata, populateIndexes, nowInMillis);<NEW_LINE>if (recordStore.shouldEvict()) {<NEW_LINE>// No need to continue replicating records anymore.<NEW_LINE>// We are already over eviction threshold, each put record will cause another eviction.<NEW_LINE>recordStore.evictEntries(dataKey);<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>recordStore.disposeDeferredBlocks();<NEW_LINE>}<NEW_LINE>}
&& evictionConfig.getMaxSizePolicy() == PER_NODE;
771,102
public void execute(JavaBasePlugin javaBasePlugin) {<NEW_LINE>final TaskProvider<GenerateEclipseClasspath> task = project.getTasks().register(ECLIPSE_CP_TASK_NAME, GenerateEclipseClasspath.class, model.getClasspath());<NEW_LINE>task.configure(new Action<GenerateEclipseClasspath>() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void execute(final GenerateEclipseClasspath task) {<NEW_LINE>task.setDescription("Generates the Eclipse classpath file.");<NEW_LINE>task.setInputFile(project.file(".classpath"));<NEW_LINE>task.setOutputFile(project.file(".classpath"));<NEW_LINE>}<NEW_LINE>});<NEW_LINE>addWorker(task, ECLIPSE_CP_TASK_NAME);<NEW_LINE>XmlTransformer xmlTransformer = new XmlTransformer();<NEW_LINE>xmlTransformer.setIndentation("\t");<NEW_LINE>model.getClasspath().setFile(new XmlFileContentMerger(xmlTransformer));<NEW_LINE>model.getClasspath().setSourceSets(project.getExtensions().getByType(JavaPluginExtension<MASK><NEW_LINE>AfterEvaluateHelper.afterEvaluateOrExecute(project, new Action<Project>() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void execute(Project p) {<NEW_LINE>// keep the ordering we had in earlier gradle versions<NEW_LINE>Set<String> containers = Sets.newLinkedHashSet();<NEW_LINE>containers.add("org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/" + model.getJdt().getJavaRuntimeName() + "/");<NEW_LINE>containers.addAll(model.getClasspath().getContainers());<NEW_LINE>model.getClasspath().setContainers(containers);<NEW_LINE>}<NEW_LINE>});<NEW_LINE>configureScalaDependencies(project, model);<NEW_LINE>configureJavaClasspath(project, task, model, testSourceSetsConvention, testConfigurationsConvention);<NEW_LINE>}
.class).getSourceSets());
1,599,242
public static void vertical9(Kernel1D_F64 kernel, GrayF64 src, GrayF64 dst) {<NEW_LINE>final double[] dataSrc = src.data;<NEW_LINE>final double[] dataDst = dst.data;<NEW_LINE>final double k1 = kernel.data[0];<NEW_LINE>final double k2 = kernel.data[1];<NEW_LINE>final double k3 = kernel.data[2];<NEW_LINE>final double k4 = kernel.data[3];<NEW_LINE>final double k5 = kernel.data[4];<NEW_LINE>final double k6 = kernel.data[5];<NEW_LINE>final double k7 = kernel.data[6];<NEW_LINE>final double k8 = kernel.data[7];<NEW_LINE>final double k9 = kernel.data[8];<NEW_LINE>final int radius = kernel.getRadius();<NEW_LINE>final int imgWidth = dst.getWidth();<NEW_LINE>final int imgHeight = dst.getHeight();<NEW_LINE>final int yEnd = imgHeight - radius;<NEW_LINE>// CONCURRENT_BELOW BoofConcurrency.loopFor(radius, yEnd, y -> {<NEW_LINE>for (int y = radius; y < yEnd; y++) {<NEW_LINE>int indexDst = dst.startIndex + y * dst.stride;<NEW_LINE>int i = src.startIndex + (y - radius) * src.stride;<NEW_LINE>final int iEnd = i + imgWidth;<NEW_LINE>for (; i < iEnd; i++) {<NEW_LINE>int indexSrc = i;<NEW_LINE>double total = (dataSrc[indexSrc]) * k1;<NEW_LINE>indexSrc += src.stride;<NEW_LINE>total += (dataSrc[indexSrc]) * k2;<NEW_LINE>indexSrc += src.stride;<NEW_LINE>total += (dataSrc[indexSrc]) * k3;<NEW_LINE>indexSrc += src.stride;<NEW_LINE>total += (dataSrc[indexSrc]) * k4;<NEW_LINE>indexSrc += src.stride;<NEW_LINE>total += (dataSrc[indexSrc]) * k5;<NEW_LINE>indexSrc += src.stride;<NEW_LINE>total += (dataSrc[indexSrc]) * k6;<NEW_LINE>indexSrc += src.stride;<NEW_LINE>total += (dataSrc[indexSrc]) * k7;<NEW_LINE>indexSrc += src.stride;<NEW_LINE>total += (dataSrc[indexSrc]) * k8;<NEW_LINE>indexSrc += src.stride;<NEW_LINE>total += <MASK><NEW_LINE>dataDst[indexDst++] = total;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// CONCURRENT_ABOVE });<NEW_LINE>}
(dataSrc[indexSrc]) * k9;
317,819
public TBigInteger divide(TBigInteger divisor) {<NEW_LINE>if (divisor.sign == 0) {<NEW_LINE>throw new ArithmeticException("BigInteger divide by zero");<NEW_LINE>}<NEW_LINE>int divisorSign = divisor.sign;<NEW_LINE>if (divisor.isOne()) {<NEW_LINE>return divisor.sign > 0 ? this : this.negate();<NEW_LINE>}<NEW_LINE>int thisSign = sign;<NEW_LINE>int thisLen = numberLength;<NEW_LINE>int divisorLen = divisor.numberLength;<NEW_LINE>if (thisLen + divisorLen == 2) {<NEW_LINE>long val = (digits[0] & 0xFFFFFFFFL) / (divisor<MASK><NEW_LINE>if (thisSign != divisorSign) {<NEW_LINE>val = -val;<NEW_LINE>}<NEW_LINE>return valueOf(val);<NEW_LINE>}<NEW_LINE>int cmp = thisLen != divisorLen ? (thisLen > divisorLen ? 1 : -1) : TElementary.compareArrays(digits, divisor.digits, thisLen);<NEW_LINE>if (cmp == EQUALS) {<NEW_LINE>return thisSign == divisorSign ? ONE : MINUS_ONE;<NEW_LINE>}<NEW_LINE>if (cmp == LESS) {<NEW_LINE>return ZERO;<NEW_LINE>}<NEW_LINE>int resLength = thisLen - divisorLen + 1;<NEW_LINE>int[] resDigits = new int[resLength];<NEW_LINE>int resSign = thisSign == divisorSign ? 1 : -1;<NEW_LINE>if (divisorLen == 1) {<NEW_LINE>TDivision.divideArrayByInt(resDigits, digits, thisLen, divisor.digits[0]);<NEW_LINE>} else {<NEW_LINE>TDivision.divide(resDigits, resLength, digits, thisLen, divisor.digits, divisorLen);<NEW_LINE>}<NEW_LINE>TBigInteger result = new TBigInteger(resSign, resLength, resDigits);<NEW_LINE>result.cutOffLeadingZeroes();<NEW_LINE>return result;<NEW_LINE>}
.digits[0] & 0xFFFFFFFFL);
738,537
final DeletePermissionPolicyResult executeDeletePermissionPolicy(DeletePermissionPolicyRequest deletePermissionPolicyRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(deletePermissionPolicyRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<DeletePermissionPolicyRequest> request = null;<NEW_LINE>Response<DeletePermissionPolicyResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new DeletePermissionPolicyRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(deletePermissionPolicyRequest));<NEW_LINE>// Binds the request metrics to the current request.<NEW_LINE>request.setAWSRequestMetrics(awsRequestMetrics);<NEW_LINE>request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);<NEW_LINE>request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SERVICE_ID, "WAF Regional");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeletePermissionPolicy");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<DeletePermissionPolicyResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeletePermissionPolicyResultJsonUnmarshaller());<NEW_LINE>response = <MASK><NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
invoke(request, responseHandler, executionContext);
1,448,160
public Pack read(DataInputX din) throws IOException {<NEW_LINE>DataInputX d = new <MASK><NEW_LINE>readInternal(d);<NEW_LINE>if (this.sqlTotalCnt > 0) {<NEW_LINE>this.sqlStats = new ArrayList<MapValue>((int) this.sqlTotalCnt);<NEW_LINE>MapValue value;<NEW_LINE>for (int i = 0; i < this.sqlTotalCnt; i++) {<NEW_LINE>value = new MapValue();<NEW_LINE>this.sqlStats.add(value);<NEW_LINE>value.put("hashValue", (long) d.readInt());<NEW_LINE>value.put("runs", (long) d.readInt());<NEW_LINE>value.put("startTime", d.readLong());<NEW_LINE>value.put("endTime", d.readLong());<NEW_LINE>value.put("totalTime", d.readLong());<NEW_LINE>value.put("minTime", d.readLong());<NEW_LINE>value.put("maxTime", d.readLong());<NEW_LINE>value.put("processedRows", d.readLong());<NEW_LINE>value.put("rowed", new BooleanValue(d.readBoolean()));<NEW_LINE>}<NEW_LINE>this.uniqueSqls = new HashMap<Integer, String>(this.sqlTotalCnt);<NEW_LINE>for (int i = 0; i < this.sqlTotalCnt; i++) {<NEW_LINE>this.uniqueSqls.put(d.readInt(), d.readText());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return this;<NEW_LINE>}
DataInputX(din.readBlob());
1,273,314
private List<Call.CallDetail> buildServiceRelation(SearchBuilder sourceBuilder, String indexName, DetectPoint detectPoint) {<NEW_LINE>sourceBuilder.aggregation(Aggregation.terms(Metrics.ENTITY_ID).field(Metrics.ENTITY_ID).subAggregation(Aggregation.terms(ServiceRelationServerSideMetrics.COMPONENT_ID).field(ServiceRelationServerSideMetrics.COMPONENT_ID)).size(1000));<NEW_LINE>final String index = IndexController.LogicIndicesRegister.getPhysicalTableName(indexName);<NEW_LINE>final SearchResponse response = getClient().search(<MASK><NEW_LINE>final List<Call.CallDetail> calls = new ArrayList<>();<NEW_LINE>final Map<String, Object> entityTerms = (Map<String, Object>) response.getAggregations().get(Metrics.ENTITY_ID);<NEW_LINE>final List<Map<String, Object>> buckets = (List<Map<String, Object>>) entityTerms.get("buckets");<NEW_LINE>for (final Map<String, Object> entityBucket : buckets) {<NEW_LINE>String entityId = (String) entityBucket.get("key");<NEW_LINE>final Map<String, Object> componentTerms = (Map<String, Object>) entityBucket.get(ServiceRelationServerSideMetrics.COMPONENT_ID);<NEW_LINE>final List<Map<String, Object>> subAgg = (List<Map<String, Object>>) componentTerms.get("buckets");<NEW_LINE>final int componentId = ((Number) subAgg.iterator().next().get("key")).intValue();<NEW_LINE>Call.CallDetail call = new Call.CallDetail();<NEW_LINE>call.buildFromServiceRelation(entityId, componentId, detectPoint);<NEW_LINE>calls.add(call);<NEW_LINE>}<NEW_LINE>return calls;<NEW_LINE>}
index, sourceBuilder.build());
1,640,557
public MappeableContainer xor(MappeableBitmapContainer value2) {<NEW_LINE>int newCardinality = 0;<NEW_LINE>if (BufferUtil.isBackedBySimpleArray(this.bitmap) && BufferUtil.isBackedBySimpleArray(value2.bitmap)) {<NEW_LINE>long[] b = this.bitmap.array();<NEW_LINE>long[] v2 = value2.bitmap.array();<NEW_LINE>int len = this.bitmap.limit();<NEW_LINE>for (int k = 0; k < len; ++k) {<NEW_LINE>newCardinality += Long.bitCount(b[k] ^ v2[k]);<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>int len = this.bitmap.limit();<NEW_LINE>for (int k = 0; k < len; ++k) {<NEW_LINE>newCardinality += Long.bitCount(this.bitmap.get(k) ^ value2.bitmap.get(k));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (newCardinality > MappeableArrayContainer.DEFAULT_MAX_SIZE) {<NEW_LINE>final MappeableBitmapContainer answer = new MappeableBitmapContainer();<NEW_LINE>long[] bitArray = answer.bitmap.array();<NEW_LINE>if (BufferUtil.isBackedBySimpleArray(this.bitmap) && BufferUtil.isBackedBySimpleArray(value2.bitmap)) {<NEW_LINE>long[] b = this.bitmap.array();<NEW_LINE>long[] v2 = value2.bitmap.array();<NEW_LINE>int len = answer.bitmap.limit();<NEW_LINE>for (int k = 0; k < len; ++k) {<NEW_LINE>bitArray[k] = b<MASK><NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>int len = answer.bitmap.limit();<NEW_LINE>for (int k = 0; k < len; ++k) {<NEW_LINE>bitArray[k] = this.bitmap.get(k) ^ value2.bitmap.get(k);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>answer.cardinality = newCardinality;<NEW_LINE>return answer;<NEW_LINE>}<NEW_LINE>final MappeableArrayContainer ac = new MappeableArrayContainer(newCardinality);<NEW_LINE>BufferUtil.fillArrayXOR(ac.content.array(), this.bitmap, value2.bitmap);<NEW_LINE>ac.cardinality = newCardinality;<NEW_LINE>return ac;<NEW_LINE>}
[k] ^ v2[k];
406,755
public InputWhitelistRule unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>InputWhitelistRule inputWhitelistRule = new InputWhitelistRule();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE><MASK><NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>JsonToken token = context.getCurrentToken();<NEW_LINE>if (token == null)<NEW_LINE>token = context.nextToken();<NEW_LINE>if (token == VALUE_NULL) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>while (true) {<NEW_LINE>if (token == null)<NEW_LINE>break;<NEW_LINE>if (token == FIELD_NAME || token == START_OBJECT) {<NEW_LINE>if (context.testExpression("cidr", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>inputWhitelistRule.setCidr(context.getUnmarshaller(String.class).unmarshall(context));<NEW_LINE>}<NEW_LINE>} else if (token == END_ARRAY || token == END_OBJECT) {<NEW_LINE>if (context.getLastParsedParentElement() == null || context.getLastParsedParentElement().equals(currentParentElement)) {<NEW_LINE>if (context.getCurrentDepth() <= originalDepth)<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>token = context.nextToken();<NEW_LINE>}<NEW_LINE>return inputWhitelistRule;<NEW_LINE>}
String currentParentElement = context.getCurrentParentElement();
511,885
public com.amazonaws.services.codecommit.model.ApprovalRuleNameRequiredException unmarshallFromContext(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>com.amazonaws.services.codecommit.model.ApprovalRuleNameRequiredException approvalRuleNameRequiredException = new com.amazonaws.services.codecommit.model.ApprovalRuleNameRequiredException(null);<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE><MASK><NEW_LINE>if (token == null)<NEW_LINE>token = context.nextToken();<NEW_LINE>if (token == VALUE_NULL) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>while (true) {<NEW_LINE>if (token == null)<NEW_LINE>break;<NEW_LINE>if (token == FIELD_NAME || token == START_OBJECT) {<NEW_LINE>} else if (token == END_ARRAY || token == END_OBJECT) {<NEW_LINE>if (context.getLastParsedParentElement() == null || context.getLastParsedParentElement().equals(currentParentElement)) {<NEW_LINE>if (context.getCurrentDepth() <= originalDepth)<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>token = context.nextToken();<NEW_LINE>}<NEW_LINE>return approvalRuleNameRequiredException;<NEW_LINE>}
JsonToken token = context.getCurrentToken();
1,746,489
protected void initConfigs() {<NEW_LINE>jobName = System.getenv(Constants.JOB_NAME);<NEW_LINE>appIdString = <MASK><NEW_LINE>taskIndex = Integer.parseInt(System.getenv(Constants.TASK_INDEX));<NEW_LINE>numTasks = Integer.parseInt(System.getenv(Constants.TASK_NUM));<NEW_LINE>taskId = jobName + ":" + taskIndex;<NEW_LINE>LOG.info("Executor is running task " + taskId);<NEW_LINE>String isChiefEnvValue = System.getenv(Constants.IS_CHIEF);<NEW_LINE>isChief = Boolean.parseBoolean(isChiefEnvValue);<NEW_LINE>String distributedModeEnvValue = System.getenv(Constants.DISTRIBUTED_MODE_NAME);<NEW_LINE>distributedMode = TonyConfigurationKeys.DistributedMode.valueOf(distributedModeEnvValue.toUpperCase());<NEW_LINE>amHost = System.getenv(Constants.AM_HOST);<NEW_LINE>amPort = Integer.parseInt(System.getenv(Constants.AM_PORT));<NEW_LINE>tonyConf.addResource(new Path(Constants.TONY_FINAL_XML));<NEW_LINE>executionTimeOut = tonyConf.getInt(TonyConfigurationKeys.TASK_EXECUTION_TIMEOUT, TonyConfigurationKeys.DEFAULT_TASK_EXECUTION_TIMEOUT);<NEW_LINE>hbInterval = tonyConf.getInt(TonyConfigurationKeys.TASK_HEARTBEAT_INTERVAL_MS, TonyConfigurationKeys.DEFAULT_TASK_HEARTBEAT_INTERVAL_MS);<NEW_LINE>String[] shellEnvs = tonyConf.getStrings(TonyConfigurationKeys.EXECUTION_ENV);<NEW_LINE>shellEnv = Utils.parseKeyValue(shellEnvs);<NEW_LINE>taskCommand = tonyConf.get(TonyConfigurationKeys.getExecuteCommandKey(jobName), tonyConf.get(TonyConfigurationKeys.getContainerExecuteCommandKey()));<NEW_LINE>if (taskCommand == null) {<NEW_LINE>LOG.fatal("Task command is empty. Please set tony.[jobtype].command " + "or pass --executes in command line");<NEW_LINE>throw new IllegalArgumentException("Task command is empty.");<NEW_LINE>}<NEW_LINE>LOG.info("Task command: " + taskCommand);<NEW_LINE>frameworkType = tonyConf.get(TonyConfigurationKeys.FRAMEWORK_NAME, TonyConfigurationKeys.DEFAULT_FRAMEWORK_NAME).toUpperCase();<NEW_LINE>metricsRPCPort = Integer.parseInt(System.getenv(Constants.METRICS_RPC_PORT));<NEW_LINE>metricsIntervalMs = tonyConf.getInt(TonyConfigurationKeys.TASK_METRICS_UPDATE_INTERVAL_MS, TonyConfigurationKeys.DEFAULT_TASK_METRICS_UPDATE_INTERVAL_MS);<NEW_LINE>maxConsecutiveHBMiss = tonyConf.getInt(TonyConfigurationKeys.TASK_MAX_MISSED_HEARTBEATS, TonyConfigurationKeys.DEFAULT_TASK_MAX_MISSED_HEARTBEATS);<NEW_LINE>// Only for test case.<NEW_LINE>markedAsLostConnectionWithAM = shellEnv.getOrDefault(MARK_LOST_CONNECTION_ENV_KEY, "false").equalsIgnoreCase("true");<NEW_LINE>registerToAMTimeout = tonyConf.getInt(TonyConfigurationKeys.TASK_EXECUTOR_MAX_REGISTRY_SEC, TonyConfigurationKeys.DEFAULT_TASK_EXECUTOR_MAX_REGISTRY_SEC);<NEW_LINE>containerLogDir = System.getProperty(YarnConfiguration.YARN_APP_CONTAINER_LOG_DIR);<NEW_LINE>executionErrorMsgOutputMaxDepth = tonyConf.getInt(TonyConfigurationKeys.TASK_EXECUTOR_EXECUTION_ERROR_MESSAGE_MAX_DEPTH, TonyConfigurationKeys.DEFAULT_TASK_EXECUTOR_EXECUTION_ERROR_MESSAGE_MAX_DEPTH);<NEW_LINE>Utils.initYarnConf(yarnConf);<NEW_LINE>Utils.initHdfsConf(hdfsConf);<NEW_LINE>}
System.getenv(Constants.APPID);
1,777,695
private static <T> void checkTemplateContracts(CtClass<T> c) {<NEW_LINE>for (CtField f : c.getFields()) {<NEW_LINE>Parameter templateParamAnnotation = f.getAnnotation(Parameter.class);<NEW_LINE>if (templateParamAnnotation != null && !templateParamAnnotation.value().isEmpty()) {<NEW_LINE>String proxyName = templateParamAnnotation.value();<NEW_LINE>// contract: if value, then the field type must be String or CtTypeReference<NEW_LINE>String fieldTypeQName = f.getType().getQualifiedName();<NEW_LINE>if (fieldTypeQName.equals(String.class.getName())) {<NEW_LINE>// contract: the name of the template parameter must correspond to the name of the field<NEW_LINE>// as found, by Pavel, this is not good contract because it prevents easy refactoring of templates<NEW_LINE>// we remove it but keep the commented code in case somebody would come up with this bad idea<NEW_LINE>// if (!f.getSimpleName().equals("_" + f.getAnnotation(Parameter.class).value())) {<NEW_LINE>// throw new TemplateException("the field name of a proxy template parameter must be called _" + f.getSimpleName());<NEW_LINE>// }<NEW_LINE>// contract: if a proxy parameter is declared and named "x" (@Parameter("x")), then a type member named "x" must exist.<NEW_LINE>boolean found = false;<NEW_LINE>for (CtTypeMember member : c.getTypeMembers()) {<NEW_LINE>if (member.getSimpleName().equals(proxyName)) {<NEW_LINE>found = true;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (!found) {<NEW_LINE>throw new TemplateException("if a proxy parameter is declared and named \"" + proxyName + "\", then a type member named \"\" + proxyName + \"\" must exist.");<NEW_LINE>}<NEW_LINE>} else if (fieldTypeQName.equals(CtTypeReference.class.getName())) {<NEW_LINE>// OK it is CtTypeReference<NEW_LINE>} else {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
throw new TemplateException("proxy template parameter must be typed as String or CtTypeReference, but it is " + fieldTypeQName);
517,395
public static TagUrn createFromUrn(Urn urn) throws URISyntaxException {<NEW_LINE>if (!"li".equals(urn.getNamespace())) {<NEW_LINE>throw new URISyntaxException(urn.toString(), "Urn namespace type should be 'li'.");<NEW_LINE>} else if (!ENTITY_TYPE.equals(urn.getEntityType())) {<NEW_LINE>throw new URISyntaxException(urn.toString(), "Urn entity type should be '" + urn.getEntityType() + "'.");<NEW_LINE>} else {<NEW_LINE><MASK><NEW_LINE>if (key.size() != 1) {<NEW_LINE>throw new URISyntaxException(urn.toString(), "Invalid number of keys: found " + key.size() + " expected 1.");<NEW_LINE>} else {<NEW_LINE>try {<NEW_LINE>return new TagUrn((String) key.getAs(0, String.class));<NEW_LINE>} catch (Exception e) {<NEW_LINE>throw new URISyntaxException(urn.toString(), "Invalid URN Parameter: '" + e.getMessage());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
TupleKey key = urn.getEntityKey();
618,735
public void encodeTbody(FacesContext context, TreeTable tt, TreeNode root, boolean dataOnly) throws IOException {<NEW_LINE>ResponseWriter writer = context.getResponseWriter();<NEW_LINE>String clientId = tt.getClientId(context);<NEW_LINE>boolean empty = (root == null || root.getChildCount() == 0);<NEW_LINE>UIComponent emptyFacet = tt.getFacet("emptyMessage");<NEW_LINE>if (!dataOnly) {<NEW_LINE>writer.startElement("tbody", null);<NEW_LINE>writer.writeAttribute("id", clientId + "_data", null);<NEW_LINE>writer.writeAttribute("class", TreeTable.DATA_CLASS, null);<NEW_LINE>}<NEW_LINE>if (empty) {<NEW_LINE>writer.startElement("tr", null);<NEW_LINE>writer.writeAttribute(<MASK><NEW_LINE>writer.startElement("td", null);<NEW_LINE>writer.writeAttribute("colspan", tt.getColumnsCount(), null);<NEW_LINE>if (ComponentUtils.shouldRenderFacet(emptyFacet)) {<NEW_LINE>emptyFacet.encodeAll(context);<NEW_LINE>} else {<NEW_LINE>writer.writeText(tt.getEmptyMessage(), "emptyMessage");<NEW_LINE>}<NEW_LINE>writer.endElement("td");<NEW_LINE>writer.endElement("tr");<NEW_LINE>}<NEW_LINE>if (root != null) {<NEW_LINE>if (tt.isPaginator()) {<NEW_LINE>int first = tt.getFirst();<NEW_LINE>int rows = tt.getRows() == 0 ? tt.getRowCount() : tt.getRows();<NEW_LINE>encodeNodeChildren(context, tt, root, root, first, rows);<NEW_LINE>} else {<NEW_LINE>encodeNodeChildren(context, tt, root, root);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>tt.setRowKey(root, null);<NEW_LINE>if (!dataOnly) {<NEW_LINE>writer.endElement("tbody");<NEW_LINE>}<NEW_LINE>}
"class", TreeTable.EMPTY_MESSAGE_ROW_CLASS, null);
1,147,377
public void processKeyEvent(KeyEvent evt) {<NEW_LINE>if (evt.getID() == KeyEvent.KEY_TYPED) {<NEW_LINE><MASK><NEW_LINE>JTextComponent component = (JTextComponent) evt.getSource();<NEW_LINE>if (confirmChars == null) {<NEW_LINE>confirmChars = getConfirmChars(component);<NEW_LINE>}<NEW_LINE>if (confirmChars.indexOf(c) != -1) {<NEW_LINE>if (c != '.') {<NEW_LINE>Completion.get().hideDocumentation();<NEW_LINE>Completion.get().hideCompletion();<NEW_LINE>}<NEW_LINE>NbEditorDocument doc = (NbEditorDocument) component.getDocument();<NEW_LINE>try {<NEW_LINE>defaultAction(component);<NEW_LINE>doc.insertString(processKeyEventOffset, Character.toString(c), null);<NEW_LINE>} catch (BadLocationException e) {<NEW_LINE>}<NEW_LINE>if (c == '.')<NEW_LINE>Completion.get().showCompletion();<NEW_LINE>evt.consume();<NEW_LINE>}<NEW_LINE>// if<NEW_LINE>}<NEW_LINE>// if<NEW_LINE>}
char c = evt.getKeyChar();
1,846,280
private void renewExpiration() {<NEW_LINE>timeoutTask = commandExecutor.getConnectionManager().newTimeout(t -> {<NEW_LINE>RFuture<Boolean> future = commandExecutor.evalWriteAsync(getRawName(), StringCodec.INSTANCE, RedisCommands.EVAL_BOOLEAN, "if redis.call('zscore', KEYS[1], ARGV[2]) == false then " + "return 0; " + "end; " + "redis.call('zadd', KEYS[1], ARGV[1], ARGV[2]); " + "return 1; ", Arrays.asList(getTimeout()), System.currentTimeMillis() + commandExecutor.getConnectionManager().getCfg().getReliableTopicWatchdogTimeout(), subscriberId.get());<NEW_LINE>future.whenComplete((res, e) -> {<NEW_LINE>if (e != null) {<NEW_LINE>log.error("Can't update reliable topic " + <MASK><NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (res) {<NEW_LINE>// reschedule itself<NEW_LINE>renewExpiration();<NEW_LINE>}<NEW_LINE>});<NEW_LINE>}, commandExecutor.getConnectionManager().getCfg().getReliableTopicWatchdogTimeout() / 3, TimeUnit.MILLISECONDS);<NEW_LINE>}
getRawName() + " expiration time", e);
466,516
public String WSTXLPS09FVT(String test) {<NEW_LINE>XAResourceImpl.clear();<NEW_LINE>final ExtendedTransactionManager TM = TransactionManagerFactory.getTransactionManager();<NEW_LINE>boolean result1 = false, result2 = false, result3 = false, result4 = false, result5 = false;<NEW_LINE>try {<NEW_LINE>final Serializable xaResInfo = XAResourceInfoFactory.getXAResourceInfo(0);<NEW_LINE>final Serializable xaResInfo2 = XAResourceInfoFactory.getXAResourceInfo(1);<NEW_LINE>final Serializable <MASK><NEW_LINE>final Serializable xaResInfo4 = XAResourceInfoFactory.getXAResourceInfo(3);<NEW_LINE>XAResourceImpl xaRes = XAResourceFactoryImpl.instance().getXAResourceImpl(xaResInfo).setPrepareAction(XAException.XA_RDONLY);<NEW_LINE>XAResourceImpl xaRes2 = XAResourceFactoryImpl.instance().getXAResourceImpl(xaResInfo2).setPrepareAction(XAException.XA_RDONLY);<NEW_LINE>XAResourceImpl xaRes3 = XAResourceFactoryImpl.instance().getXAResourceImpl(xaResInfo3).setPrepareAction(XAException.XA_RDONLY);<NEW_LINE>XAResourceImpl xaRes4 = XAResourceFactoryImpl.instance().getXAResourceImpl(xaResInfo4).setPrepareAction(XAException.XA_RDONLY);<NEW_LINE>final int recoveryId = TM.registerResourceInfo("xaResInfo", xaResInfo);<NEW_LINE>final int recoveryId2 = TM.registerResourceInfo("xaResInfo2", xaResInfo2);<NEW_LINE>final int recoveryId3 = TM.registerResourceInfo("xaResInfo3", xaResInfo3);<NEW_LINE>final int recoveryId4 = TM.registerResourceInfo("xaResInfo4", xaResInfo4);<NEW_LINE>result1 = TM.enlist(xaRes, recoveryId);<NEW_LINE>result2 = TM.enlist(xaRes2, recoveryId2);<NEW_LINE>XAResourceImpl onePhaseXAResource = new OnePhaseXAResourceImpl();<NEW_LINE>onePhaseXAResource.setExpectedDirection(XAResourceImpl.DIRECTION_COMMIT);<NEW_LINE>result3 = TM.getTransaction().enlistResource(onePhaseXAResource);<NEW_LINE>result4 = TM.enlist(xaRes3, recoveryId3);<NEW_LINE>result5 = TM.enlist(xaRes4, recoveryId4);<NEW_LINE>} catch (IllegalStateException e) {<NEW_LINE>e.printStackTrace();<NEW_LINE>return "IllegalStateException happens: " + e.toString() + " Operation failed.";<NEW_LINE>} catch (RollbackException e) {<NEW_LINE>e.printStackTrace();<NEW_LINE>return "RollbackException happens: " + e.toString() + " Operation failed.";<NEW_LINE>} catch (SystemException e) {<NEW_LINE>e.printStackTrace();<NEW_LINE>return "SystemException happens: " + e.toString() + " Operation failed.";<NEW_LINE>} catch (XAResourceNotAvailableException e) {<NEW_LINE>e.printStackTrace();<NEW_LINE>return "XAResourceNotAvailableException happens: " + e.toString() + " Operation failed.";<NEW_LINE>}<NEW_LINE>return "WSTXLPS" + test + "FVT: Enlist XAResource voting readonly" + (result1 ? " successful" : " failed") + "; Enlist XAResource voting readonly" + (result2 ? " successful" : " failed") + "; Enlist OnePhaseResource" + (result3 ? " successful" : " failed") + "; Enlist XAResource voting readonly" + (result4 ? " successful" : " failed") + "; Enlist XAResource voting readonly" + (result5 ? " successful" : " failed");<NEW_LINE>}
xaResInfo3 = XAResourceInfoFactory.getXAResourceInfo(2);
1,297,399
public RenderableNode parse(Token token, Parser parser) {<NEW_LINE>TokenStream stream = parser.getStream();<NEW_LINE>int lineNumber = token.getLineNumber();<NEW_LINE>// skip the 'filter' token<NEW_LINE>stream.next();<NEW_LINE>List<Expression<?>> filterInvocationExpressions = new ArrayList<>();<NEW_LINE>filterInvocationExpressions.add(parser.<MASK><NEW_LINE>while (stream.current().test(Type.OPERATOR, "|")) {<NEW_LINE>// skip the '|' token<NEW_LINE>stream.next();<NEW_LINE>filterInvocationExpressions.add(parser.getExpressionParser().parseFilterInvocationExpression());<NEW_LINE>}<NEW_LINE>stream.expect(Token.Type.EXECUTE_END);<NEW_LINE>BodyNode body = parser.subparse(tkn -> tkn.test(Type.NAME, "endfilter"));<NEW_LINE>stream.next();<NEW_LINE>stream.expect(Token.Type.EXECUTE_END);<NEW_LINE>Expression<?> lastExpression = new RenderableNodeExpression(body, stream.current().getLineNumber());<NEW_LINE>for (Expression<?> filterInvocationExpression : filterInvocationExpressions) {<NEW_LINE>FilterExpression filterExpression = new FilterExpression();<NEW_LINE>filterExpression.setRight(filterInvocationExpression);<NEW_LINE>filterExpression.setLeft(lastExpression);<NEW_LINE>lastExpression = filterExpression;<NEW_LINE>}<NEW_LINE>return new PrintNode(lastExpression, lineNumber);<NEW_LINE>}
getExpressionParser().parseFilterInvocationExpression());
1,034,591
private int sortTriangles(int l, int r, float split, int axis) {<NEW_LINE>int pivot = l;<NEW_LINE>int j = r;<NEW_LINE><MASK><NEW_LINE>Vector3f v1 = vars.vect1, v2 = vars.vect2, v3 = vars.vect3;<NEW_LINE>while (pivot <= j) {<NEW_LINE>getTriangle(pivot, v1, v2, v3);<NEW_LINE>v1.addLocal(v2).addLocal(v3).multLocal(FastMath.ONE_THIRD);<NEW_LINE>if (v1.get(axis) > split) {<NEW_LINE>swapTriangles(pivot, j);<NEW_LINE>--j;<NEW_LINE>} else {<NEW_LINE>++pivot;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>vars.release();<NEW_LINE>pivot = (pivot == l && j < pivot) ? j : pivot;<NEW_LINE>return pivot;<NEW_LINE>}
TempVars vars = TempVars.get();
584,456
public void updatePreferences() {<NEW_LINE>Matcher matcher = ID_PREFIX_PATTERN.matcher(policy.getIdPrefix());<NEW_LINE>if (!matcher.matches()) {<NEW_LINE>logger.warn("[IdRanges] Cannot process prefix {}", policy.getIdPrefix());<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>logger.info("[IdRanges] Setting id digit count to {}", policy.getIdDigitCount());<NEW_LINE>EntityCreationPreferences.<MASK><NEW_LINE>String baseIri = matcher.group(1);<NEW_LINE>logger.info("[IdRanges] Setting prefix to {}", baseIri);<NEW_LINE>EntityCreationPreferences.setDefaultBaseIRI(IRI.create(baseIri));<NEW_LINE>EntityCreationPreferences.setUseDefaultBaseIRI(true);<NEW_LINE>String separator = matcher.group(2);<NEW_LINE>logger.info("[IdRanges] Setting separator to {}", separator);<NEW_LINE>EntityCreationPreferences.setDefaultSeparator(separator);<NEW_LINE>String protegePrefix = matcher.group(3) + "_";<NEW_LINE>logger.info("[IdRanges] Setting entity prefix to {}", protegePrefix);<NEW_LINE>EntityCreationPreferences.setPrefix(protegePrefix);<NEW_LINE>EntityCreationPreferences.setSuffix("");<NEW_LINE>logger.info("[IdRanges] Setting entity local name to auto-generated");<NEW_LINE>EntityCreationPreferences.setFragmentAutoGenerated(true);<NEW_LINE>logger.info("[IdRanges] Setting labelling property to rdfs:label");<NEW_LINE>EntityCreationPreferences.setGenerateIDLabel(false);<NEW_LINE>EntityCreationPreferences.setGenerateNameLabel(true);<NEW_LINE>EntityCreationPreferences.setNameLabelIRI(OWLRDFVocabulary.RDFS_LABEL.getIRI());<NEW_LINE>updateRangeForCurrentUserName();<NEW_LINE>}
setAutoIDDigitCount(policy.getIdDigitCount());
890,979
private static OperandTreeNode createNewOperand(final INaviModule module, final ICodeNodeProvider dataset) throws ParserException {<NEW_LINE>final <MASK><NEW_LINE>final int type = dataset.getExpressionTreeType();<NEW_LINE>final String value = getValue(dataset, type);<NEW_LINE>final Integer parentId = dataset.getParentId();<NEW_LINE>final String replacementString = dataset.getReplacement();<NEW_LINE>final IAddress functionAddress = dataset.getFunctionAddress();<NEW_LINE>final Integer typeId = dataset.getSubstitutionTypeId();<NEW_LINE>RawTypeSubstitution substitution = null;<NEW_LINE>if (typeId != null) {<NEW_LINE>substitution = new RawTypeSubstitution(dataset.getInstructionAddress(), dataset.getSubstitutionPosition(), expressionId, typeId, dataset.getSubstitutionPath(), dataset.getSubstitutionOffset());<NEW_LINE>}<NEW_LINE>final Integer instanceId = dataset.getTypeInstanceId() == null ? null : dataset.getTypeInstanceId();<NEW_LINE>final int operandPosition = dataset.getOperandPosition();<NEW_LINE>final IAddress address = dataset.getInstructionAddress();<NEW_LINE>// The function parse references moves the dataset around quite heavily therefore all direct<NEW_LINE>// access to the dataset must be done before.<NEW_LINE>final List<CReference> references = parseReferences(expressionId, dataset);<NEW_LINE>final INaviReplacement replacement = lookupReplacement(replacementString, module, functionAddress);<NEW_LINE>return new OperandTreeNode(expressionId, type, value, getParentId(parentId), replacement, references, substitution, instanceId, operandPosition, address);<NEW_LINE>}
int expressionId = dataset.getExpressionTreeId();
1,712,113
private List<VariantContext> referenceModelForNoVariation(final AssemblyRegion region) {<NEW_LINE>// don't correct overlapping base qualities because we did that upstream<NEW_LINE>// take off soft clips and low Q tails before we calculate likelihoods<NEW_LINE>AssemblyBasedCallerUtils.finalizeRegion(region, false, true, (byte) 9, <MASK><NEW_LINE>final SimpleInterval paddedLoc = region.getPaddedSpan();<NEW_LINE>final Haplotype refHaplotype = AssemblyBasedCallerUtils.createReferenceHaplotype(region, paddedLoc, referenceReader);<NEW_LINE>final List<Haplotype> haplotypes = Collections.singletonList(refHaplotype);<NEW_LINE>return // TODO: clean up args<NEW_LINE>referenceConfidenceModel.// TODO: clean up args<NEW_LINE>calculateRefConfidence(// TODO: clean up args<NEW_LINE>refHaplotype, // TODO: clean up args<NEW_LINE>haplotypes, // TODO: clean up args<NEW_LINE>paddedLoc, // TODO: clean up args<NEW_LINE>region, // TODO: clean up args<NEW_LINE>AssemblyBasedCallerUtils.createDummyStratifiedReadMap(refHaplotype, samplesList, header, region), // TODO: clean up args<NEW_LINE>new HomogeneousPloidyModel(samplesList, 2), // TODO: clean up args<NEW_LINE>Collections.emptyList(), // TODO: clean up args<NEW_LINE>false, Collections.emptyList());<NEW_LINE>}
header, samplesList, false, false);
1,764,582
public void apply(MovieBox mov) {<NEW_LINE>TrakBox vt = mov.getVideoTrack();<NEW_LINE>vt.setPAR(newPAR);<NEW_LINE>Box box = NodeBox.findFirstPath(vt, SampleDescriptionBox.class, Box.path("mdia.minf.stbl.stsd")).getBoxes().get(0);<NEW_LINE>if (box != null && (box instanceof VideoSampleEntry)) {<NEW_LINE>VideoSampleEntry vs = (VideoSampleEntry) box;<NEW_LINE>int codedWidth = (int) vs.getWidth();<NEW_LINE>int codedHeight = (int) vs.getHeight();<NEW_LINE>int displayWidth = codedWidth * newPAR.getNum() / newPAR.getDen();<NEW_LINE>vt.getTrackHeader().setWidth(displayWidth);<NEW_LINE>if (BoxUtil.containsBox(vt, "tapt")) {<NEW_LINE>vt.setAperture(new Size(codedWidth, codedHeight), <MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
new Size(displayWidth, codedHeight));
71,835
public static long round(double a) {<NEW_LINE>long longBits = Double.doubleToRawLongBits(a);<NEW_LINE>long biasedExp = (longBits & DoubleConsts.EXP_BIT_MASK) ><MASK><NEW_LINE>long shift = (DoubleConsts.SIGNIFICAND_WIDTH - 2 + DoubleConsts.EXP_BIAS) - biasedExp;<NEW_LINE>if ((shift & -64) == 0) {<NEW_LINE>// shift >= 0 && shift < 64<NEW_LINE>// a is a finite number such that pow(2,-64) <= ulp(a) < 1<NEW_LINE>long r = ((longBits & DoubleConsts.SIGNIF_BIT_MASK) | (DoubleConsts.SIGNIF_BIT_MASK + 1));<NEW_LINE>if (longBits < 0) {<NEW_LINE>r = -r;<NEW_LINE>}<NEW_LINE>// In the comments below each Java expression evaluates to the value<NEW_LINE>// the corresponding mathematical expression:<NEW_LINE>// (r) evaluates to a / ulp(a)<NEW_LINE>// (r >> shift) evaluates to floor(a * 2)<NEW_LINE>// ((r >> shift) + 1) evaluates to floor((a + 1/2) * 2)<NEW_LINE>// (((r >> shift) + 1) >> 1) evaluates to floor(a + 1/2)<NEW_LINE>return ((r >> shift) + 1) >> 1;<NEW_LINE>} else {<NEW_LINE>// a is either<NEW_LINE>// - a finite number with abs(a) < exp(2,DoubleConsts.SIGNIFICAND_WIDTH-64) < 1/2<NEW_LINE>// - a finite number with ulp(a) >= 1 and hence a is a mathematical integer<NEW_LINE>// - an infinity or NaN<NEW_LINE>return (long) a;<NEW_LINE>}<NEW_LINE>}
> (DoubleConsts.SIGNIFICAND_WIDTH - 1);
1,782,369
private static void mapFireAndForget(FireAndForgetClause fireAndForgetClause, StatementSpecRaw raw, StatementSpecMapContext mapContext) {<NEW_LINE>if (fireAndForgetClause instanceof FireAndForgetDelete) {<NEW_LINE>raw.setFireAndForgetSpec(new FireAndForgetSpecDelete());<NEW_LINE>} else if (fireAndForgetClause instanceof FireAndForgetInsert) {<NEW_LINE>FireAndForgetInsert insert = (FireAndForgetInsert) fireAndForgetClause;<NEW_LINE>List<List<ExprNode>> rows = new ArrayList<>(insert.getRows().size());<NEW_LINE>for (List<Expression> row : insert.getRows()) {<NEW_LINE>List<ExprNode> nodes = new ArrayList<>(row.size());<NEW_LINE>for (Expression expr : row) {<NEW_LINE>nodes.add(mapExpressionDeep(expr, mapContext));<NEW_LINE>}<NEW_LINE>rows.add(nodes);<NEW_LINE>}<NEW_LINE>raw.setFireAndForgetSpec(new FireAndForgetSpecInsert(insert.isUseValuesKeyword(), rows));<NEW_LINE>} else if (fireAndForgetClause instanceof FireAndForgetUpdate) {<NEW_LINE>FireAndForgetUpdate upd = (FireAndForgetUpdate) fireAndForgetClause;<NEW_LINE>List<OnTriggerSetAssignment> assignments = new ArrayList<>();<NEW_LINE>for (Assignment pair : upd.getAssignments()) {<NEW_LINE>ExprNode expr = mapExpressionDeep(<MASK><NEW_LINE>assignments.add(new OnTriggerSetAssignment(expr));<NEW_LINE>}<NEW_LINE>FireAndForgetSpecUpdate updspec = new FireAndForgetSpecUpdate(assignments);<NEW_LINE>raw.setFireAndForgetSpec(updspec);<NEW_LINE>} else {<NEW_LINE>if (fireAndForgetClause == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>throw new IllegalStateException("Unrecognized fire-and-forget clause " + fireAndForgetClause);<NEW_LINE>}<NEW_LINE>}
pair.getValue(), mapContext);
19,450
public void handle(PCmdRequest request, ProfilerCommandServiceGrpc.ProfilerCommandServiceStub profilerCommandServiceStub) {<NEW_LINE>logger.info("simpleCommandService:{}", request);<NEW_LINE>PCmdActiveThreadDump commandActiveThreadDump = request.getCommandActiveThreadDump();<NEW_LINE>PCmdActiveThreadDumpRes.Builder builder = PCmdActiveThreadDumpRes.newBuilder();<NEW_LINE>PCmdResponse commonResponse = PCmdResponse.newBuilder().setResponseId(request.getRequestId()).build();<NEW_LINE>builder.setCommonResponse(commonResponse);<NEW_LINE>builder.setType(JAVA);<NEW_LINE>builder.setSubType(JvmUtils.<MASK><NEW_LINE>builder.setVersion(JvmUtils.getVersion().name());<NEW_LINE>List<PActiveThreadDump> activeThreadDumpList = getActiveThreadDumpList(commandActiveThreadDump);<NEW_LINE>builder.addAllThreadDump(activeThreadDumpList);<NEW_LINE>profilerCommandServiceStub.commandActiveThreadDump(builder.build(), EmptyStreamObserver.create());<NEW_LINE>}
getType().name());
429,423
public ImmutableList<I_C_BP_SupplierApproval> retrieveBPSupplierApprovalsAboutToExpire(final int maxMonthsUntilExpirationDate) {<NEW_LINE>final <MASK><NEW_LINE>final LocalDate maxExpirationDate = today.plusMonths(maxMonthsUntilExpirationDate);<NEW_LINE>final IQueryFilter<I_C_BP_SupplierApproval> filterThreeYears = queryBL.createCompositeQueryFilter(I_C_BP_SupplierApproval.class).addEqualsFilter(I_C_BP_SupplierApproval.COLUMNNAME_SupplierApproval, SupplierApproval.ThreeYears).addCompareFilter(I_C_BP_SupplierApproval.COLUMNNAME_SupplierApproval_Date, CompareQueryFilter.Operator.LESS_OR_EQUAL, maxExpirationDate.minusYears(3));<NEW_LINE>final IQueryFilter<I_C_BP_SupplierApproval> filterTwoYears = queryBL.createCompositeQueryFilter(I_C_BP_SupplierApproval.class).addEqualsFilter(I_C_BP_SupplierApproval.COLUMNNAME_SupplierApproval, SupplierApproval.TwoYears).addCompareFilter(I_C_BP_SupplierApproval.COLUMNNAME_SupplierApproval_Date, CompareQueryFilter.Operator.LESS_OR_EQUAL, maxExpirationDate.minusYears(2));<NEW_LINE>final IQueryFilter<I_C_BP_SupplierApproval> filterOneYear = queryBL.createCompositeQueryFilter(I_C_BP_SupplierApproval.class).addEqualsFilter(I_C_BP_SupplierApproval.COLUMNNAME_SupplierApproval, SupplierApproval.OneYear).addCompareFilter(I_C_BP_SupplierApproval.COLUMNNAME_SupplierApproval_Date, CompareQueryFilter.Operator.LESS_OR_EQUAL, maxExpirationDate.minusYears(1));<NEW_LINE>final IQueryFilter<I_C_BP_SupplierApproval> supplierApprovalOptionFilter = queryBL.createCompositeQueryFilter(I_C_BP_SupplierApproval.class).setJoinOr().addFilter(filterThreeYears).addFilter(filterTwoYears).addFilter(filterOneYear);<NEW_LINE>return queryBL.createQueryBuilder(I_C_BP_SupplierApproval.class).filter(supplierApprovalOptionFilter).create().listImmutable(I_C_BP_SupplierApproval.class);<NEW_LINE>}
LocalDate today = SystemTime.asLocalDate();
969,302
public void run(WorkingCopy workingCopy) throws Exception {<NEW_LINE>boolean changed = false;<NEW_LINE>workingCopy.toPhase(Phase.RESOLVED);<NEW_LINE>TreeMaker make = workingCopy.getTreeMaker();<NEW_LINE>CompilationUnitTree cut = workingCopy.getCompilationUnit();<NEW_LINE>CompilationUnitTree copy = cut;<NEW_LINE>if (!foundImport("javax.xml.namespace.QName", copy)) {<NEW_LINE>copy = make.addCompUnitImport(copy, make.Import(make.Identifier("javax.xml.namespace.QName"), false));<NEW_LINE>changed = true;<NEW_LINE>}<NEW_LINE>if (!foundImport("javax.xml.transform.Source", copy)) {<NEW_LINE>copy = make.addCompUnitImport(copy, make.Import(make.Identifier("javax.xml.transform.Source"), false));<NEW_LINE>changed = true;<NEW_LINE>}<NEW_LINE>if (!foundImport("javax.xml.ws.Dispatch", copy)) {<NEW_LINE>copy = make.addCompUnitImport(copy, make.Import(make.Identifier("javax.xml.ws.Dispatch"), false));<NEW_LINE>changed = true;<NEW_LINE>}<NEW_LINE>if (!foundImport("javax.xml.transform.stream.StreamSource", copy)) {<NEW_LINE>copy = make.addCompUnitImport(copy, make.Import(make.Identifier("javax.xml.transform.stream.StreamSource"), false));<NEW_LINE>changed = true;<NEW_LINE>}<NEW_LINE>if (!foundImport("javax.xml.ws.Service", copy)) {<NEW_LINE>copy = make.addCompUnitImport(copy, make.Import(make.Identifier("javax.xml.ws.Service"), false));<NEW_LINE>changed = true;<NEW_LINE>}<NEW_LINE>if (!foundImport("java.io.StringReader", copy)) {<NEW_LINE>copy = make.addCompUnitImport(copy, make.Import(make.Identifier("java.io.StringReader"), false));<NEW_LINE>changed = true;<NEW_LINE>}<NEW_LINE>if (changed) {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>}
workingCopy.rewrite(cut, copy);
1,626,180
public void generateCode(ClassFile classFile) {<NEW_LINE>classFile.generateMethodInfoHeader(this.binding);<NEW_LINE>int methodAttributeOffset = classFile.contentsOffset;<NEW_LINE>int attributeNumber = classFile.generateMethodInfoAttributes(this.binding);<NEW_LINE>if ((!this.binding.isNative()) && (!this.binding.isAbstract())) {<NEW_LINE>int codeAttributeOffset = classFile.contentsOffset;<NEW_LINE>classFile.generateCodeAttributeHeader();<NEW_LINE>CodeStream codeStream = classFile.codeStream;<NEW_LINE>codeStream.reset(this, classFile);<NEW_LINE>// initialize local positions<NEW_LINE>this.scope.computeLocalVariablePositions(this.binding.isStatic() ? 0 : 1, codeStream);<NEW_LINE>// arguments initialization for local variable debug attributes<NEW_LINE>if (this.arguments != null) {<NEW_LINE>for (int i = 0, max = this.arguments.length; i < max; i++) {<NEW_LINE>LocalVariableBinding argBinding;<NEW_LINE>codeStream.addVisibleLocalVariable(argBinding = this<MASK><NEW_LINE>argBinding.recordInitializationStartPC(0);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (this.statements != null) {<NEW_LINE>for (int i = 0, max = this.statements.length; i < max; i++) this.statements[i].generateCode(this.scope, codeStream);<NEW_LINE>}<NEW_LINE>// if a problem got reported during code gen, then trigger problem method creation<NEW_LINE>if (this.ignoreFurtherInvestigation) {<NEW_LINE>throw new AbortMethod(this.scope.referenceCompilationUnit().compilationResult, null);<NEW_LINE>}<NEW_LINE>if ((this.bits & ASTNode.NeedFreeReturn) != 0) {<NEW_LINE>codeStream.return_();<NEW_LINE>}<NEW_LINE>// local variable attributes<NEW_LINE>codeStream.exitUserScope(this.scope);<NEW_LINE>codeStream.recordPositionsFrom(0, this.declarationSourceEnd);<NEW_LINE>try {<NEW_LINE>classFile.completeCodeAttribute(codeAttributeOffset);<NEW_LINE>} catch (NegativeArraySizeException e) {<NEW_LINE>throw new AbortMethod(this.scope.referenceCompilationUnit().compilationResult, null);<NEW_LINE>}<NEW_LINE>attributeNumber++;<NEW_LINE>} else {<NEW_LINE>checkArgumentsSize();<NEW_LINE>}<NEW_LINE>classFile.completeMethodInfo(this.binding, methodAttributeOffset, attributeNumber);<NEW_LINE>}
.arguments[i].binding);
1,255,007
public void evaluateCodeSnippet(String codeSnippet, String[] localVariableTypeNames, String[] localVariableNames, int[] localVariableModifiers, IType declaringType, boolean isStatic, boolean isConstructorCall, ICodeSnippetRequestor requestor, IProgressMonitor progressMonitor) throws org.eclipse.jdt.core.JavaModelException {<NEW_LINE>checkBuilderState();<NEW_LINE>int length = localVariableTypeNames.length;<NEW_LINE>char[][] varTypeNames = new char[length][];<NEW_LINE>for (int i = 0; i < length; i++) {<NEW_LINE>varTypeNames[i] = localVariableTypeNames[i].toCharArray();<NEW_LINE>}<NEW_LINE>length = localVariableNames.length;<NEW_LINE>char[][] varNames = new char[length][];<NEW_LINE>for (int i = 0; i < length; i++) {<NEW_LINE>varNames[i] = localVariableNames[i].toCharArray();<NEW_LINE>}<NEW_LINE>Map options = this.project.getOptions(true);<NEW_LINE>// transfer the imports of the IType to the evaluation context<NEW_LINE>if (declaringType != null) {<NEW_LINE>// retrieves the package statement<NEW_LINE>this.context.setPackageName(declaringType.getPackageFragment().getElementName().toCharArray());<NEW_LINE>ICompilationUnit compilationUnit = declaringType.getCompilationUnit();<NEW_LINE>if (compilationUnit != null) {<NEW_LINE>// retrieves the import statement<NEW_LINE>IImportDeclaration[] imports = compilationUnit.getImports();<NEW_LINE>int importsLength = imports.length;<NEW_LINE>if (importsLength != 0) {<NEW_LINE>char[][] importsNames = new char[importsLength][];<NEW_LINE>for (int i = 0; i < importsLength; i++) {<NEW_LINE>importsNames[i] = imports[i].getElementName().toCharArray();<NEW_LINE>}<NEW_LINE>this.context.setImports(importsNames);<NEW_LINE>// turn off import complaints for implicitly added ones<NEW_LINE>options.put(<MASK><NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>// try to retrieve imports from the source<NEW_LINE>SourceMapper sourceMapper = ((AbstractClassFile) declaringType.getClassFile()).getSourceMapper();<NEW_LINE>if (sourceMapper != null) {<NEW_LINE>char[][] imports = sourceMapper.getImports((BinaryType) declaringType);<NEW_LINE>if (imports != null) {<NEW_LINE>this.context.setImports(imports);<NEW_LINE>// turn off import complaints for implicitly added ones<NEW_LINE>options.put(CompilerOptions.OPTION_ReportUnusedImport, CompilerOptions.IGNORE);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>INameEnvironment environment = null;<NEW_LINE>try {<NEW_LINE>this.context.evaluate(codeSnippet.toCharArray(), varTypeNames, varNames, localVariableModifiers, declaringType == null ? null : declaringType.getFullyQualifiedName().toCharArray(), isStatic, isConstructorCall, environment = getBuildNameEnvironment(), options, getInfrastructureEvaluationRequestor(requestor), getProblemFactory());<NEW_LINE>} catch (InstallException e) {<NEW_LINE>handleInstallException(e);<NEW_LINE>} finally {<NEW_LINE>if (environment != null)<NEW_LINE>environment.cleanup();<NEW_LINE>}<NEW_LINE>}
CompilerOptions.OPTION_ReportUnusedImport, CompilerOptions.IGNORE);
474,070
public CorrelationAnalysisSolution run(Relation<V> relation) {<NEW_LINE>if (LOG.isVerbose()) {<NEW_LINE>LOG.verbose("retrieving database objects...");<NEW_LINE>}<NEW_LINE>Centroid centroid = Centroid.make(relation, relation.getDBIDs());<NEW_LINE>NumberVector.Factory<V> factory = RelationUtil.getNumberVectorFactory(relation);<NEW_LINE>V centroidDV = factory.newNumberVector(centroid.getArrayRef());<NEW_LINE>DBIDs ids;<NEW_LINE>if (sampleSize == 0) {<NEW_LINE>ids = relation.getDBIDs();<NEW_LINE>} else if (randomsample) {<NEW_LINE>ids = DBIDUtil.randomSample(relation.getDBIDs(<MASK><NEW_LINE>} else {<NEW_LINE>//<NEW_LINE>ids = new QueryBuilder<>(relation, distance).cheapOnly().kNNByObject(sampleSize).getKNN(centroidDV, sampleSize);<NEW_LINE>}<NEW_LINE>return generateModel(relation, ids, centroid.getArrayRef());<NEW_LINE>}
), sampleSize, RandomFactory.DEFAULT);
358,833
public ScimGroupExternalMember unmapExternalGroup(final String groupId, final String externalGroup, final String origin, final String zoneId) throws ScimResourceNotFoundException {<NEW_LINE>ScimGroup group = scimGroupProvisioning.retrieve(groupId, zoneId);<NEW_LINE>ScimGroupExternalMember result = getExternalGroupMap(groupId, externalGroup, origin, zoneId);<NEW_LINE>if (null != group && null != result) {<NEW_LINE>int count = jdbcTemplate.update(DELETE_EXTERNAL_GROUP_MAPPING_SQL, ps -> {<NEW_LINE>ps.setString(1, groupId);<NEW_LINE>ps.setString(2, externalGroup);<NEW_LINE>ps.setString(3, origin);<NEW_LINE>ps.setString(4, zoneId);<NEW_LINE>});<NEW_LINE>if (count == 1) {<NEW_LINE>return result;<NEW_LINE>} else if (count == 0) {<NEW_LINE>throw new ScimResourceNotFoundException("No group mappings deleted.");<NEW_LINE>} else {<NEW_LINE>throw new InvalidResultSetAccessException("More than one mapping deleted count=" <MASK><NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>}
+ count, new SQLException());
1,344,750
private void drawOutline(MatrixStack matrixStack, int x1, int x2, int y1, int y2) {<NEW_LINE>Matrix4f matrix = matrixStack.peek().getPositionMatrix();<NEW_LINE>BufferBuilder bufferBuilder = Tessellator.getInstance().getBuffer();<NEW_LINE>float[] acColor = gui.getAcColor();<NEW_LINE>RenderSystem.setShaderColor(acColor[0], acColor[1], acColor[2], 0.5F);<NEW_LINE>bufferBuilder.begin(VertexFormat.DrawMode.DEBUG_LINE_STRIP, VertexFormats.POSITION);<NEW_LINE>bufferBuilder.vertex(matrix, x1, y1, 0).next();<NEW_LINE>bufferBuilder.vertex(matrix, x1, <MASK><NEW_LINE>bufferBuilder.vertex(matrix, x2, y2, 0).next();<NEW_LINE>bufferBuilder.vertex(matrix, x2, y1, 0).next();<NEW_LINE>bufferBuilder.vertex(matrix, x1, y1, 0).next();<NEW_LINE>bufferBuilder.end();<NEW_LINE>BufferRenderer.draw(bufferBuilder);<NEW_LINE>}
y2, 0).next();
1,661,199
public void marshall(KnowledgeBaseData knowledgeBaseData, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (knowledgeBaseData == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(knowledgeBaseData.getDescription(), DESCRIPTION_BINDING);<NEW_LINE>protocolMarshaller.marshall(knowledgeBaseData.getKnowledgeBaseArn(), KNOWLEDGEBASEARN_BINDING);<NEW_LINE>protocolMarshaller.marshall(knowledgeBaseData.getKnowledgeBaseId(), KNOWLEDGEBASEID_BINDING);<NEW_LINE>protocolMarshaller.marshall(knowledgeBaseData.getKnowledgeBaseType(), KNOWLEDGEBASETYPE_BINDING);<NEW_LINE>protocolMarshaller.marshall(knowledgeBaseData.getLastContentModificationTime(), LASTCONTENTMODIFICATIONTIME_BINDING);<NEW_LINE>protocolMarshaller.marshall(knowledgeBaseData.getName(), NAME_BINDING);<NEW_LINE>protocolMarshaller.marshall(knowledgeBaseData.getRenderingConfiguration(), RENDERINGCONFIGURATION_BINDING);<NEW_LINE>protocolMarshaller.marshall(knowledgeBaseData.getServerSideEncryptionConfiguration(), SERVERSIDEENCRYPTIONCONFIGURATION_BINDING);<NEW_LINE>protocolMarshaller.marshall(knowledgeBaseData.getSourceConfiguration(), SOURCECONFIGURATION_BINDING);<NEW_LINE>protocolMarshaller.marshall(knowledgeBaseData.getStatus(), STATUS_BINDING);<NEW_LINE>protocolMarshaller.marshall(<MASK><NEW_LINE>} catch (Exception e) {<NEW_LINE>throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e);<NEW_LINE>}<NEW_LINE>}
knowledgeBaseData.getTags(), TAGS_BINDING);
107,221
static ImmutableSet<Instrument> provideInstruments(CaliperOptions options, final CaliperConfig config, Map<Class<? extends Instrument>, Provider<Instrument>> availableInstruments, ImmutableSet<VmType> vmTypes, @Stderr PrintWriter stderr) throws InvalidCommandException {<NEW_LINE>ImmutableSet.Builder<Instrument> builder = ImmutableSet.builder();<NEW_LINE>ImmutableSet<String> configuredInstruments = config.getConfiguredInstruments();<NEW_LINE>ImmutableSet<String> selectedInstruments = options.instrumentNames();<NEW_LINE>if (selectedInstruments.isEmpty()) {<NEW_LINE>selectedInstruments = config.getDefaultInstruments();<NEW_LINE>}<NEW_LINE>for (final String instrumentName : selectedInstruments) {<NEW_LINE>if (!configuredInstruments.contains(instrumentName)) {<NEW_LINE>throw new InvalidCommandException("%s is not a configured instrument (%s). " + "use --print-config to see the configured instruments.", instrumentName, configuredInstruments);<NEW_LINE>}<NEW_LINE>final InstrumentConfig instrumentConfig = config.getInstrumentConfig(instrumentName);<NEW_LINE>String className = instrumentConfig.className();<NEW_LINE>try {<NEW_LINE>Class<? extends Instrument> clazz = Util.lenientClassForName(className).asSubclass(Instrument.class);<NEW_LINE>Provider<Instrument> <MASK><NEW_LINE>if (instrumentProvider == null) {<NEW_LINE>throw new InvalidInstrumentException("Instrument %s not supported", className);<NEW_LINE>}<NEW_LINE>if (isSupportedByAllVms(clazz, vmTypes)) {<NEW_LINE>Instrument instrument = instrumentProvider.get();<NEW_LINE>InstrumentInjectorModule injectorModule = new InstrumentInjectorModule(instrumentConfig, instrumentName);<NEW_LINE>InstrumentComponent instrumentComponent = DaggerInstrumentComponent.builder().instrumentInjectorModule(injectorModule).build();<NEW_LINE>instrumentComponent.injectInstrument(instrument);<NEW_LINE>builder.add(instrument);<NEW_LINE>} else {<NEW_LINE>stderr.format("Instrument %s not supported on at least one target VM; ignoring\n", className);<NEW_LINE>}<NEW_LINE>} catch (ClassNotFoundException e) {<NEW_LINE>throw new InvalidCommandException("Cannot find instrument class '%s'", className);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return builder.build();<NEW_LINE>}
instrumentProvider = availableInstruments.get(clazz);
775,374
public static void main(String[] args) {<NEW_LINE>BloomFilter b = new BloomFilter(15);<NEW_LINE>System.out.println("FNV hash of 'hello' = " + BloomFilter.fnv("hello".getBytes()) % b.bitvector.length);<NEW_LINE>System.out.println("FNV-1a hash of 'hello' = " + BloomFilter.fnv1a("hello".getBytes()) % b.bitvector.length);<NEW_LINE>b.add(() -> "hello");<NEW_LINE>b.add(() -> "helloWorld");<NEW_LINE>b.add(() -> "helloDear");<NEW_LINE>b.add(() -> "her");<NEW_LINE>b.add(() -> "3456");<NEW_LINE>System.out.println("hello in bloom filter = " + b.check(() -> "hello"));<NEW_LINE>System.out.println("helloWorld in bloom filter = " + b.<MASK><NEW_LINE>System.out.println("helloDear in bloom filter = " + b.check(() -> "helloDear"));<NEW_LINE>System.out.println("dear in bloom filter = " + b.check(() -> "dear"));<NEW_LINE>System.out.println("3456 in bloom filter = " + b.check(() -> "3456"));<NEW_LINE>System.out.println("3 in bloom filter = " + b.check(() -> "3"));<NEW_LINE>System.out.println("4 in bloom filter = " + b.check(() -> "4"));<NEW_LINE>System.out.println("5 in bloom filter = " + b.check(() -> "5"));<NEW_LINE>System.out.println("6 in bloom filter = " + b.check(() -> "6"));<NEW_LINE>}
check(() -> "helloWorld"));
72,904
protected void performNestedSearch(String userDn, String username, Set<GrantedAuthority> authorities, int depth) {<NEW_LINE>if (depth == 0) {<NEW_LINE>// back out of recursion<NEW_LINE>logger.debug("Search aborted, max depth reached," + " for roles for user '" + username + "', DN = " + "'" + userDn + "', with filter " + getGroupSearchFilter() + " in search base '" + getGroupSearchBase() + "'");<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (logger.isDebugEnabled()) {<NEW_LINE>logger.debug("Searching for roles for user '" + username + "', DN = " + "'" + userDn + "', with filter " + getGroupSearchFilter() + " in search base '" + getGroupSearchBase() + "'");<NEW_LINE>}<NEW_LINE>if (StringUtils.hasText(getGroupRoleAttribute()) && !getAttributeNames().contains(getGroupRoleAttribute())) {<NEW_LINE>getAttributeNames().add(getGroupRoleAttribute());<NEW_LINE>}<NEW_LINE>Set<Map<String, String[]>> userRoles = getLdapTemplate().searchForMultipleAttributeValues(getGroupSearchBase(), getGroupSearchFilter(), new String[] { userDn, username }, getAttributeNames().toArray(new String[0]));<NEW_LINE>if (logger.isDebugEnabled()) {<NEW_LINE>logRoles(userRoles);<NEW_LINE>}<NEW_LINE>for (Map<String, String[]> record : userRoles) {<NEW_LINE>boolean circular = false;<NEW_LINE>String dn = record.get<MASK><NEW_LINE>String[] roleValues = record.get(getGroupRoleAttribute());<NEW_LINE>Set<String> roles = new HashSet<>(Arrays.asList(roleValues != null ? roleValues : new String[0]));<NEW_LINE>for (String role : roles) {<NEW_LINE>if (isConvertToUpperCase()) {<NEW_LINE>role = role.toUpperCase();<NEW_LINE>}<NEW_LINE>role = getRolePrefix() + role;<NEW_LINE>circular = circular | (!authorities.add(new LdapAuthority(role, dn, record)));<NEW_LINE>}<NEW_LINE>String roleName = roles.size() > 0 ? roles.iterator().next() : dn;<NEW_LINE>if (!circular) {<NEW_LINE>performNestedSearch(dn, roleName, authorities, (depth - 1));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
(SpringSecurityLdapTemplate.DN_KEY)[0];
852,727
public static NewInstanceResult newInstance(@NonNull final Context context, @NonNull final ReportInfo reportInfo) {<NEW_LINE>long size = DataUtils.getSerializedSize(reportInfo);<NEW_LINE>if (size > DataUtils.TRANSACTION_SIZE_LIMIT_IN_BYTES) {<NEW_LINE>String reportInfoDirectoryPath = getReportInfoDirectoryPath(context);<NEW_LINE>String reportInfoFilePath = reportInfoDirectoryPath + "/" + CACHE_FILE_BASENAME_PREFIX + reportInfo.reportTimestamp;<NEW_LINE>Logger.logVerbose(LOG_TAG, reportInfo.reportTitle + " " + ReportInfo.class.getSimpleName() + " serialized object size " + size + " is greater than " + DataUtils.TRANSACTION_SIZE_LIMIT_IN_BYTES + " and it will be written to file at path \"" + reportInfoFilePath + "\"");<NEW_LINE>Error error = FileUtils.writeSerializableObjectToFile(ReportInfo.class.getSimpleName(), reportInfoFilePath, reportInfo);<NEW_LINE>if (error != null) {<NEW_LINE>Logger.logErrorExtended(LOG_TAG, error.toString());<NEW_LINE>Logger.showToast(context, Error<MASK><NEW_LINE>return new NewInstanceResult(null, null);<NEW_LINE>}<NEW_LINE>return new NewInstanceResult(createContentIntent(context, null, reportInfoFilePath), createDeleteIntent(context, reportInfoFilePath));<NEW_LINE>} else {<NEW_LINE>return new NewInstanceResult(createContentIntent(context, reportInfo, null), null);<NEW_LINE>}<NEW_LINE>}
.getMinimalErrorString(error), true);
1,601,716
// DO NOT MODIFY THIS CODE, GENERATED AUTOMATICALLY<NEW_LINE>public static boolean canGetClassFileVersion(com.sun.jdi.VirtualMachine a) throws org.netbeans.modules.debugger.jpda.jdi.InternalExceptionWrapper, org.netbeans.modules.debugger.jpda.jdi.VMDisconnectedExceptionWrapper {<NEW_LINE>if (org.netbeans.modules.debugger.jpda.JDIExceptionReporter.isLoggable()) {<NEW_LINE>org.netbeans.modules.debugger.jpda.JDIExceptionReporter.logCallStart("com.sun.jdi.VirtualMachine", "canGetClassFileVersion", "JDI CALL: com.sun.jdi.VirtualMachine({0}).canGetClassFileVersion()", <MASK><NEW_LINE>}<NEW_LINE>Object retValue = null;<NEW_LINE>try {<NEW_LINE>boolean ret;<NEW_LINE>ret = a.canGetClassFileVersion();<NEW_LINE>retValue = ret;<NEW_LINE>return ret;<NEW_LINE>} catch (com.sun.jdi.InternalException ex) {<NEW_LINE>retValue = ex;<NEW_LINE>org.netbeans.modules.debugger.jpda.JDIExceptionReporter.report(ex);<NEW_LINE>throw new org.netbeans.modules.debugger.jpda.jdi.InternalExceptionWrapper(ex);<NEW_LINE>} catch (com.sun.jdi.VMDisconnectedException ex) {<NEW_LINE>retValue = ex;<NEW_LINE>if (a instanceof com.sun.jdi.Mirror) {<NEW_LINE>com.sun.jdi.VirtualMachine vm = ((com.sun.jdi.Mirror) a).virtualMachine();<NEW_LINE>try {<NEW_LINE>vm.dispose();<NEW_LINE>} catch (com.sun.jdi.VMDisconnectedException vmdex) {<NEW_LINE>}<NEW_LINE>}<NEW_LINE>throw new org.netbeans.modules.debugger.jpda.jdi.VMDisconnectedExceptionWrapper(ex);<NEW_LINE>} catch (Error err) {<NEW_LINE>retValue = err;<NEW_LINE>throw err;<NEW_LINE>} catch (RuntimeException rex) {<NEW_LINE>retValue = rex;<NEW_LINE>throw rex;<NEW_LINE>} finally {<NEW_LINE>if (org.netbeans.modules.debugger.jpda.JDIExceptionReporter.isLoggable()) {<NEW_LINE>org.netbeans.modules.debugger.jpda.JDIExceptionReporter.logCallEnd("com.sun.jdi.VirtualMachine", "canGetClassFileVersion", retValue);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
new Object[] { a });
283,772
public static void main(String[] args) throws Exception {<NEW_LINE>LOG.info("------------program params-------------------------");<NEW_LINE>Arrays.stream(args).forEach(arg -> LOG.info("{}", arg));<NEW_LINE>LOG.info("-------------------------------------------");<NEW_LINE>Options options = new OptionParser(args).getOptions();<NEW_LINE>String job = URLDecoder.decode(options.getJob(), StandardCharsets.UTF_8.name());<NEW_LINE>Properties confProperties = PropertiesUtil.<MASK><NEW_LINE>StreamExecutionEnvironment env = EnvFactory.createStreamExecutionEnvironment(options);<NEW_LINE>StreamTableEnvironment tEnv = EnvFactory.createStreamTableEnvironment(env, confProperties, options.getJobName());<NEW_LINE>LOG.info("Register to table configuration:{}", tEnv.getConfig().getConfiguration().toString());<NEW_LINE>switch(EJobType.getByName(options.getJobType())) {<NEW_LINE>case SQL:<NEW_LINE>exeSqlJob(env, tEnv, job, options);<NEW_LINE>break;<NEW_LINE>case SYNC:<NEW_LINE>exeSyncJob(env, tEnv, job, options);<NEW_LINE>break;<NEW_LINE>default:<NEW_LINE>throw new FlinkxRuntimeException("unknown jobType: [" + options.getJobType() + "], jobType must in [SQL, SYNC].");<NEW_LINE>}<NEW_LINE>LOG.info("program {} execution success", options.getJobName());<NEW_LINE>}
parseConf(options.getConfProp());
1,514,951
private VirtualRouterVmInventory findVirtualRouterVm(String lbUuid, List<String> vmNics) {<NEW_LINE>if (vmNics.isEmpty()) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>List<VirtualRouterVmVO> vrs = getAllVirtualRouters(lbUuid);<NEW_LINE>if (LoadBalancerSystemTags.SEPARATE_VR.hasTag(lbUuid)) {<NEW_LINE>Optional<VirtualRouterVmVO> vr = vrs.stream().filter(v -> VirtualRouterSystemTags.DEDICATED_ROLE_VR.hasTag(v.getUuid())).findFirst();<NEW_LINE>if (!vr.isPresent()) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>List<String> vmNicL3NetworkUuids = Q.New(VmNicVO.class).select(VmNicVO_.l3NetworkUuid).in(VmNicVO_.uuid, vmNics).listValues();<NEW_LINE>VirtualRouterVmInventory vrInventory = VirtualRouterVmInventory.valueOf(vr.get());<NEW_LINE>vmNicL3NetworkUuids.removeAll(vrInventory.getGuestL3Networks());<NEW_LINE>if (!vmNicL3NetworkUuids.isEmpty()) {<NEW_LINE>logger.debug(String.format("found l3 networks[uuids:%s] not attached to separate vr[uuid:%s] for loadbalancer[uuid:%s]", vmNicL3NetworkUuids, vr.get().getUuid(), lbUuid));<NEW_LINE>throw new CloudRuntimeException("not support separate vr with multiple networks vpc!");<NEW_LINE>}<NEW_LINE>}<NEW_LINE>DebugUtils.Assert(vrs.size() <= 1, String.format("multiple virtual routers[uuids:%s] found", vrs.stream().map(ResourceVO::getUuid).collect(<MASK><NEW_LINE>return vrs.isEmpty() ? null : VirtualRouterVmInventory.valueOf(vrs.get(0));<NEW_LINE>}
Collectors.toList())));
1,593,827
private static void updateErrorsInFile(@NonNull final Callback callback, @NonNull final FileObject root, @NonNull final FileObject file) {<NEW_LINE>final List<Task> tasks = new ArrayList<Task>();<NEW_LINE>for (WhiteListIndex.Problem problem : WhiteListIndex.getDefault().getWhiteListViolations(root, file)) {<NEW_LINE>final Map.Entry<FileObject, List<? extends Task>> task = createTask(problem);<NEW_LINE>if (task != null) {<NEW_LINE>tasks.addAll(task.getValue());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>final Set<FileObject> filesWithErrors = getFilesWithAttachedErrors(root);<NEW_LINE>if (tasks.isEmpty()) {<NEW_LINE>filesWithErrors.remove(file);<NEW_LINE>} else {<NEW_LINE>filesWithErrors.add(file);<NEW_LINE>}<NEW_LINE>LOG.log(Level.FINE, "setting {1} for {0}", new Object[] { file, tasks });<NEW_LINE><MASK><NEW_LINE>}
callback.setTasks(file, tasks);
293,263
public Object doQuery(Object[] objs) {<NEW_LINE>try {<NEW_LINE>if (objs.length == 1) {<NEW_LINE>ArrayList<File> rFile = new ArrayList<File>();<NEW_LINE>ArrayList<File> rDir = new ArrayList<File>();<NEW_LINE>List<String> ls = new ArrayList<String>();<NEW_LINE>List<String> filters = ImUtils.getFilter(objs[0]);<NEW_LINE>String rootPath = m_zipfile.getFile().getParentFile().getCanonicalPath();<NEW_LINE>for (String line : filters) {<NEW_LINE>if (!ImUtils.isRootPathFile(line)) {<NEW_LINE>ls.add(rootPath + File.separator + line);<NEW_LINE>} else {<NEW_LINE>ls.add(line);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>ImUtils.getFiles(ls, rFile, rDir, true);<NEW_LINE>ImZipUtil.zip(m_zipfile, m_parameters, rFile, rDir);<NEW_LINE>} else {<NEW_LINE>MessageManager mm = EngineMessage.get();<NEW_LINE>throw new RQException("zip" <MASK><NEW_LINE>}<NEW_LINE>} catch (Exception e) {<NEW_LINE>Logger.error(e.getStackTrace());<NEW_LINE>}<NEW_LINE>return true;<NEW_LINE>}
+ mm.getMessage("zipadd param error"));
454,163
private XmlTiers createXmlTiers(@NonNull final GarantType garantType) {<NEW_LINE>final XmlTiersBuilder xtiers = XmlTiers.builder();<NEW_LINE>xtiers.type(Tiers.GARANT);<NEW_LINE>xtiers.paymentPeriod(garantType.getPaymentPeriod());<NEW_LINE>xtiers.biller(createXmlBiller(garantType.getBiller()));<NEW_LINE>xtiers.provider(createXmlProvider(garantType.getProvider()));<NEW_LINE>xtiers.insurance(createXmlInsurance(garantType.getInsurance()));<NEW_LINE>xtiers.patient(createXmlPatient(garantType.getPatient()));<NEW_LINE>xtiers.insured(createXmlPatientOrNull(garantType.getInsured()));<NEW_LINE>xtiers.guarantor(createXmlGuarantor(garantType.getGuarantor()));<NEW_LINE>xtiers.referrer(createXmlReferrer<MASK><NEW_LINE>xtiers.employer(createXmlEmployer(garantType.getEmployer()));<NEW_LINE>return xtiers.build();<NEW_LINE>}
(garantType.getReferrer()));
1,719,391
protected void dynamicUpdateBrokerConfig(int podId, Admin ac, KafkaBrokerConfigurationDiff configurationDiff, KafkaBrokerLoggingConfigurationDiff logDiff) throws ForceableProblem, InterruptedException {<NEW_LINE>Map<ConfigResource, Collection<AlterConfigOp>> updatedConfig = new HashMap<>(2);<NEW_LINE>updatedConfig.put(Util.getBrokersConfig(podId), configurationDiff.getConfigDiff());<NEW_LINE>updatedConfig.put(Util.getBrokersLogging(podId), logDiff.getLoggingDiff());<NEW_LINE>LOGGER.debugCr(reconciliation, "Altering broker configuration {}", podId);<NEW_LINE>LOGGER.traceCr(<MASK><NEW_LINE>AlterConfigsResult alterConfigResult = ac.incrementalAlterConfigs(updatedConfig);<NEW_LINE>KafkaFuture<Void> brokerConfigFuture = alterConfigResult.values().get(Util.getBrokersConfig(podId));<NEW_LINE>KafkaFuture<Void> brokerLoggingConfigFuture = alterConfigResult.values().get(Util.getBrokersLogging(podId));<NEW_LINE>await(Util.kafkaFutureToVertxFuture(reconciliation, vertx, brokerConfigFuture), 30, TimeUnit.SECONDS, error -> {<NEW_LINE>LOGGER.errorCr(reconciliation, "Error doing dynamic config update", error);<NEW_LINE>return new ForceableProblem("Error doing dynamic update", error);<NEW_LINE>});<NEW_LINE>await(Util.kafkaFutureToVertxFuture(reconciliation, vertx, brokerLoggingConfigFuture), 30, TimeUnit.SECONDS, error -> {<NEW_LINE>LOGGER.errorCr(reconciliation, "Error performing dynamic logging update for pod {}", podId, error);<NEW_LINE>return new ForceableProblem("Error performing dynamic logging update for pod " + podId, error);<NEW_LINE>});<NEW_LINE>LOGGER.infoCr(reconciliation, "Dynamic reconfiguration for broker {} was successful.", podId);<NEW_LINE>}
reconciliation, "Altering broker configuration {} with {}", podId, updatedConfig);
933,674
private Set<T> findIn(File windowsKitDir, DiscoveryType discoveryType) {<NEW_LINE>Set<T> found = new LinkedHashSet<T>();<NEW_LINE>String[] versionDirs = getComponentVersionDirs(windowsKitDir);<NEW_LINE>for (String versionDir : versionDirs) {<NEW_LINE>VersionNumber version = VersionNumber.withPatchNumber().parse(versionDir);<NEW_LINE>LOGGER.debug("Found {} {} at {}", getDisplayName(), version.toString(), windowsKitDir);<NEW_LINE>File binDir = new <MASK><NEW_LINE>File unversionedBinDir = new File(windowsKitDir, "bin");<NEW_LINE>if (isValidComponentBinDir(binDir)) {<NEW_LINE>T component = newComponent(windowsKitDir, binDir, version, discoveryType);<NEW_LINE>found.add(component);<NEW_LINE>} else if (isValidComponentBinDir(unversionedBinDir)) {<NEW_LINE>T component = newComponent(windowsKitDir, unversionedBinDir, version, discoveryType);<NEW_LINE>found.add(component);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (found.isEmpty()) {<NEW_LINE>LOGGER.debug("Ignoring candidate directory {} as it does not look like a {} installation.", windowsKitDir, getDisplayName());<NEW_LINE>}<NEW_LINE>return found;<NEW_LINE>}
File(windowsKitDir, "bin/" + versionDir);
1,291,283
protected void onSelectedChanged(@Nullable EpoxyViewHolder viewHolder, int actionState) {<NEW_LINE><MASK><NEW_LINE>if (viewHolder != null) {<NEW_LINE>EpoxyModel<?> model = viewHolder.getModel();<NEW_LINE>if (!isTouchableModel(model)) {<NEW_LINE>throw new IllegalStateException("A model was selected that is not a valid target: " + model.getClass());<NEW_LINE>}<NEW_LINE>markRecyclerViewHasSelection((RecyclerView) viewHolder.itemView.getParent());<NEW_LINE>if (actionState == ItemTouchHelper.ACTION_STATE_SWIPE) {<NEW_LINE>holderBeingSwiped = viewHolder;<NEW_LINE>// noinspection unchecked<NEW_LINE>onSwipeStarted((T) model, viewHolder.itemView, viewHolder.getAdapterPosition());<NEW_LINE>} else if (actionState == ItemTouchHelper.ACTION_STATE_DRAG) {<NEW_LINE>holderBeingDragged = viewHolder;<NEW_LINE>// noinspection unchecked<NEW_LINE>onDragStarted((T) model, viewHolder.itemView, viewHolder.getAdapterPosition());<NEW_LINE>}<NEW_LINE>} else if (holderBeingDragged != null) {<NEW_LINE>// noinspection unchecked<NEW_LINE>onDragReleased((T) holderBeingDragged.getModel(), holderBeingDragged.itemView);<NEW_LINE>holderBeingDragged = null;<NEW_LINE>} else if (holderBeingSwiped != null) {<NEW_LINE>// noinspection unchecked<NEW_LINE>onSwipeReleased((T) holderBeingSwiped.getModel(), holderBeingSwiped.itemView);<NEW_LINE>holderBeingSwiped = null;<NEW_LINE>}<NEW_LINE>}
super.onSelectedChanged(viewHolder, actionState);
36,755
// testargumentContainsExceptionInTwoCallbackClasses<NEW_LINE>public void testargumentContainsExceptionInTwoCallbackClasses(String BASE_URL, StringBuilder sb) throws Exception {<NEW_LINE>Client client = ClientBuilder.newClient();<NEW_LINE>invokeClear(client, BASE_URL);<NEW_LINE>invokeReset(client, BASE_URL);<NEW_LINE>Future<Response> suspend2 = client.target(BASE_URL + "rest/resource/suspend").request().async().get();<NEW_LINE>Future<Response> register2 = client.target(BASE_URL + "rest/resource/registerclasses?stage=0").request().async().get();<NEW_LINE>sb.append(compareResult(register2, FALSE));<NEW_LINE>Future<Response> exception2 = client.target(BASE_URL + "rest/resource/resumechecked?stage=1").request().async().get();<NEW_LINE>Response response3 = exception2.get();<NEW_LINE>Response suspendResponse3 = suspend2.get();<NEW_LINE>sb.append(intequalCompare(suspendResponse3.getStatusInfo().getStatusCode(), Response.Status.INTERNAL_SERVER_ERROR.getStatusCode(), true));<NEW_LINE>// assertEquals(suspendResponse3.getStatusInfo().getStatusCode(), Response.Status.INTERNAL_SERVER_ERROR.getStatusCode());<NEW_LINE>suspendResponse3.close();<NEW_LINE>Future<Response> error3 = client.target(BASE_URL + "rest/resource/error").request().async().get();<NEW_LINE>sb.append(compareResult(error3, RuntimeException<MASK><NEW_LINE>error3 = client.target(BASE_URL + "rest/resource/seconderror").request().async().get();<NEW_LINE>sb.append(compareResult(error3, RuntimeException.class.getName()));<NEW_LINE>System.out.println("from testargumentContainsExceptionInTwoCallbackClasses: " + sb);<NEW_LINE>// return sb.toString();<NEW_LINE>}
.class.getName()));
1,065,317
public static DVSMacManagementPolicy createDVSMacManagementPolicy(Map<NetworkOffering.Detail, String> nicDetails) {<NEW_LINE>if (nicDetails == null) {<NEW_LINE>nicDetails = getDefaultSecurityDetails();<NEW_LINE>}<NEW_LINE>DVSMacManagementPolicy macManagementPolicy = new DVSMacManagementPolicy();<NEW_LINE>macManagementPolicy.setAllowPromiscuous(Boolean.valueOf(nicDetails.getOrDefault(NetworkOffering.Detail.PromiscuousMode, "false")));<NEW_LINE>macManagementPolicy.setForgedTransmits(Boolean.valueOf(nicDetails.getOrDefault(NetworkOffering.<MASK><NEW_LINE>macManagementPolicy.setMacChanges(Boolean.valueOf(nicDetails.getOrDefault(NetworkOffering.Detail.MacAddressChanges, "false")));<NEW_LINE>DVSMacLearningPolicy macLearningPolicy = new DVSMacLearningPolicy();<NEW_LINE>macLearningPolicy.setEnabled(Boolean.parseBoolean(nicDetails.getOrDefault(NetworkOffering.Detail.MacLearning, "false")));<NEW_LINE>macManagementPolicy.setMacLearningPolicy(macLearningPolicy);<NEW_LINE>return macManagementPolicy;<NEW_LINE>}
Detail.ForgedTransmits, "false")));
85,968
public Model read(final Reader input, final Map<String, ?> options) throws IOException, ModelParseException {<NEW_LINE>assert manager != null;<NEW_LINE>Optional<File> optionalPomXml = getPomXmlFile(options);<NEW_LINE>if (optionalPomXml.isPresent()) {<NEW_LINE>File pom = optionalPomXml.get();<NEW_LINE>log.debug(pom.toString());<NEW_LINE>File realPom = new File(pom.getPath().replaceFirst(Pattern.quote(POM_FILE_PREFIX), ""));<NEW_LINE>((Map) options).put(ModelProcessor.SOURCE, new FileModelSource(realPom));<NEW_LINE>ModelReader <MASK><NEW_LINE>Model model = reader.read(realPom, options);<NEW_LINE>PolyglotPropertiesEnhancer.enhanceModel(manager.getEnhancementPropertiesFor(options), model);<NEW_LINE>MavenXpp3Writer xmlWriter = new MavenXpp3Writer();<NEW_LINE>StringWriter xml = new StringWriter();<NEW_LINE>xmlWriter.write(xml, model);<NEW_LINE>FileUtils.fileWrite(pom, xml.toString());<NEW_LINE>// dump pom if filename is given via the pom properties<NEW_LINE>String dump = model.getProperties().getProperty("polyglot.dump.pom");<NEW_LINE>if (dump == null) {<NEW_LINE>// just nice to dump the pom.xml via commandline switch<NEW_LINE>dump = System.getProperty("polyglot.dump.pom");<NEW_LINE>}<NEW_LINE>if (dump != null) {<NEW_LINE>File dumpPom = new File(pom.getParentFile(), dump);<NEW_LINE>if (!dumpPom.exists() || !FileUtils.fileRead(dumpPom).equals(xml.toString().replace("?>", WARNING))) {<NEW_LINE>dumpPom.setWritable(true);<NEW_LINE>FileUtils.fileWrite(dumpPom, xml.toString().replace("?>", WARNING));<NEW_LINE>if ("true".equals(model.getProperties().getProperty("polyglot.dump.readonly"))) {<NEW_LINE>dumpPom.setReadOnly();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>model.setPomFile(pom);<NEW_LINE>return model;<NEW_LINE>} else {<NEW_LINE>ModelReader reader = manager.getReaderFor(options);<NEW_LINE>return reader.read(input, options);<NEW_LINE>}<NEW_LINE>}
reader = manager.getReaderFor(options);
157,135
public IStatus install(String packageName, String displayName, boolean global, char[] password, IPath workingDirectory, IProgressMonitor monitor) {<NEW_LINE>SubMonitor sub = SubMonitor.convert(monitor, 10);<NEW_LINE>String globalPrefixPath = null;<NEW_LINE>try {<NEW_LINE>// If we are doing a global install we will fetch the global prefix and set it back after the install<NEW_LINE>// completes to the original value<NEW_LINE>if (global) {<NEW_LINE>globalPrefixPath = getGlobalPrefix(global, <MASK><NEW_LINE>}<NEW_LINE>sub.setWorkRemaining(8);<NEW_LINE>sub.subTask("Running npm install command");<NEW_LINE>IStatus status = runNpmInstaller(packageName, displayName, global, password, workingDirectory, INSTALL, sub.newChild(6));<NEW_LINE>if (status.getSeverity() == IStatus.CANCEL) {<NEW_LINE>return Status.OK_STATUS;<NEW_LINE>}<NEW_LINE>if (!status.isOK()) {<NEW_LINE>String message;<NEW_LINE>if (status instanceof ProcessStatus) {<NEW_LINE>message = ((ProcessStatus) status).getStdErr();<NEW_LINE>} else {<NEW_LINE>message = status.getMessage();<NEW_LINE>}<NEW_LINE>// $NON-NLS-1$<NEW_LINE>IdeLog.// $NON-NLS-1$<NEW_LINE>logError(// $NON-NLS-1$<NEW_LINE>JSCorePlugin.getDefault(), MessageFormat.format("Failed to install {0}.\n\n{1}", packageName, message));<NEW_LINE>return new Status(IStatus.ERROR, JSCorePlugin.PLUGIN_ID, MessageFormat.format(Messages.NodePackageManager_FailedInstallError, packageName));<NEW_LINE>} else if (status instanceof ProcessStatus) {<NEW_LINE>String error = ((ProcessStatus) status).getStdErr();<NEW_LINE>if (!StringUtil.isEmpty(error)) {<NEW_LINE>// $NON-NLS-1$<NEW_LINE>String[] lines = error.split("\n");<NEW_LINE>if (lines.length > 0 && lines[lines.length - 1].contains(NPM_ERROR)) {<NEW_LINE>// $NON-NLS-1$<NEW_LINE>IdeLog.// $NON-NLS-1$<NEW_LINE>logError(// $NON-NLS-1$<NEW_LINE>JSCorePlugin.getDefault(), MessageFormat.format("Failed to install {0}.\n\n{1}", packageName, error));<NEW_LINE>return new Status(IStatus.ERROR, JSCorePlugin.PLUGIN_ID, MessageFormat.format(Messages.NodePackageManager_FailedInstallError, packageName));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return status;<NEW_LINE>} catch (CoreException ce) {<NEW_LINE>return ce.getStatus();<NEW_LINE>} catch (Exception e) {<NEW_LINE>return new Status(IStatus.ERROR, JSCorePlugin.PLUGIN_ID, e.getMessage(), e);<NEW_LINE>} finally {<NEW_LINE>// Set the global npm prefix path to its original value.<NEW_LINE>if (!StringUtil.isEmpty(globalPrefixPath)) {<NEW_LINE>try {<NEW_LINE>sub.subTask("Resetting global NPM prefix");<NEW_LINE>setGlobalPrefixPath(password, workingDirectory, sub.newChild(1), globalPrefixPath);<NEW_LINE>} catch (CoreException e) {<NEW_LINE>return e.getStatus();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>sub.done();<NEW_LINE>}<NEW_LINE>}
password, workingDirectory, sub, globalPrefixPath);
1,822,173
// obtains the data and calculates the grid of results<NEW_LINE>private static void calculate(CalculationRunner runner) {<NEW_LINE>// the trades that will have measures calculated<NEW_LINE>List<Trade> trades = createSwapTrades();<NEW_LINE>// the columns, specifying the measures to be calculated<NEW_LINE>List<Column> columns = ImmutableList.of(Column.of(Measures.LEG_INITIAL_NOTIONAL), Column.of(Measures.PRESENT_VALUE), Column.of(Measures.LEG_PRESENT_VALUE), Column.of(Measures.PV01_CALIBRATED_SUM), Column.of(Measures.PAR_RATE), Column.of(Measures.ACCRUED_INTEREST), Column.of(Measures.PV01_CALIBRATED_BUCKETED), Column.of(AdvancedMeasures.PV01_SEMI_PARALLEL_GAMMA_BUCKETED));<NEW_LINE>// use the built-in example market data<NEW_LINE>LocalDate valuationDate = LocalDate.of(2014, 1, 22);<NEW_LINE>ExampleMarketDataBuilder marketDataBuilder = ExampleMarketData.builder();<NEW_LINE>MarketData marketData = marketDataBuilder.buildSnapshot(valuationDate);<NEW_LINE>// the complete set of rules for calculating measures<NEW_LINE>CalculationFunctions functions = StandardComponents.calculationFunctions();<NEW_LINE>CalculationRules rules = CalculationRules.of(functions, marketDataBuilder.ratesLookup(valuationDate));<NEW_LINE>// the reference data, such as holidays and securities<NEW_LINE>ReferenceData refData = ReferenceData.standard();<NEW_LINE>// calculate the results<NEW_LINE>Results results = runner.calculate(rules, trades, columns, marketData, refData);<NEW_LINE>// use the report runner to transform the engine results into a trade report<NEW_LINE>ReportCalculationResults calculationResults = ReportCalculationResults.of(valuationDate, trades, columns, results, functions, refData);<NEW_LINE>TradeReportTemplate <MASK><NEW_LINE>TradeReport tradeReport = TradeReport.of(calculationResults, reportTemplate);<NEW_LINE>tradeReport.writeAsciiTable(System.out);<NEW_LINE>}
reportTemplate = ExampleData.loadTradeReportTemplate("swap-report-template");
1,796,105
final CreateDatasetGroupResult executeCreateDatasetGroup(CreateDatasetGroupRequest createDatasetGroupRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(createDatasetGroupRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<CreateDatasetGroupRequest> request = null;<NEW_LINE>Response<CreateDatasetGroupResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new CreateDatasetGroupRequestProtocolMarshaller(protocolFactory).marshall<MASK><NEW_LINE>// Binds the request metrics to the current request.<NEW_LINE>request.setAWSRequestMetrics(awsRequestMetrics);<NEW_LINE>request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);<NEW_LINE>request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SERVICE_ID, "Personalize");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateDatasetGroup");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<CreateDatasetGroupResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new CreateDatasetGroupResultJsonUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
(super.beforeMarshalling(createDatasetGroupRequest));
1,680,767
public static Ticker adaptTicker(CurrencyPair currencyPair, GateioTicker gateioTicker) {<NEW_LINE>BigDecimal ask = gateioTicker.getLowestAsk();<NEW_LINE>BigDecimal bid = gateioTicker.getHighestBid();<NEW_LINE>BigDecimal last = gateioTicker.getLast();<NEW_LINE>BigDecimal low = gateioTicker.getLow24hr();<NEW_LINE>BigDecimal high = gateioTicker.getHigh24hr();<NEW_LINE>// Looks like gate.io vocabulary is inverted...<NEW_LINE>BigDecimal baseVolume = gateioTicker.getQuoteVolume();<NEW_LINE>BigDecimal quoteVolume = gateioTicker.getBaseVolume();<NEW_LINE><MASK><NEW_LINE>return new Ticker.Builder().currencyPair(currencyPair).ask(ask).bid(bid).last(last).low(low).high(high).volume(baseVolume).quoteVolume(quoteVolume).percentageChange(percentageChange).build();<NEW_LINE>}
BigDecimal percentageChange = gateioTicker.getPercentChange();
777,726
public void initialise() {<NEW_LINE><MASK><NEW_LINE>// TODO: Remove this screen when AutoConfig UI is in place<NEW_LINE>UISlider sound = find("sound", UISlider.class);<NEW_LINE>if (sound != null) {<NEW_LINE>sound.setIncrement(0.05f);<NEW_LINE>sound.setPrecision(2);<NEW_LINE>sound.setMinimum(0);<NEW_LINE>sound.setRange(1.0f);<NEW_LINE>sound.bindValue(new Binding<Float>() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public Float get() {<NEW_LINE>return config.soundVolume.get();<NEW_LINE>}<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void set(Float value) {<NEW_LINE>config.soundVolume.set(value);<NEW_LINE>}<NEW_LINE>});<NEW_LINE>}<NEW_LINE>UISlider music = find("music", UISlider.class);<NEW_LINE>if (music != null) {<NEW_LINE>music.setIncrement(0.05f);<NEW_LINE>music.setPrecision(2);<NEW_LINE>music.setMinimum(0);<NEW_LINE>music.setRange(1.0f);<NEW_LINE>music.bindValue(new Binding<Float>() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public Float get() {<NEW_LINE>return config.musicVolume.get();<NEW_LINE>}<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void set(Float value) {<NEW_LINE>config.musicVolume.set(value);<NEW_LINE>}<NEW_LINE>});<NEW_LINE>}<NEW_LINE>WidgetUtil.trySubscribe(this, "close", button -> triggerBackAnimation());<NEW_LINE>}
setAnimationSystem(MenuAnimationSystems.createDefaultSwipeAnimation());
470,596
public static DescribeCdnDeletedDomainsResponse unmarshall(DescribeCdnDeletedDomainsResponse describeCdnDeletedDomainsResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeCdnDeletedDomainsResponse.setRequestId(_ctx.stringValue("DescribeCdnDeletedDomainsResponse.RequestId"));<NEW_LINE>describeCdnDeletedDomainsResponse.setPageNumber<MASK><NEW_LINE>describeCdnDeletedDomainsResponse.setPageSize(_ctx.longValue("DescribeCdnDeletedDomainsResponse.PageSize"));<NEW_LINE>describeCdnDeletedDomainsResponse.setTotalCount(_ctx.longValue("DescribeCdnDeletedDomainsResponse.TotalCount"));<NEW_LINE>List<PageData> domains = new ArrayList<PageData>();<NEW_LINE>for (int i = 0; i < _ctx.lengthValue("DescribeCdnDeletedDomainsResponse.Domains.Length"); i++) {<NEW_LINE>PageData pageData = new PageData();<NEW_LINE>pageData.setDomainName(_ctx.stringValue("DescribeCdnDeletedDomainsResponse.Domains[" + i + "].DomainName"));<NEW_LINE>pageData.setGmtModified(_ctx.stringValue("DescribeCdnDeletedDomainsResponse.Domains[" + i + "].GmtModified"));<NEW_LINE>domains.add(pageData);<NEW_LINE>}<NEW_LINE>describeCdnDeletedDomainsResponse.setDomains(domains);<NEW_LINE>return describeCdnDeletedDomainsResponse;<NEW_LINE>}
(_ctx.longValue("DescribeCdnDeletedDomainsResponse.PageNumber"));
860,563
public void loadModel(List<Row> modelRows) {<NEW_LINE>final XGBoostModelDataConverter xgBoostModelDataConverter = new XGBoostModelDataConverter();<NEW_LINE>xgBoostModelDataConverter.load(modelRows);<NEW_LINE>labels = xgBoostModelDataConverter.labels;<NEW_LINE>XGBoost xgBoost = XGBoostClassLoaderFactory.create(xgBoostClassLoaderFactory).create();<NEW_LINE>try {<NEW_LINE>booster = xgBoost.loadModel(new InputStream() {<NEW_LINE><NEW_LINE>private final Decoder base64Encoder = Base64.getDecoder();<NEW_LINE><NEW_LINE>private final Iterator<String> iterator = xgBoostModelDataConverter.modelData.iterator();<NEW_LINE><NEW_LINE>private byte[] buffer;<NEW_LINE><NEW_LINE>private int cursor = 0;<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public int read() {<NEW_LINE>if ((buffer == null || cursor >= buffer.length) && iterator.hasNext()) {<NEW_LINE>buffer = base64Encoder.decode(iterator.next());<NEW_LINE>cursor = 0;<NEW_LINE>}<NEW_LINE>return buffer == null || cursor >= buffer.length ? -1 : buffer[cursor++] & 255;<NEW_LINE>}<NEW_LINE>});<NEW_LINE>} catch (XGboostException | IOException xgBoostError) {<NEW_LINE>throw new IllegalStateException(xgBoostError);<NEW_LINE>}<NEW_LINE>vectorSize = xgBoostModelDataConverter.meta.get(XGBoostModelDataConverter.XGBOOST_VECTOR_SIZE);<NEW_LINE>objective = xgBoostModelDataConverter.meta.get(XGBoostLearningTaskParams.OBJECTIVE);<NEW_LINE>if (xgBoostModelDataConverter.meta.contains(XGBoostInputParams.VECTOR_COL)) {<NEW_LINE>final int localVectorColIndex = TableUtil.findColIndexWithAssertAndHint(getDataSchema(), xgBoostModelDataConverter.meta.get(HasVectorCol.VECTOR_COL));<NEW_LINE>selectFieldsFunction = row -> Row.of(row.getField(localVectorColIndex));<NEW_LINE>} else {<NEW_LINE>final String[] featureCols = OutlierUtil.uniformFeatureColsDefaultAsAll(xgBoostModelDataConverter.meta.get(XGBoostInputParams.FEATURE_COLS), TableUtil.getNumericCols(getDataSchema()));<NEW_LINE>final int[] featureColIndices = TableUtil.<MASK><NEW_LINE>selectFieldsFunction = row -> Row.of(OutlierUtil.rowToDenseVector(row, featureColIndices, featureColIndices.length));<NEW_LINE>}<NEW_LINE>vectorColIndex = 0;<NEW_LINE>}
findColIndicesWithAssertAndHint(getDataSchema(), featureCols);
1,716,243
public void finishedToExecuteTask(Queueable msg) {<NEW_LINE>if (c_logger.isTraceEntryExitEnabled()) {<NEW_LINE>StringBuffer buff = new StringBuffer();<NEW_LINE>buff.append("QId=");<NEW_LINE><MASK><NEW_LINE>buff.append(" Message = ");<NEW_LINE>buff.append(msg);<NEW_LINE>// buff.append("Queue size =");<NEW_LINE>// buff.append(_queue.size());<NEW_LINE>c_logger.traceEntry(this, "finishedToExecuteTask", buff.toString());<NEW_LINE>}<NEW_LINE>PerformanceMgr perfMgr = PerformanceMgr.getInstance();<NEW_LINE>if (perfMgr != null && perfMgr.isApplicationDurationPMIEnabled() && msg != null && msg.getApplicationCodeDuration() != null && msg.getAppName() != null && msg.getAppIndexForPMI() != null) {<NEW_LINE>perfMgr.measureInApplicationTaskDuration(msg.getAppName(), msg.getAppIndexForPMI(), msg.getApplicationCodeDuration().takeTimeMeasurement());<NEW_LINE>}<NEW_LINE>invalidateWhenReadyTU();<NEW_LINE>synchronized (this) {<NEW_LINE>// currentQueue.set(null);<NEW_LINE>finishToExecuteRunnable();<NEW_LINE>this.notifyAll();<NEW_LINE>unrecordThreadID();<NEW_LINE>if (_queue.isEmpty()) {<NEW_LINE>m_isQhasTaskInThreadPool = false;<NEW_LINE>if (c_logger.isTraceDebugEnabled()) {<NEW_LINE>c_logger.traceDebug(this, "finishedToExecuteTask", "no more messages in Qid=" + getId() + " .releasing flag");<NEW_LINE>}<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (c_logger.isTraceDebugEnabled()) {<NEW_LINE>StringBuffer buff = new StringBuffer();<NEW_LINE>buff.append("QId=").append(getId()).append(" has ");<NEW_LINE>buff.append(_queue.size());<NEW_LINE>buff.append(" more messages.");<NEW_LINE>buff.append(msg);<NEW_LINE>c_logger.traceDebug(this, "finishedToExecuteTask", buff.toString());<NEW_LINE>}<NEW_LINE>// go fetch another task.<NEW_LINE>extractAmsgAndExecute();<NEW_LINE>if (c_logger.isTraceEntryExitEnabled()) {<NEW_LINE>c_logger.traceExit(this, "finishedToExecuteTask");<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
buff.append(getId());
1,110,681
public static void addOrUpdateRoleLDAPMappers(RealmModel realm, ComponentModel providerModel, LDAPGroupMapperMode mode) {<NEW_LINE>ComponentModel mapperModel = getSubcomponentByName(realm, providerModel, "realmRolesMapper");<NEW_LINE>if (mapperModel != null) {<NEW_LINE>mapperModel.getConfig().putSingle(RoleMapperConfig.MODE, mode.toString());<NEW_LINE>realm.updateComponent(mapperModel);<NEW_LINE>} else {<NEW_LINE>String baseDn = providerModel.getConfig().getFirst(LDAPConstants.BASE_DN);<NEW_LINE>mapperModel = KeycloakModelUtils.createComponentModel("realmRolesMapper", providerModel.getId(), RoleLDAPStorageMapperFactory.PROVIDER_ID, LDAPStorageMapper.class.getName(), RoleMapperConfig.ROLES_DN, "ou=RealmRoles," + baseDn, RoleMapperConfig.USE_REALM_ROLES_MAPPING, "true", RoleMapperConfig.<MASK><NEW_LINE>realm.addComponentModel(mapperModel);<NEW_LINE>}<NEW_LINE>mapperModel = getSubcomponentByName(realm, providerModel, "financeRolesMapper");<NEW_LINE>if (mapperModel != null) {<NEW_LINE>mapperModel.getConfig().putSingle(RoleMapperConfig.MODE, mode.toString());<NEW_LINE>realm.updateComponent(mapperModel);<NEW_LINE>} else {<NEW_LINE>String baseDn = providerModel.getConfig().getFirst(LDAPConstants.BASE_DN);<NEW_LINE>mapperModel = KeycloakModelUtils.createComponentModel("financeRolesMapper", providerModel.getId(), RoleLDAPStorageMapperFactory.PROVIDER_ID, LDAPStorageMapper.class.getName(), RoleMapperConfig.ROLES_DN, "ou=FinanceRoles," + baseDn, RoleMapperConfig.USE_REALM_ROLES_MAPPING, "false", RoleMapperConfig.CLIENT_ID, "finance", RoleMapperConfig.MODE, mode.toString());<NEW_LINE>realm.addComponentModel(mapperModel);<NEW_LINE>}<NEW_LINE>}
MODE, mode.toString());
1,612,708
final PutRecordResult executePutRecord(PutRecordRequest putRecordRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(putRecordRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<PutRecordRequest> request = null;<NEW_LINE>Response<PutRecordResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new PutRecordRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(putRecordRequest));<NEW_LINE>// Binds the request metrics to the current request.<NEW_LINE>request.setAWSRequestMetrics(awsRequestMetrics);<NEW_LINE>request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);<NEW_LINE>request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SERVICE_ID, "Kinesis");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "PutRecord");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<PutRecordResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new PutRecordResultJsonUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
1,742,449
private T waitUntilScaled(final int count) {<NEW_LINE>final AtomicReference<Integer> replicasRef <MASK><NEW_LINE>final String name = checkName(getItem());<NEW_LINE>final String namespace = checkNamespace(getItem());<NEW_LINE>try {<NEW_LINE>return waitUntilCondition(t -> {<NEW_LINE>// If the resource is gone, we shouldn't wait.<NEW_LINE>if (t == null) {<NEW_LINE>if (count == 0) {<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>throw new IllegalStateException("Can't wait for " + getType().getSimpleName() + ": " + name + " in namespace: " + namespace + " to scale. Resource is no longer available.");<NEW_LINE>}<NEW_LINE>int currentReplicas = getCurrentReplicas(t);<NEW_LINE>int desiredReplicas = getDesiredReplicas(t);<NEW_LINE>replicasRef.set(currentReplicas);<NEW_LINE>long generation = t.getMetadata().getGeneration() != null ? t.getMetadata().getGeneration() : -1;<NEW_LINE>long observedGeneration = getObservedGeneration(t);<NEW_LINE>if (observedGeneration >= generation && Objects.equals(desiredReplicas, currentReplicas)) {<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>Log.debug("Only {}/{} replicas scheduled for {}: {} in namespace: {} seconds so waiting...", currentReplicas, desiredReplicas, t.getKind(), t.getMetadata().getName(), namespace);<NEW_LINE>return false;<NEW_LINE>}, getConfig().getScaleTimeout(), TimeUnit.MILLISECONDS);<NEW_LINE>} catch (KubernetesClientTimeoutException e) {<NEW_LINE>Log.error("{}/{} pod(s) ready for {}: {} in namespace: {} after waiting for {} seconds so giving up", replicasRef.get(), count, getType().getSimpleName(), name, namespace, TimeUnit.MILLISECONDS.toSeconds(getConfig().getScaleTimeout()));<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>}
= new AtomicReference<>(0);
1,159,539
public void marshall(TranscriptionJob transcriptionJob, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (transcriptionJob == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(transcriptionJob.getTranscriptionJobName(), TRANSCRIPTIONJOBNAME_BINDING);<NEW_LINE>protocolMarshaller.marshall(transcriptionJob.getTranscriptionJobStatus(), TRANSCRIPTIONJOBSTATUS_BINDING);<NEW_LINE>protocolMarshaller.marshall(transcriptionJob.getLanguageCode(), LANGUAGECODE_BINDING);<NEW_LINE>protocolMarshaller.marshall(transcriptionJob.getMediaSampleRateHertz(), MEDIASAMPLERATEHERTZ_BINDING);<NEW_LINE>protocolMarshaller.marshall(transcriptionJob.getMediaFormat(), MEDIAFORMAT_BINDING);<NEW_LINE>protocolMarshaller.marshall(transcriptionJob.getMedia(), MEDIA_BINDING);<NEW_LINE>protocolMarshaller.marshall(transcriptionJob.getTranscript(), TRANSCRIPT_BINDING);<NEW_LINE>protocolMarshaller.marshall(transcriptionJob.getStartTime(), STARTTIME_BINDING);<NEW_LINE>protocolMarshaller.marshall(transcriptionJob.getCreationTime(), CREATIONTIME_BINDING);<NEW_LINE>protocolMarshaller.marshall(<MASK><NEW_LINE>protocolMarshaller.marshall(transcriptionJob.getFailureReason(), FAILUREREASON_BINDING);<NEW_LINE>protocolMarshaller.marshall(transcriptionJob.getSettings(), SETTINGS_BINDING);<NEW_LINE>protocolMarshaller.marshall(transcriptionJob.getModelSettings(), MODELSETTINGS_BINDING);<NEW_LINE>protocolMarshaller.marshall(transcriptionJob.getJobExecutionSettings(), JOBEXECUTIONSETTINGS_BINDING);<NEW_LINE>protocolMarshaller.marshall(transcriptionJob.getContentRedaction(), CONTENTREDACTION_BINDING);<NEW_LINE>protocolMarshaller.marshall(transcriptionJob.getIdentifyLanguage(), IDENTIFYLANGUAGE_BINDING);<NEW_LINE>protocolMarshaller.marshall(transcriptionJob.getLanguageOptions(), LANGUAGEOPTIONS_BINDING);<NEW_LINE>protocolMarshaller.marshall(transcriptionJob.getIdentifiedLanguageScore(), IDENTIFIEDLANGUAGESCORE_BINDING);<NEW_LINE>protocolMarshaller.marshall(transcriptionJob.getTags(), TAGS_BINDING);<NEW_LINE>protocolMarshaller.marshall(transcriptionJob.getSubtitles(), SUBTITLES_BINDING);<NEW_LINE>protocolMarshaller.marshall(transcriptionJob.getLanguageIdSettings(), LANGUAGEIDSETTINGS_BINDING);<NEW_LINE>} catch (Exception e) {<NEW_LINE>throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e);<NEW_LINE>}<NEW_LINE>}
transcriptionJob.getCompletionTime(), COMPLETIONTIME_BINDING);
669,684
protected boolean receiveAndExecute(Object invoker, @Nullable Session session, @Nullable MessageConsumer consumer) throws JMSException {<NEW_LINE>if (this.transactionManager != null) {<NEW_LINE>// Execute receive within transaction.<NEW_LINE>TransactionStatus status = this.transactionManager.getTransaction(this.transactionDefinition);<NEW_LINE>boolean messageReceived;<NEW_LINE>try {<NEW_LINE>messageReceived = doReceiveAndExecute(invoker, session, consumer, status);<NEW_LINE>} catch (JMSException | RuntimeException | Error ex) {<NEW_LINE>rollbackOnException(this.transactionManager, status, ex);<NEW_LINE>throw ex;<NEW_LINE>}<NEW_LINE>try {<NEW_LINE><MASK><NEW_LINE>} catch (TransactionException ex) {<NEW_LINE>// Propagate transaction system exceptions as infrastructure problems.<NEW_LINE>throw ex;<NEW_LINE>} catch (RuntimeException ex) {<NEW_LINE>// Typically a late persistence exception from a listener-used resource<NEW_LINE>// -> handle it as listener exception, not as an infrastructure problem.<NEW_LINE>// E.g. a database locking failure should not lead to listener shutdown.<NEW_LINE>handleListenerException(ex);<NEW_LINE>}<NEW_LINE>return messageReceived;<NEW_LINE>} else {<NEW_LINE>// Execute receive outside of transaction.<NEW_LINE>return doReceiveAndExecute(invoker, session, consumer, null);<NEW_LINE>}<NEW_LINE>}
this.transactionManager.commit(status);
188,846
private static boolean decodePointVar(byte[] p, int pOff, boolean negate, PointExt r) {<NEW_LINE>byte[] py = copy(p, pOff, POINT_BYTES);<NEW_LINE>if (!checkPointVar(py)) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>int x_0 = (py[POINT_BYTES - 1<MASK><NEW_LINE>py[POINT_BYTES - 1] &= 0x7F;<NEW_LINE>F.decode(py, 0, r.y);<NEW_LINE>int[] u = F.create();<NEW_LINE>int[] v = F.create();<NEW_LINE>F.sqr(r.y, u);<NEW_LINE>F.mul(u, -C_d, v);<NEW_LINE>F.negate(u, u);<NEW_LINE>F.addOne(u);<NEW_LINE>F.addOne(v);<NEW_LINE>if (!F.sqrtRatioVar(u, v, r.x)) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>F.normalize(r.x);<NEW_LINE>if (x_0 == 1 && F.isZeroVar(r.x)) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>if (negate ^ (x_0 != (r.x[0] & 1))) {<NEW_LINE>F.negate(r.x, r.x);<NEW_LINE>}<NEW_LINE>pointExtendXY(r);<NEW_LINE>return true;<NEW_LINE>}
] & 0x80) >>> 7;
863,767
public synchronized void broadcast(INDArray array) {<NEW_LINE>if (array == null)<NEW_LINE>return;<NEW_LINE>Preconditions.checkArgument(!array.isView() || array.elementWiseStride() != 1, "View can't be used in DeviceLocalNDArray");<NEW_LINE>Nd4j.getExecutioner().commit();<NEW_LINE>val config = OpProfiler<MASK><NEW_LINE>val locality = config.isCheckLocality();<NEW_LINE>if (locality)<NEW_LINE>config.setCheckLocality(false);<NEW_LINE>val numDevices = Nd4j.getAffinityManager().getNumberOfDevices();<NEW_LINE>val deviceId = Nd4j.getAffinityManager().getDeviceForCurrentThread();<NEW_LINE>if (!delayedMode) {<NEW_LINE>// in immediate mode we put data in<NEW_LINE>for (int i = 0; i < numDevices; i++) {<NEW_LINE>// if current thread equal to this device - we just save it, without duplication<NEW_LINE>if (deviceId == i) {<NEW_LINE>set(i, array.detach());<NEW_LINE>} else {<NEW_LINE>set(i, Nd4j.getAffinityManager().replicateToDevice(i, array));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>// we're only updating this device<NEW_LINE>set(Nd4j.getAffinityManager().getDeviceForCurrentThread(), array);<NEW_LINE>delayedArray = array.dup(array.ordering()).detach();<NEW_LINE>// and marking all other devices as stale, and provide id of device with the most recent array<NEW_LINE>for (int i = 0; i < numDevices; i++) {<NEW_LINE>if (i != deviceId) {<NEW_LINE>updatesMap.get(i).set(deviceId);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>config.setCheckLocality(locality);<NEW_LINE>}
.getInstance().getConfig();
503,260
public void evict(Object key) {<NEW_LINE>isNotNull(key, "key");<NEW_LINE>long startNanos = Timer.nanos();<NEW_LINE>V oldValue;<NEW_LINE>K marshalledKey = (K) marshall(key);<NEW_LINE>InternalReplicatedMapStorage<K, V> storage = getStorage();<NEW_LINE>ReplicatedRecord<K, V> current = storage.get(marshalledKey);<NEW_LINE>if (current == null) {<NEW_LINE>oldValue = null;<NEW_LINE>} else {<NEW_LINE>oldValue = current.getValueInternal();<NEW_LINE>storage.remove(marshalledKey, current);<NEW_LINE>}<NEW_LINE>Data dataKey = nodeEngine.toData(key);<NEW_LINE>Data dataOldValue = nodeEngine.toData(oldValue);<NEW_LINE>ReplicatedMapEventPublishingService eventPublishingService = replicatedMapService.getEventPublishingService();<NEW_LINE>eventPublishingService.fireEntryListenerEvent(dataKey, dataOldValue, null, EVICTED, <MASK><NEW_LINE>if (replicatedMapConfig.isStatisticsEnabled()) {<NEW_LINE>getStats().incrementRemovesNanos(Timer.nanosElapsed(startNanos));<NEW_LINE>}<NEW_LINE>}
name, nodeEngine.getThisAddress());
1,687,860
public byte[] uncompress(final byte[] content, final int offset, final int length) {<NEW_LINE>try {<NEW_LINE>final ByteArrayInputStream memoryInputStream = new ByteArrayInputStream(content, offset, length);<NEW_LINE>// 16KB<NEW_LINE>final ZipInputStream gzipInputStream = new ZipInputStream(memoryInputStream);<NEW_LINE>try {<NEW_LINE>final byte[<MASK><NEW_LINE>byte[] result = new byte[1024];<NEW_LINE>int bytesRead;<NEW_LINE>gzipInputStream.getNextEntry();<NEW_LINE>int len = 0;<NEW_LINE>while ((bytesRead = gzipInputStream.read(buffer, 0, buffer.length)) > -1) {<NEW_LINE>if (len + bytesRead > result.length) {<NEW_LINE>int newSize = 2 * result.length;<NEW_LINE>if (newSize < len + bytesRead)<NEW_LINE>newSize = Integer.MAX_VALUE;<NEW_LINE>final byte[] oldResult = result;<NEW_LINE>result = new byte[newSize];<NEW_LINE>System.arraycopy(oldResult, 0, result, 0, oldResult.length);<NEW_LINE>}<NEW_LINE>System.arraycopy(buffer, 0, result, len, bytesRead);<NEW_LINE>len += bytesRead;<NEW_LINE>}<NEW_LINE>return Arrays.copyOf(result, len);<NEW_LINE>} finally {<NEW_LINE>gzipInputStream.close();<NEW_LINE>}<NEW_LINE>} catch (IOException ioe) {<NEW_LINE>throw new IllegalStateException("Exception during data uncompression", ioe);<NEW_LINE>}<NEW_LINE>}
] buffer = new byte[1024];
490,957
protected void translateObservableDataToView(Entity item) {<NEW_LINE>physicsComponent = item.getComponent(PhysicsBodyComponent.class);<NEW_LINE>viewComponent.setBodyType(physicsComponent.bodyType);<NEW_LINE>viewComponent.getMassField().setText(physicsComponent.mass + "");<NEW_LINE>viewComponent.getCenterOfMassXField().setText(physicsComponent.centerOfMass.x + "");<NEW_LINE>viewComponent.getCenterOfMassYField().setText(physicsComponent.centerOfMass.y + "");<NEW_LINE>viewComponent.getRotationalIntertiaField().setText(physicsComponent.rotationalInertia + "");<NEW_LINE>viewComponent.getDumpingField().setText(physicsComponent.damping + "");<NEW_LINE>viewComponent.getGravityScaleField().setText(physicsComponent.gravityScale + "");<NEW_LINE>viewComponent.getDensityField().<MASK><NEW_LINE>viewComponent.getFrictionField().setText(physicsComponent.friction + "");<NEW_LINE>viewComponent.getRestitutionField().setText(physicsComponent.restitution + "");<NEW_LINE>viewComponent.getAllowSleepBox().setChecked(physicsComponent.allowSleep);<NEW_LINE>viewComponent.getAwakeBox().setChecked(physicsComponent.awake);<NEW_LINE>viewComponent.getBulletBox().setChecked(physicsComponent.bullet);<NEW_LINE>viewComponent.getSensorBox().setChecked(physicsComponent.sensor);<NEW_LINE>}
setText(physicsComponent.density + "");
1,804,006
protected void addAdditionalOperationHandlers() {<NEW_LINE>addOperationHandler(AddElementsFromHdfs.class, new AddElementsFromHdfsHandler());<NEW_LINE>addOperationHandler(GetElementsBetweenSets.class, new GetElementsBetweenSetsHandler());<NEW_LINE>addOperationHandler(GetElementsWithinSet.class, new GetElementsWithinSetHandler());<NEW_LINE>addOperationHandler(SplitStoreFromFile.class, new HdfsSplitStoreFromFileHandler());<NEW_LINE>addOperationHandler(SplitStoreFromIterable.class, new SplitStoreFromIterableHandler());<NEW_LINE>addOperationHandler(SplitStore.class, new SplitStoreHandler());<NEW_LINE>addOperationHandler(SampleElementsForSplitPoints.class, new SampleElementsForSplitPointsHandler());<NEW_LINE>addOperationHandler(GenerateSplitPointsFromSample.class, new GenerateSplitPointsFromSampleHandler());<NEW_LINE>addOperationHandler(SampleDataForSplitPoints.class, new SampleDataForSplitPointsHandler());<NEW_LINE>addOperationHandler(ImportAccumuloKeyValueFiles.class, new ImportAccumuloKeyValueFilesHandler());<NEW_LINE>if (null == getSchema().getVertexSerialiser() || getSchema().getVertexSerialiser().preservesObjectOrdering()) {<NEW_LINE>addOperationHandler(SummariseGroupOverRanges<MASK><NEW_LINE>addOperationHandler(GetElementsInRanges.class, new GetElementsInRangesHandler());<NEW_LINE>} else {<NEW_LINE>LOGGER.warn("Accumulo range scan operations will not be available on this store as the vertex serialiser does not preserve object ordering. Vertex serialiser: {}", getSchema().getVertexSerialiser().getClass().getName());<NEW_LINE>}<NEW_LINE>}
.class, new SummariseGroupOverRangesHandler());
1,507,438
private void assign_types_1_2() throws TypeException {<NEW_LINE>for (Iterator<Local> localIt = stmtBody.getLocals().iterator(); localIt.hasNext(); ) {<NEW_LINE>final Local local = localIt.next();<NEW_LINE>TypeVariable var = typeVariable(local);<NEW_LINE>if (var == null) {<NEW_LINE>local.setType(RefType.v("java.lang.Object"));<NEW_LINE>} else if (var.depth() == 0) {<NEW_LINE>if (var.type() == null) {<NEW_LINE>TypeVariable.error("Type Error(5): Variable without type");<NEW_LINE>} else {<NEW_LINE>local.setType(var.type().type());<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>TypeVariable element = var.element();<NEW_LINE>for (int j = 1; j < var.depth(); j++) {<NEW_LINE>element = element.element();<NEW_LINE>}<NEW_LINE>if (element.type() == null) {<NEW_LINE>TypeVariable.error("Type Error(6): Array variable without base type");<NEW_LINE>} else if (element.type().type() instanceof NullType) {<NEW_LINE>local.<MASK><NEW_LINE>} else {<NEW_LINE>Type t = element.type().type();<NEW_LINE>if (t instanceof IntType) {<NEW_LINE>local.setType(var.approx().type());<NEW_LINE>} else {<NEW_LINE>local.setType(ArrayType.v(t, var.depth()));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (DEBUG) {<NEW_LINE>if ((var != null) && (var.approx() != null) && (var.approx().type() != null) && (local != null) && (local.getType() != null) && !local.getType().equals(var.approx().type())) {<NEW_LINE>logger.debug("local: " + local + ", type: " + local.getType() + ", approx: " + var.approx().type());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
setType(NullType.v());
494,165
private void iterate(Platform platform, String[] registryNames, Registry registry, Product[] combination, int index, List<Product> products, int start) throws ManagerException {<NEW_LINE>for (int i = start; i < products.size(); i++) {<NEW_LINE>combination[index] = products.get(i);<NEW_LINE>if (index == combination.length - 1) {<NEW_LINE>for (Product product : products) {<NEW_LINE>product.setStatus(Status.NOT_INSTALLED);<NEW_LINE>}<NEW_LINE>for (Product product : combination) {<NEW_LINE>product.setStatus(Status.TO_BE_INSTALLED);<NEW_LINE>}<NEW_LINE>if (registry.getProductsToInstall().size() == combination.length) {<NEW_LINE>String[] components = new String[combination.length];<NEW_LINE>for (int j = 0; j < combination.length; j++) {<NEW_LINE>components[j] = combination[j].getUid() + "," + combination[j].getVersion().toString();<NEW_LINE>}<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>iterate(platform, registryNames, registry, combination, index + 1, products, i + 1);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
createBundle(platform, registryNames, components);
1,254,189
public Request<ListUserImportJobsRequest> marshall(ListUserImportJobsRequest listUserImportJobsRequest) {<NEW_LINE>if (listUserImportJobsRequest == null) {<NEW_LINE>throw new AmazonClientException("Invalid argument passed to marshall(ListUserImportJobsRequest)");<NEW_LINE>}<NEW_LINE>Request<ListUserImportJobsRequest> request = new DefaultRequest<ListUserImportJobsRequest>(listUserImportJobsRequest, "AmazonCognitoIdentityProvider");<NEW_LINE>String target = "AWSCognitoIdentityProviderService.ListUserImportJobs";<NEW_LINE>request.addHeader("X-Amz-Target", target);<NEW_LINE>request.setHttpMethod(HttpMethodName.POST);<NEW_LINE>String uriResourcePath = "/";<NEW_LINE>request.setResourcePath(uriResourcePath);<NEW_LINE>try {<NEW_LINE>StringWriter stringWriter = new StringWriter();<NEW_LINE>AwsJsonWriter jsonWriter = JsonUtils.getJsonWriter(stringWriter);<NEW_LINE>jsonWriter.beginObject();<NEW_LINE>if (listUserImportJobsRequest.getUserPoolId() != null) {<NEW_LINE>String userPoolId = listUserImportJobsRequest.getUserPoolId();<NEW_LINE>jsonWriter.name("UserPoolId");<NEW_LINE>jsonWriter.value(userPoolId);<NEW_LINE>}<NEW_LINE>if (listUserImportJobsRequest.getMaxResults() != null) {<NEW_LINE>Integer maxResults = listUserImportJobsRequest.getMaxResults();<NEW_LINE>jsonWriter.name("MaxResults");<NEW_LINE>jsonWriter.value(maxResults);<NEW_LINE>}<NEW_LINE>if (listUserImportJobsRequest.getPaginationToken() != null) {<NEW_LINE>String paginationToken = listUserImportJobsRequest.getPaginationToken();<NEW_LINE>jsonWriter.name("PaginationToken");<NEW_LINE>jsonWriter.value(paginationToken);<NEW_LINE>}<NEW_LINE>jsonWriter.endObject();<NEW_LINE>jsonWriter.close();<NEW_LINE>String snippet = stringWriter.toString();<NEW_LINE>byte[] content = snippet.getBytes(UTF8);<NEW_LINE>request.setContent(new StringInputStream(snippet));<NEW_LINE>request.addHeader("Content-Length", Integer.toString(content.length));<NEW_LINE>} catch (Throwable t) {<NEW_LINE>throw new AmazonClientException("Unable to marshall request to JSON: " + t.getMessage(), t);<NEW_LINE>}<NEW_LINE>if (!request.getHeaders().containsKey("Content-Type")) {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>return request;<NEW_LINE>}
request.addHeader("Content-Type", "application/x-amz-json-1.1");
420,259
public static void main(String[] args) throws IOException, NoSuchAlgorithmException {<NEW_LINE>String buildName = "build-test";<NEW_LINE>String buildNumber = "2";<NEW_LINE>String artifactoryURL = "http://localhost:8081/artifactory";<NEW_LINE>// optional. Only used when deploying the actual artifacts (in addition to the build info).<NEW_LINE>String targetRepository = "libs-release-local";<NEW_LINE>// directory location is passed by argument<NEW_LINE>File artifactsDirectory = new File(args[0]);<NEW_LINE>if (!artifactsDirectory.isDirectory()) {<NEW_LINE>throw new IOException(args[0] + " Path cannot be read, perhaps it does not exist, not a directory of there are not enough permissions to read it");<NEW_LINE>}<NEW_LINE>ArtifactoryBuildInfoClient client = new ArtifactoryBuildInfoClient(artifactoryURL, "admin", "password", new CreateAndDeploy.MyLog());<NEW_LINE>BuildInfoBuilder builder = new BuildInfoBuilder(buildName);<NEW_LINE>builder.number(buildNumber);<NEW_LINE>SimpleDateFormat simpleDateFormat = new SimpleDateFormat(Build.STARTED_FORMAT);<NEW_LINE>builder.started(simpleDateFormat.<MASK><NEW_LINE>ModuleBuilder moduleBuilder = new ModuleBuilder();<NEW_LINE>moduleBuilder.id("test-module");<NEW_LINE>List<File> listOfDirectoryArtifacts = new ArrayList<File>();<NEW_LINE>listOfDirectoryArtifacts = getFilesFromDirectoryRecursively(artifactsDirectory.listFiles(), listOfDirectoryArtifacts);<NEW_LINE>if (!listOfDirectoryArtifacts.isEmpty()) {<NEW_LINE>for (File currentArtifact : listOfDirectoryArtifacts) {<NEW_LINE>HashMap<String, String> checksums = (HashMap) FileChecksumCalculator.calculateChecksums(currentArtifact, "MD5", "SHA1");<NEW_LINE>ArtifactBuilder artifactBuilder = new ArtifactBuilder("artifactBuilder");<NEW_LINE>Artifact artifact = artifactBuilder.sha1(checksums.get("SHA1")).md5(checksums.get("MD5")).name(currentArtifact.getName()).build();<NEW_LINE>moduleBuilder = moduleBuilder.addArtifact(artifact);<NEW_LINE>// if you don't want the actual artifact to be deployed and only interested to deploy the build info, please comment the below line.<NEW_LINE>deployArtifact(client, currentArtifact, artifactsDirectory.getAbsolutePath(), targetRepository, buildName, buildNumber);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>Module module = moduleBuilder.build();<NEW_LINE>Build build = builder.addModule(module).agent(new Agent("Java-example-agent")).build();<NEW_LINE>try {<NEW_LINE>client.sendBuildInfo(build);<NEW_LINE>} catch (IOException e) {<NEW_LINE>e.printStackTrace();<NEW_LINE>}<NEW_LINE>}
format(new Date()));
504,424
public ApiResponse<String> eventsGet_0WithHttpInfo(DateTime fromDate, DateTime toDate, String user, String fileId, String filename) throws ApiException {<NEW_LINE>Object localVarPostBody = null;<NEW_LINE>// verify the required parameter 'fromDate' is set<NEW_LINE>if (fromDate == null) {<NEW_LINE>throw new ApiException(400, "Missing the required parameter 'fromDate' when calling eventsGet_0");<NEW_LINE>}<NEW_LINE>// verify the required parameter 'toDate' is set<NEW_LINE>if (toDate == null) {<NEW_LINE>throw new ApiException(400, "Missing the required parameter 'toDate' when calling eventsGet_0");<NEW_LINE>}<NEW_LINE>// verify the required parameter 'user' is set<NEW_LINE>if (user == null) {<NEW_LINE>throw new ApiException(400, "Missing the required parameter 'user' when calling eventsGet_0");<NEW_LINE>}<NEW_LINE>// verify the required parameter 'fileId' is set<NEW_LINE>if (fileId == null) {<NEW_LINE>throw new ApiException(400, "Missing the required parameter 'fileId' when calling eventsGet_0");<NEW_LINE>}<NEW_LINE>// verify the required parameter 'filename' is set<NEW_LINE>if (filename == null) {<NEW_LINE>throw new ApiException(400, "Missing the required parameter 'filename' when calling eventsGet_0");<NEW_LINE>}<NEW_LINE>// create path and map variables<NEW_LINE>String localVarPath = "/v4/events/export";<NEW_LINE>// query params<NEW_LINE>List<Pair> localVarQueryParams = new ArrayList<Pair>();<NEW_LINE>Map<String, String> localVarHeaderParams = new HashMap<String, String>();<NEW_LINE>Map<String, Object> localVarFormParams = new HashMap<String, Object>();<NEW_LINE>localVarQueryParams.addAll(apiClient.parameterToPairs("", "fromDate", fromDate));<NEW_LINE>localVarQueryParams.addAll(apiClient.parameterToPairs<MASK><NEW_LINE>localVarQueryParams.addAll(apiClient.parameterToPairs("", "user", user));<NEW_LINE>localVarQueryParams.addAll(apiClient.parameterToPairs("", "fileId", fileId));<NEW_LINE>localVarQueryParams.addAll(apiClient.parameterToPairs("", "filename", filename));<NEW_LINE>final String[] localVarAccepts = { "application/json", "text/json" };<NEW_LINE>final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);<NEW_LINE>final String[] localVarContentTypes = {};<NEW_LINE>final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);<NEW_LINE>String[] localVarAuthNames = new String[] { "oauth2" };<NEW_LINE>GenericType<String> localVarReturnType = new GenericType<String>() {<NEW_LINE>};<NEW_LINE>return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);<NEW_LINE>}
("", "toDate", toDate));
1,048,246
public void run() {<NEW_LINE>setScalingOnce();<NEW_LINE>setStyle(ctx, styleAtDrawingCall);<NEW_LINE>double centerX = (int) (x * zoomFactor + width * zoomFactor / 2) + HALF_PX;<NEW_LINE>double centerY = (int) (y * zoomFactor + height * zoomFactor / 2) + HALF_PX;<NEW_LINE>ctx.save();<NEW_LINE>// translate the arc and don't use the center parameters because they are affected by scaling<NEW_LINE>ctx.translate(centerX, centerY);<NEW_LINE>ctx.scale(1, (height * zoomFactor) / (width * zoomFactor));<NEW_LINE>if (ctx instanceof Context2dGwtWrapper) {<NEW_LINE>// PDF resets sub-paths on moveTo, therefore we need to draw closed arcs ourselves<NEW_LINE>if (open) {<NEW_LINE>// if arc should be open, move before the path begins<NEW_LINE>ctx.beginPath();<NEW_LINE>} else {<NEW_LINE>// otherwise the move is part of the path<NEW_LINE>ctx.beginPath();<NEW_LINE>ctx.moveTo(0, 0);<NEW_LINE>}<NEW_LINE>ctx.arc(0, 0, width * zoomFactor / 2, -Math.toRadians(start), -Math.toRadians(start + extent), true);<NEW_LINE>if (!open) {<NEW_LINE>// close path only if arc is not open and not PDF<NEW_LINE>ctx.closePath();<NEW_LINE>}<NEW_LINE>// restore before drawing so the line has the same with and is not affected by the scaling<NEW_LINE>ctx.restore();<NEW_LINE>fill(ctx, styleAtDrawingCall.getLineWidth() > 0);<NEW_LINE>} else {<NEW_LINE>if (open) {<NEW_LINE>ctx.arc(0, 0, width * zoomFactor / 2, -Math.toRadians(start), -Math.toRadians(start + extent), true);<NEW_LINE>} else {<NEW_LINE>ctx.moveTo(0, 0);<NEW_LINE>ctx.arc(0, 0, width * zoomFactor / 2, -Math.toRadians(start), -(Math.toRadians(start + extent)), true);<NEW_LINE>ctx.lineTo(0, 0);<NEW_LINE>ctx.closePath();<NEW_LINE>}<NEW_LINE>// TODO: Find a way to draw lines with uniform line width<NEW_LINE>fill(ctx, <MASK><NEW_LINE>ctx.restore();<NEW_LINE>}<NEW_LINE>}
styleAtDrawingCall.getLineWidth() > 0);