idx
int32
46
1.86M
input
stringlengths
321
6.6k
target
stringlengths
9
1.24k
907,313
protected AtomicLong readLastLogId() {<NEW_LINE>String filePath = storagePath + File.separator + OPLOG_FILE.replace("$NUM$", "" + info.currentFileNum);<NEW_LINE>File f = new File(filePath);<NEW_LINE>try (RandomAccessFile file = new RandomAccessFile(filePath, "r")) {<NEW_LINE>if (!f.exists()) {<NEW_LINE>f.createNewFile();<NEW_LINE>}<NEW_LINE>if (file.length() == 0) {<NEW_LINE>return new AtomicLong(info.currentFileNum * LOG_ENTRIES_PER_FILE - 1);<NEW_LINE>}<NEW_LINE>// magic<NEW_LINE>file.seek(file.length() - 8);<NEW_LINE>long magic = file.readLong();<NEW_LINE>if (magic != MAGIC) {<NEW_LINE>return new AtomicLong(recover());<NEW_LINE>}<NEW_LINE>// length plus magic<NEW_LINE>file.seek(file.length() - 16);<NEW_LINE>long size = file.readLong();<NEW_LINE>file.seek(file.length(<MASK><NEW_LINE>return new AtomicLong(file.readLong());<NEW_LINE>} catch (IOException e) {<NEW_LINE>return new AtomicLong(recover());<NEW_LINE>}<NEW_LINE>}
) - 24 - size - 20);
1,427,875
protected void mStep() {<NEW_LINE>// topicProbsSum.setAll(0.0);<NEW_LINE>// topicUserProbsSum.setAll(0.0);<NEW_LINE>// topicItemProbsSum.setAll(0.0);<NEW_LINE>topicProbsSum.assign((index, tempValue) -> 0);<NEW_LINE>topicUserProbsSum.assign((rowId, colId, tempValue) -> 0);<NEW_LINE>topicItemProbsSum.assign((rowId, colId, tempValue) -> 0);<NEW_LINE>for (int i = 0; i < topicProbs.size(); i++) {<NEW_LINE>System.out.println(topicProbs.get(i));<NEW_LINE>}<NEW_LINE>for (int topicIdx = 0; topicIdx < numTopics; topicIdx++) {<NEW_LINE>for (MatrixEntry trainMatrixEntry : trainMatrix) {<NEW_LINE><MASK><NEW_LINE>int itemIdx = trainMatrixEntry.column();<NEW_LINE>double num = trainMatrixEntry.get();<NEW_LINE>double val = entryTopicDistribution.get(userIdx, itemIdx)[topicIdx] * num;<NEW_LINE>topicProbsSum.plus(topicIdx, val);<NEW_LINE>topicUserProbsSum.plus(topicIdx, userIdx, val);<NEW_LINE>topicItemProbsSum.plus(topicIdx, itemIdx, val);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>topicProbs = topicProbsSum.times(1.0 / topicProbsSum.sum());<NEW_LINE>for (int topicIdx = 0; topicIdx < numTopics; topicIdx++) {<NEW_LINE>double userProbsSum = topicUserProbs.column(topicIdx).sum();<NEW_LINE>// avoid Nan<NEW_LINE>userProbsSum = userProbsSum > 0.0d ? userProbsSum : 1.0d;<NEW_LINE>for (int userIdx = 0; userIdx < numUsers; userIdx++) {<NEW_LINE>topicUserProbs.set(topicIdx, userIdx, topicUserProbsSum.get(topicIdx, userIdx) / userProbsSum);<NEW_LINE>}<NEW_LINE>double itemProbsSum = topicItemProbs.column(topicIdx).sum();<NEW_LINE>// avoid Nan<NEW_LINE>itemProbsSum = itemProbsSum > 0.0d ? itemProbsSum : 1.0d;<NEW_LINE>for (int itemIdx = 0; itemIdx < numItems; itemIdx++) {<NEW_LINE>topicItemProbs.set(topicIdx, itemIdx, topicItemProbsSum.get(topicIdx, itemIdx) / itemProbsSum);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
int userIdx = trainMatrixEntry.row();
1,186,721
private final void write(int timestamp, IRTMPEvent msg) {<NEW_LINE>// get data type<NEW_LINE>byte dataType = msg.getDataType();<NEW_LINE>log.debug("Write - timestamp: {} type: {}", timestamp, dataType);<NEW_LINE>// get data bytes<NEW_LINE>IoBuffer data = ((IStreamData<?>) msg).getData();<NEW_LINE>if (data != null) {<NEW_LINE>// if the last message was a reset or we just started, use the header timer<NEW_LINE>if (startTimestamp == -1) {<NEW_LINE>startTimestamp = timestamp;<NEW_LINE>timestamp = 0;<NEW_LINE>} else {<NEW_LINE>timestamp -= startTimestamp;<NEW_LINE>}<NEW_LINE>// create a tag<NEW_LINE>ITag tag = ImmutableTag.build(<MASK><NEW_LINE>// only allow blank tags if they are of audio type<NEW_LINE>if (tag.getBodySize() > 0 || dataType == ITag.TYPE_AUDIO) {<NEW_LINE>try {<NEW_LINE>if (timestamp >= 0) {<NEW_LINE>if (!writer.writeTag(tag)) {<NEW_LINE>log.warn("Tag was not written");<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>log.warn("Skipping message with negative timestamp.");<NEW_LINE>}<NEW_LINE>} catch (IOException e) {<NEW_LINE>log.error("Error writing tag", e);<NEW_LINE>} finally {<NEW_LINE>if (data != null) {<NEW_LINE>data.clear();<NEW_LINE>data.free();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
dataType, timestamp, data, 0);
942,009
public Request<ListCollectionsRequest> marshall(ListCollectionsRequest listCollectionsRequest) {<NEW_LINE>if (listCollectionsRequest == null) {<NEW_LINE>throw new AmazonClientException("Invalid argument passed to marshall(ListCollectionsRequest)");<NEW_LINE>}<NEW_LINE>Request<ListCollectionsRequest> request = new DefaultRequest<ListCollectionsRequest>(listCollectionsRequest, "AmazonRekognition");<NEW_LINE>String target = "RekognitionService.ListCollections";<NEW_LINE>request.addHeader("X-Amz-Target", target);<NEW_LINE>request.setHttpMethod(HttpMethodName.POST);<NEW_LINE>String uriResourcePath = "/";<NEW_LINE>request.setResourcePath(uriResourcePath);<NEW_LINE>try {<NEW_LINE>StringWriter stringWriter = new StringWriter();<NEW_LINE>AwsJsonWriter jsonWriter = JsonUtils.getJsonWriter(stringWriter);<NEW_LINE>jsonWriter.beginObject();<NEW_LINE>if (listCollectionsRequest.getNextToken() != null) {<NEW_LINE><MASK><NEW_LINE>jsonWriter.name("NextToken");<NEW_LINE>jsonWriter.value(nextToken);<NEW_LINE>}<NEW_LINE>if (listCollectionsRequest.getMaxResults() != null) {<NEW_LINE>Integer maxResults = listCollectionsRequest.getMaxResults();<NEW_LINE>jsonWriter.name("MaxResults");<NEW_LINE>jsonWriter.value(maxResults);<NEW_LINE>}<NEW_LINE>jsonWriter.endObject();<NEW_LINE>jsonWriter.close();<NEW_LINE>String snippet = stringWriter.toString();<NEW_LINE>byte[] content = snippet.getBytes(UTF8);<NEW_LINE>request.setContent(new StringInputStream(snippet));<NEW_LINE>request.addHeader("Content-Length", Integer.toString(content.length));<NEW_LINE>} catch (Throwable t) {<NEW_LINE>throw new AmazonClientException("Unable to marshall request to JSON: " + t.getMessage(), t);<NEW_LINE>}<NEW_LINE>if (!request.getHeaders().containsKey("Content-Type")) {<NEW_LINE>request.addHeader("Content-Type", "application/x-amz-json-1.1");<NEW_LINE>}<NEW_LINE>return request;<NEW_LINE>}
String nextToken = listCollectionsRequest.getNextToken();
656,430
private short constructBitfield() {<NEW_LINE>short bits = 0;<NEW_LINE>// simplified shift of SET_BIT_MMOL<NEW_LINE>bits |= (Unitized.usingMgDl() ? 0 : 1);<NEW_LINE>bits |= (Pref.getBooleanDefaultFalse("bluejay_option_24_hour_clock") ? 1 : 0) << SET_BIT_24_HOUR_CLOCK;<NEW_LINE>bits |= (Pref.getBooleanDefaultFalse("bluejay_collector_enabled") ? 1 : 0) << SET_BIT_RUN_COLLECTOR;<NEW_LINE>// bits |= (Pref.getBooleanDefaultFalse("bluejay_delta_trend") ? 1 : 0) << SET_BIT_TREND_FROM_DELTA;<NEW_LINE>// bits |= (Pref.getBooleanDefaultFalse("bluejay_timing_failsafe") ? 1 : 0) << SET_BIT_FAILSAFE_TIMING;<NEW_LINE>bits |= (Pref.getBooleanDefaultFalse("bluejay_run_as_phone_collector"<MASK><NEW_LINE>// bits |= (Pref.getBooleanDefaultFalse("bluejay_ultra_power_save") ? 1 : 0) << SET_BIT_ULTRA_POWER_SAVE;<NEW_LINE>bits |= ((Pref.getBooleanDefaultFalse("bluejay_run_phone_collector") && Pref.getBooleanDefaultFalse("bluejay_send_readings")) ? 1 : 0) << SET_BIT_PHONE_COLLECTS;<NEW_LINE>bits |= (Pref.getBooleanDefaultFalse("bluejay_engineering_mode") ? 1 : 0) << SET_BIT_ENGINEERING_MODE;<NEW_LINE>bits |= (localeUsesMdFormat() ? 1 : 0) << SET_BIT_DATE_FORMAT_MD;<NEW_LINE>bits |= (Pref.getBooleanDefaultFalse("bluejay_button1_vibrate") ? 0 : 1) << SET_BIT_BUTTON_NO_VIBRATE;<NEW_LINE>return bits;<NEW_LINE>}
) ? 1 : 0) << SET_BIT_USE_PHONE_SLOT;
1,740,053
public I_PP_Order execute() {<NEW_LINE>final ProductPlanningId productPlanningId = request.getProductPlanningId();<NEW_LINE>final I_PP_Product_Planning productPlanning = productPlanningId != null ? productPlanningsRepo.getById(productPlanningId) : null;<NEW_LINE>//<NEW_LINE>// Create PP Order<NEW_LINE>final I_PP_Order ppOrderRecord = InterfaceWrapperHelper.newInstance(I_PP_Order.class);<NEW_LINE>PPOrderPojoConverter.setMaterialDispoGroupId(ppOrderRecord, request.getMaterialDispoGroupId());<NEW_LINE>ppOrderRecord.setPP_Product_Planning_ID(ProductPlanningId.toRepoId(productPlanningId));<NEW_LINE>ppOrderRecord.setMRP_Generated(true);<NEW_LINE>ppOrderRecord.setMRP_AllowCleanup(true);<NEW_LINE>ppOrderRecord.setLine(10);<NEW_LINE>//<NEW_LINE>// Planning dimension<NEW_LINE>ppOrderRecord.setAD_Org_ID(request.getClientAndOrgId().getOrgId().getRepoId());<NEW_LINE>ppOrderRecord.setS_Resource_ID(request.getPlantId().getRepoId());<NEW_LINE>ppOrderRecord.setM_Warehouse_ID(request.getWarehouseId().getRepoId());<NEW_LINE>ppOrderRecord.setPlanner_ID(UserId.toRepoId(getPlannerIdOrNull(request, productPlanning)));<NEW_LINE>//<NEW_LINE>// Document Type & Status<NEW_LINE>final DocTypeId docTypeId = getDocTypeId(request.getDocBaseType(), request.getClientAndOrgId());<NEW_LINE>ppOrderRecord.setC_DocTypeTarget_ID(docTypeId.getRepoId());<NEW_LINE>ppOrderRecord.setC_DocType_ID(docTypeId.getRepoId());<NEW_LINE>ppOrderRecord.setDocStatus(X_PP_Order.DOCSTATUS_Drafted);<NEW_LINE>ppOrderRecord.setDocAction(X_PP_Order.DOCACTION_Complete);<NEW_LINE>//<NEW_LINE>// Product, ASI, UOM<NEW_LINE>ppOrderRecord.setM_Product_ID(request.getProductId().getRepoId());<NEW_LINE>ppOrderRecord.setM_AttributeSetInstance_ID(request.getAttributeSetInstanceId().getRepoId());<NEW_LINE>//<NEW_LINE>// BOM & Workflow<NEW_LINE>ppOrderRecord.setPP_Product_BOM_ID(getBOMId(productPlanning).getRepoId());<NEW_LINE>ppOrderRecord.setAD_Workflow_ID(getRoutingId(productPlanning).getRepoId());<NEW_LINE>//<NEW_LINE>// Dates<NEW_LINE>ppOrderRecord.setDateOrdered(TimeUtil.asTimestamp(request.getDateOrdered()));<NEW_LINE>final Timestamp dateFinishSchedule = TimeUtil.asTimestamp(request.getDatePromised());<NEW_LINE>ppOrderRecord.setDatePromised(dateFinishSchedule);<NEW_LINE>ppOrderRecord.setDateFinishSchedule(dateFinishSchedule);<NEW_LINE>ppOrderRecord.setPreparationDate(dateFinishSchedule);<NEW_LINE>ppOrderRecord.setDateStartSchedule(TimeUtil.asTimestamp(request.getDateStartSchedule()));<NEW_LINE>// Qty/UOM<NEW_LINE>setQtyRequired(ppOrderRecord, request.getQtyRequired());<NEW_LINE>// QtyBatchSize : do not set it, let the MO to take it from workflow<NEW_LINE>ppOrderRecord.setYield(BigDecimal.ZERO);<NEW_LINE>ppOrderRecord.setScheduleType(X_PP_MRP.TYPEMRP_Demand);<NEW_LINE><MASK><NEW_LINE>//<NEW_LINE>// Dimensions / References<NEW_LINE>ppOrderRecord.setC_OrderLine_ID(OrderLineId.toRepoId(request.getSalesOrderLineId()));<NEW_LINE>ppOrderRecord.setM_ShipmentSchedule_ID(ShipmentScheduleId.toRepoId(request.getShipmentScheduleId()));<NEW_LINE>ppOrderRecord.setC_BPartner_ID(BPartnerId.toRepoId(getCustomerIdOrNull(request)));<NEW_LINE>ppOrderRecord.setC_Project_ID(ProjectId.toRepoId(request.getProjectId()));<NEW_LINE>ppOrderRecord.setIsPickingOrder(productPlanning != null && productPlanning.isPickingOrder());<NEW_LINE>//<NEW_LINE>// Save the manufacturing order<NEW_LINE>// I_PP_Order_BOM and I_PP_Order_BOMLines are created via a model interceptor<NEW_LINE>ppOrdersRepo.save(ppOrderRecord);<NEW_LINE>Loggables.addLog("Created ppOrder; PP_Order_ID={}; DocumentNo={}", ppOrderRecord.getPP_Order_ID(), ppOrderRecord.getDocumentNo());<NEW_LINE>//<NEW_LINE>// Complete if requested<NEW_LINE>if (isCompleteDocument(request, productPlanning)) {<NEW_LINE>documentBL.processEx(ppOrderRecord, IDocument.ACTION_Complete, IDocument.STATUS_Completed);<NEW_LINE>Loggables.addLog("Completed ppOrder; PP_Order_ID={}; DocumentNo={}", ppOrderRecord.getPP_Order_ID(), ppOrderRecord.getDocumentNo());<NEW_LINE>}<NEW_LINE>//<NEW_LINE>return ppOrderRecord;<NEW_LINE>}
ppOrderRecord.setPriorityRule(X_PP_Order.PRIORITYRULE_Medium);
635,048
private boolean draw(GC gc) {<NEW_LINE>boolean above = source.y_pos > target.y_pos;<NEW_LINE>int x1 = source.x_pos + flag_width / 2;<NEW_LINE>int x2 = target.x_pos + flag_width / 2;<NEW_LINE>int y1;<NEW_LINE>int y2;<NEW_LINE>if (above) {<NEW_LINE>y1 = source.y_pos - text_height;<NEW_LINE>y2 = target.y_pos + flag_height + text_height;<NEW_LINE>} else {<NEW_LINE>y1 = source.y_pos + flag_height + text_height;<NEW_LINE>y2 = target.y_pos - text_height;<NEW_LINE>}<NEW_LINE>int[] xy1 = scale.getXY(x1, y1);<NEW_LINE>int[] xy2 = scale.getXY(x2, y2);<NEW_LINE><MASK><NEW_LINE>boolean hovering = hover_node != null && (source.cc.equals(hover_node.cc) || target.cc.equals(hover_node.cc));<NEW_LINE>if (hovering) {<NEW_LINE>gc.setForeground(Colors.fadedGreen);<NEW_LINE>gc.setLineWidth(2);<NEW_LINE>} else {<NEW_LINE>long per_sec = count / 60;<NEW_LINE>int kinb = DisplayFormatters.getKinB();<NEW_LINE>if (per_sec > 10 * kinb * kinb) {<NEW_LINE>gc.setForeground(Colors.blue);<NEW_LINE>} else {<NEW_LINE>int blues_index;<NEW_LINE>if (per_sec > kinb * kinb) {<NEW_LINE>blues_index = Colors.BLUES_DARKEST;<NEW_LINE>} else if (per_sec > 100 * kinb) {<NEW_LINE>blues_index = Colors.BLUES_MIDDARK;<NEW_LINE>} else if (per_sec > 10 * kinb) {<NEW_LINE>blues_index = 5;<NEW_LINE>} else {<NEW_LINE>blues_index = 3;<NEW_LINE>}<NEW_LINE>gc.setForeground(Colors.blues[blues_index]);<NEW_LINE>}<NEW_LINE>gc.setLineWidth(1);<NEW_LINE>}<NEW_LINE>gc.drawLine(xy1[0], xy1[1], xy2[0], xy2[1]);<NEW_LINE>gc.setForeground(old);<NEW_LINE>return (hovering);<NEW_LINE>}
Color old = gc.getForeground();
1,505,123
public void startArray(String block) {<NEW_LINE>if (block.equals("paging")) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>Vector items = new Vector();<NEW_LINE>Object node;<NEW_LINE>if (stack.size() == 1) {<NEW_LINE>return;<NEW_LINE>} else {<NEW_LINE>if (stack.size() == 0) {<NEW_LINE>node = new Vector() {<NEW_LINE><NEW_LINE>public synchronized void addElement(Object obj) {<NEW_LINE>if (responseDestination != null) {<NEW_LINE>responseDestination.addItem(obj);<NEW_LINE>} else {<NEW_LINE>super.addElement(obj);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>};<NEW_LINE>stack.addElement(node);<NEW_LINE>}<NEW_LINE>node = stack.elementAt(stack.size() - 1);<NEW_LINE>}<NEW_LINE>if (node instanceof Hashtable) {<NEW_LINE>((Hashtable) node<MASK><NEW_LINE>} else {<NEW_LINE>((Vector) node).addElement(items);<NEW_LINE>}<NEW_LINE>stack.addElement(items);<NEW_LINE>}
).put(block, items);
1,411,289
public IntellijIdeInfo.TargetIdeInfo toProto() {<NEW_LINE>IntellijIdeInfo.TargetIdeInfo.Builder builder = IntellijIdeInfo.TargetIdeInfo.newBuilder().setKey(key.toProto()).setKindString(kind.getKindString()).addAllDeps(ProtoWrapper.mapToProtos(dependencies)).addAllTags(tags);<NEW_LINE>ProtoWrapper.unwrapAndSetIfNotNull(builder::setBuildFileArtifactLocation, buildFile);<NEW_LINE>ProtoWrapper.unwrapAndSetIfNotNull(builder::setCIdeInfo, cIdeInfo);<NEW_LINE>ProtoWrapper.unwrapAndSetIfNotNull(builder::setCToolchainIdeInfo, cToolchainIdeInfo);<NEW_LINE>ProtoWrapper.unwrapAndSetIfNotNull(builder::setJavaIdeInfo, javaIdeInfo);<NEW_LINE>ProtoWrapper.unwrapAndSetIfNotNull(builder::setAndroidIdeInfo, androidIdeInfo);<NEW_LINE>ProtoWrapper.unwrapAndSetIfNotNull(builder::setAndroidSdkIdeInfo, androidSdkIdeInfo);<NEW_LINE>ProtoWrapper.unwrapAndSetIfNotNull(builder::setAndroidAarIdeInfo, androidAarIdeInfo);<NEW_LINE>ProtoWrapper.unwrapAndSetIfNotNull(builder::setAndroidInstrumentationInfo, androidInstrumentationInfo);<NEW_LINE>ProtoWrapper.<MASK><NEW_LINE>ProtoWrapper.unwrapAndSetIfNotNull(builder::setGoIdeInfo, goIdeInfo);<NEW_LINE>ProtoWrapper.unwrapAndSetIfNotNull(builder::setJsIdeInfo, jsIdeInfo);<NEW_LINE>ProtoWrapper.unwrapAndSetIfNotNull(builder::setTsIdeInfo, tsIdeInfo);<NEW_LINE>ProtoWrapper.unwrapAndSetIfNotNull(builder::setDartIdeInfo, dartIdeInfo);<NEW_LINE>ProtoWrapper.unwrapAndSetIfNotNull(builder::setTestInfo, testIdeInfo);<NEW_LINE>ProtoWrapper.unwrapAndSetIfNotNull(builder::setJavaToolchainIdeInfo, javaToolchainIdeInfo);<NEW_LINE>ProtoWrapper.unwrapAndSetIfNotNull(builder::setKtToolchainIdeInfo, kotlinToolchainIdeInfo);<NEW_LINE>ProtoWrapper.setIfNotNull(builder::setSyncTimeMillis, syncTimeMillis);<NEW_LINE>return builder.build();<NEW_LINE>}
unwrapAndSetIfNotNull(builder::setPyIdeInfo, pyIdeInfo);
187,764
public static DescribeDcdnIpaUserDomainsResponse unmarshall(DescribeDcdnIpaUserDomainsResponse describeDcdnIpaUserDomainsResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeDcdnIpaUserDomainsResponse.setRequestId(_ctx.stringValue("DescribeDcdnIpaUserDomainsResponse.RequestId"));<NEW_LINE>describeDcdnIpaUserDomainsResponse.setPageNumber(_ctx.longValue("DescribeDcdnIpaUserDomainsResponse.PageNumber"));<NEW_LINE>describeDcdnIpaUserDomainsResponse.setPageSize(_ctx.longValue("DescribeDcdnIpaUserDomainsResponse.PageSize"));<NEW_LINE>describeDcdnIpaUserDomainsResponse.setTotalCount(_ctx.longValue("DescribeDcdnIpaUserDomainsResponse.TotalCount"));<NEW_LINE>List<PageData> domains <MASK><NEW_LINE>for (int i = 0; i < _ctx.lengthValue("DescribeDcdnIpaUserDomainsResponse.Domains.Length"); i++) {<NEW_LINE>PageData pageData = new PageData();<NEW_LINE>pageData.setDomainName(_ctx.stringValue("DescribeDcdnIpaUserDomainsResponse.Domains[" + i + "].DomainName"));<NEW_LINE>pageData.setCname(_ctx.stringValue("DescribeDcdnIpaUserDomainsResponse.Domains[" + i + "].Cname"));<NEW_LINE>pageData.setDomainStatus(_ctx.stringValue("DescribeDcdnIpaUserDomainsResponse.Domains[" + i + "].DomainStatus"));<NEW_LINE>pageData.setGmtCreated(_ctx.stringValue("DescribeDcdnIpaUserDomainsResponse.Domains[" + i + "].GmtCreated"));<NEW_LINE>pageData.setGmtModified(_ctx.stringValue("DescribeDcdnIpaUserDomainsResponse.Domains[" + i + "].GmtModified"));<NEW_LINE>pageData.setDescription(_ctx.stringValue("DescribeDcdnIpaUserDomainsResponse.Domains[" + i + "].Description"));<NEW_LINE>pageData.setSSLProtocol(_ctx.stringValue("DescribeDcdnIpaUserDomainsResponse.Domains[" + i + "].SSLProtocol"));<NEW_LINE>pageData.setResourceGroupId(_ctx.stringValue("DescribeDcdnIpaUserDomainsResponse.Domains[" + i + "].ResourceGroupId"));<NEW_LINE>pageData.setSandbox(_ctx.stringValue("DescribeDcdnIpaUserDomainsResponse.Domains[" + i + "].Sandbox"));<NEW_LINE>List<Source> sources = new ArrayList<Source>();<NEW_LINE>for (int j = 0; j < _ctx.lengthValue("DescribeDcdnIpaUserDomainsResponse.Domains[" + i + "].Sources.Length"); j++) {<NEW_LINE>Source source = new Source();<NEW_LINE>source.setType(_ctx.stringValue("DescribeDcdnIpaUserDomainsResponse.Domains[" + i + "].Sources[" + j + "].Type"));<NEW_LINE>source.setContent(_ctx.stringValue("DescribeDcdnIpaUserDomainsResponse.Domains[" + i + "].Sources[" + j + "].Content"));<NEW_LINE>source.setPort(_ctx.integerValue("DescribeDcdnIpaUserDomainsResponse.Domains[" + i + "].Sources[" + j + "].Port"));<NEW_LINE>source.setPriority(_ctx.stringValue("DescribeDcdnIpaUserDomainsResponse.Domains[" + i + "].Sources[" + j + "].Priority"));<NEW_LINE>source.setWeight(_ctx.stringValue("DescribeDcdnIpaUserDomainsResponse.Domains[" + i + "].Sources[" + j + "].Weight"));<NEW_LINE>sources.add(source);<NEW_LINE>}<NEW_LINE>pageData.setSources(sources);<NEW_LINE>domains.add(pageData);<NEW_LINE>}<NEW_LINE>describeDcdnIpaUserDomainsResponse.setDomains(domains);<NEW_LINE>return describeDcdnIpaUserDomainsResponse;<NEW_LINE>}
= new ArrayList<PageData>();
794,303
public static CreateDefaultEventResponse unmarshall(CreateDefaultEventResponse createDefaultEventResponse, UnmarshallerContext _ctx) {<NEW_LINE>createDefaultEventResponse.setRequestId(_ctx.stringValue("CreateDefaultEventResponse.RequestId"));<NEW_LINE>createDefaultEventResponse.setErrorDesc(_ctx.stringValue("CreateDefaultEventResponse.ErrorDesc"));<NEW_LINE>createDefaultEventResponse.setTraceId(_ctx.stringValue("CreateDefaultEventResponse.TraceId"));<NEW_LINE>createDefaultEventResponse.setErrorCode(_ctx.stringValue("CreateDefaultEventResponse.ErrorCode"));<NEW_LINE>createDefaultEventResponse.setSuccess(_ctx.booleanValue("CreateDefaultEventResponse.Success"));<NEW_LINE>Data data = new Data();<NEW_LINE>data.setEventId(_ctx.stringValue("CreateDefaultEventResponse.Data.EventId"));<NEW_LINE>data.setEventName(_ctx.stringValue("CreateDefaultEventResponse.Data.EventName"));<NEW_LINE>data.setEventCode(_ctx.stringValue("CreateDefaultEventResponse.Data.EventCode"));<NEW_LINE>data.setEventSourceId(_ctx.stringValue("CreateDefaultEventResponse.Data.EventSourceId"));<NEW_LINE>data.setEventSourceName(_ctx.stringValue("CreateDefaultEventResponse.Data.EventSourceName"));<NEW_LINE>data.setEventType(_ctx.longValue("CreateDefaultEventResponse.Data.EventType"));<NEW_LINE>data.setGmtCreate(_ctx.stringValue("CreateDefaultEventResponse.Data.GmtCreate"));<NEW_LINE>data.setGmtModified(_ctx.stringValue("CreateDefaultEventResponse.Data.GmtModified"));<NEW_LINE>data.setCreateId(_ctx.stringValue("CreateDefaultEventResponse.Data.CreateId"));<NEW_LINE>data.setModifiedId(_ctx.stringValue("CreateDefaultEventResponse.Data.ModifiedId"));<NEW_LINE>data.setOrgnizationId(_ctx.stringValue("CreateDefaultEventResponse.Data.OrgnizationId"));<NEW_LINE>data.setWorkspaceId<MASK><NEW_LINE>List<EventAttributeListItem> eventAttributeList = new ArrayList<EventAttributeListItem>();<NEW_LINE>for (int i = 0; i < _ctx.lengthValue("CreateDefaultEventResponse.Data.EventAttributeList.Length"); i++) {<NEW_LINE>EventAttributeListItem eventAttributeListItem = new EventAttributeListItem();<NEW_LINE>eventAttributeListItem.setEventId(_ctx.stringValue("CreateDefaultEventResponse.Data.EventAttributeList[" + i + "].EventId"));<NEW_LINE>eventAttributeListItem.setEventAttributeName(_ctx.stringValue("CreateDefaultEventResponse.Data.EventAttributeList[" + i + "].EventAttributeName"));<NEW_LINE>eventAttributeListItem.setEventAttributeCode(_ctx.stringValue("CreateDefaultEventResponse.Data.EventAttributeList[" + i + "].EventAttributeCode"));<NEW_LINE>eventAttributeListItem.setEventAttributeTypeCode(_ctx.longValue("CreateDefaultEventResponse.Data.EventAttributeList[" + i + "].EventAttributeTypeCode"));<NEW_LINE>eventAttributeList.add(eventAttributeListItem);<NEW_LINE>}<NEW_LINE>data.setEventAttributeList(eventAttributeList);<NEW_LINE>createDefaultEventResponse.setData(data);<NEW_LINE>return createDefaultEventResponse;<NEW_LINE>}
(_ctx.stringValue("CreateDefaultEventResponse.Data.WorkspaceId"));
1,653,196
public CreateConnectionResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>CreateConnectionResult createConnectionResult = new CreateConnectionResult();<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 createConnectionResult;<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("ConnectionArn", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>createConnectionResult.setConnectionArn(context.getUnmarshaller(String.class).unmarshall(context));<NEW_LINE>}<NEW_LINE>if (context.testExpression("ConnectionState", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>createConnectionResult.setConnectionState(context.getUnmarshaller(String.class).unmarshall(context));<NEW_LINE>}<NEW_LINE>if (context.testExpression("CreationTime", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>createConnectionResult.setCreationTime(DateJsonUnmarshallerFactory.getInstance("unixTimestamp").unmarshall(context));<NEW_LINE>}<NEW_LINE>if (context.testExpression("LastModifiedTime", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>createConnectionResult.setLastModifiedTime(DateJsonUnmarshallerFactory.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 createConnectionResult;<NEW_LINE>}
"unixTimestamp").unmarshall(context));
400,876
default double[][] buildDifferenceMatrix(List<Solution> solutions) {<NEW_LINE>int n = solutions.size();<NEW_LINE>IntVar[] vars = solutions.get(0).retrieveIntVars(true).toArray(new IntVar[0]);<NEW_LINE>double[][] m = new double[n][n];<NEW_LINE>for (int i = 0; i < n; i++) {<NEW_LINE>Solution soli = solutions.get(i);<NEW_LINE>for (int j = i + 1; j < n; j++) {<NEW_LINE>Solution solj = solutions.get(j);<NEW_LINE>double d = 0;<NEW_LINE>for (int k = 0; k < vars.length; k++) {<NEW_LINE>d += (soli.getIntVal(vars[k]) == solj.getIntVal(vars[<MASK><NEW_LINE>}<NEW_LINE>m[i][j] = m[j][i] = d / vars.length;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return m;<NEW_LINE>}
k])) ? 0. : 1.;
1,310,973
protected void writeSkipData(int level, DataOutput skipBuffer) throws IOException {<NEW_LINE>int delta = curDoc - lastSkipDoc[level];<NEW_LINE>skipBuffer.writeVInt(delta);<NEW_LINE>lastSkipDoc[level] = curDoc;<NEW_LINE>skipBuffer.writeVLong(curDocPointer - lastSkipDocPointer[level]);<NEW_LINE>lastSkipDocPointer[level] = curDocPointer;<NEW_LINE>if (fieldHasPositions) {<NEW_LINE>skipBuffer.writeVLong(curPosPointer - lastSkipPosPointer[level]);<NEW_LINE>lastSkipPosPointer[level] = curPosPointer;<NEW_LINE>skipBuffer.writeVInt(curPosBufferUpto);<NEW_LINE>if (fieldHasPayloads) {<NEW_LINE>skipBuffer.writeVInt(curPayloadByteUpto);<NEW_LINE>}<NEW_LINE>if (fieldHasOffsets || fieldHasPayloads) {<NEW_LINE>skipBuffer.writeVLong<MASK><NEW_LINE>lastSkipPayPointer[level] = curPayPointer;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>CompetitiveImpactAccumulator competitiveFreqNorms = curCompetitiveFreqNorms[level];<NEW_LINE>assert competitiveFreqNorms.getCompetitiveFreqNormPairs().size() > 0;<NEW_LINE>if (level + 1 < numberOfSkipLevels) {<NEW_LINE>curCompetitiveFreqNorms[level + 1].addAll(competitiveFreqNorms);<NEW_LINE>}<NEW_LINE>writeImpacts(competitiveFreqNorms, freqNormOut);<NEW_LINE>skipBuffer.writeVInt(Math.toIntExact(freqNormOut.size()));<NEW_LINE>freqNormOut.copyTo(skipBuffer);<NEW_LINE>freqNormOut.reset();<NEW_LINE>competitiveFreqNorms.clear();<NEW_LINE>}
(curPayPointer - lastSkipPayPointer[level]);
1,627,071
private Map<NetworkServiceDnsBackend, List<DnsStruct>> workoutDns(VmInstanceSpec spec) {<NEW_LINE>Map<NetworkServiceDnsBackend, List<DnsStruct>> map = new HashMap<NetworkServiceDnsBackend, List<DnsStruct>>();<NEW_LINE>Map<NetworkServiceProviderType, List<L3NetworkInventory>> providerMap = getNetworkServiceProviderMap(NetworkServiceType.DNS, VmNicSpec.getL3NetworkInventoryOfSpec(spec.getL3Networks()));<NEW_LINE>for (Map.Entry<NetworkServiceProviderType, List<L3NetworkInventory>> e : providerMap.entrySet()) {<NEW_LINE>NetworkServiceProviderType ptype = e.getKey();<NEW_LINE>List<DnsStruct> lst = new ArrayList<DnsStruct>();<NEW_LINE>for (L3NetworkInventory l3 : e.getValue()) {<NEW_LINE>lst.add(makeDnsStruct(spec, l3));<NEW_LINE>}<NEW_LINE>NetworkServiceDnsBackend bkd = dnsBackends.get(ptype);<NEW_LINE>if (bkd == null) {<NEW_LINE>throw new CloudRuntimeException(String.format("unable to find NetworkServiceDnsBackend[provider type: %s]", ptype));<NEW_LINE>}<NEW_LINE>map.put(bkd, lst);<NEW_LINE>if (logger.isTraceEnabled()) {<NEW_LINE>logger.trace(String.format("DNS Backend[%s] is about to apply entries: \n%s", bkd.getClass()<MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE>return map;<NEW_LINE>}
.getName(), lst));
667,392
public void updateNodes(Client client, Set<DiscoveryNode> nodes, RerouteService rerouteService) {<NEW_LINE>final List<AsyncNodeFetch> newFetches;<NEW_LINE>synchronized (mutex) {<NEW_LINE>// clean up nodes that left the cluster<NEW_LINE>nodeStates.keySet().removeIf(n -> nodes.contains(n) == false);<NEW_LINE>// skip nodes with known state<NEW_LINE>nodes.<MASK><NEW_LINE>// reach out to any new nodes<NEW_LINE>newFetches = new ArrayList<>(nodes.size());<NEW_LINE>for (DiscoveryNode newNode : nodes) {<NEW_LINE>final NodeStateHolder nodeStateHolder = new NodeStateHolder();<NEW_LINE>final NodeStateHolder prevState = nodeStates.put(newNode, nodeStateHolder);<NEW_LINE>assert prevState == null;<NEW_LINE>logger.trace("fetching frozen cache state for {}", newNode);<NEW_LINE>newFetches.add(new AsyncNodeFetch(client, rerouteService, newNode, nodeStateHolder));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>newFetches.forEach(Runnable::run);<NEW_LINE>}
removeAll(nodeStates.keySet());
1,404,981
protected Shape createImage(int width, int height) {<NEW_LINE>GeneralPath path = new GeneralPath();<NEW_LINE>int arrowWidth = height / 3;<NEW_LINE>float x1 = isInput ? 0 : width;<NEW_LINE>float x2 = isInput ? 3 * width / 4f : width / 4f;<NEW_LINE>float gap = (width - arrowWidth) / 2f;<NEW_LINE>path.moveTo(x1, gap);<NEW_LINE>path.lineTo(width / 2f, gap);<NEW_LINE>path.lineTo(width / 2f, height / 2f - arrowWidth);<NEW_LINE>path.lineTo(x2, height / 2);<NEW_LINE>path.lineTo(width / 2f, height / 2f + arrowWidth);<NEW_LINE>path.lineTo(width / 2f, gap + arrowWidth);<NEW_LINE>path.lineTo(x1, gap + arrowWidth);<NEW_LINE>path.closePath();<NEW_LINE>path.moveTo(width / 2f, height / 8f - 1);<NEW_LINE>path.lineTo(width - x1, height / 8f - 1);<NEW_LINE>path.moveTo(width / 2f, 7 * height / 8f + 1);<NEW_LINE>path.lineTo(width - x1, 7 * height / 8f + 1);<NEW_LINE>path.moveTo(x2, height / 4f);<NEW_LINE>path.lineTo(width - x1, height / 4f);<NEW_LINE>path.moveTo(x2, 3 * height / 4f);<NEW_LINE>path.lineTo(width - <MASK><NEW_LINE>path.moveTo(isInput ? 7 * width / 8f : width / 8f, height / 2f);<NEW_LINE>path.lineTo(width - x1, height / 2f);<NEW_LINE>return path;<NEW_LINE>}
x1, 3 * height / 4f);
759,773
public void init() {<NEW_LINE>model = new TimelineModel<>();<NEW_LINE>model.add(TimelineEvent.<String>builder().data("PrimeUI 1.1").startDate(LocalDate.of(2014, 6, 12)).build());<NEW_LINE>model.add(TimelineEvent.<String>builder().data("PrimeFaces 5.1.3").startDate(LocalDate.of(2014, 10, 11)).build());<NEW_LINE>model.add(TimelineEvent.<String>builder().data("PrimeUI 2.2").startDate(LocalDate.of(2015, 12, 8)).build());<NEW_LINE>model.add(TimelineEvent.<String>builder().data("Sentinel-Layout 1.1").startDate(LocalDate.of(2015, 3, 10)).build());<NEW_LINE>model.add(TimelineEvent.<String>builder().data("Spark-Layout 1.0").startDate(LocalDate.of(2015, 4, 3)).build());<NEW_LINE>model.add(TimelineEvent.<String>builder().data("Ronin-Layout 1.0").startDate(LocalDate.of(2015, 5, 15)).build());<NEW_LINE>model.add(TimelineEvent.<String>builder().data("Modena-Layout 1.0").startDate(LocalDate.of(2015, 7, 10)).build());<NEW_LINE>model.add(TimelineEvent.<String>builder().data("Rio-Layout 1.0").startDate(LocalDate.of(2015, 6, 15)).build());<NEW_LINE>model.add(TimelineEvent.<String>builder().data("Adamantium-Layout 1.0").startDate(LocalDate.of(2015, 9, 4)).build());<NEW_LINE>model.add(TimelineEvent.<String>builder().data("Titan-Layout 1.0").startDate(LocalDate.of(2015, 12, <MASK><NEW_LINE>model.add(TimelineEvent.<String>builder().data("Volt-Layout 1.0").startDate(LocalDate.of(2015, 10, 12)).build());<NEW_LINE>model.add(TimelineEvent.<String>builder().data("Atlas-Layout 1.0").startDate(LocalDate.of(2016, 1, 28)).build());<NEW_LINE>model.add(TimelineEvent.<String>builder().data("PrimeUI 4.1.0").startDate(LocalDate.of(2016, 2, 24)).build());<NEW_LINE>model.add(TimelineEvent.<String>builder().data("PrimeFaces 5.3.8").startDate(LocalDate.of(2016, 2, 29)).build());<NEW_LINE>model.add(TimelineEvent.<String>builder().data("PrimeNG 0.5").startDate(LocalDate.of(2016, 2, 29)).build());<NEW_LINE>}
14)).build());
1,696,132
public void editLeave(ActionRequest request, ActionResponse response) {<NEW_LINE>try {<NEW_LINE>User user = AuthUtils.getUser();<NEW_LINE>List<LeaveRequest> leaveList = Beans.get(LeaveRequestRepository.class).all().filter("self.user = ?1 AND self.company = ?2 AND self.statusSelect = 1", user, user.getActiveCompany()).fetch();<NEW_LINE>if (leaveList.isEmpty()) {<NEW_LINE>response.setView(ActionView.define(I18n.get("LeaveRequest")).model(LeaveRequest.class.getName()).add("form", "leave-request-form").map());<NEW_LINE>} else if (leaveList.size() == 1) {<NEW_LINE>response.setView(ActionView.define(I18n.get("LeaveRequest")).model(LeaveRequest.class.getName()).add("form", "leave-request-form").param("forceEdit", "true").context("_showRecord", String.valueOf(leaveList.get(0).getId(<MASK><NEW_LINE>} else {<NEW_LINE>response.setView(ActionView.define(I18n.get("LeaveRequest")).model(Wizard.class.getName()).add("form", "popup-leave-request-form").param("forceEdit", "true").param("popup", "true").param("show-toolbar", "false").param("show-confirm", "false").param("forceEdit", "true").param("popup-save", "false").map());<NEW_LINE>}<NEW_LINE>} catch (Exception e) {<NEW_LINE>TraceBackService.trace(response, e);<NEW_LINE>}<NEW_LINE>}
))).map());
816,883
public void run(RegressionEnvironment env) {<NEW_LINE>env.compileDeploy("@name('s0') select p0.n0 as a, p1[0].n0 as b, p1[1].n0 as c, p0 as d, p1 as e from MyMapWithAMap");<NEW_LINE>env.addListener("s0");<NEW_LINE>Map<String, Object> n0Bean1 = EventMapCore.makeMap(new Object[][] { { "n0", 1 } });<NEW_LINE>Map<String, Object> n0Bean21 = EventMapCore.makeMap(new Object[][] { { "n0", 2 } });<NEW_LINE>Map<String, Object> n0Bean22 = EventMapCore.makeMap(new Object[][] { { "n0", 3 } });<NEW_LINE>Map[] n0Bean2 = new Map[] { n0Bean21, n0Bean22 };<NEW_LINE>Map<String, Object> theEvent = EventMapCore.makeMap(new Object[][] { { "p0", n0Bean1 }, { "p1", n0Bean2 } });<NEW_LINE>env.sendEventMap(theEvent, "MyMapWithAMap");<NEW_LINE>env.assertEventNew("s0", eventResult -> {<NEW_LINE>EPAssertionUtil.assertProps(eventResult, "a,b,c,d".split(","), new Object[] { 1, 2, 3, n0Bean1 });<NEW_LINE>Map[] valueE = (Map[]) eventResult.get("e");<NEW_LINE>assertEquals(valueE[0], n0Bean2[0]);<NEW_LINE>assertEquals(valueE[1], n0Bean2[1]);<NEW_LINE>});<NEW_LINE>env.assertStatement("s0", statement -> {<NEW_LINE>EventType eventType = statement.getEventType();<NEW_LINE>assertEquals(Integer.class, eventType.getPropertyType("a"));<NEW_LINE>assertEquals(Integer.class, eventType.getPropertyType("b"));<NEW_LINE>assertEquals(Integer.class, eventType.getPropertyType("c"));<NEW_LINE>assertEquals(Map.class, eventType.getPropertyType("d"));<NEW_LINE>assertEquals(Map[].class<MASK><NEW_LINE>});<NEW_LINE>env.undeployAll();<NEW_LINE>}
, eventType.getPropertyType("e"));
158,505
private Map<String, Artifact> collectBomExtensions(MavenArtifactResolver mvn, final DefaultArtifact platformBom) throws MojoExecutionException {<NEW_LINE>final List<Dependency> bomDeps;<NEW_LINE>try {<NEW_LINE>bomDeps = mvn.resolveDescriptor(platformBom).getManagedDependencies();<NEW_LINE>} catch (Exception e) {<NEW_LINE>throw new MojoExecutionException("Failed to resolve platform BOM " + platformBom, e);<NEW_LINE>}<NEW_LINE>final Map<String, Artifact> bomExtensions = new HashMap<>(bomDeps.size());<NEW_LINE>for (Dependency dep : bomDeps) {<NEW_LINE>final Artifact artifact = dep.getArtifact();<NEW_LINE>if (ignoredGroupIds.contains(artifact.getGroupId()) || !artifact.getExtension().equals("jar") || "javadoc".equals(artifact.getClassifier()) || "tests".equals(artifact.getClassifier()) || "sources".equals(artifact.getClassifier())) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>analyzeArtifact(mvn.resolve(artifact<MASK><NEW_LINE>} catch (Exception e) {<NEW_LINE>getLog().warn("Failed to resolve " + artifact + " from managed dependencies of BOM " + platformBom);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return bomExtensions;<NEW_LINE>}
).getArtifact(), bomExtensions);
1,639,687
public void reload() {<NEW_LINE>LOG.info("reload KafkaFederationSinkContext.");<NEW_LINE>try {<NEW_LINE>SortTaskConfig newSortTaskConfig = SortClusterConfigHolder.getTaskConfig(taskName);<NEW_LINE>if (newSortTaskConfig == null) {<NEW_LINE>LOG.error("newSortTaskConfig is null.");<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (this.sortTaskConfig != null && this.sortTaskConfig.equals(newSortTaskConfig)) {<NEW_LINE>LOG.info("Same sortTaskConfig, do nothing.");<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>this.sortTaskConfig = newSortTaskConfig;<NEW_LINE>this.producerContext = new Context(this.sortTaskConfig.getSinkParams());<NEW_LINE>LOG.info("reload idTopicMap");<NEW_LINE>Map<String, KafkaIdConfig> newIdConfigMap = new ConcurrentHashMap<>();<NEW_LINE>List<Map<String, String>> idList = this.sortTaskConfig.getIdParams();<NEW_LINE>for (Map<String, String> idParam : idList) {<NEW_LINE>KafkaIdConfig idConfig = new KafkaIdConfig(idParam);<NEW_LINE>newIdConfigMap.put(idConfig.getUid(), idConfig);<NEW_LINE>}<NEW_LINE>LOG.info("reload clusterConfig");<NEW_LINE>CacheClusterConfig clusterConfig = new CacheClusterConfig();<NEW_LINE>clusterConfig.setClusterName(this.taskName);<NEW_LINE>clusterConfig.setParams(this.sortTaskConfig.getSinkParams());<NEW_LINE>List<CacheClusterConfig> <MASK><NEW_LINE>newClusterConfigList.add(clusterConfig);<NEW_LINE>this.idConfigMap = newIdConfigMap;<NEW_LINE>this.clusterConfigList = newClusterConfigList;<NEW_LINE>} catch (Throwable e) {<NEW_LINE>LOG.error(e.getMessage(), e);<NEW_LINE>}<NEW_LINE>}
newClusterConfigList = new ArrayList<>();
437,169
public void deleteSource(final SourceRead source) throws JsonValidationException, IOException, ConfigNotFoundException {<NEW_LINE>// "delete" all connections associated with source as well.<NEW_LINE>// Delete connections first in case it fails in the middle, source will still be visible<NEW_LINE>final WorkspaceIdRequestBody workspaceIdRequestBody = new WorkspaceIdRequestBody().workspaceId(source.getWorkspaceId());<NEW_LINE>for (final ConnectionRead connectionRead : connectionsHandler.listConnectionsForWorkspace(workspaceIdRequestBody).getConnections()) {<NEW_LINE>if (!connectionRead.getSourceId().equals(source.getSourceId())) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>connectionsHandler.<MASK><NEW_LINE>}<NEW_LINE>final ConnectorSpecification spec = getSpecFromSourceId(source.getSourceId());<NEW_LINE>final var fullConfig = secretsRepositoryReader.getSourceConnectionWithSecrets(source.getSourceId()).getConfiguration();<NEW_LINE>// persist<NEW_LINE>persistSourceConnection(source.getName(), source.getSourceDefinitionId(), source.getWorkspaceId(), source.getSourceId(), true, fullConfig, spec);<NEW_LINE>}
deleteConnection(connectionRead.getConnectionId());
786,354
public static ListSecurityPoliciesResponse unmarshall(ListSecurityPoliciesResponse listSecurityPoliciesResponse, UnmarshallerContext _ctx) {<NEW_LINE>listSecurityPoliciesResponse.setRequestId(_ctx.stringValue("ListSecurityPoliciesResponse.RequestId"));<NEW_LINE>listSecurityPoliciesResponse.setMaxResults(_ctx.integerValue("ListSecurityPoliciesResponse.MaxResults"));<NEW_LINE>listSecurityPoliciesResponse.setNextToken(_ctx.stringValue("ListSecurityPoliciesResponse.NextToken"));<NEW_LINE>listSecurityPoliciesResponse.setTotalCount(_ctx.integerValue("ListSecurityPoliciesResponse.TotalCount"));<NEW_LINE>List<SecurityPolicy> securityPolicies = new ArrayList<SecurityPolicy>();<NEW_LINE>for (int i = 0; i < _ctx.lengthValue("ListSecurityPoliciesResponse.SecurityPolicies.Length"); i++) {<NEW_LINE>SecurityPolicy securityPolicy = new SecurityPolicy();<NEW_LINE>securityPolicy.setResourceGroupId(_ctx.stringValue<MASK><NEW_LINE>securityPolicy.setSecurityPolicyId(_ctx.stringValue("ListSecurityPoliciesResponse.SecurityPolicies[" + i + "].SecurityPolicyId"));<NEW_LINE>securityPolicy.setSecurityPolicyName(_ctx.stringValue("ListSecurityPoliciesResponse.SecurityPolicies[" + i + "].SecurityPolicyName"));<NEW_LINE>securityPolicy.setSecurityPolicyStatus(_ctx.stringValue("ListSecurityPoliciesResponse.SecurityPolicies[" + i + "].SecurityPolicyStatus"));<NEW_LINE>List<String> ciphers = new ArrayList<String>();<NEW_LINE>for (int j = 0; j < _ctx.lengthValue("ListSecurityPoliciesResponse.SecurityPolicies[" + i + "].Ciphers.Length"); j++) {<NEW_LINE>ciphers.add(_ctx.stringValue("ListSecurityPoliciesResponse.SecurityPolicies[" + i + "].Ciphers[" + j + "]"));<NEW_LINE>}<NEW_LINE>securityPolicy.setCiphers(ciphers);<NEW_LINE>List<String> tLSVersions = new ArrayList<String>();<NEW_LINE>for (int j = 0; j < _ctx.lengthValue("ListSecurityPoliciesResponse.SecurityPolicies[" + i + "].TLSVersions.Length"); j++) {<NEW_LINE>tLSVersions.add(_ctx.stringValue("ListSecurityPoliciesResponse.SecurityPolicies[" + i + "].TLSVersions[" + j + "]"));<NEW_LINE>}<NEW_LINE>securityPolicy.setTLSVersions(tLSVersions);<NEW_LINE>securityPolicies.add(securityPolicy);<NEW_LINE>}<NEW_LINE>listSecurityPoliciesResponse.setSecurityPolicies(securityPolicies);<NEW_LINE>return listSecurityPoliciesResponse;<NEW_LINE>}
("ListSecurityPoliciesResponse.SecurityPolicies[" + i + "].ResourceGroupId"));
748,827
public static QueryCustomerLabelResponse unmarshall(QueryCustomerLabelResponse queryCustomerLabelResponse, UnmarshallerContext context) {<NEW_LINE>queryCustomerLabelResponse.setSuccess(context.booleanValue("QueryCustomerLabelResponse.Success"));<NEW_LINE>queryCustomerLabelResponse.setCode(context.stringValue("QueryCustomerLabelResponse.Code"));<NEW_LINE>queryCustomerLabelResponse.setMessage(context.stringValue("QueryCustomerLabelResponse.Message"));<NEW_LINE>List<CustomerLabel> data <MASK><NEW_LINE>for (int i = 0; i < context.lengthValue("QueryCustomerLabelResponse.Data.Length"); i++) {<NEW_LINE>CustomerLabel customerLabel = new CustomerLabel();<NEW_LINE>customerLabel.setLabel(context.stringValue("QueryCustomerLabelResponse.Data[" + i + "].Label"));<NEW_LINE>customerLabel.setLabelSeries(context.stringValue("QueryCustomerLabelResponse.Data[" + i + "].LabelSeries"));<NEW_LINE>data.add(customerLabel);<NEW_LINE>}<NEW_LINE>queryCustomerLabelResponse.setData(data);<NEW_LINE>return queryCustomerLabelResponse;<NEW_LINE>}
= new ArrayList<CustomerLabel>();
1,349,203
final UpdateDeviceStatusResult executeUpdateDeviceStatus(UpdateDeviceStatusRequest updateDeviceStatusRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(updateDeviceStatusRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<UpdateDeviceStatusRequest> request = null;<NEW_LINE>Response<UpdateDeviceStatusResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new UpdateDeviceStatusRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(updateDeviceStatusRequest));<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, "UpdateDeviceStatus");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<UpdateDeviceStatusResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new UpdateDeviceStatusResultJsonUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
1,839,543
private Work arrivingMergeSameJob(AeiObjects aeiObjects, Manual manual, List<String> identities) throws Exception {<NEW_LINE>if (!BooleanUtils.isTrue(manual.getManualMergeSameJobActivity())) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>List<String> exists = this.arrivingSameJobActivityExistIdentities(aeiObjects, manual);<NEW_LINE>if (ListTools.isNotEmpty(exists)) {<NEW_LINE>Work other = aeiObjects.getWorks().stream().filter(o -> StringUtils.equals(aeiObjects.getWork().getJob(), o.getJob()) && StringUtils.equals(aeiObjects.getWork().getActivity(), o.getActivity()) && (!Objects.equals(aeiObjects.getWork(), o))).findFirst().orElse(null);<NEW_LINE>if (null != other) {<NEW_LINE>identities.removeAll(exists);<NEW_LINE>if (ListTools.isEmpty(identities)) {<NEW_LINE>this.mergeTaskCompleted(aeiObjects, aeiObjects.getWork(), other);<NEW_LINE>this.mergeRead(aeiObjects, aeiObjects.getWork(), other);<NEW_LINE>this.mergeReadCompleted(aeiObjects, aeiObjects.getWork(), other);<NEW_LINE>this.mergeReview(aeiObjects, aeiObjects.getWork(), other);<NEW_LINE>this.mergeAttachment(aeiObjects, aeiObjects.getWork(), other);<NEW_LINE>this.mergeWorkLog(aeiObjects, aeiObjects.getWork(), other);<NEW_LINE>if (ListTools.size(aeiObjects.getWork().getSplitTokenList()) > ListTools.size(other.getSplitTokenList())) {<NEW_LINE>other.setSplitTokenList(aeiObjects.getWork().getSplitTokenList());<NEW_LINE>other.setSplitToken(aeiObjects.getWork().getSplitToken());<NEW_LINE>other.setSplitValue(aeiObjects.getWork().getSplitValue());<NEW_LINE>other.setSplitting(true);<NEW_LINE>}<NEW_LINE>aeiObjects.<MASK><NEW_LINE>aeiObjects.getDeleteWorks().add(aeiObjects.getWork());<NEW_LINE>return other;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return null;<NEW_LINE>}
getUpdateWorks().add(other);
99,924
public Xml.Attribute visitAttribute(XMLParser.AttributeContext ctx) {<NEW_LINE>return convert(ctx, (c, prefix) -> {<NEW_LINE>Xml.Ident key = convert(c.Name(), (t, p) -> new Xml.Ident(randomId(), p, Markers.EMPTY, t.getText()));<NEW_LINE>String beforeEquals = convert(c.EQUALS(), <MASK><NEW_LINE>Xml.Attribute.Value value = convert(c.STRING(), (v, p) -> new Xml.Attribute.Value(randomId(), p, Markers.EMPTY, v.getText().startsWith("'") ? Xml.Attribute.Value.Quote.Single : Xml.Attribute.Value.Quote.Double, v.getText().substring(1, c.STRING().getText().length() - 1)));<NEW_LINE>return new Xml.Attribute(randomId(), prefix, Markers.EMPTY, key, beforeEquals, value);<NEW_LINE>});<NEW_LINE>}
(e, p) -> p);
1,652,696
public static boolean validateGitea(JReleaserContext context, JReleaserContext.Mode mode, Gitea gitea, Errors errors) {<NEW_LINE>if (null == gitea)<NEW_LINE>return false;<NEW_LINE>context.getLogger().debug("release.gitea");<NEW_LINE>validateGitService(context, mode, gitea, errors);<NEW_LINE>if (isBlank(gitea.getApiEndpoint())) {<NEW_LINE>errors.configuration(RB<MASK><NEW_LINE>}<NEW_LINE>if (context.getModel().getProject().isSnapshot()) {<NEW_LINE>gitea.getPrerelease().setEnabled(true);<NEW_LINE>}<NEW_LINE>gitea.getPrerelease().setPattern(checkProperty(context, PRERELEASE_PATTERN, "release.gitea.prerelease.pattern", gitea.getPrerelease().getPattern(), ""));<NEW_LINE>gitea.getPrerelease().isPrerelease(context.getModel().getProject().getResolvedVersion());<NEW_LINE>if (!gitea.isDraftSet()) {<NEW_LINE>gitea.setDraft(checkProperty(context, DRAFT, "gitea.draft", null, false));<NEW_LINE>}<NEW_LINE>if (gitea.isDraft()) {<NEW_LINE>gitea.getMilestone().setClose(false);<NEW_LINE>}<NEW_LINE>return gitea.isEnabled();<NEW_LINE>}
.$("validation_must_not_be_blank", "gitea.apiEndpoint"));
1,284,417
public RelDataType inferReturnType(SqlOperatorBinding opBinding) {<NEW_LINE>Preconditions.checkArgument(opBinding instanceof SqlCallBinding, "this method must be invoke during validating, rather than RexNode building.");<NEW_LINE>SqlCallBinding callBinding = (SqlCallBinding) opBinding;<NEW_LINE>SqlCall ifCall = callBinding.getCall();<NEW_LINE>String operatorName = callBinding.getOperator().getName().toUpperCase();<NEW_LINE>if (!supportedOperators.contains(operatorName)) {<NEW_LINE>GeneralUtil.nestedException("Unsupported operator: " + operatorName);<NEW_LINE>}<NEW_LINE>int startPos = "IF".equals(operatorName) ? 1 : 0;<NEW_LINE>List<SqlNode> operandList = ifCall.getOperandList();<NEW_LINE>ArrayList<SqlNode> nullList = new ArrayList<>();<NEW_LINE>List<RelDataType> argTypesNotNull = new ArrayList<>();<NEW_LINE>for (int i = startPos; i < operandList.size(); i++) {<NEW_LINE>SqlNode operand = operandList.get(i);<NEW_LINE>if (SqlUtil.isNullLiteral(operand, false)) {<NEW_LINE>nullList.add(operand);<NEW_LINE>} else {<NEW_LINE>RelDataType operandType = callBinding.getValidator().deriveType(<MASK><NEW_LINE>argTypesNotNull.add(operandType);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return returnTypeOfControlFlowFunction(nullList, argTypesNotNull, callBinding);<NEW_LINE>}
callBinding.getScope(), operand);
168,467
void mergeRealms(OsAccountRealm sourceRealm, OsAccountRealm destRealm, CaseDbTransaction trans) throws TskCoreException {<NEW_LINE>// Update accounts<NEW_LINE>db.getOsAccountManager().mergeOsAccountsForRealms(sourceRealm, destRealm, trans);<NEW_LINE>// Update the sourceRealm realm<NEW_LINE>CaseDbConnection connection = trans.getConnection();<NEW_LINE>try (Statement statement = connection.createStatement()) {<NEW_LINE>String updateStr = "UPDATE tsk_os_account_realms SET db_status = " + OsAccountRealm.RealmDbStatus.MERGED.getId() + ", merged_into = " + destRealm.getRealmId() + ", realm_signature = '" + makeMergedRealmSignature() + "' " <MASK><NEW_LINE>connection.executeUpdate(statement, updateStr);<NEW_LINE>} catch (SQLException ex) {<NEW_LINE>throw new TskCoreException("Error updating status of realm with id: " + sourceRealm.getRealmId(), ex);<NEW_LINE>}<NEW_LINE>// Update the destination realm if it doesn't have the name or addr set and the source realm does<NEW_LINE>if (!destRealm.getRealmAddr().isPresent() && sourceRealm.getRealmAddr().isPresent()) {<NEW_LINE>updateRealm(destRealm, sourceRealm.getRealmAddr().get(), null, trans.getConnection());<NEW_LINE>} else if (destRealm.getRealmNames().isEmpty() && !sourceRealm.getRealmNames().isEmpty()) {<NEW_LINE>updateRealm(destRealm, null, sourceRealm.getRealmNames().get(0), trans.getConnection());<NEW_LINE>}<NEW_LINE>}
+ " WHERE id = " + sourceRealm.getRealmId();
1,626,840
// header structure for analyzer<NEW_LINE>public DataType toDataType() throws DuplicateNameException, IOException {<NEW_LINE>Structure structure = new StructureDataType("yaffs2Hdr", 0);<NEW_LINE>structure.add(DWORD, "objectType", null);<NEW_LINE>structure.add(DWORD, "parentObjectId", null);<NEW_LINE>structure.add(WORD, "checksum", null);<NEW_LINE>structure.add(STRING, YAFFS2Constants.FILE_NAME_SIZE, "fileName", null);<NEW_LINE>structure.add(WORD, "unknown1", null);<NEW_LINE>structure.add(DWORD, "ystMode", null);<NEW_LINE>structure.add(DWORD, "ystUId", null);<NEW_LINE>structure.add(DWORD, "ystGId", null);<NEW_LINE>structure.add(DWORD, "ystATime", null);<NEW_LINE>structure.add(DWORD, "ystMTime", null);<NEW_LINE>structure.add(DWORD, "ystCTime", null);<NEW_LINE>structure.add(DWORD, "fileSizeLow", null);<NEW_LINE>structure.add(DWORD, "equivId", null);<NEW_LINE>structure.add(STRING, YAFFS2Constants.ALIAS_FILE_NAME_SIZE, "aliasFileName", null);<NEW_LINE>structure.add(DWORD, "ystRDev", null);<NEW_LINE>structure.add(QWORD, "winCTime", null);<NEW_LINE>structure.add(QWORD, "winATime", null);<NEW_LINE>structure.add(QWORD, "winMTime", null);<NEW_LINE>structure.add(DWORD, "inbandObjId", null);<NEW_LINE>structure.<MASK><NEW_LINE>structure.add(DWORD, "fileSizeHigh", null);<NEW_LINE>structure.add(DWORD, "reserved", null);<NEW_LINE>structure.add(DWORD, "shadowsObject", null);<NEW_LINE>structure.add(DWORD, "isShrink", null);<NEW_LINE>structure.add(new ArrayDataType(BYTE, YAFFS2Constants.EMPTY_DATA_SIZE, BYTE.getLength()), "emptyData", null);<NEW_LINE>return structure;<NEW_LINE>}
add(DWORD, "inbandIsShrink", null);
1,100,679
// The protobuf definition ChatMessage cannot be changed as it would break backward compatibility.<NEW_LINE>public static ChatMessage fromProto(protobuf.ChatMessage proto, int messageVersion) {<NEW_LINE>// If we get a msg from an old client type will be ordinal 0 which is the dispute entry and as we only added<NEW_LINE>// the trade case it is the desired behaviour.<NEW_LINE>final ChatMessage chatMessage = new ChatMessage(SupportType.fromProto(proto.getType()), proto.getTradeId(), proto.getTraderId(), proto.getSenderIsTrader(), proto.getMessage(), new ArrayList<>(proto.getAttachmentsList().stream().map(Attachment::fromProto).collect(Collectors.toList())), NodeAddress.fromProto(proto.getSenderNodeAddress()), proto.getDate(), proto.getArrived(), proto.getStoredInMailbox(), proto.getUid(), messageVersion, proto.getAcknowledged(), proto.getSendMessageError().isEmpty() ? null : proto.getSendMessageError(), proto.getAckError().isEmpty() ? null : proto.getAckError(<MASK><NEW_LINE>chatMessage.setSystemMessage(proto.getIsSystemMessage());<NEW_LINE>return chatMessage;<NEW_LINE>}
), proto.getWasDisplayed());
743,705
public static int indexOf(long v) {<NEW_LINE>if (v <= 0) {<NEW_LINE>return 0;<NEW_LINE>} else if (v <= 4) {<NEW_LINE>return (int) v;<NEW_LINE>} else {<NEW_LINE>int lz = Long.numberOfLeadingZeros(v);<NEW_LINE>int shift = 64 - lz - 1;<NEW_LINE>long prevPowerOf2 = (v >> shift) << shift;<NEW_LINE>long prevPowerOf4 = prevPowerOf2;<NEW_LINE>if (shift % 2 != 0) {<NEW_LINE>shift--;<NEW_LINE>prevPowerOf4 = prevPowerOf2 >> 1;<NEW_LINE>}<NEW_LINE>long base = prevPowerOf4;<NEW_LINE>long delta = base / 3;<NEW_LINE>int offset = (int) (<MASK><NEW_LINE>int pos = offset + POWER_OF_4_INDEX[shift / 2];<NEW_LINE>return (pos >= BUCKET_VALUES.length - 1) ? BUCKET_VALUES.length - 1 : pos + 1;<NEW_LINE>}<NEW_LINE>}
(v - base) / delta);
1,716,038
public void write(org.apache.thrift.protocol.TProtocol prot, reportTabletStatus_args struct) throws org.apache.thrift.TException {<NEW_LINE>org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;<NEW_LINE>java.util.BitSet optionals = new java.util.BitSet();<NEW_LINE>if (struct.isSetTinfo()) {<NEW_LINE>optionals.set(0);<NEW_LINE>}<NEW_LINE>if (struct.isSetCredentials()) {<NEW_LINE>optionals.set(1);<NEW_LINE>}<NEW_LINE>if (struct.isSetServerName()) {<NEW_LINE>optionals.set(2);<NEW_LINE>}<NEW_LINE>if (struct.isSetStatus()) {<NEW_LINE>optionals.set(3);<NEW_LINE>}<NEW_LINE>if (struct.isSetTablet()) {<NEW_LINE>optionals.set(4);<NEW_LINE>}<NEW_LINE><MASK><NEW_LINE>if (struct.isSetTinfo()) {<NEW_LINE>struct.tinfo.write(oprot);<NEW_LINE>}<NEW_LINE>if (struct.isSetCredentials()) {<NEW_LINE>struct.credentials.write(oprot);<NEW_LINE>}<NEW_LINE>if (struct.isSetServerName()) {<NEW_LINE>oprot.writeString(struct.serverName);<NEW_LINE>}<NEW_LINE>if (struct.isSetStatus()) {<NEW_LINE>oprot.writeI32(struct.status.getValue());<NEW_LINE>}<NEW_LINE>if (struct.isSetTablet()) {<NEW_LINE>struct.tablet.write(oprot);<NEW_LINE>}<NEW_LINE>}
oprot.writeBitSet(optionals, 5);
1,127,144
public FieldLevelEncryptionProfileList unmarshall(StaxUnmarshallerContext context) throws Exception {<NEW_LINE>FieldLevelEncryptionProfileList fieldLevelEncryptionProfileList = new FieldLevelEncryptionProfileList();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>if (context.isStartOfDocument())<NEW_LINE>targetDepth += 1;<NEW_LINE>while (true) {<NEW_LINE><MASK><NEW_LINE>if (xmlEvent.isEndDocument())<NEW_LINE>return fieldLevelEncryptionProfileList;<NEW_LINE>if (xmlEvent.isAttribute() || xmlEvent.isStartElement()) {<NEW_LINE>if (context.testExpression("NextMarker", targetDepth)) {<NEW_LINE>fieldLevelEncryptionProfileList.setNextMarker(StringStaxUnmarshaller.getInstance().unmarshall(context));<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>if (context.testExpression("MaxItems", targetDepth)) {<NEW_LINE>fieldLevelEncryptionProfileList.setMaxItems(IntegerStaxUnmarshaller.getInstance().unmarshall(context));<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>if (context.testExpression("Quantity", targetDepth)) {<NEW_LINE>fieldLevelEncryptionProfileList.setQuantity(IntegerStaxUnmarshaller.getInstance().unmarshall(context));<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>if (context.testExpression("Items", targetDepth)) {<NEW_LINE>fieldLevelEncryptionProfileList.withItems(new ArrayList<FieldLevelEncryptionProfileSummary>());<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>if (context.testExpression("Items/FieldLevelEncryptionProfileSummary", targetDepth)) {<NEW_LINE>fieldLevelEncryptionProfileList.withItems(FieldLevelEncryptionProfileSummaryStaxUnmarshaller.getInstance().unmarshall(context));<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>} else if (xmlEvent.isEndElement()) {<NEW_LINE>if (context.getCurrentDepth() < originalDepth) {<NEW_LINE>return fieldLevelEncryptionProfileList;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
XMLEvent xmlEvent = context.nextEvent();
223,388
public List selectTriggerToAcquire(Connection conn, long noLaterThan, long noEarlierThan) throws SQLException {<NEW_LINE>PreparedStatement ps = null;<NEW_LINE>ResultSet rs = null;<NEW_LINE>List nextTriggers = new LinkedList();<NEW_LINE>try {<NEW_LINE>ps = conn.prepareStatement(rtp(SELECT_NEXT_TRIGGER_TO_ACQUIRE.toLowerCase()));<NEW_LINE>// Try to give jdbc driver a hint to hopefully not pull over<NEW_LINE>// more than the few rows we actually need.<NEW_LINE>ps.setFetchSize(5);<NEW_LINE>ps.setMaxRows(5);<NEW_LINE><MASK><NEW_LINE>ps.setBigDecimal(2, new BigDecimal(String.valueOf(noLaterThan)));<NEW_LINE>ps.setBigDecimal(3, new BigDecimal(String.valueOf(noEarlierThan)));<NEW_LINE>rs = ps.executeQuery();<NEW_LINE>while (rs.next() && nextTriggers.size() < 5) {<NEW_LINE>nextTriggers.add(new Key(rs.getString(COL_TRIGGER_NAME), rs.getString(COL_TRIGGER_GROUP)));<NEW_LINE>}<NEW_LINE>return nextTriggers;<NEW_LINE>} finally {<NEW_LINE>closeResultSet(rs);<NEW_LINE>closeStatement(ps);<NEW_LINE>}<NEW_LINE>}
ps.setString(1, STATE_WAITING);
747,353
protected NodeSnapshotStatus nodeOperation(NodeRequest request) {<NEW_LINE>Map<Snapshot, Map<ShardId, SnapshotIndexShardStatus>> snapshotMapBuilder = new HashMap<>();<NEW_LINE>try {<NEW_LINE>final String nodeId = clusterService.localNode().getId();<NEW_LINE>for (Snapshot snapshot : request.snapshots) {<NEW_LINE>Map<ShardId, IndexShardSnapshotStatus> shardsStatus = snapshotShardsService.currentSnapshotShards(snapshot);<NEW_LINE>if (shardsStatus == null) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>Map<ShardId, SnapshotIndexShardStatus> shardMapBuilder = new HashMap<>();<NEW_LINE>for (Map.Entry<ShardId, IndexShardSnapshotStatus> shardEntry : shardsStatus.entrySet()) {<NEW_LINE>final ShardId shardId = shardEntry.getKey();<NEW_LINE>final IndexShardSnapshotStatus.Copy lastSnapshotStatus = shardEntry.getValue().asCopy();<NEW_LINE>final IndexShardSnapshotStatus.<MASK><NEW_LINE>String shardNodeId = null;<NEW_LINE>if (stage != IndexShardSnapshotStatus.Stage.DONE && stage != IndexShardSnapshotStatus.Stage.FAILURE) {<NEW_LINE>// Store node id for the snapshots that are currently running.<NEW_LINE>shardNodeId = nodeId;<NEW_LINE>}<NEW_LINE>shardMapBuilder.put(shardEntry.getKey(), new SnapshotIndexShardStatus(shardId, lastSnapshotStatus, shardNodeId));<NEW_LINE>}<NEW_LINE>snapshotMapBuilder.put(snapshot, unmodifiableMap(shardMapBuilder));<NEW_LINE>}<NEW_LINE>return new NodeSnapshotStatus(clusterService.localNode(), unmodifiableMap(snapshotMapBuilder));<NEW_LINE>} catch (Exception e) {<NEW_LINE>throw new OpenSearchException("failed to load metadata", e);<NEW_LINE>}<NEW_LINE>}
Stage stage = lastSnapshotStatus.getStage();
223,778
final CreateScheduledActionResult executeCreateScheduledAction(CreateScheduledActionRequest createScheduledActionRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(createScheduledActionRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<CreateScheduledActionRequest> request = null;<NEW_LINE>Response<CreateScheduledActionResult> response = null;<NEW_LINE>try {<NEW_LINE><MASK><NEW_LINE>try {<NEW_LINE>request = new CreateScheduledActionRequestMarshaller().marshall(super.beforeMarshalling(createScheduledActionRequest));<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, "CreateScheduledAction");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>StaxResponseHandler<CreateScheduledActionResult> responseHandler = new StaxResponseHandler<CreateScheduledActionResult>(new CreateScheduledActionResultStaxUnmarshaller());<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);
618,370
private void mapReferences(@NonNull final EDICctopInvoicVType invoice, @NonNull final HEADERXrech headerXrech, @NonNull final String dateFormat, @NonNull final InvoicSettings settings) {<NEW_LINE>final HREFE1 buyerOrderRef = INVOIC_objectFactory.createHREFE1();<NEW_LINE>buyerOrderRef.setDOCUMENTID(headerXrech.getDOCUMENTID());<NEW_LINE>buyerOrderRef.setREFERENCEQUAL(ReferenceQual.ORBU.name());<NEW_LINE>final String poReference = validateString(invoice.getPOReference(), "@FillMandatory@ @POReference@");<NEW_LINE>buyerOrderRef.setREFERENCE(poReference);<NEW_LINE>buyerOrderRef.setREFERENCEDATE1(toFormattedStringDate(toDate(invoice.getDateOrdered()), dateFormat));<NEW_LINE>headerXrech.getHREFE1().add(buyerOrderRef);<NEW_LINE>if (settings.isInvoicORSE()) {<NEW_LINE>final <MASK><NEW_LINE>sellerOrderRef.setDOCUMENTID(headerXrech.getDOCUMENTID());<NEW_LINE>sellerOrderRef.setREFERENCEQUAL(ReferenceQual.ORSE.name());<NEW_LINE>sellerOrderRef.setREFERENCE(invoice.getEDICctop111V().getCOrderID().toString());<NEW_LINE>sellerOrderRef.setREFERENCEDATE1(toFormattedStringDate(toDate(invoice.getDateOrdered()), dateFormat));<NEW_LINE>headerXrech.getHREFE1().add(sellerOrderRef);<NEW_LINE>}<NEW_LINE>if (!isEmpty(invoice.getShipmentDocumentno())) {<NEW_LINE>final HREFE1 despatchAdvRef = INVOIC_objectFactory.createHREFE1();<NEW_LINE>despatchAdvRef.setDOCUMENTID(headerXrech.getDOCUMENTID());<NEW_LINE>despatchAdvRef.setREFERENCEQUAL(ReferenceQual.DADV.name());<NEW_LINE>despatchAdvRef.setREFERENCE(invoice.getShipmentDocumentno());<NEW_LINE>despatchAdvRef.setREFERENCEDATE1(toFormattedStringDate(toDate(invoice.getMovementDate()), dateFormat));<NEW_LINE>headerXrech.getHREFE1().add(despatchAdvRef);<NEW_LINE>}<NEW_LINE>}
HREFE1 sellerOrderRef = INVOIC_objectFactory.createHREFE1();
1,731,246
final ExecuteStatementResult executeExecuteStatement(ExecuteStatementRequest executeStatementRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(executeStatementRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<ExecuteStatementRequest> request = null;<NEW_LINE>Response<ExecuteStatementResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new ExecuteStatementRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(executeStatementRequest));<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, "ExecuteStatement");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<ExecuteStatementResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ExecuteStatementResultJsonUnmarshaller());<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, "DynamoDB");
1,626,220
public void validate() {<NEW_LINE>super.validate();<NEW_LINE>if (ask() == null) {<NEW_LINE>throw LOGGER.logExceptionAsError(new IllegalArgumentException("Missing required property ask in model ContentKeyPolicyFairPlayConfiguration"));<NEW_LINE>}<NEW_LINE>if (fairPlayPfxPassword() == null) {<NEW_LINE>throw LOGGER.logExceptionAsError(new IllegalArgumentException("Missing required property fairPlayPfxPassword in model" + " ContentKeyPolicyFairPlayConfiguration"));<NEW_LINE>}<NEW_LINE>if (fairPlayPfx() == null) {<NEW_LINE>throw LOGGER.logExceptionAsError(new IllegalArgumentException("Missing required property fairPlayPfx in model ContentKeyPolicyFairPlayConfiguration"));<NEW_LINE>}<NEW_LINE>if (rentalAndLeaseKeyType() == null) {<NEW_LINE>throw LOGGER.logExceptionAsError(<MASK><NEW_LINE>}<NEW_LINE>if (offlineRentalConfiguration() != null) {<NEW_LINE>offlineRentalConfiguration().validate();<NEW_LINE>}<NEW_LINE>}
new IllegalArgumentException("Missing required property rentalAndLeaseKeyType in model" + " ContentKeyPolicyFairPlayConfiguration"));
222,785
static Transaction decodeFrontier(final RLPInput input, final boolean goQuorumCompatibilityMode) {<NEW_LINE>input.enterList();<NEW_LINE>final Transaction.Builder builder = Transaction.builder().type(TransactionType.FRONTIER).nonce(input.readLongScalar()).gasPrice(Wei.of(input.readUInt256Scalar())).gasLimit(input.readLongScalar()).to(input.readBytes(v -> v.size() == 0 ? null : Address.wrap(v))).value(Wei.of(input.readUInt256Scalar())).<MASK><NEW_LINE>final BigInteger v = input.readBigIntegerScalar();<NEW_LINE>final byte recId;<NEW_LINE>Optional<BigInteger> chainId = Optional.empty();<NEW_LINE>if (goQuorumCompatibilityMode && GoQuorumPrivateTransactionDetector.isGoQuorumPrivateTransactionV(v)) {<NEW_LINE>builder.v(v);<NEW_LINE>recId = v.subtract(GO_QUORUM_PRIVATE_TRANSACTION_V_VALUE_MIN).byteValueExact();<NEW_LINE>} else if (v.equals(REPLAY_UNPROTECTED_V_BASE) || v.equals(REPLAY_UNPROTECTED_V_BASE_PLUS_1)) {<NEW_LINE>recId = v.subtract(REPLAY_UNPROTECTED_V_BASE).byteValueExact();<NEW_LINE>} else if (v.compareTo(REPLAY_PROTECTED_V_MIN) > 0) {<NEW_LINE>chainId = Optional.of(v.subtract(REPLAY_PROTECTED_V_BASE).divide(TWO));<NEW_LINE>recId = v.subtract(TWO.multiply(chainId.get()).add(REPLAY_PROTECTED_V_BASE)).byteValueExact();<NEW_LINE>} else {<NEW_LINE>throw new RuntimeException(String.format("An unsupported encoded `v` value of %s was found", v));<NEW_LINE>}<NEW_LINE>final BigInteger r = input.readUInt256Scalar().toUnsignedBigInteger();<NEW_LINE>final BigInteger s = input.readUInt256Scalar().toUnsignedBigInteger();<NEW_LINE>final SECPSignature signature = SIGNATURE_ALGORITHM.get().createSignature(r, s, recId);<NEW_LINE>input.leaveList();<NEW_LINE>chainId.ifPresent(builder::chainId);<NEW_LINE>return builder.signature(signature).build();<NEW_LINE>}
payload(input.readBytes());
139,212
/*<NEW_LINE>* (non-Javadoc)<NEW_LINE>*<NEW_LINE>* @see com.ibm.wsspi.injectionengine.InjectionBinding#merge(java.lang.annotation.Annotation, java.lang.Class, java.lang.reflect.Member)<NEW_LINE>*/<NEW_LINE>@Override<NEW_LINE>public void merge(JMSDestinationDefinition annotation, Class<?> instanceClass, Member member) throws InjectionException {<NEW_LINE>if (member != null) {<NEW_LINE>// JMSDestinationDefinition is a class-level annotation only.<NEW_LINE>throw new IllegalArgumentException(member.toString());<NEW_LINE>}<NEW_LINE>name = mergeAnnotationValue(name, isXmlNameSet, annotation.name(), JMSDestinationProperties.NAME.getAnnotationKey(), "");<NEW_LINE>interfaceName = mergeAnnotationValue(interfaceName, isXmlInterfaceNameSet, annotation.interfaceName(), JMSDestinationProperties.INTERFACE_NAME.getAnnotationKey(), "");<NEW_LINE>className = mergeAnnotationValue(className, isXmlclassNameSet, annotation.className(), JMSDestinationProperties.CLASS_NAME.getAnnotationKey(), "");<NEW_LINE>description = mergeAnnotationValue(description, isXmlDescriptionSet, annotation.description(), JMSDestinationProperties.DESCRIPTION.getAnnotationKey(), "");<NEW_LINE>destinationName = mergeAnnotationValue(destinationName, isXmlDestinationNameSet, annotation.destinationName(), JMSDestinationProperties.DESTINATION_NAME.getAnnotationKey(), "");<NEW_LINE>resourceAdapter = mergeAnnotationValue(resourceAdapter, isXmlResourceAdapterSet, annotation.resourceAdapter(), JMSDestinationProperties.RESOURCE_ADAPTER.getAnnotationKey(), "");<NEW_LINE>properties = mergeAnnotationProperties(properties, <MASK><NEW_LINE>}
xmlProperties, annotation.properties());
1,767,660
public void write(org.apache.thrift.protocol.TProtocol prot, TSummaryRequest struct) throws org.apache.thrift.TException {<NEW_LINE>org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;<NEW_LINE>java.util.BitSet optionals = new java.util.BitSet();<NEW_LINE>if (struct.isSetTableId()) {<NEW_LINE>optionals.set(0);<NEW_LINE>}<NEW_LINE>if (struct.isSetBounds()) {<NEW_LINE>optionals.set(1);<NEW_LINE>}<NEW_LINE>if (struct.isSetSummarizers()) {<NEW_LINE>optionals.set(2);<NEW_LINE>}<NEW_LINE>if (struct.isSetSummarizerPattern()) {<NEW_LINE>optionals.set(3);<NEW_LINE>}<NEW_LINE>oprot.writeBitSet(optionals, 4);<NEW_LINE>if (struct.isSetTableId()) {<NEW_LINE>oprot.writeString(struct.tableId);<NEW_LINE>}<NEW_LINE>if (struct.isSetBounds()) {<NEW_LINE>struct.bounds.write(oprot);<NEW_LINE>}<NEW_LINE>if (struct.isSetSummarizers()) {<NEW_LINE>{<NEW_LINE>oprot.writeI32(<MASK><NEW_LINE>for (TSummarizerConfiguration _iter126 : struct.summarizers) {<NEW_LINE>_iter126.write(oprot);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (struct.isSetSummarizerPattern()) {<NEW_LINE>oprot.writeString(struct.summarizerPattern);<NEW_LINE>}<NEW_LINE>}
struct.summarizers.size());
864,997
public void fullRedraw() {<NEW_LINE>LOG.debug("Full redraw");<NEW_LINE>// Done that.<NEW_LINE>noIncrementalRedraw = false;<NEW_LINE>// initialize css (needs clusterSize!)<NEW_LINE>addCSSClasses(segments.getHighestClusterCount());<NEW_LINE>layer = svgp.svgElement(SVGConstants.SVG_G_TAG);<NEW_LINE>visLayer = svgp.svgElement(SVGConstants.SVG_G_TAG);<NEW_LINE>// Setup scaling for canvas: 0 to StyleLibrary.SCALE (usually 100 to avoid<NEW_LINE>// a Java drawing bug!)<NEW_LINE>String transform = SVGUtil.makeMarginTransform(getWidth(), getHeight(), StyleLibrary.SCALE, StyleLibrary.SCALE, 0) + " translate(" + (StyleLibrary.SCALE * .5) + " " + (StyleLibrary.SCALE * .5) + ")";<NEW_LINE>visLayer.setAttribute(SVGConstants.SVG_TRANSFORM_ATTRIBUTE, transform);<NEW_LINE>ctrlLayer = svgp.svgElement(SVGConstants.SVG_G_TAG);<NEW_LINE>// and create svg elements<NEW_LINE>drawSegments();<NEW_LINE>// Build Interface<NEW_LINE>SVGCheckbox checkbox = new SVGCheckbox(showUnclusteredPairs, "Show unclustered pairs");<NEW_LINE>checkbox.addCheckBoxListener((e) -> toggleUnclusteredPairs(((SVGCheckbox) e.getSource()).isChecked()));<NEW_LINE>// Add ring:clustering info<NEW_LINE>Element clrInfo = drawClusteringInfo();<NEW_LINE>Element c = checkbox.renderCheckBox(svgp, 1., 5. + ParseUtil.parseDouble(clrInfo.getAttribute(<MASK><NEW_LINE>ctrlLayer.appendChild(clrInfo);<NEW_LINE>ctrlLayer.appendChild(c);<NEW_LINE>ctrlLayer.setAttribute(SVGConstants.SVG_TRANSFORM_ATTRIBUTE, "scale(" + (0.25 / StyleLibrary.SCALE) + ")");<NEW_LINE>layer.appendChild(visLayer);<NEW_LINE>layer.appendChild(ctrlLayer);<NEW_LINE>}
SVGConstants.SVG_HEIGHT_ATTRIBUTE)), 11);
1,277,650
public GetPersonTrackingResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>GetPersonTrackingResult getPersonTrackingResult = new GetPersonTrackingResult();<NEW_LINE>AwsJsonReader reader = context.getReader();<NEW_LINE>reader.beginObject();<NEW_LINE>while (reader.hasNext()) {<NEW_LINE>String name = reader.nextName();<NEW_LINE>if (name.equals("JobStatus")) {<NEW_LINE>getPersonTrackingResult.setJobStatus(StringJsonUnmarshaller.getInstance().unmarshall(context));<NEW_LINE>} else if (name.equals("StatusMessage")) {<NEW_LINE>getPersonTrackingResult.setStatusMessage(StringJsonUnmarshaller.getInstance().unmarshall(context));<NEW_LINE>} else if (name.equals("VideoMetadata")) {<NEW_LINE>getPersonTrackingResult.setVideoMetadata(VideoMetadataJsonUnmarshaller.getInstance().unmarshall(context));<NEW_LINE>} else if (name.equals("NextToken")) {<NEW_LINE>getPersonTrackingResult.setNextToken(StringJsonUnmarshaller.getInstance<MASK><NEW_LINE>} else if (name.equals("Persons")) {<NEW_LINE>getPersonTrackingResult.setPersons(new ListUnmarshaller<PersonDetection>(PersonDetectionJsonUnmarshaller.getInstance()).unmarshall(context));<NEW_LINE>} else {<NEW_LINE>reader.skipValue();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>reader.endObject();<NEW_LINE>return getPersonTrackingResult;<NEW_LINE>}
().unmarshall(context));
373,863
public boolean enter(DocumentType docType) {<NEW_LINE>if (canonical) {<NEW_LINE>c14nNodeList.add(docType);<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>String name = docType.getName();<NEW_LINE>String pubId = docType.getPublicId();<NEW_LINE>String sysId = docType.getSystemId();<NEW_LINE>String internalSubset = docType.getInternalSubset();<NEW_LINE>if (docType.getPreviousSibling() != null) {<NEW_LINE>buffer.append('\n');<NEW_LINE>}<NEW_LINE>buffer.append("<!DOCTYPE ").append(name).append(' ');<NEW_LINE>if (pubId != null) {<NEW_LINE>buffer.append("PUBLIC \"").append<MASK><NEW_LINE>if (sysId != null) {<NEW_LINE>buffer.append(" \"").append(sysId).append('"');<NEW_LINE>}<NEW_LINE>} else if (sysId != null) {<NEW_LINE>buffer.append("SYSTEM \"").append(sysId).append('"');<NEW_LINE>}<NEW_LINE>if (internalSubset != null) {<NEW_LINE>buffer.append(' ').append('[');<NEW_LINE>buffer.append(internalSubset);<NEW_LINE>buffer.append(']');<NEW_LINE>}<NEW_LINE>buffer.append(">\n");<NEW_LINE>return true;<NEW_LINE>}
(pubId).append('"');
925,866
public static void assertPeriodCounts(Timeline timeline, int... expectedPeriodCounts) {<NEW_LINE>int windowCount = timeline.getWindowCount();<NEW_LINE>assertThat(windowCount<MASK><NEW_LINE>int[] accumulatedPeriodCounts = new int[windowCount + 1];<NEW_LINE>accumulatedPeriodCounts[0] = 0;<NEW_LINE>for (int i = 0; i < windowCount; i++) {<NEW_LINE>accumulatedPeriodCounts[i + 1] = accumulatedPeriodCounts[i] + expectedPeriodCounts[i];<NEW_LINE>}<NEW_LINE>assertThat(timeline.getPeriodCount()).isEqualTo(accumulatedPeriodCounts[accumulatedPeriodCounts.length - 1]);<NEW_LINE>Window window = new Window();<NEW_LINE>Period period = new Period();<NEW_LINE>for (int i = 0; i < windowCount; i++) {<NEW_LINE>timeline.getWindow(i, window);<NEW_LINE>assertThat(window.firstPeriodIndex).isEqualTo(accumulatedPeriodCounts[i]);<NEW_LINE>assertThat(window.lastPeriodIndex).isEqualTo(accumulatedPeriodCounts[i + 1] - 1);<NEW_LINE>}<NEW_LINE>int expectedWindowIndex = 0;<NEW_LINE>for (int i = 0; i < timeline.getPeriodCount(); i++) {<NEW_LINE>timeline.getPeriod(i, period, true);<NEW_LINE>while (i >= accumulatedPeriodCounts[expectedWindowIndex + 1]) {<NEW_LINE>expectedWindowIndex++;<NEW_LINE>}<NEW_LINE>assertThat(period.windowIndex).isEqualTo(expectedWindowIndex);<NEW_LINE>Object periodUid = Assertions.checkNotNull(period.uid);<NEW_LINE>assertThat(timeline.getIndexOfPeriod(periodUid)).isEqualTo(i);<NEW_LINE>assertThat(timeline.getUidOfPeriod(i)).isEqualTo(periodUid);<NEW_LINE>for (int repeatMode : REPEAT_MODES) {<NEW_LINE>if (i < accumulatedPeriodCounts[expectedWindowIndex + 1] - 1) {<NEW_LINE>assertThat(timeline.getNextPeriodIndex(i, period, window, repeatMode, false)).isEqualTo(i + 1);<NEW_LINE>} else {<NEW_LINE>int nextWindow = timeline.getNextWindowIndex(expectedWindowIndex, repeatMode, false);<NEW_LINE>int nextPeriod = nextWindow == C.INDEX_UNSET ? C.INDEX_UNSET : accumulatedPeriodCounts[nextWindow];<NEW_LINE>assertThat(timeline.getNextPeriodIndex(i, period, window, repeatMode, false)).isEqualTo(nextPeriod);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
).isEqualTo(expectedPeriodCounts.length);
1,004,440
// </editor-fold>//GEN-END:initComponents<NEW_LINE>private void testConnectionActionPerformed(java.awt.event.ActionEvent evt) {<NEW_LINE>// GEN-FIRST:event_testConnectionActionPerformed<NEW_LINE>if (!portTextField.getText().isEmpty()) {<NEW_LINE>try {<NEW_LINE>Integer.parseInt(portTextField.getText());<NEW_LINE>} catch (Exception e) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>Connection conn = null;<NEW_LINE>try {<NEW_LINE>conn = getSelectedSQLDriver().getConnection(SQLUtils.getUrl(getSelectedSQLDriver(), hostTextField.getText(), (portTextField.getText().isEmpty() ? 0 : Integer.parseInt(portTextField.getText())), dbTextField.getText()), userTextField.getText(), new String(pwdTextField.getPassword()));<NEW_LINE>String message = NbBundle.getMessage(EdgeListPanel.class, "EdgeListPanel.alert.connection_successful");<NEW_LINE>NotifyDescriptor.Message e = new NotifyDescriptor.<MASK><NEW_LINE>DialogDisplayer.getDefault().notifyLater(e);<NEW_LINE>} catch (SQLException ex) {<NEW_LINE>NotifyDescriptor.Exception e = new NotifyDescriptor.Exception(ex);<NEW_LINE>DialogDisplayer.getDefault().notifyLater(e);<NEW_LINE>} finally {<NEW_LINE>if (conn != null) {<NEW_LINE>try {<NEW_LINE>conn.close();<NEW_LINE>Logger.getLogger("").info("Database connection terminated");<NEW_LINE>} catch (Exception e) {
Message(message, NotifyDescriptor.INFORMATION_MESSAGE);
45,300
protected void onCreate(Bundle savedInstanceState) {<NEW_LINE>super.onCreate(savedInstanceState);<NEW_LINE>setContentView(R.layout.activity_main);<NEW_LINE>// authentication with an API key or named user is required to access basemaps and other<NEW_LINE>// location services<NEW_LINE>ArcGISRuntimeEnvironment.setApiKey(BuildConfig.API_KEY);<NEW_LINE>// create MapView from layout<NEW_LINE>mMapView = findViewById(R.id.mapView);<NEW_LINE>// create a Streets BaseMap<NEW_LINE>ArcGISMap map = new ArcGISMap(BasemapStyle.ARCGIS_STREETS);<NEW_LINE>// set the map to be displayed in this view<NEW_LINE>mMapView.setMap(map);<NEW_LINE>// create image service raster as raster layer and add to map<NEW_LINE>final ImageServiceRaster imageServiceRaster = new ImageServiceRaster(getString(R.string.image_service_url));<NEW_LINE>final <MASK><NEW_LINE>map.getOperationalLayers().add(imageRasterLayer);<NEW_LINE>Spinner spinner = findViewById(R.id.spinner);<NEW_LINE>final List<String> renderRulesList = new ArrayList<>();<NEW_LINE>final ArrayAdapter<String> spinnerAdapter = new ArrayAdapter<>(this, android.R.layout.simple_list_item_1, renderRulesList);<NEW_LINE>spinner.setAdapter(spinnerAdapter);<NEW_LINE>// zoom to the extent of the raster service<NEW_LINE>imageRasterLayer.addDoneLoadingListener(() -> {<NEW_LINE>if (imageRasterLayer.getLoadStatus() == LoadStatus.LOADED) {<NEW_LINE>// zoom to extent of raster<NEW_LINE>mMapView.setViewpointGeometryAsync(imageServiceRaster.getServiceInfo().getFullExtent());<NEW_LINE>// get the predefined rendering rules and add to spinner<NEW_LINE>List<RenderingRuleInfo> renderingRuleInfos = imageServiceRaster.getServiceInfo().getRenderingRuleInfos();<NEW_LINE>for (RenderingRuleInfo renderRuleInfo : renderingRuleInfos) {<NEW_LINE>String renderingRuleName = renderRuleInfo.getName();<NEW_LINE>renderRulesList.add(renderingRuleName);<NEW_LINE>// update array adapter with list update<NEW_LINE>spinnerAdapter.notifyDataSetChanged();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>});<NEW_LINE>// listen to the spinner<NEW_LINE>spinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void onItemSelected(AdapterView<?> adapterView, View view, int position, long id) {<NEW_LINE>applyRenderingRule(imageServiceRaster, position);<NEW_LINE>}<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void onNothingSelected(AdapterView<?> adapterView) {<NEW_LINE>Log.d("MainActivity", "Spinner nothing selected");<NEW_LINE>}<NEW_LINE>});<NEW_LINE>}
RasterLayer imageRasterLayer = new RasterLayer(imageServiceRaster);
859,623
public void findDepsForTargetFromConstructorArgs(BuildTarget buildTarget, CellNameResolver cellRoots, AbstractAndroidBundleDescriptionArg constructorArg, ImmutableCollection.Builder<BuildTarget> extraDepsBuilder, ImmutableCollection.Builder<BuildTarget> targetGraphOnlyDepsBuilder) {<NEW_LINE>javacFactory.addParseTimeDeps(targetGraphOnlyDepsBuilder, null, buildTarget.getTargetConfiguration());<NEW_LINE>javaOptions.apply(buildTarget.getTargetConfiguration()).addParseTimeDeps(<MASK><NEW_LINE>Optionals.addIfPresent(proGuardConfig.getProguardTarget(buildTarget.getTargetConfiguration()), extraDepsBuilder);<NEW_LINE>if (constructorArg.getRedex()) {<NEW_LINE>// If specified, this option may point to either a BuildTarget or a file.<NEW_LINE>Optional<BuildTarget> redexTarget = androidBuckConfig.getRedexTarget(buildTarget.getTargetConfiguration());<NEW_LINE>redexTarget.ifPresent(extraDepsBuilder::add);<NEW_LINE>}<NEW_LINE>}
targetGraphOnlyDepsBuilder, buildTarget.getTargetConfiguration());
727,184
public FinalHyperParameterTuningJobObjectiveMetric unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>FinalHyperParameterTuningJobObjectiveMetric finalHyperParameterTuningJobObjectiveMetric = new FinalHyperParameterTuningJobObjectiveMetric();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>JsonToken token = context.getCurrentToken();<NEW_LINE>if (token == null)<NEW_LINE>token = context.nextToken();<NEW_LINE>if (token == VALUE_NULL) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>while (true) {<NEW_LINE>if (token == null)<NEW_LINE>break;<NEW_LINE>if (token == FIELD_NAME || token == START_OBJECT) {<NEW_LINE>if (context.testExpression("Type", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>finalHyperParameterTuningJobObjectiveMetric.setType(context.getUnmarshaller(String.class).unmarshall(context));<NEW_LINE>}<NEW_LINE>if (context.testExpression("MetricName", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>finalHyperParameterTuningJobObjectiveMetric.setMetricName(context.getUnmarshaller(String.class).unmarshall(context));<NEW_LINE>}<NEW_LINE>if (context.testExpression("Value", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>finalHyperParameterTuningJobObjectiveMetric.setValue(context.getUnmarshaller(Float.<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 finalHyperParameterTuningJobObjectiveMetric;<NEW_LINE>}
class).unmarshall(context));
1,817,388
private AuthConfig runCredentialProvider(String hostName, String helperOrStoreName) throws Exception {<NEW_LINE>if (isBlank(hostName)) {<NEW_LINE>log.debug("There is no point in locating AuthConfig for blank hostName. Returning NULL to allow fallback");<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>final String credentialProgramName = getCredentialProgramName(helperOrStoreName);<NEW_LINE>final String data;<NEW_LINE>log.debug("Executing docker credential provider: {} to locate auth config for: {}", credentialProgramName, hostName);<NEW_LINE>try {<NEW_LINE>data = runCredentialProgram(hostName, credentialProgramName);<NEW_LINE>} catch (InvalidResultException e) {<NEW_LINE>final String responseErrorMsg = extractCredentialProviderErrorMessage(e);<NEW_LINE>if (!isBlank(responseErrorMsg)) {<NEW_LINE>String credentialsNotFoundMsg = getGenericCredentialsNotFoundMsg(credentialProgramName);<NEW_LINE>if (credentialsNotFoundMsg != null && credentialsNotFoundMsg.equals(responseErrorMsg)) {<NEW_LINE>log.info("Credential helper/store ({}) does not have credentials for {}", credentialProgramName, hostName);<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>log.debug("Failure running docker credential helper/store ({}) with output '{}'", credentialProgramName, responseErrorMsg);<NEW_LINE>} else {<NEW_LINE>log.debug("Failure running docker credential helper/store ({})", credentialProgramName);<NEW_LINE>}<NEW_LINE>throw e;<NEW_LINE>} catch (Exception e) {<NEW_LINE>log.debug("Failure running docker credential helper/store ({})", credentialProgramName);<NEW_LINE>throw e;<NEW_LINE>}<NEW_LINE>final JsonNode helperResponse = OBJECT_MAPPER.readTree(data);<NEW_LINE><MASK><NEW_LINE>final String username = helperResponse.at("/Username").asText();<NEW_LINE>final String password = helperResponse.at("/Secret").asText();<NEW_LINE>if ("<token>".equals(username)) {<NEW_LINE>return new AuthConfig().withIdentityToken(password);<NEW_LINE>} else {<NEW_LINE>return new AuthConfig().withRegistryAddress(helperResponse.at("/ServerURL").asText()).withUsername(username).withPassword(password);<NEW_LINE>}<NEW_LINE>}
log.debug("Credential helper/store provided auth config for: {}", hostName);
529,355
private String createAppClientProfileData(ActionContext context, MonitorDataFrame mdf, String appid, String appurl, String appgroup, Map<String, Object> appProfile) {<NEW_LINE>List<Map> clients = mdf.getElemInstances(appid, "clients");<NEW_LINE>long checkTime = System.currentTimeMillis();<NEW_LINE>long expireTime = 60000;<NEW_LINE>for (int i = 0; i < clients.size(); i++) {<NEW_LINE>Map client = clients.get(i);<NEW_LINE>@SuppressWarnings("unchecked")<NEW_LINE>Map<String, Object> cVals = (Map<String, Object>) client.get("values");<NEW_LINE>Long client_ts = (Long) cVals.get("ts");<NEW_LINE>if (client_ts == null) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>long client_timeout = checkTime - client_ts;<NEW_LINE>if (client_timeout < expireTime) {<NEW_LINE>cVals.put("state", "1");<NEW_LINE>} else if (client_timeout >= expireTime && client_timeout < expireTime * 2) {<NEW_LINE><MASK><NEW_LINE>} else if (client_timeout >= expireTime * 2) {<NEW_LINE>cVals.put("state", "-1");<NEW_LINE>}<NEW_LINE>}<NEW_LINE>String clientsStr = JSONHelper.toString(clients);<NEW_LINE>this.listener.onAppClientProfileCreate(context, mdf, appid, appurl, appgroup, appProfile, clients);<NEW_LINE>return clientsStr;<NEW_LINE>}
cVals.put("state", "0");
153,204
protected List findByCompanyId(String companyId) throws SystemException {<NEW_LINE>Session session = null;<NEW_LINE>try {<NEW_LINE>session = openSession();<NEW_LINE>StringBuffer query = new StringBuffer();<NEW_LINE>query.append("FROM UserTracker IN CLASS com.liferay.portal.ejb.UserTrackerHBM WHERE ");<NEW_LINE>query.append("companyId = ?");<NEW_LINE>query.append(" ");<NEW_LINE>Query q = session.createQuery(query.toString());<NEW_LINE>int queryPos = 0;<NEW_LINE>q<MASK><NEW_LINE>Iterator itr = q.list().iterator();<NEW_LINE>List list = new ArrayList();<NEW_LINE>while (itr.hasNext()) {<NEW_LINE>UserTrackerHBM userTrackerHBM = (UserTrackerHBM) itr.next();<NEW_LINE>list.add(UserTrackerHBMUtil.model(userTrackerHBM));<NEW_LINE>}<NEW_LINE>return list;<NEW_LINE>} catch (HibernateException he) {<NEW_LINE>throw new SystemException(he);<NEW_LINE>} finally {<NEW_LINE>HibernateUtil.closeSession(session);<NEW_LINE>}<NEW_LINE>}
.setString(queryPos++, companyId);
204,886
protected void parseCreateField(ParseContext context, List<IndexableField> fields) throws IOException {<NEW_LINE>final String value;<NEW_LINE>if (context.externalValueSet()) {<NEW_LINE>value = context<MASK><NEW_LINE>} else {<NEW_LINE>XContentParser parser = context.parser();<NEW_LINE>if (parser.currentToken() == XContentParser.Token.VALUE_NULL) {<NEW_LINE>value = fieldType().nullValueAsString();<NEW_LINE>} else {<NEW_LINE>value = parser.textOrNull();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (value == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>RawCollationKey key = collator.getRawCollationKey(value, null);<NEW_LINE>final BytesRef binaryValue = new BytesRef(key.bytes, 0, key.size);<NEW_LINE>if (fieldType().indexOptions() != IndexOptions.NONE || fieldType().stored()) {<NEW_LINE>Field field = new Field(fieldType().name(), binaryValue, fieldType());<NEW_LINE>fields.add(field);<NEW_LINE>}<NEW_LINE>if (fieldType().hasDocValues()) {<NEW_LINE>fields.add(getDVField.apply(fieldType().name(), binaryValue));<NEW_LINE>} else if (fieldType().indexOptions() != IndexOptions.NONE || fieldType().stored()) {<NEW_LINE>createFieldNamesField(context, fields);<NEW_LINE>}<NEW_LINE>}
.externalValue().toString();
1,014,944
public static byte[] readFile2BytesByMap(final File file) {<NEW_LINE>if (!UtilsBridge.isFileExists(file))<NEW_LINE>return null;<NEW_LINE>FileChannel fc = null;<NEW_LINE>try {<NEW_LINE>fc = new RandomAccessFile(file, "r").getChannel();<NEW_LINE>if (fc == null) {<NEW_LINE><MASK><NEW_LINE>return new byte[0];<NEW_LINE>}<NEW_LINE>int size = (int) fc.size();<NEW_LINE>MappedByteBuffer mbb = fc.map(FileChannel.MapMode.READ_ONLY, 0, size).load();<NEW_LINE>byte[] result = new byte[size];<NEW_LINE>mbb.get(result, 0, size);<NEW_LINE>return result;<NEW_LINE>} catch (IOException e) {<NEW_LINE>e.printStackTrace();<NEW_LINE>return null;<NEW_LINE>} finally {<NEW_LINE>try {<NEW_LINE>if (fc != null) {<NEW_LINE>fc.close();<NEW_LINE>}<NEW_LINE>} catch (IOException e) {<NEW_LINE>e.printStackTrace();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
Log.e("FileIOUtils", "fc is null.");
211,348
private RdSetElem toRdSetElem(Rd_set_elemContext ctx) {<NEW_LINE>if (ctx.rd_set_elem_asdot() != null) {<NEW_LINE>@Nullable<NEW_LINE>Entry<Uint16RangeExpr, Uint16RangeExpr> as = toUint32HighLowExpr(ctx.rd_set_elem_asdot());<NEW_LINE>if (as == null) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>return new RdSetAsDot(as.getKey(), as.getValue(), toUint16RangeExpr(ctx.rd_set_elem_lo16()));<NEW_LINE>} else if (ctx.asplain_hi16 != null) {<NEW_LINE>assert ctx.rd_set_elem_32() != null;<NEW_LINE>return new RdSetAsPlain16(new LiteralUint16(toInteger(ctx.asplain_hi16)), toUint32RangeExpr(ctx.rd_set_elem_32()));<NEW_LINE>} else if (ctx.asplain_hi32 != null) {<NEW_LINE>assert ctx.rd_set_elem_lo16() != null;<NEW_LINE>return new RdSetAsPlain32(toUint32RangeExpr(ctx.asplain_hi32), toUint16RangeExpr(ctx.rd_set_elem_lo16()));<NEW_LINE>} else if (ctx.IP_PREFIX() != null) {<NEW_LINE>assert ctx.rd_set_elem_lo16() != null;<NEW_LINE>return new RdSetIpPrefix(Prefix.parse(ctx.IP_PREFIX().getText()), toUint16RangeExpr(ctx.rd_set_elem_lo16()));<NEW_LINE>} else if (ctx.IP_ADDRESS() != null) {<NEW_LINE>assert ctx.rd_set_elem_lo16() != null;<NEW_LINE>return new RdSetIpAddress(toIp(ctx.IP_ADDRESS()), toUint16RangeExpr(ctx.rd_set_elem_lo16()));<NEW_LINE>} else if (ctx.DFA_REGEX() != null) {<NEW_LINE>return new RdSetDfaRegex(unquote(ctx.COMMUNITY_SET_REGEX().getText()));<NEW_LINE>} else {<NEW_LINE><MASK><NEW_LINE>return new RdSetIosRegex(unquote(ctx.COMMUNITY_SET_REGEX().getText()));<NEW_LINE>}<NEW_LINE>}
assert ctx.IOS_REGEX() != null;
878,084
public static String encodeObject(java.io.Serializable serializableObject, int options) throws java.io.IOException {<NEW_LINE>if (serializableObject == null) {<NEW_LINE>throw new NullPointerException("Cannot serialize a null object.");<NEW_LINE>}<NEW_LINE>// end if: null<NEW_LINE>// Streams<NEW_LINE>java.io.ByteArrayOutputStream baos = null;<NEW_LINE>java.io.OutputStream b64os = null;<NEW_LINE>java.util.zip.GZIPOutputStream gzos = null;<NEW_LINE>java.io.ObjectOutputStream oos = null;<NEW_LINE>try {<NEW_LINE>// ObjectOutputStream -> (GZIP) -> Base64 -> ByteArrayOutputStream<NEW_LINE>baos = new java.io.ByteArrayOutputStream();<NEW_LINE>b64os = new Base64.OutputStream(baos, ENCODE | options);<NEW_LINE>if ((options & GZIP) != 0) {<NEW_LINE>// Gzip<NEW_LINE>gzos = new java.util.zip.GZIPOutputStream(b64os);<NEW_LINE>oos = new java.io.ObjectOutputStream(gzos);<NEW_LINE>} else {<NEW_LINE>// Not gzipped<NEW_LINE>oos = new java.io.ObjectOutputStream(b64os);<NEW_LINE>}<NEW_LINE>oos.writeObject(serializableObject);<NEW_LINE>}// end try<NEW_LINE>catch (java.io.IOException e) {<NEW_LINE>// Catch it and then throw it immediately so that<NEW_LINE>// the finally{} block is called for cleanup.<NEW_LINE>throw e;<NEW_LINE>} finally // end catch<NEW_LINE>{<NEW_LINE>try {<NEW_LINE>oos.close();<NEW_LINE>} catch (Exception e) {<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>gzos.close();<NEW_LINE>} catch (Exception e) {<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>b64os.close();<NEW_LINE>} catch (Exception e) {<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>baos.close();<NEW_LINE>} catch (Exception e) {<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// end finally<NEW_LINE>// Return value according to relevant encoding.<NEW_LINE>try {<NEW_LINE>return new String(<MASK><NEW_LINE>}// end try<NEW_LINE>catch (java.io.UnsupportedEncodingException uue) {<NEW_LINE>// Fall back to some Java default<NEW_LINE>return new String(baos.toByteArray());<NEW_LINE>}<NEW_LINE>// end catch<NEW_LINE>}
baos.toByteArray(), PREFERRED_ENCODING);
994,379
protected boolean save(Config config, Connection conn, String tableName, String primaryKey, Record record) throws SQLException {<NEW_LINE>String[] pKeys = primaryKey.split(",");<NEW_LINE>List<Object> paras = new ArrayList<Object>();<NEW_LINE>StringBuilder sql = new StringBuilder();<NEW_LINE>Dialect dialect = config.getDialect();<NEW_LINE>dialect.forDbSave(tableName, pKeys, record, sql, paras);<NEW_LINE>// add sql debug support<NEW_LINE>return SqlDebugger.run(() -> {<NEW_LINE>try (PreparedStatement pst = dialect.isOracle() ? conn.prepareStatement(sql.toString(), pKeys) : conn.prepareStatement(sql.toString(), Statement.RETURN_GENERATED_KEYS)) {<NEW_LINE>dialect.fillStatement(pst, paras);<NEW_LINE>int result = pst.executeUpdate();<NEW_LINE>dialect.<MASK><NEW_LINE>return result >= 1;<NEW_LINE>}<NEW_LINE>}, config, sql.toString(), paras.toArray());<NEW_LINE>}
getRecordGeneratedKey(pst, record, pKeys);
1,441,030
public void migrate(final PrintStream stream, final ArchiveMarkFile markFile, final Catalog catalog, final File archiveDir) {<NEW_LINE>try (FileChannel timestampFile = MigrationUtils.createMigrationTimestampFile(archiveDir, markFile.decoder().version(), minimumVersion())) {<NEW_LINE>assert null != timestampFile;<NEW_LINE>catalog.forEach((recordingDescriptorOffset, headerEncoder, headerDecoder, encoder, decoder) -> {<NEW_LINE>final String version1Prefix = decoder.recordingId() + "-";<NEW_LINE>final String version1Suffix = ".rec";<NEW_LINE>String[] segmentFiles = archiveDir.list((dir, filename) -> filename.startsWith(version1Prefix) <MASK><NEW_LINE>if (null == segmentFiles) {<NEW_LINE>segmentFiles = ArrayUtil.EMPTY_STRING_ARRAY;<NEW_LINE>}<NEW_LINE>migrateRecording(stream, archiveDir, segmentFiles, version1Prefix, version1Suffix, headerEncoder, headerDecoder, encoder, decoder);<NEW_LINE>});<NEW_LINE>markFile.encoder().version(minimumVersion());<NEW_LINE>catalog.updateVersion(minimumVersion());<NEW_LINE>} catch (final IOException ex) {<NEW_LINE>LangUtil.rethrowUnchecked(ex);<NEW_LINE>}<NEW_LINE>}
&& filename.endsWith(version1Suffix));
429,984
// Initialize the stack frame name while we're on the execution thread<NEW_LINE>private String initName() throws DebugException {<NEW_LINE>verifyValidState(false);<NEW_LINE>Node node;<NEW_LINE>if (currentFrame == null) {<NEW_LINE>node = getContext().getInstrumentedNode();<NEW_LINE>} else {<NEW_LINE>node = currentFrame.getCallNode();<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>try {<NEW_LINE>if (node != null) {<NEW_LINE>Frame frame = findTruffleFrame(FrameAccess.READ_ONLY);<NEW_LINE>NodeLibrary nodeLibrary = NodeLibrary.getUncached();<NEW_LINE>if (nodeLibrary.hasRootInstance(node, frame)) {<NEW_LINE>Object instance = nodeLibrary.getRootInstance(node, frame);<NEW_LINE>InteropLibrary interop = InteropLibrary.getUncached();<NEW_LINE>if (interop.hasExecutableName(instance)) {<NEW_LINE>return interop.asString(interop.getExecutableName(instance));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>RootNode root = findCurrentRoot();<NEW_LINE>if (root == null) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>return root.getName();<NEW_LINE>} catch (ThreadDeath td) {<NEW_LINE>throw td;<NEW_LINE>} catch (Throwable ex) {<NEW_LINE>RootNode root = findCurrentRoot();<NEW_LINE>LanguageInfo languageInfo = root != null ? root.getLanguageInfo() : null;<NEW_LINE>throw DebugException.create(event.getSession(), ex, languageInfo);<NEW_LINE>}<NEW_LINE>}
node = InstrumentableNode.findInstrumentableParent(node);
1,507,381
public static <T, PT extends ObjectIntProcedure<? super T>> void forEachWithIndexInListOnExecutor(List<T> list, ObjectIntProcedureFactory<PT> procedureFactory, Combiner<PT> combiner, int minForkSize, int taskCount, ForkJoinPool executor) {<NEW_LINE>int size = list.size();<NEW_LINE>if (size < minForkSize || FJIterate.executedInsideOfForEach()) {<NEW_LINE><MASK><NEW_LINE>Iterate.forEachWithIndex(list, procedure);<NEW_LINE>if (combiner.useCombineOne()) {<NEW_LINE>combiner.combineOne(procedure);<NEW_LINE>} else {<NEW_LINE>combiner.combineAll(Lists.immutable.of(procedure));<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>int threadCount = Math.min(size, taskCount);<NEW_LINE>new FJListObjectIntProcedureRunner<>(combiner, threadCount).executeAndCombine(executor, procedureFactory, list);<NEW_LINE>}<NEW_LINE>}
PT procedure = procedureFactory.create();
1,356,485
public void modifyTestElement(TestElement te) {<NEW_LINE>te.clear();<NEW_LINE>super.configureTestElement(te);<NEW_LINE>te.setProperty(SmtpSampler.SERVER, smtpPanel.getServer());<NEW_LINE>te.setProperty(SmtpSampler.SERVER_PORT, smtpPanel.getPort());<NEW_LINE>// $NON-NLS-1$<NEW_LINE>te.setProperty(SmtpSampler.SERVER_TIMEOUT, smtpPanel.getTimeout(), "");<NEW_LINE>// $NON-NLS-1$<NEW_LINE>te.setProperty(SmtpSampler.SERVER_CONNECTION_TIMEOUT, smtpPanel.getConnectionTimeout(), "");<NEW_LINE>te.setProperty(SmtpSampler.MAIL_FROM, smtpPanel.getMailFrom());<NEW_LINE>te.setProperty(SmtpSampler.MAIL_REPLYTO, smtpPanel.getMailReplyTo());<NEW_LINE>te.setProperty(SmtpSampler.<MASK><NEW_LINE>te.setProperty(SmtpSampler.RECEIVER_CC, smtpPanel.getReceiverCC());<NEW_LINE>te.setProperty(SmtpSampler.RECEIVER_BCC, smtpPanel.getReceiverBCC());<NEW_LINE>te.setProperty(SmtpSampler.SUBJECT, smtpPanel.getSubject());<NEW_LINE>te.setProperty(SmtpSampler.SUPPRESS_SUBJECT, Boolean.toString(smtpPanel.isSuppressSubject()));<NEW_LINE>te.setProperty(SmtpSampler.INCLUDE_TIMESTAMP, Boolean.toString(smtpPanel.isIncludeTimestamp()));<NEW_LINE>te.setProperty(SmtpSampler.MESSAGE, smtpPanel.getBody());<NEW_LINE>te.setProperty(SmtpSampler.PLAIN_BODY, Boolean.toString(smtpPanel.isPlainBody()));<NEW_LINE>te.setProperty(SmtpSampler.ATTACH_FILE, smtpPanel.getAttachments());<NEW_LINE>SecuritySettingsPanel secPanel = smtpPanel.getSecuritySettingsPanel();<NEW_LINE>secPanel.modifyTestElement(te);<NEW_LINE>te.setProperty(SmtpSampler.USE_EML, smtpPanel.isUseEmlMessage());<NEW_LINE>te.setProperty(SmtpSampler.EML_MESSAGE_TO_SEND, smtpPanel.getEmlMessage());<NEW_LINE>te.setProperty(SmtpSampler.USE_AUTH, Boolean.toString(smtpPanel.isUseAuth()));<NEW_LINE>te.setProperty(SmtpSampler.PASSWORD, smtpPanel.getPassword());<NEW_LINE>te.setProperty(SmtpSampler.USERNAME, smtpPanel.getUsername());<NEW_LINE>te.setProperty(SmtpSampler.MESSAGE_SIZE_STATS, Boolean.toString(smtpPanel.isMessageSizeStatistics()));<NEW_LINE>te.setProperty(SmtpSampler.ENABLE_DEBUG, Boolean.toString(smtpPanel.isEnableDebug()));<NEW_LINE>te.setProperty(smtpPanel.getHeaderFields());<NEW_LINE>}
RECEIVER_TO, smtpPanel.getReceiverTo());
543,138
public DiscoverInfo discoverInfoNonBlocking(Jid entityID) {<NEW_LINE>DiscoverInfo discoverInfo = capsManager.getDiscoverInfoByUser(entityID);<NEW_LINE>EntityCapsManager.NodeVerHash <MASK><NEW_LINE>boolean isInfoValid = false;<NEW_LINE>if (discoverInfo != null && caps != null) {<NEW_LINE>isInfoValid = EntityCapsManager.verifyDiscoverInfoVersion(caps.getVer(), caps.getHash(), discoverInfo);<NEW_LINE>}<NEW_LINE>if (discoverInfo != null && isInfoValid)<NEW_LINE>return discoverInfo;<NEW_LINE>// if caps is not valid, has empty hash<NEW_LINE>if (cacheNonCaps) {<NEW_LINE>discoverInfo = nonCapsCache.get(entityID);<NEW_LINE>if (discoverInfo != null)<NEW_LINE>return discoverInfo;<NEW_LINE>}<NEW_LINE>// add to retrieve thread<NEW_LINE>retriever.addEntityForRetrieve(entityID, caps);<NEW_LINE>return null;<NEW_LINE>}
caps = EntityCapsManager.getNodeVerHashByJid(entityID);
100,569
private JButton createScrollButton(int orientation) {<NEW_LINE>darkMode = scrollbar instanceof DarkScrollBar;<NEW_LINE>if (darkMode) {<NEW_LINE>return createZeroButton();<NEW_LINE>}<NEW_LINE>CustomButton btn = new CustomButton();<NEW_LINE>btn.setBackground(darkMode ? trackColor2 : trackColor1);<NEW_LINE>btn.setContentAreaFilled(false);<NEW_LINE>btn.setHorizontalAlignment(JButton.CENTER);<NEW_LINE>btn.setMargin(new Insets(0, 0, 0, 0));<NEW_LINE>btn.setBorderPainted(false);<NEW_LINE>if (orientation == SwingConstants.NORTH) {<NEW_LINE>btn.setIcon(ImageResource.getIcon("up.png", 10, 10));<NEW_LINE>btn.setPreferredSize(new Dimension(XDMUtils.getScaledInt(15), XDMUtils.getScaledInt(18)));<NEW_LINE>}<NEW_LINE>if (orientation == SwingConstants.SOUTH) {<NEW_LINE>btn.setIcon(ImageResource.getIcon("down.png", 10, 10));<NEW_LINE>btn.setPreferredSize(new Dimension(XDMUtils.getScaledInt(15), XDMUtils.getScaledInt(18)));<NEW_LINE>}<NEW_LINE>if (orientation == SwingConstants.EAST) {<NEW_LINE>btn.setIcon(ImageResource.getIcon("right.png", 10, 10));<NEW_LINE>btn.setPreferredSize(new Dimension(XDMUtils.getScaledInt(18), XDMUtils.getScaledInt(15)));<NEW_LINE>}<NEW_LINE>if (orientation == SwingConstants.WEST) {<NEW_LINE>btn.setIcon(ImageResource.getIcon("left.png", 10, 10));<NEW_LINE>btn.setPreferredSize(new Dimension(XDMUtils.getScaledInt(18), <MASK><NEW_LINE>}<NEW_LINE>return btn;<NEW_LINE>}
XDMUtils.getScaledInt(15)));
1,707,961
public Loader<List<Recipient>> onCreateLoader(int id, Bundle args) {<NEW_LINE>switch(id) {<NEW_LINE>case LOADER_ID_FILTERING:<NEW_LINE>{<NEW_LINE>String query = args != null && args.containsKey(ARG_QUERY) ? args.getString(ARG_QUERY) : "";<NEW_LINE>adapter.setHighlight(query);<NEW_LINE>return new RecipientLoader(<MASK><NEW_LINE>}<NEW_LINE>case LOADER_ID_ALTERNATES:<NEW_LINE>{<NEW_LINE>Uri contactLookupUri = alternatesPopupRecipient.getContactLookupUri();<NEW_LINE>if (contactLookupUri != null) {<NEW_LINE>return new RecipientLoader(getContext(), cryptoProvider, contactLookupUri, true);<NEW_LINE>} else {<NEW_LINE>return new RecipientLoader(getContext(), cryptoProvider, alternatesPopupRecipient.address);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>throw new IllegalStateException("Unknown Loader ID: " + id);<NEW_LINE>}
getContext(), cryptoProvider, query);
1,719,691
List<TestSuite> createDerivedSuites(SortedMultisetTestSuiteBuilder<E> parentBuilder) {<NEW_LINE>List<TestSuite> derivedSuites = Lists.newArrayList();<NEW_LINE>if (!parentBuilder.getFeatures().contains(NoRecurse.DESCENDING)) {<NEW_LINE>derivedSuites.add(createDescendingSuite(parentBuilder));<NEW_LINE>}<NEW_LINE>if (parentBuilder.getFeatures().contains(SERIALIZABLE)) {<NEW_LINE>derivedSuites.add(createReserializedSuite(parentBuilder));<NEW_LINE>}<NEW_LINE>if (!parentBuilder.getFeatures().contains(NoRecurse.SUBMULTISET)) {<NEW_LINE>derivedSuites.add(createSubMultisetSuite(parentBuilder, Bound.NO_BOUND, Bound.EXCLUSIVE));<NEW_LINE>derivedSuites.add(createSubMultisetSuite(parentBuilder, Bound.NO_BOUND, Bound.INCLUSIVE));<NEW_LINE>derivedSuites.add(createSubMultisetSuite(parentBuilder, Bound.EXCLUSIVE, Bound.NO_BOUND));<NEW_LINE>derivedSuites.add(createSubMultisetSuite(parentBuilder, Bound.EXCLUSIVE, Bound.EXCLUSIVE));<NEW_LINE>derivedSuites.add(createSubMultisetSuite(parentBuilder, Bound.EXCLUSIVE, Bound.INCLUSIVE));<NEW_LINE>derivedSuites.add(createSubMultisetSuite(parentBuilder, Bound.INCLUSIVE, Bound.NO_BOUND));<NEW_LINE>derivedSuites.add(createSubMultisetSuite(parentBuilder, Bound.INCLUSIVE, Bound.EXCLUSIVE));<NEW_LINE>derivedSuites.add(createSubMultisetSuite(parentBuilder, Bound<MASK><NEW_LINE>}<NEW_LINE>return derivedSuites;<NEW_LINE>}
.INCLUSIVE, Bound.INCLUSIVE));
415,223
public int compareTo(updateTopology_result other) {<NEW_LINE>if (!getClass().equals(other.getClass())) {<NEW_LINE>return getClass().getName().compareTo(other.getClass().getName());<NEW_LINE>}<NEW_LINE>int lastComparison = 0;<NEW_LINE>lastComparison = Boolean.valueOf(is_set_e()).compareTo(other.is_set_e());<NEW_LINE>if (lastComparison != 0) {<NEW_LINE>return lastComparison;<NEW_LINE>}<NEW_LINE>if (is_set_e()) {<NEW_LINE>lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, other.e);<NEW_LINE>if (lastComparison != 0) {<NEW_LINE>return lastComparison;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>lastComparison = Boolean.valueOf(is_set_ite()).<MASK><NEW_LINE>if (lastComparison != 0) {<NEW_LINE>return lastComparison;<NEW_LINE>}<NEW_LINE>if (is_set_ite()) {<NEW_LINE>lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ite, other.ite);<NEW_LINE>if (lastComparison != 0) {<NEW_LINE>return lastComparison;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return 0;<NEW_LINE>}
compareTo(other.is_set_ite());
1,775,988
private void reportMatch(TokenEntry mark1, TokenEntry mark2, int dupes) {<NEW_LINE>Map<Integer, Match> matches = matchTree.get(dupes);<NEW_LINE>if (matches == null) {<NEW_LINE>matches = new TreeMap<>();<NEW_LINE><MASK><NEW_LINE>addNewMatch(mark1, mark2, dupes, matches);<NEW_LINE>} else {<NEW_LINE>Match matchA = matchTree.get(dupes).get(mark1.getIndex());<NEW_LINE>Match matchB = matchTree.get(dupes).get(mark2.getIndex());<NEW_LINE>if (matchA == null && matchB == null) {<NEW_LINE>addNewMatch(mark1, mark2, dupes, matches);<NEW_LINE>} else if (matchA == null) {<NEW_LINE>matchB.addTokenEntry(mark1);<NEW_LINE>matches.put(mark1.getIndex(), matchB);<NEW_LINE>} else if (matchB == null) {<NEW_LINE>matchA.addTokenEntry(mark2);<NEW_LINE>matches.put(mark2.getIndex(), matchA);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
matchTree.put(dupes, matches);
316,474
/*<NEW_LINE>@SuppressWarnings("unchecked")<NEW_LINE>@Override<NEW_LINE>public JsonSerializer<?> createContextual(SerializerProvider serializers, BeanProperty property) throws JsonMappingException {<NEW_LINE>JsonSerializer<?> ser = null;<NEW_LINE>Boolean unwrapSingle = null;<NEW_LINE>if (property != null) {<NEW_LINE>final AnnotationIntrospector intr = serializers.getAnnotationIntrospector();<NEW_LINE>AnnotatedMember m = property.getMember();<NEW_LINE>if (m != null) {<NEW_LINE>Object serDef = intr.findContentSerializer(m);<NEW_LINE>if (serDef != null) {<NEW_LINE>ser = serializers.serializerInstance(m, serDef);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>JsonFormat.Value format = findFormatOverrides(serializers, property, handledType());<NEW_LINE>if (format != null) {<NEW_LINE>unwrapSingle = format.getFeature(JsonFormat.Feature.WRITE_SINGLE_ELEM_ARRAYS_UNWRAPPED);<NEW_LINE>}<NEW_LINE>// [databind#124]: May have a content converter<NEW_LINE>ser = findContextualConvertingSerializer(serializers, property, ser);<NEW_LINE>if (ser == null) {<NEW_LINE>ser = serializers.<MASK><NEW_LINE>}<NEW_LINE>// Optimization: default serializer just writes String, so we can avoid a call:<NEW_LINE>if (isDefaultSerializer(ser)) {<NEW_LINE>if (Objects.equals(unwrapSingle, _unwrapSingle)) {<NEW_LINE>return this;<NEW_LINE>}<NEW_LINE>return _withResolved(property, unwrapSingle);<NEW_LINE>}<NEW_LINE>// otherwise...<NEW_LINE>// note: will never have TypeSerializer, because Strings are "natural" type<NEW_LINE>return new CollectionSerializer(serializers.constructType(String.class), true, /*TypeSerializer*/<NEW_LINE>null, (JsonSerializer<Object>) ser);<NEW_LINE>}
findContentValueSerializer(String.class, property);
1,655,429
public ProcStatReader reset() throws ProcStatUtil.ParseException {<NEW_LINE>// Be optimistic<NEW_LINE>mIsValid = true;<NEW_LINE>// First, try to move the pointer if a file exists<NEW_LINE>if (mFile != null) {<NEW_LINE>try {<NEW_LINE>mFile.seek(0);<NEW_LINE>} catch (IOException ioe) {<NEW_LINE>close();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// Otherwise try to open/reopen the file and fail<NEW_LINE>if (mFile == null) {<NEW_LINE>try {<NEW_LINE>mFile = new RandomAccessFile(mPath, "r");<NEW_LINE>} catch (IOException ioe) {<NEW_LINE>mIsValid = false;<NEW_LINE>close();<NEW_LINE>throw new ProcStatUtil.ParseException(<MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (mIsValid) {<NEW_LINE>mPosition = -1;<NEW_LINE>mBufferSize = 0;<NEW_LINE>mChar = 0;<NEW_LINE>mPrev = 0;<NEW_LINE>mRewound = false;<NEW_LINE>}<NEW_LINE>return this;<NEW_LINE>}
"RAF err: " + ioe.getMessage());
1,473,266
private void processPolymorphicChildren(OneToManyPolymorphicAssociation association) {<NEW_LINE>if (delegate.isEmpty()) {<NEW_LINE>// no need to process children if no models selected.<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>MetaModel childMetaModel = metaModelOf(association.getTargetClass());<NEW_LINE>Map<Object, List<Model>> childrenByParentId = new HashMap<>();<NEW_LINE>List<Object> ids = collect(metaModel.getIdName());<NEW_LINE>StringBuilder query = new StringBuilder().append("parent_id IN (");<NEW_LINE>appendQuestions(query, ids.size());<NEW_LINE>query.append(") AND parent_type = '").append(association.getTypeLabel()).append('\'');<NEW_LINE>for (Model child : new LazyList<>(query.toString(), childMetaModel, ids.toArray()).orderBy(childMetaModel.getIdName())) {<NEW_LINE>if (childrenByParentId.get(child.get("parent_id")) == null) {<NEW_LINE>childrenByParentId.put(child.get("parent_id"), new SuperLazyList<>());<NEW_LINE>}<NEW_LINE>childrenByParentId.get(child.get(<MASK><NEW_LINE>}<NEW_LINE>for (T parent : delegate) {<NEW_LINE>List<Model> children = childrenByParentId.get(parent.getId());<NEW_LINE>if (children != null) {<NEW_LINE>parent.setChildren(childMetaModel.getModelClass(), children);<NEW_LINE>} else {<NEW_LINE>parent.setChildren(childMetaModel.getModelClass(), new SuperLazyList<>());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
"parent_id")).add(child);
1,136,853
protected static void addObjectToBuilders(List<MetricsPacket.Builder> builders, JsonNode object) {<NEW_LINE>MetricsPacket.Builder builder = new MetricsPacket.Builder(ServiceId.toServiceId(object.get("application").textValue()));<NEW_LINE>builder.timestamp(object.get("timestamp").longValue());<NEW_LINE>if (object.has("status_code"))<NEW_LINE>builder.statusCode(object.get("status_code").intValue());<NEW_LINE>if (object.has("status_msg"))<NEW_LINE>builder.statusMessage(object.get<MASK><NEW_LINE>if (object.has("metrics")) {<NEW_LINE>JsonNode metrics = object.get("metrics");<NEW_LINE>Iterator<?> keys = metrics.fieldNames();<NEW_LINE>while (keys.hasNext()) {<NEW_LINE>String key = (String) keys.next();<NEW_LINE>builder.putMetric(MetricId.toMetricId(key), metrics.get(key).asLong());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>builders.add(builder);<NEW_LINE>}
("status_msg").textValue());
978,596
private void fixedExpiration() {<NEW_LINE>context.constructor.addStatement("this.expiresAfterAccessNanos = builder.getExpiresAfterAccessNanos()");<NEW_LINE>context.cache.addField(FieldSpec.builder(long.class, "expiresAfterAccessNanos").addModifiers(Modifier.VOLATILE).build());<NEW_LINE>context.cache.addMethod(MethodSpec.methodBuilder("expiresAfterAccess").addModifiers(context.protectedFinalModifiers()).addStatement("return (timerWheel == null)").returns(boolean.class).build());<NEW_LINE>context.cache.addMethod(MethodSpec.methodBuilder("expiresAfterAccessNanos").addModifiers(context.protectedFinalModifiers()).addStatement("return expiresAfterAccessNanos").returns(long<MASK><NEW_LINE>context.cache.addMethod(MethodSpec.methodBuilder("setExpiresAfterAccessNanos").addStatement("this.expiresAfterAccessNanos = expiresAfterAccessNanos").addParameter(long.class, "expiresAfterAccessNanos").addModifiers(context.protectedFinalModifiers()).build());<NEW_LINE>}
.class).build());
994,949
public Response processCitationPatentTXT(String text, int consolidate, boolean includeRawCitations) {<NEW_LINE>LOGGER.debug(methodLogIn());<NEW_LINE>Response response = null;<NEW_LINE>Engine engine = null;<NEW_LINE>try {<NEW_LINE>engine = Engine.getEngine(true);<NEW_LINE>List<PatentItem> patents = new ArrayList<PatentItem>();<NEW_LINE>List<BibDataSet> articles = new ArrayList<BibDataSet>();<NEW_LINE>text = text.replaceAll("\\t", " ");<NEW_LINE>String result = engine.processAllCitationsInPatent(text, articles, patents, consolidate, includeRawCitations);<NEW_LINE>if (result == null) {<NEW_LINE>response = Response.status(Status.NO_CONTENT).build();<NEW_LINE>} else {<NEW_LINE>// response = Response.status(Status.OK).entity(result).type(MediaType.APPLICATION_XML).build();<NEW_LINE>response = Response.status(Status.OK).entity(result).header(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_XML + "; charset=UTF-8").build();<NEW_LINE>}<NEW_LINE>} catch (NoSuchElementException nseExp) {<NEW_LINE>LOGGER.error("Could not get an engine from the pool within configured time. Sending service unavailable.");<NEW_LINE>response = Response.status(Status.SERVICE_UNAVAILABLE).build();<NEW_LINE>} catch (Exception e) {<NEW_LINE>LOGGER.error("An unexpected exception occurs. ", e);<NEW_LINE>response = Response.status(<MASK><NEW_LINE>} finally {<NEW_LINE>if (engine != null) {<NEW_LINE>GrobidPoolingFactory.returnEngine(engine);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>LOGGER.debug(methodLogOut());<NEW_LINE>return response;<NEW_LINE>}
Status.INTERNAL_SERVER_ERROR).build();
457,653
static final void writeACCoeffs(BitWriter bits, int[] qMat, int[] _in, int blocksPerSlice, int[] scan, int maxCoeff) {<NEW_LINE>int prevRun = 4;<NEW_LINE>int prevLevel = 2;<NEW_LINE>int run = 0;<NEW_LINE>for (int i = 1; i < maxCoeff; i++) {<NEW_LINE>int indp = scan[i];<NEW_LINE>for (int j = 0; j < blocksPerSlice; j++) {<NEW_LINE>int val = qScale(qMat, indp, _in[(<MASK><NEW_LINE>if (val == 0)<NEW_LINE>run++;<NEW_LINE>else {<NEW_LINE>writeCodeword(bits, runCodebooks[min(prevRun, 15)], run);<NEW_LINE>prevRun = run;<NEW_LINE>run = 0;<NEW_LINE>int level = getLevel(val);<NEW_LINE>writeCodeword(bits, levCodebooks[min(prevLevel, 9)], level - 1);<NEW_LINE>prevLevel = level;<NEW_LINE>bits.write1Bit(sign(val));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
j << 6) + indp]);
1,833,961
public edu.stanford.nlp.pipeline.CoreNLPProtos.TokensRegexRequest buildPartial() {<NEW_LINE>edu.stanford.nlp.pipeline.CoreNLPProtos.TokensRegexRequest result = new edu.stanford.nlp.pipeline.CoreNLPProtos.TokensRegexRequest(this);<NEW_LINE>int from_bitField0_ = bitField0_;<NEW_LINE>int to_bitField0_ = 0;<NEW_LINE>if (((from_bitField0_ & 0x00000001) != 0)) {<NEW_LINE>if (docBuilder_ == null) {<NEW_LINE>result.doc_ = doc_;<NEW_LINE>} else {<NEW_LINE>result.doc_ = docBuilder_.build();<NEW_LINE>}<NEW_LINE>to_bitField0_ |= 0x00000001;<NEW_LINE>}<NEW_LINE>if (((bitField0_ & 0x00000002) != 0)) {<NEW_LINE>pattern_ = pattern_.getUnmodifiableView();<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>result.pattern_ = pattern_;<NEW_LINE>result.bitField0_ = to_bitField0_;<NEW_LINE>onBuilt();<NEW_LINE>return result;<NEW_LINE>}
bitField0_ = (bitField0_ & ~0x00000002);
1,587,413
final DeleteBackupVaultNotificationsResult executeDeleteBackupVaultNotifications(DeleteBackupVaultNotificationsRequest deleteBackupVaultNotificationsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(deleteBackupVaultNotificationsRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<DeleteBackupVaultNotificationsRequest> request = null;<NEW_LINE>Response<DeleteBackupVaultNotificationsResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new DeleteBackupVaultNotificationsRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(deleteBackupVaultNotificationsRequest));<NEW_LINE>// Binds the request metrics to the current request.<NEW_LINE>request.setAWSRequestMetrics(awsRequestMetrics);<NEW_LINE>request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);<NEW_LINE>request.addHandlerContext(<MASK><NEW_LINE>request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SERVICE_ID, "Backup");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteBackupVaultNotifications");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<DeleteBackupVaultNotificationsResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeleteBackupVaultNotificationsResultJsonUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
1,131,487
private RelOptCost hashJoinCumulativeCostLowerBound(Join join, RelMetadataQuery mq, VolcanoPlanner planner) {<NEW_LINE>final double leftRowCount = mq.getRowCount(join.getLeft());<NEW_LINE>final double rightRowCount = mq.getRowCount(join.getRight());<NEW_LINE>final RelDataType probeSideRowType;<NEW_LINE>final RelDataType buildSideRowType;<NEW_LINE>final double probeRowCount;<NEW_LINE>final double buildRowCount;<NEW_LINE>if (leftRowCount < rightRowCount) {<NEW_LINE>buildRowCount = leftRowCount;<NEW_LINE>probeRowCount = rightRowCount;<NEW_LINE>buildSideRowType = join.getLeft().getRowType();<NEW_LINE>probeSideRowType = join.getRight().getRowType();<NEW_LINE>} else {<NEW_LINE>buildRowCount = rightRowCount;<NEW_LINE>probeRowCount = leftRowCount;<NEW_LINE>buildSideRowType = join.getRight().getRowType();<NEW_LINE>probeSideRowType = join.getLeft().getRowType();<NEW_LINE>}<NEW_LINE>double buildWeight <MASK><NEW_LINE>double probeWeight = CostModelWeight.INSTANCE.getProbeWeight();<NEW_LINE>double rowCount = probeRowCount + buildRowCount;<NEW_LINE>double hashJoinCpu = buildWeight * buildRowCount + probeWeight * probeRowCount;<NEW_LINE>double hashJoinMemory = MemoryEstimator.estimateRowSizeInHashTable(buildSideRowType) * buildRowCount;<NEW_LINE>RelOptCost hashJoinCost = planner.getCostFactory().makeCost(rowCount, hashJoinCpu, hashJoinMemory, 0, 0);<NEW_LINE>RelOptCost hashJoinCumulativeCost = hashJoinCost.plus(planner.getCostFactory().makeCost(buildRowCount, buildRowCount, 0, buildRowCount * (TUPLE_HEADER_SIZE + TableScanIOEstimator.estimateRowSize(buildSideRowType)) / CostModelWeight.SEQ_IO_PAGE_SIZE, Math.ceil(TableScanIOEstimator.estimateRowSize(buildSideRowType) * buildRowCount / CostModelWeight.NET_BUFFER_SIZE))).plus(planner.getCostFactory().makeCost(probeRowCount, probeRowCount, 0, probeRowCount * (TUPLE_HEADER_SIZE + TableScanIOEstimator.estimateRowSize(probeSideRowType)) / CostModelWeight.SEQ_IO_PAGE_SIZE, Math.ceil(TableScanIOEstimator.estimateRowSize(probeSideRowType) * probeRowCount / CostModelWeight.NET_BUFFER_SIZE)));<NEW_LINE>return hashJoinCumulativeCost;<NEW_LINE>}
= CostModelWeight.INSTANCE.getBuildWeight();
130,612
public LoggingInfo unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>LoggingInfo loggingInfo = new LoggingInfo();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE><MASK><NEW_LINE>if (token == null)<NEW_LINE>token = context.nextToken();<NEW_LINE>if (token == VALUE_NULL) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>while (true) {<NEW_LINE>if (token == null)<NEW_LINE>break;<NEW_LINE>if (token == FIELD_NAME || token == START_OBJECT) {<NEW_LINE>if (context.testExpression("S3BucketName", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>loggingInfo.setS3BucketName(context.getUnmarshaller(String.class).unmarshall(context));<NEW_LINE>}<NEW_LINE>if (context.testExpression("S3KeyPrefix", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>loggingInfo.setS3KeyPrefix(context.getUnmarshaller(String.class).unmarshall(context));<NEW_LINE>}<NEW_LINE>if (context.testExpression("S3Region", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>loggingInfo.setS3Region(context.getUnmarshaller(String.class).unmarshall(context));<NEW_LINE>}<NEW_LINE>} else if (token == END_ARRAY || token == END_OBJECT) {<NEW_LINE>if (context.getLastParsedParentElement() == null || context.getLastParsedParentElement().equals(currentParentElement)) {<NEW_LINE>if (context.getCurrentDepth() <= originalDepth)<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>token = context.nextToken();<NEW_LINE>}<NEW_LINE>return loggingInfo;<NEW_LINE>}
JsonToken token = context.getCurrentToken();
24,267
public ThreeState deepEqual(@Nonnull final ASTNode oldNode, @Nonnull final LighterASTNode newNode) {<NEW_LINE>ProgressIndicatorProvider.checkCanceled();<NEW_LINE>boolean oldIsErrorElement = oldNode instanceof PsiErrorElement;<NEW_LINE>boolean newIsErrorElement = newNode.getTokenType() == TokenType.ERROR_ELEMENT;<NEW_LINE>if (oldIsErrorElement != newIsErrorElement)<NEW_LINE>return ThreeState.NO;<NEW_LINE>if (oldIsErrorElement) {<NEW_LINE>final PsiErrorElement e1 = (PsiErrorElement) oldNode;<NEW_LINE>return Objects.equals(e1.getErrorDescriptionValue(), getErrorMessage(newNode)) ? ThreeState.UNSURE : ThreeState.NO;<NEW_LINE>}<NEW_LINE>if (custom != null) {<NEW_LINE>ThreeState customResult = custom.<MASK><NEW_LINE>if (customResult != ThreeState.UNSURE) {<NEW_LINE>return customResult;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (newNode instanceof Token) {<NEW_LINE>final IElementType type = newNode.getTokenType();<NEW_LINE>final Token token = (Token) newNode;<NEW_LINE>if (oldNode instanceof ForeignLeafPsiElement) {<NEW_LINE>return type instanceof ForeignLeafType && StringUtil.equals(((ForeignLeafType) type).getValue(), oldNode.getText()) ? ThreeState.YES : ThreeState.NO;<NEW_LINE>}<NEW_LINE>if (oldNode instanceof LeafElement) {<NEW_LINE>if (type instanceof ForeignLeafType)<NEW_LINE>return ThreeState.NO;<NEW_LINE>return ((LeafElement) oldNode).textMatches(token.getText()) ? ThreeState.YES : ThreeState.NO;<NEW_LINE>}<NEW_LINE>if (type instanceof ILightLazyParseableElementType) {<NEW_LINE>return // do not dive into collapsed nodes<NEW_LINE>((TreeElement) oldNode).textMatches(token.getText()) ? // do not dive into collapsed nodes<NEW_LINE>ThreeState.YES : // do not dive into collapsed nodes<NEW_LINE>TreeUtil.isCollapsedChameleon(oldNode) ? ThreeState.NO : ThreeState.UNSURE;<NEW_LINE>}<NEW_LINE>if (oldNode.getElementType() instanceof ILazyParseableElementType && type instanceof ILazyParseableElementType || oldNode.getElementType() instanceof ICustomParsingType && type instanceof ICustomParsingType) {<NEW_LINE>return ((TreeElement) oldNode).textMatches(token.getText()) ? ThreeState.YES : ThreeState.NO;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return ThreeState.UNSURE;<NEW_LINE>}
fun(oldNode, newNode, myTreeStructure);
1,525,167
final StopSNOMEDCTInferenceJobResult executeStopSNOMEDCTInferenceJob(StopSNOMEDCTInferenceJobRequest stopSNOMEDCTInferenceJobRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(stopSNOMEDCTInferenceJobRequest);<NEW_LINE><MASK><NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<StopSNOMEDCTInferenceJobRequest> request = null;<NEW_LINE>Response<StopSNOMEDCTInferenceJobResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new StopSNOMEDCTInferenceJobRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(stopSNOMEDCTInferenceJobRequest));<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, "ComprehendMedical");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "StopSNOMEDCTInferenceJob");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<StopSNOMEDCTInferenceJobResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new StopSNOMEDCTInferenceJobResultJsonUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
944,647
private void processDirectory(@NonNull File directory, @NonNull MemoryItem... items) {<NEW_LINE>String directoryPath = directory.getAbsolutePath();<NEW_LINE>for (MemoryItem memoryItem : items) {<NEW_LINE>DirectoryItem[<MASK><NEW_LINE>if (targetDirectories != null) {<NEW_LINE>for (DirectoryItem dir : targetDirectories) {<NEW_LINE>String allowedDirPath = dir.getAbsolutePath();<NEW_LINE>boolean isPerfectlyMatch = objectEquals(directoryPath, allowedDirPath);<NEW_LINE>boolean isParentDirectory = !isPerfectlyMatch && (directoryPath.startsWith(allowedDirPath));<NEW_LINE>boolean isMatchDirectory = isPerfectlyMatch || isParentDirectory;<NEW_LINE>if (isPerfectlyMatch) {<NEW_LINE>calculateMultiTypes(directory, items);<NEW_LINE>return;<NEW_LINE>} else if (isParentDirectory && dir.shouldProcessInternalDirectories()) {<NEW_LINE>calculateMultiTypes(directory, items);<NEW_LINE>return;<NEW_LINE>} else if (isMatchDirectory && !dir.shouldAddUnmatchedToOtherMemory()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// Current directory did not match to any type<NEW_LINE>otherMemoryItem.addBytes(calculateFolderSize(directory));<NEW_LINE>}
] targetDirectories = memoryItem.getDirectories();
1,033,984
public List<SitesVH> fetchSitesDetails(SubscriptionVH subscription) throws Exception {<NEW_LINE>List<SitesVH> sitesList = new ArrayList<SitesVH>();<NEW_LINE>String accessToken = azureCredentialProvider.getToken(subscription.getTenant());<NEW_LINE>String url = String.format(apiUrlTemplate, URLEncoder.encode(subscription.getSubscriptionId()));<NEW_LINE>try {<NEW_LINE>String response = CommonUtils.doHttpGet(url, "Bearer", accessToken);<NEW_LINE>JsonObject responseObj = new JsonParser().parse(response).getAsJsonObject();<NEW_LINE>JsonArray sitesObjects = responseObj.getAsJsonArray("value");<NEW_LINE>if (sitesObjects != null) {<NEW_LINE>for (JsonElement sitesElement : sitesObjects) {<NEW_LINE>SitesVH sitesVH = new SitesVH();<NEW_LINE>JsonObject sitesObject = sitesElement.getAsJsonObject();<NEW_LINE>sitesVH.setSubscription(subscription.getSubscriptionId());<NEW_LINE>sitesVH.setSubscriptionName(subscription.getSubscriptionName());<NEW_LINE>sitesVH.setId(sitesObject.get("id").getAsString());<NEW_LINE>sitesVH.setEtag(sitesObject.get("etag").getAsString());<NEW_LINE>sitesVH.setLocation(sitesObject.get("location").getAsString());<NEW_LINE>sitesVH.setName(sitesObject.get("name").getAsString());<NEW_LINE>sitesVH.setType(sitesObject.get("type").getAsString());<NEW_LINE>JsonObject properties = sitesObject.getAsJsonObject("properties");<NEW_LINE>JsonObject tags = sitesObject.getAsJsonObject("tags");<NEW_LINE>if (properties != null) {<NEW_LINE>HashMap<String, Object> propertiesMap = new Gson().fromJson(properties.toString(), HashMap.class);<NEW_LINE>sitesVH.setProperties(propertiesMap);<NEW_LINE>}<NEW_LINE>if (tags != null) {<NEW_LINE>HashMap<String, Object> tagsMap = new Gson().fromJson(tags.<MASK><NEW_LINE>sitesVH.setTags(tagsMap);<NEW_LINE>}<NEW_LINE>sitesList.add(sitesVH);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} catch (Exception e) {<NEW_LINE>log.error("Error Collecting sites", e);<NEW_LINE>}<NEW_LINE>log.info("Target Type : {} Total: {} ", "Site", sitesList.size());<NEW_LINE>return sitesList;<NEW_LINE>}
toString(), HashMap.class);
16,760
static void computeTBNNormalized(Vec3f pa, Vec3f pb, Vec3f pc, Vec2f ta, Vec2f tb, Vec2f tc, Vec3f[] norm) {<NEW_LINE>MeshTempState instance = MeshTempState.getInstance();<NEW_LINE>Vec3f n = instance.vec3f1;<NEW_LINE>Vec3f v1 = instance.vec3f2;<NEW_LINE>Vec3f v2 = instance.vec3f3;<NEW_LINE>// compute Normal |(v1-v0)X(v2-v0)|<NEW_LINE>v1.sub(pb, pa);<NEW_LINE>v2.sub(pc, pa);<NEW_LINE>n.cross(v1, v2);<NEW_LINE>norm[0].set(n);<NEW_LINE>// TODO: make sure each triangle area (size) will be considered<NEW_LINE>norm[0].normalize();<NEW_LINE>v1.set(0, tb.x - ta.x, tb.y - ta.y);<NEW_LINE>v2.set(0, tc.x - ta.x, tc.y - ta.y);<NEW_LINE>if (v1.y * v2.z == v1.z * v2.y) {<NEW_LINE>MeshUtil.generateTB(pa, pb, pc, norm);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>// compute Tangent and Binomal<NEW_LINE>v1.x = pb.x - pa.x;<NEW_LINE>v2.x = pc.x - pa.x;<NEW_LINE>n.cross(v1, v2);<NEW_LINE>norm[1].x = -n.y / n.x;<NEW_LINE>norm[2].x = -n.z / n.x;<NEW_LINE>v1.x = pb.y - pa.y;<NEW_LINE>v2.x = pc.y - pa.y;<NEW_LINE>n.cross(v1, v2);<NEW_LINE>norm[1].y = -n.y / n.x;<NEW_LINE>norm[2].y = <MASK><NEW_LINE>v1.x = pb.z - pa.z;<NEW_LINE>v2.x = pc.z - pa.z;<NEW_LINE>n.cross(v1, v2);<NEW_LINE>norm[1].z = -n.y / n.x;<NEW_LINE>norm[2].z = -n.z / n.x;<NEW_LINE>norm[1].normalize();<NEW_LINE>norm[2].normalize();<NEW_LINE>}
-n.z / n.x;
474,413
// -------------------------------------- //<NEW_LINE>// Managing the life-cycle of the channel //<NEW_LINE>// -------------------------------------- //<NEW_LINE>@Override<NEW_LINE>public void channelConnected(final ChannelHandlerContext ctx, final ChannelStateEvent e) {<NEW_LINE>final Channel chan = e.getChannel();<NEW_LINE>final ChannelBuffer header;<NEW_LINE>if (hbase_client.getConfig().getBoolean("hbase.security.auth.enable") && hbase_client.getConfig().hasProperty("hbase.security.auth.94")) {<NEW_LINE>secure_rpc_helper = new SecureRpcHelper94(hbase_client, <MASK><NEW_LINE>secure_rpc_helper.sendHello(chan);<NEW_LINE>LOG.info("Initialized security helper: " + secure_rpc_helper + " for region client: " + this);<NEW_LINE>} else {<NEW_LINE>if (!hbase_client.has_root || hbase_client.split_meta) {<NEW_LINE>if (hbase_client.getConfig().getBoolean("hbase.security.auth.enable")) {<NEW_LINE>secure_rpc_helper = new SecureRpcHelper96(hbase_client, this, chan.getRemoteAddress());<NEW_LINE>secure_rpc_helper.sendHello(chan);<NEW_LINE>LOG.info("Initialized security helper: " + secure_rpc_helper + " for region client: " + this);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>header = header095();<NEW_LINE>Channels.write(chan, header);<NEW_LINE>becomeReady(chan, SERVER_VERSION_095_OR_ABOVE);<NEW_LINE>return;<NEW_LINE>} else if (System.getProperty("org.hbase.async.cdh3b3") != null) {<NEW_LINE>header = headerCDH3b3();<NEW_LINE>} else {<NEW_LINE>header = header090();<NEW_LINE>}<NEW_LINE>helloRpc(chan, header);<NEW_LINE>}<NEW_LINE>}
this, chan.getRemoteAddress());
621,657
public static void injectThroughMethod(Object requestObject, Method method, Object parameterValue, Message inMessage) {<NEW_LINE>try {<NEW_LINE>Method methodToInvoke = checkProxy(method, requestObject);<NEW_LINE>methodToInvoke.invoke(requestObject, new Object[] { parameterValue });<NEW_LINE>} catch (IllegalAccessException ex) {<NEW_LINE>reportServerError("METHOD_ACCESS_FAILURE", method.getName());<NEW_LINE>} catch (InvocationTargetException ex) {<NEW_LINE>// Liberty change<NEW_LINE>Tr.error(tc, ex.getCause().getMessage(), ex);<NEW_LINE>Response r = JAXRSUtils.convertFaultToResponse(ex.getCause(), inMessage);<NEW_LINE>if (r != null) {<NEW_LINE>inMessage.getExchange().put(Response.class, r);<NEW_LINE>throw new WebApplicationException();<NEW_LINE>}<NEW_LINE>reportServerError("METHOD_ACCESS_FAILURE", method.getName());<NEW_LINE>} catch (Exception ex) {<NEW_LINE>reportServerError(<MASK><NEW_LINE>}<NEW_LINE>}
"METHOD_INJECTION_FAILURE", method.getName());
1,083,260
public void populateItem(final Item<RepositoryCommit> commitItem) {<NEW_LINE>final RepositoryCommit commit = commitItem.getModelObject();<NEW_LINE>// author gravatar<NEW_LINE>commitItem.add(new AvatarImage("commitAuthor", commit.getAuthorIdent(), null, 16, false));<NEW_LINE>// merge icon<NEW_LINE>if (commit.getParentCount() > 1) {<NEW_LINE>commitItem.add(WicketUtils.newImage("commitIcon", "commit_merge_16x16.png"));<NEW_LINE>} else {<NEW_LINE>commitItem.add(WicketUtils.newBlankImage("commitIcon"));<NEW_LINE>}<NEW_LINE>// short message<NEW_LINE>String shortMessage = commit.getShortMessage();<NEW_LINE>String trimmedMessage = shortMessage;<NEW_LINE>if (commit.getRefs() != null && commit.getRefs().size() > 0) {<NEW_LINE>trimmedMessage = StringUtils.trimString(shortMessage, Constants.LEN_SHORTLOG_REFS);<NEW_LINE>} else {<NEW_LINE>trimmedMessage = StringUtils.<MASK><NEW_LINE>}<NEW_LINE>LinkPanel shortlog = new LinkPanel("commitShortMessage", "list", trimmedMessage, CommitPage.class, WicketUtils.newObjectParameter(change.repository, commit.getName()));<NEW_LINE>if (!shortMessage.equals(trimmedMessage)) {<NEW_LINE>WicketUtils.setHtmlTooltip(shortlog, shortMessage);<NEW_LINE>}<NEW_LINE>commitItem.add(shortlog);<NEW_LINE>// commit hash link<NEW_LINE>int hashLen = app().settings().getInteger(Keys.web.shortCommitIdLength, 6);<NEW_LINE>LinkPanel commitHash = new LinkPanel("hashLink", null, commit.getName().substring(0, hashLen), CommitPage.class, WicketUtils.newObjectParameter(change.repository, commit.getName()));<NEW_LINE>WicketUtils.setCssClass(commitHash, "shortsha1");<NEW_LINE>WicketUtils.setHtmlTooltip(commitHash, commit.getName());<NEW_LINE>commitItem.add(commitHash);<NEW_LINE>if (showSwatch) {<NEW_LINE>// set repository color<NEW_LINE>String color = StringUtils.getColor(StringUtils.stripDotGit(change.repository));<NEW_LINE>WicketUtils.setCssStyle(commitItem, MessageFormat.format("border-left: 2px solid {0};", color));<NEW_LINE>}<NEW_LINE>}
trimString(shortMessage, Constants.LEN_SHORTLOG);
538,428
protected TokenStreamComponents createComponents(String fieldName) {<NEW_LINE>Tokenizer source = new FeatureVectorsTokenizer();<NEW_LINE>TokenFilter truncate = new LexicalLshTruncateTokenFilter(source, decimals);<NEW_LINE>TokenFilter featurePos = new LexicalLshFeaturePositionTokenFilter(truncate);<NEW_LINE>TokenStream filter;<NEW_LINE>if (min > 1) {<NEW_LINE>ShingleFilter shingleFilter = new <MASK><NEW_LINE>shingleFilter.setTokenSeparator(" ");<NEW_LINE>shingleFilter.setOutputUnigrams(false);<NEW_LINE>shingleFilter.setOutputUnigramsIfNoShingles(false);<NEW_LINE>filter = new MinHashFilter(shingleFilter, hashCount, bucketCount, hashSetSize, bucketCount > 1);<NEW_LINE>} else {<NEW_LINE>filter = new MinHashFilter(featurePos, hashCount, bucketCount, hashSetSize, bucketCount > 1);<NEW_LINE>}<NEW_LINE>return new TokenStreamComponents(source, new RemoveDuplicatesTokenFilter(filter));<NEW_LINE>}
ShingleFilter(featurePos, min, max);
788,251
private static int parseRectangle(SvgContainer container, char[] ca, int start, int end) {<NEW_LINE>end = findClosingTag(ca, start, end);<NEW_LINE>if (end != -1) {<NEW_LINE>int endAttrs = closer(ca, start, end);<NEW_LINE>SvgShape element = new SvgShape(container, getAttrValue(ca, start, endAttrs, ATTR_ID));<NEW_LINE>element.pathData = new PathData();<NEW_LINE>element.pathData.points = new float[6];<NEW_LINE>element.pathData.points[0] = parseFloat(getAttrValue(ca, start, endAttrs, ATTR_X));<NEW_LINE>element.pathData.points[1] = parseFloat(getAttrValue(ca, start, endAttrs, ATTR_Y));<NEW_LINE>element.pathData.points[2] = parseFloat(getAttrValue(ca, start, endAttrs, ATTR_WIDTH));<NEW_LINE>element.pathData.points[3] = parseFloat(getAttrValue(ca<MASK><NEW_LINE>element.pathData.points[4] = parseFloat(getAttrValue(ca, start, endAttrs, ATTR_RX), 0);<NEW_LINE>element.pathData.points[5] = parseFloat(getAttrValue(ca, start, endAttrs, ATTR_RY), 0);<NEW_LINE>parseFill(element, ca, start, endAttrs);<NEW_LINE>parseStroke(element, ca, start, endAttrs);<NEW_LINE>element.transform = getTransform(ca, getAttrValueRange(ca, start, endAttrs, ATTR_TRANSFORM));<NEW_LINE>}<NEW_LINE>return end;<NEW_LINE>}
, start, endAttrs, ATTR_HEIGHT));
1,851,817
public void destroySubcontext(String name) throws OperationNotSupportedException, EntityHasDescendantsException, EntityNotFoundException, WIMSystemException {<NEW_LINE>TimedDirContext ctx = getDirContext();<NEW_LINE>checkWritePermission(ctx);<NEW_LINE>try {<NEW_LINE>try {<NEW_LINE>ctx.destroySubcontext(new LdapName(name));<NEW_LINE>} catch (NamingException e) {<NEW_LINE>if (!isConnectionException(e)) {<NEW_LINE>throw e;<NEW_LINE>}<NEW_LINE>ctx = reCreateDirContext(ctx, e.toString());<NEW_LINE>ctx.destroySubcontext(new LdapName(name));<NEW_LINE>}<NEW_LINE>} catch (ContextNotEmptyException e) {<NEW_LINE>String msg = Tr.formatMessage(tc, WIMMessageKey.ENTITY_HAS_DESCENDENTS, WIMMessageHelper.generateMsgParms(name));<NEW_LINE>throw new EntityHasDescendantsException(WIMMessageKey.ENTITY_HAS_DESCENDENTS, msg, e);<NEW_LINE>} catch (NameNotFoundException e) {<NEW_LINE>String msg = Tr.formatMessage(tc, WIMMessageKey.LDAP_ENTRY_NOT_FOUND, WIMMessageHelper.generateMsgParms(name, e.toString(true)));<NEW_LINE>throw new EntityNotFoundException(<MASK><NEW_LINE>} catch (NamingException e) {<NEW_LINE>String msg = Tr.formatMessage(tc, WIMMessageKey.NAMING_EXCEPTION, WIMMessageHelper.generateMsgParms(e.toString(true)));<NEW_LINE>throw new WIMSystemException(WIMMessageKey.NAMING_EXCEPTION, msg, e);<NEW_LINE>} finally {<NEW_LINE>releaseDirContext(ctx);<NEW_LINE>}<NEW_LINE>}
WIMMessageKey.LDAP_ENTRY_NOT_FOUND, msg, e);
145,133
private void persistNow(@Nullable Runnable completeHandler, boolean force) {<NEW_LINE><MASK><NEW_LINE>try {<NEW_LINE>// The serialisation is done on the user thread to avoid threading issue with potential mutations of the<NEW_LINE>// persistable object. Keeping it on the user thread we are in a synchronize model.<NEW_LINE>protobuf.PersistableEnvelope serialized = (protobuf.PersistableEnvelope) persistable.toPersistableMessage();<NEW_LINE>// For the write to disk task we use a thread. We do not have any issues anymore if the persistable objects<NEW_LINE>// gets mutated while the thread is running as we have serialized it already and do not operate on the<NEW_LINE>// reference to the persistable object.<NEW_LINE>getWriteToDiskExecutor().execute(() -> writeToDisk(serialized, completeHandler, force));<NEW_LINE>long duration = System.currentTimeMillis() - ts;<NEW_LINE>if (duration > 100) {<NEW_LINE>log.info("Serializing {} took {} msec", fileName, duration);<NEW_LINE>}<NEW_LINE>} catch (Throwable e) {<NEW_LINE>log.error("Error in saveToFile toProtoMessage: {}, {}", persistable.getClass().getSimpleName(), fileName);<NEW_LINE>e.printStackTrace();<NEW_LINE>throw new RuntimeException(e);<NEW_LINE>}<NEW_LINE>}
long ts = System.currentTimeMillis();
1,066,483
public void writeTo(final Object o, final Class<?> type, final Type genericType, final Annotation[] annotations, final MediaType mediaType, final MultivaluedMap<String, Object> httpHeaders, final OutputStream os) throws IOException {<NEW_LINE>final PropertyFiltering annotation = findPropertyFiltering(annotations);<NEW_LINE>final PropertyFilter propertyFilter = new PropertyFilter(Optional.ofNullable(uriInfo.getQueryParameters().get(annotation.using())).orElse(Collections.<String>emptyList()));<NEW_LINE>if (!propertyFilter.hasFilters()) {<NEW_LINE>super.writeTo(o, type, genericType, annotations, mediaType, httpHeaders, os);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>final Timer timer = getTimer();<NEW_LINE>final Timer.<MASK><NEW_LINE>try {<NEW_LINE>final JsonNode tree = objectMapper.valueToTree(o);<NEW_LINE>propertyFilter.filter(tree);<NEW_LINE>super.writeTo(tree, tree.getClass(), tree.getClass(), annotations, mediaType, httpHeaders, os);<NEW_LINE>} finally {<NEW_LINE>context.stop();<NEW_LINE>}<NEW_LINE>}
Context context = timer.time();
623,579
public static void attestOpenEnclaveAsync1() {<NEW_LINE>BinaryData runtimeData = BinaryData.<MASK><NEW_LINE>BinaryData inittimeData = null;<NEW_LINE>BinaryData openEnclaveReport = BinaryData.fromBytes(SampleCollateral.getOpenEnclaveReport());<NEW_LINE>BinaryData sgxQuote = BinaryData.fromBytes(SampleCollateral.getSgxEnclaveQuote());<NEW_LINE>AttestationAsyncClient client = new AttestationClientBuilder().endpoint("https://sharedcus.cus.attest.azure.net").buildAsyncClient();<NEW_LINE>// BEGIN: com.azure.security.attestation.AttestationAsyncClient.getOpenIdMetadataWithResponse<NEW_LINE>Mono<Response<AttestationOpenIdMetadata>> response = client.getOpenIdMetadataWithResponse();<NEW_LINE>// END: com.azure.security.attestation.AttestationAsyncClient.getOpenIdMetadataWithResponse<NEW_LINE>// BEGIN: com.azure.security.attestation.AttestationAsyncClient.getOpenIdMetadata<NEW_LINE>Mono<AttestationOpenIdMetadata> openIdMetadata = client.getOpenIdMetadata();<NEW_LINE>// END: com.azure.security.attestation.AttestationAsyncClient.getOpenIdMetadata<NEW_LINE>// BEGIN: com.azure.security.attestation.AttestationAsyncClient.getAttestationSigners<NEW_LINE>Mono<AttestationSignerCollection> signersMono = client.listAttestationSigners();<NEW_LINE>signersMono.subscribe(signers -> signers.getAttestationSigners().forEach(cert -> {<NEW_LINE>System.out.println("Found certificate.");<NEW_LINE>if (cert.getKeyId() != null) {<NEW_LINE>System.out.println(" Certificate Key ID: " + cert.getKeyId());<NEW_LINE>} else {<NEW_LINE>System.out.println(" Signer does not have a Key ID");<NEW_LINE>}<NEW_LINE>cert.getCertificates().forEach(chainElement -> {<NEW_LINE>System.out.println(" Cert Subject: " + chainElement.getSubjectDN().getName());<NEW_LINE>System.out.println(" Cert Issuer: " + chainElement.getIssuerDN().getName());<NEW_LINE>});<NEW_LINE>}));<NEW_LINE>// END: com.azure.security.attestation.AttestationAsyncClient.getAttestationSigners<NEW_LINE>// BEGIN: com.azure.security.attestation.AttestationAsyncClient.getAttestationSignersWithResponse<NEW_LINE>Mono<Response<AttestationSignerCollection>> responseOfSigners = client.listAttestationSignersWithResponse();<NEW_LINE>responseOfSigners.subscribe();<NEW_LINE>// END: com.azure.security.attestation.AttestationAsyncClient.getAttestationSignersWithResponse<NEW_LINE>// BEGIN: com.azure.security.attestation.AttestationAsyncClient.attestOpenEnclaveWithReport<NEW_LINE>Mono<AttestationResult> resultWithReport = client.attestOpenEnclave(openEnclaveReport);<NEW_LINE>// END: com.azure.security.attestation.AttestationAsyncClient.attestOpenEnclaveWithReport<NEW_LINE>// BEGIN: com.azure.security.attestation.AttestationAsyncClient.attestOpenEnclave<NEW_LINE>Mono<AttestationResult> result = client.attestOpenEnclave(new AttestationOptions(openEnclaveReport).setRunTimeData(new AttestationData(runtimeData, AttestationDataInterpretation.BINARY)));<NEW_LINE>// END: com.azure.security.attestation.AttestationAsyncClient.attestOpenEnclave<NEW_LINE>// BEGIN: com.azure.security.attestation.AttestationAsyncClient.attestOpenEnclaveWithResponse<NEW_LINE>Mono<AttestationResponse<AttestationResult>> openEnclaveResponse = client.attestOpenEnclaveWithResponse(new AttestationOptions(openEnclaveReport).setRunTimeData(new AttestationData(runtimeData, AttestationDataInterpretation.JSON)), Context.NONE);<NEW_LINE>// END: com.azure.security.attestation.AttestationAsyncClient.attestOpenEnclaveWithResponse<NEW_LINE>}
fromBytes(SampleCollateral.getRunTimeData());
1,219,141
public static Key create(Snippet snip) {<NEW_LINE>switch(snip.kind()) {<NEW_LINE>case IMPORT:<NEW_LINE>ImportSnippet <MASK><NEW_LINE>return new Key("I_" + imp.fullname() + (imp.isStatic() ? "*" : ""));<NEW_LINE>case TYPE_DECL:<NEW_LINE>TypeDeclSnippet tdecl = ((TypeDeclSnippet) snip);<NEW_LINE>return new Key("T_" + tdecl.name());<NEW_LINE>case METHOD:<NEW_LINE>MethodSnippet method = ((MethodSnippet) snip);<NEW_LINE>return new Key("M_" + method.name() + ":" + method.signature());<NEW_LINE>case VAR:<NEW_LINE>VarSnippet var = (VarSnippet) snip;<NEW_LINE>return new Key("V_" + var.name() + ":" + var.typeName());<NEW_LINE>case EXPRESSION:<NEW_LINE>ExpressionSnippet expr = (ExpressionSnippet) snip;<NEW_LINE>return new Key("E_" + (expr.name()) + ":" + (expr.typeName()));<NEW_LINE>case STATEMENT:<NEW_LINE>case ERRONEOUS:<NEW_LINE>return new Key("C_" + snip.source());<NEW_LINE>default:<NEW_LINE>throw new AssertionError(snip.kind().name());<NEW_LINE>}<NEW_LINE>}
imp = ((ImportSnippet) snip);
1,316,046
public static DescribeDevicesResponse unmarshall(DescribeDevicesResponse describeDevicesResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeDevicesResponse.setRequestId(_ctx.stringValue("DescribeDevicesResponse.RequestId"));<NEW_LINE>describeDevicesResponse.setMessage(_ctx.stringValue("DescribeDevicesResponse.Message"));<NEW_LINE>describeDevicesResponse.setCode(_ctx.stringValue("DescribeDevicesResponse.Code"));<NEW_LINE>Data data = new Data();<NEW_LINE>data.setPageNum(_ctx.integerValue("DescribeDevicesResponse.Data.PageNum"));<NEW_LINE>data.setTotalPage(_ctx.integerValue("DescribeDevicesResponse.Data.TotalPage"));<NEW_LINE>data.setPageSize(_ctx.integerValue("DescribeDevicesResponse.Data.PageSize"));<NEW_LINE>data.setTotalCount(_ctx.integerValue("DescribeDevicesResponse.Data.TotalCount"));<NEW_LINE>List<Record> records <MASK><NEW_LINE>for (int i = 0; i < _ctx.lengthValue("DescribeDevicesResponse.Data.Records.Length"); i++) {<NEW_LINE>Record record = new Record();<NEW_LINE>record.setStatus(_ctx.stringValue("DescribeDevicesResponse.Data.Records[" + i + "].Status"));<NEW_LINE>record.setDeviceName(_ctx.stringValue("DescribeDevicesResponse.Data.Records[" + i + "].DeviceName"));<NEW_LINE>record.setDeviceType(_ctx.stringValue("DescribeDevicesResponse.Data.Records[" + i + "].DeviceType"));<NEW_LINE>record.setDeviceId(_ctx.stringValue("DescribeDevicesResponse.Data.Records[" + i + "].DeviceId"));<NEW_LINE>record.setDeviceAddress(_ctx.stringValue("DescribeDevicesResponse.Data.Records[" + i + "].DeviceAddress"));<NEW_LINE>record.setCreateTime(_ctx.stringValue("DescribeDevicesResponse.Data.Records[" + i + "].CreateTime"));<NEW_LINE>record.setCorpId(_ctx.stringValue("DescribeDevicesResponse.Data.Records[" + i + "].CorpId"));<NEW_LINE>record.setLongitude(_ctx.stringValue("DescribeDevicesResponse.Data.Records[" + i + "].Longitude"));<NEW_LINE>record.setInProtocol(_ctx.stringValue("DescribeDevicesResponse.Data.Records[" + i + "].InProtocol"));<NEW_LINE>record.setLatitude(_ctx.stringValue("DescribeDevicesResponse.Data.Records[" + i + "].Latitude"));<NEW_LINE>record.setVendor(_ctx.stringValue("DescribeDevicesResponse.Data.Records[" + i + "].Vendor"));<NEW_LINE>record.setCapturedPictureId(_ctx.stringValue("DescribeDevicesResponse.Data.Records[" + i + "].CapturedPictureId"));<NEW_LINE>record.setPassword(_ctx.stringValue("DescribeDevicesResponse.Data.Records[" + i + "].Password"));<NEW_LINE>records.add(record);<NEW_LINE>}<NEW_LINE>data.setRecords(records);<NEW_LINE>describeDevicesResponse.setData(data);<NEW_LINE>return describeDevicesResponse;<NEW_LINE>}
= new ArrayList<Record>();
1,521,882
// Example usage of how to compute the diameter of a graph<NEW_LINE>public static void main(String[] args) {<NEW_LINE>Map<Integer, List<Edge>> graph = createGraph(5);<NEW_LINE>addUndirectedEdge(graph, 4, 2);<NEW_LINE>addUndirectedEdge(graph, 2, 0);<NEW_LINE>addUndirectedEdge(graph, 0, 1);<NEW_LINE>addUndirectedEdge(graph, 1, 2);<NEW_LINE>addUndirectedEdge(graph, 1, 3);<NEW_LINE>int diameter = graphDiameter(graph);<NEW_LINE>if (diameter != 3)<NEW_LINE>System.out.println("Wrong diameter!");<NEW_LINE>// No edges<NEW_LINE>graph = createGraph(5);<NEW_LINE>diameter = graphDiameter(graph);<NEW_LINE>if (diameter != 0)<NEW_LINE>System.out.println("Wrong diameter!");<NEW_LINE>graph = createGraph(8);<NEW_LINE><MASK><NEW_LINE>addUndirectedEdge(graph, 1, 5);<NEW_LINE>addUndirectedEdge(graph, 2, 5);<NEW_LINE>addUndirectedEdge(graph, 3, 5);<NEW_LINE>addUndirectedEdge(graph, 4, 5);<NEW_LINE>addUndirectedEdge(graph, 6, 5);<NEW_LINE>addUndirectedEdge(graph, 7, 5);<NEW_LINE>diameter = graphDiameter(graph);<NEW_LINE>if (diameter != 2)<NEW_LINE>System.out.println("Wrong diameter!");<NEW_LINE>graph = createGraph(9);<NEW_LINE>addUndirectedEdge(graph, 0, 5);<NEW_LINE>addUndirectedEdge(graph, 1, 5);<NEW_LINE>addUndirectedEdge(graph, 2, 5);<NEW_LINE>addUndirectedEdge(graph, 3, 5);<NEW_LINE>addUndirectedEdge(graph, 4, 5);<NEW_LINE>addUndirectedEdge(graph, 6, 5);<NEW_LINE>addUndirectedEdge(graph, 7, 5);<NEW_LINE>addUndirectedEdge(graph, 3, 8);<NEW_LINE>diameter = graphDiameter(graph);<NEW_LINE>if (diameter != 3)<NEW_LINE>System.out.println("Wrong diameter!");<NEW_LINE>}
addUndirectedEdge(graph, 0, 5);
1,297,427
public com.amazonaws.services.simplesystemsmanagement.model.UnsupportedCalendarException unmarshallFromContext(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>com.amazonaws.services.simplesystemsmanagement.model.UnsupportedCalendarException unsupportedCalendarException = new com.amazonaws.services.simplesystemsmanagement.model.UnsupportedCalendarException(null);<NEW_LINE><MASK><NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>JsonToken token = context.getCurrentToken();<NEW_LINE>if (token == null)<NEW_LINE>token = context.nextToken();<NEW_LINE>if (token == VALUE_NULL) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>while (true) {<NEW_LINE>if (token == null)<NEW_LINE>break;<NEW_LINE>if (token == FIELD_NAME || token == START_OBJECT) {<NEW_LINE>} 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 unsupportedCalendarException;<NEW_LINE>}
int originalDepth = context.getCurrentDepth();