idx
int32
46
1.86M
input
stringlengths
321
6.6k
target
stringlengths
9
1.24k
942,573
private void sortTable(Table table) {<NEW_LINE>TableItem[] items = table.getItems();<NEW_LINE>Collator collator = Collator.getInstance(Locale.getDefault());<NEW_LINE>for (int i = 1; i < items.length; i++) {<NEW_LINE>String value1 = items[i].getText(0);<NEW_LINE>for (int j = 0; j < i; j++) {<NEW_LINE>String value2 = items[j].getText(0);<NEW_LINE>if (collator.compare(value1, value2) < 0) {<NEW_LINE>String text = items<MASK><NEW_LINE>boolean checked = items[i].getChecked();<NEW_LINE>Object data = items[i].getData();<NEW_LINE>items[i].dispose();<NEW_LINE>TableItem item = new TableItem(table, SWT.NONE, j);<NEW_LINE>item.setText(text);<NEW_LINE>item.setChecked(checked);<NEW_LINE>item.setData(data);<NEW_LINE>items = table.getItems();<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
[i].getText(0);
1,325,179
final ModifyAuthenticationProfileResult executeModifyAuthenticationProfile(ModifyAuthenticationProfileRequest modifyAuthenticationProfileRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(modifyAuthenticationProfileRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<ModifyAuthenticationProfileRequest> request = null;<NEW_LINE>Response<ModifyAuthenticationProfileResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new ModifyAuthenticationProfileRequestMarshaller().marshall(super.beforeMarshalling(modifyAuthenticationProfileRequest));<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.<MASK><NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ModifyAuthenticationProfile");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>StaxResponseHandler<ModifyAuthenticationProfileResult> responseHandler = new StaxResponseHandler<ModifyAuthenticationProfileResult>(new ModifyAuthenticationProfileResultStaxUnmarshaller());<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.SERVICE_ID, "Redshift");
872,389
public void savePoiFilter() {<NEW_LINE>AlertDialog.Builder builder = new AlertDialog.Builder(this);<NEW_LINE>builder.setTitle(R.string.edit_filter_save_as_menu_item);<NEW_LINE>final EditText editText = new EditText(this);<NEW_LINE>if (filter.isStandardFilter()) {<NEW_LINE>editText.setText((filter.getName() + " " + searchFilter.getText()).trim());<NEW_LINE>} else {<NEW_LINE>editText.setText(filter.getName());<NEW_LINE>}<NEW_LINE><MASK><NEW_LINE>ll.setPadding(5, 3, 5, 0);<NEW_LINE>ll.addView(editText, new LinearLayout.LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT));<NEW_LINE>builder.setView(ll);<NEW_LINE>builder.setNegativeButton(R.string.shared_string_cancel, null);<NEW_LINE>builder.setPositiveButton(R.string.shared_string_yes, new DialogInterface.OnClickListener() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void onClick(DialogInterface dialog, int which) {<NEW_LINE>PoiUIFilter nFilter = new PoiUIFilter(editText.getText().toString(), null, filter.getAcceptedTypes(), (OsmandApplication) getApplication());<NEW_LINE>if (searchFilter.getText().toString().length() > 0) {<NEW_LINE>nFilter.setSavedFilterByName(searchFilter.getText().toString());<NEW_LINE>}<NEW_LINE>if (app.getPoiFilters().createPoiFilter(nFilter, false)) {<NEW_LINE>Toast.makeText(SearchPOIActivity.this, MessageFormat.format(SearchPOIActivity.this.getText(R.string.edit_filter_create_message).toString(), editText.getText().toString()), Toast.LENGTH_SHORT).show();<NEW_LINE>}<NEW_LINE>SearchPOIActivity.this.finish();<NEW_LINE>}<NEW_LINE>});<NEW_LINE>builder.create().show();<NEW_LINE>}
LinearLayout ll = new LinearLayout(this);
1,024,610
static void printTrait(CdmTraitReferenceBase trait) {<NEW_LINE>if (!com.microsoft.commondatamodel.objectmodel.utilities.StringUtils.isNullOrEmpty(trait.fetchObjectDefinitionName())) {<NEW_LINE>System.out.println(" " + trait.fetchObjectDefinitionName());<NEW_LINE>if (trait instanceof CdmTraitReference) {<NEW_LINE>for (CdmArgumentDefinition argDef : ((CdmTraitReference) trait).getArguments()) {<NEW_LINE>if (argDef.getValue() instanceof CdmEntityReference) {<NEW_LINE>System.out.println(" Constant: [");<NEW_LINE>CdmConstantEntityDefinition contEntDef = ((CdmEntityReference) argDef.getValue()).fetchObjectDefinition();<NEW_LINE>for (List<String> constantValueList : contEntDef.getConstantValues()) {<NEW_LINE>System.<MASK><NEW_LINE>}<NEW_LINE>System.out.println(" ]");<NEW_LINE>} else {<NEW_LINE>// Default output, nothing fancy for now<NEW_LINE>System.out.println(" " + argDef.getValue());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
out.println(" " + constantValueList);
1,000,776
public void editMapping(StubMapping stubMapping) {<NEW_LINE>final Optional<StubMapping> optionalExistingMapping = tryFind(mappings, mappingMatchingUuid(stubMapping.getUuid()));<NEW_LINE>if (!optionalExistingMapping.isPresent()) {<NEW_LINE>String msg = "StubMapping with UUID: " + stubMapping.getUuid() + " not found";<NEW_LINE>notifier().error(msg);<NEW_LINE>throw new RuntimeException(msg);<NEW_LINE>}<NEW_LINE>final StubMapping existingMapping = optionalExistingMapping.get();<NEW_LINE>for (StubLifecycleListener listener : stubLifecycleListeners) {<NEW_LINE>listener.beforeStubEdited(existingMapping, stubMapping);<NEW_LINE>}<NEW_LINE>stubMapping.<MASK><NEW_LINE>stubMapping.setDirty(true);<NEW_LINE>mappings.replace(existingMapping, stubMapping);<NEW_LINE>scenarios.onStubMappingUpdated(existingMapping, stubMapping);<NEW_LINE>for (StubLifecycleListener listener : stubLifecycleListeners) {<NEW_LINE>listener.afterStubEdited(existingMapping, stubMapping);<NEW_LINE>}<NEW_LINE>}
setInsertionIndex(existingMapping.getInsertionIndex());
923,995
private SAXSource readSAXSource(InputStream body, HttpInputMessage inputMessage) throws IOException {<NEW_LINE>try {<NEW_LINE>SAXParserFactory saxParserFactory = SAXParserFactory.newInstance();<NEW_LINE>saxParserFactory.setNamespaceAware(true);<NEW_LINE>saxParserFactory.setFeature("http://apache.org/xml/features/disallow-doctype-decl", !isSupportDtd());<NEW_LINE>saxParserFactory.setFeature("http://xml.org/sax/features/external-general-entities", isProcessExternalEntities());<NEW_LINE>SAXParser saxParser = saxParserFactory.newSAXParser();<NEW_LINE><MASK><NEW_LINE>if (!isProcessExternalEntities()) {<NEW_LINE>xmlReader.setEntityResolver(NO_OP_ENTITY_RESOLVER);<NEW_LINE>}<NEW_LINE>byte[] bytes = StreamUtils.copyToByteArray(body);<NEW_LINE>return new SAXSource(xmlReader, new InputSource(new ByteArrayInputStream(bytes)));<NEW_LINE>} catch (SAXException | ParserConfigurationException ex) {<NEW_LINE>throw new HttpMessageNotReadableException("Could not parse document: " + ex.getMessage(), ex, inputMessage);<NEW_LINE>}<NEW_LINE>}
XMLReader xmlReader = saxParser.getXMLReader();
147,010
private void initInfo(int record_id, String value, String whereClause) {<NEW_LINE>//<NEW_LINE>if (!(record_id == 0) && value != null && value.length() > 0) {<NEW_LINE>log.severe("Received both a record_id and a value: " + record_id + " - " + value);<NEW_LINE>}<NEW_LINE>// Set Value and boolean criteria (if any)<NEW_LINE>if (!(record_id == 0)) {<NEW_LINE>fieldID = record_id;<NEW_LINE>} else {<NEW_LINE>// Use the value if any<NEW_LINE>if (value != null && value.length() > 0) {<NEW_LINE>fieldValue.setText(value);<NEW_LINE>} else {<NEW_LINE>// Try to find the context - A_Asset_ID<NEW_LINE>String aid = Env.getContext(Env.<MASK><NEW_LINE>if (aid != null && aid.length() != 0) {<NEW_LINE>fieldID = new Integer(aid).intValue();<NEW_LINE>}<NEW_LINE>// C_BPartner_ID<NEW_LINE>String bp = Env.getContext(Env.getCtx(), p_WindowNo, "C_BPartner_ID");<NEW_LINE>if (bp != null && bp.length() != 0) {<NEW_LINE>fBPartner_ID.setValue(new Integer(bp).intValue());<NEW_LINE>}<NEW_LINE>// M_Product_ID<NEW_LINE>String pid = Env.getContext(Env.getCtx(), p_WindowNo, "M_Product_ID");<NEW_LINE>if (pid != null && pid.length() != 0) {<NEW_LINE>fProduct_ID.setValue(new Integer(pid).intValue());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
getCtx(), p_WindowNo, "A_Asset_ID");
1,826,087
void transpileStatement(Node statement, @Nullable TranspilationContext.Case breakCase, @Nullable TranspilationContext.Case continueCase) {<NEW_LINE>checkState<MASK><NEW_LINE>checkState(statement.getParent() == null);<NEW_LINE>if (!statement.isGeneratorMarker()) {<NEW_LINE>transpileUnmarkedNode(statement);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>switch(statement.getToken()) {<NEW_LINE>case LABEL:<NEW_LINE>transpileLabel(statement);<NEW_LINE>break;<NEW_LINE>case BLOCK:<NEW_LINE>transpileBlock(statement);<NEW_LINE>break;<NEW_LINE>case EXPR_RESULT:<NEW_LINE>transpileExpressionResult(statement);<NEW_LINE>break;<NEW_LINE>case VAR:<NEW_LINE>transpileVar(statement);<NEW_LINE>break;<NEW_LINE>case RETURN:<NEW_LINE>transpileReturn(statement);<NEW_LINE>break;<NEW_LINE>case THROW:<NEW_LINE>transpileThrow(statement);<NEW_LINE>break;<NEW_LINE>case IF:<NEW_LINE>transpileIf(statement, breakCase);<NEW_LINE>break;<NEW_LINE>case FOR:<NEW_LINE>transpileFor(statement, breakCase, continueCase);<NEW_LINE>break;<NEW_LINE>case FOR_IN:<NEW_LINE>transpileForIn(statement, breakCase, continueCase);<NEW_LINE>break;<NEW_LINE>case WHILE:<NEW_LINE>transpileWhile(statement, breakCase, continueCase);<NEW_LINE>break;<NEW_LINE>case DO:<NEW_LINE>transpileDo(statement, breakCase, continueCase);<NEW_LINE>break;<NEW_LINE>case TRY:<NEW_LINE>transpileTry(statement, breakCase);<NEW_LINE>break;<NEW_LINE>case SWITCH:<NEW_LINE>transpileSwitch(statement, breakCase);<NEW_LINE>break;<NEW_LINE>default:<NEW_LINE>throw new IllegalStateException("Unsupported token: " + statement.getToken());<NEW_LINE>}<NEW_LINE>}
(IR.mayBeStatement(statement));
274,103
ActionResult<Wo> execute(EffectivePerson effectivePerson, String flag) throws Exception {<NEW_LINE>try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {<NEW_LINE>ActionResult<Wo> result = new ActionResult<>();<NEW_LINE>Business business = new Business(emc);<NEW_LINE>Process process = business.process().pick(flag);<NEW_LINE>if (null == process) {<NEW_LINE>throw new ExceptionEntityNotExist(flag, Process.class);<NEW_LINE>}<NEW_LINE>Wo wo = Wo.copier.copy(process);<NEW_LINE>wo.setAgentList(this.filterAgents(business, process));<NEW_LINE>wo.setBegin(this.filterBegin(business, process));<NEW_LINE>wo.setCancelList(this.filterCancels(business, process));<NEW_LINE>wo.setChoiceList(this<MASK><NEW_LINE>wo.setDelayList(this.filterDelays(business, process));<NEW_LINE>wo.setEmbedList(this.filterEmbeds(business, process));<NEW_LINE>wo.setEndList(this.filterEnds(business, process));<NEW_LINE>wo.setInvokeList(this.filterInvokes(business, process));<NEW_LINE>wo.setManualList(this.filterManuals(business, process));<NEW_LINE>wo.setMergeList(this.filterMerges(business, process));<NEW_LINE>wo.setParallelList(this.filterParallels(business, process));<NEW_LINE>wo.setServiceList(this.filterServices(business, process));<NEW_LINE>wo.setSplitList(this.filterSplits(business, process));<NEW_LINE>result.setData(wo);<NEW_LINE>return result;<NEW_LINE>}<NEW_LINE>}
.filterChoices(business, process));
1,758,822
final UpdateAppInstanceUserResult executeUpdateAppInstanceUser(UpdateAppInstanceUserRequest updateAppInstanceUserRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(updateAppInstanceUserRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<UpdateAppInstanceUserRequest> request = null;<NEW_LINE>Response<UpdateAppInstanceUserResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new UpdateAppInstanceUserRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(updateAppInstanceUserRequest));<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, "Chime");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "UpdateAppInstanceUser");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>URI endpointTraitHost = null;<NEW_LINE>if (!clientConfiguration.isDisableHostPrefixInjection()) {<NEW_LINE>String hostPrefix = "identity-";<NEW_LINE>String resolvedHostPrefix = String.format("identity-");<NEW_LINE>endpointTraitHost = UriResourcePathUtils.updateUriHost(endpoint, resolvedHostPrefix);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<UpdateAppInstanceUserResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new UpdateAppInstanceUserResultJsonUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext, null, endpointTraitHost);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>}
endClientExecution(awsRequestMetrics, request, response);
479,592
private void loadMenu() throws IOException {<NEW_LINE>StringBuffer whereClause = new StringBuffer("AD_Client_ID = " + getAD_Client_ID() + " AND IsSummary = 'N'");<NEW_LINE>if (getRecord_ID() > 0) {<NEW_LINE>whereClause.append(" AND ").append("AD_Menu_ID = ").append(getRecord_ID());<NEW_LINE>}<NEW_LINE>// Get Result<NEW_LINE>MMenu[] menuList = MMenu.get(getCtx(), whereClause.toString(), get_TrxName());<NEW_LINE>if (menuList == null || menuList.length == 0) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>String folderName = getDirectory() + File.separator + FunctionalDocsForMenu.FOLDER_NAME;<NEW_LINE>String fileName = textConverter.getIndexFileName();<NEW_LINE>if (!Util.isEmpty(fileName)) {<NEW_LINE>indexConverter.addHeaderIndexName(FunctionalDocsForMenu.FOLDER_NAME);<NEW_LINE>indexConverter.newLine();<NEW_LINE>indexConverter.addSection("Menu");<NEW_LINE>indexConverter.newLine();<NEW_LINE>((IIndex) indexConverter).addTreeDefinition(1, true);<NEW_LINE>((IIndex) indexConverter).addGroup("Menu", FunctionalDocsForMenu.FOLDER_NAME, 2);<NEW_LINE>}<NEW_LINE>//<NEW_LINE>for (MMenu menu : menuList) {<NEW_LINE>// For Menu<NEW_LINE>documentForMenu(menu, folderName);<NEW_LINE>textConverter.clear();<NEW_LINE>}<NEW_LINE>if (!Util.isEmpty(fileName)) {<NEW_LINE>writeFile(folderName, <MASK><NEW_LINE>}<NEW_LINE>// Clear<NEW_LINE>indexConverter.clear();<NEW_LINE>}
fileName, indexConverter.toString());
1,173,256
public CreateDomainResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>CreateDomainResult createDomainResult = new CreateDomainResult();<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 createDomainResult;<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("operation", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>createDomainResult.setOperation(OperationJsonUnmarshaller.getInstance<MASK><NEW_LINE>}<NEW_LINE>} else if (token == END_ARRAY || token == END_OBJECT) {<NEW_LINE>if (context.getLastParsedParentElement() == null || context.getLastParsedParentElement().equals(currentParentElement)) {<NEW_LINE>if (context.getCurrentDepth() <= originalDepth)<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>token = context.nextToken();<NEW_LINE>}<NEW_LINE>return createDomainResult;<NEW_LINE>}
().unmarshall(context));
911,960
private String describeEverySecond(final int second) {<NEW_LINE>final double[] secondsLimit = { 1, 2 };<NEW_LINE>final String[] secondsStrings = { resourceBundle.getString("oneSecond"), resourceBundle.getString("multipleSeconds") };<NEW_LINE>final double[] everyLimit = { 1, 2 };<NEW_LINE>final String[] everyStrings = { resourceBundle.getString("every_one"), resourceBundle.getString("every_multi") };<NEW_LINE>final ChoiceFormat secondsChoiceFormat = new ChoiceFormat(secondsLimit, secondsStrings);<NEW_LINE>final ChoiceFormat everyChoiceFormat <MASK><NEW_LINE>final String pattern = resourceBundle.getString("pattern_every_seconds");<NEW_LINE>final MessageFormat messageFormat = new MessageFormat(pattern, Locale.UK);<NEW_LINE>final Format[] formats = { everyChoiceFormat, secondsChoiceFormat, NumberFormat.getInstance() };<NEW_LINE>messageFormat.setFormats(formats);<NEW_LINE>final Object[] messageArguments = { second, second, second };<NEW_LINE>final String result = messageFormat.format(messageArguments);<NEW_LINE>return result;<NEW_LINE>}
= new ChoiceFormat(everyLimit, everyStrings);
602,558
public static Data createData(Program program, Address addr, DataType newType, int length, boolean stackPointers, ClearDataMode clearMode) throws CodeUnitInsertionException {<NEW_LINE>Listing listing = program.getListing();<NEW_LINE>ReferenceManager refMgr = program.getReferenceManager();<NEW_LINE>Data data = getData(addr, clearMode, listing);<NEW_LINE>int existingLength = addr.getAddressSpace().getAddressableUnitSize();<NEW_LINE>DataType existingType = data.getDataType();<NEW_LINE>Reference extRef = null;<NEW_LINE>if (!isParentData(data, addr)) {<NEW_LINE>existingLength = data.getLength();<NEW_LINE>if (data.isDefined() && newType.isEquivalent(existingType)) {<NEW_LINE>return data;<NEW_LINE>}<NEW_LINE>if (!stackPointers && isDataClearingDenied(existingType, clearMode)) {<NEW_LINE>throw new CodeUnitInsertionException("Could not create Data at address " + addr);<NEW_LINE>}<NEW_LINE>// TODO: This can probably be eliminated<NEW_LINE>// Check for external reference on pointer<NEW_LINE>extRef = getExternalPointerReference(addr, newType, stackPointers, refMgr, existingType);<NEW_LINE>}<NEW_LINE>newType = newType.clone(program.getDataTypeManager());<NEW_LINE>newType = reconcileAppliedDataType(existingType, newType, stackPointers);<NEW_LINE>DataType realType = newType;<NEW_LINE>if (newType instanceof TypeDef) {<NEW_LINE>realType = ((<MASK><NEW_LINE>}<NEW_LINE>// is the datatype already there?<NEW_LINE>if (isExistingNonDynamicType(realType, newType, existingType)) {<NEW_LINE>return data;<NEW_LINE>}<NEW_LINE>DataTypeInstance dti = getDtInstance(program, addr, newType, length, realType);<NEW_LINE>if (stackPointers && existingType instanceof Pointer && newType instanceof Pointer) {<NEW_LINE>listing.clearCodeUnits(addr, addr, false);<NEW_LINE>}<NEW_LINE>Data newData;<NEW_LINE>try {<NEW_LINE>newData = listing.createData(addr, dti.getDataType(), dti.getLength());<NEW_LINE>} catch (CodeUnitInsertionException e) {<NEW_LINE>// ok lets see if we need to clear some code units<NEW_LINE>if (clearMode == ClearDataMode.CLEAR_SINGLE_DATA) {<NEW_LINE>listing.clearCodeUnits(addr, addr, false);<NEW_LINE>} else {<NEW_LINE>checkEnoughSpace(program, addr, existingLength, dti, clearMode);<NEW_LINE>}<NEW_LINE>newData = listing.createData(addr, dti.getDataType(), dti.getLength());<NEW_LINE>}<NEW_LINE>restoreReference(newType, refMgr, extRef);<NEW_LINE>return newData;<NEW_LINE>}
TypeDef) newType).getBaseDataType();
148,307
void doSetValueAsQueryToken(FhirContext theContext, String theParamName, String theQualifier, String theValue) {<NEW_LINE>if (isBlank(theValue)) {<NEW_LINE>myLeftType.setValueAsQueryToken(theContext, theParamName, theQualifier, "");<NEW_LINE>myRightType.setValueAsQueryToken(theContext, theParamName, theQualifier, "");<NEW_LINE>} else {<NEW_LINE>List<String> parts = ParameterUtil.splitParameterString(theValue, '$', false);<NEW_LINE>if (parts.size() > 2) {<NEW_LINE>throw new InvalidRequestException(Msg.code(1947) + "Invalid value for composite parameter (only one '$' is valid for this parameter, others must be escaped). Value was: " + theValue);<NEW_LINE>}<NEW_LINE>myLeftType.setValueAsQueryToken(theContext, theParamName, theQualifier, parts.get(0));<NEW_LINE>if (parts.size() > 1) {<NEW_LINE>myRightType.setValueAsQueryToken(theContext, theParamName, theQualifier<MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
, parts.get(1));
50,943
private Object doAttributeValue(AttributeValue a) {<NEW_LINE>Object ret = null;<NEW_LINE>try {<NEW_LINE>if (a.getS() != null) {<NEW_LINE>ret = a.getS();<NEW_LINE>} else if (a.getBOOL() != null) {<NEW_LINE>ret = a.getBOOL();<NEW_LINE>} else if (a.getBOOL() != null) {<NEW_LINE>ret = a.getBOOL();<NEW_LINE>} else if (a.getN() != null) {<NEW_LINE>ret = parseNumber(a.getN());<NEW_LINE>} else if (a.getL() != null) {<NEW_LINE>List<AttributeValue> ls = a.getL();<NEW_LINE>Sequence subSeq = new Sequence();<NEW_LINE>for (AttributeValue o : ls) {<NEW_LINE>subSeq.add(doAttributeValue(o));<NEW_LINE>}<NEW_LINE>ret = subSeq;<NEW_LINE>} else if (a.getSS() != null) {<NEW_LINE>Sequence subSeq = new Sequence();<NEW_LINE>List<String> ls = a.getSS();<NEW_LINE>for (String o : ls) {<NEW_LINE>subSeq.add(o);<NEW_LINE>}<NEW_LINE>ret = subSeq;<NEW_LINE>} else if (a.getNS() != null) {<NEW_LINE>Sequence subSeq = new Sequence();<NEW_LINE>List<String> ls = a.getNS();<NEW_LINE>for (String o : ls) {<NEW_LINE>subSeq.add(parseNumber(o));<NEW_LINE>}<NEW_LINE>ret = subSeq;<NEW_LINE>} else if (a.getM() != null) {<NEW_LINE>Map<String, AttributeValue> m = a.getM();<NEW_LINE>Table subTbl = new Table(new String<MASK><NEW_LINE>for (String key : m.keySet()) {<NEW_LINE>AttributeValue sub = m.get(key);<NEW_LINE>Object v = doAttributeValue(sub);<NEW_LINE>subTbl.newLast(new Object[] { key, v });<NEW_LINE>}<NEW_LINE>ret = subTbl;<NEW_LINE>} else if (a.getB() != null) {<NEW_LINE>ret = a.getB();<NEW_LINE>}<NEW_LINE>} catch (Exception e) {<NEW_LINE>Logger.error(e.getStackTrace());<NEW_LINE>}<NEW_LINE>return ret;<NEW_LINE>}
[] { "key", "value" });
906,911
public static ListTransitRouterVbrAttachmentsResponse unmarshall(ListTransitRouterVbrAttachmentsResponse listTransitRouterVbrAttachmentsResponse, UnmarshallerContext _ctx) {<NEW_LINE>listTransitRouterVbrAttachmentsResponse.setRequestId(_ctx.stringValue("ListTransitRouterVbrAttachmentsResponse.RequestId"));<NEW_LINE>listTransitRouterVbrAttachmentsResponse.setNextToken(_ctx.stringValue("ListTransitRouterVbrAttachmentsResponse.NextToken"));<NEW_LINE>listTransitRouterVbrAttachmentsResponse.setTotalCount(_ctx.integerValue("ListTransitRouterVbrAttachmentsResponse.TotalCount"));<NEW_LINE>listTransitRouterVbrAttachmentsResponse.setMaxResults(_ctx.integerValue("ListTransitRouterVbrAttachmentsResponse.MaxResults"));<NEW_LINE>List<TransitRouterAttachment> transitRouterAttachments = new ArrayList<TransitRouterAttachment>();<NEW_LINE>for (int i = 0; i < _ctx.lengthValue("ListTransitRouterVbrAttachmentsResponse.TransitRouterAttachments.Length"); i++) {<NEW_LINE>TransitRouterAttachment transitRouterAttachment = new TransitRouterAttachment();<NEW_LINE>transitRouterAttachment.setCreationTime(_ctx.stringValue("ListTransitRouterVbrAttachmentsResponse.TransitRouterAttachments[" + i + "].CreationTime"));<NEW_LINE>transitRouterAttachment.setStatus(_ctx.stringValue<MASK><NEW_LINE>transitRouterAttachment.setTransitRouterAttachmentId(_ctx.stringValue("ListTransitRouterVbrAttachmentsResponse.TransitRouterAttachments[" + i + "].TransitRouterAttachmentId"));<NEW_LINE>transitRouterAttachment.setTransitRouterId(_ctx.stringValue("ListTransitRouterVbrAttachmentsResponse.TransitRouterAttachments[" + i + "].TransitRouterId"));<NEW_LINE>transitRouterAttachment.setResourceType(_ctx.stringValue("ListTransitRouterVbrAttachmentsResponse.TransitRouterAttachments[" + i + "].ResourceType"));<NEW_LINE>transitRouterAttachment.setVbrRegionId(_ctx.stringValue("ListTransitRouterVbrAttachmentsResponse.TransitRouterAttachments[" + i + "].VbrRegionId"));<NEW_LINE>transitRouterAttachment.setTransitRouterAttachmentDescription(_ctx.stringValue("ListTransitRouterVbrAttachmentsResponse.TransitRouterAttachments[" + i + "].TransitRouterAttachmentDescription"));<NEW_LINE>transitRouterAttachment.setVbrOwnerId(_ctx.longValue("ListTransitRouterVbrAttachmentsResponse.TransitRouterAttachments[" + i + "].VbrOwnerId"));<NEW_LINE>transitRouterAttachment.setAutoPublishRouteEnabled(_ctx.booleanValue("ListTransitRouterVbrAttachmentsResponse.TransitRouterAttachments[" + i + "].AutoPublishRouteEnabled"));<NEW_LINE>transitRouterAttachment.setVbrId(_ctx.stringValue("ListTransitRouterVbrAttachmentsResponse.TransitRouterAttachments[" + i + "].VbrId"));<NEW_LINE>transitRouterAttachment.setTransitRouterAttachmentName(_ctx.stringValue("ListTransitRouterVbrAttachmentsResponse.TransitRouterAttachments[" + i + "].TransitRouterAttachmentName"));<NEW_LINE>transitRouterAttachments.add(transitRouterAttachment);<NEW_LINE>}<NEW_LINE>listTransitRouterVbrAttachmentsResponse.setTransitRouterAttachments(transitRouterAttachments);<NEW_LINE>return listTransitRouterVbrAttachmentsResponse;<NEW_LINE>}
("ListTransitRouterVbrAttachmentsResponse.TransitRouterAttachments[" + i + "].Status"));
22,376
private void dumpSourceFile(String target, JavaFileObject sourceFile, CharSequence source) {<NEW_LINE>if (source.charAt(source.length() - 1) == '\u001A') {<NEW_LINE>// the java parser appends the ctrl+z char (end of file), remove it<NEW_LINE>source = source.subSequence(0, <MASK><NEW_LINE>}<NEW_LINE>File absoluteTarget = new File(target).getAbsoluteFile();<NEW_LINE>if (!absoluteTarget.isFile() && (absoluteTarget.isDirectory() || absoluteTarget.mkdirs())) {<NEW_LINE>File prepFileTarget = makePrepFileTarget(absoluteTarget, sourceFile);<NEW_LINE>if (prepFileTarget != null) {<NEW_LINE>try {<NEW_LINE>if (!prepFileTarget.isFile()) {<NEW_LINE>File parent = prepFileTarget.getParentFile();<NEW_LINE>if (!parent.isDirectory()) {<NEW_LINE>if (!parent.mkdirs()) {<NEW_LINE>throw new IOException("Failed to create processed source file target directory: " + parent.getAbsolutePath());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (!prepFileTarget.createNewFile()) {<NEW_LINE>throw new IOException("Failed to create processed source file in target directory: " + prepFileTarget.getAbsolutePath());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>try (FileWriter writer = new FileWriter(prepFileTarget)) {<NEW_LINE>writer.write(source.toString());<NEW_LINE>}<NEW_LINE>} catch (Throwable t) {<NEW_LINE>IDynamicJdk.instance().logError(Log.instance(getContext()), new JCDiagnostic.SimpleDiagnosticPosition(0), "proc.messager", "Failed to dump preprocessed file: " + sourceFile.getName() + " : " + t.getMessage());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
source.length() - 1);
426,554
private void loadCaptcha() {<NEW_LINE>Map<String, Object> params = new HashMap<>();<NEW_LINE>params.put("captchaType", "blockPuzzle");<NEW_LINE>JSONObject jsonObject = new JSONObject(params);<NEW_LINE>RequestBody body = RequestBody.create(MediaType.parse("application/json"), jsonObject.toString());<NEW_LINE>RetrofitUtils.getServerApi().getAsync(body).compose(RxHelper.observableIO2Main(mContext)).subscribe(new BaseObserver<CaptchaGetIt>(mContext, true) {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void onSuccess(CaptchaGetIt data) {<NEW_LINE>baseImageBase64 = data.getOriginalImageBase64();<NEW_LINE>slideImageBase64 = data.getJigsawImageBase64();<NEW_LINE>token = data.getToken();<NEW_LINE>key = data.getSecretKey();<NEW_LINE>dragView.setUp(ImageUtil.base64ToBitmap(baseImageBase64), ImageUtil.base64ToBitmap(slideImageBase64));<NEW_LINE>dragView.setSBUnMove(true);<NEW_LINE>initEvent();<NEW_LINE>}<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void onFailure(Throwable e, String errorMsg) {<NEW_LINE>dragView.setSBUnMove(false);<NEW_LINE>Toast.makeText(mContext, errorMsg, <MASK><NEW_LINE>}<NEW_LINE>});<NEW_LINE>}
Toast.LENGTH_SHORT).show();
533,439
final DescribeStorageResult executeDescribeStorage(DescribeStorageRequest describeStorageRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(describeStorageRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<DescribeStorageRequest> request = null;<NEW_LINE>Response<DescribeStorageResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new DescribeStorageRequestMarshaller().marshall(super.beforeMarshalling(describeStorageRequest));<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, "Redshift");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DescribeStorage");<NEW_LINE>request.<MASK><NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>StaxResponseHandler<DescribeStorageResult> responseHandler = new StaxResponseHandler<DescribeStorageResult>(new DescribeStorageResultStaxUnmarshaller());<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);
702,549
private void doLayout() {<NEW_LINE>setContentView(R.layout.layout_main);<NEW_LINE>setTitle(R.string.app_name);<NEW_LINE>Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);<NEW_LINE>setSupportActionBar(toolbar);<NEW_LINE>mDrawer = (DrawerLayout) findViewById(R.id.drawer_layout);<NEW_LINE>mTxtOrbotLog = (TextView) findViewById(R.id.orbotLog);<NEW_LINE>imgStatus = (ImageView) findViewById(R.id.imgStatus);<NEW_LINE>imgStatus.setOnLongClickListener(this);<NEW_LINE>downloadText = (TextView) findViewById(R.id.trafficDown);<NEW_LINE>uploadText = (TextView) findViewById(R.id.trafficUp);<NEW_LINE>downloadText.setText(formatTotal(0) + " \u2193");<NEW_LINE>uploadText.setText<MASK><NEW_LINE>mBtnVPN = (SwitchCompat) findViewById(R.id.btnVPN);<NEW_LINE>boolean useVPN = Prefs.useVpn();<NEW_LINE>mBtnVPN.setChecked(useVPN);<NEW_LINE>// auto start VPN if VPN is enabled<NEW_LINE>if (useVPN) {<NEW_LINE>sendIntentToService(ACTION_START_VPN);<NEW_LINE>}<NEW_LINE>mBtnVPN.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {<NEW_LINE>enableVPN(isChecked);<NEW_LINE>}<NEW_LINE>});<NEW_LINE>rv = findViewById(R.id.rv);<NEW_LINE>LinearLayoutManager llm = new LinearLayoutManager(this);<NEW_LINE>llm.setOrientation(LinearLayoutManager.VERTICAL);<NEW_LINE>rv.setLayoutManager(llm);<NEW_LINE>}
(formatTotal(0) + " \u2191");
636,992
protected DataStreamShardStats shardOperation(Request request, ShardRouting shardRouting) throws IOException {<NEW_LINE>IndexService indexService = indicesService.indexServiceSafe(shardRouting.shardId().getIndex());<NEW_LINE>IndexShard indexShard = indexService.getShard(shardRouting.shardId().id());<NEW_LINE>// if we don't have the routing entry yet, we need it stats wise, we treat it as if the shard is not ready yet<NEW_LINE>if (indexShard.routingEntry() == null) {<NEW_LINE>throw new ShardNotFoundException(indexShard.shardId());<NEW_LINE>}<NEW_LINE>StoreStats storeStats = indexShard.storeStats();<NEW_LINE>IndexAbstraction indexAbstraction = clusterService.state().getMetadata().getIndicesLookup().get(shardRouting.getIndexName());<NEW_LINE>assert indexAbstraction != null;<NEW_LINE>IndexAbstraction.DataStream dataStream = indexAbstraction.getParentDataStream();<NEW_LINE>assert dataStream != null;<NEW_LINE>long maxTimestamp = 0L;<NEW_LINE>try (Engine.Searcher searcher = indexShard.acquireSearcher("data_stream_stats")) {<NEW_LINE>IndexReader indexReader = searcher.getIndexReader();<NEW_LINE>String fieldName = dataStream.getDataStream().getTimeStampField().getName();<NEW_LINE>byte[] maxPackedValue = PointValues.getMaxPackedValue(indexReader, fieldName);<NEW_LINE>if (maxPackedValue != null) {<NEW_LINE>maxTimestamp = LongPoint.decodeDimension(maxPackedValue, 0);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return new DataStreamShardStats(indexShard.<MASK><NEW_LINE>}
routingEntry(), storeStats, maxTimestamp);
1,227,063
public static GetCopyrightPersonListResponse unmarshall(GetCopyrightPersonListResponse getCopyrightPersonListResponse, UnmarshallerContext _ctx) {<NEW_LINE>getCopyrightPersonListResponse.setRequestId(_ctx.stringValue("GetCopyrightPersonListResponse.RequestId"));<NEW_LINE>getCopyrightPersonListResponse.setPageNum(_ctx.integerValue("GetCopyrightPersonListResponse.PageNum"));<NEW_LINE>getCopyrightPersonListResponse.setPageSize(_ctx.integerValue("GetCopyrightPersonListResponse.PageSize"));<NEW_LINE>getCopyrightPersonListResponse.setSuccess(_ctx.booleanValue("GetCopyrightPersonListResponse.Success"));<NEW_LINE>getCopyrightPersonListResponse.setTotalItemNum(_ctx.integerValue("GetCopyrightPersonListResponse.TotalItemNum"));<NEW_LINE>List<DataItem> data = new ArrayList<DataItem>();<NEW_LINE>for (int i = 0; i < _ctx.lengthValue("GetCopyrightPersonListResponse.Data.Length"); i++) {<NEW_LINE>DataItem dataItem = new DataItem();<NEW_LINE>dataItem.setLegalPersonType(_ctx.stringValue("GetCopyrightPersonListResponse.Data[" + i + "].LegalPersonType"));<NEW_LINE>dataItem.setRoleType(_ctx.integerValue("GetCopyrightPersonListResponse.Data[" + i + "].RoleType"));<NEW_LINE>dataItem.setCity(_ctx.stringValue("GetCopyrightPersonListResponse.Data[" + i + "].City"));<NEW_LINE>dataItem.setUseType(_ctx.integerValue("GetCopyrightPersonListResponse.Data[" + i + "].UseType"));<NEW_LINE>dataItem.setPhone(_ctx.stringValue("GetCopyrightPersonListResponse.Data[" + i + "].Phone"));<NEW_LINE>dataItem.setCounty(_ctx.stringValue("GetCopyrightPersonListResponse.Data[" + i + "].County"));<NEW_LINE>dataItem.setUserPk(_ctx.stringValue<MASK><NEW_LINE>dataItem.setCardType(_ctx.stringValue("GetCopyrightPersonListResponse.Data[" + i + "].CardType"));<NEW_LINE>dataItem.setEmail(_ctx.stringValue("GetCopyrightPersonListResponse.Data[" + i + "].Email"));<NEW_LINE>dataItem.setExpiredDate(_ctx.stringValue("GetCopyrightPersonListResponse.Data[" + i + "].ExpiredDate"));<NEW_LINE>dataItem.setCardNum(_ctx.stringValue("GetCopyrightPersonListResponse.Data[" + i + "].CardNum"));<NEW_LINE>dataItem.setAddress(_ctx.stringValue("GetCopyrightPersonListResponse.Data[" + i + "].Address"));<NEW_LINE>dataItem.setOwnerType(_ctx.integerValue("GetCopyrightPersonListResponse.Data[" + i + "].OwnerType"));<NEW_LINE>dataItem.setName(_ctx.stringValue("GetCopyrightPersonListResponse.Data[" + i + "].Name"));<NEW_LINE>dataItem.setPersonId(_ctx.stringValue("GetCopyrightPersonListResponse.Data[" + i + "].PersonId"));<NEW_LINE>dataItem.setAuditStatus(_ctx.integerValue("GetCopyrightPersonListResponse.Data[" + i + "].AuditStatus"));<NEW_LINE>dataItem.setProvince(_ctx.stringValue("GetCopyrightPersonListResponse.Data[" + i + "].Province"));<NEW_LINE>data.add(dataItem);<NEW_LINE>}<NEW_LINE>getCopyrightPersonListResponse.setData(data);<NEW_LINE>return getCopyrightPersonListResponse;<NEW_LINE>}
("GetCopyrightPersonListResponse.Data[" + i + "].UserPk"));
893,118
int determineSizeHintColor(int imageWidth, int imageHeight, @Nullable ScaleType scaleType) {<NEW_LINE>int visibleDrawnAreaWidth = getBounds().width();<NEW_LINE>int visibleDrawnAreaHeight = getBounds().height();<NEW_LINE>if (visibleDrawnAreaWidth <= 0 || visibleDrawnAreaHeight <= 0 || imageWidth <= 0 || imageHeight <= 0) {<NEW_LINE>return TEXT_COLOR_IMAGE_NOT_OK;<NEW_LINE>}<NEW_LINE>if (scaleType != null) {<NEW_LINE>// Apply optional scale type in order to get boundaries of the actual area to be filled<NEW_LINE>mRect.left = mRect.top = 0;<NEW_LINE>mRect.right = visibleDrawnAreaWidth;<NEW_LINE>mRect.bottom = visibleDrawnAreaHeight;<NEW_LINE>mMatrix.reset();<NEW_LINE>// We can ignore the focus point as it has no influence on the scale, but only the translation<NEW_LINE>scaleType.getTransform(mMatrix, mRect, imageWidth, imageHeight, 0f, 0f);<NEW_LINE>mRectF.left = mRectF.top = 0;<NEW_LINE>mRectF.right = imageWidth;<NEW_LINE>mRectF.bottom = imageHeight;<NEW_LINE>mMatrix.mapRect(mRectF);<NEW_LINE>final int drawnAreaWidth = (int) mRectF.width();<NEW_LINE>final int drawnAreaHeight = <MASK><NEW_LINE>visibleDrawnAreaWidth = Math.min(visibleDrawnAreaWidth, drawnAreaWidth);<NEW_LINE>visibleDrawnAreaHeight = Math.min(visibleDrawnAreaHeight, drawnAreaHeight);<NEW_LINE>}<NEW_LINE>// Update the thresholds for the overlay color<NEW_LINE>float scaledImageWidthThresholdOk = visibleDrawnAreaWidth * IMAGE_SIZE_THRESHOLD_OK;<NEW_LINE>float scaledImageWidthThresholdNotOk = visibleDrawnAreaWidth * IMAGE_SIZE_THRESHOLD_NOT_OK;<NEW_LINE>float scaledImageHeightThresholdOk = visibleDrawnAreaHeight * IMAGE_SIZE_THRESHOLD_OK;<NEW_LINE>float scaledImageHeightThresholdNotOk = visibleDrawnAreaHeight * IMAGE_SIZE_THRESHOLD_NOT_OK;<NEW_LINE>// Calculate the dimension differences<NEW_LINE>int absWidthDifference = Math.abs(imageWidth - visibleDrawnAreaWidth);<NEW_LINE>int absHeightDifference = Math.abs(imageHeight - visibleDrawnAreaHeight);<NEW_LINE>// Return corresponding color<NEW_LINE>if (absWidthDifference < scaledImageWidthThresholdOk && absHeightDifference < scaledImageHeightThresholdOk) {<NEW_LINE>return TEXT_COLOR_IMAGE_OK;<NEW_LINE>} else if (absWidthDifference < scaledImageWidthThresholdNotOk && absHeightDifference < scaledImageHeightThresholdNotOk) {<NEW_LINE>return TEXT_COLOR_IMAGE_ALMOST_OK;<NEW_LINE>}<NEW_LINE>return TEXT_COLOR_IMAGE_NOT_OK;<NEW_LINE>}
(int) mRectF.height();
13,494
public static DescribeAppsResponse unmarshall(DescribeAppsResponse describeAppsResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeAppsResponse.setRequestId(_ctx.stringValue("DescribeAppsResponse.RequestId"));<NEW_LINE>describeAppsResponse.setTotalCount(_ctx.integerValue("DescribeAppsResponse.TotalCount"));<NEW_LINE>describeAppsResponse.setPageSize(_ctx.integerValue("DescribeAppsResponse.PageSize"));<NEW_LINE>describeAppsResponse.setPageNumber<MASK><NEW_LINE>List<AppItem> apps = new ArrayList<AppItem>();<NEW_LINE>for (int i = 0; i < _ctx.lengthValue("DescribeAppsResponse.Apps.Length"); i++) {<NEW_LINE>AppItem appItem = new AppItem();<NEW_LINE>appItem.setAppId(_ctx.longValue("DescribeAppsResponse.Apps[" + i + "].AppId"));<NEW_LINE>appItem.setAppName(_ctx.stringValue("DescribeAppsResponse.Apps[" + i + "].AppName"));<NEW_LINE>appItem.setDescription(_ctx.stringValue("DescribeAppsResponse.Apps[" + i + "].Description"));<NEW_LINE>apps.add(appItem);<NEW_LINE>}<NEW_LINE>describeAppsResponse.setApps(apps);<NEW_LINE>return describeAppsResponse;<NEW_LINE>}
(_ctx.integerValue("DescribeAppsResponse.PageNumber"));
1,193,749
public void initialize() {<NEW_LINE>String authnChallengeRealm = OAuthAuthorityUtils.getProperty(OAuthAuthorityConsts.JA_PROP_AUTHN_CHALLENGE_REALM, "https://athenz.io");<NEW_LINE>this.authenticateChallenge = String.format("Bearer realm=\"%s\"", authnChallengeRealm);<NEW_LINE>// no need to load user domain<NEW_LINE>// this.userDomain = userDomain;<NEW_LINE>// certificate parser<NEW_LINE>boolean excludeRoleCertificates = Boolean.valueOf(OAuthAuthorityUtils.getProperty(OAuthAuthorityConsts.JA_PROP_CERT_EXCLUDE_ROLE_CERTIFICATES, "false"));<NEW_LINE>Set<String> excludedPrincipals = OAuthAuthorityUtils.csvToSet(OAuthAuthorityUtils.getProperty(OAuthAuthorityConsts.JA_PROP_CERT_EXCLUDED_PRINCIPALS, ""), OAuthAuthorityConsts.CSV_DELIMITER);<NEW_LINE>this.certificateIdentityParser = new CertificateIdentityParser(excludedPrincipals, excludeRoleCertificates);<NEW_LINE>// JWT parser<NEW_LINE>String jwtParserFactoryClass = OAuthAuthorityUtils.<MASK><NEW_LINE>try {<NEW_LINE>OAuthJwtAccessTokenParserFactory jwtParserFactory = (OAuthJwtAccessTokenParserFactory) Class.forName(jwtParserFactoryClass).newInstance();<NEW_LINE>this.parser = jwtParserFactory.create(this);<NEW_LINE>} catch (InstantiationException | IllegalAccessException | ClassNotFoundException e) {<NEW_LINE>LOG.error("Invalid OAuthJwtAccessTokenParserFactory class: {} error: {}", jwtParserFactoryClass, e.getMessage());<NEW_LINE>throw new IllegalArgumentException("Invalid JWT parser class", e);<NEW_LINE>}<NEW_LINE>// JWT validator controls<NEW_LINE>this.shouldVerifyCertThumbprint = Boolean.valueOf(OAuthAuthorityUtils.getProperty(OAuthAuthorityConsts.JA_PROP_VERIFY_CERT_THUMBPRINT, "true"));<NEW_LINE>// JWT validator client ID mapping<NEW_LINE>String authorizedClientIdsPath = OAuthAuthorityUtils.getProperty(OAuthAuthorityConsts.JA_PROP_AUTHORIZED_CLIENT_IDS_PATH, "");<NEW_LINE>Map<String, Set<String>> authorizedClientIds = new HashMap<>();<NEW_LINE>Map<String, String> authorizedServices = new HashMap<>();<NEW_LINE>this.processAuthorizedClientIds(authorizedClientIdsPath, authorizedClientIds, authorizedServices);<NEW_LINE>this.authorizedServices = authorizedServices;<NEW_LINE>// JWT validator values<NEW_LINE>String trustedIssuer = OAuthAuthorityUtils.getProperty(OAuthAuthorityConsts.JA_PROP_CLAIM_ISS, "https://athenz.io");<NEW_LINE>Set<String> requiredAudiences = OAuthAuthorityUtils.csvToSet(OAuthAuthorityUtils.getProperty(OAuthAuthorityConsts.JA_PROP_CLAIM_AUD, "https://zms.athenz.io"), OAuthAuthorityConsts.CSV_DELIMITER);<NEW_LINE>Set<String> requiredScopes = OAuthAuthorityUtils.csvToSet(OAuthAuthorityUtils.getProperty(OAuthAuthorityConsts.JA_PROP_CLAIM_SCOPE, "sys.auth:role.admin"), OAuthJwtAccessToken.SCOPE_DELIMITER);<NEW_LINE>// JWT validator<NEW_LINE>this.validator = new DefaultOAuthJwtAccessTokenValidator(trustedIssuer, requiredAudiences, requiredScopes, authorizedClientIds);<NEW_LINE>}
getProperty(OAuthAuthorityConsts.JA_PROP_PARSER_FACTORY_CLASS, "com.yahoo.athenz.auth.oauth.parser.DefaultOAuthJwtAccessTokenParserFactory");
774,481
protected void visitPackage(int version, int access, String packageName) {<NEW_LINE>String useExternalName = getExternalName();<NEW_LINE>if (PackageInfoImpl.isPackageName(useExternalName)) {<NEW_LINE>useExternalName = PackageInfoImpl.stripPackageNameFromClassName(useExternalName);<NEW_LINE>}<NEW_LINE>if (this.logParms != null) {<NEW_LINE>logParms[1] = packageName;<NEW_LINE>Tr.debug(tc, MessageFormat<MASK><NEW_LINE>}<NEW_LINE>if (!packageName.equals(useExternalName)) {<NEW_LINE>if (logParms != null) {<NEW_LINE>Tr.debug(tc, MessageFormat.format("[ {0} ] [ {1} ] RETURN External name [ {2} ] mismatch", logParms));<NEW_LINE>}<NEW_LINE>throw VISIT_ENDED_PACKAGE_MISMATCH;<NEW_LINE>}<NEW_LINE>if (logParms != null) {<NEW_LINE>Tr.debug(tc, MessageFormat.format("[ {0} ] [ {1} ] External name match; continuing", logParms));<NEW_LINE>}<NEW_LINE>InfoStoreImpl useInfoStore = getInfoStore();<NEW_LINE>if (useInfoStore.basicGetPackageInfo(packageName) != null) {<NEW_LINE>// CWWKC0038W<NEW_LINE>Tr.warning(tc, "ANNO_INFOVISITOR_VISIT1", getHashText(), packageName);<NEW_LINE>String eMsg = "Duplicate package [" + packageName + "]";<NEW_LINE>com.ibm.ws.ffdc.FFDCFilter.processException(new Exception(eMsg), CLASS_NAME, "379");<NEW_LINE>if (logParms != null) {<NEW_LINE>Tr.debug(tc, MessageFormat.format("[ {0} ] [ {1} ] RETURN Duplicate package", logParms));<NEW_LINE>}<NEW_LINE>throw VISIT_ENDED_DUPLICATE_PACKAGE;<NEW_LINE>}<NEW_LINE>this.packageInfo = getInfoStore().basicAddPackageInfo(packageName, access);<NEW_LINE>if (logParms != null) {<NEW_LINE>logParms[2] = this.packageInfo.getHashText();<NEW_LINE>Tr.debug(tc, MessageFormat.format("[ {0} ] [ {1} ] RETURN Move to package [ {2} ]", logParms));<NEW_LINE>}<NEW_LINE>}
.format("[ {0} ] [ {1} ] ENTER External name [ {2} ]", logParms));
782,509
public AttackResult completed(@RequestParam String editor2) {<NEW_LINE>String editor = editor2.replaceAll("\\<.*?>", "");<NEW_LINE>log.debug(editor);<NEW_LINE>if ((editor.contains("Policy.getInstance(\"antisamy-slashdot.xml\"") || editor.contains(".scan(newComment, \"antisamy-slashdot.xml\"") || editor.contains(".scan(newComment, new File(\"antisamy-slashdot.xml\")")) && editor.contains("new AntiSamy();") && editor.contains(".scan(newComment,") && editor.contains("CleanResults") && editor.contains("MyCommentDAO.addComment(threadID, userID") && editor.contains(".getCleanHTML());")) {<NEW_LINE>log.debug("true");<NEW_LINE>return success(this).<MASK><NEW_LINE>} else {<NEW_LINE>log.debug("false");<NEW_LINE>return failed(this).feedback("xss-mitigation-4-failed").build();<NEW_LINE>}<NEW_LINE>}
feedback("xss-mitigation-4-success").build();
966,210
protected ScriptStructure saveToData() throws InvalidDataInputException {<NEW_LINE>ScriptStructure.Builder builder = new ScriptStructure.Builder(C.VERSION_CREATED_IN_RUNTIME);<NEW_LINE>builder.setName(mEditText_name.getText().toString());<NEW_LINE>String profile = sw_profile.getSelection();<NEW_LINE>builder.setProfileName(profile);<NEW_LINE>builder.setActive(isActive);<NEW_LINE>builder.setPredecessors(predecessorManager.getChosenPredecessors());<NEW_LINE>builder.setReverse(mSwitch_reverse.isChecked());<NEW_LINE>if (rg_mode.getCheckedRadioButtonId() == R.id.radioButton_inline_event) {<NEW_LINE>EventDataStorage eventDataStorage = new EventDataStorage(this);<NEW_LINE>builder.setTmpEvent(editEventDataFragment.saveToData());<NEW_LINE>} else if (rg_mode.getCheckedRadioButtonId() == R.id.radioButton_event) {<NEW_LINE>EventDataStorage eventDataStorage = new EventDataStorage(this);<NEW_LINE><MASK><NEW_LINE>if (eventName == null)<NEW_LINE>throw new InvalidDataInputException("Event not selected");<NEW_LINE>try {<NEW_LINE>builder.setEvent(eventDataStorage.get(eventName));<NEW_LINE>} catch (RequiredDataNotFoundException e) {<NEW_LINE>Logger.e(e, "Event %s disappeared while editing Script", eventName);<NEW_LINE>throw new InvalidDataInputException("Event %s not found", eventName);<NEW_LINE>}<NEW_LINE>builder.setRepeatable(mSwitch_repeatable.isChecked());<NEW_LINE>builder.setPersistent(mSwitch_persistent.isChecked());<NEW_LINE>} else if (rg_mode.getCheckedRadioButtonId() == R.id.radioButton_condition) {<NEW_LINE>ConditionDataStorage conditionDataStorage = new ConditionDataStorage(this);<NEW_LINE>String conditionName = sw_condition.getSelection();<NEW_LINE>if (conditionName == null)<NEW_LINE>throw new InvalidDataInputException("Condition not selected");<NEW_LINE>try {<NEW_LINE>builder.setCondition(conditionDataStorage.get(conditionName));<NEW_LINE>} catch (RequiredDataNotFoundException e) {<NEW_LINE>Logger.e(e, "Condition %s disappeared while editing Script", conditionName);<NEW_LINE>throw new InvalidDataInputException("Condition %s not found", conditionName);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>builder.setDynamicsLink(dynamicsLink);<NEW_LINE>try {<NEW_LINE>return builder.build();<NEW_LINE>} catch (BuilderInfoClashedException e) {<NEW_LINE>throw new InvalidDataInputException(e);<NEW_LINE>}<NEW_LINE>}
String eventName = sw_event.getSelection();
204,603
public void mergeCostRow(CostRow costRow) {<NEW_LINE>Set<RowField> resultRowFieldList = Sets.newHashSet();<NEW_LINE>if (fieldList.isEmpty()) {<NEW_LINE>resultRowFieldList = Sets.newHashSet(costRow.getFieldList());<NEW_LINE>} else {<NEW_LINE>for (RowField rowField : fieldList) {<NEW_LINE>if (costRow.getFieldList().isEmpty()) {<NEW_LINE>Set<String> fieldValueList = Sets.newHashSet(rowField.getFieldList());<NEW_LINE>resultRowFieldList.add(new RowField(fieldValueList));<NEW_LINE>} else {<NEW_LINE>for (RowField otherRowField : costRow.getFieldList()) {<NEW_LINE>Set<String> fieldValueList = Sets.<MASK><NEW_LINE>fieldValueList.addAll(otherRowField.getFieldList());<NEW_LINE>Set<String> fieldParentList = fieldValueList.stream().filter(v -> fieldValueList.contains(CostUtils.buildValueName(v))).collect(Collectors.toSet());<NEW_LINE>for (String fieldParent : fieldParentList) {<NEW_LINE>fieldValueList.remove(CostUtils.buildValueName(fieldParent));<NEW_LINE>}<NEW_LINE>resultRowFieldList.add(new RowField(fieldValueList));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>this.fieldList = resultRowFieldList;<NEW_LINE>this.getBirthFieldList().addAll(costRow.getBirthFieldList());<NEW_LINE>}
newHashSet(rowField.getFieldList());
1,807,651
protected void encodeContent(FacesContext context, ContentFlow cf) throws IOException {<NEW_LINE><MASK><NEW_LINE>String var = cf.getVar();<NEW_LINE>writer.startElement("div", null);<NEW_LINE>writer.writeAttribute("class", "flow", null);<NEW_LINE>if (var == null) {<NEW_LINE>for (UIComponent child : cf.getChildren()) {<NEW_LINE>if (child.isRendered()) {<NEW_LINE>writer.startElement("div", null);<NEW_LINE>writer.writeAttribute("class", "item", null);<NEW_LINE>child.encodeAll(context);<NEW_LINE>writer.endElement("div");<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>Map<String, Object> requestMap = context.getExternalContext().getRequestMap();<NEW_LINE>Collection<?> value = (Collection<?>) cf.getValue();<NEW_LINE>if (value != null) {<NEW_LINE>for (Iterator<?> it = value.iterator(); it.hasNext(); ) {<NEW_LINE>requestMap.put(var, it.next());<NEW_LINE>writer.startElement("div", null);<NEW_LINE>writer.writeAttribute("class", "item", null);<NEW_LINE>renderChildren(context, cf);<NEW_LINE>writer.endElement("div");<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>writer.endElement("div");<NEW_LINE>}
ResponseWriter writer = context.getResponseWriter();
1,440,302
public boolean isTopicExist(String masterUrl, String topicName) {<NEW_LINE><MASK><NEW_LINE>String url = masterUrl + QUERY_TOPIC_PATH + TOPIC_NAME + topicName;<NEW_LINE>try {<NEW_LINE>TopicResponse topicView = HttpUtils.request(restTemplate, url, HttpMethod.GET, null, new HttpHeaders(), TopicResponse.class);<NEW_LINE>if (CollectionUtils.isEmpty(topicView.getData())) {<NEW_LINE>LOGGER.warn("tubemq topic {} not exists in {}", topicName, url);<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>LOGGER.info("tubemq topic {} exists in {}", topicName, url);<NEW_LINE>return true;<NEW_LINE>} catch (Exception e) {<NEW_LINE>String msg = String.format("failed to check if the topic %s exist in ", topicName);<NEW_LINE>LOGGER.error(msg + url, e);<NEW_LINE>throw new BusinessException(msg + masterUrl + ", error: " + e.getMessage());<NEW_LINE>}<NEW_LINE>}
LOGGER.info("begin to check if the tubemq topic {} exists", topicName);
759,621
synchronized final void parseUpperTransportPDU(final Message message) throws ExtendedInvalidCipherTextException {<NEW_LINE>try {<NEW_LINE>switch(message.getPduType()) {<NEW_LINE>case MeshManagerApi.PDU_TYPE_NETWORK:<NEW_LINE>if (message instanceof AccessMessage) {<NEW_LINE>// Access message<NEW_LINE>final AccessMessage accessMessage = (AccessMessage) message;<NEW_LINE>reassembleLowerTransportAccessPDU(accessMessage);<NEW_LINE>final byte[] decryptedUpperTransportControlPdu = decryptUpperTransportPDU(accessMessage);<NEW_LINE>accessMessage.setAccessPdu(decryptedUpperTransportControlPdu);<NEW_LINE>} else {<NEW_LINE>// TODO<NEW_LINE>// this where control messages such as heartbeat and friendship messages are to be implemented<NEW_LINE>}<NEW_LINE>break;<NEW_LINE>case MeshManagerApi.PDU_TYPE_PROXY_CONFIGURATION:<NEW_LINE>final ControlMessage controlMessage = (ControlMessage) message;<NEW_LINE>if (controlMessage.getLowerTransportControlPdu().size() == 1) {<NEW_LINE>final byte[] lowerTransportControlPdu = controlMessage.getLowerTransportControlPdu().get(0);<NEW_LINE>final ByteBuffer buffer = ByteBuffer.wrap(lowerTransportControlPdu).order(ByteOrder.BIG_ENDIAN);<NEW_LINE>message.setOpCode(buffer.get());<NEW_LINE>final byte[] parameters = new byte[<MASK><NEW_LINE>buffer.get(parameters);<NEW_LINE>message.setParameters(parameters);<NEW_LINE>}<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>} catch (InvalidCipherTextException ex) {<NEW_LINE>throw new ExtendedInvalidCipherTextException(ex.getMessage(), ex.getCause(), UpperTransportLayer.class.getSimpleName());<NEW_LINE>}<NEW_LINE>}
buffer.capacity() - 1];
873,570
private TreeNode convertEnum(ClassTree node, TreePath parent) {<NEW_LINE>TreePath path = getTreePath(parent, node);<NEW_LINE>TypeElement element = (TypeElement) getElement(path);<NEW_LINE>if (ElementUtil.isAnonymous(element)) {<NEW_LINE>return convertClassDeclaration(node, parent).setPosition(getPosition(node));<NEW_LINE>}<NEW_LINE>EnumDeclaration newNode = new EnumDeclaration();<NEW_LINE>convertBodyDeclaration(node, parent, node.getModifiers(), newNode);<NEW_LINE>newNode.setName(convertSimpleName(element, getTypeMirror(path), getNamePosition(node))).setTypeElement(element);<NEW_LINE>for (Tree bodyDecl : node.getMembers()) {<NEW_LINE>if (bodyDecl.getKind() == Kind.VARIABLE) {<NEW_LINE>TreeNode var = convertVariableDeclaration<MASK><NEW_LINE>if (var.getKind() == TreeNode.Kind.ENUM_CONSTANT_DECLARATION) {<NEW_LINE>newNode.addEnumConstant((EnumConstantDeclaration) var);<NEW_LINE>} else {<NEW_LINE>newNode.addBodyDeclaration((BodyDeclaration) var);<NEW_LINE>}<NEW_LINE>} else if (bodyDecl.getKind() == Kind.BLOCK) {<NEW_LINE>BlockTree javacBlock = (BlockTree) bodyDecl;<NEW_LINE>Block block = (Block) convert(javacBlock, path);<NEW_LINE>newNode.addBodyDeclaration(new Initializer(block, javacBlock.isStatic()));<NEW_LINE>} else {<NEW_LINE>newNode.addBodyDeclaration((BodyDeclaration) convert(bodyDecl, path));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return newNode;<NEW_LINE>}
((VariableTree) bodyDecl, path);
1,463,475
public Spliterator<A> trySplit() {<NEW_LINE>if (spliterators[splitPos] == null)<NEW_LINE>spliterators[splitPos] = <MASK><NEW_LINE>Spliterator<T> res = spliterators[splitPos].trySplit();<NEW_LINE>if (res == null) {<NEW_LINE>if (splitPos == spliterators.length - 1)<NEW_LINE>return null;<NEW_LINE>@SuppressWarnings("unchecked")<NEW_LINE>T[] arr = (T[]) StreamSupport.stream(spliterators[splitPos], false).toArray();<NEW_LINE>if (arr.length == 0)<NEW_LINE>return null;<NEW_LINE>if (arr.length == 1) {<NEW_LINE>accumulate(splitPos, arr[0]);<NEW_LINE>splitPos++;<NEW_LINE>return trySplit();<NEW_LINE>}<NEW_LINE>spliterators[splitPos] = Spliterators.spliterator(arr, Spliterator.ORDERED);<NEW_LINE>return trySplit();<NEW_LINE>}<NEW_LINE>long prefixEst = Long.MAX_VALUE;<NEW_LINE>long newEst = spliterators[splitPos].getExactSizeIfKnown();<NEW_LINE>if (newEst == -1) {<NEW_LINE>newEst = Long.MAX_VALUE;<NEW_LINE>} else {<NEW_LINE>try {<NEW_LINE>for (int i = splitPos + 1; i < collections.length; i++) {<NEW_LINE>long size = collections[i].size();<NEW_LINE>newEst = StrictMath.multiplyExact(newEst, size);<NEW_LINE>}<NEW_LINE>if (est != Long.MAX_VALUE)<NEW_LINE>prefixEst = est - newEst;<NEW_LINE>} catch (ArithmeticException e) {<NEW_LINE>newEst = Long.MAX_VALUE;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>Spliterator<T>[] prefixSpliterators = spliterators.clone();<NEW_LINE>Collection<T>[] prefixCollections = collections.clone();<NEW_LINE>prefixSpliterators[splitPos] = res;<NEW_LINE>this.est = newEst;<NEW_LINE>Arrays.fill(spliterators, splitPos + 1, spliterators.length, null);<NEW_LINE>return doSplit(prefixEst, prefixSpliterators, prefixCollections);<NEW_LINE>}
collections[splitPos].spliterator();
50,348
final DisassociatePricingRulesResult executeDisassociatePricingRules(DisassociatePricingRulesRequest disassociatePricingRulesRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(disassociatePricingRulesRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<DisassociatePricingRulesRequest> request = null;<NEW_LINE>Response<DisassociatePricingRulesResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new DisassociatePricingRulesRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(disassociatePricingRulesRequest));<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, "billingconductor");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DisassociatePricingRules");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<DisassociatePricingRulesResult>> 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 DisassociatePricingRulesResultJsonUnmarshaller());
1,818,815
public UUID rotateCerts(CertsRotateParams requestParams, Customer customer, Universe universe) {<NEW_LINE>log.debug("rotateCerts called with rootCA: {}", (requestParams.rootCA != null) ? requestParams.rootCA.toString() : "NULL");<NEW_LINE>// Verify request params<NEW_LINE>requestParams.verifyParams(universe);<NEW_LINE>// Update request params with additional metadata for upgrade task<NEW_LINE>requestParams.universeUUID = universe.universeUUID;<NEW_LINE>requestParams.expectedUniverseVersion = universe.version;<NEW_LINE>UserIntent userIntent = universe.getUniverseDetails().getPrimaryCluster().userIntent;<NEW_LINE>// Generate client certs if rootAndClientRootCASame is true and rootCA is self-signed.<NEW_LINE>// This is there only for legacy support, no need if rootCA and clientRootCA are different.<NEW_LINE>if (userIntent.enableClientToNodeEncrypt && requestParams.rootAndClientRootCASame) {<NEW_LINE>CertificateInfo rootCert = <MASK><NEW_LINE>if (rootCert.certType == CertConfigType.SelfSigned || rootCert.certType == CertConfigType.HashicorpVault) {<NEW_LINE>CertificateHelper.createClientCertificate(requestParams.rootCA, String.format(CertificateHelper.CERT_PATH, runtimeConfigFactory.staticApplicationConf().getString("yb.storage.path"), customer.uuid.toString(), requestParams.rootCA.toString()), CertificateHelper.DEFAULT_CLIENT, null, null);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (userIntent.providerType.equals(CloudType.kubernetes)) {<NEW_LINE>// Certs rotate does not change universe version. Check for current version of helm chart.<NEW_LINE>checkHelmChartExists(universe.getUniverseDetails().getPrimaryCluster().userIntent.ybSoftwareVersion);<NEW_LINE>}<NEW_LINE>return submitUpgradeTask(userIntent.providerType.equals(CloudType.kubernetes) ? TaskType.CertsRotateKubernetesUpgrade : TaskType.CertsRotate, CustomerTask.TaskType.CertsRotate, requestParams, customer, universe);<NEW_LINE>}
CertificateInfo.get(requestParams.rootCA);
134,382
static final SecurityIdentity authorize(CallbackHandler callbackHandler, SamlPrincipal principal) {<NEW_LINE>try {<NEW_LINE>EvidenceVerifyCallback evidenceVerifyCallback = new EvidenceVerifyCallback(new Evidence() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public Principal getPrincipal() {<NEW_LINE>return principal;<NEW_LINE>}<NEW_LINE>});<NEW_LINE>callbackHandler.handle(<MASK><NEW_LINE>if (evidenceVerifyCallback.isVerified()) {<NEW_LINE>AuthorizeCallback authorizeCallback = new AuthorizeCallback(null, null);<NEW_LINE>try {<NEW_LINE>callbackHandler.handle(new Callback[] { authorizeCallback });<NEW_LINE>} catch (Exception e) {<NEW_LINE>throw new HttpAuthenticationException(e);<NEW_LINE>}<NEW_LINE>if (authorizeCallback.isAuthorized()) {<NEW_LINE>SecurityIdentityCallback securityIdentityCallback = new SecurityIdentityCallback();<NEW_LINE>callbackHandler.handle(new Callback[] { AuthenticationCompleteCallback.SUCCEEDED, securityIdentityCallback });<NEW_LINE>SecurityIdentity securityIdentity = securityIdentityCallback.getSecurityIdentity();<NEW_LINE>return securityIdentity;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} catch (UnsupportedCallbackException e) {<NEW_LINE>throw new RuntimeException(e);<NEW_LINE>} catch (IOException e) {<NEW_LINE>throw new RuntimeException(e);<NEW_LINE>}<NEW_LINE>return null;<NEW_LINE>}
new Callback[] { evidenceVerifyCallback });
668,189
static Map<String, Object> deepCopy(Map<String, Object> mBeanInfo) {<NEW_LINE>// it's not really "deep" copy; it just copies deep enough<NEW_LINE>Map<String, Object> copy = new HashMap<>(mBeanInfo);<NEW_LINE>// copy "op" deep enough<NEW_LINE>Map<String, Object> ops = (Map<String, Object>) mBeanInfo.get("op");<NEW_LINE>Map<String, Object> newOps = new HashMap<>(ops.size());<NEW_LINE>for (String name : ops.keySet()) {<NEW_LINE>Object <MASK><NEW_LINE>Object newOp;<NEW_LINE>if (op instanceof List) {<NEW_LINE>// for method overloading<NEW_LINE>List<Map<String, Object>> overloaded = (List<Map<String, Object>>) op;<NEW_LINE>List<Map<String, Object>> newOpList = new ArrayList<>(overloaded.size());<NEW_LINE>for (Map<String, Object> method : overloaded) {<NEW_LINE>newOpList.add(new HashMap<>(method));<NEW_LINE>}<NEW_LINE>newOp = newOpList;<NEW_LINE>} else {<NEW_LINE>Map<String, Object> method = (Map<String, Object>) op;<NEW_LINE>newOp = new HashMap<>(method);<NEW_LINE>}<NEW_LINE>newOps.put(name, newOp);<NEW_LINE>}<NEW_LINE>copy.put("op", newOps);<NEW_LINE>return copy;<NEW_LINE>}
op = ops.get(name);
1,514,139
public static Tensor toPTTensor(com.alibaba.alink.common.linalg.tensor.Tensor<?> tensor) {<NEW_LINE>long[] shape = tensor.shape();<NEW_LINE>int size = Math.toIntExact(tensor.size());<NEW_LINE>switch(tensor.getType()) {<NEW_LINE>case FLOAT:<NEW_LINE>FloatTensor floatTensor = (FloatTensor) tensor;<NEW_LINE>FloatBuffer floatBuffer = Tensor.allocateFloatBuffer(size);<NEW_LINE>TensorInternalUtils.getTensorData(floatTensor).read(DataBuffers.of(floatBuffer));<NEW_LINE>return Tensor.fromBlob(floatBuffer, shape);<NEW_LINE>case DOUBLE:<NEW_LINE>DoubleTensor doubleTensor = (DoubleTensor) tensor;<NEW_LINE>DoubleBuffer doubleBuffer = Tensor.allocateDoubleBuffer(size);<NEW_LINE>TensorInternalUtils.getTensorData(doubleTensor).read(DataBuffers.of(doubleBuffer));<NEW_LINE>return Tensor.fromBlob(doubleBuffer, shape);<NEW_LINE>case INT:<NEW_LINE>IntTensor intTensor = (IntTensor) tensor;<NEW_LINE>IntBuffer intBuffer = Tensor.allocateIntBuffer(size);<NEW_LINE>TensorInternalUtils.getTensorData(intTensor).read(DataBuffers.of(intBuffer));<NEW_LINE>return Tensor.fromBlob(intBuffer, shape);<NEW_LINE>case LONG:<NEW_LINE>LongTensor longTensor = (LongTensor) tensor;<NEW_LINE>LongBuffer longBuffer = Tensor.allocateLongBuffer(size);<NEW_LINE>TensorInternalUtils.getTensorData(longTensor).read(DataBuffers.of(longBuffer));<NEW_LINE>return Tensor.fromBlob(longBuffer, shape);<NEW_LINE>case BYTE:<NEW_LINE>ByteTensor byteTensor = (ByteTensor) tensor;<NEW_LINE>ByteBuffer byteBuffer = Tensor.allocateByteBuffer(size);<NEW_LINE>TensorInternalUtils.getTensorData(byteTensor).read(DataBuffers.of(byteBuffer));<NEW_LINE>return <MASK><NEW_LINE>case UBYTE:<NEW_LINE>UByteTensor ubyteTensor = (UByteTensor) tensor;<NEW_LINE>ByteBuffer ubyteBuffer = Tensor.allocateByteBuffer(size);<NEW_LINE>TensorInternalUtils.getTensorData(ubyteTensor).read(DataBuffers.of(ubyteBuffer));<NEW_LINE>return Tensor.fromBlobUnsigned(ubyteBuffer, shape);<NEW_LINE>case BOOLEAN:<NEW_LINE>case STRING:<NEW_LINE>default:<NEW_LINE>throw new UnsupportedOperationException("Unsupported PyTorch tensor type: " + tensor.getType());<NEW_LINE>}<NEW_LINE>}
Tensor.fromBlob(byteBuffer, shape);
1,006,669
/*<NEW_LINE>* declaringUniqueKey dot selector genericSignature<NEW_LINE>* p.X { <T> void bar(X<T> t) } --> Lp/X;.bar<T:Ljava/lang/Object;>(LX<TT;>;)V<NEW_LINE>*/<NEW_LINE>@Override<NEW_LINE>public char[] computeUniqueKey(boolean isLeaf) {<NEW_LINE>// declaring class<NEW_LINE>char[] declaringKey = this.declaringClass.computeUniqueKey(false);<NEW_LINE>int declaringLength = declaringKey.length;<NEW_LINE>// selector<NEW_LINE>int selectorLength = this.selector == TypeConstants.INIT ? 0 : this.selector.length;<NEW_LINE>// generic signature<NEW_LINE>char[] sig = genericSignature();<NEW_LINE>boolean isGeneric = sig != null;<NEW_LINE>if (!isGeneric)<NEW_LINE>sig = signature();<NEW_LINE>int signatureLength = sig.length;<NEW_LINE>// thrown exceptions<NEW_LINE>int thrownExceptionsLength = this.thrownExceptions.length;<NEW_LINE>int thrownExceptionsSignatureLength = 0;<NEW_LINE>char[][] thrownExceptionsSignatures = null;<NEW_LINE>boolean addThrownExceptions = thrownExceptionsLength > 0 && (!isGeneric || CharOperation.lastIndexOf('^', sig) < 0);<NEW_LINE>if (addThrownExceptions) {<NEW_LINE>thrownExceptionsSignatures = new char[thrownExceptionsLength][];<NEW_LINE>for (int i = 0; i < thrownExceptionsLength; i++) {<NEW_LINE>if (this.thrownExceptions[i] != null) {<NEW_LINE>thrownExceptionsSignatures[i] = this.thrownExceptions[i].signature();<NEW_LINE>// add one char for separator<NEW_LINE>thrownExceptionsSignatureLength += thrownExceptionsSignatures[i].length + 1;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>char[] uniqueKey = new char[declaringLength + <MASK><NEW_LINE>int index = 0;<NEW_LINE>System.arraycopy(declaringKey, 0, uniqueKey, index, declaringLength);<NEW_LINE>index = declaringLength;<NEW_LINE>uniqueKey[index++] = '.';<NEW_LINE>System.arraycopy(this.selector, 0, uniqueKey, index, selectorLength);<NEW_LINE>index += selectorLength;<NEW_LINE>System.arraycopy(sig, 0, uniqueKey, index, signatureLength);<NEW_LINE>if (thrownExceptionsSignatureLength > 0) {<NEW_LINE>index += signatureLength;<NEW_LINE>for (int i = 0; i < thrownExceptionsLength; i++) {<NEW_LINE>char[] thrownExceptionSignature = thrownExceptionsSignatures[i];<NEW_LINE>if (thrownExceptionSignature != null) {<NEW_LINE>uniqueKey[index++] = '|';<NEW_LINE>int length = thrownExceptionSignature.length;<NEW_LINE>System.arraycopy(thrownExceptionSignature, 0, uniqueKey, index, length);<NEW_LINE>index += length;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return uniqueKey;<NEW_LINE>}
1 + selectorLength + signatureLength + thrownExceptionsSignatureLength];
1,071,921
public Object visitar(NoDeclaracaoVetor noDeclaracaoVetor) throws ExcecaoVisitaASA {<NEW_LINE>StringBuilder sb = new StringBuilder();<NEW_LINE>sb.append("<html>");<NEW_LINE>if (currentPortugolTreeNode.isDeclarado()) {<NEW_LINE>sb.append("<b>");<NEW_LINE>}<NEW_LINE>sb.append(noDeclaracaoVetor.getNome());<NEW_LINE>if (currentPortugolTreeNode.isDeclarado()) {<NEW_LINE>sb.append("</b>");<NEW_LINE>}<NEW_LINE>sb.append("[]");<NEW_LINE>sb.append(" : ");<NEW_LINE>sb.append("<font color='#888888'>");<NEW_LINE>sb.append(noDeclaracaoVetor.getTipoDado().getNome());<NEW_LINE>component.setText(sb.toString());<NEW_LINE>if (currentPortugolTreeNode.isModificado()) {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>Icon icone = getVectorIcon(noDeclaracaoVetor.getTipoDado());<NEW_LINE>component.setIcon(icone);<NEW_LINE>component.setDisabledIcon(icone);<NEW_LINE>return null;<NEW_LINE>}
component.setForeground(Color.BLUE);
84,119
public void onChunkExecStateChanged(ChunkExecStateChangedEvent event) {<NEW_LINE>if (queue_ == null || event.getDocId() != queue_.getDocId())<NEW_LINE>return;<NEW_LINE>switch(event.getExecState()) {<NEW_LINE>case NotebookDocQueue.CHUNK_EXEC_STARTED:<NEW_LINE>// find the unit<NEW_LINE>executingUnit_ = getUnit(event.getChunkId());<NEW_LINE>// unfold the scope<NEW_LINE>Scope scope = notebook_.getChunkScope(event.getChunkId());<NEW_LINE>if (scope != null) {<NEW_LINE>docDisplay_.unfold(Range.fromPoints(scope.getPreamble(), scope.getEnd()));<NEW_LINE>}<NEW_LINE>// apply options<NEW_LINE>notebook_.setOutputOptions(event.getChunkId(), event.getOptions());<NEW_LINE>if (executingUnit_ != null)<NEW_LINE>notebook_.setChunkExecuting(event.getChunkId(), executingUnit_.getExecMode(), executingUnit_.getExecScope());<NEW_LINE>break;<NEW_LINE>case NotebookDocQueue.CHUNK_EXEC_FINISHED:<NEW_LINE>if (executingUnit_ != null && executingUnit_.getChunkId() == event.getChunkId()) {<NEW_LINE>queue_.removeUnit(executingUnit_);<NEW_LINE>queue_.addCompletedUnit(executingUnit_);<NEW_LINE>executingUnit_ = null;<NEW_LINE>// if there are no more units, clean up the queue so we get a clean<NEW_LINE>// slate on the next execution<NEW_LINE>if (queue_.complete()) {<NEW_LINE>endQueueExecution(false);<NEW_LINE>} else {<NEW_LINE>updateNotebookProgress();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>break;<NEW_LINE>case NotebookDocQueue.CHUNK_EXEC_CANCELLED:<NEW_LINE>queue_.removeUnit(event.getChunkId());<NEW_LINE>notebook_.<MASK><NEW_LINE>if (queue_.complete())<NEW_LINE>endQueueExecution(false);<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}
cleanChunkExecState(event.getChunkId());
805,208
private <T> List<MetadataCopies> listCopies(Map<String, Future<List<T>>> futuresPerDatacenter, Function<T, String> idResolver) {<NEW_LINE>Map<String, MetadataCopies> copiesPerId = new HashMap<>();<NEW_LINE>Set<String> datacenters = futuresPerDatacenter.keySet();<NEW_LINE>for (Map.Entry<String, Future<List<T>>> entry : futuresPerDatacenter.entrySet()) {<NEW_LINE>List<T> entities = resolveFuture(entry.getValue());<NEW_LINE><MASK><NEW_LINE>for (T entity : entities) {<NEW_LINE>String id = idResolver.apply(entity);<NEW_LINE>MetadataCopies copies = copiesPerId.getOrDefault(id, new MetadataCopies(id, datacenters));<NEW_LINE>copies.put(datacenter, entity);<NEW_LINE>copiesPerId.put(id, copies);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return new ArrayList<>(copiesPerId.values());<NEW_LINE>}
String datacenter = entry.getKey();
1,268,490
public AssociateS3ResourcesResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>AssociateS3ResourcesResult associateS3ResourcesResult = new AssociateS3ResourcesResult();<NEW_LINE><MASK><NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>JsonToken token = context.getCurrentToken();<NEW_LINE>if (token == null)<NEW_LINE>token = context.nextToken();<NEW_LINE>if (token == VALUE_NULL) {<NEW_LINE>return associateS3ResourcesResult;<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("failedS3Resources", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>associateS3ResourcesResult.setFailedS3Resources(new ListUnmarshaller<FailedS3Resource>(FailedS3ResourceJsonUnmarshaller.getInstance()).unmarshall(context));<NEW_LINE>}<NEW_LINE>} else if (token == END_ARRAY || token == END_OBJECT) {<NEW_LINE>if (context.getLastParsedParentElement() == null || context.getLastParsedParentElement().equals(currentParentElement)) {<NEW_LINE>if (context.getCurrentDepth() <= originalDepth)<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>token = context.nextToken();<NEW_LINE>}<NEW_LINE>return associateS3ResourcesResult;<NEW_LINE>}
int originalDepth = context.getCurrentDepth();
514,314
private void verificarCaracteresAposEscopoPrograma(String codigoFonte) {<NEW_LINE>Matcher m = padraoEscopoPrograma.matcher(codigoFonte);<NEW_LINE>if (m.find()) {<NEW_LINE>int escopo = 1;<NEW_LINE>int posicao = -1;<NEW_LINE>for (int i = m.end(); i < codigoFonte.length(); i++) {<NEW_LINE>if (codigoFonte.charAt(i) == '{') {<NEW_LINE>escopo++;<NEW_LINE>} else if (codigoFonte.charAt(i) == '}') {<NEW_LINE>escopo--;<NEW_LINE>if (escopo == 0) {<NEW_LINE>posicao = i + 1;<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (posicao > 0) {<NEW_LINE>String texto = codigoFonte.substring(posicao, codigoFonte.length());<NEW_LINE>if (texto.trim().length() > 0) {<NEW_LINE>String tempTexto;<NEW_LINE>tempTexto = texto.replace("\r", "");<NEW_LINE>tempTexto = tempTexto.replace("\n", "");<NEW_LINE>tempTexto = tempTexto.replace("\t", "");<NEW_LINE>tempTexto = tempTexto.replace(" ", "");<NEW_LINE>tempTexto = tempTexto.trim();<NEW_LINE>if (!tempTexto.startsWith("/*") && !tempTexto.endsWith("*/")) {<NEW_LINE>notificarErroSintatico(new ErroExpressoesForaEscopoPrograma(posicao, codigoFonte<MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
, ErroExpressoesForaEscopoPrograma.Local.DEPOIS));
1,297,301
private static void insertTablet(Session session, String deviceId) throws IoTDBConnectionException, StatementExecutionException {<NEW_LINE>// The schema of measurements of one device<NEW_LINE>// only measurementId and data type in MeasurementSchema take effects in Tablet<NEW_LINE>List<MeasurementSchema> schemaList = new ArrayList<>();<NEW_LINE>schemaList.add(new MeasurementSchema<MASK><NEW_LINE>schemaList.add(new MeasurementSchema("s2", TSDataType.INT64));<NEW_LINE>schemaList.add(new MeasurementSchema("s3", TSDataType.INT64));<NEW_LINE>Tablet tablet = new Tablet(deviceId, schemaList, 100);<NEW_LINE>// Method 1 to add tablet data<NEW_LINE>long timestamp = System.currentTimeMillis();<NEW_LINE>for (long row = 0; row < 100; row++) {<NEW_LINE>int rowIndex = tablet.rowSize++;<NEW_LINE>tablet.addTimestamp(rowIndex, timestamp);<NEW_LINE>for (int s = 0; s < 3; s++) {<NEW_LINE>long value = new Random().nextLong();<NEW_LINE>tablet.addValue(schemaList.get(s).getMeasurementId(), rowIndex, value);<NEW_LINE>}<NEW_LINE>if (tablet.rowSize == tablet.getMaxRowNumber()) {<NEW_LINE>session.insertTablet(tablet, true);<NEW_LINE>tablet.reset();<NEW_LINE>}<NEW_LINE>timestamp++;<NEW_LINE>}<NEW_LINE>if (tablet.rowSize != 0) {<NEW_LINE>session.insertTablet(tablet);<NEW_LINE>tablet.reset();<NEW_LINE>}<NEW_LINE>// Method 2 to add tablet data<NEW_LINE>long[] timestamps = tablet.timestamps;<NEW_LINE>Object[] values = tablet.values;<NEW_LINE>for (long time = 0; time < 100; time++) {<NEW_LINE>int row = tablet.rowSize++;<NEW_LINE>timestamps[row] = time;<NEW_LINE>for (int i = 0; i < 3; i++) {<NEW_LINE>long[] sensor = (long[]) values[i];<NEW_LINE>sensor[row] = i;<NEW_LINE>}<NEW_LINE>if (tablet.rowSize == tablet.getMaxRowNumber()) {<NEW_LINE>session.insertTablet(tablet, true);<NEW_LINE>tablet.reset();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (tablet.rowSize != 0) {<NEW_LINE>session.insertTablet(tablet);<NEW_LINE>tablet.reset();<NEW_LINE>}<NEW_LINE>}
("s1", TSDataType.INT64));
1,260,959
protected void runInternal() {<NEW_LINE>// Check once in a minute as earliest to avoid log bursts.<NEW_LINE>if (shouldCheckNow(mapContainer.getLastInvalidMergePolicyCheckTime())) {<NEW_LINE>try {<NEW_LINE>checkMapMergePolicy(mapContainer.getMapConfig(), mergePolicy.getClass().getName(), getNodeEngine().getSplitBrainMergePolicyProvider());<NEW_LINE>} catch (InvalidConfigurationException e) {<NEW_LINE>logger().log(Level.WARNING, e.getMessage(), e);<NEW_LINE>}<NEW_LINE>}<NEW_LINE><MASK><NEW_LINE>hasWanReplication = mapContainer.isWanReplicationEnabled() && !disableWanReplicationEvent;<NEW_LINE>hasBackups = mapContainer.getTotalBackupCount() > 0;<NEW_LINE>hasInvalidation = mapContainer.hasInvalidationListener();<NEW_LINE>if (hasBackups) {<NEW_LINE>backupPairs = new ArrayList(2 * mergingEntries.size());<NEW_LINE>}<NEW_LINE>if (hasInvalidation) {<NEW_LINE>invalidationKeys = new ArrayList<>(mergingEntries.size());<NEW_LINE>}<NEW_LINE>// This marking is needed because otherwise after split-brain heal, we can<NEW_LINE>// end up not marked partitions even they have indexed data.<NEW_LINE>//<NEW_LINE>// Problematic case definition:<NEW_LINE>// - you have two partitions 0,1<NEW_LINE>// - add index<NEW_LINE>// - do split (now each brain has its own partitions as 0,1 but also each<NEW_LINE>// brain has one-not-indexed-partition 1 and 0 respectively)<NEW_LINE>// - heal split<NEW_LINE>// - merging starts and merging transfers data to un-marked partition 1.<NEW_LINE>// - since 1 is unmarked, it will not be available for indexed searches.<NEW_LINE>Queue<InternalIndex> notMarkedIndexes = beginIndexMarking();<NEW_LINE>// if currentIndex is not zero, this is a<NEW_LINE>// continuation of the operation after a NativeOOME<NEW_LINE>int size = mergingEntries.size();<NEW_LINE>while (currentIndex < size) {<NEW_LINE>merge(mergingEntries.get(currentIndex));<NEW_LINE>currentIndex++;<NEW_LINE>}<NEW_LINE>finishIndexMarking(notMarkedIndexes);<NEW_LINE>}
hasMapListener = mapEventPublisher.hasEventListener(name);
1,728,921
public synchronized Key generateKey(final String aesEncryptionKeyAlias) throws KeyNotGeneratedException {<NEW_LINE>try {<NEW_LINE>// Generate the AES Encryption key<NEW_LINE>SecureRandom secureRandom = new SecureRandom();<NEW_LINE>KeyGenerator generator = KeyGenerator.getInstance(AES_KEY_ALGORITHM);<NEW_LINE>generator.init(CIPHER_AES_GCM_NOPADDING_KEY_LENGTH_IN_BITS, secureRandom);<NEW_LINE>final SecretKey secretKey = generator.generateKey();<NEW_LINE>final <MASK><NEW_LINE>if (aesEncryptionKey == null) {<NEW_LINE>throw new KeyNotGeneratedException("Error in generating the AES encryption key " + "identified by the aesEncryptionKeyAlias: " + aesEncryptionKeyAlias);<NEW_LINE>}<NEW_LINE>byte[] aesEncryptionKeyInBytes = aesEncryptionKey.getEncoded();<NEW_LINE>if (aesEncryptionKeyInBytes == null || aesEncryptionKeyInBytes.length == 0) {<NEW_LINE>throw new KeyNotGeneratedException("Error in getting the encoded bytes for the AES " + "encryption key identified by the aesEncryptionKeyAlias: " + aesEncryptionKeyAlias);<NEW_LINE>}<NEW_LINE>String base64EncodedStringOfEncryptedAESKey = Base64.encodeAsString(aesEncryptionKeyInBytes);<NEW_LINE>if (base64EncodedStringOfEncryptedAESKey == null) {<NEW_LINE>throw new KeyNotGeneratedException("Error in Base64 encoding of the AES encryption " + "key for the aesEncryptionKeyAlias: " + aesEncryptionKeyAlias);<NEW_LINE>}<NEW_LINE>// Persist the AES Encryption key to SharedPreferences<NEW_LINE>sharedPreferences.edit().putString(aesEncryptionKeyAlias, base64EncodedStringOfEncryptedAESKey).apply();<NEW_LINE>logger.info("Generated and saved the AES encryption key identified by the aesEncryptionKeyAlias: " + aesEncryptionKeyAlias + " to SharedPreferences.");<NEW_LINE>return secretKey;<NEW_LINE>} catch (Exception ex) {<NEW_LINE>throw new KeyNotGeneratedException("Error in generating the AES Encryption key " + "for the aesEncryptionKeyAlias", ex);<NEW_LINE>}<NEW_LINE>}
SecretKey aesEncryptionKey = generator.generateKey();
385,224
public static MoPenQueryCanvasResponse unmarshall(MoPenQueryCanvasResponse moPenQueryCanvasResponse, UnmarshallerContext context) {<NEW_LINE>moPenQueryCanvasResponse.setRequestId<MASK><NEW_LINE>moPenQueryCanvasResponse.setCode(context.stringValue("MoPenQueryCanvasResponse.Code"));<NEW_LINE>moPenQueryCanvasResponse.setMessage(context.stringValue("MoPenQueryCanvasResponse.Message"));<NEW_LINE>moPenQueryCanvasResponse.setSuccess(context.booleanValue("MoPenQueryCanvasResponse.Success"));<NEW_LINE>moPenQueryCanvasResponse.setDescription(context.stringValue("MoPenQueryCanvasResponse.Description"));<NEW_LINE>Data data = new Data();<NEW_LINE>List<Canvas> canvasList = new ArrayList<Canvas>();<NEW_LINE>for (int i = 0; i < context.lengthValue("MoPenQueryCanvasResponse.Data.CanvasList.Length"); i++) {<NEW_LINE>Canvas canvas = new Canvas();<NEW_LINE>canvas.setId(context.longValue("MoPenQueryCanvasResponse.Data.CanvasList[" + i + "].Id"));<NEW_LINE>canvas.setDeviceName(context.stringValue("MoPenQueryCanvasResponse.Data.CanvasList[" + i + "].DeviceName"));<NEW_LINE>canvas.setUrl(context.stringValue("MoPenQueryCanvasResponse.Data.CanvasList[" + i + "].Url"));<NEW_LINE>canvas.setPageId(context.integerValue("MoPenQueryCanvasResponse.Data.CanvasList[" + i + "].PageId"));<NEW_LINE>canvas.setSessionId(context.stringValue("MoPenQueryCanvasResponse.Data.CanvasList[" + i + "].SessionId"));<NEW_LINE>canvas.setCreateTime(context.stringValue("MoPenQueryCanvasResponse.Data.CanvasList[" + i + "].CreateTime"));<NEW_LINE>canvas.setLastModified(context.stringValue("MoPenQueryCanvasResponse.Data.CanvasList[" + i + "].LastModified"));<NEW_LINE>canvas.setStatus(context.integerValue("MoPenQueryCanvasResponse.Data.CanvasList[" + i + "].Status"));<NEW_LINE>canvas.setAttribute(context.stringValue("MoPenQueryCanvasResponse.Data.CanvasList[" + i + "].Attribute"));<NEW_LINE>canvasList.add(canvas);<NEW_LINE>}<NEW_LINE>data.setCanvasList(canvasList);<NEW_LINE>moPenQueryCanvasResponse.setData(data);<NEW_LINE>return moPenQueryCanvasResponse;<NEW_LINE>}
(context.stringValue("MoPenQueryCanvasResponse.RequestId"));
1,063,628
public List<? extends CodeGenerator> create(Lookup context) {<NEW_LINE>ArrayList<CodeGenerator> ret = new ArrayList<CodeGenerator>();<NEW_LINE>JTextComponent component = context.lookup(JTextComponent.class);<NEW_LINE>CompilationController controller = context.lookup(CompilationController.class);<NEW_LINE>TreePath path = context.lookup(TreePath.class);<NEW_LINE>path = path != null ? SendEmailCodeGenerator.getPathElementOfKind(TreeUtilities.CLASS_TREE_KINDS, path) : null;<NEW_LINE>if (component == null || controller == null || path == null)<NEW_LINE>return ret;<NEW_LINE>try {<NEW_LINE>controller.toPhase(JavaSource.Phase.ELEMENTS_RESOLVED);<NEW_LINE>} catch (IOException ioe) {<NEW_LINE>return ret;<NEW_LINE>}<NEW_LINE>TypeElement typeElement = (TypeElement) controller.<MASK><NEW_LINE>if (typeElement != null && typeElement.getKind().isClass()) {<NEW_LINE>if (!isEnable(strategy, controller.getFileObject(), typeElement)) {<NEW_LINE>return ret;<NEW_LINE>}<NEW_LINE>ret.add(new AddMethodActions(strategy, controller.getFileObject(), typeElement));<NEW_LINE>}<NEW_LINE>return ret;<NEW_LINE>}
getTrees().getElement(path);
1,299,103
public StreamingHttpServiceFilter create(final StreamingHttpService service) {<NEW_LINE>return new StreamingHttpServiceFilter(service) {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public Single<StreamingHttpResponse> handle(final HttpServiceContext ctx, final StreamingHttpRequest request, final StreamingHttpResponseFactory responseFactory) {<NEW_LINE>return Single.defer(() -> {<NEW_LINE>BufferAllocator allocator = ctx.executionContext().bufferAllocator();<NEW_LINE>try {<NEW_LINE>ContentCodec coding = identifyContentEncodingOrNullIfIdentity(request.headers(), requestCodings);<NEW_LINE>if (coding != null) {<NEW_LINE>request.transformPayloadBody(bufferPublisher -> coding.decode(bufferPublisher, allocator));<NEW_LINE>}<NEW_LINE>return super.handle(ctx, request, responseFactory).map(response -> {<NEW_LINE>encodePayloadContentIfAvailable(request.headers(), request.method(), responseCodings, response, allocator);<NEW_LINE>return response;<NEW_LINE>}).shareContextOnSubscribe();<NEW_LINE>} catch (UnsupportedContentEncodingException cause) {<NEW_LINE>LOGGER.error(<MASK><NEW_LINE>// see https://tools.ietf.org/html/rfc7231#section-3.1.2.2<NEW_LINE>return succeeded(responseFactory.unsupportedMediaType()).shareContextOnSubscribe();<NEW_LINE>}<NEW_LINE>});<NEW_LINE>}<NEW_LINE>};<NEW_LINE>}
"Request failed for service={}, connection={}", service, this, cause);
1,597,954
public void paintComponent(Graphics g) {<NEW_LINE>if (!paintAnimation) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>int width = getWidth();<NEW_LINE>int height = getHeight();<NEW_LINE>double maxY = 0.0;<NEW_LINE>Graphics2D g2 = (Graphics2D) g;<NEW_LINE>g2.setRenderingHints(hints);<NEW_LINE>g2.setColor(new Color(255, 255, 255, (int) (alphaLevel * shield)));<NEW_LINE>g2.fillRect(0, 0, width, height);<NEW_LINE>double textPosition = 0.0;<NEW_LINE>for (Area element : ticker) {<NEW_LINE><MASK><NEW_LINE>if (bounds.getMaxY() > textPosition) {<NEW_LINE>textPosition = bounds.getMaxY();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>int channel = 0;<NEW_LINE>int blue = 255;<NEW_LINE>Color textColor = Color.BLACK;<NEW_LINE>for (int i = 0; i < ticker.length; i++) {<NEW_LINE>channel = 264 - 128 / (i + 1);<NEW_LINE>blue = channel + 126 > 255 ? 255 : channel + 126;<NEW_LINE>Color color = new Color(channel, channel, blue, (int) (alphaLevel * shield));<NEW_LINE>if (i == 0) {<NEW_LINE>textColor = color;<NEW_LINE>}<NEW_LINE>g2.setColor(color);<NEW_LINE>g2.fill(ticker[i]);<NEW_LINE>Rectangle2D bounds = ticker[i].getBounds2D();<NEW_LINE>if (bounds.getMaxY() > maxY) {<NEW_LINE>maxY = bounds.getMaxY();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>paintText(g2, textColor, textPosition);<NEW_LINE>}
Rectangle2D bounds = element.getBounds2D();
971,044
public ListGatewayGroupsResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>ListGatewayGroupsResult listGatewayGroupsResult = new ListGatewayGroupsResult();<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 listGatewayGroupsResult;<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("GatewayGroups", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>listGatewayGroupsResult.setGatewayGroups(new ListUnmarshaller<GatewayGroupSummary>(GatewayGroupSummaryJsonUnmarshaller.getInstance()).unmarshall(context));<NEW_LINE>}<NEW_LINE>if (context.testExpression("NextToken", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>listGatewayGroupsResult.setNextToken(context.getUnmarshaller(String.<MASK><NEW_LINE>}<NEW_LINE>} else if (token == END_ARRAY || token == END_OBJECT) {<NEW_LINE>if (context.getLastParsedParentElement() == null || context.getLastParsedParentElement().equals(currentParentElement)) {<NEW_LINE>if (context.getCurrentDepth() <= originalDepth)<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>token = context.nextToken();<NEW_LINE>}<NEW_LINE>return listGatewayGroupsResult;<NEW_LINE>}
class).unmarshall(context));
103,386
protected boolean treatMessage(NetworkEnvelope networkEnvelope, Connection connection) {<NEW_LINE>checkNotNull(connection.getPeersNodeAddressProperty(), "although the property is nullable, we need it to not be null");<NEW_LINE>if (networkEnvelope instanceof GetDataResponse) {<NEW_LINE>Statistics result = new MyStatistics();<NEW_LINE>GetDataResponse dataResponse = (GetDataResponse) networkEnvelope;<NEW_LINE>final Set<ProtectedStorageEntry> dataSet = dataResponse.getDataSet();<NEW_LINE>dataSet.forEach(e -> {<NEW_LINE>final ProtectedStoragePayload protectedStoragePayload = e.getProtectedStoragePayload();<NEW_LINE>if (protectedStoragePayload == null) {<NEW_LINE>log.warn("StoragePayload was null: {}", networkEnvelope.toString());<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>result.log(protectedStoragePayload);<NEW_LINE>});<NEW_LINE>dataResponse.getPersistableNetworkPayloadSet().forEach(persistableNetworkPayload -> {<NEW_LINE>// memorize message hashes<NEW_LINE>// Byte[] bytes = new Byte[persistableNetworkPayload.getHash().length];<NEW_LINE>// Arrays.setAll(bytes, n -> persistableNetworkPayload.getHash()[n]);<NEW_LINE>// hashes.add(bytes);<NEW_LINE>hashes.add(persistableNetworkPayload.getHash());<NEW_LINE>});<NEW_LINE>bucketsPerHost.put(connection.getPeersNodeAddressProperty().getValue(), result);<NEW_LINE>return true;<NEW_LINE>} else if (networkEnvelope instanceof GetStateHashesResponse) {<NEW_LINE>daoData.putIfAbsent(connection.getPeersNodeAddressProperty().getValue(), new DaoStatistics());<NEW_LINE>daoData.get(connection.getPeersNodeAddressProperty().getValue<MASK><NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>return false;<NEW_LINE>}
()).log(networkEnvelope);
1,390,148
private void renameRequest(RequestContainer request) {<NEW_LINE>StringInputDialog inputDialog = new StringInputDialog();<NEW_LINE>inputDialog.showAndWait("Rename Request", "New Name", request.getName());<NEW_LINE>if (!inputDialog.isCancelled() && inputDialog.wasChanged()) {<NEW_LINE>String newName = inputDialog.getInput();<NEW_LINE>// request.setName(inputDialog.getInput());<NEW_LINE>// replace names in working copies:<NEW_LINE>activeWorkspace.getOpenRequests().stream().filter(r -> r.getId().equals(request.getId())).findAny().ifPresent(r -> r.setName(newName));<NEW_LINE>// replace names in collections:<NEW_LINE>activeWorkspace.getCollections().stream().flatMap(c -> c.getRequests().stream()).filter(r -> r.getId().equals(request.getId())).findAny().ifPresent(r <MASK><NEW_LINE>loadCollections(activeWorkspace);<NEW_LINE>workingAreaView.display(activeWorkspace.getActiveRequest(), activeWorkspace.getOpenRequests(), Optional.empty());<NEW_LINE>}<NEW_LINE>}
-> r.setName(newName));
212,680
public static void solve(int no_of_process, int[] burst_time) {<NEW_LINE>int[] wait_time = new int[no_of_process];<NEW_LINE>int[] turnaround_time = new int[no_of_process];<NEW_LINE>// wait time of 1st process is 0.<NEW_LINE>wait_time[0] = 0;<NEW_LINE>for (int i = 1; i < no_of_process; i++) {<NEW_LINE>wait_time[i] = wait_time[i - 1] + burst_time[i - 1];<NEW_LINE>}<NEW_LINE>for (int i = 0; i < no_of_process; i++) {<NEW_LINE>turnaround_time[i] = burst_time<MASK><NEW_LINE>}<NEW_LINE>for (int i = 0; i < no_of_process; i++) {<NEW_LINE>System.out.println("Process " + (i + 1) + " --> (B.T) : " + burst_time[i] + " (W.T.) : " + wait_time[i] + " (T.A.T) : " + turnaround_time[i]);<NEW_LINE>}<NEW_LINE>}
[i] + wait_time[i];
949,329
public void uploadFile(final AccountJid account, final UserJid user, final List<String> filePaths, final List<Uri> fileUris, String existMessageId, Context context) {<NEW_LINE>if (isUploading) {<NEW_LINE>progressSubscribe.onNext(new ProgressData(0, 0, "Uploading already started", false, null));<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>isUploading = true;<NEW_LINE>final Jid uploadServerUrl = uploadServers.get(account.getFullJid().asBareJid());<NEW_LINE>if (uploadServerUrl == null) {<NEW_LINE>progressSubscribe.onNext(new ProgressData(0, 0<MASK><NEW_LINE>isUploading = false;<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>Intent intent = new Intent(context, UploadService.class);<NEW_LINE>intent.putExtra(UploadService.KEY_RECEIVER, new UploadReceiver(new Handler()));<NEW_LINE>intent.putExtra(UploadService.KEY_ACCOUNT_JID, (Parcelable) account);<NEW_LINE>intent.putExtra(UploadService.KEY_USER_JID, user);<NEW_LINE>intent.putStringArrayListExtra(UploadService.KEY_FILE_PATHS, (ArrayList<String>) filePaths);<NEW_LINE>intent.putParcelableArrayListExtra(UploadService.KEY_FILE_URIS, (ArrayList<Uri>) fileUris);<NEW_LINE>intent.putExtra(UploadService.KEY_UPLOAD_SERVER_URL, (CharSequence) uploadServerUrl);<NEW_LINE>intent.putExtra(UploadService.KEY_MESSAGE_ID, existMessageId);<NEW_LINE>context.startService(intent);<NEW_LINE>}
, "Upload server not found", false, null));
69,325
private /* static */<NEW_LINE>boolean isPushForType(AbstractInsnNode insn, Type type) {<NEW_LINE>int opcode = insn.getOpcode();<NEW_LINE>if (opcode == type.getOpcode(Opcodes.ILOAD)) {<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>// b/62060793: AsyncAwait rewrites bytecode to convert java methods into state machine with<NEW_LINE>// support of lambdas. Constant zero values are pushed on stack for all yet uninitialized<NEW_LINE>// local variables. And SIPUSH instruction is used to advance an internal state of a state<NEW_LINE>// machine.<NEW_LINE>switch(type.getSort()) {<NEW_LINE>case Type.BOOLEAN:<NEW_LINE>return opcode == Opcodes.ICONST_0 || opcode == Opcodes.ICONST_1;<NEW_LINE>case Type.BYTE:<NEW_LINE>case Type.CHAR:<NEW_LINE>case Type.SHORT:<NEW_LINE>case Type.INT:<NEW_LINE>return opcode == Opcodes.SIPUSH || opcode == Opcodes.ICONST_0 || opcode == Opcodes.ICONST_1 || opcode == Opcodes.ICONST_2 || opcode == Opcodes.ICONST_3 || opcode == Opcodes.ICONST_4 || opcode == Opcodes.ICONST_5 || opcode == Opcodes.ICONST_M1;<NEW_LINE>case Type.LONG:<NEW_LINE>return opcode == Opcodes.LCONST_0 || opcode == Opcodes.LCONST_1;<NEW_LINE>case Type.FLOAT:<NEW_LINE>return opcode == Opcodes.FCONST_0 || opcode == Opcodes<MASK><NEW_LINE>case Type.DOUBLE:<NEW_LINE>return opcode == Opcodes.DCONST_0 || opcode == Opcodes.DCONST_1;<NEW_LINE>case Type.OBJECT:<NEW_LINE>case Type.ARRAY:<NEW_LINE>return opcode == Opcodes.ACONST_NULL;<NEW_LINE>default:<NEW_LINE>// Support for BIPUSH and LDC* opcodes is not implemented as there is no known use case.<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>}
.FCONST_1 || opcode == Opcodes.FCONST_2;
1,434,184
public void authenticate(RoutingContext context, Handler<AsyncResult<User>> handler) {<NEW_LINE>parseAuthorization(context, parseAuthorization -> {<NEW_LINE>if (parseAuthorization.failed()) {<NEW_LINE>handler.handle(Future.failedFuture(parseAuthorization.cause()));<NEW_LINE>return;<NEW_LINE>}<NEW_LINE><MASK><NEW_LINE>int segments = 0;<NEW_LINE>for (int i = 0; i < token.length(); i++) {<NEW_LINE>char c = token.charAt(i);<NEW_LINE>if (c == '.') {<NEW_LINE>if (++segments == 3) {<NEW_LINE>handler.handle(Future.failedFuture(new HttpException(400, "Too many segments in token")));<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>if (Character.isLetterOrDigit(c) || c == '-' || c == '_') {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>// invalid character<NEW_LINE>handler.handle(Future.failedFuture(new HttpException(400, "Invalid character in token: " + (int) c)));<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>authProvider.authenticate(new TokenCredentials(token), authn -> {<NEW_LINE>if (authn.failed()) {<NEW_LINE>handler.handle(Future.failedFuture(new HttpException(401, authn.cause())));<NEW_LINE>} else {<NEW_LINE>handler.handle(authn);<NEW_LINE>}<NEW_LINE>});<NEW_LINE>});<NEW_LINE>}
String token = parseAuthorization.result();
1,087,139
private void scheduleSyncJobs() throws IOException {<NEW_LINE>int jobsScheduled = 0;<NEW_LINE>final <MASK><NEW_LINE>final List<StandardSync> activeConnections = getAllActiveConnections();<NEW_LINE>final var queryEnd = System.currentTimeMillis();<NEW_LINE>LOGGER.debug("Total active connections: {}", activeConnections.size());<NEW_LINE>LOGGER.debug("Time to retrieve all connections: {} ms", queryEnd - start);<NEW_LINE>for (final StandardSync connection : activeConnections) {<NEW_LINE>final Optional<Job> previousJobOptional = jobPersistence.getLastReplicationJob(connection.getConnectionId());<NEW_LINE>if (scheduleJobPredicate.test(previousJobOptional, connection)) {<NEW_LINE>jobFactory.create(connection.getConnectionId());<NEW_LINE>jobsScheduled++;<NEW_LINE>SchedulerApp.PENDING_JOBS.getAndIncrement();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>final var end = System.currentTimeMillis();<NEW_LINE>LOGGER.debug("Time taken to schedule jobs: {} ms", end - start);<NEW_LINE>if (jobsScheduled > 0) {<NEW_LINE>LOGGER.info("Job-Scheduler Summary. Active connections: {}, Jobs scheduled this cycle: {}", activeConnections.size(), jobsScheduled);<NEW_LINE>}<NEW_LINE>}
var start = System.currentTimeMillis();
284,916
final DisassociateTrunkInterfaceResult executeDisassociateTrunkInterface(DisassociateTrunkInterfaceRequest disassociateTrunkInterfaceRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(disassociateTrunkInterfaceRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<DisassociateTrunkInterfaceRequest> request = null;<NEW_LINE>Response<DisassociateTrunkInterfaceResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new DisassociateTrunkInterfaceRequestMarshaller().marshall<MASK><NEW_LINE>// Binds the request metrics to the current request.<NEW_LINE>request.setAWSRequestMetrics(awsRequestMetrics);<NEW_LINE>request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);<NEW_LINE>request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SERVICE_ID, "EC2");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DisassociateTrunkInterface");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>StaxResponseHandler<DisassociateTrunkInterfaceResult> responseHandler = new StaxResponseHandler<DisassociateTrunkInterfaceResult>(new DisassociateTrunkInterfaceResultStaxUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
(super.beforeMarshalling(disassociateTrunkInterfaceRequest));
932,142
public boolean loadBPartner(int C_BPartner_ID) {<NEW_LINE>log.config("C_BPartner_ID=" + C_BPartner_ID);<NEW_LINE>// New bpartner<NEW_LINE>if (C_BPartner_ID == 0) {<NEW_LINE>m_partner = null;<NEW_LINE>m_pLocation = null;<NEW_LINE>m_user = null;<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>m_partner = new MBPartner(Env.getCtx(), C_BPartner_ID, null);<NEW_LINE>if (m_partner.get_ID() == 0) {<NEW_LINE>ADialog.error(m_WindowNo, this, "BPartnerNotFound");<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>// BPartner - Load values<NEW_LINE>fValue.setText(m_partner.getValue());<NEW_LINE>fGreetingBP.setSelectedItem(getGreeting(m_partner.getC_Greeting_ID()));<NEW_LINE>fName.setText(m_partner.getName());<NEW_LINE>fName2.setText(m_partner.getName2());<NEW_LINE>fTaxId.<MASK><NEW_LINE>fBPGroup.setSelectedItem(getBPGroup(m_partner.getC_BP_Group_ID()));<NEW_LINE>// Contact - Load values<NEW_LINE>m_pLocation = m_partner.getLocation(Env.getContextAsInt(Env.getCtx(), m_WindowNo, "C_BPartner_Location_ID"));<NEW_LINE>if (m_pLocation != null) {<NEW_LINE>int location = m_pLocation.getC_Location_ID();<NEW_LINE>fAddress.setValue(new Integer(location));<NEW_LINE>//<NEW_LINE>fPhone.setText(m_pLocation.getPhone());<NEW_LINE>fPhone2.setText(m_pLocation.getPhone2());<NEW_LINE>fFax.setText(m_pLocation.getFax());<NEW_LINE>}<NEW_LINE>// User - Load values<NEW_LINE>m_user = m_partner.getContact(Env.getContextAsInt(Env.getCtx(), m_WindowNo, "AD_User_ID"));<NEW_LINE>if (m_user != null) {<NEW_LINE>fGreetingC.setSelectedItem(getGreeting(m_user.getC_Greeting_ID()));<NEW_LINE>fContact.setText(m_user.getName());<NEW_LINE>fTitle.setText(m_user.getTitle());<NEW_LINE>fEMail.setText(m_user.getEMail());<NEW_LINE>//<NEW_LINE>fPhone.setText(m_user.getPhone());<NEW_LINE>fPhone2.setText(m_user.getPhone2());<NEW_LINE>fFax.setText(m_user.getFax());<NEW_LINE>}<NEW_LINE>return true;<NEW_LINE>}
setText(m_partner.getTaxID());
289,137
final TagResourceResult executeTagResource(TagResourceRequest tagResourceRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(tagResourceRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE><MASK><NEW_LINE>Request<TagResourceRequest> request = null;<NEW_LINE>Response<TagResourceResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new TagResourceRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(tagResourceRequest));<NEW_LINE>// Binds the request metrics to the current request.<NEW_LINE>request.setAWSRequestMetrics(awsRequestMetrics);<NEW_LINE>request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);<NEW_LINE>request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SERVICE_ID, "Cognito Identity Provider");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "TagResource");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<TagResourceResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new TagResourceResultJsonUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
599,325
public void corruptedParNewBody(GCLogTrace trace, String line) {<NEW_LINE>ParNewPromotionFailed parNewPromotionFailed = new ParNewPromotionFailed(scavengeTimeStamp, GCCause.PROMOTION_FAILED, trace.getPauseTime() - trace.getDoubleGroup(16));<NEW_LINE>MemoryPoolSummary heap = getTotalOccupancyBeforeAfterWithTotalHeapPoolSizeSummary(trace, 17);<NEW_LINE>MemoryPoolSummary tenured = trace.getOccupancyBeforeAfterWithMemoryPoolSizeSummary(10);<NEW_LINE>MemoryPoolSummary young = trace.getOccupancyBeforeAfterWithMemoryPoolSizeSummary(1);<NEW_LINE>MemoryPoolSummary parNewHeap = new MemoryPoolSummary(heap.getOccupancyBeforeCollection(), heap.getSizeAfterCollection(), heap.getOccupancyBeforeCollection(), heap.getSizeAfterCollection());<NEW_LINE>parNewPromotionFailed.add(young, parNewHeap.minus(young), parNewHeap);<NEW_LINE>ConcurrentModeFailure concurrentModeFailure = new ConcurrentModeFailure(scavengeTimeStamp.add(trace.getDoubleGroup(9) - scavengeTimeStamp.getTimeStamp()), GCCause.LAST_GC_CAUSE<MASK><NEW_LINE>concurrentModeFailure.add(heap.minus(tenured), tenured, heap);<NEW_LINE>concurrentModeFailure.addPermOrMetaSpaceRecord(extractPermOrMetaspaceRecord(line));<NEW_LINE>concurrentModeFailure.add(extractCPUSummary(line));<NEW_LINE>record(parNewPromotionFailed);<NEW_LINE>record(concurrentModeFailure);<NEW_LINE>}
, trace.getDoubleGroup(16));
444,557
private void detectAndUpgrade(long streamType) {<NEW_LINE>if (streamType == ControlStreamConnection.STREAM_TYPE) {<NEW_LINE>ControlParser parser = new ControlParser(listener);<NEW_LINE>ControlStreamConnection newConnection = new ControlStreamConnection(getEndPoint(), getExecutor(), byteBufferPool, parser);<NEW_LINE><MASK><NEW_LINE>newConnection.setUseInputDirectByteBuffers(isUseInputDirectByteBuffers());<NEW_LINE>if (LOG.isDebugEnabled())<NEW_LINE>LOG.debug("upgrading to {}", newConnection);<NEW_LINE>getEndPoint().upgrade(newConnection);<NEW_LINE>} else if (streamType == EncoderStreamConnection.STREAM_TYPE) {<NEW_LINE>EncoderStreamConnection newConnection = new EncoderStreamConnection(getEndPoint(), getExecutor(), byteBufferPool, decoder);<NEW_LINE>newConnection.setInputBufferSize(getInputBufferSize());<NEW_LINE>newConnection.setUseInputDirectByteBuffers(isUseInputDirectByteBuffers());<NEW_LINE>if (LOG.isDebugEnabled())<NEW_LINE>LOG.debug("upgrading to {}", newConnection);<NEW_LINE>getEndPoint().upgrade(newConnection);<NEW_LINE>} else if (streamType == DecoderStreamConnection.STREAM_TYPE) {<NEW_LINE>DecoderStreamConnection newConnection = new DecoderStreamConnection(getEndPoint(), getExecutor(), byteBufferPool, encoder);<NEW_LINE>newConnection.setInputBufferSize(getInputBufferSize());<NEW_LINE>newConnection.setUseInputDirectByteBuffers(isUseInputDirectByteBuffers());<NEW_LINE>if (LOG.isDebugEnabled())<NEW_LINE>LOG.debug("upgrading to {}", newConnection);<NEW_LINE>getEndPoint().upgrade(newConnection);<NEW_LINE>} else {<NEW_LINE>if (StreamType.isReserved(streamType)) {<NEW_LINE>if (LOG.isDebugEnabled())<NEW_LINE>LOG.debug("reserved stream type {}, closing {}", Long.toHexString(streamType), this);<NEW_LINE>getEndPoint().close(HTTP3ErrorCode.randomReservedCode(), null);<NEW_LINE>} else {<NEW_LINE>if (LOG.isDebugEnabled())<NEW_LINE>LOG.debug("unsupported stream type {}, closing {}", Long.toHexString(streamType), this);<NEW_LINE>getEndPoint().close(HTTP3ErrorCode.STREAM_CREATION_ERROR.code(), null);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
newConnection.setInputBufferSize(getInputBufferSize());
237,315
protected Home resolveExHome() {<NEW_LINE>String exHomeFromEnv = System.getenv("NGRINDER_EX_HOME");<NEW_LINE>String exHomeFromProperty = System.getProperty("ngrinder.ex_home");<NEW_LINE>if (!StringUtils.equals(exHomeFromEnv, exHomeFromProperty)) {<NEW_LINE>CoreLogger.LOGGER.warn("The path to ngrinder ex home is ambiguous:");<NEW_LINE>CoreLogger.LOGGER.warn(" System Environment: NGRINDER_EX_HOME=" + exHomeFromEnv);<NEW_LINE>CoreLogger.LOGGER.warn(" Java System Property: ngrinder.ex_home=" + exHomeFromProperty);<NEW_LINE>CoreLogger.LOGGER.<MASK><NEW_LINE>}<NEW_LINE>String userHome = StringUtils.defaultIfEmpty(exHomeFromProperty, exHomeFromEnv);<NEW_LINE>if (isEmpty(userHome)) {<NEW_LINE>userHome = System.getProperty("user.home") + File.separator + NGRINDER_EX_FOLDER;<NEW_LINE>} else if (StringUtils.startsWith(userHome, "~" + File.separator)) {<NEW_LINE>userHome = System.getProperty("user.home") + File.separator + userHome.substring(2);<NEW_LINE>} else if (StringUtils.startsWith(userHome, "." + File.separator)) {<NEW_LINE>userHome = System.getProperty("user.dir") + File.separator + userHome.substring(2);<NEW_LINE>}<NEW_LINE>userHome = FilenameUtils.normalize(userHome);<NEW_LINE>File exHomeDirectory = new File(userHome);<NEW_LINE>CoreLogger.LOGGER.info("nGrinder ex home directory:{}.", exHomeDirectory);<NEW_LINE>try {<NEW_LINE>// noinspection ResultOfMethodCallIgnored<NEW_LINE>exHomeDirectory.mkdirs();<NEW_LINE>} catch (Exception e) {<NEW_LINE>// If it's not possible.. do it... without real directory.<NEW_LINE>noOp();<NEW_LINE>}<NEW_LINE>return new Home(exHomeDirectory, false);<NEW_LINE>}
warn(" '" + exHomeFromProperty + "' is accepted.");
723,514
public RBMBackedTimestampSet deserialise(final byte[] allBytes, final int offset, final int length) throws SerialisationException {<NEW_LINE>if (allBytes.length == 0 || length == 0) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>final int bucketInt = (int) CompactRawSerialisationUtils.readLong(allBytes, offset);<NEW_LINE>final int numBytesForInt = CompactRawSerialisationUtils.decodeVIntSize(allBytes[offset]);<NEW_LINE>final TimeBucket bucket = TimeBucket.values()[bucketInt];<NEW_LINE>final RBMBackedTimestampSet rbmBackedTimestampSet = new RBMBackedTimestampSet(bucket);<NEW_LINE>final RoaringBitmap rbm = new RoaringBitmap();<NEW_LINE>try {<NEW_LINE>// Deal with different versions of RoaringBitmap<NEW_LINE>final byte[] convertedBytes = RoaringBitmapUtils.upConvertSerialisedForm(allBytes, <MASK><NEW_LINE>final ByteArrayInputStream baisConvertedBytes = new ByteArrayInputStream(convertedBytes);<NEW_LINE>final DataInputStream disConvertedBytes = new DataInputStream(baisConvertedBytes);<NEW_LINE>rbm.deserialize(disConvertedBytes);<NEW_LINE>} catch (final IOException e) {<NEW_LINE>throw new SerialisationException("IOException deserialising RoaringBitmap from byte array", e);<NEW_LINE>}<NEW_LINE>rbmBackedTimestampSet.setRbm(rbm);<NEW_LINE>return rbmBackedTimestampSet;<NEW_LINE>}
offset + numBytesForInt, length - numBytesForInt);
478,814
final BatchDisassociateResourcesFromCustomLineItemResult executeBatchDisassociateResourcesFromCustomLineItem(BatchDisassociateResourcesFromCustomLineItemRequest batchDisassociateResourcesFromCustomLineItemRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(batchDisassociateResourcesFromCustomLineItemRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<BatchDisassociateResourcesFromCustomLineItemRequest> request = null;<NEW_LINE>Response<BatchDisassociateResourcesFromCustomLineItemResult> response = null;<NEW_LINE>try {<NEW_LINE><MASK><NEW_LINE>try {<NEW_LINE>request = new BatchDisassociateResourcesFromCustomLineItemRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(batchDisassociateResourcesFromCustomLineItemRequest));<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, "billingconductor");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "BatchDisassociateResourcesFromCustomLineItem");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<BatchDisassociateResourcesFromCustomLineItemResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new BatchDisassociateResourcesFromCustomLineItemResultJsonUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
622,721
int scrollBy(int delta, RecyclerView.Recycler recycler, RecyclerView.State state) {<NEW_LINE>if (getChildCount() == 0 || delta == 0) {<NEW_LINE>return 0;<NEW_LINE>}<NEW_LINE>ensureLayoutState();<NEW_LINE>mLayoutState.mRecycle = true;<NEW_LINE>final int layoutDirection = delta > 0 ? LayoutState.LAYOUT_END : LayoutState.LAYOUT_START;<NEW_LINE>final int absDelta = Math.abs(delta);<NEW_LINE>updateLayoutState(layoutDirection, absDelta, true, state);<NEW_LINE>final int consumed = mLayoutState.mScrollingOffset + fill(recycler, mLayoutState, state, false);<NEW_LINE>if (consumed < 0) {<NEW_LINE>if (DEBUG) {<NEW_LINE>Log.d(TAG, "Don't have any more elements to scroll");<NEW_LINE>}<NEW_LINE>return 0;<NEW_LINE>}<NEW_LINE>final int scrolled = absDelta <MASK><NEW_LINE>mOrientationHelper.offsetChildren(-scrolled);<NEW_LINE>mLayoutState.mLastScrollDelta = scrolled;<NEW_LINE>return scrolled;<NEW_LINE>}
> consumed ? layoutDirection * consumed : delta;
1,066,609
public void onClick() {<NEW_LINE>EditText uriInput = findViewById(R.id.uriInput);<NEW_LINE>String uri = uriInput.getText().toString();<NEW_LINE>EditText requestInput = findViewById(R.id.requestInput);<NEW_LINE>byte[] requestBody = requestInput.getText().toString().getBytes(UTF_8);<NEW_LINE>Request request = Request.newBuilder().setBody(ByteString.copyFrom(requestBody)).build();<NEW_LINE>TextView resultTextView = findViewById(R.id.resultTextView);<NEW_LINE>try {<NEW_LINE>// Create a gRPC channel.<NEW_LINE>URL parsedUrl = new URL(uri);<NEW_LINE>ManagedChannelBuilder builder = ManagedChannelBuilder.forAddress(parsedUrl.getHost(), parsedUrl.getPort()).usePlaintext();<NEW_LINE>builder = AttestationClient.addApiKey(builder, getString(R.string.api_key));<NEW_LINE>ManagedChannel channel = builder.build();<NEW_LINE>// Attest a gRPC channel.<NEW_LINE>AttestationClient client = new AttestationClient();<NEW_LINE>client.attest(channel, (config) -> !config.getMlInference());<NEW_LINE>// Send a request.<NEW_LINE>Response response = client.send(request);<NEW_LINE>// Receive a response.<NEW_LINE>StatusCode responseStatus = response.getStatus();<NEW_LINE>if (responseStatus != StatusCode.SUCCESS) {<NEW_LINE>throw new VerifyException(String.format("Couldn't receive response: %s", responseStatus.name()));<NEW_LINE>}<NEW_LINE>ByteString responseBody = response.getBody().substring(0, (int) response.getLength());<NEW_LINE>String decodedResponse = responseBody.toStringUtf8();<NEW_LINE>Log.v("Oak", "Received response: " + decodedResponse);<NEW_LINE>resultTextView.setTextColor(Color.GREEN);<NEW_LINE>resultTextView.setText(decodedResponse);<NEW_LINE>} catch (Exception e) {<NEW_LINE>if (e instanceof InterruptedException) {<NEW_LINE>// Restore interrupted status.<NEW_LINE>Thread<MASK><NEW_LINE>}<NEW_LINE>Log.v("Oak", "Error: " + e);<NEW_LINE>resultTextView.setTextColor(Color.RED);<NEW_LINE>resultTextView.setText(e.toString());<NEW_LINE>}<NEW_LINE>}
.currentThread().interrupt();
1,770,007
public static int aiGetMaterialFloatArray(@NativeType("struct aiMaterial const *") AIMaterial pMat, @NativeType("char const *") CharSequence pKey, @NativeType("unsigned int") int type, @NativeType("unsigned int") int index, @NativeType("float *") float[] pOut, @Nullable @NativeType("unsigned int *") int[] pMax) {<NEW_LINE>long __functionAddress = Functions.GetMaterialFloatArray;<NEW_LINE>if (CHECKS) {<NEW_LINE>checkSafe(pMax, 1);<NEW_LINE>if (pMax != null) {<NEW_LINE>check(pOut, pMax[0]);<NEW_LINE>}<NEW_LINE>AIMaterial.validate(pMat.address());<NEW_LINE>}<NEW_LINE>MemoryStack stack = stackGet();<NEW_LINE>int stackPointer = stack.getPointer();<NEW_LINE>try {<NEW_LINE>stack.nASCII(pKey, true);<NEW_LINE>long pKeyEncoded = stack.getPointerAddress();<NEW_LINE>return invokePPPPI(pMat.address(), pKeyEncoded, type, <MASK><NEW_LINE>} finally {<NEW_LINE>stack.setPointer(stackPointer);<NEW_LINE>}<NEW_LINE>}
index, pOut, pMax, __functionAddress);
490,166
public String addMapping(String context, String className, String reference, String newReference) {<NEW_LINE>if (this.readOnly || reference == null || newReference == null) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>String conformedReference = <MASK><NEW_LINE>if (conformedReference.equals(newReference)) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>Map<String, Map<String, String>> mappings = this.mappings;<NEW_LINE>if (context != null) {<NEW_LINE>mappings = this.data.get(context);<NEW_LINE>if (mappings == null) {<NEW_LINE>mappings = Maps.newHashMap();<NEW_LINE>this.data.put(context, mappings);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>Map<String, String> classMappings = mappings.get(className);<NEW_LINE>if (classMappings == null) {<NEW_LINE>classMappings = new HashMap<String, String>();<NEW_LINE>mappings.put(className, classMappings);<NEW_LINE>}<NEW_LINE>return classMappings.put(conformedReference, newReference);<NEW_LINE>}
reference.replaceAll("\\s", "");
1,230,993
private void migrateAccountsToDefaultRoles(final Connection conn) {<NEW_LINE>try (final PreparedStatement selectStatement = conn.prepareStatement("SELECT `id`, `type` FROM `cloud`.`account`;");<NEW_LINE>final ResultSet selectResultSet = selectStatement.executeQuery()) {<NEW_LINE>while (selectResultSet.next()) {<NEW_LINE>final Long accountId = selectResultSet.getLong(1);<NEW_LINE>final Integer accountType = selectResultSet.getInt(2);<NEW_LINE>final Long roleId = RoleType.getByAccountType(Account.Type.getFromValue(accountType)).getId();<NEW_LINE>if (roleId < 1L || roleId > 4L) {<NEW_LINE>s_logger.warn("Skipping role ID migration due to invalid role_id resolved for account id=" + accountId);<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>try (final PreparedStatement updateStatement = conn.prepareStatement("UPDATE `cloud`.`account` SET account.role_id = ? WHERE account.id = ? ;")) {<NEW_LINE><MASK><NEW_LINE>updateStatement.setLong(2, accountId);<NEW_LINE>updateStatement.executeUpdate();<NEW_LINE>} catch (SQLException e) {<NEW_LINE>s_logger.error("Failed to update cloud.account role_id for account id:" + accountId + " with exception: " + e.getMessage());<NEW_LINE>throw new CloudRuntimeException("Exception while updating cloud.account role_id", e);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} catch (SQLException e) {<NEW_LINE>throw new CloudRuntimeException("Exception while migrating existing account table's role_id column to a role based on account type", e);<NEW_LINE>}<NEW_LINE>s_logger.debug("Done migrating existing accounts to use one of default roles based on account type");<NEW_LINE>}
updateStatement.setLong(1, roleId);
1,789,091
private void loadCreditMemo() {<NEW_LINE>creditMemoPanel = new CPanel(layout);<NEW_LINE>// Add label credit note<NEW_LINE>labelCreditMemo = new CLabel(Msg.translate(Env.getCtx(), "CreditMemo") + ":");<NEW_LINE>labelCreditMemo.setPreferredSize(new Dimension(FIELD_WIDTH, FIELD_HEIGHT));<NEW_LINE>// For Credit Memo<NEW_LINE>MLookup cardNotelookup = getCreditMemoLockup(parentCollect.getC_BPartner_ID());<NEW_LINE>fieldCreditMemo = new VLookup("CreditMemo", false, false, true, cardNotelookup);<NEW_LINE>// For Credit Memo Type<NEW_LINE>// ((VComboBox)fieldCreditMemo.getCombo()).setRenderer(new POSLookupListCellRenderer(font));<NEW_LINE>fieldCreditMemo.setPreferredSize(new Dimension(FIELD_WIDTH, FIELD_HEIGHT));<NEW_LINE>// ((VComboBox)fieldCreditMemo.getCombo()).setFont(font);<NEW_LINE>fieldCreditMemo.addVetoableChangeListener(this);<NEW_LINE>// Add to Panel<NEW_LINE>creditMemoPanel.add(labelCreditMemo, new GridBagConstraints(0, 0, 1, 1, 0.0, 0.0, GridBagConstraints.EAST, GridBagConstraints.NORTH, new Insets(2, 0, 2, <MASK><NEW_LINE>creditMemoPanel.add(fieldCreditMemo, new GridBagConstraints(1, 0, 1, 1, 0.0, 0.0, GridBagConstraints.EAST, GridBagConstraints.NORTH, new Insets(2, 0, 2, 2), 0, 0));<NEW_LINE>// Default visible false<NEW_LINE>creditMemoPanel.setVisible(false);<NEW_LINE>}
2), 0, 0));
610,097
public void marshall(ExportAssetToSignedUrlResponseDetails exportAssetToSignedUrlResponseDetails, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (exportAssetToSignedUrlResponseDetails == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(exportAssetToSignedUrlResponseDetails.getAssetId(), ASSETID_BINDING);<NEW_LINE>protocolMarshaller.marshall(<MASK><NEW_LINE>protocolMarshaller.marshall(exportAssetToSignedUrlResponseDetails.getRevisionId(), REVISIONID_BINDING);<NEW_LINE>protocolMarshaller.marshall(exportAssetToSignedUrlResponseDetails.getSignedUrl(), SIGNEDURL_BINDING);<NEW_LINE>protocolMarshaller.marshall(exportAssetToSignedUrlResponseDetails.getSignedUrlExpiresAt(), SIGNEDURLEXPIRESAT_BINDING);<NEW_LINE>} catch (Exception e) {<NEW_LINE>throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e);<NEW_LINE>}<NEW_LINE>}
exportAssetToSignedUrlResponseDetails.getDataSetId(), DATASETID_BINDING);
1,626,241
public void acceptAllChanges() {<NEW_LINE>Set<Object> visited = new HashSet<>();<NEW_LINE>Queue<Object> toVisit = new LinkedList<>(getStructuredSelection().toList());<NEW_LINE>// To avoid problems with currently opened TextMergeViewer close whatever was opened<NEW_LINE>fireOpen(new OpenEvent(this, StructuredSelection.EMPTY));<NEW_LINE>while (!toVisit.isEmpty()) {<NEW_LINE>Object o = toVisit.poll();<NEW_LINE>if (!visited.contains(o)) {<NEW_LINE>visited.add(o);<NEW_LINE>if (o instanceof MyDiffNode) {<NEW_LINE>MyDiffNode n = (MyDiffNode) o;<NEW_LINE>n.determineStateFromContent = false;<NEW_LINE>try {<NEW_LINE>IDiffElement[] children = n.getChildren();<NEW_LINE>if (children == null || children.length == 0) {<NEW_LINE>if (n.getRight() == null) {<NEW_LINE>// Add missing resource<NEW_LINE>copyOne(n, true);<NEW_LINE>n.setState(DiffNodeState.ALL);<NEW_LINE>} else if (!ITypedElement.FOLDER_TYPE.equals(n.getId().getType())) {<NEW_LINE>Shell shell = new Shell();<NEW_LINE>shell.setVisible(false);<NEW_LINE>// Content difference<NEW_LINE>TextMergeViewer contentViewer = (TextMergeViewer) CompareUI.findContentViewer(new NullViewer(shell), n, shell, getCompareConfiguration());<NEW_LINE>if (contentViewer != null) {<NEW_LINE>contentViewer.setInput(n);<NEW_LINE>try {<NEW_LINE>Method method = TextMergeViewer.class.getDeclaredMethod("copy", boolean.class);<NEW_LINE>method.setAccessible(true);<NEW_LINE>method.invoke(contentViewer, true);<NEW_LINE>contentViewer.flush(new NullProgressMonitor());<NEW_LINE><MASK><NEW_LINE>} catch (Exception e) {<NEW_LINE>Log.log(e);<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>Log.error("No Viewer created for " + n.getName());<NEW_LINE>}<NEW_LINE>shell.dispose();<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>toVisit.addAll(Arrays.asList(children));<NEW_LINE>}<NEW_LINE>} finally {<NEW_LINE>n.determineStateFromContent = true;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// Reopen the TextMergeViewer whatever matches the current selection<NEW_LINE>handleOpen(null);<NEW_LINE>}
n.setState(DiffNodeState.ALL);
1,104,576
private static DistinctTypeParsingData parse(String signature, int startIndex) {<NEW_LINE>int openBracketIndex = signature.indexOf("{", startIndex);<NEW_LINE>if (openBracketIndex == -1) {<NEW_LINE>throw new IllegalStateException(format("Cannot parse distinct type definition(%s), expected '{' after position %s", signature, startIndex));<NEW_LINE>}<NEW_LINE>QualifiedObjectName name = QualifiedObjectName.valueOf(signature.substring(startIndex, openBracketIndex));<NEW_LINE>int firstCommaIndex = signature.indexOf(", ", openBracketIndex);<NEW_LINE>if (firstCommaIndex == -1) {<NEW_LINE>throw new IllegalStateException(format("Cannot parse distinct type definition(%s), expected ',' after position %s", signature, openBracketIndex));<NEW_LINE>}<NEW_LINE>TypeSignature baseType = TypeSignature.parseTypeSignature(signature.substring(openBracketIndex + 1, firstCommaIndex));<NEW_LINE>int secondCommaIndex = signature.indexOf(", ", firstCommaIndex + 2);<NEW_LINE>if (secondCommaIndex == -1) {<NEW_LINE>throw new IllegalStateException(format("Cannot parse distinct type definition(%s), expected ',' after position %s", signature, secondCommaIndex));<NEW_LINE>}<NEW_LINE>boolean isOrderable = parseBoolean(signature.substring(firstCommaIndex + 2, secondCommaIndex));<NEW_LINE>int thirdCommaIndex = signature.indexOf(", [", secondCommaIndex + 2);<NEW_LINE>if (thirdCommaIndex == -1) {<NEW_LINE>throw new IllegalStateException(format("Cannot parse distinct type definition(%s), expected '[' after position %s", signature, secondCommaIndex));<NEW_LINE>}<NEW_LINE>Optional<QualifiedObjectName> topMostAncestor = parseParentName(signature.substring(secondCommaIndex + 2, thirdCommaIndex));<NEW_LINE>int endIndex = signature.indexOf("]}", thirdCommaIndex + 3);<NEW_LINE>int position = thirdCommaIndex + 3;<NEW_LINE>List<QualifiedObjectName> <MASK><NEW_LINE>while (position < endIndex) {<NEW_LINE>int nextPositionIndex = signature.indexOf(", ", position);<NEW_LINE>if (nextPositionIndex == -1 || nextPositionIndex > endIndex) {<NEW_LINE>nextPositionIndex = endIndex;<NEW_LINE>}<NEW_LINE>otherAncestors.add(parseParentName(signature.substring(position, nextPositionIndex)).get());<NEW_LINE>position = nextPositionIndex + 2;<NEW_LINE>}<NEW_LINE>return new DistinctTypeParsingData(endIndex + 1, new DistinctTypeInfo(name, baseType, topMostAncestor, otherAncestors, isOrderable));<NEW_LINE>}
otherAncestors = new ArrayList<>();
269,820
public Object call(ExecutionContext context, Object self, Object... args) {<NEW_LINE>if (!(self instanceof DynDate)) {<NEW_LINE>throw new ThrowException(context, context.createTypeError("setUTCHours(...) may only be used with Dates"));<NEW_LINE>}<NEW_LINE>DynDate dateObj = (DynDate) self;<NEW_LINE>long t = dateObj.getTimeValue();<NEW_LINE>Number h = Types.toNumber(context, args[0]);<NEW_LINE>Number m = null;<NEW_LINE>if (args[1] != Types.UNDEFINED) {<NEW_LINE>m = Types.toNumber(context, args[1]);<NEW_LINE>} else {<NEW_LINE>m = minFromTime(t);<NEW_LINE>}<NEW_LINE>Number s = null;<NEW_LINE>if (args[2] != Types.UNDEFINED) {<NEW_LINE>s = Types.toNumber(context, args[2]);<NEW_LINE>} else {<NEW_LINE>s = secFromTime(t);<NEW_LINE>}<NEW_LINE>Number millis = null;<NEW_LINE>if (args[3] != Types.UNDEFINED) {<NEW_LINE>millis = Types.toNumber(context, args[3]);<NEW_LINE>} else {<NEW_LINE>millis = msFromTime(t);<NEW_LINE>}<NEW_LINE>Number date = makeDate(context, day(t), makeTime(context, h, m, s, millis));<NEW_LINE>Number <MASK><NEW_LINE>dateObj.setPrimitiveValue(u);<NEW_LINE>return u;<NEW_LINE>}
u = timeClip(context, date);
330,595
private final Field<?> parseFieldJSONObjectConstructorIf() {<NEW_LINE>boolean jsonb = false;<NEW_LINE>if (parseFunctionNameIf("JSON_OBJECT", "JSON_BUILD_OBJECT") || (jsonb = parseFunctionNameIf("JSONB_BUILD_OBJECT"))) {<NEW_LINE>parse('(');<NEW_LINE>if (parseIf(')'))<NEW_LINE>return jsonb ? jsonbObject() : jsonObject();<NEW_LINE><MASK><NEW_LINE>JSONOnNull onNull = parseJSONNullTypeIf();<NEW_LINE>DataType<?> returning = parseJSONReturningIf();<NEW_LINE>if (onNull == null && returning == null) {<NEW_LINE>result = parseList(',', c -> parseJSONEntry());<NEW_LINE>onNull = parseJSONNullTypeIf();<NEW_LINE>returning = parseJSONReturningIf();<NEW_LINE>} else<NEW_LINE>result = new ArrayList<>();<NEW_LINE>parse(')');<NEW_LINE>JSONObjectNullStep<?> s1 = jsonb ? jsonbObject(result) : jsonObject(result);<NEW_LINE>JSONObjectReturningStep<?> s2 = onNull == NULL_ON_NULL ? s1.nullOnNull() : onNull == ABSENT_ON_NULL ? s1.absentOnNull() : s1;<NEW_LINE>return returning == null ? s2 : s2.returning(returning);<NEW_LINE>}<NEW_LINE>return null;<NEW_LINE>}
List<JSONEntry<?>> result;
238,841
public Column averageNumberMerge(Table table, Column[] columnsToMerge, String newColumnTitle) {<NEW_LINE>checkTableAndColumnsAreNumberOrNumberList(table, columnsToMerge);<NEW_LINE>AttributeColumnsController ac = Lookup.getDefault().lookup(AttributeColumnsController.class);<NEW_LINE>Column newColumn;<NEW_LINE>newColumn = // Create as BIGDECIMAL column by default. Then it can be duplicated to other type.<NEW_LINE>ac.// Create as BIGDECIMAL column by default. Then it can be duplicated to other type.<NEW_LINE>addAttributeColumn(// Create as BIGDECIMAL column by default. Then it can be duplicated to other type.<NEW_LINE>table, // Create as BIGDECIMAL column by default. Then it can be duplicated to other type.<NEW_LINE>newColumnTitle, BigDecimal.class);<NEW_LINE>if (newColumn == null) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>BigDecimal average;<NEW_LINE>for (Element row : ac.getTableAttributeRows(table)) {<NEW_LINE>average = StatisticsUtils.average(ac.getRowNumbers(row, columnsToMerge));<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>return newColumn;<NEW_LINE>}
row.setAttribute(newColumn, average);
160,121
private void worker() throws Exception {<NEW_LINE>NameRegContract nameRegContract = new NameRegContract();<NEW_LINE>if (!nameRegContract.isExist()) {<NEW_LINE>throw new RuntimeException("Namereg contract not exist on the blockchain");<NEW_LINE>}<NEW_LINE>String priceFeedAddress = Hex.toHexString(nameRegContract.addressOf("ether-camp/price-feed"));<NEW_LINE>logger.info("Got PriceFeed address from name registry: " + priceFeedAddress);<NEW_LINE>PriceFeedContract priceFeedContract = new PriceFeedContract(priceFeedAddress);<NEW_LINE>logger.info("Polling cryptocurrency exchange rates once a minute (prices are normally updated each 10 mins)...");<NEW_LINE>String[] tickers <MASK><NEW_LINE>while (true) {<NEW_LINE>if (priceFeedContract.isExist()) {<NEW_LINE>String s = priceFeedContract.updateTime() + ": ";<NEW_LINE>for (String ticker : tickers) {<NEW_LINE>s += ticker + " " + priceFeedContract.getPrice(ticker) + " (" + priceFeedContract.getTimestamp(ticker) + "), ";<NEW_LINE>}<NEW_LINE>logger.info(s);<NEW_LINE>} else {<NEW_LINE>logger.info("PriceFeed contract not exist. Likely it was not yet created until current block");<NEW_LINE>}<NEW_LINE>Thread.sleep(60 * 1000);<NEW_LINE>}<NEW_LINE>}
= { "BTC_ETH", "USDT_BTC", "USDT_ETH" };
416,159
private MultiPoint parseMultiPoint(StreamTokenizer stream) throws IOException, ParseException {<NEW_LINE>String token = nextEmptyOrOpen(stream);<NEW_LINE>if (token.equals(EMPTY)) {<NEW_LINE>return MultiPoint.EMPTY;<NEW_LINE>}<NEW_LINE>ArrayList<Double> lats = new ArrayList<>();<NEW_LINE>ArrayList<Double> lons = new ArrayList<>();<NEW_LINE>ArrayList<Double> alts = new ArrayList<>();<NEW_LINE>ArrayList<Point> points = new ArrayList<>();<NEW_LINE>parseCoordinates(<MASK><NEW_LINE>for (int i = 0; i < lats.size(); i++) {<NEW_LINE>if (alts.isEmpty()) {<NEW_LINE>points.add(new Point(lons.get(i), lats.get(i)));<NEW_LINE>} else {<NEW_LINE>points.add(new Point(lons.get(i), lats.get(i), alts.get(i)));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return new MultiPoint(Collections.unmodifiableList(points));<NEW_LINE>}
stream, lats, lons, alts);
1,684,280
public void newConnectionPointData(byte[] hash) {<NEW_LINE>boolean knownBlock = isKnownBlock(hash);<NEW_LINE>Optional<Long<MASK><NEW_LINE>if (cp.isPresent()) {<NEW_LINE>if (knownBlock) {<NEW_LINE>syncEventsHandler.startDownloadingSkeleton(cp.get(), selectedPeer);<NEW_LINE>} else {<NEW_LINE>syncEventsHandler.onSyncIssue("Connection point not found with node {}", selectedPeer);<NEW_LINE>}<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (knownBlock) {<NEW_LINE>connectionPointFinder.updateFound();<NEW_LINE>} else {<NEW_LINE>connectionPointFinder.updateNotFound();<NEW_LINE>}<NEW_LINE>cp = connectionPointFinder.getConnectionPoint();<NEW_LINE>// No need to ask for genesis hash<NEW_LINE>if (cp.isPresent() && cp.get() == 0L) {<NEW_LINE>syncEventsHandler.startDownloadingSkeleton(cp.get(), selectedPeer);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>this.resetTimeElapsed();<NEW_LINE>trySendRequest();<NEW_LINE>}
> cp = connectionPointFinder.getConnectionPoint();
1,003,675
public Object execute(Object iThis, final OIdentifiable iRecord, final Object iCurrentResult, final Object[] iParams, OCommandContext iContext) {<NEW_LINE>Object inputValue = iParams[0];<NEW_LINE>if (inputValue == null) {<NEW_LINE>result = null;<NEW_LINE>} else if (inputValue instanceof BigDecimal) {<NEW_LINE>result = ((BigDecimal) inputValue).abs();<NEW_LINE>} else if (inputValue instanceof BigInteger) {<NEW_LINE>result = ((<MASK><NEW_LINE>} else if (inputValue instanceof Integer) {<NEW_LINE>result = Math.abs((Integer) inputValue);<NEW_LINE>} else if (inputValue instanceof Long) {<NEW_LINE>result = Math.abs((Long) inputValue);<NEW_LINE>} else if (inputValue instanceof Short) {<NEW_LINE>result = (short) Math.abs((Short) inputValue);<NEW_LINE>} else if (inputValue instanceof Double) {<NEW_LINE>result = Math.abs((Double) inputValue);<NEW_LINE>} else if (inputValue instanceof Float) {<NEW_LINE>result = Math.abs((Float) inputValue);<NEW_LINE>} else {<NEW_LINE>throw new IllegalArgumentException("Argument to absolute value must be a number.");<NEW_LINE>}<NEW_LINE>return getResult();<NEW_LINE>}
BigInteger) inputValue).abs();
867,715
protected Object decode(Channel channel, SocketAddress remoteAddress, Object msg) throws Exception {<NEW_LINE>Parser parser = new Parser(PATTERN, (String) msg);<NEW_LINE>if (!parser.matches()) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>DeviceSession deviceSession = getDeviceSession(channel, remoteAddress, parser.next());<NEW_LINE>if (deviceSession == null) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>Position position = new Position(getProtocolName());<NEW_LINE>position.setDeviceId(deviceSession.getDeviceId());<NEW_LINE>position.set(Position.KEY_EVENT, parser.next());<NEW_LINE>position.set(Position.KEY_IGNITION, parser.next().equals("1"));<NEW_LINE>position.set(Position.KEY_ODOMETER, parser.nextInt(0));<NEW_LINE>position.setSpeed(UnitsConverter.knotsFromKph(parser.nextInt(0)));<NEW_LINE>position.set(Position.KEY_SATELLITES, parser.nextInt(0));<NEW_LINE>position.setValid(parser.next().equals("A"));<NEW_LINE>position.setLatitude(parser.nextDouble(0));<NEW_LINE>position.setLongitude(parser.nextDouble(0));<NEW_LINE>position.setAltitude(parser.nextDouble(0));<NEW_LINE>position.setCourse(parser.nextInt(0));<NEW_LINE>position.setTime(parser.nextDateTime(Parser.DateTimeFormat.HMS_DMY, "IST"));<NEW_LINE>position.set(Position.KEY_BATTERY, parser.nextInt() * 0.001);<NEW_LINE>position.set(Position.PREFIX_ADC + 1, parser.nextInt() * 0.01);<NEW_LINE>position.set(Position.<MASK><NEW_LINE>for (int i = 1; i <= 4; i++) {<NEW_LINE>int value = parser.nextInt();<NEW_LINE>if (value != 0) {<NEW_LINE>position.set(Position.PREFIX_IO + i, value);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>position.set(Position.KEY_VERSION_HW, parser.next());<NEW_LINE>position.set(Position.KEY_VERSION_FW, parser.next());<NEW_LINE>return position;<NEW_LINE>}
KEY_INPUT, parser.nextInt());
1,852,175
final DeleteFolderContentsResult executeDeleteFolderContents(DeleteFolderContentsRequest deleteFolderContentsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(deleteFolderContentsRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<DeleteFolderContentsRequest> request = null;<NEW_LINE>Response<DeleteFolderContentsResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new DeleteFolderContentsRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(deleteFolderContentsRequest));<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, "WorkDocs");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteFolderContents");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<DeleteFolderContentsResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeleteFolderContentsResultJsonUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>}
endClientExecution(awsRequestMetrics, request, response);
1,570,048
private void handleProperty(PropertyNode p, boolean classElement) {<NEW_LINE>int offset = -1;<NEW_LINE>if ((p.getValue() instanceof FunctionNode) && ((FunctionNode) p.getValue()).isAsync()) {<NEW_LINE>TokenSequence<? extends JsTokenId> ts = LexUtilities.getJsPositionedSequence(result.getSnapshot(), p.getStart() - 1);<NEW_LINE>if (ts != null) {<NEW_LINE>Token<? extends JsTokenId> token = LexUtilities.findPreviousNonWsNonComment(ts);<NEW_LINE>if (token != null && (token.id() == JsTokenId.IDENTIFIER || token.id() == JsTokenId.PRIVATE_IDENTIFIER) && "async".equals(token.text().toString())) {<NEW_LINE>offset = ts.offset();<NEW_LINE>highlights.put(LexUtilities.getLexerOffsets(result, new OffsetRange(ts.offset(), ts.offset() + token.length())), SEMANTIC_KEYWORD);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (classElement && p.isStatic()) {<NEW_LINE>TokenSequence<? extends JsTokenId> ts = LexUtilities.getJsPositionedSequence(result.getSnapshot(), offset >= 0 ? offset - 1 : <MASK><NEW_LINE>if (ts != null) {<NEW_LINE>Token<? extends JsTokenId> token = LexUtilities.findPreviousNonWsNonComment(ts);<NEW_LINE>if (token != null && token.id() == JsTokenId.RESERVED_STATIC) {<NEW_LINE>highlights.put(LexUtilities.getLexerOffsets(result, new OffsetRange(ts.offset(), ts.offset() + token.length())), SEMANTIC_KEYWORD);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
p.getStart() - 1);
78,313
public ProductAttribute merge(PersistableProductAttribute source, ProductAttribute destination, MerchantStore store, Language language) {<NEW_LINE>ProductOption productOption = null;<NEW_LINE>if (!StringUtils.isBlank(source.getOption().getCode())) {<NEW_LINE>productOption = productOptionService.getByCode(store, source.getOption().getCode());<NEW_LINE>} else {<NEW_LINE>Validate.notNull(source.getOption().getId(), "Product option id is null");<NEW_LINE>productOption = productOptionService.getById(source.<MASK><NEW_LINE>}<NEW_LINE>if (productOption == null) {<NEW_LINE>throw new ConversionRuntimeException("Product option id " + source.getOption().getId() + " does not exist");<NEW_LINE>}<NEW_LINE>ProductOptionValue productOptionValue = null;<NEW_LINE>if (!StringUtils.isBlank(source.getOptionValue().getCode())) {<NEW_LINE>productOptionValue = productOptionValueService.getByCode(store, source.getOptionValue().getCode());<NEW_LINE>} else if (source.getProductId() != null && source.getOptionValue().getId().longValue() > 0) {<NEW_LINE>productOptionValue = productOptionValueService.getById(source.getOptionValue().getId());<NEW_LINE>} else {<NEW_LINE>// ProductOption value is text<NEW_LINE>productOptionValue = new ProductOptionValue();<NEW_LINE>productOptionValue.setProductOptionDisplayOnly(true);<NEW_LINE>productOptionValue.setCode(UUID.randomUUID().toString());<NEW_LINE>productOptionValue.setMerchantStore(store);<NEW_LINE>}<NEW_LINE>if (!CollectionUtils.isEmpty((source.getOptionValue().getDescriptions()))) {<NEW_LINE>productOptionValue = persistableProductOptionValueMapper.merge(source.getOptionValue(), productOptionValue, store, language);<NEW_LINE>try {<NEW_LINE>productOptionValueService.saveOrUpdate(productOptionValue);<NEW_LINE>} catch (ServiceException e) {<NEW_LINE>throw new ConversionRuntimeException("Error converting ProductOptionValue", e);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (productOptionValue == null && !source.isAttributeDisplayOnly()) {<NEW_LINE>throw new ConversionRuntimeException("Product option value id " + source.getOptionValue().getId() + " does not exist");<NEW_LINE>}<NEW_LINE>if (productOption.getMerchantStore().getId().intValue() != store.getId().intValue()) {<NEW_LINE>throw new ConversionRuntimeException("Invalid product option id ");<NEW_LINE>}<NEW_LINE>if (productOptionValue != null && productOptionValue.getMerchantStore().getId().intValue() != store.getId().intValue()) {<NEW_LINE>throw new ConversionRuntimeException("Invalid product option value id ");<NEW_LINE>}<NEW_LINE>if (source.getProductId() != null && source.getProductId().longValue() > 0) {<NEW_LINE>Product p = productService.getById(source.getProductId());<NEW_LINE>if (p == null) {<NEW_LINE>throw new ConversionRuntimeException("Invalid product id ");<NEW_LINE>}<NEW_LINE>destination.setProduct(p);<NEW_LINE>}<NEW_LINE>if (destination.getId() != null && destination.getId().longValue() > 0) {<NEW_LINE>destination.setId(destination.getId());<NEW_LINE>} else {<NEW_LINE>destination.setId(null);<NEW_LINE>}<NEW_LINE>destination.setProductOption(productOption);<NEW_LINE>destination.setProductOptionValue(productOptionValue);<NEW_LINE>destination.setProductAttributePrice(source.getProductAttributePrice());<NEW_LINE>destination.setProductAttributeWeight(source.getProductAttributeWeight());<NEW_LINE>destination.setProductAttributePrice(source.getProductAttributePrice());<NEW_LINE>destination.setAttributeDisplayOnly(source.isAttributeDisplayOnly());<NEW_LINE>return destination;<NEW_LINE>}
getOption().getId());
1,474,090
public void write(final ChannelHandlerContext ctx, final Object msg, final ChannelPromise promise) {<NEW_LINE>if (msg instanceof RequestContext) {<NEW_LINE>final RequestContext<?, ?> requestContext = (RequestContext) msg;<NEW_LINE>final int sequenceId = requestContext.getSequenceId();<NEW_LINE>final ThriftFrame frame = encodeThriftFrame(requestContext, sequenceId);<NEW_LINE>try {<NEW_LINE>requestContexts.put(requestContext.getSequenceId(), requestContext);<NEW_LINE>final ChannelPromise p;<NEW_LINE>if (requestContext.isOneway()) {<NEW_LINE>p = promise instanceof VoidChannelPromise ? ctx.newPromise() : promise;<NEW_LINE>p.addListener(__ -> {<NEW_LINE>final RequestContext remove = requestContexts.remove(sequenceId);<NEW_LINE>if (remove != null) {<NEW_LINE>if (__.cause() != null) {<NEW_LINE>remove.getProcessor().onError(__.cause());<NEW_LINE>} else {<NEW_LINE>remove.getProcessor().onComplete();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>});<NEW_LINE>} else {<NEW_LINE>p = promise;<NEW_LINE>}<NEW_LINE>ctx.writeAndFlush(frame, p);<NEW_LINE>} catch (Throwable t) {<NEW_LINE>ReferenceCountUtil.safeRelease(frame);<NEW_LINE>requestContext.<MASK><NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>ctx.writeAndFlush(msg, promise);<NEW_LINE>}<NEW_LINE>}
getProcessor().onError(t);
793,671
public BigInteger bruteForceWithAdditionalOracleEquations(int[] usedOracleEquations, BigInteger[] congs, BigInteger[] modulis, int pointer) {<NEW_LINE>int[] eq = Arrays.copyOf(usedOracleEquations, usedOracleEquations.length);<NEW_LINE>int maxValue = (pointer == usedOracleEquations.length - 1) ? (congs.length) : (usedOracleEquations[pointer + 1]);<NEW_LINE>int minValue = usedOracleEquations[pointer];<NEW_LINE>for (int i = minValue; i < maxValue; i++) {<NEW_LINE>eq[pointer] = i;<NEW_LINE>if (pointer > 0) {<NEW_LINE>bruteForceWithAdditionalOracleEquations(eq, congs, modulis, (pointer - 1));<NEW_LINE>} else {<NEW_LINE>LOGGER.debug("Trying the following combination: {}", Arrays.toString(eq));<NEW_LINE>BigInteger sqrtResult = computeCRTFromCombination(usedOracleEquations, congs, modulis);<NEW_LINE>BigInteger r = MathHelper.bigIntSqRootFloor(sqrtResult);<NEW_LINE><MASK><NEW_LINE>if (oracle.isFinalSolutionCorrect(r)) {<NEW_LINE>return r;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return null;<NEW_LINE>}
LOGGER.info("Guessing the following result: {}", r);
1,627,949
final PutProtocolsListResult executePutProtocolsList(PutProtocolsListRequest putProtocolsListRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(putProtocolsListRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<PutProtocolsListRequest> request = null;<NEW_LINE>Response<PutProtocolsListResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new PutProtocolsListRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(putProtocolsListRequest));<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, "FMS");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "PutProtocolsList");<NEW_LINE>request.<MASK><NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<PutProtocolsListResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new PutProtocolsListResultJsonUnmarshaller());<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);
919,049
public void writeBundleDocuments(XMLStreamWriter xout, final ArrayList<BundleDocument> bundleDocuments, int indentationDepth) throws XMLStreamException {<NEW_LINE>writeIndentation(xout, indentationDepth);<NEW_LINE>xout.writeStartElement(ARRAY_TAG);<NEW_LINE>xout.writeCharacters("\n");<NEW_LINE>for (BundleDocument bundleDocument : bundleDocuments) {<NEW_LINE>writeIndentation(xout, indentationDepth + 1);<NEW_LINE>xout.writeStartElement(DICT_TAG);<NEW_LINE>xout.writeCharacters("\n");<NEW_LINE>final List<String> contentTypes = bundleDocument.getContentTypes();<NEW_LINE>if (contentTypes != null) {<NEW_LINE>writeStringArray(xout, "LSItemContentTypes", contentTypes, indentationDepth + 2);<NEW_LINE>} else {<NEW_LINE>writeStringArray(xout, "CFBundleTypeExtensions", bundleDocument.getExtensions(), indentationDepth + 2);<NEW_LINE>writeProperty(xout, "LSTypeIsPackage", bundleDocument.isPackage(), indentationDepth + 2);<NEW_LINE>}<NEW_LINE>writeStringArray(xout, "NSExportableTypes", bundleDocument.getExportableTypes(), indentationDepth + 2);<NEW_LINE>final File ifile = bundleDocument.getIconFile();<NEW_LINE>writeProperty(xout, "CFBundleTypeIconFile", ifile != null ? ifile.getName() : bundleDocument.<MASK><NEW_LINE>writeProperty(xout, "CFBundleTypeName", bundleDocument.getName(), indentationDepth + 2);<NEW_LINE>writeProperty(xout, "CFBundleTypeRole", bundleDocument.getRole(), indentationDepth + 2);<NEW_LINE>writeProperty(xout, "LSHandlerRank", bundleDocument.getHandlerRank(), indentationDepth + 2);<NEW_LINE>writeIndentation(xout, indentationDepth + 1);<NEW_LINE>xout.writeEndElement();<NEW_LINE>xout.writeCharacters("\n");<NEW_LINE>}<NEW_LINE>writeIndentation(xout, indentationDepth);<NEW_LINE>xout.writeEndElement();<NEW_LINE>xout.writeCharacters("\n");<NEW_LINE>}
getIcon(), indentationDepth + 2);
1,600,756
protected void drawPoints(Canvas canvas, Paint paint, List<Float> pointsList, XYSeriesRenderer seriesRenderer, float yAxisValue, int seriesIndex, int startIndex) {<NEW_LINE>if (isRenderPoints(seriesRenderer)) {<NEW_LINE>ScatterChart pointsChart = getPointsChart();<NEW_LINE>if (pointsChart != null) {<NEW_LINE>int length = <MASK><NEW_LINE>int pointsLength = pointsList.size();<NEW_LINE>float[] coords = new float[2];<NEW_LINE>for (int i = 0; i < length; i++) {<NEW_LINE>mPathMeasure.getPosTan(i, coords, null);<NEW_LINE>double prevDiff = Double.MAX_VALUE;<NEW_LINE>boolean ok = true;<NEW_LINE>for (int j = 0; j < pointsLength && ok; j += 2) {<NEW_LINE>double diff = Math.abs(pointsList.get(j) - coords[0]);<NEW_LINE>if (diff < 1) {<NEW_LINE>pointsList.set(j + 1, coords[1]);<NEW_LINE>prevDiff = diff;<NEW_LINE>}<NEW_LINE>ok = prevDiff > diff;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>pointsChart.drawSeries(canvas, paint, pointsList, seriesRenderer, yAxisValue, seriesIndex, startIndex);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
(int) mPathMeasure.getLength();
860,202
protected Bundle doInBackground(Bundle... params) {<NEW_LINE>Bundle args = params[0];<NEW_LINE>Bundle result = new Bundle(args);<NEW_LINE>String userID = args.getString(PARAM_USER_ID);<NEW_LINE>String token = mSharedPreferences.getString(SAVE_STATE_KEY_OAUTH_TOKEN, null);<NEW_LINE>String urlString = INSTAGRAM_APIURL + "/users/" + userID + "/relationship/?access_token=" + token;<NEW_LINE>String parameters = "action=follow";<NEW_LINE>try {<NEW_LINE>URL url = new URL(urlString);<NEW_LINE>HttpURLConnection connection = (HttpURLConnection) url.openConnection();<NEW_LINE>connection.setDoOutput(true);<NEW_LINE>connection.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");<NEW_LINE>connection.setRequestMethod("POST");<NEW_LINE>OutputStreamWriter request = new <MASK><NEW_LINE>request.write(parameters);<NEW_LINE>request.flush();<NEW_LINE>request.close();<NEW_LINE>checkConnectionErrors(connection);<NEW_LINE>InputStream inputStream = connection.getInputStream();<NEW_LINE>String response = streamToString(inputStream);<NEW_LINE>JSONObject jsonObject = (JSONObject) new JSONTokener(response).nextValue();<NEW_LINE>JSONObject jsonResponse = jsonObject.getJSONObject("data");<NEW_LINE>String outgoing_status = jsonResponse.getString("outgoing_status");<NEW_LINE>if (outgoing_status.equals("follows") || outgoing_status.equals("requested")) {<NEW_LINE>result.putString(RESULT_REQUESTED_ID, userID);<NEW_LINE>} else {<NEW_LINE>result.putString(RESULT_ERROR, "REQUEST_ADD_FRIEND Error");<NEW_LINE>}<NEW_LINE>} catch (Exception e) {<NEW_LINE>checkException(e, result);<NEW_LINE>}<NEW_LINE>return result;<NEW_LINE>}
OutputStreamWriter(connection.getOutputStream());
1,078,468
private void updateProfiler() {<NEW_LINE>if (!TornadoOptions.isProfilerEnabled()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (!TornadoOptions.PROFILER_LOGS_ACCUMULATE) {<NEW_LINE>timeProfiler.dumpJson(new StringBuffer(), this.getId());<NEW_LINE>} else {<NEW_LINE>bufferLogProfiler.append(timeProfiler.createJson(new StringBuffer(), this.getId()));<NEW_LINE>}<NEW_LINE>if (!TornadoOptions.SOCKET_PORT.isEmpty()) {<NEW_LINE>TornadoVMClient tornadoVMClient = new TornadoVMClient();<NEW_LINE>try {<NEW_LINE>tornadoVMClient.sentLogOverSocket(timeProfiler.createJson(new StringBuffer(), this.getId()));<NEW_LINE>} catch (IOException e) {<NEW_LINE>System.out.println(e);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (!TornadoOptions.PROFILER_DIRECTORY.isEmpty()) {<NEW_LINE>String jsonFile = timeProfiler.createJson(new StringBuffer(<MASK><NEW_LINE>profilerFileWriter(jsonFile);<NEW_LINE>}<NEW_LINE>}
), this.getId());
796,425
private IRubyObject arefCommon(IRubyObject arg0) {<NEW_LINE>Ruby runtime = metaClass.runtime;<NEW_LINE>if (arg0 instanceof RubyRange) {<NEW_LINE>long[] beglen = ((RubyRange) arg0).begLen(realLength, 0);<NEW_LINE>return beglen == null ? runtime.getNil() : subseq(beglen[<MASK><NEW_LINE>} else {<NEW_LINE>ThreadContext context = runtime.getCurrentContext();<NEW_LINE>ArraySites sites = sites(context);<NEW_LINE>if (RubyRange.isRangeLike(context, arg0, sites.begin_checked, sites.end_checked, sites.exclude_end_checked)) {<NEW_LINE>RubyRange range = RubyRange.rangeFromRangeLike(context, arg0, sites.begin, sites.end, sites.exclude_end);<NEW_LINE>long[] beglen = range.begLen(realLength, 0);<NEW_LINE>return beglen == null ? runtime.getNil() : subseq(beglen[0], beglen[1]);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return entry(RubyNumeric.num2long(arg0));<NEW_LINE>}
0], beglen[1]);
1,610,009
public String combine(String pattern1, String pattern2) {<NEW_LINE>if (!StringUtils.hasText(pattern1) && !StringUtils.hasText(pattern2)) {<NEW_LINE>return "";<NEW_LINE>}<NEW_LINE>if (!StringUtils.hasText(pattern1)) {<NEW_LINE>return pattern2;<NEW_LINE>}<NEW_LINE>if (!StringUtils.hasText(pattern2)) {<NEW_LINE>return pattern1;<NEW_LINE>}<NEW_LINE>boolean pattern1ContainsUriVar = (pattern1.indexOf('{') != -1);<NEW_LINE>if (!pattern1.equals(pattern2) && !pattern1ContainsUriVar && match(pattern1, pattern2)) {<NEW_LINE>// /* + /hotel -> /hotel ; "/*.*" + "/*.html" -> /*.html<NEW_LINE>// However /user + /user -> /usr/user ; /{foo} + /bar -> /{foo}/bar<NEW_LINE>return pattern2;<NEW_LINE>}<NEW_LINE>// /hotels/* + /booking -> /hotels/booking<NEW_LINE>// /hotels/* + booking -> /hotels/booking<NEW_LINE>if (pattern1.endsWith(this.pathSeparatorPatternCache.getEndsOnWildCard())) {<NEW_LINE>return concat(pattern1.substring(0, pattern1.length() - 2), pattern2);<NEW_LINE>}<NEW_LINE>// /hotels/** + /booking -> /hotels/**/booking<NEW_LINE>// /hotels/** + booking -> /hotels/**/booking<NEW_LINE>if (pattern1.endsWith(this.pathSeparatorPatternCache.getEndsOnDoubleWildCard())) {<NEW_LINE>return concat(pattern1, pattern2);<NEW_LINE>}<NEW_LINE>int starDotPos1 = pattern1.indexOf("*.");<NEW_LINE>if (pattern1ContainsUriVar || starDotPos1 == -1 || this.pathSeparator.equals(".")) {<NEW_LINE>// simply concatenate the two patterns<NEW_LINE>return concat(pattern1, pattern2);<NEW_LINE>}<NEW_LINE>String ext1 = pattern1.substring(starDotPos1 + 1);<NEW_LINE>int dotPos2 = pattern2.indexOf('.');<NEW_LINE>String file2 = (dotPos2 == -1 ? pattern2 : pattern2.substring(0, dotPos2));<NEW_LINE>String ext2 = (dotPos2 == -1 ? "" <MASK><NEW_LINE>boolean ext1All = (ext1.equals(".*") || ext1.isEmpty());<NEW_LINE>boolean ext2All = (ext2.equals(".*") || ext2.isEmpty());<NEW_LINE>if (!ext1All && !ext2All) {<NEW_LINE>throw new IllegalArgumentException("Cannot combine patterns: " + pattern1 + " vs " + pattern2);<NEW_LINE>}<NEW_LINE>String ext = (ext1All ? ext2 : ext1);<NEW_LINE>return file2 + ext;<NEW_LINE>}
: pattern2.substring(dotPos2));
243,410
public void onParameterChanged(final String parameterName) {<NEW_LINE>if (PARAM_AD_ORG_TARGET_ID.equals(parameterName) || PARAM_DATE_ORG_CHANGE.equals(parameterName)) {<NEW_LINE>if (p_orgTargetId == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>final BPartnerId partnerId = <MASK><NEW_LINE>final Instant orgChangeDate = CoalesceUtil.coalesce(p_startDate, SystemTime.asInstant());<NEW_LINE>final OrgChangeBPartnerComposite orgChangePartnerComposite = service.getByIdAndOrgChangeDate(partnerId, orgChangeDate);<NEW_LINE>isShowMembershipParameter = orgChangePartnerComposite.hasMembershipSubscriptions() && service.hasAnyMembershipProduct(p_orgTargetId);<NEW_LINE>final GroupCategoryId groupCategoryId = orgChangePartnerComposite.getGroupCategoryId();<NEW_LINE>if (groupCategoryId != null && service.isGroupCategoryContainsProductsInTargetOrg(groupCategoryId, p_orgTargetId)) {<NEW_LINE>p_groupCategoryId = groupCategoryId;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
BPartnerId.ofRepoId(getRecord_ID());
986,018
public static ListAlarmHistoriesResponse unmarshall(ListAlarmHistoriesResponse listAlarmHistoriesResponse, UnmarshallerContext _ctx) {<NEW_LINE>listAlarmHistoriesResponse.setRequestId(_ctx.stringValue("ListAlarmHistoriesResponse.RequestId"));<NEW_LINE>listAlarmHistoriesResponse.setHttpCode<MASK><NEW_LINE>listAlarmHistoriesResponse.setTotalCount(_ctx.integerValue("ListAlarmHistoriesResponse.TotalCount"));<NEW_LINE>listAlarmHistoriesResponse.setMessage(_ctx.stringValue("ListAlarmHistoriesResponse.Message"));<NEW_LINE>listAlarmHistoriesResponse.setPageSize(_ctx.integerValue("ListAlarmHistoriesResponse.PageSize"));<NEW_LINE>listAlarmHistoriesResponse.setPageNumber(_ctx.integerValue("ListAlarmHistoriesResponse.PageNumber"));<NEW_LINE>listAlarmHistoriesResponse.setErrorCode(_ctx.stringValue("ListAlarmHistoriesResponse.ErrorCode"));<NEW_LINE>listAlarmHistoriesResponse.setSuccess(_ctx.booleanValue("ListAlarmHistoriesResponse.Success"));<NEW_LINE>List<AlarmHistoryModel> data = new ArrayList<AlarmHistoryModel>();<NEW_LINE>for (int i = 0; i < _ctx.lengthValue("ListAlarmHistoriesResponse.Data.Length"); i++) {<NEW_LINE>AlarmHistoryModel alarmHistoryModel = new AlarmHistoryModel();<NEW_LINE>alarmHistoryModel.setAlarmTime(_ctx.stringValue("ListAlarmHistoriesResponse.Data[" + i + "].AlarmTime"));<NEW_LINE>alarmHistoryModel.setAlarmEmail(_ctx.stringValue("ListAlarmHistoriesResponse.Data[" + i + "].AlarmEmail"));<NEW_LINE>alarmHistoryModel.setAlarmDingDing(_ctx.stringValue("ListAlarmHistoriesResponse.Data[" + i + "].AlarmDingDing"));<NEW_LINE>alarmHistoryModel.setAlarmPhone(_ctx.stringValue("ListAlarmHistoriesResponse.Data[" + i + "].AlarmPhone"));<NEW_LINE>alarmHistoryModel.setAlarmName(_ctx.stringValue("ListAlarmHistoriesResponse.Data[" + i + "].AlarmName"));<NEW_LINE>alarmHistoryModel.setAlarmContent(_ctx.stringValue("ListAlarmHistoriesResponse.Data[" + i + "].AlarmContent"));<NEW_LINE>data.add(alarmHistoryModel);<NEW_LINE>}<NEW_LINE>listAlarmHistoriesResponse.setData(data);<NEW_LINE>return listAlarmHistoriesResponse;<NEW_LINE>}
(_ctx.stringValue("ListAlarmHistoriesResponse.HttpCode"));