idx
int32
46
1.86M
input
stringlengths
321
6.6k
target
stringlengths
9
1.24k
80,562
public void loadConfiguration(InputStream inputStream) {<NEW_LINE>Properties properties = new Properties();<NEW_LINE>try {<NEW_LINE>properties.load(inputStream);<NEW_LINE>} catch (IOException e) {<NEW_LINE>throw new IllegalArgumentException("Restlet Cloud configuration file error. See exception for details.", e);<NEW_LINE>}<NEW_LINE>this.agentServiceUrl = <MASK><NEW_LINE>this.agentLogin = properties.getProperty("agent.login");<NEW_LINE>this.agentPassword = getRequiredProperty(properties, "agent.password").toCharArray();<NEW_LINE>this.agentCellId = getRequiredIntegerProperty(properties, "agent.cellId");<NEW_LINE>this.agentCellVersion = getRequiredIntegerProperty(properties, "agent.cellVersion");<NEW_LINE>this.reverseProxyEnabled = Boolean.valueOf(getRequiredProperty(properties, "reverseProxy.enabled"));<NEW_LINE>if (this.reverseProxyEnabled) {<NEW_LINE>this.reverseProxyTargetUrl = getRequiredProperty(properties, "reverseProxy.targetUrl");<NEW_LINE>}<NEW_LINE>}
properties.getProperty("agent.serviceUrl", DEFAULT_AGENT_SERVICE_URL);
1,230,528
private HttpRequest.Builder testGroupParametersRequestBuilder(Integer requiredStringGroup, Boolean requiredBooleanGroup, Long requiredInt64Group, Integer stringGroup, Boolean booleanGroup, Long int64Group) throws ApiException {<NEW_LINE>// verify the required parameter 'requiredStringGroup' is set<NEW_LINE>if (requiredStringGroup == null) {<NEW_LINE>throw new ApiException(400, "Missing the required parameter 'requiredStringGroup' when calling testGroupParameters");<NEW_LINE>}<NEW_LINE>// verify the required parameter 'requiredBooleanGroup' is set<NEW_LINE>if (requiredBooleanGroup == null) {<NEW_LINE>throw new ApiException(400, "Missing the required parameter 'requiredBooleanGroup' when calling testGroupParameters");<NEW_LINE>}<NEW_LINE>// verify the required parameter 'requiredInt64Group' is set<NEW_LINE>if (requiredInt64Group == null) {<NEW_LINE>throw new ApiException(400, "Missing the required parameter 'requiredInt64Group' when calling testGroupParameters");<NEW_LINE>}<NEW_LINE>HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder();<NEW_LINE>String localVarPath = "/fake";<NEW_LINE>List<Pair> localVarQueryParams = new ArrayList<>();<NEW_LINE>localVarQueryParams.addAll(ApiClient.parameterToPairs("required_string_group", requiredStringGroup));<NEW_LINE>localVarQueryParams.addAll(ApiClient.parameterToPairs("required_int64_group", requiredInt64Group));<NEW_LINE>localVarQueryParams.addAll(ApiClient.parameterToPairs("string_group", stringGroup));<NEW_LINE>localVarQueryParams.addAll(ApiClient.parameterToPairs("int64_group", int64Group));<NEW_LINE>if (!localVarQueryParams.isEmpty()) {<NEW_LINE>StringJoiner queryJoiner = new StringJoiner("&");<NEW_LINE>localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue()));<NEW_LINE>localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' <MASK><NEW_LINE>} else {<NEW_LINE>localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath));<NEW_LINE>}<NEW_LINE>if (requiredBooleanGroup != null) {<NEW_LINE>localVarRequestBuilder.header("required_boolean_group", requiredBooleanGroup.toString());<NEW_LINE>}<NEW_LINE>if (booleanGroup != null) {<NEW_LINE>localVarRequestBuilder.header("boolean_group", booleanGroup.toString());<NEW_LINE>}<NEW_LINE>localVarRequestBuilder.header("Accept", "application/json");<NEW_LINE>localVarRequestBuilder.method("DELETE", HttpRequest.BodyPublishers.noBody());<NEW_LINE>if (memberVarReadTimeout != null) {<NEW_LINE>localVarRequestBuilder.timeout(memberVarReadTimeout);<NEW_LINE>}<NEW_LINE>if (memberVarInterceptor != null) {<NEW_LINE>memberVarInterceptor.accept(localVarRequestBuilder);<NEW_LINE>}<NEW_LINE>return localVarRequestBuilder;<NEW_LINE>}
+ queryJoiner.toString()));
1,637,808
final GetMaintenanceWindowTaskResult executeGetMaintenanceWindowTask(GetMaintenanceWindowTaskRequest getMaintenanceWindowTaskRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(getMaintenanceWindowTaskRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<GetMaintenanceWindowTaskRequest> request = null;<NEW_LINE>Response<GetMaintenanceWindowTaskResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new GetMaintenanceWindowTaskRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(getMaintenanceWindowTaskRequest));<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, "SSM");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "GetMaintenanceWindowTask");<NEW_LINE>request.<MASK><NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<GetMaintenanceWindowTaskResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new GetMaintenanceWindowTaskResultJsonUnmarshaller());<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);
657,950
@ResponseBody<NEW_LINE>public Map<String, Object> upload(@RequestAttribute SysSite site, @SessionAttribute SysUser user, MultipartFile file, HttpServletRequest request) {<NEW_LINE>Map<String, Object> result = new HashMap<>();<NEW_LINE>result.put("success", false);<NEW_LINE>if (null != file && !file.isEmpty() && null != user) {<NEW_LINE>String originalName = file.getOriginalFilename();<NEW_LINE>String suffix = CmsFileUtils.getSuffix(originalName);<NEW_LINE>if (ArrayUtils.contains(UeditorAdminController.ALLOW_FILES, suffix)) {<NEW_LINE>String fileName = CmsFileUtils.getUploadFileName(suffix);<NEW_LINE>String filePath = siteComponent.getWebFilePath(site, fileName);<NEW_LINE>try {<NEW_LINE>CmsFileUtils.upload(file, filePath);<NEW_LINE>result.put("success", true);<NEW_LINE>result.put("fileName", fileName);<NEW_LINE>String fileType = CmsFileUtils.getFileType(suffix);<NEW_LINE>result.put("fileType", fileType);<NEW_LINE>result.put("fileSize", file.getSize());<NEW_LINE>FileSize fileSize = <MASK><NEW_LINE>logUploadService.save(new LogUpload(site.getId(), user.getId(), LogLoginService.CHANNEL_WEB, originalName, fileType, file.getSize(), fileSize.getWidth(), fileSize.getHeight(), RequestUtils.getIpAddress(request), CommonUtils.getDate(), fileName));<NEW_LINE>} catch (IllegalStateException | IOException e) {<NEW_LINE>log.error(e.getMessage(), e);<NEW_LINE>result.put("error", e.getMessage());<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>result.put("error", "fileTypeNotAllowed");<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return result;<NEW_LINE>}
CmsFileUtils.getFileSize(filePath, suffix);
1,200,876
Propagation.Factory sleuthPropagationWithB3Baggage(BaggagePropagation.FactoryBuilder factoryBuilder, @Qualifier(BAGGAGE_KEYS) List<String> baggageKeys, @Qualifier(LOCAL_KEYS) List<String> localKeys, @Qualifier(PROPAGATION_KEYS) List<String> propagationKeys, SleuthBaggageProperties sleuthBaggageProperties, SleuthPropagationProperties sleuthPropagationProperties, PropagationFactorySupplier supplier, @Nullable List<BaggagePropagationCustomizer> baggagePropagationCustomizers) {<NEW_LINE>Set<String> localFields = redirectOldPropertyToNew(LOCAL_KEYS, localKeys, "spring.sleuth.baggage.local-fields", sleuthBaggageProperties.getLocalFields());<NEW_LINE>for (String fieldName : localFields) {<NEW_LINE>factoryBuilder.add(SingleBaggageField.local(BaggageField.create(fieldName)));<NEW_LINE>}<NEW_LINE>Set<String> remoteFields = redirectOldPropertyToNew(PROPAGATION_KEYS, propagationKeys, "spring.sleuth.baggage.remote-fields", sleuthBaggageProperties.getRemoteFields());<NEW_LINE>for (String fieldName : remoteFields) {<NEW_LINE>factoryBuilder.add(SingleBaggageField.remote(BaggageField.create(fieldName)));<NEW_LINE>}<NEW_LINE>if (!baggageKeys.isEmpty()) {<NEW_LINE>logger.warn("'" + BAGGAGE_KEYS + "' will be removed in a future release.\n" + "To change header names define a @Bean of type " + <MASK><NEW_LINE>for (String key : baggageKeys) {<NEW_LINE>// for<NEW_LINE>factoryBuilder.// for<NEW_LINE>add(// HTTP<NEW_LINE>SingleBaggageField.newBuilder(BaggageField.create(key)).addKeyName("baggage-" + key).// for messaging<NEW_LINE>addKeyName("baggage_" + key).build());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (baggagePropagationCustomizers != null) {<NEW_LINE>for (BaggagePropagationCustomizer customizer : baggagePropagationCustomizers) {<NEW_LINE>customizer.customize(factoryBuilder);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>Propagation.Factory delegate = factoryBuilder.build();<NEW_LINE>Propagation.Factory factoryFromSupplier = supplier.get();<NEW_LINE>final boolean hasB3 = sleuthPropagationProperties.getType().contains(PropagationType.B3);<NEW_LINE>if (hasB3) {<NEW_LINE>return delegate;<NEW_LINE>}<NEW_LINE>return new BaggageFactoryWrapper(delegate, factoryFromSupplier);<NEW_LINE>}
SingleBaggageField.class.getName());
226,353
protected List<MCostDetail> createCostDetails() {<NEW_LINE>final String idColumnName;<NEW_LINE>if (model instanceof MMatchPO) {<NEW_LINE>idColumnName = I_C_OrderLine.COLUMNNAME_C_OrderLine_ID;<NEW_LINE>} else if (model instanceof MMatchInv) {<NEW_LINE>idColumnName = I_C_InvoiceLine.COLUMNNAME_C_InvoiceLine_ID;<NEW_LINE>} else {<NEW_LINE>idColumnName = model.get_TableName() + "_ID";<NEW_LINE>}<NEW_LINE>List<MCostDetail> list = new ArrayList<MCostDetail>();<NEW_LINE>if (model.isSOTrx() == true || model instanceof MInventoryLine || model instanceof MMovementLine) {<NEW_LINE>List<CostComponent> costComponents = getCalculatedCosts();<NEW_LINE>for (CostComponent costComponent : costComponents) {<NEW_LINE>MCostDetail cost = new MCostDetail(transaction, accountSchema.getC_AcctSchema_ID(), dimension.getM_CostType_ID(), dimension.getM_CostElement_ID(), costComponent.getAmount(), Env.ZERO, costComponent.getQty(), model.get_TrxName());<NEW_LINE>if (!cost.set_ValueOfColumnReturningBoolean(idColumnName, model.get_ID()))<NEW_LINE>throw new AdempiereException("Cannot set " + idColumnName);<NEW_LINE>StringBuilder description = new StringBuilder();<NEW_LINE>if (!Util.isEmpty(model.getDescription(), true))<NEW_LINE>description.append(model.getDescription());<NEW_LINE>if (model.isSOTrx() != false) {<NEW_LINE>description.append(model.isSOTrx() ? "(|->)" : "(|<-)");<NEW_LINE>}<NEW_LINE>if (// TODO: need evaluate anca<NEW_LINE>model.isSOTrx() != false)<NEW_LINE>cost.setIsSOTrx(model.isSOTrx());<NEW_LINE>else<NEW_LINE>cost.setIsSOTrx(model.isSOTrx());<NEW_LINE>cost.<MASK><NEW_LINE>cost.setDescription(description.toString());<NEW_LINE>cost.saveEx();<NEW_LINE>list.add(cost);<NEW_LINE>}<NEW_LINE>} else // qty and amt is take from documentline<NEW_LINE>{<NEW_LINE>MCostDetail cost = new MCostDetail(transaction, accountSchema.getC_AcctSchema_ID(), dimension.getM_CostType_ID(), dimension.getM_CostElement_ID(), costThisLevel.multiply(model.getMovementQty()), Env.ZERO, model.getMovementQty(), model.get_TrxName());<NEW_LINE>int id;<NEW_LINE>if (model instanceof MMatchPO) {<NEW_LINE>I_M_InOutLine inOutLine = transaction.getM_InOutLine();<NEW_LINE>I_C_OrderLine orderLine = inOutLine.getC_OrderLine();<NEW_LINE>id = orderLine.getC_OrderLine_ID();<NEW_LINE>} else {<NEW_LINE>id = model.get_ID();<NEW_LINE>}<NEW_LINE>if (!cost.set_ValueOfColumnReturningBoolean(idColumnName, id))<NEW_LINE>throw new AdempiereException("Cannot set " + idColumnName);<NEW_LINE>if (model.isSOTrx() != false)<NEW_LINE>cost.setIsSOTrx(model.isSOTrx());<NEW_LINE>else<NEW_LINE>cost.setIsSOTrx(model.isSOTrx());<NEW_LINE>cost.setM_Transaction_ID(transaction.get_ID());<NEW_LINE>cost.saveEx();<NEW_LINE>list.add(cost);<NEW_LINE>}<NEW_LINE>return list;<NEW_LINE>}
setM_Transaction_ID(transaction.get_ID());
237,133
private void annotateCalls(Node n) {<NEW_LINE>checkState(n.isCall() || n.isOptChainCall() || n.isTaggedTemplateLit(), n);<NEW_LINE>// Keep track of of the "this" context of a call. A call without an<NEW_LINE>// explicit "this" is a free call.<NEW_LINE>Node callee = n.getFirstChild();<NEW_LINE>// ignore cast nodes.<NEW_LINE>while (callee.isCast()) {<NEW_LINE>callee = callee.getFirstChild();<NEW_LINE>}<NEW_LINE>if (!isNormalOrOptChainGet(callee)) {<NEW_LINE>// This call originally was not passed a `this` value.<NEW_LINE>// Inlining could change the callee into a property reference of some kind.<NEW_LINE>// The code printer will recognize the `FREE_CALL` property and wrap the real callee with<NEW_LINE>// `(0, real.callee)(args)` when necessary to avoid changing the calling behavior.<NEW_LINE>n.<MASK><NEW_LINE>if (callee.isName() && "eval".equals(callee.getString())) {<NEW_LINE>// Keep track of the context in which eval is called. It is important<NEW_LINE>// to distinguish between "(0, eval)()" and "eval()".<NEW_LINE>callee.putBooleanProp(Node.DIRECT_EVAL, true);<NEW_LINE>} else if (callee.isComma() && callee.getFirstChild().isNumber()) {<NEW_LINE>// The input code may actually already contain calls of the form<NEW_LINE>// `(0, real.callee)(arg1, arg2)`. For example, the TypeScript compiler outputs code like<NEW_LINE>// this in some cases.<NEW_LINE>// This makes it hard for us to connect calls with the called functions, though, so we<NEW_LINE>// will simplify these cases. The `FREE_CALL` property we've just applied will tell the<NEW_LINE>// code printer to put this wrapping back later.<NEW_LINE>final Node realCallee = callee.getSecondChild();<NEW_LINE>callee.replaceWith(realCallee.detach());<NEW_LINE>// TODO(bradfordcsmith): Why do I get an NPE if I try to report this code change?<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
putBooleanProp(Node.FREE_CALL, true);
1,485,518
// findEntitiesIteratively<NEW_LINE>public List<EntityDetail> findEntitiesIteratively(List<String> validTypeNames, SearchProperties searchProperties, MatchCriteria matchCriteria) throws InvalidParameterException, RepositoryErrorException, FunctionNotSupportedException {<NEW_LINE>final String methodName = "findEntitiesIteratively";<NEW_LINE>List<EntityDetail> returnEntities = null;<NEW_LINE>// Iterate over the validTypeNames and perform a per-type query for each valid type<NEW_LINE>for (String typeName : validTypeNames) {<NEW_LINE>TypeDef typeDef = <MASK><NEW_LINE>// Invoke a type specific search. The search will expect the regexp to match fully to the value.<NEW_LINE>List<EntityDetail> entitiesForCurrentType = graphStore.findEntitiesForType(typeName, searchProperties, true);<NEW_LINE>if (entitiesForCurrentType != null && !entitiesForCurrentType.isEmpty()) {<NEW_LINE>if (returnEntities == null) {<NEW_LINE>returnEntities = new ArrayList<>();<NEW_LINE>}<NEW_LINE>log.info("{}: for type {} found {} entities", methodName, typeDef.getName(), entitiesForCurrentType.size());<NEW_LINE>returnEntities.addAll(entitiesForCurrentType);<NEW_LINE>} else {<NEW_LINE>log.info("{}: for type {} found no entities", methodName, typeDef.getName());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return returnEntities;<NEW_LINE>}
repositoryHelper.getTypeDefByName(repositoryName, typeName);
670,054
protected void onFinishInflate() {<NEW_LINE>super.onFinishInflate();<NEW_LINE>this.subjectView = findViewById(R.id.subject);<NEW_LINE>this.fromView = findViewById(R.id.from_text);<NEW_LINE>this.dateView = <MASK><NEW_LINE>this.deliveryStatusIndicator = new DeliveryStatusView(findViewById(R.id.delivery_indicator));<NEW_LINE>this.contactPhotoImage = findViewById(R.id.contact_photo_image);<NEW_LINE>this.archivedBadgeView = findViewById(R.id.archived_badge);<NEW_LINE>this.requestBadgeView = findViewById(R.id.request_badge);<NEW_LINE>this.unreadIndicator = findViewById(R.id.unread_indicator);<NEW_LINE>ViewUtil.setTextViewGravityStart(this.fromView, getContext());<NEW_LINE>ViewUtil.setTextViewGravityStart(this.subjectView, getContext());<NEW_LINE>}
findViewById(R.id.date);
427,515
public static void response(ServerConnection c, String stmt, int aliasIndex) {<NEW_LINE>String alias = ParseUtil.parseAlias(stmt, aliasIndex);<NEW_LINE>if (alias == null) {<NEW_LINE>alias = ORG_NAME;<NEW_LINE>}<NEW_LINE>ByteBuffer buffer = c.allocate();<NEW_LINE>// write header<NEW_LINE>buffer = header.write(buffer, c, true);<NEW_LINE>// write fields<NEW_LINE>byte packetId = header.packetId;<NEW_LINE>FieldPacket field = PacketUtil.getField(<MASK><NEW_LINE>field.packetId = ++packetId;<NEW_LINE>buffer = field.write(buffer, c, true);<NEW_LINE>// write eof<NEW_LINE>EOFPacket eof = new EOFPacket();<NEW_LINE>eof.packetId = ++packetId;<NEW_LINE>buffer = eof.write(buffer, c, true);<NEW_LINE>// write rows<NEW_LINE>RowDataPacket row = new RowDataPacket(FIELD_COUNT);<NEW_LINE>row.add(LongUtil.toBytes(c.getLastInsertId()));<NEW_LINE>row.packetId = ++packetId;<NEW_LINE>buffer = row.write(buffer, c, true);<NEW_LINE>// write last eof<NEW_LINE>EOFPacket lastEof = new EOFPacket();<NEW_LINE>lastEof.packetId = ++packetId;<NEW_LINE>buffer = lastEof.write(buffer, c, true);<NEW_LINE>// post write<NEW_LINE>c.write(buffer);<NEW_LINE>}
alias, ORG_NAME, Fields.FIELD_TYPE_LONGLONG);
1,177,352
public Builder mergeFrom(emu.grasscutter.net.proto.PlayerEnterSceneInfoNotifyOuterClass.PlayerEnterSceneInfoNotify other) {<NEW_LINE>if (other == emu.grasscutter.net.proto.PlayerEnterSceneInfoNotifyOuterClass.PlayerEnterSceneInfoNotify.getDefaultInstance())<NEW_LINE>return this;<NEW_LINE>if (other.getCurAvatarEntityId() != 0) {<NEW_LINE>setCurAvatarEntityId(other.getCurAvatarEntityId());<NEW_LINE>}<NEW_LINE>if (avatarEnterInfoBuilder_ == null) {<NEW_LINE>if (!other.avatarEnterInfo_.isEmpty()) {<NEW_LINE>if (avatarEnterInfo_.isEmpty()) {<NEW_LINE>avatarEnterInfo_ = other.avatarEnterInfo_;<NEW_LINE>bitField0_ = (bitField0_ & ~0x00000001);<NEW_LINE>} else {<NEW_LINE>ensureAvatarEnterInfoIsMutable();<NEW_LINE>avatarEnterInfo_.addAll(other.avatarEnterInfo_);<NEW_LINE>}<NEW_LINE>onChanged();<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>if (!other.avatarEnterInfo_.isEmpty()) {<NEW_LINE>if (avatarEnterInfoBuilder_.isEmpty()) {<NEW_LINE>avatarEnterInfoBuilder_.dispose();<NEW_LINE>avatarEnterInfoBuilder_ = null;<NEW_LINE>avatarEnterInfo_ = other.avatarEnterInfo_;<NEW_LINE>bitField0_ = (bitField0_ & ~0x00000001);<NEW_LINE>avatarEnterInfoBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getAvatarEnterInfoFieldBuilder() : null;<NEW_LINE>} else {<NEW_LINE>avatarEnterInfoBuilder_.addAllMessages(other.avatarEnterInfo_);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (other.hasTeamEnterInfo()) {<NEW_LINE>mergeTeamEnterInfo(other.getTeamEnterInfo());<NEW_LINE>}<NEW_LINE>if (other.hasMpLevelEntityInfo()) {<NEW_LINE>mergeMpLevelEntityInfo(other.getMpLevelEntityInfo());<NEW_LINE>}<NEW_LINE>if (other.getEnterSceneToken() != 0) {<NEW_LINE>setEnterSceneToken(other.getEnterSceneToken());<NEW_LINE>}<NEW_LINE><MASK><NEW_LINE>onChanged();<NEW_LINE>return this;<NEW_LINE>}
this.mergeUnknownFields(other.unknownFields);
410,620
public JMenu createInsertVariableMenu(final JTextComponent editor) {<NEW_LINE>final Collection<MADBoilerPlateVar> boilderPlateVars = MADBoilerPlateVar.getAll(Env.getCtx()).values();<NEW_LINE>if (boilderPlateVars.isEmpty()) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>final JMenu menuVars = new JMenu(Msg.translate(Env.getCtx(), "de.metas.letter.InsertVariable"));<NEW_LINE>final Frame parentFrame = getParentFrame(editor);<NEW_LINE>for (final MADBoilerPlateVar var : boilderPlateVars) {<NEW_LINE>JMenuItem mi = new JMenuItem();<NEW_LINE>mi.setAction(new AbstractAction() {<NEW_LINE><NEW_LINE><MASK><NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void actionPerformed(ActionEvent e) {<NEW_LINE>if (isResolveVariables()) {<NEW_LINE>try {<NEW_LINE>String text = var.evaluate(getAttributes());<NEW_LINE>if (!isHTML())<NEW_LINE>text = MADBoilerPlate.getPlainText(text);<NEW_LINE>insertText(editor, text);<NEW_LINE>} catch (Exception ex) {<NEW_LINE>new ADialogDialog(parentFrame, Msg.getMsg(Env.getCtx(), "Error"), ex.getLocalizedMessage(), JOptionPane.ERROR_MESSAGE);<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>insertText(editor, var.getTagString());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>});<NEW_LINE>String name = var.getName();<NEW_LINE>mi.setText(name);<NEW_LINE>menuVars.add(mi);<NEW_LINE>}<NEW_LINE>//<NEW_LINE>return menuVars;<NEW_LINE>}
private static final long serialVersionUID = -5007856575142340294L;
872,703
public LinkAssociation unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>LinkAssociation linkAssociation = new LinkAssociation();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>JsonToken token = context.getCurrentToken();<NEW_LINE>if (token == null)<NEW_LINE>token = context.nextToken();<NEW_LINE>if (token == VALUE_NULL) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>while (true) {<NEW_LINE>if (token == null)<NEW_LINE>break;<NEW_LINE>if (token == FIELD_NAME || token == START_OBJECT) {<NEW_LINE>if (context.testExpression("GlobalNetworkId", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>linkAssociation.setGlobalNetworkId(context.getUnmarshaller(String.class).unmarshall(context));<NEW_LINE>}<NEW_LINE>if (context.testExpression("DeviceId", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>linkAssociation.setDeviceId(context.getUnmarshaller(String.class).unmarshall(context));<NEW_LINE>}<NEW_LINE>if (context.testExpression("LinkId", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>linkAssociation.setLinkId(context.getUnmarshaller(String.<MASK><NEW_LINE>}<NEW_LINE>if (context.testExpression("LinkAssociationState", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>linkAssociation.setLinkAssociationState(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 linkAssociation;<NEW_LINE>}
class).unmarshall(context));
1,001,808
protected void doCODESIZE() {<NEW_LINE>if (computeGas) {<NEW_LINE>if (op == OpCode.EXTCODESIZE) {<NEW_LINE>gasCost = GasCost.EXT_CODE_SIZE;<NEW_LINE>}<NEW_LINE>spendOpCodeGas();<NEW_LINE>}<NEW_LINE>// EXECUTION PHASE<NEW_LINE>DataWord codeLength;<NEW_LINE>if (op == OpCode.CODESIZE) {<NEW_LINE>// during initialization it will return the initialization code size<NEW_LINE>codeLength = DataWord.valueOf(program.getCode().length);<NEW_LINE>} else {<NEW_LINE>DataWord address = program.stackPop();<NEW_LINE>codeLength = DataWord.valueOf(program.getCodeLengthAt(address));<NEW_LINE>ActivationConfig.<MASK><NEW_LINE>if (activations.isActive(RSKIP90)) {<NEW_LINE>PrecompiledContracts.PrecompiledContract precompiledContract = precompiledContracts.getContractForAddress(activations, address);<NEW_LINE>if (precompiledContract != null) {<NEW_LINE>codeLength = DataWord.valueOf(BigIntegers.asUnsignedByteArray(DataWord.MAX_VALUE));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (isLogEnabled) {<NEW_LINE>hint = "size: " + codeLength;<NEW_LINE>}<NEW_LINE>program.stackPush(codeLength);<NEW_LINE>program.step();<NEW_LINE>}
ForBlock activations = program.getActivations();
1,603,781
public void testTransfer(HttpServletRequest request, PrintWriter out) throws Throwable {<NEW_LINE>Callable<Integer> task = new MBeanCounterCallable();<NEW_LINE>taskFutures.add(executor.schedule(task, 2000, TimeUnit.SECONDS));<NEW_LINE>Callable<<MASK><NEW_LINE>taskFutures.add(executor2.schedule(task2, 2000, TimeUnit.SECONDS));<NEW_LINE>long maxTaskId = 1000;<NEW_LINE>long partitionId = 1;<NEW_LINE>// Invoke the equivalent of:<NEW_LINE>// ObjectName name = new ObjectName("WebSphere:feature=persistentExecutor,type=PersistentExecutorMBean,name=persistentExecutor[default-0],jndiName=concurrent/secondExecutor");<NEW_LINE>// PersistentExecutorMBean proxy = JMX.newMXBeanProxy(mbs, name, PersistentExecutorMBean.class);<NEW_LINE>// int tasksTransfered = proxy.transfer(maxTaskId, partitionId);<NEW_LINE>Object[] params = { maxTaskId, partitionId };<NEW_LINE>int tasksTransfered = (Integer) mbs.invoke(bean2.getObjectName(), "transfer", params, signaturesTransfer);<NEW_LINE>if (tasksTransfered < 1)<NEW_LINE>throw new Exception("No tasks were transfered");<NEW_LINE>}
Integer> task2 = new MBeanCounterCallable();
925,444
private ImmutableSortedMap<String, FileSystemSnapshot> captureOutputs(UnitOfWork work, BeforeExecutionContext context, BeforeExecutionState beforeExecutionState) {<NEW_LINE>ImmutableSortedMap<String, FileSystemSnapshot> unfilteredOutputSnapshotsAfterExecution = outputSnapshotter.snapshotOutputs(work, context.getWorkspace());<NEW_LINE>if (beforeExecutionState.getDetectedOverlappingOutputs().isPresent()) {<NEW_LINE>ImmutableSortedMap<String, FileSystemSnapshot> previousExecutionOutputSnapshots = context.getPreviousExecutionState().map(PreviousExecutionState::getOutputFilesProducedByWork).<MASK><NEW_LINE>ImmutableSortedMap<String, FileSystemSnapshot> unfilteredOutputSnapshotsBeforeExecution = context.getBeforeExecutionState().map(BeforeExecutionState::getOutputFileLocationSnapshots).orElse(ImmutableSortedMap.of());<NEW_LINE>return filterOutputsAfterExecution(previousExecutionOutputSnapshots, unfilteredOutputSnapshotsBeforeExecution, unfilteredOutputSnapshotsAfterExecution);<NEW_LINE>} else {<NEW_LINE>return unfilteredOutputSnapshotsAfterExecution;<NEW_LINE>}<NEW_LINE>}
orElse(ImmutableSortedMap.of());
1,058,783
public Request<ModifySubnetAttributeRequest> marshall(ModifySubnetAttributeRequest modifySubnetAttributeRequest) {<NEW_LINE>if (modifySubnetAttributeRequest == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>Request<ModifySubnetAttributeRequest> request = new DefaultRequest<ModifySubnetAttributeRequest>(modifySubnetAttributeRequest, "AmazonEC2");<NEW_LINE>request.addParameter("Action", "ModifySubnetAttribute");<NEW_LINE>request.addParameter("Version", "2016-11-15");<NEW_LINE>request.setHttpMethod(HttpMethodName.POST);<NEW_LINE>if (modifySubnetAttributeRequest.getAssignIpv6AddressOnCreation() != null) {<NEW_LINE>request.addParameter("AssignIpv6AddressOnCreation.Value", StringUtils.fromBoolean(modifySubnetAttributeRequest.getAssignIpv6AddressOnCreation()));<NEW_LINE>}<NEW_LINE>if (modifySubnetAttributeRequest.getMapPublicIpOnLaunch() != null) {<NEW_LINE>request.addParameter("MapPublicIpOnLaunch.Value", StringUtils.fromBoolean(modifySubnetAttributeRequest.getMapPublicIpOnLaunch()));<NEW_LINE>}<NEW_LINE>if (modifySubnetAttributeRequest.getSubnetId() != null) {<NEW_LINE>request.addParameter("SubnetId", StringUtils.fromString(modifySubnetAttributeRequest.getSubnetId()));<NEW_LINE>}<NEW_LINE>if (modifySubnetAttributeRequest.getMapCustomerOwnedIpOnLaunch() != null) {<NEW_LINE>request.addParameter("MapCustomerOwnedIpOnLaunch.Value", StringUtils.fromBoolean(modifySubnetAttributeRequest.getMapCustomerOwnedIpOnLaunch()));<NEW_LINE>}<NEW_LINE>if (modifySubnetAttributeRequest.getCustomerOwnedIpv4Pool() != null) {<NEW_LINE>request.addParameter("CustomerOwnedIpv4Pool", StringUtils.fromString(modifySubnetAttributeRequest.getCustomerOwnedIpv4Pool()));<NEW_LINE>}<NEW_LINE>if (modifySubnetAttributeRequest.getEnableDns64() != null) {<NEW_LINE>request.addParameter("EnableDns64.Value", StringUtils.fromBoolean(modifySubnetAttributeRequest.getEnableDns64()));<NEW_LINE>}<NEW_LINE>if (modifySubnetAttributeRequest.getPrivateDnsHostnameTypeOnLaunch() != null) {<NEW_LINE>request.addParameter("PrivateDnsHostnameTypeOnLaunch", StringUtils.fromString(modifySubnetAttributeRequest.getPrivateDnsHostnameTypeOnLaunch()));<NEW_LINE>}<NEW_LINE>if (modifySubnetAttributeRequest.getEnableResourceNameDnsARecordOnLaunch() != null) {<NEW_LINE>request.addParameter("EnableResourceNameDnsARecordOnLaunch.Value", StringUtils.fromBoolean<MASK><NEW_LINE>}<NEW_LINE>if (modifySubnetAttributeRequest.getEnableResourceNameDnsAAAARecordOnLaunch() != null) {<NEW_LINE>request.addParameter("EnableResourceNameDnsAAAARecordOnLaunch.Value", StringUtils.fromBoolean(modifySubnetAttributeRequest.getEnableResourceNameDnsAAAARecordOnLaunch()));<NEW_LINE>}<NEW_LINE>if (modifySubnetAttributeRequest.getEnableLniAtDeviceIndex() != null) {<NEW_LINE>request.addParameter("EnableLniAtDeviceIndex", StringUtils.fromInteger(modifySubnetAttributeRequest.getEnableLniAtDeviceIndex()));<NEW_LINE>}<NEW_LINE>if (modifySubnetAttributeRequest.getDisableLniAtDeviceIndex() != null) {<NEW_LINE>request.addParameter("DisableLniAtDeviceIndex.Value", StringUtils.fromBoolean(modifySubnetAttributeRequest.getDisableLniAtDeviceIndex()));<NEW_LINE>}<NEW_LINE>return request;<NEW_LINE>}
(modifySubnetAttributeRequest.getEnableResourceNameDnsARecordOnLaunch()));
1,809,001
public void marshall(StartKeyPhrasesDetectionJobRequest startKeyPhrasesDetectionJobRequest, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (startKeyPhrasesDetectionJobRequest == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(<MASK><NEW_LINE>protocolMarshaller.marshall(startKeyPhrasesDetectionJobRequest.getOutputDataConfig(), OUTPUTDATACONFIG_BINDING);<NEW_LINE>protocolMarshaller.marshall(startKeyPhrasesDetectionJobRequest.getDataAccessRoleArn(), DATAACCESSROLEARN_BINDING);<NEW_LINE>protocolMarshaller.marshall(startKeyPhrasesDetectionJobRequest.getJobName(), JOBNAME_BINDING);<NEW_LINE>protocolMarshaller.marshall(startKeyPhrasesDetectionJobRequest.getLanguageCode(), LANGUAGECODE_BINDING);<NEW_LINE>protocolMarshaller.marshall(startKeyPhrasesDetectionJobRequest.getClientRequestToken(), CLIENTREQUESTTOKEN_BINDING);<NEW_LINE>protocolMarshaller.marshall(startKeyPhrasesDetectionJobRequest.getVolumeKmsKeyId(), VOLUMEKMSKEYID_BINDING);<NEW_LINE>protocolMarshaller.marshall(startKeyPhrasesDetectionJobRequest.getVpcConfig(), VPCCONFIG_BINDING);<NEW_LINE>protocolMarshaller.marshall(startKeyPhrasesDetectionJobRequest.getTags(), TAGS_BINDING);<NEW_LINE>} catch (Exception e) {<NEW_LINE>throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e);<NEW_LINE>}<NEW_LINE>}
startKeyPhrasesDetectionJobRequest.getInputDataConfig(), INPUTDATACONFIG_BINDING);
1,109,444
private PortfolioTransaction convertToDelivery(PortfolioTransaction t, PortfolioTransaction.Type targetType) {<NEW_LINE>PortfolioTransaction pseudo = new PortfolioTransaction();<NEW_LINE>pseudo.<MASK><NEW_LINE>pseudo.setCurrencyCode(t.getCurrencyCode());<NEW_LINE>pseudo.setSecurity(t.getSecurity());<NEW_LINE>pseudo.setShares(t.getShares());<NEW_LINE>pseudo.setType(targetType);<NEW_LINE>// calculation is without taxes -> remove any taxes & adapt<NEW_LINE>// total accordingly<NEW_LINE>long taxes = t.getUnitSum(Unit.Type.TAX).getAmount();<NEW_LINE>long amount = t.getAmount();<NEW_LINE>pseudo.setAmount(pseudo.getType() == PortfolioTransaction.Type.DELIVERY_INBOUND ? amount - taxes : amount + taxes);<NEW_LINE>// copy all units (except for taxes) over to the pseudo<NEW_LINE>// transaction<NEW_LINE>t.getUnits().filter(u -> u.getType() != Unit.Type.TAX).forEach(pseudo::addUnit);<NEW_LINE>return pseudo;<NEW_LINE>}
setDateTime(t.getDateTime());
1,279,460
public void execute() {<NEW_LINE>ensureArgCount(2);<NEW_LINE>final String fullyQualifiedTableSegmentName = getArg(0);<NEW_LINE>final String segmentStoreHost = getArg(1);<NEW_LINE>@Cleanup<NEW_LINE>CuratorFramework zkClient = createZKClient();<NEW_LINE>@Cleanup<NEW_LINE>AdminSegmentHelper adminSegmentHelper = instantiateAdminSegmentHelper(zkClient);<NEW_LINE>CompletableFuture<WireCommands.TableSegmentInfo> reply = adminSegmentHelper.getTableSegmentInfo(fullyQualifiedTableSegmentName, new PravegaNodeUri(segmentStoreHost, getServiceConfig().getAdminGatewayPort()), super.authHelper.retrieveMasterToken());<NEW_LINE>WireCommands.TableSegmentInfo tableSegmentInfo = reply.join();<NEW_LINE>output("TableSegmentInfo for %s: ", fullyQualifiedTableSegmentName);<NEW_LINE>SEGMENT_INFO_FIELD_MAP.forEach((name, f) -> output("%s = %s", name, <MASK><NEW_LINE>}
f.apply(tableSegmentInfo)));
1,073,809
private void updatePose() {<NEW_LINE>vrCompositor.WaitGetPoses.apply(hmdTrackedDevicePoseReference, JOpenVRLibrary.k_unMaxTrackedDeviceCount, null, 0);<NEW_LINE>for (int nDevice = 0; nDevice < JOpenVRLibrary.k_unMaxTrackedDeviceCount; ++nDevice) {<NEW_LINE>hmdTrackedDevicePoses[nDevice].read();<NEW_LINE>}<NEW_LINE>if (hmdTrackedDevicePoses[JOpenVRLibrary.k_unTrackedDeviceIndex_Hmd].bPoseIsValid != 0) {<NEW_LINE>for (int nEye = 0; nEye < 2; nEye++) {<NEW_LINE>HmdMatrix34_t matPose = vrSystem.GetEyeToHeadTransform.apply(nEye);<NEW_LINE><MASK><NEW_LINE>HmdMatrix44_t matProjection = vrSystem.GetProjectionMatrix.apply(nEye, nearClip, farClip, JOpenVRLibrary.EGraphicsAPIConvention.EGraphicsAPIConvention_API_OpenGL);<NEW_LINE>VR_STATE.setProjectionMatrix(matProjection, nEye);<NEW_LINE>}<NEW_LINE>VR_STATE.setHeadPose(hmdTrackedDevicePoses[JOpenVRLibrary.k_unTrackedDeviceIndex_Hmd].mDeviceToAbsoluteTracking);<NEW_LINE>headIsTracking = true;<NEW_LINE>} else {<NEW_LINE>headIsTracking = false;<NEW_LINE>}<NEW_LINE>findControllerDevices();<NEW_LINE>for (int handIndex = 0; handIndex < 2; handIndex++) {<NEW_LINE>if (controllerDeviceIndex[handIndex] != -1) {<NEW_LINE>controllerTracking[handIndex] = true;<NEW_LINE>VR_STATE.setControllerPose(hmdTrackedDevicePoses[controllerDeviceIndex[handIndex]].mDeviceToAbsoluteTracking, handIndex);<NEW_LINE>} else {<NEW_LINE>controllerTracking[handIndex] = false;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
VR_STATE.setEyePoseWRTHead(matPose, nEye);
710,120
public // }<NEW_LINE>int createParticle(ParticleDef def) {<NEW_LINE>if (m_count >= m_internalAllocatedCapacity) {<NEW_LINE>int capacity = m_count != 0 ? 2 * m_count : Settings.minParticleBufferCapacity;<NEW_LINE>capacity = limitCapacity(capacity, m_maxCount);<NEW_LINE>capacity = limitCapacity(capacity, m_flagsBuffer.userSuppliedCapacity);<NEW_LINE>capacity = limitCapacity(capacity, m_positionBuffer.userSuppliedCapacity);<NEW_LINE>capacity = limitCapacity(capacity, m_velocityBuffer.userSuppliedCapacity);<NEW_LINE>capacity = limitCapacity(capacity, m_colorBuffer.userSuppliedCapacity);<NEW_LINE>capacity = limitCapacity(capacity, m_userDataBuffer.userSuppliedCapacity);<NEW_LINE>if (m_internalAllocatedCapacity < capacity) {<NEW_LINE>m_flagsBuffer.data = reallocateBuffer(m_flagsBuffer, m_internalAllocatedCapacity, capacity, false);<NEW_LINE>m_positionBuffer.data = reallocateBuffer(m_positionBuffer, m_internalAllocatedCapacity, capacity, false);<NEW_LINE>m_velocityBuffer.data = reallocateBuffer(m_velocityBuffer, m_internalAllocatedCapacity, capacity, false);<NEW_LINE>m_accumulationBuffer = BufferUtils.reallocateBuffer(m_accumulationBuffer, 0, m_internalAllocatedCapacity, capacity, false);<NEW_LINE>m_accumulation2Buffer = BufferUtils.reallocateBuffer(Vec2.class, m_accumulation2Buffer, 0, m_internalAllocatedCapacity, capacity, true);<NEW_LINE>m_depthBuffer = BufferUtils.reallocateBuffer(m_depthBuffer, 0, m_internalAllocatedCapacity, capacity, true);<NEW_LINE>m_colorBuffer.data = reallocateBuffer(<MASK><NEW_LINE>m_groupBuffer = BufferUtils.reallocateBuffer(ParticleGroup.class, m_groupBuffer, 0, m_internalAllocatedCapacity, capacity, false);<NEW_LINE>m_userDataBuffer.data = reallocateBuffer(m_userDataBuffer, m_internalAllocatedCapacity, capacity, true);<NEW_LINE>m_internalAllocatedCapacity = capacity;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (m_count >= m_internalAllocatedCapacity) {<NEW_LINE>return Settings.invalidParticleIndex;<NEW_LINE>}<NEW_LINE>int index = m_count++;<NEW_LINE>m_flagsBuffer.data[index] = def.flags;<NEW_LINE>m_positionBuffer.data[index].set(def.position);<NEW_LINE>// assertNotSamePosition();<NEW_LINE>m_velocityBuffer.data[index].set(def.velocity);<NEW_LINE>m_groupBuffer[index] = null;<NEW_LINE>if (m_depthBuffer != null) {<NEW_LINE>m_depthBuffer[index] = 0;<NEW_LINE>}<NEW_LINE>if (m_colorBuffer.data != null || def.color != null) {<NEW_LINE>m_colorBuffer.data = requestParticleBuffer(m_colorBuffer.dataClass, m_colorBuffer.data);<NEW_LINE>m_colorBuffer.data[index].set(def.color);<NEW_LINE>}<NEW_LINE>if (m_userDataBuffer.data != null || def.userData != null) {<NEW_LINE>m_userDataBuffer.data = requestParticleBuffer(m_userDataBuffer.dataClass, m_userDataBuffer.data);<NEW_LINE>m_userDataBuffer.data[index] = def.userData;<NEW_LINE>}<NEW_LINE>if (m_proxyCount >= m_proxyCapacity) {<NEW_LINE>int oldCapacity = m_proxyCapacity;<NEW_LINE>int newCapacity = m_proxyCount != 0 ? 2 * m_proxyCount : Settings.minParticleBufferCapacity;<NEW_LINE>m_proxyBuffer = BufferUtils.reallocateBuffer(Proxy.class, m_proxyBuffer, oldCapacity, newCapacity);<NEW_LINE>m_proxyCapacity = newCapacity;<NEW_LINE>}<NEW_LINE>m_proxyBuffer[m_proxyCount++].index = index;<NEW_LINE>return index;<NEW_LINE>}
m_colorBuffer, m_internalAllocatedCapacity, capacity, true);
691,612
// TODO: Add code fore interpolation type (none and angular)<NEW_LINE>void interpolateAttributes_(int semantics, int from_path_index, int from_point_index, int to_path_index, int to_point_index, double sub_length, int ordinate) {<NEW_LINE>SegmentIteratorImpl seg_iter = querySegmentIterator();<NEW_LINE>int absolute_from_index = getPathStart(from_path_index) + from_point_index;<NEW_LINE>int absolute_to_index = getPathStart(to_path_index) + to_point_index;<NEW_LINE>double from_attribute = getAttributeAsDbl(semantics, absolute_from_index, ordinate);<NEW_LINE>double to_attribute = <MASK><NEW_LINE>double interpolated_attribute = from_attribute;<NEW_LINE>double cumulative_length = 0.0;<NEW_LINE>seg_iter.resetToVertex(absolute_from_index);<NEW_LINE>do {<NEW_LINE>if (seg_iter.hasNextSegment()) {<NEW_LINE>seg_iter.nextSegment();<NEW_LINE>if (seg_iter.getStartPointIndex() == absolute_to_index)<NEW_LINE>return;<NEW_LINE>setAttribute(semantics, seg_iter.getStartPointIndex(), ordinate, interpolated_attribute);<NEW_LINE>seg_iter.previousSegment();<NEW_LINE>do {<NEW_LINE>Segment segment = seg_iter.nextSegment();<NEW_LINE>if (seg_iter.getEndPointIndex() == absolute_to_index)<NEW_LINE>return;<NEW_LINE>double segment_length = segment.calculateLength2D();<NEW_LINE>cumulative_length += segment_length;<NEW_LINE>double t = cumulative_length / sub_length;<NEW_LINE>interpolated_attribute = MathUtils.lerp(from_attribute, to_attribute, t);<NEW_LINE>if (!seg_iter.isClosingSegment())<NEW_LINE>setAttribute(semantics, seg_iter.getEndPointIndex(), ordinate, interpolated_attribute);<NEW_LINE>} while (seg_iter.hasNextSegment());<NEW_LINE>}<NEW_LINE>} while (seg_iter.nextPath());<NEW_LINE>}
getAttributeAsDbl(semantics, absolute_to_index, ordinate);
429,996
private void doExport() {<NEW_LINE>JFileChooser chooser = new JFileChooser();<NEW_LINE>chooser.setFileFilter(FileHelper.CSV_FILTER);<NEW_LINE>chooser.setCurrentDirectory(((SwingPreferences) Application.getPreferences()).getDefaultDirectory());<NEW_LINE>if (chooser.showSaveDialog(this) != JFileChooser.APPROVE_OPTION)<NEW_LINE>return;<NEW_LINE>File file = chooser.getSelectedFile();<NEW_LINE>if (file == null)<NEW_LINE>return;<NEW_LINE>file = FileHelper.forceExtension(file, "csv");<NEW_LINE>if (!FileHelper.confirmWrite(file, this)) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>String commentChar = csvOptions.getCommentCharacter();<NEW_LINE>String fieldSep = csvOptions.getFieldSeparator();<NEW_LINE>boolean simulationComment = csvOptions.getSelectionOption(OPTION_SIMULATION_COMMENTS);<NEW_LINE>boolean fieldComment = csvOptions.getSelectionOption(OPTION_FIELD_DESCRIPTIONS);<NEW_LINE>boolean eventComment = csvOptions.getSelectionOption(OPTION_FLIGHT_EVENTS);<NEW_LINE>csvOptions.storePreferences();<NEW_LINE>// Store preferences and export<NEW_LINE>int n = 0;<NEW_LINE>((SwingPreferences) Application.getPreferences()).setDefaultDirectory(chooser.getCurrentDirectory());<NEW_LINE>for (int i = 0; i < selected.length; i++) {<NEW_LINE>((SwingPreferences) Application.getPreferences()).setExportSelected(types[<MASK><NEW_LINE>if (selected[i])<NEW_LINE>n++;<NEW_LINE>}<NEW_LINE>FlightDataType[] fieldTypes = new FlightDataType[n];<NEW_LINE>Unit[] fieldUnits = new Unit[n];<NEW_LINE>int pos = 0;<NEW_LINE>for (int i = 0; i < selected.length; i++) {<NEW_LINE>if (selected[i]) {<NEW_LINE>fieldTypes[pos] = types[i];<NEW_LINE>fieldUnits[pos] = units[i];<NEW_LINE>pos++;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (fieldSep.equals(SPACE)) {<NEW_LINE>fieldSep = " ";<NEW_LINE>} else if (fieldSep.equals(TAB)) {<NEW_LINE>fieldSep = "\t";<NEW_LINE>}<NEW_LINE>SaveCSVWorker.export(file, simulation, branch, fieldTypes, fieldUnits, fieldSep, commentChar, simulationComment, fieldComment, eventComment, SwingUtilities.getWindowAncestor(this));<NEW_LINE>}
i], selected[i]);
760,605
public static Instruction createDeclareByte(int b0, int b1, int b2, int b3, int b4, int b5, int b6, int b7, int b8, int b9, int b10) {<NEW_LINE>Instruction instruction = new Instruction();<NEW_LINE><MASK><NEW_LINE>instruction.setDeclareDataCount(11);<NEW_LINE>instruction.setDeclareByteValue(0, toByte(b0));<NEW_LINE>instruction.setDeclareByteValue(1, toByte(b1));<NEW_LINE>instruction.setDeclareByteValue(2, toByte(b2));<NEW_LINE>instruction.setDeclareByteValue(3, toByte(b3));<NEW_LINE>instruction.setDeclareByteValue(4, toByte(b4));<NEW_LINE>instruction.setDeclareByteValue(5, toByte(b5));<NEW_LINE>instruction.setDeclareByteValue(6, toByte(b6));<NEW_LINE>instruction.setDeclareByteValue(7, toByte(b7));<NEW_LINE>instruction.setDeclareByteValue(8, toByte(b8));<NEW_LINE>instruction.setDeclareByteValue(9, toByte(b9));<NEW_LINE>instruction.setDeclareByteValue(10, toByte(b10));<NEW_LINE>assert instruction.getOpCount() == 0 : instruction.getOpCount();<NEW_LINE>return instruction;<NEW_LINE>}
instruction.setCode(Code.DECLAREBYTE);
1,557,719
public final void andExpression() throws RecognitionException, TokenStreamException {<NEW_LINE>returnAST = null;<NEW_LINE>ASTPair currentAST = new ASTPair();<NEW_LINE>AST andExpression_AST = null;<NEW_LINE>shiftExpression();<NEW_LINE>astFactory.addASTChild(currentAST, returnAST);<NEW_LINE>{<NEW_LINE>_loop144: do {<NEW_LINE>if ((LA(1) == BAND)) {<NEW_LINE>AST tmp213_AST = null;<NEW_LINE>tmp213_AST = astFactory<MASK><NEW_LINE>astFactory.makeASTRoot(currentAST, tmp213_AST);<NEW_LINE>match(BAND);<NEW_LINE>{<NEW_LINE>switch(LA(1)) {<NEW_LINE>case LINE_BREAK:<NEW_LINE>{<NEW_LINE>match(LINE_BREAK);<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>case LPAREN_WITH_NO_LEADING_SPACE:<NEW_LINE>case LPAREN:<NEW_LINE>case IDENTIFIER:<NEW_LINE>case CONSTANT:<NEW_LINE>case FUNCTION:<NEW_LINE>case GLOBAL_VARIABLE:<NEW_LINE>case COLON_WITH_NO_FOLLOWING_SPACE:<NEW_LINE>case INSTANCE_VARIABLE:<NEW_LINE>case CLASS_VARIABLE:<NEW_LINE>case UNARY_PLUS_MINUS_METHOD_NAME:<NEW_LINE>case BNOT:<NEW_LINE>case NOT:<NEW_LINE>case LITERAL_return:<NEW_LINE>case LITERAL_break:<NEW_LINE>case LITERAL_next:<NEW_LINE>case EMPTY_ARRAY_ACCESS:<NEW_LINE>case UNARY_PLUS:<NEW_LINE>case UNARY_MINUS:<NEW_LINE>case LITERAL_nil:<NEW_LINE>case LITERAL_true:<NEW_LINE>case LITERAL_false:<NEW_LINE>case LITERAL___FILE__:<NEW_LINE>case LITERAL___LINE__:<NEW_LINE>case DOUBLE_QUOTE_STRING:<NEW_LINE>case SINGLE_QUOTE_STRING:<NEW_LINE>case STRING_BEFORE_EXPRESSION_SUBSTITUTION:<NEW_LINE>case REGEX:<NEW_LINE>case REGEX_BEFORE_EXPRESSION_SUBSTITUTION:<NEW_LINE>case COMMAND_OUTPUT:<NEW_LINE>case COMMAND_OUTPUT_BEFORE_EXPRESSION_SUBSTITUTION:<NEW_LINE>case HERE_DOC_BEGIN:<NEW_LINE>case W_ARRAY:<NEW_LINE>case INTEGER:<NEW_LINE>case HEX:<NEW_LINE>case BINARY:<NEW_LINE>case OCTAL:<NEW_LINE>case FLOAT:<NEW_LINE>case ASCII_VALUE:<NEW_LINE>case LITERAL_self:<NEW_LINE>case LITERAL_super:<NEW_LINE>case LEADING_COLON2:<NEW_LINE>case LITERAL_retry:<NEW_LINE>case LITERAL_yield:<NEW_LINE>case LITERAL_redo:<NEW_LINE>case EMPTY_ARRAY:<NEW_LINE>case LBRACK:<NEW_LINE>case LCURLY_HASH:<NEW_LINE>case LITERAL_begin:<NEW_LINE>case LITERAL_if:<NEW_LINE>case LITERAL_unless:<NEW_LINE>case LITERAL_case:<NEW_LINE>case LITERAL_for:<NEW_LINE>case LITERAL_while:<NEW_LINE>case LITERAL_until:<NEW_LINE>case LITERAL_module:<NEW_LINE>case LITERAL_class:<NEW_LINE>case LITERAL_def:<NEW_LINE>case 155:<NEW_LINE>{<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>default:<NEW_LINE>{<NEW_LINE>throw new NoViableAltException(LT(1), getFilename());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>shiftExpression();<NEW_LINE>astFactory.addASTChild(currentAST, returnAST);<NEW_LINE>} else {<NEW_LINE>break _loop144;<NEW_LINE>}<NEW_LINE>} while (true);<NEW_LINE>}<NEW_LINE>andExpression_AST = (AST) currentAST.root;<NEW_LINE>returnAST = andExpression_AST;<NEW_LINE>}
.create(LT(1));
934,315
protected IStatus run(IProgressMonitor monitor) {<NEW_LINE>monitor.beginTask("Load Batch Stack....", IProgressMonitor.UNKNOWN);<NEW_LINE>final String stackfile = getStackData(serverId, pack);<NEW_LINE>if (stackfile == null) {<NEW_LINE>return Status.CANCEL_STATUS;<NEW_LINE>}<NEW_LINE>if (isSFA) {<NEW_LINE>ExUtil.exec(Display.getDefault(), new Runnable() {<NEW_LINE><NEW_LINE>public void run() {<NEW_LINE>try {<NEW_LINE>MainProcessor.<MASK><NEW_LINE>} catch (Exception ex) {<NEW_LINE>ex.printStackTrace();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>});<NEW_LINE>} else {<NEW_LINE>final String indexFilename = stackfile.subSequence(0, stackfile.length() - 4) + ".inx";<NEW_LINE>final List<Long>[] lists = getStackIndexList(indexFilename);<NEW_LINE>if (lists == null || lists[0].size() == 0) {<NEW_LINE>return Status.OK_STATUS;<NEW_LINE>}<NEW_LINE>ExUtil.exec(Display.getDefault(), new Runnable() {<NEW_LINE><NEW_LINE>public void run() {<NEW_LINE>try {<NEW_LINE>IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();<NEW_LINE>ObjectThreadDumpView view = (ObjectThreadDumpView) window.getActivePage().showView(ObjectThreadDumpView.ID, null, IWorkbenchPage.VIEW_ACTIVATE);<NEW_LINE>if (view != null) {<NEW_LINE>view.setInput(pack.objName, indexFilename, lists);<NEW_LINE>}<NEW_LINE>} catch (Exception ex) {<NEW_LINE>ex.printStackTrace();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>});<NEW_LINE>}<NEW_LINE>return Status.OK_STATUS;<NEW_LINE>}
instance().processStackFile(stackfile);
1,751,073
private void renderBase() {<NEW_LINE>BlockRendererDispatcher blockrendererdispatcher = Minecraft.getMinecraft().getBlockRendererDispatcher();<NEW_LINE>BlockModelShapes modelShapes = blockrendererdispatcher.getBlockModelShapes();<NEW_LINE>IBakedModel bakedModel = modelShapes.getModelForState(MachineObject.block_enchanter.getBlockNN().getDefaultState().withProperty(EnumRenderMode.RENDER, EnumRenderMode.FRONT));<NEW_LINE>RenderUtil.bindBlockTexture();<NEW_LINE>GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);<NEW_LINE>GlStateManager.enableRescaleNormal();<NEW_LINE>GlStateManager.pushMatrix();<NEW_LINE>Tessellator tessellator = Tessellator.getInstance();<NEW_LINE>BufferBuilder vertexbuffer = tessellator.getBuffer();<NEW_LINE>vertexbuffer.begin(GL11.GL_QUADS, DefaultVertexFormats.ITEM);<NEW_LINE>for (EnumFacing enumfacing : EnumFacing.values()) {<NEW_LINE>this.renderQuads(vertexbuffer, bakedModel.getQuads((IBlockState) null, enumfacing, 0L));<NEW_LINE>}<NEW_LINE>this.renderQuads(vertexbuffer, bakedModel.getQuads((IBlockState) null, <MASK><NEW_LINE>tessellator.draw();<NEW_LINE>GlStateManager.popMatrix();<NEW_LINE>GlStateManager.disableRescaleNormal();<NEW_LINE>}
(EnumFacing) null, 0L));
252,658
private static boolean processCompositeIndexDelete(final OIndex index, final Set<String> dirtyFields, final ODocument iRecord, List<IndexChange> changes) {<NEW_LINE>final OCompositeIndexDefinition indexDefinition = (OCompositeIndexDefinition) index.getDefinition();<NEW_LINE>final String multiValueField = indexDefinition.getMultiValueField();<NEW_LINE>final List<String> indexFields = indexDefinition.getFields();<NEW_LINE>for (final String indexField : indexFields) {<NEW_LINE>// REMOVE IT<NEW_LINE>if (dirtyFields.contains(indexField)) {<NEW_LINE>final List<Object> origValues = new ArrayList<>(indexFields.size());<NEW_LINE>for (final String field : indexFields) {<NEW_LINE>if (!field.equals(multiValueField))<NEW_LINE>if (dirtyFields.contains(field)) {<NEW_LINE>origValues.add(iRecord.getOriginalValue(field));<NEW_LINE>} else<NEW_LINE>origValues.add(iRecord.field(field));<NEW_LINE>}<NEW_LINE>if (multiValueField != null) {<NEW_LINE>final OMultiValueChangeTimeLine<?, ?> multiValueChangeTimeLine = iRecord.getCollectionTimeLine(multiValueField);<NEW_LINE>if (multiValueChangeTimeLine != null) {<NEW_LINE>final OTrackedMultiValue fieldValue = iRecord.field(multiValueField);<NEW_LINE>@SuppressWarnings("unchecked")<NEW_LINE>final Object restoredMultiValue = fieldValue.returnOriginalState(multiValueChangeTimeLine.getMultiValueChangeEvents());<NEW_LINE>origValues.add(indexDefinition.getMultiValueDefinitionIndex(), restoredMultiValue);<NEW_LINE>} else if (dirtyFields.contains(multiValueField))<NEW_LINE>origValues.add(indexDefinition.getMultiValueDefinitionIndex(), iRecord.getOriginalValue(multiValueField));<NEW_LINE>else<NEW_LINE>origValues.add(indexDefinition.getMultiValueDefinitionIndex(), iRecord.field(multiValueField));<NEW_LINE>}<NEW_LINE>final Object origValue = indexDefinition.createValue(origValues);<NEW_LINE>deleteIndexKey(<MASK><NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return false;<NEW_LINE>}
index, iRecord, origValue, changes);
1,804,195
public boolean apply(Game game, Ability source) {<NEW_LINE>Permanent sacrificedPermanent = null;<NEW_LINE>for (Cost cost : source.getCosts()) {<NEW_LINE>if (cost instanceof SacrificeTargetCost) {<NEW_LINE>SacrificeTargetCost sacrificeCost = (SacrificeTargetCost) cost;<NEW_LINE>if (!sacrificeCost.getPermanents().isEmpty()) {<NEW_LINE>sacrificedPermanent = sacrificeCost.getPermanents().get(0);<NEW_LINE>}<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>Player controller = game.getPlayer(source.getControllerId());<NEW_LINE>if (sacrificedPermanent != null && controller != null) {<NEW_LINE>int newConvertedCost = sacrificedPermanent.getManaValue() + 2;<NEW_LINE>FilterCard filter = new FilterCard("creature card with mana value " + newConvertedCost + " or less");<NEW_LINE>filter.add(new ManaValuePredicate(ComparisonType<MASK><NEW_LINE>filter.add(CardType.CREATURE.getPredicate());<NEW_LINE>TargetCardInLibrary target = new TargetCardInLibrary(filter);<NEW_LINE>if (controller.searchLibrary(target, source, game)) {<NEW_LINE>Card card = controller.getLibrary().getCard(target.getFirstTarget(), game);<NEW_LINE>controller.moveCards(card, Zone.BATTLEFIELD, source, game);<NEW_LINE>}<NEW_LINE>controller.shuffleLibrary(source, game);<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>return false;<NEW_LINE>}
.FEWER_THAN, newConvertedCost + 1));
1,489,254
private ImmutableList<ProductPrice> extractProductPrices(final I_C_Invoice invoice) {<NEW_LINE>final IInvoiceDAO invoicesRepo = Services.get(IInvoiceDAO.class);<NEW_LINE>final CurrencyId currencyId = CurrencyId.<MASK><NEW_LINE>final ImmutableMap<ProductId, Money> pricesByProductId = invoicesRepo.retrieveLines(invoice).stream().filter(invoiceLine -> invoiceLine.getM_Product_ID() > 0).collect(// keyMapper<NEW_LINE>ImmutableMap.// keyMapper<NEW_LINE>toImmutableMap(// valueMapper<NEW_LINE>invoiceLine -> ProductId.ofRepoId(invoiceLine.getM_Product_ID()), // mergeFunction<NEW_LINE>invoiceLine -> Money.of(invoiceLine.getPriceActual(), currencyId), Money::max));<NEW_LINE>return pricesByProductId.keySet().stream().map(productId -> ProductPrice.builder().productId(productId).price(pricesByProductId.get(productId)).build()).collect(ImmutableList.toImmutableList());<NEW_LINE>}
ofRepoId(invoice.getC_Currency_ID());
1,058,638
final UpdateAccessResult executeUpdateAccess(UpdateAccessRequest updateAccessRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(updateAccessRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE><MASK><NEW_LINE>Request<UpdateAccessRequest> request = null;<NEW_LINE>Response<UpdateAccessResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new UpdateAccessRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(updateAccessRequest));<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, "Transfer");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "UpdateAccess");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<UpdateAccessResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new UpdateAccessResultJsonUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
680,633
private void parseRawString(InputStream rawxml) {<NEW_LINE>if (rawxml == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>XmlPullParser parser = null;<NEW_LINE>try {<NEW_LINE>try {<NEW_LINE>parser = HighFunction.stringTree(rawxml, HighFunction.getErrorHandler(this, "decompiler results for function at " <MASK><NEW_LINE>hfunc = null;<NEW_LINE>hparamid = null;<NEW_LINE>docroot = null;<NEW_LINE>parser.start("doc");<NEW_LINE>while (parser.peek().isStart()) {<NEW_LINE>XmlElement el = parser.peek();<NEW_LINE>if (el.getName().equals("function")) {<NEW_LINE>if (hfunc == null) {<NEW_LINE>hfunc = new HighFunction(function, language, compilerSpec, dtmanage);<NEW_LINE>hfunc.readXML(parser);<NEW_LINE>} else {<NEW_LINE>// TODO: This is an ugly kludge to get around duplicate XML tag names<NEW_LINE>docroot = ClangXML.buildClangTree(parser, hfunc);<NEW_LINE>if (docroot == null) {<NEW_LINE>errMsg = "Unable to parse C (xml)";<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} else if (el.getName().equals("parammeasures")) {<NEW_LINE>hparamid = new HighParamID(function, language, compilerSpec, dtmanage);<NEW_LINE>hparamid.readXML(parser);<NEW_LINE>} else {<NEW_LINE>errMsg = "Unknown decompiler tag: " + el.getName();<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} catch (PcodeXMLException e) {<NEW_LINE>// Error while walking the DOM<NEW_LINE>errMsg = e.getMessage();<NEW_LINE>hfunc = null;<NEW_LINE>hparamid = null;<NEW_LINE>return;<NEW_LINE>} catch (RuntimeException e) {<NEW_LINE>// Exception from the raw parser<NEW_LINE>errMsg = e.getMessage();<NEW_LINE>hfunc = null;<NEW_LINE>hparamid = null;<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>} finally {<NEW_LINE>if (parser != null) {<NEW_LINE>parser.dispose();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
+ function.getEntryPoint()));
26,201
private static boolean implVerify(byte[] sig, int sigOff, byte[] pk, int pkOff, byte[] ctx, byte phflag, byte[] m, int mOff, int mLen) {<NEW_LINE>if (!checkContextVar(ctx)) {<NEW_LINE>throw new IllegalArgumentException("ctx");<NEW_LINE>}<NEW_LINE>byte[] R = copy(sig, sigOff, POINT_BYTES);<NEW_LINE>byte[] S = copy(sig, sigOff + POINT_BYTES, SCALAR_BYTES);<NEW_LINE>if (!checkPointVar(R)) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>int[] nS = new int[SCALAR_INTS];<NEW_LINE>if (!checkScalarVar(S, nS)) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>PointExt pA = new PointExt();<NEW_LINE>if (!decodePointVar(pk, pkOff, true, pA)) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>Xof d = createXof();<NEW_LINE>byte[] h = new byte[SCALAR_BYTES * 2];<NEW_LINE>dom4(d, phflag, ctx);<NEW_LINE>d.update(R, 0, POINT_BYTES);<NEW_LINE>d.update(pk, pkOff, POINT_BYTES);<NEW_LINE>d.update(m, mOff, mLen);<NEW_LINE>d.doFinal(h, 0, h.length);<NEW_LINE>byte[] k = reduceScalar(h);<NEW_LINE>int[] nA = new int[SCALAR_INTS];<NEW_LINE>decodeScalar(k, 0, nA);<NEW_LINE>PointExt pR = new PointExt();<NEW_LINE>scalarMultStrausVar(nS, nA, pA, pR);<NEW_LINE>byte[<MASK><NEW_LINE>return 0 != encodePoint(pR, check, 0) && Arrays.areEqual(check, R);<NEW_LINE>}
] check = new byte[POINT_BYTES];
1,734,328
public com.amazonaws.services.datapipeline.model.TaskNotFoundException unmarshallFromContext(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>com.amazonaws.services.datapipeline.model.TaskNotFoundException taskNotFoundException = new com.amazonaws.services.datapipeline.model.TaskNotFoundException(null);<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE><MASK><NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>JsonToken token = context.getCurrentToken();<NEW_LINE>if (token == null)<NEW_LINE>token = context.nextToken();<NEW_LINE>if (token == VALUE_NULL) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>while (true) {<NEW_LINE>if (token == null)<NEW_LINE>break;<NEW_LINE>if (token == FIELD_NAME || token == START_OBJECT) {<NEW_LINE>} 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 taskNotFoundException;<NEW_LINE>}
String currentParentElement = context.getCurrentParentElement();
51,257
// Create a Flajolet-Martin bitstring. The maximum number of nodes is currently 4 billion.<NEW_LINE>public static int create_random_bm(int number_node, int size_bitmask) {<NEW_LINE>int j;<NEW_LINE>// cur_random is between 0 and 1.<NEW_LINE>double cur_random = Math.random();<NEW_LINE>double threshold = 0;<NEW_LINE>for (j = 0; j < size_bitmask - 1; j++) {<NEW_LINE>threshold += Math.pow(2, -1 * j - 1);<NEW_LINE>if (cur_random < threshold) {<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>int bitmask = 0;<NEW_LINE>if (j < size_bitmask - 1) {<NEW_LINE>int small_bitmask = 1 << (size_bitmask - 1 - j);<NEW_LINE>// move small_bitmask to MSB bits of bitmask;<NEW_LINE>bitmask <MASK><NEW_LINE>}<NEW_LINE>return bitmask;<NEW_LINE>}
= small_bitmask << (32 - size_bitmask);
387,821
public IStatus run(IProgressMonitor monitor) {<NEW_LINE>SubMonitor sub = <MASK><NEW_LINE>if (sub.isCanceled()) {<NEW_LINE>return Status.CANCEL_STATUS;<NEW_LINE>}<NEW_LINE>Index index = getIndex();<NEW_LINE>if (index == null) {<NEW_LINE>// $NON-NLS-1$<NEW_LINE>IdeLog.// $NON-NLS-1$<NEW_LINE>logError(// $NON-NLS-1$<NEW_LINE>IndexPlugin.getDefault(), MessageFormat.format("Index is null for container: {0}", getContainerURI()));<NEW_LINE>return Status.CANCEL_STATUS;<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>// FIXME: Ignore node_modules inside hyperloop module?<NEW_LINE>// Collect the full set of files in the project...<NEW_LINE>Set<IFileStore> files = IndexUtil.getAllFiles(getContainerFileStore(), sub.newChild(100));<NEW_LINE>if (sub.isCanceled()) {<NEW_LINE>return Status.CANCEL_STATUS;<NEW_LINE>}<NEW_LINE>// Collect any "special" files contributed for the container URI. Mostly this is to allow files associated<NEW_LINE>// with IProjects to be included in indexing<NEW_LINE>files.addAll(getContributedFiles(getContainerURI()));<NEW_LINE>// Checks what's in the index, and if any of the files in there no longer exist, we now remove them...<NEW_LINE>Set<String> documents = index.queryDocumentNames(null);<NEW_LINE>sub.worked(25);<NEW_LINE>if (sub.isCanceled()) {<NEW_LINE>return Status.CANCEL_STATUS;<NEW_LINE>}<NEW_LINE>removeDeletedFiles(index, documents, files, sub.newChild(75));<NEW_LINE>// Ok, we removed files, and now if there's none left in project we can just end here.<NEW_LINE>if (CollectionsUtil.isEmpty(files)) {<NEW_LINE>return Status.OK_STATUS;<NEW_LINE>}<NEW_LINE>// Should check timestamp of index versus timestamps of files, only index files that are out of date<NEW_LINE>// (for Ruby)!<NEW_LINE>long timestamp = 0L;<NEW_LINE>if (!CollectionsUtil.isEmpty(documents)) {<NEW_LINE>// If there's nothing in the index, index everything; otherwise use last modified time of index to<NEW_LINE>// filter...<NEW_LINE>timestamp = index.getIndexFile().lastModified();<NEW_LINE>}<NEW_LINE>if (sub.isCanceled()) {<NEW_LINE>return Status.CANCEL_STATUS;<NEW_LINE>}<NEW_LINE>files = filterFilesByTimestamp(timestamp, files);<NEW_LINE>sub.worked(50);<NEW_LINE>if (!CollectionsUtil.isEmpty(files)) {<NEW_LINE>indexFileStores(index, files, sub.newChild(750));<NEW_LINE>}<NEW_LINE>} catch (CoreException e) {<NEW_LINE>return e.getStatus();<NEW_LINE>} catch (IOException e) {<NEW_LINE>IdeLog.logError(IndexPlugin.getDefault(), e);<NEW_LINE>} finally {<NEW_LINE>try {<NEW_LINE>index.save();<NEW_LINE>} catch (IOException e) {<NEW_LINE>// $NON-NLS-1$<NEW_LINE>IdeLog.logError(IndexPlugin.getDefault(), "An error occurred while saving an index", e);<NEW_LINE>}<NEW_LINE>sub.done();<NEW_LINE>}<NEW_LINE>return Status.OK_STATUS;<NEW_LINE>}
SubMonitor.convert(monitor, 1000);
830,190
public void openInEditor() {<NEW_LINE>PositionBounds bounds = getPosition();<NEW_LINE>if (bounds == null)<NEW_LINE>return;<NEW_LINE>PositionRef beginPos = bounds.getBegin();<NEW_LINE><MASK><NEW_LINE>editSupp.edit();<NEW_LINE>JEditorPane[] panes = editSupp.getOpenedPanes();<NEW_LINE>if (panes != null) {<NEW_LINE>JumpList.checkAddEntry();<NEW_LINE>try {<NEW_LINE>panes[0].setCaretPosition(bounds.getEnd().getOffset());<NEW_LINE>panes[0].moveCaretPosition(beginPos.getOffset());<NEW_LINE>} catch (IllegalArgumentException iae) {<NEW_LINE>ErrorManager.getDefault().notify(ErrorManager.INFORMATIONAL, iae);<NEW_LINE>}<NEW_LINE>getTopComponent(panes[0]).requestActive();<NEW_LINE>} else {<NEW_LINE>// todo (#pf): what to do if there is no pane? -- now, there<NEW_LINE>// is a error message. I'm not sure, maybe this code will be<NEW_LINE>// never called.<NEW_LINE>DialogDisplayer.getDefault().notify(new NotifyDescriptor.Message(NbBundle.getMessage(ParametersPanel.class, "ERR_ErrorOpeningEditor")));<NEW_LINE>}<NEW_LINE>}
CloneableEditorSupport editSupp = beginPos.getCloneableEditorSupport();
864,059
private void addStaticRegexResultProperties() {<NEW_LINE>if (context.isOptionRegexpStaticResultInContextInit()) {<NEW_LINE>if (context.isOptionNashornCompatibilityMode()) {<NEW_LINE>putRegExpStaticPropertyAccessor(null, Strings.INPUT);<NEW_LINE>putRegExpStaticPropertyAccessor(BuiltinFunctionKey.RegExpMultiLine, Strings.MULTILINE);<NEW_LINE>putRegExpStaticPropertyAccessor(BuiltinFunctionKey.RegExpLastMatch, Strings.LAST_MATCH);<NEW_LINE>putRegExpStaticPropertyAccessor(BuiltinFunctionKey.RegExpLastParen, Strings.LAST_PAREN);<NEW_LINE>putRegExpStaticPropertyAccessor(BuiltinFunctionKey.RegExpLeftContext, Strings.LEFT_CONTEXT);<NEW_LINE>putRegExpStaticPropertyAccessor(BuiltinFunctionKey.RegExpRightContext, Strings.RIGHT_CONTEXT);<NEW_LINE>} else {<NEW_LINE>putRegExpStaticPropertyAccessor(null, Strings.INPUT);<NEW_LINE>putRegExpStaticPropertyAccessor(null, Strings.INPUT, Strings.$_);<NEW_LINE>putRegExpStaticPropertyAccessor(BuiltinFunctionKey.RegExpLastMatch, Strings.LAST_MATCH);<NEW_LINE>putRegExpStaticPropertyAccessor(BuiltinFunctionKey.RegExpLastMatch, Strings.LAST_MATCH, Strings.$_AMPERSAND);<NEW_LINE>putRegExpStaticPropertyAccessor(BuiltinFunctionKey.RegExpLastParen, Strings.LAST_PAREN);<NEW_LINE>putRegExpStaticPropertyAccessor(BuiltinFunctionKey.RegExpLastParen, Strings.LAST_PAREN, Strings.$_PLUS);<NEW_LINE>putRegExpStaticPropertyAccessor(BuiltinFunctionKey.RegExpLeftContext, Strings.LEFT_CONTEXT);<NEW_LINE>putRegExpStaticPropertyAccessor(BuiltinFunctionKey.RegExpLeftContext, Strings.LEFT_CONTEXT, Strings.$_BACKTICK);<NEW_LINE>putRegExpStaticPropertyAccessor(BuiltinFunctionKey.RegExpRightContext, Strings.RIGHT_CONTEXT);<NEW_LINE>putRegExpStaticPropertyAccessor(BuiltinFunctionKey.RegExpRightContext, Strings.RIGHT_CONTEXT, Strings.$_SQUOT);<NEW_LINE>}<NEW_LINE>putRegExpStaticPropertyAccessor(BuiltinFunctionKey.RegExp$1, Strings.$_1);<NEW_LINE>putRegExpStaticPropertyAccessor(BuiltinFunctionKey.RegExp$2, Strings.$_2);<NEW_LINE>putRegExpStaticPropertyAccessor(BuiltinFunctionKey.RegExp$3, Strings.$_3);<NEW_LINE>putRegExpStaticPropertyAccessor(BuiltinFunctionKey.RegExp$4, Strings.$_4);<NEW_LINE>putRegExpStaticPropertyAccessor(BuiltinFunctionKey.RegExp$5, Strings.$_5);<NEW_LINE>putRegExpStaticPropertyAccessor(BuiltinFunctionKey.RegExp$6, Strings.$_6);<NEW_LINE>putRegExpStaticPropertyAccessor(<MASK><NEW_LINE>putRegExpStaticPropertyAccessor(BuiltinFunctionKey.RegExp$8, Strings.$_8);<NEW_LINE>putRegExpStaticPropertyAccessor(BuiltinFunctionKey.RegExp$9, Strings.$_9);<NEW_LINE>}<NEW_LINE>}
BuiltinFunctionKey.RegExp$7, Strings.$_7);
811,545
/*<NEW_LINE>* called when the app detects that the user has permanently denied a permission, shows a dialog<NEW_LINE>* alerting them to this fact and enabling them to visit the app settings to edit permissions<NEW_LINE>*/<NEW_LINE>public static void showPermissionAlwaysDeniedDialog(@NonNull final Activity activity, @NonNull String permission) {<NEW_LINE>String message = String.format(activity.getString(R.string.permissions_denied_message)<MASK><NEW_LINE>AlertDialog.Builder builder = new MaterialAlertDialogBuilder(activity).setTitle(activity.getString(R.string.permissions_denied_title)).setMessage(Html.fromHtml(message)).setPositiveButton(R.string.button_edit_permissions, new DialogInterface.OnClickListener() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void onClick(DialogInterface dialog, int which) {<NEW_LINE>showAppSettings(activity);<NEW_LINE>}<NEW_LINE>}).setNegativeButton(R.string.button_not_now, null);<NEW_LINE>builder.show();<NEW_LINE>}
, getPermissionName(activity, permission));
552,189
public org.python.Object __next__(java.util.List<org.python.Object> args, java.util.Map<java.lang.String, org.python.Object> kwargs, java.util.List<org.python.Object> default_args, java.util.Map<java.lang.String, org.python.Object> default_kwargs) {<NEW_LINE>if (kwargs != null && kwargs.size() != 0) {<NEW_LINE>throw new org.python.exceptions.TypeError("__next__ doesn't take keyword arguments");<NEW_LINE>}<NEW_LINE>if (args != null && args.size() != 0) {<NEW_LINE>throw new org.python.exceptions.TypeError("Expected 0 arguments, got " + args.size());<NEW_LINE>}<NEW_LINE>try {<NEW_LINE><MASK><NEW_LINE>} catch (java.util.NoSuchElementException e) {<NEW_LINE>// StopIteration is a singleton by design, see org/python/exceptions/StopIteration<NEW_LINE>throw org.python.exceptions.StopIteration.STOPITERATION;<NEW_LINE>}<NEW_LINE>}
return this.iterator.previous();
125,272
private static void createReprInDocument(XTextDocument doc, String refMarkName, XTextCursor position, boolean insertSpaceAfter, boolean withoutBrackets) throws CreationException {<NEW_LINE>// The cursor we received: we push it before us.<NEW_LINE>position.collapseToEnd();<NEW_LINE>XTextCursor cursor = safeInsertSpacesBetweenReferenceMarks(<MASK><NEW_LINE>// cursors before the first and after the last space<NEW_LINE>XTextCursor cursorBefore = cursor.getText().createTextCursorByRange(cursor.getStart());<NEW_LINE>XTextCursor cursorAfter = cursor.getText().createTextCursorByRange(cursor.getEnd());<NEW_LINE>cursor.collapseToStart();<NEW_LINE>cursor.goRight((short) 1, false);<NEW_LINE>// now we are between two spaces<NEW_LINE>final String left = NamedRangeReferenceMark.REFERENCE_MARK_LEFT_BRACKET;<NEW_LINE>final String right = NamedRangeReferenceMark.REFERENCE_MARK_RIGHT_BRACKET;<NEW_LINE>String bracketedContent = (withoutBrackets ? "" : left + right);<NEW_LINE>cursor.getText().insertString(cursor, bracketedContent, true);<NEW_LINE>UnoReferenceMark.create(doc, refMarkName, cursor, true);<NEW_LINE>// eat the first inserted space<NEW_LINE>cursorBefore.goRight((short) 1, true);<NEW_LINE>cursorBefore.setString("");<NEW_LINE>if (!insertSpaceAfter) {<NEW_LINE>// eat the second inserted space<NEW_LINE>cursorAfter.goLeft((short) 1, true);<NEW_LINE>cursorAfter.setString("");<NEW_LINE>}<NEW_LINE>}
position.getEnd(), 2);
753,576
protected HttpResponse httpCall(Input input) throws Exception {<NEW_LINE>RestTemplate restTemplate = restTemplateProvider.getRestTemplate(input);<NEW_LINE>HttpHeaders headers = new HttpHeaders();<NEW_LINE>headers.setContentType(MediaType.valueOf(input.getContentType()));<NEW_LINE>headers.setAccept(Collections.singletonList(MediaType.valueOf(input.getAccept())));<NEW_LINE>input.headers.forEach((key, value) -> headers.add(key, value.toString()));<NEW_LINE>HttpEntity<Object> request = new HttpEntity<>(input.getBody(), headers);<NEW_LINE>HttpResponse response = new HttpResponse();<NEW_LINE>try {<NEW_LINE>ResponseEntity<String> responseEntity = restTemplate.exchange(input.getUri(), input.getMethod(), request, String.class);<NEW_LINE>if (responseEntity.getStatusCode().is2xxSuccessful() && responseEntity.hasBody()) {<NEW_LINE>response.body = extractBody(responseEntity.getBody());<NEW_LINE>}<NEW_LINE>response.statusCode = responseEntity.getStatusCodeValue();<NEW_LINE>response.reasonPhrase = responseEntity<MASK><NEW_LINE>response.headers = responseEntity.getHeaders();<NEW_LINE>return response;<NEW_LINE>} catch (RestClientException ex) {<NEW_LINE>LOGGER.error(String.format("Got unexpected http response - uri: %s, vipAddress: %s", input.getUri(), input.getVipAddress()), ex);<NEW_LINE>String reason = ex.getLocalizedMessage();<NEW_LINE>LOGGER.error(reason, ex);<NEW_LINE>throw new Exception(reason);<NEW_LINE>}<NEW_LINE>}
.getStatusCode().getReasonPhrase();
1,296,782
final GetReadinessCheckResult executeGetReadinessCheck(GetReadinessCheckRequest getReadinessCheckRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(getReadinessCheckRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<GetReadinessCheckRequest> request = null;<NEW_LINE>Response<GetReadinessCheckResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new GetReadinessCheckRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(getReadinessCheckRequest));<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, "Route53 Recovery Readiness");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "GetReadinessCheck");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<GetReadinessCheckResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(<MASK><NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
false), new GetReadinessCheckResultJsonUnmarshaller());
945,007
private void completeApplication(FrameworkStatus frameworkStatus, int exitCode, String exitDiagnostics, String triggerMessage, String triggerTaskRoleName, Integer triggerTaskIndex) throws Exception {<NEW_LINE>String frameworkName = frameworkStatus.getFrameworkName();<NEW_LINE><MASK><NEW_LINE>LOGGER.logSplittedLines(Level.INFO, "[%s][%s]: completeApplication: ExitCode: %s, ExitDiagnostics: %s, " + "TriggerMessage: %s, TriggerTaskRoleName: %s, TriggerTaskIndex: %s", frameworkName, applicationId, exitCode, exitDiagnostics, triggerMessage, triggerTaskRoleName, triggerTaskIndex);<NEW_LINE>statusManager.transitionFrameworkState(frameworkName, FrameworkState.APPLICATION_COMPLETED, new FrameworkEvent().setApplicationExitCode(exitCode).setApplicationExitDiagnostics(exitDiagnostics).setApplicationExitTriggerMessage(triggerMessage).setApplicationExitTriggerTaskRoleName(triggerTaskRoleName).setApplicationExitTriggerTaskIndex(triggerTaskIndex));<NEW_LINE>attemptToRetry(frameworkStatus);<NEW_LINE>}
String applicationId = frameworkStatus.getApplicationId();
52,455
private void addHtmlHeaders(MultivaluedMap<String, Object> headers) {<NEW_LINE>for (BrowserSecurityHeaders header : BrowserSecurityHeaders.values()) {<NEW_LINE>addHeader(header, headers);<NEW_LINE>}<NEW_LINE>// TODO This will be refactored as part of introducing a more strict CSP header<NEW_LINE>if (options != null) {<NEW_LINE>ContentSecurityPolicyBuilder csp = ContentSecurityPolicyBuilder.create();<NEW_LINE>if (options.isAllowAnyFrameAncestor()) {<NEW_LINE>headers.remove(<MASK><NEW_LINE>csp.frameAncestors(null);<NEW_LINE>}<NEW_LINE>String allowedFrameSrc = options.getAllowedFrameSrc();<NEW_LINE>if (allowedFrameSrc != null) {<NEW_LINE>csp.frameSrc(allowedFrameSrc);<NEW_LINE>}<NEW_LINE>if (CONTENT_SECURITY_POLICY.getDefaultValue().equals(headers.getFirst(CONTENT_SECURITY_POLICY.getHeaderName()))) {<NEW_LINE>headers.putSingle(CONTENT_SECURITY_POLICY.getHeaderName(), csp.build());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
BrowserSecurityHeaders.X_FRAME_OPTIONS.getHeaderName());
949,383
protected void horizontal() {<NEW_LINE>short[] dataX = derivX.data;<NEW_LINE>short[] dataY = derivY.data;<NEW_LINE>int[] hXX = horizXX.data;<NEW_LINE>int[] hXY = horizXY.data;<NEW_LINE>int[] hYY = horizYY.data;<NEW_LINE>final int imgHeight = derivX.getHeight();<NEW_LINE>final int imgWidth = derivX.getWidth();<NEW_LINE>int windowWidth = radius * 2 + 1;<NEW_LINE>int radp1 = radius + 1;<NEW_LINE>// CONCURRENT_BELOW BoofConcurrency.loopFor(0,imgHeight,row->{<NEW_LINE>for (int row = 0; row < imgHeight; row++) {<NEW_LINE>int pix = row * imgWidth;<NEW_LINE>int end = pix + windowWidth;<NEW_LINE>int totalXX = 0;<NEW_LINE>int totalXY = 0;<NEW_LINE>int totalYY = 0;<NEW_LINE>int indexX = derivX.startIndex + row * derivX.stride;<NEW_LINE>int indexY = derivY<MASK><NEW_LINE>for (; pix < end; pix++) {<NEW_LINE>short dx = dataX[indexX++];<NEW_LINE>short dy = dataY[indexY++];<NEW_LINE>totalXX += dx * dx;<NEW_LINE>totalXY += dx * dy;<NEW_LINE>totalYY += dy * dy;<NEW_LINE>}<NEW_LINE>hXX[pix - radp1] = totalXX;<NEW_LINE>hXY[pix - radp1] = totalXY;<NEW_LINE>hYY[pix - radp1] = totalYY;<NEW_LINE>end = row * imgWidth + imgWidth;<NEW_LINE>for (; pix < end; pix++, indexX++, indexY++) {<NEW_LINE>short dx = dataX[indexX - windowWidth];<NEW_LINE>short dy = dataY[indexY - windowWidth];<NEW_LINE>// saving these multiplications in an array to avoid recalculating them made<NEW_LINE>// the algorithm about 50% slower<NEW_LINE>totalXX -= dx * dx;<NEW_LINE>totalXY -= dx * dy;<NEW_LINE>totalYY -= dy * dy;<NEW_LINE>dx = dataX[indexX];<NEW_LINE>dy = dataY[indexY];<NEW_LINE>totalXX += dx * dx;<NEW_LINE>totalXY += dx * dy;<NEW_LINE>totalYY += dy * dy;<NEW_LINE>hXX[pix - radius] = totalXX;<NEW_LINE>hXY[pix - radius] = totalXY;<NEW_LINE>hYY[pix - radius] = totalYY;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// CONCURRENT_ABOVE });<NEW_LINE>}
.startIndex + row * derivY.stride;
1,433,635
public boolean splitStockMoveLines(StockMove stockMove, List<StockMoveLine> stockMoveLines, BigDecimal splitQty) {<NEW_LINE>boolean selected = false;<NEW_LINE>for (StockMoveLine moveLine : stockMoveLines) {<NEW_LINE>if (moveLine.isSelected()) {<NEW_LINE>selected = true;<NEW_LINE>StockMoveLine line = stockMoveLineRepo.<MASK><NEW_LINE>BigDecimal totalQty = line.getQty();<NEW_LINE>LOG.debug("Move Line selected: {}, Qty: {}", line, totalQty);<NEW_LINE>while (splitQty.compareTo(totalQty) < 0) {<NEW_LINE>totalQty = totalQty.subtract(splitQty);<NEW_LINE>StockMoveLine newLine = stockMoveLineRepo.copy(line, false);<NEW_LINE>newLine.setQty(splitQty);<NEW_LINE>newLine.setRealQty(splitQty);<NEW_LINE>newLine.setStockMove(line.getStockMove());<NEW_LINE>stockMoveLineRepo.save(newLine);<NEW_LINE>}<NEW_LINE>LOG.debug("Qty remains: {}", totalQty);<NEW_LINE>if (totalQty.compareTo(BigDecimal.ZERO) > 0) {<NEW_LINE>StockMoveLine newLine = stockMoveLineRepo.copy(line, false);<NEW_LINE>newLine.setQty(totalQty);<NEW_LINE>newLine.setRealQty(totalQty);<NEW_LINE>newLine.setStockMove(line.getStockMove());<NEW_LINE>stockMoveLineRepo.save(newLine);<NEW_LINE>LOG.debug("New line created: {}", newLine);<NEW_LINE>}<NEW_LINE>stockMove.removeStockMoveLineListItem(line);<NEW_LINE>stockMoveLineRepo.remove(line);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return selected;<NEW_LINE>}
find(moveLine.getId());
286,149
public void applyForm(final ForgottenPasswordStateMachine forgottenPasswordStateMachine, final Map<String, String> formValues) throws PwmUnrecoverableException {<NEW_LINE>final List<TokenDestinationItem> tokenDestinationItems = ForgottenPasswordUtil.figureAvailableTokenDestinations(forgottenPasswordStateMachine.getRequestContext(), forgottenPasswordStateMachine.getForgottenPasswordBean());<NEW_LINE>final Optional<TokenDestinationItem> selectedItem = TokenDestinationItem.tokenDestinationItemForID(tokenDestinationItems, formValues.get(PwmConstants.PARAM_TOKEN));<NEW_LINE>if (selectedItem.isPresent()) {<NEW_LINE>forgottenPasswordStateMachine.getForgottenPasswordBean().getProgress().<MASK><NEW_LINE>final UserInfo userInfo = ForgottenPasswordUtil.readUserInfo(forgottenPasswordStateMachine.getRequestContext(), forgottenPasswordStateMachine.getForgottenPasswordBean()).orElseThrow(() -> PwmUnrecoverableException.newException(PwmError.ERROR_INTERNAL, "unable to load userInfo while processing TokenChoiceStageHandler.applyForm"));<NEW_LINE>ForgottenPasswordUtil.initializeAndSendToken(forgottenPasswordStateMachine.getRequestContext(), userInfo, selectedItem.get());<NEW_LINE>forgottenPasswordStateMachine.getForgottenPasswordBean().getProgress().setTokenSent(true);<NEW_LINE>}<NEW_LINE>}
setTokenDestination(selectedItem.get());
1,386,664
public InternalTopMetrics reduce(List<InternalAggregation> aggregations, AggregationReduceContext reduceContext) {<NEW_LINE>if (false == isMapped()) {<NEW_LINE>return this;<NEW_LINE>}<NEW_LINE>List<TopMetric> merged = new ArrayList<>(size);<NEW_LINE>PriorityQueue<ReduceState> queue = new PriorityQueue<ReduceState>(aggregations.size()) {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>protected boolean lessThan(ReduceState lhs, ReduceState rhs) {<NEW_LINE>return sortOrder.reverseMul() * lhs.sortValue().compareTo(<MASK><NEW_LINE>}<NEW_LINE>};<NEW_LINE>for (InternalAggregation agg : aggregations) {<NEW_LINE>InternalTopMetrics result = (InternalTopMetrics) agg;<NEW_LINE>if (result.isMapped()) {<NEW_LINE>queue.add(new ReduceState(result));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>while (queue.size() > 0 && merged.size() < size) {<NEW_LINE>merged.add(queue.top().topMetric());<NEW_LINE>queue.top().index++;<NEW_LINE>if (queue.top().result.topMetrics.size() <= queue.top().index) {<NEW_LINE>queue.pop();<NEW_LINE>} else {<NEW_LINE>queue.updateTop();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return new InternalTopMetrics(getName(), sortOrder, metricNames, size, merged, getMetadata());<NEW_LINE>}
rhs.sortValue()) < 0;
1,855,146
protected void runPlainPath(AlluxioURI path, CommandLine cl) throws AlluxioException, IOException {<NEW_LINE>String[] args = cl.getArgs();<NEW_LINE>// args[0] is the path, args[1] to args[end] is the list of possible media to pin<NEW_LINE>List<String> pinnedMediumTypes = Arrays.asList(Arrays.copyOfRange(args, 1, args.length));<NEW_LINE>List<String> availableMediumList = mFsContext.getPathConf(path).getList(PropertyKey.MASTER_TIERED_STORE_GLOBAL_MEDIUMTYPE);<NEW_LINE>List<String> invalidMediumType = new ArrayList<>();<NEW_LINE>List<String> validMediumType = new ArrayList<>();<NEW_LINE>for (String mediumType : pinnedMediumTypes) {<NEW_LINE>if (availableMediumList.contains(mediumType)) {<NEW_LINE>validMediumType.add(mediumType);<NEW_LINE>} else {<NEW_LINE>invalidMediumType.add(mediumType);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (!invalidMediumType.isEmpty()) {<NEW_LINE>throw new IllegalArgumentException("Invalid medium to pin the file. " + String.join(",", invalidMediumType) + " are invalid. " + String.join(",", availableMediumList) + " are valid medium types");<NEW_LINE>}<NEW_LINE>FileSystemCommandUtils.setPinned(<MASK><NEW_LINE>System.out.println("File '" + path + "' was successfully pinned.");<NEW_LINE>}
mFileSystem, path, true, pinnedMediumTypes);
125,826
private void drawMask(Bitmap image, Mask mask) {<NEW_LINE>float r = RandomUtils.nextFloat();<NEW_LINE>float g = RandomUtils.nextFloat();<NEW_LINE>float b = RandomUtils.nextFloat();<NEW_LINE>int imageWidth = image.getWidth();<NEW_LINE>int imageHeight = image.getHeight();<NEW_LINE>int x = (int) (<MASK><NEW_LINE>int y = (int) (mask.getY() * imageHeight);<NEW_LINE>float[][] probDist = mask.getProbDist();<NEW_LINE>// Correct some coordinates of box when going out of image<NEW_LINE>if (x < 0) {<NEW_LINE>x = 0;<NEW_LINE>}<NEW_LINE>if (y < 0) {<NEW_LINE>y = 0;<NEW_LINE>}<NEW_LINE>Bitmap maskedImage = Bitmap.createBitmap(probDist.length, probDist[0].length, Bitmap.Config.ARGB_8888);<NEW_LINE>for (int xCor = 0; xCor < probDist.length; xCor++) {<NEW_LINE>for (int yCor = 0; yCor < probDist[xCor].length; yCor++) {<NEW_LINE>float opacity = probDist[xCor][yCor];<NEW_LINE>if (opacity < 0.1) {<NEW_LINE>opacity = 0f;<NEW_LINE>}<NEW_LINE>if (opacity > 0.8) {<NEW_LINE>opacity = 0.8f;<NEW_LINE>}<NEW_LINE>maskedImage.setPixel(xCor, yCor, darker(Color.argb(opacity, r, g, b)));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>Canvas canvas = new Canvas(image);<NEW_LINE>canvas.drawBitmap(maskedImage, x, y, null);<NEW_LINE>}
mask.getX() * imageWidth);
1,449,234
/*package*/<NEW_LINE>void applySlideItem(RecyclerView.ViewHolder holder, int itemPosition, float prevAmount, float amount, boolean proportionalAmount, boolean horizontal, boolean shouldAnimate, boolean isSwiping) {<NEW_LINE>final SwipeableItemViewHolder holder2 = (SwipeableItemViewHolder) holder;<NEW_LINE>final View containerView = SwipeableViewHolderUtils.getSwipeableContainerView(holder2);<NEW_LINE>if (containerView == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>final int reqBackgroundType;<NEW_LINE>if (amount == 0.0f) {<NEW_LINE>if (prevAmount == 0.0f) {<NEW_LINE>reqBackgroundType = DRAWABLE_SWIPE_NEUTRAL_BACKGROUND;<NEW_LINE>} else {<NEW_LINE>reqBackgroundType = determineBackgroundType(prevAmount, horizontal);<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>float adjustedAmount = amount;<NEW_LINE>if (amount != 0.0f) {<NEW_LINE>boolean isLimitProportional = holder2.isProportionalSwipeAmountModeEnabled();<NEW_LINE>float minLimit = horizontal ? holder2.getMaxLeftSwipeAmount() : holder2.getMaxUpSwipeAmount();<NEW_LINE>float maxLimit = horizontal ? holder2.getMaxRightSwipeAmount() : holder2.getMaxDownSwipeAmount();<NEW_LINE>minLimit = adaptAmount(holder2, horizontal, minLimit, isLimitProportional, proportionalAmount);<NEW_LINE>maxLimit = adaptAmount(holder2, horizontal, maxLimit, isLimitProportional, proportionalAmount);<NEW_LINE>adjustedAmount = Math.max(adjustedAmount, minLimit);<NEW_LINE>adjustedAmount = Math.min(adjustedAmount, maxLimit);<NEW_LINE>}<NEW_LINE>slideItem(holder, adjustedAmount, proportionalAmount, horizontal, shouldAnimate);<NEW_LINE>mWrapperAdapter.onUpdateSlideAmount(holder, itemPosition, amount, proportionalAmount, horizontal, isSwiping, reqBackgroundType);<NEW_LINE>}
reqBackgroundType = determineBackgroundType(amount, horizontal);
537,097
public VpcConfiguration unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>VpcConfiguration vpcConfiguration = new VpcConfiguration();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>JsonToken token = context.getCurrentToken();<NEW_LINE>if (token == null)<NEW_LINE>token = context.nextToken();<NEW_LINE>if (token == VALUE_NULL) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>while (true) {<NEW_LINE>if (token == null)<NEW_LINE>break;<NEW_LINE>if (token == FIELD_NAME || token == START_OBJECT) {<NEW_LINE>if (context.testExpression("SubnetIds", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>vpcConfiguration.setSubnetIds(new ListUnmarshaller<String>(context.getUnmarshaller(String.class<MASK><NEW_LINE>}<NEW_LINE>if (context.testExpression("SecurityGroupIds", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>vpcConfiguration.setSecurityGroupIds(new ListUnmarshaller<String>(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 vpcConfiguration;<NEW_LINE>}
)).unmarshall(context));
848,339
private void readOutParamsAsMap(CallableStatement cStmt) throws SQLException {<NEW_LINE>// Read OUT parameter as Map<Integer, Object>.<NEW_LINE>final Array outParam = cStmt.getArray(2);<NEW_LINE>@SuppressWarnings("unchecked")<NEW_LINE>final Map<Integer, String> outParamMap = (Map<Integer, String>) ((<MASK><NEW_LINE>System.out.println("\nValues of OUT param read as a Map of <Integer, String> pairs:");<NEW_LINE>outParamMap.forEach((key, value) -> {<NEW_LINE>System.out.println(key + "\t:\t" + value);<NEW_LINE>});<NEW_LINE>// Read IN OUT parameter as Map<Integer, Object>.<NEW_LINE>final Array inOutParam = cStmt.getArray(3);<NEW_LINE>@SuppressWarnings("unchecked")<NEW_LINE>final Map<Integer, String> inOutParamMap = (Map<Integer, String>) ((OracleArray) inOutParam).getJavaMap();<NEW_LINE>System.out.println("\nValues of IN OUT param read as a Map of <Integer, String> pairs:");<NEW_LINE>inOutParamMap.forEach((key, value) -> {<NEW_LINE>System.out.println(key + "\t:\t" + value);<NEW_LINE>});<NEW_LINE>}
OracleArray) outParam).getJavaMap();
1,457,064
protected TypeBinding internalResolveType(Scope scope, int location) {<NEW_LINE>// handle the error here<NEW_LINE>this.constant = Constant.NotAConstant;<NEW_LINE>checkYieldUsage(scope);<NEW_LINE>if (this.resolvedType != null) {<NEW_LINE>// is a shared type reference which was already resolved<NEW_LINE>if (this.resolvedType.isValidBinding()) {<NEW_LINE>return this.resolvedType;<NEW_LINE>} else {<NEW_LINE>switch(this.resolvedType.problemId()) {<NEW_LINE>case ProblemReasons.NotFound:<NEW_LINE>case ProblemReasons.NotVisible:<NEW_LINE>case ProblemReasons.InheritedNameHidesEnclosingName:<NEW_LINE>TypeBinding type = this.resolvedType.closestMatch();<NEW_LINE>if (type == null)<NEW_LINE>return null;<NEW_LINE>return scope.environment().convertToRawType(type, false);<NEW_LINE>default:<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>boolean hasError;<NEW_LINE>TypeBinding type = <MASK><NEW_LINE>if (type == null) {<NEW_LINE>// detected cycle while resolving hierarchy<NEW_LINE>return null;<NEW_LINE>} else if ((hasError = !type.isValidBinding()) == true) {<NEW_LINE>if (this.isTypeNameVar(scope)) {<NEW_LINE>reportVarIsNotAllowedHere(scope);<NEW_LINE>} else {<NEW_LINE>reportInvalidType(scope);<NEW_LINE>}<NEW_LINE>TypeDeclaration.checkAndFlagRecordNameErrors(getTypeName(0), this, scope);<NEW_LINE>switch(type.problemId()) {<NEW_LINE>case ProblemReasons.NotFound:<NEW_LINE>case ProblemReasons.NotVisible:<NEW_LINE>case ProblemReasons.InheritedNameHidesEnclosingName:<NEW_LINE>type = type.closestMatch();<NEW_LINE>if (type == null)<NEW_LINE>return null;<NEW_LINE>break;<NEW_LINE>default:<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (type.isArrayType() && ((ArrayBinding) type).leafComponentType == TypeBinding.VOID) {<NEW_LINE>scope.problemReporter().cannotAllocateVoidArray(this);<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>if (// QualifiedTypeReference#getTypeBinding called above will have already checked deprecation<NEW_LINE>!(this instanceof QualifiedTypeReference) && isTypeUseDeprecated(type, scope)) {<NEW_LINE>reportDeprecatedType(type, scope);<NEW_LINE>}<NEW_LINE>type = scope.environment().convertToRawType(type, false);<NEW_LINE>if (type.leafComponentType().isRawType() && (this.bits & ASTNode.IgnoreRawTypeCheck) == 0 && scope.compilerOptions().getSeverity(CompilerOptions.RawTypeReference) != ProblemSeverities.Ignore) {<NEW_LINE>scope.problemReporter().rawTypeReference(this, type);<NEW_LINE>}<NEW_LINE>if (hasError) {<NEW_LINE>// don't apply null defaults to buggy type<NEW_LINE>resolveAnnotations(scope, 0);<NEW_LINE>return type;<NEW_LINE>} else {<NEW_LINE>// store the computed type only if no error, otherwise keep the problem type instead<NEW_LINE>this.resolvedType = type;<NEW_LINE>resolveAnnotations(scope, location);<NEW_LINE>// pick up value that may have been changed in resolveAnnotations(..)<NEW_LINE>return this.resolvedType;<NEW_LINE>}<NEW_LINE>}
this.resolvedType = getTypeBinding(scope);
1,008,647
private void createExpandItem() {<NEW_LINE>if (!(parent instanceof SWTSkinObjectExpandBar)) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>final SWTSkinObjectExpandBar soExpandBar = (SWTSkinObjectExpandBar) parent;<NEW_LINE>int style = SWT.NONE;<NEW_LINE>if (properties.getIntValue(sConfigID + ".border", 0) == 1) {<NEW_LINE>style = SWT.BORDER;<NEW_LINE>}<NEW_LINE>final ExpandBar expandBar = soExpandBar.getExpandbar();<NEW_LINE>expandBar.addExpandListener(this);<NEW_LINE>expandItem = new ExpandItem(expandBar, style);<NEW_LINE>String lastExpandStateID = "ui.skin." + sConfigID + ".expanded";<NEW_LINE>if (COConfigurationManager.hasParameter(lastExpandStateID, true)) {<NEW_LINE>boolean lastExpandState = COConfigurationManager.getBooleanParameter(lastExpandStateID, false);<NEW_LINE>setExpanded(lastExpandState);<NEW_LINE>} else if (properties.getBooleanValue(sConfigID + ".expanded", false)) {<NEW_LINE>setExpanded(true);<NEW_LINE>}<NEW_LINE>composite = createComposite(soExpandBar.getComposite());<NEW_LINE>expandItem.setControl(composite);<NEW_LINE>composite.setLayoutData(null);<NEW_LINE>composite.setData("skin.layedout", true);<NEW_LINE>soExpandBar.addExpandItem(this);<NEW_LINE>expandItem.addDisposeListener(new DisposeListener() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void widgetDisposed(DisposeEvent e) {<NEW_LINE>soExpandBar.removeExpandItem(SWTSkinObjectExpandItem.this);<NEW_LINE>}<NEW_LINE>});<NEW_LINE>composite.addListener(SWT.Resize, new Listener() {<NEW_LINE><NEW_LINE>private Map<Rectangle, Long> resize_history = new HashMap<>();<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void handleEvent(Event event) {<NEW_LINE>Rectangle bounds = composite.getBounds();<NEW_LINE>long now = SystemTime.getMonotonousTime();<NEW_LINE>Long prev = resize_history.get(bounds);<NEW_LINE>if (prev != null) {<NEW_LINE>if (now - prev < 500) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>Iterator<Long> it = resize_history<MASK><NEW_LINE>while (it.hasNext()) {<NEW_LINE>if (now - it.next() >= 500) {<NEW_LINE>it.remove();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>resize_history.put(bounds, now);<NEW_LINE>Utils.execSWTThreadLater(0, new AERunnable() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void runSupport() {<NEW_LINE>SWTSkinObjectExpandBar soExpandBar = (SWTSkinObjectExpandBar) parent;<NEW_LINE>if (!expandItem.isDisposed()) {<NEW_LINE>soExpandBar.handleResize(expandItem);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>});<NEW_LINE>}<NEW_LINE>});<NEW_LINE>}
.values().iterator();
1,832,228
private Set<String> findModifiedPaths() throws MojoExecutionException {<NEW_LINE>try {<NEW_LINE>final ScmRepository repository = this.manager.makeScmRepository(getSCMConnection());<NEW_LINE>final File scmRoot = scmRoot();<NEW_LINE>this.getLog(<MASK><NEW_LINE>final Set<ScmFileStatus> statusToInclude = makeStatusSet();<NEW_LINE>final Set<String> modifiedPaths;<NEW_LINE>if (analyseLastCommit) {<NEW_LINE>modifiedPaths = lastCommitChanges(statusToInclude, repository, scmRoot);<NEW_LINE>} else if (originBranch != null && destinationBranch != null) {<NEW_LINE>modifiedPaths = changesBetweenBranchs(originBranch, destinationBranch, statusToInclude, repository, scmRoot);<NEW_LINE>} else {<NEW_LINE>modifiedPaths = localChanges(statusToInclude, repository, scmRoot);<NEW_LINE>}<NEW_LINE>return modifiedPaths;<NEW_LINE>} catch (final ScmException e) {<NEW_LINE>throw new MojoExecutionException("Error while querying scm", e);<NEW_LINE>}<NEW_LINE>}
).info("Scm root dir is " + scmRoot);
496,708
public void marshall(RestoreTableRequest restoreTableRequest, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (restoreTableRequest == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(restoreTableRequest.getSourceKeyspaceName(), SOURCEKEYSPACENAME_BINDING);<NEW_LINE>protocolMarshaller.marshall(restoreTableRequest.getSourceTableName(), SOURCETABLENAME_BINDING);<NEW_LINE>protocolMarshaller.marshall(restoreTableRequest.getTargetKeyspaceName(), TARGETKEYSPACENAME_BINDING);<NEW_LINE>protocolMarshaller.marshall(restoreTableRequest.getTargetTableName(), TARGETTABLENAME_BINDING);<NEW_LINE>protocolMarshaller.marshall(restoreTableRequest.getRestoreTimestamp(), RESTORETIMESTAMP_BINDING);<NEW_LINE>protocolMarshaller.marshall(restoreTableRequest.getCapacitySpecificationOverride(), CAPACITYSPECIFICATIONOVERRIDE_BINDING);<NEW_LINE>protocolMarshaller.marshall(restoreTableRequest.getEncryptionSpecificationOverride(), ENCRYPTIONSPECIFICATIONOVERRIDE_BINDING);<NEW_LINE>protocolMarshaller.marshall(<MASK><NEW_LINE>protocolMarshaller.marshall(restoreTableRequest.getTagsOverride(), TAGSOVERRIDE_BINDING);<NEW_LINE>} catch (Exception e) {<NEW_LINE>throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e);<NEW_LINE>}<NEW_LINE>}
restoreTableRequest.getPointInTimeRecoveryOverride(), POINTINTIMERECOVERYOVERRIDE_BINDING);
917,635
void promptNameAndSave(final InputStream in, final String attachmentFileName) {<NEW_LINE>TextInputDialogUtils.textInput(this, R.string.title_file_received, attachmentFileName, R.string.action_file_received_edit, text -> {<NEW_LINE>File outFile = saveStreamWithName(in, text);<NEW_LINE>if (outFile == null)<NEW_LINE>return;<NEW_LINE>final File editorProgramFile = new File(EDITOR_PROGRAM);<NEW_LINE>if (!editorProgramFile.isFile()) {<NEW_LINE>showErrorDialogAndQuit("The following file does not exist:\n$HOME/bin/termux-file-editor\n\n" + "Create this file as a script or a symlink - it will be called with the received file as only argument.");<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>// Do this for the user if necessary:<NEW_LINE>// noinspection ResultOfMethodCallIgnored<NEW_LINE>editorProgramFile.setExecutable(true);<NEW_LINE>final Uri scriptUri = UriUtils.getFileUri(EDITOR_PROGRAM);<NEW_LINE>Intent executeIntent = new Intent(TERMUX_SERVICE.ACTION_SERVICE_EXECUTE, scriptUri);<NEW_LINE>executeIntent.setClass(TermuxFileReceiverActivity.this, TermuxService.class);<NEW_LINE>executeIntent.putExtra(TERMUX_SERVICE.EXTRA_ARGUMENTS, new String[] <MASK><NEW_LINE>startService(executeIntent);<NEW_LINE>finish();<NEW_LINE>}, R.string.action_file_received_open_directory, text -> {<NEW_LINE>if (saveStreamWithName(in, text) == null)<NEW_LINE>return;<NEW_LINE>Intent executeIntent = new Intent(TERMUX_SERVICE.ACTION_SERVICE_EXECUTE);<NEW_LINE>executeIntent.putExtra(TERMUX_SERVICE.EXTRA_WORKDIR, TERMUX_RECEIVEDIR);<NEW_LINE>executeIntent.setClass(TermuxFileReceiverActivity.this, TermuxService.class);<NEW_LINE>startService(executeIntent);<NEW_LINE>finish();<NEW_LINE>}, android.R.string.cancel, text -> finish(), dialog -> {<NEW_LINE>if (mFinishOnDismissNameDialog)<NEW_LINE>finish();<NEW_LINE>});<NEW_LINE>}
{ outFile.getAbsolutePath() });
317,892
public static DescribeDataCountsResponse unmarshall(DescribeDataCountsResponse describeDataCountsResponse, UnmarshallerContext context) {<NEW_LINE>describeDataCountsResponse.setRequestId(context.stringValue("DescribeDataCountsResponse.RequestId"));<NEW_LINE>List<DataCount> dataCountList = new ArrayList<DataCount>();<NEW_LINE>for (int i = 0; i < context.lengthValue("DescribeDataCountsResponse.DataCountList.Length"); i++) {<NEW_LINE>DataCount dataCount = new DataCount();<NEW_LINE>dataCount.setProductId(context.longValue("DescribeDataCountsResponse.DataCountList[" + i + "].ProductId"));<NEW_LINE>dataCount.setProductCode(context.stringValue("DescribeDataCountsResponse.DataCountList[" + i + "].ProductCode"));<NEW_LINE>Instance instance = new Instance();<NEW_LINE>instance.setTotalCount(context.longValue("DescribeDataCountsResponse.DataCountList[" + i + "].Instance.TotalCount"));<NEW_LINE>instance.setCount(context.longValue<MASK><NEW_LINE>instance.setSensitiveCount(context.longValue("DescribeDataCountsResponse.DataCountList[" + i + "].Instance.SensitiveCount"));<NEW_LINE>instance.setLastCount(context.longValue("DescribeDataCountsResponse.DataCountList[" + i + "].Instance.LastCount"));<NEW_LINE>instance.setLastSensitiveCount(context.longValue("DescribeDataCountsResponse.DataCountList[" + i + "].Instance.LastSensitiveCount"));<NEW_LINE>dataCount.setInstance(instance);<NEW_LINE>Table table = new Table();<NEW_LINE>table.setTotalCount(context.longValue("DescribeDataCountsResponse.DataCountList[" + i + "].Table.TotalCount"));<NEW_LINE>table.setCount(context.longValue("DescribeDataCountsResponse.DataCountList[" + i + "].Table.Count"));<NEW_LINE>table.setSensitiveCount(context.longValue("DescribeDataCountsResponse.DataCountList[" + i + "].Table.SensitiveCount"));<NEW_LINE>table.setLastCount(context.longValue("DescribeDataCountsResponse.DataCountList[" + i + "].Table.LastCount"));<NEW_LINE>table.setLastSensitiveCount(context.longValue("DescribeDataCountsResponse.DataCountList[" + i + "].Table.LastSensitiveCount"));<NEW_LINE>dataCount.setTable(table);<NEW_LINE>_Package _package = new _Package();<NEW_LINE>_package.setTotalCount(context.longValue("DescribeDataCountsResponse.DataCountList[" + i + "].Package.TotalCount"));<NEW_LINE>_package.setCount(context.longValue("DescribeDataCountsResponse.DataCountList[" + i + "].Package.Count"));<NEW_LINE>_package.setSensitiveCount(context.longValue("DescribeDataCountsResponse.DataCountList[" + i + "].Package.SensitiveCount"));<NEW_LINE>_package.setLastCount(context.longValue("DescribeDataCountsResponse.DataCountList[" + i + "].Package.LastCount"));<NEW_LINE>_package.setLastSensitiveCount(context.longValue("DescribeDataCountsResponse.DataCountList[" + i + "].Package.LastSensitiveCount"));<NEW_LINE>dataCount.set_Package(_package);<NEW_LINE>Column column = new Column();<NEW_LINE>column.setTotalCount(context.longValue("DescribeDataCountsResponse.DataCountList[" + i + "].Column.TotalCount"));<NEW_LINE>column.setCount(context.longValue("DescribeDataCountsResponse.DataCountList[" + i + "].Column.Count"));<NEW_LINE>column.setSensitiveCount(context.longValue("DescribeDataCountsResponse.DataCountList[" + i + "].Column.SensitiveCount"));<NEW_LINE>column.setLastCount(context.longValue("DescribeDataCountsResponse.DataCountList[" + i + "].Column.LastCount"));<NEW_LINE>column.setLastSensitiveCount(context.longValue("DescribeDataCountsResponse.DataCountList[" + i + "].Column.LastSensitiveCount"));<NEW_LINE>dataCount.setColumn(column);<NEW_LINE>Oss oss = new Oss();<NEW_LINE>oss.setTotalCount(context.longValue("DescribeDataCountsResponse.DataCountList[" + i + "].Oss.TotalCount"));<NEW_LINE>oss.setCount(context.longValue("DescribeDataCountsResponse.DataCountList[" + i + "].Oss.Count"));<NEW_LINE>oss.setSensitiveCount(context.longValue("DescribeDataCountsResponse.DataCountList[" + i + "].Oss.SensitiveCount"));<NEW_LINE>oss.setLastCount(context.longValue("DescribeDataCountsResponse.DataCountList[" + i + "].Oss.LastCount"));<NEW_LINE>oss.setLastSensitiveCount(context.longValue("DescribeDataCountsResponse.DataCountList[" + i + "].Oss.LastSensitiveCount"));<NEW_LINE>dataCount.setOss(oss);<NEW_LINE>dataCountList.add(dataCount);<NEW_LINE>}<NEW_LINE>describeDataCountsResponse.setDataCountList(dataCountList);<NEW_LINE>return describeDataCountsResponse;<NEW_LINE>}
("DescribeDataCountsResponse.DataCountList[" + i + "].Instance.Count"));
1,601,084
public void applyOptions() {<NEW_LINE>bottomTabs.perform(bottomTabs -> {<NEW_LINE>for (int i = 0; i < tabs.size(); i++) {<NEW_LINE>BottomTabOptions tab = tabs.get(i).resolveCurrentOptions(defaultOptions).bottomTabOptions;<NEW_LINE>bottomTabs.setIconWidth(i, tab.iconWidth.get(null));<NEW_LINE>bottomTabs.setIconHeight(i, tab.iconHeight.get(null));<NEW_LINE>bottomTabs.setTitleTypeface(i, tab.font<MASK><NEW_LINE>if (tab.selectedIconColor.canApplyValue())<NEW_LINE>bottomTabs.setIconActiveColor(i, tab.selectedIconColor.get(null));<NEW_LINE>if (tab.iconColor.canApplyValue())<NEW_LINE>bottomTabs.setIconInactiveColor(i, tab.iconColor.get(null));<NEW_LINE>bottomTabs.setTitleActiveColor(i, tab.selectedTextColor.get(null));<NEW_LINE>bottomTabs.setTitleInactiveColor(i, tab.textColor.get(null));<NEW_LINE>if (tab.fontSize.hasValue())<NEW_LINE>bottomTabs.setTitleInactiveTextSizeInSp(i, Float.valueOf(tab.fontSize.get()));<NEW_LINE>if (tab.selectedFontSize.hasValue())<NEW_LINE>bottomTabs.setTitleActiveTextSizeInSp(i, Float.valueOf(tab.selectedFontSize.get()));<NEW_LINE>if (tab.testId.hasValue())<NEW_LINE>bottomTabs.setTag(i, tab.testId.get());<NEW_LINE>if (shouldApplyDot(tab))<NEW_LINE>applyDotIndicator(i, tab.dotIndicator);<NEW_LINE>if (tab.badge.hasValue())<NEW_LINE>applyBadge(i, tab);<NEW_LINE>}<NEW_LINE>});<NEW_LINE>}
.getTypeface(typefaceLoader, defaultTypeface));
1,634,027
public static QueryIntentionPriceResponse unmarshall(QueryIntentionPriceResponse queryIntentionPriceResponse, UnmarshallerContext _ctx) {<NEW_LINE>queryIntentionPriceResponse.setRequestId(_ctx.stringValue("QueryIntentionPriceResponse.RequestId"));<NEW_LINE>queryIntentionPriceResponse.setTotalItemNum(_ctx.integerValue("QueryIntentionPriceResponse.TotalItemNum"));<NEW_LINE>queryIntentionPriceResponse.setCurrentPageNum(_ctx.integerValue("QueryIntentionPriceResponse.CurrentPageNum"));<NEW_LINE>queryIntentionPriceResponse.setPageSize(_ctx.integerValue("QueryIntentionPriceResponse.PageSize"));<NEW_LINE>queryIntentionPriceResponse.setTotalPageNum(_ctx.integerValue("QueryIntentionPriceResponse.TotalPageNum"));<NEW_LINE>List<TmProduces> data = new ArrayList<TmProduces>();<NEW_LINE>for (int i = 0; i < _ctx.lengthValue("QueryIntentionPriceResponse.Data.Length"); i++) {<NEW_LINE>TmProduces tmProduces = new TmProduces();<NEW_LINE>tmProduces.setBizId(_ctx.stringValue("QueryIntentionPriceResponse.Data[" + i + "].BizId"));<NEW_LINE>tmProduces.setMaterialName(_ctx.stringValue("QueryIntentionPriceResponse.Data[" + i + "].MaterialName"));<NEW_LINE>tmProduces.setTmIcon(_ctx.stringValue("QueryIntentionPriceResponse.Data[" + i + "].TmIcon"));<NEW_LINE>tmProduces.setTmName(_ctx.stringValue("QueryIntentionPriceResponse.Data[" + i + "].TmName"));<NEW_LINE>tmProduces.setTmNumber(_ctx.stringValue("QueryIntentionPriceResponse.Data[" + i + "].TmNumber"));<NEW_LINE>tmProduces.setCreateTime(_ctx.longValue("QueryIntentionPriceResponse.Data[" + i + "].CreateTime"));<NEW_LINE>tmProduces.setType(_ctx.integerValue("QueryIntentionPriceResponse.Data[" + i + "].Type"));<NEW_LINE>tmProduces.setStatus(_ctx.integerValue("QueryIntentionPriceResponse.Data[" + i + "].Status"));<NEW_LINE>tmProduces.setOrderPrice(_ctx.floatValue("QueryIntentionPriceResponse.Data[" + i + "].OrderPrice"));<NEW_LINE>tmProduces.setMaterialId(_ctx.stringValue("QueryIntentionPriceResponse.Data[" + i + "].MaterialId"));<NEW_LINE>tmProduces.setLoaUrl(_ctx.stringValue("QueryIntentionPriceResponse.Data[" + i + "].LoaUrl"));<NEW_LINE>tmProduces.setNote(_ctx.stringValue("QueryIntentionPriceResponse.Data[" + i + "].Note"));<NEW_LINE>tmProduces.setUpdateTime(_ctx.longValue("QueryIntentionPriceResponse.Data[" + i + "].UpdateTime"));<NEW_LINE>tmProduces.setSupplementStatus(_ctx.integerValue("QueryIntentionPriceResponse.Data[" + i + "].SupplementStatus"));<NEW_LINE>tmProduces.setSupplementId(_ctx.longValue("QueryIntentionPriceResponse.Data[" + i + "].SupplementId"));<NEW_LINE>tmProduces.setTotalPrice(_ctx.floatValue("QueryIntentionPriceResponse.Data[" + i + "].TotalPrice"));<NEW_LINE>tmProduces.setServicePrice(_ctx.floatValue("QueryIntentionPriceResponse.Data[" + i + "].ServicePrice"));<NEW_LINE>FirstClassification firstClassification = new FirstClassification();<NEW_LINE>firstClassification.setClassificationCode(_ctx.stringValue("QueryIntentionPriceResponse.Data[" + i + "].FirstClassification.ClassificationCode"));<NEW_LINE>firstClassification.setClassificationName(_ctx.stringValue("QueryIntentionPriceResponse.Data[" + i + "].FirstClassification.ClassificationName"));<NEW_LINE>tmProduces.setFirstClassification(firstClassification);<NEW_LINE>List<ThirdClassifications> thirdClassification = new ArrayList<ThirdClassifications>();<NEW_LINE>for (int j = 0; j < _ctx.lengthValue("QueryIntentionPriceResponse.Data[" + i + "].ThirdClassification.Length"); j++) {<NEW_LINE>ThirdClassifications thirdClassifications = new ThirdClassifications();<NEW_LINE>thirdClassifications.setClassificationCode(_ctx.stringValue("QueryIntentionPriceResponse.Data[" + i <MASK><NEW_LINE>thirdClassifications.setClassificationName(_ctx.stringValue("QueryIntentionPriceResponse.Data[" + i + "].ThirdClassification[" + j + "].ClassificationName"));<NEW_LINE>thirdClassification.add(thirdClassifications);<NEW_LINE>}<NEW_LINE>tmProduces.setThirdClassification(thirdClassification);<NEW_LINE>data.add(tmProduces);<NEW_LINE>}<NEW_LINE>queryIntentionPriceResponse.setData(data);<NEW_LINE>return queryIntentionPriceResponse;<NEW_LINE>}
+ "].ThirdClassification[" + j + "].ClassificationCode"));
779,185
public V put(int key, V value) {<NEW_LINE>// Makes sure the key is not already in the hashtable.<NEW_LINE>Entry<V>[] tab = table;<NEW_LINE>int hash = key;<NEW_LINE>int index = (hash & 0x7FFFFFFF) % tab.length;<NEW_LINE>for (Entry<V> e = tab[index]; e != null; e = e.next) {<NEW_LINE>if (e.hash == hash) {<NEW_LINE>V old = e.value;<NEW_LINE>e.value = value;<NEW_LINE>return old;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (count >= threshold) {<NEW_LINE>// Rehash the table if the threshold is exceeded<NEW_LINE>rehash();<NEW_LINE>tab = table;<NEW_LINE>index = (<MASK><NEW_LINE>}<NEW_LINE>// Creates the new entry.<NEW_LINE>Entry<V> e = new Entry<V>(hash, key, value, tab[index]);<NEW_LINE>tab[index] = e;<NEW_LINE>count++;<NEW_LINE>return null;<NEW_LINE>}
hash & 0x7FFFFFFF) % tab.length;
1,057,354
private MiniMRPProduct addProductToProcess(MReplenish replenish, Map<Integer, MiniMRPProduct> miniMrpProducts, Set<Integer> productIds) {<NEW_LINE>MProduct product = MProduct.get(getCtx(), replenish.getM_Product_ID());<NEW_LINE>// Get current vendor<NEW_LINE>MProductPO[] productPO = MProductPO.getOfProduct(getCtx(), product.getM_Product_ID(), get_TrxName());<NEW_LINE>int bPartnerId = 0;<NEW_LINE>// Get Business Partner<NEW_LINE>if (productPO.length > 0) {<NEW_LINE>bPartnerId = productPO[0].getC_BPartner_ID();<NEW_LINE>}<NEW_LINE>BigDecimal levelMin = replenish.getLevel_Min();<NEW_LINE>BigDecimal availableInventory = MStorage.getQtyAvailable(getWarehouseId(), 0, product.getM_Product_ID(), 0, get_TrxName());<NEW_LINE>if (availableInventory == null) {<NEW_LINE>availableInventory = Env.ZERO;<NEW_LINE>}<NEW_LINE>// Phantom<NEW_LINE>if (product.isPhantom()) {<NEW_LINE>levelMin = Env.ZERO;<NEW_LINE>availableInventory = Env.ZERO;<NEW_LINE>}<NEW_LINE>// Get Product Price<NEW_LINE>MProductPricing price = new MProductPricing(product.getM_Product_ID(), bPartnerId, levelMin, false, get_TrxName());<NEW_LINE>price.setM_PriceList_ID(priceListId);<NEW_LINE>price.calculatePrice();<NEW_LINE>//<NEW_LINE>MiniMRPProduct miniMrpProduct = new MiniMRPProduct(product.getM_Product_ID());<NEW_LINE>miniMrpProduct.setAvailableQty(availableInventory);<NEW_LINE>miniMrpProduct.setName(product.getName());<NEW_LINE>miniMrpProduct.setM_Product_Category_ID(product.getM_Product_Category_ID());<NEW_LINE>miniMrpProduct.setProjectedLeadTime(0);<NEW_LINE>miniMrpProduct.setBOM(product.isBOM());<NEW_LINE>miniMrpProduct.setVerified(product.isVerified());<NEW_LINE>miniMrpProduct.setPurchased(product.isPurchased());<NEW_LINE>miniMrpProduct.setPhantom(product.isPhantom());<NEW_LINE>miniMrpProduct.setC_BPartner_ID(bPartnerId);<NEW_LINE>miniMrpProduct.setPriceActual(price.getPriceList());<NEW_LINE>miniMrpProduct.setQtyBatchSize(replenish.getQtyBatchSize());<NEW_LINE>miniMrpProduct.setLevel_Min(levelMin);<NEW_LINE>miniMrpProduct.setReplenishTypeMRPCalculated(replenish.getReplenishType().equals(X_M_Replenish.REPLENISHTYPE_ReplenishPlanCalculated));<NEW_LINE>if (miniMrpProduct.isReplenishTypeMRPCalculated())<NEW_LINE>miniMrpProduct.setQtyOnHand(availableInventory.subtract(levelMin));<NEW_LINE>else<NEW_LINE>miniMrpProduct.setQtyOnHand(availableInventory);<NEW_LINE>// Check product QTY is negative then create demand.<NEW_LINE>if (miniMrpProduct.getQtyOnHand().compareTo(Env.ZERO) < 0 && !product.isPhantom()) {<NEW_LINE>setQtyAsDemand(product.getM_Product_ID(), miniMrpProduct.getQtyOnHand().negate(), getDateStart());<NEW_LINE>miniMrpProduct.setQtyOnHand(Env.ZERO);<NEW_LINE>}<NEW_LINE>// Manage Inventory & ProductId blueprint here.<NEW_LINE>productIds.<MASK><NEW_LINE>miniMrpProducts.put(product.getM_Product_ID(), miniMrpProduct);<NEW_LINE>addAvailableInventory(product.getM_Product_ID(), availableInventory);<NEW_LINE>// Retrieve Confirmed Product QTY. If non BOM product then retrieve all<NEW_LINE>// requisition data for docType is 'MRP Requisition'.<NEW_LINE>setConfirmProductQty(miniMrpProduct);<NEW_LINE>return miniMrpProduct;<NEW_LINE>}
add(product.getM_Product_ID());
787,781
public static int compareVersions(String left, String right, boolean isStrict, boolean handleHyphen) {<NEW_LINE>if (left == null) {<NEW_LINE>left = StringUtil.EMPTY;<NEW_LINE>}<NEW_LINE>if (right == null) {<NEW_LINE>right = StringUtil.EMPTY;<NEW_LINE>}<NEW_LINE>int result;<NEW_LINE>String[] lparts = VERSION_DOT_PATTERN.split(left);<NEW_LINE>String[] rparts = VERSION_DOT_PATTERN.split(right);<NEW_LINE>// Make versions equal length<NEW_LINE>if (!isStrict && lparts.length != rparts.length) {<NEW_LINE>int diff = Math.abs(lparts.length - rparts.length);<NEW_LINE>String[] moreParts = new String[diff];<NEW_LINE>for (int i = 0; i < moreParts.length; i++) {<NEW_LINE>// $NON-NLS-1$<NEW_LINE>moreParts[i] = "0";<NEW_LINE>}<NEW_LINE>if (lparts.length < rparts.length) {<NEW_LINE>lparts = ArrayUtil.flatten(lparts, moreParts);<NEW_LINE>} else {<NEW_LINE>rparts = <MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE>for (int i = 0; i < lparts.length && i < rparts.length; ++i) {<NEW_LINE>try {<NEW_LINE>Integer lInt = Integer.valueOf(lparts[i]);<NEW_LINE>Integer rInt = Integer.valueOf(rparts[i]);<NEW_LINE>result = lInt.compareTo(rInt);<NEW_LINE>} catch (NumberFormatException ex) {<NEW_LINE>if (handleHyphen) {<NEW_LINE>result = compareVersionsWithHyphen(lparts[i], rparts[i]);<NEW_LINE>} else {<NEW_LINE>result = lparts[i].compareToIgnoreCase(rparts[i]);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (result != 0) {<NEW_LINE>return result;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return (lparts.length - rparts.length);<NEW_LINE>}
ArrayUtil.flatten(rparts, moreParts);
547,697
public static GrayU8 median(GrayU8 input, @Nullable GrayU8 output, int radiusX, int radiusY, @Nullable GrowArray<DogArray_I32> work) {<NEW_LINE>if (radiusX <= 0 || radiusY <= 0)<NEW_LINE>throw new IllegalArgumentException("Radius must be > 0");<NEW_LINE>boolean processed = BOverrideBlurImageOps.invokeNativeMedian(input, output, radiusX, radiusY);<NEW_LINE>if (!processed) {<NEW_LINE>work = BoofMiscOps.checkDeclare(work, DogArray_I32::new);<NEW_LINE>if (BoofConcurrency.USE_CONCURRENT) {<NEW_LINE>ImplMedianHistogramInner_MT.process(input, <MASK><NEW_LINE>} else {<NEW_LINE>ImplMedianHistogramInner.process(input, output, radiusX, radiusY, work);<NEW_LINE>}<NEW_LINE>// TODO Optimize this algorithm. It is taking up a large percentage of the CPU time<NEW_LINE>ImplMedianSortEdgeNaive.process(input, output, radiusX, radiusY, work.grow());<NEW_LINE>}<NEW_LINE>return output;<NEW_LINE>}
output, radiusX, radiusY, work);
118,597
public void write(DataOutput out) throws IOException {<NEW_LINE>super.write(out);<NEW_LINE>Text.writeString(out, backupTimestamp);<NEW_LINE>jobInfo.write(out);<NEW_LINE>out.writeBoolean(allowLoad);<NEW_LINE>Text.writeString(out, state.name());<NEW_LINE>if (backupMeta != null) {<NEW_LINE>out.writeBoolean(true);<NEW_LINE>backupMeta.write(out);<NEW_LINE>} else {<NEW_LINE>out.writeBoolean(false);<NEW_LINE>}<NEW_LINE>fileMapping.write(out);<NEW_LINE>out.writeLong(metaPreparedTime);<NEW_LINE>out.writeLong(snapshotFinishedTime);<NEW_LINE>out.writeLong(downloadFinishedTime);<NEW_LINE>out.writeInt(restoreReplicationNum);<NEW_LINE>out.writeInt(restoredPartitions.size());<NEW_LINE>for (Pair<String, Partition> entry : restoredPartitions) {<NEW_LINE>Text.writeString(out, entry.first);<NEW_LINE>entry.second.write(out);<NEW_LINE>}<NEW_LINE>out.<MASK><NEW_LINE>for (OlapTable tbl : restoredTbls) {<NEW_LINE>tbl.write(out);<NEW_LINE>}<NEW_LINE>out.writeInt(restoredVersionInfo.rowKeySet().size());<NEW_LINE>for (long tblId : restoredVersionInfo.rowKeySet()) {<NEW_LINE>out.writeLong(tblId);<NEW_LINE>out.writeInt(restoredVersionInfo.row(tblId).size());<NEW_LINE>for (Map.Entry<Long, Long> entry : restoredVersionInfo.row(tblId).entrySet()) {<NEW_LINE>out.writeLong(entry.getKey());<NEW_LINE>out.writeLong(entry.getValue());<NEW_LINE>// write a version_hash for compatibility<NEW_LINE>out.writeLong(0);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>out.writeInt(snapshotInfos.rowKeySet().size());<NEW_LINE>for (long tabletId : snapshotInfos.rowKeySet()) {<NEW_LINE>out.writeLong(tabletId);<NEW_LINE>Map<Long, SnapshotInfo> map = snapshotInfos.row(tabletId);<NEW_LINE>out.writeInt(map.size());<NEW_LINE>for (Map.Entry<Long, SnapshotInfo> entry : map.entrySet()) {<NEW_LINE>out.writeLong(entry.getKey());<NEW_LINE>entry.getValue().write(out);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
writeInt(restoredTbls.size());
273,503
final DeleteApiResult executeDeleteApi(DeleteApiRequest deleteApiRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(deleteApiRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<DeleteApiRequest> request = null;<NEW_LINE>Response<DeleteApiResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new DeleteApiRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(deleteApiRequest));<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, "ApiGatewayV2");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteApi");<NEW_LINE>request.<MASK><NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<DeleteApiResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeleteApiResultJsonUnmarshaller());<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);
145,832
public void run() {<NEW_LINE>File[] folders;<NEW_LINE>synchronized (foldersToCheck) {<NEW_LINE>folders = foldersToCheck.toArray(new File[foldersToCheck.size()]);<NEW_LINE>foldersToCheck.clear();<NEW_LINE>loggingTask = null;<NEW_LINE>}<NEW_LINE>for (File f : folders) {<NEW_LINE>if (!checkFolderLogged(f, false)) {<NEW_LINE>// if other task has not processed the root yet<NEW_LINE>VersioningSystem vs = VersioningSupport.getOwner(f);<NEW_LINE>if (vs != null) {<NEW_LINE>File root = vs.getTopmostManagedAncestor(f);<NEW_LINE>if (root != null) {<NEW_LINE>// remember the root<NEW_LINE>checkFolderLogged(root, true);<NEW_LINE>FileObject rootFO = FileUtil.toFileObject(root);<NEW_LINE>if (rootFO != null) {<NEW_LINE>String url = VersioningQuery.getRemoteLocation(rootFO.toURI());<NEW_LINE>if (url != null) {<NEW_LINE>Object name = vs.getProperty(VersioningSystem.PROP_DISPLAY_NAME);<NEW_LINE>if (!(name instanceof String)) {<NEW_LINE>name = vs.getClass().getSimpleName();<NEW_LINE>}<NEW_LINE>logVCSKenaiUsage(<MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
name.toString(), url);
1,144,446
final AddFacetToObjectResult executeAddFacetToObject(AddFacetToObjectRequest addFacetToObjectRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(addFacetToObjectRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<AddFacetToObjectRequest> request = null;<NEW_LINE>Response<AddFacetToObjectResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new AddFacetToObjectRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(addFacetToObjectRequest));<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, "CloudDirectory");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "AddFacetToObject");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<AddFacetToObjectResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new AddFacetToObjectResultJsonUnmarshaller());<NEW_LINE>response = <MASK><NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
invoke(request, responseHandler, executionContext);
806,446
public File downloadLibraryFile(Library.Version version, int fileIndex) throws IOException {<NEW_LINE>String libraryName = version.getLibrary().getName();<NEW_LINE>String versionName = version.getName();<NEW_LINE>String[] fileNames = version.getFiles();<NEW_LINE>String fileName = fileNames[fileIndex];<NEW_LINE>String url = MessageFormat.format(LIBRARY_FILE_URL_PATTERN, libraryName, versionName, fileName);<NEW_LINE>URL urlObject = new URL(url);<NEW_LINE>URLConnection urlConnection = urlObject.openConnection();<NEW_LINE>try (InputStream input = urlConnection.getInputStream()) {<NEW_LINE>int <MASK><NEW_LINE>String prefix = (index == -1) ? fileName : fileName.substring(0, index);<NEW_LINE>if (prefix.length() < 3) {<NEW_LINE>// NOI18N<NEW_LINE>prefix = "tmp" + prefix;<NEW_LINE>}<NEW_LINE>String suffix = (index == -1) ? "" : fileName.substring(index);<NEW_LINE>File file = File.createTempFile(prefix, suffix);<NEW_LINE>try (OutputStream output = new FileOutputStream(file)) {<NEW_LINE>FileUtil.copy(input, output);<NEW_LINE>return file;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
index = fileName.lastIndexOf('.');
111,512
protected Object doInBackground(Object... params) {<NEW_LINE>// Get accounts<NEW_LINE>mListAccount <MASK><NEW_LINE>AccountManager accountManager = AccountManager.get(ActivityApp.this);<NEW_LINE>mAccounts = accountManager.getAccounts();<NEW_LINE>mSelection = new boolean[mAccounts.length];<NEW_LINE>for (int i = 0; i < mAccounts.length; i++) try {<NEW_LINE>mListAccount.add(String.format("%s (%s)", mAccounts[i].name, mAccounts[i].type));<NEW_LINE>String sha1 = Util.sha1(mAccounts[i].name + mAccounts[i].type);<NEW_LINE>mSelection[i] = PrivacyManager.getSettingBool(-mAppInfo.getUid(), Meta.cTypeAccount, sha1, false);<NEW_LINE>} catch (Throwable ex) {<NEW_LINE>Util.bug(null, ex);<NEW_LINE>}<NEW_LINE>return null;<NEW_LINE>}
= new ArrayList<CharSequence>();
811,731
private void updateUserDefinedVariableDefaultsMap() {<NEW_LINE>HashMap<String, String> userDefinedVariables = new HashMap<String, String>();<NEW_LINE>for (Map.Entry<String, LibertyVariable> entry : configVariables.entrySet()) {<NEW_LINE>LibertyVariable var = entry.getValue();<NEW_LINE>if (var.getDefaultValue() != null) {<NEW_LINE>userDefinedVariables.put(var.getName(), var.getDefaultValue());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>for (Map.Entry<String, LibertyVariable> entry : defaultConfigVariables.entrySet()) {<NEW_LINE>LibertyVariable var = entry.getValue();<NEW_LINE>if (!userDefinedVariables.containsKey(entry.getKey())) {<NEW_LINE>// Add the defaultValue if there is no server.xml version<NEW_LINE>if (var.getDefaultValue() != null) {<NEW_LINE>userDefinedVariables.put(var.getName(), var.getDefaultValue());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE><MASK><NEW_LINE>}
userDefinedVariableDefaultsMap = Collections.unmodifiableMap(userDefinedVariables);
198,870
protected void attachVolume(final AttachVolumeToVmOnHypervisorMsg msg, final NoErrorCompletion completion) {<NEW_LINE>checkStateAndStatus();<NEW_LINE>KVMHostInventory host = (KVMHostInventory) getSelfInventory();<NEW_LINE>final VolumeInventory vol = msg.getInventory();<NEW_LINE>final VmInstanceInventory vm = msg.getVmInventory();<NEW_LINE>VolumeTO to = VolumeTO.valueOfWithOutExtension(vol, host, vm.getPlatform());<NEW_LINE>final AttachVolumeToVmOnHypervisorReply reply = new AttachVolumeToVmOnHypervisorReply();<NEW_LINE>final AttachDataVolumeCmd cmd = new AttachDataVolumeCmd();<NEW_LINE>cmd.setVolume(to);<NEW_LINE>cmd.setVmUuid(msg.<MASK><NEW_LINE>cmd.getAddons().put("attachedDataVolumes", VolumeTO.valueOf(msg.getAttachedDataVolumes(), host));<NEW_LINE>Map data = new HashMap();<NEW_LINE>extEmitter.beforeAttachVolume((KVMHostInventory) getSelfInventory(), vm, vol, cmd, data);<NEW_LINE>new Http<>(attachDataVolumePath, cmd, AttachDataVolumeResponse.class).call(new ReturnValueCompletion<AttachDataVolumeResponse>(msg, completion) {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void success(AttachDataVolumeResponse ret) {<NEW_LINE>if (!ret.isSuccess()) {<NEW_LINE>reply.setError(operr("failed to attach data volume[uuid:%s, installPath:%s] to vm[uuid:%s, name:%s]" + " on kvm host[uuid:%s, ip:%s], because %s", vol.getUuid(), vol.getInstallPath(), vm.getUuid(), vm.getName(), getSelf().getUuid(), getSelf().getManagementIp(), ret.getError()));<NEW_LINE>extEmitter.attachVolumeFailed((KVMHostInventory) getSelfInventory(), vm, vol, cmd, reply.getError(), data);<NEW_LINE>} else {<NEW_LINE>extEmitter.afterAttachVolume((KVMHostInventory) getSelfInventory(), vm, vol, cmd);<NEW_LINE>}<NEW_LINE>bus.reply(msg, reply);<NEW_LINE>completion.done();<NEW_LINE>}<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void fail(ErrorCode err) {<NEW_LINE>extEmitter.attachVolumeFailed((KVMHostInventory) getSelfInventory(), vm, vol, cmd, err, data);<NEW_LINE>reply.setError(err);<NEW_LINE>bus.reply(msg, reply);<NEW_LINE>completion.done();<NEW_LINE>}<NEW_LINE>});<NEW_LINE>}
getVmInventory().getUuid());
143,399
public static void createKerberosUserEntries() throws Exception {<NEW_LINE>Log.info(c, "startAllServers", "Creating KDC user entries");<NEW_LINE>session = kdcServer.getDirectoryService().getAdminSession();<NEW_LINE>Entry entry = new DefaultEntry(session.getDirectoryService().getSchemaManager());<NEW_LINE>entry.setDn(krbtgtUserDN);<NEW_LINE>entry.add("objectClass", "top", "person", "inetOrgPerson", "krb5principal", "krb5kdcentry");<NEW_LINE>entry.add("cn", "KDC Service");<NEW_LINE>entry.add("sn", "Service");<NEW_LINE>entry.add("uid", krbtgtUser);<NEW_LINE>entry.add("userPassword", "secret");<NEW_LINE>entry.add("krb5PrincipalName", krbtgtPrincipal);<NEW_LINE>entry.add("krb5KeyVersionNumber", "0");<NEW_LINE>session.add(entry);<NEW_LINE>Log.info(c, "createPrincipal", "Created " + entry.getDn());<NEW_LINE>// app service<NEW_LINE>entry = new DefaultEntry(session.getDirectoryService().getSchemaManager());<NEW_LINE>entry.setDn(ldapUserDN);<NEW_LINE>entry.add("objectClass", "top", "person", "inetOrgPerson", "krb5principal", "krb5kdcentry");<NEW_LINE>entry.add("cn", ldapUser.toUpperCase());<NEW_LINE>entry.add("sn", "Service");<NEW_LINE>entry.add("uid", ldapUser);<NEW_LINE>entry.add("userPassword", "secret");<NEW_LINE>entry.add("krb5PrincipalName", ldapPrincipal);<NEW_LINE><MASK><NEW_LINE>session.add(entry);<NEW_LINE>Log.info(c, "createPrincipal", "Created " + entry.getDn());<NEW_LINE>createPrincipal(bindUserName, bindPassword);<NEW_LINE>Log.info(c, "startAllServers", "Created KDC user entries");<NEW_LINE>}
entry.add("krb5KeyVersionNumber", "0");
845,905
@Interceptors(AnnotationInjectionInterceptor2.class)<NEW_LINE>public void onMessage(Message arg0) {<NEW_LINE>svLogger.info("onMessage: " + arg0);<NEW_LINE>try {<NEW_LINE>InitialContext ic = new InitialContext();<NEW_LINE>String jndiName = "java:comp/env/AnnotationInjectionInterceptor2/jms/WSTestQCF";<NEW_LINE>Object <MASK><NEW_LINE>assertNotNull("MessageDriveInjectionBean.onMessage jms/WSTestQCF lookup in java:comp success", obj);<NEW_LINE>obj = ic.lookup("java:comp/env/AnnotationInjectionInterceptor2/jms/RequestQueue");<NEW_LINE>assertNotNull("MessageDriveInjectionBean.onMessage jms/RequestQueue lookup in java:comp success", obj);<NEW_LINE>setResults("Passed : onMessage");<NEW_LINE>} catch (NamingException ex) {<NEW_LINE>ex.printStackTrace(System.out);<NEW_LINE>svLogger.info("onMessage : lookup failed : " + ex.getClass().getName() + " : " + ex.getMessage());<NEW_LINE>setResults("Failed : onMessage : " + ex.getClass().getName() + ":" + ex.getMessage());<NEW_LINE>}<NEW_LINE>svLogger.info("onMessage results: " + svResults);<NEW_LINE>}
obj = ic.lookup(jndiName);
1,035,660
private void processRemovedFolds(FoldHierarchyTransaction transaction) {<NEW_LINE>if (removedFoldList != null) {<NEW_LINE>for (int i = removedFoldList.size() - 1; i >= 0; i--) {<NEW_LINE>Fold removedFold = (Fold) removedFoldList.get(i);<NEW_LINE>FoldMarkInfo startMark = (FoldMarkInfo) getOperation().getExtraInfo(removedFold);<NEW_LINE>if (startMark.getId() != null)<NEW_LINE>// remember the last fold's state before remove<NEW_LINE>customFoldId.put(startMark.getId(), Boolean.valueOf(removedFold.isCollapsed()));<NEW_LINE>// get prior releasing<NEW_LINE><MASK><NEW_LINE>if (getOperation().isStartDamaged(removedFold)) {<NEW_LINE>// start mark area was damaged<NEW_LINE>// forced remove<NEW_LINE>startMark.release(true, transaction);<NEW_LINE>}<NEW_LINE>if (getOperation().isEndDamaged(removedFold)) {<NEW_LINE>endMark.release(true, transaction);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>removedFoldList = null;<NEW_LINE>}
FoldMarkInfo endMark = startMark.getPairMark();
1,211,888
public static void consolidate(Properties ctx) {<NEW_LINE>String sql = "SELECT * FROM M_MatchPO po " + "WHERE EXISTS (SELECT 1 FROM M_MatchPO x " + "WHERE po.C_OrderLine_ID=x.C_OrderLine_ID AND po.Qty=x.Qty " + "GROUP BY C_OrderLine_ID, Qty " + "HAVING COUNT(*) = 2) " + " AND AD_Client_ID=?" + "ORDER BY C_OrderLine_ID, M_InOutLine_ID";<NEW_LINE>PreparedStatement pstmt = null;<NEW_LINE>ResultSet rs = null;<NEW_LINE>int success = 0;<NEW_LINE>int errors = 0;<NEW_LINE>try {<NEW_LINE>pstmt = DB.prepareStatement(sql, null);<NEW_LINE>pstmt.setInt(1, Env.getAD_Client_ID(ctx));<NEW_LINE>rs = pstmt.executeQuery();<NEW_LINE>while (rs.next()) {<NEW_LINE>MMatchPO po1 = new MMatchPO(ctx, rs, null);<NEW_LINE>if (rs.next()) {<NEW_LINE>MMatchPO po2 = new MMatchPO(ctx, rs, null);<NEW_LINE>if (po1.getM_InOutLine_ID() != 0 && po1.getC_InvoiceLine_ID() == 0 && po2.getM_InOutLine_ID() == 0 && po2.getC_InvoiceLine_ID() != 0) {<NEW_LINE>String s1 = "UPDATE M_MatchPO SET C_InvoiceLine_ID=" + po2.getC_InvoiceLine_ID() + " WHERE M_MatchPO_ID=" + po1.getM_MatchPO_ID();<NEW_LINE>int no1 = <MASK><NEW_LINE>if (no1 != 1) {<NEW_LINE>errors++;<NEW_LINE>s_log.warning("Not updated M_MatchPO_ID=" + po1.getM_MatchPO_ID());<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>//<NEW_LINE>String s2 = "DELETE FROM Fact_Acct WHERE AD_Table_ID=473 AND Record_ID=?";<NEW_LINE>int no2 = DB.executeUpdate(s2, po2.getM_MatchPO_ID(), null);<NEW_LINE>String s3 = "DELETE FROM M_MatchPO WHERE M_MatchPO_ID=?";<NEW_LINE>int no3 = DB.executeUpdate(s3, po2.getM_MatchPO_ID(), null);<NEW_LINE>if (no2 == 0 && no3 == 1)<NEW_LINE>success++;<NEW_LINE>else {<NEW_LINE>s_log.warning("M_MatchPO_ID=" + po2.getM_MatchPO_ID() + " - Deleted=" + no2 + ", Acct=" + no3);<NEW_LINE>errors++;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} catch (Exception e) {<NEW_LINE>s_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 (errors == 0 && success == 0)<NEW_LINE>;<NEW_LINE>else<NEW_LINE>s_log.info("Success #" + success + " - Error #" + errors);<NEW_LINE>}
DB.executeUpdate(s1, null);
21,505
public Entity update(PersistencePackage persistencePackage, DynamicEntityDao dynamicEntityDao, RecordHelper helper) throws ServiceException {<NEW_LINE>Entity entity = persistencePackage.getEntity();<NEW_LINE>try {<NEW_LINE>PersistencePerspective persistencePerspective = persistencePackage.getPersistencePerspective();<NEW_LINE>Map<String, FieldMetadata> adminProperties = helper.getSimpleMergedProperties(AdminUser.class.getName(), persistencePerspective);<NEW_LINE>Object primaryKey = helper.getPrimaryKey(entity, adminProperties);<NEW_LINE>AdminUser adminInstance = (AdminUser) dynamicEntityDao.retrieve(Class.forName(entity.getType()[0]), primaryKey);<NEW_LINE>Entity errorEntity = validateLegalUsernameAndEmail(entity, adminInstance, false);<NEW_LINE>if (errorEntity != null) {<NEW_LINE>return errorEntity;<NEW_LINE>}<NEW_LINE>String passwordBefore = adminInstance.getPassword();<NEW_LINE>adminInstance.setPassword(null);<NEW_LINE>adminInstance = (AdminUser) helper.createPopulatedInstance(adminInstance, entity, adminProperties, false);<NEW_LINE>Property passwordProperty = entity.<MASK><NEW_LINE>if (passwordProperty != null) {<NEW_LINE>if (StringUtils.isNotEmpty(passwordProperty.getValue())) {<NEW_LINE>adminInstance.setUnencodedPassword(passwordProperty.getValue());<NEW_LINE>adminInstance.setPassword(null);<NEW_LINE>} else {<NEW_LINE>adminInstance.setPassword(passwordBefore);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>validateUserUpdateSecurity(persistencePackage, adminInstance);<NEW_LINE>adminInstance = adminSecurityService.saveAdminUser(adminInstance);<NEW_LINE>Entity adminEntity = helper.getRecord(adminProperties, adminInstance, null, null);<NEW_LINE>return adminEntity;<NEW_LINE>} catch (Exception e) {<NEW_LINE>throw new ServiceException("Unable to update entity for " + entity.getType()[0], e);<NEW_LINE>}<NEW_LINE>}
getPMap().get("password");
201,718
static <T> Supplier<Either<Exception, T>> decorateEitherSupplier(CircuitBreaker circuitBreaker, Supplier<Either<? extends Exception, T>> supplier) {<NEW_LINE>return () -> {<NEW_LINE>if (circuitBreaker.tryAcquirePermission()) {<NEW_LINE>final long start = circuitBreaker.getCurrentTimestamp();<NEW_LINE>Either<? extends Exception, T<MASK><NEW_LINE>long duration = circuitBreaker.getCurrentTimestamp() - start;<NEW_LINE>if (result.isRight()) {<NEW_LINE>circuitBreaker.onSuccess(duration, circuitBreaker.getTimestampUnit());<NEW_LINE>} else {<NEW_LINE>Exception exception = result.getLeft();<NEW_LINE>circuitBreaker.onError(duration, circuitBreaker.getTimestampUnit(), exception);<NEW_LINE>}<NEW_LINE>return Either.narrow(result);<NEW_LINE>} else {<NEW_LINE>return Either.left(CallNotPermittedException.createCallNotPermittedException(circuitBreaker));<NEW_LINE>}<NEW_LINE>};<NEW_LINE>}
> result = supplier.get();
1,495,648
// NOTE: Always allow deactivating an PMM_Product even if it has a running contract.<NEW_LINE>// See: https://github.com/metasfresh/metasfresh/issues/1817<NEW_LINE>// @ModelChange(timings = { ModelValidator.TYPE_BEFORE_CHANGE }, ifColumnsChanged = { I_PMM_Product.COLUMNNAME_IsActive })<NEW_LINE>// public void preventDeactivateIfContractActive(final I_PMM_Product pmmProduct)<NEW_LINE>// {<NEW_LINE>// if (!pmmProduct.isActive() && Services.get(IPMMContractsDAO.class).hasRunningContracts(pmmProduct))<NEW_LINE>// {<NEW_LINE>// throw new AdempiereException("@" + MSG_ProductChangeNotAllowedForRunningContracts + "@");<NEW_LINE>// }<NEW_LINE>// }<NEW_LINE>@ModelChange(timings = { ModelValidator.TYPE_BEFORE_CHANGE, ModelValidator.TYPE_BEFORE_NEW }, ifColumnsChanged = { I_PMM_Product.COLUMNNAME_M_Product_ID, I_PMM_Product.COLUMNNAME_M_AttributeSetInstance_ID, I_PMM_Product.COLUMNNAME_M_HU_PI_Item_Product_ID })<NEW_LINE>public void updateReadOnlyFields(final I_PMM_Product pmmProduct) {<NEW_LINE>Services.get(IPMMProductBL<MASK><NEW_LINE>}
.class).update(pmmProduct);
802,364
protected void onResume() {<NEW_LINE>super.onResume();<NEW_LINE>removeUserFromChatOnExit = !ChatSDK.config().publicChatAutoSubscriptionEnabled;<NEW_LINE>if (thread.typeIs(ThreadType.Public)) {<NEW_LINE>User currentUser = ChatSDK.currentUser();<NEW_LINE>ChatSDK.thread().addUsersToThread(thread, currentUser).subscribe();<NEW_LINE>}<NEW_LINE>chatActionBar.setSubtitleText(thread, null);<NEW_LINE>chatActionBar.setEnabled(true);<NEW_LINE>// Show a local notification if the text is from a different thread<NEW_LINE>ChatSDK.ui().setLocalNotificationHandler(thread -> !thread.getEntityID().equals(this.thread.getEntityID()));<NEW_LINE>if (audioBinder != null) {<NEW_LINE>audioBinder.updateRecordMode();<NEW_LINE>}<NEW_LINE>if (!StringChecker.isNullOrEmpty(thread.getDraft())) {<NEW_LINE>input.getInputEditText().<MASK><NEW_LINE>}<NEW_LINE>// Put it here in the case that they closed the app with this screen open<NEW_LINE>thread.markReadAsync().subscribe();<NEW_LINE>showOrHideTextInputView();<NEW_LINE>}
setText(thread.getDraft());
1,275,036
protected void remove(Node node) {<NEW_LINE>if (node == null)<NEW_LINE>return;<NEW_LINE>// No longer a white node (leaf)<NEW_LINE>node.type = BLACK;<NEW_LINE>Node parent = node.parent;<NEW_LINE>if (node.getChildrenSize() == 0) {<NEW_LINE>// Remove the node if it has no children<NEW_LINE>if (parent != null)<NEW_LINE>parent.removeChild(node);<NEW_LINE>} else if (node.getChildrenSize() == 1) {<NEW_LINE>// Merge the node with it's child and add to node's parent<NEW_LINE>Node child = node.getChild(0);<NEW_LINE>StringBuilder builder = new StringBuilder();<NEW_LINE><MASK><NEW_LINE>builder.append(child.string);<NEW_LINE>child.string = builder.toString().toCharArray();<NEW_LINE>child.parent = parent;<NEW_LINE>if (parent != null) {<NEW_LINE>parent.removeChild(node);<NEW_LINE>parent.addChild(child);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// Walk up the tree and see if we can compact it<NEW_LINE>while (parent != null && parent.type == BLACK && parent.getChildrenSize() == 1) {<NEW_LINE>Node child = parent.getChild(0);<NEW_LINE>// Merge with parent<NEW_LINE>StringBuilder builder = new StringBuilder();<NEW_LINE>if (parent.string != null)<NEW_LINE>builder.append(parent.string);<NEW_LINE>builder.append(child.string);<NEW_LINE>child.string = builder.toString().toCharArray();<NEW_LINE>if (parent.parent != null) {<NEW_LINE>child.parent = parent.parent;<NEW_LINE>parent.parent.removeChild(parent);<NEW_LINE>parent.parent.addChild(child);<NEW_LINE>}<NEW_LINE>parent = parent.parent;<NEW_LINE>}<NEW_LINE>size--;<NEW_LINE>}
builder.append(node.string);
511,828
public void createPartControl(Composite parent) {<NEW_LINE>GridLayout layout = new GridLayout(1, true);<NEW_LINE>layout.marginHeight = 5;<NEW_LINE>layout.marginWidth = 5;<NEW_LINE>parent.setLayout(layout);<NEW_LINE>parent.setBackground(ColorUtil.getInstance().getColor(SWT.COLOR_WHITE));<NEW_LINE>parent.setBackgroundMode(SWT.INHERIT_FORCE);<NEW_LINE>canvas = new FigureCanvas(parent);<NEW_LINE>canvas.setScrollBarVisibility(FigureCanvas.NEVER);<NEW_LINE>canvas.setLayoutData(new GridData(GridData.FILL_BOTH));<NEW_LINE>canvas.addControlListener(new ControlListener() {<NEW_LINE><NEW_LINE>boolean lock = false;<NEW_LINE><NEW_LINE>public void controlResized(ControlEvent e) {<NEW_LINE>org.eclipse.swt.graphics.Rectangle r = canvas.getClientArea();<NEW_LINE>if (!lock) {<NEW_LINE>lock = true;<NEW_LINE>if (ChartUtil.isShowDescriptionAllowSize(r.height)) {<NEW_LINE>CounterLoadCountView.this.setContentDescription(desc);<NEW_LINE>} else {<NEW_LINE>CounterLoadCountView.this.setContentDescription("");<NEW_LINE>}<NEW_LINE>r = canvas.getClientArea();<NEW_LINE>lock = false;<NEW_LINE>}<NEW_LINE>if (xyGraph == null)<NEW_LINE>return;<NEW_LINE>xyGraph.setSize(r.width, r.height);<NEW_LINE>trace.setLineWidth(r.width / 30);<NEW_LINE>}<NEW_LINE><NEW_LINE>public void controlMoved(ControlEvent e) {<NEW_LINE>}<NEW_LINE>});<NEW_LINE>xyGraph = new XYGraph();<NEW_LINE>xyGraph.setShowLegend(false);<NEW_LINE>canvas.setContents(xyGraph);<NEW_LINE>xyGraph.primaryXAxis.setDateEnabled(false);<NEW_LINE><MASK><NEW_LINE>xyGraph.primaryYAxis.setAutoScale(true);<NEW_LINE>xyGraph.primaryYAxis.setShowMajorGrid(true);<NEW_LINE>xyGraph.primaryXAxis.setTitle("");<NEW_LINE>xyGraph.primaryYAxis.setTitle("");<NEW_LINE>traceDataProvider = new CircularBufferDataProvider(true);<NEW_LINE>traceDataProvider.setBufferSize(24);<NEW_LINE>traceDataProvider.setCurrentXDataArray(new double[] {});<NEW_LINE>traceDataProvider.setCurrentYDataArray(new double[] {});<NEW_LINE>this.xyGraph.primaryXAxis.setRange(0, 24);<NEW_LINE>trace = new Trace("temp", xyGraph.primaryXAxis, xyGraph.primaryYAxis, traceDataProvider);<NEW_LINE>trace.setPointStyle(PointStyle.NONE);<NEW_LINE>trace.getYAxis().setFormatPattern("#,##0");<NEW_LINE>trace.setLineWidth(15);<NEW_LINE>trace.setTraceType(TraceType.BAR);<NEW_LINE>trace.setAreaAlpha(200);<NEW_LINE>// add the trace to xyGraph<NEW_LINE>xyGraph.addTrace(trace);<NEW_LINE>}
xyGraph.primaryXAxis.setShowMajorGrid(false);
1,369,332
protected ExecutableDdlJob doCreate() {<NEW_LINE>Long initWait = executionContext.getParamManager().getLong(ConnectionParams.PREEMPTIVE_MDL_INITWAIT);<NEW_LINE>Long interval = executionContext.getParamManager().getLong(ConnectionParams.PREEMPTIVE_MDL_INTERVAL);<NEW_LINE>Map<String, Long> tablesVersion = new TreeMap<>(String.CASE_INSENSITIVE_ORDER);<NEW_LINE>List<String> logicalTableNames = new ArrayList<>();<NEW_LINE>TableGroupConfig tableGroupConfig = OptimizerContext.getContext(preparedData.getSchemaName()).getTableGroupInfoManager().getTableGroupConfigByName(preparedData.getTableGroupName());<NEW_LINE>for (TablePartRecordInfoContext tablePartRecordInfoContext : tableGroupConfig.getAllTables()) {<NEW_LINE>String tableName = tablePartRecordInfoContext.getLogTbRec().getTableName();<NEW_LINE>String primaryTableName;<NEW_LINE>TableMeta tableMeta = executionContext.getSchemaManager(preparedData.getSchemaName()).getTable(tableName);<NEW_LINE>if (tableMeta.isGsi()) {<NEW_LINE>// all the gsi table version change will be behavior by primary table<NEW_LINE>assert tableMeta.getGsiTableMetaBean() != null && tableMeta.getGsiTableMetaBean().gsiMetaBean != null;<NEW_LINE>primaryTableName = tableMeta.getGsiTableMetaBean().gsiMetaBean.tableName;<NEW_LINE>tableMeta = executionContext.getSchemaManager(preparedData.getSchemaName()).getTable(primaryTableName);<NEW_LINE>} else {<NEW_LINE>primaryTableName = tableName;<NEW_LINE>}<NEW_LINE>logicalTableNames.add(primaryTableName);<NEW_LINE>tablesVersion.put(primaryTableName, tableMeta.getVersion());<NEW_LINE>}<NEW_LINE>DdlTask changeMetaTask = new AlterTableGroupRenamePartitionChangeMetaTask(preparedData.getSchemaName(), preparedData.getTableGroupName(), preparedData.getChangePartitionsPair());<NEW_LINE>DdlTask syncTask = new TablesSyncTask(preparedData.getSchemaName(), logicalTableNames, true, initWait, interval, TimeUnit.MILLISECONDS);<NEW_LINE>ExecutableDdlJob executableDdlJob = new ExecutableDdlJob();<NEW_LINE>DdlTask validateTask = new AlterTableGroupValidateTask(preparedData.getSchemaName(), preparedData.getTableGroupName(), tablesVersion, true, null);<NEW_LINE>DdlTask reloadTableGroup = new TableGroupSyncTask(preparedData.getSchemaName(), preparedData.getTableGroupName());<NEW_LINE>executableDdlJob.addSequentialTasks(Lists.newArrayList(validateTask<MASK><NEW_LINE>return executableDdlJob;<NEW_LINE>}
, changeMetaTask, syncTask, reloadTableGroup));
1,072,653
private MenuManager createRefTablesMenu(@Nullable DBRProgressMonitor monitor, boolean openInNewWindow) {<NEW_LINE>DBSEntity singleSource = model.getSingleSource();<NEW_LINE>if (singleSource == null) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>String menuName = ActionUtils.findCommandName(ResultSetHandlerMain.CMD_REFERENCES_MENU);<NEW_LINE>MenuManager refTablesMenu = new <MASK><NEW_LINE>refTablesMenu.setActionDefinitionId(ResultSetHandlerMain.CMD_REFERENCES_MENU);<NEW_LINE>refTablesMenu.add(ResultSetReferenceMenu.NOREFS_ACTION);<NEW_LINE>if (monitor != null) {<NEW_LINE>ResultSetReferenceMenu.fillRefTablesActions(monitor, this, getSelection().getSelectedRows(), singleSource, refTablesMenu, openInNewWindow);<NEW_LINE>} else {<NEW_LINE>refTablesMenu.addMenuListener(manager -> ResultSetReferenceMenu.fillRefTablesActions(null, this, getSelection().getSelectedRows(), singleSource, manager, openInNewWindow));<NEW_LINE>}<NEW_LINE>return refTablesMenu;<NEW_LINE>}
MenuManager(menuName, null, "ref-tables");
1,752,033
public boolean replaceEvent(GameEvent event, Ability source, Game game) {<NEW_LINE>DamageEvent damageEvent = (DamageEvent) event;<NEW_LINE>Permanent sourcePermanent = game.<MASK><NEW_LINE>if (sourcePermanent != null) {<NEW_LINE>Permanent creature = game.getPermanent(sourcePermanent.getAttachedTo());<NEW_LINE>if (creature == null) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>// Name of old target<NEW_LINE>Permanent targetPermanent = game.getPermanent(event.getTargetId());<NEW_LINE>StringBuilder message = new StringBuilder();<NEW_LINE>message.append(creature.getName()).append(": gets ");<NEW_LINE>message.append(damageEvent.getAmount()).append(" damage redirected from ");<NEW_LINE>if (targetPermanent != null) {<NEW_LINE>message.append(targetPermanent.getName());<NEW_LINE>} else {<NEW_LINE>Player targetPlayer = game.getPlayer(event.getTargetId());<NEW_LINE>if (targetPlayer != null) {<NEW_LINE>message.append(targetPlayer.getLogName());<NEW_LINE>} else {<NEW_LINE>message.append("unknown");<NEW_LINE>}<NEW_LINE>}<NEW_LINE>game.informPlayers(message.toString());<NEW_LINE>// Redirect damage<NEW_LINE>creature.damage(damageEvent.getAmount(), damageEvent.getSourceId(), source, game, damageEvent.isCombatDamage(), damageEvent.isPreventable(), event.getAppliedEffects());<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>return false;<NEW_LINE>}
getPermanent(source.getSourceId());
1,549,394
public void onMessage(CharSequence pattern, CharSequence channel, String body) {<NEW_LINE>if (deletedTopic.getPatternNames().contains(pattern.toString())) {<NEW_LINE>if (!body.contains(SESSION_PREFIX + "notification:")) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>String id = body.split(SESSION_PREFIX + "notification:")[1];<NEW_LINE>loadSession(id, true).whenComplete((r, e) -> {<NEW_LINE>r.ifPresent(v -> {<NEW_LINE>eventPublisher.<MASK><NEW_LINE>});<NEW_LINE>});<NEW_LINE>} else if (expiredTopic.getPatternNames().contains(pattern.toString())) {<NEW_LINE>if (!body.contains(SESSION_PREFIX + "notification:")) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>String id = body.split(SESSION_PREFIX + "notification:")[1];<NEW_LINE>loadSession(id, true).whenComplete((r, e) -> {<NEW_LINE>r.ifPresent(v -> {<NEW_LINE>eventPublisher.publishEvent(new SessionExpiredEvent(v));<NEW_LINE>});<NEW_LINE>});<NEW_LINE>}<NEW_LINE>}
publishEvent(new SessionDeletedEvent(v));
720,935
private void calculateDistancesFromJob2Job() {<NEW_LINE>logger.debug("pre-process distances between locations ...");<NEW_LINE>StopWatch stopWatch = new StopWatch();<NEW_LINE>stopWatch.start();<NEW_LINE>for (Job job_i : vrp.getJobsInclusiveInitialJobsInRoutes().values()) {<NEW_LINE>if (job_i.getActivities().get(0).getLocation() == null)<NEW_LINE>continue;<NEW_LINE>jobs[job_i.getIndex()] = job_i;<NEW_LINE>List<ReferencedJob> jobList = new ArrayList<>(vrp.getJobsInclusiveInitialJobsInRoutes().values().size());<NEW_LINE>for (Job job_j : vrp.getJobsInclusiveInitialJobsInRoutes().values()) {<NEW_LINE>if (job_j.getActivities().get(0).getLocation() == null)<NEW_LINE>continue;<NEW_LINE>if (job_i == job_j)<NEW_LINE>continue;<NEW_LINE>double distance = jobDistance.getDistance(job_i, job_j);<NEW_LINE>if (distance > maxDistance)<NEW_LINE>maxDistance = distance;<NEW_LINE>ReferencedJob referencedJob <MASK><NEW_LINE>jobList.add(referencedJob);<NEW_LINE>}<NEW_LINE>jobList.sort(getComparator());<NEW_LINE>int neiborhoodSize = Math.min(capacity, jobList.size());<NEW_LINE>int[] jobIndices = new int[neiborhoodSize];<NEW_LINE>for (int index = 0; index < neiborhoodSize; index++) {<NEW_LINE>jobIndices[index] = jobList.get(index).getJob().getIndex();<NEW_LINE>}<NEW_LINE>neighbors[job_i.getIndex() - 1] = jobIndices;<NEW_LINE>}<NEW_LINE>stopWatch.stop();<NEW_LINE>logger.debug("pre-processing comp-time: {}", stopWatch);<NEW_LINE>}
= new ReferencedJob(job_j, distance);
682,389
public void visitNewObj(ENewObj userNewObjectNode, ScriptScope scriptScope) {<NEW_LINE>Class<?> valueType = scriptScope.getDecoration(userNewObjectNode, ValueType.class).valueType();<NEW_LINE>PainlessConstructor painlessConstructor = scriptScope.getDecoration(userNewObjectNode, StandardPainlessConstructor.class).standardPainlessConstructor();<NEW_LINE>NewObjectNode irNewObjectNode = new NewObjectNode(userNewObjectNode.getLocation());<NEW_LINE>irNewObjectNode.attachDecoration(new IRDExpressionType(valueType));<NEW_LINE>irNewObjectNode.attachDecoration(new IRDConstructor(painlessConstructor));<NEW_LINE>if (scriptScope.getCondition(userNewObjectNode, Read.class)) {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>for (AExpression userArgumentNode : userNewObjectNode.getArgumentNodes()) {<NEW_LINE>irNewObjectNode.addArgumentNode(injectCast(userArgumentNode, scriptScope));<NEW_LINE>}<NEW_LINE>scriptScope.putDecoration(userNewObjectNode, new IRNodeDecoration(irNewObjectNode));<NEW_LINE>}
irNewObjectNode.attachCondition(IRCRead.class);
52,360
public static void mainHmmVoiceConversion() throws IOException {<NEW_LINE>String baseInputFolder = "D:/Oytun/DFKI/voices/hmmVoiceConversionTest2/output/final/";<NEW_LINE>String baseOutputFolder = "D:/Oytun/DFKI/voices/hmmVoiceConversionTest2/objective_test/";<NEW_LINE>boolean isBark = true;<NEW_LINE>String method1, method2, folder1, folder2, referenceFolder, outputFile;<NEW_LINE>referenceFolder = "D:/Oytun/DFKI/voices/hmmVoiceConversionTest2/output/final/origTarget";<NEW_LINE>// No-GV vs GV<NEW_LINE>method1 = "NOGV";<NEW_LINE>method2 = "GV";<NEW_LINE>folder1 = baseInputFolder + "hmmSource_nogv";<NEW_LINE>folder2 = baseInputFolder + "hmmSource_gv";<NEW_LINE>outputFile = baseOutputFolder + "lsf_" + method1 + "_" + method2 + ".txt";<NEW_LINE>mainHmmVoiceConversion(method1, method2, folder1, <MASK><NEW_LINE>// No-GV vs SC<NEW_LINE>method1 = "NOGV";<NEW_LINE>method2 = "NOGV+SC";<NEW_LINE>folder1 = baseInputFolder + "hmmSource_nogv";<NEW_LINE>folder2 = baseInputFolder + "tfm_nogv_1092files_128mixes";<NEW_LINE>outputFile = baseOutputFolder + "lsf_" + method1 + "_" + method2 + ".txt";<NEW_LINE>mainHmmVoiceConversion(method1, method2, folder1, folder2, referenceFolder, outputFile, isBark);<NEW_LINE>// GV vs SC<NEW_LINE>method1 = "GV";<NEW_LINE>method2 = "GV+SC";<NEW_LINE>folder1 = baseInputFolder + "hmmSource_gv";<NEW_LINE>folder2 = baseInputFolder + "tfm_gv_1092files_128mixes";<NEW_LINE>outputFile = baseOutputFolder + "lsf_" + method1 + "_" + method2 + ".txt";<NEW_LINE>mainHmmVoiceConversion(method1, method2, folder1, folder2, referenceFolder, outputFile, isBark);<NEW_LINE>System.out.println("Objective test completed...");<NEW_LINE>}
folder2, referenceFolder, outputFile, isBark);
236,694
public Iterator<I_M_Material_Tracking_Ref> retrieveMaterialTrackingRefsForMaterialTracking(final I_M_Material_Tracking materialTracking) {<NEW_LINE>final IQueryBL queryBL = Services.get(IQueryBL.class);<NEW_LINE><MASK><NEW_LINE>final IQueryBuilder<I_M_Material_Tracking_Ref> queryBuilder = queryBL.createQueryBuilder(I_M_Material_Tracking_Ref.class, materialTracking).addOnlyActiveRecordsFilter().addEqualsFilter(I_M_Material_Tracking_Ref.COLUMNNAME_M_Material_Tracking_ID, materialTracking.getM_Material_Tracking_ID());<NEW_LINE>final ICompositeQueryFilter<I_M_Material_Tracking_Ref> tablesFilter = queryBL.createCompositeQueryFilter(I_M_Material_Tracking_Ref.class).setJoinOr().addEqualsFilter(I_M_Material_Tracking_Ref.COLUMNNAME_AD_Table_ID, InterfaceWrapperHelper.getTableId(I_M_InOutLine.class)).addEqualsFilter(I_M_Material_Tracking_Ref.COLUMNNAME_AD_Table_ID, InterfaceWrapperHelper.getTableId(I_PP_Order.class));<NEW_LINE>queryBuilder.filter(tablesFilter);<NEW_LINE>queryBuilder.orderBy().addColumn(I_M_Material_Tracking_Ref.COLUMNNAME_M_Material_Tracking_Ref_ID);<NEW_LINE>return queryBuilder.create().iterate(I_M_Material_Tracking_Ref.class);<NEW_LINE>}
Check.assumeNotNull(materialTracking, "materialTracking not null");
1,595,258
public List<NamespaceVH> fetchNamespaceDetails(SubscriptionVH subscription) throws Exception {<NEW_LINE>List<NamespaceVH> namespaceList = new ArrayList<NamespaceVH>();<NEW_LINE>String accessToken = azureCredentialProvider.<MASK><NEW_LINE>String url = String.format(apiUrlTemplate, URLEncoder.encode(subscription.getSubscriptionId()));<NEW_LINE>try {<NEW_LINE>String response = CommonUtils.doHttpGet(url, "Bearer", accessToken);<NEW_LINE>JsonObject responseObj = new JsonParser().parse(response).getAsJsonObject();<NEW_LINE>JsonArray namespaceObjects = responseObj.getAsJsonArray("value");<NEW_LINE>if (namespaceObjects != null) {<NEW_LINE>for (JsonElement namespaceElement : namespaceObjects) {<NEW_LINE>NamespaceVH namespaceVH = new NamespaceVH();<NEW_LINE>JsonObject namespaceObject = namespaceElement.getAsJsonObject();<NEW_LINE>namespaceVH.setSubscription(subscription.getSubscriptionId());<NEW_LINE>namespaceVH.setSubscriptionName(subscription.getSubscriptionName());<NEW_LINE>namespaceVH.setId(namespaceObject.get("id").getAsString());<NEW_LINE>namespaceVH.setLocation(namespaceObject.get("location").getAsString());<NEW_LINE>namespaceVH.setName(namespaceObject.get("name").getAsString());<NEW_LINE>namespaceVH.setType(namespaceObject.get("type").getAsString());<NEW_LINE>JsonObject properties = namespaceObject.getAsJsonObject("properties");<NEW_LINE>JsonObject tags = namespaceObject.getAsJsonObject("tags");<NEW_LINE>JsonObject sku = namespaceObject.getAsJsonObject("sku");<NEW_LINE>if (properties != null) {<NEW_LINE>HashMap<String, Object> propertiesMap = new Gson().fromJson(properties.toString(), HashMap.class);<NEW_LINE>namespaceVH.setProperties(propertiesMap);<NEW_LINE>}<NEW_LINE>if (tags != null) {<NEW_LINE>HashMap<String, Object> tagsMap = new Gson().fromJson(tags.toString(), HashMap.class);<NEW_LINE>namespaceVH.setTags(tagsMap);<NEW_LINE>}<NEW_LINE>if (sku != null) {<NEW_LINE>HashMap<String, Object> skuMap = new Gson().fromJson(sku.toString(), HashMap.class);<NEW_LINE>namespaceVH.setSku(skuMap);<NEW_LINE>}<NEW_LINE>namespaceList.add(namespaceVH);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} catch (Exception e) {<NEW_LINE>log.error("Error collecting namespace", e);<NEW_LINE>}<NEW_LINE>log.info("Target Type : {} Total: {} ", "Namespace", namespaceList.size());<NEW_LINE>return namespaceList;<NEW_LINE>}
getToken(subscription.getTenant());
1,297,373
public void run() {<NEW_LINE>Server newDefault = null;<NEW_LINE>if (ServerManager.getInstance().getDefaultServer().getId() == serverId) {<NEW_LINE>Set<Integer> serverIdSet = ServerManager.getInstance().getOpenServerList();<NEW_LINE>Integer[] serverIds = serverIdSet.toArray(new Integer[serverIdSet.size()]);<NEW_LINE>for (int i = 0; i < serverIds.length; i++) {<NEW_LINE>if (serverId != serverIds[i]) {<NEW_LINE>newDefault = ServerManager.getInstance().getServer(serverIds[i]);<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>Server server = ServerManager.getInstance().getServer(serverId);<NEW_LINE>server.close();<NEW_LINE>server.setOpen(false);<NEW_LINE>if (newDefault != null) {<NEW_LINE>ConsoleProxy.infoSafe("Default Server Changed to \'" + <MASK><NEW_LINE>ServerManager.getInstance().setDefaultServer(newDefault);<NEW_LINE>ServerPrefUtil.storeDefaultServer(newDefault.getIp() + ":" + newDefault.getPort());<NEW_LINE>if (MessageDialog.openConfirm(window.getShell(), "Reset Perspectives", "Default server is changed. Would you reset all perspective?")) {<NEW_LINE>RCPUtil.resetPerspective();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
newDefault.getName() + "\'");
811,836
private synchronized void checkSecondaryStorageResourceLimit(TemplateOrVolumePostUploadCommand cmd, int contentLengthInGB) {<NEW_LINE>String rootDir = this.getRootDir(cmd.getDataTo(), cmd.getNfsVersion()) + File.separator;<NEW_LINE>long accountId = cmd.getAccountId();<NEW_LINE>long accountTemplateDirSize = 0;<NEW_LINE>File accountTemplateDir = new File(rootDir + getTemplatePathForAccount(accountId));<NEW_LINE>if (accountTemplateDir.exists()) {<NEW_LINE>accountTemplateDirSize = FileUtils.sizeOfDirectory(accountTemplateDir);<NEW_LINE>}<NEW_LINE>long accountVolumeDirSize = 0;<NEW_LINE>File accountVolumeDir = new File(rootDir + getVolumePathForAccount(accountId));<NEW_LINE>if (accountVolumeDir.exists()) {<NEW_LINE>accountVolumeDirSize = FileUtils.sizeOfDirectory(accountVolumeDir);<NEW_LINE>}<NEW_LINE>long accountSnapshotDirSize = 0;<NEW_LINE>File accountSnapshotDir = new File(rootDir + getSnapshotPathForAccount(accountId));<NEW_LINE>if (accountSnapshotDir.exists()) {<NEW_LINE>accountSnapshotDirSize = FileUtils.sizeOfDirectory(accountSnapshotDir);<NEW_LINE>}<NEW_LINE>s_logger.debug("accountTemplateDirSize: " + accountTemplateDirSize + " accountSnapshotDirSize: " + accountSnapshotDirSize + " accountVolumeDirSize: " + accountVolumeDirSize);<NEW_LINE>int accountDirSizeInGB = getSizeInGB(accountTemplateDirSize + accountSnapshotDirSize + accountVolumeDirSize);<NEW_LINE>int defaultMaxAccountSecondaryStorageInGB = Integer.parseInt(cmd.getDefaultMaxAccountSecondaryStorage());<NEW_LINE>if (defaultMaxAccountSecondaryStorageInGB != Resource.RESOURCE_UNLIMITED && (accountDirSizeInGB + contentLengthInGB) > defaultMaxAccountSecondaryStorageInGB) {<NEW_LINE>s_logger.error(// extra attention<NEW_LINE>"accountDirSizeInGb: " + accountDirSizeInGB + " defaultMaxAccountSecondaryStorageInGB: " + defaultMaxAccountSecondaryStorageInGB + " contentLengthInGB:" + contentLengthInGB);<NEW_LINE>String errorMessage = "Maximum number of resources of type secondary_storage for account has exceeded";<NEW_LINE>updateStateMapWithError(<MASK><NEW_LINE>throw new InvalidParameterValueException(errorMessage);<NEW_LINE>}<NEW_LINE>}
cmd.getEntityUUID(), errorMessage);
678,105
void addRect(float a, float b, float c, float d, float tl, float tr, float br, float bl, boolean stroke) {<NEW_LINE>if (nonZero(tr)) {<NEW_LINE>addVertex(c - tr, b, VERTEX, true);<NEW_LINE>addQuadraticVertex(c, b, 0, c, b + tr, 0, false);<NEW_LINE>} else {<NEW_LINE>addVertex(c, b, VERTEX, true);<NEW_LINE>}<NEW_LINE>if (nonZero(br)) {<NEW_LINE>addVertex(c, d - br, VERTEX, false);<NEW_LINE>addQuadraticVertex(c, d, 0, c - br, d, 0, false);<NEW_LINE>} else {<NEW_LINE>addVertex(c, d, VERTEX, false);<NEW_LINE>}<NEW_LINE>if (nonZero(bl)) {<NEW_LINE>addVertex(a + bl, d, VERTEX, false);<NEW_LINE>addQuadraticVertex(a, d, 0, a, d - bl, 0, false);<NEW_LINE>} else {<NEW_LINE>addVertex(a, d, VERTEX, false);<NEW_LINE>}<NEW_LINE>if (nonZero(tl)) {<NEW_LINE>addVertex(a, <MASK><NEW_LINE>addQuadraticVertex(a, b, 0, a + tl, b, 0, false);<NEW_LINE>} else {<NEW_LINE>addVertex(a, b, VERTEX, false);<NEW_LINE>}<NEW_LINE>}
b + tl, VERTEX, false);
552,728
public static DescribeDomainBasicConfigsResponse unmarshall(DescribeDomainBasicConfigsResponse describeDomainBasicConfigsResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeDomainBasicConfigsResponse.setRequestId<MASK><NEW_LINE>describeDomainBasicConfigsResponse.setTotalCount(_ctx.integerValue("DescribeDomainBasicConfigsResponse.TotalCount"));<NEW_LINE>List<DomainConfig> domainConfigs = new ArrayList<DomainConfig>();<NEW_LINE>for (int i = 0; i < _ctx.lengthValue("DescribeDomainBasicConfigsResponse.DomainConfigs.Length"); i++) {<NEW_LINE>DomainConfig domainConfig = new DomainConfig();<NEW_LINE>domainConfig.setStatus(_ctx.integerValue("DescribeDomainBasicConfigsResponse.DomainConfigs[" + i + "].Status"));<NEW_LINE>domainConfig.setDomain(_ctx.stringValue("DescribeDomainBasicConfigsResponse.DomainConfigs[" + i + "].Domain"));<NEW_LINE>domainConfig.setOwner(_ctx.stringValue("DescribeDomainBasicConfigsResponse.DomainConfigs[" + i + "].Owner"));<NEW_LINE>domainConfig.setCcMode(_ctx.integerValue("DescribeDomainBasicConfigsResponse.DomainConfigs[" + i + "].CcMode"));<NEW_LINE>domainConfig.setCcStatus(_ctx.integerValue("DescribeDomainBasicConfigsResponse.DomainConfigs[" + i + "].CcStatus"));<NEW_LINE>domainConfig.setAccessType(_ctx.stringValue("DescribeDomainBasicConfigsResponse.DomainConfigs[" + i + "].AccessType"));<NEW_LINE>domainConfig.setVersion(_ctx.longValue("DescribeDomainBasicConfigsResponse.DomainConfigs[" + i + "].Version"));<NEW_LINE>domainConfig.setAclStatus(_ctx.integerValue("DescribeDomainBasicConfigsResponse.DomainConfigs[" + i + "].AclStatus"));<NEW_LINE>domainConfig.setWafStatus(_ctx.integerValue("DescribeDomainBasicConfigsResponse.DomainConfigs[" + i + "].WafStatus"));<NEW_LINE>domainConfig.setWafMode(_ctx.integerValue("DescribeDomainBasicConfigsResponse.DomainConfigs[" + i + "].WafMode"));<NEW_LINE>domainConfigs.add(domainConfig);<NEW_LINE>}<NEW_LINE>describeDomainBasicConfigsResponse.setDomainConfigs(domainConfigs);<NEW_LINE>return describeDomainBasicConfigsResponse;<NEW_LINE>}
(_ctx.stringValue("DescribeDomainBasicConfigsResponse.RequestId"));
991,011
private Set<String> foreignKeyDiff(final String[] outliers, final String[] inliers, double minRatioThreshold) {<NEW_LINE>final Map<String, Integer> outlierCounts = new HashMap<>();<NEW_LINE>log.info("Starting outliers");<NEW_LINE>// noinspection Duplicates<NEW_LINE>for (final String outlier : outliers) {<NEW_LINE>outlierCounts.merge(outlier, 1, (a, b) -> a + b);<NEW_LINE>}<NEW_LINE>log.info("Starting inliers");<NEW_LINE>final Map<String, Integer> <MASK><NEW_LINE>// noinspection Duplicates<NEW_LINE>for (final String inlier : inliers) {<NEW_LINE>inlierCounts.merge(inlier, 1, (a, b) -> a + b);<NEW_LINE>}<NEW_LINE>// Generate candidates based on min ratio<NEW_LINE>final ImmutableSet.Builder<String> builder = ImmutableSet.builder();<NEW_LINE>for (Entry<String, Integer> entry : outlierCounts.entrySet()) {<NEW_LINE>final int numOutliers = entry.getValue();<NEW_LINE>final int numInliers = inlierCounts.getOrDefault(entry.getKey(), 0);<NEW_LINE>if ((numOutliers / (numOutliers + numInliers + 0.0)) >= minRatioThreshold) {<NEW_LINE>builder.add(entry.getKey());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return builder.build();<NEW_LINE>}
inlierCounts = new HashMap<>();
138,816
public void export(LunchVoucherMgt lunchVoucherMgt) throws IOException {<NEW_LINE>MetaFile metaFile = new MetaFile();<NEW_LINE>metaFile.setFileName(I18n.get("LunchVoucherCommand") + " - " + appBaseService.getTodayDate(lunchVoucherMgt.getCompany()).format(DateTimeFormatter.ISO_DATE) + ".csv");<NEW_LINE>Path tempFile = MetaFiles.createTempFile(null, ".csv");<NEW_LINE>final OutputStream os = new FileOutputStream(tempFile.toFile());<NEW_LINE>try (final Writer writer = new OutputStreamWriter(os)) {<NEW_LINE>List<String> <MASK><NEW_LINE>header.add(escapeCsv(I18n.get("Company code")));<NEW_LINE>header.add(escapeCsv(I18n.get("Lunch Voucher's number")));<NEW_LINE>header.add(escapeCsv(I18n.get("Employee")));<NEW_LINE>header.add(escapeCsv(I18n.get("Lunch Voucher format")));<NEW_LINE>writer.write(Joiner.on(";").join(header));<NEW_LINE>for (LunchVoucherMgtLine lunchVoucherMgtLine : lunchVoucherMgt.getLunchVoucherMgtLineList()) {<NEW_LINE>List<String> line = new ArrayList<>();<NEW_LINE>line.add(escapeCsv(lunchVoucherMgt.getCompany().getCode()));<NEW_LINE>line.add(escapeCsv(lunchVoucherMgtLine.getLunchVoucherNumber().toString()));<NEW_LINE>line.add(escapeCsv(lunchVoucherMgtLine.getEmployee().getName()));<NEW_LINE>line.add(escapeCsv(lunchVoucherMgtLine.getEmployee().getLunchVoucherFormatSelect().toString()));<NEW_LINE>writer.write("\n");<NEW_LINE>writer.write(Joiner.on(";").join(line));<NEW_LINE>}<NEW_LINE>Beans.get(MetaFiles.class).upload(tempFile.toFile(), metaFile);<NEW_LINE>} catch (Exception e) {<NEW_LINE>Throwables.propagate(e);<NEW_LINE>} finally {<NEW_LINE>Files.deleteIfExists(tempFile);<NEW_LINE>}<NEW_LINE>// lunchVoucherMgt.setExported(true);<NEW_LINE>lunchVoucherMgt.setCsvFile(metaFile);<NEW_LINE>lunchVoucherMgt.setExportDate(appBaseService.getTodayDate(lunchVoucherMgt.getCompany()));<NEW_LINE>lunchVoucherMgtRepository.save(lunchVoucherMgt);<NEW_LINE>}
header = new ArrayList<>();