idx
int32
46
1.86M
input
stringlengths
321
6.6k
target
stringlengths
9
1.24k
1,299,420
public ResUnMarshalerT execute(ReqMarshalerT exportRequest, ResUnMarshalerT responseUnmarshaller) {<NEW_LINE>MarshalerServiceStub<ReqMarshalerT, ResUnMarshalerT, ?> stub = this.stub;<NEW_LINE>if (timeoutNanos > 0) {<NEW_LINE>stub = stub.withDeadlineAfter(timeoutNanos, TimeUnit.NANOSECONDS);<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>return Futures.getUnchecked(stub.export(exportRequest));<NEW_LINE>} catch (Throwable t) {<NEW_LINE>Status status = Status.fromThrowable(t);<NEW_LINE>if (status.getCode().equals(Status.Code.UNIMPLEMENTED)) {<NEW_LINE>logger.log(Level.SEVERE, "Failed to execute " + type + "s. Server responded with UNIMPLEMENTED. " + "Full error message: " + status.getDescription());<NEW_LINE>} else if (status.getCode().equals(Status.Code.UNAVAILABLE)) {<NEW_LINE>logger.log(Level.SEVERE, "Failed to execute " + type + "s. Server is UNAVAILABLE. " + "Make sure your service is running and reachable from this network. " + "Full error message:" + status.getDescription());<NEW_LINE>} else {<NEW_LINE>logger.log(Level.WARNING, "Failed to execute " + type + "s. Server responded with gRPC status code " + status.getCode().value() + <MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE>return responseUnmarshaller;<NEW_LINE>}
". Error message: " + status.getDescription());
992,831
public EndpointServerBuilder createEndpointServerBuilder() {<NEW_LINE>EndpointServerBuilder endpointServerBuilder = EndpointServerBuilder.endpointServerBuilder();<NEW_LINE>endpointServerBuilder.setEnableHealthEndpoint(isEnableLocalHealth());<NEW_LINE>endpointServerBuilder.setSystemManager(this.getSystemManager());<NEW_LINE>endpointServerBuilder.setHealthService(getHealthService());<NEW_LINE>endpointServerBuilder.setStatsFlushRateSeconds(getSampleStatFlushRate());<NEW_LINE>endpointServerBuilder.setCheckTimingEveryXCalls(getCheckTimingEveryXCalls());<NEW_LINE>endpointServerBuilder.setServiceDiscovery(getServiceDiscovery());<NEW_LINE>endpointServerBuilder.<MASK><NEW_LINE>configureEndpointServerBuilderForInterceptors(endpointServerBuilder);<NEW_LINE>if (isEnableStats()) {<NEW_LINE>endpointServerBuilder.setStatsCollector(getStatServiceBuilder().buildStatsCollectorWithAutoFlush());<NEW_LINE>}<NEW_LINE>if (isEnableLocalStats()) {<NEW_LINE>endpointServerBuilder.setEnableStatEndpoint(true);<NEW_LINE>endpointServerBuilder.setStatsCollection(getLocalStatsCollectorBuilder().build());<NEW_LINE>}<NEW_LINE>return endpointServerBuilder;<NEW_LINE>}
setEventManager(this.getEventManager());
1,511,669
public boolean isOnTop(RootPaneContainer rpc, Point screenLoc) {<NEW_LINE>logger.entering(getClass().getName(), "isOnTop");<NEW_LINE>int size = zOrder.size();<NEW_LINE>WeakReference<RootPaneContainer> curWeakW = null;<NEW_LINE>RootPaneContainer curRpc = null;<NEW_LINE>for (int i = size - 1; i >= 0; i--) {<NEW_LINE>curWeakW = zOrder.get(i);<NEW_LINE>if (curWeakW == null) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>curRpc = curWeakW.get();<NEW_LINE>// ignore excluded ones<NEW_LINE>if (getExcludedWeak(curRpc) != null) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>// return top one<NEW_LINE>if (curRpc == rpc) {<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>// safe cast, assured by checks in attachWindow method<NEW_LINE>Window curW = (Window) curRpc;<NEW_LINE><MASK><NEW_LINE>SwingUtilities.convertPointFromScreen(loc, curW);<NEW_LINE>if (curW.contains(loc)) {<NEW_LINE>// && !RepaintManager.currentManager(curComp).getDirtyRegion(curComp).contains(screenLoc)) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// take main window automatically as last window to check<NEW_LINE>if (rpc == WindowManager.getDefault().getMainWindow()) {<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>// not found<NEW_LINE>return false;<NEW_LINE>}
Point loc = new Point(screenLoc);
670,358
public void migrate(Schema schema, DatabaseSession databaseSession) {<NEW_LINE>EClass newServiceDescriptor = schema.createEClass("store", "NewServiceDescriptor");<NEW_LINE>schema.createEAttribute(newServiceDescriptor, "name", EcorePackage.eINSTANCE.getEString());<NEW_LINE>schema.createEAttribute(newServiceDescriptor, "description", EcorePackage.eINSTANCE.getEString());<NEW_LINE>schema.createEAttribute(newServiceDescriptor, "provider", EcorePackage.eINSTANCE.getEString());<NEW_LINE>schema.createEAttribute(newServiceDescriptor, "authorizationUrl", EcorePackage.eINSTANCE.getEString());<NEW_LINE>schema.createEAttribute(newServiceDescriptor, "tokenUrl", EcorePackage.eINSTANCE.getEString());<NEW_LINE>schema.createEAttribute(newServiceDescriptor, "resourceUrl", EcorePackage.eINSTANCE.getEString());<NEW_LINE>schema.createEAttribute(newServiceDescriptor, "registerUrl", EcorePackage.eINSTANCE.getEString());<NEW_LINE>schema.createEAttribute(newServiceDescriptor, "inputs", EcorePackage.eINSTANCE.getEString(), Multiplicity.MANY);<NEW_LINE>schema.createEAttribute(newServiceDescriptor, "outputs", EcorePackage.eINSTANCE.getEString(), Multiplicity.MANY);<NEW_LINE>EClass formatSerializerMap = schema.createEClass("store", "FormatSerializerMap");<NEW_LINE>schema.createEAttribute(formatSerializerMap, "format", EcorePackage.eINSTANCE.getEString());<NEW_LINE>schema.createEReference(formatSerializerMap, "serializers", schema.getEClass("store", "SerializerPluginConfiguration"), Multiplicity.MANY).getEAnnotations().add(createEmbedsReferenceAnnotation());<NEW_LINE>EClass actionClass = schema.createEClass("store", "Action");<NEW_LINE>schema.createEClass("store", "StoreExtendedData", actionClass);<NEW_LINE>EClass checkinRevisionClass = schema.createEClass("store", "CheckinRevision", actionClass);<NEW_LINE>EClass projectClass = schema.getEClass("store", "Project");<NEW_LINE>schema.createEReference(checkinRevisionClass, "project", projectClass);<NEW_LINE>EEnum serviceStatus = schema.createEEnum("store", "ServiceStatus");<NEW_LINE>schema.createEEnumLiteral(serviceStatus, "NEW");<NEW_LINE>schema.createEEnumLiteral(serviceStatus, "AUTHENTICATED");<NEW_LINE>EClass newServiceClass = schema.createEClass("store", "NewService");<NEW_LINE>schema.createEAttribute(newServiceClass, "name", EcorePackage.eINSTANCE.getEString());<NEW_LINE>schema.createEAttribute(newServiceClass, "provider", EcorePackage.eINSTANCE.getEString());<NEW_LINE>schema.createEAttribute(newServiceClass, "description", EcorePackage.eINSTANCE.getEString());<NEW_LINE>schema.createEAttribute(newServiceClass, "authorizationUrl", EcorePackage.eINSTANCE.getEString());<NEW_LINE>schema.createEAttribute(newServiceClass, "tokenUrl", EcorePackage.eINSTANCE.getEString());<NEW_LINE>schema.createEAttribute(newServiceClass, "resourceUrl", EcorePackage.eINSTANCE.getEString());<NEW_LINE>schema.createEAttribute(newServiceClass, "registerUrl", <MASK><NEW_LINE>schema.createEAttribute(newServiceClass, "input", EcorePackage.eINSTANCE.getEString());<NEW_LINE>schema.createEAttribute(newServiceClass, "oauthCode", EcorePackage.eINSTANCE.getEString());<NEW_LINE>schema.createEAttribute(newServiceClass, "status", serviceStatus);<NEW_LINE>schema.createEReference(newServiceClass, "serializer", schema.getEClass("store", "SerializerPluginConfiguration"));<NEW_LINE>schema.createEAttribute(newServiceClass, "output", EcorePackage.eINSTANCE.getEString());<NEW_LINE>EReference actionReference = schema.createEReference(newServiceClass, "action", actionClass);<NEW_LINE>actionReference.getEAnnotations().add(createEmbedsReferenceAnnotation());<NEW_LINE>schema.createEAttribute(newServiceClass, "accessToken", EcorePackage.eINSTANCE.getEString());<NEW_LINE>schema.createEReference(newServiceClass, "project", projectClass);<NEW_LINE>schema.createEReference(projectClass, "newServices", newServiceClass, Multiplicity.MANY);<NEW_LINE>schema.createEReference(schema.getEClass("store", "Revision"), "servicesLinked", newServiceClass, Multiplicity.MANY);<NEW_LINE>}
EcorePackage.eINSTANCE.getEString());
1,608,052
public JsonNode normalizeData(final EventNode event, final long timestamp, final long slot, final List<String> fillIds) {<NEW_LINE>final String side = event.eventFlags.bid ? "buy" : "sell";<NEW_LINE>if (event.eventFlags.fill) {<NEW_LINE>final ObjectNode fill = JsonNodeFactory.instance.objectNode();<NEW_LINE>fill.put("type", "fill");<NEW_LINE>fill.put("symbol", symbol);<NEW_LINE>fill.put("market", this.market.decoded.getOwnAddress().getKeyString());<NEW_LINE>fill.put("timestamp", timestamp);<NEW_LINE>fill.put("slot", slot);<NEW_LINE>fill.put("orderId", event.orderId);<NEW_LINE>fill.put("clientId", event.clientOrderId);<NEW_LINE>fill.put("side", side);<NEW_LINE>fill.put("price", getFillPrice(event, priceDecimalPlaces).toPlainString());<NEW_LINE>fill.put("size", getFillSize(event, sizeDecimalPlaces).toPlainString());<NEW_LINE>fill.put("maker", event.eventFlags.maker);<NEW_LINE>fill.put("feeCost", this.market.quoteSplTokenMultiplier().toPlainString());<NEW_LINE>fill.put("openOrders", event.openOrders.getKeyString());<NEW_LINE>fill.put("openOrdersSlot", event.openOrdersSlot);<NEW_LINE>fill.put("feeTier", event.feeTier);<NEW_LINE>return fill;<NEW_LINE>} else if (Double.compare(event.nativeQuantityPaid, 0.0) == 0) {<NEW_LINE>// we can use nativeQuantityStillLocked == 0 to detect if order is 'done'<NEW_LINE>// this is what the dex uses at event processing time to decide if it can<NEW_LINE>// release the slot in an OpenOrders account.<NEW_LINE>//<NEW_LINE>// done means that there won't be any more messages for the order<NEW_LINE>// (is no longer in the order book or never was - cancelled, ioc)<NEW_LINE>final ObjectNode done = JsonNodeFactory.instance.objectNode();<NEW_LINE>done.put("type", "done");<NEW_LINE>done.put("symbol", symbol);<NEW_LINE>done.put("market", this.market.decoded.getOwnAddress().getKeyString());<NEW_LINE>done.put("timestamp", timestamp);<NEW_LINE>done.put("slot", slot);<NEW_LINE>done.put("orderId", event.orderId);<NEW_LINE>done.put("clientId", event.clientOrderId);<NEW_LINE>done.put("side", side);<NEW_LINE>done.put("reason", fillIds.contains(event.orderId) ? "filled" : "cancelled");<NEW_LINE>done.put(<MASK><NEW_LINE>done.put("openOrders", event.openOrders.getKeyString());<NEW_LINE>done.put("openOrdersSlot", event.openOrdersSlot);<NEW_LINE>done.put("feeTier", event.feeTier);<NEW_LINE>return done;<NEW_LINE>}<NEW_LINE>return null;<NEW_LINE>}
"maker", event.eventFlags.maker);
1,172,317
private void populate(Map<Map<Property<?>, Object>, BlockState> stateMap) {<NEW_LINE>final ImmutableTable.Builder<Property<?>, Object, BlockState> states = ImmutableTable.builder();<NEW_LINE>for (final Map.Entry<Property<?>, Object> entry : this.values.entrySet()) {<NEW_LINE>final Property<Object> property = (Property<<MASK><NEW_LINE>for (Object value : property.getValues()) {<NEW_LINE>if (value != entry.getValue()) {<NEW_LINE>BlockState modifiedState = stateMap.get(this.withValue(property, value));<NEW_LINE>if (modifiedState != null) {<NEW_LINE>states.put(property, value, modifiedState);<NEW_LINE>} else {<NEW_LINE>System.out.println(stateMap);<NEW_LINE>WorldEdit.logger.warn("Found a null state at " + this.withValue(property, value));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>this.states = states.build();<NEW_LINE>}
Object>) entry.getKey();
1,245,742
private void handleLockFree(RequestHeader header, ByteBuf in, ChannelHandlerContext ctx) {<NEW_LINE>MatrixPartition mp = new MatrixPartition(header.matrixId, header.partId);<NEW_LINE>// Get and init the queue<NEW_LINE>ChannelHandlerContextMsg task = new <MASK><NEW_LINE>PartitionHandler handler = lockFreeHandlers.get(mp);<NEW_LINE>if (handler == null) {<NEW_LINE>synchronized (this) {<NEW_LINE>handler = lockFreeHandlers.get(mp);<NEW_LINE>if (handler == null) {<NEW_LINE>handler = new PartitionHandler(mp);<NEW_LINE>handler.setName("Partition-Hanlder-" + mp);<NEW_LINE>handler.start();<NEW_LINE>lockFreeHandlers.put(mp, handler);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>handler.add(task);<NEW_LINE>} catch (Throwable e) {<NEW_LINE>LOG.error("Add task to Partition handler for " + mp + " failed ", e);<NEW_LINE>throw new RuntimeException("Add task to Partition handler for " + mp + " failed " + StringUtils.stringifyException(e));<NEW_LINE>}<NEW_LINE>}
ChannelHandlerContextMsg(header, in, ctx);
16,151
private Object initSchemafullCollections(OResultInternal doc, String propName) {<NEW_LINE>OClass oClass = doc.getElement().flatMap(x -> x.getSchemaType()).orElse(null);<NEW_LINE>if (oClass == null) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>OProperty prop = oClass.getProperty(propName);<NEW_LINE>if (prop == null) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>Object result = null;<NEW_LINE>if (prop.getType() == OType.EMBEDDEDMAP || prop.getType() == OType.LINKMAP) {<NEW_LINE>result = new HashMap<>();<NEW_LINE>doc.setProperty(propName, result);<NEW_LINE>} else if (prop.getType() == OType.EMBEDDEDLIST || prop.getType() == OType.LINKLIST) {<NEW_LINE><MASK><NEW_LINE>doc.setProperty(propName, result);<NEW_LINE>} else if (prop.getType() == OType.EMBEDDEDSET || prop.getType() == OType.LINKSET) {<NEW_LINE>result = new HashSet<>();<NEW_LINE>doc.setProperty(propName, result);<NEW_LINE>}<NEW_LINE>return result;<NEW_LINE>}
result = new ArrayList<>();
327,202
public void run() {<NEW_LINE>sessionComboBox.removeActionListener(sessionsComboListener);<NEW_LINE>sessionComboBox.removePopupMenuListener(sessionsComboListener);<NEW_LINE>ComboBoxModel model = sessionComboBox.getModel();<NEW_LINE>sessionComboBox.removeAllItems();<NEW_LINE>DebuggerManager dm = DebuggerManager.getDebuggerManager();<NEW_LINE>Session[] sessions = dm.getSessions();<NEW_LINE>for (int x = 0; x < sessions.length; x++) {<NEW_LINE>if (isDebuggingSession(sessions[x])) {<NEW_LINE>sessionComboBox.addItem(new SessionItem(sessions[x]));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (model.getSize() == 0) {<NEW_LINE>sessionComboBox.addItem(new SessionItem(null));<NEW_LINE>}<NEW_LINE>sessionComboBox.setSelectedItem(new SessionItem<MASK><NEW_LINE>sessionComboBox.setVisible(model.getSize() > 1);<NEW_LINE>sessionComboBox.addActionListener(sessionsComboListener);<NEW_LINE>sessionComboBox.addPopupMenuListener(sessionsComboListener);<NEW_LINE>}
(dm.getCurrentSession()));
1,129,627
public void onStart() throws Exception {<NEW_LINE>super.onStart();<NEW_LINE>KeycloakDemoSetup keycloakDemoSetup = setupService.getTaskOfType(KeycloakDemoSetup.class);<NEW_LINE>Tenant masterTenant = keycloakDemoSetup.masterTenant;<NEW_LINE>masterRealm = masterTenant.getRealm();<NEW_LINE>if (knx) {<NEW_LINE>LOG.info(<MASK><NEW_LINE>KNXAgent agent = new KNXAgent("Demo KNX agent").setRealm(masterRealm).setHost(knxGatewayIp).setBindHost(knxLocalIp);<NEW_LINE>agent = assetStorageService.merge(agent);<NEW_LINE>}<NEW_LINE>if (velbus) {<NEW_LINE>LOG.info("Enable Velbus demo agent, host/port: " + velbusHost + "/" + velbusPort);<NEW_LINE>VelbusTCPAgent agent = new VelbusTCPAgent("Demo VELBUS agent").setRealm(masterRealm).setHost(velbusHost).setPort(velbusPort);<NEW_LINE>agent = assetStorageService.merge(agent);<NEW_LINE>}<NEW_LINE>}
"Enable KNX demo agent, gateway/local IP: " + knxGatewayIp + "/" + knxLocalIp);
780,702
public Prediction<Label> combine(ImmutableOutputInfo<Label> outputInfo, List<Prediction<Label>> predictions, float[] weights) {<NEW_LINE>if (predictions.size() != weights.length) {<NEW_LINE>throw new IllegalArgumentException("predictions and weights must be the same length. predictions.size()=" + predictions.size() + ", weights.length=" + weights.length);<NEW_LINE>}<NEW_LINE>int numUsed = 0;<NEW_LINE>double sum = 0.0;<NEW_LINE>double[] score = new double[outputInfo.size()];<NEW_LINE>for (int i = 0; i < weights.length; i++) {<NEW_LINE>Prediction<Label> p = predictions.get(i);<NEW_LINE>if (numUsed < p.getNumActiveFeatures()) {<NEW_LINE>numUsed = p.getNumActiveFeatures();<NEW_LINE>}<NEW_LINE>score[outputInfo.getID(p.getOutput())] += weights[i];<NEW_LINE>sum += weights[i];<NEW_LINE>}<NEW_LINE>double maxScore = Double.NEGATIVE_INFINITY;<NEW_LINE>Label maxLabel = null;<NEW_LINE>Map<String, Label> predictionMap = new LinkedHashMap<>();<NEW_LINE>for (int i = 0; i < score.length; i++) {<NEW_LINE>String name = outputInfo.getOutput(i).getLabel();<NEW_LINE>Label label = new Label(name, score[i] / sum);<NEW_LINE>predictionMap.put(name, label);<NEW_LINE>if (label.getScore() > maxScore) {<NEW_LINE>maxScore = label.getScore();<NEW_LINE>maxLabel = label;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>Example<Label> example = predictions.<MASK><NEW_LINE>return new Prediction<>(maxLabel, predictionMap, numUsed, example, true);<NEW_LINE>}
get(0).getExample();
1,556,436
public void touchMove(final CustomTouchEvent event) {<NEW_LINE>if (touching) {<NEW_LINE>if (!movedSignificantly) {<NEW_LINE>double distanceSquared = Math.abs(xMov.delta) * Math.abs(xMov.delta) + Math.abs(yMov.delta) * Math.abs(yMov.delta);<NEW_LINE>movedSignificantly = distanceSquared > SIGNIFICANT_MOVE_THRESHOLD * SIGNIFICANT_MOVE_THRESHOLD;<NEW_LINE>}<NEW_LINE>// allow handling long press differently, without triggering<NEW_LINE>// scrolling<NEW_LINE>if (escalator.getDelayToCancelTouchScroll() >= 0 && !movedSignificantly && Duration.currentTimeMillis() - touchStartTime > escalator.getDelayToCancelTouchScroll()) {<NEW_LINE>// cancel touch handling, don't prevent event<NEW_LINE>touching = false;<NEW_LINE>animation.cancel();<NEW_LINE>acceleration = 1;<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>xMov.moveTouch(event);<NEW_LINE>yMov.moveTouch(event);<NEW_LINE>xMov.validate(yMov);<NEW_LINE>yMov.validate(xMov);<NEW_LINE>moveScrollFromEvent(escalator, xMov.delta, yMov.<MASK><NEW_LINE>}<NEW_LINE>}
delta, event.getNativeEvent());
815,663
public BooleanResponse verifyTypeDef(String serverName, String userId, TypeDef typeDef) {<NEW_LINE>final String methodName = "verifyTypeDef";<NEW_LINE>log.debug("Calling method: " + methodName);<NEW_LINE>BooleanResponse response = new BooleanResponse();<NEW_LINE>try {<NEW_LINE>OMRSMetadataCollection metadataCollection = validateRepository(userId, serverName, methodName);<NEW_LINE>response.setFlag(metadataCollection.verifyTypeDef(userId, typeDef));<NEW_LINE>} catch (RepositoryErrorException error) {<NEW_LINE>captureRepositoryErrorException(response, error);<NEW_LINE>} catch (UserNotAuthorizedException error) {<NEW_LINE>captureUserNotAuthorizedException(response, error);<NEW_LINE>} catch (InvalidParameterException error) {<NEW_LINE>captureInvalidParameterException(response, error);<NEW_LINE>} catch (TypeDefNotSupportedException error) {<NEW_LINE>captureTypeDefNotSupportedException(response, error);<NEW_LINE>} catch (TypeDefConflictException error) {<NEW_LINE>captureTypeDefConflictException(response, error);<NEW_LINE>} catch (InvalidTypeDefException error) {<NEW_LINE>captureInvalidTypeDefException(response, error);<NEW_LINE>} catch (Exception error) {<NEW_LINE>captureGenericException(response, <MASK><NEW_LINE>}<NEW_LINE>log.debug("Returning from method: " + methodName + " with response: " + response.toString());<NEW_LINE>return response;<NEW_LINE>}
error, userId, serverName, methodName);
632,384
public UriBuilder schemeSpecificPart(String ssp) throws IllegalArgumentException {<NEW_LINE>if (ssp == null)<NEW_LINE>throw new IllegalArgumentException("Scheme was null");<NEW_LINE>StringBuilder sb = new StringBuilder();<NEW_LINE>if (scheme != null)<NEW_LINE>sb.append<MASK><NEW_LINE>if (ssp != null)<NEW_LINE>sb.append(ssp);<NEW_LINE>if (fragment != null && fragment.length() > 0)<NEW_LINE>sb.append('#').append(fragment);<NEW_LINE>URI uri = URI.create(sb.toString());<NEW_LINE>if (uri.getRawSchemeSpecificPart() != null && uri.getRawPath() == null) {<NEW_LINE>this.ssp = uri.getRawSchemeSpecificPart();<NEW_LINE>} else {<NEW_LINE>this.ssp = null;<NEW_LINE>userInfo = uri.getRawUserInfo();<NEW_LINE>host = uri.getHost();<NEW_LINE>port = uri.getPort();<NEW_LINE>path = uri.getRawPath();<NEW_LINE>query = uri.getRawQuery();<NEW_LINE>}<NEW_LINE>return this;<NEW_LINE>}
(scheme).append(':');
1,483,936
public void wizardRealTime(List<SourceElement> sourceData, File csvFile, int backwardWindow, int forwardWindow, PredictionType prediction, String predictField) {<NEW_LINE>this.preprocess = true;<NEW_LINE>this.script.setBasePath(csvFile.getParent());<NEW_LINE>this.script.getProperties().setProperty(ScriptProperties.HEADER_DATASOURCE_SOURCE_HEADERS, true);<NEW_LINE>this.script.getProperties().setProperty(ScriptProperties.HEADER_DATASOURCE_RAW_FILE, csvFile);<NEW_LINE>this.script.getProperties().setProperty(ScriptProperties.SETUP_CONFIG_INPUT_HEADERS, true);<NEW_LINE>this.lagWindowSize = backwardWindow;<NEW_LINE>this.leadWindowSize = 1;<NEW_LINE>this.timeSeries = true;<NEW_LINE>this.format = AnalystFileFormat.DECPNT_COMMA;<NEW_LINE>this.methodType = WizardMethodType.FeedForward;<NEW_LINE>this.includeTargetField = false;<NEW_LINE>this.targetFieldName = "prediction";<NEW_LINE>setMissing(new DiscardMissing());<NEW_LINE>setGoal(AnalystGoal.Regression);<NEW_LINE>setRange(NormalizeRange.NegOne2One);<NEW_LINE>setTaskNormalize(true);<NEW_LINE>setTaskRandomize(false);<NEW_LINE>setTaskSegregate(true);<NEW_LINE>setTaskBalance(false);<NEW_LINE>setTaskCluster(false);<NEW_LINE>setMaxError(0.05);<NEW_LINE>setCodeEmbedData(true);<NEW_LINE>determineClassification();<NEW_LINE>generateFilenames(csvFile);<NEW_LINE>generateSettings();<NEW_LINE>generateSourceData(sourceData);<NEW_LINE>generateNormalizedFields();<NEW_LINE>// if there is a time field, then ignore it<NEW_LINE>AnalystField timeField = this.script.findAnalystField("time");<NEW_LINE>if (timeField != null) {<NEW_LINE>timeField.setAction(NormalizationAction.Ignore);<NEW_LINE>}<NEW_LINE>generateSegregate();<NEW_LINE>generateGenerate();<NEW_LINE>generateProcess(backwardWindow, forwardWindow, prediction, predictField);<NEW_LINE>generateCode();<NEW_LINE>// override raw_file to be the processed file<NEW_LINE>this.script.getProperties().setProperty(<MASK><NEW_LINE>generateTasks();<NEW_LINE>if (this.timeSeries && (this.lagWindowSize > 0) && (this.leadWindowSize > 0)) {<NEW_LINE>expandTimeSlices();<NEW_LINE>}<NEW_LINE>}
ScriptProperties.HEADER_DATASOURCE_RAW_FILE, AnalystWizard.FILE_PRE);
773,308
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(<MASK><NEW_LINE>request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SERVICE_ID, "KMS");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "TagResource");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<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>}
HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
1,701,258
private SootMethod createUnresolvedErrorMethod(SootClass declaringClass) {<NEW_LINE>final Jimple jimp = Jimple.v();<NEW_LINE>SootMethod m = Scene.v().makeSootMethod(name, parameterTypes, returnType, isStatic() ? Modifier.STATIC : 0);<NEW_LINE>// we don't know who will be calling us<NEW_LINE>int modifiers = Modifier.PUBLIC;<NEW_LINE>if (isStatic()) {<NEW_LINE>modifiers |= Modifier.STATIC;<NEW_LINE>}<NEW_LINE>m.setModifiers(modifiers);<NEW_LINE>JimpleBody body = jimp.newBody(m);<NEW_LINE>m.setActiveBody(body);<NEW_LINE>final LocalGenerator lg = Scene.v().createLocalGenerator(body);<NEW_LINE>// For producing valid Jimple code, we need to access all parameters.<NEW_LINE>// Otherwise, methods like "getThisLocal()" will fail.<NEW_LINE>body.insertIdentityStmts(declaringClass);<NEW_LINE>// exc = new Error<NEW_LINE>RefType runtimeExceptionType = RefType.v("java.lang.Error");<NEW_LINE>Local exceptionLocal = lg.generateLocal(runtimeExceptionType);<NEW_LINE>AssignStmt assignStmt = jimp.newAssignStmt(exceptionLocal, jimp.newNewExpr(runtimeExceptionType));<NEW_LINE>body.getUnits().add(assignStmt);<NEW_LINE>// exc.<init>(message)<NEW_LINE>SootMethodRef cref = Scene.v().makeConstructorRef(runtimeExceptionType.getSootClass(), Collections.<Type>singletonList(RefType.v("java.lang.String")));<NEW_LINE>SpecialInvokeExpr constructorInvokeExpr = jimp.newSpecialInvokeExpr(exceptionLocal, cref, StringConstant.v("Unresolved compilation error: Method " + getSignature() + " does not exist!"));<NEW_LINE>InvokeStmt <MASK><NEW_LINE>body.getUnits().insertAfter(initStmt, assignStmt);<NEW_LINE>// throw exc<NEW_LINE>body.getUnits().insertAfter(jimp.newThrowStmt(exceptionLocal), initStmt);<NEW_LINE>return declaringClass.getOrAddMethod(m);<NEW_LINE>}
initStmt = jimp.newInvokeStmt(constructorInvokeExpr);
1,244,285
private static void dumpCallStack(@Nonnull ThreadInfo info, @Nonnull Writer f, @Nonnull StackTraceElement[] stackTraceElements) {<NEW_LINE>try {<NEW_LINE>@NonNls<NEW_LINE>StringBuilder sb = new StringBuilder("\"").append(info.getThreadName()).append("\"");<NEW_LINE>sb.append(" prio=0 tid=0x0 nid=0x0 ").append(getReadableState(info.getThreadState())).append("\n");<NEW_LINE>sb.append(" java.lang.Thread.State: ").append(info.getThreadState<MASK><NEW_LINE>if (info.getLockName() != null) {<NEW_LINE>sb.append(" on ").append(info.getLockName());<NEW_LINE>}<NEW_LINE>if (info.getLockOwnerName() != null) {<NEW_LINE>sb.append(" owned by \"").append(info.getLockOwnerName()).append("\" Id=").append(info.getLockOwnerId());<NEW_LINE>}<NEW_LINE>if (info.isSuspended()) {<NEW_LINE>sb.append(" (suspended)");<NEW_LINE>}<NEW_LINE>if (info.isInNative()) {<NEW_LINE>sb.append(" (in native)");<NEW_LINE>}<NEW_LINE>f.write(sb + "\n");<NEW_LINE>printStackTrace(f, stackTraceElements);<NEW_LINE>f.write("\n");<NEW_LINE>} catch (IOException e) {<NEW_LINE>throw new RuntimeException(e);<NEW_LINE>}<NEW_LINE>}
()).append("\n");
1,026,662
// Create a binary tree by taking input level wise<NEW_LINE>public static Node createBinaryTree() {<NEW_LINE>Scanner sc <MASK><NEW_LINE>System.out.print("Enter root node value or -1 to exit: ");<NEW_LINE>int rootData = sc.nextInt();<NEW_LINE>Node root = null;<NEW_LINE>if (rootData != -1) {<NEW_LINE>root = new Node(rootData);<NEW_LINE>} else {<NEW_LINE>sc.close();<NEW_LINE>return root;<NEW_LINE>}<NEW_LINE>Queue<Node> tree = new LinkedList<>();<NEW_LINE>tree.add(root);<NEW_LINE>while (!tree.isEmpty()) {<NEW_LINE>Node temp = tree.remove();<NEW_LINE>System.out.print("Enter left child of " + temp.data + " or -1 if there is no left child: ");<NEW_LINE>int leftChild = sc.nextInt();<NEW_LINE>// if leftChild is not null create and add left child node<NEW_LINE>if (leftChild != -1) {<NEW_LINE>Node child = new Node(leftChild);<NEW_LINE>tree.add(child);<NEW_LINE>temp.left = child;<NEW_LINE>}<NEW_LINE>System.out.print("Enter right child of " + temp.data + " or -1 if there is no right child: ");<NEW_LINE>int rightChild = sc.nextInt();<NEW_LINE>// if rightChild is not null create and add right child node<NEW_LINE>if (rightChild != -1) {<NEW_LINE>Node child = new Node(rightChild);<NEW_LINE>tree.add(child);<NEW_LINE>temp.right = child;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>sc.close();<NEW_LINE>return root;<NEW_LINE>}
= new Scanner(System.in);
422,029
public boolean visit(SQLDataType x) {<NEW_LINE>printDataType(x);<NEW_LINE>if (x instanceof SQLDataTypeImpl) {<NEW_LINE>SQLDataTypeImpl dataTypeImpl = (SQLDataTypeImpl) x;<NEW_LINE>if (dataTypeImpl.isUnsigned()) {<NEW_LINE>print0(ucase ? " UNSIGNED" : " unsigned");<NEW_LINE>}<NEW_LINE>if (dataTypeImpl.isZerofill()) {<NEW_LINE>print0(ucase ? " ZEROFILL" : " zerofill");<NEW_LINE>}<NEW_LINE>SQLExpr indexBy = ((SQLDataTypeImpl) x).getIndexBy();<NEW_LINE>if (indexBy != null) {<NEW_LINE>print0(ucase ? " INDEX BY " : " index by ");<NEW_LINE>indexBy.accept(this);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (x instanceof SQLCharacterDataType) {<NEW_LINE>SQLCharacterDataType charType = (SQLCharacterDataType) x;<NEW_LINE>if (charType.getCharSetName() != null) {<NEW_LINE>print0(ucase ? " CHARACTER SET " : " character set ");<NEW_LINE><MASK><NEW_LINE>if (charType.getCollate() != null) {<NEW_LINE>print0(ucase ? " COLLATE " : " collate ");<NEW_LINE>print0(charType.getCollate());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>List<SQLCommentHint> hints = ((SQLCharacterDataType) x).hints;<NEW_LINE>if (hints != null) {<NEW_LINE>print(' ');<NEW_LINE>for (SQLCommentHint hint : hints) {<NEW_LINE>hint.accept(this);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return false;<NEW_LINE>}
print0(charType.getCharSetName());
300,467
public static DescribeUserUsageDataExportTaskResponse unmarshall(DescribeUserUsageDataExportTaskResponse describeUserUsageDataExportTaskResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeUserUsageDataExportTaskResponse.setRequestId(_ctx.stringValue("DescribeUserUsageDataExportTaskResponse.RequestId"));<NEW_LINE>UsageDataPerPage usageDataPerPage = new UsageDataPerPage();<NEW_LINE>usageDataPerPage.setTotalCount(_ctx.integerValue("DescribeUserUsageDataExportTaskResponse.UsageDataPerPage.TotalCount"));<NEW_LINE>usageDataPerPage.setPageSize(_ctx.integerValue("DescribeUserUsageDataExportTaskResponse.UsageDataPerPage.PageSize"));<NEW_LINE>usageDataPerPage.setPageNumber<MASK><NEW_LINE>List<DataItem> data = new ArrayList<DataItem>();<NEW_LINE>for (int i = 0; i < _ctx.lengthValue("DescribeUserUsageDataExportTaskResponse.UsageDataPerPage.Data.Length"); i++) {<NEW_LINE>DataItem dataItem = new DataItem();<NEW_LINE>dataItem.setTaskName(_ctx.stringValue("DescribeUserUsageDataExportTaskResponse.UsageDataPerPage.Data[" + i + "].TaskName"));<NEW_LINE>dataItem.setTaskId(_ctx.stringValue("DescribeUserUsageDataExportTaskResponse.UsageDataPerPage.Data[" + i + "].TaskId"));<NEW_LINE>dataItem.setCreateTime(_ctx.stringValue("DescribeUserUsageDataExportTaskResponse.UsageDataPerPage.Data[" + i + "].CreateTime"));<NEW_LINE>dataItem.setUpdateTime(_ctx.stringValue("DescribeUserUsageDataExportTaskResponse.UsageDataPerPage.Data[" + i + "].UpdateTime"));<NEW_LINE>dataItem.setStatus(_ctx.stringValue("DescribeUserUsageDataExportTaskResponse.UsageDataPerPage.Data[" + i + "].Status"));<NEW_LINE>dataItem.setDownloadUrl(_ctx.stringValue("DescribeUserUsageDataExportTaskResponse.UsageDataPerPage.Data[" + i + "].DownloadUrl"));<NEW_LINE>TaskConfig taskConfig = new TaskConfig();<NEW_LINE>taskConfig.setStartTime(_ctx.stringValue("DescribeUserUsageDataExportTaskResponse.UsageDataPerPage.Data[" + i + "].TaskConfig.StartTime"));<NEW_LINE>taskConfig.setEndTime(_ctx.stringValue("DescribeUserUsageDataExportTaskResponse.UsageDataPerPage.Data[" + i + "].TaskConfig.EndTime"));<NEW_LINE>dataItem.setTaskConfig(taskConfig);<NEW_LINE>data.add(dataItem);<NEW_LINE>}<NEW_LINE>usageDataPerPage.setData(data);<NEW_LINE>describeUserUsageDataExportTaskResponse.setUsageDataPerPage(usageDataPerPage);<NEW_LINE>return describeUserUsageDataExportTaskResponse;<NEW_LINE>}
(_ctx.integerValue("DescribeUserUsageDataExportTaskResponse.UsageDataPerPage.PageNumber"));
1,316,543
public AssignTapePoolResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>AssignTapePoolResult assignTapePoolResult = new AssignTapePoolResult();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE><MASK><NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>JsonToken token = context.getCurrentToken();<NEW_LINE>if (token == null)<NEW_LINE>token = context.nextToken();<NEW_LINE>if (token == VALUE_NULL) {<NEW_LINE>return assignTapePoolResult;<NEW_LINE>}<NEW_LINE>while (true) {<NEW_LINE>if (token == null)<NEW_LINE>break;<NEW_LINE>if (token == FIELD_NAME || token == START_OBJECT) {<NEW_LINE>if (context.testExpression("TapeARN", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>assignTapePoolResult.setTapeARN(context.getUnmarshaller(String.class).unmarshall(context));<NEW_LINE>}<NEW_LINE>} else if (token == END_ARRAY || token == END_OBJECT) {<NEW_LINE>if (context.getLastParsedParentElement() == null || context.getLastParsedParentElement().equals(currentParentElement)) {<NEW_LINE>if (context.getCurrentDepth() <= originalDepth)<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>token = context.nextToken();<NEW_LINE>}<NEW_LINE>return assignTapePoolResult;<NEW_LINE>}
String currentParentElement = context.getCurrentParentElement();
880,831
public void drawTooltip(PoseStack matrices, int mouseX, int mouseY) {<NEW_LINE>// Liquids<NEW_LINE>int checkX = mouseX - parent.leftPos;<NEW_LINE>int checkY = mouseY - parent.topPos;<NEW_LINE>if (withinTank(checkX, checkY)) {<NEW_LINE>int hovered = tank.getContained() == 0 ? -1 : getFluidFromMouse<MASK><NEW_LINE>List<Component> tooltip;<NEW_LINE>if (hovered == -1) {<NEW_LINE>BiConsumer<Integer, List<Component>> formatter = Screen.hasShiftDown() ? FluidTooltipHandler::appendBuckets : FluidTooltipHandler::appendIngots;<NEW_LINE>tooltip = new ArrayList<>();<NEW_LINE>tooltip.add(new TranslatableComponent(TOOLTIP_CAPACITY));<NEW_LINE>formatter.accept(tank.getCapacity(), tooltip);<NEW_LINE>int remaining = tank.getRemainingSpace();<NEW_LINE>if (remaining > 0) {<NEW_LINE>tooltip.add(new TranslatableComponent(TOOLTIP_AVAILABLE));<NEW_LINE>formatter.accept(remaining, tooltip);<NEW_LINE>}<NEW_LINE>int used = tank.getContained();<NEW_LINE>if (used > 0) {<NEW_LINE>tooltip.add(new TranslatableComponent(TOOLTIP_USED));<NEW_LINE>formatter.accept(used, tooltip);<NEW_LINE>}<NEW_LINE>FluidTooltipHandler.appendShift(tooltip);<NEW_LINE>} else {<NEW_LINE>tooltip = FluidTooltipHandler.getFluidTooltip(tank.getFluidInTank(hovered));<NEW_LINE>}<NEW_LINE>parent.renderComponentTooltip(matrices, tooltip, mouseX, mouseY);<NEW_LINE>}<NEW_LINE>}
(calcLiquidHeights(false), checkY);
426,840
private void createInterestingFileHit(AbstractFile file, FileType fileType) {<NEW_LINE>List<BlackboardAttribute> attributes = Arrays.asList(new BlackboardAttribute(TSK_SET_NAME, FileTypeIdModuleFactory.getModuleName(), fileType.getInterestingFilesSetName()), new BlackboardAttribute(TSK_CATEGORY, FileTypeIdModuleFactory.getModuleName(), fileType.getMimeType()));<NEW_LINE>try {<NEW_LINE>Case currentCase = Case.getCurrentCaseThrows();<NEW_LINE>Blackboard tskBlackboard = currentCase<MASK><NEW_LINE>// Create artifact if it doesn't already exist.<NEW_LINE>if (!tskBlackboard.artifactExists(file, BlackboardArtifact.Type.TSK_INTERESTING_ITEM, attributes)) {<NEW_LINE>BlackboardArtifact artifact = file.newAnalysisResult(BlackboardArtifact.Type.TSK_INTERESTING_ITEM, Score.SCORE_LIKELY_NOTABLE, null, fileType.getInterestingFilesSetName(), null, attributes).getAnalysisResult();<NEW_LINE>try {<NEW_LINE>tskBlackboard.postArtifact(artifact, FileTypeIdModuleFactory.getModuleName(), jobId);<NEW_LINE>} catch (Blackboard.BlackboardException ex) {<NEW_LINE>// NON-NLS<NEW_LINE>logger.log(Level.SEVERE, String.format("Unable to index TSK_INTERESTING_ITEM blackboard artifact %d (file obj_id=%d)", artifact.getArtifactID(), file.getId()), ex);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} catch (TskCoreException ex) {<NEW_LINE>// NON-NLS<NEW_LINE>logger.log(Level.SEVERE, String.format("Unable to create TSK_INTERESTING_ITEM artifact for file (obj_id=%d)", file.getId()), ex);<NEW_LINE>} catch (NoCurrentCaseException ex) {<NEW_LINE>// NON-NLS<NEW_LINE>logger.log(Level.SEVERE, "Exception while getting open case.", ex);<NEW_LINE>}<NEW_LINE>}
.getSleuthkitCase().getBlackboard();
1,805,089
private static void updateFilters(String filterString) {<NEW_LINE>excludeFilterString = filterString;<NEW_LINE>// Build up the list of filters in a local list, then convert that to an array<NEW_LINE>// and assign to the static reference. This is done to avoid creating an iterator<NEW_LINE>// in the main path in `process`.<NEW_LINE>List<SpanFilter> filters = new ArrayList<SpanFilter>();<NEW_LINE>// Pre-defined exclude filters for MicroProfile endpoints<NEW_LINE>processFilters(filters, MP_METRICS_ENDPOINT, "excludeSpans", ExcludeFilter.class);<NEW_LINE>processFilters(filters, MP_METRICS_BASE_ENDPOINT, "excludeSpans", ExcludeFilter.class);<NEW_LINE>processFilters(filters, MP_METRICS_VENDOR_ENDPOINT, "excludeSpans", ExcludeFilter.class);<NEW_LINE>processFilters(filters, MP_METRICS_APPLICATION_ENDPOINT, "excludeSpans", ExcludeFilter.class);<NEW_LINE>processFilters(filters, MP_HEALTH_ENDPOINT, "excludeSpans", ExcludeFilter.class);<NEW_LINE>processFilters(filters, MP_OPENAPI_ENDPOINT, "excludeSpans", ExcludeFilter.class);<NEW_LINE>// Exclude filters<NEW_LINE>// Use ExcludePathFilter here because MicroProfile OpenTracing specification does not support<NEW_LINE>// multiple applications<NEW_LINE>if (filterString != null) {<NEW_LINE>processFilters(filters, <MASK><NEW_LINE>}<NEW_LINE>// Include filters<NEW_LINE>// processFilters(filters, map, configAdmin, "includeSpans", IncludeFilter.class);<NEW_LINE>SpanFilter[] finalFilters = new SpanFilter[filters.size()];<NEW_LINE>filters.toArray(finalFilters);<NEW_LINE>allFilters = finalFilters;<NEW_LINE>}
filterString, "excludeSpans", ExcludePathFilter.class);
1,587,918
protected void displayOneOrMoreFailure(KoanSuiteResult result) {<NEW_LINE>printSuggestion(result);<NEW_LINE><MASK><NEW_LINE>StringBuilder sb = new StringBuilder();<NEW_LINE>if (ApplicationSettings.isExpectationResultVisible()) {<NEW_LINE>sb.append(message == null || message.length() == 0 || !result.displayIncompleteException() ? "" : new StringBuilder(Strings.getMessage("what_went_wrong")).append(": ").append(EOL).append(message).append(EOL));<NEW_LINE>}<NEW_LINE>if (ApplicationSettings.isEncouragementEnabled()) {<NEW_LINE>// added noise to console output, and no real value<NEW_LINE>int totalKoans = result.getTotalNumberOfKoans();<NEW_LINE>int numberPassing = result.getNumberPassing();<NEW_LINE>sb.append(EOL).append(Strings.getMessage("you_have_conquered")).append(" ").append(numberPassing).append(" ").append(Strings.getMessage("out_of")).append(" ").append(totalKoans).append(" ").append(totalKoans != 1 ? Strings.getMessage("koans") : Strings.getMessage("koan")).append("! ").append(Strings.getMessage("encouragement"));<NEW_LINE>}<NEW_LINE>displayMessage(sb.toString());<NEW_LINE>}
String message = result.getMessage();
995,543
protected TruffleString loadModule(Object nameObj, Object modulesSourceMapObj) {<NEW_LINE>TruffleString <MASK><NEW_LINE>JSDynamicObject modulesSourceMap = (JSDynamicObject) modulesSourceMapObj;<NEW_LINE>Evaluator evaluator = getContext().getEvaluator();<NEW_LINE>JSModuleLoader moduleLoader = new JSModuleLoader() {<NEW_LINE><NEW_LINE>private final Map<TruffleString, JSModuleRecord> moduleMap = new HashMap<>();<NEW_LINE><NEW_LINE>private Source resolveModuleSource(@SuppressWarnings("unused") ScriptOrModule referencingModule, TruffleString specifier) {<NEW_LINE>Object moduleEntry = JSObject.get(modulesSourceMap, specifier);<NEW_LINE>if (moduleEntry == Undefined.instance) {<NEW_LINE>throw Errors.createSyntaxError(String.format("Could not find imported module %s", specifier));<NEW_LINE>}<NEW_LINE>String code = JSRuntime.toJavaString(moduleEntry);<NEW_LINE>return Source.newBuilder(JavaScriptLanguage.ID, code, Strings.toJavaString(name)).mimeType(JavaScriptLanguage.MODULE_MIME_TYPE).build();<NEW_LINE>}<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public JSModuleRecord resolveImportedModule(ScriptOrModule referencingModule, ModuleRequest moduleRequest) {<NEW_LINE>return moduleMap.computeIfAbsent(moduleRequest.getSpecifier(), (key) -> new JSModuleRecord(evaluator.envParseModule(JSRealm.get(null), resolveModuleSource(referencingModule, key)), this));<NEW_LINE>}<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public JSModuleRecord loadModule(Source moduleSource, JSModuleData moduleData) {<NEW_LINE>throw new UnsupportedOperationException();<NEW_LINE>}<NEW_LINE>};<NEW_LINE>JSModuleRecord module = moduleLoader.resolveImportedModule(null, ModuleRequest.create(name));<NEW_LINE>JSRealm realm = getRealm();<NEW_LINE>evaluator.moduleLinking(realm, module);<NEW_LINE>evaluator.moduleEvaluation(realm, module);<NEW_LINE>return Strings.fromJavaString(String.valueOf(module));<NEW_LINE>}
name = JSRuntime.toString(nameObj);
1,634,142
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {<NEW_LINE>getSerializedSize();<NEW_LINE>if (((bitField0_ & 0x00000001) == 0x00000001)) {<NEW_LINE>output.writeBytes(1, getNameBytes());<NEW_LINE>}<NEW_LINE>if (((bitField0_ & 0x00000002) == 0x00000002)) {<NEW_LINE>output.writeBytes(2, getNameEnBytes());<NEW_LINE>}<NEW_LINE>if (((bitField0_ & 0x00000004) == 0x00000004)) {<NEW_LINE>output.writeMessage(3, boundaries_);<NEW_LINE>}<NEW_LINE>if (((bitField0_ & 0x00000008) == 0x00000008)) {<NEW_LINE>output.writeMessage(4, attributeTagsTable_);<NEW_LINE>}<NEW_LINE>for (int i = 0; i < cities_.size(); i++) {<NEW_LINE>output.writeMessage(6<MASK><NEW_LINE>}<NEW_LINE>if (((bitField0_ & 0x00000010) == 0x00000010)) {<NEW_LINE>output.writeMessage(7, nameIndex_);<NEW_LINE>}<NEW_LINE>getUnknownFields().writeTo(output);<NEW_LINE>}
, cities_.get(i));
346,865
public void propagate(InstanceState state) {<NEW_LINE>Object triggerType = <MASK><NEW_LINE>final var parallel = state.getAttributeValue(ATTR_LOAD);<NEW_LINE>ShiftRegisterData data = getData(state);<NEW_LINE>final var len = data.getLength();<NEW_LINE>final var triggered = data.updateClock(state.getPortValue(CK), triggerType);<NEW_LINE>if (state.getPortValue(CLR) == Value.TRUE) {<NEW_LINE>data.clear();<NEW_LINE>} else if (triggered) {<NEW_LINE>if (parallel && state.getPortValue(LD) == Value.TRUE) {<NEW_LINE>data.clear();<NEW_LINE>for (int i = len - 1; i >= 0; i--) {<NEW_LINE>data.push(state.getPortValue(6 + 2 * i));<NEW_LINE>}<NEW_LINE>} else if (state.getPortValue(SH) != Value.FALSE) {<NEW_LINE>data.push(state.getPortValue(IN));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>state.setPort(OUT, data.get(0), 4);<NEW_LINE>if (parallel) {<NEW_LINE>for (var i = 0; i < len - 1; i++) {<NEW_LINE>state.setPort(6 + 2 * i + 1, data.get(len - 1 - i), 4);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
state.getAttributeValue(StdAttr.EDGE_TRIGGER);
1,082,289
private void checkJournalDirSizeAndType() {<NEW_LINE>final Map<String, FsStats.Filesystem> filesystems = fsProbe.fsStats().filesystems();<NEW_LINE>final FsStats.Filesystem journalFs = filesystems.get(journalDirectory.toAbsolutePath().toString());<NEW_LINE>if (journalFs != null) {<NEW_LINE>if (journalFs.available() > 0 && journalFs.available() < journalMaxSize.toBytes()) {<NEW_LINE>throw new PreflightCheckException(StringUtils.f("Journal directory <%s> has not enough free space (%d MB) to contain 'message_journal_max_size = %d MB' ", journalDirectory.toAbsolutePath(), Size.bytes(journalFs.available()).toMegabytes()<MASK><NEW_LINE>}<NEW_LINE>if (journalFs.typeName() != null && journalFs.typeName().equals("Network Disk")) {<NEW_LINE>final String message = StringUtils.f("Journal directory <%s> should not be on a network file system (%s)!", journalDirectory.toAbsolutePath(), journalFs.sysTypeName());<NEW_LINE>LOG.warn(message);<NEW_LINE>// TODO throw an exception on fresh installations<NEW_LINE>// throw new PreflightCheckException(message);<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>LOG.warn("Could not perform size check on journal directory <{}>", journalDirectory.toAbsolutePath());<NEW_LINE>}<NEW_LINE>}
, journalMaxSize.toMegabytes()));
1,385,016
public void actionPerformed(ActionEvent evt) {<NEW_LINE>JEditTextArea textArea = getTextArea(evt);<NEW_LINE>int caret = textArea.getCaretPosition();<NEW_LINE>int firstLine = textArea.getFirstLine();<NEW_LINE>int firstOfLine = textArea.getLineStartOffset(textArea.getCaretLine());<NEW_LINE>int firstVisibleLine = (firstLine == <MASK><NEW_LINE>int firstVisible = textArea.getLineStartOffset(firstVisibleLine);<NEW_LINE>if (caret == 0) {<NEW_LINE>textArea.getToolkit().beep();<NEW_LINE>return;<NEW_LINE>} else if (!Boolean.TRUE.equals(textArea.getClientProperty(SMART_HOME_END_PROPERTY))) {<NEW_LINE>caret = firstOfLine;<NEW_LINE>} else if (caret == firstVisible) {<NEW_LINE>caret = 0;<NEW_LINE>} else if (caret == firstOfLine) {<NEW_LINE>caret = firstVisible;<NEW_LINE>} else {<NEW_LINE>caret = firstOfLine;<NEW_LINE>}<NEW_LINE>if (select) {<NEW_LINE>textArea.select(textArea.getMarkPosition(), caret);<NEW_LINE>} else {<NEW_LINE>textArea.setCaretPosition(caret);<NEW_LINE>}<NEW_LINE>}
0 ? 0 : firstLine + 1);
797,406
private void bindWithSourcePathProvider() {<NEW_LINE>debuggerListener = new DebuggerManagerAdapter() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void propertyChange(PropertyChangeEvent evt) {<NEW_LINE>String propertyName = evt.getPropertyName();<NEW_LINE>if (DebuggerManager.PROP_CURRENT_SESSION.equals(propertyName)) {<NEW_LINE>Session s = DebuggerManager.getDebuggerManager().getCurrentSession();<NEW_LINE>SourcePathProviderImpl spImpl = null;<NEW_LINE>if (s != null) {<NEW_LINE>List<? extends SourcePathProvider> sourcePathProviders = s.lookup(null, SourcePathProvider.class);<NEW_LINE>for (SourcePathProvider sp : sourcePathProviders) {<NEW_LINE>if (sp instanceof SourcePathProviderImpl) {<NEW_LINE>spImpl = (SourcePathProviderImpl) sp;<NEW_LINE>setSources(spImpl);<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>synchronized (SourcesCurrentModel.this) {<NEW_LINE>currentSourcePathProvider = spImpl;<NEW_LINE>}<NEW_LINE>fireTreeChanged();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>};<NEW_LINE>DebuggerManager.getDebuggerManager().addDebuggerListener(WeakListeners.create(DebuggerManagerListener.class, debuggerListener<MASK><NEW_LINE>}
, DebuggerManager.getDebuggerManager()));
1,525,935
ActionResult<Wo> execute(EffectivePerson effectivePerson, String flag, JsonElement jsonElement) throws Exception {<NEW_LINE>logger.debug(effectivePerson.getDistinguishedName());<NEW_LINE>try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {<NEW_LINE>ActionResult<Wo> <MASK><NEW_LINE>Wi wi = this.convertToWrapIn(jsonElement, Wi.class);<NEW_LINE>Business business = new Business(emc);<NEW_LINE>Query query = emc.flag(flag, Query.class);<NEW_LINE>if (null == query) {<NEW_LINE>throw new ExceptionQueryNotExist(flag);<NEW_LINE>}<NEW_LINE>if (!business.editable(effectivePerson, query)) {<NEW_LINE>throw new ExceptionQueryAccessDenied(effectivePerson.getDistinguishedName(), query.getName(), query.getId());<NEW_LINE>}<NEW_LINE>emc.beginTransaction(Query.class);<NEW_LINE>Wi.copier.copy(wi, query);<NEW_LINE>if (!this.idleName(business, query)) {<NEW_LINE>throw new ExceptionNameExist(query.getName());<NEW_LINE>}<NEW_LINE>if (StringUtils.isNotEmpty(query.getAlias()) && (!this.idleAlias(business, query))) {<NEW_LINE>throw new ExceptionAliasExist(query.getAlias());<NEW_LINE>}<NEW_LINE>query.setLastUpdatePerson(effectivePerson.getDistinguishedName());<NEW_LINE>query.setLastUpdateTime(new Date());<NEW_LINE>emc.check(query, CheckPersistType.all);<NEW_LINE>emc.commit();<NEW_LINE>CacheManager.notify(Query.class);<NEW_LINE>Wo wo = new Wo();<NEW_LINE>wo.setId(query.getId());<NEW_LINE>result.setData(wo);<NEW_LINE>return result;<NEW_LINE>}<NEW_LINE>}
result = new ActionResult<>();
213,344
public void showError(String title, String message, Throwable ex) {<NEW_LINE>final Alert alert = new Alert(Alert.AlertType.ERROR);<NEW_LINE>final Scene scene = alert.getDialogPane().getScene();<NEW_LINE>BrandUtil.applyBrand(injector, stage, scene);<NEW_LINE>alert.setHeaderText(title);<NEW_LINE>alert.setContentText(message);<NEW_LINE>alert.setGraphic(FontAwesome.EXCLAMATION_TRIANGLE.view());<NEW_LINE>alert.getDialogPane().setMinHeight(Region.USE_PREF_SIZE);<NEW_LINE>if (ex == null) {<NEW_LINE>alert.setTitle("Error");<NEW_LINE>} else {<NEW_LINE>alert.setTitle(ex.getClass().getSimpleName());<NEW_LINE>final StringWriter sw = new StringWriter();<NEW_LINE>final PrintWriter pw = new PrintWriter(sw);<NEW_LINE>ex.printStackTrace(pw);<NEW_LINE>final Label label = new Label("The exception stacktrace was:");<NEW_LINE>final <MASK><NEW_LINE>final TextArea textArea = new TextArea(exceptionText);<NEW_LINE>textArea.setEditable(false);<NEW_LINE>textArea.setWrapText(true);<NEW_LINE>textArea.setMaxWidth(Double.MAX_VALUE);<NEW_LINE>textArea.setMaxHeight(Double.MAX_VALUE);<NEW_LINE>GridPane.setVgrow(textArea, Priority.ALWAYS);<NEW_LINE>GridPane.setHgrow(textArea, Priority.ALWAYS);<NEW_LINE>final GridPane expContent = new GridPane();<NEW_LINE>expContent.setMaxWidth(Double.MAX_VALUE);<NEW_LINE>expContent.add(label, 0, 0);<NEW_LINE>expContent.add(textArea, 0, 1);<NEW_LINE>alert.getDialogPane().setExpandableContent(expContent);<NEW_LINE>}<NEW_LINE>alert.showAndWait();<NEW_LINE>}
String exceptionText = sw.toString();
1,585,730
private static void validateClassValues(AnnotationMirror annotationMirror) {<NEW_LINE>// A class literal can appear in three places:<NEW_LINE>// * for an element of type Class, for example @SomeAnnotation(Foo.class);<NEW_LINE>// * for an element of type Class[], for example @SomeAnnotation({Foo.class, Bar.class});<NEW_LINE>// * inside a nested annotation, for example @SomeAnnotation(@Nested(Foo.class)).<NEW_LINE>// These three possibilities are the three branches of the if/else chain below.<NEW_LINE>annotationMirror.getElementValues().forEach((method, value) -> {<NEW_LINE>TypeMirror type = method.getReturnType();<NEW_LINE>if (isJavaLangClass(type) && !(value.getValue() instanceof TypeMirror)) {<NEW_LINE>throw new MissingTypeException(null);<NEW_LINE>} else if (type.getKind().equals(TypeKind.ARRAY) && isJavaLangClass(MoreTypes.asArray(type).getComponentType()) && value.getValue() instanceof List<?>) {<NEW_LINE>// a List can only be a List<AnnotationValue> here<NEW_LINE>@SuppressWarnings("unchecked")<NEW_LINE>List<AnnotationValue> values = (List<AnnotationValue>) value.getValue();<NEW_LINE>if (values.stream().anyMatch(av -> !(av.getValue() instanceof TypeMirror))) {<NEW_LINE>throw new MissingTypeException(null);<NEW_LINE>}<NEW_LINE>} else if (type.getKind().equals(TypeKind.DECLARED) && MoreTypes.asElement(type).getKind().equals(ElementKind.ANNOTATION_TYPE) && value.getValue() instanceof AnnotationMirror) {<NEW_LINE>validateClassValues((<MASK><NEW_LINE>}<NEW_LINE>});<NEW_LINE>}
AnnotationMirror) value.getValue());
857,755
private void deletePet(RoutingContext routingContext) {<NEW_LINE>logger.info("deletePet()");<NEW_LINE>// Param extraction<NEW_LINE>RequestParameters requestParameters = routingContext.get(ValidationHandler.REQUEST_CONTEXT_KEY);<NEW_LINE>Long petId = requestParameters.pathParameter("petId") != null ? requestParameters.pathParameter("petId").getLong() : null;<NEW_LINE>String apiKey = requestParameters.headerParameter("api_key") != null ? requestParameters.headerParameter("api_key").getString() : null;<NEW_LINE>logger.debug("Parameter petId is {}", petId);<NEW_LINE>logger.debug("Parameter apiKey is {}", apiKey);<NEW_LINE>api.deletePet(petId, apiKey).onSuccess(apiResponse -> {<NEW_LINE>routingContext.response().<MASK><NEW_LINE>if (apiResponse.hasData()) {<NEW_LINE>routingContext.json(apiResponse.getData());<NEW_LINE>} else {<NEW_LINE>routingContext.response().end();<NEW_LINE>}<NEW_LINE>}).onFailure(routingContext::fail);<NEW_LINE>}
setStatusCode(apiResponse.getStatusCode());
288,353
public void doQuoteToMention(Annotation doc) {<NEW_LINE>List<CoreMap> quotes = doc.get(CoreAnnotations.QuotationsAnnotation.class);<NEW_LINE>List<List<Pair<Integer, Integer>>> skipChains = new ArrayList<>();<NEW_LINE>// Pairs are (quote_idx, paragraph_idx)<NEW_LINE>List<Pair<Integer, Integer>> currChain = new ArrayList<>();<NEW_LINE>// same as conversational, but make it less restrictive.<NEW_LINE>// look for patterns: are they consecutive in paragraph? group those that are in<NEW_LINE>for (int quote_idx = 0; quote_idx < quotes.size(); quote_idx++) {<NEW_LINE>CoreMap quote = quotes.get(quote_idx);<NEW_LINE>if (quote.get(QuoteAttributionAnnotator.MentionAnnotation.class) == null) {<NEW_LINE>int para_idx = getQuoteParagraph(quote);<NEW_LINE>if (currChain.size() != 0 && currChain.get(currChain.size() - 1).second != para_idx - 2) {<NEW_LINE>skipChains.add(currChain);<NEW_LINE>currChain = new ArrayList<>();<NEW_LINE>}<NEW_LINE>currChain.add(new Pair<>(quote_idx, para_idx));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (currChain.size() != 0) {<NEW_LINE>skipChains.add(currChain);<NEW_LINE>}<NEW_LINE>for (List<Pair<Integer, Integer>> skipChain : skipChains) {<NEW_LINE>Pair<Integer, Integer> firstQuoteAndParagraphIdx = skipChain.get(0);<NEW_LINE>int firstParagraph = firstQuoteAndParagraphIdx.second;<NEW_LINE>// boolean chainAttributed = false;<NEW_LINE>for (int prevQuoteIdx = firstQuoteAndParagraphIdx.first - 1; prevQuoteIdx >= 0; prevQuoteIdx--) {<NEW_LINE>CoreMap prevQuote = quotes.get(prevQuoteIdx);<NEW_LINE>if (getQuoteParagraph(prevQuote) == firstParagraph - 2 && prevQuote.get(QuoteAttributionAnnotator.MentionAnnotation.class) != null) {<NEW_LINE>for (Pair<Integer, Integer> quoteAndParagraphIdx : skipChain) {<NEW_LINE>CoreMap quote = quotes.get(quoteAndParagraphIdx.first);<NEW_LINE>fillInMention(quote<MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
, getMentionData(prevQuote), sieveName);
785,554
public void doCommit(TableMetadata base, TableMetadata metadata) {<NEW_LINE>String newMetadataLocation = writeNewMetadata(metadata, currentVersion() + 1);<NEW_LINE>try {<NEW_LINE>Map<String, String> table = getTable();<NEW_LINE>if (base != null) {<NEW_LINE>validateMetadataLocation(table, base);<NEW_LINE>String oldMetadataLocation = base.metadataFileLocation();<NEW_LINE>// Start atomic update<NEW_LINE>LOG.debug("Committing existing table: {}", tableName());<NEW_LINE>updateTable(newMetadataLocation, oldMetadataLocation);<NEW_LINE>} else {<NEW_LINE>// table not exists create it<NEW_LINE>LOG.debug("Committing new table: {}", tableName());<NEW_LINE>createTable(newMetadataLocation);<NEW_LINE>}<NEW_LINE>} catch (SQLIntegrityConstraintViolationException e) {<NEW_LINE>if (currentMetadataLocation() == null) {<NEW_LINE>throw new AlreadyExistsException(e, "Table already exists: %s", tableIdentifier);<NEW_LINE>} else {<NEW_LINE>throw new UncheckedSQLException(e, "Table already exists: %s", tableIdentifier);<NEW_LINE>}<NEW_LINE>} catch (SQLTimeoutException e) {<NEW_LINE>throw new UncheckedSQLException(e, "Database Connection timeout");<NEW_LINE>} catch (SQLTransientConnectionException | SQLNonTransientConnectionException e) {<NEW_LINE>throw new UncheckedSQLException(e, "Database Connection failed");<NEW_LINE>} catch (DataTruncation e) {<NEW_LINE>throw new UncheckedSQLException(e, "Database data truncation error");<NEW_LINE>} catch (SQLWarning e) {<NEW_LINE>throw new UncheckedSQLException(e, "Database warning");<NEW_LINE>} catch (SQLException e) {<NEW_LINE>// SQLite doesn't set SQLState or throw SQLIntegrityConstraintViolationException<NEW_LINE>if (e.getMessage().contains("constraint failed")) {<NEW_LINE>throw new AlreadyExistsException("Table already exists: %s", tableIdentifier);<NEW_LINE>}<NEW_LINE>throw new UncheckedSQLException(e, "Unknown failure");<NEW_LINE>} catch (InterruptedException e) {<NEW_LINE>Thread<MASK><NEW_LINE>throw new UncheckedInterruptedException(e, "Interrupted during commit");<NEW_LINE>}<NEW_LINE>}
.currentThread().interrupt();
941,300
final CreateProfileResult executeCreateProfile(CreateProfileRequest createProfileRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(createProfileRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<CreateProfileRequest> request = null;<NEW_LINE>Response<CreateProfileResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new CreateProfileRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(createProfileRequest));<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, "Customer Profiles");<NEW_LINE>request.<MASK><NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<CreateProfileResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new CreateProfileResultJsonUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateProfile");
658,700
void updateUsingBesuService(final V1Service service) throws RuntimeException {<NEW_LINE>try {<NEW_LINE>LOG.info("Found Besu service: {}", service.getMetadata().getName());<NEW_LINE>internalAdvertisedHost = getIpDetector(service).detectAdvertisedIp().orElseThrow(() -> new NatInitializationException("Unable to retrieve IP from service"));<NEW_LINE>LOG.info("Setting host IP to: {}.", internalAdvertisedHost);<NEW_LINE>final String internalHost = queryLocalIPAddress().<MASK><NEW_LINE>service.getSpec().getPorts().forEach(v1ServicePort -> {<NEW_LINE>try {<NEW_LINE>final NatServiceType natServiceType = NatServiceType.fromString(v1ServicePort.getName());<NEW_LINE>forwardedPorts.add(new NatPortMapping(natServiceType, natServiceType.equals(NatServiceType.DISCOVERY) ? NetworkProtocol.UDP : NetworkProtocol.TCP, internalHost, internalAdvertisedHost, v1ServicePort.getPort(), v1ServicePort.getTargetPort().getIntValue()));<NEW_LINE>} catch (IllegalStateException e) {<NEW_LINE>LOG.warn("Ignored unknown Besu port: {}", e.getMessage());<NEW_LINE>}<NEW_LINE>});<NEW_LINE>} catch (Exception e) {<NEW_LINE>throw new RuntimeException("Failed update information using pod metadata : " + e.getMessage(), e);<NEW_LINE>}<NEW_LINE>}
get(TIMEOUT_SECONDS, TimeUnit.SECONDS);
1,328,228
public GetContactMethodsResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>GetContactMethodsResult getContactMethodsResult = new GetContactMethodsResult();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE><MASK><NEW_LINE>if (token == null)<NEW_LINE>token = context.nextToken();<NEW_LINE>if (token == VALUE_NULL) {<NEW_LINE>return getContactMethodsResult;<NEW_LINE>}<NEW_LINE>while (true) {<NEW_LINE>if (token == null)<NEW_LINE>break;<NEW_LINE>if (token == FIELD_NAME || token == START_OBJECT) {<NEW_LINE>if (context.testExpression("contactMethods", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>getContactMethodsResult.setContactMethods(new ListUnmarshaller<ContactMethod>(ContactMethodJsonUnmarshaller.getInstance()).unmarshall(context));<NEW_LINE>}<NEW_LINE>} else if (token == END_ARRAY || token == END_OBJECT) {<NEW_LINE>if (context.getLastParsedParentElement() == null || context.getLastParsedParentElement().equals(currentParentElement)) {<NEW_LINE>if (context.getCurrentDepth() <= originalDepth)<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>token = context.nextToken();<NEW_LINE>}<NEW_LINE>return getContactMethodsResult;<NEW_LINE>}
JsonToken token = context.getCurrentToken();
1,664,566
public void layoutContainer(Container target) {<NEW_LINE>Insets insets = target.getInsets();<NEW_LINE>int maxheight = target.getSize().height - (insets.top + insets.bottom + vgap * 2);<NEW_LINE>int maxwidth = target.getSize().width - (insets.left + insets.right + hgap * 2);<NEW_LINE>int nmembers = target.getComponentCount();<NEW_LINE>int x = insets.left + hgap;<NEW_LINE>int y = 0;<NEW_LINE>int colw = 0, start = 0;<NEW_LINE>for (int i = 0; i < nmembers; i++) {<NEW_LINE>Component m = target.getComponent(i);<NEW_LINE>if (m.isVisible()) {<NEW_LINE>Dimension d = m.getPreferredSize();<NEW_LINE>if ((this.vfill) && (i == (nmembers - 1))) {<NEW_LINE>d.height = Math.max((maxheight - y), d.height);<NEW_LINE>}<NEW_LINE>if (this.hfill) {<NEW_LINE>m.setSize(maxwidth, d.height);<NEW_LINE>d.width = maxwidth;<NEW_LINE>} else {<NEW_LINE>m.setSize(<MASK><NEW_LINE>}<NEW_LINE>if (y + d.height > maxheight) {<NEW_LINE>move(target, x, insets.top + vgap, colw, maxheight - y, start, i);<NEW_LINE>y = d.height;<NEW_LINE>x += hgap + colw;<NEW_LINE>colw = d.width;<NEW_LINE>start = i;<NEW_LINE>} else {<NEW_LINE>if (y > 0)<NEW_LINE>y += vgap;<NEW_LINE>y += d.height;<NEW_LINE>colw = Math.max(colw, d.width);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>move(target, x, insets.top + vgap, colw, maxheight - y, start, nmembers);<NEW_LINE>}
d.width, d.height);
1,498,288
final GetServiceResult executeGetService(GetServiceRequest getServiceRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(getServiceRequest);<NEW_LINE><MASK><NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<GetServiceRequest> request = null;<NEW_LINE>Response<GetServiceResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new GetServiceRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(getServiceRequest));<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, "Migration Hub Refactor Spaces");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "GetService");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<GetServiceResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new GetServiceResultJsonUnmarshaller());<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();
1,516,480
protected void startAndCompleteReportingInstances(ProcessEngine engine, BpmnModelInstance model, Date currentTime, int offset) {<NEW_LINE>Calendar calendar = Calendar.getInstance();<NEW_LINE>int currentMonth = calendar.get(Calendar.MONTH);<NEW_LINE>int currentYear = calendar.get(Calendar.YEAR);<NEW_LINE>calendar.add(Calendar.MONTH, offset * (-1));<NEW_LINE>ClockUtil.setCurrentTime(calendar.getTime());<NEW_LINE>createDeployment(engine, "reports", model);<NEW_LINE>RuntimeService runtimeService = engine.getRuntimeService();<NEW_LINE>TaskService taskService = engine.getTaskService();<NEW_LINE>while (calendar.get(Calendar.YEAR) < currentYear || calendar.get(Calendar.MONTH) <= currentMonth) {<NEW_LINE>int numOfInstances = getRandomBetween(10, 50);<NEW_LINE>for (int i = 0; i <= numOfInstances; i++) {<NEW_LINE>ProcessInstance pi = runtimeService.startProcessInstanceByKey("my-reporting-process");<NEW_LINE>try {<NEW_LINE>int min = getRandomBetween(1, 10);<NEW_LINE>int max = offset > 0 ? offset * 30 : min;<NEW_LINE>int randomDuration = getRandomBetween(min, max);<NEW_LINE>Calendar calendarInstance = Calendar.getInstance();<NEW_LINE>calendarInstance.setTime(ClockUtil.getCurrentTime());<NEW_LINE>calendarInstance.<MASK><NEW_LINE>ClockUtil.setCurrentTime(calendarInstance.getTime());<NEW_LINE>String processInstanceId = pi.getId();<NEW_LINE>String taskId = taskService.createTaskQuery().processInstanceId(processInstanceId).singleResult().getId();<NEW_LINE>taskService.complete(taskId);<NEW_LINE>} finally {<NEW_LINE>ClockUtil.setCurrentTime(calendar.getTime());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>offset--;<NEW_LINE>calendar.add(Calendar.MONTH, 1);<NEW_LINE>ClockUtil.setCurrentTime(calendar.getTime());<NEW_LINE>if (calendar.get(Calendar.YEAR) > currentYear) {<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>ClockUtil.reset();<NEW_LINE>}
add(Calendar.DAY_OF_YEAR, randomDuration);
555,803
public ListTagsForResourceResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>ListTagsForResourceResult listTagsForResourceResult = new ListTagsForResourceResult();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE><MASK><NEW_LINE>if (token == null)<NEW_LINE>token = context.nextToken();<NEW_LINE>if (token == VALUE_NULL) {<NEW_LINE>return listTagsForResourceResult;<NEW_LINE>}<NEW_LINE>while (true) {<NEW_LINE>if (token == null)<NEW_LINE>break;<NEW_LINE>if (token == FIELD_NAME || token == START_OBJECT) {<NEW_LINE>if (context.testExpression("ResourceArn", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>listTagsForResourceResult.setResourceArn(context.getUnmarshaller(String.class).unmarshall(context));<NEW_LINE>}<NEW_LINE>if (context.testExpression("Tags", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>listTagsForResourceResult.setTags(new MapUnmarshaller<String, String>(context.getUnmarshaller(String.class), context.getUnmarshaller(String.class)).unmarshall(context));<NEW_LINE>}<NEW_LINE>} else if (token == END_ARRAY || token == END_OBJECT) {<NEW_LINE>if (context.getLastParsedParentElement() == null || context.getLastParsedParentElement().equals(currentParentElement)) {<NEW_LINE>if (context.getCurrentDepth() <= originalDepth)<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>token = context.nextToken();<NEW_LINE>}<NEW_LINE>return listTagsForResourceResult;<NEW_LINE>}
JsonToken token = context.getCurrentToken();
293,978
public void paint(Graphics g, JComponent c) {<NEW_LINE>JBTabsImpl tabs = (JBTabsImpl) c;<NEW_LINE>if (tabs.getVisibleInfos().isEmpty())<NEW_LINE>return;<NEW_LINE>Graphics2D g2d = (Graphics2D) g;<NEW_LINE>final GraphicsConfig config = new GraphicsConfig(g2d);<NEW_LINE>config.setAntialiasing(true);<NEW_LINE>try {<NEW_LINE>final Rectangle clip = g2d.getClipBounds();<NEW_LINE>Runnable tabLineRunner = doPaintBackground(tabs, g2d, clip);<NEW_LINE>final TabInfo selected = tabs.getSelectedInfo();<NEW_LINE>if (selected != null) {<NEW_LINE>Rectangle compBounds = selected.getComponent().getBounds();<NEW_LINE>if (compBounds.contains(clip) && !compBounds.intersects(clip))<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>tabLineRunner.run();<NEW_LINE>if (!tabs.isStealthModeEffective() && !tabs.isHideTabs()) {<NEW_LINE>paintNonSelectedTabs(tabs, g2d);<NEW_LINE>}<NEW_LINE>doPaintActive(tabs, (Graphics2D) g);<NEW_LINE>final <MASK><NEW_LINE>if (selected != null) {<NEW_LINE>selectedLabel.paintImage(g);<NEW_LINE>}<NEW_LINE>tabs.getSingleRowLayoutInternal().myMoreIcon.paintIcon(tabs, g);<NEW_LINE>if (tabs.isSideComponentVertical()) {<NEW_LINE>JBTabsImpl.Toolbar toolbarComp = tabs.myInfo2Toolbar.get(tabs.getSelectedInfoInternal());<NEW_LINE>if (toolbarComp != null && !toolbarComp.isEmpty()) {<NEW_LINE>Rectangle toolBounds = toolbarComp.getBounds();<NEW_LINE>g2d.setColor(JBColor.border());<NEW_LINE>LinePainter2D.paint(g2d, toolBounds.getMaxX(), toolBounds.y, toolBounds.getMaxX(), toolBounds.getMaxY() - 1);<NEW_LINE>}<NEW_LINE>} else if (!tabs.isSideComponentOnTabs()) {<NEW_LINE>JBTabsImpl.Toolbar toolbarComp = tabs.myInfo2Toolbar.get(tabs.getSelectedInfoInternal());<NEW_LINE>if (toolbarComp != null && !toolbarComp.isEmpty()) {<NEW_LINE>Rectangle toolBounds = toolbarComp.getBounds();<NEW_LINE>g2d.setColor(JBColor.border());<NEW_LINE>LinePainter2D.paint(g2d, toolBounds.x, toolBounds.getMaxY(), toolBounds.getMaxX() - 1, toolBounds.getMaxY());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} finally {<NEW_LINE>config.restore();<NEW_LINE>}<NEW_LINE>}
TabLabel selectedLabel = tabs.getSelectedLabel();
862,107
public boolean matches() {<NEW_LINE>final <MASK><NEW_LINE>if (eval.type().isArray()) {<NEW_LINE>switch(eval.elementType().getType()) {<NEW_LINE>case LONG:<NEW_LINE>final Long[] lResult = eval.asLongArray();<NEW_LINE>if (lResult == null) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>return Arrays.stream(lResult).filter(Objects::nonNull).anyMatch(Evals::asBoolean);<NEW_LINE>case STRING:<NEW_LINE>final String[] sResult = eval.asStringArray();<NEW_LINE>if (sResult == null) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>return Arrays.stream(sResult).anyMatch(Evals::asBoolean);<NEW_LINE>case DOUBLE:<NEW_LINE>final Double[] dResult = eval.asDoubleArray();<NEW_LINE>if (dResult == null) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>return Arrays.stream(dResult).filter(Objects::nonNull).anyMatch(Evals::asBoolean);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return eval.asBoolean();<NEW_LINE>}
ExprEval eval = selector.getObject();
77,793
public void testCaptureDebuggerStaticMappingPlugin() throws Throwable {<NEW_LINE>DomainFolder root = tool.getProject().getProjectData().getRootFolder();<NEW_LINE>try (UndoableTransaction tid = tb.startTransaction()) {<NEW_LINE>long snap = tb.trace.getTimeManager().createSnapshot("First").getKey();<NEW_LINE>TraceModule bin = tb.trace.getModuleManager().addLoadedModule("/bin/bash", "/bin/bash", tb.range(0x00400000, 0x0060ffff), snap);<NEW_LINE>bin.addSection("bash[.text]", ".text", tb.range(0x00400000, 0x0040ffff));<NEW_LINE>bin.addSection("bash[.data]", ".data", tb.range(0x00600000, 0x0060ffff));<NEW_LINE>TraceModule lib = tb.trace.getModuleManager().addLoadedModule("/lib/libc.so.6", "/lib/libc.so.6", tb.range(0x7fac0000, 0x7faeffff), snap);<NEW_LINE>lib.addSection("libc[.text]", ".text", tb<MASK><NEW_LINE>lib.addSection("libc[.data]", ".data", tb.range(0x7fae0000, 0x7faeffff));<NEW_LINE>}<NEW_LINE>progEcho = createDefaultProgram("bash", ProgramBuilder._X64, this);<NEW_LINE>progLibC = createDefaultProgram("libc.so.6", ProgramBuilder._X64, this);<NEW_LINE>try (UndoableTransaction tid = UndoableTransaction.start(progEcho, "Add memory", true)) {<NEW_LINE>progEcho.setImageBase(addr(progEcho, 0x00400000), true);<NEW_LINE>progEcho.getMemory().createInitializedBlock(".text", addr(progEcho, 0x00400000), 0x10000, (byte) 0, TaskMonitor.DUMMY, false);<NEW_LINE>progEcho.getMemory().createInitializedBlock(".data", addr(progEcho, 0x00600000), 0x10000, (byte) 0, TaskMonitor.DUMMY, false);<NEW_LINE>}<NEW_LINE>try (UndoableTransaction tid = UndoableTransaction.start(progLibC, "Add memory", true)) {<NEW_LINE>progLibC.setImageBase(addr(progLibC, 0x00400000), true);<NEW_LINE>progLibC.getMemory().createInitializedBlock(".text", addr(progLibC, 0x00400000), 0x10000, (byte) 0, TaskMonitor.DUMMY, false);<NEW_LINE>progLibC.getMemory().createInitializedBlock(".data", addr(progLibC, 0x00600000), 0x10000, (byte) 0, TaskMonitor.DUMMY, false);<NEW_LINE>}<NEW_LINE>root.createFile("trace", tb.trace, TaskMonitor.DUMMY);<NEW_LINE>root.createFile("echo", progEcho, TaskMonitor.DUMMY);<NEW_LINE>root.createFile("libc.so.6", progLibC, TaskMonitor.DUMMY);<NEW_LINE>traceManager.openTrace(tb.trace);<NEW_LINE>traceManager.activateTrace(tb.trace);<NEW_LINE>programManager.openProgram(progEcho);<NEW_LINE>programManager.openProgram(progLibC);<NEW_LINE>try (UndoableTransaction tid = tb.startTransaction()) {<NEW_LINE>Map<TraceModule, ModuleMapProposal> proposal = mappingService.proposeModuleMaps(tb.trace.getModuleManager().getAllModules(), List.of(programManager.getAllOpenPrograms()));<NEW_LINE>Collection<ModuleMapEntry> entries = MapProposal.flatten(proposal.values());<NEW_LINE>mappingService.addModuleMappings(entries, TaskMonitor.DUMMY, false);<NEW_LINE>}<NEW_LINE>captureIsolatedProvider(DebuggerStaticMappingProvider.class, 700, 400);<NEW_LINE>}
.range(0x7fac0000, 0x7facffff));
1,585,051
private void writeObject(ObjectOutputStream stream) throws IOException {<NEW_LINE>stream.defaultWriteObject();<NEW_LINE>SerialUtils.writeStroke(this.domainGridlineStroke, stream);<NEW_LINE>SerialUtils.writePaint(this.domainGridlinePaint, stream);<NEW_LINE>SerialUtils.writeStroke(this.rangeGridlineStroke, stream);<NEW_LINE>SerialUtils.<MASK><NEW_LINE>SerialUtils.writeStroke(this.domainMinorGridlineStroke, stream);<NEW_LINE>SerialUtils.writePaint(this.domainMinorGridlinePaint, stream);<NEW_LINE>SerialUtils.writeStroke(this.rangeMinorGridlineStroke, stream);<NEW_LINE>SerialUtils.writePaint(this.rangeMinorGridlinePaint, stream);<NEW_LINE>SerialUtils.writeStroke(this.rangeZeroBaselineStroke, stream);<NEW_LINE>SerialUtils.writePaint(this.rangeZeroBaselinePaint, stream);<NEW_LINE>SerialUtils.writeStroke(this.domainCrosshairStroke, stream);<NEW_LINE>SerialUtils.writePaint(this.domainCrosshairPaint, stream);<NEW_LINE>SerialUtils.writeStroke(this.rangeCrosshairStroke, stream);<NEW_LINE>SerialUtils.writePaint(this.rangeCrosshairPaint, stream);<NEW_LINE>SerialUtils.writePaint(this.domainTickBandPaint, stream);<NEW_LINE>SerialUtils.writePaint(this.rangeTickBandPaint, stream);<NEW_LINE>SerialUtils.writePoint2D(this.quadrantOrigin, stream);<NEW_LINE>for (int i = 0; i < 4; i++) {<NEW_LINE>SerialUtils.writePaint(this.quadrantPaint[i], stream);<NEW_LINE>}<NEW_LINE>SerialUtils.writeStroke(this.domainZeroBaselineStroke, stream);<NEW_LINE>SerialUtils.writePaint(this.domainZeroBaselinePaint, stream);<NEW_LINE>}
writePaint(this.rangeGridlinePaint, stream);
1,852,511
private void decodeTypRequest(ArrayList<Short> mac) {<NEW_LINE>try {<NEW_LINE>short tgtnode = mac.get(3);<NEW_LINE>int <MASK><NEW_LINE>int typXnodo = SoulissNetworkParameter.maxnodes;<NEW_LINE>logger.debug("--DECODE MACACO OFFSET: {} NUMOF: {} TYPICALSXNODE: {}", tgtnode, numberOf, typXnodo);<NEW_LINE>// creates Souliss nodes<NEW_LINE>for (int j = 0; j < numberOf; j++) {<NEW_LINE>if (mac.get(5 + j) != 0) {<NEW_LINE>// create only not-empty typicals<NEW_LINE>if (!(mac.get(5 + j) == Constants.Souliss_T_related)) {<NEW_LINE>String hTyp = Integer.toHexString(mac.get(5 + j));<NEW_LINE>short slot = (short) (j % typXnodo);<NEW_LINE>short node = (short) (j / typXnodo + tgtnode);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} catch (Exception uy) {<NEW_LINE>logger.error("decodeTypRequest ERROR");<NEW_LINE>}<NEW_LINE>}
numberOf = mac.get(4);
697,368
public io.kubernetes.client.proto.V1.PodCondition buildPartial() {<NEW_LINE>io.kubernetes.client.proto.V1.PodCondition result = new io.kubernetes.client.<MASK><NEW_LINE>int from_bitField0_ = bitField0_;<NEW_LINE>int to_bitField0_ = 0;<NEW_LINE>if (((from_bitField0_ & 0x00000001) == 0x00000001)) {<NEW_LINE>to_bitField0_ |= 0x00000001;<NEW_LINE>}<NEW_LINE>result.type_ = type_;<NEW_LINE>if (((from_bitField0_ & 0x00000002) == 0x00000002)) {<NEW_LINE>to_bitField0_ |= 0x00000002;<NEW_LINE>}<NEW_LINE>result.status_ = status_;<NEW_LINE>if (((from_bitField0_ & 0x00000004) == 0x00000004)) {<NEW_LINE>to_bitField0_ |= 0x00000004;<NEW_LINE>}<NEW_LINE>if (lastProbeTimeBuilder_ == null) {<NEW_LINE>result.lastProbeTime_ = lastProbeTime_;<NEW_LINE>} else {<NEW_LINE>result.lastProbeTime_ = lastProbeTimeBuilder_.build();<NEW_LINE>}<NEW_LINE>if (((from_bitField0_ & 0x00000008) == 0x00000008)) {<NEW_LINE>to_bitField0_ |= 0x00000008;<NEW_LINE>}<NEW_LINE>if (lastTransitionTimeBuilder_ == null) {<NEW_LINE>result.lastTransitionTime_ = lastTransitionTime_;<NEW_LINE>} else {<NEW_LINE>result.lastTransitionTime_ = lastTransitionTimeBuilder_.build();<NEW_LINE>}<NEW_LINE>if (((from_bitField0_ & 0x00000010) == 0x00000010)) {<NEW_LINE>to_bitField0_ |= 0x00000010;<NEW_LINE>}<NEW_LINE>result.reason_ = reason_;<NEW_LINE>if (((from_bitField0_ & 0x00000020) == 0x00000020)) {<NEW_LINE>to_bitField0_ |= 0x00000020;<NEW_LINE>}<NEW_LINE>result.message_ = message_;<NEW_LINE>result.bitField0_ = to_bitField0_;<NEW_LINE>onBuilt();<NEW_LINE>return result;<NEW_LINE>}
proto.V1.PodCondition(this);
586,553
protected Object decode(Channel channel, SocketAddress remoteAddress, Object msg) throws Exception {<NEW_LINE>String sentence = (String) msg;<NEW_LINE>String type = sentence.substring(5, 8);<NEW_LINE>Pattern pattern;<NEW_LINE>if (type.equals("MIF")) {<NEW_LINE>pattern = PATTERN_MIF;<NEW_LINE>} else {<NEW_LINE>pattern = PATTERN_OTHER;<NEW_LINE>}<NEW_LINE>Parser parser = new Parser(pattern, sentence);<NEW_LINE>if (!parser.matches()) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>Position position = new Position(getProtocolName());<NEW_LINE>DeviceSession deviceSession = getDeviceSession(channel, <MASK><NEW_LINE>if (deviceSession == null) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>position.setDeviceId(deviceSession.getDeviceId());<NEW_LINE>if (parser.nextInt(0) == 1) {<NEW_LINE>position.set(Position.KEY_ARCHIVE, true);<NEW_LINE>}<NEW_LINE>position.setDeviceTime(parser.nextDateTime(Parser.DateTimeFormat.HMS_DMY, "GMT+5:30"));<NEW_LINE>position.setFixTime(parser.nextDateTime(Parser.DateTimeFormat.HMS_DMY, "GMT+5:30"));<NEW_LINE>position.setValid(parser.nextInt(0) != 0);<NEW_LINE>position.setLatitude(parser.nextCoordinate(Parser.CoordinateFormat.DEG_HEM));<NEW_LINE>position.setLongitude(parser.nextCoordinate(Parser.CoordinateFormat.DEG_HEM));<NEW_LINE>if (type.equals("MIF")) {<NEW_LINE>position.set(Position.KEY_DRIVER_UNIQUE_ID, parser.next());<NEW_LINE>}<NEW_LINE>return position;<NEW_LINE>}
remoteAddress, parser.next());
551,892
public void subscribeTopic(final String senderId, final String gcmToken, final String topic, final Bundle extras) {<NEW_LINE>new AsyncTask<Void, Void, Void>() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>protected Void doInBackground(Void... params) {<NEW_LINE>try {<NEW_LINE>GcmPubSub.getInstance(mContext).subscribe(gcmToken, topic, extras);<NEW_LINE>mLogger.log(Log.INFO, "topic subscription succeeded." + "\ngcmToken: " + gcmToken + "\ntopic: " + topic + "\nextras: " + extras);<NEW_LINE>// Save the token in the address book<NEW_LINE>Sender <MASK><NEW_LINE>if (entry == null) {<NEW_LINE>mLogger.log(Log.ERROR, "Could not subscribe to topic, missing sender id");<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>entry.topics.put(topic, true);<NEW_LINE>mSenders.updateSender(entry);<NEW_LINE>} catch (IOException | IllegalArgumentException e) {<NEW_LINE>mLogger.log(Log.INFO, "topic subscription failed." + "\nerror: " + e.getMessage() + "\ngcmToken: " + gcmToken + "\ntopic: " + topic + "\nextras: " + extras);<NEW_LINE>}<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>}.execute();<NEW_LINE>}
entry = mSenders.getSender(senderId);
1,276,228
public int compareTo(getBlobReplication_result other) {<NEW_LINE>if (!getClass().equals(other.getClass())) {<NEW_LINE>return getClass().getName().compareTo(other.getClass().getName());<NEW_LINE>}<NEW_LINE>int lastComparison = 0;<NEW_LINE>lastComparison = Boolean.valueOf(is_set_success()).compareTo(other.is_set_success());<NEW_LINE>if (lastComparison != 0) {<NEW_LINE>return lastComparison;<NEW_LINE>}<NEW_LINE>if (is_set_success()) {<NEW_LINE>lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);<NEW_LINE>if (lastComparison != 0) {<NEW_LINE>return lastComparison;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>lastComparison = Boolean.valueOf(is_set_knf()).<MASK><NEW_LINE>if (lastComparison != 0) {<NEW_LINE>return lastComparison;<NEW_LINE>}<NEW_LINE>if (is_set_knf()) {<NEW_LINE>lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.knf, other.knf);<NEW_LINE>if (lastComparison != 0) {<NEW_LINE>return lastComparison;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return 0;<NEW_LINE>}
compareTo(other.is_set_knf());
157,625
private static BufferedImage takeVisibleScreenshot(WebDriver augmentedDriver) throws Exception {<NEW_LINE>Future<?> future = Executors.newSingleThreadExecutor().submit(new Callable<BufferedImage>() {<NEW_LINE><NEW_LINE>public BufferedImage call() throws IOException {<NEW_LINE>return ImageIO.read(((TakesScreenshot) augmentedDriver).getScreenshotAs(OutputType.FILE));<NEW_LINE>}<NEW_LINE>});<NEW_LINE>BufferedImage screenShot = null;<NEW_LINE>// default timeout for driver quit 1/3 of explicit<NEW_LINE>long timeout = Configuration.getInt(Parameter.EXPLICIT_TIMEOUT) / 3;<NEW_LINE>try {<NEW_LINE>LOGGER.debug("starting screenshot capturing...");<NEW_LINE>screenShot = (BufferedImage) future.get(timeout, TimeUnit.SECONDS);<NEW_LINE>} catch (java.util.concurrent.TimeoutException e) {<NEW_LINE>String message = "Unable to capture screenshot during " + timeout + " sec!";<NEW_LINE>LOGGER.warn(message);<NEW_LINE>} catch (InterruptedException e) {<NEW_LINE>String message = "Unable to capture screenshot during " + timeout + " sec!";<NEW_LINE>LOGGER.warn(message);<NEW_LINE>Thread.currentThread().interrupt();<NEW_LINE>} catch (ExecutionException e) {<NEW_LINE>if (e.getMessage() != null) {<NEW_LINE><MASK><NEW_LINE>if (msg.contains(SpecialKeywords.DRIVER_CONNECTION_REFUSED) || msg.contains(SpecialKeywords.DRIVER_CONNECTION_REFUSED2)) {<NEW_LINE>LOGGER.error("ExecutionException error on capture screenshot due to the driver connection refused");<NEW_LINE>} else if (msg.contains(SpecialKeywords.DRIVER_NO_SUCH_WINDOW)) {<NEW_LINE>LOGGER.error("ExecutionException error on capture screenshot due to the " + SpecialKeywords.DRIVER_NO_SUCH_WINDOW);<NEW_LINE>} else {<NEW_LINE>LOGGER.error("ExecutionException error detected on capture full screenshot!", e);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} catch (Exception e) {<NEW_LINE>String message = "Undefined error on capture screenshot detected: " + e.getMessage();<NEW_LINE>LOGGER.error(message);<NEW_LINE>} finally {<NEW_LINE>LOGGER.debug("finished screenshot call.");<NEW_LINE>}<NEW_LINE>return screenShot;<NEW_LINE>}
String msg = e.getMessage();
1,549,685
public void onMaster() {<NEW_LINE>clusterService.submitStateUpdateTask("publish-secure-settings-hashes", new ClusterStateUpdateTask(Priority.URGENT) {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public ClusterState execute(ClusterState currentState) {<NEW_LINE>final Map<String, String> publishedHashesOfConsistentSettings = currentState.metadata().hashesOfConsistentSettings();<NEW_LINE>if (computedHashesOfConsistentSettings.equals(publishedHashesOfConsistentSettings)) {<NEW_LINE>logger.debug("Nothing to publish. What is already published matches this node's view.");<NEW_LINE>return currentState;<NEW_LINE>} else {<NEW_LINE>return ClusterState.builder(currentState).metadata(Metadata.builder(currentState.metadata()).hashesOfConsistentSettings<MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void onFailure(String source, Exception e) {<NEW_LINE>logger.error("unable to publish secure settings hashes", e);<NEW_LINE>}<NEW_LINE>});<NEW_LINE>}
(computedHashesOfConsistentSettings)).build();
264,103
private void initialize(List<ContextResolver> contextResolvers) {<NEW_LINE>Map<Type, Map<MediaType, List<ContextResolver>>> rs = new HashMap<>();<NEW_LINE>for (ContextResolver provider : contextResolvers) {<NEW_LINE>List<MediaType> ms = MediaTypes.createFrom(provider.getClass().getAnnotation(Produces.class));<NEW_LINE>Type type = getParameterizedType(provider.getClass());<NEW_LINE>Map<MediaType, List<ContextResolver>> mr = rs.get(type);<NEW_LINE>if (mr == null) {<NEW_LINE>mr = new HashMap<>();<NEW_LINE>rs.put(type, mr);<NEW_LINE>}<NEW_LINE>for (MediaType m : ms) {<NEW_LINE>List<ContextResolver> <MASK><NEW_LINE>if (crl == null) {<NEW_LINE>crl = new ArrayList<>();<NEW_LINE>mr.put(m, crl);<NEW_LINE>}<NEW_LINE>crl.add(provider);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// Reduce set of two or more context resolvers for same type and<NEW_LINE>// media type<NEW_LINE>for (Map.Entry<Type, Map<MediaType, List<ContextResolver>>> e : rs.entrySet()) {<NEW_LINE>Map<MediaType, ContextResolver> mr = new KeyComparatorHashMap<>(4, MessageBodyFactory.MEDIA_TYPE_KEY_COMPARATOR);<NEW_LINE>resolver.put(e.getKey(), mr);<NEW_LINE>cache.put(e.getKey(), new ConcurrentHashMap<>(4));<NEW_LINE>for (Map.Entry<MediaType, List<ContextResolver>> f : e.getValue().entrySet()) {<NEW_LINE>mr.put(f.getKey(), reduce(f.getValue()));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
crl = mr.get(m);
485,107
private ResponseRef executeWidget(AsyncExecutionRequestRef ref) throws ExternalOperationFailedException {<NEW_LINE>String url = URLUtils.getUrl(getBaseUrl(), URLUtils.WIDGET_DATA_URL_FORMAT, getId(ref));<NEW_LINE>ref.getExecutionRequestRefContext(<MASK><NEW_LINE>List<Column> columns = Lists.newArrayList();<NEW_LINE>List<TableRecord> tableRecords = Lists.newArrayList();<NEW_LINE>VisualisDownloadAction visualisDownloadAction = new VisualisDownloadAction();<NEW_LINE>visualisDownloadAction.setUser(getUser(ref));<NEW_LINE>SSOUrlBuilderOperation ssoUrlBuilderOperation = ref.getWorkspace().getSSOUrlBuilderOperation().copy();<NEW_LINE>ssoUrlBuilderOperation.setAppName(getAppName());<NEW_LINE>ssoUrlBuilderOperation.setReqUrl(url);<NEW_LINE>ssoUrlBuilderOperation.setWorkspace(ref.getWorkspace().getWorkspaceName());<NEW_LINE>try {<NEW_LINE>visualisDownloadAction.setURL(ssoUrlBuilderOperation.getBuiltUrl());<NEW_LINE>HttpResult httpResult = this.ssoRequestOperation.requestWithSSO(ssoUrlBuilderOperation, visualisDownloadAction);<NEW_LINE>WidgetResultData responseData = BDPJettyServerHelper.gson().fromJson(IOUtils.toString(visualisDownloadAction.getInputStream()), WidgetResultData.class);<NEW_LINE>if (responseData.getData().getColumns().isEmpty()) {<NEW_LINE>ref.getExecutionRequestRefContext().appendLog("Cannot execute an empty Widget!");<NEW_LINE>throw new ExternalOperationFailedException(90176, "Cannot execute an empty Widget!", null);<NEW_LINE>}<NEW_LINE>for (WidgetResultData.Column columnData : responseData.getData().getColumns()) {<NEW_LINE>columns.add(new Column(columnData.getName(), DataType.toDataType(columnData.getType().toLowerCase()), ""));<NEW_LINE>}<NEW_LINE>ResultSetWriter resultSetWriter = ref.getExecutionRequestRefContext().createTableResultSetWriter();<NEW_LINE>resultSetWriter.addMetaData(new TableMetaData(columns.toArray(new Column[0])));<NEW_LINE>for (Map<String, Object> recordMap : responseData.getData().getResultList()) {<NEW_LINE>resultSetWriter.addRecord(new TableRecord(recordMap.values().toArray()));<NEW_LINE>}<NEW_LINE>resultSetWriter.flush();<NEW_LINE>IOUtils.closeQuietly(resultSetWriter);<NEW_LINE>ref.getExecutionRequestRefContext().sendResultSet(resultSetWriter);<NEW_LINE>} catch (Throwable e) {<NEW_LINE>ref.getExecutionRequestRefContext().appendLog("Failed to debug Widget url " + url);<NEW_LINE>ref.getExecutionRequestRefContext().appendLog(e.getMessage());<NEW_LINE>logger.error("executeWidget error:", e);<NEW_LINE>throw new ExternalOperationFailedException(90176, "Failed to debug Widget", e);<NEW_LINE>} finally {<NEW_LINE>IOUtils.closeQuietly(visualisDownloadAction.getInputStream());<NEW_LINE>}<NEW_LINE>return new VisualisCompletedExecutionResponseRef(200);<NEW_LINE>}
).appendLog("Ready to get result set from " + url);
695,631
protected void layout() {<NEW_LINE>TextFlow textFlow = (TextFlow) getFlowFigure();<NEW_LINE>String text = textFlow.getText();<NEW_LINE>List fragments = textFlow.getFragments();<NEW_LINE>Font font = textFlow.getFont();<NEW_LINE>TextFragmentBox fragment;<NEW_LINE>int i = 0;<NEW_LINE>int offset = 0;<NEW_LINE>FlowUtilities flowUtilities = textFlow.getFlowUtilities();<NEW_LINE>do {<NEW_LINE>nextLineBreak(text, offset);<NEW_LINE>fragment = getFragment(i++, fragments);<NEW_LINE>fragment.length = result - offset;<NEW_LINE>fragment.offset = offset;<NEW_LINE>fragment.setWidth(-1);<NEW_LINE>flowUtilities.setupFragment(fragment, font, text<MASK><NEW_LINE>getContext().addToCurrentLine(fragment);<NEW_LINE>getContext().endLine();<NEW_LINE>offset = result + delimeterLength;<NEW_LINE>} while (offset < text.length());<NEW_LINE>// Remove the remaining unused fragments.<NEW_LINE>while (i < fragments.size()) fragments.remove(i++);<NEW_LINE>}
.substring(offset, result));
1,351,989
protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws IOException, ServletException {<NEW_LINE>JsonObject input = InputParser.parseJsonObjectOrThrowError(req);<NEW_LINE>String refreshToken = InputParser.parseStringOrThrowError(input, "refreshToken", false);<NEW_LINE>String antiCsrfToken = InputParser.parseStringOrThrowError(input, "antiCsrfToken", true);<NEW_LINE>Boolean enableAntiCsrf = InputParser.parseBooleanOrThrowError(input, "enableAntiCsrf", false);<NEW_LINE>assert enableAntiCsrf != null;<NEW_LINE>assert refreshToken != null;<NEW_LINE>try {<NEW_LINE>SessionInformationHolder sessionInfo = Session.refreshSession(main, refreshToken, antiCsrfToken, enableAntiCsrf);<NEW_LINE>JsonObject result = new JsonParser().parse(new Gson().toJson(sessionInfo)).getAsJsonObject();<NEW_LINE>result.addProperty("status", "OK");<NEW_LINE>super.sendJsonResponse(200, result, resp);<NEW_LINE>} catch (StorageQueryException | StorageTransactionLogicException e) {<NEW_LINE>throw new ServletException(e);<NEW_LINE>} catch (UnauthorisedException e) {<NEW_LINE>Logging.debug(main, Utils.exceptionStacktraceToString(e));<NEW_LINE>JsonObject reply = new JsonObject();<NEW_LINE>reply.addProperty("status", "UNAUTHORISED");<NEW_LINE>reply.addProperty("message", e.getMessage());<NEW_LINE>super.sendJsonResponse(200, reply, resp);<NEW_LINE>} catch (TokenTheftDetectedException e) {<NEW_LINE>Logging.debug(main, Utils.exceptionStacktraceToString(e));<NEW_LINE>JsonObject reply = new JsonObject();<NEW_LINE><MASK><NEW_LINE>JsonObject session = new JsonObject();<NEW_LINE>session.addProperty("handle", e.sessionHandle);<NEW_LINE>session.addProperty("userId", e.userId);<NEW_LINE>reply.add("session", session);<NEW_LINE>super.sendJsonResponse(200, reply, resp);<NEW_LINE>}<NEW_LINE>}
reply.addProperty("status", "TOKEN_THEFT_DETECTED");
496,650
static public String typeIdToClass(String id) {<NEW_LINE>if (!id.startsWith("::")) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>StringBuilder buf = new StringBuilder(id.length());<NEW_LINE>for (int i = 0; i < _iceTypeIdPrefixes.length; ++i) {<NEW_LINE>if (id.startsWith(_iceTypeIdPrefixes[i])) {<NEW_LINE>buf.append("com.zeroc");<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>int start = 2;<NEW_LINE>boolean done = false;<NEW_LINE>while (!done) {<NEW_LINE>int end = id.indexOf(':', start);<NEW_LINE>String s;<NEW_LINE>if (end != -1) {<NEW_LINE>s = id.substring(start, end);<NEW_LINE>start = end + 2;<NEW_LINE>} else {<NEW_LINE><MASK><NEW_LINE>done = true;<NEW_LINE>}<NEW_LINE>if (buf.length() > 0) {<NEW_LINE>buf.append('.');<NEW_LINE>}<NEW_LINE>buf.append(fixKwd(s));<NEW_LINE>}<NEW_LINE>return buf.toString();<NEW_LINE>}
s = id.substring(start);
542,220
public int compareTo(update_response other) {<NEW_LINE>if (!getClass().equals(other.getClass())) {<NEW_LINE>return getClass().getName().compareTo(other.getClass().getName());<NEW_LINE>}<NEW_LINE>int lastComparison = 0;<NEW_LINE>lastComparison = java.lang.Boolean.valueOf(isSetError()).compareTo(other.isSetError());<NEW_LINE>if (lastComparison != 0) {<NEW_LINE>return lastComparison;<NEW_LINE>}<NEW_LINE>if (isSetError()) {<NEW_LINE>lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.error, other.error);<NEW_LINE>if (lastComparison != 0) {<NEW_LINE>return lastComparison;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>lastComparison = java.lang.Boolean.valueOf(isSetApp_id()).compareTo(other.isSetApp_id());<NEW_LINE>if (lastComparison != 0) {<NEW_LINE>return lastComparison;<NEW_LINE>}<NEW_LINE>if (isSetApp_id()) {<NEW_LINE>lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.app_id, other.app_id);<NEW_LINE>if (lastComparison != 0) {<NEW_LINE>return lastComparison;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>lastComparison = java.lang.Boolean.valueOf(isSetPartition_index()).compareTo(other.isSetPartition_index());<NEW_LINE>if (lastComparison != 0) {<NEW_LINE>return lastComparison;<NEW_LINE>}<NEW_LINE>if (isSetPartition_index()) {<NEW_LINE>lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.partition_index, other.partition_index);<NEW_LINE>if (lastComparison != 0) {<NEW_LINE>return lastComparison;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>lastComparison = java.lang.Boolean.valueOf(isSetDecree()).compareTo(other.isSetDecree());<NEW_LINE>if (lastComparison != 0) {<NEW_LINE>return lastComparison;<NEW_LINE>}<NEW_LINE>if (isSetDecree()) {<NEW_LINE>lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.decree, other.decree);<NEW_LINE>if (lastComparison != 0) {<NEW_LINE>return lastComparison;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>lastComparison = java.lang.Boolean.valueOf(isSetServer()).<MASK><NEW_LINE>if (lastComparison != 0) {<NEW_LINE>return lastComparison;<NEW_LINE>}<NEW_LINE>if (isSetServer()) {<NEW_LINE>lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.server, other.server);<NEW_LINE>if (lastComparison != 0) {<NEW_LINE>return lastComparison;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return 0;<NEW_LINE>}
compareTo(other.isSetServer());
1,298,386
public List<ActionEntity> listLogins(DateTime startAt, DateTime endAt, String display, String cursor, Integer perPage, Object sortBy) throws ApiException {<NEW_LINE>Object localVarPostBody = null;<NEW_LINE>// create path and map variables<NEW_LINE>String localVarPath = "/history/login";<NEW_LINE>// query params<NEW_LINE>List<Pair> localVarQueryParams = new ArrayList<Pair>();<NEW_LINE>Map<String, String> localVarHeaderParams = new HashMap<String, String>();<NEW_LINE>Map<String, Object> localVarFormParams = new HashMap<String, Object>();<NEW_LINE>localVarQueryParams.addAll(apiClient.parameterToPairs("", "start_at", startAt));<NEW_LINE>localVarQueryParams.addAll(apiClient.parameterToPairs("", "end_at", endAt));<NEW_LINE>localVarQueryParams.addAll(apiClient.parameterToPairs("", "display", display));<NEW_LINE>localVarQueryParams.addAll(apiClient.parameterToPairs("", "cursor", cursor));<NEW_LINE>localVarQueryParams.addAll(apiClient.parameterToPairs("", "per_page", perPage));<NEW_LINE>localVarQueryParams.addAll(apiClient.parameterToPairs<MASK><NEW_LINE>final String[] localVarAccepts = { "application/json" };<NEW_LINE>final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);<NEW_LINE>final String[] localVarContentTypes = {};<NEW_LINE>final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);<NEW_LINE>String[] localVarAuthNames = new String[] {};<NEW_LINE>GenericType<List<ActionEntity>> localVarReturnType = new GenericType<List<ActionEntity>>() {<NEW_LINE>};<NEW_LINE>return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);<NEW_LINE>}
("", "sort_by", sortBy));
1,102,459
private Object decodeObdData(Channel channel, SocketAddress remoteAddress, String sentence) {<NEW_LINE>Parser parser = new Parser(PATTERN_OBD_DATA, sentence);<NEW_LINE>if (!parser.matches()) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>DeviceSession deviceSession = getDeviceSession(channel, <MASK><NEW_LINE>if (deviceSession == null) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>Position position = new Position(getProtocolName());<NEW_LINE>position.setDeviceId(deviceSession.getDeviceId());<NEW_LINE>getLastLocation(position, parser.nextDateTime(Parser.DateTimeFormat.HMS_DMY));<NEW_LINE>for (String entry : parser.next().split(",")) {<NEW_LINE>String[] values = entry.split(":");<NEW_LINE>if (values.length == 2 && values[1].charAt(0) != 'X') {<NEW_LINE>position.add(ObdDecoder.decodeData(Integer.parseInt(values[0].substring(2), 16), Integer.parseInt(values[1], 16), true));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return position;<NEW_LINE>}
remoteAddress, parser.next());
1,734,852
private void generateU(int nu, int nct) {<NEW_LINE>for (int j = nct; j < nu; j++) {<NEW_LINE>for (int i = 0; i < m; i++) {<NEW_LINE>U[i][j] = 0.0;<NEW_LINE>}<NEW_LINE>U[j][j] = 1.0;<NEW_LINE>}<NEW_LINE>for (int k = nct - 1; k >= 0; k--) {<NEW_LINE>if (s[k] != 0.0) {<NEW_LINE>for (int j = k + 1; j < nu; j++) {<NEW_LINE>double t = 0;<NEW_LINE>for (int i = k; i < m; i++) {<NEW_LINE>final double<MASK><NEW_LINE>t += Ui[k] * Ui[j];<NEW_LINE>}<NEW_LINE>t /= -U[k][k];<NEW_LINE>for (int i = k; i < m; i++) {<NEW_LINE>final double[] Ui = U[i];<NEW_LINE>Ui[j] += t * Ui[k];<NEW_LINE>}<NEW_LINE>}<NEW_LINE>for (int i = k; i < m; i++) {<NEW_LINE>final double[] Ui = U[i];<NEW_LINE>Ui[k] = -Ui[k];<NEW_LINE>}<NEW_LINE>U[k][k] = 1.0 + U[k][k];<NEW_LINE>for (int i = 0; i < k - 1; i++) {<NEW_LINE>U[i][k] = 0.0;<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>for (int i = 0; i < m; i++) {<NEW_LINE>U[i][k] = 0.0;<NEW_LINE>}<NEW_LINE>U[k][k] = 1.0;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
[] Ui = U[i];
1,518,527
void assembleMessageParameters() {<NEW_LINE>final ByteBuffer paramsBuffer;<NEW_LINE>// We check if the model identifier value is within the range of a 16-bit value here. If it is then it is a sigmodel<NEW_LINE>final byte[] elementAddress = MeshAddress.addressIntToBytes(mElementAddress);<NEW_LINE>final byte[] subscriptionAddress = MeshParserUtils.uuidToBytes(labelUuid);<NEW_LINE>if (mModelIdentifier >= Short.MIN_VALUE && mModelIdentifier <= Short.MAX_VALUE) {<NEW_LINE>paramsBuffer = ByteBuffer.allocate(CONFIG_MODEL_SUBSCRIPTION_VIRTUAL_ADDRESS_DELETE_LENGTH<MASK><NEW_LINE>paramsBuffer.put(elementAddress[1]);<NEW_LINE>paramsBuffer.put(elementAddress[0]);<NEW_LINE>paramsBuffer.put(subscriptionAddress);<NEW_LINE>paramsBuffer.putShort((short) mModelIdentifier);<NEW_LINE>mParameters = paramsBuffer.array();<NEW_LINE>} else {<NEW_LINE>paramsBuffer = ByteBuffer.allocate(VENDOR_MODEL_SUBSCRIPTION_VIRTUAL_ADDRESS_DELETE_LENGTH).order(ByteOrder.LITTLE_ENDIAN);<NEW_LINE>paramsBuffer.put(elementAddress[1]);<NEW_LINE>paramsBuffer.put(elementAddress[0]);<NEW_LINE>paramsBuffer.put(subscriptionAddress);<NEW_LINE>final byte[] modelIdentifier = new byte[] { (byte) ((mModelIdentifier >> 24) & 0xFF), (byte) ((mModelIdentifier >> 16) & 0xFF), (byte) ((mModelIdentifier >> 8) & 0xFF), (byte) (mModelIdentifier & 0xFF) };<NEW_LINE>paramsBuffer.put(modelIdentifier[1]);<NEW_LINE>paramsBuffer.put(modelIdentifier[0]);<NEW_LINE>paramsBuffer.put(modelIdentifier[3]);<NEW_LINE>paramsBuffer.put(modelIdentifier[2]);<NEW_LINE>mParameters = paramsBuffer.array();<NEW_LINE>}<NEW_LINE>}
).order(ByteOrder.LITTLE_ENDIAN);
179,011
private void parse(AbstractCompiler compiler) {<NEW_LINE>RecordingReporterProxy reporter = new RecordingReporterProxy(compiler.getDefaultErrorReporter());<NEW_LINE>try {<NEW_LINE>ParserRunner.ParseResult result = ParserRunner.parse(sourceFile, sourceFile.getCode(), compiler.getParserConfig(sourceFile.isExtern() ? AbstractCompiler.ConfigContext.EXTERNS : AbstractCompiler.ConfigContext.DEFAULT), reporter);<NEW_LINE>root = result.ast;<NEW_LINE>features = result.features;<NEW_LINE>if (compiler.getOptions().preservesDetailedSourceInfo()) {<NEW_LINE>compiler.addComments(sourceFile.getName(), result.comments);<NEW_LINE>}<NEW_LINE>if (result.sourceMapURL != null && compiler.getOptions().resolveSourceMapAnnotations) {<NEW_LINE>boolean parseInline = compiler.getOptions().parseInlineSourceMaps;<NEW_LINE>SourceFile sourceMapSourceFile = SourceMapResolver.extractSourceMap(sourceFile, result.sourceMapURL, parseInline);<NEW_LINE>if (sourceMapSourceFile != null) {<NEW_LINE>compiler.addInputSourceMap(sourceFile.getName(), new SourceMapInput(sourceMapSourceFile));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} catch (IOException e) {<NEW_LINE>compiler.report(JSError.make(AbstractCompiler.READ_ERROR, sourceFile.getName(), e.getMessage()));<NEW_LINE>}<NEW_LINE>if (root == null) {<NEW_LINE>root = IR.script();<NEW_LINE>}<NEW_LINE>if (!reporter.errors.isEmpty() || !reporter.warnings.isEmpty()) {<NEW_LINE>ParseResult result = new ParseResult(ImmutableList.copyOf(reporter.errors), ImmutableList<MASK><NEW_LINE>root.putProp(Node.PARSE_RESULTS, result);<NEW_LINE>}<NEW_LINE>// Set the source name so that the compiler passes can track<NEW_LINE>// the source file and module.<NEW_LINE>root.setStaticSourceFile(sourceFile);<NEW_LINE>}
.copyOf(reporter.warnings));
365,378
private RexNode swapFilter(RexBuilder rexBuilder, LoptMultiJoin multiJoin, RelNode origLeft, RelNode origRight, RexNode condition) {<NEW_LINE>int nFieldsOnLeft = origLeft.getRowType().getFieldCount();<NEW_LINE>int nFieldsOnRight = origRight<MASK><NEW_LINE>int[] adjustments = new int[nFieldsOnLeft + nFieldsOnRight];<NEW_LINE>for (int i = 0; i < nFieldsOnLeft; i++) {<NEW_LINE>adjustments[i] = nFieldsOnRight;<NEW_LINE>}<NEW_LINE>for (int i = nFieldsOnLeft; i < (nFieldsOnLeft + nFieldsOnRight); i++) {<NEW_LINE>adjustments[i] = -nFieldsOnLeft;<NEW_LINE>}<NEW_LINE>condition = condition.accept(new RelOptUtil.RexInputConverter(rexBuilder, getJoinFields(multiJoin, origLeft, origRight), getJoinFields(multiJoin, origRight, origLeft), adjustments));<NEW_LINE>return condition;<NEW_LINE>}
.getRowType().getFieldCount();
1,585,232
private void operateInputParameter(Map<String, String> inputParameter, DataQualityTaskExecutionContext dataQualityTaskExecutionContext) {<NEW_LINE>DateTimeFormatter df = DateTimeFormatter.ofPattern(YYYY_MM_DD_HH_MM_SS);<NEW_LINE><MASK><NEW_LINE>String now = df.format(time);<NEW_LINE>inputParameter.put(RULE_ID, String.valueOf(dataQualityTaskExecutionContext.getRuleId()));<NEW_LINE>inputParameter.put(RULE_TYPE, String.valueOf(dataQualityTaskExecutionContext.getRuleType()));<NEW_LINE>inputParameter.put(RULE_NAME, ArgsUtils.wrapperSingleQuotes(dataQualityTaskExecutionContext.getRuleName()));<NEW_LINE>inputParameter.put(CREATE_TIME, ArgsUtils.wrapperSingleQuotes(now));<NEW_LINE>inputParameter.put(UPDATE_TIME, ArgsUtils.wrapperSingleQuotes(now));<NEW_LINE>inputParameter.put(PROCESS_DEFINITION_ID, String.valueOf(dqTaskExecutionContext.getProcessDefineId()));<NEW_LINE>inputParameter.put(PROCESS_INSTANCE_ID, String.valueOf(dqTaskExecutionContext.getProcessInstanceId()));<NEW_LINE>inputParameter.put(TASK_INSTANCE_ID, String.valueOf(dqTaskExecutionContext.getTaskInstanceId()));<NEW_LINE>if (StringUtils.isEmpty(inputParameter.get(DATA_TIME))) {<NEW_LINE>inputParameter.put(DATA_TIME, ArgsUtils.wrapperSingleQuotes(now));<NEW_LINE>}<NEW_LINE>if (StringUtils.isNotEmpty(inputParameter.get(REGEXP_PATTERN))) {<NEW_LINE>inputParameter.put(REGEXP_PATTERN, StringUtils.escapeJava(StringUtils.escapeJava(inputParameter.get(REGEXP_PATTERN))));<NEW_LINE>}<NEW_LINE>if (StringUtils.isNotEmpty(dataQualityTaskExecutionContext.getHdfsPath())) {<NEW_LINE>inputParameter.put(ERROR_OUTPUT_PATH, dataQualityTaskExecutionContext.getHdfsPath() + SLASH + dqTaskExecutionContext.getProcessDefineId() + UNDERLINE + dqTaskExecutionContext.getProcessInstanceId() + UNDERLINE + dqTaskExecutionContext.getTaskName());<NEW_LINE>} else {<NEW_LINE>inputParameter.put(ERROR_OUTPUT_PATH, "");<NEW_LINE>}<NEW_LINE>}
LocalDateTime time = LocalDateTime.now();
374,421
public synchronized JSONObject saveToJSONObject() {<NEW_LINE>JSONObject object = new JSONObject();<NEW_LINE>// Loop through every preference in the in-memory preference map<NEW_LINE>for (Map.Entry<String, Object> entry : prefs.entrySet()) {<NEW_LINE>JSONObject entryObj = new JSONObject();<NEW_LINE>Object value = entry.getValue();<NEW_LINE>// Determine the object's type<NEW_LINE>PrefType type = PrefType.fromObject(value);<NEW_LINE>if (type == PrefType.Float) {<NEW_LINE>value = value.toString();<NEW_LINE>} else if (type == PrefType.StringSet) {<NEW_LINE>JSONArray arrayObj = new JSONArray();<NEW_LINE>Set<String> casted = (Set<String>) value;<NEW_LINE>for (String item : casted) {<NEW_LINE>arrayObj.put(item);<NEW_LINE>}<NEW_LINE>value = arrayObj;<NEW_LINE>}<NEW_LINE>// Put the preference's type and value into a JSON object<NEW_LINE>entryObj.put(KEY_TYPE, type.name());<NEW_LINE>entryObj.put(KEY_VALUE, value);<NEW_LINE>object.put(<MASK><NEW_LINE>}<NEW_LINE>return object;<NEW_LINE>}
entry.getKey(), entryObj);
606,287
public void showTables(UUID roomId) {<NEW_LINE>this.roomId = roomId;<NEW_LINE>UUID chatRoomId = null;<NEW_LINE>if (SessionHandler.getSession() != null) {<NEW_LINE>btnQuickStartDuel.setVisible(SessionHandler.isTestMode());<NEW_LINE>btnQuickStartCommander.setVisible(SessionHandler.isTestMode());<NEW_LINE>btnQuickStartMCTS.setVisible(SessionHandler.isTestMode());<NEW_LINE>gameChooser.init();<NEW_LINE>chatRoomId = SessionHandler.getRoomChatId(roomId).orElse(null);<NEW_LINE>}<NEW_LINE>if (newTableDialog == null) {<NEW_LINE>newTableDialog = new NewTableDialog();<NEW_LINE>MageFrame.getDesktop().<MASK><NEW_LINE>}<NEW_LINE>if (newTournamentDialog == null) {<NEW_LINE>newTournamentDialog = new NewTournamentDialog();<NEW_LINE>MageFrame.getDesktop().add(newTournamentDialog, JLayeredPane.MODAL_LAYER);<NEW_LINE>}<NEW_LINE>if (joinTableDialog == null) {<NEW_LINE>joinTableDialog = new JoinTableDialog();<NEW_LINE>MageFrame.getDesktop().add(joinTableDialog, JLayeredPane.MODAL_LAYER);<NEW_LINE>}<NEW_LINE>if (chatRoomId != null) {<NEW_LINE>this.chatPanelMain.getUserChatPanel().connect(chatRoomId);<NEW_LINE>startUpdateTasks(true);<NEW_LINE>this.setVisible(true);<NEW_LINE>this.repaint();<NEW_LINE>} else {<NEW_LINE>hideTables();<NEW_LINE>}<NEW_LINE>// tableModel.setSession(session);<NEW_LINE>reloadServerMessages();<NEW_LINE>MageFrame.getUI().addButton(MageComponents.NEW_GAME_BUTTON, btnNewTable);<NEW_LINE>// divider locations have to be set with delay else values set are overwritten with system defaults<NEW_LINE>Executors.newSingleThreadScheduledExecutor().schedule(() -> restoreDividers(), 300, TimeUnit.MILLISECONDS);<NEW_LINE>}
add(newTableDialog, JLayeredPane.MODAL_LAYER);
218,709
final GetRunResult executeGetRun(GetRunRequest getRunRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(getRunRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<GetRunRequest> request = null;<NEW_LINE>Response<GetRunResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new GetRunRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(getRunRequest));<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, "Device Farm");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "GetRun");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<GetRunResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new GetRunResultJsonUnmarshaller());<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,170,773
public void deleteAtOffset(int offset) {<NEW_LINE>if (offset < 0) {<NEW_LINE>throw new IllegalArgumentException("Offset cannot be negative.");<NEW_LINE>}<NEW_LINE>if (offset > structLength) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>int index = Collections.binarySearch(components, Integer.valueOf<MASK><NEW_LINE>if (index < 0) {<NEW_LINE>if (offset == structLength) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>shiftOffsets(-index - 1, -1, -1);<NEW_LINE>} else {<NEW_LINE>// delete all components containing offset working backward from last such component<NEW_LINE>index = advanceToLastComponentContainingOffset(index, offset);<NEW_LINE>DataTypeComponentImpl dtc = components.get(index);<NEW_LINE>while (dtc.containsOffset(offset)) {<NEW_LINE>doDeleteWithComponentShift(index, false);<NEW_LINE>if (--index < 0) {<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>dtc = components.get(index);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>repack(false);<NEW_LINE>notifySizeChanged();<NEW_LINE>}
(offset), OffsetComparator.INSTANCE);
549,808
public Boolean checkingHeartBeat() {<NEW_LINE>Script cmd = new Script(vmActivityCheckPath, activityScriptTimeout.getStandardSeconds(), LOG);<NEW_LINE>cmd.add("-i", nfsStoragePool._poolIp);<NEW_LINE>cmd.add("-p", nfsStoragePool._poolMountSourcePath);<NEW_LINE>cmd.add("-m", nfsStoragePool._mountDestPath);<NEW_LINE>cmd.add("-h", hostIP);<NEW_LINE>cmd.add("-u", volumeUuidList);<NEW_LINE>cmd.add("-t", String.valueOf(String.valueOf(System.currentTimeMillis() / 1000)));<NEW_LINE>cmd.add("-d", String.valueOf(suspectTimeInSeconds));<NEW_LINE>OutputInterpreter.OneLineParser <MASK><NEW_LINE>String result = cmd.execute(parser);<NEW_LINE>String parsedLine = parser.getLine();<NEW_LINE>LOG.debug(String.format("Checking heart beat with KVMHAVMActivityChecker [{command=\"%s\", result: \"%s\", log: \"%s\", pool: \"%s\"}].", cmd.toString(), result, parsedLine, nfsStoragePool._poolIp));<NEW_LINE>if (result == null && parsedLine.contains("DEAD")) {<NEW_LINE>LOG.warn(String.format("Checking heart beat with KVMHAVMActivityChecker command [%s] returned [%s]. It is [%s]. It may cause a shutdown of host IP [%s].", cmd.toString(), result, parsedLine, hostIP));<NEW_LINE>return false;<NEW_LINE>} else {<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>}
parser = new OutputInterpreter.OneLineParser();
1,046,288
/* (non-Javadoc)<NEW_LINE>* @see com.webank.weid.rpc.generateHash<NEW_LINE>* #generateHash(T object)<NEW_LINE>*/<NEW_LINE>@Override<NEW_LINE>public <T> ResponseData<HashString> generateHash(T object) {<NEW_LINE>if (object == null) {<NEW_LINE>return new ResponseData<>(null, ErrorCode.ILLEGAL_INPUT);<NEW_LINE>}<NEW_LINE>if (object instanceof Hashable) {<NEW_LINE>ResponseData<String> hashResp <MASK><NEW_LINE>if (StringUtils.isEmpty(hashResp.getResult())) {<NEW_LINE>return new ResponseData<>(null, hashResp.getErrorCode(), hashResp.getErrorMessage());<NEW_LINE>}<NEW_LINE>return new ResponseData<>(new HashString(hashResp.getResult()), ErrorCode.SUCCESS);<NEW_LINE>}<NEW_LINE>if (object instanceof File) {<NEW_LINE>// This will convert all types of file into String stream<NEW_LINE>String rawData = convertFileToString((File) object);<NEW_LINE>if (StringUtils.isEmpty(rawData)) {<NEW_LINE>logger.error("Failed to convert file into String: {}", ((File) object).getName());<NEW_LINE>return new ResponseData<>(null, ErrorCode.ILLEGAL_INPUT);<NEW_LINE>}<NEW_LINE>return new ResponseData<>(new HashString(DataToolUtils.sha3(rawData)), ErrorCode.SUCCESS);<NEW_LINE>}<NEW_LINE>if (object instanceof String) {<NEW_LINE>if (StringUtils.isEmpty((String) object)) {<NEW_LINE>logger.error("Input String is blank, ignored..");<NEW_LINE>return new ResponseData<>(null, ErrorCode.ILLEGAL_INPUT);<NEW_LINE>}<NEW_LINE>return new ResponseData<>(new HashString(DataToolUtils.sha3((String) object)), ErrorCode.SUCCESS);<NEW_LINE>}<NEW_LINE>logger.error("Unsupported input object type: {}", object.getClass().getCanonicalName());<NEW_LINE>return new ResponseData<>(null, ErrorCode.ILLEGAL_INPUT);<NEW_LINE>}
= getHashValue((Hashable) object);
1,149,170
public RegisterThingResult registerThing(RegisterThingRequest registerThingRequest) throws AmazonServiceException, AmazonClientException {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(registerThingRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<RegisterThingRequest> request = null;<NEW_LINE>Response<RegisterThingResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new RegisterThingRequestMarshaller().marshall(registerThingRequest);<NEW_LINE>// Binds the request metrics to the current request.<NEW_LINE>request.setAWSRequestMetrics(awsRequestMetrics);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>Unmarshaller<RegisterThingResult, JsonUnmarshallerContext> unmarshaller = new RegisterThingResultJsonUnmarshaller();<NEW_LINE>JsonResponseHandler<RegisterThingResult> responseHandler = <MASK><NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.ClientExecuteTime);<NEW_LINE>endClientExecution(awsRequestMetrics, request, response, LOGGING_AWS_REQUEST_METRIC);<NEW_LINE>}<NEW_LINE>}
new JsonResponseHandler<RegisterThingResult>(unmarshaller);
498,721
private static String printParameters(JsComment jsComment) {<NEW_LINE>List<DocParameter> parameters = jsComment.getParameters();<NEW_LINE>if (!parameters.isEmpty()) {<NEW_LINE>StringBuilder sb = new StringBuilder(renderHeader(WRAPPER_HEADER, Bundle.JsDocumentationPrinter_title_parameters()));<NEW_LINE>// NOI18N<NEW_LINE>sb.append(TABLE_BEGIN);<NEW_LINE>for (DocParameter docParam : parameters) {<NEW_LINE>// NOI18N<NEW_LINE>String paramName = (docParam.getParamName() == null) ? "" : docParam.getParamName().getName();<NEW_LINE>// NOI18N<NEW_LINE>sb.append("<tr>\n");<NEW_LINE>// NOI18N<NEW_LINE>sb.append("<td valign=\"top\" style=\"margin-right:5px;\">").append(getStringFromTypes(docParam.getParamTypes())).append("</td>\n");<NEW_LINE>// NOI18N<NEW_LINE>sb.append("<td valign=\"top\" style=\"margin-right:5px;\"><b>").append(paramName).append("</b></td>\n");<NEW_LINE><MASK><NEW_LINE>if (docParam.isOptional()) {<NEW_LINE>if (docParam.getDefaultValue() == null || docParam.getDefaultValue().isEmpty()) {<NEW_LINE>// NOI18N<NEW_LINE>description = OPTIONAL_PARAMETER + "<br>" + description;<NEW_LINE>} else {<NEW_LINE>// NOI18N<NEW_LINE>description = String.format(OPTIONAL_PARAMETER_DEFAULT, docParam.getDefaultValue()) + "<br>" + description;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// NOI18N<NEW_LINE>sb.append("<td>").append(description).append("</td>\n");<NEW_LINE>// NOI18N<NEW_LINE>sb.append("</tr>\n");<NEW_LINE>}<NEW_LINE>// NOI18N<NEW_LINE>sb.append("</table>\n");<NEW_LINE>return sb.toString();<NEW_LINE>}<NEW_LINE>// NOI18N<NEW_LINE>return "";<NEW_LINE>}
String description = docParam.getParamDescription();
761,536
protected void writeLine() throws IOException {<NEW_LINE>switch(getMessageState()) {<NEW_LINE>case START:<NEW_LINE>if (getHelper().getLogger().isLoggable(Level.FINE)) {<NEW_LINE>getHelper().getLogger().log(Level.FINE, "Writing message to " + getConnection().getSocketAddress());<NEW_LINE>}<NEW_LINE>writeStartLine();<NEW_LINE>setMessageState(MessageState.HEADERS);<NEW_LINE>break;<NEW_LINE>case HEADERS:<NEW_LINE>if (getHeaders() == null) {<NEW_LINE>setHeaders(new Series<Header>(Header.class));<NEW_LINE>setHeaderIndex(0);<NEW_LINE>addHeaders(getHeaders());<NEW_LINE>}<NEW_LINE>if (getHeaderIndex() < getHeaders().size()) {<NEW_LINE>// Write header<NEW_LINE>Header header = getHeaders().get(getHeaderIndex());<NEW_LINE>getLineBuilder().append(header.getName());<NEW_LINE>getLineBuilder().append(": ");<NEW_LINE>getLineBuilder().append(header.getValue());<NEW_LINE>// CR<NEW_LINE>getLineBuilder().append('\r');<NEW_LINE>// LF<NEW_LINE>getLineBuilder().append('\n');<NEW_LINE>// Move to the next header<NEW_LINE><MASK><NEW_LINE>} else {<NEW_LINE>// Write the end of the headers section<NEW_LINE>// CR<NEW_LINE>getLineBuilder().append('\r');<NEW_LINE>// LF<NEW_LINE>getLineBuilder().append('\n');<NEW_LINE>onHeadersCompleted();<NEW_LINE>}<NEW_LINE>break;<NEW_LINE>default:<NEW_LINE>// Nothing to do<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}
setHeaderIndex(getHeaderIndex() + 1);
1,262,094
public static void fillAppInfo() {<NEW_LINE>try {<NEW_LINE>// ActivityThread activityThread = new ActivityThread();<NEW_LINE>Class<?> <MASK><NEW_LINE>Constructor<?> activityThreadConstructor = activityThreadClass.getDeclaredConstructor();<NEW_LINE>activityThreadConstructor.setAccessible(true);<NEW_LINE>Object activityThread = activityThreadConstructor.newInstance();<NEW_LINE>// ActivityThread.sCurrentActivityThread = activityThread;<NEW_LINE>Field sCurrentActivityThreadField = activityThreadClass.getDeclaredField("sCurrentActivityThread");<NEW_LINE>sCurrentActivityThreadField.setAccessible(true);<NEW_LINE>sCurrentActivityThreadField.set(null, activityThread);<NEW_LINE>// ActivityThread.AppBindData appBindData = new ActivityThread.AppBindData();<NEW_LINE>Class<?> appBindDataClass = Class.forName("android.app.ActivityThread$AppBindData");<NEW_LINE>Constructor<?> appBindDataConstructor = appBindDataClass.getDeclaredConstructor();<NEW_LINE>appBindDataConstructor.setAccessible(true);<NEW_LINE>Object appBindData = appBindDataConstructor.newInstance();<NEW_LINE>ApplicationInfo applicationInfo = new ApplicationInfo();<NEW_LINE>applicationInfo.packageName = "com.genymobile.scrcpy";<NEW_LINE>// appBindData.appInfo = applicationInfo;<NEW_LINE>Field appInfoField = appBindDataClass.getDeclaredField("appInfo");<NEW_LINE>appInfoField.setAccessible(true);<NEW_LINE>appInfoField.set(appBindData, applicationInfo);<NEW_LINE>// activityThread.mBoundApplication = appBindData;<NEW_LINE>Field mBoundApplicationField = activityThreadClass.getDeclaredField("mBoundApplication");<NEW_LINE>mBoundApplicationField.setAccessible(true);<NEW_LINE>mBoundApplicationField.set(activityThread, appBindData);<NEW_LINE>// Context ctx = activityThread.getSystemContext();<NEW_LINE>Method getSystemContextMethod = activityThreadClass.getDeclaredMethod("getSystemContext");<NEW_LINE>Context ctx = (Context) getSystemContextMethod.invoke(activityThread);<NEW_LINE>Application app = Instrumentation.newApplication(Application.class, ctx);<NEW_LINE>// activityThread.mInitialApplication = app;<NEW_LINE>Field mInitialApplicationField = activityThreadClass.getDeclaredField("mInitialApplication");<NEW_LINE>mInitialApplicationField.setAccessible(true);<NEW_LINE>mInitialApplicationField.set(activityThread, app);<NEW_LINE>} catch (Throwable throwable) {<NEW_LINE>// this is a workaround, so failing is not an error<NEW_LINE>Ln.d("Could not fill app info: " + throwable.getMessage());<NEW_LINE>}<NEW_LINE>}
activityThreadClass = Class.forName("android.app.ActivityThread");
1,444,177
private Mono<PagedResponse<WorkloadNetworkPublicIpInner>> listPublicIPsNextSinglePageAsync(String nextLink) {<NEW_LINE>if (nextLink == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));<NEW_LINE>}<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>final String accept = "application/json";<NEW_LINE>return FluxUtil.withContext(context -> service.listPublicIPsNext(nextLink, this.client.getEndpoint(), accept, context)).<PagedResponse<WorkloadNetworkPublicIpInner>>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)).contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext(<MASK><NEW_LINE>}
)).readOnly()));
1,362,924
public ServerGroupValidationConfiguration unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>ServerGroupValidationConfiguration serverGroupValidationConfiguration = new ServerGroupValidationConfiguration();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>JsonToken token = context.getCurrentToken();<NEW_LINE>if (token == null)<NEW_LINE>token = context.nextToken();<NEW_LINE>if (token == VALUE_NULL) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>while (true) {<NEW_LINE>if (token == null)<NEW_LINE>break;<NEW_LINE>if (token == FIELD_NAME || token == START_OBJECT) {<NEW_LINE>if (context.testExpression("serverGroupId", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>serverGroupValidationConfiguration.setServerGroupId(context.getUnmarshaller(String.class).unmarshall(context));<NEW_LINE>}<NEW_LINE>if (context.testExpression("serverValidationConfigurations", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>serverGroupValidationConfiguration.setServerValidationConfigurations(new ListUnmarshaller<ServerValidationConfiguration>(ServerValidationConfigurationJsonUnmarshaller.getInstance(<MASK><NEW_LINE>}<NEW_LINE>} else if (token == END_ARRAY || token == END_OBJECT) {<NEW_LINE>if (context.getLastParsedParentElement() == null || context.getLastParsedParentElement().equals(currentParentElement)) {<NEW_LINE>if (context.getCurrentDepth() <= originalDepth)<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>token = context.nextToken();<NEW_LINE>}<NEW_LINE>return serverGroupValidationConfiguration;<NEW_LINE>}
)).unmarshall(context));
184,970
/* Build call for tiersTierLevelTierNameGet */<NEW_LINE>private com.squareup.okhttp.Call tiersTierLevelTierNameGetCall(String tierName, String tierLevel, String accept, String ifNoneMatch, String ifModifiedSince, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {<NEW_LINE>Object localVarPostBody = null;<NEW_LINE>// create path and map variables<NEW_LINE>String localVarPath = "/tiers/{tierLevel}/{tierName}".replaceAll("\\{format\\}", "json").replaceAll("\\{" + "tierName" + "\\}", apiClient.escapeString(tierName.toString())).replaceAll("\\{" + "tierLevel" + "\\}", apiClient.escapeString(tierLevel.toString()));<NEW_LINE>List<Pair> localVarQueryParams <MASK><NEW_LINE>Map<String, String> localVarHeaderParams = new HashMap<String, String>();<NEW_LINE>if (accept != null)<NEW_LINE>localVarHeaderParams.put("Accept", apiClient.parameterToString(accept));<NEW_LINE>if (ifNoneMatch != null)<NEW_LINE>localVarHeaderParams.put("If-None-Match", apiClient.parameterToString(ifNoneMatch));<NEW_LINE>if (ifModifiedSince != null)<NEW_LINE>localVarHeaderParams.put("If-Modified-Since", apiClient.parameterToString(ifModifiedSince));<NEW_LINE>Map<String, Object> localVarFormParams = new HashMap<String, Object>();<NEW_LINE>final String[] localVarAccepts = { "application/json" };<NEW_LINE>final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);<NEW_LINE>if (localVarAccept != null)<NEW_LINE>localVarHeaderParams.put("Accept", localVarAccept);<NEW_LINE>final String[] localVarContentTypes = { "application/json" };<NEW_LINE>final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);<NEW_LINE>localVarHeaderParams.put("Content-Type", localVarContentType);<NEW_LINE>if (progressListener != null) {<NEW_LINE>apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {<NEW_LINE>com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());<NEW_LINE>return originalResponse.newBuilder().body(new ProgressResponseBody(originalResponse.body(), progressListener)).build();<NEW_LINE>}<NEW_LINE>});<NEW_LINE>}<NEW_LINE>String[] localVarAuthNames = new String[] {};<NEW_LINE>return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);<NEW_LINE>}
= new ArrayList<Pair>();
182,944
private int merge(int[] nums, int l, int r) {<NEW_LINE>if (l == r) {<NEW_LINE>return 0;<NEW_LINE>}<NEW_LINE>int mid = (l + r) >> 1;<NEW_LINE>int cnt = merge(nums, l, mid);<NEW_LINE>cnt += merge(nums, mid + 1, r);<NEW_LINE>int[] tmp = new int[r - l + 1];<NEW_LINE>int i = l, j = mid + 1;<NEW_LINE>int k = 0;<NEW_LINE>int n = mid + 1;<NEW_LINE>for (int m = l; m <= mid; m++) {<NEW_LINE>for (; n <= r; n++) {<NEW_LINE>if (nums[m] > 2L * nums[n]) {<NEW_LINE>cnt += mid - m + 1;<NEW_LINE>} else {<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>while (i <= mid && j <= r) {<NEW_LINE>tmp[k++] = nums[i] > nums[j] ? nums[j++] : nums[i++];<NEW_LINE>}<NEW_LINE>if (i <= mid) {<NEW_LINE>System.arraycopy(nums, i, tmp, k, mid - i + 1);<NEW_LINE>}<NEW_LINE>if (j <= r) {<NEW_LINE>System.arraycopy(nums, j, tmp, k, r - j + 1);<NEW_LINE>}<NEW_LINE>System.arraycopy(tmp, 0, <MASK><NEW_LINE>return cnt;<NEW_LINE>}
nums, l, tmp.length);
361,797
private static void checksumFromLuceneFile(Directory directory, String file, Map<String, StoreFileMetadata> builder, Logger logger, Version version, boolean readFileAsHash) throws IOException {<NEW_LINE>final String checksum;<NEW_LINE>final BytesRefBuilder fileHash = new BytesRefBuilder();<NEW_LINE>try (IndexInput in = directory.openInput(file, IOContext.READONCE)) {<NEW_LINE>final long length;<NEW_LINE>try {<NEW_LINE>length = in.length();<NEW_LINE>if (length < CodecUtil.footerLength()) {<NEW_LINE>// truncated files trigger IAE if we seek negative... these files are really corrupted though<NEW_LINE>throw new CorruptIndexException("Can't retrieve checksum from file: " + file + " file length must be >= " + CodecUtil.footerLength() + " but was: " + in.length(), in);<NEW_LINE>}<NEW_LINE>if (readFileAsHash) {<NEW_LINE>// additional safety we checksum the entire file we read the hash for...<NEW_LINE>final <MASK><NEW_LINE>hashFile(fileHash, new InputStreamIndexInput(verifyingIndexInput, length), length);<NEW_LINE>checksum = digestToString(verifyingIndexInput.verify());<NEW_LINE>} else {<NEW_LINE>checksum = digestToString(CodecUtil.retrieveChecksum(in));<NEW_LINE>}<NEW_LINE>} catch (Exception ex) {<NEW_LINE>logger.debug(() -> new ParameterizedMessage("Can retrieve checksum from file [{}]", file), ex);<NEW_LINE>throw ex;<NEW_LINE>}<NEW_LINE>builder.put(file, new StoreFileMetadata(file, length, checksum, version, fileHash.get()));<NEW_LINE>}<NEW_LINE>}
VerifyingIndexInput verifyingIndexInput = new VerifyingIndexInput(in);
1,049,136
final ListPipelineParametersForExecutionResult executeListPipelineParametersForExecution(ListPipelineParametersForExecutionRequest listPipelineParametersForExecutionRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listPipelineParametersForExecutionRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<ListPipelineParametersForExecutionRequest> request = null;<NEW_LINE>Response<ListPipelineParametersForExecutionResult> response = null;<NEW_LINE>try {<NEW_LINE><MASK><NEW_LINE>try {<NEW_LINE>request = new ListPipelineParametersForExecutionRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listPipelineParametersForExecutionRequest));<NEW_LINE>// Binds the request metrics to the current request.<NEW_LINE>request.setAWSRequestMetrics(awsRequestMetrics);<NEW_LINE>request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);<NEW_LINE>request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SERVICE_ID, "SageMaker");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListPipelineParametersForExecution");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<ListPipelineParametersForExecutionResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListPipelineParametersForExecutionResultJsonUnmarshaller());<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);
816,505
public void onClick(View view) {<NEW_LINE>super.onClick(view);<NEW_LINE>AlertDialog.Builder builder = new <MASK><NEW_LINE>builder.setTitle(R.string.superuser_access);<NEW_LINE>String[] items = new String[] { getString(R.string.access_disabled), getString(R.string.apps_only), getString(R.string.adb_only), getString(R.string.apps_and_adb) };<NEW_LINE>builder.setItems(items, new OnClickListener() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void onClick(DialogInterface dialog, int which) {<NEW_LINE>switch(which) {<NEW_LINE>case 0:<NEW_LINE>Settings.setSuperuserAccess(Settings.SUPERUSER_ACCESS_DISABLED);<NEW_LINE>break;<NEW_LINE>case 1:<NEW_LINE>Settings.setSuperuserAccess(Settings.SUPERUSER_ACCESS_APPS_ONLY);<NEW_LINE>break;<NEW_LINE>case 2:<NEW_LINE>Settings.setSuperuserAccess(Settings.SUPERUSER_ACCESS_ADB_ONLY);<NEW_LINE>break;<NEW_LINE>case 3:<NEW_LINE>Settings.setSuperuserAccess(Settings.SUPERUSER_ACCESS_APPS_AND_ADB);<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>update();<NEW_LINE>}<NEW_LINE>});<NEW_LINE>builder.create().show();<NEW_LINE>}
AlertDialog.Builder(getActivity());
300,854
// DO NOT MODIFY THIS CODE, GENERATED AUTOMATICALLY<NEW_LINE>public static com.sun.jdi.event.EventIterator eventIterator(com.sun.jdi.event.EventSet a) throws org.netbeans.modules.debugger.jpda.jdi.InternalExceptionWrapper, org.netbeans.modules.debugger.jpda.jdi.VMDisconnectedExceptionWrapper {<NEW_LINE>if (org.netbeans.modules.debugger.jpda.JDIExceptionReporter.isLoggable()) {<NEW_LINE>org.netbeans.modules.debugger.jpda.JDIExceptionReporter.logCallStart("com.sun.jdi.event.EventSet", "eventIterator", "JDI CALL: com.sun.jdi.event.EventSet({0}).eventIterator()", <MASK><NEW_LINE>}<NEW_LINE>Object retValue = null;<NEW_LINE>try {<NEW_LINE>com.sun.jdi.event.EventIterator ret;<NEW_LINE>ret = a.eventIterator();<NEW_LINE>retValue = ret;<NEW_LINE>return ret;<NEW_LINE>} catch (com.sun.jdi.InternalException ex) {<NEW_LINE>retValue = ex;<NEW_LINE>org.netbeans.modules.debugger.jpda.JDIExceptionReporter.report(ex);<NEW_LINE>throw new org.netbeans.modules.debugger.jpda.jdi.InternalExceptionWrapper(ex);<NEW_LINE>} catch (com.sun.jdi.VMDisconnectedException ex) {<NEW_LINE>retValue = ex;<NEW_LINE>if (a instanceof com.sun.jdi.Mirror) {<NEW_LINE>com.sun.jdi.VirtualMachine vm = ((com.sun.jdi.Mirror) a).virtualMachine();<NEW_LINE>try {<NEW_LINE>vm.dispose();<NEW_LINE>} catch (com.sun.jdi.VMDisconnectedException vmdex) {<NEW_LINE>}<NEW_LINE>}<NEW_LINE>throw new org.netbeans.modules.debugger.jpda.jdi.VMDisconnectedExceptionWrapper(ex);<NEW_LINE>} catch (Error err) {<NEW_LINE>retValue = err;<NEW_LINE>throw err;<NEW_LINE>} catch (RuntimeException rex) {<NEW_LINE>retValue = rex;<NEW_LINE>throw rex;<NEW_LINE>} finally {<NEW_LINE>if (org.netbeans.modules.debugger.jpda.JDIExceptionReporter.isLoggable()) {<NEW_LINE>org.netbeans.modules.debugger.jpda.JDIExceptionReporter.logCallEnd("com.sun.jdi.event.EventSet", "eventIterator", retValue);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
new Object[] { a });
1,705,082
public static VariantContext addAlleleAndSiteFilters(VariantContext vc, List<Set<String>> newAlleleFilters, boolean invalidatePreviousFilters) {<NEW_LINE>if (newAlleleFilters.isEmpty()) {<NEW_LINE>return vc;<NEW_LINE>}<NEW_LINE>List<List<String>> currentAlleleFilters = decodeASFilters(vc);<NEW_LINE>if (!currentAlleleFilters.isEmpty() && newAlleleFilters.size() != currentAlleleFilters.size()) {<NEW_LINE>// log an error<NEW_LINE>return vc;<NEW_LINE>}<NEW_LINE>if (currentAlleleFilters.isEmpty() || invalidatePreviousFilters) {<NEW_LINE>currentAlleleFilters = new ArrayList<>(Collections.nCopies(newAlleleFilters.size(), Collections.<MASK><NEW_LINE>}<NEW_LINE>ListIterator<List<String>> currentAlleleFiltersIt = currentAlleleFilters.listIterator();<NEW_LINE>List<List<String>> updatedAlleleFilters = newAlleleFilters.stream().map(newfilters -> addAlleleFilters(currentAlleleFiltersIt.next(), newfilters.stream().collect(Collectors.toList()))).collect(Collectors.toList());<NEW_LINE>String encodedFilters = encodeASFilters(updatedAlleleFilters);<NEW_LINE>VariantContextBuilder vcb = new VariantContextBuilder(vc).attribute(GATKVCFConstants.AS_FILTER_STATUS_KEY, encodedFilters);<NEW_LINE>if (invalidatePreviousFilters) {<NEW_LINE>vcb.unfiltered();<NEW_LINE>}<NEW_LINE>Set<String> siteFiltersToAdd = newAlleleFilters.stream().skip(1).collect(() -> new HashSet<>(newAlleleFilters.get(0)), Set::retainAll, Set::retainAll);<NEW_LINE>siteFiltersToAdd.stream().forEach(filter -> vcb.filter(filter));<NEW_LINE>if ((vcb.getFilters() == null || vcb.getFilters().isEmpty()) && !invalidatePreviousFilters) {<NEW_LINE>vcb.passFilters();<NEW_LINE>}<NEW_LINE>return vcb.make();<NEW_LINE>}
singletonList(GATKVCFConstants.SITE_LEVEL_FILTERS)));
55,794
private void generateCodeFile(Task task, Document document, Map<String, String> parameters, String outputFileName, Transformer transformer) throws TransformerFactoryConfigurationError, FileNotFoundException, TransformerException {<NEW_LINE>if (parameters != null) {<NEW_LINE>for (Map.Entry<String, String> entry : parameters.entrySet()) {<NEW_LINE>transformer.setParameter(entry.getKey(), entry.getValue());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>File outputFile = new File(outputFileName);<NEW_LINE>if (!outputFile.getParentFile().exists()) {<NEW_LINE>outputFile<MASK><NEW_LINE>}<NEW_LINE>if (outputFile.exists()) {<NEW_LINE>if (!task.isOverwrite()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (outputFile.lastModified() > task.getSpecificationLastModified()) {<NEW_LINE>logDebug("Skipping file " + outputFile.getName());<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>logDebug("spec has mod " + task.getSpecificationLastModified() + " output has mod " + outputFile.lastModified());<NEW_LINE>DOMSource source = new DOMSource(document);<NEW_LINE>FileOutputStream fos = new FileOutputStream(outputFile);<NEW_LINE>BufferedOutputStream bos = new BufferedOutputStream(fos);<NEW_LINE>try {<NEW_LINE>StreamResult result = new StreamResult(bos);<NEW_LINE>transformer.transform(source, result);<NEW_LINE>} finally {<NEW_LINE>try {<NEW_LINE>bos.close();<NEW_LINE>} catch (IOException ioe) {<NEW_LINE>logError("error closing " + outputFile, ioe);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
.getParentFile().mkdirs();
533,133
public ObjectInspector initialize(ObjectInspector[] args) throws UDFArgumentException {<NEW_LINE>if (args.length < 2) {<NEW_LINE>throw new UDFArgumentException("Usage: combine takes 2 or more maps or lists, and combines the result");<NEW_LINE>}<NEW_LINE>ObjectInspector first = args[0];<NEW_LINE>this.category = first.getCategory();<NEW_LINE>if (category == Category.LIST) {<NEW_LINE>this.listInspectorList = new ListObjectInspector[args.length];<NEW_LINE>this.listInspectorList<MASK><NEW_LINE>for (int i = 1; i < args.length; ++i) {<NEW_LINE>ObjectInspector argInsp = args[i];<NEW_LINE>if (!ObjectInspectorUtils.compareTypes(first, argInsp)) {<NEW_LINE>throw new UDFArgumentException("Combine must either be all maps or all lists of the same type");<NEW_LINE>}<NEW_LINE>this.listInspectorList[i] = (ListObjectInspector) argInsp;<NEW_LINE>}<NEW_LINE>this.stdListInspector = (StandardListObjectInspector) ObjectInspectorUtils.getStandardObjectInspector(first, ObjectInspectorUtils.ObjectInspectorCopyOption.JAVA);<NEW_LINE>return stdListInspector;<NEW_LINE>} else if (category == Category.MAP) {<NEW_LINE>this.mapInspectorList = new MapObjectInspector[args.length];<NEW_LINE>this.mapInspectorList[0] = (MapObjectInspector) first;<NEW_LINE>for (int i = 1; i < args.length; ++i) {<NEW_LINE>ObjectInspector argInsp = args[i];<NEW_LINE>if (!ObjectInspectorUtils.compareTypes(first, argInsp)) {<NEW_LINE>throw new UDFArgumentException("Combine must either be all maps or all lists of the same type");<NEW_LINE>}<NEW_LINE>this.mapInspectorList[i] = (MapObjectInspector) argInsp;<NEW_LINE>}<NEW_LINE>this.stdMapInspector = (StandardMapObjectInspector) ObjectInspectorUtils.getStandardObjectInspector(first, ObjectInspectorUtils.ObjectInspectorCopyOption.JAVA);<NEW_LINE>return stdMapInspector;<NEW_LINE>} else {<NEW_LINE>throw new UDFArgumentException(" combine only takes maps or lists.");<NEW_LINE>}<NEW_LINE>}
[0] = (ListObjectInspector) first;
1,654,596
public boolean createStructure(Level world, BlockPos pos, Direction side, Player player) {<NEW_LINE>GlobalWireNetwork globalNet = GlobalWireNetwork.getNetwork(world);<NEW_LINE>// Check<NEW_LINE>BlockState stateHere = world.getBlockState(pos);<NEW_LINE>if (stateHere.hasProperty(FACING_ALL))<NEW_LINE>side = stateHere.getValue(FACING_ALL);<NEW_LINE>WireType wire = checkValidConnector(world, pos, globalNet, side);<NEW_LINE>if (wire == null)<NEW_LINE>return false;<NEW_LINE>BlockPos middlePos = pos.relative(side);<NEW_LINE>BlockState middle = world.getBlockState(middlePos);<NEW_LINE>if (!middle.getShape(world, pos).equals(Shapes.block()) || middle.getBlock().hasTileEntity(middle) || middle.getRenderShape() != RenderShape.MODEL)<NEW_LINE>return false;<NEW_LINE>BlockPos otherPos = pos.relative(side, 2);<NEW_LINE>WireType otherWire = checkValidConnector(world, otherPos, globalNet, side.getOpposite());<NEW_LINE>if (otherWire != wire)<NEW_LINE>return false;<NEW_LINE>LocalWireNetwork localHere = globalNet.getLocalNet(pos);<NEW_LINE>ConnectionPoint cpHere = localHere.getConnector(pos).getConnectionPoints().iterator().next();<NEW_LINE>Collection<Connection> connsHere = localHere.getConnections(cpHere);<NEW_LINE>LocalWireNetwork localOther = globalNet.getLocalNet(otherPos);<NEW_LINE>ConnectionPoint cpOther = localOther.getConnector(otherPos).getConnectionPoints().iterator().next();<NEW_LINE>Collection<Connection> connsOther = localOther.getConnections(cpOther);<NEW_LINE>if (connsOther.stream().anyMatch(c -> c.isEnd(cpHere)))<NEW_LINE>return false;<NEW_LINE>for (Connection c : connsOther) {<NEW_LINE>ConnectionPoint otherEnd = c.getOtherEnd(cpOther);<NEW_LINE>if (connsHere.stream().anyMatch(c2 -> c2.isEnd(otherEnd)))<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>// Form<NEW_LINE>if (!world.isClientSide) {<NEW_LINE>BlockState state = Connectors.feedthrough.defaultBlockState().setValue(FACING_ALL, side);<NEW_LINE>BlockPos <MASK><NEW_LINE>FeedthroughTileEntity master = setBlock(world, masterPos, state, wire, middle, 0);<NEW_LINE>if (master != null) {<NEW_LINE>moveConnectionsToMaster(connsOther, cpOther, world, master.getPositivePoint());<NEW_LINE>moveConnectionsToMaster(connsHere, cpHere, world, master.getNegativePoint());<NEW_LINE>}<NEW_LINE>setBlock(world, pos, state, wire, middle, -1);<NEW_LINE>setBlock(world, pos.relative(side, 2), state, wire, middle, 1);<NEW_LINE>}<NEW_LINE>return true;<NEW_LINE>}
masterPos = pos.relative(side);
934,146
public static void storeSettingsToPom(FileObject projectFile, final String name, final String value) {<NEW_LINE>final ModelOperation<POMModel> operation = new ModelOperation<POMModel>() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void performOperation(POMModel model) {<NEW_LINE>Properties props = model.getProject().getProperties();<NEW_LINE>if (props == null) {<NEW_LINE>props = model.getFactory().createProperties();<NEW_LINE>model.getProject().setProperties(props);<NEW_LINE>}<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>};<NEW_LINE>// NOI18N<NEW_LINE>final FileObject pom = projectFile.getFileObject("pom.xml");<NEW_LINE>try {<NEW_LINE>pom.getFileSystem().runAtomicAction(new FileSystem.AtomicAction() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void run() throws IOException {<NEW_LINE>Utilities.performPOMModelOperations(pom, Collections.singletonList(operation));<NEW_LINE>}<NEW_LINE>});<NEW_LINE>} catch (IOException ex) {<NEW_LINE>Exceptions.printStackTrace(ex);<NEW_LINE>}<NEW_LINE>}
props.setProperty(name, value);
1,777,990
synchronized long minTranslogGenRequired(List<TranslogReader> readers, TranslogWriter writer) throws IOException {<NEW_LINE>long minByLocks = getMinTranslogGenRequiredByLocks();<NEW_LINE>long minByAge = getMinTranslogGenByAge(readers, writer, retentionAgeInMillis, currentTime());<NEW_LINE>long minBySize = getMinTranslogGenBySize(readers, writer, retentionSizeInBytes);<NEW_LINE>final long minByAgeAndSize;<NEW_LINE>if (minBySize == Long.MIN_VALUE && minByAge == Long.MIN_VALUE) {<NEW_LINE>// both size and age are disabled;<NEW_LINE>minByAgeAndSize = Long.MAX_VALUE;<NEW_LINE>} else {<NEW_LINE>minByAgeAndSize = Math.max(minByAge, minBySize);<NEW_LINE>}<NEW_LINE>long minByNumFiles = <MASK><NEW_LINE>return Math.min(Math.max(minByAgeAndSize, minByNumFiles), Math.min(minByLocks, minTranslogGenerationForRecovery));<NEW_LINE>}
getMinTranslogGenByTotalFiles(readers, writer, retentionTotalFiles);
1,117,000
public void refilter() {<NEW_LINE>if (filter == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (filter.eventUpdate != null) {<NEW_LINE>filter.eventUpdate.cancel();<NEW_LINE>filter.text = filter.nextText;<NEW_LINE>filter.checker.filterSet(filter.text);<NEW_LINE>}<NEW_LINE>filter.eventUpdate = null;<NEW_LINE>boolean changed = false;<NEW_LINE>synchronized (rows_sync) {<NEW_LINE>DATASOURCETYPE[] unfilteredArray = (DATASOURCETYPE[]) listUnfilteredDataSources.keySet().toArray();<NEW_LINE>if (DEBUGADDREMOVE) {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>if (getFilterSubRows()) {<NEW_LINE>for (Iterator<TableRowCore> iter = sortedRows.iterator(); iter.hasNext(); ) {<NEW_LINE>TableRowCore row = iter.next();<NEW_LINE>for (TableRowCore sr : row.getSubRowsWithNull()) {<NEW_LINE>if (sr.refilter()) {<NEW_LINE>changed = true;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>Collection<DATASOURCETYPE> existing = getDataSources();<NEW_LINE>List<DATASOURCETYPE> listRemoves = new ArrayList<>();<NEW_LINE>List<DATASOURCETYPE> listAdds = new ArrayList<>();<NEW_LINE>for (DATASOURCETYPE dst : unfilteredArray) {<NEW_LINE>boolean bHave = existing.contains(dst);<NEW_LINE>boolean isOurs;<NEW_LINE>try {<NEW_LINE>isOurs = filter.checker.filterCheck(dst, filter.text, filter.regex);<NEW_LINE>} catch (PatternSyntaxException e) {<NEW_LINE>// get this with malformed filter regex, ignore<NEW_LINE>isOurs = true;<NEW_LINE>}<NEW_LINE>if (!isOurs) {<NEW_LINE>if (bHave) {<NEW_LINE>listRemoves.add(dst);<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>if (!bHave) {<NEW_LINE>listAdds.add(dst);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (listRemoves.size() > 0) {<NEW_LINE>removeDataSources((DATASOURCETYPE[]) listRemoves.toArray());<NEW_LINE>}<NEW_LINE>if (listAdds.size() > 0) {<NEW_LINE>addDataSources((DATASOURCETYPE[]) listAdds.toArray(), true);<NEW_LINE>}<NEW_LINE>// add back the ones removeDataSources removed<NEW_LINE>for (DATASOURCETYPE ds : listRemoves) {<NEW_LINE>listUnfilteredDataSources.put(ds, "");<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (changed) {<NEW_LINE>tableMutated();<NEW_LINE>redrawTable();<NEW_LINE>}<NEW_LINE>processDataSourceQueue();<NEW_LINE>}
debug("filter: unfilteredArray is " + unfilteredArray.length);
166,612
public void marshall(ComplianceItem complianceItem, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (complianceItem == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(complianceItem.getComplianceType(), COMPLIANCETYPE_BINDING);<NEW_LINE>protocolMarshaller.marshall(complianceItem.getResourceType(), RESOURCETYPE_BINDING);<NEW_LINE>protocolMarshaller.marshall(complianceItem.getResourceId(), RESOURCEID_BINDING);<NEW_LINE>protocolMarshaller.marshall(complianceItem.getId(), ID_BINDING);<NEW_LINE>protocolMarshaller.marshall(complianceItem.getTitle(), TITLE_BINDING);<NEW_LINE>protocolMarshaller.marshall(<MASK><NEW_LINE>protocolMarshaller.marshall(complianceItem.getSeverity(), SEVERITY_BINDING);<NEW_LINE>protocolMarshaller.marshall(complianceItem.getExecutionSummary(), EXECUTIONSUMMARY_BINDING);<NEW_LINE>protocolMarshaller.marshall(complianceItem.getDetails(), DETAILS_BINDING);<NEW_LINE>} catch (Exception e) {<NEW_LINE>throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e);<NEW_LINE>}<NEW_LINE>}
complianceItem.getStatus(), STATUS_BINDING);
942,986
public int compareTo(Compacting other) {<NEW_LINE>if (!getClass().equals(other.getClass())) {<NEW_LINE>return getClass().getName().compareTo(other.getClass().getName());<NEW_LINE>}<NEW_LINE>int lastComparison = 0;<NEW_LINE>lastComparison = java.lang.Boolean.compare(isSetRunning(), other.isSetRunning());<NEW_LINE>if (lastComparison != 0) {<NEW_LINE>return lastComparison;<NEW_LINE>}<NEW_LINE>if (isSetRunning()) {<NEW_LINE>lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.running, other.running);<NEW_LINE>if (lastComparison != 0) {<NEW_LINE>return lastComparison;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>lastComparison = java.lang.Boolean.compare(isSetQueued(), other.isSetQueued());<NEW_LINE>if (lastComparison != 0) {<NEW_LINE>return lastComparison;<NEW_LINE>}<NEW_LINE>if (isSetQueued()) {<NEW_LINE>lastComparison = org.apache.thrift.TBaseHelper.compareTo(<MASK><NEW_LINE>if (lastComparison != 0) {<NEW_LINE>return lastComparison;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return 0;<NEW_LINE>}
this.queued, other.queued);
1,251,430
public FileVisitResult preVisitDirectory(Path path, BasicFileAttributes attrs) throws IOException {<NEW_LINE>// Do not traverse the bazel-* convenience symlinks. On windows these are created as<NEW_LINE>// junctions.<NEW_LINE>if (isWindows && attrs.isOther()) {<NEW_LINE>return FileVisitResult.SKIP_SUBTREE;<NEW_LINE>}<NEW_LINE>// It's important that we register the directory before we visit its children. This way we<NEW_LINE>// are guaranteed to see new files/directories either on this #getDiff or the next one.<NEW_LINE>// Otherwise, e.g., an intra-build creation of a child directory will be forever missed if it<NEW_LINE>// happens before the directory is listed as part of the visitation.<NEW_LINE>Preconditions.checkState(path.isAbsolute(), path);<NEW_LINE>WatchKey key = path.register(watchService, StandardWatchEventKinds.ENTRY_CREATE, <MASK><NEW_LINE>watchKeyToDirBiMap.put(key, path);<NEW_LINE>visitedAbsolutePaths.add(path);<NEW_LINE>return FileVisitResult.CONTINUE;<NEW_LINE>}
StandardWatchEventKinds.ENTRY_MODIFY, StandardWatchEventKinds.ENTRY_DELETE);
599,437
private void license(File file) throws IOException {<NEW_LINE>String fileName = file.getAbsolutePath();<NEW_LINE>boolean isJava = fileName.endsWith(".java");<NEW_LINE>boolean isJSP = fileName.endsWith(".jsp");<NEW_LINE>boolean other = !(isJava || isJSP);<NEW_LINE>BufferedReader in = new BufferedReader(new FileReader(file));<NEW_LINE>//<NEW_LINE>File tmpFile <MASK><NEW_LINE>BufferedWriter out = new BufferedWriter(new FileWriter(tmpFile, false));<NEW_LINE>out.write(COPYRIGHT);<NEW_LINE>boolean found = false;<NEW_LINE>String line = null;<NEW_LINE>int lineNo = 0;<NEW_LINE>while ((line = in.readLine()) != null) {<NEW_LINE>lineNo++;<NEW_LINE>if (!found) {<NEW_LINE>if (line.startsWith("package ") && isJava)<NEW_LINE>found = true;<NEW_LINE>}<NEW_LINE>if (found) {<NEW_LINE>out.write(line);<NEW_LINE>out.newLine();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// while reading file<NEW_LINE>//<NEW_LINE>in.close();<NEW_LINE>out.close();<NEW_LINE>//<NEW_LINE>if (found) {<NEW_LINE>File oldFile = new File(fileName + ".old");<NEW_LINE>if (file.renameTo(oldFile)) {<NEW_LINE>if (tmpFile.renameTo(new File(fileName))) {<NEW_LINE>if (oldFile.delete()) {<NEW_LINE>// System.out.println (" - File updated: " + fileName);<NEW_LINE>} else<NEW_LINE>System.err.println(" - Old File not deleted - " + fileName);<NEW_LINE>} else<NEW_LINE>System.err.println(" - New File not renamed - " + fileName);<NEW_LINE>} else<NEW_LINE>System.err.println(" - Old File not renamed - " + fileName);<NEW_LINE>} else {<NEW_LINE>System.err.println(" - No Copyright - " + fileName);<NEW_LINE>if (!tmpFile.delete())<NEW_LINE>System.err.println(" - Temp file not deleted - " + tmpFile.getAbsolutePath());<NEW_LINE>}<NEW_LINE>}
= new File(fileName + ".tmp");
615,328
private SqlNode visitOneLiteral(SqlLiteral literal) {<NEW_LINE>if (autoIncrementColumn != curFieldIndex) {<NEW_LINE>return SqlNode.clone(literal);<NEW_LINE>}<NEW_LINE>boolean shouldReplace = false;<NEW_LINE>long value = 0;<NEW_LINE>SqlTypeFamily typeFamily = literal<MASK><NEW_LINE>switch(typeFamily) {<NEW_LINE>case NUMERIC:<NEW_LINE>case EXACT_NUMERIC:<NEW_LINE>value = literal.getValueAs(Long.class);<NEW_LINE>if (value == 0) {<NEW_LINE>shouldReplace = true;<NEW_LINE>} else {<NEW_LINE>returnedLastInsertId = value;<NEW_LINE>}<NEW_LINE>break;<NEW_LINE>case NULL:<NEW_LINE>shouldReplace = true;<NEW_LINE>break;<NEW_LINE>default:<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>if (shouldReplace) {<NEW_LINE>Long nextVal = assignImplicitValue(true);<NEW_LINE>return SqlLiteral.createExactNumeric(String.valueOf(nextVal), literal.getParserPosition());<NEW_LINE>} else {<NEW_LINE>String schema = schemaName;<NEW_LINE>if (schema == null) {<NEW_LINE>schema = DefaultSchema.getSchemaName();<NEW_LINE>}<NEW_LINE>SequenceManagerProxy.getInstance().updateValue(schema, seqName, value);<NEW_LINE>return SqlNode.clone(literal);<NEW_LINE>}<NEW_LINE>}
.getTypeName().getFamily();
998,601
private void initSchedulerFactory(StdSchedulerFactory schedulerFactory) throws SchedulerException, IOException {<NEW_LINE>Properties mergedProps = new Properties();<NEW_LINE>if (this.resourceLoader != null) {<NEW_LINE>mergedProps.setProperty(StdSchedulerFactory.PROP_SCHED_CLASS_LOAD_HELPER_CLASS, ResourceLoaderClassLoadHelper.class.getName());<NEW_LINE>}<NEW_LINE>if (this.taskExecutor != null) {<NEW_LINE>mergedProps.setProperty(StdSchedulerFactory.PROP_THREAD_POOL_CLASS, LocalTaskExecutorThreadPool.class.getName());<NEW_LINE>} else {<NEW_LINE>// Set necessary default properties here, as Quartz will not apply<NEW_LINE>// its default configuration when explicitly given properties.<NEW_LINE>mergedProps.setProperty(StdSchedulerFactory.PROP_THREAD_POOL_CLASS, SimpleThreadPool.class.getName());<NEW_LINE>mergedProps.setProperty(PROP_THREAD_COUNT, Integer.toString(DEFAULT_THREAD_COUNT));<NEW_LINE>}<NEW_LINE>if (this.configLocation != null) {<NEW_LINE>if (logger.isDebugEnabled()) {<NEW_LINE>logger.debug("Loading Quartz config from [" + this.configLocation + "]");<NEW_LINE>}<NEW_LINE>PropertiesLoaderUtils.<MASK><NEW_LINE>}<NEW_LINE>CollectionUtils.mergePropertiesIntoMap(this.quartzProperties, mergedProps);<NEW_LINE>if (this.dataSource != null) {<NEW_LINE>mergedProps.putIfAbsent(StdSchedulerFactory.PROP_JOB_STORE_CLASS, LocalDataSourceJobStore.class.getName());<NEW_LINE>}<NEW_LINE>// Determine scheduler name across local settings and Quartz properties...<NEW_LINE>if (this.schedulerName != null) {<NEW_LINE>mergedProps.setProperty(StdSchedulerFactory.PROP_SCHED_INSTANCE_NAME, this.schedulerName);<NEW_LINE>} else {<NEW_LINE>String nameProp = mergedProps.getProperty(StdSchedulerFactory.PROP_SCHED_INSTANCE_NAME);<NEW_LINE>if (nameProp != null) {<NEW_LINE>this.schedulerName = nameProp;<NEW_LINE>} else if (this.beanName != null) {<NEW_LINE>mergedProps.setProperty(StdSchedulerFactory.PROP_SCHED_INSTANCE_NAME, this.beanName);<NEW_LINE>this.schedulerName = this.beanName;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>schedulerFactory.initialize(mergedProps);<NEW_LINE>}
fillProperties(mergedProps, this.configLocation);