idx
int32
46
1.86M
input
stringlengths
321
6.6k
target
stringlengths
9
1.24k
750,878
int send(final long nowNs) {<NEW_LINE>final long senderPosition = this.senderPosition.get();<NEW_LINE>final int activeTermId = computeTermIdFromPosition(senderPosition, positionBitsToShift, initialTermId);<NEW_LINE>final int termOffset = (int) senderPosition & termLengthMask;<NEW_LINE>if (!hasInitialConnection || isSetupElicited) {<NEW_LINE>setupMessageCheck(nowNs, activeTermId, termOffset);<NEW_LINE>}<NEW_LINE>int bytesSent = sendData(nowNs, senderPosition, termOffset);<NEW_LINE>if (0 == bytesSent) {<NEW_LINE>bytesSent = heartbeatMessageCheck(nowNs, activeTermId, termOffset, signalEos && isEndOfStream);<NEW_LINE>if (spiesSimulateConnection && hasSpies && !hasReceivers) {<NEW_LINE><MASK><NEW_LINE>this.senderPosition.setOrdered(newSenderPosition);<NEW_LINE>senderLimit.setOrdered(flowControl.onIdle(nowNs, newSenderPosition, newSenderPosition, isEndOfStream));<NEW_LINE>} else {<NEW_LINE>senderLimit.setOrdered(flowControl.onIdle(nowNs, senderLimit.get(), senderPosition, isEndOfStream));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>updateHasReceivers(nowNs);<NEW_LINE>retransmitHandler.processTimeouts(nowNs, this);<NEW_LINE>return bytesSent;<NEW_LINE>}
final long newSenderPosition = maxSpyPosition(senderPosition);
830,262
private void findMemberType(@Nullable String name, Collection<IClass> result) throws CompileException {<NEW_LINE>// Search for a type with the given name in the current class.<NEW_LINE>IClass[] memberTypes = this.getDeclaredIClasses();<NEW_LINE>if (name == null) {<NEW_LINE>result.addAll(Arrays.asList(memberTypes));<NEW_LINE>} else {<NEW_LINE>String memberDescriptor = Descriptor.fromClassName(Descriptor.toClassName(this.getDescriptor()) + '$' + name);<NEW_LINE>for (final IClass mt : memberTypes) {<NEW_LINE>if (mt.getDescriptor().equals(memberDescriptor)) {<NEW_LINE>result.add(mt);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// Examine superclass.<NEW_LINE>{<NEW_LINE>IClass superclass = this.getSuperclass();<NEW_LINE>if (superclass != null)<NEW_LINE>superclass.findMemberType(name, result);<NEW_LINE>}<NEW_LINE>// Examine interfaces.<NEW_LINE>for (IClass i : this.getInterfaces()) i.findMemberType(name, result);<NEW_LINE>// Examine enclosing type declarations.<NEW_LINE>{<NEW_LINE><MASK><NEW_LINE>IClass outerIClass = this.getOuterIClass();<NEW_LINE>if (declaringIClass != null) {<NEW_LINE>declaringIClass.findMemberType(name, result);<NEW_LINE>}<NEW_LINE>if (outerIClass != null && outerIClass != declaringIClass) {<NEW_LINE>outerIClass.findMemberType(name, result);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
IClass declaringIClass = this.getDeclaringIClass();
501,374
List<IScanIssue> doScan(IHttpRequestResponse baseRequestResponse, IScannerInsertionPoint insertionPoint) {<NEW_LINE>// don't scan POST<NEW_LINE>if (baseRequestResponse.getRequest()[0] == 'P') {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>// set value to canary<NEW_LINE>String canary = Utilities.generateCanary();<NEW_LINE>String fullValue = insertionPoint.getBaseValue() + canary;<NEW_LINE>byte[] poison = insertionPoint.buildRequest(fullValue.getBytes());<NEW_LINE>// convert to POST<NEW_LINE>poison = Utilities.helpers.toggleRequestMethod(poison);<NEW_LINE>poison = Utilities.fixContentLength(Utilities.replaceFirst(poison, canary.getBytes(), (canary).getBytes()));<NEW_LINE>// convert method back to GET<NEW_LINE>poison = Utilities.setMethod(poison, "GET");<NEW_LINE>poison = Utilities.addOrReplaceHeader(poison, "X-HTTP-Method-Override", "POST");<NEW_LINE>poison = Utilities.addOrReplaceHeader(poison, "X-HTTP-Method", "POST");<NEW_LINE>poison = Utilities.addOrReplaceHeader(poison, "X-Method-Override", "POST");<NEW_LINE>poison = Utilities.addCacheBuster(poison, Utilities.generateCanary());<NEW_LINE>IHttpService service = baseRequestResponse.getHttpService();<NEW_LINE>Resp resp = request(service, poison);<NEW_LINE>byte[] response = resp.getReq().getResponse();<NEW_LINE>if (Utilities.containsBytes(response, canary.getBytes())) {<NEW_LINE>recordCandidateFound();<NEW_LINE>// report("Fat-GET body reflection", canary, resp);<NEW_LINE>for (int i = 0; i < 5; i++) {<NEW_LINE>request(service, poison);<NEW_LINE>}<NEW_LINE>// String toReplace = insertionPoint.getInsertionPointName()+"="+fullValue;<NEW_LINE>String toReplace = canary;<NEW_LINE>byte[] getPoison = Utilities.fixContentLength(Utilities.replaceFirst(poison, toReplace.getBytes()<MASK><NEW_LINE>// byte[] getPoison = baseRequestResponse.getRequest();<NEW_LINE>// getPoison = Utilities.appendToQuery(getPoison, "x="+cacheBuster);<NEW_LINE>Resp poisonedResp = request(service, getPoison);<NEW_LINE>if (Utilities.containsBytes(poisonedResp.getReq().getResponse(), canary.getBytes())) {<NEW_LINE>report("Web Cache Poisoning via Fat GET", "The application lets users pass parameters in the body of GET requests, but does not include them in the cache key. This was confirmed by injecting the value " + canary + " using the " + insertionPoint.getInsertionPointName() + " parameter, then replaying the request without the injected value, and confirming it still appears in the response.<br><br>For further information on this technique, please refer to https://portswigger.net/research/web-cache-entanglement", resp, poisonedResp);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return null;<NEW_LINE>}
, "".getBytes()));
1,150,097
final DescribePoliciesResult executeDescribePolicies(DescribePoliciesRequest describePoliciesRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(describePoliciesRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<DescribePoliciesRequest> request = null;<NEW_LINE>Response<DescribePoliciesResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new DescribePoliciesRequestMarshaller().marshall(super.beforeMarshalling(describePoliciesRequest));<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, "Auto Scaling");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DescribePolicies");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>StaxResponseHandler<DescribePoliciesResult> responseHandler = new StaxResponseHandler<<MASK><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>}
DescribePoliciesResult>(new DescribePoliciesResultStaxUnmarshaller());
538,580
public Metric unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>Metric metric = new Metric();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE><MASK><NEW_LINE>if (token == null)<NEW_LINE>token = context.nextToken();<NEW_LINE>if (token == VALUE_NULL) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>while (true) {<NEW_LINE>if (token == null)<NEW_LINE>break;<NEW_LINE>if (token == FIELD_NAME || token == START_OBJECT) {<NEW_LINE>if (context.testExpression("expression", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>metric.setExpression(context.getUnmarshaller(String.class).unmarshall(context));<NEW_LINE>}<NEW_LINE>if (context.testExpression("variables", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>metric.setVariables(new ListUnmarshaller<ExpressionVariable>(ExpressionVariableJsonUnmarshaller.getInstance()).unmarshall(context));<NEW_LINE>}<NEW_LINE>if (context.testExpression("window", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>metric.setWindow(MetricWindowJsonUnmarshaller.getInstance().unmarshall(context));<NEW_LINE>}<NEW_LINE>if (context.testExpression("processingConfig", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>metric.setProcessingConfig(MetricProcessingConfigJsonUnmarshaller.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 metric;<NEW_LINE>}
JsonToken token = context.getCurrentToken();
1,336,656
public static void main(String[] args) throws IOException {<NEW_LINE>DslJson<Object> dslJson = new DslJson<>();<NEW_LINE>Model instance = new Model();<NEW_LINE>instance.abstractProperty = new AbstractClass.ImmutableImplementation(5, "DSL");<NEW_LINE>instance.abstractList = Arrays.asList(new AbstractClass.RecursiveClass(1, "speed", Arrays.asList(new AbstractClass.ImmutableImplementation(5, "DSLList"))), null, new AbstractClass.MutableImplementation().number(2).setName("features"));<NEW_LINE>instance.ifaceProperty = new Interface.ImmutableImplementation(6, "JSON");<NEW_LINE>instance.ifaceList = Arrays.asList(null, new Interface.ImmutableImplementation(1, "type safety"), new Interface.MutableImplementation().number(<MASK><NEW_LINE>ByteArrayOutputStream os = new ByteArrayOutputStream();<NEW_LINE>// To get a pretty JSON output PrettifyOutputStream wrapper can be used<NEW_LINE>dslJson.serialize(instance, new PrettifyOutputStream(os));<NEW_LINE>byte[] bytes = os.toByteArray();<NEW_LINE>System.out.println(os);<NEW_LINE>// deserialization using Stream API<NEW_LINE>Model deser = dslJson.deserialize(Model.class, new ByteArrayInputStream(bytes));<NEW_LINE>System.out.println(deser.abstractProperty.getName());<NEW_LINE>}
2).setName("transparency"));
487,928
protected void doSSTORE() {<NEW_LINE>if (program.isStaticCall() && program.getActivations().isActive(RSKIP91)) {<NEW_LINE>throw <MASK><NEW_LINE>}<NEW_LINE>if (computeGas) {<NEW_LINE>DataWord newValue = stack.get(stack.size() - 2);<NEW_LINE>DataWord oldValue = program.storageLoad(stack.peek());<NEW_LINE>// From null to non-zero<NEW_LINE>if (oldValue == null && !newValue.isZero()) {<NEW_LINE>gasCost = GasCost.SET_SSTORE;<NEW_LINE>} else // from non-zero to zero<NEW_LINE>if (oldValue != null && newValue.isZero()) {<NEW_LINE>// todo: GASREFUND counter policyn<NEW_LINE>// refund step cost policy.<NEW_LINE>program.futureRefundGas(GasCost.REFUND_SSTORE);<NEW_LINE>gasCost = GasCost.CLEAR_SSTORE;<NEW_LINE>} else // from zero to zero, or from non-zero to non-zero<NEW_LINE>{<NEW_LINE>gasCost = GasCost.RESET_SSTORE;<NEW_LINE>}<NEW_LINE>spendOpCodeGas();<NEW_LINE>}<NEW_LINE>// EXECUTION PHASE<NEW_LINE>DataWord addr = program.stackPop();<NEW_LINE>DataWord value = program.stackPop();<NEW_LINE>if (isLogEnabled) {<NEW_LINE>hint = "[" + program.getOwnerAddress() + "] key: " + addr + " value: " + value;<NEW_LINE>}<NEW_LINE>program.storageSave(addr, value);<NEW_LINE>program.step();<NEW_LINE>}
Program.ExceptionHelper.modificationException(program);
643,882
public void update() {<NEW_LINE>try {<NEW_LINE>((IdEObjectImpl) serverInfo).setUuid(bimServer.getUuid());<NEW_LINE>if (bimServer.getVersionChecker() != null) {<NEW_LINE>serverInfo.setVersion(bimServer.getSConverter().convertFromSObject(bimServer.getVersionChecker().getLocalVersion()));<NEW_LINE>}<NEW_LINE>} catch (BimserverDatabaseException e) {<NEW_LINE>LOGGER.error("", e);<NEW_LINE>}<NEW_LINE>if (bimServer.getDatabase().getMigrator().migrationRequired()) {<NEW_LINE>setServerState(ServerState.MIGRATION_REQUIRED);<NEW_LINE>if (bimServer.getConfig().isAutoMigrate()) {<NEW_LINE>try {<NEW_LINE>bimServer.getDatabase().getMigrator().migrate();<NEW_LINE>setServerState(ServerState.SETUP);<NEW_LINE>} catch (MigrationException | InconsistentModelsException e) {<NEW_LINE>LOGGER.error("", e);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} else if (bimServer.getDatabase().getMigrator().migrationImpossible()) {<NEW_LINE>setServerState(ServerState.MIGRATION_IMPOSSIBLE);<NEW_LINE>} else {<NEW_LINE>DatabaseSession session = bimServer.getDatabase(<MASK><NEW_LINE>try {<NEW_LINE>boolean adminFound = false;<NEW_LINE>ServerSettings settings = bimServer.getServerSettingsCache().getServerSettings();<NEW_LINE>IfcModelInterface users = session.getAllOfType(StorePackage.eINSTANCE.getUser(), OldQuery.getDefault());<NEW_LINE>for (IdEObject idEObject : users.getValues()) {<NEW_LINE>if (idEObject instanceof User) {<NEW_LINE>User user = (User) idEObject;<NEW_LINE>if (user.getUserType() == UserType.ADMIN) {<NEW_LINE>adminFound = true;<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (settings.getSiteAddress().isEmpty() || !adminFound) {<NEW_LINE>setServerState(ServerState.NOT_SETUP);<NEW_LINE>} else {<NEW_LINE>setServerState(ServerState.RUNNING);<NEW_LINE>}<NEW_LINE>} catch (BimserverDatabaseException e) {<NEW_LINE>LOGGER.error("", e);<NEW_LINE>} finally {<NEW_LINE>session.close();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
).createSession(OperationType.READ_ONLY);
1,056,749
final EnableMFADeviceResult executeEnableMFADevice(EnableMFADeviceRequest enableMFADeviceRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(enableMFADeviceRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<EnableMFADeviceRequest> request = null;<NEW_LINE>Response<EnableMFADeviceResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new EnableMFADeviceRequestMarshaller().marshall<MASK><NEW_LINE>// Binds the request metrics to the current request.<NEW_LINE>request.setAWSRequestMetrics(awsRequestMetrics);<NEW_LINE>request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);<NEW_LINE>request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SERVICE_ID, "IAM");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "EnableMFADevice");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>StaxResponseHandler<EnableMFADeviceResult> responseHandler = new StaxResponseHandler<EnableMFADeviceResult>(new EnableMFADeviceResultStaxUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
(super.beforeMarshalling(enableMFADeviceRequest));
1,685,052
public void createIfNotExistsCodeSnippets() {<NEW_LINE>// BEGIN: com.azure.storage.blob.BlobContainerClient.createIfNotExists<NEW_LINE><MASK><NEW_LINE>System.out.println("Create completed: " + result);<NEW_LINE>// END: com.azure.storage.blob.BlobContainerClient.createIfNotExists<NEW_LINE>// BEGIN: com.azure.storage.blob.BlobContainerClient.createIfNotExistsWithResponse#BlobContainerCreateOptions-Duration-Context<NEW_LINE>Map<String, String> metadata = Collections.singletonMap("metadata", "value");<NEW_LINE>Context context = new Context("Key", "Value");<NEW_LINE>BlobContainerCreateOptions options = new BlobContainerCreateOptions().setMetadata(metadata).setPublicAccessType(PublicAccessType.CONTAINER);<NEW_LINE>Response<Void> response = client.createIfNotExistsWithResponse(options, timeout, context);<NEW_LINE>if (response.getStatusCode() == 409) {<NEW_LINE>System.out.println("Already existed.");<NEW_LINE>} else {<NEW_LINE>System.out.printf("Create completed with status %d%n", response.getStatusCode());<NEW_LINE>}<NEW_LINE>// END: com.azure.storage.blob.BlobContainerClient.createIfNotExistsWithResponse#BlobContainerCreateOptions-Duration-Context<NEW_LINE>}
boolean result = client.createIfNotExists();
99,826
private void determineMainSize(@FlexDirection int flexDirection, int widthMeasureSpec, int heightMeasureSpec) {<NEW_LINE>int mainSize;<NEW_LINE>int paddingAlongMainAxis;<NEW_LINE>switch(flexDirection) {<NEW_LINE>// Intentional fall through<NEW_LINE>case FLEX_DIRECTION_ROW:<NEW_LINE>case FLEX_DIRECTION_ROW_REVERSE:<NEW_LINE>int <MASK><NEW_LINE>int widthSize = MeasureSpec.getSize(widthMeasureSpec);<NEW_LINE>if (widthMode == MeasureSpec.EXACTLY) {<NEW_LINE>mainSize = widthSize;<NEW_LINE>} else {<NEW_LINE>mainSize = getLargestMainSize();<NEW_LINE>}<NEW_LINE>paddingAlongMainAxis = getPaddingLeft() + getPaddingRight();<NEW_LINE>break;<NEW_LINE>// Intentional fall through<NEW_LINE>case FLEX_DIRECTION_COLUMN:<NEW_LINE>case FLEX_DIRECTION_COLUMN_REVERSE:<NEW_LINE>int heightMode = MeasureSpec.getMode(heightMeasureSpec);<NEW_LINE>int heightSize = MeasureSpec.getSize(heightMeasureSpec);<NEW_LINE>if (heightMode == MeasureSpec.EXACTLY) {<NEW_LINE>mainSize = heightSize;<NEW_LINE>} else {<NEW_LINE>mainSize = getLargestMainSize();<NEW_LINE>}<NEW_LINE>paddingAlongMainAxis = getPaddingTop() + getPaddingBottom();<NEW_LINE>break;<NEW_LINE>default:<NEW_LINE>throw new IllegalArgumentException("Invalid flex direction: " + flexDirection);<NEW_LINE>}<NEW_LINE>int childIndex = 0;<NEW_LINE>for (FlexLine flexLine : mFlexLines) {<NEW_LINE>if (flexLine.mMainSize < mainSize) {<NEW_LINE>childIndex = expandFlexItems(flexLine, flexDirection, mainSize, paddingAlongMainAxis, childIndex);<NEW_LINE>} else {<NEW_LINE>childIndex = shrinkFlexItems(flexLine, flexDirection, mainSize, paddingAlongMainAxis, childIndex);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
widthMode = MeasureSpec.getMode(widthMeasureSpec);
164,039
public static Expr parse(Query query, String s, boolean checkAllUsed) {<NEW_LINE>try {<NEW_LINE>Reader in = new StringReader(s);<NEW_LINE><MASK><NEW_LINE>parser.setQuery(query);<NEW_LINE>Expr expr = parser.Expression();<NEW_LINE>if (checkAllUsed) {<NEW_LINE>Token t = parser.getNextToken();<NEW_LINE>if (t.kind != ARQParserTokenManager.EOF)<NEW_LINE>throw new QueryParseException("Extra tokens beginning \"" + t.image + "\" starting line " + t.beginLine + ", column " + t.beginColumn, t.beginLine, t.beginColumn);<NEW_LINE>}<NEW_LINE>return expr;<NEW_LINE>} catch (ParseException ex) {<NEW_LINE>throw new QueryParseException(ex.getMessage(), ex.currentToken.beginLine, ex.currentToken.beginLine);<NEW_LINE>} catch (TokenMgrError tErr) {<NEW_LINE>throw new QueryParseException(tErr.getMessage(), -1, -1);<NEW_LINE>} catch (Error err) {<NEW_LINE>// The token stream can throw java.lang.Error's<NEW_LINE>String tmp = err.getMessage();<NEW_LINE>if (tmp == null)<NEW_LINE>throw new QueryParseException(err, -1, -1);<NEW_LINE>throw new QueryParseException(tmp, -1, -1);<NEW_LINE>}<NEW_LINE>}
ARQParser parser = new ARQParser(in);
964,616
protected JdbcIndex convertIndex(Map<String, Object> recordMap) {<NEW_LINE>JdbcIndex jdbcIndex = new JdbcIndex();<NEW_LINE>jdbcIndex.setTableCatalog(safeToString(recordMap.get("TABLE_CAT")));<NEW_LINE>jdbcIndex.setTableSchema(safeToString(recordMap.get("TABLE_SCHEM")));<NEW_LINE>jdbcIndex.setTableName(safeToString(recordMap.get("TABLE_NAME")));<NEW_LINE>jdbcIndex.setName(safeToString(recordMap.get("INDEX_NAME")));<NEW_LINE>jdbcIndex.setUnique(!safeToBoolean(recordMap.get("NON_UNIQUE")));<NEW_LINE>//<NEW_LINE>jdbcIndex.setIndexType(JdbcIndexType.valueOfCode(safeToInteger(recordMap.get("TYPE"))));<NEW_LINE>jdbcIndex.setIndexQualifier(safeToString(recordMap.get("INDEX_QUALIFIER")));<NEW_LINE>jdbcIndex.setCardinality(safeToLong(recordMap.get("CARDINALITY")));<NEW_LINE>jdbcIndex.setPages(safeToLong(<MASK><NEW_LINE>jdbcIndex.setFilterCondition(safeToString(recordMap.get("FILTER_CONDITION")));<NEW_LINE>//<NEW_LINE>String columnName = safeToString(recordMap.get("COLUMN_NAME"));<NEW_LINE>String ascOrDesc = safeToString(recordMap.get("ASC_OR_DESC"));<NEW_LINE>jdbcIndex.getColumns().add(columnName);<NEW_LINE>jdbcIndex.getStorageType().put(columnName, ascOrDesc);<NEW_LINE>return jdbcIndex;<NEW_LINE>}
recordMap.get("PAGES")));
20,727
public void process(Aggregations aggs) {<NEW_LINE>if (topActualClassNames.get() == null && aggs.get(aggName(STEP_1_AGGREGATE_BY_ACTUAL_CLASS)) != null) {<NEW_LINE>Terms termsAgg = aggs.get(aggName(STEP_1_AGGREGATE_BY_ACTUAL_CLASS));<NEW_LINE>topActualClassNames.set(termsAgg.getBuckets().stream().map(Terms.Bucket::getKeyAsString).sorted().collect(Collectors.toList()));<NEW_LINE>}<NEW_LINE>if (actualClassesCardinality.get() == null && aggs.get(aggName(STEP_1_CARDINALITY_OF_ACTUAL_CLASS)) != null) {<NEW_LINE>Cardinality cardinalityAgg = aggs.get(aggName(STEP_1_CARDINALITY_OF_ACTUAL_CLASS));<NEW_LINE>actualClassesCardinality.set(cardinalityAgg.getValue());<NEW_LINE>}<NEW_LINE>if (result.get() == null && aggs.get(aggName(STEP_2_AGGREGATE_BY_ACTUAL_CLASS)) != null) {<NEW_LINE>Filters filtersAgg = aggs.get(aggName(STEP_2_AGGREGATE_BY_ACTUAL_CLASS));<NEW_LINE>for (Filters.Bucket bucket : filtersAgg.getBuckets()) {<NEW_LINE>String actualClass = bucket.getKeyAsString();<NEW_LINE>long actualClassDocCount = bucket.getDocCount();<NEW_LINE>Filters subAgg = bucket.getAggregations()<MASK><NEW_LINE>List<PredictedClass> predictedClasses = new ArrayList<>();<NEW_LINE>long otherPredictedClassDocCount = 0;<NEW_LINE>for (Filters.Bucket subBucket : subAgg.getBuckets()) {<NEW_LINE>String predictedClass = subBucket.getKeyAsString();<NEW_LINE>long docCount = subBucket.getDocCount();<NEW_LINE>if (OTHER_BUCKET_KEY.equals(predictedClass)) {<NEW_LINE>otherPredictedClassDocCount = docCount;<NEW_LINE>} else {<NEW_LINE>predictedClasses.add(new PredictedClass(predictedClass, docCount));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>predictedClasses.sort(comparing(PredictedClass::getPredictedClass));<NEW_LINE>actualClasses.add(new ActualClass(actualClass, actualClassDocCount, predictedClasses, otherPredictedClassDocCount));<NEW_LINE>}<NEW_LINE>if (actualClasses.size() == topActualClassNames.get().size()) {<NEW_LINE>result.set(new Result(actualClasses, Math.max(actualClassesCardinality.get() - size, 0)));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
.get(aggName(STEP_2_AGGREGATE_BY_PREDICTED_CLASS));
118,537
public static Key fromHex(final String str) throws KeyFormatException {<NEW_LINE>final char[] input = str.toCharArray();<NEW_LINE>if (input.length != Format.HEX.length)<NEW_LINE>throw new KeyFormatException(Format.HEX, Type.LENGTH);<NEW_LINE>final byte[] key = new byte[Format.BINARY.length];<NEW_LINE>int ret = 0;<NEW_LINE>for (int i = 0; i < key.length; ++i) {<NEW_LINE>int c;<NEW_LINE>int cNum;<NEW_LINE>int cNum0;<NEW_LINE>int cAlpha;<NEW_LINE>int cAlpha0;<NEW_LINE>int cVal;<NEW_LINE>final int cAcc;<NEW_LINE>c = input[i * 2];<NEW_LINE>cNum = c ^ 48;<NEW_LINE>cNum0 = ((cNum - 10) >>> 8) & 0xff;<NEW_LINE>cAlpha = (c & ~32) - 55;<NEW_LINE>cAlpha0 = (((cAlpha - 10) ^ (cAlpha - 16)) >>> 8) & 0xff;<NEW_LINE>ret |= ((cNum0 | cAlpha0) - 1) >>> 8;<NEW_LINE>cVal = (cNum0 & cNum) | (cAlpha0 & cAlpha);<NEW_LINE>cAcc = cVal * 16;<NEW_LINE>c = input[i * 2 + 1];<NEW_LINE>cNum = c ^ 48;<NEW_LINE>cNum0 = ((cNum - 10) >>> 8) & 0xff;<NEW_LINE>cAlpha = (c & ~32) - 55;<NEW_LINE>cAlpha0 = (((cAlpha - 10) ^ (cAlpha - 16)) >>> 8) & 0xff;<NEW_LINE>ret |= ((cNum0 | cAlpha0<MASK><NEW_LINE>cVal = (cNum0 & cNum) | (cAlpha0 & cAlpha);<NEW_LINE>key[i] = (byte) (cAcc | cVal);<NEW_LINE>}<NEW_LINE>if (ret != 0)<NEW_LINE>throw new KeyFormatException(Format.HEX, Type.CONTENTS);<NEW_LINE>return new Key(key);<NEW_LINE>}
) - 1) >>> 8;
1,714,767
private void runAssertionSelectNested(RegressionEnvironment env, String typename, FunctionSendEvent4Int send, RegressionPath path) {<NEW_LINE>String epl = "@name('s0') select " + "l1.lvl1 as c0, " + "exists(l1.lvl1) as exists_c0, " + "l1.l2.lvl2 as c1, " + "exists(l1.l2.lvl2) as exists_c1, " + "l1.l2.l3.lvl3 as c2, " + "exists(l1.l2.l3.lvl3) as exists_c2, " + "l1.l2.l3.l4.lvl4 as c3, " + "exists(l1.l2.l3.l4.lvl4) as exists_c3 " + "from " + typename;<NEW_LINE>env.compileDeploy(epl, path).addListener("s0");<NEW_LINE>String[] fields = "c0,exists_c0,c1,exists_c1,c2,exists_c2,c3,exists_c3".split(",");<NEW_LINE>env.assertStatement("s0", statement -> {<NEW_LINE>EventType eventType = statement.getEventType();<NEW_LINE>for (String property : fields) {<NEW_LINE>assertEquals(property.startsWith("exists") ? Boolean.class : Integer.class, JavaClassHelper.getBoxedType(eventType.getPropertyType(property)));<NEW_LINE>}<NEW_LINE>});<NEW_LINE>send.apply(typename, env, 1, 2, 3, 4);<NEW_LINE>env.assertEventNew("s0", event -> {<NEW_LINE>EPAssertionUtil.assertProps(event, fields, new Object[] { 1, true, 2, true, 3, true, 4, true });<NEW_LINE>SupportEventTypeAssertionUtil.assertConsistency(event);<NEW_LINE>});<NEW_LINE>send.apply(typename, env, 10, 5, 50, 400);<NEW_LINE>env.assertPropsNew("s0", fields, new Object[] { 10, true, 5, true, 50<MASK><NEW_LINE>env.undeployModuleContaining("s0");<NEW_LINE>}
, true, 400, true });
69,753
public void delete(String namespace) throws AccumuloException, AccumuloSecurityException, NamespaceNotFoundException, NamespaceNotEmptyException {<NEW_LINE>EXISTING_NAMESPACE_NAME.validate(namespace);<NEW_LINE>NamespaceId namespaceId = Namespaces.getNamespaceId(context, namespace);<NEW_LINE>if (namespaceId.equals(Namespace.ACCUMULO.id()) || namespaceId.equals(Namespace.DEFAULT.id())) {<NEW_LINE><MASK><NEW_LINE>log.debug("{} attempted to delete the {} namespace", credentials.getPrincipal(), namespaceId);<NEW_LINE>throw new AccumuloSecurityException(credentials.getPrincipal(), SecurityErrorCode.UNSUPPORTED_OPERATION);<NEW_LINE>}<NEW_LINE>if (!Namespaces.getTableIds(context, namespaceId).isEmpty()) {<NEW_LINE>throw new NamespaceNotEmptyException(namespaceId.canonical(), namespace, null);<NEW_LINE>}<NEW_LINE>List<ByteBuffer> args = Arrays.asList(ByteBuffer.wrap(namespace.getBytes(UTF_8)));<NEW_LINE>Map<String, String> opts = new HashMap<>();<NEW_LINE>try {<NEW_LINE>doNamespaceFateOperation(FateOperation.NAMESPACE_DELETE, args, opts, namespace);<NEW_LINE>} catch (NamespaceExistsException e) {<NEW_LINE>// should not happen<NEW_LINE>throw new AssertionError(e);<NEW_LINE>}<NEW_LINE>}
Credentials credentials = context.getCredentials();
1,265,787
JsonNode CollectDiagnostics(Customer c, CollectionLevel callhomeLevel) {<NEW_LINE>ObjectNode payload = Json.newObject();<NEW_LINE>// Build customer details json<NEW_LINE>payload.put("customer_uuid", c.uuid.toString());<NEW_LINE>payload.put("code", c.code);<NEW_LINE>payload.put("email", Users.getAllEmailsForCustomer(c.uuid));<NEW_LINE>payload.put("creation_date", c.creationDate.toString());<NEW_LINE>ArrayNode errors = Json.newArray();<NEW_LINE>// Build universe details json<NEW_LINE>List<UniverseResp> universes = new ArrayList<>();<NEW_LINE>for (UUID universeUUID : c.getUniverseUUIDs()) {<NEW_LINE>try {<NEW_LINE>Universe u = Universe.getOrBadRequest(universeUUID);<NEW_LINE>universes.add(new UniverseResp(u));<NEW_LINE>} catch (RuntimeException re) {<NEW_LINE>errors.add(re.getMessage());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>payload.set("universes", Json.toJson(universes));<NEW_LINE>// Build provider details json<NEW_LINE>ArrayNode providers = Json.newArray();<NEW_LINE>for (Provider p : Provider.getAll(c.uuid)) {<NEW_LINE>ObjectNode provider = Json.newObject();<NEW_LINE>provider.put("provider_uuid", p.uuid.toString());<NEW_LINE>provider.put("code", p.code);<NEW_LINE>provider.put("name", p.name);<NEW_LINE>ArrayNode regions = Json.newArray();<NEW_LINE>for (Region r : p.regions) {<NEW_LINE>regions.add(r.name);<NEW_LINE>}<NEW_LINE><MASK><NEW_LINE>providers.add(provider);<NEW_LINE>}<NEW_LINE>payload.set("providers", providers);<NEW_LINE>if (callhomeLevel.collectMore()) {<NEW_LINE>// Collect More Stuff<NEW_LINE>}<NEW_LINE>if (callhomeLevel.collectAll()) {<NEW_LINE>// Collect Even More Stuff<NEW_LINE>}<NEW_LINE>Map<String, Object> ywMetadata = configHelper.getConfig(ConfigHelper.ConfigType.YugawareMetadata);<NEW_LINE>if (ywMetadata.get("yugaware_uuid") != null) {<NEW_LINE>payload.put("yugaware_uuid", ywMetadata.get("yugaware_uuid").toString());<NEW_LINE>}<NEW_LINE>if (ywMetadata.get("version") != null) {<NEW_LINE>payload.put("version", ywMetadata.get("version").toString());<NEW_LINE>}<NEW_LINE>payload.put("timestamp", clock.instant().getEpochSecond());<NEW_LINE>payload.set("errors", errors);<NEW_LINE>return payload;<NEW_LINE>}
provider.set("regions", regions);
805,301
final GetDeviceResult executeGetDevice(GetDeviceRequest getDeviceRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(getDeviceRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<GetDeviceRequest> request = null;<NEW_LINE>Response<GetDeviceResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new GetDeviceRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(getDeviceRequest));<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, "Braket");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "GetDevice");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<GetDeviceResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(<MASK><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>}
false), new GetDeviceResultJsonUnmarshaller());
934,572
public Dimension minimumLayoutSize(final Container container) {<NEW_LINE>final JSplitPane splitPane = (JSplitPane) container;<NEW_LINE>int minPrimary = 0;<NEW_LINE>int minSecondary = 0;<NEW_LINE>final Insets insets = splitPane.getInsets();<NEW_LINE>for (int counter = 0; counter < 3; counter++) {<NEW_LINE>if (components[counter] != null) {<NEW_LINE>final Dimension minSize = components[counter].getMinimumSize();<NEW_LINE><MASK><NEW_LINE>minPrimary += getSizeForPrimaryAxis(minSize);<NEW_LINE>if (secSize > minSecondary) {<NEW_LINE>minSecondary = secSize;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (insets != null) {<NEW_LINE>minPrimary += getSizeForPrimaryAxis(insets, true) + getSizeForPrimaryAxis(insets, false);<NEW_LINE>minSecondary += getSizeForSecondaryAxis(insets, true) + getSizeForSecondaryAxis(insets, false);<NEW_LINE>}<NEW_LINE>if (axis == 0) {<NEW_LINE>return new Dimension(minPrimary, minSecondary);<NEW_LINE>}<NEW_LINE>return new Dimension(minSecondary, minPrimary);<NEW_LINE>}
final int secSize = getSizeForSecondaryAxis(minSize);
1,482,751
public static void gen_Token(JavaResourceTemplateLocations locations) {<NEW_LINE>try {<NEW_LINE>final File file = new File(Options.getOutputDirectory(), "Token.java");<NEW_LINE>final OutputFile outputFile = new OutputFile(file, tokenVersion, new String[] { Options.USEROPTION__TOKEN_EXTENDS, Options.USEROPTION__KEEP_LINE_COLUMN, Options.USEROPTION__SUPPORT_CLASS_VISIBILITY_PUBLIC });<NEW_LINE>if (!outputFile.needToWrite) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>final PrintWriter ostr = outputFile.getPrintWriter();<NEW_LINE>if (cu_to_insertion_point_1.size() != 0 && ((Token) cu_to_insertion_point_1.get(0)).kind == PACKAGE) {<NEW_LINE>for (int i = 1; i < cu_to_insertion_point_1.size(); i++) {<NEW_LINE>if (((Token) cu_to_insertion_point_1.get(i)).kind == SEMICOLON) {<NEW_LINE>cline = ((Token) (cu_to_insertion_point_1.get(0))).beginLine;<NEW_LINE>ccol = ((Token) (cu_to_insertion_point_1.<MASK><NEW_LINE>for (int j = 0; j <= i; j++) {<NEW_LINE>printToken((Token) (cu_to_insertion_point_1.get(j)), ostr);<NEW_LINE>}<NEW_LINE>ostr.println("");<NEW_LINE>ostr.println("");<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>OutputFileGenerator generator = new OutputFileGenerator(locations.getTokenTemplateResourceUrl(), Options.getOptions());<NEW_LINE>generator.generate(ostr);<NEW_LINE>ostr.close();<NEW_LINE>} catch (IOException e) {<NEW_LINE>System.err.println("Failed to create Token " + e);<NEW_LINE>JavaCCErrors.semantic_error("Could not open file Token.java for writing.");<NEW_LINE>throw new Error();<NEW_LINE>}<NEW_LINE>}
get(0))).beginColumn;
755,749
public Scope visitTable(TableRelation node, Scope outerScope) {<NEW_LINE>TableName tableName = node.getAlias();<NEW_LINE>Table table = node.getTable();<NEW_LINE>ImmutableList.Builder<Field> fields = ImmutableList.builder();<NEW_LINE>ImmutableMap.Builder<Field, Column> columns = ImmutableMap.builder();<NEW_LINE>for (Column column : table.getFullSchema()) {<NEW_LINE>Field field;<NEW_LINE>if (table.getBaseSchema().contains(column)) {<NEW_LINE>field = new Field(column.getName(), column.getType(), tableName, new SlotRef(tableName, column.getName(), column.getName()), true);<NEW_LINE>} else {<NEW_LINE>field = new Field(column.getName(), column.getType(), tableName, new SlotRef(tableName, column.getName(), column.getName()), false);<NEW_LINE>}<NEW_LINE>columns.put(field, column);<NEW_LINE>fields.add(field);<NEW_LINE>}<NEW_LINE>node.setColumns(columns.build());<NEW_LINE>session.getDumpInfo().addTable(node.getName().getDb().split(":")[1], table);<NEW_LINE>Scope scope = new Scope(RelationId.of(node), new RelationFields<MASK><NEW_LINE>node.setScope(scope);<NEW_LINE>return scope;<NEW_LINE>}
(fields.build()));
707,013
private void addTableToPacket(Table t) throws JSONException {<NEW_LINE>JSONObject table = new JSONObject();<NEW_LINE>JSONObject[] parents = new JSONObject[10];<NEW_LINE>parents[0] = table;<NEW_LINE>for (int row = 0; row < t.getRowCount(); row++) {<NEW_LINE>List<String> rowList = getRowFromTable(t, row);<NEW_LINE>int indent = getIndent(rowList);<NEW_LINE>if (indent >= 0) {<NEW_LINE>String name = rowList.get(indent);<NEW_LINE>String value = rowList.size() > (indent + 1) ? rowList.get(indent + 1) : "";<NEW_LINE>if (null == value || "".equals(value)) {<NEW_LINE>JSONObject parent = new JSONObject();<NEW_LINE>parents[indent<MASK><NEW_LINE>parents[indent + 1] = parent;<NEW_LINE>} else {<NEW_LINE>parents[indent].put(name, value);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>tables.add(table);<NEW_LINE>}
].put(name, parent);
213,878
private void updateResources(SourceConfig config) throws IOException {<NEW_LINE>// NOI18N<NEW_LINE>String icon = config.getIcon("ios", 57, 57);<NEW_LINE>// NOI18N<NEW_LINE>copy(icon, "icons/icon");<NEW_LINE>// NOI18N<NEW_LINE>icon = config.getIcon("ios", 114, 114);<NEW_LINE>// NOI18N<NEW_LINE>copy(icon, "icons/icon@2x");<NEW_LINE>// NOI18N<NEW_LINE>icon = config.getIcon("ios", 72, 72);<NEW_LINE>// NOI18N<NEW_LINE>copy(icon, "icons/icon-72");<NEW_LINE>// NOI18N<NEW_LINE>icon = config.getIcon("ios", 144, 144);<NEW_LINE>// NOI18N<NEW_LINE>copy(icon, "icons/icon-72@2x");<NEW_LINE>// NOI18N<NEW_LINE>String splash = config.getSplash("ios", 320, 480);<NEW_LINE>// NOI18N<NEW_LINE>copy(splash, "splash/Default~iphone");<NEW_LINE>// NOI18N<NEW_LINE>splash = config.getSplash("ios", 640, 960);<NEW_LINE>// NOI18N<NEW_LINE>copy(splash, "splash/Default@2x~iphone");<NEW_LINE>// NOI18N<NEW_LINE>splash = config.getSplash("ios", 768, 1024);<NEW_LINE>// NOI18N<NEW_LINE>copy(splash, "splash/Default-Portrait~ipad");<NEW_LINE>// NOI18N<NEW_LINE>splash = config.getSplash("ios", 1536, 2048);<NEW_LINE>// NOI18N<NEW_LINE>copy(splash, "splash/Default-Portrait@2x~ipad");<NEW_LINE>// NOI18N<NEW_LINE>splash = config.<MASK><NEW_LINE>// NOI18N<NEW_LINE>copy(splash, "splash/Default-Landscape~ipad");<NEW_LINE>// NOI18N<NEW_LINE>splash = config.getSplash("ios", 2048, 1536);<NEW_LINE>// NOI18N<NEW_LINE>copy(splash, "splash/Default-Landscape@2x~ipad");<NEW_LINE>// NOI18N<NEW_LINE>splash = config.getSplash("ios", 640, 1136);<NEW_LINE>// NOI18N<NEW_LINE>copy(splash, "splash/Default-568h@2x~iphone.png");<NEW_LINE>}
getSplash("ios", 1024, 768);
1,505,829
public void handleMatchSrc(VarNode matchSrc, PointsToSetInternal intersection, VarNode loadBase, VarNode storeBase, VarAndContext origVarAndContext, SparkField field, boolean refine) {<NEW_LINE>AllocAndContextSet allocContexts = findContextsForAllocs(new VarAndContext(loadBase, origVarAndContext.context), intersection);<NEW_LINE>for (AllocAndContext allocAndContext : allocContexts) {<NEW_LINE>if (DEBUG) {<NEW_LINE>debugPrint("alloc and context " + allocAndContext);<NEW_LINE>}<NEW_LINE>CallingContextSet matchSrcContexts;<NEW_LINE>if (fieldCheckHeuristic.validFromBothEnds(field)) {<NEW_LINE>matchSrcContexts = findUpContextsForVar(allocAndContext, new VarContextAndUp<MASK><NEW_LINE>} else {<NEW_LINE>matchSrcContexts = findVarContextsFromAlloc(allocAndContext, storeBase);<NEW_LINE>}<NEW_LINE>for (ImmutableStack<Integer> matchSrcContext : matchSrcContexts) {<NEW_LINE>if (DEBUG) {<NEW_LINE>debugPrint("match source context " + matchSrcContext);<NEW_LINE>}<NEW_LINE>VarAndContext newVarAndContext = new VarAndContext(matchSrc, matchSrcContext);<NEW_LINE>p.prop(newVarAndContext);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
(storeBase, EMPTY_CALLSTACK, EMPTY_CALLSTACK));
1,258,107
protected static String genDocString(Op op) {<NEW_LINE>// Following roughly: https://sphinxcontrib-napoleon.readthedocs.io/en/latest/example_google.html<NEW_LINE>StringBuilder sb = new StringBuilder();<NEW_LINE>sb.append("\"\"\"").append(op.getOpName()).append(" operation").append("\n\n");<NEW_LINE>if (op.getInputs() != null) {<NEW_LINE>sb.append("Args:");<NEW_LINE>sb.append("\n");<NEW_LINE>for (Input i : op.getInputs()) {<NEW_LINE>sb.append(I4).append(i.getName()).append(" (ndarray): ");<NEW_LINE>if (i.getDescription() != null)<NEW_LINE>sb.append(DocTokens.processDocText(i.getDescription(), op<MASK><NEW_LINE>sb.append("\n");<NEW_LINE>}<NEW_LINE>}<NEW_LINE>sb.append("\n");<NEW_LINE>if (op.getOutputs() != null) {<NEW_LINE>sb.append("Returns:\n");<NEW_LINE>List<Output> o = op.getOutputs();<NEW_LINE>if (o.size() == 1) {<NEW_LINE>sb.append(I4).append("ndarray: ").append(o.get(0).getName());<NEW_LINE>String d = o.get(0).getDescription();<NEW_LINE>if (d != null) {<NEW_LINE>sb.append(" - ").append(DocTokens.processDocText(d, op, DocTokens.GenerationType.ND4J));<NEW_LINE>}<NEW_LINE>sb.append("\n");<NEW_LINE>} else {<NEW_LINE>throw new UnsupportedOperationException("Not yet implemented: Python docstring generation for multiple output ops");<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (op.getArgs() != null) {<NEW_LINE>// Args and default args<NEW_LINE>throw new UnsupportedOperationException("Generating method with args not yet implemented");<NEW_LINE>}<NEW_LINE>sb.append("\"\"\"\n");<NEW_LINE>return sb.toString();<NEW_LINE>}
, DocTokens.GenerationType.ND4J));
930,689
static TransportAddress[] parse(String hostPortString, int defaultPort) throws UnknownHostException {<NEW_LINE>Objects.requireNonNull(hostPortString);<NEW_LINE>String host;<NEW_LINE>String portString = null;<NEW_LINE>if (hostPortString.startsWith("[")) {<NEW_LINE>// Parse a bracketed host, typically an IPv6 literal.<NEW_LINE>Matcher matcher = BRACKET_PATTERN.matcher(hostPortString);<NEW_LINE>if (matcher.matches() == false) {<NEW_LINE>throw new IllegalArgumentException("Invalid bracketed host/port range: " + hostPortString);<NEW_LINE>}<NEW_LINE>host = matcher.group(1);<NEW_LINE>// could be null<NEW_LINE>portString = matcher.group(2);<NEW_LINE>} else {<NEW_LINE>int <MASK><NEW_LINE>if (colonPos >= 0 && hostPortString.indexOf(':', colonPos + 1) == -1) {<NEW_LINE>// Exactly 1 colon. Split into host:port.<NEW_LINE>host = hostPortString.substring(0, colonPos);<NEW_LINE>portString = hostPortString.substring(colonPos + 1);<NEW_LINE>} else {<NEW_LINE>// 0 or 2+ colons. Bare hostname or IPv6 literal.<NEW_LINE>host = hostPortString;<NEW_LINE>// 2+ colons and not bracketed: exception<NEW_LINE>if (colonPos >= 0) {<NEW_LINE>throw new IllegalArgumentException("IPv6 addresses must be bracketed: " + hostPortString);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>int port;<NEW_LINE>// if port isn't specified, fill with the default<NEW_LINE>if (portString == null || portString.isEmpty()) {<NEW_LINE>port = defaultPort;<NEW_LINE>} else {<NEW_LINE>port = Integer.parseInt(portString);<NEW_LINE>}<NEW_LINE>return Arrays.stream(InetAddress.getAllByName(host)).distinct().map(address -> new TransportAddress(address, port)).toArray(TransportAddress[]::new);<NEW_LINE>}
colonPos = hostPortString.indexOf(':');
864,016
protected boolean driveSynchronization(Synchronization sync) {<NEW_LINE>boolean shouldContinue = true;<NEW_LINE>if (_state == Running) {<NEW_LINE>try {<NEW_LINE>sync.beforeCompletion();<NEW_LINE>} catch (Throwable t) {<NEW_LINE>FFDCFilter.processException(t, "com.ibm.tx.ltc.LocalTranCoordImpl.driveSynchronization", "1588", this);<NEW_LINE>// Defect 125343<NEW_LINE>//<NEW_LINE>// An error has occurred so we should<NEW_LINE>// log it and set RollbackOnly.<NEW_LINE>//<NEW_LINE>if (tc.isDebugEnabled())<NEW_LINE>Tr.debug(tc, "An Error occurred in beforeCompletion. Setting RollbackOnly=true.", t);<NEW_LINE>setRollbackOnly();<NEW_LINE>shouldContinue = false;<NEW_LINE>}<NEW_LINE>} else if (_state == Completed) {<NEW_LINE>try {<NEW_LINE>//<NEW_LINE>// Defect 115912. We need to return the correct<NEW_LINE>// status code of the transaction depending on<NEW_LINE>// what action we took.<NEW_LINE>//<NEW_LINE>if (_outcomeRollback) {<NEW_LINE>sync.afterCompletion(javax.transaction.Status.STATUS_ROLLEDBACK);<NEW_LINE>} else {<NEW_LINE>sync.afterCompletion(<MASK><NEW_LINE>}<NEW_LINE>} catch (Throwable t) {<NEW_LINE>FFDCFilter.processException(t, "com.ibm.tx.ltc.LocalTranCoordImpl.driveSynchronization", "1619", this);<NEW_LINE>// Defect 125343<NEW_LINE>//<NEW_LINE>// An error has occurred so we should<NEW_LINE>// log it and carry on.<NEW_LINE>//<NEW_LINE>if (tc.isDebugEnabled())<NEW_LINE>Tr.debug(tc, "An Error occurred in afterCompletion.", t);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return shouldContinue;<NEW_LINE>}
javax.transaction.Status.STATUS_COMMITTED);
1,134,679
protected String transform(String value, String transDef) {<NEW_LINE>if (transDef == null) {<NEW_LINE>return value;<NEW_LINE>}<NEW_LINE>String[] tokens = tokenize(transDef);<NEW_LINE>String retValue = value;<NEW_LINE>for (int i = 0; i < tokens.length; i += 2) {<NEW_LINE>if ("cut".equals(tokens[i]) || "trunc".equals(tokens[i])) {<NEW_LINE>int index = Integer.parseInt(tokens[i + 1]);<NEW_LINE>if (retValue.length() > index) {<NEW_LINE>if ("cut".equals(tokens[i])) {<NEW_LINE>retValue = retValue.substring(index);<NEW_LINE>} else {<NEW_LINE>retValue = retValue.substring(0, index);<NEW_LINE>}<NEW_LINE>} else if ("cut".equals(tokens[i])) {<NEW_LINE>log.error("requested cut: " + index + " exceeds value length");<NEW_LINE>return value;<NEW_LINE>}<NEW_LINE>} else if ("match".equals(tokens[i])) {<NEW_LINE>int index2 = retValue.indexOf<MASK><NEW_LINE>if (index2 > 0) {<NEW_LINE>retValue = retValue.substring(index2);<NEW_LINE>} else {<NEW_LINE>log.error("requested match: " + tokens[i + 1] + " failed");<NEW_LINE>return value;<NEW_LINE>}<NEW_LINE>} else if ("text".equals(tokens[i])) {<NEW_LINE>retValue = retValue + tokens[i + 1];<NEW_LINE>} else {<NEW_LINE>log.error(" unknown transform operation: " + tokens[i]);<NEW_LINE>return value;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return retValue;<NEW_LINE>}
(tokens[i + 1]);
212,570
private void comparePosixPermissions(FileVersionComparison fileComparison) {<NEW_LINE>boolean posixPermsDiffer = false;<NEW_LINE>boolean actualIsNull = fileComparison.actualFileProperties == null || fileComparison<MASK><NEW_LINE>boolean expectedIsNull = fileComparison.expectedFileProperties == null || fileComparison.expectedFileProperties.getPosixPermissions() == null;<NEW_LINE>if (!actualIsNull && !expectedIsNull) {<NEW_LINE>if (!fileComparison.actualFileProperties.getPosixPermissions().equals(fileComparison.expectedFileProperties.getPosixPermissions())) {<NEW_LINE>posixPermsDiffer = true;<NEW_LINE>}<NEW_LINE>} else if ((actualIsNull && !expectedIsNull) || (!actualIsNull && expectedIsNull)) {<NEW_LINE>posixPermsDiffer = true;<NEW_LINE>}<NEW_LINE>if (posixPermsDiffer) {<NEW_LINE>fileComparison.fileChanges.add(FileChange.CHANGED_ATTRIBUTES);<NEW_LINE>logger.log(Level.INFO, " - " + fileComparison.fileChanges + ": Local file DIFFERS from file version, expected POSIX ATTRS = {0}, but actual POSIX ATTRS = {1}, for file {2}", new Object[] { fileComparison.expectedFileProperties.getPosixPermissions(), fileComparison.actualFileProperties.getPosixPermissions(), fileComparison.actualFileProperties.getRelativePath() });<NEW_LINE>}<NEW_LINE>}
.actualFileProperties.getPosixPermissions() == null;
632,942
final DeleteProgramResult executeDeleteProgram(DeleteProgramRequest deleteProgramRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(deleteProgramRequest);<NEW_LINE><MASK><NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<DeleteProgramRequest> request = null;<NEW_LINE>Response<DeleteProgramResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new DeleteProgramRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(deleteProgramRequest));<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, "MediaTailor");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteProgram");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<DeleteProgramResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeleteProgramResultJsonUnmarshaller());<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();
677,808
private void writeChart(JRChart chart, String chartName) {<NEW_LINE>if (chart != null) {<NEW_LINE>write(chartName + ".setShowLegend({0});\n", getBooleanText(chart.getShowLegend()));<NEW_LINE>write(chartName + ".setEvaluationTime({0});\n", chart.getEvaluationTimeValue(), EvaluationTimeEnum.NOW);<NEW_LINE>write(chartName + ".setEvaluationGroup({0});\n", getGroupName(chart.getEvaluationGroup()));<NEW_LINE>if (chart.getLinkType() != null) {<NEW_LINE>write(chartName + ".setLinkType(\"{0}\");\n", JRStringUtil.escapeJavaStringLiteral(chart.getLinkType()), HyperlinkTypeEnum.NONE.getName());<NEW_LINE>}<NEW_LINE>if (chart.getLinkTarget() != null) {<NEW_LINE>write(chartName + ".setLinkTarget(\"{0}\");\n", JRStringUtil.escapeJavaStringLiteral(chart.getLinkTarget()), HyperlinkTargetEnum.SELF.getName());<NEW_LINE>}<NEW_LINE>write(chartName + ".setBookmarkLevel({0, number, #});\n", chart.<MASK><NEW_LINE>if (chart.getCustomizerClass() != null) {<NEW_LINE>write(chartName + ".setCustomizerClass(\"{0}\");\n", JRStringUtil.escapeJavaStringLiteral(chart.getCustomizerClass()));<NEW_LINE>}<NEW_LINE>write(chartName + ".setRenderType(\"{0}\");\n", JRStringUtil.escapeJavaStringLiteral(chart.getRenderType()));<NEW_LINE>write(chartName + ".setTheme(\"{0}\");\n", JRStringUtil.escapeJavaStringLiteral(chart.getTheme()));<NEW_LINE>writeReportElement(chart, chartName);<NEW_LINE>writeBox(chart.getLineBox(), chartName + ".getLineBox()");<NEW_LINE>write(chartName + ".setTitlePosition({0});\n", chart.getTitlePositionValue());<NEW_LINE>write(chartName + ".setTitleColor({0});\n", chart.getOwnTitleColor());<NEW_LINE>if (chart.getTitleFont() != null) {<NEW_LINE>write(chartName + ".setTitleFont(new JRBaseFont());\n");<NEW_LINE>writeFont(chart.getTitleFont(), chartName + ".getTitleFont()");<NEW_LINE>}<NEW_LINE>writeExpression(chart.getTitleExpression(), chartName, "TitleExpression");<NEW_LINE>write(chartName + ".setSubtitleColor({0});\n", chart.getOwnSubtitleColor());<NEW_LINE>if (chart.getSubtitleFont() != null) {<NEW_LINE>write(chartName + ".setSubtitleFont(new JRBaseFont());\n");<NEW_LINE>writeFont(chart.getSubtitleFont(), chartName + ".getSubtitleFont()");<NEW_LINE>}<NEW_LINE>writeExpression(chart.getSubtitleExpression(), chartName, "SubtitleExpression");<NEW_LINE>write(chartName + ".setLegendColor({0});\n", chart.getOwnLegendColor());<NEW_LINE>write(chartName + ".setLegendBackgroundColor({0});\n", chart.getOwnLegendBackgroundColor());<NEW_LINE>write(chartName + ".setLegendPosition({0});\n", chart.getLegendPositionValue());<NEW_LINE>if (chart.getLegendFont() != null) {<NEW_LINE>write(chartName + ".setLegendFont(new JRBaseFont());\n");<NEW_LINE>writeFont(chart.getLegendFont(), chartName + ".getLegendFont()");<NEW_LINE>}<NEW_LINE>writeExpression(chart.getBookmarkLevelExpression(), chartName, "BookmarkLevelExpression");<NEW_LINE>writeExpression(chart.getAnchorNameExpression(), chartName, "AnchorNameExpression");<NEW_LINE>writeExpression(chart.getHyperlinkReferenceExpression(), chartName, "HyperlinkReferenceExpression");<NEW_LINE>// FIXMENOW can we reuse hyperlink write method?<NEW_LINE>writeExpression(chart.getHyperlinkWhenExpression(), chartName, "HyperlinkWhenExpression");<NEW_LINE>writeExpression(chart.getHyperlinkAnchorExpression(), chartName, "HyperlinkAnchorExpression");<NEW_LINE>writeExpression(chart.getHyperlinkPageExpression(), chartName, "HyperlinkPageExpression");<NEW_LINE>writeExpression(chart.getHyperlinkTooltipExpression(), chartName, "HyperlinkTooltipExpression");<NEW_LINE>writeHyperlinkParameters(chart.getHyperlinkParameters(), chartName);<NEW_LINE>flush();<NEW_LINE>}<NEW_LINE>}
getBookmarkLevel(), JRAnchor.NO_BOOKMARK);
1,620,504
private DataPack doRefresh(@Nonnull Collection<VirtualFile> roots) {<NEW_LINE>StopWatch sw = StopWatch.start("refresh");<NEW_LINE>PermanentGraph<Integer> permanentGraph = myCurrentDataPack.isFull() ? myCurrentDataPack.getPermanentGraph() : null;<NEW_LINE>Map<VirtualFile, CompressedRefs> currentRefs = myCurrentDataPack.getRefsModel().getAllRefsByRoot();<NEW_LINE>try {<NEW_LINE>if (permanentGraph != null) {<NEW_LINE>int commitCount = myRecentCommitCount;<NEW_LINE>for (int attempt = 0; attempt <= 1; attempt++) {<NEW_LINE><MASK><NEW_LINE>List<? extends GraphCommit<Integer>> compoundLog = multiRepoJoin(myLoadedInfo.getCommits());<NEW_LINE>Map<VirtualFile, CompressedRefs> allNewRefs = getAllNewRefs(myLoadedInfo, currentRefs);<NEW_LINE>List<GraphCommit<Integer>> joinedFullLog = join(compoundLog, permanentGraph.getAllCommits(), currentRefs, allNewRefs);<NEW_LINE>if (joinedFullLog == null) {<NEW_LINE>commitCount *= 5;<NEW_LINE>} else {<NEW_LINE>return DataPack.build(joinedFullLog, allNewRefs, myProviders, myHashMap, true);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// couldn't join => need to reload everything; if 5000 commits is still not enough, it's worth reporting:<NEW_LINE>LOG.info("Couldn't join " + commitCount / 5 + " recent commits to the log (" + permanentGraph.getAllCommits().size() + " commits)");<NEW_LINE>}<NEW_LINE>return loadFullLog();<NEW_LINE>} catch (Exception e) {<NEW_LINE>myExceptionHandler.consume(e);<NEW_LINE>return DataPack.EMPTY;<NEW_LINE>} finally {<NEW_LINE>sw.report();<NEW_LINE>}<NEW_LINE>}
loadLogAndRefs(roots, currentRefs, commitCount);
539,231
private static Channel connectNio(Bootstrap bootstrap, InetSocketAddress remoteAddress, AsyncResult<?> promise, int maxAttemptCount, @Nullable Condition<Void> stopCondition, int _attemptCount) {<NEW_LINE>int attemptCount = _attemptCount;<NEW_LINE>while (true) {<NEW_LINE>ChannelFuture future = bootstrap.connect(remoteAddress).awaitUninterruptibly();<NEW_LINE>if (future.isSuccess()) {<NEW_LINE>if (!future.channel().isOpen()) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>return future.channel();<NEW_LINE>} else if (stopCondition != null && stopCondition.value(null) || promise != null && promise.isRejected()) {<NEW_LINE>return null;<NEW_LINE>} else if (maxAttemptCount == -1) {<NEW_LINE>if (sleep(promise, 300)) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>attemptCount++;<NEW_LINE>} else if (++attemptCount < maxAttemptCount) {<NEW_LINE>if (sleep(promise, attemptCount * NettyUtil.MIN_START_TIME)) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE><MASK><NEW_LINE>if (promise != null) {<NEW_LINE>if (cause == null) {<NEW_LINE>promise.reject("Cannot connect: unknown error");<NEW_LINE>} else {<NEW_LINE>promise.rejectWithThrowable(cause);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
Throwable cause = future.cause();
783,433
private final void encipher(int[] lr, int off) {<NEW_LINE>int i, n, l = lr[off], r = lr[off + 1];<NEW_LINE>l ^= P[0];<NEW_LINE>for (i = 0; i <= BLOWFISH_NUM_ROUNDS - 2; ) {<NEW_LINE>// Feistel substitution on left word<NEW_LINE>n = S[(<MASK><NEW_LINE>n += S[0x100 | ((l >> 16) & 0xff)];<NEW_LINE>n ^= S[0x200 | ((l >> 8) & 0xff)];<NEW_LINE>n += S[0x300 | (l & 0xff)];<NEW_LINE>r ^= n ^ P[++i];<NEW_LINE>// Feistel substitution on right word<NEW_LINE>n = S[(r >> 24) & 0xff];<NEW_LINE>n += S[0x100 | ((r >> 16) & 0xff)];<NEW_LINE>n ^= S[0x200 | ((r >> 8) & 0xff)];<NEW_LINE>n += S[0x300 | (r & 0xff)];<NEW_LINE>l ^= n ^ P[++i];<NEW_LINE>}<NEW_LINE>lr[off] = r ^ P[BLOWFISH_NUM_ROUNDS + 1];<NEW_LINE>lr[off + 1] = l;<NEW_LINE>}
l >> 24) & 0xff];
1,682,180
public InProcessNeo4j build() {<NEW_LINE>Path userLogFile = serverFolder.resolve("neo4j.log");<NEW_LINE>Path internalLogFile = serverFolder.resolve("debug.log");<NEW_LINE>config.set(ServerSettings.third_party_packages, unmanagedExtentions.toList());<NEW_LINE>config.set(GraphDatabaseSettings.store_internal_log_path, internalLogFile.toAbsolutePath());<NEW_LINE>var certificates = serverFolder.resolve("certificates");<NEW_LINE>if (disabledServer) {<NEW_LINE>config.set(HttpConnector.enabled, false);<NEW_LINE>config.set(HttpsConnector.enabled, false);<NEW_LINE>}<NEW_LINE>Config dbConfig = config.build();<NEW_LINE>if (dbConfig.get(HttpsConnector.enabled) || dbConfig.get(BoltConnector.enabled) && dbConfig.get(BoltConnector.encryption_level) != BoltConnector.EncryptionLevel.DISABLED) {<NEW_LINE>SelfSignedCertificateFactory.create(certificates);<NEW_LINE>List<SslPolicyConfig> policies = List.of(SslPolicyConfig.forScope(HTTPS), SslPolicyConfig.forScope(BOLT));<NEW_LINE>for (SslPolicyConfig policy : policies) {<NEW_LINE>config.set(<MASK><NEW_LINE>config.set(policy.base_directory, certificates);<NEW_LINE>config.set(policy.trust_all, true);<NEW_LINE>config.set(policy.client_auth, ClientAuth.NONE);<NEW_LINE>}<NEW_LINE>dbConfig = config.build();<NEW_LINE>}<NEW_LINE>Neo4jLoggerContext loggerContext = LogConfig.createBuilder(new DefaultFileSystemAbstraction(), userLogFile, Level.INFO).withTimezone(dbConfig.get(db_timezone)).build();<NEW_LINE>var userLogProvider = new Log4jLogProvider(loggerContext);<NEW_LINE>GraphDatabaseDependencies dependencies = GraphDatabaseDependencies.newDependencies().userLogProvider(userLogProvider);<NEW_LINE>dependencies = dependencies.extensions(buildExtensionList(dependencies));<NEW_LINE>var managementService = createNeo(dbConfig, dependencies);<NEW_LINE>InProcessNeo4j controls = new InProcessNeo4j(serverFolder, userLogFile, internalLogFile, managementService, dbConfig, userLogProvider);<NEW_LINE>controls.start();<NEW_LINE>try {<NEW_LINE>fixtures.applyTo(controls);<NEW_LINE>} catch (Exception e) {<NEW_LINE>controls.close();<NEW_LINE>throw e;<NEW_LINE>}<NEW_LINE>return controls;<NEW_LINE>}
policy.enabled, Boolean.TRUE);
1,840,518
final ListResourcesForWebACLResult executeListResourcesForWebACL(ListResourcesForWebACLRequest listResourcesForWebACLRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listResourcesForWebACLRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<ListResourcesForWebACLRequest> request = null;<NEW_LINE>Response<ListResourcesForWebACLResult> response = null;<NEW_LINE>try {<NEW_LINE><MASK><NEW_LINE>try {<NEW_LINE>request = new ListResourcesForWebACLRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listResourcesForWebACLRequest));<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, "WAFV2");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListResourcesForWebACL");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<ListResourcesForWebACLResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListResourcesForWebACLResultJsonUnmarshaller());<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);
787,290
public RunOutcome run(@Nonnull StepExecutionDetails<BulkImportJobParameters, VoidModel> theStepExecutionDetails, @Nonnull IJobDataSink<NdJsonFileJson> theDataSink) {<NEW_LINE>Integer maxBatchResourceCount = theStepExecutionDetails.getParameters().getMaxBatchResourceCount();<NEW_LINE>if (maxBatchResourceCount == null || maxBatchResourceCount <= 0) {<NEW_LINE>maxBatchResourceCount = BulkImportAppCtx.PARAM_MAXIMUM_BATCH_SIZE_DEFAULT;<NEW_LINE>}<NEW_LINE>try (CloseableHttpClient httpClient = newHttpClient(theStepExecutionDetails)) {<NEW_LINE>StopWatch outerSw = new StopWatch();<NEW_LINE>List<String> urls = theStepExecutionDetails.getParameters().getNdJsonUrls();<NEW_LINE>for (String nextUrl : urls) {<NEW_LINE>ourLog.info("Fetching URL: {}", nextUrl);<NEW_LINE>StopWatch urlSw = new StopWatch();<NEW_LINE>try (CloseableHttpResponse response = httpClient.execute(new HttpGet(nextUrl))) {<NEW_LINE>int statusCode = response.getStatusLine().getStatusCode();<NEW_LINE>if (statusCode >= 400) {<NEW_LINE>throw new JobExecutionFailedException(Msg.code(2056) + "Received HTTP " + statusCode + " from URL: " + nextUrl);<NEW_LINE>}<NEW_LINE>String contentType = response.getEntity().getContentType().getValue();<NEW_LINE>EncodingEnum encoding = EncodingEnum.forContentType(contentType);<NEW_LINE>Validate.isTrue(encoding == EncodingEnum.NDJSON, "Received non-NDJSON content type \"%s\" from URL: %s", contentType, nextUrl);<NEW_LINE>try (InputStream inputStream = response.getEntity().getContent()) {<NEW_LINE>try (LineIterator lineIterator = new LineIterator(new InputStreamReader(inputStream, StandardCharsets.UTF_8))) {<NEW_LINE>int chunkCount = 0;<NEW_LINE>int lineCount = 0;<NEW_LINE>StringBuilder builder = new StringBuilder();<NEW_LINE>while (lineIterator.hasNext()) {<NEW_LINE>String nextLine = lineIterator.nextLine();<NEW_LINE>builder.append(nextLine).append('\n');<NEW_LINE>lineCount++;<NEW_LINE>int charCount = builder.length();<NEW_LINE>int batchSizeChars = (int<MASK><NEW_LINE>if (lineCount >= maxBatchResourceCount || charCount >= batchSizeChars || !lineIterator.hasNext()) {<NEW_LINE>ourLog.info("Loaded chunk {} of {} NDJSON file with {} resources from URL: {}", chunkCount, FileUtil.formatFileSize(charCount), lineCount, nextUrl);<NEW_LINE>NdJsonFileJson data = new NdJsonFileJson();<NEW_LINE>data.setNdJsonText(builder.toString());<NEW_LINE>data.setSourceName(nextUrl);<NEW_LINE>theDataSink.accept(data);<NEW_LINE>builder.setLength(0);<NEW_LINE>lineCount = 0;<NEW_LINE>chunkCount++;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>ourLog.info("Loaded and processed URL in {}", urlSw);<NEW_LINE>}<NEW_LINE>ourLog.info("Loaded and processed {} URLs in {}", urls.size(), outerSw);<NEW_LINE>return new RunOutcome(0);<NEW_LINE>} catch (IOException e) {<NEW_LINE>throw new InternalErrorException(Msg.code(2054) + e.getMessage(), e);<NEW_LINE>}<NEW_LINE>}
) (20 * FileUtils.ONE_MB);
282,499
public Collection<V> remove(Object key) {<NEW_LINE>Collection<V> collection = unfiltered.asMap().get(key);<NEW_LINE>if (collection == null) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>// it's definitely equal to a K<NEW_LINE>@SuppressWarnings({ "unchecked", "rawtypes" })<NEW_LINE>K k = (K) key;<NEW_LINE>List<V> result = Lists.newArrayList();<NEW_LINE>Iterator<V<MASK><NEW_LINE>while (itr.hasNext()) {<NEW_LINE>V v = itr.next();<NEW_LINE>if (satisfies(k, v)) {<NEW_LINE>itr.remove();<NEW_LINE>result.add(v);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (result.isEmpty()) {<NEW_LINE>return null;<NEW_LINE>} else if (unfiltered instanceof SetMultimap) {<NEW_LINE>return Collections.unmodifiableSet(Sets.newLinkedHashSet(result));<NEW_LINE>} else {<NEW_LINE>return Collections.unmodifiableList(result);<NEW_LINE>}<NEW_LINE>}
> itr = collection.iterator();
434,512
private void showRegionResults(final BinaryMapIndexReader region, final SearchPhrase phrase, final SearchResultCollection regionResultCollection, final SearchResultListener resultListener) {<NEW_LINE>app.runInUIThread(new Runnable() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void run() {<NEW_LINE>if (!paused && !cancelPrev) {<NEW_LINE>if (SearchUICore.isDebugMode()) {<NEW_LINE>LOG.info("UI >> Showing region results <" + phrase + "> Region=<" + region.getFile().getName() + "> Results=" + getSearchResultCollectionFormattedSize(regionResultCollection));<NEW_LINE>}<NEW_LINE>if (getResultCollection() != null) {<NEW_LINE>if (SearchUICore.isDebugMode()) {<NEW_LINE>LOG.info("UI >> Combining region results <" + phrase + "> Region=<" + region.getFile().getName() + "> Result collection=" + getSearchResultCollectionFormattedSize(getResultCollection()));<NEW_LINE>}<NEW_LINE>SearchResultCollection resCollection = getResultCollection().combineWithCollection(regionResultCollection, true, true);<NEW_LINE>if (SearchUICore.isDebugMode()) {<NEW_LINE>LOG.info("UI >> Region results combined <" + phrase + "> Region=<" + region.getFile().getName() + "> Result collection=" + getSearchResultCollectionFormattedSize(resCollection));<NEW_LINE>}<NEW_LINE>if (resultListener != null) {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>if (SearchUICore.isDebugMode()) {<NEW_LINE>LOG.info("UI >> Region results shown <" + phrase + "> Region=<" + region.getFile().getName() + "> Results=" + getSearchResultCollectionFormattedSize(resCollection));<NEW_LINE>}<NEW_LINE>} else if (resultListener != null) {<NEW_LINE>resultListener.publish(regionResultCollection, false);<NEW_LINE>if (SearchUICore.isDebugMode()) {<NEW_LINE>LOG.info("UI >> Region results shown <" + phrase + "> Region=<" + region.getFile().getName() + "> Results=" + getSearchResultCollectionFormattedSize(regionResultCollection));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>});<NEW_LINE>}
resultListener.publish(resCollection, true);
1,288,053
public boolean compareAndSetStateWithStartTime(long schedulerId, long fireTime, FiredScheduledJobState currentState, FiredScheduledJobState newState, Long startTime) {<NEW_LINE>try {<NEW_LINE>final Map<Integer, ParameterContext> params = new HashMap<>(4);<NEW_LINE>int index = 1;<NEW_LINE>MetaDbUtil.setParameter(index++, params, ParameterMethod.setString, newState.name());<NEW_LINE>MetaDbUtil.setParameter(index++, params, ParameterMethod.setLong, startTime);<NEW_LINE>MetaDbUtil.setParameter(index++, params, ParameterMethod.setString, currentState.name());<NEW_LINE>MetaDbUtil.setParameter(index++, <MASK><NEW_LINE>MetaDbUtil.setParameter(index++, params, ParameterMethod.setLong, fireTime);<NEW_LINE>return MetaDbUtil.update(CAS_STATE_WITH_START_TIME, params, connection) > 0;<NEW_LINE>} catch (Exception e) {<NEW_LINE>throw logAndThrow("Failed to Compare-And-Set " + FIRED_SCHEDULED_JOBS + " for scheduler_id " + schedulerId + " to state " + newState.name(), "update", e);<NEW_LINE>}<NEW_LINE>}
params, ParameterMethod.setLong, schedulerId);
1,253,832
public void afterExitScope(NodeTraversal t, ReferenceMap referenceMap) {<NEW_LINE>Node scopeRoot = t.getScopeRoot();<NEW_LINE>if (scopeRoot.isBlock() && scopeRoot.getParent().isFunction()) {<NEW_LINE>boolean changed = false;<NEW_LINE>for (Var v : t.getScope().getVarIterable()) {<NEW_LINE>ReferenceCollection references = referenceMap.getReferences(v);<NEW_LINE>Reference declaration = null;<NEW_LINE>Reference assign = null;<NEW_LINE>for (Reference r : references) {<NEW_LINE>if (r.isVarDeclaration() && NodeUtil.isStatement(r.getNode().getParent()) && !r.isInitializingDeclaration()) {<NEW_LINE>declaration = r;<NEW_LINE>} else if (assign == null && r.isSimpleAssignmentToName() && r.getScope().getClosestHoistScope().equals(t.getScope())) {<NEW_LINE>assign = r;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (declaration != null && assign != null) {<NEW_LINE>Node lhs = assign.getNode();<NEW_LINE>Node assignNode = lhs.getParent();<NEW_LINE>if (assignNode.getParent().isExprResult()) {<NEW_LINE>Node rhs = lhs.getNext();<NEW_LINE>assignNode.getParent().replaceWith(IR.var(lhs.detach(), rhs.detach()));<NEW_LINE>Node var = declaration.getNode().getParent();<NEW_LINE>checkState(<MASK><NEW_LINE>NodeUtil.removeChild(var, declaration.getNode());<NEW_LINE>changed = true;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (changed) {<NEW_LINE>t.reportCodeChange();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
var.isVar(), var);
594,763
private Phase createPhase() {<NEW_LINE>Phase phase = new Phase("creator", isVerboseLogging());<NEW_LINE>phase.withDaemonAccess();<NEW_LINE>configureDaemonAccess(phase);<NEW_LINE>phase.withLogLevelArg();<NEW_LINE>phase.withArgs("-app", Directory.APPLICATION);<NEW_LINE>phase.withArgs("-platform", Directory.PLATFORM);<NEW_LINE>phase.withArgs("-run-image", this.request.getRunImage());<NEW_LINE>phase.withArgs("-layers", Directory.LAYERS);<NEW_LINE>phase.withArgs("-cache-dir", Directory.CACHE);<NEW_LINE>phase.withArgs("-launch-cache", Directory.LAUNCH_CACHE);<NEW_LINE>phase.withArgs("-daemon");<NEW_LINE>if (this.request.isCleanCache()) {<NEW_LINE>phase.withArgs("-skip-restore");<NEW_LINE>}<NEW_LINE>if (requiresProcessTypeDefault()) {<NEW_LINE>phase.withArgs("-process-type=web");<NEW_LINE>}<NEW_LINE>phase.withArgs(this.request.getName());<NEW_LINE>phase.withBinding(Binding.from(this.layersVolume, Directory.LAYERS));<NEW_LINE>phase.withBinding(Binding.from(this.applicationVolume, Directory.APPLICATION));<NEW_LINE>phase.withBinding(Binding.from(this.buildCacheVolume, Directory.CACHE));<NEW_LINE>phase.withBinding(Binding.from(this<MASK><NEW_LINE>if (this.request.getBindings() != null) {<NEW_LINE>this.request.getBindings().forEach(phase::withBinding);<NEW_LINE>}<NEW_LINE>phase.withEnv(PLATFORM_API_VERSION_KEY, this.platformVersion.toString());<NEW_LINE>if (this.request.getNetwork() != null) {<NEW_LINE>phase.withNetworkMode(this.request.getNetwork());<NEW_LINE>}<NEW_LINE>return phase;<NEW_LINE>}
.launchCacheVolume, Directory.LAUNCH_CACHE));
1,463,623
public SiddhiApp visitSiddhi_app(@NotNull SiddhiQLParser.Siddhi_appContext ctx) {<NEW_LINE>SiddhiApp siddhiApp = SiddhiApp.siddhiApp();<NEW_LINE>for (SiddhiQLParser.App_annotationContext annotationContext : ctx.app_annotation()) {<NEW_LINE>siddhiApp.annotation(<MASK><NEW_LINE>}<NEW_LINE>for (SiddhiQLParser.Definition_streamContext streamContext : ctx.definition_stream()) {<NEW_LINE>siddhiApp.defineStream((StreamDefinition) visit(streamContext));<NEW_LINE>}<NEW_LINE>for (SiddhiQLParser.Definition_tableContext tableContext : ctx.definition_table()) {<NEW_LINE>siddhiApp.defineTable((TableDefinition) visit(tableContext));<NEW_LINE>}<NEW_LINE>for (SiddhiQLParser.Definition_functionContext functionContext : ctx.definition_function()) {<NEW_LINE>siddhiApp.defineFunction((FunctionDefinition) visit(functionContext));<NEW_LINE>}<NEW_LINE>for (SiddhiQLParser.Definition_windowContext windowContext : ctx.definition_window()) {<NEW_LINE>siddhiApp.defineWindow((WindowDefinition) visit(windowContext));<NEW_LINE>}<NEW_LINE>for (SiddhiQLParser.Definition_aggregationContext aggregationContext : ctx.definition_aggregation()) {<NEW_LINE>siddhiApp.defineAggregation((AggregationDefinition) visit(aggregationContext));<NEW_LINE>}<NEW_LINE>for (SiddhiQLParser.Execution_elementContext executionElementContext : ctx.execution_element()) {<NEW_LINE>ExecutionElement executionElement = (ExecutionElement) visit(executionElementContext);<NEW_LINE>if (executionElement instanceof Partition) {<NEW_LINE>siddhiApp.addPartition((Partition) executionElement);<NEW_LINE>} else if (executionElement instanceof Query) {<NEW_LINE>siddhiApp.addQuery((Query) executionElement);<NEW_LINE>} else {<NEW_LINE>throw newSiddhiParserException(ctx);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>for (SiddhiQLParser.Definition_triggerContext triggerContext : ctx.definition_trigger()) {<NEW_LINE>siddhiApp.defineTrigger((TriggerDefinition) visit(triggerContext));<NEW_LINE>}<NEW_LINE>populateQueryContext(siddhiApp, ctx);<NEW_LINE>return siddhiApp;<NEW_LINE>}
(Annotation) visit(annotationContext));
118,206
public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {<NEW_LINE>log.fine("");<NEW_LINE><MASK><NEW_LINE>WWindowStatus ws = WWindowStatus.get(request);<NEW_LINE>if (ws == null) {<NEW_LINE>WebUtil.createTimeoutPage(request, response, this, null);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>// Get Mandatory Parameters<NEW_LINE>String columnName = WebUtil.getParameter(request, "ColumnName");<NEW_LINE>log.info("ColumnName=" + columnName + " - " + ws.toString());<NEW_LINE>//<NEW_LINE>GridField mField = ws.curTab.getField(columnName);<NEW_LINE>log.config("ColumnName=" + columnName + ", MField=" + mField);<NEW_LINE>if (mField == null || columnName == null || columnName.equals("")) {<NEW_LINE>WebUtil.createErrorPage(request, response, this, Msg.getMsg(ws.ctx, "ParameterMissing"));<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>MLocation location = null;<NEW_LINE>Object value = mField.getValue();<NEW_LINE>if (value != null && value instanceof Integer)<NEW_LINE>location = new MLocation(ws.ctx, ((Integer) value).intValue(), null);<NEW_LINE>else<NEW_LINE>location = new MLocation(ws.ctx, 0, null);<NEW_LINE>// String targetBase = "parent.WWindow." + WWindow.FORM_NAME + "." + columnName;<NEW_LINE>String targetBase = "opener.WWindow." + WWindow.FORM_NAME + "." + columnName;<NEW_LINE>String action = request.getRequestURI();<NEW_LINE>// Create Document<NEW_LINE>WebDoc doc = WebDoc.createPopup(mField.getHeader());<NEW_LINE>doc.addPopupClose(ws.ctx);<NEW_LINE>boolean hasDependents = ws.curTab.hasDependants(columnName);<NEW_LINE>boolean hasCallout = mField.getCallout().length() > 0;<NEW_LINE>// Reset<NEW_LINE>button reset = new button();<NEW_LINE>// translate<NEW_LINE>reset.addElement("Reset");<NEW_LINE>String script = targetBase + "D.value='';" + targetBase + "F.value='';closePopup();";<NEW_LINE>if (hasDependents || hasCallout)<NEW_LINE>script += "startUpdate(" + targetBase + "F);";<NEW_LINE>reset.setOnClick(script);<NEW_LINE>//<NEW_LINE>doc.getTable().addElement(new tr().addElement(fillForm(ws, action, location, targetBase, hasDependents || hasCallout)).addElement(reset));<NEW_LINE>//<NEW_LINE>doc.addPopupClose(ws.ctx);<NEW_LINE>// log.trace(log.l6_Database, doc.toString());<NEW_LINE>WebUtil.createResponse(request, response, this, null, doc, true);<NEW_LINE>}
HttpSession sess = request.getSession();
1,106,050
public boolean tryParse(BtcTransaction btcTx) {<NEW_LINE>if (btcTx == null) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>if (btcTx.getInputs().size() == 0) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>if (btcTx.getInput(0).getScriptBytes() == null) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>Script scriptSig = btcTx.getInput(0).getScriptSig();<NEW_LINE>if (scriptSig.getChunks().size() != 2) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>byte[] data = scriptSig.getChunks().get(1).data;<NEW_LINE>// Looking for btcAddress<NEW_LINE>BtcECKey <MASK><NEW_LINE>this.btcAddress = new Address(btcTx.getParams(), senderBtcKey.getPubKeyHash());<NEW_LINE>// Looking for rskAddress<NEW_LINE>org.ethereum.crypto.ECKey key = org.ethereum.crypto.ECKey.fromPublicOnly(data);<NEW_LINE>this.rskAddress = new RskAddress(key.getAddress());<NEW_LINE>} catch (Exception e) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>return true;<NEW_LINE>}
senderBtcKey = BtcECKey.fromPublicOnly(data);
1,367,997
void transpileTry(Node n, @Nullable TranspilationContext.Case breakCase) {<NEW_LINE>Node tryBlock = n.removeFirstChild();<NEW_LINE>Node catchBlock = n.removeFirstChild();<NEW_LINE>Node finallyBlock = n.removeFirstChild();<NEW_LINE>TranspilationContext.Case catchCase = catchBlock.hasChildren() ? context.createCase() : null;<NEW_LINE>TranspilationContext.Case finallyCase = finallyBlock == null ? null : context.createCase();<NEW_LINE>TranspilationContext.Case endCase = context.maybeCreateCase(breakCase);<NEW_LINE>// Transpile "try" block<NEW_LINE>context.enterTryBlock(catchCase, finallyCase, tryBlock);<NEW_LINE>transpileStatement(tryBlock);<NEW_LINE>if (finallyBlock == null) {<NEW_LINE>context.leaveTryBlock(catchCase, endCase, tryBlock);<NEW_LINE>} else {<NEW_LINE>// Transpile "finally" block<NEW_LINE>context.switchCaseTo(finallyCase);<NEW_LINE>context.enterFinallyBlock(catchCase, finallyCase, finallyBlock);<NEW_LINE>transpileStatement(finallyBlock);<NEW_LINE>context.leaveFinallyBlock(endCase, finallyBlock);<NEW_LINE>}<NEW_LINE>// Transpile "catch" block<NEW_LINE>if (catchBlock.hasChildren()) {<NEW_LINE>checkState(catchBlock.getFirstChild().isCatch());<NEW_LINE>context.switchCaseTo(catchCase);<NEW_LINE>Node exceptionName = catchBlock<MASK><NEW_LINE>context.enterCatchBlock(finallyCase, exceptionName);<NEW_LINE>Node catchBody = catchBlock.getFirstFirstChild().detach();<NEW_LINE>checkState(catchBody.isBlock());<NEW_LINE>transpileStatement(catchBody);<NEW_LINE>context.leaveCatchBlock(finallyCase, catchBody);<NEW_LINE>}<NEW_LINE>context.switchCaseTo(endCase);<NEW_LINE>}
.getFirstFirstChild().detach();
1,173,138
public List<LDUpdate> applyUpdates() {<NEW_LINE>List<LDUpdate> appliedUpdates = new ArrayList<LDUpdate>();<NEW_LINE>LDUpdate update = null;<NEW_LINE>while (ldUpdates.peek() != null) {<NEW_LINE>try {<NEW_LINE>update = ldUpdates.take();<NEW_LINE>} catch (Exception e) {<NEW_LINE>log.error("Error reading link discovery update.", e);<NEW_LINE>}<NEW_LINE>if (log.isDebugEnabled()) {<NEW_LINE>log.debug("Applying update: {}", update);<NEW_LINE>}<NEW_LINE>switch(update.getOperation()) {<NEW_LINE>case LINK_UPDATED:<NEW_LINE>addOrUpdateLink(update.getSrc(), update.getSrcPort(), update.getDst(), update.getDstPort(), update.getLatency(<MASK><NEW_LINE>break;<NEW_LINE>case LINK_REMOVED:<NEW_LINE>removeLink(update.getSrc(), update.getSrcPort(), update.getDst(), update.getDstPort());<NEW_LINE>break;<NEW_LINE>case SWITCH_UPDATED:<NEW_LINE>addOrUpdateSwitch(update.getSrc());<NEW_LINE>break;<NEW_LINE>case SWITCH_REMOVED:<NEW_LINE>removeSwitch(update.getSrc());<NEW_LINE>break;<NEW_LINE>case TUNNEL_PORT_ADDED:<NEW_LINE>addTunnelPort(update.getSrc(), update.getSrcPort());<NEW_LINE>break;<NEW_LINE>case TUNNEL_PORT_REMOVED:<NEW_LINE>removeTunnelPort(update.getSrc(), update.getSrcPort());<NEW_LINE>break;<NEW_LINE>case PORT_UP:<NEW_LINE>case PORT_DOWN:<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>// Add to the list of applied updates.<NEW_LINE>appliedUpdates.add(update);<NEW_LINE>}<NEW_LINE>return (Collections.unmodifiableList(appliedUpdates));<NEW_LINE>}
), update.getType());
212,584
public List<GraphQLError> checkTypeRegistry(TypeDefinitionRegistry typeRegistry, RuntimeWiring wiring) throws SchemaProblem {<NEW_LINE>List<GraphQLError> <MASK><NEW_LINE>checkForMissingTypes(errors, typeRegistry);<NEW_LINE>SchemaTypeExtensionsChecker typeExtensionsChecker = new SchemaTypeExtensionsChecker();<NEW_LINE>typeExtensionsChecker.checkTypeExtensions(errors, typeRegistry);<NEW_LINE>ImplementingTypesChecker implementingTypesChecker = new ImplementingTypesChecker();<NEW_LINE>implementingTypesChecker.checkImplementingTypes(errors, typeRegistry);<NEW_LINE>UnionTypesChecker unionTypesChecker = new UnionTypesChecker();<NEW_LINE>unionTypesChecker.checkUnionType(errors, typeRegistry);<NEW_LINE>SchemaExtensionsChecker.checkSchemaInvariants(errors, typeRegistry);<NEW_LINE>checkScalarImplementationsArePresent(errors, typeRegistry, wiring);<NEW_LINE>checkTypeResolversArePresent(errors, typeRegistry, wiring);<NEW_LINE>checkFieldsAreSensible(errors, typeRegistry);<NEW_LINE>// check directive definitions before checking directive usages<NEW_LINE>checkDirectiveDefinitions(typeRegistry, errors);<NEW_LINE>SchemaTypeDirectivesChecker directivesChecker = new SchemaTypeDirectivesChecker(typeRegistry, wiring);<NEW_LINE>directivesChecker.checkTypeDirectives(errors);<NEW_LINE>return errors;<NEW_LINE>}
errors = new ArrayList<>();
911,639
public boolean processScriptBefore(String fieldName) {<NEW_LINE>int index = getIndexOfScript(fieldName, true);<NEW_LINE>if (index == -1) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>String beforeElementName = <MASK><NEW_LINE>if (StringUtils.isNotEmpty(beforeElementName)) {<NEW_LINE>if (beforeElementName.equals(getBeforeTableToken())) {<NEW_LINE>beforeElementName = getTableTableName();<NEW_LINE>} else if (beforeElementName.equals(getBeforeRowToken())) {<NEW_LINE>beforeElementName = getTableRowName();<NEW_LINE>} else if (beforeElementName.equals(getBeforeTableCellToken())) {<NEW_LINE>beforeElementName = getTableCellName();<NEW_LINE>} else if (beforeElementName.startsWith(BEFORE_TOKEN)) {<NEW_LINE>beforeElementName = beforeElementName.substring(BEFORE_TOKEN.length(), beforeElementName.length());<NEW_LINE>}<NEW_LINE>BufferedElement elementInfo = super.findParentElementInfo(singletonList(beforeElementName));<NEW_LINE>if (elementInfo == null) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>String before = fieldName.substring(index, fieldName.length());<NEW_LINE>before = formatDirective(before);<NEW_LINE>elementInfo.setContentBeforeStartTagElement(before);<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>return false;<NEW_LINE>}
fieldName.substring(0, index);
340,839
private void initTransitionWatcher(final ProtocolContext protocolContext, final TransitionCoordinator composedCoordinator) {<NEW_LINE>PostMergeContext postMergeContext = protocolContext.getConsensusContext(PostMergeContext.class);<NEW_LINE>postMergeContext.observeNewIsPostMergeState(newIsPostMergeState -> {<NEW_LINE>if (newIsPostMergeState) {<NEW_LINE>// if we transitioned to post-merge, stop and disable any mining<NEW_LINE>composedCoordinator.getPreMergeObject().disable();<NEW_LINE>composedCoordinator.getPreMergeObject().stop();<NEW_LINE>// set the blockchoiceRule to never reorg, rely on forkchoiceUpdated instead<NEW_LINE>protocolContext.getBlockchain().setBlockChoiceRule((newBlockHeader, currentBlockHeader) -> -1);<NEW_LINE>} else if (composedCoordinator.isMiningBeforeMerge()) {<NEW_LINE>// if our merge state is set to pre-merge and we are mining, start mining<NEW_LINE>composedCoordinator.getPreMergeObject().enable();<NEW_LINE>composedCoordinator.getPreMergeObject().start();<NEW_LINE>}<NEW_LINE>});<NEW_LINE>// initialize our merge context merge status before we would start either<NEW_LINE><MASK><NEW_LINE>blockchain.getTotalDifficultyByHash(blockchain.getChainHeadHash()).ifPresent(postMergeContext::setIsPostMerge);<NEW_LINE>}
Blockchain blockchain = protocolContext.getBlockchain();
1,248,142
private void addDyeRecipes(Consumer<FinishedRecipe> consumer, String basePath) {<NEW_LINE>// Red<NEW_LINE>dye(consumer, basePath, Items.RED_DYE, EnumColor.RED, BOPBlocks.ROSE);<NEW_LINE>// Purple<NEW_LINE>dye(consumer, basePath, Items.PURPLE_DYE, EnumColor.PURPLE, BOPBlocks.VIOLET, BOPBlocks.LAVENDER);<NEW_LINE>// Magenta<NEW_LINE>dye(consumer, basePath, Items.MAGENTA_DYE, EnumColor.PINK, BOPBlocks.WILDFLOWER);<NEW_LINE>// Orange<NEW_LINE>dye(consumer, basePath, Items.ORANGE_DYE, EnumColor.ORANGE, <MASK><NEW_LINE>// Pink<NEW_LINE>dye(consumer, basePath, Items.PINK_DYE, EnumColor.BRIGHT_PINK, BOPBlocks.PINK_DAFFODIL, BOPBlocks.PINK_HIBISCUS);<NEW_LINE>// Cyan<NEW_LINE>dye(consumer, basePath, Items.CYAN_DYE, EnumColor.DARK_AQUA, BOPBlocks.GLOWFLOWER);<NEW_LINE>// Gray<NEW_LINE>dye(consumer, basePath, Items.GRAY_DYE, EnumColor.DARK_GRAY, BOPBlocks.WILTED_LILY);<NEW_LINE>// Light Blue<NEW_LINE>dye(consumer, basePath, Items.LIGHT_BLUE_DYE, EnumColor.INDIGO, BOPBlocks.BLUE_HYDRANGEA);<NEW_LINE>// Yellow<NEW_LINE>dye(consumer, basePath, Items.YELLOW_DYE, EnumColor.YELLOW, BOPBlocks.GOLDENROD);<NEW_LINE>}
BOPBlocks.ORANGE_COSMOS, BOPBlocks.BURNING_BLOSSOM);
1,038,609
// DO NOT MODIFY THIS CODE, GENERATED AUTOMATICALLY<NEW_LINE>public static boolean isVerified0(com.sun.jdi.ReferenceType a) {<NEW_LINE>if (org.netbeans.modules.debugger.jpda.JDIExceptionReporter.isLoggable()) {<NEW_LINE>org.netbeans.modules.debugger.jpda.JDIExceptionReporter.logCallStart("com.sun.jdi.ReferenceType", "isVerified", "JDI CALL: com.sun.jdi.ReferenceType({0}).isVerified()", <MASK><NEW_LINE>}<NEW_LINE>Object retValue = null;<NEW_LINE>try {<NEW_LINE>boolean ret;<NEW_LINE>ret = a.isVerified();<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>return false;<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>return false;<NEW_LINE>} catch (com.sun.jdi.ObjectCollectedException ex) {<NEW_LINE>retValue = ex;<NEW_LINE>return false;<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.ReferenceType", "isVerified", retValue);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
new Object[] { a });
1,819,832
public static ListQueryProcessorsResponse unmarshall(ListQueryProcessorsResponse listQueryProcessorsResponse, UnmarshallerContext _ctx) {<NEW_LINE>listQueryProcessorsResponse.setRequestId(_ctx.stringValue("ListQueryProcessorsResponse.requestId"));<NEW_LINE>List<ResultItem> result = new ArrayList<ResultItem>();<NEW_LINE>for (int i = 0; i < _ctx.lengthValue("ListQueryProcessorsResponse.result.Length"); i++) {<NEW_LINE>ResultItem resultItem = new ResultItem();<NEW_LINE>resultItem.setName(_ctx.stringValue("ListQueryProcessorsResponse.result[" + i + "].name"));<NEW_LINE>resultItem.setActive(_ctx.booleanValue("ListQueryProcessorsResponse.result[" + i + "].active"));<NEW_LINE>resultItem.setDomain(_ctx.stringValue("ListQueryProcessorsResponse.result[" + i + "].domain"));<NEW_LINE>resultItem.setCreated(_ctx.integerValue<MASK><NEW_LINE>resultItem.setUpdated(_ctx.integerValue("ListQueryProcessorsResponse.result[" + i + "].updated"));<NEW_LINE>List<String> indexes = new ArrayList<String>();<NEW_LINE>for (int j = 0; j < _ctx.lengthValue("ListQueryProcessorsResponse.result[" + i + "].indexes.Length"); j++) {<NEW_LINE>indexes.add(_ctx.stringValue("ListQueryProcessorsResponse.result[" + i + "].indexes[" + j + "]"));<NEW_LINE>}<NEW_LINE>resultItem.setIndexes(indexes);<NEW_LINE>List<Map<Object, Object>> processors = _ctx.listMapValue("ListQueryProcessorsResponse.result[" + i + "].processors");<NEW_LINE>resultItem.setProcessors(processors);<NEW_LINE>result.add(resultItem);<NEW_LINE>}<NEW_LINE>listQueryProcessorsResponse.setResult(result);<NEW_LINE>return listQueryProcessorsResponse;<NEW_LINE>}
("ListQueryProcessorsResponse.result[" + i + "].created"));
979,293
public void plusTo(GradPair gp, int index) {<NEW_LINE>if (numClass == 2 || multiClassMultiTree) {<NEW_LINE>((BinaryGradPair) gp).plusBy(gradients[<MASK><NEW_LINE>} else if (!fullHessian) {<NEW_LINE>MultiGradPair multi = (MultiGradPair) gp;<NEW_LINE>double[] grad = multi.getGrad();<NEW_LINE>double[] hess = multi.getHess();<NEW_LINE>int offset = index * numClass;<NEW_LINE>for (int i = 0; i < numClass; i++) {<NEW_LINE>grad[i] += gradients[offset + i];<NEW_LINE>hess[i] += hessians[offset + i];<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>MultiGradPair multi = (MultiGradPair) gp;<NEW_LINE>double[] grad = multi.getGrad();<NEW_LINE>double[] hess = multi.getHess();<NEW_LINE>int gradOffset = index * grad.length;<NEW_LINE>int hessOffset = index * hess.length;<NEW_LINE>for (int i = 0; i < grad.length; i++) {<NEW_LINE>grad[i] += gradients[gradOffset + i];<NEW_LINE>}<NEW_LINE>for (int i = 0; i < hess.length; i++) {<NEW_LINE>hess[i] += hessians[hessOffset + i];<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
index], hessians[index]);
1,019,110
public String table(String message, String separator) {<NEW_LINE>String[] lines = StringUtils.split(message, '\n');<NEW_LINE>List<String[]> rows = new ArrayList<>();<NEW_LINE>Maximum.ForInteger rowWidth <MASK><NEW_LINE>for (String line : lines) {<NEW_LINE>String[] row = line.split(separator);<NEW_LINE>rowWidth.add(row.length);<NEW_LINE>rows.add(row);<NEW_LINE>}<NEW_LINE>int columns = rowWidth.getMaxAndReset();<NEW_LINE>int[] maxWidths = findMaxWidths(rows, columns);<NEW_LINE>int compensates = getWidth(" ");<NEW_LINE>StringBuilder table = new StringBuilder();<NEW_LINE>for (String[] row : rows) {<NEW_LINE>for (int i = 0; i < row.length; i++) {<NEW_LINE>int width = getWidth(row[i]);<NEW_LINE>table.append(row[i]);<NEW_LINE>while (maxWidths[i] > width) {<NEW_LINE>table.append(" ");<NEW_LINE>width += compensates;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>table.append('\n');<NEW_LINE>}<NEW_LINE>return table.toString();<NEW_LINE>}
= new Maximum.ForInteger(0);
1,828,912
public void onBindViewHolder(@NonNull final StickerPackListItemViewHolder viewHolder, final int index) {<NEW_LINE>StickerPack pack = stickerPacks.get(index);<NEW_LINE>final Context context = viewHolder.publisherView.getContext();<NEW_LINE>viewHolder.publisherView.setText(pack.publisher);<NEW_LINE>viewHolder.filesizeView.setText(Formatter.formatShortFileSize(context, pack.getTotalSize()));<NEW_LINE>viewHolder.titleView.setText(pack.name);<NEW_LINE>viewHolder.container.setOnClickListener(view -> {<NEW_LINE>Intent intent = new Intent(view.getContext(), StickerPackDetailsActivity.class);<NEW_LINE>intent.putExtra(StickerPackDetailsActivity.EXTRA_SHOW_UP_BUTTON, true);<NEW_LINE>intent.putExtra(StickerPackDetailsActivity.EXTRA_STICKER_PACK_DATA, pack);<NEW_LINE>view.<MASK><NEW_LINE>});<NEW_LINE>viewHolder.imageRowView.removeAllViews();<NEW_LINE>// if this sticker pack contains less stickers than the max, then take the smaller size.<NEW_LINE>int actualNumberOfStickersToShow = Math.min(maxNumberOfStickersInARow, pack.getStickers().size());<NEW_LINE>for (int i = 0; i < actualNumberOfStickersToShow; i++) {<NEW_LINE>final SimpleDraweeView rowImage = (SimpleDraweeView) LayoutInflater.from(context).inflate(R.layout.sticker_packs_list_image_item, viewHolder.imageRowView, false);<NEW_LINE>rowImage.setImageURI(StickerPackLoader.getStickerAssetUri(pack.identifier, pack.getStickers().get(i).imageFileName));<NEW_LINE>final LinearLayout.LayoutParams lp = (LinearLayout.LayoutParams) rowImage.getLayoutParams();<NEW_LINE>final int marginBetweenImages = minMarginBetweenImages - lp.leftMargin - lp.rightMargin;<NEW_LINE>if (i != actualNumberOfStickersToShow - 1 && marginBetweenImages > 0) {<NEW_LINE>// do not set the margin for the last image<NEW_LINE>lp.setMargins(lp.leftMargin, lp.topMargin, lp.rightMargin + marginBetweenImages, lp.bottomMargin);<NEW_LINE>rowImage.setLayoutParams(lp);<NEW_LINE>}<NEW_LINE>viewHolder.imageRowView.addView(rowImage);<NEW_LINE>}<NEW_LINE>setAddButtonAppearance(viewHolder.addButton, pack);<NEW_LINE>viewHolder.animatedStickerPackIndicator.setVisibility(pack.animatedStickerPack ? View.VISIBLE : View.GONE);<NEW_LINE>}
getContext().startActivity(intent);
786,229
public SOAPMessage invoke(SOAPMessage request) {<NEW_LINE>SOAPMessage response = null;<NEW_LINE>try {<NEW_LINE>System.out.println("X509XmlStrService5: Incoming Client Request as a SOAPMessage:");<NEW_LINE>request.writeTo(System.out);<NEW_LINE>String hdrText = request.getSOAPHeader().getTextContent();<NEW_LINE>System.out.println("Incoming SOAP Header:" + hdrText);<NEW_LINE>StringReader respMsg = new StringReader("<soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\"><soapenv:Body xmlns=\"http://wssec.basic.cxf.fats/types\"><provider>This is X509XmlStrService5 Web Service.</provider></soapenv:Body></soapenv:Envelope>");<NEW_LINE><MASK><NEW_LINE>MessageFactory factory = MessageFactory.newInstance();<NEW_LINE>response = factory.createMessage();<NEW_LINE>response.getSOAPPart().setContent(src);<NEW_LINE>response.saveChanges();<NEW_LINE>} catch (Exception ex) {<NEW_LINE>ex.printStackTrace();<NEW_LINE>}<NEW_LINE>return response;<NEW_LINE>}
Source src = new StreamSource(respMsg);
1,804,284
public synchronized void sttEventReceived(STTEvent sttEvent) {<NEW_LINE>if (sttEvent instanceof SpeechRecognitionEvent) {<NEW_LINE>if (!this.isSTTServerAborting) {<NEW_LINE>this.sttServiceHandle.abort();<NEW_LINE>this.isSTTServerAborting = true;<NEW_LINE>SpeechRecognitionEvent sre = (SpeechRecognitionEvent) sttEvent;<NEW_LINE>String question = sre.getTranscript();<NEW_LINE>try {<NEW_LINE>toggleProcessing(false);<NEW_LINE>String answer = hli.<MASK><NEW_LINE>if (answer != null) {<NEW_LINE>say(answer);<NEW_LINE>}<NEW_LINE>} catch (InterpretationException e) {<NEW_LINE>say(e.getMessage());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} else if (sttEvent instanceof RecognitionStopEvent) {<NEW_LINE>toggleProcessing(false);<NEW_LINE>} else if (sttEvent instanceof SpeechRecognitionErrorEvent) {<NEW_LINE>if (!this.isSTTServerAborting) {<NEW_LINE>this.sttServiceHandle.abort();<NEW_LINE>this.isSTTServerAborting = true;<NEW_LINE>toggleProcessing(false);<NEW_LINE>SpeechRecognitionErrorEvent sre = (SpeechRecognitionErrorEvent) sttEvent;<NEW_LINE>say("Encountered error: " + sre.getMessage());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
interpret(this.locale, question);
261,026
public String serialize(int numberOfSpacesToIndent, HttpResponse httpResponse) {<NEW_LINE>StringBuffer output = new StringBuffer();<NEW_LINE>if (httpResponse != null) {<NEW_LINE>appendNewLineAndIndent(numberOfSpacesToIndent * INDENT_SIZE, output).append("response()");<NEW_LINE>if (httpResponse.getStatusCode() != null) {<NEW_LINE>appendNewLineAndIndent((numberOfSpacesToIndent + 1) * INDENT_SIZE, output).append(".withStatusCode(").append(httpResponse.getStatusCode()).append(")");<NEW_LINE>}<NEW_LINE>if (httpResponse.getReasonPhrase() != null) {<NEW_LINE>appendNewLineAndIndent((numberOfSpacesToIndent + 1) * INDENT_SIZE, output).append(".withReasonPhrase(\"").append(StringEscapeUtils.escapeJava(httpResponse.getReasonPhrase())).append("\")");<NEW_LINE>}<NEW_LINE>outputHeaders(numberOfSpacesToIndent + 1, output, httpResponse.getHeaderList());<NEW_LINE>outputCookies(numberOfSpacesToIndent + 1, output, httpResponse.getCookieList());<NEW_LINE>if (isNotBlank(httpResponse.getBodyAsString())) {<NEW_LINE>if (httpResponse.getBody() instanceof BinaryBody) {<NEW_LINE>appendNewLineAndIndent((numberOfSpacesToIndent + 1) * INDENT_SIZE, output);<NEW_LINE>BinaryBody body = (BinaryBody) httpResponse.getBody();<NEW_LINE>output.append(".withBody(new Base64Converter().base64StringToBytes(\"").append(base64Converter.bytesToBase64String(body.getRawBytes())).append("\"))");<NEW_LINE>} else {<NEW_LINE>appendNewLineAndIndent((numberOfSpacesToIndent + 1) * INDENT_SIZE, output).append(".withBody(\"").append(StringEscapeUtils.escapeJava(httpResponse.getBodyAsString())).append("\")");<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (httpResponse.getDelay() != null) {<NEW_LINE>appendNewLineAndIndent((numberOfSpacesToIndent + 1) * INDENT_SIZE, output).append(".withDelay(").append(new DelayToJavaSerializer().serialize(0, httpResponse.getDelay())).append(")");<NEW_LINE>}<NEW_LINE>if (httpResponse.getConnectionOptions() != null) {<NEW_LINE>appendNewLineAndIndent((numberOfSpacesToIndent + 1) * INDENT_SIZE, output).append(".withConnectionOptions(");<NEW_LINE>output.append(new ConnectionOptionsToJavaSerializer().serialize(numberOfSpacesToIndent + 2, httpResponse.getConnectionOptions()));<NEW_LINE>appendNewLineAndIndent((numberOfSpacesToIndent + 1) * INDENT_SIZE<MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE>return output.toString();<NEW_LINE>}
, output).append(")");
1,783,646
public void openLink(String url, String title, String target) {<NEW_LINE>Objects.requireNonNull(url);<NEW_LINE>// javascript: security issue<NEW_LINE>if (SecurityUtils.ignoreThisLink(url))<NEW_LINE>return;<NEW_LINE>// if (pendingAction.size() > 0)<NEW_LINE>// closeLink();<NEW_LINE>pendingAction.add(0, (Element) document.createElement("a"));<NEW_LINE>pendingAction.get(0).setAttribute("target", target);<NEW_LINE>pendingAction.get(0).setAttribute(XLINK_HREF1, url);<NEW_LINE>pendingAction.get(0).setAttribute(XLINK_HREF2, url);<NEW_LINE>pendingAction.get(0).setAttribute("xlink:type", "simple");<NEW_LINE>pendingAction.get(0).setAttribute("xlink:actuate", "onRequest");<NEW_LINE>pendingAction.get(0<MASK><NEW_LINE>if (title == null) {<NEW_LINE>pendingAction.get(0).setAttribute(XLINK_TITLE1, url);<NEW_LINE>pendingAction.get(0).setAttribute(XLINK_TITLE2, url);<NEW_LINE>} else {<NEW_LINE>title = formatTitle(title);<NEW_LINE>pendingAction.get(0).setAttribute(XLINK_TITLE1, title);<NEW_LINE>pendingAction.get(0).setAttribute(XLINK_TITLE2, title);<NEW_LINE>}<NEW_LINE>}
).setAttribute("xlink:show", "new");
146,675
private void cleanupSubscription(SubscriptionItemStream stream) {<NEW_LINE>if (tc.isEntryEnabled())<NEW_LINE>SibTr.<MASK><NEW_LINE>try {<NEW_LINE>// Indicate that we don't want the asynch deletion thread restarted if the<NEW_LINE>// subscription fails to delete, otherwise we might end up in a tight loop trying<NEW_LINE>// to delete the subscription<NEW_LINE>stream.deleteIfPossible(false);<NEW_LINE>} catch (Exception e) {<NEW_LINE>// FFDC<NEW_LINE>FFDCFilter.processException(e, "com.ibm.ws.sib.processor.impl.AsynchDeletionThread.cleanupSubscription", "1:340:1.50", stream);<NEW_LINE>if (tc.isDebugEnabled()) {<NEW_LINE>SibTr.debug(tc, "Failed to delete subscription " + stream);<NEW_LINE>SibTr.exception(tc, e);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (tc.isEntryEnabled())<NEW_LINE>SibTr.exit(tc, "cleanupSubscription");<NEW_LINE>}
entry(tc, "cleanupSubscription", stream);
267,860
public static void main(final String[] args) throws IOException {<NEW_LINE>final Circle circle = new Circle();<NEW_LINE>circle.Type = Type.Circle;<NEW_LINE>circle.Radius = 3.14;<NEW_LINE>final Rectangle rectangle = new Rectangle();<NEW_LINE>rectangle.Type = Type.Rectangle;<NEW_LINE>rectangle.Width = 10.0;<NEW_LINE>rectangle.Height = 5.5;<NEW_LINE>final Polymorphic src = new Polymorphic();<NEW_LINE>// We must explicitly upcast to a Bonded<Shape> with Bonded.cast()<NEW_LINE>// to be able to insert into the collection.<NEW_LINE>src.Shapes.add(Bonded.fromObject(circle, Circle.BOND_TYPE).cast(Shape.BOND_TYPE));<NEW_LINE>src.Shapes.add(Bonded.fromObject(rectangle, Rectangle.BOND_TYPE).cast(Shape.BOND_TYPE));<NEW_LINE>final ByteArrayOutputStream output = new ByteArrayOutputStream();<NEW_LINE>final CompactBinaryWriter writer = new CompactBinaryWriter<MASK><NEW_LINE>final Serializer<Polymorphic> serializer = new Serializer<>();<NEW_LINE>serializer.serialize(src, writer);<NEW_LINE>final ByteArrayInputStream input = new ByteArrayInputStream(output.toByteArray());<NEW_LINE>final CompactBinaryReader reader = new CompactBinaryReader(input, (short) 1);<NEW_LINE>final Deserializer<Polymorphic> deserializer = new Deserializer<>(Polymorphic.BOND_TYPE);<NEW_LINE>final Polymorphic dst = deserializer.deserialize(reader);<NEW_LINE>for (Bonded<Shape> item : dst.Shapes) {<NEW_LINE>// Deserialize item as Shape and extract object type<NEW_LINE>Type type = item.deserialize().Type;<NEW_LINE>if (type.equals(Type.Circle)) {<NEW_LINE>// The generic method<NEW_LINE>// Bonded<T>.deserialize(StructBondType<U>) can be used to<NEW_LINE>// deserialize as a specific type.<NEW_LINE>final Circle c = item.deserialize(Circle.BOND_TYPE);<NEW_LINE>assert circle.equals(c) : "Circle roundtrip failed";<NEW_LINE>} else if (type.equals(Type.Rectangle)) {<NEW_LINE>// Alternatively, Bonded<T>.convert(StructBondType<U>) can<NEW_LINE>// be used to get a Bonded<U>, and then<NEW_LINE>// Bonded<U>.deserialize() can be used.<NEW_LINE>final Rectangle r = item.convert(Rectangle.BOND_TYPE).deserialize();<NEW_LINE>assert rectangle.equals(r) : "Rectangle rounttip failed";<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
(output, (short) 1);
664,633
public void init(DataSource dataSource) throws Exception {<NEW_LINE><MASK><NEW_LINE>Assert.hasLength(selectClause, "selectClause must be specified");<NEW_LINE>Assert.hasLength(fromClause, "fromClause must be specified");<NEW_LINE>Assert.notEmpty(sortKeys, "sortKey must be specified");<NEW_LINE>StringBuilder sql = new StringBuilder();<NEW_LINE>sql.append("SELECT ").append(selectClause);<NEW_LINE>sql.append(" FROM ").append(fromClause);<NEW_LINE>if (whereClause != null) {<NEW_LINE>sql.append(" WHERE ").append(whereClause);<NEW_LINE>}<NEW_LINE>List<String> namedParameters = new ArrayList<String>();<NEW_LINE>parameterCount = JdbcParameterUtils.countParameterPlaceholders(sql.toString(), namedParameters);<NEW_LINE>if (namedParameters.size() > 0) {<NEW_LINE>if (parameterCount != namedParameters.size()) {<NEW_LINE>throw new InvalidDataAccessApiUsageException("You can't use both named parameters and classic \"?\" placeholders: " + sql);<NEW_LINE>}<NEW_LINE>usingNamedParameters = true;<NEW_LINE>}<NEW_LINE>}
Assert.notNull(dataSource, "data source must be specified");
287,421
public void testDataSequential() throws Exception {<NEW_LINE>loadData(200000, 2);<NEW_LINE>close();<NEW_LINE>KeyColumnValueStoreManager manager = openStorageManager();<NEW_LINE>KeyColumnValueStore store = manager.openDatabase(Backend.EDGESTORE_NAME);<NEW_LINE>SliceQuery query = new SliceQuery(BufferUtil.zeroBuffer(8), BufferUtil.oneBuffer(8));<NEW_LINE>query.setLimit(2);<NEW_LINE>Stopwatch watch = Stopwatch.createStarted();<NEW_LINE>StoreTransaction txh = manager.beginTransaction(StandardBaseTransactionConfig.of(TimestampProviders.MILLI));<NEW_LINE>KeyIterator iterator = store.getKeys(query, txh);<NEW_LINE>int numV = 0;<NEW_LINE>while (iterator.hasNext()) {<NEW_LINE>iterator.next();<NEW_LINE>RecordIterator<Entry> entries = iterator.getEntries();<NEW_LINE>assertEquals(2<MASK><NEW_LINE>numV++;<NEW_LINE>}<NEW_LINE>iterator.close();<NEW_LINE>txh.commit();<NEW_LINE>System.out.println("Time taken: " + watch.elapsed(TimeUnit.MILLISECONDS));<NEW_LINE>System.out.println("Num Vertices: " + numV);<NEW_LINE>store.close();<NEW_LINE>manager.close();<NEW_LINE>}
, Iterators.size(entries));
1,456,871
public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {<NEW_LINE>Log_OC.i(TAG, "onCreateView() start");<NEW_LINE>View v = super.<MASK><NEW_LINE>if (savedInstanceState != null && savedInstanceState.getParcelable(KEY_CURRENT_SEARCH_TYPE) != null && savedInstanceState.getParcelable(OCFileListFragment.SEARCH_EVENT) != null) {<NEW_LINE>searchFragment = true;<NEW_LINE>currentSearchType = savedInstanceState.getParcelable(KEY_CURRENT_SEARCH_TYPE);<NEW_LINE>searchEvent = savedInstanceState.getParcelable(OCFileListFragment.SEARCH_EVENT);<NEW_LINE>} else {<NEW_LINE>currentSearchType = NO_SEARCH;<NEW_LINE>}<NEW_LINE>Bundle args = getArguments();<NEW_LINE>boolean allowContextualActions = args != null && args.getBoolean(ARG_ALLOW_CONTEXTUAL_ACTIONS, false);<NEW_LINE>if (allowContextualActions) {<NEW_LINE>setChoiceModeAsMultipleModal(savedInstanceState);<NEW_LINE>}<NEW_LINE>mFabMain = requireActivity().findViewById(R.id.fab_main);<NEW_LINE>if (mFabMain != null) {<NEW_LINE>// is not available in FolderPickerActivity<NEW_LINE>themeFabUtils.colorFloatingActionButton(mFabMain, R.drawable.ic_plus, requireContext());<NEW_LINE>}<NEW_LINE>Log_OC.i(TAG, "onCreateView() end");<NEW_LINE>return v;<NEW_LINE>}
onCreateView(inflater, container, savedInstanceState);
221,487
public CompatibleEnvironmentTemplateInput unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>CompatibleEnvironmentTemplateInput compatibleEnvironmentTemplateInput = new CompatibleEnvironmentTemplateInput();<NEW_LINE><MASK><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("majorVersion", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>compatibleEnvironmentTemplateInput.setMajorVersion(context.getUnmarshaller(String.class).unmarshall(context));<NEW_LINE>}<NEW_LINE>if (context.testExpression("templateName", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>compatibleEnvironmentTemplateInput.setTemplateName(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 compatibleEnvironmentTemplateInput;<NEW_LINE>}
int originalDepth = context.getCurrentDepth();
601,767
public static ClassSetAnalysisData merge(List<ClassSetAnalysisData> datas) {<NEW_LINE>int classCount = 0;<NEW_LINE>int constantsCount = 0;<NEW_LINE>int dependentsCount = 0;<NEW_LINE>for (ClassSetAnalysisData data : datas) {<NEW_LINE>classCount += data.classHashes.size();<NEW_LINE>constantsCount += data.classesToConstants.size();<NEW_LINE>dependentsCount += data.dependents.size();<NEW_LINE>}<NEW_LINE>Map<String, HashCode> classHashes = new HashMap<>(classCount);<NEW_LINE>Map<String, IntSet> classesToConstants = new HashMap<>(constantsCount);<NEW_LINE>Multimap<String, DependentsSet> dependents = ArrayListMultimap.create(dependentsCount, 10);<NEW_LINE>String fullRebuildCause = null;<NEW_LINE>for (ClassSetAnalysisData data : Lists.reverse(datas)) {<NEW_LINE>classHashes.putAll(data.classHashes);<NEW_LINE>classesToConstants.putAll(data.classesToConstants);<NEW_LINE>data.dependents.forEach(dependents::put);<NEW_LINE>if (fullRebuildCause == null) {<NEW_LINE>fullRebuildCause = data.fullRebuildCause;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>ImmutableMap.Builder<String, DependentsSet> mergedDependents = ImmutableMap.<MASK><NEW_LINE>for (Map.Entry<String, Collection<DependentsSet>> entry : dependents.asMap().entrySet()) {<NEW_LINE>mergedDependents.put(entry.getKey(), DependentsSet.merge(entry.getValue()));<NEW_LINE>}<NEW_LINE>return new ClassSetAnalysisData(classHashes, mergedDependents.build(), classesToConstants, fullRebuildCause);<NEW_LINE>}
builderWithExpectedSize(dependents.size());
1,526,421
public BitSet findOuterMostDecisionStates() {<NEW_LINE>BitSet track = new BitSet(<MASK><NEW_LINE>int numberOfDecisions = atn.getNumberOfDecisions();<NEW_LINE>for (int i = 0; i < numberOfDecisions; i++) {<NEW_LINE>DecisionState decisionState = atn.getDecisionState(i);<NEW_LINE>RuleStartState startState = atn.ruleToStartState[decisionState.ruleIndex];<NEW_LINE>// Look for StarLoopEntryState that is in any left recursive rule<NEW_LINE>if (decisionState instanceof StarLoopEntryState) {<NEW_LINE>StarLoopEntryState loopEntry = (StarLoopEntryState) decisionState;<NEW_LINE>if (loopEntry.isPrecedenceDecision) {<NEW_LINE>// Recursive alts always result in a (...)* in the transformed<NEW_LINE>// left recursive rule and that always has a BasicBlockStartState<NEW_LINE>// even if just 1 recursive alt exists.<NEW_LINE>ATNState blockStart = loopEntry.transition(0).target;<NEW_LINE>// track the StarBlockStartState associated with the recursive alternatives<NEW_LINE>track.set(blockStart.stateNumber);<NEW_LINE>}<NEW_LINE>} else if (startState.transition(0).target == decisionState) {<NEW_LINE>// always track outermost block for any rule if it exists<NEW_LINE>track.set(decisionState.stateNumber);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return track;<NEW_LINE>}
atn.states.size());
314,453
public boolean checkTrigger(GameEvent event, Game game) {<NEW_LINE>if (event.getType() == GameEvent.EventType.DAMAGED_PLAYER) {<NEW_LINE>DamagedPlayerEvent damageEvent = (DamagedPlayerEvent) event;<NEW_LINE>Permanent p = game.getPermanent(event.getSourceId());<NEW_LINE>if (damageEvent.isCombatDamage() && p != null && p.isControlledBy(this.getControllerId()) && !damagedPlayerIds.contains(event.getPlayerId()) && p.hasAbility(FlyingAbility.getInstance(), game)) {<NEW_LINE>damagedPlayerIds.add(event.getPlayerId());<NEW_LINE>this.getEffects().get(0).setTargetPointer(new FixedTarget<MASK><NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (event.getType() == GameEvent.EventType.COMBAT_DAMAGE_STEP_PRIORITY || (event.getType() == GameEvent.EventType.ZONE_CHANGE && event.getTargetId().equals(getSourceId()))) {<NEW_LINE>damagedPlayerIds.clear();<NEW_LINE>}<NEW_LINE>return false;<NEW_LINE>}
(event.getPlayerId()));
746,898
private void changePassphrase(final char[] oldPassphrase) {<NEW_LINE>final char[] newPassphrase = getEnteredPassphrase(newPassphraseInput);<NEW_LINE>final char[] repeatPassphrase = getEnteredPassphrase(repeatPassphraseInput);<NEW_LINE>if (newPassphrase.length == 0) {<NEW_LINE><MASK><NEW_LINE>return;<NEW_LINE>} else if (!Arrays.equals(newPassphrase, repeatPassphrase)) {<NEW_LINE>showPopup(R.string.PassphraseChangeActivity_passphrases_dont_match_exclamation);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (!isPassphraseValidatorReady())<NEW_LINE>return;<NEW_LINE>PassphraseValidator.Strength strength = validator.estimate(newPassphrase);<NEW_LINE>if (!strength.isValid()) {<NEW_LINE>String body = getString(R.string.ChangePassphraseDialogFragment_estimated_time_to_crack_suggestion, strength.getError(), strength.getTimeToCrack(), strength.getSuggestion());<NEW_LINE>new AlertDialog.Builder(requireActivity()).setTitle(R.string.ChangePassphraseDialogFragment_weak_passphrase).setIcon(R.drawable.ic_warning).setMessage(body).setPositiveButton(android.R.string.ok, null).show();<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>changeMasterSecret(newPassphrase, oldPassphrase);<NEW_LINE>}
showPopup(R.string.PassphraseChangeActivity_enter_new_passphrase_exclamation);
1,840,953
public void processWay(ReaderWay way) {<NEW_LINE>try {<NEW_LINE>if (arrStorageBuilders != null) {<NEW_LINE>int nStorages = arrStorageBuilders.length;<NEW_LINE>if (nStorages > 0) {<NEW_LINE>if (nStorages == 1) {<NEW_LINE>arrStorageBuilders[0].processWay(way);<NEW_LINE>} else if (nStorages == 2) {<NEW_LINE>arrStorageBuilders[0].processWay(way);<NEW_LINE>arrStorageBuilders[1].processWay(way);<NEW_LINE>} else if (nStorages == 3) {<NEW_LINE>arrStorageBuilders[0].processWay(way);<NEW_LINE>arrStorageBuilders[1].processWay(way);<NEW_LINE>arrStorageBuilders<MASK><NEW_LINE>} else if (nStorages == 4) {<NEW_LINE>arrStorageBuilders[0].processWay(way);<NEW_LINE>arrStorageBuilders[1].processWay(way);<NEW_LINE>arrStorageBuilders[2].processWay(way);<NEW_LINE>arrStorageBuilders[3].processWay(way);<NEW_LINE>} else {<NEW_LINE>for (int i = 0; i < nStorages; ++i) {<NEW_LINE>arrStorageBuilders[i].processWay(way);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} catch (Exception ex) {<NEW_LINE>LOGGER.warning(ex.getMessage() + ". Way id = " + way.getId());<NEW_LINE>}<NEW_LINE>}
[2].processWay(way);
1,691,520
public IpGeoLocation unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>IpGeoLocation ipGeoLocation = new IpGeoLocation();<NEW_LINE><MASK><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("lat", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>ipGeoLocation.setLat(context.getUnmarshaller(Double.class).unmarshall(context));<NEW_LINE>}<NEW_LINE>if (context.testExpression("lon", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>ipGeoLocation.setLon(context.getUnmarshaller(Double.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 ipGeoLocation;<NEW_LINE>}
int originalDepth = context.getCurrentDepth();
508,265
public void run(RegressionEnvironment env) {<NEW_LINE>AtomicInteger milestone = new AtomicInteger();<NEW_LINE>String[] filtersAB = new String[] { "theString='a' and (intPrimitive=1 or longPrimitive=10)" };<NEW_LINE>for (String filter : filtersAB) {<NEW_LINE><MASK><NEW_LINE>env.compileDeployAddListenerMile(epl, "s0", milestone.getAndIncrement());<NEW_LINE>if (SupportFilterOptimizableHelper.hasFilterIndexPlanBasicOrMore(env)) {<NEW_LINE>SupportFilterServiceHelper.assertFilterSvcByTypeMulti(env, "s0", "SupportBean", new FilterItem[][] { { new FilterItem("theString", FilterOperator.EQUAL), new FilterItem("intPrimitive", FilterOperator.EQUAL) }, { new FilterItem("theString", FilterOperator.EQUAL), new FilterItem("longPrimitive", FilterOperator.EQUAL) } });<NEW_LINE>}<NEW_LINE>sendAssertEvents(env, new SupportBean[] { makeEvent("a", 1, 0), makeEvent("a", 0, 10), makeEvent("a", 1, 10) }, new SupportBean[] { makeEvent("x", 0, 0), makeEvent("a", 2, 20), makeEvent("x", 1, 10) });<NEW_LINE>env.undeployAll();<NEW_LINE>}<NEW_LINE>}
String epl = "@name('s0') select * from SupportBean(" + filter + ")";
546,146
public // -------------------------------------------------------------<NEW_LINE>boolean loadGraph(String name) {<NEW_LINE>// Make sure index ID values are set as LONG values.<NEW_LINE>// If this is not done, when we try to sort results by vertex<NEW_LINE>// ID later it will not sort the way you would expect it to.<NEW_LINE>BaseConfiguration conf = new BaseConfiguration();<NEW_LINE>conf.setProperty("gremlin.tinkergraph.vertexIdManager", "LONG");<NEW_LINE>conf.setProperty("gremlin.tinkergraph.edgeIdManager", "LONG");<NEW_LINE>conf.setProperty("gremlin.tinkergraph.vertexPropertyIdManager", "LONG");<NEW_LINE>// Create a new instance that uses this configuration.<NEW_LINE>tg = TinkerGraph.open(conf);<NEW_LINE>// Load the graph and time how long it takes.<NEW_LINE>System.out.println("Loading " + name);<NEW_LINE>long t1 = System.currentTimeMillis();<NEW_LINE>System.out.println(t1);<NEW_LINE>try {<NEW_LINE>tg.io(IoCore.graphml()).readGraph(name);<NEW_LINE>} catch (IOException e) {<NEW_LINE><MASK><NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>long t2 = System.currentTimeMillis();<NEW_LINE>System.out.println(t2 + "(" + (t2 - t1) + ")");<NEW_LINE>System.out.println("Graph loaded\n");<NEW_LINE>g = tg.traversal();<NEW_LINE>return true;<NEW_LINE>}
System.out.println("ERROR - GraphML file not found or invalid.");
564,280
private Mono<Response<Void>> deleteRelayServiceConnectionWithResponseAsync(String resourceGroupName, String name, String entityName, Context context) {<NEW_LINE>if (this.client.getEndpoint() == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));<NEW_LINE>}<NEW_LINE>if (resourceGroupName == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));<NEW_LINE>}<NEW_LINE>if (name == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null."));<NEW_LINE>}<NEW_LINE>if (entityName == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter entityName is required and cannot be null."));<NEW_LINE>}<NEW_LINE>if (this.client.getSubscriptionId() == null) {<NEW_LINE>return Mono.<MASK><NEW_LINE>}<NEW_LINE>context = this.client.mergeContext(context);<NEW_LINE>return service.deleteRelayServiceConnection(this.client.getEndpoint(), resourceGroupName, name, entityName, this.client.getSubscriptionId(), this.client.getApiVersion(), context);<NEW_LINE>}
error(new IllegalArgumentException("Parameter this.client.getSubscriptionId() is required and cannot be null."));
284,780
public void modifyTestElement(TestElement s) {<NEW_LINE>SubscriberSampler sampler = (SubscriberSampler) s;<NEW_LINE>super.configureTestElement(sampler);<NEW_LINE>sampler.setUseJNDIProperties(String.valueOf(useProperties.isSelected()));<NEW_LINE>sampler.<MASK><NEW_LINE>sampler.setProviderUrl(urlField.getText());<NEW_LINE>sampler.setConnectionFactory(jndiConnFac.getText());<NEW_LINE>sampler.setDestination(jmsDestination.getText());<NEW_LINE>sampler.setDurableSubscriptionId(jmsDurableSubscriptionId.getText());<NEW_LINE>sampler.setClientID(jmsClientId.getText());<NEW_LINE>sampler.setJmsSelector(jmsSelector.getText());<NEW_LINE>sampler.setUsername(jmsUser.getText());<NEW_LINE>sampler.setPassword(jmsPwd.getText());<NEW_LINE>sampler.setUseAuth(useAuth.isSelected());<NEW_LINE>sampler.setIterations(samplesToAggregate.getText());<NEW_LINE>sampler.setReadResponse(String.valueOf(storeResponse.isSelected()));<NEW_LINE>sampler.setClientChoice(clientChoice.getText());<NEW_LINE>sampler.setStopBetweenSamples(stopBetweenSamples.isSelected());<NEW_LINE>sampler.setTimeout(timeout.getText());<NEW_LINE>sampler.setReconnectionErrorCodes(jmsErrorReconnectOnCodes.getText());<NEW_LINE>sampler.setPauseBetweenErrors(jmsErrorPauseBetween.getText());<NEW_LINE>sampler.setDestinationStatic(destSetup.getText().equals(DEST_SETUP_STATIC));<NEW_LINE>sampler.setSeparator(separator.getText());<NEW_LINE>}
setJNDIIntialContextFactory(jndiICF.getText());
1,852,092
final TableRestoreStatus executeRestoreTableFromClusterSnapshot(RestoreTableFromClusterSnapshotRequest restoreTableFromClusterSnapshotRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(restoreTableFromClusterSnapshotRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<RestoreTableFromClusterSnapshotRequest> request = null;<NEW_LINE>Response<TableRestoreStatus> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new RestoreTableFromClusterSnapshotRequestMarshaller().marshall(super.beforeMarshalling(restoreTableFromClusterSnapshotRequest));<NEW_LINE>// Binds the request metrics to the current request.<NEW_LINE>request.setAWSRequestMetrics(awsRequestMetrics);<NEW_LINE>request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);<NEW_LINE>request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());<NEW_LINE>request.addHandlerContext(<MASK><NEW_LINE>request.addHandlerContext(HandlerContextKey.SERVICE_ID, "Redshift");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "RestoreTableFromClusterSnapshot");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>StaxResponseHandler<TableRestoreStatus> responseHandler = new StaxResponseHandler<TableRestoreStatus>(new TableRestoreStatusStaxUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
HandlerContextKey.SIGNING_REGION, getSigningRegion());
512,433
private Object[] tryToConvertLineToHyperlink(Project project, String line) {<NEW_LINE>// pattern is "at ...... (file:line:column)"<NEW_LINE>// file can be also http:// url<NEW_LINE>if (!line.endsWith(")")) {<NEW_LINE>return tryToConvertLineURLToHyperlink(project, line);<NEW_LINE>}<NEW_LINE>int start = line.lastIndexOf('(');<NEW_LINE>if (start == -1) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>int lineNumberEnd = line.lastIndexOf(':');<NEW_LINE>if (lineNumberEnd == -1) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>int fileEnd = line.lastIndexOf(':', lineNumberEnd - 1);<NEW_LINE>if (fileEnd == -1) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>if (start >= fileEnd) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>int lineNumber = -1;<NEW_LINE>int columnNumber = -1;<NEW_LINE>try {<NEW_LINE>lineNumber = Integer.parseInt(line.substring(fileEnd + 1, lineNumberEnd));<NEW_LINE>columnNumber = Integer.parseInt(line.substring(lineNumberEnd + 1, line.length() - 1));<NEW_LINE>} catch (NumberFormatException e) {<NEW_LINE>// ignore<NEW_LINE>}<NEW_LINE>if (columnNumber != -1 && lineNumber == -1) {<NEW_LINE>// perhaps stack trace had only line number:<NEW_LINE>lineNumber = columnNumber;<NEW_LINE>}<NEW_LINE>if (lineNumber == -1) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>String file = line.<MASK><NEW_LINE>if (file.length() == 0) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>String s1 = line.substring(0, start);<NEW_LINE>// NOI18N<NEW_LINE>String // NOI18N<NEW_LINE>s2 = "(" + getProjectPath(project, file) + line.substring(fileEnd, line.length());<NEW_LINE>MyListener l = new MyListener(project, file, lineNumber, columnNumber);<NEW_LINE>return new Object[] { l, s1, s2 };<NEW_LINE>}
substring(start + 1, fileEnd);
1,673,394
public static void main(String[] args) throws Exception {<NEW_LINE>System.out.println("CLASSPATH: " + System.getProperty("CLASSPATH"));<NEW_LINE>GenericOptionsParser options = new GenericOptionsParser(args);<NEW_LINE>args = options.getRemainingArgs();<NEW_LINE>if (args.length != 2) {<NEW_LINE>System.err.println("Usage: hadoop jar path/to/this.jar " + DeprecatedWrapperWordCount.class + " <input dir> <output dir>");<NEW_LINE>System.exit(1);<NEW_LINE>}<NEW_LINE>JobConf job = new JobConf(options.getConfiguration());<NEW_LINE>job.setJobName("Deprecated Wrapper Word Count");<NEW_LINE>job.setOutputKeyClass(Text.class);<NEW_LINE>job.setOutputValueClass(LongWritable.class);<NEW_LINE>job.setJarByClass(DeprecatedWrapperWordCount.class);<NEW_LINE>job.setMapperClass(WordCountMapper.class);<NEW_LINE>job.setCombinerClass(WordCountReducer.class);<NEW_LINE>job.setReducerClass(WordCountReducer.class);<NEW_LINE><MASK><NEW_LINE>DeprecatedInputFormatWrapper.setInputFormat(TextInputFormat.class, job);<NEW_LINE>job.setOutputFormat(DeprecatedOutputFormatWrapper.class);<NEW_LINE>DeprecatedOutputFormatWrapper.setOutputFormat(TextOutputFormat.class, job);<NEW_LINE>FileInputFormat.setInputPaths(job, new Path(args[0]));<NEW_LINE>FileOutputFormat.setOutputPath(job, new Path(args[1]));<NEW_LINE>JobClient.runJob(job).waitForCompletion();<NEW_LINE>}
job.setInputFormat(DeprecatedInputFormatWrapper.class);
1,448,484
private void startUpApi() throws Exception {<NEW_LINE>final Set<Resource> pluginResources = prefixPluginResources(PLUGIN_PREFIX, pluginRestResources);<NEW_LINE>final SSLEngineConfigurator sslEngineConfigurator = configuration.isHttpEnableTls() ? buildSslEngineConfigurator(configuration.getHttpTlsCertFile(), configuration.getHttpTlsKeyFile(), configuration.getHttpTlsKeyPassword()) : null;<NEW_LINE>final <MASK><NEW_LINE>final String contextPath = configuration.getHttpPublishUri().getPath();<NEW_LINE>final URI listenUri = new URI(configuration.getUriScheme(), null, bindAddress.getHost(), bindAddress.getPort(), isNullOrEmpty(contextPath) ? "/" : contextPath, null, null);<NEW_LINE>apiHttpServer = setUp(listenUri, sslEngineConfigurator, configuration.getHttpThreadPoolSize(), configuration.getHttpSelectorRunnersCount(), configuration.getHttpMaxHeaderSize(), configuration.isHttpEnableGzip(), configuration.isHttpEnableCors(), pluginResources);<NEW_LINE>apiHttpServer.start();<NEW_LINE>LOG.info("Started REST API at <{}>", configuration.getHttpBindAddress());<NEW_LINE>}
HostAndPort bindAddress = configuration.getHttpBindAddress();
160,577
public Object visit(ASTReference node, Object data) {<NEW_LINE>String variableName = node.literal();<NEW_LINE>if (variableName.startsWith("$")) {<NEW_LINE>variableName = variableName.substring(<MASK><NEW_LINE>}<NEW_LINE>if (!foreachStack.isEmpty()) {<NEW_LINE>Foreach currentForeach = foreachStack.peek();<NEW_LINE>if (currentForeach.getItem() == null) {<NEW_LINE>currentForeach.setItem(variableName);<NEW_LINE>} else if (currentForeach.getSequence() == null) {<NEW_LINE>currentForeach.setSequence(variableName);<NEW_LINE>} else {<NEW_LINE>String firstToken = variableName;<NEW_LINE>int index = firstToken.indexOf('.');<NEW_LINE>if (index != -1) {<NEW_LINE>firstToken = firstToken.substring(0, index);<NEW_LINE>}<NEW_LINE>if (firstToken.equals(currentForeach.getItem())) {<NEW_LINE>String field = "";<NEW_LINE>if (index != -1) {<NEW_LINE>field = variableName.substring(index, variableName.length());<NEW_LINE>}<NEW_LINE>extractor.addFieldName(currentForeach.getSequence() + field, true);<NEW_LINE>} else {<NEW_LINE>extractor.addFieldName(variableName, false);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>extractor.addFieldName(variableName, false);<NEW_LINE>}<NEW_LINE>return super.visit(node, data);<NEW_LINE>}
1, variableName.length());
1,403,377
private Element createRuleSetElement(RuleSet ruleSet) {<NEW_LINE>Element ruleSetElement = document.createElementNS(RULESET_2_0_0_NS_URI, "ruleset");<NEW_LINE>ruleSetElement.setAttribute("xmlns:xsi", "http://www.w3.org/2001/XMLSchema-instance");<NEW_LINE>ruleSetElement.setAttributeNS("http://www.w3.org/2001/XMLSchema-instance", "xsi:schemaLocation", RULESET_2_0_0_NS_URI + " https://pmd.sourceforge.io/ruleset_2_0_0.xsd");<NEW_LINE>ruleSetElement.setAttribute("name", ruleSet.getName());<NEW_LINE>Element descriptionElement = <MASK><NEW_LINE>ruleSetElement.appendChild(descriptionElement);<NEW_LINE>for (String excludePattern : ruleSet.getExcludePatterns()) {<NEW_LINE>Element excludePatternElement = createExcludePatternElement(excludePattern);<NEW_LINE>ruleSetElement.appendChild(excludePatternElement);<NEW_LINE>}<NEW_LINE>for (String includePattern : ruleSet.getIncludePatterns()) {<NEW_LINE>Element includePatternElement = createIncludePatternElement(includePattern);<NEW_LINE>ruleSetElement.appendChild(includePatternElement);<NEW_LINE>}<NEW_LINE>for (Rule rule : ruleSet.getRules()) {<NEW_LINE>Element ruleElement = createRuleElement(rule);<NEW_LINE>if (ruleElement != null) {<NEW_LINE>ruleSetElement.appendChild(ruleElement);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return ruleSetElement;<NEW_LINE>}
createDescriptionElement(ruleSet.getDescription());
615,741
public HttpClient instrument(HttpClient httpClient) throws Exception {<NEW_LINE>return httpClient.copyWith(httpClientSpec -> {<NEW_LINE>httpClientSpec.requestIntercept(requestSpec -> {<NEW_LINE>Context parentOtelCtx = Context.current();<NEW_LINE>if (!instrumenter.shouldStart(parentOtelCtx, requestSpec)) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>Context otelCtx = instrumenter.start(parentOtelCtx, requestSpec);<NEW_LINE>Span span = Span.fromContext(otelCtx);<NEW_LINE>String path = requestSpec.getUri().getPath();<NEW_LINE>span.setAttribute(SemanticAttributes.HTTP_ROUTE, path);<NEW_LINE>Execution.current().add(new ContextHolder(otelCtx, requestSpec));<NEW_LINE>});<NEW_LINE>httpClientSpec.responseIntercept(httpResponse -> {<NEW_LINE>Execution execution = Execution.current();<NEW_LINE>ContextHolder contextHolder = execution.get(ContextHolder.class);<NEW_LINE>execution.remove(ContextHolder.class);<NEW_LINE>instrumenter.end(contextHolder.context(), contextHolder.requestSpec(), httpResponse, null);<NEW_LINE>});<NEW_LINE>httpClientSpec.errorIntercept(ex -> {<NEW_LINE>Execution execution = Execution.current();<NEW_LINE>ContextHolder contextHolder = execution.get(ContextHolder.class);<NEW_LINE>execution.remove(ContextHolder.class);<NEW_LINE>instrumenter.end(contextHolder.context(), contextHolder.<MASK><NEW_LINE>});<NEW_LINE>});<NEW_LINE>}
requestSpec(), null, ex);
1,737,015
public Object read(final InputStream is) {<NEW_LINE>final ART1 result = new ART1();<NEW_LINE>final EncogReadHelper in = new EncogReadHelper(is);<NEW_LINE>EncogFileSection section;<NEW_LINE>while ((section = in.readNextSection()) != null) {<NEW_LINE>if (section.getSectionName().equals("ART1") && section.getSubSectionName().equals("PARAMS")) {<NEW_LINE>final Map<String, String> params = section.parseParams();<NEW_LINE>result.getProperties().putAll(params);<NEW_LINE>}<NEW_LINE>if (section.getSectionName().equals("ART1") && section.getSubSectionName().equals("NETWORK")) {<NEW_LINE>final Map<String, String> params = section.parseParams();<NEW_LINE>result.setA1(EncogFileSection.parseDouble(params, ART.PROPERTY_A1));<NEW_LINE>result.setB1(EncogFileSection.parseDouble(params, ART.PROPERTY_B1));<NEW_LINE>result.setC1(EncogFileSection.parseDouble(params, ART.PROPERTY_C1));<NEW_LINE>result.setD1(EncogFileSection.parseDouble(params, ART.PROPERTY_D1));<NEW_LINE>result.setF1Count(EncogFileSection.parseInt(params, PersistConst.PROPERTY_F1_COUNT));<NEW_LINE>result.setF2Count(EncogFileSection.parseInt(params, PersistConst.PROPERTY_F2_COUNT));<NEW_LINE>result.setNoWinner(EncogFileSection.parseInt<MASK><NEW_LINE>result.setL(EncogFileSection.parseDouble(params, ART.PROPERTY_L));<NEW_LINE>result.setVigilance(EncogFileSection.parseDouble(params, ART.PROPERTY_VIGILANCE));<NEW_LINE>result.setWeightsF1toF2(EncogFileSection.parseMatrix(params, PersistConst.PROPERTY_WEIGHTS_F1_F2));<NEW_LINE>result.setWeightsF2toF1(EncogFileSection.parseMatrix(params, PersistConst.PROPERTY_WEIGHTS_F2_F1));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return result;<NEW_LINE>}
(params, ART.PROPERTY_NO_WINNER));
80,304
public void put(Event event) throws ChannelException {<NEW_LINE>putCounter.incrementAndGet();<NEW_LINE>int eventSize = event.getBody().length;<NEW_LINE>boolean tryAcquire = <MASK><NEW_LINE>if (!tryAcquire) {<NEW_LINE>throw new ChannelException("The buffer is full, please create more SDK object.");<NEW_LINE>}<NEW_LINE>ProfileTransaction transaction = currentTransaction.get();<NEW_LINE>Preconditions.checkState(transaction != null, "No transaction exists for this thread");<NEW_LINE>if (event instanceof CallbackProfile) {<NEW_LINE>CallbackProfile profile = (CallbackProfile) event;<NEW_LINE>transaction.doPut(profile);<NEW_LINE>} else {<NEW_LINE>SdkEvent sdkEvent = new SdkEvent();<NEW_LINE>Map<String, String> headers = event.getHeaders();<NEW_LINE>sdkEvent.setInlongGroupId(headers.get(Constants.INLONG_GROUP_ID));<NEW_LINE>sdkEvent.setInlongStreamId(headers.get(Constants.INLONG_STREAM_ID));<NEW_LINE>sdkEvent.setBody(event.getBody());<NEW_LINE>sdkEvent.setHeaders(event.getHeaders());<NEW_LINE>CallbackProfile profile = new CallbackProfile(sdkEvent, null);<NEW_LINE>transaction.doPut(profile);<NEW_LINE>}<NEW_LINE>}
this.bufferQueue.tryAcquire(eventSize);
489,069
public static V3CompressedVSizeColumnarMultiIntsSupplier fromIterable(final Iterable<IndexedInts> objectsIterable, final int offsetChunkFactor, final int maxValue, final ByteOrder byteOrder, final CompressionStrategy compression, final Closer closer) {<NEW_LINE>Iterator<IndexedInts> objects = objectsIterable.iterator();<NEW_LINE>IntArrayList offsetList = new IntArrayList();<NEW_LINE>IntArrayList values = new IntArrayList();<NEW_LINE>int offset = 0;<NEW_LINE>while (objects.hasNext()) {<NEW_LINE><MASK><NEW_LINE>offsetList.add(offset);<NEW_LINE>for (int i = 0, size = next.size(); i < size; i++) {<NEW_LINE>values.add(next.get(i));<NEW_LINE>}<NEW_LINE>offset += next.size();<NEW_LINE>}<NEW_LINE>offsetList.add(offset);<NEW_LINE>CompressedColumnarIntsSupplier headerSupplier = CompressedColumnarIntsSupplier.fromList(offsetList, offsetChunkFactor, byteOrder, compression, closer);<NEW_LINE>CompressedVSizeColumnarIntsSupplier valuesSupplier = CompressedVSizeColumnarIntsSupplier.fromList(values, maxValue, CompressedVSizeColumnarIntsSupplier.maxIntsInBufferForValue(maxValue), byteOrder, compression, closer);<NEW_LINE>return new V3CompressedVSizeColumnarMultiIntsSupplier(headerSupplier, valuesSupplier);<NEW_LINE>}
IndexedInts next = objects.next();
1,091,484
/*<NEW_LINE>* The resolved classpath of the given project may have changed:<NEW_LINE>* - generate a delta<NEW_LINE>* - trigger indexing<NEW_LINE>* - update project references<NEW_LINE>* - create resolved classpath markers<NEW_LINE>*/<NEW_LINE>protected void classpathChanged(ClasspathChange change, boolean refreshExternalFolder) throws JavaModelException {<NEW_LINE>// reset the project's caches early since some clients rely on the project's caches being up-to-date when run inside an IWorkspaceRunnable<NEW_LINE>// (see https://bugs.eclipse.org/bugs/show_bug.cgi?id=212769#c5 )<NEW_LINE>JavaProject project = change.project;<NEW_LINE>project.resetCaches();<NEW_LINE>if (this.canChangeResources) {<NEW_LINE>// workaround for https://bugs.eclipse.org/bugs/show_bug.cgi?id=177922<NEW_LINE>if (isTopLevelOperation() && !ResourcesPlugin.getWorkspace().isTreeLocked()) {<NEW_LINE>new ClasspathValidation(project).validate();<NEW_LINE>}<NEW_LINE>// delta, indexing and classpath markers are going to be created by the delta processor<NEW_LINE>// while handling the resource change (either .classpath change, or project touched)<NEW_LINE>project.getProject().clearCachedDynamicReferences();<NEW_LINE>// and ensure that external folders are updated as well<NEW_LINE>new ExternalFolderChange(project, change.oldResolvedClasspath).updateExternalFoldersIfNecessary(refreshExternalFolder, null);<NEW_LINE>} else {<NEW_LINE>DeltaProcessingState state = JavaModelManager.getDeltaState();<NEW_LINE>JavaElementDelta delta = new JavaElementDelta(getJavaModel());<NEW_LINE>int result = <MASK><NEW_LINE>if ((result & ClasspathChange.HAS_DELTA) != 0) {<NEW_LINE>// create delta<NEW_LINE>addDelta(delta);<NEW_LINE>// need to recompute root infos<NEW_LINE>state.rootsAreStale = true;<NEW_LINE>// ensure indexes are updated<NEW_LINE>change.requestIndexing();<NEW_LINE>// ensure classpath is validated on next build<NEW_LINE>state.addClasspathValidation(project);<NEW_LINE>}<NEW_LINE>if ((result & ClasspathChange.HAS_PROJECT_CHANGE) != 0) {<NEW_LINE>// ensure project references are updated on next build<NEW_LINE>project.getProject().clearCachedDynamicReferences();<NEW_LINE>state.addProjectReferenceChange(project);<NEW_LINE>}<NEW_LINE>if ((result & ClasspathChange.HAS_LIBRARY_CHANGE) != 0) {<NEW_LINE>// ensure external folders are updated on next build<NEW_LINE>state.addExternalFolderChange(project, change.oldResolvedClasspath);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
change.generateDelta(delta, true);
1,161,492
public static void vertical(Kernel1D_S32 kernel, GrayS16 input, GrayI16 output, int skip) {<NEW_LINE>final short[] dataSrc = input.data;<NEW_LINE>final short[] dataDst = output.data;<NEW_LINE>final int[] dataKer = kernel.data;<NEW_LINE>final int radius = kernel.getRadius();<NEW_LINE>final int offset = <MASK><NEW_LINE>final int offsetEnd = UtilDownConvolve.computeMaxSide(input.height, skip, radius) + skip;<NEW_LINE>final int width = input.width;<NEW_LINE>final int height = input.height - input.height % skip;<NEW_LINE>for (int y = 0; y < offset; y += skip) {<NEW_LINE>int indexDest = output.startIndex + (y / skip) * output.stride;<NEW_LINE>for (int x = 0; x < width; x++) {<NEW_LINE>int indexSrc = input.startIndex + y * input.stride + x;<NEW_LINE>int total = 0;<NEW_LINE>int weight = 0;<NEW_LINE>for (int k = -y; k <= radius; k++) {<NEW_LINE>int w = dataKer[k + radius];<NEW_LINE>weight += w;<NEW_LINE>total += (dataSrc[indexSrc + k * input.stride]) * w;<NEW_LINE>}<NEW_LINE>dataDst[indexDest++] = (short) ((total + weight / 2) / weight);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>for (int y = offsetEnd; y < height; y += skip) {<NEW_LINE>int indexDest = output.startIndex + (y / skip) * output.stride;<NEW_LINE>int endKernel = input.height - y - 1;<NEW_LINE>if (endKernel > radius)<NEW_LINE>endKernel = radius;<NEW_LINE>for (int x = 0; x < width; x++) {<NEW_LINE>int indexSrc = input.startIndex + y * input.stride + x;<NEW_LINE>int total = 0;<NEW_LINE>int weight = 0;<NEW_LINE>for (int k = -radius; k <= endKernel; k++) {<NEW_LINE>int w = dataKer[k + radius];<NEW_LINE>weight += w;<NEW_LINE>total += (dataSrc[indexSrc + k * input.stride]) * w;<NEW_LINE>}<NEW_LINE>dataDst[indexDest++] = (short) ((total + weight / 2) / weight);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
UtilDownConvolve.computeOffset(skip, radius);
1,227,063
public static GetCopyrightPersonListResponse unmarshall(GetCopyrightPersonListResponse getCopyrightPersonListResponse, UnmarshallerContext _ctx) {<NEW_LINE>getCopyrightPersonListResponse.setRequestId(_ctx.stringValue("GetCopyrightPersonListResponse.RequestId"));<NEW_LINE>getCopyrightPersonListResponse.setPageNum(_ctx.integerValue("GetCopyrightPersonListResponse.PageNum"));<NEW_LINE>getCopyrightPersonListResponse.setPageSize(_ctx.integerValue("GetCopyrightPersonListResponse.PageSize"));<NEW_LINE>getCopyrightPersonListResponse.setSuccess(_ctx.booleanValue("GetCopyrightPersonListResponse.Success"));<NEW_LINE>getCopyrightPersonListResponse.setTotalItemNum(_ctx.integerValue("GetCopyrightPersonListResponse.TotalItemNum"));<NEW_LINE>List<DataItem> data = new ArrayList<DataItem>();<NEW_LINE>for (int i = 0; i < _ctx.lengthValue("GetCopyrightPersonListResponse.Data.Length"); i++) {<NEW_LINE>DataItem dataItem = new DataItem();<NEW_LINE>dataItem.setLegalPersonType(_ctx.stringValue<MASK><NEW_LINE>dataItem.setRoleType(_ctx.integerValue("GetCopyrightPersonListResponse.Data[" + i + "].RoleType"));<NEW_LINE>dataItem.setCity(_ctx.stringValue("GetCopyrightPersonListResponse.Data[" + i + "].City"));<NEW_LINE>dataItem.setUseType(_ctx.integerValue("GetCopyrightPersonListResponse.Data[" + i + "].UseType"));<NEW_LINE>dataItem.setPhone(_ctx.stringValue("GetCopyrightPersonListResponse.Data[" + i + "].Phone"));<NEW_LINE>dataItem.setCounty(_ctx.stringValue("GetCopyrightPersonListResponse.Data[" + i + "].County"));<NEW_LINE>dataItem.setUserPk(_ctx.stringValue("GetCopyrightPersonListResponse.Data[" + i + "].UserPk"));<NEW_LINE>dataItem.setCardType(_ctx.stringValue("GetCopyrightPersonListResponse.Data[" + i + "].CardType"));<NEW_LINE>dataItem.setEmail(_ctx.stringValue("GetCopyrightPersonListResponse.Data[" + i + "].Email"));<NEW_LINE>dataItem.setExpiredDate(_ctx.stringValue("GetCopyrightPersonListResponse.Data[" + i + "].ExpiredDate"));<NEW_LINE>dataItem.setCardNum(_ctx.stringValue("GetCopyrightPersonListResponse.Data[" + i + "].CardNum"));<NEW_LINE>dataItem.setAddress(_ctx.stringValue("GetCopyrightPersonListResponse.Data[" + i + "].Address"));<NEW_LINE>dataItem.setOwnerType(_ctx.integerValue("GetCopyrightPersonListResponse.Data[" + i + "].OwnerType"));<NEW_LINE>dataItem.setName(_ctx.stringValue("GetCopyrightPersonListResponse.Data[" + i + "].Name"));<NEW_LINE>dataItem.setPersonId(_ctx.stringValue("GetCopyrightPersonListResponse.Data[" + i + "].PersonId"));<NEW_LINE>dataItem.setAuditStatus(_ctx.integerValue("GetCopyrightPersonListResponse.Data[" + i + "].AuditStatus"));<NEW_LINE>dataItem.setProvince(_ctx.stringValue("GetCopyrightPersonListResponse.Data[" + i + "].Province"));<NEW_LINE>data.add(dataItem);<NEW_LINE>}<NEW_LINE>getCopyrightPersonListResponse.setData(data);<NEW_LINE>return getCopyrightPersonListResponse;<NEW_LINE>}
("GetCopyrightPersonListResponse.Data[" + i + "].LegalPersonType"));
1,487,260
private void assignRole(RoleAssignee ra, DataverseRole r) {<NEW_LINE>try {<NEW_LINE>String privateUrlToken = null;<NEW_LINE>commandEngine.submit(new AssignRoleCommand(ra, r, dvObject, dvRequestService.getDataverseRequest(), privateUrlToken));<NEW_LINE>List<String> args = Arrays.asList(r.getName(), ra.getDisplayInfo().getTitle(), StringEscapeUtils.escapeHtml4<MASK><NEW_LINE>JsfHelper.addSuccessMessage(BundleUtil.getStringFromBundle("permission.roleAssignedToFor", args));<NEW_LINE>// don't notify if role = file downloader and object is not released<NEW_LINE>if (!(r.getAlias().equals(DataverseRole.FILE_DOWNLOADER) && !dvObject.isReleased())) {<NEW_LINE>notifyRoleChange(ra, UserNotification.Type.ASSIGNROLE);<NEW_LINE>}<NEW_LINE>} catch (PermissionException ex) {<NEW_LINE>JH.addMessage(FacesMessage.SEVERITY_ERROR, BundleUtil.getStringFromBundle("permission.roleNotAbleToBeAssigned"), BundleUtil.getStringFromBundle("permission.permissionsMissing", Arrays.asList(ex.getRequiredPermissions().toString())));<NEW_LINE>} catch (CommandException ex) {<NEW_LINE>List<String> args = Arrays.asList(r.getName(), ra.getDisplayInfo().getTitle(), StringEscapeUtils.escapeHtml4(dvObject.getDisplayName()));<NEW_LINE>String message = BundleUtil.getStringFromBundle("permission.roleNotAssignedFor", args);<NEW_LINE>JsfHelper.addErrorMessage(message);<NEW_LINE>// JH.addMessage(FacesMessage.SEVERITY_FATAL, "The role was not able to be assigned.");<NEW_LINE>logger.log(Level.SEVERE, "Error assiging role: " + ex.getMessage(), ex);<NEW_LINE>}<NEW_LINE>showAssignmentMessages();<NEW_LINE>}
(dvObject.getDisplayName()));
822,529
public static AddressXML restoreXml(XmlElement el, Language language) throws XmlParseException {<NEW_LINE>AddressXML result;<NEW_LINE>if (el.getName().equals("register")) {<NEW_LINE>String regName = el.getAttribute("name");<NEW_LINE>if (regName == null) {<NEW_LINE>throw new XmlParseException("Missing register name");<NEW_LINE>}<NEW_LINE>Register <MASK><NEW_LINE>if (register == null) {<NEW_LINE>throw new XmlParseException("Unknown register: " + regName);<NEW_LINE>}<NEW_LINE>result = new AddressXML(register.getAddressSpace(), register.getOffset(), register.getMinimumByteSize());<NEW_LINE>} else {<NEW_LINE>result = new AddressXML();<NEW_LINE>result.size = 0;<NEW_LINE>String spaceName = el.getAttribute("space");<NEW_LINE>result.space = language.getAddressFactory().getAddressSpace(spaceName);<NEW_LINE>if (result.space == null) {<NEW_LINE>throw new XmlParseException("Unknown address space: " + spaceName);<NEW_LINE>}<NEW_LINE>result.offset = SpecXmlUtils.decodeLong(el.getAttribute("offset"));<NEW_LINE>String sizeString = el.getAttribute("size");<NEW_LINE>if (sizeString != null) {<NEW_LINE>result.size = SpecXmlUtils.decodeInt(sizeString);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return result;<NEW_LINE>}
register = language.getRegister(regName);
517,673
static boolean canRecover(LocalBufferFile bf) {<NEW_LINE>RecoveryFile rf = null;<NEW_LINE>try {<NEW_LINE>File[] snapshotFiles = getSnapshotFiles(bf);<NEW_LINE>rf = getRecoveryFile(bf, snapshotFiles);<NEW_LINE>if (rf != null) {<NEW_LINE>boolean canRecover = true;<NEW_LINE>try {<NEW_LINE>if (rf.getParameter(CHANGE_SET_REQUIRED_PARM) != 0) {<NEW_LINE>File<MASK><NEW_LINE>int snapshotIndex = rf.getFile().equals(snapshotFiles[0]) ? 0 : 1;<NEW_LINE>canRecover = changeFiles[snapshotIndex].exists();<NEW_LINE>}<NEW_LINE>} catch (NoSuchElementException e) {<NEW_LINE>}<NEW_LINE>return canRecover;<NEW_LINE>}<NEW_LINE>} catch (IOException e) {<NEW_LINE>} finally {<NEW_LINE>if (rf != null) {<NEW_LINE>try {<NEW_LINE>rf.close();<NEW_LINE>} catch (IOException e) {<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return false;<NEW_LINE>}
[] changeFiles = getChangeFiles(bf);
959,618
private void insert(String data) throws IoTDBConnectionException, StatementExecutionException {<NEW_LINE>String[] dataArray = data.split(",");<NEW_LINE>String device = dataArray[0];<NEW_LINE>long time = Long.parseLong(dataArray[1]);<NEW_LINE>List<String> measurements = Arrays.asList(dataArray[<MASK><NEW_LINE>List<TSDataType> types = new ArrayList<>();<NEW_LINE>for (String type : dataArray[3].split(":")) {<NEW_LINE>types.add(TSDataType.valueOf(type));<NEW_LINE>}<NEW_LINE>List<Object> values = new ArrayList<>();<NEW_LINE>String[] valuesStr = dataArray[4].split(":");<NEW_LINE>for (int i = 0; i < valuesStr.length; i++) {<NEW_LINE>switch(types.get(i)) {<NEW_LINE>case INT64:<NEW_LINE>values.add(Long.parseLong(valuesStr[i]));<NEW_LINE>break;<NEW_LINE>case DOUBLE:<NEW_LINE>values.add(Double.parseDouble(valuesStr[i]));<NEW_LINE>break;<NEW_LINE>case INT32:<NEW_LINE>values.add(Integer.parseInt(valuesStr[i]));<NEW_LINE>break;<NEW_LINE>case TEXT:<NEW_LINE>values.add(valuesStr[i]);<NEW_LINE>break;<NEW_LINE>case FLOAT:<NEW_LINE>values.add(Float.parseFloat(valuesStr[i]));<NEW_LINE>break;<NEW_LINE>case BOOLEAN:<NEW_LINE>values.add(Boolean.parseBoolean(valuesStr[i]));<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>session.insertRecord(device, time, measurements, types, values);<NEW_LINE>}
2].split(":"));
363,426
public void onCreate(Bundle savedInstanceState) {<NEW_LINE>super.onCreate(savedInstanceState);<NEW_LINE>mPrefs = Prefs.getSharedPrefs(getApplicationContext());<NEW_LINE>doLayout();<NEW_LINE>LocalBroadcastManager lbm = LocalBroadcastManager.getInstance(this);<NEW_LINE>lbm.registerReceiver(mLocalBroadcastReceiver, new IntentFilter(ACTION_STATUS));<NEW_LINE>lbm.registerReceiver(mLocalBroadcastReceiver, new IntentFilter(LOCAL_ACTION_BANDWIDTH));<NEW_LINE>lbm.registerReceiver(mLocalBroadcastReceiver, new IntentFilter(LOCAL_ACTION_LOG));<NEW_LINE>lbm.registerReceiver(mLocalBroadcastReceiver, new IntentFilter(LOCAL_ACTION_PORTS));<NEW_LINE>boolean showFirstTime = mPrefs.getBoolean("connect_first_time", true);<NEW_LINE>if (showFirstTime) {<NEW_LINE><MASK><NEW_LINE>pEdit.putBoolean("connect_first_time", false);<NEW_LINE>pEdit.commit();<NEW_LINE>startActivity(new Intent(this, OnboardingActivity.class));<NEW_LINE>}<NEW_LINE>// Resets previous DNS Port to the default<NEW_LINE>mPrefs.edit().putInt(PREFS_DNS_PORT, TOR_DNS_PORT_DEFAULT).apply();<NEW_LINE>}
Editor pEdit = mPrefs.edit();
643,717
public static DescribeSlowLogRecordsResponse unmarshall(DescribeSlowLogRecordsResponse describeSlowLogRecordsResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeSlowLogRecordsResponse.setRequestId(_ctx.stringValue("DescribeSlowLogRecordsResponse.RequestId"));<NEW_LINE>SlowLogRecords slowLogRecords = new SlowLogRecords();<NEW_LINE>slowLogRecords.setRows(_ctx.stringValue("DescribeSlowLogRecordsResponse.SlowLogRecords.Rows"));<NEW_LINE>slowLogRecords.setRowsBeforeLimitAtLeast(_ctx.stringValue("DescribeSlowLogRecordsResponse.SlowLogRecords.RowsBeforeLimitAtLeast"));<NEW_LINE>Statistics statistics = new Statistics();<NEW_LINE>statistics.setRowsRead(_ctx.integerValue("DescribeSlowLogRecordsResponse.SlowLogRecords.Statistics.RowsRead"));<NEW_LINE>statistics.setElapsedTime(_ctx.floatValue("DescribeSlowLogRecordsResponse.SlowLogRecords.Statistics.ElapsedTime"));<NEW_LINE>statistics.setBytesRead(_ctx.integerValue("DescribeSlowLogRecordsResponse.SlowLogRecords.Statistics.BytesRead"));<NEW_LINE>slowLogRecords.setStatistics(statistics);<NEW_LINE>List<ResultSet> tableSchema = new ArrayList<ResultSet>();<NEW_LINE>for (int i = 0; i < _ctx.lengthValue("DescribeSlowLogRecordsResponse.SlowLogRecords.TableSchema.Length"); i++) {<NEW_LINE>ResultSet resultSet = new ResultSet();<NEW_LINE>resultSet.setType(_ctx.stringValue("DescribeSlowLogRecordsResponse.SlowLogRecords.TableSchema[" + i + "].Type"));<NEW_LINE>resultSet.setName(_ctx.stringValue("DescribeSlowLogRecordsResponse.SlowLogRecords.TableSchema[" + i + "].Name"));<NEW_LINE>tableSchema.add(resultSet);<NEW_LINE>}<NEW_LINE>slowLogRecords.setTableSchema(tableSchema);<NEW_LINE>List<ResultSet1> data = new ArrayList<ResultSet1>();<NEW_LINE>for (int i = 0; i < _ctx.lengthValue("DescribeSlowLogRecordsResponse.SlowLogRecords.Data.Length"); i++) {<NEW_LINE>ResultSet1 resultSet1 = new ResultSet1();<NEW_LINE>resultSet1.setType(_ctx.stringValue("DescribeSlowLogRecordsResponse.SlowLogRecords.Data[" + i + "].Type"));<NEW_LINE>resultSet1.setQueryStartTime(_ctx.stringValue("DescribeSlowLogRecordsResponse.SlowLogRecords.Data[" + i + "].QueryStartTime"));<NEW_LINE>resultSet1.setQuery(_ctx.stringValue("DescribeSlowLogRecordsResponse.SlowLogRecords.Data[" + i + "].Query"));<NEW_LINE>resultSet1.setReadRows(_ctx.stringValue("DescribeSlowLogRecordsResponse.SlowLogRecords.Data[" + i + "].ReadRows"));<NEW_LINE>resultSet1.setInitialAddress(_ctx.stringValue<MASK><NEW_LINE>resultSet1.setMemoryUsage(_ctx.stringValue("DescribeSlowLogRecordsResponse.SlowLogRecords.Data[" + i + "].MemoryUsage"));<NEW_LINE>resultSet1.setInitialUser(_ctx.stringValue("DescribeSlowLogRecordsResponse.SlowLogRecords.Data[" + i + "].InitialUser"));<NEW_LINE>resultSet1.setInitialQueryId(_ctx.stringValue("DescribeSlowLogRecordsResponse.SlowLogRecords.Data[" + i + "].InitialQueryId"));<NEW_LINE>resultSet1.setReadBytes(_ctx.stringValue("DescribeSlowLogRecordsResponse.SlowLogRecords.Data[" + i + "].ReadBytes"));<NEW_LINE>resultSet1.setQueryDurationMs(_ctx.stringValue("DescribeSlowLogRecordsResponse.SlowLogRecords.Data[" + i + "].QueryDurationMs"));<NEW_LINE>resultSet1.setResultBytes(_ctx.stringValue("DescribeSlowLogRecordsResponse.SlowLogRecords.Data[" + i + "].ResultBytes"));<NEW_LINE>data.add(resultSet1);<NEW_LINE>}<NEW_LINE>slowLogRecords.setData(data);<NEW_LINE>describeSlowLogRecordsResponse.setSlowLogRecords(slowLogRecords);<NEW_LINE>return describeSlowLogRecordsResponse;<NEW_LINE>}
("DescribeSlowLogRecordsResponse.SlowLogRecords.Data[" + i + "].InitialAddress"));
332,511
public static void recursiveBuildStack(CodegenMethod methodNode, String name, CodegenClassMethods methods) {<NEW_LINE>if (methodNode.getOptionalSymbolProvider() == null) {<NEW_LINE>throw new IllegalArgumentException("Method node does not have symbol provider");<NEW_LINE>}<NEW_LINE>Map<String, EPTypeClass> currentSymbols = new HashMap<>();<NEW_LINE>methodNode.<MASK><NEW_LINE>if (!(methodNode instanceof CodegenCtor)) {<NEW_LINE>CodegenMethodFootprint footprint = new CodegenMethodFootprint(methodNode.getReturnType(), methodNode.getReturnTypeName(), methodNode.getLocalParams(), methodNode.getAdditionalDebugInfo());<NEW_LINE>CodegenMethodWGraph method = new CodegenMethodWGraph(name, footprint, methodNode.getBlock(), true, methodNode.getThrown(), methodNode).setStatic(methodNode.isStatic());<NEW_LINE>methodNode.setAssignedMethod(method);<NEW_LINE>methods.getPublicMethods().add(method);<NEW_LINE>}<NEW_LINE>for (CodegenMethod child : methodNode.getChildren()) {<NEW_LINE>recursiveAdd(child, currentSymbols, methods.getPrivateMethods(), methodNode.isStatic());<NEW_LINE>}<NEW_LINE>}
getOptionalSymbolProvider().provide(currentSymbols);
1,853,173
// ExternalRequestDelegate<NEW_LINE>@Override<NEW_LINE>public boolean onHandleExternalRequest(@NonNull String url) {<NEW_LINE>if (UrlUtils.isEngineSupportedScheme(url)) {<NEW_LINE>return false;<NEW_LINE>} else {<NEW_LINE>Intent intent;<NEW_LINE>try {<NEW_LINE>intent = Intent.parseUri(url, Intent.URI_INTENT_SCHEME);<NEW_LINE>} catch (Exception ex) {<NEW_LINE>mWidgetManager.getFocusedWindow().showAlert(getResources().getString(R.string.external_open_uri_error_title), getResources().getString(R.string.external_open_uri_error_bad_uri_body, url), null);<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>intent.addCategory(Intent.CATEGORY_BROWSABLE);<NEW_LINE>intent.setComponent(null);<NEW_LINE>Intent selector = intent.getSelector();<NEW_LINE>if (selector != null) {<NEW_LINE><MASK><NEW_LINE>selector.setComponent(null);<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>getContext().startActivity(intent);<NEW_LINE>} catch (ActivityNotFoundException ex) {<NEW_LINE>mWidgetManager.getFocusedWindow().showAlert(getResources().getString(R.string.external_open_uri_error_title), getResources().getString(R.string.external_open_uri_error_no_activity_body, url), null);<NEW_LINE>return false;<NEW_LINE>} catch (SecurityException ex) {<NEW_LINE>mWidgetManager.getFocusedWindow().showAlert(getResources().getString(R.string.external_open_uri_error_title), getResources().getString(R.string.external_open_uri_error_security_exception_body, url), null);<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>}
selector.addCategory(Intent.CATEGORY_BROWSABLE);
24,268
public boolean put(final Txn<T> txn, final T key, final T val, final PutFlags... flags) {<NEW_LINE>if (SHOULD_CHECK) {<NEW_LINE>requireNonNull(txn);<NEW_LINE>requireNonNull(key);<NEW_LINE>requireNonNull(val);<NEW_LINE>txn.checkReady();<NEW_LINE>txn.checkWritesAllowed();<NEW_LINE>}<NEW_LINE>txn.kv().keyIn(key);<NEW_LINE>txn.<MASK><NEW_LINE>final int mask = mask(flags);<NEW_LINE>final int rc = LIB.mdb_put(txn.pointer(), ptr, txn.kv().pointerKey(), txn.kv().pointerVal(), mask);<NEW_LINE>if (rc == MDB_KEYEXIST) {<NEW_LINE>if (isSet(mask, MDB_NOOVERWRITE)) {<NEW_LINE>// marked as in,out in LMDB C docs<NEW_LINE>txn.kv().valOut();<NEW_LINE>} else if (!isSet(mask, MDB_NODUPDATA)) {<NEW_LINE>checkRc(rc);<NEW_LINE>}<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>checkRc(rc);<NEW_LINE>return true;<NEW_LINE>}
kv().valIn(val);
840,964
private InheritanceModel buildInheritenceModel() {<NEW_LINE>InheritanceModel model = null;<NEW_LINE>if (superClazzType != null) {<NEW_LINE>// means there is a super class<NEW_LINE>// scan for inheritence model.<NEW_LINE>if (superClazzType.getPersistenceType().equals(PersistenceType.ENTITY) && superClazzType.getJavaType().isAnnotationPresent(Inheritance.class)) {<NEW_LINE>Inheritance inheritenceAnn = superClazzType.getJavaType().getAnnotation(Inheritance.class);<NEW_LINE>InheritanceType strategyType = inheritenceAnn.strategy();<NEW_LINE>String descriminator = null;<NEW_LINE>String descriminatorValue = null;<NEW_LINE>String tableName = null;<NEW_LINE>String schemaName = null;<NEW_LINE>tableName = superClazzType.getJavaType().getSimpleName();<NEW_LINE>if (superClazzType.getJavaType().isAnnotationPresent(Table.class)) {<NEW_LINE>tableName = superClazzType.getJavaType().getAnnotation(Table.class).name();<NEW_LINE>schemaName = superClazzType.getJavaType().getAnnotation(Table.class).schema();<NEW_LINE>}<NEW_LINE>model = onStrategyType(model, strategyType, <MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE>return model;<NEW_LINE>}
descriminator, descriminatorValue, tableName, schemaName);