idx
int32
46
1.86M
input
stringlengths
321
6.6k
target
stringlengths
9
1.24k
1,444,166
private void dbUpdate(ContentType type) throws DotDataException {<NEW_LINE>DotConnect dc = new DotConnect();<NEW_LINE>dc.setSQL(this.contentTypeSql.UPDATE_TYPE);<NEW_LINE>dc.addParam(type.name());<NEW_LINE>dc.addParam(type.description());<NEW_LINE>dc.addParam(type.defaultType());<NEW_LINE>dc.<MASK><NEW_LINE>dc.addParam(type.baseType().getType());<NEW_LINE>dc.addParam(type.system());<NEW_LINE>dc.addParam(type.fixed());<NEW_LINE>dc.addParam(type.variable());<NEW_LINE>dc.addParam(new CleanURLMap(type.urlMapPattern()).toString());<NEW_LINE>dc.addParam(type.host());<NEW_LINE>dc.addParam(type.folder());<NEW_LINE>dc.addParam(type.expireDateVar());<NEW_LINE>dc.addParam(type.publishDateVar());<NEW_LINE>dc.addParam(type.modDate());<NEW_LINE>dc.addParam(type.icon());<NEW_LINE>dc.addParam(type.sortOrder());<NEW_LINE>dc.addParam(type.id());<NEW_LINE>dc.loadResult();<NEW_LINE>}
addParam(type.detailPage());
531,783
public boolean canRead(ODatabaseSession session, ORecord record) {<NEW_LINE>// TODO what about server users?<NEW_LINE>if (session.getUser() == null) {<NEW_LINE>// executeNoAuth<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>if (!session.getConfiguration().getValueAsBoolean(OGlobalConfiguration.SECURITY_ADVANCED_POLICY)) {<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>if (record instanceof OElement) {<NEW_LINE>if (OSecurityPolicy.class.getSimpleName().equalsIgnoreCase(((ODocument) record).getClassName())) {<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>if (((ODocument) record).getClassName() == null) {<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>if (roleHasPredicateSecurityForClass != null) {<NEW_LINE>for (OSecurityRole role : session.getUser().getRoles()) {<NEW_LINE>Map<String, Boolean> roleMap = roleHasPredicateSecurityForClass.get(role.getName());<NEW_LINE>if (roleMap == null) {<NEW_LINE>// TODO hierarchy...?<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>Boolean val = roleMap.get(((ODocument) record).getClassName());<NEW_LINE>if (!(Boolean.TRUE.equals(val))) {<NEW_LINE>// TODO hierarchy...?<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>OBooleanExpression predicate = OSecurityEngine.getPredicateForSecurityResource(session, this, "database.class.`" + ((ODocument) record).getClassName() + <MASK><NEW_LINE>return OSecurityEngine.evaluateSecuirtyPolicyPredicate(session, predicate, record);<NEW_LINE>}<NEW_LINE>return true;<NEW_LINE>}
"`", OSecurityPolicy.Scope.READ);
187,107
private void createCanvas() {<NEW_LINE>lwjglCanvas = new Canvas() {<NEW_LINE><NEW_LINE>private final Dimension minSize = new Dimension(1, 1);<NEW_LINE><NEW_LINE>private float scaleX;<NEW_LINE><NEW_LINE>private float scaleY;<NEW_LINE><NEW_LINE>public final void addNotify() {<NEW_LINE>super.addNotify();<NEW_LINE>AffineTransform transform <MASK><NEW_LINE>scaleX = (float) transform.getScaleX();<NEW_LINE>scaleY = (float) transform.getScaleY();<NEW_LINE>}<NEW_LINE><NEW_LINE>public Dimension getMinimumSize() {<NEW_LINE>return minSize;<NEW_LINE>}<NEW_LINE><NEW_LINE>public int getWidth() {<NEW_LINE>return Math.round(super.getWidth() * scaleX);<NEW_LINE>}<NEW_LINE><NEW_LINE>public int getHeight() {<NEW_LINE>return Math.round(super.getHeight() * scaleY);<NEW_LINE>}<NEW_LINE>};<NEW_LINE>lwjglCanvas.setSize(1, 1);<NEW_LINE>lwjglCanvas.setIgnoreRepaint(true);<NEW_LINE>new LwjglApplication(renderer, lwjglCanvas);<NEW_LINE>}
= getGraphicsConfiguration().getDefaultTransform();
1,855,182
CachedLayer writeTarLayer(DescriptorDigest diffId, Blob compressedBlob) throws IOException {<NEW_LINE>Files.createDirectories(cacheStorageFiles.getLocalDirectory());<NEW_LINE>Files.createDirectories(cacheStorageFiles.getTemporaryDirectory());<NEW_LINE>try (TempDirectoryProvider tempDirectoryProvider = new TempDirectoryProvider()) {<NEW_LINE>Path temporaryLayerDirectory = tempDirectoryProvider.newDirectory(cacheStorageFiles.getTemporaryDirectory());<NEW_LINE>Path temporaryLayerFile = cacheStorageFiles.getTemporaryLayerFile(temporaryLayerDirectory);<NEW_LINE>BlobDescriptor layerBlobDescriptor;<NEW_LINE>try (OutputStream fileOutputStream = new BufferedOutputStream(Files.newOutputStream(temporaryLayerFile))) {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>// Renames the temporary layer file to its digest<NEW_LINE>// (temp/temp -> temp/<digest>)<NEW_LINE>String fileName = layerBlobDescriptor.getDigest().getHash();<NEW_LINE>Path digestLayerFile = temporaryLayerDirectory.resolve(fileName);<NEW_LINE>moveIfDoesNotExist(temporaryLayerFile, digestLayerFile);<NEW_LINE>// Moves the temporary directory to directory named with diff ID<NEW_LINE>// (temp/<digest> -> <diffID>/<digest>)<NEW_LINE>Path destination = cacheStorageFiles.getLocalDirectory().resolve(diffId.getHash());<NEW_LINE>moveIfDoesNotExist(temporaryLayerDirectory, destination);<NEW_LINE>return CachedLayer.builder().setLayerDigest(layerBlobDescriptor.getDigest()).setLayerDiffId(diffId).setLayerSize(layerBlobDescriptor.getSize()).setLayerBlob(Blobs.from(destination.resolve(fileName))).build();<NEW_LINE>}<NEW_LINE>}
layerBlobDescriptor = compressedBlob.writeTo(fileOutputStream);
1,381,334
public void run(RegressionEnvironment env) {<NEW_LINE>String[] fields = "c0,c1".split(",");<NEW_LINE>String epl = "@name('s0') select value in (select sum(intPrimitive) from SupportBean#keepall having last(theString) != 'E1') as c0," + "value not in (select sum(intPrimitive) from SupportBean#keepall having last(theString) != 'E1') as c1 " + "from SupportValueEvent";<NEW_LINE>env.compileDeployAddListenerMileZero(epl, "s0");<NEW_LINE>sendVEAndAssert(env, fields, 10, new Object[] { null, null });<NEW_LINE>env.sendEventBean(new SupportBean("E1", 10));<NEW_LINE>sendVEAndAssert(env, fields, 10, new Object[] { null, null });<NEW_LINE>env.sendEventBean(new SupportBean("E2", 0));<NEW_LINE>sendVEAndAssert(env, fields, 10, new Object<MASK><NEW_LINE>env.sendEventBean(new SupportBean("E3", 1));<NEW_LINE>sendVEAndAssert(env, fields, 10, new Object[] { false, true });<NEW_LINE>env.sendEventBean(new SupportBean("E4", -1));<NEW_LINE>sendVEAndAssert(env, fields, 10, new Object[] { true, false });<NEW_LINE>env.undeployAll();<NEW_LINE>}
[] { true, false });
968,714
public void visitNewArrayFunctionRef(ENewArrayFunctionRef userNewArrayFunctionRefNode, ScriptScope scriptScope) {<NEW_LINE>ReferenceNode irReferenceNode;<NEW_LINE>if (scriptScope.hasDecoration(userNewArrayFunctionRefNode, TargetType.class)) {<NEW_LINE>TypedInterfaceReferenceNode typedInterfaceReferenceNode = new TypedInterfaceReferenceNode(userNewArrayFunctionRefNode.getLocation());<NEW_LINE>typedInterfaceReferenceNode.setReference(scriptScope.getDecoration(userNewArrayFunctionRefNode, ReferenceDecoration.class).getReference());<NEW_LINE>irReferenceNode = typedInterfaceReferenceNode;<NEW_LINE>} else {<NEW_LINE>DefInterfaceReferenceNode defInterfaceReferenceNode = new DefInterfaceReferenceNode(userNewArrayFunctionRefNode.getLocation());<NEW_LINE>defInterfaceReferenceNode.setDefReferenceEncoding(scriptScope.getDecoration(userNewArrayFunctionRefNode, EncodingDecoration.class).getEncoding());<NEW_LINE>irReferenceNode = defInterfaceReferenceNode;<NEW_LINE>}<NEW_LINE>Class<?> returnType = scriptScope.getDecoration(userNewArrayFunctionRefNode, ReturnType.class).getReturnType();<NEW_LINE>LoadVariableNode irLoadVariableNode = new LoadVariableNode(userNewArrayFunctionRefNode.getLocation());<NEW_LINE>irLoadVariableNode.setExpressionType(int.class);<NEW_LINE>irLoadVariableNode.setName("size");<NEW_LINE>NewArrayNode irNewArrayNode = new <MASK><NEW_LINE>irNewArrayNode.setExpressionType(returnType);<NEW_LINE>irNewArrayNode.setInitialize(false);<NEW_LINE>irNewArrayNode.addArgumentNode(irLoadVariableNode);<NEW_LINE>ReturnNode irReturnNode = new ReturnNode(userNewArrayFunctionRefNode.getLocation());<NEW_LINE>irReturnNode.setExpressionNode(irNewArrayNode);<NEW_LINE>BlockNode irBlockNode = new BlockNode(userNewArrayFunctionRefNode.getLocation());<NEW_LINE>irBlockNode.setAllEscape(true);<NEW_LINE>irBlockNode.addStatementNode(irReturnNode);<NEW_LINE>FunctionNode irFunctionNode = new FunctionNode(userNewArrayFunctionRefNode.getLocation());<NEW_LINE>irFunctionNode.setMaxLoopCounter(0);<NEW_LINE>irFunctionNode.setName(scriptScope.getDecoration(userNewArrayFunctionRefNode, MethodNameDecoration.class).getMethodName());<NEW_LINE>irFunctionNode.setReturnType(returnType);<NEW_LINE>irFunctionNode.addTypeParameter(int.class);<NEW_LINE>irFunctionNode.addParameterName("size");<NEW_LINE>irFunctionNode.setStatic(true);<NEW_LINE>irFunctionNode.setVarArgs(false);<NEW_LINE>irFunctionNode.setSynthetic(true);<NEW_LINE>irFunctionNode.setBlockNode(irBlockNode);<NEW_LINE>irClassNode.addFunctionNode(irFunctionNode);<NEW_LINE>irReferenceNode.setExpressionType(scriptScope.getDecoration(userNewArrayFunctionRefNode, ValueType.class).getValueType());<NEW_LINE>scriptScope.putDecoration(userNewArrayFunctionRefNode, new IRNodeDecoration(irReferenceNode));<NEW_LINE>}
NewArrayNode(userNewArrayFunctionRefNode.getLocation());
158,510
public static DescribeVulDetailsResponse unmarshall(DescribeVulDetailsResponse describeVulDetailsResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeVulDetailsResponse.setRequestId(_ctx.stringValue("DescribeVulDetailsResponse.RequestId"));<NEW_LINE>List<Cve> cves = new ArrayList<Cve>();<NEW_LINE>for (int i = 0; i < _ctx.lengthValue("DescribeVulDetailsResponse.Cves.Length"); i++) {<NEW_LINE>Cve cve = new Cve();<NEW_LINE>cve.setCveId(_ctx.stringValue("DescribeVulDetailsResponse.Cves[" + i + "].CveId"));<NEW_LINE>cve.setCnvdId(_ctx.stringValue("DescribeVulDetailsResponse.Cves[" + i + "].CnvdId"));<NEW_LINE>cve.setTitle(_ctx.stringValue("DescribeVulDetailsResponse.Cves[" + i + "].Title"));<NEW_LINE>cve.setCvssScore(_ctx.stringValue("DescribeVulDetailsResponse.Cves[" + i + "].CvssScore"));<NEW_LINE>cve.setCvssVector(_ctx.stringValue("DescribeVulDetailsResponse.Cves[" + i + "].CvssVector"));<NEW_LINE>cve.setReleaseTime(_ctx.longValue<MASK><NEW_LINE>cve.setComplexity(_ctx.stringValue("DescribeVulDetailsResponse.Cves[" + i + "].Complexity"));<NEW_LINE>cve.setPoc(_ctx.stringValue("DescribeVulDetailsResponse.Cves[" + i + "].Poc"));<NEW_LINE>cve.setPocCreateTime(_ctx.longValue("DescribeVulDetailsResponse.Cves[" + i + "].PocCreateTime"));<NEW_LINE>cve.setPocDisclosureTime(_ctx.longValue("DescribeVulDetailsResponse.Cves[" + i + "].PocDisclosureTime"));<NEW_LINE>cve.setSummary(_ctx.stringValue("DescribeVulDetailsResponse.Cves[" + i + "].Summary"));<NEW_LINE>cve.setSolution(_ctx.stringValue("DescribeVulDetailsResponse.Cves[" + i + "].Solution"));<NEW_LINE>cve.setContent(_ctx.stringValue("DescribeVulDetailsResponse.Cves[" + i + "].Content"));<NEW_LINE>cve.setVendor(_ctx.stringValue("DescribeVulDetailsResponse.Cves[" + i + "].Vendor"));<NEW_LINE>cve.setProduct(_ctx.stringValue("DescribeVulDetailsResponse.Cves[" + i + "].Product"));<NEW_LINE>cve.setVulLevel(_ctx.stringValue("DescribeVulDetailsResponse.Cves[" + i + "].VulLevel"));<NEW_LINE>cve.setReference(_ctx.stringValue("DescribeVulDetailsResponse.Cves[" + i + "].Reference"));<NEW_LINE>cve.setClassify(_ctx.stringValue("DescribeVulDetailsResponse.Cves[" + i + "].Classify"));<NEW_LINE>List<Classify> classifys = new ArrayList<Classify>();<NEW_LINE>for (int j = 0; j < _ctx.lengthValue("DescribeVulDetailsResponse.Cves[" + i + "].Classifys.Length"); j++) {<NEW_LINE>Classify classify = new Classify();<NEW_LINE>classify.setClassify(_ctx.stringValue("DescribeVulDetailsResponse.Cves[" + i + "].Classifys[" + j + "].Classify"));<NEW_LINE>classify.setDescription(_ctx.stringValue("DescribeVulDetailsResponse.Cves[" + i + "].Classifys[" + j + "].Description"));<NEW_LINE>classify.setDemoVideoUrl(_ctx.stringValue("DescribeVulDetailsResponse.Cves[" + i + "].Classifys[" + j + "].DemoVideoUrl"));<NEW_LINE>classifys.add(classify);<NEW_LINE>}<NEW_LINE>cve.setClassifys(classifys);<NEW_LINE>cves.add(cve);<NEW_LINE>}<NEW_LINE>describeVulDetailsResponse.setCves(cves);<NEW_LINE>return describeVulDetailsResponse;<NEW_LINE>}
("DescribeVulDetailsResponse.Cves[" + i + "].ReleaseTime"));
1,789,631
private void parse(String[] args) {<NEW_LINE>ArgumentsParser parser = new ArgumentsParser(args);<NEW_LINE>parseFlags(parser);<NEW_LINE>fileNames = parser.getRemaining();<NEW_LINE>if (inputList != null && !inputList.isEmpty()) {<NEW_LINE>// append the file names to the end of the input list<NEW_LINE>inputList.addAll<MASK><NEW_LINE>fileNames = inputList.toArray(new String[inputList.size()]);<NEW_LINE>}<NEW_LINE>if (fileNames.length == 0) {<NEW_LINE>if (!emptyOk) {<NEW_LINE>context.err.println("no input files specified");<NEW_LINE>throw new UsageException();<NEW_LINE>}<NEW_LINE>} else if (emptyOk) {<NEW_LINE>context.out.println("ignoring input files");<NEW_LINE>}<NEW_LINE>if ((humanOutName == null) && (methodToDump != null)) {<NEW_LINE>humanOutName = "-";<NEW_LINE>}<NEW_LINE>if (outputIsDirectory) {<NEW_LINE>outName = new File(outName, DexFormat.DEX_IN_JAR_NAME).getPath();<NEW_LINE>}<NEW_LINE>makeOptionsObjects();<NEW_LINE>}
(Arrays.asList(fileNames));
677,009
public static <V, T> MutableObjectDoubleMap<V> sumByDouble(T[] array, int size, Function<? super T, ? extends V> groupBy, DoubleFunction<? super T> function) {<NEW_LINE>MutableObjectDoubleMap<V> result = ObjectDoubleMaps.mutable.empty();<NEW_LINE>MutableObjectDoubleMap<V> groupKeyToCompensation = ObjectDoubleMaps.mutable.empty();<NEW_LINE>for (int i = 0; i < size; i++) {<NEW_LINE>T item = array[i];<NEW_LINE>V groupByKey = groupBy.valueOf(item);<NEW_LINE>double compensation = groupKeyToCompensation.getIfAbsentPut(groupByKey, 0.0d);<NEW_LINE>double adjustedValue = function.doubleValueOf(item) - compensation;<NEW_LINE>double nextSum = result.get(groupByKey) + adjustedValue;<NEW_LINE>groupKeyToCompensation.put(groupByKey, nextSum - result<MASK><NEW_LINE>result.put(groupByKey, nextSum);<NEW_LINE>}<NEW_LINE>return result;<NEW_LINE>}
.get(groupByKey) - adjustedValue);
1,541,267
final DeleteStreamResult executeDeleteStream(DeleteStreamRequest deleteStreamRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(deleteStreamRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<DeleteStreamRequest> request = null;<NEW_LINE>Response<DeleteStreamResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new DeleteStreamRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(deleteStreamRequest));<NEW_LINE>// Binds the request metrics to the current request.<NEW_LINE>request.setAWSRequestMetrics(awsRequestMetrics);<NEW_LINE>request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);<NEW_LINE>request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SERVICE_ID, "IoT");<NEW_LINE>request.<MASK><NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<DeleteStreamResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeleteStreamResultJsonUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteStream");
1,521,171
public List<MigrationQuery> compute(MappingModel mappingModel, Keyspace keyspace) {<NEW_LINE>List<MigrationQuery> <MASK><NEW_LINE>List<String> errors = new ArrayList<>();<NEW_LINE>for (EntityModel entity : mappingModel.getEntities().values()) {<NEW_LINE>switch(entity.getTarget()) {<NEW_LINE>case TABLE:<NEW_LINE>Table expectedTable = entity.getTableCqlSchema();<NEW_LINE>Table actualTable = keyspace.table(entity.getCqlName());<NEW_LINE>compute(expectedTable, actualTable, CassandraSchemaHelper::compare, CreateTableQuery::createTableAndIndexes, DropTableQuery::new, AddTableColumnQuery::new, CreateIndexQuery::new, "table", queries, errors);<NEW_LINE>break;<NEW_LINE>case UDT:<NEW_LINE>UserDefinedType expectedType = entity.getUdtCqlSchema();<NEW_LINE>UserDefinedType actualType = keyspace.userDefinedType(entity.getCqlName());<NEW_LINE>compute(expectedType, actualType, CassandraSchemaHelper::compare, CreateUdtQuery::createUdt, DropUdtQuery::new, AddUdtFieldQuery::new, UDT_NO_CREATE_INDEX, "UDT", queries, errors);<NEW_LINE>break;<NEW_LINE>default:<NEW_LINE>throw new AssertionError("Unexpected target " + entity.getTarget());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (!errors.isEmpty()) {<NEW_LINE>String message = isPersisted ? "The GraphQL schema stored for this keyspace doesn't match the CQL data model " + "anymore. It looks like the database was altered manually." : String.format("The GraphQL schema that you provided can't be mapped to the current CQL data " + "model. Consider using a different migration strategy (current: %s).", strategy);<NEW_LINE>throw GraphqlErrorException.newErrorException().message(message + " See details in `extensions.migrationErrors` below.").extensions(ImmutableMap.of("migrationErrors", errors)).build();<NEW_LINE>}<NEW_LINE>return sortForExecution(queries);<NEW_LINE>}
queries = new ArrayList<>();
394,737
public void execute() {<NEW_LINE>UserVm result;<NEW_LINE>if (getStartVm()) {<NEW_LINE>try {<NEW_LINE>CallContext.current().setEventDetails("Vm Id: " + getEntityUuid());<NEW_LINE>result = _userVmService.startVirtualMachine(this);<NEW_LINE>} catch (ResourceUnavailableException ex) {<NEW_LINE>s_logger.warn("Exception: ", ex);<NEW_LINE>throw new ServerApiException(ApiErrorCode.RESOURCE_UNAVAILABLE_ERROR, ex.getMessage());<NEW_LINE>} catch (ResourceAllocationException ex) {<NEW_LINE>s_logger.warn("Exception: ", ex);<NEW_LINE>throw new ServerApiException(ApiErrorCode.RESOURCE_ALLOCATION_ERROR, ex.getMessage());<NEW_LINE>} catch (ConcurrentOperationException ex) {<NEW_LINE>s_logger.warn("Exception: ", ex);<NEW_LINE>throw new ServerApiException(ApiErrorCode.<MASK><NEW_LINE>} catch (InsufficientCapacityException ex) {<NEW_LINE>StringBuilder message = new StringBuilder(ex.getMessage());<NEW_LINE>if (ex instanceof InsufficientServerCapacityException) {<NEW_LINE>if (((InsufficientServerCapacityException) ex).isAffinityApplied()) {<NEW_LINE>message.append(", Please check the affinity groups provided, there may not be sufficient capacity to follow them");<NEW_LINE>}<NEW_LINE>}<NEW_LINE>s_logger.info(ex);<NEW_LINE>s_logger.info(message.toString(), ex);<NEW_LINE>throw new ServerApiException(ApiErrorCode.INSUFFICIENT_CAPACITY_ERROR, message.toString());<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>result = _userVmService.getUserVm(getEntityId());<NEW_LINE>}<NEW_LINE>if (result != null) {<NEW_LINE>UserVmResponse response = _responseGenerator.createUserVmResponse(getResponseView(), "virtualmachine", result).get(0);<NEW_LINE>response.setResponseName(getCommandName());<NEW_LINE>setResponseObject(response);<NEW_LINE>} else {<NEW_LINE>throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to deploy vm uuid:" + getEntityUuid());<NEW_LINE>}<NEW_LINE>}
INTERNAL_ERROR, ex.getMessage());
761,721
public void createSetterForField(AccessLevel level, JavacNode fieldNode, JavacNode sourceNode, boolean whineIfExists, List<JCAnnotation> onMethod, List<JCAnnotation> onParam) {<NEW_LINE>if (fieldNode.getKind() != Kind.FIELD) {<NEW_LINE>fieldNode.addError(SETTER_NODE_NOT_SUPPORTED_ERR);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>AnnotationValues<Accessors> accessors = JavacHandlerUtil.getAccessorsForField(fieldNode);<NEW_LINE>JCVariableDecl fieldDecl = (JCVariableDecl) fieldNode.get();<NEW_LINE>String <MASK><NEW_LINE>if (methodName == null) {<NEW_LINE>fieldNode.addWarning("Not generating setter for this field: It does not fit your @Accessors prefix list.");<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if ((fieldDecl.mods.flags & Flags.FINAL) != 0) {<NEW_LINE>fieldNode.addWarning("Not generating setter for this field: Setters cannot be generated for final fields.");<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>for (String altName : toAllSetterNames(fieldNode, accessors)) {<NEW_LINE>switch(methodExists(altName, fieldNode, false, 1)) {<NEW_LINE>case EXISTS_BY_LOMBOK:<NEW_LINE>return;<NEW_LINE>case EXISTS_BY_USER:<NEW_LINE>if (whineIfExists) {<NEW_LINE>String altNameExpl = "";<NEW_LINE>if (!altName.equals(methodName))<NEW_LINE>altNameExpl = String.format(" (%s)", altName);<NEW_LINE>fieldNode.addWarning(String.format("Not generating %s(): A method with that name already exists%s", methodName, altNameExpl));<NEW_LINE>}<NEW_LINE>return;<NEW_LINE>default:<NEW_LINE>case NOT_EXISTS:<NEW_LINE>}<NEW_LINE>}<NEW_LINE>long access = toJavacModifier(level) | (fieldDecl.mods.flags & Flags.STATIC);<NEW_LINE>JCMethodDecl createdSetter = createSetter(access, fieldNode, fieldNode.getTreeMaker(), sourceNode, onMethod, onParam);<NEW_LINE>injectMethod(fieldNode.up(), createdSetter);<NEW_LINE>}
methodName = toSetterName(fieldNode, accessors);
1,617,868
public UpdateMedicalVocabularyResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>UpdateMedicalVocabularyResult updateMedicalVocabularyResult = new UpdateMedicalVocabularyResult();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>JsonToken token = context.getCurrentToken();<NEW_LINE>if (token == null)<NEW_LINE>token = context.nextToken();<NEW_LINE>if (token == VALUE_NULL) {<NEW_LINE>return updateMedicalVocabularyResult;<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("VocabularyName", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>updateMedicalVocabularyResult.setVocabularyName(context.getUnmarshaller(String.class).unmarshall(context));<NEW_LINE>}<NEW_LINE>if (context.testExpression("LanguageCode", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>updateMedicalVocabularyResult.setLanguageCode(context.getUnmarshaller(String.class).unmarshall(context));<NEW_LINE>}<NEW_LINE>if (context.testExpression("LastModifiedTime", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>updateMedicalVocabularyResult.setLastModifiedTime(DateJsonUnmarshallerFactory.getInstance("unixTimestamp").unmarshall(context));<NEW_LINE>}<NEW_LINE>if (context.testExpression("VocabularyState", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>updateMedicalVocabularyResult.setVocabularyState(context.getUnmarshaller(String.<MASK><NEW_LINE>}<NEW_LINE>} else if (token == END_ARRAY || token == END_OBJECT) {<NEW_LINE>if (context.getLastParsedParentElement() == null || context.getLastParsedParentElement().equals(currentParentElement)) {<NEW_LINE>if (context.getCurrentDepth() <= originalDepth)<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>token = context.nextToken();<NEW_LINE>}<NEW_LINE>return updateMedicalVocabularyResult;<NEW_LINE>}
class).unmarshall(context));
1,766,918
public static boolean isBetterLocation(final Location location, final Location prevLoc) {<NEW_LINE>if (prevLoc == null) {<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>// Check whether the new location fix is newer or older<NEW_LINE>final long timeDelta = location.getTime() - prevLoc.getTime();<NEW_LINE>final boolean isSignificantlyNewer <MASK><NEW_LINE>final boolean isSignificantlyOlder = timeDelta < -Config.Map.LOCATION_FIX_SIGNIFICANT_TIME_DELTA;<NEW_LINE>final boolean isNewer = timeDelta > 0;<NEW_LINE>if (isSignificantlyNewer) {<NEW_LINE>return true;<NEW_LINE>} else if (isSignificantlyOlder) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>// Check whether the new location fix is more or less accurate<NEW_LINE>final int accuracyDelta = (int) (location.getAccuracy() - prevLoc.getAccuracy());<NEW_LINE>final boolean isLessAccurate = accuracyDelta > 0;<NEW_LINE>final boolean isMoreAccurate = accuracyDelta < 0;<NEW_LINE>final boolean isSignificantlyLessAccurate = accuracyDelta > 200;<NEW_LINE>// Check if the old and new location are from the same provider<NEW_LINE>final boolean isFromSameProvider = isSameProvider(location.getProvider(), prevLoc.getProvider());<NEW_LINE>// Determine location quality using a combination of timeliness and accuracy<NEW_LINE>if (isMoreAccurate) {<NEW_LINE>return true;<NEW_LINE>} else if (isNewer && !isLessAccurate) {<NEW_LINE>return true;<NEW_LINE>} else<NEW_LINE>return isNewer && !isSignificantlyLessAccurate && isFromSameProvider;<NEW_LINE>}
= timeDelta > Config.Map.LOCATION_FIX_SIGNIFICANT_TIME_DELTA;
1,130,393
public static DescribeTraceInfoDetailResponse unmarshall(DescribeTraceInfoDetailResponse describeTraceInfoDetailResponse, UnmarshallerContext context) {<NEW_LINE>describeTraceInfoDetailResponse.setRequestId(context.stringValue("DescribeTraceInfoDetailResponse.RequestId"));<NEW_LINE>describeTraceInfoDetailResponse.setSuccess(context.booleanValue("DescribeTraceInfoDetailResponse.Success"));<NEW_LINE>TraceInfoDetail traceInfoDetail = new TraceInfoDetail();<NEW_LINE>List<Edge> edgeList = new ArrayList<Edge>();<NEW_LINE>for (int i = 0; i < context.lengthValue("DescribeTraceInfoDetailResponse.TraceInfoDetail.EdgeList.Length"); i++) {<NEW_LINE>Edge edge = new Edge();<NEW_LINE>edge.setEndId(context.stringValue("DescribeTraceInfoDetailResponse.TraceInfoDetail.EdgeList[" + i + "].EndId"));<NEW_LINE>edge.setStartId(context.stringValue("DescribeTraceInfoDetailResponse.TraceInfoDetail.EdgeList[" + i + "].StartId"));<NEW_LINE>edge.setCount(context.integerValue("DescribeTraceInfoDetailResponse.TraceInfoDetail.EdgeList[" + i + "].Count"));<NEW_LINE>edge.setTime(context.stringValue("DescribeTraceInfoDetailResponse.TraceInfoDetail.EdgeList[" + i + "].Time"));<NEW_LINE>edgeList.add(edge);<NEW_LINE>}<NEW_LINE>traceInfoDetail.setEdgeList(edgeList);<NEW_LINE>List<Vertex> vertexList = new ArrayList<Vertex>();<NEW_LINE>for (int i = 0; i < context.lengthValue("DescribeTraceInfoDetailResponse.TraceInfoDetail.VertexList.Length"); i++) {<NEW_LINE>Vertex vertex = new Vertex();<NEW_LINE>vertex.setName(context.stringValue("DescribeTraceInfoDetailResponse.TraceInfoDetail.VertexList[" + i + "].Name"));<NEW_LINE>vertex.setCount(context.integerValue("DescribeTraceInfoDetailResponse.TraceInfoDetail.VertexList[" + i + "].Count"));<NEW_LINE>vertex.setId(context.stringValue("DescribeTraceInfoDetailResponse.TraceInfoDetail.VertexList[" + i + "].Id"));<NEW_LINE>vertex.setTime(context.stringValue("DescribeTraceInfoDetailResponse.TraceInfoDetail.VertexList[" + i + "].Time"));<NEW_LINE>vertex.setType(context.stringValue("DescribeTraceInfoDetailResponse.TraceInfoDetail.VertexList[" + i + "].Type"));<NEW_LINE>List<Neighbor> neighborList = new ArrayList<Neighbor>();<NEW_LINE>for (int j = 0; j < context.lengthValue("DescribeTraceInfoDetailResponse.TraceInfoDetail.VertexList[" + i + "].NeighborList.Length"); j++) {<NEW_LINE>Neighbor neighbor = new Neighbor();<NEW_LINE>neighbor.setHasMore(context.booleanValue("DescribeTraceInfoDetailResponse.TraceInfoDetail.VertexList[" + i + "].NeighborList[" + j + "].HasMore"));<NEW_LINE>neighbor.setCount(context.integerValue("DescribeTraceInfoDetailResponse.TraceInfoDetail.VertexList[" + i + "].NeighborList[" + j + "].Count"));<NEW_LINE>neighbor.setType(context.stringValue("DescribeTraceInfoDetailResponse.TraceInfoDetail.VertexList[" + i + "].NeighborList[" + j + "].Type"));<NEW_LINE>neighborList.add(neighbor);<NEW_LINE>}<NEW_LINE>vertex.setNeighborList(neighborList);<NEW_LINE>vertexList.add(vertex);<NEW_LINE>}<NEW_LINE>traceInfoDetail.setVertexList(vertexList);<NEW_LINE>List<EntityType> entityTypeList = new ArrayList<EntityType>();<NEW_LINE>for (int i = 0; i < context.lengthValue("DescribeTraceInfoDetailResponse.TraceInfoDetail.EntityTypeList.Length"); i++) {<NEW_LINE>EntityType entityType = new EntityType();<NEW_LINE>entityType.setDisplayTemplate(context.stringValue("DescribeTraceInfoDetailResponse.TraceInfoDetail.EntityTypeList[" + i + "].DisplayTemplate"));<NEW_LINE>entityType.setGmtModified(context.longValue("DescribeTraceInfoDetailResponse.TraceInfoDetail.EntityTypeList[" + i + "].GmtModified"));<NEW_LINE>entityType.setDisplayIcon(context.stringValue("DescribeTraceInfoDetailResponse.TraceInfoDetail.EntityTypeList[" + i + "].DisplayIcon"));<NEW_LINE>entityType.setOffset(context.integerValue<MASK><NEW_LINE>entityType.setDbId(context.integerValue("DescribeTraceInfoDetailResponse.TraceInfoDetail.EntityTypeList[" + i + "].DbId"));<NEW_LINE>entityType.setName(context.stringValue("DescribeTraceInfoDetailResponse.TraceInfoDetail.EntityTypeList[" + i + "].Name"));<NEW_LINE>entityType.setNamespace(context.stringValue("DescribeTraceInfoDetailResponse.TraceInfoDetail.EntityTypeList[" + i + "].Namespace"));<NEW_LINE>entityType.setLimit(context.integerValue("DescribeTraceInfoDetailResponse.TraceInfoDetail.EntityTypeList[" + i + "].Limit"));<NEW_LINE>entityType.setId(context.stringValue("DescribeTraceInfoDetailResponse.TraceInfoDetail.EntityTypeList[" + i + "].Id"));<NEW_LINE>entityType.setDisplayColor(context.stringValue("DescribeTraceInfoDetailResponse.TraceInfoDetail.EntityTypeList[" + i + "].DisplayColor"));<NEW_LINE>entityType.setGmtCreate(context.longValue("DescribeTraceInfoDetailResponse.TraceInfoDetail.EntityTypeList[" + i + "].GmtCreate"));<NEW_LINE>entityTypeList.add(entityType);<NEW_LINE>}<NEW_LINE>traceInfoDetail.setEntityTypeList(entityTypeList);<NEW_LINE>describeTraceInfoDetailResponse.setTraceInfoDetail(traceInfoDetail);<NEW_LINE>return describeTraceInfoDetailResponse;<NEW_LINE>}
("DescribeTraceInfoDetailResponse.TraceInfoDetail.EntityTypeList[" + i + "].Offset"));
1,384,880
public static double angle(NumberVector v1, NumberVector v2, NumberVector o) {<NEW_LINE>final int dim1 = v1.getDimensionality(), dim2 = v2.getDimensionality(), dimo = o.getDimensionality();<NEW_LINE>final int mindim = (dim1 <= dim2) ? dim1 : dim2;<NEW_LINE>// Essentially, we want to compute this:<NEW_LINE>// v1' = v1 - o, v2' = v2 - o<NEW_LINE>// v1'.transposeTimes(v2') / (v1'.euclideanLength()*v2'.euclideanLength());<NEW_LINE>// We can just compute all three in parallel.<NEW_LINE>double cross = 0, l1 = 0, l2 = 0;<NEW_LINE>for (int k = 0; k < mindim; k++) {<NEW_LINE>final double ok = k < dimo ? o.doubleValue(k) : 0.;<NEW_LINE>final double r1 = v1.doubleValue(k) - ok;<NEW_LINE>final double r2 = v2.doubleValue(k) - ok;<NEW_LINE>cross += r1 * r2;<NEW_LINE>l1 += r1 * r1;<NEW_LINE>l2 += r2 * r2;<NEW_LINE>}<NEW_LINE>for (int k = mindim; k < dim1; k++) {<NEW_LINE>final double ok = k < dimo ? o.doubleValue(k) : 0.;<NEW_LINE>final double r1 = v1.doubleValue(k) - ok;<NEW_LINE>l1 += r1 * r1;<NEW_LINE>}<NEW_LINE>for (int k = mindim; k < dim2; k++) {<NEW_LINE>final double ok = k < dimo ? o.doubleValue(k) : 0.;<NEW_LINE>final double r2 = v2.doubleValue(k) - ok;<NEW_LINE>l2 += r2 * r2;<NEW_LINE>}<NEW_LINE>final //<NEW_LINE>double //<NEW_LINE>a = //<NEW_LINE>(cross == 0.) ? //<NEW_LINE>0. : //<NEW_LINE>(l1 == 0. || l2 == 0.) ? 1. : Math.sqrt((cross / l1) * (cross / l2));<NEW_LINE>return (<MASK><NEW_LINE>}
a < 1.) ? a : 1.;
593,716
protected InterceptorStatusToken beforeInvocation(Object object) {<NEW_LINE>Assert.notNull(object, "Object was null");<NEW_LINE>if (!getSecureObjectClass().isAssignableFrom(object.getClass())) {<NEW_LINE>throw new IllegalArgumentException("Security invocation attempted for object " + object.getClass().getName() + " but AbstractSecurityInterceptor only configured to support secure objects of type: " + getSecureObjectClass());<NEW_LINE>}<NEW_LINE>Collection<ConfigAttribute> attributes = this.obtainSecurityMetadataSource().getAttributes(object);<NEW_LINE>if (CollectionUtils.isEmpty(attributes)) {<NEW_LINE>Assert.isTrue(!this.rejectPublicInvocations, () -> "Secure object invocation " + object + " was denied as public invocations are not allowed via this interceptor. " + "This indicates a configuration error because the " + "rejectPublicInvocations property is set to 'true'");<NEW_LINE>if (this.logger.isDebugEnabled()) {<NEW_LINE>this.logger.debug(LogMessage.format("Authorized public object %s", object));<NEW_LINE>}<NEW_LINE>publishEvent(new PublicInvocationEvent(object));<NEW_LINE>// no further work post-invocation<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>if (SecurityContextHolder.getContext().getAuthentication() == null) {<NEW_LINE>credentialsNotFound(this.messages.getMessage("AbstractSecurityInterceptor.authenticationNotFound", "An Authentication object was not found in the SecurityContext"), object, attributes);<NEW_LINE>}<NEW_LINE>Authentication authenticated = authenticateIfRequired();<NEW_LINE>if (this.logger.isTraceEnabled()) {<NEW_LINE>this.logger.trace(LogMessage.format("Authorizing %s with attributes %s", object, attributes));<NEW_LINE>}<NEW_LINE>// Attempt authorization<NEW_LINE>attemptAuthorization(object, attributes, authenticated);<NEW_LINE>if (this.logger.isDebugEnabled()) {<NEW_LINE>this.logger.debug(LogMessage.format("Authorized %s with attributes %s", object, attributes));<NEW_LINE>}<NEW_LINE>if (this.publishAuthorizationSuccess) {<NEW_LINE>publishEvent(new AuthorizedEvent(object, attributes, authenticated));<NEW_LINE>}<NEW_LINE>// Attempt to run as a different user<NEW_LINE>Authentication runAs = this.runAsManager.buildRunAs(authenticated, object, attributes);<NEW_LINE>if (runAs != null) {<NEW_LINE>SecurityContext origCtx = SecurityContextHolder.getContext();<NEW_LINE>SecurityContext newCtx = SecurityContextHolder.createEmptyContext();<NEW_LINE>newCtx.setAuthentication(runAs);<NEW_LINE>SecurityContextHolder.setContext(newCtx);<NEW_LINE>if (this.logger.isDebugEnabled()) {<NEW_LINE>this.logger.debug(LogMessage<MASK><NEW_LINE>}<NEW_LINE>// need to revert to token.Authenticated post-invocation<NEW_LINE>return new InterceptorStatusToken(origCtx, true, attributes, object);<NEW_LINE>}<NEW_LINE>this.logger.trace("Did not switch RunAs authentication since RunAsManager returned null");<NEW_LINE>// no further work post-invocation<NEW_LINE>return new InterceptorStatusToken(SecurityContextHolder.getContext(), false, attributes, object);<NEW_LINE>}
.format("Switched to RunAs authentication %s", runAs));
320,085
final DBParameterGroup executeCopyDBParameterGroup(CopyDBParameterGroupRequest copyDBParameterGroupRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(copyDBParameterGroupRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<CopyDBParameterGroupRequest> request = null;<NEW_LINE>Response<DBParameterGroup> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new CopyDBParameterGroupRequestMarshaller().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, "Neptune");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CopyDBParameterGroup");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>StaxResponseHandler<DBParameterGroup> responseHandler = new StaxResponseHandler<DBParameterGroup>(new DBParameterGroupStaxUnmarshaller());<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(copyDBParameterGroupRequest));
455,423
ArrayList<Object> new152() /* reduce AQuotedArrayRef */<NEW_LINE>{<NEW_LINE>@SuppressWarnings("hiding")<NEW_LINE>ArrayList<Object> nodeList <MASK><NEW_LINE>@SuppressWarnings("unused")<NEW_LINE>ArrayList<Object> nodeArrayList2 = pop();<NEW_LINE>@SuppressWarnings("unused")<NEW_LINE>ArrayList<Object> nodeArrayList1 = pop();<NEW_LINE>PArrayRef parrayrefNode1;<NEW_LINE>{<NEW_LINE>// Block<NEW_LINE>TQuotedName tquotednameNode2;<NEW_LINE>PFixedArrayDescriptor pfixedarraydescriptorNode3;<NEW_LINE>tquotednameNode2 = (TQuotedName) nodeArrayList1.get(0);<NEW_LINE>pfixedarraydescriptorNode3 = (PFixedArrayDescriptor) nodeArrayList2.get(0);<NEW_LINE>parrayrefNode1 = new AQuotedArrayRef(tquotednameNode2, pfixedarraydescriptorNode3);<NEW_LINE>}<NEW_LINE>nodeList.add(parrayrefNode1);<NEW_LINE>return nodeList;<NEW_LINE>}
= new ArrayList<Object>();
1,759,429
public void handleBlockComment(int commentIndex) {<NEW_LINE>Token commentToken = this.tm.get(commentIndex);<NEW_LINE>boolean isFirstColumn = handleWhitespaceAround(commentIndex);<NEW_LINE>if (handleFormatOnOffTags(commentToken))<NEW_LINE>return;<NEW_LINE>boolean isHeader = this.tm.isInHeader(commentIndex);<NEW_LINE>boolean formattingEnabled = (this.options.comment_format_block_comment && !isHeader) || (this.options.comment_format_header && isHeader);<NEW_LINE>formattingEnabled = formattingEnabled && this.tm.charAt(commentToken.originalStart + 2) != '-';<NEW_LINE>if (formattingEnabled && tokenizeMultilineComment(commentToken)) {<NEW_LINE>this.commentStructure = commentToken.getInternalStructure();<NEW_LINE>this.ctm = new TokenManager(this.commentStructure, this.tm);<NEW_LINE>handleStringLiterals(this.tm.toString<MASK><NEW_LINE>addSubstituteWraps();<NEW_LINE>} else {<NEW_LINE>commentToken.setInternalStructure(commentToLines(commentToken, -1));<NEW_LINE>}<NEW_LINE>if (this.options.never_indent_block_comments_on_first_column && isFirstColumn) {<NEW_LINE>commentToken.setIndent(0);<NEW_LINE>commentToken.setWrapPolicy(WrapPolicy.FORCE_FIRST_COLUMN);<NEW_LINE>}<NEW_LINE>}
(commentToken), commentToken.originalStart);
233,927
public ComplexNumber[] estimateComplexAmplitudesTD(double[] x, double f0InHz, int L, double samplingRateInHz) {<NEW_LINE>int N = x.length;<NEW_LINE>double[][] Q = new double[N][2 * L];<NEW_LINE>double w0InRadians = SignalProcUtils.hz2radian(f0InHz, (int) samplingRateInHz);<NEW_LINE>int i, j;<NEW_LINE>for (i = 0; i < N; i++) {<NEW_LINE>for (j = 1; j <= L; j++) Q[i][j - 1] = Math.cos(i * j * w0InRadians);<NEW_LINE>for (j = L + 1; j <= 2 * L; j++) Q[i][j - 1] = Math.sin(i * (j - L) * w0InRadians);<NEW_LINE>}<NEW_LINE>double[][] QT = MathUtils.transpoze(Q);<NEW_LINE>double[][] QTQInv = MathUtils.inverse(MathUtils.matrixProduct(QT, Q));<NEW_LINE>double[] hopt = MathUtils.matrixProduct(MathUtils.matrixProduct(QTQInv, QT), x);<NEW_LINE>ComplexNumber[] xpart = new ComplexNumber[L];<NEW_LINE>for (i = 0; i < L; i++) xpart[i] = new ComplexNumber((float) hopt[i], (float<MASK><NEW_LINE>return xpart;<NEW_LINE>}
) hopt[i + L]);
1,836,818
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {<NEW_LINE>View view = inflater.inflate(R.layout.fragment_mainmenu, container, false);<NEW_LINE>final int[] clickableIds = new int[] { R.id.easy_mode_button, R.id.hard_mode_button, R.id.show_achievements_button, R.id.show_leaderboards_button, R.id.sign_in_button, R.id.<MASK><NEW_LINE>for (int clickableId : clickableIds) {<NEW_LINE>view.findViewById(clickableId).setOnClickListener(this);<NEW_LINE>}<NEW_LINE>// cache views<NEW_LINE>mShowAchievementsButton = view.findViewById(R.id.show_achievements_button);<NEW_LINE>mShowLeaderboardsButton = view.findViewById(R.id.show_leaderboards_button);<NEW_LINE>mShowFriendsButton = view.findViewById(R.id.show_friends_button);<NEW_LINE>mGreetingTextView = view.findViewById(R.id.text_greeting);<NEW_LINE>mSignInBarView = view.findViewById(R.id.sign_in_bar);<NEW_LINE>mSignOutBarView = view.findViewById(R.id.sign_out_bar);<NEW_LINE>updateUI();<NEW_LINE>return view;<NEW_LINE>}
sign_out_button, R.id.show_friends_button };
891,824
public ProtocolProviderService installAccount(ProtocolProviderFactory providerFactory, String user, String passwd) throws OperationFailedException {<NEW_LINE>Hashtable<String, String> accountProperties = new Hashtable<String, String>();<NEW_LINE>accountProperties.put(ProtocolProviderFactory.ACCOUNT_ICON_PATH, "resources/images/protocol/aim/aim32x32.png");<NEW_LINE>if (registration.isRememberPassword()) {<NEW_LINE>accountProperties.put(ProtocolProviderFactory.PASSWORD, passwd);<NEW_LINE>}<NEW_LINE>if (isModification()) {<NEW_LINE><MASK><NEW_LINE>setModification(false);<NEW_LINE>return protocolProvider;<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>AccountID accountID = providerFactory.installAccount(user, accountProperties);<NEW_LINE>ServiceReference serRef = providerFactory.getProviderForAccount(accountID);<NEW_LINE>protocolProvider = (ProtocolProviderService) AimAccRegWizzActivator.bundleContext.getService(serRef);<NEW_LINE>} catch (IllegalStateException exc) {<NEW_LINE>logger.warn(exc.getMessage());<NEW_LINE>throw new OperationFailedException("Account already exists.", OperationFailedException.IDENTIFICATION_CONFLICT);<NEW_LINE>} catch (Exception exc) {<NEW_LINE>logger.warn(exc.getMessage());<NEW_LINE>throw new OperationFailedException("Failed to add account", OperationFailedException.GENERAL_ERROR);<NEW_LINE>}<NEW_LINE>return protocolProvider;<NEW_LINE>}
providerFactory.modifyAccount(protocolProvider, accountProperties);
472,158
public static void vertical5(Kernel1D_S32 kernel, GrayU8 input, GrayI16 output, int skip) {<NEW_LINE>final byte[] dataSrc = input.data;<NEW_LINE>final short[] dataDst = output.data;<NEW_LINE>final int k1 = kernel.data[0];<NEW_LINE>final int k2 = kernel.data[1];<NEW_LINE>final int k3 = kernel.data[2];<NEW_LINE>final int k4 = kernel.data[3];<NEW_LINE>final int k5 = kernel.data[4];<NEW_LINE>final int radius = kernel.getRadius();<NEW_LINE>final int width = input.width;<NEW_LINE>final int heightEnd = UtilDownConvolve.computeMaxSide(input.height, skip, radius);<NEW_LINE>final int offsetY = UtilDownConvolve.computeOffset(skip, radius);<NEW_LINE>for (int y = offsetY; y <= heightEnd; y += skip) {<NEW_LINE>int indexDst = output.startIndex + (y / skip) * output.stride;<NEW_LINE>int i = input.startIndex + (y - radius) * input.stride;<NEW_LINE>final int iEnd = i + width;<NEW_LINE>for (; i < iEnd; i++) {<NEW_LINE>int indexSrc = i;<NEW_LINE>int total = (dataSrc[indexSrc] & 0xFF) * k1;<NEW_LINE>indexSrc += input.stride;<NEW_LINE>total += (dataSrc[indexSrc] & 0xFF) * k2;<NEW_LINE>indexSrc += input.stride;<NEW_LINE>total += (dataSrc[indexSrc] & 0xFF) * k3;<NEW_LINE>indexSrc += input.stride;<NEW_LINE>total += (dataSrc[indexSrc] & 0xFF) * k4;<NEW_LINE>indexSrc += input.stride;<NEW_LINE>total += (dataSrc<MASK><NEW_LINE>dataDst[indexDst++] = (short) total;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
[indexSrc] & 0xFF) * k5;
1,230,182
private static Pair<List<TResultBatch>, Status> executeStmt(ConnectContext context, ExecPlan plan) throws Exception {<NEW_LINE>Coordinator coord = new Coordinator(context, plan.getFragments(), plan.getScanNodes(), plan.getDescTbl().toThrift());<NEW_LINE>QeProcessorImpl.INSTANCE.registerQuery(context.getExecutionId(), coord);<NEW_LINE>List<TResultBatch> sqlResult = Lists.newArrayList();<NEW_LINE>try {<NEW_LINE>coord.exec();<NEW_LINE>RowBatch batch;<NEW_LINE>do {<NEW_LINE>batch = coord.getNext();<NEW_LINE>if (batch.getBatch() != null) {<NEW_LINE>sqlResult.add(batch.getBatch());<NEW_LINE>}<NEW_LINE>} while <MASK><NEW_LINE>} catch (Exception e) {<NEW_LINE>LOG.warn(e);<NEW_LINE>} finally {<NEW_LINE>QeProcessorImpl.INSTANCE.unregisterQuery(context.getExecutionId());<NEW_LINE>}<NEW_LINE>return Pair.create(sqlResult, coord.getExecStatus());<NEW_LINE>}
(!batch.isEos());
1,469,814
private void dependantFiller(TruthTable tt, DependencyAnalyser da) throws NodeException, AnalyseException {<NEW_LINE>model.init();<NEW_LINE>for (Signal out : outputs) {<NEW_LINE>ArrayList<Signal> ins = reorder(da.getInputs(out), inputs);<NEW_LINE>if (ins.size() > MAX_INPUTS_ALLOWED)<NEW_LINE>throw new AnalyseException(Lang.get("err_toManyInputs_max_N0_is_N1", MAX_INPUTS_ALLOWED, ins.size()));<NEW_LINE>int rows = 1 << ins.size();<NEW_LINE>BoolTableByteArray e = new BoolTableByteArray(rows);<NEW_LINE>BitSetter bitsetter = new BitSetter(ins.size()) {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void setBit(int row, int bit, boolean value) {<NEW_LINE>ins.get(bit).getValue().setBool(value);<NEW_LINE>}<NEW_LINE>};<NEW_LINE>for (int row = 0; row < rows; row++) {<NEW_LINE>bitsetter.fill(row);<NEW_LINE>model.doStep();<NEW_LINE>e.set(row, out.getValue().getBool());<NEW_LINE>}<NEW_LINE>tt.addResult(out.getName(), new BoolTableExpanded<MASK><NEW_LINE>}<NEW_LINE>}
(e, ins, inputs));
1,348,296
protected <A extends Annotation> ExpressionResult checkPermissions(Type<?> resourceClass, Class<A> annotationClass, Set<String> fields, Supplier<Expression> expressionSupplier, Optional<Function<Expression, ExpressionResult>> expressionExecutor) {<NEW_LINE>// If the user check has already been evaluated before, return the result directly and save the building cost<NEW_LINE>ImmutableSet<String> immutableFields = fields == null ? null : ImmutableSet.copyOf(fields);<NEW_LINE>ExpressionResult expressionResult = userPermissionCheckCache.get(Triple.of(annotationClass, resourceClass, immutableFields));<NEW_LINE>if (expressionResult == PASS) {<NEW_LINE>return expressionResult;<NEW_LINE>}<NEW_LINE>Expression expression = expressionSupplier.get();<NEW_LINE>if (expressionResult == null) {<NEW_LINE>expressionResult = executeExpressions(expression, annotationClass, Expression.EvaluationMode.USER_CHECKS_ONLY);<NEW_LINE>userPermissionCheckCache.put(Triple.of(annotationClass, resourceClass, immutableFields), expressionResult);<NEW_LINE>if (expressionResult == PASS) {<NEW_LINE>return expressionResult;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return expressionExecutor.map(executor -> executor.apply(<MASK><NEW_LINE>}
expression)).orElse(expressionResult);
1,503,656
private soot.SootMethod addGetFieldAccessMeth(soot.SootClass conClass, polyglot.ast.Field field) {<NEW_LINE>if ((InitialResolver.v().getPrivateFieldGetAccessMap() != null) && (InitialResolver.v().getPrivateFieldGetAccessMap().containsKey(new polyglot.util.IdentityKey(field.fieldInstance())))) {<NEW_LINE>return InitialResolver.v().getPrivateFieldGetAccessMap().get(new polyglot.util.IdentityKey(field.fieldInstance()));<NEW_LINE>}<NEW_LINE>String name = "access$" + soot.javaToJimple.InitialResolver.v().getNextPrivateAccessCounter() + "00";<NEW_LINE>ArrayList paramTypes = new ArrayList();<NEW_LINE>if (!field.flags().isStatic()) {<NEW_LINE>// add this param type<NEW_LINE>// (soot.Local)getBaseLocal(field.target()));<NEW_LINE>paramTypes.add(conClass.getType());<NEW_LINE>// paramTypes.add(Util.getSootType(field.target().type()));<NEW_LINE>}<NEW_LINE>soot.SootMethod meth = Scene.v().makeSootMethod(name, paramTypes, Util.getSootType(field.type()), soot.Modifier.STATIC);<NEW_LINE>PrivateFieldAccMethodSource pfams = new PrivateFieldAccMethodSource(Util.getSootType(field.type()), field.name(), field.flags(<MASK><NEW_LINE>conClass.addMethod(meth);<NEW_LINE>meth.setActiveBody(pfams.getBody(meth, null));<NEW_LINE>InitialResolver.v().addToPrivateFieldGetAccessMap(field, meth);<NEW_LINE>meth.addTag(new soot.tagkit.SyntheticTag());<NEW_LINE>return meth;<NEW_LINE>}
).isStatic(), conClass);
1,308,071
public SyntheticMethodBinding addSyntheticMethod(LambdaExpression lambda) {<NEW_LINE>if (!isPrototype())<NEW_LINE>throw new IllegalStateException();<NEW_LINE>if (this.synthetics == null)<NEW_LINE>this<MASK><NEW_LINE>if (this.synthetics[SourceTypeBinding.METHOD_EMUL] == null)<NEW_LINE>this.synthetics[SourceTypeBinding.METHOD_EMUL] = new HashMap(5);<NEW_LINE>SyntheticMethodBinding lambdaMethod = null;<NEW_LINE>SyntheticMethodBinding[] lambdaMethods = (SyntheticMethodBinding[]) this.synthetics[SourceTypeBinding.METHOD_EMUL].get(lambda);<NEW_LINE>if (lambdaMethods == null) {<NEW_LINE>lambdaMethod = new SyntheticMethodBinding(lambda, CharOperation.concat(TypeConstants.ANONYMOUS_METHOD, Integer.toString(lambda.ordinal).toCharArray()), this);<NEW_LINE>this.synthetics[SourceTypeBinding.METHOD_EMUL].put(lambda, lambdaMethods = new SyntheticMethodBinding[1]);<NEW_LINE>lambdaMethods[0] = lambdaMethod;<NEW_LINE>} else {<NEW_LINE>lambdaMethod = lambdaMethods[0];<NEW_LINE>}<NEW_LINE>// Create a $deserializeLambda$ method if necessary, one is shared amongst all lambdas<NEW_LINE>if (lambda.isSerializable) {<NEW_LINE>addDeserializeLambdaMethod();<NEW_LINE>}<NEW_LINE>return lambdaMethod;<NEW_LINE>}
.synthetics = new HashMap[MAX_SYNTHETICS];
1,554,097
private PrintElement createImageElement(final MPrintFormatItem item) {<NEW_LINE>Object obj = m_data.getNode(new Integer(item.getAD_Column_ID()));<NEW_LINE>if (obj == null)<NEW_LINE>return null;<NEW_LINE>else if (obj instanceof PrintDataElement)<NEW_LINE>;<NEW_LINE>else {<NEW_LINE>log.error("Element not PrintDataElement " + obj.getClass());<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>PrintDataElement data = (PrintDataElement) obj;<NEW_LINE>if (data.isNull() && item.isSuppressNull())<NEW_LINE>return null;<NEW_LINE>String url = data.getValueDisplay(m_format.getLanguage());<NEW_LINE>if ((url == null || url.length() == 0)) {<NEW_LINE>if (item.isSuppressNull())<NEW_LINE>return null;<NEW_LINE>else<NEW_LINE>// should create an empty area<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>ImageElement element = null;<NEW_LINE>if (data.getDisplayType() == DisplayType.Image) {<NEW_LINE>element = <MASK><NEW_LINE>} else {<NEW_LINE>element = ImageElement.get(url);<NEW_LINE>}<NEW_LINE>return element;<NEW_LINE>}
ImageElement.get(data, url);
773,389
public void kill(UUID userId, DisconnectReason reason) {<NEW_LINE>try {<NEW_LINE>if (reason == null) {<NEW_LINE>logger.fatal("User kill without disconnect reason userId: " + userId);<NEW_LINE>reason = DisconnectReason.Undefined;<NEW_LINE>}<NEW_LINE>if (userId != null && clients.containsKey(userId)) {<NEW_LINE>String userName = clients.get(userId);<NEW_LINE>if (reason != DisconnectReason.LostConnection) {<NEW_LINE>// for lost connection the user will be reconnected or session expire so no removeUserFromAllTablesAndChat of chat yet<NEW_LINE>final Lock w = lock.writeLock();<NEW_LINE>w.lock();<NEW_LINE>try {<NEW_LINE>clients.remove(userId);<NEW_LINE>} finally {<NEW_LINE>w.unlock();<NEW_LINE>}<NEW_LINE>logger.debug(userName + '(' + reason.toString() + ')' + " removed from chatId " + chatId);<NEW_LINE>}<NEW_LINE><MASK><NEW_LINE>if (!message.isEmpty()) {<NEW_LINE>broadcast(null, userName + message, MessageColor.BLUE, true, null, MessageType.STATUS, null);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} catch (Exception ex) {<NEW_LINE>logger.fatal("exception: " + ex.toString());<NEW_LINE>}<NEW_LINE>}
String message = reason.getMessage();
1,174,423
public void inc(final E obj, final int incrementScore) {<NEW_LINE>if (obj == null)<NEW_LINE>return;<NEW_LINE>synchronized (this) {<NEW_LINE>// get unique score key, old entry is not needed any more<NEW_LINE>Long usk = this.map.remove(obj);<NEW_LINE>if (usk == null) {<NEW_LINE>// set new value<NEW_LINE>if (incrementScore < 0)<NEW_LINE>throw new OutOfLimitsException(incrementScore);<NEW_LINE>usk = Long.valueOf(scoreKey(this.encnt++, incrementScore));<NEW_LINE>// put new value into cluster<NEW_LINE>this.map.put(obj, usk);<NEW_LINE>this.pam.put(usk, obj);<NEW_LINE>} else {<NEW_LINE>// delete old entry<NEW_LINE>this.pam.remove(usk);<NEW_LINE>// get previous handle and score<NEW_LINE>final <MASK><NEW_LINE>final int oldScore = (int) ((c & 0xFFFFFFFF00000000L) >> 32);<NEW_LINE>final int oldHandle = (int) (c & 0xFFFFFFFFL);<NEW_LINE>// set new value<NEW_LINE>final int newValue = oldScore + incrementScore;<NEW_LINE>if (newValue < 0)<NEW_LINE>throw new OutOfLimitsException(newValue);<NEW_LINE>// generates an unique key for a specific score<NEW_LINE>usk = Long.valueOf(scoreKey(oldHandle, newValue));<NEW_LINE>this.map.put(obj, usk);<NEW_LINE>this.pam.put(usk, obj);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// increase overall counter<NEW_LINE>this.gcount += incrementScore;<NEW_LINE>}
long c = usk.longValue();
675,275
public void publish0(final RfQResponsePublisherRequest request, final RfQReportType rfqReportType) {<NEW_LINE>final I_C_RfQResponse rfqResponse = request.getC_RfQResponse();<NEW_LINE>//<NEW_LINE>// Check and get the user's mail where we will send the email to<NEW_LINE>final I_AD_User userTo = rfqResponse.getAD_User();<NEW_LINE>if (userTo == null) {<NEW_LINE>throw new RfQPublishException(request, "@NotFound@ @AD_User_ID@");<NEW_LINE>}<NEW_LINE>final EMailAddress userToEmail = EMailAddress.ofNullableString(userTo.getEMail());<NEW_LINE>if (userToEmail == null) {<NEW_LINE>throw new RfQPublishException(request, "@NotFound@ @AD_User_ID@ @Email@ - " + userTo);<NEW_LINE>}<NEW_LINE>//<NEW_LINE>final MailTextBuilder mailTextBuilder = createMailTextBuilder(rfqResponse, rfqReportType);<NEW_LINE>//<NEW_LINE>final String subject = mailTextBuilder.getMailHeader();<NEW_LINE>final String message = mailTextBuilder.getFullMailText();<NEW_LINE>final PrintFormatId printFormatId = getPrintFormatId(rfqResponse, rfqReportType);<NEW_LINE>final DefaultModelArchiver archiver = DefaultModelArchiver.of(rfqResponse, printFormatId);<NEW_LINE>final ArchiveResult pdfArchive = archiver.archive();<NEW_LINE>final ClientId adClientId = ClientId.ofRepoId(rfqResponse.getAD_Client_ID());<NEW_LINE>final ClientEMailConfig tenantEmailConfig = clientsRepo.getEMailConfigById(adClientId);<NEW_LINE>//<NEW_LINE>// Send it<NEW_LINE>final EMail email = //<NEW_LINE>mailService.//<NEW_LINE>createEMail(// mailCustomType<NEW_LINE>tenantEmailConfig, // from<NEW_LINE>(EMailCustomType) null, // to<NEW_LINE>(UserEMailConfig) null, // subject<NEW_LINE>userToEmail, // message<NEW_LINE>subject, // html<NEW_LINE><MASK><NEW_LINE>email.addAttachment("RfQ_" + rfqResponse.getC_RfQResponse_ID() + ".pdf", pdfArchive.getData());<NEW_LINE>final EMailSentStatus emailSentStatus = email.send();<NEW_LINE>//<NEW_LINE>// Fire mail sent/not sent event (even if there were some errors)<NEW_LINE>{<NEW_LINE>final EMailAddress from = email.getFrom();<NEW_LINE>final EMailAddress to = email.getTo();<NEW_LINE>// archive<NEW_LINE>archiveEventManager.// archive<NEW_LINE>fireEmailSent(// user<NEW_LINE>pdfArchive.getArchiveRecord(), // from<NEW_LINE>(UserEMailConfig) null, // to<NEW_LINE>from, // cc<NEW_LINE>to, // bcc<NEW_LINE>(EMailAddress) null, // status<NEW_LINE>(EMailAddress) null, ArchiveEmailSentStatus.ofEMailSentStatus(emailSentStatus));<NEW_LINE>}<NEW_LINE>//<NEW_LINE>// Update RfQ response (if success)<NEW_LINE>if (emailSentStatus.isSentOK()) {<NEW_LINE>rfqResponse.setDateInvited(new Timestamp(System.currentTimeMillis()));<NEW_LINE>InterfaceWrapperHelper.save(rfqResponse);<NEW_LINE>} else {<NEW_LINE>throw new RfQPublishException(request, emailSentStatus.getSentMsg());<NEW_LINE>}<NEW_LINE>}
message, mailTextBuilder.isHtml());
1,515,069
private void collect(Node node, StringBuilder prefix, Queue<String> queue) {<NEW_LINE>if (node == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (node.value != null) {<NEW_LINE>queue.<MASK><NEW_LINE>}<NEW_LINE>for (char nextChar = 0; nextChar < R; nextChar++) {<NEW_LINE>if (node.next[nextChar] != null) {<NEW_LINE>String nextNodeCharacters;<NEW_LINE>if (node.next[nextChar].characters != null) {<NEW_LINE>nextNodeCharacters = node.next[nextChar].characters;<NEW_LINE>} else {<NEW_LINE>nextNodeCharacters = String.valueOf(nextChar);<NEW_LINE>}<NEW_LINE>int nextNodeCharactersLength = nextNodeCharacters.length();<NEW_LINE>prefix.append(nextNodeCharacters);<NEW_LINE>collect(node.next[nextChar], prefix, queue);<NEW_LINE>prefix.delete(prefix.length() - nextNodeCharactersLength, prefix.length());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
enqueue(prefix.toString());
1,449,595
public void run() {<NEW_LINE>if (expand_stack_area.isDisposed()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (multi_selection_instance != null) {<NEW_LINE>multi_selection_instance<MASK><NEW_LINE>multi_selection_instance = null;<NEW_LINE>}<NEW_LINE>if (instances.size() == 1) {<NEW_LINE>OpenTorrentInstance first_instance = instances.get(0);<NEW_LINE>expand_stack.topControl = first_instance.getComposite();<NEW_LINE>expand_stack_area.layout(true);<NEW_LINE>first_instance.layout();<NEW_LINE>} else {<NEW_LINE>Composite expand_area = new Composite(expand_stack_area, SWT.NULL);<NEW_LINE>expand_area.setLayout(new FormLayout());<NEW_LINE>List<TorrentOpenOptions> toos = new ArrayList<>();<NEW_LINE>for (OpenTorrentInstance oti : instances) {<NEW_LINE>toos.add(oti.getOptions());<NEW_LINE>}<NEW_LINE>multi_selection_instance = new OpenTorrentInstance(expand_area, toos, optionListener);<NEW_LINE>multi_selection_instance.initialize();<NEW_LINE>expand_stack.topControl = multi_selection_instance.getComposite();<NEW_LINE>expand_stack_area.layout(true);<NEW_LINE>multi_selection_instance.layout();<NEW_LINE>}<NEW_LINE>}
.getComposite().dispose();
1,394,586
public void marshall(SearchProductsAsAdminRequest searchProductsAsAdminRequest, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (searchProductsAsAdminRequest == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(searchProductsAsAdminRequest.getAcceptLanguage(), ACCEPTLANGUAGE_BINDING);<NEW_LINE>protocolMarshaller.marshall(searchProductsAsAdminRequest.getPortfolioId(), PORTFOLIOID_BINDING);<NEW_LINE>protocolMarshaller.marshall(searchProductsAsAdminRequest.getFilters(), FILTERS_BINDING);<NEW_LINE>protocolMarshaller.marshall(<MASK><NEW_LINE>protocolMarshaller.marshall(searchProductsAsAdminRequest.getSortOrder(), SORTORDER_BINDING);<NEW_LINE>protocolMarshaller.marshall(searchProductsAsAdminRequest.getPageToken(), PAGETOKEN_BINDING);<NEW_LINE>protocolMarshaller.marshall(searchProductsAsAdminRequest.getPageSize(), PAGESIZE_BINDING);<NEW_LINE>protocolMarshaller.marshall(searchProductsAsAdminRequest.getProductSource(), PRODUCTSOURCE_BINDING);<NEW_LINE>} catch (Exception e) {<NEW_LINE>throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e);<NEW_LINE>}<NEW_LINE>}
searchProductsAsAdminRequest.getSortBy(), SORTBY_BINDING);
1,574,931
public void onMatch(RelOptRuleCall call) {<NEW_LINE>if (!call.getPlanner().getRelTraitDefs().contains(RelCollationTraitDef.INSTANCE)) {<NEW_LINE>// Collation is not an active trait.<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>final Sort sort = call.rel(0);<NEW_LINE>if (sort.offset != null || sort.fetch != null) {<NEW_LINE>// Don't remove sort if would also remove OFFSET or LIMIT.<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>// Express the "sortedness" requirement in terms of a collation trait and<NEW_LINE>// we can get rid of the sort. This allows us to use rels that just happen<NEW_LINE>// to be sorted but get the same effect.<NEW_LINE>final RelCollation collation = sort.getCollation();<NEW_LINE>assert collation == sort.getTraitSet().getTrait(RelCollationTraitDef.INSTANCE);<NEW_LINE>final RelTraitSet traits = sort.getInput().getTraitSet().replace(collation);<NEW_LINE>call.transformTo(convert(sort<MASK><NEW_LINE>}
.getInput(), traits));
612,366
public void execute(EditorAdaptor editorAdaptor) throws CommandExecutionException {<NEW_LINE>Selection selection = editorAdaptor.getSelection();<NEW_LINE>Position from = selection.getLeftBound();<NEW_LINE>Position to = selection.getRightBound();<NEW_LINE>TextContent modelContent = editorAdaptor.getModelContent();<NEW_LINE>int firstLineNo = modelContent.getLineInformationOfOffset(from.getModelOffset()).getNumber();<NEW_LINE>int lastLineNo = modelContent.getLineInformationOfOffset(to.<MASK><NEW_LINE>try {<NEW_LINE>editorAdaptor.getHistory().beginCompoundChange();<NEW_LINE>editorAdaptor.changeMode(NormalMode.NAME);<NEW_LINE>editorAdaptor.setPosition(from, StickyColumnPolicy.NEVER);<NEW_LINE>int length = 1 + lastLineNo - firstLineNo;<NEW_LINE>if (ContentType.LINES.equals(selection.getContentType(editorAdaptor.getConfiguration()))) {<NEW_LINE>length--;<NEW_LINE>}<NEW_LINE>JoinLinesCommand.doIt(editorAdaptor, Math.max(2, length), isSmart);<NEW_LINE>} finally {<NEW_LINE>editorAdaptor.getHistory().endCompoundChange();<NEW_LINE>}<NEW_LINE>}
getModelOffset()).getNumber();
1,371,190
public IMessage onMessage(PacketEnderGasConduit message, MessageContext ctx) {<NEW_LINE>EnderGasConduit conduit = message.getConduit(ctx);<NEW_LINE>if (conduit != null) {<NEW_LINE>conduit.setInputColor(message.dir, message.colIn);<NEW_LINE>conduit.setOutputColor(message.dir, message.colOut);<NEW_LINE>conduit.setOutputPriority(message.dir, message.priority);<NEW_LINE>conduit.setRoundRobinEnabled(message.dir, message.roundRobin);<NEW_LINE>conduit.setSelfFeedEnabled(<MASK><NEW_LINE>applyFilter(message.dir, conduit, message.inputFilter, true);<NEW_LINE>applyFilter(message.dir, conduit, message.outputFilter, false);<NEW_LINE>IBlockState bs = message.getWorld(ctx).getBlockState(message.getPos());<NEW_LINE>message.getWorld(ctx).notifyBlockUpdate(message.getPos(), bs, bs, 3);<NEW_LINE>}<NEW_LINE>return null;<NEW_LINE>}
message.dir, message.selfFeed);
318,273
private void createAdvertiseCallback() {<NEW_LINE>advertiseCallback = new AdvertiseCallback() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void onStartFailure(int errorCode) {<NEW_LINE>isAdvertising = false;<NEW_LINE>if (advertiseCallbackContext == null)<NEW_LINE>return;<NEW_LINE>JSONObject returnObj = new JSONObject();<NEW_LINE>addProperty(returnObj, keyError, "startAdvertising");<NEW_LINE>if (errorCode == AdvertiseCallback.ADVERTISE_FAILED_ALREADY_STARTED) {<NEW_LINE>addProperty(returnObj, keyMessage, "Already started");<NEW_LINE>} else if (errorCode == AdvertiseCallback.ADVERTISE_FAILED_DATA_TOO_LARGE) {<NEW_LINE><MASK><NEW_LINE>} else if (errorCode == AdvertiseCallback.ADVERTISE_FAILED_FEATURE_UNSUPPORTED) {<NEW_LINE>addProperty(returnObj, keyMessage, "Feature unsupported");<NEW_LINE>} else if (errorCode == AdvertiseCallback.ADVERTISE_FAILED_INTERNAL_ERROR) {<NEW_LINE>addProperty(returnObj, keyMessage, "Internal error");<NEW_LINE>} else if (errorCode == AdvertiseCallback.ADVERTISE_FAILED_TOO_MANY_ADVERTISERS) {<NEW_LINE>addProperty(returnObj, keyMessage, "Too many advertisers");<NEW_LINE>} else {<NEW_LINE>addProperty(returnObj, keyMessage, "Advertising error");<NEW_LINE>}<NEW_LINE>advertiseCallbackContext.error(returnObj);<NEW_LINE>advertiseCallbackContext = null;<NEW_LINE>}<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void onStartSuccess(AdvertiseSettings settingsInEffect) {<NEW_LINE>isAdvertising = true;<NEW_LINE>if (advertiseCallbackContext == null)<NEW_LINE>return;<NEW_LINE>JSONObject returnObj = new JSONObject();<NEW_LINE>addProperty(returnObj, "mode", settingsInEffect.getMode());<NEW_LINE>addProperty(returnObj, "timeout", settingsInEffect.getTimeout());<NEW_LINE>addProperty(returnObj, "txPowerLevel", settingsInEffect.getTxPowerLevel());<NEW_LINE>addProperty(returnObj, "isConnectable", settingsInEffect.isConnectable());<NEW_LINE>addProperty(returnObj, keyStatus, "advertisingStarted");<NEW_LINE>advertiseCallbackContext.success(returnObj);<NEW_LINE>advertiseCallbackContext = null;<NEW_LINE>}<NEW_LINE>};<NEW_LINE>}
addProperty(returnObj, keyMessage, "Too large data");
1,852,432
private void deleteSpecificServerRegistration(RESTRequest request, RESTResponse response) {<NEW_LINE>String source_objName = RESTHelper.getRequiredParam(request, APIConstants.PARAM_SOURCE_OBJNAME);<NEW_LINE>String listener_objName = RESTHelper.getRequiredParam(request, APIConstants.PARAM_LISTENER_OBJNAME);<NEW_LINE>String registrationID = RESTHelper.getRequiredParam(request, APIConstants.PARAM_REGISTRATIONID);<NEW_LINE>String clientIDString = RESTHelper.getRequiredParam(request, APIConstants.PARAM_CLIENTID);<NEW_LINE>int clientID = -1;<NEW_LINE>try {<NEW_LINE>clientID = Integer.parseInt(clientIDString);<NEW_LINE>} catch (NumberFormatException e) {<NEW_LINE>ErrorHelper.createRESTHandlerJsonException(e, null, APIConstants.STATUS_BAD_REQUEST);<NEW_LINE>}<NEW_LINE>// Get the converter<NEW_LINE><MASK><NEW_LINE>// We'll build the server registration ourselves<NEW_LINE>ServerNotificationRegistration serverNotificationRegistration = new ServerNotificationRegistration();<NEW_LINE>serverNotificationRegistration.objectName = RESTHelper.objectNameConverter(source_objName, true, converter);<NEW_LINE>serverNotificationRegistration.listener = RESTHelper.objectNameConverter(listener_objName, true, converter);<NEW_LINE>serverNotificationRegistration.operation = Operation.RemoveSpecific;<NEW_LINE>NotificationManager.getNotificationManager().deleteServerRegistrationHTTP(request, clientID, serverNotificationRegistration, registrationID, converter);<NEW_LINE>response.setStatus(APIConstants.STATUS_NO_CONTENT);<NEW_LINE>}
JSONConverter converter = JSONConverter.getConverter();
892,497
public void processElement(@FieldAccess("row") Row row, @Timestamp Instant t, BoundedWindow w, OutputReceiver<Row> r) throws InterruptedException {<NEW_LINE>Map<String, Value> columns = new HashMap<>();<NEW_LINE>for (int i : referencedColumns) {<NEW_LINE>final Field field = inputSchema.getField(i);<NEW_LINE>columns.put(columnName(i), ZetaSqlBeamTranslationUtils.toZetaSqlValue(row.getBaseValue(field.getName(), Object.class), field.getType()));<NEW_LINE>}<NEW_LINE>@NonNull<NEW_LINE>Future<Value> valueFuture = checkArgumentNotNull(stream).execute(columns, nullParams);<NEW_LINE>@Nullable<NEW_LINE>Queue<TimestampedFuture> pendingWindow = pending.get(w);<NEW_LINE>if (pendingWindow == null) {<NEW_LINE>pendingWindow = new ArrayDeque<>();<NEW_LINE>pending.put(w, pendingWindow);<NEW_LINE>}<NEW_LINE>pendingWindow.add(TimestampedFuture<MASK><NEW_LINE>while ((!pendingWindow.isEmpty() && pendingWindow.element().future().isDone()) || pendingWindow.size() > MAX_PENDING_WINDOW) {<NEW_LINE>outputRow(pendingWindow.remove(), r);<NEW_LINE>}<NEW_LINE>}
.create(t, valueFuture));
784,342
private void init() {<NEW_LINE>int row = 0;<NEW_LINE>addLabelled("Width", tfRegionWidth, 0, row++, "Define region width");<NEW_LINE>addLabelled("Height", tfRegionHeight<MASK><NEW_LINE>addLabelled("Size units", comboUnits, 0, row++, "Choose the units used to define the region width & height");<NEW_LINE>addLabelled("Classification", comboClassification, 0, row++, "Choose the default classification to be applied to the region");<NEW_LINE>if (qupath.getImageData() == null || !qupath.getImageData().getServer().getPixelCalibration().hasPixelSizeMicrons())<NEW_LINE>comboUnits.getSelectionModel().select(RegionUnits.PIXELS);<NEW_LINE>else<NEW_LINE>comboUnits.getSelectionModel().select(RegionUnits.MICRONS);<NEW_LINE>comboClassification.setItems(qupath.getAvailablePathClasses());<NEW_LINE>if (comboClassification.getItems().contains(PathClassFactory.getPathClass(StandardPathClasses.REGION)))<NEW_LINE>comboClassification.getSelectionModel().select(PathClassFactory.getPathClass(StandardPathClasses.REGION));<NEW_LINE>else<NEW_LINE>comboClassification.getSelectionModel().select(PathClassFactory.getPathClassUnclassified());<NEW_LINE>comboLocation.getItems().setAll(RegionLocation.values());<NEW_LINE>comboLocation.getSelectionModel().select(RegionLocation.VIEW_CENTER);<NEW_LINE>addLabelled("Location", comboLocation, 0, row++, "Choose the default location for the region");<NEW_LINE>Button btnCreateAnnotation = new Button("Create region");<NEW_LINE>btnCreateAnnotation.setOnAction(e -> createAndAddRegion());<NEW_LINE>pane.add(btnCreateAnnotation, 0, row++, 2, 1);<NEW_LINE>pane.setVgap(5);<NEW_LINE>pane.setHgap(5);<NEW_LINE>pane.setPadding(new Insets(10));<NEW_LINE>// Set max values to aid resizing<NEW_LINE>btnCreateAnnotation.setMaxWidth(Double.MAX_VALUE);<NEW_LINE>comboClassification.setMaxWidth(Double.MAX_VALUE);<NEW_LINE>comboLocation.setMaxWidth(Double.MAX_VALUE);<NEW_LINE>comboUnits.setMaxWidth(Double.MAX_VALUE);<NEW_LINE>}
, 0, row++, "Define region height");
902,872
private boolean checkNonJsr109Valid(WizardDescriptor wizardDescriptor) {<NEW_LINE>ProjectInfo pInfo = new ProjectInfo(project);<NEW_LINE>// javase client should be source level 1.4 or higher<NEW_LINE>// other types of projects should have source level 1.5 or higher<NEW_LINE>if (pInfo.getProjectType() != ProjectInfo.JSE_PROJECT_TYPE) {<NEW_LINE>J2eePlatform j2eePlatform = getJ2eePlatform(project);<NEW_LINE>if (j2eePlatform != null) {<NEW_LINE>WSStackUtils stackUtils = new WSStackUtils(project);<NEW_LINE><MASK><NEW_LINE>boolean jsr109oldSupported = stackUtils.isJsr109OldSupported();<NEW_LINE>// boolean jwsdpSupported = isJwsdpSupported(project);<NEW_LINE>boolean jaxWsInJ2ee14Supported = ServerType.JBOSS == WSStackUtils.getServerType(project);<NEW_LINE>if ((!jsr109Supported && !jsr109oldSupported) || jaxWsInJ2ee14Supported || (!jsr109Supported && jsr109oldSupported)) {<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return true;<NEW_LINE>}
boolean jsr109Supported = stackUtils.isJsr109Supported();
1,566,289
private void parseDialogueLine(String dialogueLine, SsaDialogueFormat format, List<List<Cue>> cues, List<Long> cueTimesUs) {<NEW_LINE>Assertions.checkArgument(dialogueLine.startsWith(DIALOGUE_LINE_PREFIX));<NEW_LINE>String[] lineValues = dialogueLine.substring(DIALOGUE_LINE_PREFIX.length()).split(",", format.length);<NEW_LINE>if (lineValues.length != format.length) {<NEW_LINE>Log.w(TAG, "Skipping dialogue line with fewer columns than format: " + dialogueLine);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>long startTimeUs = parseTimecodeUs(lineValues[format.startTimeIndex]);<NEW_LINE>if (startTimeUs == C.TIME_UNSET) {<NEW_LINE>Log.w(TAG, "Skipping invalid timing: " + dialogueLine);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>long endTimeUs = parseTimecodeUs(lineValues[format.endTimeIndex]);<NEW_LINE>if (endTimeUs == C.TIME_UNSET) {<NEW_LINE>Log.w(TAG, "Skipping invalid timing: " + dialogueLine);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>@Nullable<NEW_LINE>SsaStyle style = styles != null && format.styleIndex != C.INDEX_UNSET ? styles.get(lineValues[format.styleIndex].trim()) : null;<NEW_LINE>String <MASK><NEW_LINE>SsaStyle.Overrides styleOverrides = SsaStyle.Overrides.parseFromDialogue(rawText);<NEW_LINE>String text = SsaStyle.Overrides.stripStyleOverrides(rawText).replace("\\N", "\n").replace("\\n", "\n").replace("\\h", "\u00A0");<NEW_LINE>Cue cue = createCue(text, style, styleOverrides, screenWidth, screenHeight);<NEW_LINE>int startTimeIndex = addCuePlacerholderByTime(startTimeUs, cueTimesUs, cues);<NEW_LINE>int endTimeIndex = addCuePlacerholderByTime(endTimeUs, cueTimesUs, cues);<NEW_LINE>// Iterate on cues from startTimeIndex until endTimeIndex, adding the current cue.<NEW_LINE>for (int i = startTimeIndex; i < endTimeIndex; i++) {<NEW_LINE>cues.get(i).add(cue);<NEW_LINE>}<NEW_LINE>}
rawText = lineValues[format.textIndex];
297,346
// GEN-LAST:event_jButtonPrjLocationActionPerformed<NEW_LINE>private void jButtonSrcLocationActionPerformed(java.awt.event.ActionEvent evt) {<NEW_LINE>// GEN-FIRST:event_jButtonSrcLocationActionPerformed<NEW_LINE>JFileChooser chooser = new JFileChooser();<NEW_LINE>chooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);<NEW_LINE>chooser.setDialogTitle(NbBundle.getMessage(ProjectImportLocationPanel.class, "LBL_IW_BrowseExistingSource"));<NEW_LINE>if (moduleLocationTextField.getText().length() > 0 && getProjectLocation().exists()) {<NEW_LINE>chooser.setSelectedFile(getProjectLocation());<NEW_LINE>} else {<NEW_LINE>// honor the contract in issue 58987<NEW_LINE>File currentDirectory = null;<NEW_LINE>FileObject existingSourcesFO = Templates.getExistingSourcesFolder(wizardDescriptor);<NEW_LINE>if (existingSourcesFO != null) {<NEW_LINE>File <MASK><NEW_LINE>if (existingSourcesFile != null && existingSourcesFile.isDirectory()) {<NEW_LINE>currentDirectory = existingSourcesFile;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (currentDirectory != null) {<NEW_LINE>chooser.setCurrentDirectory(currentDirectory);<NEW_LINE>} else {<NEW_LINE>File lastUsedImportLoc = UserProjectSettings.getDefault().getLastUsedImportLocation();<NEW_LINE>if (lastUsedImportLoc != null)<NEW_LINE>chooser.setCurrentDirectory(lastUsedImportLoc.getParentFile());<NEW_LINE>else<NEW_LINE>chooser.setSelectedFile(ProjectChooser.getProjectsFolder());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (JFileChooser.APPROVE_OPTION == chooser.showOpenDialog(this)) {<NEW_LINE>File projectDir = FileUtil.normalizeFile(chooser.getSelectedFile());<NEW_LINE>moduleLocationTextField.setText(projectDir.getAbsolutePath());<NEW_LINE>}<NEW_LINE>}
existingSourcesFile = FileUtil.toFile(existingSourcesFO);
762,939
public static void updateAuthConfigObj(UUID universeUUID, UUID configUUID, VaultSecretEngineBase engine, ObjectNode authConfig) {<NEW_LINE>LOG.debug("updateAuthConfigObj called for {} - {}", universeUUID.toString(), configUUID.toString());<NEW_LINE>try {<NEW_LINE>long existingTTL = -1, existingTTLExpiry = -1;<NEW_LINE>try {<NEW_LINE>existingTTL = Long.valueOf(authConfig.get(HashicorpVaultConfigParams.HC_VAULT_TTL).asText());<NEW_LINE>existingTTLExpiry = Long.valueOf(authConfig.get(HashicorpVaultConfigParams.HC_VAULT_TTL_EXPIRY).asText());<NEW_LINE>} catch (Exception e) {<NEW_LINE>LOG.debug("Error fetching the vaules, updating ttl anyways");<NEW_LINE>}<NEW_LINE>List<Object> ttlInfo = engine.getTTL();<NEW_LINE>if ((long) ttlInfo.get(0) == existingTTL && existingTTL == 0) {<NEW_LINE>LOG.debug("Token never expires");<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if ((long) ttlInfo.get(1) == existingTTLExpiry) {<NEW_LINE>LOG.debug("Token properties are not changed");<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>LOG.debug("Updating HC_VAULT_TTL_EXPIRY for Decrypt with {} and {}", ttlInfo.get(0)<MASK><NEW_LINE>authConfig.put(HashicorpVaultConfigParams.HC_VAULT_TTL, (long) ttlInfo.get(0));<NEW_LINE>authConfig.put(HashicorpVaultConfigParams.HC_VAULT_TTL_EXPIRY, (long) ttlInfo.get(1));<NEW_LINE>} catch (Exception e) {<NEW_LINE>LOG.error("Unable to update TTL of token into authConfig, it will not reflect on UI", e);<NEW_LINE>}<NEW_LINE>}
, ttlInfo.get(1));
1,132,369
final GetApplicationComponentStrategiesResult executeGetApplicationComponentStrategies(GetApplicationComponentStrategiesRequest getApplicationComponentStrategiesRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(getApplicationComponentStrategiesRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<GetApplicationComponentStrategiesRequest> request = null;<NEW_LINE>Response<GetApplicationComponentStrategiesResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new GetApplicationComponentStrategiesRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(getApplicationComponentStrategiesRequest));<NEW_LINE>// Binds the request metrics to the current request.<NEW_LINE>request.setAWSRequestMetrics(awsRequestMetrics);<NEW_LINE>request.<MASK><NEW_LINE>request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SERVICE_ID, "MigrationHubStrategy");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "GetApplicationComponentStrategies");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<GetApplicationComponentStrategiesResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new GetApplicationComponentStrategiesResultJsonUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
1,125,555
public void collectGarbage(Long ttl) {<NEW_LINE>if (ttl != null && ttl > 0) {<NEW_LINE>long collectTime = System.currentTimeMillis() - ttl;<NEW_LINE>if (crdt != null && crdt.getTombstones() != null) {<NEW_LINE>Set<NitriteId> <MASK><NEW_LINE>for (Pair<NitriteId, Long> entry : crdt.getTombstones().entries()) {<NEW_LINE>if (entry.getSecond() < collectTime) {<NEW_LINE>removeSet.add(entry.getFirst());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>Receipt garbage = new Receipt();<NEW_LINE>for (NitriteId nitriteId : removeSet) {<NEW_LINE>crdt.getTombstones().remove(nitriteId);<NEW_LINE>garbage.getRemoved().add(nitriteId.getIdValue());<NEW_LINE>}<NEW_LINE>feedJournal.accumulate(garbage);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
removeSet = new HashSet<>();
830,729
public void updateRoute(RotatedTileBox tb, TransportRouteResult route) {<NEW_LINE>if (tb.getMapDensity() != getMapDensity() || this.route != route) {<NEW_LINE>this.route = route;<NEW_LINE>List<Location> locations;<NEW_LINE>Map<Integer, GeometryWayStyle<?>> styleMap;<NEW_LINE>if (route == null) {<NEW_LINE>locations = Collections.emptyList();<NEW_LINE>styleMap = Collections.emptyMap();<NEW_LINE>} else {<NEW_LINE>LatLon start = transportHelper.getStartLocation();<NEW_LINE>LatLon end = transportHelper.getEndLocation();<NEW_LINE>List<Way> list = new ArrayList<>();<NEW_LINE>List<GeometryWayStyle<?>> styles = new ArrayList<>();<NEW_LINE>calculateTransportResult(start, end, route, list, styles);<NEW_LINE>List<Location> locs = new ArrayList<>();<NEW_LINE>Map<Integer, GeometryWayStyle<?>> stlMap = new TreeMap<>();<NEW_LINE>int i = 0;<NEW_LINE>int k = 0;<NEW_LINE>if (list.size() > 0) {<NEW_LINE>for (Way w : list) {<NEW_LINE>stlMap.put(k, styles.get(i++));<NEW_LINE>for (Node n : w.getNodes()) {<NEW_LINE>Location ln = new Location("");<NEW_LINE>ln.setLatitude(n.getLatitude());<NEW_LINE>ln.<MASK><NEW_LINE>locs.add(ln);<NEW_LINE>k++;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>locations = locs;<NEW_LINE>styleMap = stlMap;<NEW_LINE>}<NEW_LINE>updateWay(locations, styleMap, tb);<NEW_LINE>}<NEW_LINE>}
setLongitude(n.getLongitude());
221,138
public static GetMetaProductListResponse unmarshall(GetMetaProductListResponse getMetaProductListResponse, UnmarshallerContext _ctx) {<NEW_LINE>getMetaProductListResponse.setRequestId(_ctx.stringValue("GetMetaProductListResponse.RequestId"));<NEW_LINE>getMetaProductListResponse.setSuccess(_ctx.booleanValue("GetMetaProductListResponse.Success"));<NEW_LINE>getMetaProductListResponse.setCode(_ctx.integerValue("GetMetaProductListResponse.Code"));<NEW_LINE>getMetaProductListResponse.setMessage(_ctx.stringValue("GetMetaProductListResponse.Message"));<NEW_LINE>MetaData metaData = new MetaData();<NEW_LINE>metaData.setNames(_ctx.mapValue("GetMetaProductListResponse.MetaData.Names"));<NEW_LINE>List<SpecVO> productsNormal = new ArrayList<SpecVO>();<NEW_LINE>for (int i = 0; i < _ctx.lengthValue("GetMetaProductListResponse.MetaData.ProductsNormal.Length"); i++) {<NEW_LINE>SpecVO specVO = new SpecVO();<NEW_LINE>specVO.setRegionId(_ctx.stringValue("GetMetaProductListResponse.MetaData.ProductsNormal[" + i + "].RegionId"));<NEW_LINE>specVO.setSpecType(_ctx.stringValue("GetMetaProductListResponse.MetaData.ProductsNormal[" + i + "].SpecType"));<NEW_LINE>specVO.setIoMax(_ctx.longValue("GetMetaProductListResponse.MetaData.ProductsNormal[" + i + "].IoMax"));<NEW_LINE>specVO.setDiskType(_ctx.stringValue("GetMetaProductListResponse.MetaData.ProductsNormal[" + i + "].DiskType"));<NEW_LINE>specVO.setDiskSize(_ctx.stringValue("GetMetaProductListResponse.MetaData.ProductsNormal[" + i + "].DiskSize"));<NEW_LINE>specVO.setTopicQuota(_ctx.stringValue("GetMetaProductListResponse.MetaData.ProductsNormal[" + i + "].TopicQuota"));<NEW_LINE>specVO.setDeployType(_ctx.stringValue("GetMetaProductListResponse.MetaData.ProductsNormal[" + i + "].DeployType"));<NEW_LINE>productsNormal.add(specVO);<NEW_LINE>}<NEW_LINE>metaData.setProductsNormal(productsNormal);<NEW_LINE>List<SpecVO> productsProfessional = new ArrayList<SpecVO>();<NEW_LINE>for (int i = 0; i < _ctx.lengthValue("GetMetaProductListResponse.MetaData.ProductsProfessional.Length"); i++) {<NEW_LINE>SpecVO specVO_ = new SpecVO();<NEW_LINE>specVO_.setRegionId(_ctx.stringValue("GetMetaProductListResponse.MetaData.ProductsProfessional[" + i + "].RegionId"));<NEW_LINE>specVO_.setSpecType(_ctx.stringValue("GetMetaProductListResponse.MetaData.ProductsProfessional[" + i + "].SpecType"));<NEW_LINE>specVO_.setIoMax(_ctx.longValue("GetMetaProductListResponse.MetaData.ProductsProfessional[" + i + "].IoMax"));<NEW_LINE>specVO_.setDiskType(_ctx.stringValue("GetMetaProductListResponse.MetaData.ProductsProfessional[" + i + "].DiskType"));<NEW_LINE>specVO_.setDiskSize(_ctx.stringValue("GetMetaProductListResponse.MetaData.ProductsProfessional[" + i + "].DiskSize"));<NEW_LINE>specVO_.setTopicQuota(_ctx.stringValue<MASK><NEW_LINE>specVO_.setDeployType(_ctx.stringValue("GetMetaProductListResponse.MetaData.ProductsProfessional[" + i + "].DeployType"));<NEW_LINE>productsProfessional.add(specVO_);<NEW_LINE>}<NEW_LINE>metaData.setProductsProfessional(productsProfessional);<NEW_LINE>getMetaProductListResponse.setMetaData(metaData);<NEW_LINE>return getMetaProductListResponse;<NEW_LINE>}
("GetMetaProductListResponse.MetaData.ProductsProfessional[" + i + "].TopicQuota"));
26,023
public void store(CrawlURI curi) {<NEW_LINE>if (!curi.hasContentDigestHistory() || curi.getContentDigestHistory().isEmpty()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>Map<String, Object> hist = curi.getContentDigestHistory();<NEW_LINE>try {<NEW_LINE>String digestKey = persistKeyFor(curi);<NEW_LINE>Object url = hist.get(A_ORIGINAL_URL);<NEW_LINE>Object date = hist.get(A_ORIGINAL_DATE);<NEW_LINE>Object recordId = hist.get(A_WARC_RECORD_ID);<NEW_LINE>Object[] values = new Object[] { digestKey, url, date, recordId };<NEW_LINE>troughClient().write(getSegmentId(<MASK><NEW_LINE>} catch (Exception e) {<NEW_LINE>logger.log(Level.WARNING, "problem writing dedup info to trough segment " + getSegmentId() + " for url " + curi, e);<NEW_LINE>}<NEW_LINE>}
), WRITE_SQL_TMPL, values, SCHEMA_ID);
167,784
public void validateJavaBean(Object bean, String rarName) {<NEW_LINE>if (bean != null) {<NEW_LINE>Validator validator = getBeanValidator(rarName);<NEW_LINE>if (validator != null) {<NEW_LINE>BeanDescriptor bd = validator.getConstraintsForClass(bean.getClass());<NEW_LINE>bd.getConstraintDescriptors();<NEW_LINE>Class[] array = new Class[] {};<NEW_LINE>Set constraintViolations = validator.validate(bean, array);<NEW_LINE>if (constraintViolations != null && constraintViolations.size() > 0) {<NEW_LINE><MASK><NEW_LINE>StringBuilder msg = new StringBuilder();<NEW_LINE>Iterator it = constraintViolations.iterator();<NEW_LINE>while (it.hasNext()) {<NEW_LINE>ConstraintViolation cv = (ConstraintViolation) it.next();<NEW_LINE>msg.append("\n Bean Class : ").append(cv.getRootBeanClass());<NEW_LINE>msg.append("\n Bean : ").append(cv.getRootBean());<NEW_LINE>msg.append("\n Property path : ").append(cv.getPropertyPath());<NEW_LINE>msg.append("\n Violation Message : ").append(cv.getMessage());<NEW_LINE>}<NEW_LINE>Object[] args = new Object[] { bean.getClass(), rarName, msg.toString() };<NEW_LINE>_logger.log(Level.SEVERE, "validation.constraints.violation", args);<NEW_LINE>throw cve;<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>if (_logger.isLoggable(Level.FINEST)) {<NEW_LINE>_logger.log(Level.FINEST, "No Bean Validator is available for RAR [ " + rarName + " ]");<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
ConstraintViolationException cve = new ConstraintViolationException(constraintViolations);
1,155,066
protected void exportDefinition(HttpServletResponse response, AbstractModel definitionModel, DmnJsonConverterContext converterContext) {<NEW_LINE>try {<NEW_LINE>JsonNode editorJsonNode = objectMapper.<MASK><NEW_LINE>// URLEncoder.encode will replace spaces with '+', to keep the actual name replacing '+' to '%20'<NEW_LINE>String fileName = URLEncoder.encode(definitionModel.getName(), "UTF-8").replaceAll("\\+", "%20") + ".dmn";<NEW_LINE>response.setHeader("Content-Disposition", "attachment; filename*=UTF-8''" + fileName);<NEW_LINE>ServletOutputStream servletOutputStream = response.getOutputStream();<NEW_LINE>response.setContentType("application/xml");<NEW_LINE>DmnDefinition dmnDefinition = dmnJsonConverter.convertToDmn(editorJsonNode, definitionModel.getId(), converterContext);<NEW_LINE>byte[] xmlBytes = dmnXmlConverter.convertToXML(dmnDefinition);<NEW_LINE>BufferedInputStream in = new BufferedInputStream(new ByteArrayInputStream(xmlBytes));<NEW_LINE>byte[] buffer = new byte[8096];<NEW_LINE>while (true) {<NEW_LINE>int count = in.read(buffer);<NEW_LINE>if (count == -1)<NEW_LINE>break;<NEW_LINE>servletOutputStream.write(buffer, 0, count);<NEW_LINE>}<NEW_LINE>// Flush and close stream<NEW_LINE>servletOutputStream.flush();<NEW_LINE>servletOutputStream.close();<NEW_LINE>} catch (Exception e) {<NEW_LINE>LOGGER.error("Could not export decision table model", e);<NEW_LINE>throw new InternalServerErrorException("Could not export decision table model");<NEW_LINE>}<NEW_LINE>}
readTree(definitionModel.getModelEditorJson());
1,013,919
private void resolveWarnings(Generation gen, StringBuilder messages, SpringVersionInfo versionInfo) {<NEW_LINE>if (isInGeneration(versionInfo.getMajMin(), gen)) {<NEW_LINE>Date currentDate = new <MASK><NEW_LINE>Date ossEndDate = Date.valueOf(gen.getOssSupportEndDate());<NEW_LINE>Date commercialEndDate = Date.valueOf(gen.getCommercialSupportEndDate());<NEW_LINE>messages.append("Using ");<NEW_LINE>messages.append(versionInfo.getSlug());<NEW_LINE>messages.append(" version: ");<NEW_LINE>messages.append(versionInfo.getFullVersion());<NEW_LINE>if (currentDate.after(ossEndDate)) {<NEW_LINE>messages.append(" - OSS has ended on: ");<NEW_LINE>messages.append(gen.getOssSupportEndDate());<NEW_LINE>}<NEW_LINE>if (currentDate.after(commercialEndDate)) {<NEW_LINE>messages.append(" - Commercial support has ended on: ");<NEW_LINE>messages.append(gen.getCommercialSupportEndDate());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
Date(System.currentTimeMillis());
1,529,795
// Recursively creates all tree nodes for the given base type instance.<NEW_LINE>private void createTypeNodes(final DefaultMutableTreeNode currentNode, final BaseType baseType) {<NEW_LINE>if (baseType.getCategory() == BaseTypeCategory.ARRAY) {<NEW_LINE>// Array types are special in the sense that the nested member that represents the array<NEW_LINE>// elements should not have corresponding nodes in the tree model. Thus, we simply return here<NEW_LINE>// without creating that member node.<NEW_LINE>return;<NEW_LINE>} else {<NEW_LINE>for (final TypeMember member : baseType) {<NEW_LINE>switch(member.getBaseType().getCategory()) {<NEW_LINE>case ARRAY:<NEW_LINE>case ATOMIC:<NEW_LINE>case POINTER:<NEW_LINE>final TypeMemberTreeNode memberNode = new TypeMemberTreeNode(member);<NEW_LINE>currentNode.add(memberNode);<NEW_LINE><MASK><NEW_LINE>break;<NEW_LINE>case FUNCTION_PROTOTYPE:<NEW_LINE>break;<NEW_LINE>case STRUCT:<NEW_LINE>case UNION:<NEW_LINE>// This member has a base type that itself has multiple members: we need to go deeper!<NEW_LINE>final TypeMemberTreeNode nestedNode = new TypeMemberTreeNode(member);<NEW_LINE>memberNodes.put(member, nestedNode);<NEW_LINE>nestedStructNodes.put(member.getBaseType(), nestedNode);<NEW_LINE>currentNode.add(nestedNode);<NEW_LINE>createTypeNodes(nestedNode, member.getBaseType());<NEW_LINE>break;<NEW_LINE>default:<NEW_LINE>NaviLogger.warning("Unknown type category: %d", member.getBaseType().getCategory());<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
memberNodes.put(member, memberNode);
1,208,934
public static Map<String, String> parseModuleWrappers(List<String> specs, Iterable<JSChunk> chunks) {<NEW_LINE>checkState(specs != null);<NEW_LINE>Map<String, String> wrappers = new HashMap<>();<NEW_LINE>// Prepopulate the map with module names.<NEW_LINE>for (JSChunk c : chunks) {<NEW_LINE>wrappers.put(c.getName(), "");<NEW_LINE>}<NEW_LINE>for (String spec : specs) {<NEW_LINE>// Format is "<name>:<wrapper>".<NEW_LINE>int pos = spec.indexOf(':');<NEW_LINE>if (pos == -1) {<NEW_LINE>throw new FlagUsageException("Expected module wrapper to have " + "<name>:<wrapper> format: " + spec);<NEW_LINE>}<NEW_LINE>// Parse module name.<NEW_LINE>String name = spec.substring(0, pos);<NEW_LINE>if (!wrappers.containsKey(name)) {<NEW_LINE>throw new FlagUsageException("Unknown module: '" + name + "'");<NEW_LINE>}<NEW_LINE>String wrapper = <MASK><NEW_LINE>// Support for %n% and %output%<NEW_LINE>wrapper = wrapper.replace("%output%", "%s").replace("%n%", "\n");<NEW_LINE>if (!wrapper.contains("%s")) {<NEW_LINE>throw new FlagUsageException("No %s placeholder in module wrapper: '" + wrapper + "'");<NEW_LINE>}<NEW_LINE>wrappers.put(name, wrapper);<NEW_LINE>}<NEW_LINE>return wrappers;<NEW_LINE>}
spec.substring(pos + 1);
1,642,975
private void debugInstructionBitsDecision(SleighDebugLogger debug, ParserWalker walker, int val) {<NEW_LINE>if (debug == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>int offset = walker.getOffset(-1);<NEW_LINE>int mask = (-1 << (32 - bitsize)) >>> startbit;<NEW_LINE>debug.addInstructionPattern(offset, new PatternBlock(0, mask, val));<NEW_LINE>if (!debug.isVerboseEnabled()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>MemBuffer memBuf = walker.getParserContext().getMemBuffer();<NEW_LINE>int unitSize = memBuf.getAddress().getAddressSpace().getAddressableUnitSize();<NEW_LINE>int byteCnt = offset + ((startbit <MASK><NEW_LINE>int wordCnt = (byteCnt + unitSize - 1) / unitSize;<NEW_LINE>byte[] bytes = new byte[wordCnt * unitSize];<NEW_LINE>memBuf.getBytes(bytes, 0);<NEW_LINE>debug.append("decide on instruction bits: byte-offset=" + offset + ", bitrange=(" + startbit + "," + (startbit + bitsize - 1) + "), value=0x" + Integer.toHexString(val) + ", bytes=");<NEW_LINE>debug.append(bytes, (offset * 8) + startbit, bitsize);<NEW_LINE>debug.append("\n");<NEW_LINE>debugDumpDecendentConstructors(debug, children[val]);<NEW_LINE>}
+ bitsize + 7) / 8);
59,577
private ClientLifecycleEventListener updateAndGetEventListener() {<NEW_LINE>boolean contains = false;<NEW_LINE>ClientLifecycleEventListener eventListener = null;<NEW_LINE>for (final Map.Entry<String, ClientLifecycleEventListener> pluginEventListenerEntry : eventListeners.getPluginEventListenersMap().entrySet()) {<NEW_LINE>final String id = pluginEventListenerEntry.getKey();<NEW_LINE>final ClientLifecycleEventListener listener = pluginEventListenerEntry.getValue();<NEW_LINE>if (listener.getClass().getClassLoader().equals(eventListenerProvider.getClass().getClassLoader()) && id.equals(pluginId)) {<NEW_LINE>contains = true;<NEW_LINE>eventListener = listener;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (!contains) {<NEW_LINE>try {<NEW_LINE><MASK><NEW_LINE>if (eventListener != null) {<NEW_LINE>eventListeners.put(pluginId, eventListener);<NEW_LINE>}<NEW_LINE>} catch (final Throwable t) {<NEW_LINE>log.warn("Uncaught exception was thrown from extension with id \"{}\" in client lifecycle event listener provider. " + "Extensions are responsible on their own to handle exceptions.", pluginId, t);<NEW_LINE>Exceptions.rethrowError(t);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return eventListener;<NEW_LINE>}
eventListener = eventListenerProvider.getClientLifecycleEventListener(eventListenerProviderInput);
1,834,718
private final static void transformNormal(final float[] values, final int offset, final int size, Matrix3 transform) {<NEW_LINE>if (size > 2) {<NEW_LINE>vTmp.set(values[offset], values[offset + 1], values[offset + 2]).mul(transform).nor();<NEW_LINE>values[offset] = vTmp.x;<NEW_LINE>values[offset + 1] = vTmp.y;<NEW_LINE>values[offset + 2] = vTmp.z;<NEW_LINE>} else if (size > 1) {<NEW_LINE>vTmp.set(values[offset], values[offset + 1], 0).<MASK><NEW_LINE>values[offset] = vTmp.x;<NEW_LINE>values[offset + 1] = vTmp.y;<NEW_LINE>} else<NEW_LINE>values[offset] = vTmp.set(values[offset], 0, 0).mul(transform).nor().x;<NEW_LINE>}
mul(transform).nor();
344,879
public BigDecimal generate(SourceOfRandomness random, GenerationStatus status) {<NEW_LINE>BigDecimal minToUse = min;<NEW_LINE>BigDecimal maxToUse = max;<NEW_LINE>int power = status.size() + 1;<NEW_LINE>if (minToUse == null && maxToUse == null) {<NEW_LINE>maxToUse = TEN.pow(power);<NEW_LINE>minToUse = maxToUse.negate();<NEW_LINE>}<NEW_LINE>if (minToUse == null)<NEW_LINE>minToUse = maxToUse.subtract(TEN.pow(power));<NEW_LINE>else if (maxToUse == null)<NEW_LINE>maxToUse = minToUse.add(TEN.pow(power));<NEW_LINE>int scale = decideScale();<NEW_LINE>BigDecimal minShifted = minToUse.movePointRight(scale);<NEW_LINE>BigDecimal maxShifted = maxToUse.movePointRight(scale);<NEW_LINE>BigInteger range = maxShifted.toBigInteger().subtract(minShifted.toBigInteger());<NEW_LINE>BigInteger generated;<NEW_LINE>do {<NEW_LINE>generated = random.nextBigInteger(range.bitLength());<NEW_LINE>} while (generated<MASK><NEW_LINE>return minShifted.add(new BigDecimal(generated)).movePointLeft(scale);<NEW_LINE>}
.compareTo(range) >= 0);
1,190,270
protected Object[] asArray() {<NEW_LINE>E.checkState(!StringUtils.isEmpty(this.name), "The name of project can't be null");<NEW_LINE>E.checkState(this.adminGroupId != null, "The admin group id of project '%s' can't be null", this.name);<NEW_LINE>E.checkState(this.opGroupId != null, "The op group id of project '%s' can't be null", this.name);<NEW_LINE>List<Object> list = new ArrayList<>(16);<NEW_LINE>list.add(T.label);<NEW_LINE>list.add(HugeProject.P.PROJECT);<NEW_LINE>list.add(HugeProject.P.NAME);<NEW_LINE>list.add(this.name);<NEW_LINE>if (!StringUtils.isEmpty(this.description)) {<NEW_LINE>list.add(HugeProject.P.DESCRIPTIONS);<NEW_LINE>list.add(this.description);<NEW_LINE>}<NEW_LINE>if (this.graphs != null && !this.graphs.isEmpty()) {<NEW_LINE>list.add(HugeProject.P.GRAPHS);<NEW_LINE>list.add(this.graphs);<NEW_LINE>}<NEW_LINE>list.add(HugeProject.P.ADMIN_GROUP);<NEW_LINE>list.add(this.adminGroupId.toString());<NEW_LINE>list.add(HugeProject.P.OP_GROUP);<NEW_LINE>list.add(<MASK><NEW_LINE>if (this.targetId != null) {<NEW_LINE>list.add(HugeProject.P.TARGET);<NEW_LINE>list.add(this.targetId.toString());<NEW_LINE>}<NEW_LINE>return super.asArray(list);<NEW_LINE>}
this.opGroupId.toString());
413,318
final TagCertificateAuthorityResult executeTagCertificateAuthority(TagCertificateAuthorityRequest tagCertificateAuthorityRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(tagCertificateAuthorityRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<TagCertificateAuthorityRequest> request = null;<NEW_LINE>Response<TagCertificateAuthorityResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new TagCertificateAuthorityRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(tagCertificateAuthorityRequest));<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, "ACM PCA");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "TagCertificateAuthority");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<TagCertificateAuthorityResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new TagCertificateAuthorityResultJsonUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
562,805
public int compareTo(SourceContact o) {<NEW_LINE>SourceContact target = o;<NEW_LINE>int comparePresence = 0;<NEW_LINE>if (getPresenceStatus() != null && target.getPresenceStatus() != null) {<NEW_LINE>int isOnline = (getPresenceStatus().isOnline()) ? 1 : 0;<NEW_LINE>int targetIsOnline = (target.getPresenceStatus().<MASK><NEW_LINE>comparePresence = ((10 - isOnline) - (10 - targetIsOnline));<NEW_LINE>}<NEW_LINE>int compareDDetails = 0;<NEW_LINE>if (getDisplayDetails() != null && target.getDisplayDetails() != null) {<NEW_LINE>compareDDetails = getDisplayDetails().compareToIgnoreCase(target.getDisplayDetails());<NEW_LINE>}<NEW_LINE>return comparePresence * 100000000 + getDisplayName().compareToIgnoreCase(target.getDisplayName()) * 10000 + compareDDetails * 100 + String.valueOf(hashCode()).compareToIgnoreCase(String.valueOf(o.hashCode()));<NEW_LINE>}
isOnline()) ? 1 : 0;
1,750,968
public static void planarToBuffered_U8(Planar<GrayU8> src, DataBufferInt buffer, WritableRaster dst) {<NEW_LINE>if (src.getNumBands() != dst.getNumBands())<NEW_LINE>throw new IllegalArgumentException("Unequal number of bands src = " + src.getNumBands() + " dst = " + dst.getNumBands());<NEW_LINE>final int[] dstData = buffer.getData();<NEW_LINE>final int numBands = dst.getNumBands();<NEW_LINE>final byte[] band1 = src.getBand(0).data;<NEW_LINE>final byte[] band2 = src.getBand(1).data;<NEW_LINE>final byte[] band3 = src.getBand(2).data;<NEW_LINE>if (numBands == 3) {<NEW_LINE>// CONCURRENT_BELOW BoofConcurrency.loopFor(0, src.height, y -> {<NEW_LINE>for (int y = 0; y < src.height; y++) {<NEW_LINE>int indexSrc = src.startIndex + y * src.stride;<NEW_LINE>int indexDst = y * src.width;<NEW_LINE>for (int x = 0; x < src.width; x++, indexSrc++) {<NEW_LINE>int <MASK><NEW_LINE>int c2 = band2[indexSrc] & 0xFF;<NEW_LINE>int c3 = band3[indexSrc] & 0xFF;<NEW_LINE>dstData[indexDst++] = c1 << 16 | c2 << 8 | c3;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// CONCURRENT_ABOVE });<NEW_LINE>} else if (numBands == 4) {<NEW_LINE>final byte[] band4 = src.getBand(3).data;<NEW_LINE>// CONCURRENT_BELOW BoofConcurrency.loopFor(0, src.height, y -> {<NEW_LINE>for (int y = 0; y < src.height; y++) {<NEW_LINE>int indexSrc = src.startIndex + y * src.stride;<NEW_LINE>int indexDst = y * src.width;<NEW_LINE>for (int x = 0; x < src.width; x++, indexSrc++) {<NEW_LINE>int c1 = band1[indexSrc] & 0xFF;<NEW_LINE>int c2 = band2[indexSrc] & 0xFF;<NEW_LINE>int c3 = band3[indexSrc] & 0xFF;<NEW_LINE>int c4 = band4[indexSrc] & 0xFF;<NEW_LINE>dstData[indexDst++] = c1 << 24 | c2 << 16 | c3 << 8 | c4;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// CONCURRENT_ABOVE });<NEW_LINE>} else {<NEW_LINE>throw new RuntimeException("Code more here");<NEW_LINE>}<NEW_LINE>}
c1 = band1[indexSrc] & 0xFF;
1,127,803
public void handleAsyncInvoke(Map<String, Object> inputParams, BaseRow input, ResultFuture<BaseRow> resultFuture) throws Exception {<NEW_LINE>String key = buildCacheKey(inputParams);<NEW_LINE>if (StringUtils.isBlank(key)) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>RedisFuture<Map<String, String>> future = ((RedisHashAsyncCommands) async).hgetall(key);<NEW_LINE>future.thenAccept(values -> {<NEW_LINE>if (MapUtils.isNotEmpty(values)) {<NEW_LINE>try {<NEW_LINE>BaseRow row = fillData(input, values);<NEW_LINE>dealCacheData(key, CacheObj.buildCacheObj(ECacheContentType.SingleLine, values));<NEW_LINE>RowDataComplete.completeBaseRow(resultFuture, row);<NEW_LINE>} catch (Exception e) {<NEW_LINE>dealFillDataError(input, resultFuture, e);<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>dealMissKey(input, resultFuture);<NEW_LINE>dealCacheData(<MASK><NEW_LINE>}<NEW_LINE>});<NEW_LINE>}
key, CacheMissVal.getMissKeyObj());
77,042
public void onEnable() {<NEW_LINE>// Catch bad things being done by naughty plugins that include<NEW_LINE>// WorldEdit's classes<NEW_LINE>ClassSourceValidator verifier = new ClassSourceValidator(this);<NEW_LINE>verifier.reportMismatches(ImmutableList.of(World.class, CommandManager.class, EditSession.class, Actor.class));<NEW_LINE>WorldEdit.getInstance().getEventBus().post(new PlatformsRegisteredEvent());<NEW_LINE>// Setup permission resolver<NEW_LINE>PermissionsResolverManager.initialize(this);<NEW_LINE>// Register CUI<NEW_LINE>getServer().getMessenger().registerIncomingPluginChannel(this, CUI_PLUGIN_CHANNEL, new CUIChannelListener(this));<NEW_LINE>getServer().getMessenger().registerOutgoingPluginChannel(this, CUI_PLUGIN_CHANNEL);<NEW_LINE>// Now we can register events<NEW_LINE>getServer().getPluginManager().registerEvents(<MASK><NEW_LINE>// register async tab complete, if available<NEW_LINE>if (PaperLib.isPaper()) {<NEW_LINE>getServer().getPluginManager().registerEvents(new AsyncTabCompleteListener(), this);<NEW_LINE>}<NEW_LINE>// this creates the objects matching Bukkit's enums - but doesn't fill them with data yet<NEW_LINE>initializeRegistries();<NEW_LINE>if (Bukkit.getWorlds().isEmpty()) {<NEW_LINE>setupPreWorldData();<NEW_LINE>// register this so we can load world-dependent data right as the first world is loading<NEW_LINE>getServer().getPluginManager().registerEvents(new WorldInitListener(), this);<NEW_LINE>} else {<NEW_LINE>getLogger().warning("Server reload detected. This may cause various issues with WorldEdit and dependent plugins.");<NEW_LINE>try {<NEW_LINE>setupPreWorldData();<NEW_LINE>// since worlds are loaded already, we can do this now<NEW_LINE>setupWorldData();<NEW_LINE>} catch (Throwable ignored) {<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// Enable metrics<NEW_LINE>new Metrics(this, BSTATS_PLUGIN_ID);<NEW_LINE>PaperLib.suggestPaper(this);<NEW_LINE>}
new WorldEditListener(this), this);
424,599
public void createRateVariances(MPPCostCollector costCollector) {<NEW_LINE>MProduct product = null;<NEW_LINE>if (costCollector.isCostCollectorType(MPPCostCollector.COSTCOLLECTORTYPE_ActivityControl)) {<NEW_LINE>final I_AD_WF_Node node = costCollector.getPP_Order_Node().getAD_WF_Node();<NEW_LINE>product = MProduct.forS_Resource_ID(costCollector.getCtx(), <MASK><NEW_LINE>} else if (costCollector.isCostCollectorType(MPPCostCollector.COSTCOLLECTORTYPE_ComponentIssue)) {<NEW_LINE>final I_PP_Order_BOMLine bomLine = costCollector.getPP_Order_BOMLine();<NEW_LINE>product = MProduct.get(costCollector.getCtx(), bomLine.getM_Product_ID());<NEW_LINE>} else if (MPPCostCollector.COSTCOLLECTORTYPE_RateVariance.equals(costCollector.getCostCollectorType()))<NEW_LINE>product = MProduct.get(costCollector.getCtx(), costCollector.getM_Product_ID());<NEW_LINE>// Cost Collector - Rate Variance<NEW_LINE>MPPCostCollector costCollectorRateVariance = null;<NEW_LINE>for (MAcctSchema accountSchema : CostEngine.getAcctSchema(costCollector)) {<NEW_LINE>for (MCostElement costElement : MCostElement.getCostElement(costCollector.getCtx(), costCollector.get_TrxName())) {<NEW_LINE>final MCostDetail cost = MCostDetail.getCostDetail(costCollector, costElement.getM_CostElement_ID());<NEW_LINE>if (cost == null)<NEW_LINE>continue;<NEW_LINE>//<NEW_LINE>final BigDecimal quantity = cost.getQty();<NEW_LINE>final BigDecimal priceStandard = getProductStandardCostPrice(costCollector, product, accountSchema, costElement);<NEW_LINE>final BigDecimal priceActual = getProductActualCostPrice(costCollector, product, accountSchema, costElement, costCollector.get_TrxName());<NEW_LINE>final BigDecimal amountStandard = CostEngine.roundCost(priceStandard.multiply(quantity), accountSchema.getC_AcctSchema_ID());<NEW_LINE>final BigDecimal amtActual = CostEngine.roundCost(priceActual.multiply(quantity), accountSchema.getC_AcctSchema_ID());<NEW_LINE>if (amountStandard.compareTo(amtActual) == 0)<NEW_LINE>continue;<NEW_LINE>//<NEW_LINE>if (costCollectorRateVariance == null)<NEW_LINE>costCollectorRateVariance = MPPCostCollector.createVarianceCostCollector(costCollector, MPPCostCollector.COSTCOLLECTORTYPE_RateVariance);<NEW_LINE>List<MCostType> costTypes = MCostType.get(accountSchema.getCtx(), accountSchema.get_TrxName());<NEW_LINE>for (MCostType costType : costTypes) {<NEW_LINE>createVarianceCostDetail(costCollectorRateVariance, amtActual.abs(), quantity, cost, null, accountSchema, costType, costElement);<NEW_LINE>createVarianceCostDetail(costCollectorRateVariance, amountStandard.abs(), quantity, cost, null, accountSchema, costType, costElement);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>//<NEW_LINE>if (costCollectorRateVariance != null) {<NEW_LINE>boolean ok = costCollectorRateVariance.processIt(MPPCostCollector.ACTION_Complete);<NEW_LINE>costCollectorRateVariance.saveEx();<NEW_LINE>if (!ok)<NEW_LINE>throw new AdempiereException(costCollectorRateVariance.getProcessMsg());<NEW_LINE>}<NEW_LINE>}
node.getS_Resource_ID(), null);
1,768,584
public ListIdentityPoolUsageResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>ListIdentityPoolUsageResult listIdentityPoolUsageResult = new ListIdentityPoolUsageResult();<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 listIdentityPoolUsageResult;<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("IdentityPoolUsages", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>listIdentityPoolUsageResult.setIdentityPoolUsages(new ListUnmarshaller<IdentityPoolUsage>(IdentityPoolUsageJsonUnmarshaller.getInstance()).unmarshall(context));<NEW_LINE>}<NEW_LINE>if (context.testExpression("MaxResults", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>listIdentityPoolUsageResult.setMaxResults(context.getUnmarshaller(Integer.class).unmarshall(context));<NEW_LINE>}<NEW_LINE>if (context.testExpression("Count", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>listIdentityPoolUsageResult.setCount(context.getUnmarshaller(Integer.class).unmarshall(context));<NEW_LINE>}<NEW_LINE>if (context.testExpression("NextToken", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>listIdentityPoolUsageResult.setNextToken(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 listIdentityPoolUsageResult;<NEW_LINE>}
JsonToken token = context.getCurrentToken();
227,354
public void execute(final String configuration, final File data, final int repeat) throws IOException, InterruptedException {<NEW_LINE>final Path cfg = location.resolve("config.temp");<NEW_LINE>Files.write(cfg, configuration.getBytes(StandardCharsets.UTF_8), StandardOpenOption.WRITE, StandardOpenOption.TRUNCATE_EXISTING, StandardOpenOption.CREATE);<NEW_LINE>final Path lsbin = location.resolve("bin").resolve("logstash");<NEW_LINE>LsBenchFileUtil.ensureExecutable(lsbin.toFile());<NEW_LINE>final File output = Files.createTempFile(null, null).toFile();<NEW_LINE>final Process process = pbuilder.command(lsbin.toString(), "-f", cfg.toString()).redirectOutput(ProcessBuilder.Redirect.to<MASK><NEW_LINE>if (data != null) {<NEW_LINE>try (final OutputStream out = process.getOutputStream()) {<NEW_LINE>pipeRepeatedly(data, out, repeat);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (process.waitFor() != 0) {<NEW_LINE>throw new IllegalStateException("Logstash failed to start!");<NEW_LINE>}<NEW_LINE>LsBenchFileUtil.ensureDeleted(cfg.toFile());<NEW_LINE>Files.move(previousYml, logstashYml, StandardCopyOption.REPLACE_EXISTING);<NEW_LINE>LsBenchFileUtil.ensureDeleted(output);<NEW_LINE>}
(output)).start();
872,072
private void execute(CommandSender sender, CommandContext context) {<NEW_LINE>final String name = context.get(extensionName);<NEW_LINE>sender.sendMessage(Component.text("extensionFile = " + name + "...."));<NEW_LINE>ExtensionManager extensionManager = MinecraftServer.getExtensionManager();<NEW_LINE>Path extensionFolder = extensionManager.getExtensionFolder().toPath().toAbsolutePath();<NEW_LINE>Path extensionJar = extensionFolder.resolve(name);<NEW_LINE>try {<NEW_LINE>if (!extensionJar.toFile().getCanonicalPath().startsWith(extensionFolder.toFile().getCanonicalPath())) {<NEW_LINE>sender.sendMessage(Component.text("File name '" + name + "' does not represent a file inside the extensions folder. Will not load"));<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>} catch (IOException e) {<NEW_LINE>e.printStackTrace();<NEW_LINE>sender.sendMessage(Component.text("Failed to load extension: " + e.getMessage()));<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>boolean managed = extensionManager.loadDynamicExtension(extensionJar.toFile());<NEW_LINE>if (managed) {<NEW_LINE>sender.sendMessage(Component.text("Extension loaded!"));<NEW_LINE>} else {<NEW_LINE>sender.sendMessage<MASK><NEW_LINE>}<NEW_LINE>} catch (Exception e) {<NEW_LINE>e.printStackTrace();<NEW_LINE>sender.sendMessage(Component.text("Failed to load extension: " + e.getMessage()));<NEW_LINE>}<NEW_LINE>}
(Component.text("Failed to load extension, check your logs."));
571,486
private void loadNode561() {<NEW_LINE>PropertyTypeNode node = new PropertyTypeNode(this.context, Identifiers.AuditOpenSecureChannelEventType_SecurityPolicyUri, new QualifiedName(0, "SecurityPolicyUri"), new LocalizedText("en", "SecurityPolicyUri"), LocalizedText.NULL_VALUE, UInteger.valueOf(0), UInteger.valueOf(0), new DataValue(Variant.NULL_VALUE), Identifiers.String, -1, new UInteger[] {}, UByte.valueOf(1), UByte.valueOf(1), 0.0, false);<NEW_LINE>node.addReference(new Reference(Identifiers.AuditOpenSecureChannelEventType_SecurityPolicyUri, Identifiers.HasTypeDefinition, Identifiers.PropertyType.expanded(), true));<NEW_LINE>node.addReference(new Reference(Identifiers.AuditOpenSecureChannelEventType_SecurityPolicyUri, Identifiers.HasModellingRule, Identifiers.ModellingRule_Mandatory<MASK><NEW_LINE>node.addReference(new Reference(Identifiers.AuditOpenSecureChannelEventType_SecurityPolicyUri, Identifiers.HasProperty, Identifiers.AuditOpenSecureChannelEventType.expanded(), false));<NEW_LINE>this.nodeManager.addNode(node);<NEW_LINE>}
.expanded(), true));
1,571,615
// -------------------------------------------------------------------------<NEW_LINE>@Override<NEW_LINE>public PortfolioItemSummary summarize() {<NEW_LINE>// 2Y Buy USD 1mm INDEX / 1.5% : 21Jan18-21Jan20<NEW_LINE><MASK><NEW_LINE>StringBuilder buf = new StringBuilder(96);<NEW_LINE>buf.append(SummarizerUtils.datePeriod(paymentSchedule.getStartDate(), paymentSchedule.getEndDate()));<NEW_LINE>buf.append(' ');<NEW_LINE>buf.append(product.getBuySell());<NEW_LINE>buf.append(' ');<NEW_LINE>buf.append(SummarizerUtils.amount(product.getCurrency(), product.getNotional()));<NEW_LINE>buf.append(' ');<NEW_LINE>buf.append(product.getCdsIndexId().getValue());<NEW_LINE>buf.append(" / ");<NEW_LINE>buf.append(SummarizerUtils.percent(product.getFixedRate()));<NEW_LINE>buf.append(" : ");<NEW_LINE>buf.append(SummarizerUtils.dateRange(paymentSchedule.getStartDate(), paymentSchedule.getEndDate()));<NEW_LINE>return SummarizerUtils.summary(this, ProductType.CDS_INDEX, buf.toString(), product.getCurrency());<NEW_LINE>}
PeriodicSchedule paymentSchedule = product.getPaymentSchedule();
283,029
public double cost(int u1, int u2) {<NEW_LINE>double res = 0.0;<NEW_LINE>float<MASK><NEW_LINE>float[] v2 = leftJCF[u2];<NEW_LINE>for (int i = 0; i < v1.length; i++) {<NEW_LINE>float a = v1[i];<NEW_LINE>float b = v2[i];<NEW_LINE>// if (!Float.isNaN(v1[i]) && !Float.isNaN(v2[i])) {<NEW_LINE>if (!(a != a) && !(b != b)) {<NEW_LINE>double c;<NEW_LINE>if (isLinear[i]) {<NEW_LINE>c = featureWeight[i] * (a > b ? (a - b) : (b - a));<NEW_LINE>} else {<NEW_LINE>c = featureWeight[i] * weightFunction[i].cost(a, b);<NEW_LINE>}<NEW_LINE>res += c;<NEW_LINE>if (debugShowCostGraph) {<NEW_LINE>cumulWeightedSignalCosts[i] += wSignal * c;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// if anything is NaN, count the cost as 0.<NEW_LINE>}<NEW_LINE>return (res);<NEW_LINE>}
[] v1 = rightJCF[u1];
1,516,224
public static <// TODO: Create a better duplicate handler, that takes Entries as parameters and returns an Entry<NEW_LINE>K, V> Map<V, K> invert(Map<K, V> pSource, Map<V, K> pResult, DuplicateHandler<K> pHandler) {<NEW_LINE>if (pSource == null) {<NEW_LINE>throw new IllegalArgumentException("source == null");<NEW_LINE>}<NEW_LINE>Map<V, K> result = pResult;<NEW_LINE>if (result == null) {<NEW_LINE>try {<NEW_LINE>// noinspection unchecked<NEW_LINE>result = pSource.getClass().newInstance();<NEW_LINE>} catch (InstantiationException e) {<NEW_LINE>// Handled below<NEW_LINE>} catch (IllegalAccessException e) {<NEW_LINE>// Handled below<NEW_LINE>}<NEW_LINE>if (result == null) {<NEW_LINE>throw new IllegalArgumentException("result == null and source class " + pSource.getClass() + " cannot be instantiated.");<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// Copy entries into result map, inversed<NEW_LINE>Set<Map.Entry<K, V>> entries = pSource.entrySet();<NEW_LINE>for (Map.Entry<K, V> entry : entries) {<NEW_LINE>V newKey = entry.getValue();<NEW_LINE>K newValue = entry.getKey();<NEW_LINE>// Handle dupliates<NEW_LINE>if (result.containsKey(newKey)) {<NEW_LINE>if (pHandler != null) {<NEW_LINE>newValue = pHandler.resolve(result<MASK><NEW_LINE>} else {<NEW_LINE>throw new IllegalArgumentException("Result would include duplicate keys, but no DuplicateHandler specified.");<NEW_LINE>}<NEW_LINE>}<NEW_LINE>result.put(newKey, newValue);<NEW_LINE>}<NEW_LINE>return result;<NEW_LINE>}
.get(newKey), newValue);
361,638
public void convert(String sourceDecoded, String serviceName, FileFormat fileFormat, JsonObject options, Handler<AsyncResult<Buffer>> handler) {<NEW_LINE>String source;<NEW_LINE>try {<NEW_LINE>source = sanitize(sourceDecoded, this.safeMode, this.includeWhitelist);<NEW_LINE>source = source.trim();<NEW_LINE>source = withDelimiter(source);<NEW_LINE>} catch (IOException e) {<NEW_LINE>if (e instanceof UnsupportedEncodingException) {<NEW_LINE>handler.handle(new Delegator.Failure(new BadRequestException("Characters must be encoded in UTF-8.", e)));<NEW_LINE>} else {<NEW_LINE>handler.handle(new Delegator.Failure(e));<NEW_LINE>}<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>final String primeSource = source;<NEW_LINE>DitaaContext ditaaContext = findDitaaContext(source);<NEW_LINE>if (ditaaContext != null) {<NEW_LINE>logging.reroute("plantuml", "ditaa", ditaaContext.getSource(), fileFormat);<NEW_LINE>// found a ditaa context, delegate to the optimized ditaa service<NEW_LINE>vertx.executeBlocking(future -> {<NEW_LINE>try {<NEW_LINE>ByteArrayOutputStream outputStream = new ByteArrayOutputStream();<NEW_LINE>// REMIND: options are unsupported for now.<NEW_LINE>Ditaa.convert(fileFormat, new ByteArrayInputStream(ditaaContext.getSource().getBytes()), outputStream);<NEW_LINE>future.complete(outputStream.toByteArray());<NEW_LINE>} catch (IllegalStateException e) {<NEW_LINE>future.fail(e);<NEW_LINE>}<NEW_LINE>}, res -> handler.handle(res.map(o -> Buffer.buffer((byte[]) o))));<NEW_LINE>} else {<NEW_LINE>// ...otherwise, continue with PlantUML<NEW_LINE>vertx.executeBlocking(future -> {<NEW_LINE>try {<NEW_LINE>byte[] data = convert(primeSource, fileFormat, options);<NEW_LINE>future.complete(data);<NEW_LINE>} catch (IllegalStateException e) {<NEW_LINE>future.fail(e);<NEW_LINE>}<NEW_LINE>}, res -> handler.handle(res.map(o -> Buffer.buffer((byte<MASK><NEW_LINE>}<NEW_LINE>}
[]) o))));
1,542,948
private void updateMutables(SubscriptionResult _result, Map<Integer, Object> properties) {<NEW_LINE>Date pub_date = (Date) properties.get(SearchResult.PR_PUB_DATE);<NEW_LINE>if (pub_date == null) {<NEW_LINE>time = _result.getTimeFound();<NEW_LINE>} else {<NEW_LINE>long pt = pub_date.getTime();<NEW_LINE>if (pt <= 0) {<NEW_LINE>time = _result.getTimeFound();<NEW_LINE>} else {<NEW_LINE>time = pt;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>tags = (String[]) properties.get(SearchResult.PR_TAGS);<NEW_LINE>long seeds = (Long) <MASK><NEW_LINE>long leechers = (Long) properties.get(SearchResult.PR_LEECHER_COUNT);<NEW_LINE>seed_count = (int) (seeds < 0 ? 0 : seeds);<NEW_LINE>seeds_peers = (seeds < 0 ? "--" : String.valueOf(seeds)) + "/" + (leechers < 0 ? "--" : String.valueOf(leechers));<NEW_LINE>if (seeds < 0) {<NEW_LINE>seeds = 0;<NEW_LINE>} else {<NEW_LINE>seeds++;<NEW_LINE>}<NEW_LINE>if (leechers < 0) {<NEW_LINE>leechers = 0;<NEW_LINE>} else {<NEW_LINE>leechers++;<NEW_LINE>}<NEW_LINE>seeds_peers_sort = ((seeds & 0x7fffffff) << 32) | (leechers & 0xffffffff);<NEW_LINE>long votes = (Long) properties.get(SearchResult.PR_VOTES);<NEW_LINE>long comments = (Long) properties.get(SearchResult.PR_COMMENTS);<NEW_LINE>if (votes < 0 && comments < 0) {<NEW_LINE>votes_comments_sort = 0;<NEW_LINE>votes_comments = null;<NEW_LINE>} else {<NEW_LINE>votes_comments = (votes < 0 ? "--" : String.valueOf(votes)) + "/" + (comments < 0 ? "--" : String.valueOf(comments));<NEW_LINE>if (votes < 0) {<NEW_LINE>votes = 0;<NEW_LINE>} else {<NEW_LINE>votes++;<NEW_LINE>}<NEW_LINE>if (comments < 0) {<NEW_LINE>comments = 0;<NEW_LINE>} else {<NEW_LINE>comments++;<NEW_LINE>}<NEW_LINE>votes_comments_sort = ((votes & 0x7fffffff) << 32) | (comments & 0xffffffff);<NEW_LINE>}<NEW_LINE>rank = ((Long) properties.get(SearchResult.PR_RANK)).intValue();<NEW_LINE>}
properties.get(SearchResult.PR_SEED_COUNT);
1,737,069
private void addList(Collection<?> args) {<NEW_LINE>for (Object o : args) {<NEW_LINE>if (o.getClass() == String.class) {<NEW_LINE>addInt(3);<NEW_LINE>String s = (String) o;<NEW_LINE>addInt(s.length());<NEW_LINE>addString(s);<NEW_LINE>} else if (o.getClass() == Boolean.class) {<NEW_LINE>addInt(2);<NEW_LINE>addByte(((Boolean) o).booleanValue() ? (byte) 1 : (byte) 0);<NEW_LINE>} else if (o.getClass() == Integer.class) {<NEW_LINE>addInt(1);<NEW_LINE>addInt(((Integer) o).intValue());<NEW_LINE>} else if (o.getClass() == Double.class) {<NEW_LINE>addInt(4);<NEW_LINE>addDouble(((Double) o).doubleValue());<NEW_LINE>} else if (o.getClass() == BigInteger.class) {<NEW_LINE>addInt(4);<NEW_LINE>addDouble(((BigInteger) o).doubleValue());<NEW_LINE>} else if (o instanceof List<?>) {<NEW_LINE>Collection<?> l = (Collection<?>) o;<NEW_LINE>addInt(0x100);<NEW_LINE>addInt(l.size());<NEW_LINE>addList(l);<NEW_LINE>} else if (o instanceof Map<?, ?>) {<NEW_LINE>Map<?, ?> l = (Map<?, ?>) o;<NEW_LINE>addInt(0x101);<NEW_LINE><MASK><NEW_LINE>for (Map.Entry<?, ?> me : l.entrySet()) {<NEW_LINE>String key = (String) me.getKey();<NEW_LINE>addInt(key.length());<NEW_LINE>addString(key);<NEW_LINE>addList(Collections.singleton(me.getValue()));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
addInt(l.size());
776,839
private ClassTemplateSpec processSchema(DataSchema schema, ClassTemplateSpec enclosingClass, String memberName) {<NEW_LINE>final CustomInfoSpec customInfo = getImmediateCustomInfo(schema);<NEW_LINE>ClassTemplateSpec result = null;<NEW_LINE>TyperefDataSchema originalTyperefSchema = null;<NEW_LINE>while (schema.getType() == DataSchema.Type.TYPEREF) {<NEW_LINE>final TyperefDataSchema typerefSchema = (TyperefDataSchema) schema;<NEW_LINE>if (originalTyperefSchema == null) {<NEW_LINE>originalTyperefSchema = typerefSchema;<NEW_LINE>}<NEW_LINE>final ClassTemplateSpec found = _schemaToClassMap.get(schema);<NEW_LINE>schema = typerefSchema.getRef();<NEW_LINE>if (schema.getType() == DataSchema.Type.UNION) {<NEW_LINE>result = (found != null) ? found : generateUnion((UnionDataSchema) schema, typerefSchema);<NEW_LINE>break;<NEW_LINE>} else if (found == null) {<NEW_LINE>generateTyperef(typerefSchema, originalTyperefSchema);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (result == null) {<NEW_LINE>assert schema == schema.getDereferencedDataSchema();<NEW_LINE>if (schema instanceof ComplexDataSchema) {<NEW_LINE>final ClassTemplateSpec found = _schemaToClassMap.get(schema);<NEW_LINE>if (found == null) {<NEW_LINE>if (schema instanceof NamedDataSchema) {<NEW_LINE>result = generateNamedSchema((NamedDataSchema) schema);<NEW_LINE>} else {<NEW_LINE>result = <MASK><NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>result = found;<NEW_LINE>}<NEW_LINE>if (customInfo != null) {<NEW_LINE>result = customInfo.getCustomClass();<NEW_LINE>}<NEW_LINE>} else if (schema instanceof PrimitiveDataSchema) {<NEW_LINE>result = (customInfo != null) ? customInfo.getCustomClass() : getPrimitiveClassForSchema((PrimitiveDataSchema) schema, enclosingClass, memberName);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (result == null) {<NEW_LINE>throw unrecognizedSchemaType(enclosingClass, memberName, schema);<NEW_LINE>}<NEW_LINE>result.setOriginalTyperefSchema(originalTyperefSchema);<NEW_LINE>return result;<NEW_LINE>}
generateUnnamedComplexSchema(schema, enclosingClass, memberName);
1,478,634
private void parseBMP1(final byte[] s, final int offset, final int width, final int height, final COLORTABLE colortable) {<NEW_LINE>int n = 0;<NEW_LINE>int b;<NEW_LINE>for (int rows = 0; rows < height; rows++) {<NEW_LINE>for (int columns = 0; columns < width; columns = columns + 8) {<NEW_LINE>// emergency break<NEW_LINE>if (offset + n >= s.length)<NEW_LINE>return;<NEW_LINE>b = (s[offset + n] & 0xff);<NEW_LINE>n++;<NEW_LINE>this.image.setRGB(columns, (height - rows - 1), colortable.colorindex[(b & 0x80) >> 7]);<NEW_LINE>this.image.setRGB(columns + 1, (height - rows - 1), colortable.colorindex[(b <MASK><NEW_LINE>this.image.setRGB(columns + 2, (height - rows - 1), colortable.colorindex[(b & 0x20) >> 5]);<NEW_LINE>this.image.setRGB(columns + 3, (height - rows - 1), colortable.colorindex[(b & 0x10) >> 4]);<NEW_LINE>this.image.setRGB(columns + 4, (height - rows - 1), colortable.colorindex[(b & 0x08) >> 3]);<NEW_LINE>this.image.setRGB(columns + 5, (height - rows - 1), colortable.colorindex[(b & 0x04) >> 2]);<NEW_LINE>this.image.setRGB(columns + 6, (height - rows - 1), colortable.colorindex[(b & 0x02) >> 1]);<NEW_LINE>this.image.setRGB(columns + 7, (height - rows - 1), colortable.colorindex[b & 0x01]);<NEW_LINE>}<NEW_LINE>n += fill4(n);<NEW_LINE>}<NEW_LINE>}
& 0x40) >> 6]);
813,764
public WindowInfo createFakeWindowInfo(String src, String fragmentId) {<NEW_LINE>Element <MASK><NEW_LINE>screenElement.addAttribute("template", src);<NEW_LINE>screenElement.addAttribute("id", fragmentId);<NEW_LINE>Element windowElement = screenXmlLoader.load(src, fragmentId, Collections.emptyMap());<NEW_LINE>Class<? extends ScreenFragment> fragmentClass;<NEW_LINE>String className = windowElement.attributeValue("class");<NEW_LINE>if (StringUtils.isNotEmpty(className)) {<NEW_LINE>fragmentClass = (Class<? extends ScreenFragment>) scripting.loadClassNN(className);<NEW_LINE>} else {<NEW_LINE>fragmentClass = AbstractFrame.class;<NEW_LINE>}<NEW_LINE>return new WindowInfo(fragmentId, new WindowAttributesProvider() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public WindowInfo.Type getType(WindowInfo wi) {<NEW_LINE>return WindowInfo.Type.FRAGMENT;<NEW_LINE>}<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public String getTemplate(WindowInfo wi) {<NEW_LINE>return src;<NEW_LINE>}<NEW_LINE><NEW_LINE>@Nonnull<NEW_LINE>@Override<NEW_LINE>public Class<? extends FrameOwner> getControllerClass(WindowInfo wi) {<NEW_LINE>return fragmentClass;<NEW_LINE>}<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public WindowInfo resolve(WindowInfo windowInfo) {<NEW_LINE>return windowInfo;<NEW_LINE>}<NEW_LINE>}, screenElement);<NEW_LINE>}
screenElement = DocumentHelper.createElement("screen");
927,649
public static DescribeAutoProvisioningGroupInstancesResponse unmarshall(DescribeAutoProvisioningGroupInstancesResponse describeAutoProvisioningGroupInstancesResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeAutoProvisioningGroupInstancesResponse.setRequestId(_ctx.stringValue("DescribeAutoProvisioningGroupInstancesResponse.RequestId"));<NEW_LINE>describeAutoProvisioningGroupInstancesResponse.setPageSize(_ctx.integerValue("DescribeAutoProvisioningGroupInstancesResponse.PageSize"));<NEW_LINE>describeAutoProvisioningGroupInstancesResponse.setPageNumber(_ctx.integerValue("DescribeAutoProvisioningGroupInstancesResponse.PageNumber"));<NEW_LINE>describeAutoProvisioningGroupInstancesResponse.setTotalCount(_ctx.integerValue("DescribeAutoProvisioningGroupInstancesResponse.TotalCount"));<NEW_LINE>List<Instance> instances = new ArrayList<Instance>();<NEW_LINE>for (int i = 0; i < _ctx.lengthValue("DescribeAutoProvisioningGroupInstancesResponse.Instances.Length"); i++) {<NEW_LINE>Instance instance = new Instance();<NEW_LINE>instance.setStatus(_ctx.stringValue("DescribeAutoProvisioningGroupInstancesResponse.Instances[" + i + "].Status"));<NEW_LINE>instance.setCreationTime(_ctx.stringValue("DescribeAutoProvisioningGroupInstancesResponse.Instances[" + i + "].CreationTime"));<NEW_LINE>instance.setIsSpot(_ctx.booleanValue("DescribeAutoProvisioningGroupInstancesResponse.Instances[" + i + "].IsSpot"));<NEW_LINE>instance.setCPU(_ctx.integerValue<MASK><NEW_LINE>instance.setInstanceId(_ctx.stringValue("DescribeAutoProvisioningGroupInstancesResponse.Instances[" + i + "].InstanceId"));<NEW_LINE>instance.setNetworkType(_ctx.stringValue("DescribeAutoProvisioningGroupInstancesResponse.Instances[" + i + "].NetworkType"));<NEW_LINE>instance.setInstanceType(_ctx.stringValue("DescribeAutoProvisioningGroupInstancesResponse.Instances[" + i + "].InstanceType"));<NEW_LINE>instance.setRegionId(_ctx.stringValue("DescribeAutoProvisioningGroupInstancesResponse.Instances[" + i + "].RegionId"));<NEW_LINE>instance.setIoOptimized(_ctx.booleanValue("DescribeAutoProvisioningGroupInstancesResponse.Instances[" + i + "].IoOptimized"));<NEW_LINE>instance.setOsType(_ctx.stringValue("DescribeAutoProvisioningGroupInstancesResponse.Instances[" + i + "].OsType"));<NEW_LINE>instance.setZoneId(_ctx.stringValue("DescribeAutoProvisioningGroupInstancesResponse.Instances[" + i + "].ZoneId"));<NEW_LINE>instance.setMemory(_ctx.integerValue("DescribeAutoProvisioningGroupInstancesResponse.Instances[" + i + "].Memory"));<NEW_LINE>instances.add(instance);<NEW_LINE>}<NEW_LINE>describeAutoProvisioningGroupInstancesResponse.setInstances(instances);<NEW_LINE>return describeAutoProvisioningGroupInstancesResponse;<NEW_LINE>}
("DescribeAutoProvisioningGroupInstancesResponse.Instances[" + i + "].CPU"));
66,068
final RegisterAVSDeviceResult executeRegisterAVSDevice(RegisterAVSDeviceRequest registerAVSDeviceRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(registerAVSDeviceRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<RegisterAVSDeviceRequest> request = null;<NEW_LINE>Response<RegisterAVSDeviceResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new RegisterAVSDeviceRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(registerAVSDeviceRequest));<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, "Alexa For Business");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "RegisterAVSDevice");<NEW_LINE>request.<MASK><NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<RegisterAVSDeviceResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new RegisterAVSDeviceResultJsonUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
44,514
private void initJShell() {<NEW_LINE>if (shell != null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>Launcher l = null;<NEW_LINE>JShell shell = null;<NEW_LINE>Subscription sub = null;<NEW_LINE>try {<NEW_LINE>initializing = true;<NEW_LINE>l = initShellLauncher();<NEW_LINE>shell = launcher.getJShell();<NEW_LINE>// not necessary to launch the shell, but WILL display the initial prompt<NEW_LINE>launcher.start();<NEW_LINE>initialSetupSnippets = new HashSet<>(shell.snippets().collect<MASK><NEW_LINE>} catch (IOException | InternalError err) {<NEW_LINE>Throwable t = err.getCause();<NEW_LINE>if (t == null) {<NEW_LINE>t = err;<NEW_LINE>}<NEW_LINE>reportErrorMessage(t);<NEW_LINE>closed();<NEW_LINE>env.notifyDisconnected(this, false);<NEW_LINE>return;<NEW_LINE>} finally {<NEW_LINE>initializing = false;<NEW_LINE>if (l != null && l.subscription != null && shell != null) {<NEW_LINE>shell.unsubscribe(l.subscription);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
(Collectors.toList()));
1,134,393
public void configure(Binder binder) {<NEW_LINE>binder.bind(DatabaseConfig.class).toProvider(DatabaseConfigProvider.class).in(Scopes.SINGLETON);<NEW_LINE>binder.bind(DataSource.class).toProvider(DataSourceProvider.class).in(Scopes.SINGLETON);<NEW_LINE>binder.bind(AutoMigrator.class);<NEW_LINE>// don't make this singleton because DBI.registerMapper is called for each StoreManager<NEW_LINE>binder.bind(DBI.class).toProvider(DbiProvider.class);<NEW_LINE>binder.bind(TransactionManager.class).to(ThreadLocalTransactionManager.class).in(Scopes.SINGLETON);<NEW_LINE>binder.bind(ConfigMapper.class).in(Scopes.SINGLETON);<NEW_LINE>binder.bind(DatabaseMigrator.class).in(Scopes.SINGLETON);<NEW_LINE>binder.bind(ProjectStoreManager.class).to(DatabaseProjectStoreManager.class).in(Scopes.SINGLETON);<NEW_LINE>binder.bind(QueueSettingStoreManager.class).to(DatabaseQueueSettingStoreManager.class<MASK><NEW_LINE>binder.bind(SessionStoreManager.class).to(DatabaseSessionStoreManager.class).in(Scopes.SINGLETON);<NEW_LINE>binder.bind(ScheduleStoreManager.class).to(DatabaseScheduleStoreManager.class).in(Scopes.SINGLETON);<NEW_LINE>if (withTaskQueueServer) {<NEW_LINE>binder.bind(DatabaseTaskQueueConfig.class).in(Scopes.SINGLETON);<NEW_LINE>binder.bind(DatabaseTaskQueueServer.class).in(Scopes.SINGLETON);<NEW_LINE>}<NEW_LINE>}
).in(Scopes.SINGLETON);
1,640,441
public void visit(BLangErrorVariable varNode) {<NEW_LINE>// Create error destruct block stmt.<NEW_LINE>final BLangBlockStmt blockStmt = ASTBuilderUtil.createBlockStmt(varNode.pos);<NEW_LINE>BType errorType = varNode.getBType() == null ? symTable.errorType : varNode.getBType();<NEW_LINE>// Create a simple var for the error 'error x = ($error$)'.<NEW_LINE>String name = anonModelHelper.getNextErrorVarKey(env.enclPkg.packageID);<NEW_LINE>BVarSymbol errorVarSymbol = new BVarSymbol(0, names.fromString(name), this.env.scope.owner.pkgID, errorType, this.env.scope.owner, varNode.pos, VIRTUAL);<NEW_LINE>final BLangSimpleVariable error = ASTBuilderUtil.createVariable(varNode.pos, <MASK><NEW_LINE>error.expr = varNode.expr;<NEW_LINE>final BLangSimpleVariableDef variableDef = ASTBuilderUtil.createVariableDefStmt(varNode.pos, blockStmt);<NEW_LINE>variableDef.var = error;<NEW_LINE>// Create the variable definition statements using the root block stmt created.<NEW_LINE>createVarDefStmts(varNode, blockStmt, error.symbol, null);<NEW_LINE>// Finally rewrite the populated block statement.<NEW_LINE>result = rewrite(blockStmt, env);<NEW_LINE>}
name, errorType, null, errorVarSymbol);
1,716,471
public Object deserialize(JsonParser p, DeserializationContext ctxt) throws IOException {<NEW_LINE>if (!p.isExpectedStartArrayToken()) {<NEW_LINE>return ctxt.handleUnexpectedToken(EthSubscribeParams.class, p.<MASK><NEW_LINE>}<NEW_LINE>// skip '['<NEW_LINE>p.nextToken();<NEW_LINE>String subscriptionType = p.getText();<NEW_LINE>Class<? extends EthSubscribeParams> subscriptionTypeClass = subscriptionTypes.get(subscriptionType);<NEW_LINE>p.nextToken();<NEW_LINE>EthSubscribeParams params;<NEW_LINE>if (p.isExpectedStartObjectToken()) {<NEW_LINE>params = p.readValueAs(subscriptionTypeClass);<NEW_LINE>p.nextToken();<NEW_LINE>} else {<NEW_LINE>try {<NEW_LINE>params = subscriptionTypeClass.newInstance();<NEW_LINE>} catch (InstantiationException | IllegalAccessException e) {<NEW_LINE>return ctxt.handleInstantiationProblem(subscriptionTypeClass, null, e);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (p.currentToken() != JsonToken.END_ARRAY) {<NEW_LINE>return ctxt.handleUnexpectedToken(EthSubscribeParams.class, p.currentToken(), p, "eth_subscribe can only have one object to configure subscription");<NEW_LINE>}<NEW_LINE>return params;<NEW_LINE>}
currentToken(), p, "eth_subscribe parameters are expected to be arrays");
1,285,751
private void genFromRow(String visibility, DataObjectModel model, PrintWriter writer) {<NEW_LINE>writer.print("\n");<NEW_LINE>writer.print(" @io.vertx.codegen.annotations.GenIgnore\n");<NEW_LINE>writer.print(" " + genSimpleName(model) + " INSTANCE = new " + genSimpleName(model) + "() { };\n");<NEW_LINE>writer.print("\n");<NEW_LINE>writer.print(" @io.vertx.codegen.annotations.GenIgnore\n");<NEW_LINE>writer.print(" java.util.stream.Collector<io.vertx.sqlclient.Row, ?, java.util.List<" + model.getType().getSimpleName() + ">> COLLECTOR = " + "java.util.stream.Collectors.mapping(INSTANCE::map, java.util.stream.Collectors.toList());\n");<NEW_LINE>writer.print("\n");<NEW_LINE>writer.print(" @io.vertx.codegen.annotations.GenIgnore\n");<NEW_LINE>writer.print(" default " + model.getType().getSimpleName() + " map(io.vertx.sqlclient.Row row) {\n");<NEW_LINE>writer.print(" " + model.getType().getSimpleName() + " obj = new " + model.getType(<MASK><NEW_LINE>writer.print(" Object val;\n");<NEW_LINE>writer.print(" int idx;\n");<NEW_LINE>genFromSingleValued(model, writer);<NEW_LINE>writer.print(" return obj;\n");<NEW_LINE>writer.print(" }\n");<NEW_LINE>}
).getSimpleName() + "();\n");
964,188
public String calculateAndCheckViewId(FacesContext context, String viewId) {<NEW_LINE>// If no viewId found, don't try to derive it, just continue.<NEW_LINE>if (viewId == null) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>FacesServletMapping mapping = getFacesServletMapping(context);<NEW_LINE>if (mapping == null || mapping.isExtensionMapping()) {<NEW_LINE>viewId = handleSuffixMapping(context, viewId);<NEW_LINE>} else if (mapping.isPrefixMapping()) {<NEW_LINE>viewId = handlePrefixMapping(viewId, mapping.getPrefix());<NEW_LINE>if (viewId != null) {<NEW_LINE>// A viewId that is equals to the prefix mapping on servlet mode is<NEW_LINE>// considered invalid, because jsp vdl will use RequestDispatcher and cause<NEW_LINE>// a loop that ends in a exception. Note in portlet mode the view<NEW_LINE>// could be encoded as a query param, so the viewId could be valid.<NEW_LINE>if (viewId.equals(mapping.getPrefix()) && !ExternalContextUtils.isPortlet(context.getExternalContext())) {<NEW_LINE>throw new InvalidViewIdException();<NEW_LINE>}<NEW_LINE>return (checkResourceExists(context, viewId) ? viewId : null);<NEW_LINE>}<NEW_LINE>} else if (mapping.getUrlPattern().startsWith(viewId)) {<NEW_LINE>throw new InvalidViewIdException(viewId);<NEW_LINE>} else {<NEW_LINE>if (viewId != null) {<NEW_LINE>return (checkResourceExists(context<MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE>// return null if no physical resource exists<NEW_LINE>return viewId;<NEW_LINE>}
, viewId) ? viewId : null);
385,309
public OperationResult<SchemaChangeResult> updateColumnFamily(final Properties props) throws ConnectionException {<NEW_LINE>if (props.containsKey("keyspace") && !props.get("keyspace").equals(getKeyspaceName())) {<NEW_LINE>throw new RuntimeException(String.format("'keyspace' attribute must match keyspace name. Expected '%s' but got '%s'", getKeyspaceName(), props.get("keyspace")));<NEW_LINE>}<NEW_LINE>return connectionPool.executeWithFailover(new AbstractKeyspaceOperationImpl<SchemaChangeResult>(tracerFactory.newTracer(CassandraOperationType.ADD_COLUMN_FAMILY), getKeyspaceName()) {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public SchemaChangeResult internalExecute(Client client, ConnectionContext context) throws Exception {<NEW_LINE>CfDef def = ThriftUtils.getThriftObjectFromProperties(CfDef.class, props);<NEW_LINE><MASK><NEW_LINE>return new SchemaChangeResponseImpl().setSchemaId(client.system_update_column_family(def));<NEW_LINE>}<NEW_LINE>}, RunOnce.get());<NEW_LINE>}
def.setKeyspace(getKeyspaceName());
394,082
public static long shaderc_compile_into_spv_assembly(@NativeType("shaderc_compiler_t const") long compiler, @NativeType("char const *") CharSequence source_text, @NativeType("shaderc_shader_kind") int shader_kind, @NativeType("char const *") CharSequence input_file_name, @NativeType("char const *") CharSequence entry_point_name, @NativeType("shaderc_compile_options_t const") long additional_options) {<NEW_LINE>MemoryStack stack = stackGet();<NEW_LINE>int stackPointer = stack.getPointer();<NEW_LINE>try {<NEW_LINE>int source_textEncodedLength = stack.nUTF8(source_text, false);<NEW_LINE>long source_textEncoded = stack.getPointerAddress();<NEW_LINE><MASK><NEW_LINE>long input_file_nameEncoded = stack.getPointerAddress();<NEW_LINE>stack.nUTF8(entry_point_name, true);<NEW_LINE>long entry_point_nameEncoded = stack.getPointerAddress();<NEW_LINE>return nshaderc_compile_into_spv_assembly(compiler, source_textEncoded, source_textEncodedLength, shader_kind, input_file_nameEncoded, entry_point_nameEncoded, additional_options);<NEW_LINE>} finally {<NEW_LINE>stack.setPointer(stackPointer);<NEW_LINE>}<NEW_LINE>}
stack.nUTF8(input_file_name, true);
928,834
private void dynInit(int C_BPartner_ID) {<NEW_LINE>log.config("C_BPartner_ID=" + C_BPartner_ID);<NEW_LINE>if (C_BPartner_ID != 0) {<NEW_LINE>int ShelfLifeMinPct = 0;<NEW_LINE>int ShelfLifeMinDays = 0;<NEW_LINE>String sql = "SELECT bp.ShelfLifeMinPct, bpp.ShelfLifeMinPct, bpp.ShelfLifeMinDays " + "FROM C_BPartner bp " + " LEFT OUTER JOIN C_BPartner_Product bpp" + " ON (bp.C_BPartner_ID=bpp.C_BPartner_ID AND bpp.M_Product_ID=?) " + "WHERE bp.C_BPartner_ID=?";<NEW_LINE>PreparedStatement pstmt = null;<NEW_LINE>ResultSet rs = null;<NEW_LINE>try {<NEW_LINE>pstmt = DB.prepareStatement(sql, null);<NEW_LINE>pstmt.setInt(1, m_M_Product_ID);<NEW_LINE>pstmt.setInt(2, C_BPartner_ID);<NEW_LINE>rs = pstmt.executeQuery();<NEW_LINE>if (rs.next()) {<NEW_LINE>// BP<NEW_LINE>ShelfLifeMinPct = rs.getInt(1);<NEW_LINE>// BP_P<NEW_LINE>int <MASK><NEW_LINE>if (// overwrite<NEW_LINE>pct > 0)<NEW_LINE>ShelfLifeMinDays = pct;<NEW_LINE>ShelfLifeMinDays = rs.getInt(3);<NEW_LINE>}<NEW_LINE>} catch (Exception e) {<NEW_LINE>log.log(Level.SEVERE, sql, e);<NEW_LINE>} finally {<NEW_LINE>DB.close(rs, pstmt);<NEW_LINE>rs = null;<NEW_LINE>pstmt = null;<NEW_LINE>}<NEW_LINE>if (ShelfLifeMinPct > 0) {<NEW_LINE>m_sqlMinLife = " AND COALESCE(TRUNC(((daysbetween(asi.GuaranteeDate, SYSDATE))/p.GuaranteeDays)*100),0)>=" + ShelfLifeMinPct;<NEW_LINE>log.config("PAttributeInstance.dynInit - ShelfLifeMinPct=" + ShelfLifeMinPct);<NEW_LINE>}<NEW_LINE>if (ShelfLifeMinDays > 0) {<NEW_LINE>m_sqlMinLife += " AND COALESCE((daysbetween(asi.GuaranteeDate, SYSDATE)),0)>=" + ShelfLifeMinDays;<NEW_LINE>log.config("PAttributeInstance.dynInit - ShelfLifeMinDays=" + ShelfLifeMinDays);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// BPartner != 0<NEW_LINE>m_sql = // oldest, smallest first<NEW_LINE>m_table.prepareTable(s_layout, s_sqlFrom, m_M_Warehouse_ID == 0 ? s_sqlWhereWithoutWarehouse : s_sqlWhere, false, "s") + " ORDER BY asi.GuaranteeDate, s.QtyOnHand";<NEW_LINE>//<NEW_LINE>m_table.addEventListener(Events.ON_SELECT, this);<NEW_LINE>//<NEW_LINE>refresh();<NEW_LINE>}
pct = rs.getInt(2);
1,126,570
private void generateRemoveGcRoot(Expr slotExpr) {<NEW_LINE>if (stackVariable == null) {<NEW_LINE>throw new IllegalStateException("Call to ShadowStack.removeGCRoot must be dominated by " + "Mutator.allocStack");<NEW_LINE>}<NEW_LINE>slotExpr.acceptVisitor(this);<NEW_LINE>WasmExpression slotOffset = getSlotOffset(result);<NEW_LINE>WasmExpression address = new WasmGetLocal(stackVariable);<NEW_LINE>if (!(slotOffset instanceof WasmInt32Constant)) {<NEW_LINE>address = new WasmIntBinary(WasmIntType.INT32, WasmIntBinaryOperation.ADD, address, slotOffset);<NEW_LINE>}<NEW_LINE>WasmStoreInt32 store = new WasmStoreInt32(4, address, new WasmInt32Constant<MASK><NEW_LINE>if (slotOffset instanceof WasmInt32Constant) {<NEW_LINE>store.setOffset(((WasmInt32Constant) slotOffset).getValue());<NEW_LINE>}<NEW_LINE>result = store;<NEW_LINE>}
(0), WasmInt32Subtype.INT32);
1,518,217
public void publish(final String topic) throws TubeClientException {<NEW_LINE>checkServiceStatus();<NEW_LINE>StringBuilder sBuilder = new StringBuilder(512);<NEW_LINE>try {<NEW_LINE>logger.info(sBuilder.append("[Publish begin 1] publish topic ").append(topic).append(", address = ").append(this.toString<MASK><NEW_LINE>sBuilder.delete(0, sBuilder.length());<NEW_LINE>AtomicInteger curPubCnt = this.publishTopics.get(topic);<NEW_LINE>if (curPubCnt == null) {<NEW_LINE>AtomicInteger tmpPubCnt = new AtomicInteger(0);<NEW_LINE>curPubCnt = this.publishTopics.putIfAbsent(topic, tmpPubCnt);<NEW_LINE>if (curPubCnt == null) {<NEW_LINE>curPubCnt = tmpPubCnt;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (curPubCnt.incrementAndGet() == 1) {<NEW_LINE>long curTime = System.currentTimeMillis();<NEW_LINE>new ProducerHeartbeatTask().run();<NEW_LINE>logger.info(sBuilder.append("[Publish begin 1] already get meta info, topic: ").append(topic).append(", waste time ").append(System.currentTimeMillis() - curTime).append(" Ms").toString());<NEW_LINE>sBuilder.delete(0, sBuilder.length());<NEW_LINE>}<NEW_LINE>if (topicPartitionMap.get(topic) == null) {<NEW_LINE>throw new TubeClientException(sBuilder.append("Publish topic failure, make sure the topic ").append(topic).append(" exist or acceptPublish and try later!").toString());<NEW_LINE>}<NEW_LINE>} finally {<NEW_LINE>if (isStartHeart.compareAndSet(false, true)) {<NEW_LINE>heartbeatService.scheduleWithFixedDelay(new ProducerHeartbeatTask(), 5L, tubeClientConfig.getHeartbeatPeriodMs(), TimeUnit.MILLISECONDS);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
()).toString());
442,102
private void updateLayout() {<NEW_LINE>if (!isShowingJustFolders()) {<NEW_LINE>int filesCount = 0, foldersCount = 0;<NEW_LINE>int count = mFileListAdapter.getCount();<NEW_LINE>OCFile file;<NEW_LINE>for (int i = 0; i < count; i++) {<NEW_LINE>file = (OCFile) mFileListAdapter.getItem(i);<NEW_LINE>if (file.isFolder()) {<NEW_LINE>foldersCount++;<NEW_LINE>} else {<NEW_LINE>if (!file.isHidden()) {<NEW_LINE>filesCount++;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (count == 0) {<NEW_LINE>int emptyMessage;<NEW_LINE>if (mFileListOption == FileListOption.AV_OFFLINE) {<NEW_LINE>emptyMessage = R.string.file_list_empty_available_offline;<NEW_LINE>} else if (mFileListOption == FileListOption.SHARED_BY_LINK) {<NEW_LINE>emptyMessage = R.string.file_list_empty_shared_by_links;<NEW_LINE>} else {<NEW_LINE>emptyMessage = R.string.file_list_empty;<NEW_LINE>}<NEW_LINE>setMessageForEmptyList(getString(emptyMessage));<NEW_LINE>}<NEW_LINE>// decide grid vs list view<NEW_LINE>OwnCloudVersion version = AccountUtils.getServerVersion(((FileActivity) mContainerActivity).getAccount());<NEW_LINE>if (version != null && isGridViewPreferred(mFile)) {<NEW_LINE>switchToGridView();<NEW_LINE>mSortOptionsView.setViewTypeSelected(ViewType.VIEW_TYPE_GRID);<NEW_LINE>} else {<NEW_LINE>switchToListView();<NEW_LINE>mSortOptionsView.setViewTypeSelected(ViewType.VIEW_TYPE_LIST);<NEW_LINE>}<NEW_LINE>// set footer text<NEW_LINE>setFooterText<MASK><NEW_LINE>}<NEW_LINE>invalidateActionMode();<NEW_LINE>clearLocalSearchView();<NEW_LINE>}
(generateFooterText(filesCount, foldersCount));
193,672
private void drawIcon(MatrixStack matrices, String line, int y, float opacity) {<NEW_LINE>if (METEOR_PREFIX_REGEX.matcher(line).find()) {<NEW_LINE>RenderSystem.setShaderTexture(0, METEOR_CHAT_ICON);<NEW_LINE>matrices.push();<NEW_LINE>RenderSystem.setShaderColor(1, 1, 1, opacity);<NEW_LINE>matrices.translate(0, y, 0);<NEW_LINE>matrices.scale(0.125f, 0.125f, 1);<NEW_LINE>DrawableHelper.drawTexture(matrices, 0, 0, 0f, 0f, <MASK><NEW_LINE>RenderSystem.setShaderColor(1, 1, 1, 1);<NEW_LINE>matrices.pop();<NEW_LINE>return;<NEW_LINE>} else if (BARITONE_PREFIX_REGEX.matcher(line).find()) {<NEW_LINE>RenderSystem.setShaderTexture(0, BARITONE_CHAT_ICON);<NEW_LINE>matrices.push();<NEW_LINE>RenderSystem.setShaderColor(1, 1, 1, opacity);<NEW_LINE>matrices.translate(0, y, 10);<NEW_LINE>matrices.scale(0.125f, 0.125f, 1);<NEW_LINE>DrawableHelper.drawTexture(matrices, 0, 0, 0f, 0f, 64, 64, 64, 64);<NEW_LINE>RenderSystem.setShaderColor(1, 1, 1, 1);<NEW_LINE>matrices.pop();<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>Identifier skin = getMessageTexture(line);<NEW_LINE>if (skin != null) {<NEW_LINE>RenderSystem.setShaderColor(1, 1, 1, opacity);<NEW_LINE>RenderSystem.setShaderTexture(0, skin);<NEW_LINE>DrawableHelper.drawTexture(matrices, 0, y, 8, 8, 8.0F, 8.0F, 8, 8, 64, 64);<NEW_LINE>DrawableHelper.drawTexture(matrices, 0, y, 8, 8, 40.0F, 8.0F, 8, 8, 64, 64);<NEW_LINE>RenderSystem.setShaderColor(1, 1, 1, 1);<NEW_LINE>}<NEW_LINE>}
64, 64, 64, 64);
971,751
private void tableswitch(Locatable locatable, SortedMap<Integer, CodeContext.Offset> caseLabelMap, Offset switchOffset, Offset defaultLabelOffset) {<NEW_LINE>final int low = (Integer) caseLabelMap.firstKey();<NEW_LINE>final int high = (Integer) caseLabelMap.lastKey();<NEW_LINE>this.addLineNumberOffset(locatable);<NEW_LINE>this.getCodeContext().popIntOperand();<NEW_LINE>this.write(Opcode.TABLESWITCH);<NEW_LINE>new Padder(this.getCodeContext()).set();<NEW_LINE>this.writeOffset(switchOffset, defaultLabelOffset);<NEW_LINE>this.writeInt(low);<NEW_LINE>this.writeInt(high);<NEW_LINE>int cur = low;<NEW_LINE>for (Map.Entry<Integer, CodeContext.Offset> me : caseLabelMap.entrySet()) {<NEW_LINE>int caseLabelValue = <MASK><NEW_LINE>CodeContext.Offset caseLabelOffset = (CodeContext.Offset) me.getValue();<NEW_LINE>while (cur < caseLabelValue) {<NEW_LINE>this.writeOffset(switchOffset, defaultLabelOffset);<NEW_LINE>++cur;<NEW_LINE>}<NEW_LINE>this.writeOffset(switchOffset, caseLabelOffset);<NEW_LINE>++cur;<NEW_LINE>}<NEW_LINE>}
(Integer) me.getKey();
725,186
private ExportResult<PhotosContainerResource> requestAlbums(TokensAndUrlAuthData authData, PaginationData paginationData) throws IOException {<NEW_LINE>ImmutableList.Builder<PhotoAlbum> albumBuilder = ImmutableList.builder();<NEW_LINE>List<IdOnlyContainerResource> albumIds = new ArrayList<>();<NEW_LINE>int page = paginationData == null ? 0 : ((IntPaginationToken) paginationData).getStart();<NEW_LINE>String url = format(ALBUMS_URL_TEMPLATE, page);<NEW_LINE>List<Map<String, Object>> items = requestData(authData, url);<NEW_LINE>// Request result doesn't indicate if it's the last page<NEW_LINE>boolean hasMore = (items != null && items.size() != 0);<NEW_LINE>for (Map<String, Object> item : items) {<NEW_LINE>albumBuilder.add(new PhotoAlbum((String) item.get("id"), (String) item.get("title"), (String) item.get("description")));<NEW_LINE>// Save album id for recalling export to get all the photos in albums<NEW_LINE>albumIds.add(new IdOnlyContainerResource((String) item.get("id")));<NEW_LINE>}<NEW_LINE>if (page == 0) {<NEW_LINE>// For checking non-album photos. Their export should be performed after all the others<NEW_LINE>// Album will be created later<NEW_LINE>albumIds.add(new IdOnlyContainerResource(DEFAULT_ALBUM_ID));<NEW_LINE>}<NEW_LINE>PaginationData newPage = null;<NEW_LINE>if (hasMore) {<NEW_LINE>newPage = new IntPaginationToken(page + 1);<NEW_LINE>int start = ((IntPaginationToken) newPage).getStart();<NEW_LINE>monitor.info(() -> format("albums size: %s, newPage: %s", items<MASK><NEW_LINE>}<NEW_LINE>PhotosContainerResource photosContainerResource = new PhotosContainerResource(albumBuilder.build(), null);<NEW_LINE>ContinuationData continuationData = new ContinuationData(newPage);<NEW_LINE>albumIds.forEach(continuationData::addContainerResource);<NEW_LINE>ExportResult.ResultType resultType = ExportResult.ResultType.CONTINUE;<NEW_LINE>if (newPage == null) {<NEW_LINE>resultType = ExportResult.ResultType.END;<NEW_LINE>}<NEW_LINE>return new ExportResult<>(resultType, photosContainerResource, continuationData);<NEW_LINE>}
.size(), start));
331,158
public void enterScenarioOutline(KarateParser.ScenarioOutlineContext ctx) {<NEW_LINE>FeatureSection section = new FeatureSection();<NEW_LINE>ScenarioOutline outline = new ScenarioOutline(feature, section);<NEW_LINE>outline.setLine(getActualLine(ctx.SCENARIO_OUTLINE()));<NEW_LINE>section.setScenarioOutline(outline);<NEW_LINE>feature.addSection(section);<NEW_LINE>if (ctx.tags() != null) {<NEW_LINE>outline.setTags(toTags(-1, ctx.tags().TAGS()));<NEW_LINE>}<NEW_LINE>if (ctx.scenarioDescription() != null) {<NEW_LINE>outline.setDescription(ctx.scenarioDescription().getText());<NEW_LINE>StringUtils.Pair pair = StringUtils.splitByFirstLineFeed(ctx.scenarioDescription().getText());<NEW_LINE>outline.setName(pair.left);<NEW_LINE>outline.setDescription(pair.right);<NEW_LINE>}<NEW_LINE>List<Step> steps = toSteps(null, ctx.step());<NEW_LINE>outline.setSteps(steps);<NEW_LINE>if (logger.isTraceEnabled()) {<NEW_LINE>logger.trace("outline steps: {}", steps);<NEW_LINE>}<NEW_LINE>List<ExamplesTable> examples = new ArrayList(ctx.examples().size());<NEW_LINE>outline.setExamplesTables(examples);<NEW_LINE>for (KarateParser.ExamplesContext ec : ctx.examples()) {<NEW_LINE>Table table = toTable(ec.table());<NEW_LINE>ExamplesTable example = new ExamplesTable(outline, table);<NEW_LINE>examples.add(example);<NEW_LINE>if (ec.tags() != null) {<NEW_LINE>example.setTags(toTags(-1, ec.tags().TAGS()));<NEW_LINE>}<NEW_LINE>if (logger.isTraceEnabled()) {<NEW_LINE>logger.trace(<MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
"example rows: {}", table.getRows());