idx
int32
46
1.86M
input
stringlengths
321
6.6k
target
stringlengths
9
1.24k
506,990
// NB: this method is generally copied from MapProxySupport#invokePutAllOperation<NEW_LINE>private InternalCompletableFuture<Void> invokePutAllOperation(Address address, List<Integer> memberPartitions, MapEntries[] entriesPerPartition) {<NEW_LINE>int size = memberPartitions.size();<NEW_LINE>int[] partitions = new int[size];<NEW_LINE>int index = 0;<NEW_LINE>for (Integer partitionId : memberPartitions) {<NEW_LINE>if (entriesPerPartition[partitionId] != null) {<NEW_LINE>partitions[index++] = partitionId;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (index == 0) {<NEW_LINE>return newCompletedFuture(null);<NEW_LINE>}<NEW_LINE>// trim partition array to real size<NEW_LINE>if (index < size) {<NEW_LINE>partitions = Arrays.copyOf(partitions, index);<NEW_LINE>size = index;<NEW_LINE>}<NEW_LINE>index = 0;<NEW_LINE>MapEntries[] entries = new MapEntries[size];<NEW_LINE>long totalSize = 0;<NEW_LINE>for (int partitionId : partitions) {<NEW_LINE>totalSize += entriesPerPartition[partitionId].size();<NEW_LINE>entries[index++] = entriesPerPartition[partitionId];<NEW_LINE>entriesPerPartition[partitionId] = null;<NEW_LINE>}<NEW_LINE>if (totalSize == 0) {<NEW_LINE>return newCompletedFuture(null);<NEW_LINE>}<NEW_LINE>OperationFactory factory = new MultiMapPutAllOperationFactory(name, partitions, entries);<NEW_LINE>long startTimeNanos = System.nanoTime();<NEW_LINE>CompletableFuture<Map<Integer, Object>> future = operationService.invokeOnPartitionsAsync(MultiMapService.SERVICE_NAME, factory, singletonMap(address, asIntegerList(partitions)));<NEW_LINE>InternalCompletableFuture<Void> resultFuture = new InternalCompletableFuture<>();<NEW_LINE>long finalTotalSize = totalSize;<NEW_LINE>future.whenCompleteAsync((response, t) -> {<NEW_LINE>if (t == null) {<NEW_LINE>getService().getLocalMultiMapStatsImpl(name).incrementPutLatencyNanos(finalTotalSize, <MASK><NEW_LINE>resultFuture.complete(null);<NEW_LINE>} else {<NEW_LINE>resultFuture.completeExceptionally(t);<NEW_LINE>}<NEW_LINE>}, CALLER_RUNS);<NEW_LINE>return resultFuture;<NEW_LINE>}
System.nanoTime() - startTimeNanos);
1,596,117
public boolean validateZipFile() {<NEW_LINE>String tempdir = getBackupTempFilePath();<NEW_LINE>if (starterZip == null || !starterZip.exists()) {<NEW_LINE>throw new DotStateException("Starter.zip does not exist:" + starterZip);<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>deleteTempFiles();<NEW_LINE>File ftempDir = new File(tempdir);<NEW_LINE>ftempDir.mkdirs();<NEW_LINE>File tempZip = new File(tempdir + File.separator + starterZip.getName());<NEW_LINE>tempZip.createNewFile();<NEW_LINE>try (final ReadableByteChannel inputChannel = Channels.newChannel(Files.newInputStream(starterZip.toPath()));<NEW_LINE>final WritableByteChannel outputChannel = Channels.newChannel(Files.newOutputStream(tempZip.toPath()))) {<NEW_LINE>FileUtil.fastCopyUsingNio(inputChannel, outputChannel);<NEW_LINE>}<NEW_LINE>if (starterZip != null && starterZip.getName().toLowerCase().endsWith(".zip")) {<NEW_LINE>ZipFile z = new ZipFile(starterZip);<NEW_LINE>ZipUtil.extract(<MASK><NEW_LINE>}<NEW_LINE>return true;<NEW_LINE>} catch (Exception e) {<NEW_LINE>throw new DotStateException("Starter.zip invalid:" + e.getMessage(), e);<NEW_LINE>}<NEW_LINE>}
z, new File(backupTempFilePath));
1,555,036
public void mouseDragged(final MouseEvent me) {<NEW_LINE>if (!armed)<NEW_LINE>return;<NEW_LINE>switch(zoomType) {<NEW_LINE>case RUBBERBAND_ZOOM:<NEW_LINE>// Treat rubberband zoom on axis like horiz/vert. zoom<NEW_LINE>if (isHorizontal())<NEW_LINE>end = new Point(me.getLocation().x, bounds.y + bounds.height);<NEW_LINE>else<NEW_LINE>end = new Point(bounds.x + bounds.width, me.getLocation().y);<NEW_LINE>break;<NEW_LINE>case HORIZONTAL_ZOOM:<NEW_LINE>end = new Point(me.getLocation().x, <MASK><NEW_LINE>break;<NEW_LINE>case VERTICAL_ZOOM:<NEW_LINE>end = new Point(bounds.x + bounds.width, me.getLocation().y);<NEW_LINE>break;<NEW_LINE>case PANNING:<NEW_LINE>end = me.getLocation();<NEW_LINE>pan();<NEW_LINE>break;<NEW_LINE>default:<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>Axis.this.repaint();<NEW_LINE>}
bounds.y + bounds.height);
1,127,648
private void layout() {<NEW_LINE>height = 0;<NEW_LINE>selectedValueCpu = 0;<NEW_LINE>selectedValueGpu = 0;<NEW_LINE>rootLine.layout(0);<NEW_LINE>frameTimeValue.setText(df.format(getMsFromNs(prof.getAverageFrameTime())) + "ms");<NEW_LINE>frameTimeValue.setLocalTranslation(PANEL_WIDTH / 2, -PADDING, 0);<NEW_LINE>setColor(frameTimeValue, prof.getAverageFrameTime(<MASK><NEW_LINE>frameCpuTimeValue.setText(df.format(getMsFromNs(totalTimeCpu)) + "ms");<NEW_LINE>frameCpuTimeValue.setLocalTranslation(new Vector3f(PANEL_WIDTH / 4 - bigFont.getLineWidth(frameCpuTimeValue.getText()) / 2, -PADDING - 50, 0));<NEW_LINE>setColor(frameCpuTimeValue, totalTimeCpu, totalTimeCpu, false, false);<NEW_LINE>frameGpuTimeValue.setText(df.format(getMsFromNs(totalTimeGpu)) + "ms");<NEW_LINE>frameGpuTimeValue.setLocalTranslation(new Vector3f(3 * PANEL_WIDTH / 4 - bigFont.getLineWidth(frameGpuTimeValue.getText()) / 2, -PADDING - 50, 0));<NEW_LINE>setColor(frameGpuTimeValue, totalTimeGpu, totalTimeGpu, false, false);<NEW_LINE>selectedField.setText("Selected: " + df.format(getMsFromNs(selectedValueCpu)) + "ms / " + df.format(getMsFromNs(selectedValueGpu)) + "ms");<NEW_LINE>selectedField.setLocalTranslation(3 * PANEL_WIDTH / 4 - font.getLineWidth(selectedField.getText()) / 2, -PADDING - 75, 0);<NEW_LINE>}
), totalTimeCpu, false, false);
1,512,447
public void removeNodeUnsafeRecursive(final String path, final Callback<None> callback) {<NEW_LINE>final ZooKeeper zk = zk();<NEW_LINE>final Callback<None> deleteThisNodeCallback = new Callback<None>() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void onSuccess(None none) {<NEW_LINE>removeNodeUnsafe(path, callback);<NEW_LINE>}<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void onError(Throwable e) {<NEW_LINE>callback.onError(e);<NEW_LINE>}<NEW_LINE>};<NEW_LINE>// Note ChildrenCallback is compatible with a ZK 3.2 server; Children2Callback is<NEW_LINE>// compatible only with ZK 3.3+ server.<NEW_LINE>final AsyncCallback.ChildrenCallback childCallback = new AsyncCallback.ChildrenCallback() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void processResult(int rc, String path, Object ctx, List<String> children) {<NEW_LINE>KeeperException.Code code = <MASK><NEW_LINE>switch(code) {<NEW_LINE>case OK:<NEW_LINE>Callback<None> multiCallback = Callbacks.countDown(deleteThisNodeCallback, children.size());<NEW_LINE>for (String child : children) {<NEW_LINE>removeNodeUnsafeRecursive(path + "/" + child, multiCallback);<NEW_LINE>}<NEW_LINE>break;<NEW_LINE>default:<NEW_LINE>callback.onError(KeeperException.create(code));<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>};<NEW_LINE>try {<NEW_LINE>// Note that in the case where the path is a symlink, we want to call getChildren() directly on the<NEW_LINE>// symlink znode rather than the znode the symlink points to. To avoid such unnecessary re-routing,<NEW_LINE>// we should explicitly call zk.rawGetChildren() if the underlying zookeeper client is SymlinkAwareZooKeeper.<NEW_LINE>if (zk instanceof SymlinkAwareZooKeeper) {<NEW_LINE>((SymlinkAwareZooKeeper) zk).rawGetChildren(path, false, childCallback, null);<NEW_LINE>} else {<NEW_LINE>zk.getChildren(path, false, childCallback, null);<NEW_LINE>}<NEW_LINE>} catch (Exception e) {<NEW_LINE>callback.onError(e);<NEW_LINE>}<NEW_LINE>}
KeeperException.Code.get(rc);
1,679,836
protected Mono<HttpClientResponse> doRequest(final ServerWebExchange exchange, final String httpMethod, final URI uri, final HttpHeaders httpHeaders, final Flux<DataBuffer> body) {<NEW_LINE>return Mono.from(httpClient.headers(headers -> httpHeaders.forEach(headers::add)).request(HttpMethod.valueOf(httpMethod)).uri(uri.toASCIIString()).send((req, nettyOutbound) -> nettyOutbound.send(body.map(dataBuffer -> ((NettyDataBuffer) dataBuffer).getNativeBuffer()))).responseConnection((res, connection) -> {<NEW_LINE>exchange.getAttributes().put(Constants.CLIENT_RESPONSE_ATTR, res);<NEW_LINE>exchange.getAttributes().put(Constants.CLIENT_RESPONSE_CONN_ATTR, connection);<NEW_LINE>ServerHttpResponse response = exchange.getResponse();<NEW_LINE>HttpHeaders headers = new HttpHeaders();<NEW_LINE>res.responseHeaders().forEach(entry -> headers.add(entry.getKey(), entry.getValue()));<NEW_LINE>String contentTypeValue = headers.getFirst(HttpHeaders.CONTENT_TYPE);<NEW_LINE>if (StringUtils.isNotBlank(contentTypeValue)) {<NEW_LINE>exchange.getAttributes().put(Constants.ORIGINAL_RESPONSE_CONTENT_TYPE_ATTR, contentTypeValue);<NEW_LINE>}<NEW_LINE>HttpStatus status = HttpStatus.resolve(res.status().code());<NEW_LINE>if (status != null) {<NEW_LINE>response.setStatusCode(status);<NEW_LINE>} else if (response instanceof AbstractServerHttpResponse) {<NEW_LINE>response.setRawStatusCode(res.status().code());<NEW_LINE>} else {<NEW_LINE>throw new IllegalStateException("Unable to set status code on response: " + res.status().code() + ", " + response.getClass());<NEW_LINE>}<NEW_LINE>response.<MASK><NEW_LINE>return Mono.just(res);<NEW_LINE>}));<NEW_LINE>}
getHeaders().putAll(headers);
1,454,377
public void serialise(DataOutputStream os) throws IOException {<NEW_LINE>super.serialise(os);<NEW_LINE>if (getProtocolVersion() >= DHTTransportUDP.PROTOCOL_VERSION_DIV_AND_CONT) {<NEW_LINE>os.writeBoolean(has_continuation);<NEW_LINE>}<NEW_LINE>os.writeBoolean(values != null);<NEW_LINE>if (values == null) {<NEW_LINE>DHTUDPUtils.serialiseContacts(os, contacts);<NEW_LINE>if (getProtocolVersion() >= DHTTransportUDP.PROTOCOL_VERSION_VIVALDI_FINDVALUE) {<NEW_LINE>DHTUDPUtils.serialiseVivaldi(this, os);<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>if (getProtocolVersion() >= DHTTransportUDP.PROTOCOL_VERSION_DIV_AND_CONT) {<NEW_LINE>os.writeByte(diversification_type);<NEW_LINE>}<NEW_LINE>// values returned to a caller are adjusted by - skew<NEW_LINE>try {<NEW_LINE>DHTUDPUtils.serialiseTransportValues(this, os<MASK><NEW_LINE>} catch (DHTTransportException e) {<NEW_LINE>throw (new IOException(e.getMessage()));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
, values, -getClockSkew());
1,245,778
public static void vertical11(Kernel1D_S32 kernel, GrayS16 input, GrayI16 output, int skip, int divisor) {<NEW_LINE>final short[] dataSrc = input.data;<NEW_LINE>final short[] dataDst = output.data;<NEW_LINE>final int k1 = kernel.data[0];<NEW_LINE>final int k2 = kernel.data[1];<NEW_LINE>final int k3 = kernel.data[2];<NEW_LINE>final int k4 = kernel.data[3];<NEW_LINE>final int k5 = kernel.data[4];<NEW_LINE>final int k6 = kernel.data[5];<NEW_LINE>final int k7 = kernel.data[6];<NEW_LINE>final int k8 = kernel.data[7];<NEW_LINE>final int k9 = kernel.data[8];<NEW_LINE>final int k10 = kernel.data[9];<NEW_LINE>final int <MASK><NEW_LINE>final int radius = kernel.getRadius();<NEW_LINE>final int width = input.width;<NEW_LINE>final int heightEnd = UtilDownConvolve.computeMaxSide(input.height, skip, radius);<NEW_LINE>int halfDivisor = divisor / 2;<NEW_LINE>final int offsetY = UtilDownConvolve.computeOffset(skip, radius);<NEW_LINE>for (int y = offsetY; y <= heightEnd; y += skip) {<NEW_LINE>int indexDst = output.startIndex + (y / skip) * output.stride;<NEW_LINE>int i = input.startIndex + (y - radius) * input.stride;<NEW_LINE>final int iEnd = i + width;<NEW_LINE>for (; i < iEnd; i++) {<NEW_LINE>int indexSrc = i;<NEW_LINE>int total = (dataSrc[indexSrc]) * k1;<NEW_LINE>indexSrc += input.stride;<NEW_LINE>total += (dataSrc[indexSrc]) * k2;<NEW_LINE>indexSrc += input.stride;<NEW_LINE>total += (dataSrc[indexSrc]) * k3;<NEW_LINE>indexSrc += input.stride;<NEW_LINE>total += (dataSrc[indexSrc]) * k4;<NEW_LINE>indexSrc += input.stride;<NEW_LINE>total += (dataSrc[indexSrc]) * k5;<NEW_LINE>indexSrc += input.stride;<NEW_LINE>total += (dataSrc[indexSrc]) * k6;<NEW_LINE>indexSrc += input.stride;<NEW_LINE>total += (dataSrc[indexSrc]) * k7;<NEW_LINE>indexSrc += input.stride;<NEW_LINE>total += (dataSrc[indexSrc]) * k8;<NEW_LINE>indexSrc += input.stride;<NEW_LINE>total += (dataSrc[indexSrc]) * k9;<NEW_LINE>indexSrc += input.stride;<NEW_LINE>total += (dataSrc[indexSrc]) * k10;<NEW_LINE>indexSrc += input.stride;<NEW_LINE>total += (dataSrc[indexSrc]) * k11;<NEW_LINE>dataDst[indexDst++] = (short) ((total + halfDivisor) / divisor);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
k11 = kernel.data[10];
898,325
final UpdatePackageVersionsStatusResult executeUpdatePackageVersionsStatus(UpdatePackageVersionsStatusRequest updatePackageVersionsStatusRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(updatePackageVersionsStatusRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<UpdatePackageVersionsStatusRequest> request = null;<NEW_LINE>Response<UpdatePackageVersionsStatusResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new UpdatePackageVersionsStatusRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(updatePackageVersionsStatusRequest));<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, "codeartifact");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "UpdatePackageVersionsStatus");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<UpdatePackageVersionsStatusResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new UpdatePackageVersionsStatusResultJsonUnmarshaller());<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());
27,426
public QrCode signTxRequest(SignTxRequest request) throws WriterException {<NEW_LINE>Service.CommandRequest.SignTxRequest.Builder signTxBuilder = Service.CommandRequest.SignTxRequest.newBuilder();<NEW_LINE>for (SignTxRequest.Input input : request.inputs) {<NEW_LINE>signTxBuilder.addInputs(Common.TxInput.newBuilder().setPrevHash(ByteString.copyFrom(Hex.decode(input.prevHash))).setPrevIndex(input.prevIndex).setAmount(input.amount).setPath(Common.Path.newBuilder().setIsChange(input.change).setIndex(input.index)));<NEW_LINE>}<NEW_LINE>for (SignTxRequest.Output output : request.outputs) {<NEW_LINE>Common.Destination destination;<NEW_LINE>switch(output.destination) {<NEW_LINE>case "Gateway":<NEW_LINE>destination = Common.Destination.GATEWAY;<NEW_LINE>break;<NEW_LINE>case "Change":<NEW_LINE>destination = Common.Destination.CHANGE;<NEW_LINE>break;<NEW_LINE>default:<NEW_LINE>throw new IllegalArgumentException(format("expecting Gateway or Change, got %s", output.destination));<NEW_LINE>}<NEW_LINE>signTxBuilder.addOutputs(Common.TxOutput.newBuilder().setDestination(destination).setAmount(output.amount).setPath(Common.Path.newBuilder().setIsChange(destination == Common.Destination.CHANGE).setIndex(output.index)));<NEW_LINE>}<NEW_LINE>// don't set the locktime below to trigger REQUIRED_FIELDS_NOT_PRESENT.<NEW_LINE>// This helped in generating valid-negative_required_fields_not_present vector.<NEW_LINE>signTxBuilder.setLockTime(request.lockTime);<NEW_LINE><MASK><NEW_LINE>signTxBuilder.setLocalRate(request.rate);<NEW_LINE>Service.CommandRequest.Builder builder = Service.CommandRequest.newBuilder();<NEW_LINE>builder.setWalletId(request.wallet);<NEW_LINE>builder.setSignTx(signTxBuilder);<NEW_LINE>byte[] command_bytes = builder.build().toByteArray();<NEW_LINE>// Sign with a known dev key. This is for testing only.<NEW_LINE>// This needs to be in sync with the public key(QR_PUBKEY) in config.h on the<NEW_LINE>// subzero core side.<NEW_LINE>QrSigner signer = new QrSigner(Hex.decode("3d9b97530af1d91e1d818c9498d8a53d9b97530af1d91e1d818c9498d8a59fe3"));<NEW_LINE>byte[] signature = signer.sign(command_bytes);<NEW_LINE>// flip bits to get an invalid sig and trigger QRSIG_CHECK_FAILED<NEW_LINE>// This generates negative_bad_qrsignature vector.<NEW_LINE>// signature[63] = (byte) ((Byte.toUnsignedInt(signature[63])) ^ 0xFF);<NEW_LINE>Common.QrCodeSignature.Builder qrsigbuilder = Common.QrCodeSignature.newBuilder();<NEW_LINE>qrsigbuilder.setSignature(ByteString.copyFrom(signature));<NEW_LINE>builder.setQrsignature(qrsigbuilder.build());<NEW_LINE>builder.setSerializedCommandRequest(ByteString.copyFrom(command_bytes));<NEW_LINE>return generateQrCode(builder);<NEW_LINE>}
signTxBuilder.setLocalCurrency(request.currency);
1,016,046
public void onMatch(RelOptRuleCall call) {<NEW_LINE>Project <MASK><NEW_LINE>DruidQuery query = call.rel(1);<NEW_LINE>final RelOptCluster cluster = project.getCluster();<NEW_LINE>final RexBuilder rexBuilder = cluster.getRexBuilder();<NEW_LINE>if (!DruidQuery.isValidSignature(query.signature() + 'o')) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>Pair<ImmutableMap<String, String>, Boolean> scanned = scanProject(query, project);<NEW_LINE>// Only try to push down Project when there will be Post aggregators in result DruidQuery<NEW_LINE>if (scanned.right) {<NEW_LINE>Pair<Project, Project> splitProjectAggregate = splitProject(rexBuilder, query, project, scanned.left, cluster);<NEW_LINE>Project inner = splitProjectAggregate.left;<NEW_LINE>Project outer = splitProjectAggregate.right;<NEW_LINE>DruidQuery newQuery = DruidQuery.extendQuery(query, inner);<NEW_LINE>// When all project get pushed into DruidQuery, the project can be replaced by DruidQuery.<NEW_LINE>if (outer != null) {<NEW_LINE>Project newProject = outer.copy(outer.getTraitSet(), newQuery, outer.getProjects(), outer.getRowType());<NEW_LINE>call.transformTo(newProject);<NEW_LINE>} else {<NEW_LINE>call.transformTo(newQuery);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
project = call.rel(0);
1,279,423
final DeleteIntegrationResult executeDeleteIntegration(DeleteIntegrationRequest deleteIntegrationRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(deleteIntegrationRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<DeleteIntegrationRequest> request = null;<NEW_LINE>Response<DeleteIntegrationResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new DeleteIntegrationRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(deleteIntegrationRequest));<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, "Customer Profiles");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteIntegration");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<DeleteIntegrationResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeleteIntegrationResultJsonUnmarshaller());<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);
622,155
public SqlFunction build() {<NEW_LINE>// Create "nullableOperands" set including all optional arguments.<NEW_LINE>final IntSet nullableOperands = new IntArraySet();<NEW_LINE>if (requiredOperands != null) {<NEW_LINE>IntStream.range(requiredOperands, operandTypes.size()).forEach(nullableOperands::add);<NEW_LINE>}<NEW_LINE>final SqlOperandTypeChecker theOperandTypeChecker;<NEW_LINE>if (operandTypeChecker == null) {<NEW_LINE>theOperandTypeChecker = new DefaultOperandTypeChecker(operandTypes, requiredOperands == null ? operandTypes.size() : requiredOperands, nullableOperands, literalOperands);<NEW_LINE>} else if (operandTypes == null && requiredOperands == null && literalOperands == null) {<NEW_LINE>theOperandTypeChecker = operandTypeChecker;<NEW_LINE>} else {<NEW_LINE>throw new ISE("Cannot have both 'operandTypeChecker' and 'operandTypes' / 'requiredOperands' / 'literalOperands'");<NEW_LINE>}<NEW_LINE>if (operandTypeInference == null) {<NEW_LINE>SqlOperandTypeInference defaultInference = new DefaultOperandTypeInference(operandTypes, nullableOperands);<NEW_LINE>operandTypeInference = (callBinding, returnType, types) -> {<NEW_LINE>for (int i = 0; i < types.length; i++) {<NEW_LINE>// calcite sql validate tries to do bad things to dynamic parameters if the type is inferred to be a string<NEW_LINE>if (callBinding.operand(i).isA(ImmutableSet.of(SqlKind.DYNAMIC_PARAM))) {<NEW_LINE>types[i] = new BasicSqlType(DruidTypeSystem.INSTANCE, SqlTypeName.ANY);<NEW_LINE>} else {<NEW_LINE>defaultInference.<MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE>};<NEW_LINE>}<NEW_LINE>return new SqlFunction(name, kind, Preconditions.checkNotNull(returnTypeInference, "returnTypeInference"), operandTypeInference, theOperandTypeChecker, functionCategory);<NEW_LINE>}
inferOperandTypes(callBinding, returnType, types);
1,035,817
private void processExecutableElement(String prefix, ExecutableElement element, Stack<TypeElement> seen) {<NEW_LINE>if ((!element.getModifiers().contains(Modifier.PRIVATE)) && (TypeKind.VOID != element.getReturnType().getKind())) {<NEW_LINE>Element returns = this.processingEnv.getTypeUtils().asElement(element.getReturnType());<NEW_LINE>if (returns instanceof TypeElement) {<NEW_LINE>ItemMetadata group = ItemMetadata.newGroup(prefix, this.metadataEnv.getTypeUtils().getQualifiedName(returns), this.metadataEnv.getTypeUtils().getQualifiedName(element.getEnclosingElement()<MASK><NEW_LINE>if (this.metadataCollector.hasSimilarGroup(group)) {<NEW_LINE>this.processingEnv.getMessager().printMessage(Kind.ERROR, "Duplicate @ConfigurationProperties definition for prefix '" + prefix + "'", element);<NEW_LINE>} else {<NEW_LINE>this.metadataCollector.add(group);<NEW_LINE>processTypeElement(prefix, (TypeElement) returns, element, seen);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
), element.toString());
1,363,809
final ListHostedConfigurationVersionsResult executeListHostedConfigurationVersions(ListHostedConfigurationVersionsRequest listHostedConfigurationVersionsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listHostedConfigurationVersionsRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<ListHostedConfigurationVersionsRequest> request = null;<NEW_LINE>Response<ListHostedConfigurationVersionsResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new ListHostedConfigurationVersionsRequestProtocolMarshaller(protocolFactory).marshall<MASK><NEW_LINE>// Binds the request metrics to the current request.<NEW_LINE>request.setAWSRequestMetrics(awsRequestMetrics);<NEW_LINE>request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);<NEW_LINE>request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SERVICE_ID, "AppConfig");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListHostedConfigurationVersions");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<ListHostedConfigurationVersionsResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListHostedConfigurationVersionsResultJsonUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
(super.beforeMarshalling(listHostedConfigurationVersionsRequest));
939,063
void generateSingularMethod(CheckerFrameworkVersion cfv, boolean deprecate, TypeReference returnType, Statement returnStatement, SingularData data, EclipseNode builderType, boolean fluent, AccessLevel access) {<NEW_LINE>LombokImmutableList<String> suffixes = getArgumentSuffixes();<NEW_LINE>char[][] names = new char[<MASK><NEW_LINE>for (int i = 0; i < suffixes.size(); i++) {<NEW_LINE>String s = suffixes.get(i);<NEW_LINE>char[] n = data.getSingularName();<NEW_LINE>names[i] = s.isEmpty() ? n : s.toCharArray();<NEW_LINE>}<NEW_LINE>MethodDeclaration md = new MethodDeclaration(((CompilationUnitDeclaration) builderType.top().get()).compilationResult);<NEW_LINE>md.bits |= ECLIPSE_DO_NOT_TOUCH_FLAG;<NEW_LINE>md.modifiers = toEclipseModifier(access);<NEW_LINE>List<Statement> statements = new ArrayList<Statement>();<NEW_LINE>statements.add(createConstructBuilderVarIfNeeded(data, builderType));<NEW_LINE>FieldReference thisDotField = new FieldReference(data.getPluralName(), 0L);<NEW_LINE>thisDotField.receiver = new ThisReference(0, 0);<NEW_LINE>MessageSend thisDotFieldDotAdd = new MessageSend();<NEW_LINE>thisDotFieldDotAdd.arguments = new Expression[suffixes.size()];<NEW_LINE>for (int i = 0; i < suffixes.size(); i++) {<NEW_LINE>thisDotFieldDotAdd.arguments[i] = new SingleNameReference(names[i], 0L);<NEW_LINE>}<NEW_LINE>thisDotFieldDotAdd.receiver = thisDotField;<NEW_LINE>thisDotFieldDotAdd.selector = getAddMethodName().toCharArray();<NEW_LINE>statements.add(thisDotFieldDotAdd);<NEW_LINE>if (returnStatement != null)<NEW_LINE>statements.add(returnStatement);<NEW_LINE>md.statements = statements.toArray(new Statement[0]);<NEW_LINE>md.arguments = new Argument[suffixes.size()];<NEW_LINE>for (int i = 0; i < suffixes.size(); i++) {<NEW_LINE>TypeReference tr = cloneParamType(i, data.getTypeArgs(), builderType);<NEW_LINE>Annotation[] typeUseAnns = getTypeUseAnnotations(tr);<NEW_LINE>removeTypeUseAnnotations(tr);<NEW_LINE>md.arguments[i] = new Argument(names[i], 0, tr, ClassFileConstants.AccFinal);<NEW_LINE>md.arguments[i].annotations = typeUseAnns;<NEW_LINE>}<NEW_LINE>md.returnType = returnType;<NEW_LINE>addCheckerFrameworkReturnsReceiver(md.returnType, data.getSource(), cfv);<NEW_LINE>char[] prefixedSingularName = data.getSetterPrefix().length == 0 ? data.getSingularName() : HandlerUtil.buildAccessorName(builderType, new String(data.getSetterPrefix()), new String(data.getSingularName())).toCharArray();<NEW_LINE>md.selector = fluent ? prefixedSingularName : HandlerUtil.buildAccessorName(builderType, "add", new String(data.getSingularName())).toCharArray();<NEW_LINE>Annotation[] selfReturnAnnotations = generateSelfReturnAnnotations(deprecate, data.getSource());<NEW_LINE>Annotation[] copyToSetterAnnotations = copyAnnotations(md, findCopyableToBuilderSingularSetterAnnotations(data.getAnnotation().up()));<NEW_LINE>md.annotations = concat(selfReturnAnnotations, copyToSetterAnnotations, Annotation.class);<NEW_LINE>if (returnStatement != null)<NEW_LINE>createRelevantNonNullAnnotation(builderType, md);<NEW_LINE>data.setGeneratedByRecursive(md);<NEW_LINE>HandleNonNull.INSTANCE.fix(injectMethod(builderType, md));<NEW_LINE>}
suffixes.size()][];
1,211,077
private void checkBackAfterSnoozeTime(Context context, long now) {<NEW_LINE>// This is not 100% accurate, need to take in account also the time of when this alert was snoozed.<NEW_LINE>UserNotification userNotification = UserNotification.GetNotificationByType("bg_missed_alerts");<NEW_LINE>if (userNotification == null) {<NEW_LINE>// No active alert exists, should not happen, we have just created it.<NEW_LINE>Log.wtf(TAG, "No active alert exists.");<NEW_LINE>setAlarm(getOtherAlertReraiseSec(context<MASK><NEW_LINE>} else {<NEW_LINE>// we have an alert that should be re-raised on userNotification.timestamp<NEW_LINE>long alarmIn = (long) userNotification.timestamp - now;<NEW_LINE>if (alarmIn < 0) {<NEW_LINE>alarmIn = 0;<NEW_LINE>}<NEW_LINE>setAlarm(alarmIn, true);<NEW_LINE>}<NEW_LINE>}
, "bg_missed_alerts") * 1000, false);
1,568,305
// GEN-LAST:event_btnDefaultActionPerformed<NEW_LINE>private void btnNewActionPerformed(java.awt.event.ActionEvent evt) {<NEW_LINE>// GEN-FIRST:event_btnNewActionPerformed<NEW_LINE>if (newExtensionPanel == null) {<NEW_LINE>newExtensionPanel = new NewExtensionPanel();<NEW_LINE>}<NEW_LINE>newExtensionPanel.setModel(model);<NEW_LINE>// NOI18N<NEW_LINE>DialogDescriptor dd = new DialogDescriptor(newExtensionPanel, NbBundle.getMessage(NewExtensionPanel.class, "NewExtensionPanel.title"));<NEW_LINE>newExtensionPanel.addExtensionListener(dd);<NEW_LINE>DialogDisplayer.getDefault().createDialog(dd).setVisible(true);<NEW_LINE>if (DialogDescriptor.OK_OPTION.equals(dd.getValue())) {<NEW_LINE>newlyAddedExtensions.add(newExtensionPanel.getExtension());<NEW_LINE>fireChanged(null, null);<NEW_LINE>// add new extension to combo box and re-create<NEW_LINE>ArrayList<String> newItems = new ArrayList<String>();<NEW_LINE>for (int i = 0; i < cbExtension.getItemCount(); i++) {<NEW_LINE>newItems.add(cbExtension.getItemAt(i).toString());<NEW_LINE>}<NEW_LINE>if (newItems.remove(chooseExtensionItem)) {<NEW_LINE>// initial hint removed, so enable file types combo box<NEW_LINE>cbType.setEnabled(true);<NEW_LINE>}<NEW_LINE>newItems.add(newExtensionPanel.getExtension());<NEW_LINE>Collections.sort(newItems, String.CASE_INSENSITIVE_ORDER);<NEW_LINE>cbExtension.removeAllItems();<NEW_LINE>for (String item : newItems) {<NEW_LINE>cbExtension.addItem(item);<NEW_LINE>}<NEW_LINE>cbExtension.<MASK><NEW_LINE>}<NEW_LINE>}
setSelectedItem(newExtensionPanel.getExtension());
731,094
public WasmExpression apply(InvocationExpr invocation, WasmIntrinsicManager manager) {<NEW_LINE>switch(invocation.getMethod().getName()) {<NEW_LINE>case "fill":<NEW_LINE>case "fillZero":<NEW_LINE>case "moveMemoryBlock":<NEW_LINE>{<NEW_LINE>MethodReference delegateMethod = new MethodReference(WasmRuntime.class.getName(), invocation.getMethod().getDescriptor());<NEW_LINE>WasmCall call = new WasmCall(manager.getNames().forMethod(delegateMethod));<NEW_LINE>call.getArguments().addAll(invocation.getArguments().stream().map(manager::generate).collect(Collectors.toList()));<NEW_LINE>return call;<NEW_LINE>}<NEW_LINE>case "isInitialized":<NEW_LINE>{<NEW_LINE>WasmExpression pointer = manager.generate(invocation.getArguments().get(0));<NEW_LINE>if (pointer instanceof WasmInt32Constant) {<NEW_LINE>pointer = new WasmInt32Constant(((WasmInt32Constant) pointer<MASK><NEW_LINE>} else {<NEW_LINE>pointer = new WasmIntBinary(WasmIntType.INT32, WasmIntBinaryOperation.ADD, pointer, new WasmInt32Constant(flagsFieldOffset));<NEW_LINE>}<NEW_LINE>WasmExpression flags = new WasmLoadInt32(4, pointer, WasmInt32Subtype.INT32);<NEW_LINE>WasmExpression flag = new WasmIntBinary(WasmIntType.INT32, WasmIntBinaryOperation.AND, flags, new WasmInt32Constant(RuntimeClass.INITIALIZED));<NEW_LINE>return new WasmIntBinary(WasmIntType.INT32, WasmIntBinaryOperation.NE, flag, new WasmInt32Constant(0));<NEW_LINE>}<NEW_LINE>default:<NEW_LINE>throw new IllegalArgumentException(invocation.getMethod().toString());<NEW_LINE>}<NEW_LINE>}
).getValue() + flagsFieldOffset);
685,672
public FunctionRecord createFunctionRecord(long libraryID, FidHashQuad hashQuad, String name, long entryPoint, String domainPath, boolean hasTerminator) throws IOException {<NEW_LINE>DBRecord record = SCHEMA.createRecord(UniversalIdGenerator.nextID().getValue());<NEW_LINE>record.setShortValue(CODE_UNIT_SIZE_COL, hashQuad.getCodeUnitSize());<NEW_LINE>record.setLongValue(FULL_HASH_COL, hashQuad.getFullHash());<NEW_LINE>record.setByteValue(SPECIFIC_HASH_ADDITIONAL_SIZE_COL, hashQuad.getSpecificHashAdditionalSize());<NEW_LINE>record.setLongValue(SPECIFIC_HASH_COL, hashQuad.getSpecificHash());<NEW_LINE>record.setLongValue(LIBRARY_ID_COL, libraryID);<NEW_LINE>long stringID = stringsTable.obtainStringID(name);<NEW_LINE>record.setLongValue(NAME_ID_COL, stringID);<NEW_LINE>record.setLongValue(ENTRY_POINT_COL, entryPoint);<NEW_LINE>stringID = stringsTable.obtainStringID(domainPath);<NEW_LINE><MASK><NEW_LINE>byte flags = (byte) (hasTerminator ? FunctionRecord.HAS_TERMINATOR_FLAG : 0);<NEW_LINE>record.setByteValue(FLAGS_COL, flags);<NEW_LINE>table.putRecord(record);<NEW_LINE>FunctionRecord functionRecord = new FunctionRecord(fidDb, functionCache, record);<NEW_LINE>return functionRecord;<NEW_LINE>}
record.setLongValue(DOMAIN_PATH_ID_COL, stringID);
1,136,727
public static String[] reverseSplit(String string, int numItems, String separator) {<NEW_LINE>final String[] splits = string.split("\\" + separator);<NEW_LINE>Preconditions.checkState(splits.length >= numItems, "There must be at least %s instances of %s (there were %s)", numItems - 1, separator, splits.length - 1);<NEW_LINE>final String[] reverseSplit = new String[numItems];<NEW_LINE>for (int i = 1; i < numItems; i++) {<NEW_LINE>reverseSplit[numItems - i] = splits[splits.length - i];<NEW_LINE>}<NEW_LINE>final StringBuilder lastItemBldr = new StringBuilder();<NEW_LINE>for (int s = 0; s < splits.length - numItems + 1; s++) {<NEW_LINE>lastItemBldr.append(splits[s]);<NEW_LINE>if (s < splits.length - numItems) {<NEW_LINE>lastItemBldr.append(separator);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>reverseSplit[<MASK><NEW_LINE>return reverseSplit;<NEW_LINE>}
0] = lastItemBldr.toString();
1,103,590
public void init(int WindowNo, FormFrame frame) {<NEW_LINE>m_WindowNo = WindowNo;<NEW_LINE>m_frame = frame;<NEW_LINE>log.info("WinNo=" + m_WindowNo + " - AD_Client_ID=" + m_AD_Client_ID + ", AD_Org_ID=" + m_AD_Org_ID + ", By=" + m_by);<NEW_LINE>Env.setContext(Env.getCtx(), m_WindowNo, "IsSOTrx", "N");<NEW_LINE>try {<NEW_LINE>// UI<NEW_LINE>onlyVendor = VLookup.createBPartner(m_WindowNo);<NEW_LINE>onlyProduct = VLookup.createProduct(m_WindowNo);<NEW_LINE>jbInit();<NEW_LINE>//<NEW_LINE>dynInit();<NEW_LINE>frame.getContentPane().<MASK><NEW_LINE>frame.getContentPane().add(statusBar, BorderLayout.SOUTH);<NEW_LINE>//<NEW_LINE>new Thread() {<NEW_LINE><NEW_LINE>public void run() {<NEW_LINE>log.info("Starting ...");<NEW_LINE>MMatchPO.consolidate(Env.getCtx());<NEW_LINE>log.info("... Done");<NEW_LINE>}<NEW_LINE>}.start();<NEW_LINE>} catch (Exception e) {<NEW_LINE>log.log(Level.SEVERE, "", e);<NEW_LINE>}<NEW_LINE>}
add(panel, BorderLayout.CENTER);
1,088,423
public void actionPerformed(final ActionEvent evt, final JTextComponent target) {<NEW_LINE>if (target != null) {<NEW_LINE>if (!target.isEditable() || !target.isEnabled()) {<NEW_LINE>target.getToolkit().beep();<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>final Caret caret = target.getCaret();<NEW_LINE>final BaseDocument doc = Utilities.getDocument(target);<NEW_LINE>doc.runAtomicAsUser(new Runnable() {<NEW_LINE><NEW_LINE>public void run() {<NEW_LINE><MASK><NEW_LINE>try {<NEW_LINE>boolean right = BaseKit.shiftLineRightAction.equals(getValue(Action.NAME));<NEW_LINE>if (Utilities.isSelectionShowing(caret)) {<NEW_LINE>BaseKit.shiftBlock(doc, target.getSelectionStart(), target.getSelectionEnd(), right);<NEW_LINE>} else {<NEW_LINE>BaseKit.shiftLine(doc, caret.getDot(), right);<NEW_LINE>}<NEW_LINE>} catch (GuardedException e) {<NEW_LINE>target.getToolkit().beep();<NEW_LINE>} catch (BadLocationException e) {<NEW_LINE>e.printStackTrace();<NEW_LINE>} finally {<NEW_LINE>DocumentUtilities.setTypingModification(doc, false);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>});<NEW_LINE>}<NEW_LINE>}
DocumentUtilities.setTypingModification(doc, true);
1,270,667
public boolean isActive(FeatureState featureState, FeatureUser user) {<NEW_LINE>HttpServletRequest request = HttpServletRequestHolder.get();<NEW_LINE>if (request == null) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>String triggerParamsString = featureState.getParameter(PARAM_URL_PARAMS);<NEW_LINE>if (Strings.isBlank(triggerParamsString)) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>String[] triggerParams = SPLIT_ON_COMMA.split(triggerParamsString.trim());<NEW_LINE>Map<String, String[]> actualParams = new HashMap<>();<NEW_LINE>actualParams.putAll(request.getParameterMap());<NEW_LINE>String <MASK><NEW_LINE>if (referer != null) {<NEW_LINE>for (Map.Entry<String, List<String>> entry : getRefererParameters(actualParams, referer).entrySet()) {<NEW_LINE>actualParams.put(entry.getKey(), entry.getValue().toArray(new String[entry.getValue().size()]));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return isTriggerParamPresent(actualParams, triggerParams);<NEW_LINE>}
referer = request.getHeader("referer");
1,314,694
private Mono<Response<SkuListInner>> listSkusWithResponseAsync(String resourceGroupName, String resourceName) {<NEW_LINE>if (this.client.getEndpoint() == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));<NEW_LINE>}<NEW_LINE>if (this.client.getSubscriptionId() == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter this.client.getSubscriptionId() is required and cannot be null."));<NEW_LINE>}<NEW_LINE>if (resourceGroupName == null) {<NEW_LINE>return Mono.<MASK><NEW_LINE>}<NEW_LINE>if (resourceName == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null."));<NEW_LINE>}<NEW_LINE>final String accept = "application/json";<NEW_LINE>return FluxUtil.withContext(context -> service.listSkus(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, resourceName, accept, context)).contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));<NEW_LINE>}
error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
1,001,622
public static void main(String[] args) {<NEW_LINE>// Open a webcam at a resolution close to 640x480<NEW_LINE>Webcam webcam = UtilWebcamCapture.openDefault(640, 480);<NEW_LINE>// Create the panel used to display the image and<NEW_LINE>ImagePanel gui = new ImagePanel();<NEW_LINE><MASK><NEW_LINE>gui.setPreferredSize(viewSize);<NEW_LINE>// Predeclare storage for the gradient<NEW_LINE>GrayF32 derivX = new GrayF32((int) viewSize.getWidth(), (int) viewSize.getHeight());<NEW_LINE>GrayF32 derivY = new GrayF32((int) viewSize.getWidth(), (int) viewSize.getHeight());<NEW_LINE>ShowImages.showWindow(gui, "Gradient", true);<NEW_LINE>for (; ; ) {<NEW_LINE>BufferedImage image = webcam.getImage();<NEW_LINE>GrayF32 gray = ConvertBufferedImage.convertFrom(image, (GrayF32) null);<NEW_LINE>// compute the gradient<NEW_LINE>GImageDerivativeOps.gradient(DerivativeType.SOBEL, gray, derivX, derivY, BorderType.EXTENDED);<NEW_LINE>// visualize and display<NEW_LINE>BufferedImage visualized = VisualizeImageData.colorizeGradient(derivX, derivY, -1, null);<NEW_LINE>gui.setImageUI(visualized);<NEW_LINE>}<NEW_LINE>}
Dimension viewSize = webcam.getViewSize();
307,513
final ListConnectorsResult executeListConnectors(ListConnectorsRequest listConnectorsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listConnectorsRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<ListConnectorsRequest> request = null;<NEW_LINE>Response<ListConnectorsResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new ListConnectorsRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listConnectorsRequest));<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, "KafkaConnect");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListConnectors");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<ListConnectorsResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListConnectorsResultJsonUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>}
endClientExecution(awsRequestMetrics, request, response);
1,011,334
public RowMap deserialize(JsonParser jsonParser, DeserializationContext deserializationContext) throws IOException {<NEW_LINE>ObjectNode node = jsonParser.getCodec().readTree(jsonParser);<NEW_LINE>JsonNode encrypted = node.get("encrypted");<NEW_LINE>if (encrypted != null) {<NEW_LINE>String iv = encrypted.get("iv").textValue();<NEW_LINE>String bytes = encrypted.get("bytes").textValue();<NEW_LINE>String decryptedData;<NEW_LINE>try {<NEW_LINE>decryptedData = RowEncrypt.decrypt(bytes, this.secret_key, iv);<NEW_LINE>} catch (Exception e) {<NEW_LINE>throw new IOException(e);<NEW_LINE>}<NEW_LINE>JsonNode decrypted = mapper.readTree(decryptedData);<NEW_LINE>if (!(decrypted instanceof ObjectNode)) {<NEW_LINE>throw new ParseException("`encrypted` must be an object after decrypting.");<NEW_LINE>}<NEW_LINE>node.setAll((ObjectNode) decrypted);<NEW_LINE>}<NEW_LINE>JsonNode type = node.get("type");<NEW_LINE>if (type == null) {<NEW_LINE>throw new ParseException("`type` is required and cannot be null.");<NEW_LINE>}<NEW_LINE>JsonNode database = node.get("database");<NEW_LINE>if (database == null) {<NEW_LINE>throw new ParseException("`database` is required and cannot be null.");<NEW_LINE>}<NEW_LINE>JsonNode table = node.get("table");<NEW_LINE>if (table == null) {<NEW_LINE>throw new ParseException("`table` is required and cannot be null.");<NEW_LINE>}<NEW_LINE>JsonNode ts = node.get("ts");<NEW_LINE>if (ts == null) {<NEW_LINE>throw new ParseException("`ts` is required and cannot be null.");<NEW_LINE>}<NEW_LINE>JsonNode <MASK><NEW_LINE>JsonNode commit = node.get("commit");<NEW_LINE>JsonNode data = node.get("data");<NEW_LINE>JsonNode oldData = node.get("old");<NEW_LINE>JsonNode comment = node.get("comment");<NEW_LINE>RowMap rowMap = new RowMap(type.asText(), database.asText(), table.asText(), ts.asLong() * 1000, new ArrayList<String>(), null);<NEW_LINE>if (xid != null) {<NEW_LINE>rowMap.setXid(xid.asLong());<NEW_LINE>}<NEW_LINE>if (commit != null && commit.asBoolean()) {<NEW_LINE>rowMap.setTXCommit();<NEW_LINE>}<NEW_LINE>if (data == null) {<NEW_LINE>throw new ParseException("`data` is required and cannot be null.");<NEW_LINE>}<NEW_LINE>readDataInto(rowMap, data, false);<NEW_LINE>if (oldData != null) {<NEW_LINE>readDataInto(rowMap, oldData, true);<NEW_LINE>}<NEW_LINE>if (comment != null) {<NEW_LINE>rowMap.setComment(comment.asText());<NEW_LINE>}<NEW_LINE>return rowMap;<NEW_LINE>}
xid = node.get("xid");
1,068,271
public ProvisionedThroughput unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>ProvisionedThroughput provisionedThroughput = new ProvisionedThroughput();<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>if (context.testExpression("ReadCapacityUnits", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>provisionedThroughput.setReadCapacityUnits(context.getUnmarshaller(Long.class).unmarshall(context));<NEW_LINE>}<NEW_LINE>if (context.testExpression("WriteCapacityUnits", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>provisionedThroughput.setWriteCapacityUnits(context.getUnmarshaller(Long.<MASK><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 provisionedThroughput;<NEW_LINE>}
class).unmarshall(context));
29,603
public void handleMessage(SoapMessage message) throws Fault {<NEW_LINE>Exchange ex = message.getExchange();<NEW_LINE>BindingOperationInfo bop = ex.getBindingOperationInfo();<NEW_LINE>if (bop == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (bop.isUnwrapped()) {<NEW_LINE>bop = bop.getWrappedOperation();<NEW_LINE>}<NEW_LINE>boolean client = isRequestor(message);<NEW_LINE>BindingMessageInfo bmi = client ? bop.getInput<MASK><NEW_LINE>if (bmi == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>Boolean newAttachment = false;<NEW_LINE>Message exOutMsg = ex.getOutMessage();<NEW_LINE>if (exOutMsg != null) {<NEW_LINE>newAttachment = MessageUtils.isTrue(exOutMsg.getContextualProperty("cxf.add.attachments"));<NEW_LINE>LOG.log(Level.FINE, "Request context attachment property: cxf.add.attachments is set to: " + newAttachment);<NEW_LINE>}<NEW_LINE>SoapBodyInfo sbi = bmi.getExtensor(SoapBodyInfo.class);<NEW_LINE>if (sbi == null || sbi.getAttachments() == null || sbi.getAttachments().size() == 0) {<NEW_LINE>Service s = ex.getService();<NEW_LINE>DataBinding db = s.getDataBinding();<NEW_LINE>if (db instanceof JAXBDataBinding && hasSwaRef((JAXBDataBinding) db)) {<NEW_LINE>Boolean includeAttachs = false;<NEW_LINE>Message exInpMsg = ex.getInMessage();<NEW_LINE>LOG.log(Level.FINE, "Exchange Input message: " + exInpMsg);<NEW_LINE>if (exInpMsg != null) {<NEW_LINE>includeAttachs = MessageUtils.isTrue(exInpMsg.getContextualProperty("cxf.add.attachments"));<NEW_LINE>}<NEW_LINE>LOG.log(Level.FINE, "Add attachments message property: cxf.add.attachments value is " + includeAttachs);<NEW_LINE>if (!skipHasSwaRef || includeAttachs || newAttachment) {<NEW_LINE>setupAttachmentOutput(message);<NEW_LINE>} else {<NEW_LINE>skipAttachmentOutput(message);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>processAttachments(message, sbi);<NEW_LINE>}
() : bop.getOutput();
1,596,469
// TODO move out<NEW_LINE>public void finishConfiguration(@NotNull String adminName, @Nullable String adminPassword, @NotNull List<WebAuthInfo> authInfoList) throws DBException {<NEW_LINE>if (!application.isConfigurationMode()) {<NEW_LINE>throw new DBException("Database is already configured");<NEW_LINE>}<NEW_LINE>log.info("Configure CB database security");<NEW_LINE>CBDatabaseInitialData initialData = getInitialData();<NEW_LINE>if (initialData != null && !CommonUtils.isEmpty(initialData.getAdminName()) && !CommonUtils.equalObjects(initialData.getAdminName(), adminName)) {<NEW_LINE>// Delete old admin user<NEW_LINE>adminSecurityController.deleteUser(initialData.getAdminName());<NEW_LINE>}<NEW_LINE>// Create new admin user<NEW_LINE>createAdminUser(adminName, adminPassword);<NEW_LINE>// Associate all auth credentials with admin user<NEW_LINE>for (WebAuthInfo ai : authInfoList) {<NEW_LINE>if (!ai.getAuthProvider().equals(LocalAuthProviderConstants.PROVIDER_ID)) {<NEW_LINE>AuthProviderDescriptor authProvider = ai.getAuthProviderDescriptor();<NEW_LINE>Map<String, Object> userCredentials = ai.getUserCredentials();<NEW_LINE>if (!CommonUtils.isEmpty(userCredentials)) {<NEW_LINE>adminSecurityController.setUserCredentials(adminName, <MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
authProvider.getId(), userCredentials);
965,819
public void actionPerformed(@NotNull AnActionEvent e) {<NEW_LINE>VirtualFile virtualFile = e.getData(CommonDataKeys.VIRTUAL_FILE);<NEW_LINE>final Project project = e.getData(CommonDataKeys.PROJECT);<NEW_LINE>if (project == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (!isQueryableFile(project, virtualFile)) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>Editor editor = e.getData(CommonDataKeys.EDITOR);<NEW_LINE>if (!(editor instanceof EditorEx)) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>boolean querying = Boolean.TRUE.equals(editor.getUserData(GraphQLUIProjectService.GRAPH_QL_EDITOR_QUERYING));<NEW_LINE>if (querying) {<NEW_LINE>// already doing a query<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>Editor queryEditor = editor.getUserData(GraphQLUIProjectService.GRAPH_QL_QUERY_EDITOR);<NEW_LINE>if (queryEditor != null) {<NEW_LINE>// this action comes from the variables editor, so we need to resolve the query editor which contains the GraphQL<NEW_LINE>editor = queryEditor;<NEW_LINE>virtualFile = CommonDataKeys.VIRTUAL_FILE.getData(((EditorEx) editor).getDataContext());<NEW_LINE>}<NEW_LINE>GraphQLUIProjectService.getService(project<MASK><NEW_LINE>}
).executeGraphQL(editor, virtualFile);
490,567
final GetDevicePositionHistoryResult executeGetDevicePositionHistory(GetDevicePositionHistoryRequest getDevicePositionHistoryRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(getDevicePositionHistoryRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<GetDevicePositionHistoryRequest> request = null;<NEW_LINE>Response<GetDevicePositionHistoryResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new GetDevicePositionHistoryRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(getDevicePositionHistoryRequest));<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(<MASK><NEW_LINE>request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SERVICE_ID, "Location");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "GetDevicePositionHistory");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>URI endpointTraitHost = null;<NEW_LINE>if (!clientConfiguration.isDisableHostPrefixInjection()) {<NEW_LINE>String hostPrefix = "tracking.";<NEW_LINE>String resolvedHostPrefix = String.format("tracking.");<NEW_LINE>endpointTraitHost = UriResourcePathUtils.updateUriHost(endpoint, resolvedHostPrefix);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<GetDevicePositionHistoryResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new GetDevicePositionHistoryResultJsonUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext, null, endpointTraitHost);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
1,087,408
public // //////////////////////////////////////////////////////<NEW_LINE>Ref listBackupRepository(final String backupServerId, final String backupName) {<NEW_LINE>LOG.debug(String.format("Trying to list backup repository for backup job [name: %s] in server [id: %s].", backupName, backupServerId));<NEW_LINE>try {<NEW_LINE>String repositoryName = getRepositoryNameFromJob(backupName);<NEW_LINE>final HttpResponse response = get(String<MASK><NEW_LINE>checkResponseOK(response);<NEW_LINE>final ObjectMapper objectMapper = new XmlMapper();<NEW_LINE>final EntityReferences references = objectMapper.readValue(response.getEntity().getContent(), EntityReferences.class);<NEW_LINE>for (final Ref ref : references.getRefs()) {<NEW_LINE>if (ref.getType().equals("RepositoryReference") && ref.getName().equals(repositoryName)) {<NEW_LINE>return ref;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} catch (final IOException e) {<NEW_LINE>LOG.error(String.format("Failed to list Veeam backup repository used by backup job [name: %s] due to: [%s].", backupName, e.getMessage()), e);<NEW_LINE>checkResponseTimeOut(e);<NEW_LINE>}<NEW_LINE>return null;<NEW_LINE>}
.format("/backupServers/%s/repositories", backupServerId));
1,049,530
private void showBottomSheet() {<NEW_LINE>final String[] labels = new String[menuItems.length];<NEW_LINE>final int[] icons = new int[menuItems.length];<NEW_LINE>for (int i = 0; i < menuItems.length; i++) {<NEW_LINE>labels[i] = LocaleController.getString(menuItems[i].labelKey, menuItems[i].labelResId);<NEW_LINE>icons[i] = menuItems[i].iconResId;<NEW_LINE>}<NEW_LINE>BottomBuilder visibleSheetBuilder = new BottomBuilder(getContext());<NEW_LINE>visibleSheetBuilder.addItems(labels, icons, (which, text, cell) -> {<NEW_LINE>callback<MASK><NEW_LINE>setShowing(false);<NEW_LINE>return Unit.INSTANCE;<NEW_LINE>});<NEW_LINE>visibleSheet = visibleSheetBuilder.create();<NEW_LINE>visibleSheet.setDimBehind(false);<NEW_LINE>visibleSheet.setOnDismissListener(dialog -> {<NEW_LINE>visibleSheet = null;<NEW_LINE>setShowing(false);<NEW_LINE>});<NEW_LINE>visibleSheet.show();<NEW_LINE>}
.onMenuClick(menuItems[which]);
1,322,262
private void appendRandomInt(StringBuilder buffer, CodegenOperation op, CodegenVariable var) {<NEW_LINE>if (!appendRandomEnum(buffer, op, var)) {<NEW_LINE>// NOTE: use double to hold int values, to avoid numeric overflow.<NEW_LINE>long min = var == null || var.minimum == null ? Integer.MIN_VALUE : Integer.parseInt(var.minimum);<NEW_LINE>long max = var == null || var.maximum == null ? Integer.MAX_VALUE : Integer.parseInt(var.maximum);<NEW_LINE>long exclusiveMin = var != null && var.exclusiveMinimum ? 1 : 0;<NEW_LINE>long inclusiveMax = var == null || <MASK><NEW_LINE>int randomInt = (int) (min + exclusiveMin + ((max + inclusiveMax - min - exclusiveMin) * Math.random()));<NEW_LINE>if (loadTestDataFromFile) {<NEW_LINE>if (var != null) {<NEW_LINE>var.addTestData(randomInt);<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>buffer.append(randomInt);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
!var.exclusiveMaximum ? 1 : 0;
759,389
public void execute(final Context context) throws FlowException {<NEW_LINE>String _script = getProperty(script);<NEW_LINE>if (_script == null) {<NEW_LINE>_script = "data";<NEW_LINE>}<NEW_LINE>final Logger logger = LoggerFactory.getLogger(FlowLog.class);<NEW_LINE>try {<NEW_LINE>final DataSource _dataSource = getProperty(dataSource);<NEW_LINE>// make data available to action if present<NEW_LINE>if (_dataSource != null) {<NEW_LINE>context.setData(getUuid(), _dataSource.get(context));<NEW_LINE>}<NEW_LINE>// Evaluate script and write result to context<NEW_LINE>Object result = Scripting.evaluate(context.getActionContext(securityContext, this), this, "${" + _script.trim() + "}", <MASK><NEW_LINE>FlowContainer container = getProperty(flowContainer);<NEW_LINE>logger.info((container.getName() != null ? ("[" + container.getProperty(FlowContainer.effectiveName) + "]") : "") + ("([" + getType() + "]" + getUuid() + "): ") + result);<NEW_LINE>} catch (FrameworkException fex) {<NEW_LINE>throw new FlowException(fex, this);<NEW_LINE>}<NEW_LINE>}
"FlowAction(" + getUuid() + ")");
179,649
public Observable<ServiceResponse<LuisResult>> resolveWithServiceResponseAsync(String appId, String query, ResolveOptionalParameter resolveOptionalParameter) {<NEW_LINE>if (this.client.endpoint() == null) {<NEW_LINE>throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null.");<NEW_LINE>}<NEW_LINE>if (appId == null) {<NEW_LINE>throw new IllegalArgumentException("Parameter appId is required and cannot be null.");<NEW_LINE>}<NEW_LINE>if (query == null) {<NEW_LINE>throw new IllegalArgumentException("Parameter query is required and cannot be null.");<NEW_LINE>}<NEW_LINE>final Double timezoneOffset = resolveOptionalParameter != null ? resolveOptionalParameter.timezoneOffset() : null;<NEW_LINE>final Boolean verbose = resolveOptionalParameter != null ? resolveOptionalParameter.verbose() : null;<NEW_LINE>final Boolean staging = resolveOptionalParameter != null ? resolveOptionalParameter.staging() : null;<NEW_LINE>final Boolean spellCheck = resolveOptionalParameter != null ? resolveOptionalParameter.spellCheck() : null;<NEW_LINE>final String bingSpellCheckSubscriptionKey = resolveOptionalParameter != null ? resolveOptionalParameter.bingSpellCheckSubscriptionKey() : null;<NEW_LINE>final Boolean log = resolveOptionalParameter != null ? resolveOptionalParameter.log() : null;<NEW_LINE>return resolveWithServiceResponseAsync(appId, query, timezoneOffset, verbose, <MASK><NEW_LINE>}
staging, spellCheck, bingSpellCheckSubscriptionKey, log);
1,071,253
private void validateIndexNamedParameter(ExprValidationContext validationContext) throws ExprValidationException {<NEW_LINE>if (indexNamedParameter.length != 1 || !(indexNamedParameter[0] instanceof ExprDeclaredNode)) {<NEW_LINE>throw getIndexNameMessage("requires an expression name");<NEW_LINE>}<NEW_LINE>ExprDeclaredNode node = (ExprDeclaredNode) indexNamedParameter[0];<NEW_LINE>if (!(node.getBody() instanceof ExprDotNode)) {<NEW_LINE>throw getIndexNameMessage("requires an index expression");<NEW_LINE>}<NEW_LINE>ExprDotNode dotNode = (ExprDotNode) node.getBody();<NEW_LINE>if (dotNode.getChainSpec().size() > 1) {<NEW_LINE>throw getIndexNameMessage("invalid chained index expression");<NEW_LINE>}<NEW_LINE>List<ExprNode> params = dotNode.getChainSpec().<MASK><NEW_LINE>String indexTypeName = dotNode.getChainSpec().get(0).getRootNameOrEmptyString();<NEW_LINE>optionalIndexName = node.getPrototype().getName();<NEW_LINE>AdvancedIndexFactoryProvider provider;<NEW_LINE>try {<NEW_LINE>provider = validationContext.getClasspathImportService().resolveAdvancedIndexProvider(indexTypeName);<NEW_LINE>} catch (ClasspathImportException e) {<NEW_LINE>throw new ExprValidationException(e.getMessage(), e);<NEW_LINE>}<NEW_LINE>if (!indexTypeName.toLowerCase(Locale.ENGLISH).equals(indexTypeName())) {<NEW_LINE>throw new ExprValidationException("Invalid index type '" + indexTypeName + "', expected '" + indexTypeName() + "'");<NEW_LINE>}<NEW_LINE>optionalIndexConfig = provider.validateConfigureFilterIndex(optionalIndexName, indexTypeName, ExprNodeUtilityQuery.toArray(params), validationContext);<NEW_LINE>}
get(0).getParametersOrEmpty();
1,006,048
// ===================================================================================<NEW_LINE>// Source<NEW_LINE>// ======<NEW_LINE>@Override<NEW_LINE>public Map<String, Object> toSource() {<NEW_LINE>Map<String, Object> sourceMap = new HashMap<>();<NEW_LINE>if (createdBy != null) {<NEW_LINE>addFieldToSource(sourceMap, "createdBy", createdBy);<NEW_LINE>}<NEW_LINE>if (createdTime != null) {<NEW_LINE>addFieldToSource(sourceMap, "createdTime", createdTime);<NEW_LINE>}<NEW_LINE>if (name != null) {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>if (sortOrder != null) {<NEW_LINE>addFieldToSource(sourceMap, "sortOrder", sortOrder);<NEW_LINE>}<NEW_LINE>if (updatedBy != null) {<NEW_LINE>addFieldToSource(sourceMap, "updatedBy", updatedBy);<NEW_LINE>}<NEW_LINE>if (updatedTime != null) {<NEW_LINE>addFieldToSource(sourceMap, "updatedTime", updatedTime);<NEW_LINE>}<NEW_LINE>if (value != null) {<NEW_LINE>addFieldToSource(sourceMap, "value", value);<NEW_LINE>}<NEW_LINE>return sourceMap;<NEW_LINE>}
addFieldToSource(sourceMap, "name", name);
21,579
public J visitAnnotation(AnnotationTree node, Space fmt) {<NEW_LINE>skip("@");<NEW_LINE>NameTree name = convert(node.getAnnotationType());<NEW_LINE>JContainer<Expression> args = null;<NEW_LINE>if (node.getArguments().size() > 0) {<NEW_LINE>Space argsPrefix = sourceBefore("(");<NEW_LINE>List<JRightPadded<Expression>> expressions;<NEW_LINE>if (node.getArguments().size() == 1) {<NEW_LINE>ExpressionTree arg = node.getArguments().get(0);<NEW_LINE>if (arg instanceof JCAssign) {<NEW_LINE>if (endPos(arg) < 0) {<NEW_LINE>expressions = singletonList(convert(((JCAssign) arg).rhs, t -> sourceBefore(")")));<NEW_LINE>} else {<NEW_LINE>expressions = singletonList(convert(arg, t -> sourceBefore(")")));<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>expressions = singletonList(convert(arg, t -> sourceBefore(")")));<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>expressions = convertAll(node.getArguments(), commaDelim, t -> sourceBefore(")"));<NEW_LINE>}<NEW_LINE>args = JContainer.build(<MASK><NEW_LINE>} else {<NEW_LINE>String remaining = source.substring(cursor, endPos(node));<NEW_LINE>// TODO: technically, if there is code like this, we have a bug, but seems exceedingly unlikely:<NEW_LINE>// @MyAnnotation /* Comment () that contains parentheses */ ()<NEW_LINE>if (remaining.contains("(") && remaining.contains(")")) {<NEW_LINE>args = JContainer.build(sourceBefore("("), singletonList(padRight(new J.Empty(randomId(), sourceBefore(")"), Markers.EMPTY), EMPTY)), Markers.EMPTY);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return new J.Annotation(randomId(), fmt, Markers.EMPTY, name, args);<NEW_LINE>}
argsPrefix, expressions, Markers.EMPTY);
979,779
private void compact(Connection cx) throws SQLException, InvalidSchemaError {<NEW_LINE>if (!shouldCompact(cx))<NEW_LINE>return;<NEW_LINE>Long schemaID = chooseCompactedSchemaBase(cx);<NEW_LINE>if (schemaID == null)<NEW_LINE>return;<NEW_LINE>LOGGER.info("compacting schemas before {}", schemaID);<NEW_LINE>try (Statement begin = cx.createStatement();<NEW_LINE><MASK><NEW_LINE>Statement commit = cx.createStatement()) {<NEW_LINE>begin.execute("BEGIN");<NEW_LINE>MysqlSavedSchema savedSchema = MysqlSavedSchema.restoreFromSchemaID(schemaID, cx, this.sensitivity);<NEW_LINE>savedSchema.saveFullSchema(cx, schemaID);<NEW_LINE>update.executeUpdate("update `schemas` set `base_schema_id` = null, `deltas` = null where `id` = " + schemaID);<NEW_LINE>commit.execute("COMMIT");<NEW_LINE>}<NEW_LINE>slowDeleteSchemas(cx, schemaID);<NEW_LINE>}
Statement update = cx.createStatement();
393,014
public double searchDurInCartTree(HTSModel m, FeatureVector fv, HMMData htsData, boolean firstPh, boolean lastPh, double diffdur) {<NEW_LINE>double data, dd;<NEW_LINE><MASK><NEW_LINE>double durscale = htsData.getDurationScale();<NEW_LINE>double[] meanVector, varVector;<NEW_LINE>// the duration tree has only one state<NEW_LINE>PdfLeafNode node = (PdfLeafNode) durTree[0].interpretToNode(fv, 0);<NEW_LINE>meanVector = node.getMean();<NEW_LINE>varVector = node.getVariance();<NEW_LINE>dd = diffdur;<NEW_LINE>// in duration the length of the vector is the number of states.<NEW_LINE>for (int s = 0; s < numStates; s++) {<NEW_LINE>data = (meanVector[s] + rho * varVector[s]) * durscale;<NEW_LINE>// if(m.getPhoneName().contentEquals("_") && (firstPh || lastPh ))<NEW_LINE>// data = data * 0.1;<NEW_LINE>m.setDur(s, (int) (data + dd + 0.5));<NEW_LINE>if (m.getDur(s) < 1)<NEW_LINE>m.setDur(s, 1);<NEW_LINE>// System.out.format(" state=%d dur=%d dd=%f mean=%f vari=%f \n", s, m.getDur(s), dd, meanVector[s],<NEW_LINE>// varVector[s]);<NEW_LINE>m.incrTotalDur(m.getDur(s));<NEW_LINE>dd += data - m.getDur(s);<NEW_LINE>}<NEW_LINE>m.setDurError(dd);<NEW_LINE>return dd;<NEW_LINE>}
double rho = htsData.getRho();
341,679
public Request<DescribeStreamSummaryRequest> marshall(DescribeStreamSummaryRequest describeStreamSummaryRequest) {<NEW_LINE>if (describeStreamSummaryRequest == null) {<NEW_LINE>throw new AmazonClientException("Invalid argument passed to marshall(DescribeStreamSummaryRequest)");<NEW_LINE>}<NEW_LINE>Request<DescribeStreamSummaryRequest> request = new DefaultRequest<DescribeStreamSummaryRequest>(describeStreamSummaryRequest, "AmazonKinesis");<NEW_LINE>String target = "Kinesis_20131202.DescribeStreamSummary";<NEW_LINE><MASK><NEW_LINE>request.setHttpMethod(HttpMethodName.POST);<NEW_LINE>String uriResourcePath = "/";<NEW_LINE>request.setResourcePath(uriResourcePath);<NEW_LINE>try {<NEW_LINE>StringWriter stringWriter = new StringWriter();<NEW_LINE>AwsJsonWriter jsonWriter = JsonUtils.getJsonWriter(stringWriter);<NEW_LINE>jsonWriter.beginObject();<NEW_LINE>if (describeStreamSummaryRequest.getStreamName() != null) {<NEW_LINE>String streamName = describeStreamSummaryRequest.getStreamName();<NEW_LINE>jsonWriter.name("StreamName");<NEW_LINE>jsonWriter.value(streamName);<NEW_LINE>}<NEW_LINE>jsonWriter.endObject();<NEW_LINE>jsonWriter.close();<NEW_LINE>String snippet = stringWriter.toString();<NEW_LINE>byte[] content = snippet.getBytes(UTF8);<NEW_LINE>request.setContent(new StringInputStream(snippet));<NEW_LINE>request.addHeader("Content-Length", Integer.toString(content.length));<NEW_LINE>} catch (Throwable t) {<NEW_LINE>throw new AmazonClientException("Unable to marshall request to JSON: " + t.getMessage(), t);<NEW_LINE>}<NEW_LINE>if (!request.getHeaders().containsKey("Content-Type")) {<NEW_LINE>request.addHeader("Content-Type", "application/x-amz-json-1.1");<NEW_LINE>}<NEW_LINE>return request;<NEW_LINE>}
request.addHeader("X-Amz-Target", target);
548,505
private void responseDescribe(byte[] body, CharSequence contentType, int statusCode, String statusPhrase, Map<String, String> responseHeaders) {<NEW_LINE>try {<NEW_LINE>ArrayList<DescribeModelResponse> respList = ApiUtils.getModelDescription(this.getModelName(), this.getModelVersion());<NEW_LINE>if ((body != null && body.length != 0) && respList != null && respList.size() == 1) {<NEW_LINE>respList.get(0).setCustomizedMetadata(body);<NEW_LINE>}<NEW_LINE>HttpResponseStatus status = (statusPhrase == null) ? HttpResponseStatus.valueOf(statusCode) : new HttpResponseStatus(statusCode, statusPhrase);<NEW_LINE>FullHttpResponse resp = new DefaultFullHttpResponse(HttpVersion.HTTP_1_1, status, false);<NEW_LINE>if (contentType != null && contentType.length() > 0) {<NEW_LINE>resp.headers().<MASK><NEW_LINE>} else {<NEW_LINE>resp.headers().set(HttpHeaderNames.CONTENT_TYPE, HttpHeaderValues.APPLICATION_JSON);<NEW_LINE>}<NEW_LINE>if (responseHeaders != null) {<NEW_LINE>for (Map.Entry<String, String> e : responseHeaders.entrySet()) {<NEW_LINE>resp.headers().set(e.getKey(), e.getValue());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>ByteBuf content = resp.content();<NEW_LINE>content.writeCharSequence(JsonUtils.GSON_PRETTY.toJson(respList), CharsetUtil.UTF_8);<NEW_LINE>content.writeByte('\n');<NEW_LINE>NettyUtils.sendHttpResponse(ctx, resp, true);<NEW_LINE>} catch (ModelNotFoundException | ModelVersionNotFoundException e) {<NEW_LINE>logger.trace("", e);<NEW_LINE>NettyUtils.sendError(ctx, HttpResponseStatus.NOT_FOUND, e);<NEW_LINE>}<NEW_LINE>}
set(HttpHeaderNames.CONTENT_TYPE, contentType);
99,135
// Attach a clause to watcher lists.<NEW_LINE>void attachClause(Clause cr) {<NEW_LINE><MASK><NEW_LINE>ArrayList<Watcher> l0 = watches_.get(neg(cr._g(0)));<NEW_LINE>if (l0 == null) {<NEW_LINE>l0 = new ArrayList<>();<NEW_LINE>watches_.put(neg(cr._g(0)), l0);<NEW_LINE>}<NEW_LINE>ArrayList<Watcher> l1 = watches_.get(neg(cr._g(1)));<NEW_LINE>if (l1 == null) {<NEW_LINE>l1 = new ArrayList<>();<NEW_LINE>watches_.put(neg(cr._g(1)), l1);<NEW_LINE>}<NEW_LINE>l0.add(new Watcher(cr, cr._g(1)));<NEW_LINE>l1.add(new Watcher(cr, cr._g(0)));<NEW_LINE>if (cr.learnt())<NEW_LINE>learnts_literals += cr.size();<NEW_LINE>else<NEW_LINE>clauses_literals += cr.size();<NEW_LINE>}
assert cr.size() > 1;
1,542,041
// Used by DatumReader. Applications should not call.<NEW_LINE>@SuppressWarnings(value = "unchecked")<NEW_LINE>public void put(int field$, java.lang.Object value$) {<NEW_LINE>switch(field$) {<NEW_LINE>case 0:<NEW_LINE>txn = (java.lang.Long) value$;<NEW_LINE>break;<NEW_LINE>case 1:<NEW_LINE>key = (java.lang.Long) value$;<NEW_LINE>break;<NEW_LINE>case 2:<NEW_LINE>firstName = (java.lang.CharSequence) value$;<NEW_LINE>break;<NEW_LINE>case 3:<NEW_LINE>lastName = (java.lang.CharSequence) value$;<NEW_LINE>break;<NEW_LINE>case 4:<NEW_LINE>birthDate = <MASK><NEW_LINE>break;<NEW_LINE>case 5:<NEW_LINE>deleted = (java.lang.CharSequence) value$;<NEW_LINE>break;<NEW_LINE>default:<NEW_LINE>throw new org.apache.avro.AvroRuntimeException("Bad index");<NEW_LINE>}<NEW_LINE>}
(java.lang.Long) value$;
460,213
// Generates the report and returns an inputstream<NEW_LINE>public java.io.InputStream write(List<WorkItem> list) throws IOException, WriteException {<NEW_LINE>java.io.OutputStream os = new java.io.ByteArrayOutputStream();<NEW_LINE>WorkbookSettings wbSettings = new WorkbookSettings();<NEW_LINE>wbSettings.setLocale(new Locale("en", "EN"));<NEW_LINE>// Create a Workbook - pass the OutputStream<NEW_LINE>WritableWorkbook workbook = Workbook.createWorkbook(os, wbSettings);<NEW_LINE>workbook.createSheet("Work Item Report", 0);<NEW_LINE>WritableSheet excelSheet = workbook.getSheet(0);<NEW_LINE>createLabel(excelSheet);<NEW_LINE>int size = createContent(excelSheet, list);<NEW_LINE>// Close the workbook<NEW_LINE>workbook.write();<NEW_LINE>workbook.close();<NEW_LINE>// Get an inputStream that represents the Report<NEW_LINE>java.io.ByteArrayOutputStream stream = new java.io.ByteArrayOutputStream();<NEW_LINE>stream = (java.io.ByteArrayOutputStream) os;<NEW_LINE>byte[] myBytes = stream.toByteArray();<NEW_LINE>java.io.InputStream is = new <MASK><NEW_LINE>return is;<NEW_LINE>}
java.io.ByteArrayInputStream(myBytes);
5,336
public Server choose(Object key) {<NEW_LINE>boolean isTriggered = false;<NEW_LINE>WeightFilterEntity strategyWeightFilterEntity = strategyWeightRandomLoadBalance.getT();<NEW_LINE>if (strategyWeightFilterEntity != null && strategyWeightFilterEntity.hasWeight()) {<NEW_LINE>isTriggered = true;<NEW_LINE>List<Server> serverList = retryEnabled ? getRetryableServerList(key) : getServerList(key);<NEW_LINE>boolean isWeightChecked = strategyWeightRandomLoadBalance.checkWeight(serverList, strategyWeightFilterEntity);<NEW_LINE>if (isWeightChecked) {<NEW_LINE>try {<NEW_LINE>return strategyWeightRandomLoadBalance.choose(serverList, strategyWeightFilterEntity);<NEW_LINE>} catch (Exception e) {<NEW_LINE>return super.choose(key);<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>return super.choose(key);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (!isTriggered) {<NEW_LINE>WeightFilterEntity ruleWeightFilterEntity = ruleWeightRandomLoadBalance.getT();<NEW_LINE>if (ruleWeightFilterEntity != null && ruleWeightFilterEntity.hasWeight()) {<NEW_LINE>List<Server> serverList = retryEnabled ? getRetryableServerList(key) : getServerList(key);<NEW_LINE>boolean isWeightChecked = ruleWeightRandomLoadBalance.checkWeight(serverList, ruleWeightFilterEntity);<NEW_LINE>if (isWeightChecked) {<NEW_LINE>try {<NEW_LINE>return <MASK><NEW_LINE>} catch (Exception e) {<NEW_LINE>return super.choose(key);<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>return super.choose(key);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return super.choose(key);<NEW_LINE>}
ruleWeightRandomLoadBalance.choose(serverList, ruleWeightFilterEntity);
175,141
public int longestMountain(int[] nums) {<NEW_LINE>int start = 0;<NEW_LINE>int max = 0;<NEW_LINE>State state = State.STARTED;<NEW_LINE>for (int i = 1; i < nums.length; i++) {<NEW_LINE>if (nums[i] == nums[i - 1]) {<NEW_LINE>start = i;<NEW_LINE>state = State.STARTED;<NEW_LINE>} else if (nums[i] > nums[i - 1]) {<NEW_LINE>if (state == State.DECREASING || state == State.STARTED) {<NEW_LINE>start = i - 1;<NEW_LINE>state = State.INCREASING;<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>if (state == State.INCREASING || state == State.DECREASING) {<NEW_LINE>state = State.DECREASING;<NEW_LINE>max = Math.max(<MASK><NEW_LINE>} else {<NEW_LINE>start = i;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return max;<NEW_LINE>}
max, i - start + 1);
1,074,725
public StatInfo call() throws Exception {<NEW_LINE>StatInfo result = null;<NEW_LINE>SftpException exception = null;<NEW_LINE>if (LOG.isLoggable(Level.FINE)) {<NEW_LINE>LOG.log(Level.FINE, "{0} started", getTraceName());<NEW_LINE>}<NEW_LINE>String threadName = Thread.currentThread().getName();<NEW_LINE>// NOI18N<NEW_LINE>Thread.currentThread().setName(PREFIX + ": " + getTraceName());<NEW_LINE>// NOI18N<NEW_LINE>RemoteStatistics.ActivityID activityID = RemoteStatistics.startChannelActivity("move", from);<NEW_LINE>ChannelSftp cftp = null;<NEW_LINE>try {<NEW_LINE>cftp = getChannel();<NEW_LINE>cftp.rename(from, to);<NEW_LINE>} catch (SftpException e) {<NEW_LINE>exception = e;<NEW_LINE>if (e.id == SftpIOException.SSH_FX_FAILURE) {<NEW_LINE>if (MiscUtils.mightBrokeSftpChannel(e)) {<NEW_LINE>cftp.quit();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} finally {<NEW_LINE>RemoteStatistics.stopChannelActivity(activityID);<NEW_LINE>releaseChannel(cftp);<NEW_LINE>Thread.<MASK><NEW_LINE>}<NEW_LINE>if (exception != null) {<NEW_LINE>if (LOG.isLoggable(Level.FINE)) {<NEW_LINE>LOG.log(Level.FINE, "{0} failed", getTraceName());<NEW_LINE>}<NEW_LINE>// NOI18N<NEW_LINE>throw decorateSftpException(exception, from + " to " + to);<NEW_LINE>}<NEW_LINE>if (LOG.isLoggable(Level.FINE)) {<NEW_LINE>LOG.log(Level.FINE, "{0} finished", new Object[] { getTraceName() });<NEW_LINE>}<NEW_LINE>return result;<NEW_LINE>}
currentThread().setName(threadName);
1,764,279
public static Transaction deserialize(byte[] serializedTransaction) throws IOException {<NEW_LINE>ObjectInputStream in = new ObjectInputStream(new ByteArrayInputStream(serializedTransaction));<NEW_LINE>// Verify that the data is what we expect.<NEW_LINE>int version = in.readInt();<NEW_LINE>checkArgument(version == VERSION_ID, "Invalid version id. Expected %s but got %s", VERSION_ID, version);<NEW_LINE>Transaction.Builder builder = new Transaction.Builder();<NEW_LINE>int mutationCount = in.readInt();<NEW_LINE>for (int i = 0; i < mutationCount; ++i) {<NEW_LINE>try {<NEW_LINE>builder.add<MASK><NEW_LINE>} catch (EOFException e) {<NEW_LINE>throw new RuntimeException("Serialized transaction terminated prematurely", e);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (in.read() != -1) {<NEW_LINE>throw new RuntimeException("Unread data at the end of a serialized transaction.");<NEW_LINE>}<NEW_LINE>return builder.build();<NEW_LINE>}
(Mutation.deserializeFrom(in));
197,704
public final void handleRequest(RestRequest request, RestChannel channel, NodeClient client) throws Exception {<NEW_LINE>// prepare the request for execution; has the side effect of touching the request parameters<NEW_LINE>final RestChannelConsumer action = prepareRequest(request, client);<NEW_LINE>// validate unconsumed params, but we must exclude params used to format the response<NEW_LINE>// use a sorted set so the unconsumed parameters appear in a reliable sorted order<NEW_LINE>final SortedSet<String> unconsumedParams = request.unconsumedParams().stream().filter(p -> responseParams(request.getRestApiVersion()).contains(p) == false).collect(Collectors.toCollection(TreeSet::new));<NEW_LINE>// validate the non-response params<NEW_LINE>if (unconsumedParams.isEmpty() == false) {<NEW_LINE>final Set<String> candidateParams = new HashSet<>();<NEW_LINE>candidateParams.addAll(request.consumedParams());<NEW_LINE>candidateParams.addAll(responseParams(request.getRestApiVersion()));<NEW_LINE>throw new IllegalArgumentException(unrecognized(request, unconsumedParams, candidateParams, "parameter"));<NEW_LINE>}<NEW_LINE>if (request.hasContent() && request.isContentConsumed() == false) {<NEW_LINE>throw new IllegalArgumentException("request [" + request.method() + " " + <MASK><NEW_LINE>}<NEW_LINE>usageCount.increment();<NEW_LINE>// execute the action<NEW_LINE>action.accept(channel);<NEW_LINE>}
request.path() + "] does not support having a body");
1,376,884
public static CompletableFuture<ScriptInfo> loadScripts(List<Config> configs, OpenCloseable openCloseable) {<NEW_LINE>AtomicBoolean syncCommands = new AtomicBoolean();<NEW_LINE>Bukkit.getPluginManager().<MASK><NEW_LINE>ScriptInfo scriptInfo = new ScriptInfo();<NEW_LINE>List<CompletableFuture<Void>> scriptInfoFutures = new ArrayList<>();<NEW_LINE>for (Config config : configs) {<NEW_LINE>if (config == null)<NEW_LINE>throw new NullPointerException();<NEW_LINE>CompletableFuture<Void> future = makeFuture(() -> {<NEW_LINE>ScriptInfo info = loadScript(config);<NEW_LINE>// Check if commands have been changed and a re-send is needed<NEW_LINE>if (!info.commandNames.equals(commandNames.get(config.getFileName()))) {<NEW_LINE>// Sync once after everything has been loaded<NEW_LINE>syncCommands.set(true);<NEW_LINE>// These will soon be sent to clients<NEW_LINE>commandNames.put(config.getFileName(), info.commandNames);<NEW_LINE>}<NEW_LINE>scriptInfo.add(info);<NEW_LINE>return null;<NEW_LINE>}, openCloseable);<NEW_LINE>scriptInfoFutures.add(future);<NEW_LINE>}<NEW_LINE>return CompletableFuture.allOf(scriptInfoFutures.toArray(new CompletableFuture[0])).thenApply(unused -> {<NEW_LINE>SkriptEventHandler.registerBukkitEvents();<NEW_LINE>// After we've loaded everything, refresh commands their names changed<NEW_LINE>if (syncCommands.get()) {<NEW_LINE>if (CommandReloader.syncCommands(Bukkit.getServer()))<NEW_LINE>Skript.debug("Commands synced to clients");<NEW_LINE>else<NEW_LINE>Skript.debug("Commands changed but not synced to clients (normal on 1.12 and older)");<NEW_LINE>} else {<NEW_LINE>Skript.debug("Commands unchanged, not syncing them to clients");<NEW_LINE>}<NEW_LINE>return scriptInfo;<NEW_LINE>});<NEW_LINE>}
callEvent(new PreScriptLoadEvent(configs));
1,746,094
private void refreshRemoteVideo() {<NEW_LINE>if (mRemoteUserIdList.size() > 0) {<NEW_LINE>for (int i = 0; i < mRemoteUserIdList.size() || i < 6; i++) {<NEW_LINE>if (i < mRemoteUserIdList.size() && !TextUtils.isEmpty(mRemoteUserIdList.get(i))) {<NEW_LINE>mRemoteVideoList.get(i).setVisibility(View.VISIBLE);<NEW_LINE>mTRTCCloud.startRemoteView(mRemoteUserIdList.get(i), TRTCCloudDef.TRTC_VIDEO_STREAM_TYPE_BIG, mRemoteVideoList.get(i));<NEW_LINE>} else {<NEW_LINE>mRemoteVideoList.get(i<MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>for (int i = 0; i < 6; i++) {<NEW_LINE>mRemoteVideoList.get(i).setVisibility(View.GONE);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
).setVisibility(View.GONE);
714,729
public void render(MatrixStack matrixStack, int mouseX, int mouseY, float partialTicks) {<NEW_LINE>updateColors();<NEW_LINE>GL11.glDisable(GL11.GL_CULL_FACE);<NEW_LINE>GL11.glEnable(GL11.GL_BLEND);<NEW_LINE>GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);<NEW_LINE>// GL11.glShadeModel(GL11.GL_SMOOTH);<NEW_LINE>RenderSystem.lineWidth(1);<NEW_LINE>tooltip = "";<NEW_LINE>for (Window window : windows) {<NEW_LINE>if (window.isInvisible())<NEW_LINE>continue;<NEW_LINE>// dragging<NEW_LINE>if (window.isDragging())<NEW_LINE>if (leftMouseButtonPressed)<NEW_LINE>window.dragTo(mouseX, mouseY);<NEW_LINE>else {<NEW_LINE>window.stopDragging();<NEW_LINE>saveWindows();<NEW_LINE>}<NEW_LINE>// scrollbar dragging<NEW_LINE>if (window.isDraggingScrollbar())<NEW_LINE>if (leftMouseButtonPressed)<NEW_LINE>window.dragScrollbarTo(mouseY);<NEW_LINE>else<NEW_LINE>window.stopDraggingScrollbar();<NEW_LINE>renderWindow(matrixStack, <MASK><NEW_LINE>}<NEW_LINE>renderPopups(matrixStack, mouseX, mouseY);<NEW_LINE>renderTooltip(matrixStack, mouseX, mouseY);<NEW_LINE>GL11.glEnable(GL11.GL_CULL_FACE);<NEW_LINE>GL11.glDisable(GL11.GL_BLEND);<NEW_LINE>}
window, mouseX, mouseY, partialTicks);
1,064,720
private void loadNode154() {<NEW_LINE>ServerRedundancyTypeNode node = new ServerRedundancyTypeNode(this.context, Identifiers.ServerType_ServerRedundancy, new QualifiedName(0, "ServerRedundancy"), new LocalizedText("en", "ServerRedundancy"), LocalizedText.NULL_VALUE, UInteger.valueOf(0), UInteger.valueOf(0), UByte.valueOf(0));<NEW_LINE>node.addReference(new Reference(Identifiers.ServerType_ServerRedundancy, Identifiers.HasProperty, Identifiers.ServerType_ServerRedundancy_RedundancySupport.expanded(), true));<NEW_LINE>node.addReference(new Reference(Identifiers.ServerType_ServerRedundancy, Identifiers.HasTypeDefinition, Identifiers.ServerRedundancyType<MASK><NEW_LINE>node.addReference(new Reference(Identifiers.ServerType_ServerRedundancy, Identifiers.HasModellingRule, Identifiers.ModellingRule_Mandatory.expanded(), true));<NEW_LINE>node.addReference(new Reference(Identifiers.ServerType_ServerRedundancy, Identifiers.HasComponent, Identifiers.ServerType.expanded(), false));<NEW_LINE>this.nodeManager.addNode(node);<NEW_LINE>}
.expanded(), true));
438,088
protected void onCreate(Bundle savedInstanceState) {<NEW_LINE>super.onCreate(savedInstanceState);<NEW_LINE>setContentView(R.layout.activity_main);<NEW_LINE>// authentication with an API key or named user is required to access basemaps and other<NEW_LINE>// location services<NEW_LINE>ArcGISRuntimeEnvironment.setApiKey(BuildConfig.API_KEY);<NEW_LINE>// inflate MapView from layout<NEW_LINE>mMapView = <MASK><NEW_LINE>// create a map with the terrain with labels basemap<NEW_LINE>ArcGISMap map = new ArcGISMap(BasemapStyle.ARCGIS_TERRAIN);<NEW_LINE>// create feature layer with its service feature table<NEW_LINE>// create the service feature table<NEW_LINE>ServiceFeatureTable serviceFeatureTable = new ServiceFeatureTable(getResources().getString(R.string.sample_service_url));<NEW_LINE>// create the feature layer using the service feature table<NEW_LINE>FeatureLayer featureLayer = new FeatureLayer(serviceFeatureTable);<NEW_LINE>// add the layer to the map<NEW_LINE>map.getOperationalLayers().add(featureLayer);<NEW_LINE>// set the map to be displayed in the mapview<NEW_LINE>mMapView.setMap(map);<NEW_LINE>// set an initial viewpoint<NEW_LINE>mMapView.setViewpoint(new Viewpoint(new Point(-13176752, 4090404, SpatialReferences.getWebMercator()), 500000));<NEW_LINE>}
findViewById(R.id.mapView);
907,114
public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {<NEW_LINE>super.<MASK><NEW_LINE>if (requestCode == PermissionUtil.PERMISSIONS_READ_CONTACTS_AUTOMATIC) {<NEW_LINE>for (int index = 0; index < permissions.length; index++) {<NEW_LINE>if (Manifest.permission.READ_CONTACTS.equalsIgnoreCase(permissions[index])) {<NEW_LINE>if (grantResults[index] >= 0) {<NEW_LINE>// if approved, exit for loop<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>// if not accepted, disable again<NEW_LINE>binding.contacts.setOnCheckedChangeListener(null);<NEW_LINE>binding.contacts.setChecked(false);<NEW_LINE>binding.contacts.setOnCheckedChangeListener(contactsCheckedListener);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (requestCode == PermissionUtil.PERMISSIONS_READ_CALENDAR_AUTOMATIC) {<NEW_LINE>for (int index = 0; index < permissions.length; index++) {<NEW_LINE>if (Manifest.permission.READ_CALENDAR.equalsIgnoreCase(permissions[index])) {<NEW_LINE>if (grantResults[index] >= 0) {<NEW_LINE>// if approved, exit for loop<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// if not accepted, disable again<NEW_LINE>binding.calendar.setOnCheckedChangeListener(null);<NEW_LINE>binding.calendar.setChecked(false);<NEW_LINE>binding.calendar.setOnCheckedChangeListener(calendarCheckedListener);<NEW_LINE>binding.backupNow.setVisibility(checkBackupNowPermission() ? View.VISIBLE : View.GONE);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>binding.backupNow.setVisibility(checkBackupNowPermission() ? View.VISIBLE : View.GONE);<NEW_LINE>binding.backupNow.setEnabled(checkBackupNowPermission());<NEW_LINE>}
onRequestPermissionsResult(requestCode, permissions, grantResults);
615,098
public BigInteger decryptBlock(CramerShoupCiphertext input) throws CramerShoupCiphertextException {<NEW_LINE>BigInteger result = null;<NEW_LINE>if (key.isPrivate() && !this.forEncryption && key instanceof CramerShoupPrivateKeyParameters) {<NEW_LINE>CramerShoupPrivateKeyParameters sk = (CramerShoupPrivateKeyParameters) key;<NEW_LINE>BigInteger p = sk.getParameters().getP();<NEW_LINE>Digest digest = sk.getParameters().getH();<NEW_LINE>byte[] u1Bytes = input.getU1().toByteArray();<NEW_LINE>digest.update(u1Bytes, 0, u1Bytes.length);<NEW_LINE>byte[] u2Bytes = input.getU2().toByteArray();<NEW_LINE>digest.update(u2Bytes, 0, u2Bytes.length);<NEW_LINE>byte[] eBytes = input.getE().toByteArray();<NEW_LINE>digest.update(eBytes, 0, eBytes.length);<NEW_LINE>if (this.label != null) {<NEW_LINE>byte[] lBytes = this.label;<NEW_LINE>digest.update(lBytes, 0, lBytes.length);<NEW_LINE>}<NEW_LINE>byte[] out = new byte[digest.getDigestSize()];<NEW_LINE>digest.doFinal(out, 0);<NEW_LINE>BigInteger a = new BigInteger(1, out);<NEW_LINE>BigInteger v = input.u1.modPow(sk.getX1().add(sk.getY1().multiply(a)), p).multiply(input.u2.modPow(sk.getX2().add(sk.getY2().multiply(a)), <MASK><NEW_LINE>// check correctness of ciphertext<NEW_LINE>if (input.v.equals(v)) {<NEW_LINE>result = input.e.multiply(input.u1.modPow(sk.getZ(), p).modInverse(p)).mod(p);<NEW_LINE>} else {<NEW_LINE>throw new CramerShoupCiphertextException("Sorry, that ciphertext is not correct");<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return result;<NEW_LINE>}
p)).mod(p);
358,106
public void initComplete(Bus bus) {<NEW_LINE>if (bus == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>LibertyApplicationBus.Type busType = bus.getExtension(LibertyApplicationBus.Type.class);<NEW_LINE>if (busType == null) {<NEW_LINE>if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {<NEW_LINE>Tr.debug(tc, "Unable to recognize the bus type from bus, Global handlers will not be registered and execeuted");<NEW_LINE>}<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (globalHandlerServiceSR.getService() != null) {<NEW_LINE>// In Flow<NEW_LINE>GlobalHandlerInterceptor globalHandlerInInterceptor = new GlobalHandlerInterceptor(Phase.PRE_PROTOCOL_FRONTEND, "in", busType);<NEW_LINE>bus.<MASK><NEW_LINE>// Out Flow<NEW_LINE>GlobalHandlerEntryOutInterceptor globalHandlerOutEntryInterceptor = new GlobalHandlerEntryOutInterceptor("out", busType);<NEW_LINE>bus.getOutInterceptors().add(globalHandlerOutEntryInterceptor);<NEW_LINE>}<NEW_LINE>}
getInInterceptors().add(globalHandlerInInterceptor);
1,463,475
public Spliterator<A> trySplit() {<NEW_LINE>if (spliterators[splitPos] == null)<NEW_LINE>spliterators[splitPos] = collections[splitPos].spliterator();<NEW_LINE>Spliterator<T> res = spliterators[splitPos].trySplit();<NEW_LINE>if (res == null) {<NEW_LINE>if (splitPos == spliterators.length - 1)<NEW_LINE>return null;<NEW_LINE>@SuppressWarnings("unchecked")<NEW_LINE>T[] arr = (T[]) StreamSupport.stream(spliterators[splitPos], false).toArray();<NEW_LINE>if (arr.length == 0)<NEW_LINE>return null;<NEW_LINE>if (arr.length == 1) {<NEW_LINE>accumulate(splitPos, arr[0]);<NEW_LINE>splitPos++;<NEW_LINE>return trySplit();<NEW_LINE>}<NEW_LINE>spliterators[splitPos] = Spliterators.spliterator(arr, Spliterator.ORDERED);<NEW_LINE>return trySplit();<NEW_LINE>}<NEW_LINE>long prefixEst = Long.MAX_VALUE;<NEW_LINE>long newEst = spliterators[splitPos].getExactSizeIfKnown();<NEW_LINE>if (newEst == -1) {<NEW_LINE>newEst = Long.MAX_VALUE;<NEW_LINE>} else {<NEW_LINE>try {<NEW_LINE>for (int i = splitPos + 1; i < collections.length; i++) {<NEW_LINE>long size = collections[i].size();<NEW_LINE>newEst = StrictMath.multiplyExact(newEst, size);<NEW_LINE>}<NEW_LINE>if (est != Long.MAX_VALUE)<NEW_LINE>prefixEst = est - newEst;<NEW_LINE>} catch (ArithmeticException e) {<NEW_LINE>newEst = Long.MAX_VALUE;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>Spliterator<T>[] prefixSpliterators = spliterators.clone();<NEW_LINE>Collection<T>[] prefixCollections = collections.clone();<NEW_LINE>prefixSpliterators[splitPos] = res;<NEW_LINE>this.est = newEst;<NEW_LINE>Arrays.fill(spliterators, splitPos + 1, spliterators.length, null);<NEW_LINE>return <MASK><NEW_LINE>}
doSplit(prefixEst, prefixSpliterators, prefixCollections);
546,648
protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {<NEW_LINE>// $NON-NLS-1$<NEW_LINE>logger.debug("Refreshing authentication token.");<NEW_LINE>ITokenGenerator tokenGenerator = getTokenGenerator();<NEW_LINE>BearerTokenCredentialsBean tokenBean = tokenGenerator.generateToken(req);<NEW_LINE>ObjectMapper mapper = new ObjectMapper();<NEW_LINE>// $NON-NLS-1$<NEW_LINE>resp.setContentType("application/json");<NEW_LINE>// $NON-NLS-1$<NEW_LINE>resp.setDateHeader(<MASK><NEW_LINE>// $NON-NLS-1$<NEW_LINE>resp.setDateHeader("Expires", System.currentTimeMillis() - 86400000L);<NEW_LINE>// $NON-NLS-1$ //$NON-NLS-2$<NEW_LINE>resp.setHeader("Pragma", "no-cache");<NEW_LINE>// $NON-NLS-1$ //$NON-NLS-2$<NEW_LINE>resp.setHeader("Cache-control", "no-cache, no-store, must-revalidate");<NEW_LINE>mapper.writer().writeValue(resp.getOutputStream(), tokenBean);<NEW_LINE>}
"Date", System.currentTimeMillis());
1,418,937
<T> BindingImpl<T> createImplementedByBinding(Key<T> key, Scoping scoping, ImplementedBy implementedBy, Errors errors) throws ErrorsException {<NEW_LINE>Class<?> rawType = key<MASK><NEW_LINE>Class<?> implementationType = implementedBy.value();<NEW_LINE>// Make sure it's not the same type. TODO: Can we check for deeper cycles?<NEW_LINE>if (implementationType == rawType) {<NEW_LINE>throw errors.recursiveImplementationType().toException();<NEW_LINE>}<NEW_LINE>// Make sure implementationType extends type.<NEW_LINE>if (rawType.isAssignableFrom(implementationType) == false) {<NEW_LINE>throw errors.notASubtype(implementationType, rawType).toException();<NEW_LINE>}<NEW_LINE>// After the preceding check, this cast is safe.<NEW_LINE>@SuppressWarnings("unchecked")<NEW_LINE>Class<? extends T> subclass = (Class<? extends T>) implementationType;<NEW_LINE>// Look up the target binding.<NEW_LINE>final Key<? extends T> targetKey = Key.get(subclass);<NEW_LINE>final BindingImpl<? extends T> targetBinding = getBindingOrThrow(targetKey, errors);<NEW_LINE>InternalFactory<T> internalFactory = (errors1, context, dependency) -> targetBinding.getInternalFactory().get(errors1.withSource(targetKey), context, dependency);<NEW_LINE>return new LinkedBindingImpl<>(this, key, rawType, /* source */<NEW_LINE>Scopes.scope(this, internalFactory, scoping), scoping, targetKey);<NEW_LINE>}
.getTypeLiteral().getRawType();
49,395
public static String extractText(final CharSequence html) {<NEW_LINE>if (StringUtils.isBlank(html)) {<NEW_LINE>return StringUtils.EMPTY;<NEW_LINE>}<NEW_LINE>String result = html.toString();<NEW_LINE>// recognize images in textview HTML contents<NEW_LINE>if (html instanceof Spanned) {<NEW_LINE>final Spanned text = (Spanned) html;<NEW_LINE>final Object[] styles = text.getSpans(0, text.length(), Object.class);<NEW_LINE>final List<Pair<Integer, Integer>> removals = new ArrayList<>();<NEW_LINE>for (final Object style : styles) {<NEW_LINE>if (style instanceof ImageSpan) {<NEW_LINE>final int start = text.getSpanStart(style);<NEW_LINE>final int end = text.getSpanEnd(style);<NEW_LINE>removals.add(Pair.of(start, end));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// sort reversed and delete image spans<NEW_LINE>Collections.sort(removals, (lhs, rhs) -> rhs.getRight().compareTo(lhs.getRight()));<NEW_LINE>result = text.toString();<NEW_LINE>for (final Pair<Integer, Integer> removal : removals) {<NEW_LINE>result = result.substring(0, removal.getLeft()) + result.substring(removal.getRight());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// now that images are gone, do a normal html to text conversion<NEW_LINE>return HtmlCompat.fromHtml(result, HtmlCompat.FROM_HTML_MODE_LEGACY)<MASK><NEW_LINE>}
.toString().trim();
92,878
public void open(Configuration parameters) throws Exception {<NEW_LINE>RdbSideTableInfo rdbSideTableInfo = (RdbSideTableInfo) sideInfo.getSideTableInfo();<NEW_LINE>synchronized (RdbAsyncReqRow.class) {<NEW_LINE>if (resourceCheck) {<NEW_LINE>resourceCheck = false;<NEW_LINE>JdbcResourceCheck.getInstance().checkResourceStatus(rdbSideTableInfo.getCheckProperties());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>super.open(parameters);<NEW_LINE>VertxOptions vertxOptions = new VertxOptions();<NEW_LINE>if (clientShare) {<NEW_LINE>rdbSideTableInfo.setAsyncPoolSize(poolSize);<NEW_LINE>}<NEW_LINE>JsonObject jdbcConfig = buildJdbcConfig();<NEW_LINE>System.setProperty("vertx.disableFileCPResolving", "true");<NEW_LINE>vertxOptions.setEventLoopPoolSize(DEFAULT_VERTX_EVENT_LOOP_POOL_SIZE).setWorkerPoolSize(asyncPoolSize).setFileResolverCachingEnabled(false);<NEW_LINE>executor = new ThreadPoolExecutor(MAX_DB_CONN_POOL_SIZE_LIMIT, MAX_DB_CONN_POOL_SIZE_LIMIT, 0, TimeUnit.MILLISECONDS, new LinkedBlockingQueue<>(MAX_TASK_QUEUE_SIZE), new DTThreadFactory("rdbAsyncExec"), new ThreadPoolExecutor.CallerRunsPolicy());<NEW_LINE>vertx = Vertx.vertx(vertxOptions);<NEW_LINE>if (clientShare) {<NEW_LINE>rdbSqlClientPool.putIfAbsent(url, JDBCClient.createNonShared(vertx, jdbcConfig));<NEW_LINE>LOG.info("{} lru type open connection share, url:{}, rdbSqlClientPool size:{}, rdbSqlClientPool:{}", rdbSideTableInfo.getType(), url, rdbSqlClientPool.size(), rdbSqlClientPool);<NEW_LINE>} else {<NEW_LINE>this.rdbSqlClient = <MASK><NEW_LINE>}<NEW_LINE>}
JDBCClient.createNonShared(vertx, jdbcConfig);
709,303
public synchronized static void initializePython() {<NEW_LINE>if (isInitialized.get())<NEW_LINE>return;<NEW_LINE>// Set the Jython package cache directory.<NEW_LINE>Properties jythonProperties = new Properties();<NEW_LINE>String jythonCacheDir = Platform.getUserDataDirectory() + Platform.SEP + "_jythoncache";<NEW_LINE>jythonProperties.put("python.cachedir", jythonCacheDir);<NEW_LINE>// Initialize Python.<NEW_LINE>PySystemState.initialize(System.getProperties(), jythonProperties, new String[] { "" });<NEW_LINE>// Add the built-in Python libraries.<NEW_LINE>File nodeBoxLibraries <MASK><NEW_LINE>Py.getSystemState().path.add(new PyString(nodeBoxLibraries.getAbsolutePath()));<NEW_LINE>// This folder contains unarchived NodeBox libraries.<NEW_LINE>// Only used in development.<NEW_LINE>File developmentLibraries = new File("src/main/python");<NEW_LINE>Py.getSystemState().path.add(new PyString(developmentLibraries.getAbsolutePath()));<NEW_LINE>// Add the user's Python directory.<NEW_LINE>Py.getSystemState().path.add(new PyString(Platform.getUserPythonDirectory().getAbsolutePath()));<NEW_LINE>isInitialized.set(true);<NEW_LINE>}
= new File(libDir, "nodeboxlibs.zip");
109,580
public boolean apply(Game game, Ability source) {<NEW_LINE>Player controller = game.getPlayer(source.getControllerId());<NEW_LINE>if (controller == null) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>int xValue = source.getManaCostsToPay().getX();<NEW_LINE>if (xValue == 1 || xValue >= 4) {<NEW_LINE>controller.scry(1, source, game);<NEW_LINE>controller.drawCards(1, source, game);<NEW_LINE>}<NEW_LINE>if (xValue == 3 || xValue >= 4) {<NEW_LINE>new Elemental44Token().putOntoBattlefield(1, game, source, source.getControllerId());<NEW_LINE>}<NEW_LINE>if (xValue != 2 && xValue < 4) {<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>TargetPlayer targetPlayer = new TargetPlayer(0, 1, true);<NEW_LINE>controller.choose(Outcome.Detriment, targetPlayer, source, game);<NEW_LINE>Player player = game.getPlayer(targetPlayer.getFirstTarget());<NEW_LINE>if (player == null || game.getBattlefield().count(StaticFilters.FILTER_CONTROLLED_CREATURE, player.getId(), source, game) <= 0) {<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>TargetPermanent targetPermanent = new TargetControlledCreaturePermanent();<NEW_LINE>targetPermanent.setNotTarget(true);<NEW_LINE>player.choose(Outcome.ReturnToHand, targetPermanent, source, game);<NEW_LINE>Permanent permanent = game.getPermanent(targetPermanent.getFirstTarget());<NEW_LINE>return permanent == null || player.moveCards(permanent, <MASK><NEW_LINE>}
Zone.HAND, source, game);
250,051
public void resetReaderGroup() {<NEW_LINE>log.<MASK><NEW_LINE>synchronizer.fetchUpdates();<NEW_LINE>// reset the reader group to last completed checkpoint, If there is no successfully completed last checkpoint then reset back to start of streamcut<NEW_LINE>val latestCheckpointConfig = synchronizer.getState().getConfig();<NEW_LINE>ReaderGroupConfig config = latestCheckpointConfig;<NEW_LINE>Optional<Map<Stream, Map<Segment, Long>>> lastCheckPointPositions = synchronizer.getState().getPositionsForLastCompletedCheckpoint();<NEW_LINE>if (lastCheckPointPositions.isPresent()) {<NEW_LINE>Map<Stream, StreamCut> streamCuts = new HashMap<>();<NEW_LINE>for (Entry<Stream, Map<Segment, Long>> streamPosition : lastCheckPointPositions.get().entrySet()) {<NEW_LINE>streamCuts.put(streamPosition.getKey(), new StreamCutImpl(streamPosition.getKey(), streamPosition.getValue()));<NEW_LINE>}<NEW_LINE>config = latestCheckpointConfig.toBuilder().startingStreamCuts(streamCuts).build();<NEW_LINE>} else {<NEW_LINE>log.info("Reset reader group to last completed checkpoint is not successful as there is no checkpoint available, so resetting to start of stream cut. ");<NEW_LINE>}<NEW_LINE>resetReaderGroup(config);<NEW_LINE>}
info("Reset ReaderGroup {} to successfully last completed checkpoint", getGroupName());
1,269,833
public void processBindingConfiguration(String context, Item item, String bindingConfig) throws BindingConfigParseException {<NEW_LINE>super.processBindingConfiguration(context, item, bindingConfig);<NEW_LINE>if (bindingConfig == null || bindingConfig.trim().isEmpty()) {<NEW_LINE>// empty binding - nothing to do<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>final String[] segments = bindingConfig.trim().split(":");<NEW_LINE>if (segments.length != 2) {<NEW_LINE>throw new BindingConfigParseException("Invalid binding format '" + bindingConfig + "', expected: '<anelId>:<property>'");<NEW_LINE>}<NEW_LINE>final String deviceId = segments[0];<NEW_LINE>final String commandType = segments[1];<NEW_LINE>try {<NEW_LINE>AnelCommandType.validateBinding(commandType, item.getClass());<NEW_LINE>final AnelCommandType cmdType = AnelCommandType.getCommandType(commandType);<NEW_LINE>// if command type was validated successfully, add binding config<NEW_LINE>addBindingConfig(item, new AnelBindingConfig(item.getClass<MASK><NEW_LINE>} catch (IllegalArgumentException e) {<NEW_LINE>throw new BindingConfigParseException("'" + commandType + "' is not a valid Anel property");<NEW_LINE>} catch (InvalidClassException e) {<NEW_LINE>throw new BindingConfigParseException("Invalid class for Anel property '" + commandType + "'");<NEW_LINE>}<NEW_LINE>}
(), cmdType, deviceId));
882,014
public void check() throws SQLException {<NEW_LINE>super.check();<NEW_LINE>select.setWhereClause(null);<NEW_LINE>String originalQueryString = SQLite3Visitor.asString(select);<NEW_LINE>List<String> resultSet = ComparatorHelper.getResultSetFirstColumnAsString(originalQueryString, errors, state);<NEW_LINE>boolean orderBy = Randomly.getBooleanWithSmallProbability();<NEW_LINE>if (orderBy) {<NEW_LINE>select.setOrderByExpressions(gen.generateOrderBys());<NEW_LINE>}<NEW_LINE>select.setWhereClause(predicate);<NEW_LINE>String firstQueryString = SQLite3Visitor.asString(select);<NEW_LINE>select.setWhereClause(negatedPredicate);<NEW_LINE>String secondQueryString = SQLite3Visitor.asString(select);<NEW_LINE>select.setWhereClause(isNullPredicate);<NEW_LINE>String <MASK><NEW_LINE>List<String> combinedString = new ArrayList<>();<NEW_LINE>List<String> secondResultSet = ComparatorHelper.getCombinedResultSet(firstQueryString, secondQueryString, thirdQueryString, combinedString, !orderBy, state, errors);<NEW_LINE>ComparatorHelper.assumeResultSetsAreEqual(resultSet, secondResultSet, originalQueryString, combinedString, state);<NEW_LINE>}
thirdQueryString = SQLite3Visitor.asString(select);
1,673,928
public void addFormForEditAccount() {<NEW_LINE>gridRowFrom = gridRow;<NEW_LINE>addAccountNameTextFieldWithAutoFillToggleButton();<NEW_LINE>addCompactTopLabelTextField(gridPane, ++gridRow, Res.get("shared.paymentMethod"), Res.get(paymentAccount.getPaymentMethod<MASK><NEW_LINE>TextField field = addCompactTopLabelTextField(gridPane, ++gridRow, Res.get("payment.email.mobile"), amazonGiftCardAccount.getEmailOrMobileNr()).second;<NEW_LINE>field.setMouseTransparent(false);<NEW_LINE>addCompactTopLabelTextField(gridPane, ++gridRow, Res.get("payment.country"), amazonGiftCardAccount.getCountry() != null ? amazonGiftCardAccount.getCountry().name : "");<NEW_LINE>String nameAndCode = paymentAccount.getSingleTradeCurrency() != null ? paymentAccount.getSingleTradeCurrency().getNameAndCode() : "";<NEW_LINE>addCompactTopLabelTextField(gridPane, ++gridRow, Res.get("shared.currency"), nameAndCode);<NEW_LINE>addLimitations(true);<NEW_LINE>}
().getId()));
1,552,632
public static // raw_text | magic_comment | comment | environment | pseudocode_block | math_environment | COMMAND_IFNEXTCHAR | commands | group | OPEN_PAREN | CLOSE_PAREN | parameter_text | BACKSLASH | OPEN_ANGLE_BRACKET | CLOSE_ANGLE_BRACKET<NEW_LINE>boolean optional_param_content(PsiBuilder b, int l) {<NEW_LINE>if (!recursion_guard_(b, l, "optional_param_content"))<NEW_LINE>return false;<NEW_LINE>boolean r;<NEW_LINE>Marker m = enter_section_(b, l, _NONE_, OPTIONAL_PARAM_CONTENT, "<optional param content>");<NEW_LINE>r = raw_text(b, l + 1);<NEW_LINE>if (!r)<NEW_LINE>r = magic_comment(b, l + 1);<NEW_LINE>if (!r)<NEW_LINE>r = comment(b, l + 1);<NEW_LINE>if (!r)<NEW_LINE>r = environment(b, l + 1);<NEW_LINE>if (!r)<NEW_LINE>r = pseudocode_block(b, l + 1);<NEW_LINE>if (!r)<NEW_LINE>r = math_environment(b, l + 1);<NEW_LINE>if (!r)<NEW_LINE>r = consumeToken(b, COMMAND_IFNEXTCHAR);<NEW_LINE>if (!r)<NEW_LINE>r = commands(b, l + 1);<NEW_LINE>if (!r)<NEW_LINE>r = group(b, l + 1);<NEW_LINE>if (!r)<NEW_LINE>r = consumeToken(b, OPEN_PAREN);<NEW_LINE>if (!r)<NEW_LINE>r = consumeToken(b, CLOSE_PAREN);<NEW_LINE>if (!r)<NEW_LINE>r = parameter_text(b, l + 1);<NEW_LINE>if (!r)<NEW_LINE>r = consumeToken(b, BACKSLASH);<NEW_LINE>if (!r)<NEW_LINE><MASK><NEW_LINE>if (!r)<NEW_LINE>r = consumeToken(b, CLOSE_ANGLE_BRACKET);<NEW_LINE>exit_section_(b, l, m, r, false, null);<NEW_LINE>return r;<NEW_LINE>}
r = consumeToken(b, OPEN_ANGLE_BRACKET);
1,213,382
public void fillList() {<NEW_LINE>// Carlos Ruiz - globalqss - improve to avoid going to the database on every keystroke<NEW_LINE>m_cities.clear();<NEW_LINE>m_citiesShow.clear();<NEW_LINE>ArrayList<Object> params = new ArrayList<Object>();<NEW_LINE>final StringBuffer sql = new StringBuffer("SELECT cy.C_City_ID, cy.Name, cy.C_Region_ID, r.Name" + " FROM C_City cy" + " LEFT OUTER JOIN C_Region r ON (r.C_Region_ID=cy.C_Region_ID)" + " WHERE cy.AD_Client_ID IN (0,?)");<NEW_LINE>params.add(getAD_Client_ID());<NEW_LINE>if (getC_Region_ID() > 0) {<NEW_LINE>sql.append(" AND cy.C_Region_ID=?");<NEW_LINE>params.add(getC_Region_ID());<NEW_LINE>}<NEW_LINE>if (getC_Country_ID() > 0) {<NEW_LINE>sql.append(" AND cy.C_Country_ID=?");<NEW_LINE>params.add(getC_Country_ID());<NEW_LINE>}<NEW_LINE>sql.append(" ORDER BY cy.Name, r.Name");<NEW_LINE>PreparedStatement pstmt = null;<NEW_LINE>ResultSet rs = null;<NEW_LINE>try {<NEW_LINE>pstmt = DB.prepareStatement(<MASK><NEW_LINE>DB.setParameters(pstmt, params);<NEW_LINE>rs = pstmt.executeQuery();<NEW_LINE>int i = 0;<NEW_LINE>while (rs.next()) {<NEW_LINE>CityVO vo = new CityVO(rs.getInt(1), rs.getString(2), rs.getInt(3), rs.getString(4));<NEW_LINE>m_cities.add(vo);<NEW_LINE>if (i <= m_maxRows) {<NEW_LINE>m_citiesShow.add(vo);<NEW_LINE>} else if (i == m_maxRows + 1 && i > 0) {<NEW_LINE>m_citiesShow.add(ITEM_More);<NEW_LINE>}<NEW_LINE>i++;<NEW_LINE>}<NEW_LINE>} catch (SQLException e) {<NEW_LINE>throw new DBException(e, sql.toString());<NEW_LINE>} finally {<NEW_LINE>DB.close(rs, pstmt);<NEW_LINE>rs = null;<NEW_LINE>pstmt = null;<NEW_LINE>}<NEW_LINE>refreshData("");<NEW_LINE>}
sql.toString(), null);
840,880
private boolean showPopupMenu(int row, int col, int x, int y) {<NEW_LINE>JTable table = actionsTable;<NEW_LINE>if (col != 1) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>Object valueAt = table.getValueAt(row, col);<NEW_LINE>ShortcutCellPanel scCell = (ShortcutCellPanel) table.getCellRenderer(row, col).getTableCellRendererComponent(table, valueAt, true, true, row, col);<NEW_LINE>Rectangle cellRect = table.getCellRect(row, col, false);<NEW_LINE>JButton button = scCell.getButton();<NEW_LINE>if (x < 0 || x > (cellRect.x + cellRect.width - button.getWidth())) {<NEW_LINE>// inside changeButton<NEW_LINE>boolean isShortcutSet = scCell.getTextField().getText().length() != 0;<NEW_LINE>final ShortcutPopupPanel panel = (ShortcutPopupPanel) popup.getComponents()[0];<NEW_LINE>panel.setDisplayAddAlternative(isShortcutSet);<NEW_LINE>panel.setRow(row);<NEW_LINE>if (x == -1 || y == -1) {<NEW_LINE>x <MASK><NEW_LINE>y = button.getY() + 1;<NEW_LINE>}<NEW_LINE>panel.setCustomProfile(keymapModel.getMutableModel().isCustomProfile(keymapModel.getMutableModel().getCurrentProfile()));<NEW_LINE>popup.show(table, x, y);<NEW_LINE>SwingUtilities.invokeLater(new Runnable() {<NEW_LINE><NEW_LINE>public void run() {<NEW_LINE>panel.requestFocus();<NEW_LINE>}<NEW_LINE>});<NEW_LINE>popup.requestFocus();<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>return false;<NEW_LINE>}
= button.getX() + 1;
611,565
public CreateRelationalDatabaseResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>CreateRelationalDatabaseResult createRelationalDatabaseResult = new CreateRelationalDatabaseResult();<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 createRelationalDatabaseResult;<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("operations", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>createRelationalDatabaseResult.setOperations(new ListUnmarshaller<Operation>(OperationJsonUnmarshaller.getInstance(<MASK><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 createRelationalDatabaseResult;<NEW_LINE>}
)).unmarshall(context));
6,427
private void deleteCommits() throws IOException {<NEW_LINE>int size = commitsToDelete.size();<NEW_LINE>if (size > 0) {<NEW_LINE>// First decref all files that had been referred to by<NEW_LINE>// the now-deleted commits:<NEW_LINE>Throwable firstThrowable = null;<NEW_LINE>for (int i = 0; i < size; i++) {<NEW_LINE>CommitPoint commit = commitsToDelete.get(i);<NEW_LINE>if (infoStream.isEnabled("IFD")) {<NEW_LINE>infoStream.message("IFD", "deleteCommits: now decRef commit \"" + <MASK><NEW_LINE>}<NEW_LINE>try {<NEW_LINE>decRef(commit.files);<NEW_LINE>} catch (Throwable t) {<NEW_LINE>firstThrowable = IOUtils.useOrSuppress(firstThrowable, t);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>commitsToDelete.clear();<NEW_LINE>// Now compact commits to remove deleted ones (preserving the sort):<NEW_LINE>size = commits.size();<NEW_LINE>int readFrom = 0;<NEW_LINE>int writeTo = 0;<NEW_LINE>while (readFrom < size) {<NEW_LINE>CommitPoint commit = commits.get(readFrom);<NEW_LINE>if (!commit.deleted) {<NEW_LINE>if (writeTo != readFrom) {<NEW_LINE>commits.set(writeTo, commits.get(readFrom));<NEW_LINE>}<NEW_LINE>writeTo++;<NEW_LINE>}<NEW_LINE>readFrom++;<NEW_LINE>}<NEW_LINE>while (size > writeTo) {<NEW_LINE>commits.remove(size - 1);<NEW_LINE>size--;<NEW_LINE>}<NEW_LINE>if (firstThrowable != null) {<NEW_LINE>throw IOUtils.rethrowAlways(firstThrowable);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
commit.getSegmentsFileName() + "\"");
374,497
public void selectNode(final PsiElement element, final PsiFileSystemItem file, final boolean requestFocus) {<NEW_LINE>final Runnable runnable = new Runnable() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void run() {<NEW_LINE>myUpdateQueue.queue(new Update("Select") {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void run() {<NEW_LINE>if (myProject.isDisposed())<NEW_LINE>return;<NEW_LINE>PackageDependenciesNode node = myBuilder.findNode(file, element);<NEW_LINE>if (node != null && node.getPsiElement() != element) {<NEW_LINE>final TreePath path = new TreePath(node.getPath());<NEW_LINE>if (myTree.isCollapsed(path)) {<NEW_LINE>myTree.expandPath(path);<NEW_LINE>myTree.makeVisible(path);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>node = myBuilder.findNode(file, element);<NEW_LINE>if (node != null) {<NEW_LINE>TreeUtil.selectPath(myTree, new TreePath<MASK><NEW_LINE>if (requestFocus) {<NEW_LINE>IdeFocusManager.getGlobalInstance().doForceFocusWhenFocusSettlesDown(myTree);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>});<NEW_LINE>}<NEW_LINE>};<NEW_LINE>doWhenDone(runnable);<NEW_LINE>}
(node.getPath()));
888,523
/*<NEW_LINE>* Registers a subcontext with red5<NEW_LINE>*/<NEW_LINE>public void registerSubContext(String webAppKey) {<NEW_LINE>// get the sub contexts - servlet context<NEW_LINE>ServletContext ctx = servletContext.getContext(webAppKey);<NEW_LINE>if (ctx == null) {<NEW_LINE>ctx = servletContext;<NEW_LINE>}<NEW_LINE>ContextLoader loader = new ContextLoader();<NEW_LINE>ConfigurableWebApplicationContext appCtx = (ConfigurableWebApplicationContext) loader.initWebApplicationContext(ctx);<NEW_LINE>appCtx.setParent(applicationContext);<NEW_LINE>appCtx.refresh();<NEW_LINE>ctx.setAttribute(WebApplicationContext.ROOT_WEB_APPLICATION_CONTEXT_ATTRIBUTE, appCtx);<NEW_LINE>ConfigurableBeanFactory appFactory = appCtx.getBeanFactory();<NEW_LINE>logger.debug("About to grab Webcontext bean for {}", webAppKey);<NEW_LINE>Context webContext = (<MASK><NEW_LINE>webContext.setCoreBeanFactory(parentFactory);<NEW_LINE>webContext.setClientRegistry(clientRegistry);<NEW_LINE>webContext.setServiceInvoker(globalInvoker);<NEW_LINE>webContext.setScopeResolver(globalResolver);<NEW_LINE>webContext.setMappingStrategy(globalStrategy);<NEW_LINE>WebScope scope = (WebScope) appFactory.getBean("web.scope");<NEW_LINE>scope.setServer(server);<NEW_LINE>scope.setParent(global);<NEW_LINE>scope.register();<NEW_LINE>scope.start();<NEW_LINE>// register the context so we dont try to reinitialize it<NEW_LINE>registeredContexts.add(ctx);<NEW_LINE>}
Context) appCtx.getBean("web.context");
1,497,836
private void handleMultiChannelEndpointReportResponse(SerialMessage serialMessage, int offset) {<NEW_LINE>logger.debug("Process Multi-channel endpoint Report");<NEW_LINE>boolean changingNumberOfEndpoints = (serialMessage.getMessagePayloadByte(offset) & 0x80) != 0;<NEW_LINE>endpointsAreTheSameDeviceClass = (serialMessage.getMessagePayloadByte(offset) & 0x40) != 0;<NEW_LINE>int endpoints = serialMessage.<MASK><NEW_LINE>logger.debug("NODE {}: Changing number of endpoints = {}", this.getNode().getNodeId(), changingNumberOfEndpoints ? "true" : false);<NEW_LINE>logger.debug("NODE {}: Endpoints are the same device class = {}", this.getNode().getNodeId(), endpointsAreTheSameDeviceClass ? "true" : false);<NEW_LINE>logger.debug("NODE {}: Number of endpoints = {}", this.getNode().getNodeId(), endpoints);<NEW_LINE>// TODO: handle dynamically added endpoints. Have never seen such a device.<NEW_LINE>if (changingNumberOfEndpoints) {<NEW_LINE>logger.warn("NODE {}: Changing number of endpoints, expect some weird behavior during multi channel handling.", this.getNode().getNodeId());<NEW_LINE>}<NEW_LINE>// Add all the endpoints<NEW_LINE>for (int i = 1; i <= endpoints; i++) {<NEW_LINE>ZWaveEndpoint endpoint = new ZWaveEndpoint(i);<NEW_LINE>this.endpoints.put(i, endpoint);<NEW_LINE>}<NEW_LINE>}
getMessagePayloadByte(offset + 1) & 0x7F;
98,559
public String shortSummary() {<NEW_LINE>StringBuilder sb = new StringBuilder();<NEW_LINE>sb.append("[reason=").append(reason).append("]");<NEW_LINE>sb.append(", at[").append(DATE_TIME_FORMATTER.format(Instant.ofEpochMilli(unassignedTimeMillis<MASK><NEW_LINE>if (failedAllocations > 0) {<NEW_LINE>sb.append(", failed_attempts[").append(failedAllocations).append("]");<NEW_LINE>}<NEW_LINE>if (failedNodeIds.isEmpty() == false) {<NEW_LINE>sb.append(", failed_nodes[").append(failedNodeIds).append("]");<NEW_LINE>}<NEW_LINE>sb.append(", delayed=").append(delayed);<NEW_LINE>String details = getDetails();<NEW_LINE>if (details != null) {<NEW_LINE>sb.append(", details[").append(details).append("]");<NEW_LINE>}<NEW_LINE>sb.append(", allocation_status[").append(lastAllocationStatus.value()).append("]");<NEW_LINE>return sb.toString();<NEW_LINE>}
))).append("]");
1,528,567
protected void handleSuccess(Response response, Request<List<ThreadChannel>> request) {<NEW_LINE><MASK><NEW_LINE>DataArray selfThreadMembers = obj.getArray("members");<NEW_LINE>DataArray threads = obj.getArray("threads");<NEW_LINE>List<ThreadChannel> list = new ArrayList<>(threads.length());<NEW_LINE>EntityBuilder builder = api.getEntityBuilder();<NEW_LINE>TLongObjectMap<DataObject> selfThreadMemberMap = new TLongObjectHashMap<>();<NEW_LINE>for (int i = 0; i < selfThreadMembers.length(); i++) {<NEW_LINE>DataObject selfThreadMember = selfThreadMembers.getObject(i);<NEW_LINE>// Store the thread member based on the "id" which is the _thread's_ id, not the member's id (which would be our id)<NEW_LINE>selfThreadMemberMap.put(selfThreadMember.getLong("id"), selfThreadMember);<NEW_LINE>}<NEW_LINE>for (int i = 0; i < threads.length(); i++) {<NEW_LINE>try {<NEW_LINE>DataObject threadObj = threads.getObject(i);<NEW_LINE>DataObject selfThreadMemberObj = selfThreadMemberMap.get(threadObj.getLong("id", 0));<NEW_LINE>if (selfThreadMemberObj != null) {<NEW_LINE>// Combine the thread and self thread-member into a single object to model what we get from<NEW_LINE>// thread payloads (like from Gateway, etc)<NEW_LINE>threadObj.put("member", selfThreadMemberObj);<NEW_LINE>}<NEW_LINE>ThreadChannel thread = builder.createThreadChannel(threadObj, getGuild().getIdLong());<NEW_LINE>list.add(thread);<NEW_LINE>if (this.useCache)<NEW_LINE>this.cached.add(thread);<NEW_LINE>this.last = thread;<NEW_LINE>this.lastKey = last.getIdLong();<NEW_LINE>} catch (ParsingException | NullPointerException e) {<NEW_LINE>LOG.warn("Encountered exception in ThreadChannelPagination", e);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>request.onSuccess(list);<NEW_LINE>}
DataObject obj = response.getObject();
1,150,412
public void markupAsDeletion(org.docx4j.wml.SdtContentBlock cbLeft, javax.xml.transform.Result result, String author, java.util.Calendar date, RelationshipsPart docPartRelsRight) {<NEW_LINE>Writer diffxResult = new StringWriter();<NEW_LINE>try {<NEW_LINE>// Now marshall it<NEW_LINE>JAXBContext jc = Context.jc;<NEW_LINE>Marshaller marshaller = jc.createMarshaller();<NEW_LINE>org.w3c.dom.Document doc = org.docx4j.XmlUtils.neww3cDomDocument();<NEW_LINE>marshaller.marshal(cbLeft, doc);<NEW_LINE>Map<String, Object> transformParameters = new java.util.HashMap<String, Object>();<NEW_LINE>if (date != null) {<NEW_LINE>String dateString = RFC3339_FORMAT.format(date.getTime());<NEW_LINE>transformParameters.put("date", dateString);<NEW_LINE>}<NEW_LINE>transformParameters.put("Differencer", this);<NEW_LINE>transformParameters.put("author", author);<NEW_LINE>transformParameters.put("docPartRelsLeft", null);<NEW_LINE>transformParameters.put("docPartRelsRight", docPartRelsRight);<NEW_LINE><MASK><NEW_LINE>log.debug("applying xsltMarkupDelete");<NEW_LINE>XmlUtils.transform(doc, xsltMarkupDelete, transformParameters, result);<NEW_LINE>} catch (Exception exc) {<NEW_LINE>exc.printStackTrace();<NEW_LINE>}<NEW_LINE>}
transformParameters.put("relsDiffIdentifier", relsDiffIdentifier);
1,676,126
public void emit(StringBuilder builder) {<NEW_LINE>StringBuilder prefixBuilder = new StringBuilder();<NEW_LINE>StringBuilder postfixBuilder = new StringBuilder();<NEW_LINE>prefixBuilder.append(String.format(": [%04X:%08X], Length: %08X, ", symbolSegment, symbolOffset, procedureLength));<NEW_LINE>postfixBuilder.append(String.format(": %s, ", <MASK><NEW_LINE>postfixBuilder.append(String.format(" Parent: %08X, End: %08X, Next: %08X\n", parentPointer, endPointer, nextPointer));<NEW_LINE>postfixBuilder.append(String.format(" Debug start: %08X, Debug end: %08X\n", debugStartOffset, debugEndOffset));<NEW_LINE>postfixBuilder.append(String.format(" Reg Save: %08X, FP Save: %08X, Int Offset: %08X, FP Offset: %08X\n", integerRegisterSaveMask, floatingPointRegisterSaveMask, integerRegisterSaveOffset, floatingPointRegisterSaveOffset));<NEW_LINE>postfixBuilder.append(String.format(" Return Reg: %s, Frame Reg: %s\n", registerContainingReturnValue, registerContainingFramePointer));<NEW_LINE>builder.insert(0, prefixBuilder);<NEW_LINE>builder.append(postfixBuilder);<NEW_LINE>}
pdb.getTypeRecord(typeRecordNumber)));
1,748,733
public LoadMappingsResult load(List<MappingFileData> mappings) {<NEW_LINE>Configuration globalConfiguration = findConfiguration(mappings);<NEW_LINE>ClassMappings customMappings = new ClassMappings(beanContainer);<NEW_LINE>// Decorate the raw ClassMap objects and create ClassMap "prime" instances<NEW_LINE>for (MappingFileData mappingFileData : mappings) {<NEW_LINE>List<ClassMap> classMaps = mappingFileData.getClassMaps();<NEW_LINE>ClassMappings customMappingsPrime = mappingsParser.processMappings(classMaps, globalConfiguration);<NEW_LINE>customMappings.addAll(customMappingsPrime);<NEW_LINE>}<NEW_LINE>// Add default mappings using matching property names if wildcard policy<NEW_LINE>// is true. The addDefaultFieldMappings will check the wildcard policy of each classmap<NEW_LINE>classMapBuilder.addDefaultFieldMappings(customMappings, globalConfiguration);<NEW_LINE>Set<CustomConverterDescription> customConverterDescriptions = new LinkedHashSet<>();<NEW_LINE>// build up custom converter description objects<NEW_LINE>if (globalConfiguration.getCustomConverters() != null && globalConfiguration.getCustomConverters().getConverters() != null) {<NEW_LINE>for (CustomConverterDescription cc : globalConfiguration.getCustomConverters().getConverters()) {<NEW_LINE>customConverterDescriptions.add(cc);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// iterate through the classmaps and set all of the custom converters on them<NEW_LINE>for (Entry<String, ClassMap> entry : customMappings.getAll().entrySet()) {<NEW_LINE>ClassMap classMap = entry.getValue();<NEW_LINE>if (classMap.getCustomConverters() != null) {<NEW_LINE>classMap.getCustomConverters().setConverters(<MASK><NEW_LINE>} else {<NEW_LINE>classMap.setCustomConverters(new CustomConverterContainer());<NEW_LINE>classMap.getCustomConverters().setConverters(new ArrayList<>(customConverterDescriptions));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>addDefaultCustomConverters(globalConfiguration);<NEW_LINE>return new LoadMappingsResult(customMappings, globalConfiguration);<NEW_LINE>}
new ArrayList<>(customConverterDescriptions));
594,428
static // [START securitycenter_group_findings_with_source]<NEW_LINE>ImmutableList<GroupResult> groupFindingsWithSource(SourceName sourceName) {<NEW_LINE>try (SecurityCenterClient client = SecurityCenterClient.create()) {<NEW_LINE>// SourceName sourceName = SourceName.of(/*organization=*/"123234324",/*source=*/<NEW_LINE>// "423432321");<NEW_LINE>GroupFindingsRequest.Builder request = GroupFindingsRequest.newBuilder().setParent(sourceName.toString()).setGroupBy("category");<NEW_LINE>// Call the API.<NEW_LINE>GroupFindingsPagedResponse response = client.groupFindings(request.build());<NEW_LINE>// This creates one list for all findings. If your organization has a large number of<NEW_LINE>// findings<NEW_LINE>// this can cause out of memory issues. You can process them batches by returning<NEW_LINE>// the Iterable returned response.iterateAll() directly.<NEW_LINE>ImmutableList<GroupResult> results = ImmutableList.<MASK><NEW_LINE>System.out.println("Findings:");<NEW_LINE>System.out.println(results);<NEW_LINE>return results;<NEW_LINE>} catch (IOException e) {<NEW_LINE>throw new RuntimeException("Couldn't create client.", e);<NEW_LINE>}<NEW_LINE>}
copyOf(response.iterateAll());
307,587
public void render(TileEntityTurbineRotor tile, PoseStack matrix, VertexConsumer buffer, int light, int overlayLight) {<NEW_LINE>int housedBlades = tile.getHousedBlades();<NEW_LINE>if (housedBlades == 0) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>int baseIndex <MASK><NEW_LINE>if (!Minecraft.getInstance().isPaused()) {<NEW_LINE>UUID multiblockUUID = tile.getMultiblockUUID();<NEW_LINE>if (multiblockUUID != null && TurbineMultiblockData.clientRotationMap.containsKey(multiblockUUID)) {<NEW_LINE>float rotateSpeed = TurbineMultiblockData.clientRotationMap.getFloat(multiblockUUID) * BASE_SPEED;<NEW_LINE>tile.rotationLower = (tile.rotationLower + rotateSpeed * (1F / (baseIndex + 1))) % 360;<NEW_LINE>tile.rotationUpper = (tile.rotationUpper + rotateSpeed * (1F / (baseIndex + 2))) % 360;<NEW_LINE>} else {<NEW_LINE>tile.rotationLower = tile.rotationLower % 360;<NEW_LINE>tile.rotationUpper = tile.rotationUpper % 360;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// Bottom blade<NEW_LINE>matrix.pushPose();<NEW_LINE>matrix.translate(0.5, -1, 0.5);<NEW_LINE>matrix.mulPose(Vector3f.YP.rotationDegrees(tile.rotationLower));<NEW_LINE>model.render(matrix, buffer, light, overlayLight, baseIndex);<NEW_LINE>matrix.popPose();<NEW_LINE>// Top blade<NEW_LINE>if (housedBlades == 2) {<NEW_LINE>matrix.pushPose();<NEW_LINE>matrix.translate(0.5, -0.5, 0.5);<NEW_LINE>matrix.mulPose(Vector3f.YP.rotationDegrees(tile.rotationUpper));<NEW_LINE>model.render(matrix, buffer, light, overlayLight, baseIndex + 1);<NEW_LINE>matrix.popPose();<NEW_LINE>}<NEW_LINE>}
= tile.getPosition() * 2;
318,730
private static void fixExtents(LayoutMasterSet lms, AbstractWmlConversionContext context, boolean useXSLT) {<NEW_LINE>WordprocessingMLPackage wordMLPackage = context.getWmlPackage();<NEW_LINE>StartEvent startEvent = new StartEvent(wordMLPackage, WellKnownProcessSteps.FO_EXTENTS);<NEW_LINE>startEvent.publish();<NEW_LINE>// log.debug(wordMLPackage.getMainDocumentPart().getXML());<NEW_LINE>if (log.isDebugEnabled()) {<NEW_LINE>log.debug("incoming LMS: " + XmlUtils.marshaltoString(lms, Context.getXslFoContext()));<NEW_LINE>}<NEW_LINE>// Make a copy of it<NEW_LINE>Set<String> relationshipTypes = new TreeSet<String>();<NEW_LINE>relationshipTypes.add(Namespaces.DOCUMENT);<NEW_LINE>relationshipTypes.add(Namespaces.HEADER);<NEW_LINE>relationshipTypes.add(Namespaces.FOOTER);<NEW_LINE>// those are probably not affected but get visited by the<NEW_LINE>// default TraversalUtil.<NEW_LINE>relationshipTypes.add(Namespaces.ENDNOTES);<NEW_LINE>relationshipTypes.add(Namespaces.FOOTNOTES);<NEW_LINE>relationshipTypes.add(Namespaces.COMMENTS);<NEW_LINE>WordprocessingMLPackage hfPkg;<NEW_LINE>try {<NEW_LINE>hfPkg = (WordprocessingMLPackage) PartialDeepCopy.process(wordMLPackage, relationshipTypes);<NEW_LINE>FOPAreaTreeHelper.trimContent(hfPkg);<NEW_LINE>FOSettings foSettings = (FOSettings) context.getConversionSettings();<NEW_LINE>org.w3c.dom.Document areaTree = FOPAreaTreeHelper.getAreaTreeViaFOP(hfPkg, useXSLT, foSettings);<NEW_LINE>log.debug(XmlUtils.w3CDomNodeToString(areaTree));<NEW_LINE>Map<String, Integer> headerBpda = new HashMap<String, Integer>();<NEW_LINE>Map<String, Integer> footerBpda = new HashMap<String, Integer>();<NEW_LINE>FOPAreaTreeHelper.calculateHFExtents(areaTree, headerBpda, footerBpda);<NEW_LINE>FOPAreaTreeHelper.adjustLayoutMasterSet(lms, context.<MASK><NEW_LINE>} catch (Exception e) {<NEW_LINE>log.error(e.getMessage(), e);<NEW_LINE>}<NEW_LINE>if (log.isDebugEnabled()) {<NEW_LINE>log.debug("resulting LMS: " + XmlUtils.marshaltoString(lms, Context.getXslFoContext()));<NEW_LINE>}<NEW_LINE>new EventFinished(startEvent).publish();<NEW_LINE>}
getSections(), headerBpda, footerBpda);
351,141
private RoutingPolicy toRoutingPolicy(RouteMap routeMap) {<NEW_LINE>String name = routeMap.getName();<NEW_LINE>RoutingPolicy routingPolicy = new RoutingPolicy(name, _c);<NEW_LINE>List<Statement> statements = routingPolicy.getStatements();<NEW_LINE>for (Entry<Integer, RouteMapRule> e : routeMap.getRules().entrySet()) {<NEW_LINE>String ruleName = Integer.toString(e.getKey());<NEW_LINE>RouteMapRule rule = e.getValue();<NEW_LINE>If ifStatement = new If();<NEW_LINE>List<Statement> trueStatements = ifStatement.getTrueStatements();<NEW_LINE>ifStatement.setComment(ruleName);<NEW_LINE>Conjunction conj = new Conjunction();<NEW_LINE>for (RouteMapMatch match : rule.getMatches()) {<NEW_LINE>conj.getConjuncts().add(match.toBooleanExpr<MASK><NEW_LINE>}<NEW_LINE>ifStatement.setGuard(conj.simplify());<NEW_LINE>switch(rule.getAction()) {<NEW_LINE>case PERMIT:<NEW_LINE>trueStatements.add(Statements.ExitAccept.toStaticStatement());<NEW_LINE>break;<NEW_LINE>case DENY:<NEW_LINE>trueStatements.add(Statements.ExitReject.toStaticStatement());<NEW_LINE>break;<NEW_LINE>default:<NEW_LINE>throw new BatfishException("Invalid action");<NEW_LINE>}<NEW_LINE>statements.add(ifStatement);<NEW_LINE>}<NEW_LINE>statements.add(Statements.ExitReject.toStaticStatement());<NEW_LINE>return routingPolicy;<NEW_LINE>}
(this, _c, _w));
834,396
public static void addPath(String path) throws MalformedURLException {<NEW_LINE>File file = new File(path);<NEW_LINE>// Ensure that directory URLs end in "/"<NEW_LINE>if (file.isDirectory() && !path.endsWith("/")) {<NEW_LINE>// $NON-NLS-1$<NEW_LINE>// $NON-NLS-1$<NEW_LINE>file = new File(path + "/");<NEW_LINE>}<NEW_LINE>// See Java bug 4496398<NEW_LINE>loader.addURL(file.toURI().toURL());<NEW_LINE>StringBuilder sb = new StringBuilder(System.getProperty(JAVA_CLASS_PATH));<NEW_LINE>sb.append(CLASSPATH_SEPARATOR);<NEW_LINE>sb.append(path);<NEW_LINE>File[] jars = listJars(file);<NEW_LINE>for (File jar : jars) {<NEW_LINE>// See Java bug 4496398<NEW_LINE>loader.addURL(jar.toURI().toURL());<NEW_LINE>sb.append(CLASSPATH_SEPARATOR);<NEW_LINE>sb.<MASK><NEW_LINE>}<NEW_LINE>// ClassFinder needs this<NEW_LINE>System.setProperty(JAVA_CLASS_PATH, sb.toString());<NEW_LINE>}
append(jar.getPath());
885,938
private static boolean hasEnterprisePolicy(AppAlias.Alias alias, boolean userOnly) throws ConflictingPolicyException {<NEW_LINE>if (SystemUtilities.isWindows()) {<NEW_LINE>String key = String.format("Software\\Policies\\%s\\%s\\Certificates", alias.getVendor(), alias.getName(true));<NEW_LINE>Integer foundPolicy = WindowsUtilities.getRegInt(userOnly ? WinReg.HKEY_CURRENT_USER : WinReg.HKEY_LOCAL_MACHINE, key, "ImportEnterpriseRoots");<NEW_LINE>if (foundPolicy != null) {<NEW_LINE>return foundPolicy == 1;<NEW_LINE>}<NEW_LINE>} else if (SystemUtilities.isMac()) {<NEW_LINE>String policyLocation = "/Library/Preferences/";<NEW_LINE>if (userOnly) {<NEW_LINE>policyLocation = System.getProperty("user.home") + policyLocation;<NEW_LINE>}<NEW_LINE>String policesEnabled = ShellUtilities.executeRaw(new String[] { "defaults", "read", policyLocation + alias.getBundleId(), "EnterprisePoliciesEnabled" }, true);<NEW_LINE>String foundPolicy = ShellUtilities.executeRaw(new String[] { "defaults", "read", policyLocation + alias.getBundleId(), "Certificates" }, true);<NEW_LINE>if (!policesEnabled.isEmpty() && !foundPolicy.isEmpty()) {<NEW_LINE>// Policies exist, decide how to proceed<NEW_LINE>if (policesEnabled.trim().equals("1") && foundPolicy.contains("ImportEnterpriseRoots = 1;")) {<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>throw new ConflictingPolicyException(String.format("%s enterprise policy conflict at %s: %s", alias.getName(), policyLocation + alias<MASK><NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>// Linux alternate policy not yet supported<NEW_LINE>}<NEW_LINE>return false;<NEW_LINE>}
.getBundleId(), foundPolicy));
877,942
public void addMatchingInterceptors(InterceptableChannel channel, String beanName) {<NEW_LINE>if (LOGGER.isDebugEnabled()) {<NEW_LINE>LOGGER.debug("Applying global interceptors on channel '" + beanName + "'");<NEW_LINE>}<NEW_LINE>List<GlobalChannelInterceptorWrapper> tempInterceptors = new ArrayList<>();<NEW_LINE>this.positiveOrderInterceptors.forEach(interceptorWrapper -> addMatchingInterceptors(beanName, tempInterceptors, interceptorWrapper));<NEW_LINE>tempInterceptors.sort(this.comparator);<NEW_LINE>tempInterceptors.stream().map(GlobalChannelInterceptorWrapper::getChannelInterceptor).filter(interceptor -> !(interceptor instanceof VetoCapableInterceptor) || ((VetoCapableInterceptor) interceptor).shouldIntercept(beanName, channel)<MASK><NEW_LINE>tempInterceptors.clear();<NEW_LINE>this.negativeOrderInterceptors.forEach(interceptorWrapper -> addMatchingInterceptors(beanName, tempInterceptors, interceptorWrapper));<NEW_LINE>tempInterceptors.sort(this.comparator);<NEW_LINE>if (!tempInterceptors.isEmpty()) {<NEW_LINE>for (int i = tempInterceptors.size() - 1; i >= 0; i--) {<NEW_LINE>ChannelInterceptor channelInterceptor = tempInterceptors.get(i).getChannelInterceptor();<NEW_LINE>if (!(channelInterceptor instanceof VetoCapableInterceptor) || ((VetoCapableInterceptor) channelInterceptor).shouldIntercept(beanName, channel)) {<NEW_LINE>channel.addInterceptor(0, channelInterceptor);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
).forEach(channel::addInterceptor);
347,137
public long sendImpl(long transactionId) throws IOException {<NEW_LINE>Request req = getRequest();<NEW_LINE>// at this stage, the request has an IBM-Destination header.<NEW_LINE>// if this is an INVITE, we want to keep the IBM-Destination header,<NEW_LINE>// because that's exactly where we want to send future CANCELs.<NEW_LINE>try {<NEW_LINE>if (req.getMethod().equals(Request.INVITE)) {<NEW_LINE>m_destinationHeader = req.getHeader(SipUtil.DESTINATION_URI, true);<NEW_LINE>m_preferredOutbound = req.getHeader(SipProxyInfo.PEREFERED_OUTBOUND_HDR_NAME, true);<NEW_LINE>}<NEW_LINE>} catch (HeaderParseException headerParseException) {<NEW_LINE>throw new IOException(<MASK><NEW_LINE>} catch (SipParseException sipParseException) {<NEW_LINE>throw new IOException("unknown request method");<NEW_LINE>}<NEW_LINE>setTransactionId(transactionId);<NEW_LINE>SipProviderImpl provider = (SipProviderImpl) getSipProvider();<NEW_LINE>try {<NEW_LINE>if (c_logger.isTraceDebugEnabled()) {<NEW_LINE>StringBuffer b = new StringBuffer(64);<NEW_LINE>b.append("Sent OutGoing Request, Transaction Id:");<NEW_LINE>b.append(transactionId);<NEW_LINE>b.append("\r\n");<NEW_LINE>b.append(req);<NEW_LINE>c_logger.traceDebug(this, "sendImpl", b.toString());<NEW_LINE>}<NEW_LINE>provider.sendRequest(req, transactionId);<NEW_LINE>return transactionId;<NEW_LINE>} catch (SipException e) {<NEW_LINE>if (c_logger.isErrorEnabled()) {<NEW_LINE>Object[] args = { this };<NEW_LINE>c_logger.error("error.send.request", Situation.SITUATION_REQUEST, args, e);<NEW_LINE>}<NEW_LINE>logExceptionToSessionLog(SipSessionSeqLog.ERROR_SEND_REQ, e);<NEW_LINE>throw (new IOException(e.getMessage()));<NEW_LINE>}<NEW_LINE>}
"bad header [" + SipUtil.DESTINATION_URI + ']');
1,292,093
public Object calculate(Context ctx) {<NEW_LINE>if (param == null) {<NEW_LINE>MessageManager mm = EngineMessage.get();<NEW_LINE>throw new RQException("memory" + mm.getMessage("function.missingParam"));<NEW_LINE>} else if (param.getSubSize() != 2) {<NEW_LINE>MessageManager mm = EngineMessage.get();<NEW_LINE>throw new RQException("memory" + mm.getMessage("function.invalidParam"));<NEW_LINE>}<NEW_LINE>IParam hubParam = param.getSub(0);<NEW_LINE>IParam <MASK><NEW_LINE>if (hubParam == null || varParam == null) {<NEW_LINE>MessageManager mm = EngineMessage.get();<NEW_LINE>throw new RQException("memory" + mm.getMessage("function.invalidParam"));<NEW_LINE>}<NEW_LINE>Object hostObj = hubParam.getLeafExpression().calculate(ctx);<NEW_LINE>Machines mc = new Machines();<NEW_LINE>if (!mc.set(hostObj)) {<NEW_LINE>MessageManager mm = EngineMessage.get();<NEW_LINE>throw new RQException("memory" + mm.getMessage("function.invalidParam"));<NEW_LINE>}<NEW_LINE>String[] hosts = mc.getHosts();<NEW_LINE>int[] ports = mc.getPorts();<NEW_LINE>Cluster cluster = new Cluster(hosts, ports, ctx);<NEW_LINE>String var = varParam.getLeafExpression().toString();<NEW_LINE>return ClusterMemoryTable.memory(cluster, var);<NEW_LINE>}
varParam = param.getSub(1);
1,231,866
final RejectCertificateTransferResult executeRejectCertificateTransfer(RejectCertificateTransferRequest rejectCertificateTransferRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(rejectCertificateTransferRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<RejectCertificateTransferRequest> request = null;<NEW_LINE>Response<RejectCertificateTransferResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new RejectCertificateTransferRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(rejectCertificateTransferRequest));<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, "IoT");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "RejectCertificateTransfer");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<RejectCertificateTransferResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new RejectCertificateTransferResultJsonUnmarshaller());<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,700,050
private void insert(Session session, String data) throws IoTDBConnectionException, StatementExecutionException {<NEW_LINE>String[] dataArray = data.split(",");<NEW_LINE>String device = dataArray[0];<NEW_LINE>long time = Long.parseLong(dataArray[1]);<NEW_LINE>List<String> measurements = Arrays.asList(dataArray[2].split(":"));<NEW_LINE>List<TSDataType> types = new ArrayList<>();<NEW_LINE>for (String type : dataArray[3].split(":")) {<NEW_LINE>types.add(TSDataType.valueOf(type));<NEW_LINE>}<NEW_LINE>List<Object> values = new ArrayList<>();<NEW_LINE>String[] valuesStr = dataArray[4].split(":");<NEW_LINE>for (int i = 0; i < valuesStr.length; i++) {<NEW_LINE>switch(types.get(i)) {<NEW_LINE>case INT64:<NEW_LINE>values.add(Long.parseLong(valuesStr[i]));<NEW_LINE>break;<NEW_LINE>case DOUBLE:<NEW_LINE>values.add(Double.parseDouble(valuesStr[i]));<NEW_LINE>break;<NEW_LINE>case INT32:<NEW_LINE>values.add(Integer.parseInt(valuesStr[i]));<NEW_LINE>break;<NEW_LINE>case TEXT:<NEW_LINE>values.add(valuesStr[i]);<NEW_LINE>break;<NEW_LINE>case FLOAT:<NEW_LINE>values.add(Float.parseFloat(valuesStr[i]));<NEW_LINE>break;<NEW_LINE>case BOOLEAN:<NEW_LINE>values.add(Boolean.parseBoolean(valuesStr[i]));<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>session.insertRecord(device, <MASK><NEW_LINE>}
time, measurements, types, values);
584,140
void deploy(FunctionRegistry functionRegistry, FunctionDeployerProperties functionProperties, String[] args, ApplicationContext applicationContext) {<NEW_LINE>ClassLoader currentLoader = Thread.currentThread().getContextClassLoader();<NEW_LINE>try {<NEW_LINE>ClassLoader cl = createClassLoader(discoverClassPathAcrhives().iterator());<NEW_LINE>Thread.currentThread().setContextClassLoader(cl);<NEW_LINE>evalContext.setTypeLocator(new StandardTypeLocator(Thread.currentThread().getContextClassLoader()));<NEW_LINE>if (this.isBootApplicationWithMain()) {<NEW_LINE>this.launchFunctionArchive(args);<NEW_LINE>Map<String, Object> functions = this.discoverBeanFunctions();<NEW_LINE>if (logger.isInfoEnabled() && !CollectionUtils.isEmpty(functions)) {<NEW_LINE>logger.info("Discovered functions in deployed application context: " + functions);<NEW_LINE>}<NEW_LINE>for (Entry<String, Object> entry : functions.entrySet()) {<NEW_LINE>FunctionRegistration registration = new FunctionRegistration(entry.getValue(), entry.getKey());<NEW_LINE>Type type = this.discoverFunctionType(entry.getKey());<NEW_LINE>if (logger.isInfoEnabled()) {<NEW_LINE>logger.info("Registering function '" + entry.getKey() + "' of type '" + type + "' in FunctionRegistry.");<NEW_LINE>}<NEW_LINE>registration.type(type);<NEW_LINE>functionRegistry.register(registration);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>String[] functionClassNames = discoverFunctionClassName(functionProperties);<NEW_LINE>if (functionClassNames == null) {<NEW_LINE>ClassPathBeanDefinitionScanner scanner = new ClassPathBeanDefinitionScanner<MASK><NEW_LINE>scanner.addIncludeFilter(new RegexPatternTypeFilter(Pattern.compile(".*")));<NEW_LINE>Set<BeanDefinition> findCandidateComponents = scanner.findCandidateComponents("functions");<NEW_LINE>ClassLoader currentClassLoader = Thread.currentThread().getContextClassLoader();<NEW_LINE>for (BeanDefinition beanDefinition : findCandidateComponents) {<NEW_LINE>String className = beanDefinition.getBeanClassName();<NEW_LINE>Class<?> functionClass = currentClassLoader.loadClass(className);<NEW_LINE>if (Function.class.isAssignableFrom(functionClass) || Supplier.class.isAssignableFrom(functionClass) || Consumer.class.isAssignableFrom(functionClass)) {<NEW_LINE>FunctionRegistration registration = this.discovereAndLoadFunctionFromClassName(className);<NEW_LINE>if (registration != null) {<NEW_LINE>functionRegistry.register(registration);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>for (String functionClassName : functionClassNames) {<NEW_LINE>if (StringUtils.hasText(functionClassName)) {<NEW_LINE>FunctionRegistration registration = this.discovereAndLoadFunctionFromClassName(functionClassName);<NEW_LINE>if (registration != null) {<NEW_LINE>functionRegistry.register(registration);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} catch (Exception e) {<NEW_LINE>throw new IllegalStateException("Failed to deploy archive " + this.getArchive(), e);<NEW_LINE>} finally {<NEW_LINE>Thread.currentThread().setContextClassLoader(currentLoader);<NEW_LINE>}<NEW_LINE>}
((BeanDefinitionRegistry) applicationContext, false);
1,442,626
protected void doBuild(DaemonCommandExecution execution, Build build) {<NEW_LINE>Properties originalSystemProperties = new Properties();<NEW_LINE>originalSystemProperties.putAll(System.getProperties());<NEW_LINE>Map<String, String> originalEnv = new HashMap<String, String>(System.getenv());<NEW_LINE>File originalProcessDir = FileUtils.canonicalize(new File("."));<NEW_LINE>for (Map.Entry<String, String> entry : build.getParameters().getSystemProperties().entrySet()) {<NEW_LINE>if (SystemProperties.getInstance().isStandardProperty(entry.getKey())) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>if (SystemProperties.getInstance().isNonStandardImportantProperty(entry.getKey())) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>if (entry.getKey().startsWith("sun.") || entry.getKey().startsWith("awt.") || entry.getKey().contains(".awt.")) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>System.setProperty(entry.getKey(), entry.getValue());<NEW_LINE>}<NEW_LINE>// Log only the variable names and not their values. Environment variables often contain sensitive data that should not be leaked to log files.<NEW_LINE>LOGGER.debug("Configuring env variables: {}", build.getParameters().<MASK><NEW_LINE>EnvironmentModificationResult setEnvironmentResult = processEnvironment.maybeSetEnvironment(build.getParameters().getEnvVariables());<NEW_LINE>if (!setEnvironmentResult.isSuccess()) {<NEW_LINE>LOGGER.warn("Warning: Unable able to set daemon's environment variables to match the client because: " + System.getProperty("line.separator") + " " + setEnvironmentResult + System.getProperty("line.separator") + " " + "If the daemon was started with a significantly different environment from the client, and your build " + System.getProperty("line.separator") + " " + "relies on environment variables, you may experience unexpected behavior.");<NEW_LINE>}<NEW_LINE>processEnvironment.maybeSetProcessDir(build.getParameters().getCurrentDir());<NEW_LINE>// Capture and restore this in case the build code calls Locale.setDefault()<NEW_LINE>Locale locale = Locale.getDefault();<NEW_LINE>try {<NEW_LINE>execution.proceed();<NEW_LINE>} finally {<NEW_LINE>System.setProperties(originalSystemProperties);<NEW_LINE>processEnvironment.maybeSetEnvironment(originalEnv);<NEW_LINE>processEnvironment.maybeSetProcessDir(originalProcessDir);<NEW_LINE>Locale.setDefault(locale);<NEW_LINE>}<NEW_LINE>}
getEnvVariables().keySet());
1,591,552
// //////////////////// SPEC RULE VERIFICATION ///////////////////////////////<NEW_LINE>@Override<NEW_LINE>@Test<NEW_LINE>public void required_spec201_blackbox_mustSignalDemandViaSubscriptionRequest() throws Throwable {<NEW_LINE>blackboxSubscriberTest(new BlackboxTestStageTestRun() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void run(BlackboxTestStage stage) throws InterruptedException {<NEW_LINE>triggerRequest(stage.subProxy().sub());<NEW_LINE>// assuming subscriber wants to consume elements...<NEW_LINE>final long requested = stage.expectRequest();<NEW_LINE>// protecting against Subscriber which sends ridiculous large demand<NEW_LINE>final long signalsToEmit = <MASK><NEW_LINE>// should cope with up to requested number of elements<NEW_LINE>for (int i = 0; i < signalsToEmit && sampleIsCancelled(stage, i, 10); i++) stage.signalNext();<NEW_LINE>// we complete after `signalsToEmit` (which can be less than `requested`),<NEW_LINE>// which is legal under https://github.com/reactive-streams/reactive-streams-jvm#1.2<NEW_LINE>stage.sendCompletion();<NEW_LINE>}<NEW_LINE><NEW_LINE>private boolean sampleIsCancelled(BlackboxTestStage stage, int i, int checkInterval) throws InterruptedException {<NEW_LINE>if (i % checkInterval == 0)<NEW_LINE>return stage.isCancelled();<NEW_LINE>else<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>});<NEW_LINE>}
Math.min(requested, 512);
836,386
public void parseSSLKeyStore(Element elem, ManagedMap<String, BeanDefinition> sslKeyStoreMap) {<NEW_LINE>String id = elem.getAttribute("id");<NEW_LINE>String <MASK><NEW_LINE>String keystoreType = elem.getAttribute("type");<NEW_LINE>String keystorePass = elem.getAttribute("keystorePass");<NEW_LINE>String certPass = elem.getAttribute("certPass");<NEW_LINE>String protocolsStr = elem.getAttribute("protocols");<NEW_LINE>String cipherSuitesStr = elem.getAttribute("cipher-suites");<NEW_LINE>String hostnameVerifier = elem.getAttribute("hostnameVerifier");<NEW_LINE>String sslSocketFactoryBuilder = elem.getAttribute("sslSocketFactoryBuilder");<NEW_LINE>if (StringUtils.isEmpty(keystoreType)) {<NEW_LINE>keystoreType = SSLKeyStore.DEFAULT_KEYSTORE_TYPE;<NEW_LINE>}<NEW_LINE>BeanDefinition beanDefinition = createSSLKeyStoreBean(id, keystoreType, filePath, keystorePass, certPass, protocolsStr, cipherSuitesStr, hostnameVerifier, sslSocketFactoryBuilder);<NEW_LINE>sslKeyStoreMap.put(id, beanDefinition);<NEW_LINE>}
filePath = elem.getAttribute("file");