idx
int32
46
1.86M
input
stringlengths
321
6.6k
target
stringlengths
9
1.24k
114,247
final AddFlowSourcesResult executeAddFlowSources(AddFlowSourcesRequest addFlowSourcesRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(addFlowSourcesRequest);<NEW_LINE><MASK><NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<AddFlowSourcesRequest> request = null;<NEW_LINE>Response<AddFlowSourcesResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new AddFlowSourcesRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(addFlowSourcesRequest));<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, "MediaConnect");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "AddFlowSources");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<AddFlowSourcesResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new AddFlowSourcesResultJsonUnmarshaller());<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 awsRequestMetrics = executionContext.getAwsRequestMetrics();
513,144
public Range unmarshall(StaxUnmarshallerContext context) throws Exception {<NEW_LINE>Range range = new Range();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>if (context.isStartOfDocument())<NEW_LINE>targetDepth += 1;<NEW_LINE>while (true) {<NEW_LINE>XMLEvent xmlEvent = context.nextEvent();<NEW_LINE>if (xmlEvent.isEndDocument())<NEW_LINE>return range;<NEW_LINE>if (xmlEvent.isAttribute() || xmlEvent.isStartElement()) {<NEW_LINE>if (context.testExpression("From", targetDepth)) {<NEW_LINE>range.setFrom(IntegerStaxUnmarshaller.getInstance().unmarshall(context));<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>if (context.testExpression("To", targetDepth)) {<NEW_LINE>range.setTo(IntegerStaxUnmarshaller.getInstance().unmarshall(context));<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>if (context.testExpression("Step", targetDepth)) {<NEW_LINE>range.setStep(IntegerStaxUnmarshaller.getInstance<MASK><NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>} else if (xmlEvent.isEndElement()) {<NEW_LINE>if (context.getCurrentDepth() < originalDepth) {<NEW_LINE>return range;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
().unmarshall(context));
1,685,991
public static QualifiedName toQualifiedName(ASTNode node, boolean type) {<NEW_LINE>QualifiedName retval = null;<NEW_LINE>if (node instanceof FunctionInvocation) {<NEW_LINE>FunctionInvocation fi = (FunctionInvocation) node;<NEW_LINE>retval = QualifiedName.create(fi.getFunctionName().getName());<NEW_LINE>} else if (node instanceof ClassName) {<NEW_LINE>ClassName cname = (ClassName) node;<NEW_LINE>retval = QualifiedName.create(cname.getName());<NEW_LINE>} else if (node instanceof Identifier) {<NEW_LINE>Identifier cname = (Identifier) node;<NEW_LINE>retval = QualifiedName.createUnqualifiedName(cname);<NEW_LINE>} else if (node instanceof NamespaceName) {<NEW_LINE>retval = QualifiedName.create((NamespaceName) node);<NEW_LINE>} else if (node instanceof ClassInstanceCreation) {<NEW_LINE>ClassInstanceCreation instanceCreation = (ClassInstanceCreation) node;<NEW_LINE>retval = QualifiedName.create(instanceCreation.<MASK><NEW_LINE>} else if (node instanceof SingleUseStatementPart) {<NEW_LINE>SingleUseStatementPart statementPart = (SingleUseStatementPart) node;<NEW_LINE>retval = QualifiedName.create(statementPart.getName());<NEW_LINE>} else if (type && node instanceof StaticDispatch) {<NEW_LINE>StaticDispatch staticDispatch = (StaticDispatch) node;<NEW_LINE>retval = QualifiedName.create(staticDispatch.getDispatcher());<NEW_LINE>} else if (node instanceof Scalar) {<NEW_LINE>String toName = toName(node);<NEW_LINE>retval = QualifiedName.create(toName);<NEW_LINE>}<NEW_LINE>if (retval == null) {<NEW_LINE>String toName = toName(node);<NEW_LINE>if (toName == null) {<NEW_LINE>// #185702 - NullPointerException at org.netbeans.modules.php.editor.api.QualifiedNameKind.resolveKind<NEW_LINE>// $this->{'_find' . ucfirst($type)}('before', $query);<NEW_LINE>// NOI18N<NEW_LINE>retval = QualifiedName.createUnqualifiedName("");<NEW_LINE>} else {<NEW_LINE>retval = QualifiedName.createUnqualifiedName(toName);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return retval;<NEW_LINE>}
getClassName().getName());
656,713
public void submitApplication(ApplicationSubmissionContext appContext) throws YarnException, IOException {<NEW_LINE>String appName = tonyConf.get(TonyConfigurationKeys.APPLICATION_NAME, TonyConfigurationKeys.DEFAULT_APPLICATION_NAME);<NEW_LINE>appContext.setApplicationName(appName);<NEW_LINE>String appType = tonyConf.get(TonyConfigurationKeys.APPLICATION_TYPE, TonyConfigurationKeys.DEFAULT_APPLICATION_TYPE);<NEW_LINE>appContext.setApplicationType(appType);<NEW_LINE>if (!applicationTags.isEmpty()) {<NEW_LINE>appContext.setApplicationTags(applicationTags);<NEW_LINE>}<NEW_LINE>// Set the queue to which this application is to be submitted in the RM<NEW_LINE>String yarnQueue = tonyConf.get(TonyConfigurationKeys.YARN_QUEUE_NAME, TonyConfigurationKeys.DEFAULT_YARN_QUEUE_NAME);<NEW_LINE>appContext.setQueue(yarnQueue);<NEW_LINE>// Set the ContainerLaunchContext to describe the Container ith which the ApplicationMaster is launched.<NEW_LINE>ContainerLaunchContext amSpec = createAMContainerSpec(this.amMemory, getTokens());<NEW_LINE>appContext.setAMContainerSpec(amSpec);<NEW_LINE>String appNodeLabel = tonyConf.get(TonyConfigurationKeys.APPLICATION_NODE_LABEL);<NEW_LINE>if (appNodeLabel != null) {<NEW_LINE>appContext.setNodeLabelExpression(appNodeLabel);<NEW_LINE>}<NEW_LINE>// Set up resource type requirements<NEW_LINE>Resource capability = Resource.newInstance((int) amMemory, amVCores);<NEW_LINE>Utils.setCapabilityGPU(capability, amGpus);<NEW_LINE>ResourceRequest amRequest = Records.newRecord(ResourceRequest.class);<NEW_LINE><MASK><NEW_LINE>amRequest.setPriority(Priority.newInstance(0));<NEW_LINE>amRequest.setCapability(capability);<NEW_LINE>amRequest.setNumContainers(1);<NEW_LINE>String amNodeLabel = tonyConf.get(TonyConfigurationKeys.getNodeLabelKey(Constants.AM_NAME));<NEW_LINE>if (amNodeLabel != null) {<NEW_LINE>amRequest.setNodeLabelExpression(amNodeLabel);<NEW_LINE>}<NEW_LINE>appContext.setAMContainerResourceRequest(amRequest);<NEW_LINE>LOG.info("Submitting YARN application");<NEW_LINE>yarnClient.submitApplication(appContext);<NEW_LINE>ApplicationReport report = yarnClient.getApplicationReport(appId);<NEW_LINE>logTrackingAndRMUrls(report);<NEW_LINE>}
amRequest.setResourceName(ResourceRequest.ANY);
330,784
public static WorkspaceEdit handleWillRenameFiles(RenameFilesParams params, IProgressMonitor monitor) {<NEW_LINE>List<FileRename> files = params.getFiles();<NEW_LINE>if (files == null || files.isEmpty()) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>FileRename[<MASK><NEW_LINE>FileRename[] renameFolders = new FileRename[0];<NEW_LINE>FileRename[] moveFiles = new FileRename[0];<NEW_LINE>if (files.size() == 1) {<NEW_LINE>FileRename renameEvent = files.get(0);<NEW_LINE>if (isFileNameRenameEvent(renameEvent)) {<NEW_LINE>renameFiles = new FileRename[] { renameEvent };<NEW_LINE>} else if (isFolderRenameEvent(renameEvent)) {<NEW_LINE>renameFolders = new FileRename[] { renameEvent };<NEW_LINE>} else if (isMoveEvent(renameEvent)) {<NEW_LINE>moveFiles = new FileRename[] { renameEvent };<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>moveFiles = files.stream().filter(event -> isMoveEvent(event)).toArray(FileRename[]::new);<NEW_LINE>}<NEW_LINE>if (renameFiles.length == 0 && renameFolders.length == 0 && moveFiles.length == 0) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>SourcePath[] sourcePaths = getSourcePaths();<NEW_LINE>if (sourcePaths == null || sourcePaths.length == 0) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>WorkspaceEdit root = null;<NEW_LINE>SubMonitor submonitor = SubMonitor.convert(monitor, "Computing rename updates...", renameFiles.length + renameFolders.length + moveFiles.length);<NEW_LINE>if (renameFiles.length > 0) {<NEW_LINE>WorkspaceEdit edit = computeFileRenameEdit(renameFiles, submonitor.split(renameFiles.length));<NEW_LINE>root = ChangeUtil.mergeChanges(root, edit, true);<NEW_LINE>}<NEW_LINE>if (renameFolders.length > 0) {<NEW_LINE>WorkspaceEdit edit = computePackageRenameEdit(renameFolders, sourcePaths, submonitor.split(renameFolders.length));<NEW_LINE>root = ChangeUtil.mergeChanges(root, edit, true);<NEW_LINE>}<NEW_LINE>if (moveFiles.length > 0) {<NEW_LINE>WorkspaceEdit edit = computeMoveEdit(moveFiles, sourcePaths, submonitor.split(moveFiles.length));<NEW_LINE>root = ChangeUtil.mergeChanges(root, edit, true);<NEW_LINE>}<NEW_LINE>submonitor.done();<NEW_LINE>return ChangeUtil.hasChanges(root) ? root : null;<NEW_LINE>}
] renameFiles = new FileRename[0];
1,192,131
public void recordBrokerStats(BrokerStats brokerStats) {<NEW_LINE>try {<NEW_LINE>int brokerId = brokerStats.getId();<NEW_LINE>LinkedList<BrokerStats> brokerStatsList = brokerStatsMap.computeIfAbsent(brokerId, i -> new LinkedList<>());<NEW_LINE>// multiple PastReplicaStatsProcessor/BrokerStatsProcessor may be processing BrokerStats<NEW_LINE>// for the same broker simultaneously, thus enforcing single writes here<NEW_LINE>synchronized (brokerStatsList) {<NEW_LINE>if (brokerStatsList.size() == MAX_NUM_STATS) {<NEW_LINE>brokerStatsList.removeFirst();<NEW_LINE>}<NEW_LINE>brokerStatsList.addLast(brokerStats);<NEW_LINE>}<NEW_LINE>if (!brokerStats.getHasFailure()) {<NEW_LINE>// only record brokerstat when there is no failure on that broker.<NEW_LINE>KafkaBroker broker = brokers.computeIfAbsent(brokerId, i -> new KafkaBroker(clusterConfig, this, i));<NEW_LINE>broker.update(brokerStats);<NEW_LINE>}<NEW_LINE>if (brokerStats.getLeaderReplicaStats() != null) {<NEW_LINE>for (ReplicaStat replicaStat : brokerStats.getLeaderReplicaStats()) {<NEW_LINE>String topic = replicaStat.getTopic();<NEW_LINE>TopicPartition topicPartition = new TopicPartition(topic, replicaStat.getPartition());<NEW_LINE>topicPartitions.computeIfAbsent(topic, t -> new HashSet<><MASK><NEW_LINE>// if the replica is involved in reassignment, ignore the stats<NEW_LINE>if (replicaStat.getInReassignment()) {<NEW_LINE>reassignmentTimestamps.compute(topicPartition, (t, v) -> v == null || v < replicaStat.getTimestamp() ? replicaStat.getTimestamp() : v);<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>long lastReassignment = reassignmentTimestamps.getOrDefault(topicPartition, 0L);<NEW_LINE>if (brokerStats.getTimestamp() - lastReassignment < REASSIGNMENT_COOLDOWN_WINDOW_IN_MS) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>bytesInHistograms.computeIfAbsent(topicPartition, k -> new Histogram(new SlidingWindowReservoir(SLIDING_WINDOW_SIZE)));<NEW_LINE>bytesOutHistograms.computeIfAbsent(topicPartition, k -> new Histogram(new SlidingWindowReservoir(SLIDING_WINDOW_SIZE)));<NEW_LINE>bytesInHistograms.get(topicPartition).update(replicaStat.getBytesIn15MinMeanRate());<NEW_LINE>bytesOutHistograms.get(topicPartition).update(replicaStat.getBytesOut15MinMeanRate());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} catch (Exception e) {<NEW_LINE>LOG.error("Failed to read broker stats : {}", brokerStats, e);<NEW_LINE>}<NEW_LINE>}
()).add(topicPartition);
587,942
public void testTemplate(TestExecutionContext testExecCtx, TestExecutionResources testExecResources, Object managedComponentObject) {<NEW_LINE>// Verify parameters<NEW_LINE>if (testExecCtx == null || testExecResources == null) {<NEW_LINE>Assert.fail("AnnotationOverrideTestLogic.testTemplate(): Missing context and/or resources. Cannot execute the test.");<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>// Fetch JPA Resources<NEW_LINE>JPAResource jpaResource = testExecResources.getJpaResourceMap().get("test-jpa-resource");<NEW_LINE>if (jpaResource == null) {<NEW_LINE>Assert.fail("Missing JPAResource 'test-jpa-resource'). Cannot execute the test.");<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>// Fetch target entity type from test parameters<NEW_LINE>String entityAName = (String) testExecCtx.getProperties().get("EntityAName");<NEW_LINE>AnnotationOverrideEntityEnum targetEntityAType = AnnotationOverrideEntityEnum.resolveEntityByName(entityAName);<NEW_LINE>if (targetEntityAType == null) {<NEW_LINE>// Oops, unknown type<NEW_LINE>Assert.<MASK><NEW_LINE>return;<NEW_LINE>}<NEW_LINE>String entityBName = (String) testExecCtx.getProperties().get("EntityBName");<NEW_LINE>AnnotationOverrideEntityEnum targetEntityBType = AnnotationOverrideEntityEnum.resolveEntityByName(entityBName);<NEW_LINE>if (targetEntityBType == null) {<NEW_LINE>// Oops, unknown type<NEW_LINE>Assert.fail("Invalid Entity-B type specified ('" + entityBName + "'). Cannot execute the test.");<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>// Execute Test Case<NEW_LINE>try {<NEW_LINE>System.out.println("AnnotationOverrideTestLogic.testTemplate(): Begin");<NEW_LINE>// cleanupDatabase(jpaCleanupResource, log);<NEW_LINE>System.out.println("Ending test.");<NEW_LINE>} finally {<NEW_LINE>System.out.println("AnnotationOverrideTestLogic.testTemplate(): End");<NEW_LINE>}<NEW_LINE>}
fail("Invalid Entity-A type specified ('" + entityAName + "'). Cannot execute the test.");
927,667
private void loadNode909() {<NEW_LINE>BaseDataVariableTypeNode node = new BaseDataVariableTypeNode(this.context, Identifiers.ServerType_ServerDiagnostics_ServerDiagnosticsSummary_CumulatedSessionCount, new QualifiedName(0, "CumulatedSessionCount"), new LocalizedText("en", "CumulatedSessionCount"), LocalizedText.NULL_VALUE, UInteger.valueOf(0), UInteger.valueOf(0), new DataValue(Variant.NULL_VALUE), Identifiers.UInt32, -1, new UInteger[] {}, UByte.valueOf(1), UByte.valueOf(1), 0.0, false);<NEW_LINE>node.addReference(new Reference(Identifiers.ServerType_ServerDiagnostics_ServerDiagnosticsSummary_CumulatedSessionCount, Identifiers.HasTypeDefinition, Identifiers.BaseDataVariableType.expanded(), true));<NEW_LINE>node.addReference(new Reference(Identifiers.ServerType_ServerDiagnostics_ServerDiagnosticsSummary_CumulatedSessionCount, Identifiers.HasModellingRule, Identifiers.ModellingRule_Mandatory<MASK><NEW_LINE>node.addReference(new Reference(Identifiers.ServerType_ServerDiagnostics_ServerDiagnosticsSummary_CumulatedSessionCount, Identifiers.HasComponent, Identifiers.ServerType_ServerDiagnostics_ServerDiagnosticsSummary.expanded(), false));<NEW_LINE>this.nodeManager.addNode(node);<NEW_LINE>}
.expanded(), true));
396,471
private void copyUIElementGroups(final CopyContext copyCtx, final I_AD_UI_Column targetUIColumn, final I_AD_UI_Column sourceUIColumn) {<NEW_LINE>final Map<String, I_AD_UI_ElementGroup> existingUIElementGroups = retrieveUIElementGroupsQuery(targetUIColumn).create().map(I_AD_UI_ElementGroup.class, I_AD_UI_ElementGroup::getName);<NEW_LINE>final Collection<I_AD_UI_ElementGroup> sourceUIElementGroups = retrieveUIElementGroups(sourceUIColumn);<NEW_LINE>for (final I_AD_UI_ElementGroup sourceUIElementGroup : sourceUIElementGroups) {<NEW_LINE>final I_AD_UI_ElementGroup existingUIElementGroup = existingUIElementGroups.get(sourceUIElementGroup.getName());<NEW_LINE>copyUIElementGroup(<MASK><NEW_LINE>}<NEW_LINE>}
copyCtx, targetUIColumn, existingUIElementGroup, sourceUIElementGroup);
12,451
public Request<DescribeSpotFleetRequestHistoryRequest> marshall(DescribeSpotFleetRequestHistoryRequest describeSpotFleetRequestHistoryRequest) {<NEW_LINE>if (describeSpotFleetRequestHistoryRequest == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>Request<DescribeSpotFleetRequestHistoryRequest> request = new DefaultRequest<DescribeSpotFleetRequestHistoryRequest>(describeSpotFleetRequestHistoryRequest, "AmazonEC2");<NEW_LINE><MASK><NEW_LINE>request.addParameter("Version", "2016-11-15");<NEW_LINE>request.setHttpMethod(HttpMethodName.POST);<NEW_LINE>if (describeSpotFleetRequestHistoryRequest.getEventType() != null) {<NEW_LINE>request.addParameter("EventType", StringUtils.fromString(describeSpotFleetRequestHistoryRequest.getEventType()));<NEW_LINE>}<NEW_LINE>if (describeSpotFleetRequestHistoryRequest.getMaxResults() != null) {<NEW_LINE>request.addParameter("MaxResults", StringUtils.fromInteger(describeSpotFleetRequestHistoryRequest.getMaxResults()));<NEW_LINE>}<NEW_LINE>if (describeSpotFleetRequestHistoryRequest.getNextToken() != null) {<NEW_LINE>request.addParameter("NextToken", StringUtils.fromString(describeSpotFleetRequestHistoryRequest.getNextToken()));<NEW_LINE>}<NEW_LINE>if (describeSpotFleetRequestHistoryRequest.getSpotFleetRequestId() != null) {<NEW_LINE>request.addParameter("SpotFleetRequestId", StringUtils.fromString(describeSpotFleetRequestHistoryRequest.getSpotFleetRequestId()));<NEW_LINE>}<NEW_LINE>if (describeSpotFleetRequestHistoryRequest.getStartTime() != null) {<NEW_LINE>request.addParameter("StartTime", StringUtils.fromDate(describeSpotFleetRequestHistoryRequest.getStartTime()));<NEW_LINE>}<NEW_LINE>return request;<NEW_LINE>}
request.addParameter("Action", "DescribeSpotFleetRequestHistory");
245,683
private int readIntSlow() {<NEW_LINE>int value = 0;<NEW_LINE>int remaining = 4;<NEW_LINE>for (final Iterator<ByteBuf> it = queue.iterator(); it.hasNext(); ) {<NEW_LINE>final ByteBuf buf = it.next();<NEW_LINE>final <MASK><NEW_LINE>final int readSize = Math.min(remaining, readableBytes);<NEW_LINE>value <<= 8 * readSize;<NEW_LINE>switch(readSize) {<NEW_LINE>case 1:<NEW_LINE>value |= buf.readUnsignedByte();<NEW_LINE>break;<NEW_LINE>case 2:<NEW_LINE>value |= buf.readUnsignedShort();<NEW_LINE>break;<NEW_LINE>case 3:<NEW_LINE>value |= buf.readUnsignedMedium();<NEW_LINE>break;<NEW_LINE>default:<NEW_LINE>// Should not reach here.<NEW_LINE>throw new Error();<NEW_LINE>}<NEW_LINE>if (readSize == readableBytes) {<NEW_LINE>it.remove();<NEW_LINE>buf.release();<NEW_LINE>}<NEW_LINE>remaining -= readSize;<NEW_LINE>if (remaining == 0) {<NEW_LINE>return value;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>throw newEndOfInputException();<NEW_LINE>}
int readableBytes = buf.readableBytes();
1,735,141
public RFuture<Map<StreamMessageId, Map<K, V>>> readAsync(StreamReadArgs args) {<NEW_LINE>StreamReadParams rp = ((StreamReadSource) args).getParams();<NEW_LINE>List<Object> params = new ArrayList<Object>();<NEW_LINE>if (rp.getCount() > 0) {<NEW_LINE>params.add("COUNT");<NEW_LINE>params.add(rp.getCount());<NEW_LINE>}<NEW_LINE>if (rp.getTimeout() != null) {<NEW_LINE>params.add("BLOCK");<NEW_LINE>params.add(toSeconds(rp.getTimeout().getSeconds(), TimeUnit.SECONDS) * 1000);<NEW_LINE>}<NEW_LINE>params.add("STREAMS");<NEW_LINE>params.add(getRawName());<NEW_LINE>params.add(rp.getId1());<NEW_LINE>if (rp.getTimeout() != null) {<NEW_LINE>return commandExecutor.readAsync(getRawName(), codec, RedisCommands.XREAD_BLOCKING_SINGLE, params.toArray());<NEW_LINE>}<NEW_LINE>return commandExecutor.readAsync(getRawName(), codec, RedisCommands.<MASK><NEW_LINE>}
XREAD_SINGLE, params.toArray());
1,798,432
protected Object handleRequestMessage(Message<?> message) {<NEW_LINE>String tableName = this.tableNameExpression.getValue(this.evaluationContext, message, String.class);<NEW_LINE>FormatOptions formatOptions = this.formatOptionsExpression.getValue(this.evaluationContext, message, FormatOptions.class);<NEW_LINE>Schema schema = this.tableSchemaExpression.getValue(this.evaluationContext, message, Schema.class);<NEW_LINE>Assert.notNull(tableName, "BigQuery table name must not be null.");<NEW_LINE>Assert.notNull(formatOptions, "Data file formatOptions must not be null.");<NEW_LINE>try (InputStream inputStream = convertToInputStream(message.getPayload())) {<NEW_LINE>ListenableFuture<Job> jobFuture = this.bigQueryTemplate.writeDataToTable(<MASK><NEW_LINE>if (this.sync) {<NEW_LINE>return jobFuture.get(this.timeout.getSeconds(), TimeUnit.SECONDS);<NEW_LINE>} else {<NEW_LINE>return jobFuture;<NEW_LINE>}<NEW_LINE>} catch (FileNotFoundException e) {<NEW_LINE>throw new MessageHandlingException(message, "Failed to find file to write to BigQuery in message handler: " + this, e);<NEW_LINE>} catch (IOException e) {<NEW_LINE>throw new MessageHandlingException(message, "Failed to write data to BigQuery tables in message handler: " + this, e);<NEW_LINE>} catch (InterruptedException | ExecutionException | TimeoutException e) {<NEW_LINE>throw new MessageHandlingException(message, "Failed to wait for BigQuery Job to complete in message handler: " + this, e);<NEW_LINE>}<NEW_LINE>}
tableName, inputStream, formatOptions, schema);
10,816
public int compare(File file1, File file2) {<NEW_LINE>if (sortBy == SORT_BY_NAME || sortBy == SORT_BY_SIZE) {<NEW_LINE>if (model.isDirectory(file1)) {<NEW_LINE>if (model.isDirectory(file2)) {<NEW_LINE>int value = file1.getAbsolutePath().compareToIgnoreCase(file2.getAbsolutePath());<NEW_LINE>return value;<NEW_LINE>}<NEW_LINE>// dirs come before files<NEW_LINE>return -1;<NEW_LINE>} else if (model.isDirectory(file2)) {<NEW_LINE>// files go after dirs<NEW_LINE>return 1;<NEW_LINE>}<NEW_LINE>} else if (sortBy == SORT_BY_TIME) {<NEW_LINE>if (model.isDirectory(file1)) {<NEW_LINE>if (model.isDirectory(file2)) {<NEW_LINE>return compare(file1.lastModified(<MASK><NEW_LINE>}<NEW_LINE>// dirs come before files<NEW_LINE>return -1;<NEW_LINE>} else if (model.isDirectory(file2)) {<NEW_LINE>// files go after dirs<NEW_LINE>return 1;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>int value = 0;<NEW_LINE>if (sortBy == SORT_BY_NAME) {<NEW_LINE>value = file1.getName().compareToIgnoreCase(file2.getName());<NEW_LINE>} else if (sortBy == SORT_BY_SIZE) {<NEW_LINE>value = compare(file1.length(), file2.length());<NEW_LINE>} else if (sortBy == SORT_BY_TIME) {<NEW_LINE>value = compare(file1.lastModified(), file2.lastModified());<NEW_LINE>}<NEW_LINE>return value;<NEW_LINE>}
), file2.lastModified());
811,364
public double expectedValue() {<NEW_LINE>// zero all the variables<NEW_LINE>double s = 0;<NEW_LINE>aux = new double[probConds.length];<NEW_LINE>for (int i = 0; i < probConds.length; i++) {<NEW_LINE>for (int j = 0; j < probConds[i].length; j++) {<NEW_LINE>probConds[i][j] = 0;<NEW_LINE>}<NEW_LINE>zlambda[i] = 0;<NEW_LINE>}<NEW_LINE>// add up in pcond y|x the unnormalized scores<NEW_LINE>for (int fNo = 0, fSize = p.fSize; fNo < fSize; fNo++) {<NEW_LINE>// add for all occurrences of the function the values to probConds<NEW_LINE>Feature f = p.functions.get(fNo);<NEW_LINE>double fLambda = lambda[fNo];<NEW_LINE>if (Math.abs(fLambda) > 200) {<NEW_LINE>// was 50<NEW_LINE>log.info("lambda " + fNo + " too big: " + fLambda);<NEW_LINE>}<NEW_LINE>for (int i = 0, length = f.len(); i < length; i++) {<NEW_LINE>int x = f.getX(i);<NEW_LINE>int y = f.getY(i);<NEW_LINE>if (ASSUME_BINARY) {<NEW_LINE>probConds[x][y] += fLambda;<NEW_LINE>} else {<NEW_LINE>double val = f.getVal(i);<NEW_LINE>probConds[x][<MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE>// for<NEW_LINE>}<NEW_LINE>// for fNo<NEW_LINE>Experiments exp = p.data;<NEW_LINE>for (int x = 0; x < probConds.length; x++) {<NEW_LINE>// again<NEW_LINE>// cpu samples #4,#15: 4.5%<NEW_LINE>zlambda[x] = ArrayMath.logSum(probConds[x]);<NEW_LINE>// log.info("zlambda "+x+" "+zlambda[x]);<NEW_LINE>for (int y = 0; y < probConds[x].length; y++) {<NEW_LINE>// cpu samples #13: 1.6%<NEW_LINE>probConds[x][y] = divide(probConds[x][y], zlambda[x]);<NEW_LINE>// log.info("prob "+x+" "+y+" "+probConds[x][y]);<NEW_LINE>s -= exp.values[x][y] * probConds[x][y] * exp.ptildeX(x) * exp.getNumber();<NEW_LINE>aux[x] += exp.values[x][y] * probConds[x][y];<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// x<NEW_LINE>return s;<NEW_LINE>}
y] += (val * fLambda);
1,371,247
public boolean checkTrigger(GameEvent event, Game game) {<NEW_LINE>if (event.getPlayerId().equals(this.getControllerId())) {<NEW_LINE>if (game.isActivePlayer(this.getControllerId()) && this.lastTriggeredTurn != game.getTurnNum()) {<NEW_LINE>Card card = game.getCard(event.getTargetId());<NEW_LINE>Player controller = game.getPlayer(this.getControllerId());<NEW_LINE>Permanent sourcePermanent = game.getPermanentOrLKIBattlefield(this.getSourceId());<NEW_LINE>if (card != null && controller != null && sourcePermanent != null) {<NEW_LINE>lastTriggeredTurn = game.getTurnNum();<NEW_LINE>controller.revealCards(sourcePermanent.getName(), new CardsImpl(card), game);<NEW_LINE>this<MASK><NEW_LINE>if (card.isCreature(game)) {<NEW_LINE>this.addEffect(new DrawCardSourceControllerEffect(1));<NEW_LINE>}<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return false;<NEW_LINE>}
.getEffects().clear();
1,051,836
public void marshall(CreateRuleGroupRequest createRuleGroupRequest, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (createRuleGroupRequest == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(<MASK><NEW_LINE>protocolMarshaller.marshall(createRuleGroupRequest.getScope(), SCOPE_BINDING);<NEW_LINE>protocolMarshaller.marshall(createRuleGroupRequest.getCapacity(), CAPACITY_BINDING);<NEW_LINE>protocolMarshaller.marshall(createRuleGroupRequest.getDescription(), DESCRIPTION_BINDING);<NEW_LINE>protocolMarshaller.marshall(createRuleGroupRequest.getRules(), RULES_BINDING);<NEW_LINE>protocolMarshaller.marshall(createRuleGroupRequest.getVisibilityConfig(), VISIBILITYCONFIG_BINDING);<NEW_LINE>protocolMarshaller.marshall(createRuleGroupRequest.getTags(), TAGS_BINDING);<NEW_LINE>protocolMarshaller.marshall(createRuleGroupRequest.getCustomResponseBodies(), CUSTOMRESPONSEBODIES_BINDING);<NEW_LINE>} catch (Exception e) {<NEW_LINE>throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e);<NEW_LINE>}<NEW_LINE>}
createRuleGroupRequest.getName(), NAME_BINDING);
289,170
public void actionPerformed(ActionEvent e) {<NEW_LINE>// XXX should have utility API to parse stack traces<NEW_LINE>// NOI18N<NEW_LINE>final Matcher m = Pattern.compile("\tat (.+[.])[^.]+[.][^.]+[(]([^.]+[.]java):([0-9]+)[)]").matcher(frameInfo);<NEW_LINE>if (m.matches()) {<NEW_LINE>final String resource = m.group(1).replace('.', '/') + m.group(2);<NEW_LINE>RP.post(new Runnable() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void run() {<NEW_LINE>FileObject f = GlobalPathRegistry.getDefault().findResource(resource);<NEW_LINE>// NOI18N<NEW_LINE>LOG.log(Level.FINER, "matched {0} -> {1}", new Object<MASK><NEW_LINE>if (f != null) {<NEW_LINE>HudsonLoggerHelper.openAt(f, Integer.parseInt(m.group(3)) - 1, -1, true);<NEW_LINE>} else {<NEW_LINE>StatusDisplayer.getDefault().setStatusText(Bundle.no_source_to_hyperlink(resource));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>});<NEW_LINE>} else {<NEW_LINE>// NOI18N<NEW_LINE>LOG.log(Level.FINER, "no match for {0}", frameInfo);<NEW_LINE>}<NEW_LINE>}
[] { resource, f });
1,192,828
public void onCreate(Bundle savedInstanceState) {<NEW_LINE>super.onCreate(savedInstanceState);<NEW_LINE>Log.v("MainActivity", "onCreate");<NEW_LINE>activityMainBinding = DataBindingUtil.setContentView(this, R.layout.activity_main);<NEW_LINE>NavHostFragment navHostFragment = (NavHostFragment) getSupportFragmentManager().findFragmentById(R.id.nav_host_fragment);<NEW_LINE>// Setup toolbar with nav controller<NEW_LINE>NavController navController = navHostFragment.getNavController();<NEW_LINE>AppBarConfiguration appBarConfiguration = new AppBarConfiguration.Builder(navController.getGraph()).build();<NEW_LINE>Toolbar toolbar = findViewById(R.id.toolbar);<NEW_LINE>setSupportActionBar(toolbar);<NEW_LINE>NavigationUI.setupWithNavController(toolbar, navController, appBarConfiguration);<NEW_LINE>// Create our Activity ViewModel, which exists to handle global Snackbar messages<NEW_LINE>MainActivityViewModel.MainActivityViewModelFactory mainActivityViewModelFactory = new MainActivityViewModel.MainActivityViewModelFactory(((TrivialDriveApplication) getApplication()).appContainer.trivialDriveRepository);<NEW_LINE>mainActivityViewModel = new ViewModelProvider(this, mainActivityViewModelFactory).get(MainActivityViewModel.class);<NEW_LINE>mainActivityViewModel.getMessages().observe(this, resId -> {<NEW_LINE>Snackbar snackbar = Snackbar.make(activityMainBinding.mainLayout, getString(resId), Snackbar.LENGTH_SHORT);<NEW_LINE>snackbar.show();<NEW_LINE>});<NEW_LINE>// Allows billing to refresh purchases during onResume<NEW_LINE>getLifecycle().<MASK><NEW_LINE>// A helpful hint to prevent confusion when billing transactions silently fail<NEW_LINE>if (BuildConfig.BASE64_ENCODED_PUBLIC_KEY.equals("null")) {<NEW_LINE>if (getSupportFragmentManager().findFragmentByTag(PublicKeyNotSetDialog.DIALOG_TAG) == null) {<NEW_LINE>new PublicKeyNotSetDialog().show(getSupportFragmentManager(), PublicKeyNotSetDialog.DIALOG_TAG);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
addObserver(mainActivityViewModel.getBillingLifecycleObserver());
158,274
public boolean put(@NonNull final InOutLineId shipmentLineId, @NonNull final Integer lineNo) {<NEW_LINE>if (lineNo <= 0) {<NEW_LINE>logger.debug("Ignoring lineNo={} is associated with shipmentLineId={}; -> ignore, i.e. no collission; return true", lineNo, shipmentLineId);<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>shipmentLineIdToLineNo.put(shipmentLineId, lineNo);<NEW_LINE><MASK><NEW_LINE>if (lineNoToShipmentLineId.get(lineNo).size() > 1) {<NEW_LINE>logger.debug("LineNo={} is associated with multiple shipmentLineIds={}; -> collision detected; return false", lineNo, lineNoToShipmentLineId.get(lineNo));<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>logger.debug("LineNo={} is associated only with shipmentLineId={} so far; -> no collision; return true", lineNo, shipmentLineId);<NEW_LINE>return true;<NEW_LINE>}
lineNoToShipmentLineId.put(lineNo, shipmentLineId);
992,483
private static void sortSam(final File input, final File output, final File reference, final ValidationStringency stringency) {<NEW_LINE>final SortSam sort = new SortSam();<NEW_LINE>// We can't use ArgumentsBuilder since it assumes GATK argument names, but we're running a Picard<NEW_LINE>// tool, which uses upper case argument names.<NEW_LINE>final List<String> args = new ArrayList<>(6);<NEW_LINE>args.add("-I");<NEW_LINE>args.add(input.getAbsolutePath());<NEW_LINE>args.add("-O");<NEW_LINE>args.add(output.getAbsolutePath());<NEW_LINE>args.add("-SO");<NEW_LINE>args.add(SAMFileHeader.<MASK><NEW_LINE>args.add("--VALIDATION_STRINGENCY");<NEW_LINE>args.add(stringency.name());<NEW_LINE>if (reference != null) {<NEW_LINE>args.add("--REFERENCE_SEQUENCE");<NEW_LINE>args.add(reference.getAbsolutePath());<NEW_LINE>}<NEW_LINE>int returnCode = sort.instanceMain(args.toArray(new String[0]));<NEW_LINE>if (returnCode != 0) {<NEW_LINE>throw new RuntimeException("Failure running SortSam on inputs");<NEW_LINE>}<NEW_LINE>}
SortOrder.coordinate.name());
1,387,948
protected void onStarted(@NonNull ActionHolder holder, @Nullable MeteringRectangle area) {<NEW_LINE>boolean changed = false;<NEW_LINE>int maxRegions = <MASK><NEW_LINE>if (area != null && maxRegions > 0) {<NEW_LINE>holder.getBuilder(this).set(CaptureRequest.CONTROL_AF_REGIONS, new MeteringRectangle[] { area });<NEW_LINE>changed = true;<NEW_LINE>}<NEW_LINE>// NOTE: trigger might not be supported, in which case I think it will be ignored.<NEW_LINE>CaptureResult lastResult = holder.getLastResult(this);<NEW_LINE>Integer trigger = lastResult == null ? null : lastResult.get(CaptureResult.CONTROL_AF_TRIGGER);<NEW_LINE>LOG.w("onStarted:", "last focus trigger is", trigger);<NEW_LINE>if (trigger != null && trigger == CaptureRequest.CONTROL_AE_PRECAPTURE_TRIGGER_START) {<NEW_LINE>holder.getBuilder(this).set(CaptureRequest.CONTROL_AF_TRIGGER, CaptureRequest.CONTROL_AF_TRIGGER_CANCEL);<NEW_LINE>changed = true;<NEW_LINE>}<NEW_LINE>if (changed)<NEW_LINE>holder.applyBuilder(this);<NEW_LINE>setState(STATE_COMPLETED);<NEW_LINE>}
readCharacteristic(CameraCharacteristics.CONTROL_MAX_REGIONS_AF, 0);
285,603
final GetAdministratorAccountResult executeGetAdministratorAccount(GetAdministratorAccountRequest getAdministratorAccountRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(getAdministratorAccountRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<GetAdministratorAccountRequest> request = null;<NEW_LINE>Response<GetAdministratorAccountResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new GetAdministratorAccountRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(getAdministratorAccountRequest));<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, "SecurityHub");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "GetAdministratorAccount");<NEW_LINE>request.<MASK><NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<GetAdministratorAccountResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new GetAdministratorAccountResultJsonUnmarshaller());<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.ADVANCED_CONFIG, advancedConfig);
1,338,206
public Tuple3<Params, Iterable<String>, Iterable<Row>> serializeModel(Tuple3<Strategy, TableSummary, String> modelData) {<NEW_LINE>Strategy strategy = modelData.f0;<NEW_LINE>TableSummary summary = modelData.f1;<NEW_LINE>String fillValue = modelData.f2;<NEW_LINE>double[] values = null;<NEW_LINE>Params meta = new Params().set(STRATEGY, strategy).set(SELECTED_COLS, selectedColNames);<NEW_LINE>switch(strategy) {<NEW_LINE>case MIN:<NEW_LINE>values = new double[selectedColNames.length];<NEW_LINE>for (int i = 0; i < selectedColNames.length; i++) {<NEW_LINE>values[i] = summary.min(selectedColNames[i]);<NEW_LINE>}<NEW_LINE>break;<NEW_LINE>case MAX:<NEW_LINE>values = new double[selectedColNames.length];<NEW_LINE>for (int i = 0; i < selectedColNames.length; i++) {<NEW_LINE>values[i] = summary<MASK><NEW_LINE>}<NEW_LINE>break;<NEW_LINE>case MEAN:<NEW_LINE>values = new double[selectedColNames.length];<NEW_LINE>for (int i = 0; i < selectedColNames.length; i++) {<NEW_LINE>values[i] = summary.mean(selectedColNames[i]);<NEW_LINE>}<NEW_LINE>break;<NEW_LINE>default:<NEW_LINE>meta.set(FILL_VALUE, fillValue);<NEW_LINE>}<NEW_LINE>List<String> data = new ArrayList<>();<NEW_LINE>data.add(JsonConverter.toJson(values));<NEW_LINE>return Tuple3.of(meta, data, new ArrayList<>());<NEW_LINE>}
.max(selectedColNames[i]);
416,639
private Runnable createRssReadCommand() {<NEW_LINE>return new Runnable() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void run() {<NEW_LINE>GPLogger.log("Starting RSS check...");<NEW_LINE>HttpClient httpClient = new DefaultHttpClient();<NEW_LINE>String url = RSS_URL;<NEW_LINE>HttpGet getRssUrl = new HttpGet(url);<NEW_LINE>getRssUrl.addHeader("User-Agent", "GanttProject " + GPVersion.getCurrentVersionNumber());<NEW_LINE>try {<NEW_LINE>for (int i = 0; i < MAX_ATTEMPTS; i++) {<NEW_LINE>HttpResponse <MASK><NEW_LINE>switch(result.getStatusLine().getStatusCode()) {<NEW_LINE>case HttpStatus.SC_OK:<NEW_LINE>processResponse(result.getEntity().getContent());<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} catch (MalformedURLException e) {<NEW_LINE>e.printStackTrace();<NEW_LINE>} catch (IOException e) {<NEW_LINE>e.printStackTrace();<NEW_LINE>} finally {<NEW_LINE>getRssUrl.releaseConnection();<NEW_LINE>httpClient.getConnectionManager().shutdown();<NEW_LINE>GPLogger.log("RSS check finished");<NEW_LINE>}<NEW_LINE>}<NEW_LINE><NEW_LINE>private void processResponse(InputStream responseStream) {<NEW_LINE>RssFeed feed = parser.parse(responseStream, myLastCheckOption.getValue());<NEW_LINE>List<NotificationItem> items = new ArrayList<NotificationItem>();<NEW_LINE>boolean updateDialogShowed = false;<NEW_LINE>for (RssFeed.Item item : feed.getItems()) {<NEW_LINE>if (item.isUpdate) {<NEW_LINE>if (!updateDialogShowed) {<NEW_LINE>updateDialogShowed = true;<NEW_LINE>createUpdateDialog(item.body);<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>items.add(new NotificationItem(item.title, item.body, NotificationManager.DEFAULT_HYPERLINK_LISTENER));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>Collections.reverse(items);<NEW_LINE>if (!items.isEmpty()) {<NEW_LINE>getNotificationManager().addNotifications(NotificationChannel.RSS, items);<NEW_LINE>}<NEW_LINE>markLastCheck();<NEW_LINE>}<NEW_LINE>};<NEW_LINE>}
result = httpClient.execute(getRssUrl);
1,068,995
private void updateDisplay(boolean announce) {<NEW_LINE>if (mDayOfWeekView != null) {<NEW_LINE>mDayOfWeekView.setText(mCalendar.getDisplayName(Calendar.DAY_OF_WEEK, Calendar.LONG, Locale.getDefault()).toUpperCase(Locale.getDefault()));<NEW_LINE>}<NEW_LINE>mSelectedMonthTextView.setText(mCalendar.getDisplayName(Calendar.MONTH, Calendar.SHORT, Locale.getDefault()).toUpperCase(Locale.getDefault()));<NEW_LINE>mSelectedMonthTextViewEnd.setText(mCalendarEnd.getDisplayName(Calendar.MONTH, Calendar.SHORT, Locale.getDefault()).toUpperCase(Locale.getDefault()));<NEW_LINE>mSelectedDayTextView.setText(DAY_FORMAT.format(mCalendar.getTime()));<NEW_LINE>mSelectedDayTextViewEnd.setText(DAY_FORMAT.format(mCalendarEnd.getTime()));<NEW_LINE>mYearView.setText(YEAR_FORMAT.format(mCalendar.getTime()));<NEW_LINE>mYearViewEnd.setText(YEAR_FORMAT.format(mCalendarEnd.getTime()));<NEW_LINE>// Accessibility.<NEW_LINE>long millis = mCalendar.getTimeInMillis();<NEW_LINE>long millisEnd = mCalendarEnd.getTimeInMillis();<NEW_LINE>mAnimator.setDateMillis(millis);<NEW_LINE>mAnimatorEnd.setDateMillis(millisEnd);<NEW_LINE>int flags = DateUtils.FORMAT_SHOW_DATE | DateUtils.FORMAT_NO_YEAR;<NEW_LINE>String monthAndDayText = DateUtils.formatDateTime(getActivity(), millis, flags);<NEW_LINE>String monthAndDayTextEnd = DateUtils.formatDateTime(getActivity(), millisEnd, flags);<NEW_LINE>mMonthAndDayView.setContentDescription(monthAndDayText);<NEW_LINE>mMonthAndDayViewEnd.setContentDescription(monthAndDayTextEnd);<NEW_LINE>if (announce) {<NEW_LINE>flags <MASK><NEW_LINE>String fullDateText = DateUtils.formatDateTime(getActivity(), millis, flags);<NEW_LINE>String fullDateTextEnd = DateUtils.formatDateTime(getActivity(), millisEnd, flags);<NEW_LINE>Utils.tryAccessibilityAnnounce(mAnimator, fullDateText);<NEW_LINE>Utils.tryAccessibilityAnnounce(mAnimatorEnd, fullDateTextEnd);<NEW_LINE>}<NEW_LINE>}
= DateUtils.FORMAT_SHOW_DATE | DateUtils.FORMAT_SHOW_YEAR;
978,545
private LoadedResourceModelSource loadResourceModelSource(String type, Properties configuration, boolean useCache, String ident, int index) throws ExecutionServiceException {<NEW_LINE>configuration.put("project", projectConfig.getName());<NEW_LINE>CloseableProvider<ResourceModelSource> sourceForConfiguration;<NEW_LINE>if (null == factoryFunction) {<NEW_LINE>sourceForConfiguration = resourceModelSourceService.getCloseableSourceForConfiguration(type, configuration);<NEW_LINE>} else {<NEW_LINE>try {<NEW_LINE>sourceForConfiguration = getFactoryFunction().apply(new SourceDefinitionImpl(type, configuration, ident, index));<NEW_LINE>} catch (Throwable e) {<NEW_LINE>throw new ExecutionServiceException(e, "Could not create node source: " + e.getMessage());<NEW_LINE>}<NEW_LINE>if (sourceForConfiguration == null) {<NEW_LINE>throw new ExecutionServiceException("Could not create node source: not found");<NEW_LINE>}<NEW_LINE>}<NEW_LINE>nodeSourceReferences.add(sourceForConfiguration);<NEW_LINE>if (useCache) {<NEW_LINE>return new LoadedSource(index, type, createCachingSource(sourceForConfiguration.getProvider(), ident, ident <MASK><NEW_LINE>} else {<NEW_LINE>return new LoadedSource(index, type, sourceForConfiguration.getProvider());<NEW_LINE>}<NEW_LINE>}
+ " (" + type + ")"));
1,209,803
public ReadableCategory convert(Category source, MerchantStore store, Language language) {<NEW_LINE>if (Objects.isNull(language)) {<NEW_LINE>ReadableCategoryFull target = new ReadableCategoryFull();<NEW_LINE>List<com.salesmanager.shop.model.catalog.category.CategoryDescription> descriptions = source.getDescriptions().stream().map(this::convertDescription).collect(Collectors.toList());<NEW_LINE>target.setDescriptions(descriptions);<NEW_LINE>fillReadableCategory(target, source);<NEW_LINE>return target;<NEW_LINE>} else {<NEW_LINE>ReadableCategory target = new ReadableCategory();<NEW_LINE>Optional<com.salesmanager.shop.model.catalog.category.CategoryDescription> description = source.getDescriptions().stream().filter(d -> language.getId().equals(d.getLanguage().getId())).map(<MASK><NEW_LINE>description.ifPresent(target::setDescription);<NEW_LINE>fillReadableCategory(target, source);<NEW_LINE>return target;<NEW_LINE>}<NEW_LINE>}
this::convertDescription).findAny();
892,950
public void fix(FixedHandle hand, ParserWalker walker) {<NEW_LINE>if (ptrspace.getType() == ConstTpl.REAL) {<NEW_LINE>// The export is unstarred, but this doesn't mean<NEW_LINE>// the varnode being exported isn't dynamic<NEW_LINE>space.fillinSpace(hand, walker);<NEW_LINE>hand.size = (int) size.fix(walker);<NEW_LINE>ptroffset.fillinOffset(hand, walker);<NEW_LINE>} else {<NEW_LINE>hand.space = space.fixSpace(walker);<NEW_LINE>hand.size = (int) size.fix(walker);<NEW_LINE>hand.offset_offset = ptroffset.fix(walker);<NEW_LINE>hand.offset_space = ptrspace.fixSpace(walker);<NEW_LINE>if (hand.offset_space.getType() == AddressSpace.TYPE_CONSTANT) {<NEW_LINE>// Could have been, but wasn't<NEW_LINE>hand.offset_space = null;<NEW_LINE>hand.offset_offset *= hand.space.getAddressableUnitSize();<NEW_LINE>hand.offset_offset = hand.space.truncateOffset(hand.offset_offset);<NEW_LINE>} else {<NEW_LINE>hand.offset_size = (int) ptrsize.fix(walker);<NEW_LINE>hand.temp_space = temp_space.fixSpace(walker);<NEW_LINE>hand.<MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
temp_offset = temp_offset.fix(walker);
206,255
public AdditionalServletWithClassLoader load(AdditionalServletMetadata metadata, String narExtractionDirectory) throws IOException {<NEW_LINE>final File narFile = metadata.getArchivePath().toAbsolutePath().toFile();<NEW_LINE>NarClassLoader ncl = NarClassLoaderBuilder.builder().narFile(narFile).parentClassLoader(AdditionalServlet.class.getClassLoader()).extractionDirectory(narExtractionDirectory).build();<NEW_LINE>AdditionalServletDefinition def = getAdditionalServletDefinition(ncl);<NEW_LINE>if (StringUtils.isBlank(def.getAdditionalServletClass())) {<NEW_LINE>throw new IOException("Additional servlets `" + def.getName() + "` does NOT provide an " + "additional servlets implementation");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>Class additionalServletClass = ncl.<MASK><NEW_LINE>Object additionalServlet = additionalServletClass.getDeclaredConstructor().newInstance();<NEW_LINE>if (!(additionalServlet instanceof AdditionalServlet)) {<NEW_LINE>throw new IOException("Class " + def.getAdditionalServletClass() + " does not implement additional servlet interface");<NEW_LINE>}<NEW_LINE>AdditionalServlet servlet = (AdditionalServlet) additionalServlet;<NEW_LINE>return new AdditionalServletWithClassLoader(servlet, ncl);<NEW_LINE>} catch (Throwable t) {<NEW_LINE>rethrowIOException(t);<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>}
loadClass(def.getAdditionalServletClass());
598,233
final UntagResourceResult executeUntagResource(UntagResourceRequest untagResourceRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(untagResourceRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<UntagResourceRequest> request = null;<NEW_LINE>Response<UntagResourceResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new UntagResourceRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(untagResourceRequest));<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, "ApiGatewayV2");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "UntagResource");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<UntagResourceResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new UntagResourceResultJsonUnmarshaller());<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());
64,235
public void generateMoves(BankOrder bankOrder) throws AxelorException {<NEW_LINE>if (bankOrder.getBankOrderLineList() == null || bankOrder.getBankOrderLineList().isEmpty()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>paymentMode = bankOrder.getPaymentMode();<NEW_LINE>if (paymentMode == null || !paymentMode.getGenerateMoveAutoFromBankOrder()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>orderTypeSelect = bankOrder.getOrderTypeSelect();<NEW_LINE>senderCompany = bankOrder.getSenderCompany();<NEW_LINE>senderBankDetails = bankOrder.getSenderBankDetails();<NEW_LINE>partnerTypeSelect = bankOrder.getPartnerTypeSelect();<NEW_LINE>journal = paymentModeService.getPaymentModeJournal(paymentMode, senderCompany, senderBankDetails);<NEW_LINE>senderBankAccount = paymentModeService.<MASK><NEW_LINE>isMultiDate = bankOrder.getIsMultiDate();<NEW_LINE>isMultiCurrency = bankOrder.getIsMultiCurrency();<NEW_LINE>if (orderTypeSelect == BankOrderRepository.ORDER_TYPE_INTERNATIONAL_CREDIT_TRANSFER || orderTypeSelect == BankOrderRepository.ORDER_TYPE_SEPA_CREDIT_TRANSFER) {<NEW_LINE>isDebit = true;<NEW_LINE>} else {<NEW_LINE>isDebit = false;<NEW_LINE>}<NEW_LINE>for (BankOrderLine bankOrderLine : bankOrder.getBankOrderLineList()) {<NEW_LINE>if (ObjectUtils.isEmpty(bankOrderLine.getBankOrderLineOriginList())) {<NEW_LINE>generateMoves(bankOrderLine);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
getPaymentModeAccount(paymentMode, senderCompany, senderBankDetails);
1,236,317
public void registerReceiver(BroadcastReceiver receiver, IntentFilter filter) {<NEW_LINE>if (RePluginFramework.mHostInitialized) {<NEW_LINE>try {<NEW_LINE>ProxyLocalBroadcastManagerVar.registerReceiver.call(sOrigInstance, receiver, filter);<NEW_LINE>} catch (Exception e) {<NEW_LINE>e.printStackTrace();<NEW_LINE>}<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>synchronized (mReceivers) {<NEW_LINE>ReceiverRecord entry = new ReceiverRecord(filter, receiver);<NEW_LINE>ArrayList<IntentFilter> filters = mReceivers.get(receiver);<NEW_LINE>if (filters == null) {<NEW_LINE>filters = new ArrayList<IntentFilter>(1);<NEW_LINE>mReceivers.put(receiver, filters);<NEW_LINE>}<NEW_LINE>filters.add(filter);<NEW_LINE>for (int i = 0; i < filter.countActions(); i++) {<NEW_LINE>String action = filter.getAction(i);<NEW_LINE>ArrayList<ReceiverRecord> entries = mActions.get(action);<NEW_LINE>if (entries == null) {<NEW_LINE>entries = new ArrayList<ReceiverRecord>(1);<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>entries.add(entry);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
mActions.put(action, entries);
834,344
private boolean doReleaseLock(String xid, Long branchId) {<NEW_LINE>try (Jedis jedis = JedisPooledFactory.getJedisInstance()) {<NEW_LINE>String xidLockKey = buildXidLockKey(xid);<NEW_LINE>final List<String> rowKeys = new ArrayList<>();<NEW_LINE>if (null == branchId) {<NEW_LINE>Map<String, String> rowKeyMap = jedis.hgetAll(xidLockKey);<NEW_LINE>rowKeyMap.forEach((branch, rowKey) -> rowKeys.add(rowKey));<NEW_LINE>} else {<NEW_LINE>rowKeys.addAll(jedis.hmget(xidLockKey<MASK><NEW_LINE>}<NEW_LINE>if (CollectionUtils.isNotEmpty(rowKeys)) {<NEW_LINE>Pipeline pipelined = jedis.pipelined();<NEW_LINE>if (null == branchId) {<NEW_LINE>pipelined.del(xidLockKey);<NEW_LINE>} else {<NEW_LINE>pipelined.hdel(xidLockKey, branchId.toString());<NEW_LINE>}<NEW_LINE>rowKeys.forEach(rowKeyStr -> {<NEW_LINE>if (StringUtils.isNotEmpty(rowKeyStr)) {<NEW_LINE>if (rowKeyStr.contains(ROW_LOCK_KEY_SPLIT_CHAR)) {<NEW_LINE>String[] keys = rowKeyStr.split(ROW_LOCK_KEY_SPLIT_CHAR);<NEW_LINE>pipelined.del(keys);<NEW_LINE>} else {<NEW_LINE>pipelined.del(rowKeyStr);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>});<NEW_LINE>pipelined.sync();<NEW_LINE>}<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>}
, branchId.toString()));
1,412,256
public AutoScalingData provision() {<NEW_LINE>final String project = envConfig.getProjectId();<NEW_LINE>final <MASK><NEW_LINE>final int numInstances = envConfig.getNumInstances();<NEW_LINE>final String managedInstanceGroupName = envConfig.getManagedInstanceGroupName();<NEW_LINE>try {<NEW_LINE>List<String> before = getRunningInstances();<NEW_LINE>log.debug("Existing instances [%s]", String.join(",", before));<NEW_LINE>int toSize = Math.min(before.size() + numInstances, getMaxNumWorkers());<NEW_LINE>if (before.size() >= toSize) {<NEW_LINE>// nothing to scale<NEW_LINE>return new AutoScalingData(new ArrayList<>());<NEW_LINE>}<NEW_LINE>log.info("Asked to provision instances, will resize to %d", toSize);<NEW_LINE>Compute computeService = createComputeService();<NEW_LINE>Compute.InstanceGroupManagers.Resize request = computeService.instanceGroupManagers().resize(project, zone, managedInstanceGroupName, toSize);<NEW_LINE>Operation response = request.execute();<NEW_LINE>Operation.Error err = waitForOperationEnd(computeService, response);<NEW_LINE>if (err == null || err.isEmpty()) {<NEW_LINE>List<String> after = null;<NEW_LINE>// as the waitForOperationEnd only waits for the operation to be scheduled<NEW_LINE>// this loop waits until the requested machines actually go up (or up to a<NEW_LINE>// certain amount of retries in checking)<NEW_LINE>for (int i = 0; i < RUNNING_INSTANCES_MAX_RETRIES; i++) {<NEW_LINE>after = getRunningInstances();<NEW_LINE>if (after.size() == toSize) {<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>log.info("Machines not up yet, waiting");<NEW_LINE>Thread.sleep(POLL_INTERVAL_MS);<NEW_LINE>}<NEW_LINE>// these should be the new ones<NEW_LINE>after.removeAll(before);<NEW_LINE>log.info("Added instances [%s]", String.join(",", after));<NEW_LINE>return new AutoScalingData(after);<NEW_LINE>} else {<NEW_LINE>log.error("Unable to provision instances: %s", err.toPrettyString());<NEW_LINE>}<NEW_LINE>} catch (Exception e) {<NEW_LINE>log.error(e, "Unable to provision any gce instances.");<NEW_LINE>}<NEW_LINE>return new AutoScalingData(new ArrayList<>());<NEW_LINE>}
String zone = envConfig.getZoneName();
587,415
private <T> void submitOperation(CheckedSupplier<T, Exception> operation, BiConsumer<T, Exception> handler) {<NEW_LINE>autodetectWorkerExecutor.execute(new AbstractRunnable() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void onFailure(Exception e) {<NEW_LINE>if (processKilled) {<NEW_LINE>handler.accept(null, ExceptionsHelper.conflictStatusException("[{}] Could not submit operation to process as it has been killed", job.getId()));<NEW_LINE>} else {<NEW_LINE>logger.error(new ParameterizedMessage("[{}] Unexpected exception writing to process", job.getId()), e);<NEW_LINE>handler.accept(null, e);<NEW_LINE>}<NEW_LINE>}<NEW_LINE><NEW_LINE>@Override<NEW_LINE>protected void doRun() throws Exception {<NEW_LINE>if (processKilled) {<NEW_LINE>handler.accept(null, ExceptionsHelper.conflictStatusException("[{}] Could not submit operation to process as it has been killed"<MASK><NEW_LINE>} else {<NEW_LINE>checkProcessIsAlive();<NEW_LINE>handler.accept(operation.get(), null);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>});<NEW_LINE>}
, job.getId()));
1,267,183
public static Vector combineServerRowSplits(List<ServerRow> rowSplits, int matrixId, int rowIndex) {<NEW_LINE>MatrixMeta matrixMeta = PSAgentContext.get().getMatrixMetaManager().getMatrixMeta(matrixId);<NEW_LINE>RowType rowType = matrixMeta.getRowType();<NEW_LINE>switch(rowType) {<NEW_LINE>case T_DOUBLE_DENSE:<NEW_LINE>case T_DOUBLE_SPARSE:<NEW_LINE>return combineServerIntDoubleRowSplits(rowSplits, matrixMeta, rowIndex);<NEW_LINE>case T_FLOAT_DENSE:<NEW_LINE>case T_FLOAT_SPARSE:<NEW_LINE>return combineServerIntFloatRowSplits(rowSplits, matrixMeta, rowIndex);<NEW_LINE>case T_INT_DENSE:<NEW_LINE>case T_INT_SPARSE:<NEW_LINE>return combineServerIntIntRowSplits(rowSplits, matrixMeta, rowIndex);<NEW_LINE>case T_LONG_DENSE:<NEW_LINE>case T_LONG_SPARSE:<NEW_LINE>return <MASK><NEW_LINE>case T_DOUBLE_SPARSE_LONGKEY:<NEW_LINE>return combineServerLongDoubleRowSplits(rowSplits, matrixMeta, rowIndex);<NEW_LINE>case T_FLOAT_SPARSE_LONGKEY:<NEW_LINE>return combineServerLongFloatRowSplits(rowSplits, matrixMeta, rowIndex);<NEW_LINE>case T_INT_SPARSE_LONGKEY:<NEW_LINE>return combineServerLongIntRowSplits(rowSplits, matrixMeta, rowIndex);<NEW_LINE>case T_LONG_SPARSE_LONGKEY:<NEW_LINE>return combineServerLongLongRowSplits(rowSplits, matrixMeta, rowIndex);<NEW_LINE>default:<NEW_LINE>throw new UnsupportedOperationException("Unsupport operation: merge " + rowType + " vector splits");<NEW_LINE>}<NEW_LINE>}
combineServerIntLongRowSplits(rowSplits, matrixMeta, rowIndex);
1,189,274
protected DescriptiveUrl toUrl(final Path file, final Scheme scheme, final int port) {<NEW_LINE>final StringBuilder url = new StringBuilder(scheme.name());<NEW_LINE>url.append("://");<NEW_LINE>if (file.isRoot()) {<NEW_LINE>url.append(session.<MASK><NEW_LINE>if (port != scheme.getPort()) {<NEW_LINE>url.append(":").append(port);<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>final String hostname = this.getHostnameForContainer(containerService.getContainer(file));<NEW_LINE>if (hostname.startsWith(containerService.getContainer(file).getName())) {<NEW_LINE>url.append(hostname);<NEW_LINE>if (port != scheme.getPort()) {<NEW_LINE>url.append(":").append(port);<NEW_LINE>}<NEW_LINE>if (!containerService.isContainer(file)) {<NEW_LINE>url.append(Path.DELIMITER);<NEW_LINE>url.append(URIEncoder.encode(containerService.getKey(file)));<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>url.append(session.getHost().getHostname());<NEW_LINE>if (port != scheme.getPort()) {<NEW_LINE>url.append(":").append(port);<NEW_LINE>}<NEW_LINE>url.append(URIEncoder.encode(file.getAbsolute()));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return new DescriptiveUrl(URI.create(url.toString()), DescriptiveUrl.Type.http, MessageFormat.format(LocaleFactory.localizedString("{0} URL"), scheme.name().toUpperCase(Locale.ROOT)));<NEW_LINE>}
getHost().getHostname());
706,573
private VpnProfile VpnProfileFromCursor(Cursor cursor) {<NEW_LINE>VpnProfile profile = new VpnProfile();<NEW_LINE>profile.setId(cursor.getLong(cursor.getColumnIndex(KEY_ID)));<NEW_LINE>profile.setUUID(UUID.fromString(cursor.getString(cursor.getColumnIndex(KEY_UUID))));<NEW_LINE>profile.setName(cursor.getString(cursor.getColumnIndex(KEY_NAME)));<NEW_LINE>profile.setGateway(cursor.getString(cursor.getColumnIndex(KEY_GATEWAY)));<NEW_LINE>profile.setVpnType(VpnType.fromIdentifier(cursor.getString(cursor.getColumnIndex(KEY_VPN_TYPE))));<NEW_LINE>profile.setUsername(cursor.getString(<MASK><NEW_LINE>profile.setPassword(cursor.getString(cursor.getColumnIndex(KEY_PASSWORD)));<NEW_LINE>profile.setCertificateAlias(cursor.getString(cursor.getColumnIndex(KEY_CERTIFICATE)));<NEW_LINE>profile.setUserCertificateAlias(cursor.getString(cursor.getColumnIndex(KEY_USER_CERTIFICATE)));<NEW_LINE>profile.setMTU(getInt(cursor, cursor.getColumnIndex(KEY_MTU)));<NEW_LINE>profile.setPort(getInt(cursor, cursor.getColumnIndex(KEY_PORT)));<NEW_LINE>profile.setSplitTunneling(getInt(cursor, cursor.getColumnIndex(KEY_SPLIT_TUNNELING)));<NEW_LINE>profile.setLocalId(cursor.getString(cursor.getColumnIndex(KEY_LOCAL_ID)));<NEW_LINE>profile.setRemoteId(cursor.getString(cursor.getColumnIndex(KEY_REMOTE_ID)));<NEW_LINE>profile.setExcludedSubnets(cursor.getString(cursor.getColumnIndex(KEY_EXCLUDED_SUBNETS)));<NEW_LINE>profile.setIncludedSubnets(cursor.getString(cursor.getColumnIndex(KEY_INCLUDED_SUBNETS)));<NEW_LINE>profile.setSelectedAppsHandling(getInt(cursor, cursor.getColumnIndex(KEY_SELECTED_APPS)));<NEW_LINE>profile.setSelectedApps(cursor.getString(cursor.getColumnIndex(KEY_SELECTED_APPS_LIST)));<NEW_LINE>profile.setNATKeepAlive(getInt(cursor, cursor.getColumnIndex(KEY_NAT_KEEPALIVE)));<NEW_LINE>profile.setFlags(getInt(cursor, cursor.getColumnIndex(KEY_FLAGS)));<NEW_LINE>profile.setIkeProposal(cursor.getString(cursor.getColumnIndex(KEY_IKE_PROPOSAL)));<NEW_LINE>profile.setEspProposal(cursor.getString(cursor.getColumnIndex(KEY_ESP_PROPOSAL)));<NEW_LINE>profile.setDnsServers(cursor.getString(cursor.getColumnIndex(KEY_DNS_SERVERS)));<NEW_LINE>return profile;<NEW_LINE>}
cursor.getColumnIndex(KEY_USERNAME)));
1,154,121
private void createTables(Connection conn, int id) throws ServletException {<NEW_LINE>System.out.println("Executing createTables id = " + id);<NEW_LINE>PreparedStatement ps = null;<NEW_LINE>try {<NEW_LINE>String sql = "CREATE TABLE DEFDSENTITY (ID INTEGER NOT NULL, STRDATA VARCHAR(255), PRIMARY KEY (ID))";<NEW_LINE>System.out.println("Executing SQL: " + sql);<NEW_LINE>ps = conn.prepareStatement(sql);<NEW_LINE>boolean result1 = ps.execute();<NEW_LINE>if (!result1) {<NEW_LINE>int updateCount = ps.getUpdateCount();<NEW_LINE>if (updateCount != 0) {<NEW_LINE>throw new RuntimeException("Failed to create new table: " + updateCount);<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>throw new RuntimeException("A problem occurred creating table.");<NEW_LINE>}<NEW_LINE>ps.close();<NEW_LINE>String sql2 = "INSERT INTO DEFDSENTITY (ID, STRDATA) VALUES (?, ?)";<NEW_LINE>System.out.println("Executing SQL: " + sql2);<NEW_LINE>ps = conn.prepareStatement(sql2);<NEW_LINE>ps.setInt(1, id);<NEW_LINE>ps.setString(2, Integer.toString(id));<NEW_LINE>boolean result2 = ps.execute();<NEW_LINE>if (!result2) {<NEW_LINE><MASK><NEW_LINE>if (updateCount != 1) {<NEW_LINE>throw new RuntimeException("Failed to insert into table: " + updateCount);<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>throw new RuntimeException("A problem occurred inserting a row into the table.");<NEW_LINE>}<NEW_LINE>ps.close();<NEW_LINE>if (!conn.getAutoCommit())<NEW_LINE>conn.commit();<NEW_LINE>} catch (SQLException e) {<NEW_LINE>throw new ServletException(e);<NEW_LINE>} finally {<NEW_LINE>if (ps != null) {<NEW_LINE>try {<NEW_LINE>ps.close();<NEW_LINE>} catch (Throwable t) {<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
int updateCount = ps.getUpdateCount();
204,707
private static Sld extractFromLayout(SldLayout sldLayout) {<NEW_LINE>Sld sld = Context.getpmlObjectFactory().createSld();<NEW_LINE>// Clone first<NEW_LINE>sld.setCSld(XmlUtils.deepCopy(sldLayout.getCSld<MASK><NEW_LINE>sld.setClrMapOvr(XmlUtils.deepCopy(sldLayout.getClrMapOvr(), Context.jcPML));<NEW_LINE>// Then delete stuff<NEW_LINE>sld.getCSld().setName(null);<NEW_LINE>// Remove p:sp, if cNvPr name contains "Date Placeholder", "Footer Placeholder", "Slide Number Placeholder"<NEW_LINE>// (and these are on the master?)<NEW_LINE>List<Shape> deletions = new ArrayList<Shape>();<NEW_LINE>for (Object o : sld.getCSld().getSpTree().getSpOrGrpSpOrGraphicFrame()) {<NEW_LINE>// System.out.println(o.getClass().getName());<NEW_LINE>if (o instanceof org.pptx4j.pml.Shape) {<NEW_LINE>Shape shape = (Shape) o;<NEW_LINE>if (shape.getNvSpPr() != null && shape.getNvSpPr().getCNvPr() != null && shape.getNvSpPr().getCNvPr().getName() != null) {<NEW_LINE>String name = shape.getNvSpPr().getCNvPr().getName();<NEW_LINE>if (name.startsWith("Date Placeholder") || name.startsWith("Footer Placeholder") || name.startsWith("Slide Number Placeholder")) {<NEW_LINE>deletions.add(shape);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>sld.getCSld().getSpTree().getSpOrGrpSpOrGraphicFrame().removeAll(deletions);<NEW_LINE>// From remaining shapes ..<NEW_LINE>for (Object o : sld.getCSld().getSpTree().getSpOrGrpSpOrGraphicFrame()) {<NEW_LINE>if (o instanceof org.pptx4j.pml.Shape) {<NEW_LINE>Shape shape = (Shape) o;<NEW_LINE>shape.setSpPr(new CTShapeProperties());<NEW_LINE>if (shape.getTxBody() != null) {<NEW_LINE>shape.getTxBody().setLstStyle(null);<NEW_LINE>for (CTTextParagraph p : shape.getTxBody().getP()) {<NEW_LINE>p.getEGTextRun().clear();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return sld;<NEW_LINE>}
(), Context.jcPML));
945,802
public PerServerContainer executeQuery(SQLDB db) {<NEW_LINE>PerServerContainer perServerContainer = new PerServerContainer();<NEW_LINE>userInformation(db, perServerContainer);<NEW_LINE>lastSeen(db, perServerContainer);<NEW_LINE>playerKillCount(db, perServerContainer);<NEW_LINE>mobKillCount(db, perServerContainer);<NEW_LINE>totalDeathCount(db, perServerContainer);<NEW_LINE>worldTimes(db, perServerContainer);<NEW_LINE>Map<ServerUUID, List<FinishedSession>> sessions = db.query(SessionQueries.fetchSessionsOfPlayer(playerUUID));<NEW_LINE>for (Map.Entry<ServerUUID, List<FinishedSession>> entry : sessions.entrySet()) {<NEW_LINE>ServerUUID serverUUID = entry.getKey();<NEW_LINE>List<FinishedSession> serverSessions = entry.getValue();<NEW_LINE>DataContainer serverContainer = perServerContainer.getOrDefault(serverUUID, new SupplierDataContainer());<NEW_LINE>serverContainer.<MASK><NEW_LINE>perServerContainer.put(serverUUID, serverContainer);<NEW_LINE>}<NEW_LINE>return perServerContainer;<NEW_LINE>}
putRawData(PerServerKeys.SESSIONS, serverSessions);
1,723,440
public void printArgs() {<NEW_LINE>if (Debug.getDebugLevel() < lvl) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>String[] xargs = getSikuliArgs();<NEW_LINE>if (xargs.length > 0) {<NEW_LINE>Debug.log(lvl, "--- Sikuli parameters ---");<NEW_LINE>for (int i = 0; i < xargs.length; i++) {<NEW_LINE>Debug.log(lvl, "%d: %s", i <MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE>xargs = getArgs();<NEW_LINE>if (xargs.length > 0) {<NEW_LINE>Debug.log(lvl, "--- User parameters ---");<NEW_LINE>for (int i = 0; i < xargs.length; i++) {<NEW_LINE>Debug.log(lvl, "%d: %s", i + 1, xargs[i]);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
+ 1, xargs[i]);
373,956
private void convert(OutputStream outputStream, File docs, EPackage ePackage) throws IOException {<NEW_LINE>IfcDoc ifcDoc = null;<NEW_LINE>if (docs != null) {<NEW_LINE>ifcDoc = new IfcDoc(docs);<NEW_LINE>}<NEW_LINE>ObjectMapper objectMapper = new ObjectMapper();<NEW_LINE>ObjectNode root = objectMapper.createObjectNode();<NEW_LINE>ObjectNode classes = objectMapper.createObjectNode();<NEW_LINE>root.set("classes", classes);<NEW_LINE>for (EClassifier eClassifier : ePackage.getEClassifiers()) {<NEW_LINE>ObjectNode classifierNode = objectMapper.createObjectNode();<NEW_LINE>classes.set(eClassifier.getName(), classifierNode);<NEW_LINE>if (eClassifier instanceof EEnum) {<NEW_LINE>} else if (eClassifier instanceof EClass) {<NEW_LINE>EClass eClass = (EClass) eClassifier;<NEW_LINE>String domain = "geometry";<NEW_LINE>if (ifcDoc != null) {<NEW_LINE>domain = ifcDoc.getDomain(eClass.getName());<NEW_LINE>}<NEW_LINE><MASK><NEW_LINE>ArrayNode superClassesNode = objectMapper.createArrayNode();<NEW_LINE>classifierNode.set("superclasses", superClassesNode);<NEW_LINE>for (EClass superClass : eClass.getESuperTypes()) {<NEW_LINE>superClassesNode.add(superClass.getName());<NEW_LINE>}<NEW_LINE>ObjectNode fieldsNode = objectMapper.createObjectNode();<NEW_LINE>classifierNode.set("fields", fieldsNode);<NEW_LINE>for (EStructuralFeature eStructuralFeature : eClass.getEStructuralFeatures()) {<NEW_LINE>ObjectNode fieldNode = objectMapper.createObjectNode();<NEW_LINE>fieldsNode.set(eStructuralFeature.getName(), fieldNode);<NEW_LINE>fieldNode.put("type", convertType(eStructuralFeature.getEType()));<NEW_LINE>fieldNode.put("reference", eStructuralFeature instanceof EReference);<NEW_LINE>fieldNode.put("many", eStructuralFeature.isMany());<NEW_LINE>fieldNode.put("inverse", eStructuralFeature.getEAnnotation("inverse") != null);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>objectMapper.writerWithDefaultPrettyPrinter().writeValue(outputStream, root);<NEW_LINE>}
classifierNode.put("domain", domain);
1,797,182
public final void init(StreamDefinition streamDefinition, String mapType, OptionHolder mapOptionHolder, List<AttributeMapping> attributeMappings, String sourceType, SourceSyncCallback sourceSyncCallback, List<AttributeMapping> transportMappings, SourceHandler sourceHandler, OptionHolder sourceOptionHolder, ConfigReader configReader, SiddhiAppContext siddhiAppContext) {<NEW_LINE>this.streamDefinition = streamDefinition;<NEW_LINE>this.mapType = mapType;<NEW_LINE>this.sourceType = sourceType;<NEW_LINE>this.transportMappings = transportMappings;<NEW_LINE>this.sourceOptionHolder = sourceOptionHolder;<NEW_LINE>if (sourceHandler != null) {<NEW_LINE>sourceHandler.initSourceHandler(siddhiAppContext.getName(<MASK><NEW_LINE>}<NEW_LINE>this.sourceHandler = sourceHandler;<NEW_LINE>this.siddhiAppContext = siddhiAppContext;<NEW_LINE>if (siddhiAppContext.getStatisticsManager() != null) {<NEW_LINE>this.throughputTracker = QueryParserHelper.createThroughputTracker(siddhiAppContext, streamDefinition.getId(), SiddhiConstants.METRIC_INFIX_SOURCES, sourceType);<NEW_LINE>this.mapperLatencyTracker = QueryParserHelper.createLatencyTracker(siddhiAppContext, streamDefinition.getId(), SiddhiConstants.METRIC_INFIX_SOURCE_MAPPERS, sourceType + SiddhiConstants.METRIC_DELIMITER + mapType);<NEW_LINE>}<NEW_LINE>if (configReader != null && configReader.getAllConfigs().size() != 0) {<NEW_LINE>if (configReader.getAllConfigs().containsKey(ENABLE_EVENT_COUNT_LOGGER) && configReader.getAllConfigs().get(ENABLE_EVENT_COUNT_LOGGER).toLowerCase().equals(TRUE)) {<NEW_LINE>logEventCount = true;<NEW_LINE>this.receivedEventCounter = new ReceivedEventCounter();<NEW_LINE>if (configReader.getAllConfigs().containsKey(LOGGING_DURATION)) {<NEW_LINE>loggingDuration = Integer.parseInt(configReader.getAllConfigs().get(LOGGING_DURATION));<NEW_LINE>}<NEW_LINE>receivedEventCounter.init(siddhiAppContext, streamDefinition, loggingDuration);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>init(streamDefinition, mapOptionHolder, attributeMappings, configReader, siddhiAppContext);<NEW_LINE>}
), sourceSyncCallback, streamDefinition, siddhiAppContext);
742,393
final ListPermissionsResult executeListPermissions(ListPermissionsRequest listPermissionsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listPermissionsRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<ListPermissionsRequest> request = null;<NEW_LINE>Response<ListPermissionsResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new ListPermissionsRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listPermissionsRequest));<NEW_LINE>// Binds the request metrics to the current request.<NEW_LINE>request.setAWSRequestMetrics(awsRequestMetrics);<NEW_LINE>request.<MASK><NEW_LINE>request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SERVICE_ID, "grafana");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListPermissions");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<ListPermissionsResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListPermissionsResultJsonUnmarshaller());<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.CLIENT_ENDPOINT, endpoint);
1,091,279
final ListAcceptedPortfolioSharesResult executeListAcceptedPortfolioShares(ListAcceptedPortfolioSharesRequest listAcceptedPortfolioSharesRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listAcceptedPortfolioSharesRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<ListAcceptedPortfolioSharesRequest> request = null;<NEW_LINE>Response<ListAcceptedPortfolioSharesResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new ListAcceptedPortfolioSharesRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listAcceptedPortfolioSharesRequest));<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, "Service Catalog");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListAcceptedPortfolioShares");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<ListAcceptedPortfolioSharesResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListAcceptedPortfolioSharesResultJsonUnmarshaller());<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,723,544
private Fact foldComparisonToFalsey(ParseTreeNode n) {<NEW_LINE>if (!(n instanceof Operation)) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>Operation op = (Operation) n;<NEW_LINE>Operator o = op.getOperator();<NEW_LINE>boolean eq;<NEW_LINE>boolean strict;<NEW_LINE>switch(o) {<NEW_LINE>case EQUAL:<NEW_LINE>case STRICTLY_EQUAL:<NEW_LINE>eq = true;<NEW_LINE>break;<NEW_LINE>case NOT_EQUAL:<NEW_LINE>case STRICTLY_NOT_EQUAL:<NEW_LINE>eq = false;<NEW_LINE>break;<NEW_LINE>default:<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>strict = o == Operator.STRICTLY_EQUAL || o == Operator.STRICTLY_NOT_EQUAL;<NEW_LINE>List<? extends Expression> operands = op.children();<NEW_LINE>Expression a = operands.get(0);<NEW_LINE>Expression b = operands.get(1);<NEW_LINE>if (strict ? isUndefOrLiteral(a) : isNullOrUndef(a)) {<NEW_LINE>// continue to check<NEW_LINE>} else if (strict ? isUndefOrLiteral(b) : isNullOrUndef(b)) {<NEW_LINE>Expression t = a;<NEW_LINE>a = b;<NEW_LINE>b = t;<NEW_LINE>} else {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>Pair<Expression, Fact> fe = facts.get(this.optNodeDigest(b));<NEW_LINE>if (fe == null) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>Boolean bool = a.conditionResult();<NEW_LINE>if (bool == null || bool.booleanValue() == fe.b.isTruthy()) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>return eq <MASK><NEW_LINE>}
? Fact.FALSE : Fact.TRUE;
355,662
protected AttributedString systemHighlight(LineReader reader, String buffer) {<NEW_LINE>AttributedString out;<NEW_LINE>Parser parser = reader.getParser();<NEW_LINE>ParsedLine pl = parser.parse(buffer, 0, Parser.ParseContext.SPLIT_LINE);<NEW_LINE>String command = pl.words().size() > 0 ? parser.getCommand(pl.words().get(0)) : "";<NEW_LINE>command = command.startsWith("!") ? "!" : command;<NEW_LINE>commandIndex = buffer.indexOf(command) + command.length();<NEW_LINE>if (buffer.trim().isEmpty()) {<NEW_LINE>out = new AttributedStringBuilder().append(buffer).toAttributedString();<NEW_LINE>} else if (specificHighlighter.containsKey(command)) {<NEW_LINE>AttributedStringBuilder asb = new AttributedStringBuilder();<NEW_LINE>if (commandHighlighter == null) {<NEW_LINE>asb.append(specificHighlighter.get(command).reset().highlight(buffer));<NEW_LINE>} else {<NEW_LINE>highlightCommand(buffer.substring(0, commandIndex), asb);<NEW_LINE>asb.append(specificHighlighter.get(command).reset().highlight(buffer.substring(commandIndex)));<NEW_LINE>}<NEW_LINE>out = asb.toAttributedString();<NEW_LINE>} else if (fileHighlight.containsKey(command)) {<NEW_LINE>FileHighlightCommand fhc = fileHighlight.get(command);<NEW_LINE>if (!fhc.hasFileOptions()) {<NEW_LINE>out = doFileArgsHighlight(reader, buffer, pl.words(), fhc);<NEW_LINE>} else {<NEW_LINE>out = doFileOptsHighlight(reader, buffer, pl.words(), fhc);<NEW_LINE>}<NEW_LINE>} else if (systemRegistry.isCommandOrScript(command) || systemRegistry.isCommandAlias(command) || command.isEmpty() || buffer.matches(REGEX_COMMENT_LINE)) {<NEW_LINE>out = doCommandHighlight(buffer);<NEW_LINE>} else if (langHighlighter != null) {<NEW_LINE>out = langHighlighter.<MASK><NEW_LINE>} else {<NEW_LINE>out = new AttributedStringBuilder().append(buffer).toAttributedString();<NEW_LINE>}<NEW_LINE>return out;<NEW_LINE>}
reset().highlight(buffer);
1,491,182
private void registerTextSynchronizationForCustomUriSchemes() {<NEW_LINE>LanguageClient client = <MASK><NEW_LINE>LSClientCapabilities clientCapabilities = serverContext.get(LSClientCapabilities.class);<NEW_LINE>DocumentFilter balaFilter = new DocumentFilter();<NEW_LINE>balaFilter.setScheme(CommonUtil.URI_SCHEME_BALA);<NEW_LINE>DocumentFilter exprFilter = new DocumentFilter();<NEW_LINE>exprFilter.setScheme(CommonUtil.URI_SCHEME_EXPR);<NEW_LINE>// Register text synchronization for bala and expr schemes<NEW_LINE>if (LSClientUtil.isDynamicSynchronizationRegistrationSupported(clientCapabilities.getTextDocCapabilities())) {<NEW_LINE>TextDocumentRegistrationOptions openRegOptions = new TextDocumentRegistrationOptions();<NEW_LINE>openRegOptions.setDocumentSelector(List.of(balaFilter, exprFilter));<NEW_LINE>Registration didOpenRegistration = new Registration(UUID.randomUUID().toString(), "textDocument/didOpen", openRegOptions);<NEW_LINE>TextDocumentChangeRegistrationOptions changeRegOptions = new TextDocumentChangeRegistrationOptions();<NEW_LINE>changeRegOptions.setDocumentSelector(List.of(balaFilter, exprFilter));<NEW_LINE>changeRegOptions.setSyncKind(TextDocumentSyncKind.Full);<NEW_LINE>Registration changeRegistration = new Registration(UUID.randomUUID().toString(), "textDocument/didChange", changeRegOptions);<NEW_LINE>TextDocumentRegistrationOptions closeRegOptions = new TextDocumentRegistrationOptions();<NEW_LINE>closeRegOptions.setDocumentSelector(List.of(balaFilter, exprFilter));<NEW_LINE>Registration closeRegistration = new Registration(UUID.randomUUID().toString(), "textDocument/didClose", closeRegOptions);<NEW_LINE>client.registerCapability(new RegistrationParams(List.of(didOpenRegistration)));<NEW_LINE>client.registerCapability(new RegistrationParams(List.of(changeRegistration)));<NEW_LINE>client.registerCapability(new RegistrationParams(List.of(closeRegistration)));<NEW_LINE>}<NEW_LINE>// TODO Server capabilities in server context are out of sync now.<NEW_LINE>}
serverContext.get(ExtendedLanguageClient.class);
1,334,052
void performMigration0To1() {<NEW_LINE><MASK><NEW_LINE>String deviceID = storage.getDeviceID();<NEW_LINE>// update the device ID type<NEW_LINE>// noinspection StatementWithEmptyBody<NEW_LINE>if (deviceIDType.equals(DeviceIdType.OPEN_UDID.toString())) {<NEW_LINE>// current device ID is OPEN_UDID<NEW_LINE>// nothing should change<NEW_LINE>} else if (deviceIDType.equals(DeviceIdType.ADVERTISING_ID.toString())) {<NEW_LINE>// current device ID is ADVERTISING_ID<NEW_LINE>// it's type should be changed to OPEN_UDID.<NEW_LINE>storage.setDeviceIDType(DeviceIdType.OPEN_UDID.toString());<NEW_LINE>}<NEW_LINE>// generate a deviceID in case the current type is OPEN_UDID and there is no ID<NEW_LINE>if (storage.getDeviceIDType().equals(DeviceIdType.OPEN_UDID.toString())) {<NEW_LINE>if (deviceID == null || deviceID.isEmpty()) {<NEW_LINE>// in case there is no valid ID, generate it<NEW_LINE>storage.setDeviceID(UUID.randomUUID().toString());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
String deviceIDType = storage.getDeviceIDType();
899,071
public com.amazonaws.services.migrationhubconfig.model.ServiceUnavailableException unmarshallFromContext(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>com.amazonaws.services.migrationhubconfig.model.ServiceUnavailableException serviceUnavailableException = new com.amazonaws.services.<MASK><NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<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>} 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 serviceUnavailableException;<NEW_LINE>}
migrationhubconfig.model.ServiceUnavailableException(null);
1,662,076
public CreateAccessResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>CreateAccessResult createAccessResult = new CreateAccessResult();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<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 createAccessResult;<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("ServerId", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>createAccessResult.setServerId(context.getUnmarshaller(String.<MASK><NEW_LINE>}<NEW_LINE>if (context.testExpression("ExternalId", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>createAccessResult.setExternalId(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 createAccessResult;<NEW_LINE>}
class).unmarshall(context));
83,902
void deliverMessage(@Nonnull Message message) {<NEW_LINE>final Message messageOnLocalQueue = myPendingMessages.get().poll();<NEW_LINE>assert messageOnLocalQueue == message;<NEW_LINE>Topic<?> topic = message.getTopic();<NEW_LINE>Object handler = mySubscriptions.get(topic);<NEW_LINE>try {<NEW_LINE>if (handler == myDefaultHandler) {<NEW_LINE>myDefaultHandler.handle(message.getListenerMethod(), message.getArgs());<NEW_LINE>} else {<NEW_LINE>if (handler instanceof List<?>) {<NEW_LINE>for (Object o : (List<?>) handler) {<NEW_LINE>myBus.invokeListener(message, o);<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>myBus.invokeListener(message, handler);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} catch (AbstractMethodError e) {<NEW_LINE>// Do nothing. This listener just does not implement something newly added yet.<NEW_LINE>} catch (ProcessCanceledException e) {<NEW_LINE>throw e;<NEW_LINE>} catch (InvocationTargetException e) {<NEW_LINE>if (e.getCause() instanceof ProcessCanceledException) {<NEW_LINE>throw (ProcessCanceledException) e.getCause();<NEW_LINE>}<NEW_LINE>LOG.error(e.getCause() == null ? <MASK><NEW_LINE>} catch (Throwable e) {<NEW_LINE>LOG.error(e.getCause() == null ? e : e.getCause());<NEW_LINE>}<NEW_LINE>}
e : e.getCause());
1,438,282
public void start(Stage stage) {<NEW_LINE>Scene scene = new Scene(new Group(), 400.0f, 300.0f);<NEW_LINE>scene.setCamera(new PerspectiveCamera());<NEW_LINE>Group group = new Group();<NEW_LINE>Group group2 = new Group();<NEW_LINE>group2.setRotate(60.0F);<NEW_LINE>group2.setRotationAxis(Rotate.Y_AXIS);<NEW_LINE>Ellipse ellipse = new Ellipse(100.0F, 80.0F, 50.0F, 25.0F);<NEW_LINE>ellipse.setOpacity(0.5F);<NEW_LINE>ellipse.setFill(Color.ORANGE);<NEW_LINE>ellipse.setStroke(Color.BLUE);<NEW_LINE>ellipse.setStrokeWidth(5.0F);<NEW_LINE>ellipse.setOnMouseClicked(e -> System.out.println("Ellipse: Mouse Clicked:" + e));<NEW_LINE>Arc arc = new Arc(250.0F, 80.0F, <MASK><NEW_LINE>arc.setOpacity(0.5F);<NEW_LINE>arc.setType(ArcType.ROUND);<NEW_LINE>arc.setFill(lg);<NEW_LINE>arc.setStroke(Color.BLUE);<NEW_LINE>arc.setStrokeWidth(5.0F);<NEW_LINE>arc.setOnMouseClicked(e -> System.out.println("Arc: Mouse Clicked:" + e));<NEW_LINE>Rectangle rectangle = new Rectangle(50.0F, 150.0F, 100.0F, 75.0F);<NEW_LINE>rectangle.setOpacity(0.5F);<NEW_LINE>rectangle.setArcHeight(20.0F);<NEW_LINE>rectangle.setArcWidth(20.0F);<NEW_LINE>rectangle.setFill(Color.GREEN);<NEW_LINE>rectangle.setStroke(Color.BLUE);<NEW_LINE>rectangle.setStrokeWidth(5.0F);<NEW_LINE>rectangle.setOnMouseClicked(e -> System.out.println("Rectangle: Mouse Clicked:" + e));<NEW_LINE>ObservableList<Double> floats = javafx.collections.FXCollections.<Double>observableArrayList();<NEW_LINE>floats.addAll(200.0, 150.0, 250.0, 220.0, 300.0, 150.0);<NEW_LINE>Polygon polygon = new Polygon();<NEW_LINE>polygon.getPoints().addAll(floats);<NEW_LINE>polygon.setOpacity(0.5F);<NEW_LINE>polygon.setFill(Color.YELLOW);<NEW_LINE>polygon.setStroke(Color.BLUE);<NEW_LINE>polygon.setStrokeWidth(5.0F);<NEW_LINE>polygon.setOnMouseClicked(e -> System.out.println("Polygon: Mouse Clicked:" + e));<NEW_LINE>group2.getChildren().addAll(ellipse, arc, rectangle, polygon);<NEW_LINE>group.getChildren().addAll(group2);<NEW_LINE>((Group) scene.getRoot()).getChildren().addAll(group);<NEW_LINE>stage.setScene(scene);<NEW_LINE>stage.sizeToScene();<NEW_LINE>if (!Platform.isSupported(ConditionalFeature.SCENE3D)) {<NEW_LINE>System.out.println("*************************************************************");<NEW_LINE>System.out.println("* WARNING: common conditional SCENE3D isn\'t supported *");<NEW_LINE>System.out.println("*************************************************************");<NEW_LINE>}<NEW_LINE>stage.show();<NEW_LINE>}
50.0F, 25.0F, 45.0F, 270.0F);
1,267,807
private void createElementsActions() {<NEW_LINE>fAllElementActions = new ArrayList<IAction>();<NEW_LINE>// The "All" option<NEW_LINE>fNoneElementAction = createElementAction(null);<NEW_LINE>fAllElementActions.add(fNoneElementAction);<NEW_LINE>// Strategy<NEW_LINE>fStrategyElementActions = createElementActionsGroup(ArchimateModelUtils.getStrategyClasses());<NEW_LINE>// Business<NEW_LINE>fBusinessElementActions = createElementActionsGroup(ArchimateModelUtils.getBusinessClasses());<NEW_LINE>// Application<NEW_LINE>fApplicationElementActions = createElementActionsGroup(ArchimateModelUtils.getApplicationClasses());<NEW_LINE>// Technology<NEW_LINE>fTechnologyElementActions = <MASK><NEW_LINE>// Physical<NEW_LINE>fPhysicalElementActions = createElementActionsGroup(ArchimateModelUtils.getPhysicalClasses());<NEW_LINE>// Motivation<NEW_LINE>fMotivationElementActions = createElementActionsGroup(ArchimateModelUtils.getMotivationClasses());<NEW_LINE>// Implementation & Migration<NEW_LINE>fImplementationMigrationElementActions = createElementActionsGroup(ArchimateModelUtils.getImplementationMigrationClasses());<NEW_LINE>// Other<NEW_LINE>fOtherElementActions = createElementActionsGroup(ArchimateModelUtils.getOtherClasses());<NEW_LINE>// Get selected element from prefs<NEW_LINE>String elementsID = ArchiZestPlugin.INSTANCE.getPreferenceStore().getString(IPreferenceConstants.VISUALISER_ELEMENT);<NEW_LINE>EClass elementClass = (EClass) IArchimatePackage.eINSTANCE.getEClassifier(elementsID);<NEW_LINE>getContentProvider().setElementFilter(elementClass);<NEW_LINE>// Set Checked<NEW_LINE>if (elementClass == null) {<NEW_LINE>fNoneElementAction.setChecked(true);<NEW_LINE>} else {<NEW_LINE>for (IAction a : fAllElementActions) {<NEW_LINE>if (a.getId().equals(elementClass.getName())) {<NEW_LINE>a.setChecked(true);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
createElementActionsGroup(ArchimateModelUtils.getTechnologyClasses());
1,122,868
private List<Result> findStaticModels(SmallRyeOpenApiConfig openApiConfig, List<Pattern> ignorePatterns, Path target) {<NEW_LINE>List<Result> results = new ArrayList<>();<NEW_LINE>// First check for the file in both META-INF and WEB-INF/classes/META-INF<NEW_LINE>addStaticModelIfExist(results, ignorePatterns, Format.YAML, META_INF_OPENAPI_YAML);<NEW_LINE>addStaticModelIfExist(results, ignorePatterns, Format.YAML, WEB_INF_CLASSES_META_INF_OPENAPI_YAML);<NEW_LINE>addStaticModelIfExist(results, ignorePatterns, Format.YAML, META_INF_OPENAPI_YML);<NEW_LINE>addStaticModelIfExist(results, ignorePatterns, Format.YAML, WEB_INF_CLASSES_META_INF_OPENAPI_YML);<NEW_LINE>addStaticModelIfExist(results, <MASK><NEW_LINE>addStaticModelIfExist(results, ignorePatterns, Format.JSON, WEB_INF_CLASSES_META_INF_OPENAPI_JSON);<NEW_LINE>// Add any aditional directories if configured<NEW_LINE>if (openApiConfig.additionalDocsDirectory.isPresent()) {<NEW_LINE>List<Path> additionalStaticDocuments = openApiConfig.additionalDocsDirectory.get();<NEW_LINE>for (Path path : additionalStaticDocuments) {<NEW_LINE>// Scan all yaml and json files<NEW_LINE>try {<NEW_LINE>List<String> filesInDir = getResourceFiles(path, target);<NEW_LINE>for (String possibleModelFile : filesInDir) {<NEW_LINE>addStaticModelIfExist(results, ignorePatterns, possibleModelFile);<NEW_LINE>}<NEW_LINE>} catch (IOException ioe) {<NEW_LINE>ioe.printStackTrace();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return results;<NEW_LINE>}
ignorePatterns, Format.JSON, META_INF_OPENAPI_JSON);
1,708,587
protected Element writeItem(Element design, T item, DesignContext context) {<NEW_LINE>Element element = design.appendElement("option");<NEW_LINE>String caption = <MASK><NEW_LINE>if (caption != null) {<NEW_LINE>element.html(DesignFormatter.encodeForTextNode(caption));<NEW_LINE>} else {<NEW_LINE>element.html(DesignFormatter.encodeForTextNode(item.toString()));<NEW_LINE>}<NEW_LINE>element.attr("item", item.toString());<NEW_LINE>Resource icon = getItemIconGenerator().apply(item);<NEW_LINE>if (icon != null) {<NEW_LINE>DesignAttributeHandler.writeAttribute("icon", element.attributes(), icon, null, Resource.class, context);<NEW_LINE>}<NEW_LINE>String style = getStyleGenerator().apply(item);<NEW_LINE>if (style != null) {<NEW_LINE>element.attr("style", style);<NEW_LINE>}<NEW_LINE>if (isSelected(item)) {<NEW_LINE>element.attr("selected", true);<NEW_LINE>}<NEW_LINE>return element;<NEW_LINE>}
getItemCaptionGenerator().apply(item);
1,632,570
public void read(org.apache.thrift.protocol.TProtocol prot, startGetSummaries_result struct) throws org.apache.thrift.TException {<NEW_LINE>org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;<NEW_LINE>java.util.BitSet incoming = iprot.readBitSet(3);<NEW_LINE>if (incoming.get(0)) {<NEW_LINE>struct.success = new org.apache.accumulo.core<MASK><NEW_LINE>struct.success.read(iprot);<NEW_LINE>struct.setSuccessIsSet(true);<NEW_LINE>}<NEW_LINE>if (incoming.get(1)) {<NEW_LINE>struct.sec = new org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException();<NEW_LINE>struct.sec.read(iprot);<NEW_LINE>struct.setSecIsSet(true);<NEW_LINE>}<NEW_LINE>if (incoming.get(2)) {<NEW_LINE>struct.tope = new org.apache.accumulo.core.clientImpl.thrift.ThriftTableOperationException();<NEW_LINE>struct.tope.read(iprot);<NEW_LINE>struct.setTopeIsSet(true);<NEW_LINE>}<NEW_LINE>}
.dataImpl.thrift.TSummaries();
161,188
public void process(ResultSet rs) {<NEW_LINE>try {<NEW_LINE>// Create a temporary map of object ID to ResultFile<NEW_LINE>Map<Long, ResultFile> tempMap = new HashMap<>();<NEW_LINE>for (Result result : results) {<NEW_LINE>if (result.getType() == SearchData.Type.DOMAIN) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>ResultFile file = (ResultFile) result;<NEW_LINE>tempMap.put(file.getFirstInstance().getId(), file);<NEW_LINE>}<NEW_LINE>while (rs.next()) {<NEW_LINE>try {<NEW_LINE>// NON-NLS<NEW_LINE>Long objId = rs.getLong("object_id");<NEW_LINE>// NON-NLS<NEW_LINE>String hashSetName = rs.getString("set_name");<NEW_LINE>tempMap.get<MASK><NEW_LINE>} catch (SQLException ex) {<NEW_LINE>// NON-NLS<NEW_LINE>logger.log(Level.SEVERE, "Unable to get object_id or set_name from result set", ex);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} catch (SQLException ex) {<NEW_LINE>// NON-NLS<NEW_LINE>logger.log(Level.SEVERE, "Failed to get hash set names", ex);<NEW_LINE>}<NEW_LINE>}
(objId).addHashSetName(hashSetName);
1,389,427
public Clustering<Model> run(Relation<O> relation) {<NEW_LINE>SimilarityQuery<O> snnInstance = similarityFunction.instantiate(relation);<NEW_LINE>FiniteProgress objprog = LOG.isVerbose() ? new FiniteProgress("SNNClustering", relation.size(), LOG) : null;<NEW_LINE>IndefiniteProgress clusprog = LOG.isVerbose() ? new IndefiniteProgress("Number of clusters", LOG) : null;<NEW_LINE><MASK><NEW_LINE>noise = DBIDUtil.newHashSet();<NEW_LINE>processedIDs = DBIDUtil.newHashSet(relation.size());<NEW_LINE>if (relation.size() >= minpts) {<NEW_LINE>for (DBIDIter id = relation.iterDBIDs(); id.valid(); id.advance()) {<NEW_LINE>if (!processedIDs.contains(id)) {<NEW_LINE>expandCluster(snnInstance, id, objprog, clusprog);<NEW_LINE>if (processedIDs.size() == relation.size() && noise.size() == 0) {<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (objprog != null && clusprog != null) {<NEW_LINE>objprog.setProcessed(processedIDs.size(), LOG);<NEW_LINE>clusprog.setProcessed(resultList.size(), LOG);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>noise.addDBIDs(relation.getDBIDs());<NEW_LINE>if (objprog != null && clusprog != null) {<NEW_LINE>objprog.setProcessed(noise.size(), LOG);<NEW_LINE>clusprog.setProcessed(resultList.size(), LOG);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// Finish progress logging<NEW_LINE>LOG.ensureCompleted(objprog);<NEW_LINE>LOG.setCompleted(clusprog);<NEW_LINE>Clustering<Model> result = new Clustering<>();<NEW_LINE>Metadata.of(result).setLongName("Shared-Nearest-Neighbor Clustering");<NEW_LINE>for (Iterator<ModifiableDBIDs> resultListIter = resultList.iterator(); resultListIter.hasNext(); ) {<NEW_LINE>result.addToplevelCluster(new Cluster<Model>(resultListIter.next(), ClusterModel.CLUSTER));<NEW_LINE>}<NEW_LINE>result.addToplevelCluster(new Cluster<Model>(noise, true, ClusterModel.CLUSTER));<NEW_LINE>return result;<NEW_LINE>}
resultList = new ArrayList<>();
1,745,444
public void kill(DataSegment segment) throws SegmentLoadingException {<NEW_LINE><MASK><NEW_LINE>Map<String, Object> loadSpec = segment.getLoadSpec();<NEW_LINE>final String containerName = MapUtils.getString(loadSpec, "containerName");<NEW_LINE>final String blobPath = MapUtils.getString(loadSpec, "blobPath");<NEW_LINE>final String dirPath = Paths.get(blobPath).getParent().toString();<NEW_LINE>try {<NEW_LINE>azureStorage.emptyCloudBlobDirectory(containerName, dirPath);<NEW_LINE>} catch (StorageException e) {<NEW_LINE>Object extendedInfo = e.getExtendedErrorInformation() == null ? null : e.getExtendedErrorInformation().getErrorMessage();<NEW_LINE>throw new SegmentLoadingException(e, "Couldn't kill segment[%s]: [%s]", segment.getId(), extendedInfo);<NEW_LINE>} catch (URISyntaxException e) {<NEW_LINE>throw new SegmentLoadingException(e, "Couldn't kill segment[%s]: [%s]", segment.getId(), e.getReason());<NEW_LINE>}<NEW_LINE>}
log.info("Killing segment [%s]", segment);
1,176,158
public void write(JmeExporter ex) throws IOException {<NEW_LINE>OutputCapsule oc = ex.getCapsule(this);<NEW_LINE>oc.write(true, "pointSprite", false);<NEW_LINE>oc.write(wireframe, "wireframe", false);<NEW_LINE>oc.write(cullMode, "cullMode", FaceCullMode.Back);<NEW_LINE>oc.write(depthWrite, "depthWrite", true);<NEW_LINE>oc.write(depthTest, "depthTest", true);<NEW_LINE>oc.write(colorWrite, "colorWrite", true);<NEW_LINE>oc.write(blendMode, "blendMode", BlendMode.Off);<NEW_LINE>oc.write(offsetEnabled, "offsetEnabled", false);<NEW_LINE>oc.write(offsetFactor, "offsetFactor", 0);<NEW_LINE>oc.write(offsetUnits, "offsetUnits", 0);<NEW_LINE>oc.write(stencilTest, "stencilTest", false);<NEW_LINE>oc.write(frontStencilStencilFailOperation, "frontStencilStencilFailOperation", StencilOperation.Keep);<NEW_LINE>oc.write(frontStencilDepthFailOperation, "frontStencilDepthFailOperation", StencilOperation.Keep);<NEW_LINE>oc.write(frontStencilDepthPassOperation, "frontStencilDepthPassOperation", StencilOperation.Keep);<NEW_LINE>oc.write(backStencilStencilFailOperation, "backStencilStencilFailOperation", StencilOperation.Keep);<NEW_LINE>oc.write(backStencilDepthFailOperation, "backStencilDepthFailOperation", StencilOperation.Keep);<NEW_LINE>oc.write(backStencilDepthPassOperation, "backStencilDepthPassOperation", StencilOperation.Keep);<NEW_LINE>oc.write(frontStencilFunction, "frontStencilFunction", TestFunction.Always);<NEW_LINE>oc.write(backStencilFunction, "backStencilFunction", TestFunction.Always);<NEW_LINE>oc.write(blendEquation, "blendEquation", BlendEquation.Add);<NEW_LINE>oc.write(blendEquationAlpha, "blendEquationAlpha", BlendEquationAlpha.InheritColor);<NEW_LINE>oc.write(depthFunc, "depthFunc", TestFunction.LessOrEqual);<NEW_LINE>oc.write(lineWidth, "lineWidth", 1);<NEW_LINE>oc.write(sfactorRGB, "sfactorRGB", BlendFunc.One);<NEW_LINE>oc.write(dfactorRGB, "dfactorRGB", BlendFunc.One);<NEW_LINE>oc.write(sfactorAlpha, "sfactorAlpha", BlendFunc.One);<NEW_LINE>oc.write(dfactorAlpha, "dfactorAlpha", BlendFunc.One);<NEW_LINE>// Only "additional render state" has them set to false by default<NEW_LINE>oc.write(applyWireFrame, "applyWireFrame", true);<NEW_LINE>oc.write(applyCullMode, "applyCullMode", true);<NEW_LINE>oc.write(applyDepthWrite, "applyDepthWrite", true);<NEW_LINE>oc.write(applyDepthTest, "applyDepthTest", true);<NEW_LINE>oc.write(applyColorWrite, "applyColorWrite", true);<NEW_LINE>oc.write(applyBlendMode, "applyBlendMode", true);<NEW_LINE>oc.write(applyPolyOffset, "applyPolyOffset", true);<NEW_LINE>oc.write(applyDepthFunc, "applyDepthFunc", true);<NEW_LINE>oc.<MASK><NEW_LINE>}
write(applyLineWidth, "applyLineWidth", true);
1,005,203
public Predicate addPredicate(String theResourceName, RuntimeSearchParam theSearchParam, List<? extends IQueryParameterType> theList, SearchFilterParser.CompareOperation theOperation, RequestPartitionId theRequestPartitionId) {<NEW_LINE>From<?, ResourceIndexedSearchParamCoords> join = myQueryStack.createJoin(SearchBuilderJoinEnum.COORDS, theSearchParam.getName());<NEW_LINE>if (theList.get(0).getMissing() != null) {<NEW_LINE>addPredicateParamMissingForNonReference(theResourceName, theSearchParam.getName(), theList.get(0).getMissing(), join, theRequestPartitionId);<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>List<Predicate> codePredicates = new ArrayList<>();<NEW_LINE>addPartitionIdPredicate(theRequestPartitionId, join, codePredicates);<NEW_LINE>for (IQueryParameterType nextOr : theList) {<NEW_LINE>Predicate singleCode = createPredicateCoords(nextOr, theResourceName, <MASK><NEW_LINE>codePredicates.add(singleCode);<NEW_LINE>}<NEW_LINE>Predicate retVal = myCriteriaBuilder.or(toArray(codePredicates));<NEW_LINE>myQueryStack.addPredicateWithImplicitTypeSelection(retVal);<NEW_LINE>return retVal;<NEW_LINE>}
theSearchParam, myCriteriaBuilder, join, theRequestPartitionId);
48,780
public XContentBuilder toXContent(XContentBuilder builder, Params params) throws IOException {<NEW_LINE>builder.startObject();<NEW_LINE>builder.field("name", nodeName);<NEW_LINE>builder.field("cluster_name", clusterName.value());<NEW_LINE>builder.field("cluster_uuid", clusterUuid);<NEW_LINE>builder.startObject("version").field("number", build.qualifiedVersion()).field("build_flavor", build.flavor().displayName()).field("build_type", build.type().displayName()).field("build_hash", build.hash()).field("build_date", build.date()).field("build_snapshot", build.isSnapshot()).field("lucene_version", version.luceneVersion.toString()).field("minimum_wire_compatibility_version", version.minimumCompatibilityVersion().toString()).field("minimum_index_compatibility_version", version.minimumIndexCompatibilityVersion().<MASK><NEW_LINE>builder.field("tagline", "You Know, for Search");<NEW_LINE>builder.endObject();<NEW_LINE>return builder;<NEW_LINE>}
toString()).endObject();
1,017,650
public void rcr(AsmMemoryOperand dst, int imm) {<NEW_LINE>int code;<NEW_LINE>if (imm == 1) {<NEW_LINE>if (dst.size == MemoryOperandSize.QWORD) {<NEW_LINE>code = Code.RCR_RM64_1;<NEW_LINE>} else if (dst.size == MemoryOperandSize.DWORD) {<NEW_LINE>code = Code.RCR_RM32_1;<NEW_LINE>} else if (dst.size == MemoryOperandSize.WORD) {<NEW_LINE>code = Code.RCR_RM16_1;<NEW_LINE>} else if (dst.size == MemoryOperandSize.BYTE) {<NEW_LINE>code = Code.RCR_RM8_1;<NEW_LINE>} else {<NEW_LINE>throw noOpCodeFoundFor(<MASK><NEW_LINE>}<NEW_LINE>} else if (dst.size == MemoryOperandSize.QWORD) {<NEW_LINE>code = Code.RCR_RM64_IMM8;<NEW_LINE>} else if (dst.size == MemoryOperandSize.DWORD) {<NEW_LINE>code = Code.RCR_RM32_IMM8;<NEW_LINE>} else if (dst.size == MemoryOperandSize.WORD) {<NEW_LINE>code = Code.RCR_RM16_IMM8;<NEW_LINE>} else if (dst.size == MemoryOperandSize.BYTE) {<NEW_LINE>code = Code.RCR_RM8_IMM8;<NEW_LINE>} else {<NEW_LINE>throw noOpCodeFoundFor(Mnemonic.RCR, dst, imm);<NEW_LINE>}<NEW_LINE>addInstruction(Instruction.create(code, dst.toMemoryOperand(getBitness()), imm));<NEW_LINE>}
Mnemonic.RCR, dst, imm);
1,850,205
private Map<String, Boolean> filterUpdatableEntity(DalHints hints, List<T> rawPojos) {<NEW_LINE>Set<String> qualifiedColumns = filterColumns(hints);<NEW_LINE>Map<String, Boolean> columnStatus = new HashMap<String, Boolean>();<NEW_LINE>for (String column : qualifiedColumns) columnStatus.put(column, false);<NEW_LINE>if (hints.isUpdateUnchangedField()) {<NEW_LINE>return columnStatus;<NEW_LINE>}<NEW_LINE>Set<String> unChangedFields = new HashSet<>(qualifiedColumns);<NEW_LINE>Set<String> changedFields = new HashSet<>(qualifiedColumns);<NEW_LINE>for (T pojo : rawPojos) {<NEW_LINE>if (unChangedFields.isEmpty())<NEW_LINE>break;<NEW_LINE>Set<<MASK><NEW_LINE>if (updatedColumns.size() == 0)<NEW_LINE>continue;<NEW_LINE>unChangedFields.removeAll(updatedColumns);<NEW_LINE>changedFields.retainAll(updatedColumns);<NEW_LINE>}<NEW_LINE>for (String unChangedField : unChangedFields) columnStatus.remove(unChangedField);<NEW_LINE>Set<String> remain = new HashSet<>(columnStatus.keySet());<NEW_LINE>remain.removeAll(changedFields);<NEW_LINE>for (String maybeChangedField : remain) columnStatus.put(maybeChangedField, true);<NEW_LINE>return columnStatus;<NEW_LINE>}
String> updatedColumns = getUpdatedColumns(pojo);
587,955
public OSSAsyncTask<ListObjectsResult> listObjects(ListObjectsRequest request, OSSCompletedCallback<ListObjectsRequest, ListObjectsResult> completedCallback) {<NEW_LINE>RequestMessage requestMessage = new RequestMessage();<NEW_LINE>requestMessage.setIsAuthorizationRequired(request.isAuthorizationRequired());<NEW_LINE>requestMessage.setEndpoint(endpoint);<NEW_LINE><MASK><NEW_LINE>requestMessage.setBucketName(request.getBucketName());<NEW_LINE>canonicalizeRequestMessage(requestMessage, request);<NEW_LINE>OSSUtils.populateListObjectsRequestParameters(request, requestMessage.getParameters());<NEW_LINE>ExecutionContext<ListObjectsRequest, ListObjectsResult> executionContext = new ExecutionContext(getInnerClient(), request, applicationContext);<NEW_LINE>if (completedCallback != null) {<NEW_LINE>executionContext.setCompletedCallback(completedCallback);<NEW_LINE>}<NEW_LINE>ResponseParser<ListObjectsResult> parser = new ResponseParsers.ListObjectsResponseParser();<NEW_LINE>Callable<ListObjectsResult> callable = new OSSRequestTask<ListObjectsResult>(requestMessage, parser, executionContext, maxRetryCount);<NEW_LINE>return OSSAsyncTask.wrapRequestTask(executorService.submit(callable), executionContext);<NEW_LINE>}
requestMessage.setMethod(HttpMethod.GET);
445,501
private void validateLwm2mServersCredentialOfBootstrapForClient(LwM2MBootstrapServerCredential bootstrapServerConfig) {<NEW_LINE>String server;<NEW_LINE>switch(bootstrapServerConfig.getSecurityMode()) {<NEW_LINE>case NO_SEC:<NEW_LINE>case PSK:<NEW_LINE>break;<NEW_LINE>case RPK:<NEW_LINE>RPKLwM2MBootstrapServerCredential rpkServerCredentials = (RPKLwM2MBootstrapServerCredential) bootstrapServerConfig;<NEW_LINE>server = rpkServerCredentials.isBootstrapServerIs() ? "Bootstrap Server" : "LwM2M Server";<NEW_LINE>if (StringUtils.isEmpty(rpkServerCredentials.getServerPublicKey())) {<NEW_LINE>throw new DeviceCredentialsValidationException(server + " RPK public key must be specified!");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>String pubkRpkSever = EncryptionUtil.pubkTrimNewLines(rpkServerCredentials.getServerPublicKey());<NEW_LINE>rpkServerCredentials.setServerPublicKey(pubkRpkSever);<NEW_LINE>SecurityUtil.publicKey.decode(rpkServerCredentials.getDecodedCServerPublicKey());<NEW_LINE>} catch (Exception e) {<NEW_LINE>throw new DeviceCredentialsValidationException(server + " RPK public key must be in standard [RFC7250] and then encoded to Base64 format!");<NEW_LINE>}<NEW_LINE>break;<NEW_LINE>case X509:<NEW_LINE>X509LwM2MBootstrapServerCredential x509ServerCredentials = (X509LwM2MBootstrapServerCredential) bootstrapServerConfig;<NEW_LINE>server = x509ServerCredentials.isBootstrapServerIs() ? "Bootstrap Server" : "LwM2M Server";<NEW_LINE>if (StringUtils.isEmpty(x509ServerCredentials.getServerPublicKey())) {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>try {<NEW_LINE>String certServer = EncryptionUtil.certTrimNewLines(x509ServerCredentials.getServerPublicKey());<NEW_LINE>x509ServerCredentials.setServerPublicKey(certServer);<NEW_LINE>SecurityUtil.certificate.decode(x509ServerCredentials.getDecodedCServerPublicKey());<NEW_LINE>} catch (Exception e) {<NEW_LINE>throw new DeviceCredentialsValidationException(server + " X509 certificate must be in DER-encoded X509v3 format and support only EC algorithm and then encoded to Base64 format!");<NEW_LINE>}<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}
throw new DeviceCredentialsValidationException(server + " X509 certificate must be specified!");
315,849
public static String compileQuery(FAFQueryMethodForge query, String classPostfix, CompilerAbstractionClassCollection compilerState, ModuleCompileTimeServices compileTimeServices, CompilerPath path) throws StatementSpecCompileException {<NEW_LINE>String statementFieldsClassName = CodeGenerationIDGenerator.<MASK><NEW_LINE>CodegenPackageScope packageScope = new CodegenPackageScope(compileTimeServices.getPackageName(), statementFieldsClassName, compileTimeServices.isInstrumented(), compileTimeServices.getConfiguration().getCompiler().getByteCode());<NEW_LINE>String queryMethodProviderClassName = CodeGenerationIDGenerator.generateClassNameSimple(FAFQueryMethodProvider.class, classPostfix);<NEW_LINE>List<StmtClassForgeable> forgeablesQueryMethod = query.makeForgeables(queryMethodProviderClassName, classPostfix, packageScope);<NEW_LINE>List<StmtClassForgeable> forgeables = new ArrayList<>(forgeablesQueryMethod);<NEW_LINE>forgeables.add(new StmtClassForgeableStmtFields(statementFieldsClassName, packageScope));<NEW_LINE>// forge with statement-fields last<NEW_LINE>List<CodegenClass> classes = new ArrayList<>(forgeables.size());<NEW_LINE>for (StmtClassForgeable forgeable : forgeables) {<NEW_LINE>CodegenClass clazz = forgeable.forge(true, true);<NEW_LINE>if (clazz == null) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>classes.add(clazz);<NEW_LINE>}<NEW_LINE>// compile with statement-field first<NEW_LINE>classes.sort((o1, o2) -> Integer.compare(o1.getClassType().getSortCode(), o2.getClassType().getSortCode()));<NEW_LINE>// remove statement field initialization when unused<NEW_LINE>packageScope.rewriteStatementFieldUse(classes);<NEW_LINE>// add class-provided create-class to classpath<NEW_LINE>compileTimeServices.getClassProvidedCompileTimeResolver().addTo(compilerState::add);<NEW_LINE>CompilerAbstractionCompilationContext ctx = new CompilerAbstractionCompilationContext(compileTimeServices, path.getCompileds());<NEW_LINE>compileTimeServices.getCompilerAbstraction().compileClasses(classes, ctx, compilerState);<NEW_LINE>// remove path create-class class-provided byte code<NEW_LINE>compileTimeServices.getClassProvidedCompileTimeResolver().removeFrom(compilerState::remove);<NEW_LINE>return queryMethodProviderClassName;<NEW_LINE>}
generateClassNameSimple(StatementFields.class, classPostfix);
648,896
static GHRateLimit fromRecord(@Nonnull Record record, @Nonnull RateLimitTarget rateLimitTarget) {<NEW_LINE>if (rateLimitTarget == RateLimitTarget.CORE || rateLimitTarget == RateLimitTarget.NONE) {<NEW_LINE>return new GHRateLimit(record, UnknownLimitRecord.DEFAULT, UnknownLimitRecord.DEFAULT, UnknownLimitRecord.DEFAULT);<NEW_LINE>} else if (rateLimitTarget == RateLimitTarget.SEARCH) {<NEW_LINE>return new GHRateLimit(UnknownLimitRecord.DEFAULT, record, UnknownLimitRecord.DEFAULT, UnknownLimitRecord.DEFAULT);<NEW_LINE>} else if (rateLimitTarget == RateLimitTarget.GRAPHQL) {<NEW_LINE>return new GHRateLimit(UnknownLimitRecord.DEFAULT, UnknownLimitRecord.DEFAULT, record, UnknownLimitRecord.DEFAULT);<NEW_LINE>} else if (rateLimitTarget == RateLimitTarget.INTEGRATION_MANIFEST) {<NEW_LINE>return new GHRateLimit(UnknownLimitRecord.DEFAULT, UnknownLimitRecord.DEFAULT, UnknownLimitRecord.DEFAULT, record);<NEW_LINE>} else {<NEW_LINE>throw new IllegalArgumentException(<MASK><NEW_LINE>}<NEW_LINE>}
"Unknown rate limit target: " + rateLimitTarget.toString());
1,223,832
public com.amazonaws.services.dynamodbv2.model.ExportNotFoundException unmarshallFromContext(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>com.amazonaws.services.dynamodbv2.model.ExportNotFoundException exportNotFoundException = new com.amazonaws.services.dynamodbv2.model.ExportNotFoundException(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 exportNotFoundException;<NEW_LINE>}
JsonToken token = context.getCurrentToken();
1,221,836
protected double assignToNearestCluster(ArrayDBIDs means) {<NEW_LINE><MASK><NEW_LINE>double cost = 0.;<NEW_LINE>for (DBIDIter iditer = ids.iter(); iditer.valid(); iditer.advance()) {<NEW_LINE>double mindist = Double.POSITIVE_INFINITY, mindist2 = Double.POSITIVE_INFINITY;<NEW_LINE>int minindx = -1;<NEW_LINE>for (miter.seek(0); miter.valid(); miter.advance()) {<NEW_LINE>final double dist = distQ.distance(iditer, miter);<NEW_LINE>if (dist < mindist) {<NEW_LINE>mindist2 = mindist;<NEW_LINE>minindx = miter.getOffset();<NEW_LINE>mindist = dist;<NEW_LINE>} else if (dist < mindist2) {<NEW_LINE>mindist2 = dist;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (minindx < 0) {<NEW_LINE>throw new AbortException("Too many infinite distances. Cannot assign objects.");<NEW_LINE>}<NEW_LINE>assignment.put(iditer, minindx);<NEW_LINE>nearest.put(iditer, mindist);<NEW_LINE>second.put(iditer, mindist2);<NEW_LINE>cost += mindist;<NEW_LINE>}<NEW_LINE>return cost;<NEW_LINE>}
DBIDArrayIter miter = means.iter();
808,825
final ImportStacksToStackSetResult executeImportStacksToStackSet(ImportStacksToStackSetRequest importStacksToStackSetRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(importStacksToStackSetRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<ImportStacksToStackSetRequest> request = null;<NEW_LINE>Response<ImportStacksToStackSetResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new ImportStacksToStackSetRequestMarshaller().marshall(super.beforeMarshalling(importStacksToStackSetRequest));<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, "CloudFormation");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ImportStacksToStackSet");<NEW_LINE>request.<MASK><NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>StaxResponseHandler<ImportStacksToStackSetResult> responseHandler = new StaxResponseHandler<ImportStacksToStackSetResult>(new ImportStacksToStackSetResultStaxUnmarshaller());<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.ADVANCED_CONFIG, advancedConfig);
1,144,321
private void create(Properties ctx, TransformerHandler document, PO entity, boolean includeParents, List<String> excludedParentList, boolean isFromParent) throws SAXException {<NEW_LINE>int tableId = 0;<NEW_LINE>String tableName = null;<NEW_LINE>int recordId = 0;<NEW_LINE>if (entity != null) {<NEW_LINE>tableId = entity.get_Table_ID();<NEW_LINE>tableName = entity.get_TableName();<NEW_LINE>recordId = entity.get_ID();<NEW_LINE>} else {<NEW_LINE>tableId = Env.getContextAsInt(ctx, TABLE_ID_TAG);<NEW_LINE>recordId = Env.getContextAsInt(ctx, RECORD_ID_TAG);<NEW_LINE>}<NEW_LINE>if (tableId <= 0) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>// Instance PO<NEW_LINE>if (entity == null) {<NEW_LINE>entity = getCreatePO(ctx, tableId, recordId, null);<NEW_LINE>}<NEW_LINE>if (entity == null) {<NEW_LINE>entity = getCreatePO(ctx, tableName, recordId, null);<NEW_LINE>}<NEW_LINE>if (entity == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>// Validate if was processed<NEW_LINE>String key = entity.get_UUID();<NEW_LINE>if (list.contains(key)) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>list.add(key);<NEW_LINE>// Create parents<NEW_LINE>if (includeParents) {<NEW_LINE>createParent(ctx, document, entity, excludedParentList);<NEW_LINE>}<NEW_LINE>AttributesImpl defaultAttributes = customValues.getAttributes();<NEW_LINE>AttributesImpl atts = <MASK><NEW_LINE>if (atts != null) {<NEW_LINE>document.startElement("", "", getTagName(entity), atts);<NEW_LINE>document.endElement("", "", getTagName(entity));<NEW_LINE>}<NEW_LINE>// Create translation<NEW_LINE>createTranslation(ctx, document, entity);<NEW_LINE>// Create Node<NEW_LINE>createTreeNode(ctx, document, entity);<NEW_LINE>if (!isFromParent) {<NEW_LINE>customValues.cleanValues();<NEW_LINE>}<NEW_LINE>}
createBinding(ctx, entity, defaultAttributes);
1,361,527
public String orderLine(Properties ctx, int WindowNo, GridTab mTab, GridField mField, Object value) {<NEW_LINE>Integer C_OrderLine_ID = (Integer) value;<NEW_LINE>if (C_OrderLine_ID == null || C_OrderLine_ID.intValue() == 0)<NEW_LINE>return "";<NEW_LINE>// Get Details<NEW_LINE>MOrderLine ol = new MOrderLine(ctx, C_OrderLine_ID.intValue(), null);<NEW_LINE>if (ol.get_ID() != 0) {<NEW_LINE>if (ol.getC_Charge_ID() > 0 && ol.getM_Product_ID() <= 0) {<NEW_LINE>mTab.setValue("C_Charge_ID", new Integer(ol.getC_Charge_ID()));<NEW_LINE>} else {<NEW_LINE>mTab.setValue("M_Product_ID", new Integer(ol.getM_Product_ID()));<NEW_LINE>mTab.setValue("M_AttributeSetInstance_ID", new Integer(ol.getM_AttributeSetInstance_ID()));<NEW_LINE>}<NEW_LINE>//<NEW_LINE>mTab.setValue("C_UOM_ID", new Integer(ol.getC_UOM_ID()));<NEW_LINE>BigDecimal MovementQty = ol.getQtyOrdered().subtract(ol.getQtyDelivered());<NEW_LINE><MASK><NEW_LINE>BigDecimal QtyEntered = MovementQty;<NEW_LINE>if (ol.getQtyEntered().compareTo(ol.getQtyOrdered()) != 0)<NEW_LINE>QtyEntered = QtyEntered.multiply(ol.getQtyEntered()).divide(ol.getQtyOrdered(), 12, BigDecimal.ROUND_HALF_UP);<NEW_LINE>mTab.setValue("QtyEntered", QtyEntered);<NEW_LINE>//<NEW_LINE>mTab.setValue("C_Activity_ID", new Integer(ol.getC_Activity_ID()));<NEW_LINE>mTab.setValue("C_Campaign_ID", new Integer(ol.getC_Campaign_ID()));<NEW_LINE>mTab.setValue("C_Project_ID", new Integer(ol.getC_Project_ID()));<NEW_LINE>mTab.setValue("C_ProjectPhase_ID", new Integer(ol.getC_ProjectPhase_ID()));<NEW_LINE>mTab.setValue("C_ProjectTask_ID", new Integer(ol.getC_ProjectTask_ID()));<NEW_LINE>mTab.setValue("AD_OrgTrx_ID", new Integer(ol.getAD_OrgTrx_ID()));<NEW_LINE>mTab.setValue("User1_ID", new Integer(ol.getUser1_ID()));<NEW_LINE>mTab.setValue("User2_ID", new Integer(ol.getUser2_ID()));<NEW_LINE>mTab.setValue("User3_ID", new Integer(ol.getUser3_ID()));<NEW_LINE>mTab.setValue("User4_ID", new Integer(ol.getUser4_ID()));<NEW_LINE>}<NEW_LINE>return "";<NEW_LINE>}
mTab.setValue("MovementQty", MovementQty);
1,069,260
private static List<String> makeQueries(List<String> queries, QueryMode queryMode, int queryCount) {<NEW_LINE>int numQueries = queries.size();<NEW_LINE>switch(queryMode) {<NEW_LINE>case FULL:<NEW_LINE>if (queryCount > 0 && queryCount < numQueries) {<NEW_LINE>return queries.subList(0, queryCount);<NEW_LINE>} else {<NEW_LINE>return queries;<NEW_LINE>}<NEW_LINE>case RESAMPLE:<NEW_LINE>Preconditions.checkArgument(queryCount > 0, "Query count must be positive for RESAMPLE mode");<NEW_LINE>// anything deterministic will do<NEW_LINE>Random random = new Random(0);<NEW_LINE>List<String> resampledQueries = new ArrayList<>(queryCount);<NEW_LINE>for (int i = 0; i < queryCount; i++) {<NEW_LINE>resampledQueries.add(queries.get(<MASK><NEW_LINE>}<NEW_LINE>return resampledQueries;<NEW_LINE>default:<NEW_LINE>throw new IllegalArgumentException(String.format("Unsupported queryMode '%s", queryMode));<NEW_LINE>}<NEW_LINE>}
random.nextInt(numQueries)));
304,709
public void run(RegressionEnvironment env) {<NEW_LINE>String[] fields = "sym,avgp".split(",");<NEW_LINE>String epl = "@name('s0') select irstream avg(price) as avgp, sym " + "from SupportPriceEvent#groupwin(sym)#length(2)";<NEW_LINE>env.compileDeploy(epl).addListener("s0");<NEW_LINE>env.sendEventBean(new SupportPriceEvent(1, "A"));<NEW_LINE>env.assertPropsNew("s0", fields, new Object<MASK><NEW_LINE>env.sendEventBean(new SupportPriceEvent(2, "B"));<NEW_LINE>env.assertPropsNew("s0", fields, new Object[] { "B", 1.5 });<NEW_LINE>env.milestone(0);<NEW_LINE>env.sendEventBean(new SupportPriceEvent(9, "A"));<NEW_LINE>env.assertPropsNew("s0", fields, new Object[] { "A", (1 + 2 + 9) / 3.0 });<NEW_LINE>env.sendEventBean(new SupportPriceEvent(18, "B"));<NEW_LINE>env.assertPropsNew("s0", fields, new Object[] { "B", (1 + 2 + 9 + 18) / 4.0 });<NEW_LINE>env.sendEventBean(new SupportPriceEvent(5, "A"));<NEW_LINE>env.assertPropsIRPair("s0", fields, new Object[] { "A", (2 + 9 + 18 + 5) / 4.0 }, new Object[] { "A", (5 + 2 + 9 + 18) / 4.0 });<NEW_LINE>env.undeployAll();<NEW_LINE>}
[] { "A", 1.0 });
587,404
public static InspectionResultsView showOfflineView(@Nonnull Project project, @Nonnull Map<String, Map<String, Set<OfflineProblemDescriptor>>> resMap, @Nonnull InspectionProfile inspectionProfile, @Nonnull String title) {<NEW_LINE>final AnalysisScope scope = new AnalysisScope(project);<NEW_LINE>final InspectionManagerEx managerEx = (InspectionManagerEx) InspectionManager.getInstance(project);<NEW_LINE>final GlobalInspectionContextImpl context = managerEx.createNewGlobalContext(false);<NEW_LINE>context.setExternalProfile(inspectionProfile);<NEW_LINE>context.setCurrentScope(scope);<NEW_LINE>context.initializeTools(new ArrayList<Tools>(), new ArrayList<Tools>(), <MASK><NEW_LINE>final InspectionResultsView view = new InspectionResultsView(project, inspectionProfile, scope, context, new OfflineInspectionRVContentProvider(resMap, project));<NEW_LINE>((RefManagerImpl) context.getRefManager()).inspectionReadActionStarted();<NEW_LINE>view.update();<NEW_LINE>TreeUtil.selectFirstNode(view.getTree());<NEW_LINE>context.addView(view, title);<NEW_LINE>return view;<NEW_LINE>}
new ArrayList<Tools>());
162,729
public void leave(Element element) {<NEW_LINE>if (canonical) {<NEW_LINE>c14nNamespaceStack.poll();<NEW_LINE>c14nAttrStack.poll();<NEW_LINE>}<NEW_LINE><MASK><NEW_LINE>if (element.hasChildNodes()) {<NEW_LINE>if (needIndentInClosing(element)) {<NEW_LINE>indentation.pop();<NEW_LINE>buffer.append(indentation.peek());<NEW_LINE>} else if (asBuilder) {<NEW_LINE>if (!containsText(element)) {<NEW_LINE>indentation.pop();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>buffer.append("</").append(name).append('>');<NEW_LINE>if (needBreakInClosing(element)) {<NEW_LINE>buffer.append('\n');<NEW_LINE>}<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>// no child, but HTML might need a closing tag.<NEW_LINE>if (asHtml || noEmpty) {<NEW_LINE>if (!isEmpty(name) && noEmpty) {<NEW_LINE>buffer.append("</").append(name).append('>');<NEW_LINE>}<NEW_LINE>} else if (asXhtml && !isEmpty(name)) {<NEW_LINE>buffer.append("</").append(name).append('>');<NEW_LINE>}<NEW_LINE>if (needBreakInClosing(element)) {<NEW_LINE>if (!containsText(element)) {<NEW_LINE>indentation.pop();<NEW_LINE>}<NEW_LINE>buffer.append('\n');<NEW_LINE>}<NEW_LINE>}
String name = element.getTagName();
834,336
public Object buildPostIDPInitiatedRequest(String testcase, WebClient webClient, SAMLTestSettings settings, List<validationData> expectations) throws Exception {<NEW_LINE>String thisMethod = "buildPostIDPInitiatedRequest";<NEW_LINE>msgUtils.printMethodName(thisMethod);<NEW_LINE>setMarkEndOfLogs();<NEW_LINE>URL url = AutomationTools.getNewUrl(settings.getIdpChallenge());<NEW_LINE>WebRequest request = new WebRequest(url, HttpMethod.POST);<NEW_LINE>CXFSettings cxfSettings = settings.getCXFSettings();<NEW_LINE>request.setRequestParameters(new ArrayList());<NEW_LINE>// Setup the rest of the HTTP POST signon request to SP<NEW_LINE>updateCXFRequestParms(request, cxfSettings);<NEW_LINE>updateRSSAMLRequestParms(request, settings);<NEW_LINE>request.getRequestParameters().add(new NameValuePair("RequestBinding", "HTTPPost"));<NEW_LINE>setRequestParameterIfSet(request, "providerId", settings.getSpConsumer());<NEW_LINE>setRequestParameterIfSet(request, "target", settings.getRelayState());<NEW_LINE>setRequestParameterIfSet(request, "NameIdFormat", "email");<NEW_LINE>setRequestParameterIfSet(request, "RelayState", encodeString(settings.getRelayState()));<NEW_LINE>setRequestParameterIfSet(request, "relayState", settings.getRelayState());<NEW_LINE>msgUtils.printRequestParts(webClient, request, testcase, "Outgoing request");<NEW_LINE>msgUtils.printAllCookies(webClient);<NEW_LINE>Object thePage = webClient.getPage(request);<NEW_LINE>// make sure the page is processed before continuing<NEW_LINE>waitBeforeContinuing(webClient);<NEW_LINE>msgUtils.printResponseParts(thePage, testcase, thisMethod + " response");<NEW_LINE>validationTools.setServers(testSAMLServer, <MASK><NEW_LINE>validationTools.validateResult(webClient, thePage, SAMLConstants.BUILD_POST_IDP_INITIATED_REQUEST, expectations, settings);<NEW_LINE>return thePage;<NEW_LINE>}
testSAMLOIDCServer, testOIDCServer, testAppServer, testIDPServer);
1,618,783
private static Function checkInsideThunkJump(Program program, Address address, TaskMonitor monitor) throws CancelledException {<NEW_LINE>Listing listing = program.getListing();<NEW_LINE>List<Reference> refList = getReferencesTo(program, address, monitor);<NEW_LINE>if (refList.size() != 1) {<NEW_LINE>// sanity check...<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>Address thunkAddress = refList.get(0).getFromAddress();<NEW_LINE>Function thunkFunction = listing.getFunctionAt(thunkAddress);<NEW_LINE>if (thunkFunction == null) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>Instruction thunkInstr = listing.getInstructionAt(thunkAddress);<NEW_LINE>if (thunkInstr.getFlowType().isJump()) {<NEW_LINE>AddressSetView newThunkBody = new AddressSet(thunkInstr.getMinAddress(<MASK><NEW_LINE>try {<NEW_LINE>thunkFunction.setBody(newThunkBody);<NEW_LINE>} catch (OverlappingFunctionException e) {<NEW_LINE>// should never happen...<NEW_LINE>}<NEW_LINE>}<NEW_LINE>Function newFunction = createFunction(program, address);<NEW_LINE>thunkFunction.setThunkedFunction(newFunction);<NEW_LINE>return newFunction;<NEW_LINE>}
), thunkInstr.getMaxAddress());
508,336
public static void main(String[] args) {<NEW_LINE>App app = new App(args, "secret=YOUR-SECRET");<NEW_LINE>Log.info("Starting application");<NEW_LINE>// provide beans (controllers, services etc.)<NEW_LINE>app.beans(new MyCtrl());<NEW_LINE>app.get("/books").json(() -> {<NEW_LINE>// TODO get all books<NEW_LINE>return U.list();<NEW_LINE>});<NEW_LINE>app.post("/books").json((@Valid Book book) -> {<NEW_LINE>// TODO insert new book<NEW_LINE>return book;<NEW_LINE>});<NEW_LINE>app.put("/books/{id}").json((Long id, @Valid Book book) -> {<NEW_LINE>// TODO update/replace book<NEW_LINE>return true;<NEW_LINE>});<NEW_LINE>app.delete("/books/{id}").json((Long id) -> {<NEW_LINE>// TODO delete book<NEW_LINE>return true;<NEW_LINE>});<NEW_LINE>// Dummy login: successful if the username is the same as the password, or a proper password is entered<NEW_LINE>My.loginProvider((req, username, password) -> username.equals(password) || Auth<MASK><NEW_LINE>// Gives the 'manager' role to every logged-in user except 'admin'<NEW_LINE>My.rolesProvider((req, username) -> U.eq(username, "admin") ? Auth.getRolesFor(username) : U.set("manager"));<NEW_LINE>// now everything is ready, so start the application<NEW_LINE>app.start();<NEW_LINE>}
.login(username, password));
933,887
public Map.Entry<K, V> next() {<NEW_LINE>try {<NEW_LINE>Document <MASK><NEW_LINE>String val = "";<NEW_LINE>if (definition.getFields().size() > 0) {<NEW_LINE>for (String field : definition.getFields()) {<NEW_LINE>val += doc.get(field);<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>val = doc.get(OLuceneIndexEngineAbstract.KEY);<NEW_LINE>}<NEW_LINE>final String finalVal = val;<NEW_LINE>final ORecordId id = new ORecordId(doc.get(OLuceneIndexEngineAbstract.RID));<NEW_LINE>currentIdx++;<NEW_LINE>return new Map.Entry<K, V>() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public K getKey() {<NEW_LINE>return (K) finalVal;<NEW_LINE>}<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public V getValue() {<NEW_LINE>return (V) id;<NEW_LINE>}<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public V setValue(V value) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>};<NEW_LINE>} catch (IOException e) {<NEW_LINE>OLogManager.instance().error(this, "Error on iterating Lucene result", e);<NEW_LINE>}<NEW_LINE>return null;<NEW_LINE>}
doc = reader.document(currentIdx);
285,936
final CreateDeviceFleetResult executeCreateDeviceFleet(CreateDeviceFleetRequest createDeviceFleetRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(createDeviceFleetRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<CreateDeviceFleetRequest> request = null;<NEW_LINE>Response<CreateDeviceFleetResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new CreateDeviceFleetRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(createDeviceFleetRequest));<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, "SageMaker");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateDeviceFleet");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<CreateDeviceFleetResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new CreateDeviceFleetResultJsonUnmarshaller());<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);
618,014
private void reportDiagnostic(PackageID packageID, DiagnosticCode diagnosticCode, Location location, String msg, DiagnosticSeverity severity, Object[] args) {<NEW_LINE>if (severity == DiagnosticSeverity.ERROR) {<NEW_LINE>this.errorCount++;<NEW_LINE>}<NEW_LINE>if (this.isMute) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>DiagnosticInfo diagInfo;<NEW_LINE>if (diagnosticCode != null) {<NEW_LINE>diagInfo = new DiagnosticInfo(diagnosticCode.diagnosticId(), diagnosticCode.messageKey(), diagnosticCode.severity());<NEW_LINE>} else {<NEW_LINE>diagInfo = new <MASK><NEW_LINE>}<NEW_LINE>List<DiagnosticProperty<?>> argList = convertDiagArgsToProps(args);<NEW_LINE>BLangDiagnostic diagnostic = new BLangDiagnostic(location, msg, diagInfo, diagnosticCode, argList);<NEW_LINE>if (packageID != null) {<NEW_LINE>storeDiagnosticInModule(packageID, diagnostic);<NEW_LINE>} else {<NEW_LINE>storeDiagnosticInModule(currentPackageId, diagnostic);<NEW_LINE>}<NEW_LINE>}
DiagnosticInfo(null, msg, severity);
15,584
public SmithWatermanAlignment align(final byte[] reference, final byte[] alternate, final SWParameters parameters, final SWOverhangStrategy overhangStrategy) {<NEW_LINE>long startTime = System.nanoTime();<NEW_LINE>Utils.nonNull(parameters);<NEW_LINE>Utils.nonNull(overhangStrategy);<NEW_LINE>// avoid running full Smith-Waterman if there is an exact match of alternate in reference<NEW_LINE>int matchIndex = -1;<NEW_LINE>if (overhangStrategy == SWOverhangStrategy.SOFTCLIP || overhangStrategy == SWOverhangStrategy.IGNORE) {<NEW_LINE>// Use a substring search to find an exact match of the alternate in the reference<NEW_LINE>// NOTE: This approach only works for SOFTCLIP and IGNORE overhang strategies<NEW_LINE>matchIndex = <MASK><NEW_LINE>}<NEW_LINE>final SmithWatermanAlignment alignmentResult;<NEW_LINE>if (matchIndex != -1) {<NEW_LINE>// generate the alignment result when the substring search was successful<NEW_LINE>alignmentResult = new SWNativeResultWrapper(new Cigar(Collections.singletonList(new CigarElement(alternate.length, CigarOperator.M))), matchIndex);<NEW_LINE>} else {<NEW_LINE>// run full Smith-Waterman<NEW_LINE>final SWNativeAlignerResult alignment = aligner.align(reference, alternate, parameters, overhangStrategy);<NEW_LINE>alignmentResult = new SWNativeResultWrapper(alignment);<NEW_LINE>}<NEW_LINE>totalComputeTime += System.nanoTime() - startTime;<NEW_LINE>return alignmentResult;<NEW_LINE>}
Utils.lastIndexOf(reference, alternate);
745,072
public void annotate(Annotation annotation) {<NEW_LINE>if (VERBOSE) {<NEW_LINE>System.err.<MASK><NEW_LINE>}<NEW_LINE>Pattern paragraphSplit = null;<NEW_LINE>if (PARAGRAPH_BREAK.equals("two")) {<NEW_LINE>paragraphSplit = Pattern.compile("\\n\\n+");<NEW_LINE>} else if (PARAGRAPH_BREAK.equals("one")) {<NEW_LINE>paragraphSplit = Pattern.compile("\\n+");<NEW_LINE>}<NEW_LINE>String fullText = annotation.get(CoreAnnotations.TextAnnotation.class);<NEW_LINE>Matcher m = paragraphSplit.matcher(fullText);<NEW_LINE>List<Integer> paragraphBreaks = Generics.newArrayList();<NEW_LINE>while (m.find()) {<NEW_LINE>// get the staring index<NEW_LINE>paragraphBreaks.add(m.start());<NEW_LINE>}<NEW_LINE>// each sentence gets a paragraph id annotation<NEW_LINE>List<CoreMap> sentences = annotation.get(CoreAnnotations.SentencesAnnotation.class);<NEW_LINE>int currParagraph = -1;<NEW_LINE>int nextParagraphStartIndex = -1;<NEW_LINE>for (CoreMap sent : sentences) {<NEW_LINE>int sentBegin = sent.get(CoreAnnotations.CharacterOffsetBeginAnnotation.class);<NEW_LINE>if (sentBegin >= nextParagraphStartIndex) {<NEW_LINE>if (currParagraph + 1 < paragraphBreaks.size()) {<NEW_LINE>nextParagraphStartIndex = paragraphBreaks.get(currParagraph + 1);<NEW_LINE>} else {<NEW_LINE>nextParagraphStartIndex = fullText.length();<NEW_LINE>}<NEW_LINE>currParagraph++;<NEW_LINE>}<NEW_LINE>sent.set(CoreAnnotations.ParagraphIndexAnnotation.class, currParagraph);<NEW_LINE>}<NEW_LINE>if (VERBOSE) {<NEW_LINE>System.err.println("done");<NEW_LINE>}<NEW_LINE>}
print("Adding paragraph index annotation (" + PARAGRAPH_BREAK + ") ...");
81,135
final PutSigningProfileResult executePutSigningProfile(PutSigningProfileRequest putSigningProfileRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(putSigningProfileRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<PutSigningProfileRequest> request = null;<NEW_LINE>Response<PutSigningProfileResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new PutSigningProfileRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(putSigningProfileRequest));<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, "signer");<NEW_LINE>request.<MASK><NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<PutSigningProfileResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new PutSigningProfileResultJsonUnmarshaller());<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.OPERATION_NAME, "PutSigningProfile");
1,635,524
private ProducerImpl.OpSendMsg createOpSendMsg(KeyedBatch keyedBatch) throws IOException {<NEW_LINE>ByteBuf encryptedPayload = producer.encryptMessage(keyedBatch.messageMetadata, keyedBatch.getCompressedBatchMetadataAndPayload());<NEW_LINE>if (encryptedPayload.readableBytes() > ClientCnx.getMaxMessageSize()) {<NEW_LINE>keyedBatch.discard(new PulsarClientException.InvalidMessageException("Message size is bigger than " + ClientCnx.getMaxMessageSize() + " bytes"));<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>final int numMessagesInBatch = keyedBatch.messages.size();<NEW_LINE>long currentBatchSizeBytes = 0;<NEW_LINE>for (MessageImpl<?> message : keyedBatch.messages) {<NEW_LINE>currentBatchSizeBytes += message.getDataBuffer().readableBytes();<NEW_LINE>}<NEW_LINE>keyedBatch.messageMetadata.setNumMessagesInBatch(numMessagesInBatch);<NEW_LINE>if (currentTxnidMostBits != -1) {<NEW_LINE>keyedBatch.messageMetadata.setTxnidMostBits(currentTxnidMostBits);<NEW_LINE>}<NEW_LINE>if (currentTxnidLeastBits != -1) {<NEW_LINE>keyedBatch.messageMetadata.setTxnidLeastBits(currentTxnidLeastBits);<NEW_LINE>}<NEW_LINE>ByteBufPair cmd = producer.sendMessage(producer.producerId, keyedBatch.sequenceId, numMessagesInBatch, keyedBatch.messageMetadata, encryptedPayload);<NEW_LINE>ProducerImpl.OpSendMsg op = ProducerImpl.OpSendMsg.create(keyedBatch.messages, cmd, <MASK><NEW_LINE>op.setNumMessagesInBatch(numMessagesInBatch);<NEW_LINE>op.setBatchSizeByte(currentBatchSizeBytes);<NEW_LINE>return op;<NEW_LINE>}
keyedBatch.sequenceId, keyedBatch.firstCallback);
788,182
public void beforePreCap(InvokeChainContext context, Object[] args) {<NEW_LINE>String clazz = "com.lambdaworks.redis.RedisAsyncConnectionImpl";<NEW_LINE>int num = -1;<NEW_LINE>StackTraceElement[] stacktrace = Thread.currentThread().getStackTrace();<NEW_LINE>for (int i = 0; i < stacktrace.length; i++) {<NEW_LINE>if (stacktrace[i].getClassName().equals(clazz) && stacktrace.length >= i + 1 && !stacktrace[i + 1].getClassName().equals(clazz)) {<NEW_LINE>num = i;<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>StackTraceElement a = stacktrace[num + 1];<NEW_LINE>if (a.getClassName().equals("sun.reflect.NativeMethodAccessorImpl")) {<NEW_LINE>context.put(InvokeChainConstants.CLIENT_IT_KEY, DataConvertHelper.toInt(System.getProperty("com.creditease.uav.invokechain.code.redis.lettuce.key.1"), 0));<NEW_LINE>context.put(InvokeChainConstants.CLIENT_IT_CLASS, System.getProperty("com.creditease.uav.invokechain.code.redis.lettuce.class.1"));<NEW_LINE>} else {<NEW_LINE>context.put(InvokeChainConstants.CLIENT_IT_KEY, DataConvertHelper.toInt(System.<MASK><NEW_LINE>context.put(InvokeChainConstants.CLIENT_IT_CLASS, System.getProperty("com.creditease.uav.invokechain.code.redis.lettuce.class.2"));<NEW_LINE>}<NEW_LINE>}
getProperty("com.creditease.uav.invokechain.code.redis.lettuce.key.2"), 0));
287,656
public Object launch(String[] args, String classpath, Method method) throws Exception {<NEW_LINE>if (!ArkConfigs.isEmbedEnable()) {<NEW_LINE>JarFile.registerUrlProtocolHandler();<NEW_LINE>}<NEW_LINE>ClassLoader classLoader = createContainerClassLoader(getContainerArchive());<NEW_LINE>List<String> attachArgs = new ArrayList<>();<NEW_LINE>attachArgs.add(String.format("%s%s=%s", CommandArgument.ARK_CONTAINER_ARGUMENTS_MARK, CommandArgument.CLASSPATH_ARGUMENT_KEY, classpath));<NEW_LINE>attachArgs.add(String.format("%s%s=%s", CommandArgument.ARK_BIZ_ARGUMENTS_MARK, CommandArgument.ENTRY_CLASS_NAME_ARGUMENT_KEY, method.getDeclaringClass().getName()));<NEW_LINE>attachArgs.add(String.format("%s%s=%s", CommandArgument.ARK_BIZ_ARGUMENTS_MARK, CommandArgument.ENTRY_METHOD_NAME_ARGUMENT_KEY<MASK><NEW_LINE>attachArgs.addAll(Arrays.asList(args));<NEW_LINE>return launch(attachArgs.toArray(new String[attachArgs.size()]), getMainClass(), classLoader);<NEW_LINE>}
, method.getName()));
1,772,482
public TextBlock asBig(final TextBlock title, final HorizontalAlignment labelAlignment, final TextBlock stereotype, final double width, final double height, final SymbolContext symbolContext, final HorizontalAlignment stereoAlignment) {<NEW_LINE>return new AbstractTextBlock() {<NEW_LINE><NEW_LINE>public void drawU(UGraphic ug) {<NEW_LINE>final Dimension2D dim = calculateDimension(ug.getStringBounder());<NEW_LINE>ug = symbolContext.apply(ug);<NEW_LINE>drawRect(ug, dim.getWidth(), dim.getHeight(), symbolContext.getDeltaShadow(), symbolContext.getRoundCorner(), symbolContext.getDiagonalCorner());<NEW_LINE>final Dimension2D dimStereo = stereotype.calculateDimension(ug.getStringBounder());<NEW_LINE>final double posStereoX;<NEW_LINE>final double posStereoY;<NEW_LINE>if (stereoAlignment == HorizontalAlignment.RIGHT) {<NEW_LINE>posStereoX = width - dimStereo.getWidth() - getMargin().getX1() / 2;<NEW_LINE>posStereoY = getMargin().getY1() / 2;<NEW_LINE>} else {<NEW_LINE>posStereoX = (width - <MASK><NEW_LINE>posStereoY = 2;<NEW_LINE>}<NEW_LINE>stereotype.drawU(ug.apply(new UTranslate(posStereoX, posStereoY)));<NEW_LINE>final Dimension2D dimTitle = title.calculateDimension(ug.getStringBounder());<NEW_LINE>final double posTitle;<NEW_LINE>if (labelAlignment == HorizontalAlignment.LEFT)<NEW_LINE>posTitle = 3;<NEW_LINE>else if (labelAlignment == HorizontalAlignment.RIGHT)<NEW_LINE>posTitle = width - dimTitle.getWidth() - 3;<NEW_LINE>else<NEW_LINE>posTitle = (width - dimTitle.getWidth()) / 2;<NEW_LINE>title.drawU(ug.apply(new UTranslate(posTitle, 2 + dimStereo.getHeight())));<NEW_LINE>}<NEW_LINE><NEW_LINE>public Dimension2D calculateDimension(StringBounder stringBounder) {<NEW_LINE>return new Dimension2DDouble(width, height);<NEW_LINE>}<NEW_LINE>};<NEW_LINE>}
dimStereo.getWidth()) / 2;
370,955
public List<String> idToIpLookup(List<String> nodeIds) {<NEW_LINE>log.info("Asked IDs -> IPs for: [%s]", String.join(",", nodeIds));<NEW_LINE>if (nodeIds.isEmpty()) {<NEW_LINE>return new ArrayList<>();<NEW_LINE>}<NEW_LINE>final String project = envConfig.getProjectId();<NEW_LINE>final String zone = envConfig.getZoneName();<NEW_LINE>try {<NEW_LINE>Compute computeService = createComputeService();<NEW_LINE>Compute.Instances.List request = computeService.instances().list(project, zone);<NEW_LINE>request.setFilter(GceUtils<MASK><NEW_LINE>List<String> instanceIps = new ArrayList<>();<NEW_LINE>InstanceList response;<NEW_LINE>do {<NEW_LINE>response = request.execute();<NEW_LINE>if (response.getItems() == null) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>for (Instance instance : response.getItems()) {<NEW_LINE>// Assuming that every server has at least one network interface...<NEW_LINE>String ip = instance.getNetworkInterfaces().get(0).getNetworkIP();<NEW_LINE>// ...even though some IPs are reported as null on the spot but later they are ok,<NEW_LINE>// so we skip the ones that are null. fear not, they are picked up later this just<NEW_LINE>// prevents to have a machine called 'null' around which makes the caller wait for<NEW_LINE>// it for maxScalingDuration time before doing anything else<NEW_LINE>if (ip != null && !"null".equals(ip)) {<NEW_LINE>instanceIps.add(ip);<NEW_LINE>} else {<NEW_LINE>// log and skip it<NEW_LINE>log.warn("Call returned null IP for %s, skipping", instance.getName());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>request.setPageToken(response.getNextPageToken());<NEW_LINE>} while (response.getNextPageToken() != null);<NEW_LINE>return instanceIps;<NEW_LINE>} catch (Exception e) {<NEW_LINE>log.error(e, "Unable to convert IDs to IPs.");<NEW_LINE>}<NEW_LINE>return new ArrayList<>();<NEW_LINE>}
.buildFilter(nodeIds, "name"));
3,635
public static void resolveSymbolMetaData(Type type, Symbol symbol) {<NEW_LINE>ModuleID moduleID = symbol.getModule().isPresent() ? symbol.getModule().get().id() : null;<NEW_LINE>if (moduleID != null) {<NEW_LINE>type.moduleName = moduleID.moduleName();<NEW_LINE>type<MASK><NEW_LINE>type.version = moduleID.version();<NEW_LINE>} else {<NEW_LINE>type.moduleName = "UNK_MOD";<NEW_LINE>type.orgName = "UNK_ORG";<NEW_LINE>type.version = "UNK_VER";<NEW_LINE>}<NEW_LINE>if (symbol instanceof TypeReferenceTypeSymbol) {<NEW_LINE>TypeReferenceTypeSymbol typeSymbol = (TypeReferenceTypeSymbol) symbol;<NEW_LINE>if (typeSymbol.definition().kind().equals(SymbolKind.ENUM)) {<NEW_LINE>type.category = "enums";<NEW_LINE>} else if (typeSymbol.typeDescriptor() != null) {<NEW_LINE>type.category = getTypeCategory(typeSymbol.typeDescriptor());<NEW_LINE>}<NEW_LINE>} else if (symbol instanceof ConstantSymbol) {<NEW_LINE>type.category = "constants";<NEW_LINE>} else if (symbol instanceof VariableSymbol) {<NEW_LINE>VariableSymbol variableSymbol = (VariableSymbol) symbol;<NEW_LINE>if (variableSymbol.typeDescriptor() != null) {<NEW_LINE>type.category = getTypeCategory(variableSymbol.typeDescriptor());<NEW_LINE>}<NEW_LINE>} else if (symbol instanceof TypeDefinitionSymbol) {<NEW_LINE>TypeDefinitionSymbol typeDefSymbol = (TypeDefinitionSymbol) symbol;<NEW_LINE>if (typeDefSymbol.typeDescriptor() != null) {<NEW_LINE>type.category = getTypeCategory(typeDefSymbol.typeDescriptor());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (type.category.equals(CATEGORY_NOT_FOUND)) {<NEW_LINE>type.generateUserDefinedTypeLink = false;<NEW_LINE>}<NEW_LINE>}
.orgName = moduleID.orgName();
190,627
public UpdateNetworkSettingsResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>UpdateNetworkSettingsResult updateNetworkSettingsResult = new UpdateNetworkSettingsResult();<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 updateNetworkSettingsResult;<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("networkSettings", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>updateNetworkSettingsResult.setNetworkSettings(NetworkSettingsJsonUnmarshaller.getInstance().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 updateNetworkSettingsResult;<NEW_LINE>}
String currentParentElement = context.getCurrentParentElement();
188,620
public Object[] next() {<NEW_LINE>if (!hasNext()) {<NEW_LINE>throw new NoSuchElementException();<NEW_LINE>}<NEW_LINE>if (i == pEnd) {<NEW_LINE>pStart = i;<NEW_LINE>idxInPartition = 0;<NEW_LINE>pEnd = findFirstNonPeer(sortedRows, pStart, end, cmpPartitionBy);<NEW_LINE>}<NEW_LINE>int wBegin = computeFrameStart.apply(pStart, pEnd, i, sortedRows);<NEW_LINE>int wEnd = computeFrameEnd.apply(pStart, pEnd, i, sortedRows);<NEW_LINE>frame.updateBounds(<MASK><NEW_LINE>final Object[] row = computeAndInjectResults(sortedRows, numCellsInSourceRow, windowFunctions, frame, i, idxInPartition, argsExpressions, ignoreNulls, args);<NEW_LINE>if (isTraceEnabled) {<NEW_LINE>LOGGER.trace("idx={} idxInPartition={} pStart={} pEnd={} wBegin={} wEnd={} row={}", i, idxInPartition, pStart, pEnd, wBegin, wEnd, Arrays.toString(sortedRows.get(i)));<NEW_LINE>}<NEW_LINE>i++;<NEW_LINE>idxInPartition++;<NEW_LINE>return row;<NEW_LINE>}
pStart, pEnd, wBegin, wEnd);
981,210
protected Query[] prepareQueries() throws Exception {<NEW_LINE>final int maxQueries = config.get("query.file.maxQueries", 1000);<NEW_LINE>Config srcConfig = <MASK><NEW_LINE>srcConfig.set("docs.file", config.get("query.file", null));<NEW_LINE>srcConfig.set("line.parser", config.get("query.file.line.parser", null));<NEW_LINE>srcConfig.set("content.source.forever", "false");<NEW_LINE>List<Query> queries = new ArrayList<>();<NEW_LINE>LineDocSource src = new LineDocSource();<NEW_LINE>try {<NEW_LINE>src.setConfig(srcConfig);<NEW_LINE>src.resetInputs();<NEW_LINE>DocData docData = new DocData();<NEW_LINE>for (int i = 0; i < maxQueries; i++) {<NEW_LINE>docData = src.getNextDocData(docData);<NEW_LINE>Shape shape = SpatialDocMaker.makeShapeFromString(strategy, docData.getName(), docData.getBody());<NEW_LINE>if (shape != null) {<NEW_LINE>shape = shapeConverter.convert(shape);<NEW_LINE>queries.add(makeQueryFromShape(shape));<NEW_LINE>} else {<NEW_LINE>// skip<NEW_LINE>i--;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} catch (@SuppressWarnings("unused") NoMoreDataException e) {<NEW_LINE>// all-done<NEW_LINE>} finally {<NEW_LINE>src.close();<NEW_LINE>}<NEW_LINE>return queries.toArray(new Query[queries.size()]);<NEW_LINE>}
new Config(new Properties());
1,062,992
private void parseSocksProxyOptions() {<NEW_LINE>String <MASK><NEW_LINE>int port;<NEW_LINE>String version;<NEW_LINE>boolean useDns = getBoolean(SOCKS_PROXY_DNS_KEY, DEFAULT_SOCKS_PROXY.isUseDns());<NEW_LINE>if (host != null && !host.isEmpty()) {<NEW_LINE>port = parseSocksPort(System.getProperty("socksProxyPort"));<NEW_LINE>version = System.getProperty("socksProxyVersion");<NEW_LINE>useSocksProxy = true;<NEW_LINE>} else {<NEW_LINE>host = getString(SOCKS_PROXY_HOST_KEY, DEFAULT_SOCKS_PROXY.getHost());<NEW_LINE>port = parseSocksPort(getConfig().getString(SOCKS_PROXY_PORT_KEY));<NEW_LINE>version = getString(SOCKS_PROXY_VERSION_KEY, String.valueOf(DEFAULT_SOCKS_PROXY.getVersion().number()));<NEW_LINE>useSocksProxy = getBoolean(USE_SOCKS_PROXY_KEY, false);<NEW_LINE>}<NEW_LINE>socksProxy = new SocksProxy(host, port, SocksProxy.Version.from(version), useDns);<NEW_LINE>if (useSocksProxy) {<NEW_LINE>apply(socksProxy);<NEW_LINE>}<NEW_LINE>socksProxyPasswordAuth = new PasswordAuthentication(getString(SOCKS_PROXY_USERNAME_KEY, ""), getString(SOCKS_PROXY_PASSWORD_KEY, "").toCharArray());<NEW_LINE>}
host = System.getProperty("socksProxyHost");
411,231
public static Map<MD5Key, Asset> findAllAssetsNotInRepositories(List<String> repos) {<NEW_LINE>// For performance reasons, we calculate the size of the Set in advance...<NEW_LINE>int size = 0;<NEW_LINE>for (String repo : repos) {<NEW_LINE>size += assetLoader.getRepositoryMap(repo).size();<NEW_LINE>}<NEW_LINE>// Now create the aggregate of all repositories.<NEW_LINE>Set<MD5Key> aggregate <MASK><NEW_LINE>for (String repo : repos) {<NEW_LINE>for (String key : assetLoader.getRepositoryMap(repo).keySet()) {<NEW_LINE>aggregate.add(new MD5Key(key));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>Map<MD5Key, Asset> missing = new HashMap<MD5Key, Asset>(Math.min(assetMap.size(), aggregate.size()));<NEW_LINE>for (var entry : assetMap.entrySet()) {<NEW_LINE>if (// Not in any repository so add it.<NEW_LINE>aggregate.contains(entry.getKey()) == false)<NEW_LINE>missing.put(entry.getKey(), entry.getValue());<NEW_LINE>}<NEW_LINE>return missing;<NEW_LINE>}
= new HashSet<>(size);