idx
int32
46
1.86M
input
stringlengths
321
6.6k
target
stringlengths
9
1.24k
921,559
final StopThingRegistrationTaskResult executeStopThingRegistrationTask(StopThingRegistrationTaskRequest stopThingRegistrationTaskRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(stopThingRegistrationTaskRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<StopThingRegistrationTaskRequest> request = null;<NEW_LINE>Response<StopThingRegistrationTaskResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new StopThingRegistrationTaskRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(stopThingRegistrationTaskRequest));<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, "StopThingRegistrationTask");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<StopThingRegistrationTaskResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new StopThingRegistrationTaskResultJsonUnmarshaller());<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,248,855
public void replaceFill(SVGDocument document, String idRegex, Color color) {<NEW_LINE>String colorCode = String.format("#%02x%02x%02x", color.getRed(), color.getGreen(), color.getBlue());<NEW_LINE>if (DEBUG)<NEW_LINE>System.out.println("color code: " + colorCode);<NEW_LINE>NodeList children = document.getElementsByTagName("*");<NEW_LINE>for (int i = 0; i < children.getLength(); i++) {<NEW_LINE>if (children.item(i) instanceof SVGElement) {<NEW_LINE>SVGElement element = (SVGElement) children.item(i);<NEW_LINE>if (element.getId().matches(idRegex)) {<NEW_LINE>if (DEBUG)<NEW_LINE>System.out.println("child>>> " + element + ", " + element.getId());<NEW_LINE>String style = <MASK><NEW_LINE>style = style.replaceFirst("fill:#[a-zA-z0-9]+", "fill:" + colorCode);<NEW_LINE>if (DEBUG)<NEW_LINE>System.out.println(style);<NEW_LINE>element.setAttributeNS(null, "style", style);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
element.getAttributeNS(null, "style");
496,610
private String buildMBRecordingQuery(final CoverArtArchiveTagInfo tagInfo, final boolean fuzzy) {<NEW_LINE>final String and = urlEncode(" AND ");<NEW_LINE>StringBuilder query = new StringBuilder("recording/?query=");<NEW_LINE>boolean added = false;<NEW_LINE>if (isNotBlank(tagInfo.title)) {<NEW_LINE>if (fuzzy) {<NEW_LINE>query.append(urlEncode(fuzzString(tagInfo.title)));<NEW_LINE>} else {<NEW_LINE>query.append(urlEncode("\"" + StringUtil.luceneEscape(<MASK><NEW_LINE>}<NEW_LINE>added = true;<NEW_LINE>}<NEW_LINE>if (isNotBlank(tagInfo.trackId)) {<NEW_LINE>if (added) {<NEW_LINE>query.append(and);<NEW_LINE>}<NEW_LINE>query.append("tid:").append(tagInfo.trackId);<NEW_LINE>added = true;<NEW_LINE>}<NEW_LINE>if (isNotBlank(tagInfo.artistId)) {<NEW_LINE>if (added) {<NEW_LINE>query.append(and);<NEW_LINE>}<NEW_LINE>query.append("arid:").append(tagInfo.artistId);<NEW_LINE>added = true;<NEW_LINE>} else if (isNotBlank(tagInfo.artist)) {<NEW_LINE>if (added) {<NEW_LINE>query.append(and);<NEW_LINE>}<NEW_LINE>query.append("artistname:");<NEW_LINE>if (fuzzy) {<NEW_LINE>query.append(urlEncode(fuzzString(tagInfo.artist)));<NEW_LINE>} else {<NEW_LINE>query.append(urlEncode("\"" + StringUtil.luceneEscape(tagInfo.artist) + "\""));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (!fuzzy && isNotBlank(tagInfo.year) && tagInfo.year.trim().length() > 3) {<NEW_LINE>if (added) {<NEW_LINE>query.append(and);<NEW_LINE>}<NEW_LINE>query.append("date:").append(urlEncode(tagInfo.year)).append('*');<NEW_LINE>added = true;<NEW_LINE>}<NEW_LINE>return query.toString();<NEW_LINE>}
tagInfo.title) + "\""));
1,256,288
public void run(RegressionEnvironment env) {<NEW_LINE>RegressionPath path = new RegressionPath();<NEW_LINE>String stmtOneText = "@name('l1') @public insert into StreamA select nested.* from SupportBeanComplexProps as s0";<NEW_LINE>env.compileDeploy(stmtOneText, path).addListener("l1");<NEW_LINE>env.assertStatement("l1", statement -> assertEquals(SupportBeanComplexProps.SupportBeanSpecialGetterNested.class, statement.getEventType<MASK><NEW_LINE>String stmtTwoText = "@name('l2') select nestedValue from StreamA";<NEW_LINE>env.compileDeploy(stmtTwoText, path).addListener("l2");<NEW_LINE>env.assertStatement("l2", statement -> assertEquals(String.class, statement.getEventType().getPropertyType("nestedValue")));<NEW_LINE>env.sendEventBean(SupportBeanComplexProps.makeDefaultBean());<NEW_LINE>env.assertEqualsNew("l1", "nestedValue", "nestedValue");<NEW_LINE>env.assertEqualsNew("l2", "nestedValue", "nestedValue");<NEW_LINE>env.undeployAll();<NEW_LINE>env.undeployAll();<NEW_LINE>}
().getUnderlyingType()));
773,393
private ResponseSpec fooGetRequestCreation() throws WebClientResponseException {<NEW_LINE>Object postBody = null;<NEW_LINE>// create path and map variables<NEW_LINE>final Map<String, Object> pathParams = new HashMap<String, Object>();<NEW_LINE>final MultiValueMap<String, String> queryParams = new LinkedMultiValueMap<String, String>();<NEW_LINE>final HttpHeaders headerParams = new HttpHeaders();<NEW_LINE>final MultiValueMap<String, String> cookieParams = new LinkedMultiValueMap<String, String>();<NEW_LINE>final MultiValueMap<String, Object> formParams = new LinkedMultiValueMap<String, Object>();<NEW_LINE>final String[] localVarAccepts = { "application/json" };<NEW_LINE>final List<MediaType> localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);<NEW_LINE>final String[] localVarContentTypes = {};<NEW_LINE>final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);<NEW_LINE>String[] localVarAuthNames = new String[] {};<NEW_LINE>ParameterizedTypeReference<InlineResponseDefault> localVarReturnType = new ParameterizedTypeReference<InlineResponseDefault>() {<NEW_LINE>};<NEW_LINE>return apiClient.invokeAPI("/foo", HttpMethod.GET, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, <MASK><NEW_LINE>}
localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
1,574,164
public int fill(TileTransceiver from, @Nonnull Set<Channel> list, FluidStack resource, boolean doFill) {<NEW_LINE>if (resource == null || !from.hasPower()) {<NEW_LINE>return 0;<NEW_LINE>}<NEW_LINE>for (Channel channel : list) {<NEW_LINE>if (channel != null) {<NEW_LINE>RoundRobinIterator<<MASK><NEW_LINE>for (TileTransceiver trans : iter) {<NEW_LINE>if (trans != from) {<NEW_LINE>int val = trans.recieveFluid(list, resource, doFill);<NEW_LINE>if (val > 0) {<NEW_LINE>if (doFill && TranceiverConfig.bucketEnergyCost.get() > 0) {<NEW_LINE>int powerUsed = (int) Math.max(1, TranceiverConfig.bucketEnergyCost.get() * val / 1000d);<NEW_LINE>from.usePower(powerUsed);<NEW_LINE>}<NEW_LINE>return val;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return 0;<NEW_LINE>}
TileTransceiver> iter = getIterator(channel);
1,201,209
final AdminInitiateAuthResult executeAdminInitiateAuth(AdminInitiateAuthRequest adminInitiateAuthRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(adminInitiateAuthRequest);<NEW_LINE><MASK><NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<AdminInitiateAuthRequest> request = null;<NEW_LINE>Response<AdminInitiateAuthResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new AdminInitiateAuthRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(adminInitiateAuthRequest));<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, "Cognito Identity Provider");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "AdminInitiateAuth");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<AdminInitiateAuthResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new AdminInitiateAuthResultJsonUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
86,512
protected void handleCollision(PointList points, int index) {<NEW_LINE>Point start = points.getFirstPoint();<NEW_LINE>Point end = points.getLastPoint();<NEW_LINE>if (start.equals(end))<NEW_LINE>return;<NEW_LINE>Point midPoint = new Point((end.x + start.x) / 2, (end.y + start.y) / 2);<NEW_LINE>int position = end.getPosition(start);<NEW_LINE>Ray ray;<NEW_LINE>if (position == PositionConstants.SOUTH || position == PositionConstants.EAST)<NEW_LINE>ray = new Ray(start, end);<NEW_LINE>else<NEW_LINE>ray = new Ray(end, start);<NEW_LINE>double length = ray.length();<NEW_LINE>double xSeparation = separation * ray.x / length;<NEW_LINE>double ySeparation <MASK><NEW_LINE>Point bendPoint;<NEW_LINE>if (index % 2 == 0) {<NEW_LINE>bendPoint = new Point(midPoint.x + (index / 2) * (-1 * ySeparation), midPoint.y + (index / 2) * xSeparation);<NEW_LINE>} else {<NEW_LINE>bendPoint = new Point(midPoint.x + (index / 2) * ySeparation, midPoint.y + (index / 2) * (-1 * xSeparation));<NEW_LINE>}<NEW_LINE>if (!bendPoint.equals(midPoint))<NEW_LINE>points.insertPoint(bendPoint, 1);<NEW_LINE>}
= separation * ray.y / length;
490,769
public static Perfetto.Data.Builder enumerate(Perfetto.Data.Builder data) {<NEW_LINE>ImmutableListMultimap<String, CounterInfo> counters = data.getCounters(CounterInfo.Type.Global);<NEW_LINE>CounterInfo total = onlyOne(counters.get("MemTotal"));<NEW_LINE>CounterInfo free = onlyOne(counters.get("MemFree"));<NEW_LINE>CounterInfo buffers = onlyOne(counters.get("Buffers"));<NEW_LINE>CounterInfo cached = onlyOne(counters.get("Cached"));<NEW_LINE>CounterInfo swapCached = onlyOne<MASK><NEW_LINE>if ((total == null) || (free == null) || (buffers == null) || (cached == null) || (swapCached == null)) {<NEW_LINE>return data;<NEW_LINE>}<NEW_LINE>MemorySummaryTrack track = new MemorySummaryTrack(data.qe, (long) total.max, total.id, free.id, buffers.id, cached.id, swapCached.id);<NEW_LINE>data.tracks.addTrack(null, track.getId(), "Memory Usage", single(state -> new MemorySummaryPanel(state, track), true, false));<NEW_LINE>return data;<NEW_LINE>}
(counters.get("SwapCached"));
1,547,691
public Optional<DateTime> earliestPostIndexingTimestamp() {<NEW_LINE>final String sortField = ProcessingStatusDto.FIELD_RECEIVE_TIMES + "." + ProcessingStatusDto.ReceiveTimes.FIELD_POST_INDEXING;<NEW_LINE>final DateTime updateThresholdTimestamp = clock.nowUTC().minus(updateThreshold.toMilliseconds());<NEW_LINE>final DBQuery.Query queryWithoutMetrics = DBQuery.greaterThan(FIELD_UPDATED_AT, updateThresholdTimestamp);<NEW_LINE>final DBQuery.Query queryWithMetrics = getDataSelectionQuery(clock, updateThreshold, journalWriteRateThreshold);<NEW_LINE>// First try to query processing status from nodes that are active (include journal metrics restrictions).<NEW_LINE>// If no result is found, query the processing status again, but without weeding out nodes with a low input volume.<NEW_LINE>// This prevents to completely stall the event processing if the ingestion volume is too low.<NEW_LINE>for (DBQuery.Query query : Arrays.asList(queryWithMetrics, queryWithoutMetrics)) {<NEW_LINE>// Get the earliest timestamp of the post-indexing receive timestamp by sorting and returning the first one.<NEW_LINE>// We use the earliest timestamp because some nodes can be faster than others and we need to make sure<NEW_LINE>// to return the timestamp of the slowest one.<NEW_LINE>try (DBCursor<ProcessingStatusDto> cursor = db.find(query).sort(DBSort.asc(sortField)).limit(1)) {<NEW_LINE>if (cursor.hasNext()) {<NEW_LINE>return Optional.of(cursor.next().<MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return Optional.empty();<NEW_LINE>}
receiveTimes().postIndexing());
63,248
public double d(double[] x, double[] y) {<NEW_LINE>if (x.length != y.length) {<NEW_LINE>throw new IllegalArgumentException(String.format("Arrays have different length: x[%d], y[%d]", x.length, y.length));<NEW_LINE>}<NEW_LINE>int n = x.length;<NEW_LINE>int m = 0;<NEW_LINE>double dist = 0.0;<NEW_LINE>if (weight == null) {<NEW_LINE>for (int i = 0; i < x.length; i++) {<NEW_LINE>if (!Double.isNaN(x[i]) && !Double.isNaN(y[i])) {<NEW_LINE>m++;<NEW_LINE>double d = Math.abs(x[i] - y[i]);<NEW_LINE>dist += Math.pow(d, p);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>if (x.length != weight.length) {<NEW_LINE>throw new IllegalArgumentException(String.format("Input vectors and weight vector have different length: %d, %d", x<MASK><NEW_LINE>}<NEW_LINE>for (int i = 0; i < x.length; i++) {<NEW_LINE>if (!Double.isNaN(x[i]) && !Double.isNaN(y[i])) {<NEW_LINE>m++;<NEW_LINE>double d = Math.abs(x[i] - y[i]);<NEW_LINE>dist += weight[i] * Math.pow(d, p);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>dist = n * dist / m;<NEW_LINE>return Math.pow(dist, 1.0 / p);<NEW_LINE>}
.length, weight.length));
746,073
protected void startExecutorMonitor(final int container, final Process containerExecutor, Set<PackingPlan.InstancePlan> instances) {<NEW_LINE>// add the container for monitoring<NEW_LINE>Runnable r = new Runnable() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void run() {<NEW_LINE>try {<NEW_LINE>LOG.info("Waiting for container " + container + " to finish.");<NEW_LINE>containerExecutor.waitFor();<NEW_LINE>LOG.log(Level.INFO, "Container {0} is completed. Exit status: {1}", new Object[] { container, containerExecutor.exitValue() });<NEW_LINE>if (isTopologyKilled) {<NEW_LINE>LOG.info("Topology is killed. Not to start new executors.");<NEW_LINE>return;<NEW_LINE>} else if (!processToContainer.containsKey(containerExecutor)) {<NEW_LINE>LOG.log(<MASK><NEW_LINE>return;<NEW_LINE>}<NEW_LINE>LOG.log(Level.INFO, "Trying to restart container {0}", container);<NEW_LINE>// restart the container<NEW_LINE>startExecutor(processToContainer.remove(containerExecutor), instances);<NEW_LINE>} catch (InterruptedException e) {<NEW_LINE>if (!isTopologyKilled) {<NEW_LINE>LOG.log(Level.SEVERE, "Process is interrupted: ", e);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>};<NEW_LINE>monitorService.submit(r);<NEW_LINE>}
Level.INFO, "Container {0} is killed. No need to relaunch.", container);
102,866
protected void taskOperation(GetDeploymentStatsAction.Request request, TrainedModelDeploymentTask task, ActionListener<AllocationStats> listener) {<NEW_LINE>Optional<ModelStats<MASK><NEW_LINE>List<AllocationStats.NodeStats> nodeStats = new ArrayList<>();<NEW_LINE>if (stats.isPresent()) {<NEW_LINE>var presentValue = stats.get();<NEW_LINE>nodeStats.add(AllocationStats.NodeStats.forStartedState(clusterService.localNode(), presentValue.timingStats().getCount(), presentValue.timingStats().getAverage(), presentValue.pendingCount(), presentValue.errorCount(), presentValue.rejectedExecutionCount(), presentValue.timeoutCount(), presentValue.lastUsed(), presentValue.startTime(), presentValue.inferenceThreads(), presentValue.modelThreads(), presentValue.peakThroughput(), presentValue.throughputLastPeriod(), presentValue.avgInferenceTimeLastPeriod()));<NEW_LINE>} else {<NEW_LINE>// if there are no stats the process is missing.<NEW_LINE>// Either because it is starting or stopped<NEW_LINE>nodeStats.add(AllocationStats.NodeStats.forNotStartedState(clusterService.localNode(), RoutingState.STOPPED, ""));<NEW_LINE>}<NEW_LINE>listener.onResponse(new AllocationStats(task.getModelId(), task.getParams().getInferenceThreads(), task.getParams().getModelThreads(), task.getParams().getQueueCapacity(), TrainedModelAllocationMetadata.fromState(clusterService.state()).getModelAllocation(task.getModelId()).getStartTime(), nodeStats));<NEW_LINE>}
> stats = task.modelStats();
1,595,037
public void addConvolve(int num) {<NEW_LINE>String typeCast = generateTypeCast();<NEW_LINE>out.print("\tpublic static void convolve" + num + "( Kernel2D_" + typeKernel + " kernel, " + typeInput + " input, " + typeOutput + " output, int skip )\n");<NEW_LINE>out.print("\t{\n" + "\t\tfinal " + dataInput + "[] dataSrc = input.data;\n" + "\t\tfinal " + dataOutput + "[] dataDst = output.data;\n" + "\n" + "\t\tfinal int radius = kernel.getRadius();\n" + "\t\tfinal int widthEnd = UtilDownConvolve.computeMaxSide(input.width,skip,radius);\n" + "\t\tfinal int heightEnd = UtilDownConvolve.computeMaxSide(input.height,skip,radius);\n" + "\n" + "\t\tfinal int offset = UtilDownConvolve.computeOffset(skip,radius);\n" + "\n" + "\t\tfor( int y = offset; y <= heightEnd; y += skip) {\n" + "\n" + "\t\t\t// first time through the value needs to be set\n");<NEW_LINE>for (int i = 0; i < num; i++) {<NEW_LINE>out.print("\t\t\t" + sumType + " k" + (i + 1) + " = kernel.data[" + i + "];\n");<NEW_LINE>}<NEW_LINE>out.print("\n" + "\t\t\tint indexDst = output.startIndex + (y/skip)*output.stride + offset/skip;\n" + "\t\t\tint indexSrcRow = input.startIndex + (y-radius)*input.stride - radius;\n" + "\t\t\tfor( int x = offset; x <= widthEnd; x += skip ) {\n" + "\t\t\t\tint indexSrc = indexSrcRow + x;\n" + <MASK><NEW_LINE>for (int i = 0; i < num - 1; i++) {<NEW_LINE>out.print("\t\t\t\ttotal += (dataSrc[indexSrc++] " + bitWise + ")* k" + (i + 1) + ";\n");<NEW_LINE>}<NEW_LINE>out.print("\t\t\t\ttotal += (dataSrc[indexSrc] " + bitWise + ")* k" + num + ";\n");<NEW_LINE>out.print("\n" + "\t\t\t\tdataDst[indexDst++] = " + typeCast + "total;\n" + "\t\t\t}\n" + "\n" + "\t\t\t// rest of the convolution rows are an addition\n" + "\t\t\tfor( int i = 1; i < " + num + "; i++ ) {\n" + "\t\t\t\tindexDst = output.startIndex + (y/skip)*output.stride + offset/skip;\n" + "\t\t\t\tindexSrcRow = input.startIndex + (y+i-radius)*input.stride - radius;\n" + "\t\t\t\t\n");<NEW_LINE>for (int i = 0; i < num; i++) {<NEW_LINE>out.print("\t\t\t\tk" + (i + 1) + " = kernel.data[i*" + num + " + " + i + "];\n");<NEW_LINE>}<NEW_LINE>out.print("\n" + "\t\t\t\tfor( int x = offset; x <= widthEnd; x += skip ) {\n" + "\t\t\t\t\tint indexSrc = indexSrcRow+x;\n" + "\n" + "\t\t\t\t\t" + sumType + " total = 0;\n");<NEW_LINE>for (int i = 0; i < num - 1; i++) {<NEW_LINE>out.print("\t\t\t\t\ttotal += (dataSrc[indexSrc++] " + bitWise + ")* k" + (i + 1) + ";\n");<NEW_LINE>}<NEW_LINE>out.print("\t\t\t\t\ttotal += (dataSrc[indexSrc] " + bitWise + ")* k" + num + ";\n");<NEW_LINE>out.print("\n" + "\t\t\t\t\tdataDst[indexDst++] += " + typeCast + "total;\n" + "\t\t\t\t}\n" + "\t\t\t}\n" + "\t\t}\n" + "\t}\n\n");<NEW_LINE>}
"\n" + "\t\t\t\t" + sumType + " total = 0;\n");
314,021
private void addNode(ModelNodeInternal child, ModelRegistration registration) {<NEW_LINE>ModelPath childPath = child.getPath();<NEW_LINE>if (!getPath().isDirectChild(childPath)) {<NEW_LINE>throw new IllegalArgumentException(String.format("Element registration has a path (%s) which is not a child of this node (%s).", childPath, getPath()));<NEW_LINE>}<NEW_LINE>ModelNodeInternal currentChild = links == null ? null : links.get(childPath.getName());<NEW_LINE>if (currentChild != null) {<NEW_LINE>if (!currentChild.isAtLeast(Created)) {<NEW_LINE>throw new DuplicateModelException(String.format("Cannot create '%s' using creation rule '%s' as the rule '%s' is already registered to create this model element.", childPath, describe(registration.getDescriptor()), describe(currentChild.getDescriptor())));<NEW_LINE>}<NEW_LINE>throw new DuplicateModelException(String.format("Cannot create '%s' using creation rule '%s' as the rule '%s' has already been used to create this model element.", childPath, describe(registration.getDescriptor()), describe(currentChild.getDescriptor())));<NEW_LINE>}<NEW_LINE>if (!isMutable()) {<NEW_LINE>throw new IllegalStateException(String.format("Cannot create '%s' using creation rule '%s' as model element '%s' is no longer mutable.", childPath, describe(registration.getDescriptor(<MASK><NEW_LINE>}<NEW_LINE>if (links == null) {<NEW_LINE>links = Maps.newTreeMap();<NEW_LINE>}<NEW_LINE>links.put(child.getPath().getName(), child);<NEW_LINE>modelRegistry.registerNode(child, registration.getActions());<NEW_LINE>}
)), getPath()));
1,552,936
final ListUsersResult executeListUsers(ListUsersRequest listUsersRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listUsersRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<ListUsersRequest> request = null;<NEW_LINE>Response<ListUsersResult> response = null;<NEW_LINE>try {<NEW_LINE><MASK><NEW_LINE>try {<NEW_LINE>request = new ListUsersRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listUsersRequest));<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, "Connect");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListUsers");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<ListUsersResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListUsersResultJsonUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
559,627
final TagResourceResult executeTagResource(TagResourceRequest tagResourceRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(tagResourceRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<TagResourceRequest> request = null;<NEW_LINE>Response<TagResourceResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new TagResourceRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(tagResourceRequest));<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, "Direct Connect");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "TagResource");<NEW_LINE>request.<MASK><NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<TagResourceResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new TagResourceResultJsonUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
959,711
void addPart(int partId, byte[] part) {<NEW_LINE>if (partId != currentPartId) {<NEW_LINE>throw new IllegalStateException("Received partid " + partId + " while expecting " + currentPartId);<NEW_LINE>}<NEW_LINE>if (fileSize < currentFileSize + part.length) {<NEW_LINE>throw new IllegalStateException("Received part would extend the file from " + currentFileSize + " to " + (currentFileSize + part.length) + ", but " + fileSize + " is max.");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>Files.write(inprogressFile.toPath(), part, StandardOpenOption.WRITE, StandardOpenOption.APPEND);<NEW_LINE>} catch (IOException e) {<NEW_LINE>String message = "Failed writing to file (" + inprogressFile.toPath() + "): ";<NEW_LINE>log.log(Level.SEVERE, message + e.getMessage(), e);<NEW_LINE>boolean successfulDelete = inprogressFile.delete();<NEW_LINE>if (!successfulDelete)<NEW_LINE>log.log(Level.INFO, "Unable to delete " + inprogressFile.toPath());<NEW_LINE>throw new RuntimeException(message, e);<NEW_LINE>}<NEW_LINE>currentFileSize += part.length;<NEW_LINE>currentPartId++;<NEW_LINE>hasher.update(<MASK><NEW_LINE>}
part, 0, part.length);
1,208,104
void routerBootstrap() {<NEW_LINE>List<CompletableFuture<RPCCall>> callFutures = new ArrayList<>();<NEW_LINE>resolveBootstrapAddresses();<NEW_LINE>Collection<InetSocketAddress> addrs = bootstrapAddresses;<NEW_LINE>for (InetSocketAddress addr : addrs) {<NEW_LINE>if (!type.canUseSocketAddress(addr))<NEW_LINE>continue;<NEW_LINE>FindNodeRequest fnr = new <MASK><NEW_LINE>fnr.setDestination(addr);<NEW_LINE>RPCCall c = new RPCCall(fnr);<NEW_LINE>CompletableFuture<RPCCall> f = new CompletableFuture<>();<NEW_LINE>RPCServer srv = serverManager.getRandomActiveServer(true);<NEW_LINE>if (srv == null)<NEW_LINE>continue;<NEW_LINE>c.addListener(new RPCCallListener() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void stateTransition(RPCCall c, RPCState previous, RPCState current) {<NEW_LINE>if (current == RPCState.RESPONDED || current == RPCState.ERROR || current == RPCState.TIMEOUT)<NEW_LINE>f.complete(c);<NEW_LINE>}<NEW_LINE>});<NEW_LINE>callFutures.add(f);<NEW_LINE>srv.doCall(c);<NEW_LINE>}<NEW_LINE>awaitAll(callFutures).thenAccept(calls -> {<NEW_LINE>Class<FindNodeResponse> clazz = FindNodeResponse.class;<NEW_LINE>Set<KBucketEntry> s = calls.stream().filter(clazz::isInstance).map(clazz::cast).map(fnr -> fnr.getNodes(getType())).flatMap(NodeList::entries).collect(Collectors.toSet());<NEW_LINE>fillHomeBuckets(s);<NEW_LINE>});<NEW_LINE>}
FindNodeRequest(Key.createRandomKey());
106,184
/*<NEW_LINE>* (non-Javadoc)<NEW_LINE>* @see org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer#initializeDefaultPreferences()<NEW_LINE>*/<NEW_LINE>@Override<NEW_LINE>public void initializeDefaultPreferences() {<NEW_LINE>IEclipsePreferences pref = DefaultScope.INSTANCE.getNode(CSSFormatterPlugin.PLUGIN_ID);<NEW_LINE>pref.put(CSSFormatterConstants.FORMATTER_TAB_CHAR, CodeFormatterConstants.EDITOR);<NEW_LINE>pref.put(CSSFormatterConstants.FORMATTER_TAB_SIZE, Integer.toString(EditorUtil.getSpaceIndentSize(CSSPlugin.getDefault().getBundle(<MASK><NEW_LINE>// $NON-NLS-1$<NEW_LINE>pref.put(CSSFormatterConstants.FORMATTER_INDENTATION_SIZE, "4");<NEW_LINE>pref.putBoolean(CSSFormatterConstants.WRAP_COMMENTS, false);<NEW_LINE>pref.putInt(CSSFormatterConstants.WRAP_COMMENTS_LENGTH, 80);<NEW_LINE>pref.put(CSSFormatterConstants.NEW_LINES_BEFORE_BLOCKS, CodeFormatterConstants.SAME_LINE);<NEW_LINE>pref.putInt(CSSFormatterConstants.LINES_AFTER_ELEMENTS, 0);<NEW_LINE>pref.putInt(CSSFormatterConstants.LINES_AFTER_DECLARATION, 0);<NEW_LINE>pref.putInt(CSSFormatterConstants.PRESERVED_LINES, 1);<NEW_LINE>pref.putInt(CSSFormatterConstants.SPACES_BEFORE_COMMAS, 0);<NEW_LINE>pref.putInt(CSSFormatterConstants.SPACES_AFTER_COMMAS, 1);<NEW_LINE>pref.putInt(CSSFormatterConstants.SPACES_BEFORE_SEMICOLON, 0);<NEW_LINE>pref.putInt(CSSFormatterConstants.SPACES_AFTER_SEMICOLON, 0);<NEW_LINE>pref.putInt(CSSFormatterConstants.SPACES_BEFORE_PARENTHESES, 1);<NEW_LINE>pref.putInt(CSSFormatterConstants.SPACES_AFTER_PARENTHESES, 1);<NEW_LINE>pref.putInt(CSSFormatterConstants.SPACES_BEFORE_COLON, 0);<NEW_LINE>pref.putInt(CSSFormatterConstants.SPACES_AFTER_COLON, 1);<NEW_LINE>pref.putInt(CSSFormatterConstants.SPACES_BEFORE_CHILD_COMBINATOR, 1);<NEW_LINE>pref.putInt(CSSFormatterConstants.SPACES_AFTER_CHILD_COMBINATOR, 1);<NEW_LINE>pref.putBoolean(CSSFormatterConstants.FORMATTER_OFF_ON_ENABLED, false);<NEW_LINE>pref.put(CSSFormatterConstants.FORMATTER_ON, CSSFormatterConstants.DEFAULT_FORMATTER_ON);<NEW_LINE>pref.put(CSSFormatterConstants.FORMATTER_OFF, CSSFormatterConstants.DEFAULT_FORMATTER_OFF);<NEW_LINE>try {<NEW_LINE>pref.flush();<NEW_LINE>} catch (BackingStoreException e) {<NEW_LINE>IdeLog.logError(CSSFormatterPlugin.getDefault(), e, IDebugScopes.DEBUG);<NEW_LINE>}<NEW_LINE>}
).getSymbolicName())));
1,086,707
private static void showWarning(Object filename, int lineno, Object text, Object category, Object sourceline) {<NEW_LINE>Object name;<NEW_LINE>if (category instanceof PythonBuiltinClassType) {<NEW_LINE>name = ((PythonBuiltinClassType) category).getName();<NEW_LINE>} else {<NEW_LINE>name = PyObjectLookupAttr.getUncached().execute(null, category, SpecialAttributeNames.__NAME__);<NEW_LINE>}<NEW_LINE>Object stderr = PythonContext.get(null).getStderr();<NEW_LINE>// tfel: I've inlined PyFile_WriteObject, which just calls the "write" method and<NEW_LINE>// decides if we should use "repr" or "str" - in this case its always "str" for objects<NEW_LINE>// Print "filename:lineno: category: text\n"<NEW_LINE>PyObjectCallMethodObjArgs call = PyObjectCallMethodObjArgs.getUncached();<NEW_LINE>PyObjectStrAsObjectNode str = PyObjectStrAsObjectNode.getUncached();<NEW_LINE>call.execute(null, stderr, "write", str.execute(null, filename));<NEW_LINE>call.execute(null, stderr, "write", String.format(":%d:", lineno));<NEW_LINE>call.execute(null, stderr, "write", str.execute(null, name));<NEW_LINE>call.execute(null, stderr, "write", ": ");<NEW_LINE>call.execute(null, stderr, "write", str.execute(null, text));<NEW_LINE>call.execute(<MASK><NEW_LINE>// Print " source_line\n"<NEW_LINE>if (sourceline != null) {<NEW_LINE>// CPython goes through the trouble of getting a substring of sourceline with<NEW_LINE>// leading whitespace removed, but then ignores the substring and prints the full<NEW_LINE>// sourceline anyway...<NEW_LINE>call.execute(null, stderr, "write", str.execute(null, sourceline));<NEW_LINE>call.execute(null, stderr, "write", "\n");<NEW_LINE>} else {<NEW_LINE>// TODO: _Py_DisplaySourceLine(f_stderr, filename, lineno, indent 2);<NEW_LINE>}<NEW_LINE>}
null, stderr, "write", "\n");
458,732
private void generateStepExecutionEntry(Long executionId, Long dummyTopLevelStepExecId, BatchStatus batchStatus, String exitStatus) throws Exception {<NEW_LINE>long stepExecutionId = -1L;<NEW_LINE>Connection conn = null;<NEW_LINE>PreparedStatement statement = null;<NEW_LINE>ResultSet rs = null;<NEW_LINE>long time = System.currentTimeMillis();<NEW_LINE>Timestamp timestamp = new Timestamp(time);<NEW_LINE>// I suppose we're not buying ourselves much by enforcing that the FK_TOPLVL_STEPEXECID can never be null<NEW_LINE>String query = // 'T' => (T)op-level.<NEW_LINE>"INSERT INTO JBATCH.STEPTHREADEXECUTION (FK_JOBEXECID, batchstatus, exitstatus, stepname, M_READ, " + "M_WRITE, M_COMMIT, M_ROLLBACK, M_READSKIP, M_PROCESSSKIP, M_WRITESKIP, M_FILTER, STARTTIME, ENDTIME, FK_TOPLVL_STEPEXECID, INTERNALSTATUS, PARTNUM, THREADTYPE) " + "VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, 0, -1, 'T' )";<NEW_LINE>try {<NEW_LINE>conn = getDataSourceConnection();<NEW_LINE>statement = conn.prepareStatement(query, new String[] { "STEPEXECID" });<NEW_LINE>statement.setLong(1, executionId);<NEW_LINE>statement.setInt(2, batchStatus.ordinal());<NEW_LINE>statement.setString(3, exitStatus);<NEW_LINE>statement.setString(4, "stepName_" + executionId);<NEW_LINE>statement.setLong(5, 0);<NEW_LINE>statement.setLong(6, 0);<NEW_LINE>statement.setLong(7, 0);<NEW_LINE>statement.setLong(8, 0);<NEW_LINE><MASK><NEW_LINE>statement.setLong(10, 0);<NEW_LINE>statement.setLong(11, 0);<NEW_LINE>statement.setLong(12, 0);<NEW_LINE>statement.setTimestamp(13, timestamp);<NEW_LINE>statement.setTimestamp(14, timestamp);<NEW_LINE>statement.setLong(15, dummyTopLevelStepExecId);<NEW_LINE>statement.executeUpdate();<NEW_LINE>rs = statement.getGeneratedKeys();<NEW_LINE>if (rs.next()) {<NEW_LINE>stepExecutionId = rs.getLong(1);<NEW_LINE>}<NEW_LINE>} catch (Exception ex) {<NEW_LINE>logger.info("exception creating execution instance: " + ex.toString());<NEW_LINE>throw new TestFailureException(ex.getMessage());<NEW_LINE>} finally {<NEW_LINE>cleanupConnection(conn, rs, statement);<NEW_LINE>}<NEW_LINE>String msg = "generateStepExecutionEntry return execution instance:[" + stepExecutionId + "]";<NEW_LINE>logger.info(msg);<NEW_LINE>}
statement.setLong(9, 0);
1,429,437
private static Request prepareReindexRequest(ReindexRequest reindexRequest, boolean waitForCompletion) {<NEW_LINE>String endpoint = new EndpointBuilder().addPathPart("_reindex").build();<NEW_LINE>Request request = new Request(HttpMethod.POST.name(), endpoint);<NEW_LINE>Params params = new Params(request).withWaitForCompletion(waitForCompletion).withRefresh(reindexRequest.isRefresh()).withTimeout(reindexRequest.getTimeout()).withWaitForActiveShards(reindexRequest.getWaitForActiveShards()).withRequestsPerSecond(reindexRequest.getRequestsPerSecond());<NEW_LINE>if (reindexRequest.getDestination().isRequireAlias()) {<NEW_LINE>params.putParam("require_alias", <MASK><NEW_LINE>}<NEW_LINE>if (reindexRequest.getScrollTime() != null) {<NEW_LINE>params.putParam("scroll", reindexRequest.getScrollTime());<NEW_LINE>}<NEW_LINE>params.putParam("slices", Integer.toString(reindexRequest.getSlices()));<NEW_LINE>if (reindexRequest.getMaxDocs() > -1) {<NEW_LINE>params.putParam("max_docs", Integer.toString(reindexRequest.getMaxDocs()));<NEW_LINE>}<NEW_LINE>request.setEntity(createEntity(reindexRequest, REQUEST_BODY_CONTENT_TYPE));<NEW_LINE>return request;<NEW_LINE>}
Boolean.TRUE.toString());
1,051,586
public void onChildDraw(Canvas c, RecyclerView recyclerView, RecyclerView.ViewHolder viewHolder, float dX, float dY, int actionState, boolean isCurrentlyActive) {<NEW_LINE>View itemView = viewHolder.itemView;<NEW_LINE>// not sure why, but this method get's called for viewholder that are already swiped away<NEW_LINE>if (viewHolder.getAdapterPosition() == -1) {<NEW_LINE>// not interested in those<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (!initiated) {<NEW_LINE>init();<NEW_LINE>}<NEW_LINE>// draw red background<NEW_LINE>background.setBounds(itemView.getRight() + (int) dX, itemView.getTop(), itemView.getRight(), itemView.getBottom());<NEW_LINE>background.draw(c);<NEW_LINE>// draw x mark<NEW_LINE>int itemHeight = itemView.getBottom() - itemView.getTop();<NEW_LINE><MASK><NEW_LINE>int intrinsicHeight = xMark.getIntrinsicWidth();<NEW_LINE>int xMarkLeft = itemView.getRight() - xMarkMargin - intrinsicWidth;<NEW_LINE>int xMarkRight = itemView.getRight() - xMarkMargin;<NEW_LINE>int xMarkTop = itemView.getTop() + (itemHeight - intrinsicHeight) / 2;<NEW_LINE>int xMarkBottom = xMarkTop + intrinsicHeight;<NEW_LINE>xMark.setBounds(xMarkLeft, xMarkTop, xMarkRight, xMarkBottom);<NEW_LINE>// xMark.draw(c);<NEW_LINE>super.onChildDraw(c, recyclerView, viewHolder, dX, dY, actionState, isCurrentlyActive);<NEW_LINE>}
int intrinsicWidth = xMark.getIntrinsicWidth();
1,381,306
public static boolean isMouseActionEvent(@Nonnull MouseEvent e, @Nonnull String actionId) {<NEW_LINE><MASK><NEW_LINE>if (keymapManager == null) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>Keymap keymap = keymapManager.getActiveKeymap();<NEW_LINE>if (keymap == null) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>int button = e.getButton();<NEW_LINE>int modifiers = e.getModifiersEx();<NEW_LINE>if (button == MouseEvent.NOBUTTON && e.getID() == MouseEvent.MOUSE_DRAGGED) {<NEW_LINE>// mouse drag events don't have button field set due to some reason<NEW_LINE>if ((modifiers & InputEvent.BUTTON1_DOWN_MASK) != 0) {<NEW_LINE>button = MouseEvent.BUTTON1;<NEW_LINE>} else if ((modifiers & InputEvent.BUTTON2_DOWN_MASK) != 0) {<NEW_LINE>button = MouseEvent.BUTTON2;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>String[] actionIds = keymap.getActionIds(new MouseShortcut(button, modifiers, 1));<NEW_LINE>if (actionIds == null) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>for (String id : actionIds) {<NEW_LINE>if (actionId.equals(id)) {<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return false;<NEW_LINE>}
KeymapManager keymapManager = KeymapManager.getInstance();
79,490
private void sortTail() {<NEW_LINE>// size > limit here<NEW_LINE>T[] d = data;<NEW_LINE><MASK><NEW_LINE>Comparator<? super T> cmp = comparator;<NEW_LINE>Arrays.sort(d, l, s, cmp);<NEW_LINE>if (cmp.compare(d[s - 1], d[0]) < 0) {<NEW_LINE>// Common case: descending sequence<NEW_LINE>// Assume size - limit <= limit here<NEW_LINE>System.arraycopy(d, 0, d, s - l, 2 * l - s);<NEW_LINE>System.arraycopy(d, l, d, 0, s - l);<NEW_LINE>} else {<NEW_LINE>// Merge presorted 0..limit-1 and limit..size-1<NEW_LINE>@SuppressWarnings("unchecked")<NEW_LINE>T[] buf = (T[]) new Object[l];<NEW_LINE>int i = 0, j = l, k = 0;<NEW_LINE>// d[l-1] is guaranteed to be the worst element, thus no need to<NEW_LINE>// check it<NEW_LINE>while (i < l - 1 && k < l && j < s) {<NEW_LINE>if (cmp.compare(d[i], d[j]) <= 0) {<NEW_LINE>buf[k++] = d[i++];<NEW_LINE>} else {<NEW_LINE>buf[k++] = d[j++];<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (k < l) {<NEW_LINE>System.arraycopy(d, i < l - 1 ? i : j, d, k, l - k);<NEW_LINE>}<NEW_LINE>System.arraycopy(buf, 0, d, 0, k);<NEW_LINE>}<NEW_LINE>size = l;<NEW_LINE>}
int l = limit, s = size;
1,190,637
public Clustering<DendrogramModel> extractClusters() {<NEW_LINE>final Logging log = getLogger();<NEW_LINE>final int split = findSplit();<NEW_LINE>// Extract the child clusters<NEW_LINE>FiniteProgress progress = log.isVerbose() ? new FiniteProgress("Extracting clusters", merges.numMerges(), log) : null;<NEW_LINE>// Initialize data structures:<NEW_LINE>final int expcnum = merges.size() - split + 1;<NEW_LINE>leafMap = new Int2IntOpenHashMap(merges.size());<NEW_LINE>leafMap.defaultReturnValue(-1);<NEW_LINE>clusterMembers <MASK><NEW_LINE>leafTop = new IntegerArray(expcnum);<NEW_LINE>buildLeafClusters(split, progress);<NEW_LINE>//<NEW_LINE>Clustering<DendrogramModel> //<NEW_LINE>dendrogram = hierarchical ? buildHierarchical(split, progress) : buildFlat(split, progress);<NEW_LINE>log.ensureCompleted(progress);<NEW_LINE>return dendrogram;<NEW_LINE>}
= new ArrayList<>(expcnum);
677,546
// analyze the origin stmt and return multi-statements<NEW_LINE>private List<StatementBase> analyze(String originStmt) throws AnalysisException {<NEW_LINE>LOG.debug("the originStmts are: {}", originStmt);<NEW_LINE>// Parse statement with parser generated by CUP&FLEX<NEW_LINE>SqlScanner input = new SqlScanner(new StringReader(originStmt), ctx.getSessionVariable().getSqlMode());<NEW_LINE>SqlParser parser = new SqlParser(input);<NEW_LINE>try {<NEW_LINE>return SqlParserUtils.getMultiStmts(parser);<NEW_LINE>} catch (Error e) {<NEW_LINE>throw new AnalysisException("Please check your sql, we meet an error when parsing.", e);<NEW_LINE>} catch (AnalysisException e) {<NEW_LINE>LOG.warn("origin_stmt: " + originStmt + "; Analyze error message: " + parser.getErrorMsg(originStmt), e);<NEW_LINE>String errorMessage = parser.getErrorMsg(originStmt);<NEW_LINE>if (errorMessage == null) {<NEW_LINE>throw e;<NEW_LINE>} else {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>} catch (Exception e) {<NEW_LINE>// TODO(lingbin): we catch 'Exception' to prevent unexpected error,<NEW_LINE>// should be removed this try-catch clause future.<NEW_LINE>LOG.warn("origin_stmt: " + originStmt + "; exception: ", e);<NEW_LINE>String errorMessage = e.getMessage();<NEW_LINE>if (errorMessage == null) {<NEW_LINE>throw new AnalysisException("Internal Error");<NEW_LINE>} else {<NEW_LINE>throw new AnalysisException("Internal Error: " + errorMessage);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
throw new AnalysisException(errorMessage, e);
480,227
private String queryServiceName(GrpcRequestContainer request, Templater templater) {<NEW_LINE>ReplayProcessor<String> processor = ReplayProcessor.create();<NEW_LINE>fetchServiceList(processor.sink(), request, templater);<NEW_LINE>var serviceDefinitions = Flux.from(processor).collectList().block();<NEW_LINE>var inputDialog = new SelectValueDialog();<NEW_LINE>CountDownLatch latch = new CountDownLatch(1);<NEW_LINE>Platform.runLater(() -> {<NEW_LINE>inputDialog.showAndWait("Service Name", "Choose Service", serviceDefinitions.stream(<MASK><NEW_LINE>latch.countDown();<NEW_LINE>});<NEW_LINE>latch.await();<NEW_LINE>if (inputDialog.isCancelled()) {<NEW_LINE>throw new IllegalArgumentException("Operation manually cancelled.");<NEW_LINE>}<NEW_LINE>if (StringUtils.isBlank(inputDialog.getInput())) {<NEW_LINE>throw new IllegalArgumentException("No servicename provided.");<NEW_LINE>}<NEW_LINE>return inputDialog.getInput();<NEW_LINE>}
).findFirst(), serviceDefinitions);
699,939
public Yaml.Mapping.Entry visitMappingEntry(Yaml.Mapping.Entry entry, ExecutionContext ctx) {<NEW_LINE>Yaml.Mapping.Entry e = super.visitMappingEntry(entry, ctx);<NEW_LINE>Deque<Yaml.Mapping.Entry> propertyEntries = getCursor().getPathAsStream().filter(Yaml.Mapping.Entry.class::isInstance).map(Yaml.Mapping.Entry.class::cast).collect(Collectors.toCollection(ArrayDeque::new));<NEW_LINE>String prop = stream(spliteratorUnknownSize(propertyEntries.descendingIterator(), 0), false).map(e2 -> e2.getKey().getValue()).collect(Collectors.joining("."));<NEW_LINE>if (!Boolean.FALSE.equals(relaxedBinding) ? NameCaseConvention.equalsRelaxedBinding(prop, propertyKey) : prop.equals(propertyKey)) {<NEW_LINE>e = e.withValue(e.getValue().withMarkers(e.getValue().getMarkers<MASK><NEW_LINE>}<NEW_LINE>return e;<NEW_LINE>}
().searchResult()));
427,997
public DataRecord deserialize(final DataInput source, @NonNegative final long recordID, final SirixDeweyID deweyID, final PageReadOnlyTrx pageReadTrx) throws IOException {<NEW_LINE>final int valueSize = source.readInt();<NEW_LINE>final byte[] value = new byte[valueSize];<NEW_LINE>source.readFully(value, 0, valueSize);<NEW_LINE>final int typeSize = source.readInt();<NEW_LINE>final byte[] type = new byte[typeSize];<NEW_LINE>source.<MASK><NEW_LINE>final int keySize = source.readInt();<NEW_LINE>final Set<Long> nodeKeys = new HashSet<>(keySize);<NEW_LINE>if (keySize > 0) {<NEW_LINE>long key = getVarLong(source);<NEW_LINE>nodeKeys.add(key);<NEW_LINE>for (int i = 1; i < keySize; i++) {<NEW_LINE>key += getVarLong(source);<NEW_LINE>nodeKeys.add(key);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>final Type atomicType = resolveType(new String(type, Constants.DEFAULT_ENCODING));<NEW_LINE>// Node delegate.<NEW_LINE>final NodeDelegate nodeDel = deserializeNodeDelegateWithoutIDs(source, recordID, pageReadTrx);<NEW_LINE>final long leftChild = getVarLong(source);<NEW_LINE>final long rightChild = getVarLong(source);<NEW_LINE>final long pathNodeKey = getVarLong(source);<NEW_LINE>final boolean isChanged = source.readBoolean();<NEW_LINE>final Atomic atomic = AtomicUtil.fromBytes(value, atomicType);<NEW_LINE>final var node = new RBNode<>(new CASValue(atomic, atomicType, pathNodeKey), new NodeReferences(nodeKeys), nodeDel);<NEW_LINE>node.setLeftChildKey(leftChild);<NEW_LINE>node.setRightChildKey(rightChild);<NEW_LINE>node.setChanged(isChanged);<NEW_LINE>return node;<NEW_LINE>}
readFully(type, 0, typeSize);
535,861
private Mono<Response<ResourceListKeysInner>> listKeysWithResponseAsync(String resourceGroupName, String namespaceName, String authorizationRuleName, Context context) {<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 (resourceGroupName == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));<NEW_LINE>}<NEW_LINE>if (namespaceName == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null."));<NEW_LINE>}<NEW_LINE>if (authorizationRuleName == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter authorizationRuleName 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>final String accept = "application/json";<NEW_LINE>context = <MASK><NEW_LINE>return service.listKeys(this.client.getEndpoint(), resourceGroupName, namespaceName, authorizationRuleName, this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context);<NEW_LINE>}
this.client.mergeContext(context);
582,352
public void initView() {<NEW_LINE>Array<AttributeVO> gridAttributes = new Array<>();<NEW_LINE>gridAttributes.add(new AttributeVO("Width", currentParameters.gridWidth));<NEW_LINE>gridAttributes.add(new AttributeVO("Height", currentParameters.gridHeight));<NEW_LINE>CategoryVO gridVO = new CategoryVO("Grid size: ", gridAttributes);<NEW_LINE>grid = new Category(gridVO);<NEW_LINE>content.add(grid).expandX().colspan(2).padTop(10).left().top().row();<NEW_LINE>panel.tiledPlugin.dataToSave.setParameterVO(currentParameters);<NEW_LINE>VisTextButton okBtn = new VisTextButton("Save");<NEW_LINE>content.add(okBtn).width(70).pad(20).colspan(2).expandX().center()<MASK><NEW_LINE>okBtn.addListener(new ClickListener() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void clicked(InputEvent event, float x, float y) {<NEW_LINE>super.clicked(event, x, y);<NEW_LINE>currentParameters.gridWidth = grid.getAttributeVO("Width: ").value;<NEW_LINE>currentParameters.gridHeight = grid.getAttributeVO("Height: ").value;<NEW_LINE>panel.facade.sendNotification(OK_BTN_CLICKED, currentParameters);<NEW_LINE>}<NEW_LINE>});<NEW_LINE>}
.bottom().row();
1,556,110
private SuperByteBuffer buildStructureBuffer(PonderWorld world, RenderType layer) {<NEW_LINE>BlockRenderDispatcher dispatcher = ModelUtil.VANILLA_RENDERER;<NEW_LINE><MASK><NEW_LINE>PoseStack poseStack = objects.poseStack;<NEW_LINE>Random random = objects.random;<NEW_LINE>ShadeSeparatingVertexConsumer shadeSeparatingWrapper = objects.shadeSeparatingWrapper;<NEW_LINE>ShadeSeparatedBufferBuilder builder = new ShadeSeparatedBufferBuilder(512);<NEW_LINE>BufferBuilder unshadedBuilder = objects.unshadedBuilder;<NEW_LINE>builder.begin(VertexFormat.Mode.QUADS, DefaultVertexFormat.BLOCK);<NEW_LINE>unshadedBuilder.begin(VertexFormat.Mode.QUADS, DefaultVertexFormat.BLOCK);<NEW_LINE>shadeSeparatingWrapper.prepare(builder, unshadedBuilder);<NEW_LINE>world.setMask(this.section);<NEW_LINE>ForgeHooksClient.setRenderType(layer);<NEW_LINE>ModelBlockRenderer.enableCaching();<NEW_LINE>section.forEach(pos -> {<NEW_LINE>BlockState state = world.getBlockState(pos);<NEW_LINE>FluidState fluidState = world.getFluidState(pos);<NEW_LINE>poseStack.pushPose();<NEW_LINE>poseStack.translate(pos.getX(), pos.getY(), pos.getZ());<NEW_LINE>if (state.getRenderShape() == RenderShape.MODEL && ItemBlockRenderTypes.canRenderInLayer(state, layer)) {<NEW_LINE>BlockEntity tileEntity = world.getBlockEntity(pos);<NEW_LINE>dispatcher.renderBatched(state, pos, world, poseStack, shadeSeparatingWrapper, true, random, tileEntity != null ? tileEntity.getModelData() : EmptyModelData.INSTANCE);<NEW_LINE>}<NEW_LINE>if (!fluidState.isEmpty() && ItemBlockRenderTypes.canRenderInLayer(fluidState, layer))<NEW_LINE>dispatcher.renderLiquid(pos, world, builder, state, fluidState);<NEW_LINE>poseStack.popPose();<NEW_LINE>});<NEW_LINE>ModelBlockRenderer.clearCache();<NEW_LINE>ForgeHooksClient.setRenderType(null);<NEW_LINE>world.clearMask();<NEW_LINE>shadeSeparatingWrapper.clear();<NEW_LINE>unshadedBuilder.end();<NEW_LINE>builder.appendUnshadedVertices(unshadedBuilder);<NEW_LINE>builder.end();<NEW_LINE>return new SuperByteBuffer(builder);<NEW_LINE>}
ThreadLocalObjects objects = THREAD_LOCAL_OBJECTS.get();
577,523
void draw(Graphics g) {<NEW_LINE>setBbox(point1, point2, 3 * opheight / 2);<NEW_LINE>setVoltageColor(g, volts[0]);<NEW_LINE>drawThickLine(g, in1p[0], in1p[1]);<NEW_LINE>setVoltageColor(g, volts[1]);<NEW_LINE>drawThickLine(g, in2p[0], in2p[1]);<NEW_LINE>setVoltageColor(g, volts[2]);<NEW_LINE>drawThickLine(g, in3p[0], in3p[1]);<NEW_LINE>setVoltageColor(g, volts[3]);<NEW_LINE>drawThickLine(g, in4p[0], in4p[1]);<NEW_LINE>g.setColor(needsHighlight() ? selectColor : lightGrayColor);<NEW_LINE>setPowerColor(g, true);<NEW_LINE>drawThickPolygon(g, triangle);<NEW_LINE>g.fillPolygon(arrowPoly1);<NEW_LINE>g.fillPolygon(arrowPoly2);<NEW_LINE>drawThickLine(g, bar1[0], bar1[1]);<NEW_LINE>drawThickLine(g, bar2[0], bar2[1]);<NEW_LINE>drawThickCircle(g, circCent[0].x, circCent[0].y, circDiam / 2);<NEW_LINE>drawThickCircle(g, circCent[1].x, circCent[1].y, circDiam / 2);<NEW_LINE>g.setFont(plusFont);<NEW_LINE>drawCenteredText(g, "+", textp[0].x, textp[0].y - 2, true);<NEW_LINE>drawCenteredText(g, "-", textp[1].x, textp[1].y, true);<NEW_LINE>// setVoltageColor(g, volts[2]);<NEW_LINE>// drawThickLine(g, lead2, point2);<NEW_LINE>curCount0 = updateDotCount(-getCurrentIntoNode(0), curCount0);<NEW_LINE>drawDots(g, in1p[0], in1p[1], curCount0);<NEW_LINE>curCount1 = updateDotCount(-getCurrentIntoNode(1), curCount1);<NEW_LINE>drawDots(g, in2p[0], in2p[1], curCount0);<NEW_LINE>curCount2 = updateDotCount(-getCurrentIntoNode(2), curCount2);<NEW_LINE>drawDots(g, in3p[0], in3p[1], curCount2);<NEW_LINE>curCount3 = updateDotCount(<MASK><NEW_LINE>drawDots(g, in4p[0], in4p[1], curCount3);<NEW_LINE>drawPosts(g);<NEW_LINE>}
-getCurrentIntoNode(3), curCount3);
462,710
public void onCreate(Bundle savedInstanceState) {<NEW_LINE>super.onCreate(savedInstanceState);<NEW_LINE>binding = ActivityAboutBinding.inflate(getLayoutInflater());<NEW_LINE>final View view = binding.getRoot();<NEW_LINE>setContentView(view);<NEW_LINE>setSupportActionBar(binding.toolbarBinding.toolbar);<NEW_LINE>getSupportActionBar().setDisplayHomeAsUpEnabled(true);<NEW_LINE>final String aboutText = getString(R.string.about_license);<NEW_LINE>binding.aboutLicense.setHtmlText(aboutText);<NEW_LINE>@SuppressLint("StringFormatMatches")<NEW_LINE>String improveText = String.format(getString(R.string.about_improve), Urls.NEW_ISSUE_URL);<NEW_LINE>binding.aboutImprove.setHtmlText(improveText);<NEW_LINE>binding.aboutVersion.setText(ConfigUtils.getVersionNameWithSha(getApplicationContext()));<NEW_LINE>Utils.setUnderlinedText(binding.aboutFaq, R.string.about_faq, getApplicationContext());<NEW_LINE>Utils.setUnderlinedText(binding.aboutRateUs, R.string.about_rate_us, getApplicationContext());<NEW_LINE>Utils.setUnderlinedText(binding.aboutUserGuide, R.string.user_guide, getApplicationContext());<NEW_LINE>Utils.setUnderlinedText(binding.aboutPrivacyPolicy, R.string.about_privacy_policy, getApplicationContext());<NEW_LINE>Utils.setUnderlinedText(binding.aboutTranslate, R.string.about_translate, getApplicationContext());<NEW_LINE>Utils.setUnderlinedText(binding.aboutCredits, R.string.about_credits, getApplicationContext());<NEW_LINE>binding.facebookLaunchIcon.setOnClickListener(this::launchFacebook);<NEW_LINE>binding.<MASK><NEW_LINE>binding.websiteLaunchIcon.setOnClickListener(this::launchWebsite);<NEW_LINE>binding.aboutRateUs.setOnClickListener(this::launchRatings);<NEW_LINE>binding.aboutCredits.setOnClickListener(this::launchCredits);<NEW_LINE>binding.aboutPrivacyPolicy.setOnClickListener(this::launchPrivacyPolicy);<NEW_LINE>binding.aboutUserGuide.setOnClickListener(this::launchUserGuide);<NEW_LINE>binding.aboutFaq.setOnClickListener(this::launchFrequentlyAskedQuesions);<NEW_LINE>binding.aboutTranslate.setOnClickListener(this::launchTranslate);<NEW_LINE>}
githubLaunchIcon.setOnClickListener(this::launchGithub);
696,907
private void convertGrailsProject(IProject project, SubMonitor sub) throws Exception {<NEW_LINE>// nature<NEW_LINE>IProjectDescription description = project.getDescription();<NEW_LINE>String[] ids = description.getNatureIds();<NEW_LINE>List<String> newIds = new ArrayList<String>(ids.length);<NEW_LINE>for (int i = 0; i < ids.length; i++) {<NEW_LINE>if (!ids[i].equals(GRAILS_OLD_NATURE) && !ids[i].equals(GRAILS_NEW_NATURE)) {<NEW_LINE>newIds.add(ids[i]);<NEW_LINE>} else {<NEW_LINE>newIds.add(GRAILS_NEW_NATURE);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>description.setNatureIds(newIds.toArray(new String[0]));<NEW_LINE>project.setDescription(description, sub);<NEW_LINE>// project preferences<NEW_LINE>// $NON-NLS-1$<NEW_LINE>IFolder preferencesFolder = project.getFolder(".settings/");<NEW_LINE>// $NON-NLS-1$ //$NON-NLS-2$<NEW_LINE>File settingsFile = preferencesFolder.getFile(GRAILS_OLD_PLUGIN_NAME + ".prefs").getLocation().toFile();<NEW_LINE>// $NON-NLS-1$ //$NON-NLS-2$<NEW_LINE>File newSettingsFile = preferencesFolder.getFile(GRAILS_NEW_PLUGIN_NAME + ".prefs").getLocation().toFile();<NEW_LINE>copyPreferencesFile(settingsFile, newSettingsFile, GRAILS_OLD_PREFERENCE_PREFIX, GRAILS_NEW_PREFERENCE_PREFIX);<NEW_LINE>InstanceScope.INSTANCE.getNode(GRAILS_OLD_PLUGIN_NAME).sync();<NEW_LINE>preferencesFolder.refreshLocal(IResource.DEPTH_ONE, sub);<NEW_LINE>// classpath container<NEW_LINE>IJavaProject javaProject = JavaCore.create(project);<NEW_LINE>IClasspathEntry[] classpath = javaProject.getRawClasspath();<NEW_LINE>List<IClasspathEntry> newClasspath <MASK><NEW_LINE>for (int i = 0; i < classpath.length; i++) {<NEW_LINE>if (classpath[i].getPath().toString().equals(GRAILS_OLD_CONTAINER)) {<NEW_LINE>newClasspath.add(JavaCore.newContainerEntry(new Path(GRAILS_NEW_CONTAINER), classpath[i].getAccessRules(), convertGrailsClasspathAttributes(classpath[i]), classpath[i].isExported()));<NEW_LINE>} else if (classpath[i].getEntryKind() == IClasspathEntry.CPE_SOURCE) {<NEW_LINE>newClasspath.add(JavaCore.newSourceEntry(classpath[i].getPath(), classpath[i].getInclusionPatterns(), classpath[i].getExclusionPatterns(), classpath[i].getOutputLocation(), convertGrailsClasspathAttributes(classpath[i])));<NEW_LINE>} else {<NEW_LINE>newClasspath.add(classpath[i]);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>javaProject.setRawClasspath(newClasspath.toArray(new IClasspathEntry[0]), sub);<NEW_LINE>}
= new ArrayList<IClasspathEntry>();
1,437,622
private boolean isMongos() {<NEW_LINE>if (definition.isMongos() != null) {<NEW_LINE>return definition.isMongos().booleanValue();<NEW_LINE>} else {<NEW_LINE>DB adminDb = getAdminDb();<NEW_LINE>if (adminDb == null) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>logger.trace("Found {} database", MongoDBRiver.MONGODB_ADMIN_DATABASE);<NEW_LINE>DBObject command = BasicDBObjectBuilder.start(ImmutableMap.builder().put("serverStatus", 1).put("asserts", 0).put("backgroundFlushing", 0).put("connections", 0).put("cursors", 0).put("dur", 0).put("extra_info", 0).put("globalLock", 0).put("indexCounters", 0).put("locks", 0).put("metrics", 0).put("network", 0).put("opcounters", 0).put("opcountersRepl", 0).put("recordStats", 0).put("repl", 0).build()).get();<NEW_LINE>logger.trace("About to execute: {}", command);<NEW_LINE>CommandResult cr = adminDb.command(command, ReadPreference.primary());<NEW_LINE>logger.trace("Command executed return : {}", cr);<NEW_LINE>logger.info("MongoDB version - {}", cr.get("version"));<NEW_LINE>if (logger.isTraceEnabled()) {<NEW_LINE>logger.trace("serverStatus: {}", cr);<NEW_LINE>}<NEW_LINE>if (!cr.ok()) {<NEW_LINE>logger.warn("serverStatus returns error: {}", cr.getErrorMessage());<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>if (cr.get("process") == null) {<NEW_LINE>logger.warn("serverStatus.process return null.");<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>String process = cr.get("process").toString().toLowerCase();<NEW_LINE>if (logger.isTraceEnabled()) {<NEW_LINE>logger.trace("process: {}", process);<NEW_LINE>}<NEW_LINE>// Fix for https://jira.mongodb.org/browse/SERVER-9160<NEW_LINE>return <MASK><NEW_LINE>}<NEW_LINE>}
(process.contains("mongos"));
1,592,809
private static void requestShapeFeatures(ImageData<?> imageData, Collection<ShapeFeatures> features) {<NEW_LINE>if (imageData == null)<NEW_LINE>return;<NEW_LINE>var featureArray = features.<MASK><NEW_LINE>if (featureArray.length == 0)<NEW_LINE>return;<NEW_LINE>Collection<PathObject> selected = imageData.getHierarchy().getSelectionModel().getSelectedObjects();<NEW_LINE>if (selected.isEmpty()) {<NEW_LINE>Dialogs.showWarningNotification("Shape features", "No objects selected!");<NEW_LINE>} else {<NEW_LINE>selected = new ArrayList<>(selected);<NEW_LINE>String featureString = Arrays.stream(featureArray).map(f -> "\"" + f.name() + "\"").collect(Collectors.joining(", "));<NEW_LINE>QP.addShapeMeasurements(imageData, selected, featureArray);<NEW_LINE>imageData.getHistoryWorkflow().addStep(new DefaultScriptableWorkflowStep("Add shape measurements", String.format("addShapeMeasurements(%s)", featureString)));<NEW_LINE>if (selected.size() == 1)<NEW_LINE>Dialogs.showInfoNotification("Shape features", "Shape features calculated for one object");<NEW_LINE>else<NEW_LINE>Dialogs.showInfoNotification("Shape features", "Shape features calculated for " + selected.size() + " objects");<NEW_LINE>}<NEW_LINE>}
toArray(ShapeFeatures[]::new);
1,632,624
private void checkStatus() {<NEW_LINE>new AsyncTask<Void, Void, Boolean>() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>protected Boolean doInBackground(Void... voids) {<NEW_LINE>List<String> owned = bp.listOwnedProducts();<NEW_LINE>return owned != null && owned.size() != 0;<NEW_LINE>}<NEW_LINE><NEW_LINE>@Override<NEW_LINE>protected void onPostExecute(Boolean b) {<NEW_LINE>super.onPostExecute(b);<NEW_LINE>if (b) {<NEW_LINE>PreferencesUtility.getInstance(DonateActivity.this).setFullUnlocked(true);<NEW_LINE>status.setText("Thanks for your support!");<NEW_LINE>if (action != null && action.equals("restore")) {<NEW_LINE>status.setText("Your purchases has been restored. Thanks for your support");<NEW_LINE>progressBar.setVisibility(View.GONE);<NEW_LINE>}<NEW_LINE>if (getSupportActionBar() != null)<NEW_LINE><MASK><NEW_LINE>} else {<NEW_LINE>if (action != null && action.equals("restore")) {<NEW_LINE>status.setText("No previous purchase found");<NEW_LINE>getProducts();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}.execute();<NEW_LINE>}
getSupportActionBar().setTitle("Support development");
426,931
public EvalRankingBatchOp linkFrom(BatchOperator<?>... inputs) {<NEW_LINE>BatchOperator<?> in = checkAndGetFirst(inputs);<NEW_LINE>TableUtil.assertSelectedColExist(in.getColNames(<MASK><NEW_LINE>TableUtil.assertSelectedColExist(in.getColNames(), this.getPredictionCol());<NEW_LINE>DataSet<Row> dataSet = in.select(new String[] { this.getLabelCol(), this.getPredictionCol() }).getDataSet();<NEW_LINE>DataSet<Tuple3<Integer, Class, Integer>> labels = EvalMultiLabelBatchOp.getLabelNumberAndMaxK(dataSet, getLabelRankingInfo(), getPredictionRankingInfo());<NEW_LINE>DataSet<Row> out = dataSet.rebalance().mapPartition(new CalcLocal(getLabelRankingInfo(), getPredictionRankingInfo())).withBroadcastSet(labels, EvalMultiLabelBatchOp.LABELS).reduce(new EvaluationUtil.ReduceBaseMetrics()).flatMap(new EvaluationUtil.SaveDataAsParams());<NEW_LINE>this.setOutputTable(DataSetConversionUtil.toTable(getMLEnvironmentId(), out, new TableSchema(new String[] { "data" }, new TypeInformation[] { Types.STRING })));<NEW_LINE>return this;<NEW_LINE>}
), this.getLabelCol());
189,583
private void fillDeserializedKvBuilder(ConsumerRecord<Bytes, Bytes> rec, boolean isKey, DeserializedKeyValueBuilder builder) {<NEW_LINE>Optional<Integer> schemaId = extractSchemaIdFromMsg(rec, isKey);<NEW_LINE>Optional<MessageFormat> format = schemaId.flatMap(this::getMessageFormatBySchemaId);<NEW_LINE>if (schemaId.isPresent() && format.isPresent() && schemaRegistryFormatters.containsKey(format.get())) {<NEW_LINE>var formatter = schemaRegistryFormatters.get(format.get());<NEW_LINE>try {<NEW_LINE>var deserialized = formatter.format(rec.topic(), isKey ? rec.key().get() : rec.value().get());<NEW_LINE>if (isKey) {<NEW_LINE>builder.key(deserialized);<NEW_LINE>builder.keyFormat(formatter.getFormat());<NEW_LINE>builder.keySchemaId(String.valueOf(schemaId.get()));<NEW_LINE>} else {<NEW_LINE>builder.value(deserialized);<NEW_LINE>builder.valueFormat(formatter.getFormat());<NEW_LINE>builder.valueSchemaId(String.valueOf(schemaId.get()));<NEW_LINE>}<NEW_LINE>return;<NEW_LINE>} catch (Exception e) {<NEW_LINE>log.trace("Can't deserialize record {} with formatter {}", rec, formatter.getClass().getSimpleName(), e);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// fallback<NEW_LINE>if (isKey) {<NEW_LINE>builder.key(FALLBACK_FORMATTER.format(rec.topic(), rec.key().get()));<NEW_LINE>builder.keyFormat(FALLBACK_FORMATTER.getFormat());<NEW_LINE>} else {<NEW_LINE>builder.value(FALLBACK_FORMATTER.format(rec.topic(), rec.value<MASK><NEW_LINE>builder.valueFormat(FALLBACK_FORMATTER.getFormat());<NEW_LINE>}<NEW_LINE>}
().get()));
357,382
public static ListScaleOutEcuResponse unmarshall(ListScaleOutEcuResponse listScaleOutEcuResponse, UnmarshallerContext _ctx) {<NEW_LINE>listScaleOutEcuResponse.setRequestId(_ctx.stringValue("ListScaleOutEcuResponse.RequestId"));<NEW_LINE>listScaleOutEcuResponse.setCode(_ctx.integerValue("ListScaleOutEcuResponse.Code"));<NEW_LINE>listScaleOutEcuResponse.setMessage(_ctx.stringValue("ListScaleOutEcuResponse.Message"));<NEW_LINE>List<EcuInfo> ecuInfoList = new ArrayList<EcuInfo>();<NEW_LINE>for (int i = 0; i < _ctx.lengthValue("ListScaleOutEcuResponse.EcuInfoList.Length"); i++) {<NEW_LINE>EcuInfo ecuInfo = new EcuInfo();<NEW_LINE>ecuInfo.setEcuId(_ctx.stringValue("ListScaleOutEcuResponse.EcuInfoList[" + i + "].EcuId"));<NEW_LINE>ecuInfo.setOnline(_ctx.booleanValue("ListScaleOutEcuResponse.EcuInfoList[" + i + "].Online"));<NEW_LINE>ecuInfo.setDockerEnv(_ctx.booleanValue("ListScaleOutEcuResponse.EcuInfoList[" + i + "].DockerEnv"));<NEW_LINE>ecuInfo.setCreateTime(_ctx.longValue("ListScaleOutEcuResponse.EcuInfoList[" + i + "].CreateTime"));<NEW_LINE>ecuInfo.setUpdateTime(_ctx.longValue("ListScaleOutEcuResponse.EcuInfoList[" + i + "].UpdateTime"));<NEW_LINE>ecuInfo.setIpAddr(_ctx.stringValue("ListScaleOutEcuResponse.EcuInfoList[" + i + "].IpAddr"));<NEW_LINE>ecuInfo.setHeartbeatTime(_ctx.longValue("ListScaleOutEcuResponse.EcuInfoList[" + i + "].HeartbeatTime"));<NEW_LINE>ecuInfo.setUserId(_ctx.stringValue("ListScaleOutEcuResponse.EcuInfoList[" + i + "].UserId"));<NEW_LINE>ecuInfo.setName(_ctx.stringValue<MASK><NEW_LINE>ecuInfo.setZoneId(_ctx.stringValue("ListScaleOutEcuResponse.EcuInfoList[" + i + "].ZoneId"));<NEW_LINE>ecuInfo.setRegionId(_ctx.stringValue("ListScaleOutEcuResponse.EcuInfoList[" + i + "].RegionId"));<NEW_LINE>ecuInfo.setInstanceId(_ctx.stringValue("ListScaleOutEcuResponse.EcuInfoList[" + i + "].InstanceId"));<NEW_LINE>ecuInfo.setVpcId(_ctx.stringValue("ListScaleOutEcuResponse.EcuInfoList[" + i + "].VpcId"));<NEW_LINE>ecuInfo.setAvailableCpu(_ctx.integerValue("ListScaleOutEcuResponse.EcuInfoList[" + i + "].AvailableCpu"));<NEW_LINE>ecuInfo.setAvailableMem(_ctx.integerValue("ListScaleOutEcuResponse.EcuInfoList[" + i + "].AvailableMem"));<NEW_LINE>ecuInfoList.add(ecuInfo);<NEW_LINE>}<NEW_LINE>listScaleOutEcuResponse.setEcuInfoList(ecuInfoList);<NEW_LINE>return listScaleOutEcuResponse;<NEW_LINE>}
("ListScaleOutEcuResponse.EcuInfoList[" + i + "].Name"));
131,430
public static org.apache.cassandra.thrift.ConsistencyLevel ToThriftConsistencyLevel(ConsistencyLevel cl) {<NEW_LINE>switch(cl) {<NEW_LINE>case CL_ONE:<NEW_LINE>return org.apache.cassandra.thrift.ConsistencyLevel.ONE;<NEW_LINE>case CL_QUORUM:<NEW_LINE>return org.apache.cassandra.thrift.ConsistencyLevel.QUORUM;<NEW_LINE>case CL_EACH_QUORUM:<NEW_LINE>return org.apache.cassandra.thrift.ConsistencyLevel.EACH_QUORUM;<NEW_LINE>case CL_LOCAL_QUORUM:<NEW_LINE>return org.apache.cassandra.thrift.ConsistencyLevel.LOCAL_QUORUM;<NEW_LINE>case CL_TWO:<NEW_LINE>return org.apache.cassandra.thrift.ConsistencyLevel.TWO;<NEW_LINE>case CL_THREE:<NEW_LINE>return org.apache.cassandra.thrift.ConsistencyLevel.THREE;<NEW_LINE>case CL_ALL:<NEW_LINE>return org.apache.cassandra.thrift.ConsistencyLevel.ALL;<NEW_LINE>case CL_ANY:<NEW_LINE>return org.apache.cassandra.thrift.ConsistencyLevel.ANY;<NEW_LINE>case CL_LOCAL_ONE:<NEW_LINE>return org.apache<MASK><NEW_LINE>default:<NEW_LINE>return org.apache.cassandra.thrift.ConsistencyLevel.QUORUM;<NEW_LINE>}<NEW_LINE>}
.cassandra.thrift.ConsistencyLevel.LOCAL_ONE;
1,226,009
public int findPage(int requiredSize) {<NEW_LINE>int nodeIndex = 0;<NEW_LINE>final int maxValue = 0xFF & getByteValue<MASK><NEW_LINE>if (maxValue == 0 || maxValue < requiredSize) {<NEW_LINE>return -1;<NEW_LINE>}<NEW_LINE>for (int level = 2; level <= LEVELS; level++) {<NEW_LINE>final int leftNodeIndex = nodeIndex << 1;<NEW_LINE>if (leftNodeIndex >= CELLS_PER_PAGE) {<NEW_LINE>return -1;<NEW_LINE>}<NEW_LINE>final int leftNodeOffset = nodeOffset(level, leftNodeIndex);<NEW_LINE>final int leftMax = 0xFF & getByteValue(leftNodeOffset);<NEW_LINE>if (leftMax >= requiredSize) {<NEW_LINE>nodeIndex <<= 1;<NEW_LINE>} else {<NEW_LINE>final int rightNodeIndex = (nodeIndex << 1) + 1;<NEW_LINE>if (rightNodeIndex >= CELLS_PER_PAGE) {<NEW_LINE>return -1;<NEW_LINE>}<NEW_LINE>final int rightNodeOffset = nodeOffset(level, rightNodeIndex);<NEW_LINE>assert (0xFF & getByteValue(rightNodeOffset)) >= requiredSize;<NEW_LINE>nodeIndex = (nodeIndex << 1) + 1;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return nodeIndex;<NEW_LINE>}
(nodeOffset(1, 0));
469,932
public static Download from(Cursor cursor) {<NEW_LINE>Download download = new Download();<NEW_LINE>download.mId = cursor.getLong(cursor.getColumnIndex(DownloadManager.COLUMN_ID));<NEW_LINE>download.mUri = cursor.getString(cursor.getColumnIndex(DownloadManager.COLUMN_URI));<NEW_LINE>int status = cursor.getInt(cursor.getColumnIndex(DownloadManager.COLUMN_STATUS));<NEW_LINE>switch(status) {<NEW_LINE>case DownloadManager.STATUS_RUNNING:<NEW_LINE>download.mStatus = RUNNING;<NEW_LINE>break;<NEW_LINE>case DownloadManager.STATUS_FAILED:<NEW_LINE>download.mStatus = FAILED;<NEW_LINE>break;<NEW_LINE>case DownloadManager.STATUS_PAUSED:<NEW_LINE>download.mStatus = PAUSED;<NEW_LINE>break;<NEW_LINE>case DownloadManager.STATUS_PENDING:<NEW_LINE>download.mStatus = PENDING;<NEW_LINE>break;<NEW_LINE>case DownloadManager.STATUS_SUCCESSFUL:<NEW_LINE>download.mStatus = SUCCESSFUL;<NEW_LINE>break;<NEW_LINE>default:<NEW_LINE>download.mStatus = UNAVAILABLE;<NEW_LINE>}<NEW_LINE>download.mMediaType = cursor.getString(cursor.getColumnIndex(DownloadManager.COLUMN_MEDIA_TYPE));<NEW_LINE>download.mTitle = cursor.getString(cursor.getColumnIndex(DownloadManager.COLUMN_TITLE));<NEW_LINE>download.mOutputFile = cursor.getString(cursor.getColumnIndex(DownloadManager.COLUMN_LOCAL_URI));<NEW_LINE>download.mDescription = cursor.getString(cursor.getColumnIndex(DownloadManager.COLUMN_DESCRIPTION));<NEW_LINE>download.mSizeBytes = cursor.getLong(cursor.getColumnIndex(DownloadManager.COLUMN_TOTAL_SIZE_BYTES));<NEW_LINE>download.mDownloadedBytes = cursor.getLong(cursor<MASK><NEW_LINE>download.mLastModified = cursor.getLong(cursor.getColumnIndex(DownloadManager.COLUMN_LAST_MODIFIED_TIMESTAMP));<NEW_LINE>download.mReason = cursor.getString(cursor.getColumnIndex(DownloadManager.COLUMN_REASON));<NEW_LINE>return download;<NEW_LINE>}
.getColumnIndex(DownloadManager.COLUMN_BYTES_DOWNLOADED_SO_FAR));
1,736,091
public double pNorm(double p) {<NEW_LINE>if (p <= 0)<NEW_LINE>throw new IllegalArgumentException("norm must be a positive value, not " + p);<NEW_LINE>double result = 0;<NEW_LINE>if (p == 1) {<NEW_LINE>for (int i = 0; i < used; i++) result += abs(values[i]);<NEW_LINE>} else if (p == 2) {<NEW_LINE>for (int i = 0; i < used; i++) result += values<MASK><NEW_LINE>result = Math.sqrt(result);<NEW_LINE>} else if (Double.isInfinite(p)) {<NEW_LINE>for (int i = 0; i < used; i++) result = Math.max(result, abs(values[i]));<NEW_LINE>} else {<NEW_LINE>for (int i = 0; i < used; i++) result += Math.pow(Math.abs(values[i]), p);<NEW_LINE>result = pow(result, 1 / p);<NEW_LINE>}<NEW_LINE>return result;<NEW_LINE>}
[i] * values[i];
1,722,958
public static void main(String[] args) throws Exception {<NEW_LINE>JmxProcess process = new JmxProcess(Server.builder().setHost("w2").setPort("1099").setAlias("w2_ehcache_1099").addQuery(Query.builder().setObj("net.sf.ehcache:CacheManager=net.sf.ehcache.CacheManager@*,name=*,type=CacheStatistics").addAttr("CacheHits").addAttr("InMemoryHits").addAttr("OnDiskHits").addAttr("CacheMisses").addAttr("ObjectCount").addAttr("MemoryStoreObjectCount").addAttr("DiskStoreObjectCount").addOutputWriterFactory(GraphiteWriter.builder().addTypeName("name").setDebugEnabled(true).setHost(GW_HOST).setPort(2003).build()).build<MASK><NEW_LINE>printer.prettyPrint(process);<NEW_LINE>Injector injector = JmxTransModule.createInjector(new JmxTransConfiguration());<NEW_LINE>JmxTransformer transformer = injector.getInstance(JmxTransformer.class);<NEW_LINE>transformer.executeStandalone(process);<NEW_LINE>}
()).build());
1,457,360
private void createCyclicalRelationsAndOwnerships(TypeDB.Transaction transaction) throws IOException {<NEW_LINE>try (InputStream inputStream = new BufferedInputStream(Files.newInputStream(dataFile))) {<NEW_LINE>DataProto.Item item;<NEW_LINE>while ((item = ITEM_PARSER.parseDelimitedFrom(inputStream)) != null) {<NEW_LINE>if (item.getItemCase() == DataProto.Item.ItemCase.RELATION) {<NEW_LINE>Thing relation = transaction.concepts().getThing(conceptTracker.getMapped(item.getRelation().getId()));<NEW_LINE>if (relation != null)<NEW_LINE>continue;<NEW_LINE>relation = transaction.concepts().getRelationType(item.getRelation().<MASK><NEW_LINE>status.relationCount.incrementAndGet();<NEW_LINE>conceptTracker.recordMapped(item.getRelation().getId(), relation.getIID());<NEW_LINE>conceptTracker.recordIncomplete(item.getRelation().getId());<NEW_LINE>for (DataProto.Item.OwnedAttribute ownership : item.getRelation().getAttributeList()) {<NEW_LINE>Thing attribute = transaction.concepts().getThing(conceptTracker.getMapped(ownership.getId()));<NEW_LINE>assert attribute != null;<NEW_LINE>relation.setHas(attribute.asAttribute());<NEW_LINE>status.ownershipCount.incrementAndGet();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
getLabel()).create();
460,740
private void onBrowseClick() {<NEW_LINE>File oldFile = defaultWorkingDirectory();<NEW_LINE>// NO I18N<NEW_LINE>JFileChooser fileChooser = new AccessibleJFileChooser(NbBundle.getMessage(ClonePanel.class, "ACSD_BrowseFolder"), oldFile);<NEW_LINE>// NO I18N<NEW_LINE>fileChooser.setDialogTitle(NbBundle.getMessage(ClonePanel.class, "Browse_title"));<NEW_LINE>fileChooser.setMultiSelectionEnabled(false);<NEW_LINE>FileFilter[] old = fileChooser.getChoosableFileFilters();<NEW_LINE>for (int i = 0; i < old.length; i++) {<NEW_LINE>FileFilter fileFilter = old[i];<NEW_LINE>fileChooser.removeChoosableFileFilter(fileFilter);<NEW_LINE>}<NEW_LINE>fileChooser.addChoosableFileFilter(new FileFilter() {<NEW_LINE><NEW_LINE>public boolean accept(File f) {<NEW_LINE>return f.isDirectory();<NEW_LINE>}<NEW_LINE><NEW_LINE>public String getDescription() {<NEW_LINE>// NOI18N<NEW_LINE>return NbBundle.getMessage(ClonePanel.class, "Folders");<NEW_LINE>}<NEW_LINE>});<NEW_LINE>fileChooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);<NEW_LINE>// NO I18N<NEW_LINE>fileChooser.showDialog(this, NbBundle.getMessage<MASK><NEW_LINE>File f = fileChooser.getSelectedFile();<NEW_LINE>if (f != null) {<NEW_LINE>toTextField.setText(f.getAbsolutePath());<NEW_LINE>}<NEW_LINE>}
(ClonePanel.class, "OK_Button"));
1,310,075
private void doDelete(HttpEntity<String> entity) {<NEW_LINE>AgentResponse rsp = null;<NEW_LINE>DeleteCmd cmd = JSONObjectUtil.toObject(entity.getBody(), DeleteCmd.class);<NEW_LINE>if (!config.deleteSuccess) {<NEW_LINE>rsp = new AgentResponse();<NEW_LINE>rsp.setError("Fail delete on purpose");<NEW_LINE>rsp.setSuccess(false);<NEW_LINE>} else {<NEW_LINE>config.deleteCmds.add(cmd);<NEW_LINE>logger.debug(String.format("Deleted %s", cmd.getInstallUrl()));<NEW_LINE>rsp = (AgentResponse) (new DeleteResponse());<NEW_LINE>}<NEW_LINE>String taskUuid = entity.getHeaders().getFirst(RESTConstant.TASK_UUID);<NEW_LINE>String callbackUrl = entity.getHeaders().getFirst(RESTConstant.CALLBACK_URL);<NEW_LINE>String rspBody = JSONObjectUtil.toJsonString(rsp);<NEW_LINE>HttpHeaders headers = new HttpHeaders();<NEW_LINE><MASK><NEW_LINE>headers.setContentLength(rspBody.length());<NEW_LINE>headers.set(RESTConstant.TASK_UUID, taskUuid);<NEW_LINE>HttpEntity<String> rreq = new HttpEntity<String>(rspBody, headers);<NEW_LINE>restf.getRESTTemplate().exchange(callbackUrl, HttpMethod.POST, rreq, String.class);<NEW_LINE>}
headers.setContentType(MediaType.APPLICATION_JSON);
513,558
public static void main(String[] args) throws Exception {<NEW_LINE>TopologyBuilder builder = new TopologyBuilder();<NEW_LINE>builder.setSpout("word"<MASK><NEW_LINE>builder.setBolt("mybolt", new MyBolt(), 2).customGrouping("word", new MyCustomStreamGrouping());<NEW_LINE>Config conf = new Config();<NEW_LINE>// component resource configuration<NEW_LINE>conf.setComponentRam("word", ByteAmount.fromMegabytes(512));<NEW_LINE>conf.setComponentRam("mybolt", ByteAmount.fromMegabytes(512));<NEW_LINE>// container resource configuration<NEW_LINE>conf.setContainerDiskRequested(ByteAmount.fromGigabytes(2));<NEW_LINE>conf.setContainerRamRequested(ByteAmount.fromGigabytes(3));<NEW_LINE>conf.setContainerCpuRequested(2);<NEW_LINE>conf.setNumStmgrs(2);<NEW_LINE>HeronSubmitter.submitTopology(args[0], conf, builder.createTopology());<NEW_LINE>}
, new TestWordSpout(), 2);
1,511,598
protected void executeSynchronous(FlowNode flowNode) {<NEW_LINE>CommandContextUtil.getActivityInstanceEntityManager(commandContext).recordActivityStart(execution);<NEW_LINE>// Execution listener<NEW_LINE>if (CollectionUtil.isNotEmpty(flowNode.getExecutionListeners())) {<NEW_LINE>executeExecutionListeners(flowNode, ExecutionListener.EVENTNAME_START);<NEW_LINE>}<NEW_LINE>// Execute actual behavior<NEW_LINE>ActivityBehavior activityBehavior = (ActivityBehavior) flowNode.getBehavior();<NEW_LINE>LOGGER.debug("Executing activityBehavior {} on activity '{}' with execution {}", activityBehavior.getClass(), flowNode.getId(), execution.getId());<NEW_LINE>ProcessEngineConfigurationImpl <MASK><NEW_LINE>FlowableEventDispatcher eventDispatcher = null;<NEW_LINE>if (processEngineConfiguration != null) {<NEW_LINE>eventDispatcher = processEngineConfiguration.getEventDispatcher();<NEW_LINE>}<NEW_LINE>if (eventDispatcher != null && eventDispatcher.isEnabled()) {<NEW_LINE>processEngineConfiguration.getEventDispatcher().dispatchEvent(FlowableEventBuilder.createActivityEvent(FlowableEngineEventType.ACTIVITY_STARTED, flowNode.getId(), flowNode.getName(), execution.getId(), execution.getProcessInstanceId(), execution.getProcessDefinitionId(), flowNode), processEngineConfiguration.getEngineCfgKey());<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>activityBehavior.execute(execution);<NEW_LINE>} catch (BpmnError error) {<NEW_LINE>// re-throw business fault so that it can be caught by an Error Intermediate Event or Error Event Sub-Process in the process<NEW_LINE>ErrorPropagation.propagateError(error, execution);<NEW_LINE>} catch (RuntimeException e) {<NEW_LINE>if (LogMDC.isMDCEnabled()) {<NEW_LINE>LogMDC.putMDCExecution(execution);<NEW_LINE>}<NEW_LINE>throw e;<NEW_LINE>}<NEW_LINE>}
processEngineConfiguration = CommandContextUtil.getProcessEngineConfiguration(commandContext);
1,038,372
private Mono<Response<NetworkWatcherInner>> createOrUpdateWithResponseAsync(String resourceGroupName, String networkWatcherName, NetworkWatcherInner parameters, Context context) {<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 (resourceGroupName == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));<NEW_LINE>}<NEW_LINE>if (networkWatcherName == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter networkWatcherName 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 (parameters == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null."));<NEW_LINE>} else {<NEW_LINE>parameters.validate();<NEW_LINE>}<NEW_LINE>final String apiVersion = "2018-11-01";<NEW_LINE>final String accept = "application/json";<NEW_LINE>context = <MASK><NEW_LINE>return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, networkWatcherName, apiVersion, this.client.getSubscriptionId(), parameters, accept, context);<NEW_LINE>}
this.client.mergeContext(context);
6,993
public static void main(String[] args) {<NEW_LINE>Point2D[] pts = new Point2D[13];<NEW_LINE>pts[0] = new Point2D.Double(0, 5);<NEW_LINE>pts[1] = new Point2D.Double(-1, 1);<NEW_LINE>pts[2] = new Point2D.Double(0, 1);<NEW_LINE>pts[3] = new <MASK><NEW_LINE>pts[4] = new Point2D.Double(-5, 0);<NEW_LINE>pts[5] = new Point2D.Double(-1, 0);<NEW_LINE>pts[6] = new Point2D.Double(0, 0);<NEW_LINE>pts[7] = new Point2D.Double(1, 0);<NEW_LINE>pts[8] = new Point2D.Double(5, 0);<NEW_LINE>pts[9] = new Point2D.Double(-1, -1);<NEW_LINE>pts[10] = new Point2D.Double(0, -1);<NEW_LINE>pts[11] = new Point2D.Double(1, -1);<NEW_LINE>pts[12] = new Point2D.Double(0, -5);<NEW_LINE>Stack<Point2D> hull = createConvexHull(pts);<NEW_LINE>// Print the points in the hull<NEW_LINE>while (!hull.isEmpty()) System.out.println(hull.pop());<NEW_LINE>}
Point2D.Double(1, 1);
1,515,494
public InternalExtendedStats reduce(List<InternalAggregation> aggregations, ReduceContext reduceContext) {<NEW_LINE>double sumOfSqrs = 0;<NEW_LINE>double compensationOfSqrs = 0;<NEW_LINE>for (InternalAggregation aggregation : aggregations) {<NEW_LINE>InternalExtendedStats stats = (InternalExtendedStats) aggregation;<NEW_LINE>if (stats.sigma != sigma) {<NEW_LINE>throw new IllegalStateException("Cannot reduce other stats aggregations that have a different sigma");<NEW_LINE>}<NEW_LINE>double value = stats.getSumOfSquares();<NEW_LINE>if (Double.isFinite(value) == false) {<NEW_LINE>sumOfSqrs += value;<NEW_LINE>} else if (Double.isFinite(sumOfSqrs)) {<NEW_LINE>double correctedOfSqrs = value - compensationOfSqrs;<NEW_LINE>double newSumOfSqrs = sumOfSqrs + correctedOfSqrs;<NEW_LINE>compensationOfSqrs = (newSumOfSqrs - sumOfSqrs) - correctedOfSqrs;<NEW_LINE>sumOfSqrs = newSumOfSqrs;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>final InternalStats stats = super.reduce(aggregations, reduceContext);<NEW_LINE>return new InternalExtendedStats(name, stats.getCount(), stats.getSum(), stats.getMin(), stats.getMax(), sumOfSqrs, <MASK><NEW_LINE>}
sigma, format, getMetadata());
1,556,487
public DiagnosticsReportSource heapDump() {<NEW_LINE>return new DiagnosticsReportSource() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public String destinationPath() {<NEW_LINE>return "heapdump.hprof";<NEW_LINE>}<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public InputStream newInputStream() throws IOException {<NEW_LINE>final Path heapdumpFile = createTempFile("neo4j-heapdump", ".hprof").toAbsolutePath();<NEW_LINE>deleteIfExists(heapdumpFile);<NEW_LINE>heapDump(heapdumpFile.toString());<NEW_LINE>return new FileInputStream(heapdumpFile.toFile()) {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void close() throws IOException {<NEW_LINE>super.close();<NEW_LINE>deleteIfExists(heapdumpFile);<NEW_LINE>}<NEW_LINE>};<NEW_LINE>}<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public long estimatedSize() {<NEW_LINE>try {<NEW_LINE>final MemoryMXBean bean = ManagementFactory.<MASK><NEW_LINE>final long totalMemory = bean.getHeapMemoryUsage().getCommitted() + bean.getNonHeapMemoryUsage().getCommitted();<NEW_LINE>// We first write raw to disk then write to archive, 5x compression is a reasonable worst case estimation<NEW_LINE>return (long) (totalMemory * 1.2);<NEW_LINE>} catch (IOException e) {<NEW_LINE>throw new UncheckedIOException(e);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>};<NEW_LINE>}
getPlatformMXBean(mBeanServer, MemoryMXBean.class);
724,698
private void initializeFcmCheck() {<NEW_LINE>if (!SignalStore.account().isRegistered()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>PlayServicesUtil.PlayServicesStatus fcmStatus = PlayServicesUtil.getPlayServicesStatus(this);<NEW_LINE>if (fcmStatus == PlayServicesUtil.PlayServicesStatus.DISABLED) {<NEW_LINE>if (SignalStore.account().isFcmEnabled()) {<NEW_LINE><MASK><NEW_LINE>SignalStore.account().setFcmEnabled(false);<NEW_LINE>SignalStore.account().setFcmToken(null);<NEW_LINE>SignalStore.account().setFcmTokenLastSetTime(-1);<NEW_LINE>ApplicationDependencies.getJobManager().add(new RefreshAttributesJob());<NEW_LINE>} else {<NEW_LINE>SignalStore.account().setFcmTokenLastSetTime(-1);<NEW_LINE>}<NEW_LINE>} else if (fcmStatus == PlayServicesUtil.PlayServicesStatus.SUCCESS && !SignalStore.account().isFcmEnabled() && SignalStore.account().getFcmTokenLastSetTime() < 0) {<NEW_LINE>Log.i(TAG, "Play Services are newly-available. Updating to use FCM.");<NEW_LINE>SignalStore.account().setFcmEnabled(true);<NEW_LINE>ApplicationDependencies.getJobManager().startChain(new FcmRefreshJob()).then(new RefreshAttributesJob()).enqueue();<NEW_LINE>} else {<NEW_LINE>long nextSetTime = SignalStore.account().getFcmTokenLastSetTime() + TimeUnit.HOURS.toMillis(6);<NEW_LINE>if (SignalStore.account().getFcmToken() == null || nextSetTime <= System.currentTimeMillis()) {<NEW_LINE>ApplicationDependencies.getJobManager().add(new FcmRefreshJob());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
Log.i(TAG, "Play Services are disabled. Disabling FCM.");
1,249,404
public Annotation annotate(File file, String revision) throws IOException {<NEW_LINE>List<String> cmd = new ArrayList<>();<NEW_LINE>ensureCommand(CMD_PROPERTY_KEY, CMD_FALLBACK);<NEW_LINE>cmd.add(RepoCommand);<NEW_LINE>cmd.add("blame");<NEW_LINE>cmd.add("--all");<NEW_LINE>cmd.add("--long");<NEW_LINE>if (revision != null) {<NEW_LINE>cmd.add("-r");<NEW_LINE>cmd.add(revision);<NEW_LINE>}<NEW_LINE>cmd.add(file.getName());<NEW_LINE>Executor executor = new Executor(cmd, file.getParentFile(), RuntimeEnvironment.<MASK><NEW_LINE>BazaarAnnotationParser parser = new BazaarAnnotationParser(file.getName());<NEW_LINE>int status = executor.exec(true, parser);<NEW_LINE>if (status != 0) {<NEW_LINE>LOGGER.log(Level.WARNING, "Failed to get annotations for: \"{0}\" Exit code: {1}", new Object[] { file.getAbsolutePath(), String.valueOf(status) });<NEW_LINE>throw new IOException(executor.getErrorString());<NEW_LINE>} else {<NEW_LINE>return parser.getAnnotation();<NEW_LINE>}<NEW_LINE>}
getInstance().getInteractiveCommandTimeout());
471,049
public void deleteFromFriendList(MethodCall methodCall, final MethodChannel.Result result) {<NEW_LINE>List<String> userIDList = CommonUtil.getParam(methodCall, result, "userIDList");<NEW_LINE>int deleteType = CommonUtil.getParam(methodCall, result, "deleteType");<NEW_LINE>V2TIMManager.getFriendshipManager().deleteFromFriendList(userIDList, deleteType, new V2TIMValueCallback<List<V2TIMFriendOperationResult>>() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void onError(int i, String s) {<NEW_LINE>CommonUtil.returnError(result, i, s);<NEW_LINE>}<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void onSuccess(List<V2TIMFriendOperationResult> v2TIMFriendOperationResults) {<NEW_LINE>LinkedList<HashMap<String, Object>> list = new LinkedList<HashMap<String, Object>>();<NEW_LINE>for (int i = 0; i < v2TIMFriendOperationResults.size(); i++) {<NEW_LINE>list.add(CommonUtil.convertV2TIMFriendOperationResultToMap(<MASK><NEW_LINE>}<NEW_LINE>CommonUtil.returnSuccess(result, list);<NEW_LINE>}<NEW_LINE>});<NEW_LINE>}
v2TIMFriendOperationResults.get(i)));
515,256
public static List<ResourceFile> findExtensionPropertyFiles(ResourceFile sourceFile, boolean includeUninstalled) {<NEW_LINE>List<ResourceFile> propertyFiles = new ArrayList<>();<NEW_LINE>// Search for the file in the current directory.<NEW_LINE>ResourceFile propFile = findExtensionPropertyFile(sourceFile);<NEW_LINE>if (propFile != null) {<NEW_LINE>propertyFiles.add(propFile);<NEW_LINE>return propertyFiles;<NEW_LINE>}<NEW_LINE>ResourceFile[<MASK><NEW_LINE>if (rfiles != null) {<NEW_LINE>List<ResourceFile> tempFiles = Arrays.asList(rfiles);<NEW_LINE>// The given directory didn't contain the file, so search the immediate children.<NEW_LINE>if (tempFiles != null && !tempFiles.isEmpty()) {<NEW_LINE>for (ResourceFile rFile : tempFiles) {<NEW_LINE>if (rFile.isDirectory() && !rFile.getName().equals("Skeleton")) {<NEW_LINE>ResourceFile pf = findExtensionPropertyFile(rFile);<NEW_LINE>if (pf != null) {<NEW_LINE>propertyFiles.add(pf);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return propertyFiles;<NEW_LINE>}
] rfiles = sourceFile.listFiles();
482,820
// ===================================================================================<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 (endTime != null) {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>if (jobName != null) {<NEW_LINE>addFieldToSource(sourceMap, "jobName", jobName);<NEW_LINE>}<NEW_LINE>if (jobStatus != null) {<NEW_LINE>addFieldToSource(sourceMap, "jobStatus", jobStatus);<NEW_LINE>}<NEW_LINE>if (lastUpdated != null) {<NEW_LINE>addFieldToSource(sourceMap, "lastUpdated", lastUpdated);<NEW_LINE>}<NEW_LINE>if (scriptData != null) {<NEW_LINE>addFieldToSource(sourceMap, "scriptData", scriptData);<NEW_LINE>}<NEW_LINE>if (scriptResult != null) {<NEW_LINE>addFieldToSource(sourceMap, "scriptResult", scriptResult);<NEW_LINE>}<NEW_LINE>if (scriptType != null) {<NEW_LINE>addFieldToSource(sourceMap, "scriptType", scriptType);<NEW_LINE>}<NEW_LINE>if (startTime != null) {<NEW_LINE>addFieldToSource(sourceMap, "startTime", startTime);<NEW_LINE>}<NEW_LINE>if (target != null) {<NEW_LINE>addFieldToSource(sourceMap, "target", target);<NEW_LINE>}<NEW_LINE>return sourceMap;<NEW_LINE>}
addFieldToSource(sourceMap, "endTime", endTime);
932,160
public void addRecipe(String recipePath, String blueprintCategory, IIngredientWithAmount[] inputs, IItemStack output) {<NEW_LINE>final ResourceLocation resourceLocation = new ResourceLocation("crafttweaker", recipePath);<NEW_LINE>final IngredientWithSize[] <MASK><NEW_LINE>final ItemStack results = output.getInternal();<NEW_LINE>final BlueprintCraftingRecipe recipe = new BlueprintCraftingRecipe(resourceLocation, blueprintCategory, results, ingredients);<NEW_LINE>CraftTweakerAPI.apply(new ActionAddRecipe(this, recipe, null) {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public boolean validate(ILogger logger) {<NEW_LINE>if (!BlueprintCraftingRecipe.recipeCategories.contains(blueprintCategory)) {<NEW_LINE>final String format = "Blueprint Category '%s' does not exist!";<NEW_LINE>logger.error(String.format(format, blueprintCategory));<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>});<NEW_LINE>}
ingredients = CrTIngredientUtil.getIngredientsWithSize(inputs);
326,402
static Shape createCenteredStrokedShape(Shape s, BasicStroke stroke) {<NEW_LINE>final float lw = (stroke.getType() == BasicStroke.TYPE_CENTERED) ? stroke.getLineWidth() : stroke.getLineWidth() * 2.0f;<NEW_LINE>final RendererContext rdrCtx = MarlinRenderingEngine.getRendererContext();<NEW_LINE>try {<NEW_LINE>// initialize a large copyable Path2D to avoid a lot of array growing:<NEW_LINE>final <MASK><NEW_LINE>MarlinPrismUtils.strokeTo(rdrCtx, s, stroke, lw, rdrCtx.transformerPC2D.wrapPath2D(p2d));<NEW_LINE>// Use Path2D copy constructor (trim)<NEW_LINE>return new Path2D(p2d);<NEW_LINE>} finally {<NEW_LINE>// recycle the RendererContext instance<NEW_LINE>MarlinRenderingEngine.returnRendererContext(rdrCtx);<NEW_LINE>}<NEW_LINE>}
Path2D p2d = rdrCtx.getPath2D();
729,845
public static LightweightHint showEditorFragmentHint(Editor editor, TextRange range, boolean showFolding, boolean hideByAnyKey) {<NEW_LINE>if (!(editor instanceof EditorEx))<NEW_LINE>return null;<NEW_LINE>JRootPane rootPane = editor.getComponent().getRootPane();<NEW_LINE>if (rootPane == null)<NEW_LINE>return null;<NEW_LINE>JLayeredPane layeredPane = rootPane.getLayeredPane();<NEW_LINE>int lineHeight = editor.getLineHeight();<NEW_LINE>int overhang = editor.getScrollingModel().getVisibleArea().y - editor.logicalPositionToXY(editor.offsetToLogicalPosition(range<MASK><NEW_LINE>int yRelative = overhang > 0 && overhang < lineHeight ? lineHeight - overhang + JBUIScale.scale(LINE_BORDER_THICKNESS + EMPTY_BORDER_THICKNESS) : 0;<NEW_LINE>Point point = SwingUtilities.convertPoint(((EditorEx) editor).getScrollPane().getViewport(), -2, yRelative, layeredPane);<NEW_LINE>return showEditorFragmentHintAt(editor, range, point.y, true, showFolding, hideByAnyKey, true, false);<NEW_LINE>}
.getEndOffset())).y;
396,286
public void run() {<NEW_LINE>try {<NEW_LINE>Map resp = (Map) handler.invoke(buildRequestMap(req));<NEW_LINE>if (resp == null) {<NEW_LINE>// handler return null<NEW_LINE>cb.run(HttpEncode(404, new HeaderMap(), null, this.serverHeader));<NEW_LINE>eventLogger.log(eventNames.serverStatus404);<NEW_LINE>} else {<NEW_LINE>Object body = resp.get(BODY);<NEW_LINE>if (!(body instanceof AsyncChannel)) {<NEW_LINE>// hijacked<NEW_LINE>HeaderMap headers = HeaderMap.camelCase((Map<MASK><NEW_LINE>if (req.version == HTTP_1_0 && req.isKeepAlive) {<NEW_LINE>headers.put("Connection", "Keep-Alive");<NEW_LINE>}<NEW_LINE>final int status = getStatus(resp);<NEW_LINE>cb.run(HttpEncode(status, headers, body, this.serverHeader));<NEW_LINE>eventLogger.log(eventNames.serverStatusPrefix + status);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} catch (Throwable e) {<NEW_LINE>cb.run(HttpEncode(500, new HeaderMap(), e.getMessage(), this.serverHeader));<NEW_LINE>errorLogger.log(req.method + " " + req.uri, e);<NEW_LINE>eventLogger.log(eventNames.serverStatus500);<NEW_LINE>}<NEW_LINE>}
) resp.get(HEADERS));
1,702,669
protected void onActivityResult(int requestCode, int resultCode, Intent data) {<NEW_LINE>super.onActivityResult(requestCode, resultCode, data);<NEW_LINE>if (requestCode == RESULT_LOAD_IMAGE && resultCode == RESULT_OK && null != data) {<NEW_LINE>Uri selectedImage = data.getData();<NEW_LINE>try {<NEW_LINE>InputStream imageInputStream = getContentResolver().openInputStream(selectedImage);<NEW_LINE>byte[] imageBytes = bytesFromInputStream(imageInputStream);<NEW_LINE>final String attachmentName = getString(R.string.attachment) + '_' + System.currentTimeMillis() + ".png";<NEW_LINE>progressDialog.setTitle(getApplication().getString(R.string.apply_edit_message));<NEW_LINE>progressDialog.setMessage(getApplication().getString(R.string.wait));<NEW_LINE>progressDialog.show();<NEW_LINE>ListenableFuture<Attachment> addResult = mSelectedArcGISFeature.addAttachmentAsync(imageBytes, "image/png", attachmentName);<NEW_LINE>addResult.addDoneListener(() -> {<NEW_LINE>final ListenableFuture<Void> tableResult = mServiceFeatureTable.updateFeatureAsync(mSelectedArcGISFeature);<NEW_LINE><MASK><NEW_LINE>});<NEW_LINE>} catch (IOException e) {<NEW_LINE>String error = "Error converting image to byte array: " + e.getMessage();<NEW_LINE>Log.e(TAG, error);<NEW_LINE>Toast.makeText(this, error, Toast.LENGTH_LONG).show();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
tableResult.addDoneListener(this::applyServerEdits);
1,354,893
protected ServiceAndProperties createService() {<NEW_LINE>Cassandra311Persistence cassandraDB = new Cassandra311Persistence();<NEW_LINE>@SuppressWarnings("JdkObsolete")<NEW_LINE>Hashtable<String, String> props = new Hashtable<>();<NEW_LINE>props.put("Identifier", "CassandraPersistence");<NEW_LINE>// TODO copy metrics if this gets invoked more than once?<NEW_LINE>CassandraMetricsRegistry.actualRegistry = metrics.get().getRegistry("persistence-cassandra-3.11");<NEW_LINE>try {<NEW_LINE>cassandraDB.setAuthorizationService(authorizationService.get());<NEW_LINE>cassandraDB.initialize(makeConfig(getBaseDir()));<NEW_LINE>IAuthorizer authorizer = DatabaseDescriptor.getAuthorizer();<NEW_LINE>if (authorizer instanceof DelegatingAuthorizer) {<NEW_LINE>((DelegatingAuthorizer) authorizer).<MASK><NEW_LINE>}<NEW_LINE>return new ServiceAndProperties(cassandraDB, Persistence.class, props);<NEW_LINE>} catch (IOException e) {<NEW_LINE>logger.error("Error initializing cassandra persistence", e);<NEW_LINE>throw new IOError(e);<NEW_LINE>}<NEW_LINE>}
setProcessor(authorizationProcessor.get());
267,690
protected static void handleCreateStream(DestinationManager DM, ControlCreateStream msg, MessageProcessor MP) {<NEW_LINE>if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())<NEW_LINE>SibTr.entry(tc, "handleCreateStream", new Object[] { DM, msg, MP });<NEW_LINE>ControlMessage reply = null;<NEW_LINE>try {<NEW_LINE>// Resolve the handler and attempt to attach to an<NEW_LINE>// existing local durable susbcription.<NEW_LINE>// attach requests require a target dest ID<NEW_LINE>SIBUuid12 handlerID = msg.getGuaranteedTargetDestinationDefinitionUUID();<NEW_LINE>// Resolve the target BaseDestinationHandler<NEW_LINE>BaseDestinationHandler handler = (BaseDestinationHandler) DM.getDestination(handlerID, false);<NEW_LINE>handler.attachDurableFromRemote(msg);<NEW_LINE>} catch (SIDestinationLockedException e) {<NEW_LINE>// No FFDC code needed<NEW_LINE>// Cardinality error<NEW_LINE>reply = createCardinalityInfo(MP, msg.getGuaranteedSourceMessagingEngineUUID(), msg.getRequestID(), 1);<NEW_LINE>} catch (Exception e) {<NEW_LINE>// No FFDC code needed<NEW_LINE>int status = DurableConstants.STATUS_SUB_GENERAL_ERROR;<NEW_LINE>SIBUuid8 sender = msg.getGuaranteedSourceMessagingEngineUUID();<NEW_LINE>if (e instanceof SIDurableSubscriptionNotFoundException)<NEW_LINE>status = DurableConstants.STATUS_SUB_NOT_FOUND;<NEW_LINE>else if (e instanceof SIDurableSubscriptionMismatchException)<NEW_LINE>status = DurableConstants.STATUS_SUB_MISMATCH_ERROR;<NEW_LINE>else if (e instanceof SINotAuthorizedException)<NEW_LINE>status = DurableConstants.STATUS_NOT_AUTH_ERROR;<NEW_LINE>else {<NEW_LINE>// Anything else is logged and becomes a general error<NEW_LINE>FFDCFilter.processException(e, "com.ibm.ws.sib.processor.impl.DurableOutputHandler.handleCreateStream", "1:454:1.45.1.1", DurableOutputHandler.class);<NEW_LINE>SibTr.exception(tc, e);<NEW_LINE>}<NEW_LINE>reply = createDurableConfirm(MP, sender, msg.getRequestID(), status);<NEW_LINE>}<NEW_LINE>// Only send a reply on error conditions<NEW_LINE>if (reply != null) {<NEW_LINE>SIBUuid8 sender = msg.getGuaranteedSourceMessagingEngineUUID();<NEW_LINE>MP.getMPIO().sendToMe(<MASK><NEW_LINE>}<NEW_LINE>if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())<NEW_LINE>SibTr.exit(tc, "handleCreateStream");<NEW_LINE>}
sender, SIMPConstants.CONTROL_MESSAGE_PRIORITY, reply);
1,338,190
private void loadNode923() {<NEW_LINE>PropertyTypeNode node = new PropertyTypeNode(this.context, Identifiers.ServerType_ServerRedundancy_RedundancySupport, new QualifiedName(0, "RedundancySupport"), new LocalizedText("en", "RedundancySupport"), LocalizedText.NULL_VALUE, UInteger.valueOf(0), UInteger.valueOf(0), new DataValue(Variant.NULL_VALUE), Identifiers.RedundancySupport, -1, new UInteger[] {}, UByte.valueOf(1), UByte.valueOf(1), 0.0, false);<NEW_LINE>node.addReference(new Reference(Identifiers.ServerType_ServerRedundancy_RedundancySupport, Identifiers.HasTypeDefinition, Identifiers.PropertyType<MASK><NEW_LINE>node.addReference(new Reference(Identifiers.ServerType_ServerRedundancy_RedundancySupport, Identifiers.HasModellingRule, Identifiers.ModellingRule_Mandatory.expanded(), true));<NEW_LINE>node.addReference(new Reference(Identifiers.ServerType_ServerRedundancy_RedundancySupport, Identifiers.HasProperty, Identifiers.ServerType_ServerRedundancy.expanded(), false));<NEW_LINE>this.nodeManager.addNode(node);<NEW_LINE>}
.expanded(), true));
730,942
private void loadNode248() {<NEW_LINE>SessionsDiagnosticsSummaryTypeNode node = new SessionsDiagnosticsSummaryTypeNode(this.context, Identifiers.Server_ServerDiagnostics_SessionsDiagnosticsSummary, new QualifiedName(0, "SessionsDiagnosticsSummary"), new LocalizedText("en", "SessionsDiagnosticsSummary"), LocalizedText.NULL_VALUE, UInteger.valueOf(0), UInteger.valueOf(0), UByte.valueOf(0));<NEW_LINE>node.addReference(new Reference(Identifiers.Server_ServerDiagnostics_SessionsDiagnosticsSummary, Identifiers.HasComponent, Identifiers.Server_ServerDiagnostics_SessionsDiagnosticsSummary_SessionDiagnosticsArray.expanded(), true));<NEW_LINE>node.addReference(new Reference(Identifiers.Server_ServerDiagnostics_SessionsDiagnosticsSummary, Identifiers.HasComponent, Identifiers.Server_ServerDiagnostics_SessionsDiagnosticsSummary_SessionSecurityDiagnosticsArray.expanded(), true));<NEW_LINE>node.addReference(new Reference(Identifiers.Server_ServerDiagnostics_SessionsDiagnosticsSummary, Identifiers.HasTypeDefinition, Identifiers.SessionsDiagnosticsSummaryType<MASK><NEW_LINE>node.addReference(new Reference(Identifiers.Server_ServerDiagnostics_SessionsDiagnosticsSummary, Identifiers.HasComponent, Identifiers.Server_ServerDiagnostics.expanded(), false));<NEW_LINE>this.nodeManager.addNode(node);<NEW_LINE>}
.expanded(), true));
1,205,284
// private synthetic method_1454(ILnet/minecraft/client/gui/screen/Screen;[ZIII)V<NEW_LINE>@Inject(method = "method_1454(ILnet/minecraft/client/gui/screen/Screen;[ZIII)V", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/gui/screen/Screen;keyPressed(III)Z"), cancellable = true)<NEW_LINE>private void beforeKeyPressedEvent(int code, Screen screen, boolean[] resultHack, int key, int scancode, int modifiers, CallbackInfo ci) {<NEW_LINE>if (!ScreenKeyboardEvents.allowKeyPress(screen).invoker().allowKeyPress(screen, key, scancode, modifiers)) {<NEW_LINE>// Set this press action as handled.<NEW_LINE>resultHack[0] = true;<NEW_LINE>// Exit the lambda<NEW_LINE>ci.cancel();<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>ScreenKeyboardEvents.beforeKeyPress(screen).invoker().beforeKeyPress(<MASK><NEW_LINE>}
screen, key, scancode, modifiers);
1,545,453
private Mono<Response<Void>> validateMoveWithResponseAsync(String resourceGroupName, CsmMoveResourceEnvelope moveResourceEnvelope, Context context) {<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 (resourceGroupName == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter resourceGroupName 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 (moveResourceEnvelope == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter moveResourceEnvelope is required and cannot be null."));<NEW_LINE>} else {<NEW_LINE>moveResourceEnvelope.validate();<NEW_LINE>}<NEW_LINE>context = <MASK><NEW_LINE>return service.validateMove(this.client.getEndpoint(), resourceGroupName, this.client.getSubscriptionId(), this.client.getApiVersion(), moveResourceEnvelope, context);<NEW_LINE>}
this.client.mergeContext(context);
612,968
public void saveSharesDB(List<OCShare> shares) {<NEW_LINE>ArrayList<ContentProviderOperation> operations = new ArrayList<>();<NEW_LINE>// Reset flags & Remove shares for this files<NEW_LINE>String filePath = "";<NEW_LINE>for (OCShare share : shares) {<NEW_LINE>if (!filePath.equals(share.getPath())) {<NEW_LINE>filePath = share.getPath();<NEW_LINE>resetShareFlagInAFile(filePath);<NEW_LINE>operations = prepareRemoveSharesInFile(filePath, operations);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// Add operations to insert shares<NEW_LINE><MASK><NEW_LINE>// apply operations in batch<NEW_LINE>if (operations.size() > 0) {<NEW_LINE>Log_OC.d(TAG, String.format(Locale.ENGLISH, SENDING_TO_FILECONTENTPROVIDER_MSG, operations.size()));<NEW_LINE>try {<NEW_LINE>if (getContentResolver() != null) {<NEW_LINE>getContentResolver().applyBatch(MainApp.getAuthority(), operations);<NEW_LINE>} else {<NEW_LINE>getContentProviderClient().applyBatch(operations);<NEW_LINE>}<NEW_LINE>} catch (OperationApplicationException | RemoteException e) {<NEW_LINE>Log_OC.e(TAG, EXCEPTION_MSG + e.getMessage(), e);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
operations = prepareInsertShares(shares, operations);
1,342,821
private JPanel buildMainPanel(GhidraProgramTableModel<T> tableModel, GoToService gotoService) {<NEW_LINE>JPanel panel = new JPanel(new BorderLayout());<NEW_LINE>threadedPanel = new GhidraThreadedTablePanel<>(tableModel);<NEW_LINE><MASK><NEW_LINE>table.getSelectionModel().addListSelectionListener(e -> {<NEW_LINE>if (e.getValueIsAdjusting()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>tool.contextChanged(TableComponentProvider.this);<NEW_LINE>});<NEW_LINE>// only allow global actions through if we are derived from the connect/primary navigatable<NEW_LINE>table.setActionsEnabled(navigatable.isConnected());<NEW_LINE>if (gotoService != null) {<NEW_LINE>if (navigatable != null) {<NEW_LINE>navigatable.addNavigatableListener(this);<NEW_LINE>}<NEW_LINE>table.installNavigation(gotoService, navigatable);<NEW_LINE>}<NEW_LINE>panel.add(threadedPanel, BorderLayout.CENTER);<NEW_LINE>panel.add(createFilterFieldPanel(table, tableModel), BorderLayout.SOUTH);<NEW_LINE>return panel;<NEW_LINE>}
GhidraTable table = threadedPanel.getTable();
1,811,086
public static <K extends Comparable<K>, V> ImmutableSortedKeyListMultimap<K, V> copyOf(Multimap<K, V> data) {<NEW_LINE>if (data.isEmpty()) {<NEW_LINE>return EMPTY_MULTIMAP;<NEW_LINE>}<NEW_LINE>if (data instanceof ImmutableSortedKeyListMultimap) {<NEW_LINE>return (ImmutableSortedKeyListMultimap<K, V>) data;<NEW_LINE>}<NEW_LINE>Set<K> keySet = data.keySet();<NEW_LINE><MASK><NEW_LINE>K[] sortedKeys = (K[]) new Comparable<?>[size];<NEW_LINE>int index = 0;<NEW_LINE>for (K key : keySet) {<NEW_LINE>sortedKeys[index++] = Preconditions.checkNotNull(key);<NEW_LINE>}<NEW_LINE>Arrays.sort(sortedKeys);<NEW_LINE>List<V>[] values = (List<V>[]) new List<?>[size];<NEW_LINE>for (int i = 0; i < size; i++) {<NEW_LINE>values[i] = ImmutableList.copyOf(data.get(sortedKeys[i]));<NEW_LINE>}<NEW_LINE>return new ImmutableSortedKeyListMultimap<>(sortedKeys, values);<NEW_LINE>}
int size = keySet.size();
844,775
public static long shaderc_compile_into_preprocessed_text(@NativeType("shaderc_compiler_t const") long compiler, @NativeType("char const *") CharSequence source_text, @NativeType("shaderc_shader_kind") int shader_kind, @NativeType("char const *") CharSequence input_file_name, @NativeType("char const *") CharSequence entry_point_name, @NativeType("shaderc_compile_options_t const") long additional_options) {<NEW_LINE>MemoryStack stack = stackGet();<NEW_LINE>int stackPointer = stack.getPointer();<NEW_LINE>try {<NEW_LINE>int source_textEncodedLength = stack.nUTF8(source_text, false);<NEW_LINE>long source_textEncoded = stack.getPointerAddress();<NEW_LINE><MASK><NEW_LINE>long input_file_nameEncoded = stack.getPointerAddress();<NEW_LINE>stack.nUTF8(entry_point_name, true);<NEW_LINE>long entry_point_nameEncoded = stack.getPointerAddress();<NEW_LINE>return nshaderc_compile_into_preprocessed_text(compiler, source_textEncoded, source_textEncodedLength, shader_kind, input_file_nameEncoded, entry_point_nameEncoded, additional_options);<NEW_LINE>} finally {<NEW_LINE>stack.setPointer(stackPointer);<NEW_LINE>}<NEW_LINE>}
stack.nUTF8(input_file_name, true);
1,079,664
final void defineSharedVarsForType(TypeElement type, ImmutableSet<ExecutableElement> methods, AutoValueishTemplateVars vars) {<NEW_LINE>vars.pkg = TypeSimplifier.packageNameOf(type);<NEW_LINE>vars.origClass = TypeSimplifier.classNameOf(type);<NEW_LINE>vars.simpleClassName = TypeSimplifier.simpleNameOf(vars.origClass);<NEW_LINE>vars.generated = generatedAnnotation(elementUtils(), processingEnv.getSourceVersion()).map(annotation -> TypeEncoder.encode(annotation.asType())).orElse("");<NEW_LINE>vars.formalTypes = TypeEncoder.typeParametersString(type.getTypeParameters());<NEW_LINE>vars.actualTypes = TypeSimplifier.actualTypeParametersString(type);<NEW_LINE>vars.wildcardTypes = wildcardTypeParametersString(type);<NEW_LINE>vars.annotations = copiedClassAnnotations(type);<NEW_LINE>Map<ObjectMethod, ExecutableElement> methodsToGenerate = determineObjectMethodsToGenerate(methods);<NEW_LINE>vars.toString = methodsToGenerate.containsKey(ObjectMethod.TO_STRING);<NEW_LINE>vars.equals = methodsToGenerate.containsKey(ObjectMethod.EQUALS);<NEW_LINE>vars.hashCode = methodsToGenerate.containsKey(ObjectMethod.HASH_CODE);<NEW_LINE>Optional<AnnotationMirror> nullable = nullables.appropriateNullableGivenMethods(methods);<NEW_LINE>vars.<MASK><NEW_LINE>vars.serialVersionUID = getSerialVersionUID(type);<NEW_LINE>}
equalsParameterType = equalsParameterType(methodsToGenerate, nullable);
1,387,762
private void readRowUShort(final DataInput input, int height, Rectangle srcRegion, boolean flip, int xSub, int ySub, short[] rowDataUShort, WritableRaster destChannel, Raster srcChannel, int y) throws IOException {<NEW_LINE>// Flip into position?<NEW_LINE>int srcY = flip ? height - 1 - y : y;<NEW_LINE>int dstY = (<MASK><NEW_LINE>// If subsampled or outside source region, skip entire row<NEW_LINE>if (y % ySub != 0 || srcY < srcRegion.y || srcY >= srcRegion.y + srcRegion.height) {<NEW_LINE>input.skipBytes(rowDataUShort.length * 2);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>readFully(input, rowDataUShort);<NEW_LINE>// Subsample horizontal<NEW_LINE>if (xSub != 1) {<NEW_LINE>for (int x = 0; x < srcRegion.width / xSub; x++) {<NEW_LINE>rowDataUShort[srcRegion.x + x] = rowDataUShort[srcRegion.x + x * xSub];<NEW_LINE>}<NEW_LINE>}<NEW_LINE>destChannel.setDataElements(0, dstY, srcChannel);<NEW_LINE>}
srcY - srcRegion.y) / ySub;
72,131
private String saveTable() throws IOException {<NEW_LINE>ExecutorService executorService = Executors.newFixedThreadPool(writeOptions.getThreadPoolSize());<NEW_LINE>CompletionService<Void> writerCompletionService = new ExecutorCompletionService<>(executorService);<NEW_LINE>createFolder(path);<NEW_LINE>// creates the folder containing the files<NEW_LINE>String sawFolderName = SawUtils.makeName(table.name());<NEW_LINE>Path filePath = path.resolve(sawFolderName);<NEW_LINE>if (Files.exists(filePath)) {<NEW_LINE>try (Stream<Path> stream = Files.walk(filePath)) {<NEW_LINE>stream.map(Path::toFile).sorted((o1, o2) -> Comparator.<File>reverseOrder().compare(o1, o2)).forEach(File::delete);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>Files.createDirectories(filePath);<NEW_LINE>writeTableMetadata(filePath, sawMetadata);<NEW_LINE>try {<NEW_LINE>List<Column<?>> columns = table.columns();<NEW_LINE>for (int i = 0; i < columns.size(); i++) {<NEW_LINE>Column<?> column = columns.get(i);<NEW_LINE>String pathString = sawMetadata.getColumnMetadataList().get(i).getId();<NEW_LINE>writerCompletionService.submit(() -> {<NEW_LINE>Path <MASK><NEW_LINE>writeColumn(columnPath.toString(), column);<NEW_LINE>return null;<NEW_LINE>});<NEW_LINE>}<NEW_LINE>for (int i = 0; i < table.columnCount(); i++) {<NEW_LINE>Future<Void> future = writerCompletionService.take();<NEW_LINE>future.get();<NEW_LINE>}<NEW_LINE>} catch (InterruptedException e) {<NEW_LINE>Thread.currentThread().interrupt();<NEW_LINE>throw new IllegalStateException(e);<NEW_LINE>} catch (ExecutionException e) {<NEW_LINE>throw new IllegalStateException(e);<NEW_LINE>} finally {<NEW_LINE>executorService.shutdown();<NEW_LINE>}<NEW_LINE>return filePath.toAbsolutePath().toString();<NEW_LINE>}
columnPath = filePath.resolve(pathString);
246,676
public static void upgradeTo40_assignDashboards(Path dashboardsDump, DashboardService dashboardService, boolean sql) throws Exception {<NEW_LINE>JavaType assignedCustomersType = objectMapper.getTypeFactory().constructCollectionType(<MASK><NEW_LINE>try (CSVParser csvParser = new CSVParser(Files.newBufferedReader(dashboardsDump), CSV_DUMP_FORMAT.withFirstRecordAsHeader())) {<NEW_LINE>csvParser.forEach(record -> {<NEW_LINE>String customerIdString = record.get(CUSTOMER_ID);<NEW_LINE>String assignedCustomersString = record.get(ASSIGNED_CUSTOMERS);<NEW_LINE>DashboardId dashboardId = new DashboardId(toUUID(record.get(ID), sql));<NEW_LINE>List<CustomerId> customerIds = new ArrayList<>();<NEW_LINE>if (!StringUtils.isEmpty(assignedCustomersString)) {<NEW_LINE>try {<NEW_LINE>Set<ShortCustomerInfo> assignedCustomers = objectMapper.readValue(assignedCustomersString, assignedCustomersType);<NEW_LINE>assignedCustomers.forEach((customerInfo) -> {<NEW_LINE>CustomerId customerId = customerInfo.getCustomerId();<NEW_LINE>if (!customerId.isNullUid()) {<NEW_LINE>customerIds.add(customerId);<NEW_LINE>}<NEW_LINE>});<NEW_LINE>} catch (IOException e) {<NEW_LINE>log.error("Unable to parse assigned customers field", e);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (!StringUtils.isEmpty(customerIdString)) {<NEW_LINE>CustomerId customerId = new CustomerId(toUUID(customerIdString, sql));<NEW_LINE>if (!customerId.isNullUid()) {<NEW_LINE>customerIds.add(customerId);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>for (CustomerId customerId : customerIds) {<NEW_LINE>dashboardService.assignDashboardToCustomer(TenantId.SYS_TENANT_ID, dashboardId, customerId);<NEW_LINE>}<NEW_LINE>});<NEW_LINE>}<NEW_LINE>}
HashSet.class, ShortCustomerInfo.class);
958,185
public static List<Object> generateValidDatetimeNumeric(int n) {<NEW_LINE>return IntStream.range(0, n).mapToObj(i -> {<NEW_LINE>final int r = Math.abs(R.nextInt()) % 6;<NEW_LINE>switch(r) {<NEW_LINE>case 0:<NEW_LINE>return randomDoubleInRange(1, (70 - 1) * 10000L + 1231L);<NEW_LINE>case 1:<NEW_LINE>return randomDoubleInRange(70 * 10000L + 101L, 991231L);<NEW_LINE>case 2:<NEW_LINE>return randomDoubleInRange(10000101L, 99991231L);<NEW_LINE>case 3:<NEW_LINE>return randomDoubleInRange(101000000L, (70 - 1) * 10000000000L + 1231235959L);<NEW_LINE>case 4:<NEW_LINE>return randomDoubleInRange(<MASK><NEW_LINE>default:<NEW_LINE>return randomDoubleInRange(1, 10000101000000L);<NEW_LINE>}<NEW_LINE>}).collect(Collectors.toList());<NEW_LINE>}
70 * 10000000000L + 101000000L, 991231235959L);
1,269,561
private <T extends Markable> void addPins(boolean removeViews, List<T> countries, T selectedCountry) {<NEW_LINE>if (removeViews) {<NEW_LINE>mapView.getMarkerLayout().removeAllViews();<NEW_LINE>removePaths();<NEW_LINE>}<NEW_LINE>List<T> countriesCopy = sortPins(countries);<NEW_LINE>for (Markable country : countriesCopy) {<NEW_LINE>ImageView marker = new ImageView(getContext());<NEW_LINE>marker.setTag(country);<NEW_LINE>TranslatedCoordinates coordinates = country.getCoordinates();<NEW_LINE>int selectedResource = country.equals(selectedCountry) ? R.drawable.ic_marker_secure_core_pressed : R.drawable.ic_marker_secure_core;<NEW_LINE>int selectedMarker = stateMonitor.isConnectedToAny(country.getConnectableServers()) ? R.drawable.ic_marker_colored : userData.hasAccessToAnyServer(country.getConnectableServers()) ? R.drawable.ic_marker_available : R.drawable.ic_marker;<NEW_LINE>if ((country.equals(selectedCountry)) && userData.isSecureCoreEnabled() && country.isSecureCoreMarker()) {<NEW_LINE>secureCoreMarker = marker;<NEW_LINE>}<NEW_LINE>if (secureCoreMarker != null) {<NEW_LINE>marker.setSelected(secureCoreMarker.getTag() == marker.getTag() || (marker.getTag().toString().contains(((VpnCountry) secureCoreMarker.getTag()<MASK><NEW_LINE>}<NEW_LINE>marker.setContentDescription(markerContentDescription(country, stateMonitor.isConnectedToAny(country.getConnectableServers()) || marker.isSelected()));<NEW_LINE>marker.setImageResource(userData.isSecureCoreEnabled() && country.isSecureCoreMarker() ? selectedResource : selectedMarker);<NEW_LINE>if (country.getCoordinates().hasValidCoordinates()) {<NEW_LINE>mapView.addMarker(marker, coordinates.getPositionX(), coordinates.getPositionY(), -0.5f, userData.isSecureCoreEnabled() && country.isSecureCoreMarker() ? -0.5f : -1.0f);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
).getCountryName())));
1,083,002
public void deleteNetwork(String guid) {<NEW_LINE>String name = null;<NEW_LINE>if (nameToGuid.isEmpty()) {<NEW_LINE>log.warn("Could not delete network with ID {}, network doesn't exist", guid);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>for (Entry<String, String> entry : nameToGuid.entrySet()) {<NEW_LINE>if (entry.getValue().equals(guid)) {<NEW_LINE>name = entry.getKey();<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>log.warn("Could not delete network with ID {}, network doesn't exist", guid);<NEW_LINE>}<NEW_LINE>if (log.isDebugEnabled())<NEW_LINE>log.debug("Deleting network with name {} ID {}", name, guid);<NEW_LINE>nameToGuid.remove(name);<NEW_LINE>deleteGateway(guid);<NEW_LINE>if (vNetsByGuid.get(guid) != null) {<NEW_LINE>vNetsByGuid.get(guid).clearHosts();<NEW_LINE>vNetsByGuid.remove(guid);<NEW_LINE>}<NEW_LINE>Collection<MacAddress> deleteList = new ArrayList<MacAddress>();<NEW_LINE>for (MacAddress host : macToGuid.keySet()) {<NEW_LINE>if (macToGuid.get(host).equals(guid)) {<NEW_LINE>deleteList.add(host);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>for (MacAddress mac : deleteList) {<NEW_LINE>if (log.isDebugEnabled()) {<NEW_LINE>log.debug("Removing host {} from network {}", mac.toString(), guid);<NEW_LINE>}<NEW_LINE>macToGuid.remove(mac);<NEW_LINE>for (Entry<String, MacAddress> entry : portToMac.entrySet()) {<NEW_LINE>if (entry.getValue().equals(mac)) {<NEW_LINE>portToMac.<MASK><NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
remove(entry.getKey());
355,845
public void findFunctionsUsingAtexit() throws CancelledException, InvalidInputException {<NEW_LINE>Function atexitFunction = null;<NEW_LINE>List<Function> atexitFunctions = extendedFlatAPI.getGlobalFunctions("_atexit");<NEW_LINE>if (atexitFunctions.size() != 1) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>atexitFunction = atexitFunctions.get(0);<NEW_LINE>atexit = atexitFunction;<NEW_LINE>ReferenceIterator referenceIterator = program.getReferenceManager().getReferencesTo(atexitFunction.getEntryPoint());<NEW_LINE>while (referenceIterator.hasNext()) {<NEW_LINE>monitor.checkCanceled();<NEW_LINE>Reference ref = referenceIterator.next();<NEW_LINE>Address fromAddress = ref.getFromAddress();<NEW_LINE>Function function = extendedFlatAPI.getFunctionContaining(fromAddress);<NEW_LINE>if (function == null) {<NEW_LINE>AddressSet subroutineAddresses = <MASK><NEW_LINE>Address minAddress = subroutineAddresses.getMinAddress();<NEW_LINE>function = extendedFlatAPI.createFunction(minAddress, null);<NEW_LINE>if (function == null) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// get the decompiler highFunction<NEW_LINE>HighFunction highFunction = decompilerUtils.getHighFunction(function);<NEW_LINE>if (highFunction == null) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>Iterator<PcodeOpAST> pcodeOps = highFunction.getPcodeOps(fromAddress);<NEW_LINE>while (pcodeOps.hasNext()) {<NEW_LINE>monitor.checkCanceled();<NEW_LINE>PcodeOpAST pcodeOp = pcodeOps.next();<NEW_LINE>int opcode = pcodeOp.getOpcode();<NEW_LINE>if (opcode == PcodeOp.CALL) {<NEW_LINE>Varnode input = pcodeOp.getInput(1);<NEW_LINE>if (input == null) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>Address callingAddress = input.getPCAddress();<NEW_LINE>if (callingAddress.equals(Address.NO_ADDRESS)) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>Address calledAddress = decompilerUtils.getCalledAddressFromCallingPcodeOp(input);<NEW_LINE>if (calledAddress == null) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>Function calledFunction = extendedFlatAPI.getFunctionAt(calledAddress);<NEW_LINE>if (calledFunction == null) {<NEW_LINE>calledFunction = extendedFlatAPI.createFunction(calledAddress, null);<NEW_LINE>if (calledFunction == null) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>if (!atexitCalledFunctions.contains(calledFunction)) {<NEW_LINE>atexitCalledFunctions.add(calledFunction);<NEW_LINE>}<NEW_LINE>calledFunction.setReturnType(new VoidDataType(), SourceType.ANALYSIS);<NEW_LINE>} else {<NEW_LINE>if (!atexitCalledFunctions.contains(calledFunction)) {<NEW_LINE>atexitCalledFunctions.add(calledFunction);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
extendedFlatAPI.getSubroutineAddresses(program, fromAddress);
851,506
private static void loadLib(String lib) {<NEW_LINE>InputStream is = Os.class.getResourceAsStream(lib);<NEW_LINE>if (is == null) {<NEW_LINE>throw new FatalError("Internal error: cannot find " + lib + ", broken package?");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>File tempLib = null;<NEW_LINE>try {<NEW_LINE>int <MASK><NEW_LINE>tempLib = File.createTempFile(lib.substring(0, dot), lib.substring(dot));<NEW_LINE>// copy to tempLib<NEW_LINE>try (FileOutputStream out = new FileOutputStream(tempLib)) {<NEW_LINE>byte[] buf = new byte[4096];<NEW_LINE>while (true) {<NEW_LINE>int read = is.read(buf);<NEW_LINE>if (read == -1) {<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>out.write(buf, 0, read);<NEW_LINE>}<NEW_LINE>} finally {<NEW_LINE>tempLib.deleteOnExit();<NEW_LINE>}<NEW_LINE>System.load(tempLib.getAbsolutePath());<NEW_LINE>} catch (IOException e) {<NEW_LINE>throw new FatalError("Internal error: cannot unpack " + tempLib, e);<NEW_LINE>}<NEW_LINE>} finally {<NEW_LINE>Misc.free(is);<NEW_LINE>}<NEW_LINE>}
dot = lib.indexOf('.');
303,184
private void showPreferencesSummary() {<NEW_LINE>showCurrentFileName(Strings.getFormattedFileName());<NEW_LINE>ImageView imgGpx = (ImageView) rootView.findViewById(R.id.simpleview_imgGpx);<NEW_LINE>ImageView imgKml = (ImageView) rootView.findViewById(R.id.simpleview_imgKml);<NEW_LINE>ImageView imgCsv = (ImageView) rootView.findViewById(R.id.simpleview_imgCsv);<NEW_LINE>ImageView imgNmea = (ImageView) rootView.findViewById(R.id.simpleview_imgNmea);<NEW_LINE>ImageView imgLink = (ImageView) rootView.findViewById(R.id.simpleview_imgLink);<NEW_LINE>ImageView imgJson = (ImageView) rootView.findViewById(R.id.simpleview_imgjson);<NEW_LINE>if (preferenceHelper.shouldLogToGpx()) {<NEW_LINE>imgGpx.setVisibility(View.VISIBLE);<NEW_LINE>} else {<NEW_LINE>imgGpx.setVisibility(View.GONE);<NEW_LINE>}<NEW_LINE>if (preferenceHelper.shouldLogToKml()) {<NEW_LINE>imgKml.setVisibility(View.VISIBLE);<NEW_LINE>} else {<NEW_LINE>imgKml.setVisibility(View.GONE);<NEW_LINE>}<NEW_LINE>if (preferenceHelper.shouldLogToNmea()) {<NEW_LINE>imgNmea.setVisibility(View.VISIBLE);<NEW_LINE>} else {<NEW_LINE>imgNmea.setVisibility(View.GONE);<NEW_LINE>}<NEW_LINE>if (preferenceHelper.shouldLogToCSV()) {<NEW_LINE>imgCsv.setVisibility(View.VISIBLE);<NEW_LINE>} else {<NEW_LINE>imgCsv.setVisibility(View.GONE);<NEW_LINE>}<NEW_LINE>if (preferenceHelper.shouldLogToCustomUrl()) {<NEW_LINE>imgLink.setVisibility(View.VISIBLE);<NEW_LINE>} else {<NEW_LINE>imgLink.setVisibility(View.GONE);<NEW_LINE>}<NEW_LINE>if (preferenceHelper.shouldLogToGeoJSON()) {<NEW_LINE>imgJson.setVisibility(View.VISIBLE);<NEW_LINE>} else {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>}
imgJson.setVisibility(View.GONE);
1,787,975
String executeDdl(final String sqlExpression, final DdlCommand command, final boolean withQuery, final Set<SourceName> withQuerySources, final boolean restoreInProgress) {<NEW_LINE>if (command instanceof DropSourceCommand && !restoreInProgress) {<NEW_LINE>throwIfInsertQueriesExist(((DropSourceCommand<MASK><NEW_LINE>}<NEW_LINE>final DdlCommandResult result = ddlCommandExec.execute(sqlExpression, command, withQuery, withQuerySources, restoreInProgress);<NEW_LINE>if (!result.isSuccess()) {<NEW_LINE>throw new KsqlStatementException(result.getMessage(), sqlExpression);<NEW_LINE>}<NEW_LINE>if (command instanceof DropSourceCommand) {<NEW_LINE>// terminate the query (linked by create_as commands) after deleting the source to avoid<NEW_LINE>// other commands to create queries from this source while the query is being terminated<NEW_LINE>maybeTerminateCreateAsQuery(((DropSourceCommand) command).getSourceName());<NEW_LINE>}<NEW_LINE>return result.getMessage();<NEW_LINE>}
) command).getSourceName());
1,381,793
public void replace(File inputFile, File outputFile) {<NEW_LINE>try (BufferedReader reader = new BufferedReader(new FileReader(inputFile))) {<NEW_LINE>BufferedWriter writer = null;<NEW_LINE>FileOutputStream outputStream = null;<NEW_LINE>try {<NEW_LINE>if (charsetName != null) {<NEW_LINE>outputStream = new FileOutputStream(outputFile);<NEW_LINE>Charset charset = Charset.forName(charsetName);<NEW_LINE>writer = new BufferedWriter(<MASK><NEW_LINE>} else {<NEW_LINE>writer = new BufferedWriter(new FileWriter(outputFile));<NEW_LINE>}<NEW_LINE>String lineContents;<NEW_LINE>while ((lineContents = reader.readLine()) != null) {<NEW_LINE>String modifiedLine = replaceLine(lineContents);<NEW_LINE>writer.write(modifiedLine);<NEW_LINE>writer.newLine();<NEW_LINE>}<NEW_LINE>} finally {<NEW_LINE>if (writer != null) {<NEW_LINE>writer.close();<NEW_LINE>}<NEW_LINE>if (outputStream != null) {<NEW_LINE>outputStream.close();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} catch (Exception e) {<NEW_LINE>Logger.getLogger(LineTokenReplacer.class.getPackage().getName()).log(Level.SEVERE, null, e);<NEW_LINE>throw new RuntimeException(e);<NEW_LINE>}<NEW_LINE>}
new OutputStreamWriter(outputStream, charset));
913,080
public static int edgelblcmpfn(CArrayOfStar<ST_Agedge_s> ptr0, CArrayOfStar<ST_Agedge_s> ptr1) {<NEW_LINE>ENTERING("bmsa24i3avg14po4sp17yh89k", "edgelblcmpfn");<NEW_LINE>try {<NEW_LINE>ST_Agedge_s e0, e1;<NEW_LINE>final ST_pointf sz0 = new ST_pointf(), sz1 = new ST_pointf();<NEW_LINE>e0 = ptr0.get_(0);<NEW_LINE><MASK><NEW_LINE>if (ED_label(e0) != null) {<NEW_LINE>if (ED_label(e1) != null) {<NEW_LINE>sz0.___(ED_label(e0).dimen);<NEW_LINE>sz1.___(ED_label(e1).dimen);<NEW_LINE>if (sz0.x > sz1.x)<NEW_LINE>return -1;<NEW_LINE>else if (sz0.x < sz1.x)<NEW_LINE>return 1;<NEW_LINE>else if (sz0.y > sz1.y)<NEW_LINE>return -1;<NEW_LINE>else if (sz0.y < sz1.y)<NEW_LINE>return 1;<NEW_LINE>else<NEW_LINE>return 0;<NEW_LINE>} else<NEW_LINE>return -1;<NEW_LINE>} else if (ED_label(e1) != null) {<NEW_LINE>return 1;<NEW_LINE>} else<NEW_LINE>return 0;<NEW_LINE>} finally {<NEW_LINE>LEAVING("bmsa24i3avg14po4sp17yh89k", "edgelblcmpfn");<NEW_LINE>}<NEW_LINE>}
e1 = ptr1.get_(0);
751,045
private Attributes filterAttributes(Attributes attributes) throws SAXException {<NEW_LINE>int len = attributes.getLength();<NEW_LINE>String langValue = null;<NEW_LINE>for (int i = 0; i < len; i++) {<NEW_LINE>String local = attributes.getLocalName(i);<NEW_LINE>String uri = attributes.getURI(i);<NEW_LINE>if (local == "lang" && uri == "http://www.w3.org/XML/1998/namespace") {<NEW_LINE>langValue = attributes.getValue(i);<NEW_LINE>} else if (local == "xml:lang" && uri == "") {<NEW_LINE>String xmlLangValue = attributes.getValue(i);<NEW_LINE>AttributesImpl attributesImpl = new AttributesImpl();<NEW_LINE>for (int j = 0; j < i; j++) {<NEW_LINE>attributesImpl.addAttribute(attributes.getURI(j), attributes.getLocalName(j), attributes.getQName(j), attributes.getType(j), attributes.getValue(j));<NEW_LINE>}<NEW_LINE>for (int k = i + 1; k < len; k++) {<NEW_LINE>uri = attributes.getURI(k);<NEW_LINE>local = attributes.getLocalName(k);<NEW_LINE>if (local == "lang" && uri == "http://www.w3.org/XML/1998/namespace") {<NEW_LINE>langValue = attributes.getValue(k);<NEW_LINE>}<NEW_LINE>attributesImpl.addAttribute(uri, local, attributes.getQName(k), attributes.getType(k)<MASK><NEW_LINE>}<NEW_LINE>if (errorHandler != null && !equalsIgnoreAsciiCase(xmlLangValue, langValue)) {<NEW_LINE>errorHandler.error(new SAXParseException("When the attribute \u201Cxml:lang\u201D in no namespace is specified, the element must also have the attribute \u201Clang\u201D present with the same value.", locator));<NEW_LINE>}<NEW_LINE>return attributesImpl;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return attributes;<NEW_LINE>}
, attributes.getValue(k));
115,450
public static DescribeIngressResponse unmarshall(DescribeIngressResponse describeIngressResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeIngressResponse.setRequestId(_ctx.stringValue("DescribeIngressResponse.RequestId"));<NEW_LINE>describeIngressResponse.setCode(_ctx.stringValue("DescribeIngressResponse.Code"));<NEW_LINE>describeIngressResponse.setMessage<MASK><NEW_LINE>describeIngressResponse.setSuccess(_ctx.booleanValue("DescribeIngressResponse.Success"));<NEW_LINE>describeIngressResponse.setErrorCode(_ctx.stringValue("DescribeIngressResponse.ErrorCode"));<NEW_LINE>describeIngressResponse.setTraceId(_ctx.stringValue("DescribeIngressResponse.TraceId"));<NEW_LINE>Data data = new Data();<NEW_LINE>data.setId(_ctx.longValue("DescribeIngressResponse.Data.Id"));<NEW_LINE>data.setName(_ctx.stringValue("DescribeIngressResponse.Data.Name"));<NEW_LINE>data.setNamespaceId(_ctx.stringValue("DescribeIngressResponse.Data.NamespaceId"));<NEW_LINE>data.setDescription(_ctx.stringValue("DescribeIngressResponse.Data.Description"));<NEW_LINE>data.setSlbId(_ctx.stringValue("DescribeIngressResponse.Data.SlbId"));<NEW_LINE>data.setListenerPort(_ctx.integerValue("DescribeIngressResponse.Data.ListenerPort"));<NEW_LINE>data.setCertId(_ctx.stringValue("DescribeIngressResponse.Data.CertId"));<NEW_LINE>data.setSlbType(_ctx.stringValue("DescribeIngressResponse.Data.SlbType"));<NEW_LINE>DefaultRule defaultRule = new DefaultRule();<NEW_LINE>defaultRule.setAppId(_ctx.stringValue("DescribeIngressResponse.Data.DefaultRule.AppId"));<NEW_LINE>defaultRule.setContainerPort(_ctx.integerValue("DescribeIngressResponse.Data.DefaultRule.ContainerPort"));<NEW_LINE>defaultRule.setAppName(_ctx.stringValue("DescribeIngressResponse.Data.DefaultRule.AppName"));<NEW_LINE>data.setDefaultRule(defaultRule);<NEW_LINE>List<Rule> rules = new ArrayList<Rule>();<NEW_LINE>for (int i = 0; i < _ctx.lengthValue("DescribeIngressResponse.Data.Rules.Length"); i++) {<NEW_LINE>Rule rule = new Rule();<NEW_LINE>rule.setAppId(_ctx.stringValue("DescribeIngressResponse.Data.Rules[" + i + "].AppId"));<NEW_LINE>rule.setContainerPort(_ctx.integerValue("DescribeIngressResponse.Data.Rules[" + i + "].ContainerPort"));<NEW_LINE>rule.setDomain(_ctx.stringValue("DescribeIngressResponse.Data.Rules[" + i + "].Domain"));<NEW_LINE>rule.setPath(_ctx.stringValue("DescribeIngressResponse.Data.Rules[" + i + "].Path"));<NEW_LINE>rule.setAppName(_ctx.stringValue("DescribeIngressResponse.Data.Rules[" + i + "].AppName"));<NEW_LINE>rules.add(rule);<NEW_LINE>}<NEW_LINE>data.setRules(rules);<NEW_LINE>describeIngressResponse.setData(data);<NEW_LINE>return describeIngressResponse;<NEW_LINE>}
(_ctx.stringValue("DescribeIngressResponse.Message"));
293,401
public static DescribeLayer4RulePolicyResponse unmarshall(DescribeLayer4RulePolicyResponse describeLayer4RulePolicyResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeLayer4RulePolicyResponse.setRequestId(_ctx.stringValue("DescribeLayer4RulePolicyResponse.RequestId"));<NEW_LINE>describeLayer4RulePolicyResponse.setInstanceId(_ctx.stringValue("DescribeLayer4RulePolicyResponse.InstanceId"));<NEW_LINE>describeLayer4RulePolicyResponse.setFrontendPort(_ctx.integerValue("DescribeLayer4RulePolicyResponse.FrontendPort"));<NEW_LINE>describeLayer4RulePolicyResponse.setBackendPort(_ctx.integerValue("DescribeLayer4RulePolicyResponse.BackendPort"));<NEW_LINE>describeLayer4RulePolicyResponse.setForwardProtocol(_ctx.stringValue("DescribeLayer4RulePolicyResponse.ForwardProtocol"));<NEW_LINE>describeLayer4RulePolicyResponse.setBakMode(_ctx.stringValue("DescribeLayer4RulePolicyResponse.BakMode"));<NEW_LINE>describeLayer4RulePolicyResponse.setCurrentIndex(_ctx.integerValue("DescribeLayer4RulePolicyResponse.CurrentIndex"));<NEW_LINE>List<PriRealServersItem> priRealServers = new ArrayList<PriRealServersItem>();<NEW_LINE>for (int i = 0; i < _ctx.lengthValue("DescribeLayer4RulePolicyResponse.PriRealServers.Length"); i++) {<NEW_LINE>PriRealServersItem priRealServersItem = new PriRealServersItem();<NEW_LINE>priRealServersItem.setInstanceId(_ctx.stringValue("DescribeLayer4RulePolicyResponse.PriRealServers[" + i + "].InstanceId"));<NEW_LINE>priRealServersItem.setEip(_ctx.stringValue("DescribeLayer4RulePolicyResponse.PriRealServers[" + i + "].Eip"));<NEW_LINE>priRealServersItem.setFrontendPort(_ctx.integerValue("DescribeLayer4RulePolicyResponse.PriRealServers[" + i + "].FrontendPort"));<NEW_LINE>priRealServersItem.setBizProtocol(_ctx.stringValue("DescribeLayer4RulePolicyResponse.PriRealServers[" + i + "].Protocol"));<NEW_LINE>priRealServersItem.setRealServer(_ctx.stringValue("DescribeLayer4RulePolicyResponse.PriRealServers[" + i + "].RealServer"));<NEW_LINE>priRealServersItem.setCurrentIndex(_ctx.integerValue("DescribeLayer4RulePolicyResponse.PriRealServers[" + i + "].CurrentIndex"));<NEW_LINE>priRealServers.add(priRealServersItem);<NEW_LINE>}<NEW_LINE>describeLayer4RulePolicyResponse.setPriRealServers(priRealServers);<NEW_LINE>List<SecRealServersItem> secRealServers = new ArrayList<SecRealServersItem>();<NEW_LINE>for (int i = 0; i < _ctx.lengthValue("DescribeLayer4RulePolicyResponse.SecRealServers.Length"); i++) {<NEW_LINE>SecRealServersItem secRealServersItem = new SecRealServersItem();<NEW_LINE>secRealServersItem.setInstanceId(_ctx.stringValue("DescribeLayer4RulePolicyResponse.SecRealServers[" + i + "].InstanceId"));<NEW_LINE>secRealServersItem.setEip(_ctx.stringValue("DescribeLayer4RulePolicyResponse.SecRealServers[" + i + "].Eip"));<NEW_LINE>secRealServersItem.setFrontendPort(_ctx.integerValue("DescribeLayer4RulePolicyResponse.SecRealServers[" + i + "].FrontendPort"));<NEW_LINE>secRealServersItem.setBizProtocol(_ctx.stringValue<MASK><NEW_LINE>secRealServersItem.setRealServer(_ctx.stringValue("DescribeLayer4RulePolicyResponse.SecRealServers[" + i + "].RealServer"));<NEW_LINE>secRealServersItem.setCurrentIndex(_ctx.integerValue("DescribeLayer4RulePolicyResponse.SecRealServers[" + i + "].CurrentIndex"));<NEW_LINE>secRealServers.add(secRealServersItem);<NEW_LINE>}<NEW_LINE>describeLayer4RulePolicyResponse.setSecRealServers(secRealServers);<NEW_LINE>return describeLayer4RulePolicyResponse;<NEW_LINE>}
("DescribeLayer4RulePolicyResponse.SecRealServers[" + i + "].Protocol"));
1,614,957
private void initializeResources() {<NEW_LINE>chatId = getIntent().getIntExtra(CHAT_ID_EXTRA, 0);<NEW_LINE>contactId = getIntent().getIntExtra(CONTACT_ID_EXTRA, 0);<NEW_LINE>chatIsMultiUser = false;<NEW_LINE>chatIsDeviceTalk = false;<NEW_LINE>chatIsMailingList = false;<NEW_LINE>chatIsBroadcast = false;<NEW_LINE>fromChat = getIntent().getBooleanExtra(FROM_CHAT, false);<NEW_LINE>if (contactId != 0) {<NEW_LINE>chatId = dcContext.getChatIdByContactId(contactId);<NEW_LINE>} else if (chatId != 0) {<NEW_LINE>DcChat dcChat = dcContext.getChat(chatId);<NEW_LINE>chatIsMultiUser = dcChat.isMultiUser();<NEW_LINE>chatIsDeviceTalk = dcChat.isDeviceTalk();<NEW_LINE>chatIsMailingList = dcChat.isMailingList();<NEW_LINE>chatIsBroadcast = dcChat.isBroadcast();<NEW_LINE>if (!chatIsMultiUser) {<NEW_LINE>final int[] members = dcContext.getChatContacts(chatId);<NEW_LINE>contactId = members.length >= <MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (!isGlobalProfile() && !isSelfProfile() && !chatIsMailingList) {<NEW_LINE>tabs.add(TAB_SETTINGS);<NEW_LINE>}<NEW_LINE>tabs.add(TAB_GALLERY);<NEW_LINE>tabs.add(TAB_DOCS);<NEW_LINE>// tabs.add(TAB_LINKS);<NEW_LINE>// if(Prefs.isLocationStreamingEnabled(this)) {<NEW_LINE>// tabs.add(TAB_MAP);<NEW_LINE>// }<NEW_LINE>this.viewPager = ViewUtil.findById(this, R.id.pager);<NEW_LINE>this.toolbar = ViewUtil.findById(this, R.id.toolbar);<NEW_LINE>this.tabLayout = ViewUtil.findById(this, R.id.tab_layout);<NEW_LINE>}
1 ? members[0] : 0;
289,776
public static List<OpenSSLX509CRL> fromPkcs7DerInputStream(InputStream is) throws ParsingException {<NEW_LINE><MASK><NEW_LINE>final long[] certRefs;<NEW_LINE>try {<NEW_LINE>certRefs = NativeCrypto.d2i_PKCS7_bio(bis.getBioContext(), NativeCrypto.PKCS7_CRLS);<NEW_LINE>} catch (Exception e) {<NEW_LINE>throw new ParsingException(e);<NEW_LINE>} finally {<NEW_LINE>NativeCrypto.BIO_free(bis.getBioContext());<NEW_LINE>}<NEW_LINE>final List<OpenSSLX509CRL> certs = new ArrayList<OpenSSLX509CRL>(certRefs.length);<NEW_LINE>for (int i = 0; i < certRefs.length; i++) {<NEW_LINE>if (certRefs[i] == 0) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>certs.add(new OpenSSLX509CRL(certRefs[i]));<NEW_LINE>}<NEW_LINE>return certs;<NEW_LINE>}
OpenSSLBIOInputStream bis = new OpenSSLBIOInputStream(is);
505,853
private void populateTraceTnSlowCountAndPointPartialPart2() throws Exception {<NEW_LINE>if (!columnExists("trace_tn_slow_point", "partial")) {<NEW_LINE>// previously failed mid-upgrade prior to updating schema version<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>PreparedStatement deleteCountPS = session.prepare("delete from trace_tn_slow_count where" + " agent_rollup = ? and transaction_type = ? and transaction_name = ? and" + " capture_time = ? and agent_id = ? and trace_id = ?");<NEW_LINE>PreparedStatement deletePointPS = session.prepare("delete from trace_tn_slow_point where" + " agent_rollup = ? and transaction_type = ? and transaction_name = ? and" + " capture_time = ? and agent_id = ? and trace_id = ?");<NEW_LINE>ResultSet results = session.read("select agent_rollup, transaction_type," + " transaction_name, capture_time, agent_id, trace_id from" + " trace_tn_slow_count_partial");<NEW_LINE>Queue<ListenableFuture<?>> futures = new ArrayDeque<>();<NEW_LINE>for (Row row : results) {<NEW_LINE>BoundStatement boundStatement = deleteCountPS.bind();<NEW_LINE>int i = 0;<NEW_LINE>// agent_rollup<NEW_LINE>copyString(row, boundStatement, i++);<NEW_LINE>// transaction_type<NEW_LINE>copyString(row, boundStatement, i++);<NEW_LINE>// transaction_name<NEW_LINE>copyString(row, boundStatement, i++);<NEW_LINE>// capture_time<NEW_LINE>copyTimestamp(row, boundStatement, i++);<NEW_LINE>// agent_id<NEW_LINE>copyString(row, boundStatement, i++);<NEW_LINE>// trace_id<NEW_LINE>copyString(row, boundStatement, i++);<NEW_LINE>futures.add<MASK><NEW_LINE>boundStatement = deletePointPS.bind();<NEW_LINE>i = 0;<NEW_LINE>// agent_rollup<NEW_LINE>copyString(row, boundStatement, i++);<NEW_LINE>// transaction_type<NEW_LINE>copyString(row, boundStatement, i++);<NEW_LINE>// transaction_name<NEW_LINE>copyString(row, boundStatement, i++);<NEW_LINE>// capture_time<NEW_LINE>copyTimestamp(row, boundStatement, i++);<NEW_LINE>// agent_id<NEW_LINE>copyString(row, boundStatement, i++);<NEW_LINE>// trace_id<NEW_LINE>copyString(row, boundStatement, i++);<NEW_LINE>futures.add(session.writeAsync(boundStatement));<NEW_LINE>waitForSome(futures);<NEW_LINE>}<NEW_LINE>MoreFutures.waitForAll(futures);<NEW_LINE>dropColumnIfExists("trace_tn_slow_point", "partial");<NEW_LINE>}
(session.writeAsync(boundStatement));
307,349
private CombinedStatistics runAnalysis(Runtime runtime, long t0, EngineArguments args, MutationEngine engine) {<NEW_LINE>CoverageDatabase coverageData = coverage().calculateCoverage();<NEW_LINE>HistoryStore history = this.strategies.history();<NEW_LINE>LOG.fine("Used memory after coverage calculation " + ((runtime.totalMemory() - runtime.freeMemory()) / MB) + " mb");<NEW_LINE>LOG.fine("Free Memory after coverage calculation " + (runtime.freeMemory() / MB) + " mb");<NEW_LINE>final MutationStatisticsListener stats = new MutationStatisticsListener();<NEW_LINE>history.initialize();<NEW_LINE>this.timings.registerStart(Timings.Stage.BUILD_MUTATION_TESTS);<NEW_LINE>final List<MutationAnalysisUnit> tus = buildMutationTests(coverageData, history, engine, args, allInterceptors());<NEW_LINE>this.timings.registerEnd(Timings.Stage.BUILD_MUTATION_TESTS);<NEW_LINE>LOG.info("Created " + tus.size() + " mutation test units");<NEW_LINE>recordClassPath(history, coverageData);<NEW_LINE>LOG.fine("Used memory before analysis start " + ((runtime.totalMemory() - runtime.freeMemory()) / MB) + " mb");<NEW_LINE>LOG.fine("Free Memory before analysis start " + (runtime.freeMemory() / MB) + " mb");<NEW_LINE>final List<MutationResultListener> config = createConfig(t0, coverageData, history, stats, engine);<NEW_LINE>final MutationAnalysisExecutor mae = new MutationAnalysisExecutor(numberOfThreads(), config);<NEW_LINE>this.timings.registerStart(Timings.Stage.RUN_MUTATION_TESTS);<NEW_LINE>mae.run(tus);<NEW_LINE>this.timings.registerEnd(Timings.Stage.RUN_MUTATION_TESTS);<NEW_LINE>LOG.info<MASK><NEW_LINE>CombinedStatistics combined = new CombinedStatistics(stats.getStatistics(), coverageData.createSummary());<NEW_LINE>printStats(combined);<NEW_LINE>return combined;<NEW_LINE>}
("Completed in " + timeSpan(t0));
769,331
public void prompt(String msg) {<NEW_LINE>scr_img_original = scrOCP.capture();<NEW_LINE>scr_img = scr_img_original.getImage();<NEW_LINE>scr_img_darker = scr_img;<NEW_LINE>scr_img_type = scr_img.getType();<NEW_LINE>scr_img_rect = new Rectangle(scrOCP.getBounds());<NEW_LINE>promptMsg = msg;<NEW_LINE>if (isLocalScreen) {<NEW_LINE>darker_factor = 0.6f;<NEW_LINE>RescaleOp op = new RescaleOp(darker_factor, 0, null);<NEW_LINE>scr_img_darker = op.filter(scr_img, null);<NEW_LINE>} else {<NEW_LINE>promptMsg = null;<NEW_LINE>if (scr_img_rect.height > Screen.getPrimaryScreen().getBounds().getHeight()) {<NEW_LINE>scr_img_scale = Screen.getPrimaryScreen().getBounds().getHeight() / scr_img_rect.height;<NEW_LINE>}<NEW_LINE>if (scr_img_rect.width > Screen.getPrimaryScreen().getBounds().getWidth()) {<NEW_LINE>scr_img_scale = Math.min(Screen.getPrimaryScreen().getBounds().getWidth() / scr_img_rect.width, scr_img_scale);<NEW_LINE>}<NEW_LINE>if (1 != scr_img_scale) {<NEW_LINE>scr_img_rect.width = (int<MASK><NEW_LINE>scr_img_rect.height = (int) (scr_img_rect.height * scr_img_scale);<NEW_LINE>Image tmp = scr_img.getScaledInstance(scr_img_rect.width, scr_img_rect.height, Image.SCALE_SMOOTH);<NEW_LINE>scr_img = new BufferedImage(scr_img_rect.width, scr_img_rect.height, BufferedImage.TYPE_INT_ARGB);<NEW_LINE>Graphics2D g2d = scr_img.createGraphics();<NEW_LINE>g2d.drawImage(tmp, 0, 0, null);<NEW_LINE>g2d.dispose();<NEW_LINE>scr_img_darker = scr_img;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>this.setBounds(scr_img_rect);<NEW_LINE>this.setVisible(true);<NEW_LINE>}
) (scr_img_rect.width * scr_img_scale);
1,481,713
public boolean delConsumeCtrlConf(String operator, String groupName, String topicName, StringBuilder strBuff, ProcessResult result) {<NEW_LINE>Integer topicLockId = null;<NEW_LINE>Integer groupLockId = null;<NEW_LINE>GroupConsumeCtrlEntity curEntity;<NEW_LINE>String printPrefix = "[delConsumeCtrlConf], ";<NEW_LINE>// execute delete operation<NEW_LINE>try {<NEW_LINE>// lock topicName meta-lock<NEW_LINE>topicLockId = metaRowLock.getLock(null, StringUtils<MASK><NEW_LINE>try {<NEW_LINE>// lock groupName meta-lock<NEW_LINE>groupLockId = metaRowLock.getLock(null, StringUtils.getBytesUtf8(groupName), true);<NEW_LINE>// check consume control configure exist<NEW_LINE>curEntity = consumeCtrlMapper.getConsumeCtrlByGroupAndTopic(groupName, topicName);<NEW_LINE>if (curEntity == null) {<NEW_LINE>result.setSuccResult(null);<NEW_LINE>return result.isSuccess();<NEW_LINE>}<NEW_LINE>consumeCtrlMapper.delGroupConsumeCtrlConf(groupName, topicName, strBuff, result);<NEW_LINE>} finally {<NEW_LINE>if (groupLockId != null) {<NEW_LINE>metaRowLock.releaseRowLock(groupLockId);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} catch (Throwable e) {<NEW_LINE>return logExceptionInfo(e, printPrefix, strBuff, result);<NEW_LINE>} finally {<NEW_LINE>if (topicLockId != null) {<NEW_LINE>metaRowLock.releaseRowLock(topicLockId);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// print log to file<NEW_LINE>if (result.isSuccess()) {<NEW_LINE>strBuff.append(printPrefix).append(operator).append(" deleted consume control configure: ").append(curEntity);<NEW_LINE>logger.info(strBuff.toString());<NEW_LINE>strBuff.delete(0, strBuff.length());<NEW_LINE>}<NEW_LINE>return result.isSuccess();<NEW_LINE>}
.getBytesUtf8(topicName), true);
320,186
private List<QuestionConcept> retrieveArtificialConcepts(Request request) {<NEW_LINE>List<QuestionConcept> artificialConcepts = new ArrayList<>();<NEW_LINE>String numberOfArtificialConceptsS = request.queryParams("numberOfConcepts");<NEW_LINE>if (numberOfArtificialConceptsS == null)<NEW_LINE>return artificialConcepts;<NEW_LINE>int <MASK><NEW_LINE>for (int i = 1; i <= numberOfArtificialConcepts; i++) {<NEW_LINE>String fullLabel = request.queryParams("fullLabel" + i);<NEW_LINE>if (fullLabel == null || fullLabel.equals(""))<NEW_LINE>continue;<NEW_LINE>String pageIDS = request.queryParams("pageID" + i);<NEW_LINE>if (pageIDS == null || pageIDS.equals(""))<NEW_LINE>continue;<NEW_LINE>int pageID = Integer.parseInt(pageIDS);<NEW_LINE>artificialConcepts.add(new QuestionConcept(fullLabel, pageID));<NEW_LINE>}<NEW_LINE>return artificialConcepts;<NEW_LINE>}
numberOfArtificialConcepts = Integer.parseInt(numberOfArtificialConceptsS);