idx
int32
46
1.86M
input
stringlengths
321
6.6k
target
stringlengths
9
1.24k
861,466
public GetPipelineResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>GetPipelineResult getPipelineResult = new GetPipelineResult();<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 getPipelineResult;<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("pipeline", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>getPipelineResult.setPipeline(PipelineDeclarationJsonUnmarshaller.getInstance<MASK><NEW_LINE>}<NEW_LINE>if (context.testExpression("metadata", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>getPipelineResult.setMetadata(PipelineMetadataJsonUnmarshaller.getInstance().unmarshall(context));<NEW_LINE>}<NEW_LINE>} else if (token == END_ARRAY || token == END_OBJECT) {<NEW_LINE>if (context.getLastParsedParentElement() == null || context.getLastParsedParentElement().equals(currentParentElement)) {<NEW_LINE>if (context.getCurrentDepth() <= originalDepth)<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>token = context.nextToken();<NEW_LINE>}<NEW_LINE>return getPipelineResult;<NEW_LINE>}
().unmarshall(context));
1,179,637
public void createUpdateAverageCostDetail(MPPCostCollector costCollectorVariance, BigDecimal costVarianceThisLevel, BigDecimal costVarianceLowLevel, MProduct product, MAcctSchema acctSchema, MCostType costType, MCostElement costElement) {<NEW_LINE>String whereClause = " exists (select 1 from pp_cost_collector pc" + " where pc.pp_cost_collector_ID=m_transaction.pp_Cost_collector_ID and costcollectortype =? " + " and pc.pp_order_ID=?)";<NEW_LINE>MTransaction mtrx = new Query(costCollectorVariance.getCtx(), MTransaction.Table_Name, whereClause, costCollectorVariance.get_TrxName()).setParameters(MPPCostCollector.COSTCOLLECTORTYPE_MaterialReceipt, costCollectorVariance.getPP_Order_ID()).setOrderBy("M_Transaction_ID desc").first();<NEW_LINE>BigDecimal costThisLevel = Env.ZERO;<NEW_LINE>BigDecimal costLowLevel = Env.ZERO;<NEW_LINE>String costingLevel = MProduct.get(mtrx.getCtx(), mtrx.getM_Product_ID()).getCostingLevel(acctSchema, mtrx.getAD_Org_ID());<NEW_LINE>costCollectorVariance.set_ValueOfColumn("Cost", costVarianceThisLevel.compareTo(Env.ZERO) != 0 ? costVarianceThisLevel : costVarianceLowLevel);<NEW_LINE>costCollectorVariance.saveEx();<NEW_LINE>IDocumentLine model = costCollectorVariance;<NEW_LINE>MCost cost = MCost.validateCostForCostType(acctSchema, costType, costElement, product.getM_Product_ID(), 0, 0, 0, mtrx.get_TrxName());<NEW_LINE>final ICostingMethod method = CostingMethodFactory.get().getCostingMethod(costType.getCostingMethod());<NEW_LINE>method.setCostingMethod(acctSchema, mtrx, model, cost, costThisLevel, <MASK><NEW_LINE>method.process();<NEW_LINE>}
costLowLevel, model.isSOTrx());
1,664,199
private void createSetMenuEntries(JMenu edit) {<NEW_LINE>edit.add(new ToolTipAction(Lang.get("menu_table_setXTo0")) {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void actionPerformed(ActionEvent e) {<NEW_LINE>modifyTable(v -> v > 1 ? 0 : v);<NEW_LINE>}<NEW_LINE>}.setToolTip(Lang.get("menu_table_setXTo0_tt")).createJMenuItem());<NEW_LINE>edit.add(new ToolTipAction(Lang.get("menu_table_setXTo1")) {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void actionPerformed(ActionEvent e) {<NEW_LINE>modifyTable(v -> v > 1 ? 1 : v);<NEW_LINE>}<NEW_LINE>}.setToolTip(Lang.get("menu_table_setXTo1_tt")).createJMenuItem());<NEW_LINE>edit.add(new ToolTipAction(Lang.get("menu_table_setAllToX")) {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void actionPerformed(ActionEvent e) {<NEW_LINE>modifyTable<MASK><NEW_LINE>}<NEW_LINE>}.setToolTip(Lang.get("menu_table_setAllToX_tt")).createJMenuItem());<NEW_LINE>edit.add(new ToolTipAction(Lang.get("menu_table_setAllTo0")) {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void actionPerformed(ActionEvent e) {<NEW_LINE>modifyTable(v -> (byte) 0);<NEW_LINE>}<NEW_LINE>}.setToolTip(Lang.get("menu_table_setAllTo0_tt")).createJMenuItem());<NEW_LINE>edit.add(new ToolTipAction(Lang.get("menu_table_setAllTo1")) {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void actionPerformed(ActionEvent e) {<NEW_LINE>modifyTable(v -> (byte) 1);<NEW_LINE>}<NEW_LINE>}.setToolTip(Lang.get("menu_table_setAllTo1_tt")).createJMenuItem());<NEW_LINE>edit.add(new ToolTipAction(Lang.get("menu_table_invert")) {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void actionPerformed(ActionEvent e) {<NEW_LINE>modifyTable(v -> v > 1 ? v : (byte) (1 - v));<NEW_LINE>}<NEW_LINE>}.setToolTip(Lang.get("menu_table_invert_tt")).createJMenuItem());<NEW_LINE>}
(v -> (byte) 2);
772,173
public ExportResult<TaskContainerResource> export(UUID jobId, TokensAndUrlAuthData authData, Optional<ExportInformation> exportInformation) {<NEW_LINE>// Create a new tasks service for the authorized user<NEW_LINE>Tasks tasksService = getOrCreateTasksService(authData);<NEW_LINE>IdOnlyContainerResource resource = exportInformation.isPresent() ? (IdOnlyContainerResource) exportInformation.get().getContainerResource() : null;<NEW_LINE>PaginationData paginationData = exportInformation.isPresent() ? exportInformation.get().getPaginationData() : null;<NEW_LINE>try {<NEW_LINE>if (resource != null) {<NEW_LINE>return getTasks(tasksService, resource<MASK><NEW_LINE>} else {<NEW_LINE>return getTasksList(tasksService, Optional.ofNullable(paginationData));<NEW_LINE>}<NEW_LINE>} catch (Exception e) {<NEW_LINE>monitor.severe(() -> "Error occurred trying to retrieve task", e);<NEW_LINE>return new ExportResult<>(e);<NEW_LINE>}<NEW_LINE>}
, Optional.ofNullable(paginationData));
1,394,211
final ExportApiResult executeExportApi(ExportApiRequest exportApiRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(exportApiRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<ExportApiRequest> request = null;<NEW_LINE>Response<ExportApiResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new ExportApiRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(exportApiRequest));<NEW_LINE>// Binds the request metrics to the current request.<NEW_LINE>request.setAWSRequestMetrics(awsRequestMetrics);<NEW_LINE>request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);<NEW_LINE>request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SERVICE_ID, "ApiGatewayV2");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ExportApi");<NEW_LINE>request.<MASK><NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<ExportApiResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(false).withHasStreamingSuccessResponse(false), new ExportApiResultJsonUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
305,540
public FixedModeScheduleActionStartSettings unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>FixedModeScheduleActionStartSettings fixedModeScheduleActionStartSettings = new FixedModeScheduleActionStartSettings();<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("time", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>fixedModeScheduleActionStartSettings.setTime(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 fixedModeScheduleActionStartSettings;<NEW_LINE>}
JsonToken token = context.getCurrentToken();
1,388,935
public void marshall(ApplicationInfo applicationInfo, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (applicationInfo == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(applicationInfo.getResourceGroupName(), RESOURCEGROUPNAME_BINDING);<NEW_LINE>protocolMarshaller.marshall(applicationInfo.getLifeCycle(), LIFECYCLE_BINDING);<NEW_LINE>protocolMarshaller.marshall(applicationInfo.getOpsItemSNSTopicArn(), OPSITEMSNSTOPICARN_BINDING);<NEW_LINE>protocolMarshaller.marshall(applicationInfo.getOpsCenterEnabled(), OPSCENTERENABLED_BINDING);<NEW_LINE>protocolMarshaller.marshall(applicationInfo.getCWEMonitorEnabled(), CWEMONITORENABLED_BINDING);<NEW_LINE>protocolMarshaller.marshall(applicationInfo.getRemarks(), REMARKS_BINDING);<NEW_LINE>protocolMarshaller.marshall(applicationInfo.getAutoConfigEnabled(), AUTOCONFIGENABLED_BINDING);<NEW_LINE>protocolMarshaller.marshall(<MASK><NEW_LINE>} catch (Exception e) {<NEW_LINE>throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e);<NEW_LINE>}<NEW_LINE>}
applicationInfo.getDiscoveryType(), DISCOVERYTYPE_BINDING);
1,596,873
public static final int[] readThisIntArrayXml(XmlPullParser parser, String endTag, String[] name) throws XmlPullParserException, java.io.IOException {<NEW_LINE>int num;<NEW_LINE>try {<NEW_LINE>num = Integer.parseInt(parser<MASK><NEW_LINE>} catch (NullPointerException e) {<NEW_LINE>throw new XmlPullParserException("Need num attribute in int-array");<NEW_LINE>} catch (NumberFormatException e) {<NEW_LINE>throw new XmlPullParserException("Not a number in num attribute in int-array");<NEW_LINE>}<NEW_LINE>parser.next();<NEW_LINE>int[] array = new int[num];<NEW_LINE>int i = 0;<NEW_LINE>int eventType = parser.getEventType();<NEW_LINE>do {<NEW_LINE>if (eventType == parser.START_TAG) {<NEW_LINE>if (parser.getName().equals("item")) {<NEW_LINE>try {<NEW_LINE>array[i] = Integer.parseInt(parser.getAttributeValue(null, "value"));<NEW_LINE>} catch (NullPointerException e) {<NEW_LINE>throw new XmlPullParserException("Need value attribute in item");<NEW_LINE>} catch (NumberFormatException e) {<NEW_LINE>throw new XmlPullParserException("Not a number in value attribute in item");<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>throw new XmlPullParserException("Expected item tag at: " + parser.getName());<NEW_LINE>}<NEW_LINE>} else if (eventType == parser.END_TAG) {<NEW_LINE>if (parser.getName().equals(endTag)) {<NEW_LINE>return array;<NEW_LINE>} else if (parser.getName().equals("item")) {<NEW_LINE>i++;<NEW_LINE>} else {<NEW_LINE>throw new XmlPullParserException("Expected " + endTag + " end tag at: " + parser.getName());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>eventType = parser.next();<NEW_LINE>} while (eventType != parser.END_DOCUMENT);<NEW_LINE>throw new XmlPullParserException("Document ended before " + endTag + " end tag");<NEW_LINE>}
.getAttributeValue(null, "num"));
1,036,797
final ListResourcesAssociatedToCustomLineItemResult executeListResourcesAssociatedToCustomLineItem(ListResourcesAssociatedToCustomLineItemRequest listResourcesAssociatedToCustomLineItemRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listResourcesAssociatedToCustomLineItemRequest);<NEW_LINE><MASK><NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<ListResourcesAssociatedToCustomLineItemRequest> request = null;<NEW_LINE>Response<ListResourcesAssociatedToCustomLineItemResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new ListResourcesAssociatedToCustomLineItemRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listResourcesAssociatedToCustomLineItemRequest));<NEW_LINE>// Binds the request metrics to the current request.<NEW_LINE>request.setAWSRequestMetrics(awsRequestMetrics);<NEW_LINE>request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);<NEW_LINE>request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SERVICE_ID, "billingconductor");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListResourcesAssociatedToCustomLineItem");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<ListResourcesAssociatedToCustomLineItemResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListResourcesAssociatedToCustomLineItemResultJsonUnmarshaller());<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();
3,864
private void renderFullClassFunctionDeclaration(PreparedClass cls, ScopedName jsName, List<FieldHolder> nonStaticFields) throws IOException {<NEW_LINE>boolean thisAliased = false;<NEW_LINE>renderFunctionDeclaration(jsName);<NEW_LINE>writer.append("()").ws().append("{").indent().softNewLine();<NEW_LINE>if (nonStaticFields.size() > 1) {<NEW_LINE>thisAliased = true;<NEW_LINE>writer.append("var a").ws().append("=").ws().append("this;").ws();<NEW_LINE>}<NEW_LINE>if (!cls.getClassHolder().getModifiers().contains(ElementModifier.INTERFACE) && cls.getParentName() != null) {<NEW_LINE>writer.appendClass(cls.getParentName()).append(".call(").append(thisAliased ? "a" : "this").append(");").softNewLine();<NEW_LINE>}<NEW_LINE>for (FieldHolder field : nonStaticFields) {<NEW_LINE>Object value = field.getInitialValue();<NEW_LINE>if (value == null) {<NEW_LINE>value = getDefaultValue(field.getType());<NEW_LINE>}<NEW_LINE>FieldReference fieldRef = new FieldReference(cls.getName(), field.getName());<NEW_LINE>writer.append(thisAliased ? "a" : "this").append(".").appendField(fieldRef).ws().append("=").ws();<NEW_LINE>context.constantToString(writer, value);<NEW_LINE>writer.append(";").softNewLine();<NEW_LINE>debugEmitter.addField(field.getName()<MASK><NEW_LINE>}<NEW_LINE>if (cls.getName().equals("java.lang.Object")) {<NEW_LINE>writer.append("this.$id$").ws().append('=').ws().append("0;").softNewLine();<NEW_LINE>}<NEW_LINE>writer.outdent().append("}");<NEW_LINE>if (jsName.scoped) {<NEW_LINE>writer.append(";");<NEW_LINE>}<NEW_LINE>writer.newLine();<NEW_LINE>}
, naming.getNameFor(fieldRef));
968,933
private static Map<TypeAlias, jnr.ffi.NativeType> buildTypeMap() {<NEW_LINE>Map<TypeAlias, jnr.ffi.NativeType> m = new EnumMap<TypeAlias, jnr.ffi.NativeType>(TypeAlias.class);<NEW_LINE>m.put(TypeAlias.int8_t, NativeType.SCHAR);<NEW_LINE>m.put(TypeAlias.u_int8_t, NativeType.UCHAR);<NEW_LINE>m.put(TypeAlias.int16_t, NativeType.SSHORT);<NEW_LINE>m.put(TypeAlias.u_int16_t, NativeType.USHORT);<NEW_LINE>m.put(TypeAlias.int32_t, NativeType.SINT);<NEW_LINE>m.put(TypeAlias.u_int32_t, NativeType.UINT);<NEW_LINE>m.put(TypeAlias.int64_t, NativeType.SLONGLONG);<NEW_LINE>m.put(TypeAlias.u_int64_t, NativeType.ULONGLONG);<NEW_LINE>m.put(TypeAlias.intptr_t, NativeType.SINT);<NEW_LINE>m.put(TypeAlias.uintptr_t, NativeType.ULONG);<NEW_LINE>m.put(<MASK><NEW_LINE>m.put(TypeAlias.dev_t, NativeType.ULONGLONG);<NEW_LINE>m.put(TypeAlias.blkcnt_t, NativeType.SLONGLONG);<NEW_LINE>m.put(TypeAlias.blksize_t, NativeType.SLONG);<NEW_LINE>m.put(TypeAlias.gid_t, NativeType.UINT);<NEW_LINE>m.put(TypeAlias.in_addr_t, NativeType.UINT);<NEW_LINE>m.put(TypeAlias.in_port_t, NativeType.USHORT);<NEW_LINE>m.put(TypeAlias.ino_t, NativeType.ULONGLONG);<NEW_LINE>m.put(TypeAlias.ino64_t, NativeType.ULONGLONG);<NEW_LINE>m.put(TypeAlias.key_t, NativeType.SINT);<NEW_LINE>m.put(TypeAlias.mode_t, NativeType.UINT);<NEW_LINE>m.put(TypeAlias.nlink_t, NativeType.UINT);<NEW_LINE>m.put(TypeAlias.id_t, NativeType.UINT);<NEW_LINE>m.put(TypeAlias.pid_t, NativeType.SINT);<NEW_LINE>m.put(TypeAlias.off_t, NativeType.SLONGLONG);<NEW_LINE>m.put(TypeAlias.swblk_t, NativeType.SLONG);<NEW_LINE>m.put(TypeAlias.uid_t, NativeType.UINT);<NEW_LINE>m.put(TypeAlias.clock_t, NativeType.SLONG);<NEW_LINE>m.put(TypeAlias.size_t, NativeType.UINT);<NEW_LINE>m.put(TypeAlias.ssize_t, NativeType.SINT);<NEW_LINE>m.put(TypeAlias.time_t, NativeType.SLONG);<NEW_LINE>m.put(TypeAlias.fsblkcnt_t, NativeType.ULONGLONG);<NEW_LINE>m.put(TypeAlias.fsfilcnt_t, NativeType.ULONGLONG);<NEW_LINE>m.put(TypeAlias.sa_family_t, NativeType.USHORT);<NEW_LINE>m.put(TypeAlias.socklen_t, NativeType.UINT);<NEW_LINE>m.put(TypeAlias.rlim_t, NativeType.ULONGLONG);<NEW_LINE>m.put(TypeAlias.cc_t, NativeType.UCHAR);<NEW_LINE>m.put(TypeAlias.speed_t, NativeType.UINT);<NEW_LINE>m.put(TypeAlias.tcflag_t, NativeType.UINT);<NEW_LINE>return m;<NEW_LINE>}
TypeAlias.caddr_t, NativeType.ADDRESS);
1,850,373
private TScanRangeLocations newLocations(TBrokerScanRangeParams params, String brokerName) throws UserException {<NEW_LINE>Backend selectedBackend = backends.get(nextBe++);<NEW_LINE>nextBe <MASK><NEW_LINE>// Generate on broker scan range<NEW_LINE>TBrokerScanRange brokerScanRange = new TBrokerScanRange();<NEW_LINE>brokerScanRange.setParams(params);<NEW_LINE>FsBroker broker = null;<NEW_LINE>try {<NEW_LINE>broker = Catalog.getCurrentCatalog().getBrokerMgr().getBroker(brokerName, selectedBackend.getHost());<NEW_LINE>} catch (AnalysisException e) {<NEW_LINE>throw new UserException(e.getMessage());<NEW_LINE>}<NEW_LINE>brokerScanRange.addToBroker_addresses(new TNetworkAddress(broker.ip, broker.port));<NEW_LINE>// Scan range<NEW_LINE>TScanRange scanRange = new TScanRange();<NEW_LINE>scanRange.setBroker_scan_range(brokerScanRange);<NEW_LINE>// Locations<NEW_LINE>TScanRangeLocations locations = new TScanRangeLocations();<NEW_LINE>locations.setScan_range(scanRange);<NEW_LINE>TScanRangeLocation location = new TScanRangeLocation();<NEW_LINE>location.setBackend_id(selectedBackend.getId());<NEW_LINE>location.setServer(new TNetworkAddress(selectedBackend.getHost(), selectedBackend.getBePort()));<NEW_LINE>locations.addToLocations(location);<NEW_LINE>return locations;<NEW_LINE>}
= nextBe % backends.size();
1,756,855
public static Map<String, io.fabric8.kubernetes.client.http.Interceptor> createApplicableInterceptors(Config config, HttpClient.Factory factory) {<NEW_LINE>Map<String, io.fabric8.kubernetes.client.http.Interceptor> interceptors = new LinkedHashMap<>();<NEW_LINE>// Header Interceptor<NEW_LINE>interceptors.put(HEADER_INTERCEPTOR, new Interceptor() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void before(BasicBuilder builder, HttpHeaders headers) {<NEW_LINE>if (Utils.isNotNullOrEmpty(config.getUsername()) && Utils.isNotNullOrEmpty(config.getPassword())) {<NEW_LINE>builder.header("Authorization", basicCredentials(config.getUsername(), config.getPassword()));<NEW_LINE>} else if (Utils.isNotNullOrEmpty(config.getOauthToken())) {<NEW_LINE>builder.header("Authorization", "Bearer " + config.getOauthToken());<NEW_LINE>}<NEW_LINE>if (config.getCustomHeaders() != null && !config.getCustomHeaders().isEmpty()) {<NEW_LINE>for (Map.Entry<String, String> entry : config.getCustomHeaders().entrySet()) {<NEW_LINE>builder.header(entry.getKey(), entry.getValue());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (config.getUserAgent() != null && !config.getUserAgent().isEmpty()) {<NEW_LINE>builder.setHeader("User-Agent", config.getUserAgent());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>});<NEW_LINE>// Impersonator Interceptor<NEW_LINE>interceptors.put(ImpersonatorInterceptor.NAME, new ImpersonatorInterceptor(config));<NEW_LINE>// Token Refresh Interceptor<NEW_LINE>interceptors.put(TokenRefreshInterceptor.NAME, new TokenRefreshInterceptor(config, factory));<NEW_LINE>// Backwards Compatibility Interceptor<NEW_LINE>String shouldDisableBackwardsCompatibilityInterceptor = Utils.getSystemPropertyOrEnvVar(KUBERNETES_BACKWARDS_COMPATIBILITY_INTERCEPTOR_DISABLE, "false");<NEW_LINE>if (!Boolean.parseBoolean(shouldDisableBackwardsCompatibilityInterceptor)) {<NEW_LINE>interceptors.put(BackwardsCompatibilityInterceptor<MASK><NEW_LINE>}<NEW_LINE>return interceptors;<NEW_LINE>}
.NAME, new BackwardsCompatibilityInterceptor());
645,020
public void run() {<NEW_LINE>List<String> listOptions = listActionConfig.listType;<NEW_LINE>if (listOptions == null) {<NEW_LINE>try {<NEW_LINE>printing.<MASK><NEW_LINE>} catch (IOException e) {<NEW_LINE>throw Throwables.propagate(e);<NEW_LINE>}<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>List<String> options = Arrays.asList(listOptions.get(0).split(","));<NEW_LINE>String firstOption = options.get(0).toLowerCase().trim();<NEW_LINE>try {<NEW_LINE>switch(firstOption) {<NEW_LINE>case "groups":<NEW_LINE>printing.printAllGroups(keywhizClient.allGroups());<NEW_LINE>break;<NEW_LINE>case "clients":<NEW_LINE>printing.printAllClients(keywhizClient.allClients());<NEW_LINE>break;<NEW_LINE>case "secrets":<NEW_LINE>if (listActionConfig.idx == null && listActionConfig.num == null) {<NEW_LINE>printing.printAllSanitizedSecrets(keywhizClient.allSecrets());<NEW_LINE>} else if (listActionConfig.idx != null && listActionConfig.num != null) {<NEW_LINE>checkArgument(listActionConfig.idx >= 0);<NEW_LINE>checkArgument(listActionConfig.num >= 0);<NEW_LINE>if (listActionConfig.newestFirst == null) {<NEW_LINE>printing.printAllSanitizedSecrets(keywhizClient.allSecretsBatched(listActionConfig.idx, listActionConfig.num, true));<NEW_LINE>} else {<NEW_LINE>printing.printAllSanitizedSecrets(keywhizClient.allSecretsBatched(listActionConfig.idx, listActionConfig.num, listActionConfig.newestFirst));<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>throw new AssertionError("Both idx and num must be provided for batched secret queries");<NEW_LINE>}<NEW_LINE>break;<NEW_LINE>default:<NEW_LINE>throw new AssertionError("Invalid list option: " + firstOption);<NEW_LINE>}<NEW_LINE>} catch (IOException e) {<NEW_LINE>throw Throwables.propagate(e);<NEW_LINE>}<NEW_LINE>}
printAllSanitizedSecrets(keywhizClient.allSecrets());
1,210,681
public static CodegenExpression codegen(DTLocalZDTIntervalForge forge, CodegenExpression start, CodegenExpression end, CodegenMethodScope codegenMethodScope, ExprForgeCodegenSymbol exprSymbol, CodegenClassScope codegenClassScope) {<NEW_LINE>CodegenMethod methodNode = codegenMethodScope.makeChild(EPTypePremade.BOOLEANBOXED.getEPType(), DTLocalZDTIntervalEval.class, codegenClassScope).addParam(EPTypePremade.ZONEDDATETIME.getEPType(), "startTimestamp").addParam(EPTypePremade.ZONEDDATETIME.getEPType(), "endTimestamp");<NEW_LINE>methodNode.getBlock().declareVar(EPTypePremade.LONGPRIMITIVE.getEPType(), "start", staticMethod(DatetimeLongCoercerZonedDateTime.class, "coerceZDTToMillis", ref("startTimestamp"))).declareVar(EPTypePremade.LONGPRIMITIVE.getEPType(), "end", staticMethod(DatetimeLongCoercerZonedDateTime.class, "coerceZDTToMillis", ref("endTimestamp"))).methodReturn(forge.intervalForge.codegen(ref("start"), ref("end")<MASK><NEW_LINE>return localMethod(methodNode, start, end);<NEW_LINE>}
, methodNode, exprSymbol, codegenClassScope));
1,226,266
private void startPreview(@NonNull final Parameters parameters) {<NEW_LINE>if (this.camera.isPresent()) {<NEW_LINE>try {<NEW_LINE>final Camera camera <MASK><NEW_LINE>final Size preferredPreviewSize = getPreferredPreviewSize(parameters);<NEW_LINE>if (preferredPreviewSize != null && !parameters.getPreviewSize().equals(preferredPreviewSize)) {<NEW_LINE>Log.i(TAG, "starting preview with size " + preferredPreviewSize.width + "x" + preferredPreviewSize.height);<NEW_LINE>if (state == State.ACTIVE)<NEW_LINE>stopPreview();<NEW_LINE>previewSize = preferredPreviewSize;<NEW_LINE>parameters.setPreviewSize(preferredPreviewSize.width, preferredPreviewSize.height);<NEW_LINE>camera.setParameters(parameters);<NEW_LINE>} else {<NEW_LINE>previewSize = parameters.getPreviewSize();<NEW_LINE>}<NEW_LINE>long previewStartMillis = System.currentTimeMillis();<NEW_LINE>camera.startPreview();<NEW_LINE>Log.i(TAG, "camera.startPreview() -> " + (System.currentTimeMillis() - previewStartMillis) + "ms");<NEW_LINE>state = State.ACTIVE;<NEW_LINE>ThreadUtil.runOnMain(new Runnable() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void run() {<NEW_LINE>requestLayout();<NEW_LINE>for (CameraViewListener listener : listeners) {<NEW_LINE>listener.onCameraStart();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>});<NEW_LINE>} catch (Exception e) {<NEW_LINE>Log.w(TAG, e);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
= this.camera.get();
1,312,276
private void copyHeadersMap(Map<String, List<String>> headerMap, OutgoingSipServletRequest outMsg, boolean isToFromAllowed) {<NEW_LINE>if (headerMap == null)<NEW_LINE>return;<NEW_LINE>for (Entry<String, List<String>> entry : headerMap.entrySet()) {<NEW_LINE>String headerName = entry.getKey();<NEW_LINE>List<String> values = entry.getValue();<NEW_LINE>if (!ContactHeader.name.equalsIgnoreCase(headerName)) {<NEW_LINE>// copy headers for all values<NEW_LINE>if (values != null && values.size() > 0) {<NEW_LINE>outMsg.<MASK><NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>String contact = values.get(0);<NEW_LINE>// setting contact allowed parts<NEW_LINE>try {<NEW_LINE>AddressImpl addr = (AddressImpl) outMsg.getAddressHeader(ContactHeader.name);<NEW_LINE>// ContactHeaderImpl header = (ContactHeaderImpl)StackProperties.getInstance().getHeadersFactory().createHeader(ContactHeader.name, contact);<NEW_LINE>Address receivedContact = SipServletsFactoryImpl.getInstance().createAddress(contact);<NEW_LINE>// This will set only the allowed parts.<NEW_LINE>addr.setURI(receivedContact.getURI());<NEW_LINE>} catch (ServletParseException e) {<NEW_LINE>if (c_logger.isTraceDebugEnabled()) {<NEW_LINE>c_logger.traceDebug(this, "Error: B2buaHelperImpl copyHeadersMap could not create contact header ", e.getMessage());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
addHeaderToFromAllowed(headerName, values, isToFromAllowed);
1,560,406
private Parameter readParam(Swagger swagger, Type type, Class<?> cls, ApiParam param) {<NEW_LINE>PrimitiveType fromType = PrimitiveType.fromType(type);<NEW_LINE>final Parameter para = null == fromType ? new <MASK><NEW_LINE>Parameter parameter = ParameterProcessor.applyAnnotations(swagger, para, type, null == param ? new ArrayList<Annotation>() : Collections.<Annotation>singletonList(param));<NEW_LINE>if (parameter instanceof AbstractSerializableParameter) {<NEW_LINE>final AbstractSerializableParameter<?> p = (AbstractSerializableParameter<?>) parameter;<NEW_LINE>if (p.getType() == null) {<NEW_LINE>p.setType(null == fromType ? "string" : fromType.getCommonName());<NEW_LINE>}<NEW_LINE>p.setRequired(p.getRequired() || cls.isPrimitive());<NEW_LINE>} else {<NEW_LINE>// hack: Get the from data model paramter from BodyParameter<NEW_LINE>BodyParameter bp = (BodyParameter) parameter;<NEW_LINE>bp.setIn("body");<NEW_LINE>Property property = ModelConverters.getInstance().readAsProperty(type);<NEW_LINE>final Map<PropertyBuilder.PropertyId, Object> args = new EnumMap<PropertyBuilder.PropertyId, Object>(PropertyBuilder.PropertyId.class);<NEW_LINE>bp.setSchema(PropertyBuilder.toModel(PropertyBuilder.merge(property, args)));<NEW_LINE>}<NEW_LINE>return parameter;<NEW_LINE>}
BodyParameter() : new QueryParameter();
1,562,470
final DeleteVoiceTemplateResult executeDeleteVoiceTemplate(DeleteVoiceTemplateRequest deleteVoiceTemplateRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(deleteVoiceTemplateRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE><MASK><NEW_LINE>Request<DeleteVoiceTemplateRequest> request = null;<NEW_LINE>Response<DeleteVoiceTemplateResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new DeleteVoiceTemplateRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(deleteVoiceTemplateRequest));<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, "Pinpoint");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteVoiceTemplate");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<DeleteVoiceTemplateResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeleteVoiceTemplateResultJsonUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
162,155
public ImmutableMultimap<ShippedCandidateKey, InOutId> retrieveShipmentIdsByCandidateKey(@NonNull final Set<ShippedCandidateKey> shippedCandidateKeys) {<NEW_LINE>final Set<ShipmentScheduleId> scheduleIds = shippedCandidateKeys.stream().map(ShippedCandidateKey::getShipmentScheduleId).collect(ImmutableSet.toImmutableSet());<NEW_LINE>final ImmutableMap<ShipmentScheduleId, List<I_M_ShipmentSchedule_QtyPicked>> scheduleId2qtyPickedRecords = shipmentScheduleAllocDAO.retrieveOnShipmentLineRecordsByScheduleIds(scheduleIds);<NEW_LINE>final Set<InOutLineId> inOutLineIds = scheduleId2qtyPickedRecords.values().stream().flatMap(List::stream).map(I_M_ShipmentSchedule_QtyPicked::getM_InOutLine_ID).map(InOutLineId::ofRepoId).collect(ImmutableSet.toImmutableSet());<NEW_LINE>final ImmutableMap<InOutLineId, I_M_InOut> <MASK><NEW_LINE>final ImmutableMultimap.Builder<ShippedCandidateKey, InOutId> candidateKey2ShipmentId = ImmutableMultimap.builder();<NEW_LINE>for (final ShippedCandidateKey candidateKey : shippedCandidateKeys) {<NEW_LINE>final Supplier<AdempiereException> exceptionSupplier = () -> new AdempiereException("No Shipment was found for the M_ShipmentSchedule_ID!").appendParametersToMessage().setParameter("M_ShipmentSchedule_ID", ShipmentScheduleId.toRepoId(candidateKey.getShipmentScheduleId())).setParameter("ShipmentDocumentNumber", candidateKey.getShipmentDocumentNo());<NEW_LINE>final List<I_M_ShipmentSchedule_QtyPicked> qtyPickedRecords = scheduleId2qtyPickedRecords.get(candidateKey.getShipmentScheduleId());<NEW_LINE>if (qtyPickedRecords == null) {<NEW_LINE>throw exceptionSupplier.get();<NEW_LINE>}<NEW_LINE>final ImmutableList<InOutId> targetShipmentIds = // don't assume that the shipment's documentNo is equal to the request's assumed documentNo<NEW_LINE>qtyPickedRecords.stream().map(I_M_ShipmentSchedule_QtyPicked::getM_InOutLine_ID).map(InOutLineId::ofRepoId).map(lineId2InOut::get).// .filter(shipment -> candidateKey.getShipmentDocumentNo().equals(shipment.getDocumentNo()))<NEW_LINE>map(I_M_InOut::getM_InOut_ID).map(InOutId::ofRepoId).collect(ImmutableList.toImmutableList());<NEW_LINE>if (targetShipmentIds.isEmpty()) {<NEW_LINE>throw exceptionSupplier.get();<NEW_LINE>}<NEW_LINE>candidateKey2ShipmentId.putAll(candidateKey, targetShipmentIds);<NEW_LINE>}<NEW_LINE>return candidateKey2ShipmentId.build();<NEW_LINE>}
lineId2InOut = inOutDAO.retrieveInOutByLineIds(inOutLineIds);
220,527
private static // and uploads it to the blurred bucket.<NEW_LINE>void blur(BlobInfo blobInfo) throws IOException {<NEW_LINE>String bucketName = blobInfo.getBucket();<NEW_LINE>String fileName = blobInfo.getName();<NEW_LINE>// Download image<NEW_LINE>Blob blob = storage.get(BlobId.of(bucketName, fileName));<NEW_LINE>Path download = Paths.get("/tmp/", fileName);<NEW_LINE>blob.downloadTo(download);<NEW_LINE>// Construct the command.<NEW_LINE>Path upload = Paths.<MASK><NEW_LINE>List<String> args = List.of("convert", download.toString(), "-blur", "0x8", upload.toString());<NEW_LINE>try {<NEW_LINE>ProcessBuilder pb = new ProcessBuilder(args);<NEW_LINE>Process process = pb.start();<NEW_LINE>process.waitFor();<NEW_LINE>} catch (Exception e) {<NEW_LINE>logger.info(String.format("Error: %s", e.getMessage()));<NEW_LINE>}<NEW_LINE>// Upload image to blurred bucket.<NEW_LINE>BlobId blurredBlobId = BlobId.of(BLURRED_BUCKET_NAME, fileName);<NEW_LINE>BlobInfo blurredBlobInfo = BlobInfo.newBuilder(blurredBlobId).setContentType(blob.getContentType()).build();<NEW_LINE>byte[] blurredFile = Files.readAllBytes(upload);<NEW_LINE>storage.create(blurredBlobInfo, blurredFile);<NEW_LINE>logger.info(String.format("Blurred image uploaded to: gs://%s/%s", BLURRED_BUCKET_NAME, fileName));<NEW_LINE>// Remove images from fileSystem<NEW_LINE>Files.delete(download);<NEW_LINE>Files.delete(upload);<NEW_LINE>}
get("/tmp/", "blurred-" + fileName);
1,638,462
public String findOrphanDescriptors() {<NEW_LINE>com.haulmont.cuba.core.app.filestorage.FileStorage fileStorage;<NEW_LINE>FileStorageAPI fileStorageAPI = AppBeans.get(FileStorageAPI.class);<NEW_LINE>if (fileStorageAPI instanceof com.haulmont.cuba.core.app.filestorage.FileStorage) {<NEW_LINE>fileStorage = (com.haulmont.cuba.core.app.filestorage.FileStorage) fileStorageAPI;<NEW_LINE>} else {<NEW_LINE>return "<not supported>";<NEW_LINE>}<NEW_LINE>File[] roots = getStorageRoots();<NEW_LINE>if (roots.length == 0)<NEW_LINE>return "No storage directories defined";<NEW_LINE>StringBuilder sb = new StringBuilder();<NEW_LINE><MASK><NEW_LINE>try {<NEW_LINE>EntityManager em = persistence.getEntityManager();<NEW_LINE>TypedQuery<FileDescriptor> query = em.createQuery("select fd from sys$FileDescriptor fd", FileDescriptor.class);<NEW_LINE>List<FileDescriptor> fileDescriptors = query.getResultList();<NEW_LINE>for (FileDescriptor fileDescriptor : fileDescriptors) {<NEW_LINE>File dir = fileStorage.getStorageDir(roots[0], fileDescriptor);<NEW_LINE>File file = new File(dir, com.haulmont.cuba.core.app.filestorage.FileStorage.getFileName(fileDescriptor));<NEW_LINE>if (!file.exists()) {<NEW_LINE>sb.append(fileDescriptor.getId()).append(", ").append(fileDescriptor.getName()).append(", ").append(fileDescriptor.getCreateDate()).append("\n");<NEW_LINE>}<NEW_LINE>}<NEW_LINE>tx.commit();<NEW_LINE>} catch (Exception e) {<NEW_LINE>return ExceptionUtils.getStackTrace(e);<NEW_LINE>} finally {<NEW_LINE>tx.end();<NEW_LINE>}<NEW_LINE>return sb.toString();<NEW_LINE>}
Transaction tx = persistence.createTransaction();
1,712,658
public void acceptElement(IBaseResource theResource, IBase theElement, List<String> thePathToElement, BaseRuntimeChildDefinition theChildDefinition, BaseRuntimeElementDefinition<?> theDefinition) {<NEW_LINE>if (myCodeableConceptType.isAssignableFrom(theElement.getClass())) {<NEW_LINE>// Find all existing Codings<NEW_LINE>Multimap<String, String> foundSystemsToCodes = ArrayListMultimap.create();<NEW_LINE>List<IBase> nextCodeableConceptCodings = myCodeableConceptCodingChild.getAccessor().getValues(theElement);<NEW_LINE>for (IBase nextCodeableConceptCoding : nextCodeableConceptCodings) {<NEW_LINE>String system = myCodingSystemChild.getAccessor().getFirstValueOrNull(nextCodeableConceptCoding).map(t -> (IPrimitiveType<?>) t).map(t -> t.getValueAsString()).orElse(null);<NEW_LINE>String code = myCodingCodeChild.getAccessor().getFirstValueOrNull(nextCodeableConceptCoding).map(t -> (IPrimitiveType<?>) t).map(t -> t.getValueAsString()).orElse(null);<NEW_LINE>if (isNotBlank(system) && isNotBlank(code) && !foundSystemsToCodes.containsKey(system)) {<NEW_LINE>foundSystemsToCodes.put(system, code);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// Look for mappings<NEW_LINE>for (String nextSourceSystem : foundSystemsToCodes.keySet()) {<NEW_LINE>String wantTargetSystem = myMappingSpecifications.get(nextSourceSystem);<NEW_LINE>if (wantTargetSystem != null) {<NEW_LINE>if (!foundSystemsToCodes.containsKey(wantTargetSystem)) {<NEW_LINE>for (String code : foundSystemsToCodes.get(nextSourceSystem)) {<NEW_LINE>TranslateConceptResults translateConceptResults = myValidationSupport.translateConcept(new IValidationSupport.TranslateCodeRequest<MASK><NEW_LINE>if (translateConceptResults != null) {<NEW_LINE>List<TranslateConceptResult> mappings = translateConceptResults.getResults();<NEW_LINE>for (TranslateConceptResult nextMapping : mappings) {<NEW_LINE>IBase newCoding = createCodingFromMappingTarget(nextMapping);<NEW_LINE>// Add coding to existing CodeableConcept<NEW_LINE>myCodeableConceptCodingChild.getMutator().addValue(theElement, newCoding);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
(nextSourceSystem, code, wantTargetSystem));
870,868
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {<NEW_LINE>super.onViewCreated(view, savedInstanceState);<NEW_LINE>setHasOptionsMenu(true);<NEW_LINE>ActionBar actionBar = ((AppCompatActivity) requireActivity()).getSupportActionBar();<NEW_LINE>actionBar.setDisplayHomeAsUpEnabled(true);<NEW_LINE>actionBar.setTitle(R.string.pref_control_key_binding_sect_title);<NEW_LINE>Bundle args = getArguments();<NEW_LINE>String path = args.getString(KEY_CONFIG_PATH);<NEW_LINE>if (path == null) {<NEW_LINE>Toast.makeText(getContext(), "Error", Toast.LENGTH_SHORT).show();<NEW_LINE>getParentFragmentManager().popBackStackImmediate();<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>params = ProfilesManager.loadConfig(new File(path));<NEW_LINE>setupButton(R.id.virtual_key_left_soft, Keycode.KEY_SOFT_LEFT);<NEW_LINE>setupButton(R.id.virtual_key_right_soft, Keycode.KEY_SOFT_RIGHT);<NEW_LINE>setupButton(R.id.virtual_key_d, Keycode.KEY_SEND);<NEW_LINE>setupButton(R.id.virtual_key_c, Keycode.KEY_CLEAR);<NEW_LINE>setupButton(R.id.virtual_key_left, Keycode.KEY_LEFT);<NEW_LINE>setupButton(R.id.virtual_key_right, Keycode.KEY_RIGHT);<NEW_LINE>setupButton(R.id.virtual_key_up, Keycode.KEY_UP);<NEW_LINE>setupButton(R.id.virtual_key_down, Keycode.KEY_DOWN);<NEW_LINE>setupButton(R.id.virtual_key_f, Keycode.KEY_FIRE);<NEW_LINE>setupButton(R.id.virtual_key_1, Keycode.KEY_NUM1);<NEW_LINE>setupButton(R.id.virtual_key_2, Keycode.KEY_NUM2);<NEW_LINE>setupButton(R.id.virtual_key_3, Keycode.KEY_NUM3);<NEW_LINE>setupButton(R.id.virtual_key_4, Keycode.KEY_NUM4);<NEW_LINE>setupButton(R.id.virtual_key_5, Keycode.KEY_NUM5);<NEW_LINE>setupButton(R.id.virtual_key_6, Keycode.KEY_NUM6);<NEW_LINE>setupButton(R.id.virtual_key_7, Keycode.KEY_NUM7);<NEW_LINE>setupButton(R.id.virtual_key_8, Keycode.KEY_NUM8);<NEW_LINE>setupButton(R.id.virtual_key_9, Keycode.KEY_NUM9);<NEW_LINE>setupButton(R.id.virtual_key_0, Keycode.KEY_NUM0);<NEW_LINE>setupButton(R.<MASK><NEW_LINE>setupButton(R.id.virtual_key_pound, Keycode.KEY_POUND);<NEW_LINE>SparseIntArray keyMap = params.keyMappings;<NEW_LINE>androidToSymbian = keyMap == null ? defaultKeyMap.clone() : keyMap.clone();<NEW_LINE>}
id.virtual_key_star, Keycode.KEY_STAR);
119,852
private static void parseNonDynamicArray(ParseContext context, ObjectMapper mapper, final String lastFieldName, String arrayFieldName) throws IOException {<NEW_LINE>XContentParser parser = context.parser();<NEW_LINE>XContentParser.Token token;<NEW_LINE>final String[] paths = splitAndValidatePath(lastFieldName);<NEW_LINE>while ((token = parser.nextToken()) != XContentParser.Token.END_ARRAY) {<NEW_LINE>if (token == XContentParser.Token.START_OBJECT) {<NEW_LINE>parseObject(context, mapper, lastFieldName, paths);<NEW_LINE>} else if (token == XContentParser.Token.START_ARRAY) {<NEW_LINE>parseArray(context, mapper, lastFieldName, paths);<NEW_LINE>} else if (token == XContentParser.Token.VALUE_NULL) {<NEW_LINE>parseNullValue(context, mapper, lastFieldName, paths);<NEW_LINE>} else if (token == null) {<NEW_LINE>throw new MapperParsingException("object mapping for [" + mapper.name(<MASK><NEW_LINE>} else {<NEW_LINE>assert token.isValue();<NEW_LINE>parseValue(context, mapper, lastFieldName, token, paths);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
) + "] with array for [" + arrayFieldName + "] tried to parse as array, but got EOF, is there a mismatch in types for the same field?");
967,944
public final ViewExpressionsContext viewExpressions() throws RecognitionException {<NEW_LINE>ViewExpressionsContext _localctx = new ViewExpressionsContext(_ctx, getState());<NEW_LINE>enterRule(_localctx, 226, RULE_viewExpressions);<NEW_LINE>paraphrases.push("view specifications");<NEW_LINE>int _la;<NEW_LINE>try {<NEW_LINE>setState(1731);<NEW_LINE>_errHandler.sync(this);<NEW_LINE>switch(_input.LA(1)) {<NEW_LINE>case DOT:<NEW_LINE>enterOuterAlt(_localctx, 1);<NEW_LINE>{<NEW_LINE>{<NEW_LINE>setState(1713);<NEW_LINE>match(DOT);<NEW_LINE>setState(1714);<NEW_LINE>viewExpressionWNamespace();<NEW_LINE>setState(1719);<NEW_LINE>_errHandler.sync(this);<NEW_LINE><MASK><NEW_LINE>while (_la == DOT) {<NEW_LINE>{<NEW_LINE>{<NEW_LINE>setState(1715);<NEW_LINE>match(DOT);<NEW_LINE>setState(1716);<NEW_LINE>viewExpressionWNamespace();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>setState(1721);<NEW_LINE>_errHandler.sync(this);<NEW_LINE>_la = _input.LA(1);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>break;<NEW_LINE>case HASHCHAR:<NEW_LINE>enterOuterAlt(_localctx, 2);<NEW_LINE>{<NEW_LINE>{<NEW_LINE>setState(1722);<NEW_LINE>match(HASHCHAR);<NEW_LINE>setState(1723);<NEW_LINE>viewExpressionOptNamespace();<NEW_LINE>setState(1728);<NEW_LINE>_errHandler.sync(this);<NEW_LINE>_la = _input.LA(1);<NEW_LINE>while (_la == HASHCHAR) {<NEW_LINE>{<NEW_LINE>{<NEW_LINE>setState(1724);<NEW_LINE>match(HASHCHAR);<NEW_LINE>setState(1725);<NEW_LINE>viewExpressionOptNamespace();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>setState(1730);<NEW_LINE>_errHandler.sync(this);<NEW_LINE>_la = _input.LA(1);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>break;<NEW_LINE>default:<NEW_LINE>throw new NoViableAltException(this);<NEW_LINE>}<NEW_LINE>_ctx.stop = _input.LT(-1);<NEW_LINE>paraphrases.pop();<NEW_LINE>} catch (RecognitionException re) {<NEW_LINE>_localctx.exception = re;<NEW_LINE>_errHandler.reportError(this, re);<NEW_LINE>_errHandler.recover(this, re);<NEW_LINE>} finally {<NEW_LINE>exitRule();<NEW_LINE>}<NEW_LINE>return _localctx;<NEW_LINE>}
_la = _input.LA(1);
1,041,142
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException {<NEW_LINE>// If ever there was a valid use of goto, this would be it... if Java had it.<NEW_LINE>if (!(request instanceof HttpServletRequest)) {<NEW_LINE>log.debug("request is not HTTP");<NEW_LINE>chain.doFilter(request, response);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>final HttpServletRequest httpReq = (HttpServletRequest) request;<NEW_LINE>final HttpServletResponse httpResponse = (HttpServletResponse) response;<NEW_LINE>httpResponse.addHeader(HELIOS_SERVER_VERSION_HEADER, SERVER_VERSION.toString());<NEW_LINE>final String header = httpReq.getHeader(HELIOS_VERSION_HEADER);<NEW_LINE>if (header == null) {<NEW_LINE>log.debug("No header " + HELIOS_VERSION_HEADER);<NEW_LINE>httpResponse.addHeader(HELIOS_VERSION_STATUS_HEADER, MISSING.toString());<NEW_LINE>chain.doFilter(request, response);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>final PomVersion clientVersion;<NEW_LINE>try {<NEW_LINE>clientVersion = PomVersion.parse(header);<NEW_LINE>} catch (RuntimeException e) {<NEW_LINE>log.debug("failure to parse version header " + header);<NEW_LINE>httpResponse.addHeader(HELIOS_VERSION_STATUS_HEADER, INVALID.toString());<NEW_LINE>httpResponse.sendError(400, "Helios client version format is bogus - expect n.n.n");<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>metrics.clientVersion(clientVersion.toString());<NEW_LINE>final Status status = getStatus(SERVER_VERSION, clientVersion);<NEW_LINE>httpResponse.addHeader(HELIOS_VERSION_STATUS_HEADER, status.toString());<NEW_LINE>if (status == Status.INCOMPATIBLE) {<NEW_LINE>log.debug("version " + clientVersion + " is incompatible");<NEW_LINE>httpResponse.sendError(426, "Your client version is incompatible with the server version " + POM_VERSION);<NEW_LINE>} else {<NEW_LINE>log.debug(<MASK><NEW_LINE>chain.doFilter(request, response);<NEW_LINE>}<NEW_LINE>}
"version " + clientVersion + " state " + status);
924,874
public static boolean isMavenFXProject(@NonNull final Project prj) {<NEW_LINE>if (isMavenProject(prj)) {<NEW_LINE>try {<NEW_LINE>// NOI18N<NEW_LINE>FileObject pomXml = prj.getProjectDirectory().getFileObject("pom.xml");<NEW_LINE>DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();<NEW_LINE>DocumentBuilder builder = factory.newDocumentBuilder();<NEW_LINE>Document doc = builder.parse(FileUtil.toFile(pomXml));<NEW_LINE><MASK><NEW_LINE>XPath xpath = xPathfactory.newXPath();<NEW_LINE>// NOI18N<NEW_LINE>XPathExpression exprJfxrt = xpath.compile("//bootclasspath[contains(text(),'jfxrt')]");<NEW_LINE>// NOI18N<NEW_LINE>XPathExpression exprFxPackager = xpath.compile("//executable[contains(text(),'javafxpackager')]");<NEW_LINE>// NOI18N<NEW_LINE>XPathExpression exprPackager = xpath.compile("//executable[contains(text(),'javapackager')]");<NEW_LINE>boolean jfxrt = (Boolean) exprJfxrt.evaluate(doc, XPathConstants.BOOLEAN);<NEW_LINE>boolean packager = (Boolean) exprPackager.evaluate(doc, XPathConstants.BOOLEAN);<NEW_LINE>boolean fxPackager = (Boolean) exprFxPackager.evaluate(doc, XPathConstants.BOOLEAN);<NEW_LINE>return jfxrt && (packager || fxPackager);<NEW_LINE>} catch (XPathExpressionException | ParserConfigurationException | SAXException | IOException ex) {<NEW_LINE>// NOI18N<NEW_LINE>LOGGER.log(Level.INFO, "Error while parsing pom.xml.", ex);<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return false;<NEW_LINE>}
XPathFactory xPathfactory = XPathFactory.newInstance();
558,817
@NoCache<NEW_LINE>@Consumes(MediaType.APPLICATION_JSON)<NEW_LINE>@Produces({ MediaType.APPLICATION_JSON, "application/javascript" })<NEW_LINE>public Response createContentTypeField(@PathParam("typeIdOrVarName") final String typeIdOrVarName, final String fieldJson, @Context final HttpServletRequest httpServletRequest, @Context final HttpServletResponse httpServletResponse) throws DotDataException, DotSecurityException {<NEW_LINE>final InitDataObject initData = this.webResource.init(null, httpServletRequest, httpServletResponse, false, null);<NEW_LINE>final User user = initData.getUser();<NEW_LINE>Response response = null;<NEW_LINE>try {<NEW_LINE>Field field = new JsonFieldTransformer(fieldJson).from();<NEW_LINE>if (UtilMethods.isSet(field.id())) {<NEW_LINE>response = ExceptionMapperUtil.createResponse(null, "Field 'id' should not be set");<NEW_LINE>} else {<NEW_LINE>field = <MASK><NEW_LINE>response = Response.ok(new ResponseEntityView(new JsonFieldTransformer(field).mapObject())).build();<NEW_LINE>}<NEW_LINE>} catch (Exception e) {<NEW_LINE>response = ResponseUtil.mapExceptionResponse(e);<NEW_LINE>}<NEW_LINE>return response;<NEW_LINE>}
fieldAPI.save(field, user);
1,678,970
final ListReportGroupsResult executeListReportGroups(ListReportGroupsRequest listReportGroupsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listReportGroupsRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<ListReportGroupsRequest> request = null;<NEW_LINE>Response<ListReportGroupsResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new ListReportGroupsRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listReportGroupsRequest));<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, "CodeBuild");<NEW_LINE>request.<MASK><NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<ListReportGroupsResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListReportGroupsResultJsonUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListReportGroups");
594,515
public DiskImageVolumeDescription unmarshall(StaxUnmarshallerContext context) throws Exception {<NEW_LINE>DiskImageVolumeDescription diskImageVolumeDescription = new DiskImageVolumeDescription();<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 == XmlPullParser.END_DOCUMENT)<NEW_LINE>return diskImageVolumeDescription;<NEW_LINE>if (xmlEvent == XmlPullParser.START_TAG) {<NEW_LINE>if (context.testExpression("size", targetDepth)) {<NEW_LINE>diskImageVolumeDescription.setSize(LongStaxUnmarshaller.getInstance().unmarshall(context));<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>if (context.testExpression("id", targetDepth)) {<NEW_LINE>diskImageVolumeDescription.setId(StringStaxUnmarshaller.getInstance().unmarshall(context));<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>} else if (xmlEvent == XmlPullParser.END_TAG) {<NEW_LINE>if (context.getCurrentDepth() < originalDepth) {<NEW_LINE>return diskImageVolumeDescription;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
int xmlEvent = context.nextEvent();
450,558
Element writeView(IArchimateDiagramModel dm, Element viewsElement) {<NEW_LINE>Element viewElement = new Element(ELEMENT_VIEW, ARCHIMATE3_NAMESPACE);<NEW_LINE>viewsElement.addContent(viewElement);<NEW_LINE>// Identifier<NEW_LINE>viewElement.setAttribute(ATTRIBUTE_IDENTIFIER, checkID(dm));<NEW_LINE>// Type<NEW_LINE>viewElement.setAttribute(ATTRIBUTE_TYPE, ATTRIBUTE_DIAGRAM_TYPE, XSI_NAMESPACE);<NEW_LINE>// Viewpoint<NEW_LINE>String viewPointName = XMLTypeMapper.<MASK><NEW_LINE>if (StringUtils.isSet(viewPointName)) {<NEW_LINE>viewElement.setAttribute(ATTRIBUTE_VIEWPOINT, viewPointName);<NEW_LINE>}<NEW_LINE>// Name<NEW_LINE>writeTextToElement(dm.getName(), viewElement, ELEMENT_NAME, true);<NEW_LINE>// Documentation<NEW_LINE>writeTextToElement(dm.getDocumentation(), viewElement, ELEMENT_DOCUMENTATION, false);<NEW_LINE>// Properties<NEW_LINE>writeProperties(dm, viewElement);<NEW_LINE>// Nodes<NEW_LINE>writeNodes(dm, viewElement);<NEW_LINE>// Connections<NEW_LINE>writeConnections(dm, viewElement);<NEW_LINE>return viewElement;<NEW_LINE>}
getViewpointName(dm.getViewpoint());
187,423
private void onFloorsLoaded(List<FloorModel> floors) {<NEW_LINE>// if the user should not interact with the gui and<NEW_LINE>// automatically<NEW_LINE>// load the building<NEW_LINE>if (mode != Mode.NONE) {<NEW_LINE>// TODO - automatically choose the floor to be shown if<NEW_LINE>// it's<NEW_LINE>// only one<NEW_LINE>if (floors.isEmpty()) {<NEW_LINE>Toast.makeText(getBaseContext(), "No floors exist for the selected building!", <MASK><NEW_LINE>SelectBuildingActivity.this.finish();<NEW_LINE>} else if (floors.size() == 1) {<NEW_LINE>if (mode == Mode.INVISIBLE)<NEW_LINE>startFloorPlanTask();<NEW_LINE>} else {<NEW_LINE>isBuildingsLoadingFinished = true;<NEW_LINE>if (isfloorSelectorJobFinished) {<NEW_LINE>loadFloor(floorResult);<NEW_LINE>} else {<NEW_LINE>if (!AnyplaceAPI.FLOOR_SELECTOR) {<NEW_LINE>loadFloor("0");<NEW_LINE>} else {<NEW_LINE>// Wait Floor Selector Answer<NEW_LINE>floorSelectorDialog.show();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>if (floors.isEmpty()) {<NEW_LINE>Toast.makeText(getBaseContext(), "No floors exist for the selected building!", Toast.LENGTH_SHORT).show();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
Toast.LENGTH_SHORT).show();
1,572,490
public Notebook deleteNotebook(NotebookSpec spec, String notebookId) throws SubmarineRuntimeException {<NEW_LINE>Notebook notebook = null;<NEW_LINE>final String name = spec.getMeta().getName();<NEW_LINE>String namespace = getServerNamespace();<NEW_LINE>NotebookCR notebookCR = NotebookSpecParser.parseNotebook(spec, null);<NEW_LINE>AgentPod agentPod = new AgentPod(namespace, spec.getMeta().getName(), CustomResourceType.Notebook, notebookId);<NEW_LINE>try {<NEW_LINE>Object object = notebookCRClient.delete(namespace, name, getDeleteOptions(notebookCR.getApiVersion())).throwsApiException().getStatus();<NEW_LINE>notebook = NotebookUtils.parseObject(object, NotebookUtils.ParseOpt.PARSE_OPT_DELETE);<NEW_LINE>} catch (ApiException e) {<NEW_LINE>API_EXCEPTION_404_CONSUMER.apply(e);<NEW_LINE>} finally {<NEW_LINE>if (notebook == null) {<NEW_LINE>// add metadata time info<NEW_LINE>notebookCR.getMetadata().setDeletionTimestamp(new DateTime());<NEW_LINE>// build notebook response<NEW_LINE>notebook = NotebookUtils.buildNotebookResponse(notebookCR);<NEW_LINE>notebook.setStatus(Notebook.Status.STATUS_NOT_FOUND.getValue());<NEW_LINE>notebook.setReason("The notebook instance is not found");<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// delete ingress route<NEW_LINE>deleteIngressRoute(namespace, name);<NEW_LINE>// delete pvc<NEW_LINE>// workspace pvc<NEW_LINE>deletePersistentVolumeClaim(String.format("%s-%s", NotebookUtils<MASK><NEW_LINE>// user set pvc<NEW_LINE>deletePersistentVolumeClaim(String.format("%s-user-%s", NotebookUtils.PVC_PREFIX, name), namespace);<NEW_LINE>// configmap<NEW_LINE>if (StringUtils.isNoneBlank(OVERWRITE_JSON)) {<NEW_LINE>deleteConfigMap(namespace, String.format("%s-%s", NotebookUtils.OVERWRITE_PREFIX, name));<NEW_LINE>}<NEW_LINE>LOG.info(String.format("Experiment:%s had been deleted, start to delete agent pod:%s", spec.getMeta().getName(), agentPod.getMetadata().getName()));<NEW_LINE>podClient.delete(agentPod.getMetadata().getNamespace(), agentPod.getMetadata().getName());<NEW_LINE>return notebook;<NEW_LINE>}
.PVC_PREFIX, name), namespace);
1,606,534
final DeletePackageVersionsResult executeDeletePackageVersions(DeletePackageVersionsRequest deletePackageVersionsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(deletePackageVersionsRequest);<NEW_LINE><MASK><NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<DeletePackageVersionsRequest> request = null;<NEW_LINE>Response<DeletePackageVersionsResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new DeletePackageVersionsRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(deletePackageVersionsRequest));<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, "codeartifact");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeletePackageVersions");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<DeletePackageVersionsResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeletePackageVersionsResultJsonUnmarshaller());<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();
560,386
protected void consumeInterfaceHeaderName1() {<NEW_LINE>// InterfaceHeaderName ::= Modifiersopt 'interface' 'Identifier'<NEW_LINE>TypeDeclaration typeDecl = new TypeDeclaration(this.compilationUnit.compilationResult);<NEW_LINE>if (this.nestedMethod[this.nestedType] == 0) {<NEW_LINE>if (this.nestedType != 0) {<NEW_LINE>typeDecl.bits |= ASTNode.IsMemberType;<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>// Record that the block has a declaration for local types<NEW_LINE>typeDecl.bits |= ASTNode.IsLocalType;<NEW_LINE>markEnclosingMemberWithLocalType();<NEW_LINE>blockReal();<NEW_LINE>}<NEW_LINE>// highlight the name of the type<NEW_LINE>long pos = this.identifierPositionStack[this.identifierPtr];<NEW_LINE>typeDecl.sourceEnd = (int) pos;<NEW_LINE>typeDecl.sourceStart = (int) (pos >>> 32);<NEW_LINE>typeDecl.name = this.identifierStack[this.identifierPtr--];<NEW_LINE>this.identifierLengthPtr--;<NEW_LINE>// compute the declaration source too<NEW_LINE>// 'class' and 'interface' push an int position<NEW_LINE>this.typeStartPosition = typeDecl.declarationSourceStart = this<MASK><NEW_LINE>this.intPtr--;<NEW_LINE>int declSourceStart = this.intStack[this.intPtr--];<NEW_LINE>typeDecl.modifiersSourceStart = this.intStack[this.intPtr--];<NEW_LINE>typeDecl.modifiers = this.intStack[this.intPtr--] | ClassFileConstants.AccInterface;<NEW_LINE>if (typeDecl.declarationSourceStart > declSourceStart) {<NEW_LINE>typeDecl.declarationSourceStart = declSourceStart;<NEW_LINE>}<NEW_LINE>// consume annotations<NEW_LINE>int length;<NEW_LINE>if ((length = this.expressionLengthStack[this.expressionLengthPtr--]) != 0) {<NEW_LINE>System.arraycopy(this.expressionStack, (this.expressionPtr -= length) + 1, typeDecl.annotations = new Annotation[length], 0, length);<NEW_LINE>}<NEW_LINE>typeDecl.bodyStart = typeDecl.sourceEnd + 1;<NEW_LINE>pushOnAstStack(typeDecl);<NEW_LINE>// javadoc<NEW_LINE>typeDecl.javadoc = this.javadoc;<NEW_LINE>this.javadoc = null;<NEW_LINE>}
.intStack[this.intPtr--];
287,545
public void testSubList_lastIndexOf() {<NEW_LINE>List<E> list = getList();<NEW_LINE>int size = list.size();<NEW_LINE>List<E> copy = list.subList(0, size);<NEW_LINE>List<E> head = list.subList(0, size - 1);<NEW_LINE>List<E> tail = list.subList(1, size);<NEW_LINE>assertEquals(size - 1, copy.lastIndexOf(list.get(size - 1)));<NEW_LINE>assertEquals(size - 2, head.lastIndexOf(list.get(size - 2)));<NEW_LINE>assertEquals(size - 2, tail.lastIndexOf(list.<MASK><NEW_LINE>// The following assumes all elements are distinct.<NEW_LINE>assertEquals(0, copy.lastIndexOf(list.get(0)));<NEW_LINE>assertEquals(0, head.lastIndexOf(list.get(0)));<NEW_LINE>assertEquals(0, tail.lastIndexOf(list.get(1)));<NEW_LINE>assertEquals(-1, head.lastIndexOf(list.get(size - 1)));<NEW_LINE>assertEquals(-1, tail.lastIndexOf(list.get(0)));<NEW_LINE>}
get(size - 1)));
610,834
void process() {<NEW_LINE>if (requests.isEmpty())<NEW_LINE>return;<NEW_LINE>ChangeMessageVisibilityBatchRequest batchRequest = new ChangeMessageVisibilityBatchRequest().withQueueUrl(qUrl);<NEW_LINE>ResultConverter.<MASK><NEW_LINE>List<ChangeMessageVisibilityBatchRequestEntry> entries = new ArrayList<ChangeMessageVisibilityBatchRequestEntry>(requests.size());<NEW_LINE>for (int i = 0, n = requests.size(); i < n; i++) entries.add(new ChangeMessageVisibilityBatchRequestEntry().withId(Integer.toString(i)).withReceiptHandle(requests.get(i).getReceiptHandle()).withVisibilityTimeout(requests.get(i).getVisibilityTimeout()));<NEW_LINE>batchRequest.setEntries(entries);<NEW_LINE>ChangeMessageVisibilityBatchResult batchResult = sqsClient.changeMessageVisibilityBatch(batchRequest);<NEW_LINE>for (ChangeMessageVisibilityBatchResultEntry entry : batchResult.getSuccessful()) {<NEW_LINE>int index = Integer.parseInt(entry.getId());<NEW_LINE>futures.get(index).setSuccess(null);<NEW_LINE>}<NEW_LINE>for (BatchResultErrorEntry errorEntry : batchResult.getFailed()) {<NEW_LINE>int index = Integer.parseInt(errorEntry.getId());<NEW_LINE>if (errorEntry.isSenderFault()) {<NEW_LINE>futures.get(index).setFailure(ResultConverter.convert(errorEntry));<NEW_LINE>} else {<NEW_LINE>try {<NEW_LINE>// retry.<NEW_LINE>sqsClient.changeMessageVisibility(requests.get(index));<NEW_LINE>futures.get(index).setSuccess(null);<NEW_LINE>} catch (AmazonClientException ace) {<NEW_LINE>futures.get(index).setFailure(ace);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
appendUserAgent(batchRequest, AmazonSQSBufferedAsyncClient.USER_AGENT);
106,798
private static BMap<String, BRefType<?>> processAttributeAndNamespaces(BMap<String, BRefType<?>> rootNode, LinkedHashMap<String, String> attributeMap, String attributePrefix, String singleElementValue) {<NEW_LINE>boolean singleElement = false;<NEW_LINE>if (rootNode == null) {<NEW_LINE>rootNode = new <MASK><NEW_LINE>singleElement = true;<NEW_LINE>}<NEW_LINE>// All the attributes and namesapces are set as key value pairs with given prefix<NEW_LINE>for (Map.Entry<String, String> entry : attributeMap.entrySet()) {<NEW_LINE>String key = attributePrefix + entry.getKey();<NEW_LINE>rootNode.put(key, new BString(entry.getValue()));<NEW_LINE>}<NEW_LINE>// If the single element has attributes or namespaces the text value is added with a dummy tag<NEW_LINE>if (singleElement && !singleElementValue.isEmpty()) {<NEW_LINE>rootNode.put(XML_VALUE_TAG, new BString(singleElementValue));<NEW_LINE>}<NEW_LINE>return rootNode;<NEW_LINE>}
BMap<>(BTypes.typeJSON);
490,449
private void encodeStringLiteral(ByteBuf out, CharSequence string) {<NEW_LINE>int huffmanLength;<NEW_LINE>if (string.length() >= huffCodeThreshold && (huffmanLength = hpackHuffmanEncoder.getEncodedLength(string)) < string.length()) {<NEW_LINE>encodeInteger(out, 0x80, 7, huffmanLength);<NEW_LINE>hpackHuffmanEncoder.encode(out, string);<NEW_LINE>} else {<NEW_LINE>encodeInteger(out, 0x00, 7, string.length());<NEW_LINE>if (string instanceof AsciiString) {<NEW_LINE>// Fast-path<NEW_LINE>AsciiString asciiString = (AsciiString) string;<NEW_LINE>out.writeBytes(asciiString.array(), asciiString.arrayOffset(<MASK><NEW_LINE>} else {<NEW_LINE>// Only ASCII is allowed in http2 headers, so its fine to use this.<NEW_LINE>// https://tools.ietf.org/html/rfc7540#section-8.1.2<NEW_LINE>out.writeCharSequence(string, CharsetUtil.ISO_8859_1);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
), asciiString.length());
1,830,277
public ScpActionDefinition unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>ScpActionDefinition scpActionDefinition = new ScpActionDefinition();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE><MASK><NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>JsonToken token = context.getCurrentToken();<NEW_LINE>if (token == null)<NEW_LINE>token = context.nextToken();<NEW_LINE>if (token == VALUE_NULL) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>while (true) {<NEW_LINE>if (token == null)<NEW_LINE>break;<NEW_LINE>if (token == FIELD_NAME || token == START_OBJECT) {<NEW_LINE>if (context.testExpression("PolicyId", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>scpActionDefinition.setPolicyId(context.getUnmarshaller(String.class).unmarshall(context));<NEW_LINE>}<NEW_LINE>if (context.testExpression("TargetIds", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>scpActionDefinition.setTargetIds(new ListUnmarshaller<String>(context.getUnmarshaller(String.class)).unmarshall(context));<NEW_LINE>}<NEW_LINE>} else if (token == END_ARRAY || token == END_OBJECT) {<NEW_LINE>if (context.getLastParsedParentElement() == null || context.getLastParsedParentElement().equals(currentParentElement)) {<NEW_LINE>if (context.getCurrentDepth() <= originalDepth)<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>token = context.nextToken();<NEW_LINE>}<NEW_LINE>return scpActionDefinition;<NEW_LINE>}
String currentParentElement = context.getCurrentParentElement();
1,759,373
static LocalPredictor loadLocalPredictorFromPipelineModel(FilePath filePath, TableSchema inputSchema) throws Exception {<NEW_LINE>Tuple2<TableSchema, List<Row>> readed = AkUtils.readFromPath(filePath);<NEW_LINE>Tuple2<TableSchema, Row> schemaAndMeta = ModelExporterUtils.loadMetaFromAkFile(filePath);<NEW_LINE>Tuple2<StageNode[], Params> stagesAndParams = ModelExporterUtils.deserializePipelineStagesAndParamsFromMeta(<MASK><NEW_LINE>Mapper[] mappers = loadMapperListFromStages(readed.f1, readed.f0, inputSchema).getMappers();<NEW_LINE>Params params = stagesAndParams.f1;<NEW_LINE>if (params.get(ModelStreamScanParams.MODEL_STREAM_FILE_PATH) != null) {<NEW_LINE>TableSchema extendSchema = mappers[mappers.length - 1].getOutputSchema();<NEW_LINE>params.set(PipelineModelMapper.PIPELINE_TRANSFORM_OUT_COL_NAMES, extendSchema.getFieldNames());<NEW_LINE>params.set(PipelineModelMapper.PIPELINE_TRANSFORM_OUT_COL_TYPES, FlinkTypeConverter.getTypeString(extendSchema.getFieldTypes()));<NEW_LINE>PipelineModelMapper pipelineModelMapper = new PipelineModelMapper(readed.f0, inputSchema, params);<NEW_LINE>pipelineModelMapper.loadModel(readed.f1);<NEW_LINE>return new LocalPredictor(pipelineModelMapper);<NEW_LINE>}<NEW_LINE>return new LocalPredictor(mappers);<NEW_LINE>}
schemaAndMeta.f1, schemaAndMeta.f0);
1,329,461
public static ListFunctionDeploymentResponse unmarshall(ListFunctionDeploymentResponse listFunctionDeploymentResponse, UnmarshallerContext _ctx) {<NEW_LINE>listFunctionDeploymentResponse.setRequestId(_ctx.stringValue("ListFunctionDeploymentResponse.RequestId"));<NEW_LINE>listFunctionDeploymentResponse.setHttpStatusCode(_ctx.stringValue("ListFunctionDeploymentResponse.HttpStatusCode"));<NEW_LINE>listFunctionDeploymentResponse.setSuccess(_ctx.booleanValue("ListFunctionDeploymentResponse.Success"));<NEW_LINE>listFunctionDeploymentResponse.setCode<MASK><NEW_LINE>listFunctionDeploymentResponse.setMessage(_ctx.stringValue("ListFunctionDeploymentResponse.Message"));<NEW_LINE>Paginator paginator = new Paginator();<NEW_LINE>paginator.setPageSize(_ctx.integerValue("ListFunctionDeploymentResponse.Paginator.PageSize"));<NEW_LINE>paginator.setPageNum(_ctx.integerValue("ListFunctionDeploymentResponse.Paginator.PageNum"));<NEW_LINE>paginator.setTotal(_ctx.integerValue("ListFunctionDeploymentResponse.Paginator.Total"));<NEW_LINE>paginator.setPageCount(_ctx.integerValue("ListFunctionDeploymentResponse.Paginator.PageCount"));<NEW_LINE>listFunctionDeploymentResponse.setPaginator(paginator);<NEW_LINE>List<DataListItem> dataList = new ArrayList<DataListItem>();<NEW_LINE>for (int i = 0; i < _ctx.lengthValue("ListFunctionDeploymentResponse.DataList.Length"); i++) {<NEW_LINE>DataListItem dataListItem = new DataListItem();<NEW_LINE>dataListItem.setDeploymentId(_ctx.stringValue("ListFunctionDeploymentResponse.DataList[" + i + "].DeploymentId"));<NEW_LINE>dataListItem.setVersionNo(_ctx.stringValue("ListFunctionDeploymentResponse.DataList[" + i + "].VersionNo"));<NEW_LINE>dataListItem.setCreatedAt(_ctx.stringValue("ListFunctionDeploymentResponse.DataList[" + i + "].CreatedAt"));<NEW_LINE>dataListItem.setModifiedAt(_ctx.stringValue("ListFunctionDeploymentResponse.DataList[" + i + "].ModifiedAt"));<NEW_LINE>dataListItem.setDownloadSignedUrl(_ctx.stringValue("ListFunctionDeploymentResponse.DataList[" + i + "].DownloadSignedUrl"));<NEW_LINE>Status status = new Status();<NEW_LINE>status.setMessage(_ctx.stringValue("ListFunctionDeploymentResponse.DataList[" + i + "].Status.Message"));<NEW_LINE>status.setStatus(_ctx.stringValue("ListFunctionDeploymentResponse.DataList[" + i + "].Status.Status"));<NEW_LINE>status.setLabel(_ctx.stringValue("ListFunctionDeploymentResponse.DataList[" + i + "].Status.Label"));<NEW_LINE>dataListItem.setStatus(status);<NEW_LINE>dataList.add(dataListItem);<NEW_LINE>}<NEW_LINE>listFunctionDeploymentResponse.setDataList(dataList);<NEW_LINE>return listFunctionDeploymentResponse;<NEW_LINE>}
(_ctx.stringValue("ListFunctionDeploymentResponse.Code"));
742,498
final DeleteUsageReportSubscriptionResult executeDeleteUsageReportSubscription(DeleteUsageReportSubscriptionRequest deleteUsageReportSubscriptionRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(deleteUsageReportSubscriptionRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<DeleteUsageReportSubscriptionRequest> request = null;<NEW_LINE>Response<DeleteUsageReportSubscriptionResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new DeleteUsageReportSubscriptionRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(deleteUsageReportSubscriptionRequest));<NEW_LINE>// Binds the request metrics to the current request.<NEW_LINE>request.setAWSRequestMetrics(awsRequestMetrics);<NEW_LINE>request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);<NEW_LINE>request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());<NEW_LINE>request.addHandlerContext(<MASK><NEW_LINE>request.addHandlerContext(HandlerContextKey.SERVICE_ID, "AppStream");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteUsageReportSubscription");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<DeleteUsageReportSubscriptionResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeleteUsageReportSubscriptionResultJsonUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
HandlerContextKey.SIGNING_REGION, getSigningRegion());
223,252
private <T> MultiNodeResult<T> collectResults(Map<NodeExecution, Future<NodeResult<T>>> futures) {<NEW_LINE>boolean done = false;<NEW_LINE>MultiNodeResult<T> result = new MultiNodeResult<>();<NEW_LINE>Map<RedisClusterNode, Throwable> exceptions = new HashMap<>();<NEW_LINE>Set<String> saveGuard = new HashSet<>();<NEW_LINE>while (!done) {<NEW_LINE>done = true;<NEW_LINE>for (Map.Entry<NodeExecution, Future<NodeResult<T>>> entry : futures.entrySet()) {<NEW_LINE>if (!entry.getValue().isDone() && !entry.getValue().isCancelled()) {<NEW_LINE>done = false;<NEW_LINE>} else {<NEW_LINE>NodeExecution execution = entry.getKey();<NEW_LINE>try {<NEW_LINE>String futureId = ObjectUtils.getIdentityHexString(entry.getValue());<NEW_LINE>if (!saveGuard.contains(futureId)) {<NEW_LINE>if (execution.isPositional()) {<NEW_LINE>result.add(execution.getPositionalKey(), entry.getValue().get());<NEW_LINE>} else {<NEW_LINE>result.add(entry.getValue().get());<NEW_LINE>}<NEW_LINE>saveGuard.add(futureId);<NEW_LINE>}<NEW_LINE>} catch (ExecutionException e) {<NEW_LINE>RuntimeException ex = convertToDataAccessException((Exception) e.getCause());<NEW_LINE>exceptions.put(execution.getNode(), ex != null ? ex : e.getCause());<NEW_LINE>} catch (InterruptedException e) {<NEW_LINE>Thread<MASK><NEW_LINE>RuntimeException ex = convertToDataAccessException((Exception) e.getCause());<NEW_LINE>exceptions.put(execution.getNode(), ex != null ? ex : e.getCause());<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>Thread.sleep(10);<NEW_LINE>} catch (InterruptedException e) {<NEW_LINE>done = true;<NEW_LINE>Thread.currentThread().interrupt();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (!exceptions.isEmpty()) {<NEW_LINE>throw new ClusterCommandExecutionFailureException(new ArrayList<>(exceptions.values()));<NEW_LINE>}<NEW_LINE>return result;<NEW_LINE>}
.currentThread().interrupt();
344,052
private static void PaintSegment(Point lastPoint, Point point, RenderState state) {<NEW_LINE>double distance = lastPoint.getDistanceTo(point);<NEW_LINE>Point vector = point.substract(lastPoint);<NEW_LINE>Point unitVector = new Point(1.0f, 1.0f, 0.0f);<NEW_LINE>float vectorAngle = Math.abs(state.angle) > 0.0f ? state.angle : (float) Math.atan2(vector.y, vector.x);<NEW_LINE>float brushWeight = state.baseWeight * state.scale * 1f / state.viewportScale;<NEW_LINE>double step = Math.max(1.0f, state.spacing * brushWeight);<NEW_LINE>if (distance > 0.0) {<NEW_LINE>unitVector = <MASK><NEW_LINE>}<NEW_LINE>float boldenedAlpha = Math.min(1.0f, state.alpha * 1.15f);<NEW_LINE>boolean boldenHead = lastPoint.edge;<NEW_LINE>boolean boldenTail = point.edge;<NEW_LINE>int count = (int) Math.ceil((distance - state.remainder) / step);<NEW_LINE>int currentCount = state.getCount();<NEW_LINE>state.appendValuesCount(count);<NEW_LINE>state.setPosition(currentCount);<NEW_LINE>Point start = lastPoint.add(unitVector.multiplyByScalar(state.remainder));<NEW_LINE>boolean succeed = true;<NEW_LINE>double f = state.remainder;<NEW_LINE>for (; f <= distance; f += step) {<NEW_LINE>float alpha = boldenHead ? boldenedAlpha : state.alpha;<NEW_LINE>succeed = state.addPoint(start.toPointF(), brushWeight, vectorAngle, alpha, -1);<NEW_LINE>if (!succeed) {<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>start = start.add(unitVector.multiplyByScalar(step));<NEW_LINE>boldenHead = false;<NEW_LINE>}<NEW_LINE>if (succeed && boldenTail) {<NEW_LINE>state.appendValuesCount(1);<NEW_LINE>state.addPoint(point.toPointF(), brushWeight, vectorAngle, boldenedAlpha, -1);<NEW_LINE>}<NEW_LINE>state.remainder = f - distance;<NEW_LINE>}
vector.multiplyByScalar(1.0 / distance);
73,237
public void addExtraCompletions(String token, List<QualifiedName> completions) {<NEW_LINE>Set<String> discoveredIdentifiers = new HashSet<>();<NEW_LINE>Token cursorToken = docDisplay_.<MASK><NEW_LINE>TokenIterator it = docDisplay_.createTokenIterator();<NEW_LINE>for (Token t = it.getCurrentToken(); t != null && t != cursorToken; t = it.stepForward()) {<NEW_LINE>if (!t.hasType("identifier"))<NEW_LINE>continue;<NEW_LINE>String value = t.getValue();<NEW_LINE>if (discoveredIdentifiers.contains(value))<NEW_LINE>continue;<NEW_LINE>if (!StringUtil.isSubsequence(value, token))<NEW_LINE>continue;<NEW_LINE>QualifiedName name = new QualifiedName(t.getValue(), t.getValue(), "[identifier]", false, RCompletionType.CONTEXT, false, false, "", null, "Stan");<NEW_LINE>discoveredIdentifiers.add(value);<NEW_LINE>completions.add(name);<NEW_LINE>}<NEW_LINE>}
getTokenAt(docDisplay_.getCursorPosition());
43,498
protected void send(Map data_map, boolean is_request, boolean record_active) throws BuddyPluginException {<NEW_LINE>try {<NEW_LINE>byte[] <MASK><NEW_LINE>int data_length = data.length;<NEW_LINE>plugin_network.checkMaxMessageSize(data_length);<NEW_LINE>int max_chunk = connection.getMaximumMessageSize() - 1024;<NEW_LINE>if (data_length > max_chunk) {<NEW_LINE>int fragment_id;<NEW_LINE>synchronized (this) {<NEW_LINE>fragment_id = next_fragment_id++;<NEW_LINE>}<NEW_LINE>int chunk_num = 0;<NEW_LINE>for (int i = 0; i < data_length; i += max_chunk) {<NEW_LINE>int end = Math.min(data_length, i + max_chunk);<NEW_LINE>if (end > i) {<NEW_LINE>byte[] chunk = new byte[end - i];<NEW_LINE>System.arraycopy(data, i, chunk, 0, chunk.length);<NEW_LINE>Map chunk_map = new HashMap();<NEW_LINE>chunk_map.put("type", new Long(BuddyPluginNetwork.RT_INTERNAL_FRAGMENT));<NEW_LINE>chunk_map.put("f", new Long(fragment_id));<NEW_LINE>chunk_map.put("l", new Long(data_length));<NEW_LINE>chunk_map.put("c", new Long(max_chunk));<NEW_LINE>chunk_map.put("i", new Long(chunk_num));<NEW_LINE>chunk_map.put("q", new Long(is_request ? 1 : 0));<NEW_LINE>chunk_map.put("d", chunk);<NEW_LINE>byte[] chunk_data = BEncoder.encode(chunk_map);<NEW_LINE>PooledByteBuffer chunk_buffer = plugin_network.getPluginInterface().getUtilities().allocatePooledByteBuffer(chunk_data);<NEW_LINE>try {<NEW_LINE>connection.send(chunk_buffer);<NEW_LINE>chunk_buffer = null;<NEW_LINE>} finally {<NEW_LINE>if (chunk_buffer != null) {<NEW_LINE>chunk_buffer.returnToPool();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>chunk_num++;<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>PooledByteBuffer buffer = plugin_network.getPluginInterface().getUtilities().allocatePooledByteBuffer(data);<NEW_LINE>try {<NEW_LINE>connection.send(buffer);<NEW_LINE>buffer = null;<NEW_LINE>} finally {<NEW_LINE>if (buffer != null) {<NEW_LINE>buffer.returnToPool();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>buddyMessageSent(data.length, record_active);<NEW_LINE>send_count++;<NEW_LINE>} catch (Throwable e) {<NEW_LINE>throw (new BuddyPluginException("Send failed", e));<NEW_LINE>}<NEW_LINE>}
data = BEncoder.encode(data_map);
238,801
public <G extends FulfillmentGroupItem> CreateResponse<G> createOrRetrieveCopyInstance(MultiTenantCopyContext context) throws CloneNotSupportedException {<NEW_LINE>CreateResponse<G> createResponse = context.createOrRetrieveCopyInstance(this);<NEW_LINE>if (createResponse.isAlreadyPopulated()) {<NEW_LINE>return createResponse;<NEW_LINE>}<NEW_LINE>FulfillmentGroupItem cloned = createResponse.getClone();<NEW_LINE>cloned.setFulfillmentGroup(fulfillmentGroup.createOrRetrieveCopyInstance(context).getClone());<NEW_LINE>cloned.setOrderItem(orderItem.createOrRetrieveCopyInstance(context).getClone());<NEW_LINE>cloned.setProratedOrderAdjustmentAmount(proratedOrderAdjustment == null ? <MASK><NEW_LINE>cloned.setQuantity(quantity);<NEW_LINE>if (getStatus() != null) {<NEW_LINE>cloned.setStatus(getStatus());<NEW_LINE>}<NEW_LINE>cloneTaxDetails(context, cloned);<NEW_LINE>cloned.setTotalItemAmount(totalItemAmount == null ? null : new Money(totalItemAmount));<NEW_LINE>cloned.setTotalItemTaxableAmount(totalItemTaxableAmount == null ? null : new Money(totalItemTaxableAmount));<NEW_LINE>cloned.setTotalTax(totalTax == null ? null : new Money(totalTax));<NEW_LINE>return createResponse;<NEW_LINE>}
null : new Money(proratedOrderAdjustment));
572,911
public void write(CompoundTag compound, boolean clientPacket) {<NEW_LINE>NBTHelper.writeEnum(compound, "Mode", mode);<NEW_LINE>NBTHelper.writeEnum(compound, "State", state);<NEW_LINE>compound.putInt("Timer", timer);<NEW_LINE>compound.putBoolean("Powered", redstoneLocked);<NEW_LINE>if (player != null) {<NEW_LINE>ListTag invNBT = new ListTag();<NEW_LINE>player.<MASK><NEW_LINE>compound.put("Inventory", invNBT);<NEW_LINE>compound.put("HeldItem", player.getMainHandItem().serializeNBT());<NEW_LINE>compound.put("Overflow", NBTHelper.writeItemList(overflowItems));<NEW_LINE>} else if (deferredInventoryList != null) {<NEW_LINE>compound.put("Inventory", deferredInventoryList);<NEW_LINE>}<NEW_LINE>super.write(compound, clientPacket);<NEW_LINE>if (!clientPacket)<NEW_LINE>return;<NEW_LINE>compound.putFloat("Reach", reach);<NEW_LINE>if (player == null)<NEW_LINE>return;<NEW_LINE>compound.put("HeldItem", player.getMainHandItem().serializeNBT());<NEW_LINE>if (player.spawnedItemEffects != null) {<NEW_LINE>compound.put("Particle", player.spawnedItemEffects.serializeNBT());<NEW_LINE>player.spawnedItemEffects = null;<NEW_LINE>}<NEW_LINE>}
getInventory().save(invNBT);
583,805
private void createTableItem(Table table, ChangedFile file, boolean sort) {<NEW_LINE>TableItem item = null;<NEW_LINE>if (sort) {<NEW_LINE>// insert into sorted table<NEW_LINE>TableItem[] items = table.getItems();<NEW_LINE>int index = 0;<NEW_LINE>for (TableItem existing : items) {<NEW_LINE>String path = existing.getText(1);<NEW_LINE>if (file.getRelativePath().toOSString().compareTo(path) < 0) {<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>index++;<NEW_LINE>}<NEW_LINE>item = new TableItem(table, SWT.NONE, index);<NEW_LINE>} else {<NEW_LINE>// Just insert at end<NEW_LINE>item = new TableItem(table, SWT.NONE);<NEW_LINE>}<NEW_LINE>Image image = emptyFileImage;<NEW_LINE>// String text = Messages.CommitDialog_modified;<NEW_LINE>if (file.getStatus() == ChangedFile.Status.DELETED) {<NEW_LINE>image = deletedFileImage;<NEW_LINE>// text = Messages.CommitDialog_deleted;<NEW_LINE>} else if (file.getStatus() == ChangedFile.Status.NEW) {<NEW_LINE>image = newFileImage;<NEW_LINE>// text = Messages.CommitDialog_new;<NEW_LINE>}<NEW_LINE>// item.setText(0, text);<NEW_LINE>item.setImage(0, image);<NEW_LINE>item.setText(1, file.<MASK><NEW_LINE>item.setData(CHANGED_FILE_DATA_KEY, file);<NEW_LINE>}
getRelativePath().toOSString());
1,824,036
protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws IOException, ServletException {<NEW_LINE>String sessionHandle = InputParser.<MASK><NEW_LINE>assert sessionHandle != null;<NEW_LINE>try {<NEW_LINE>JsonObject userDataInDatabase = Session.getSessionData(main, sessionHandle);<NEW_LINE>JsonObject result = new JsonObject();<NEW_LINE>result.addProperty("status", "OK");<NEW_LINE>result.add("userDataInDatabase", userDataInDatabase);<NEW_LINE>super.sendJsonResponse(200, result, resp);<NEW_LINE>} catch (StorageQueryException e) {<NEW_LINE>throw new ServletException(e);<NEW_LINE>} catch (UnauthorisedException e) {<NEW_LINE>Logging.debug(main, Utils.exceptionStacktraceToString(e));<NEW_LINE>JsonObject reply = new JsonObject();<NEW_LINE>reply.addProperty("status", "UNAUTHORISED");<NEW_LINE>reply.addProperty("message", e.getMessage());<NEW_LINE>super.sendJsonResponse(200, reply, resp);<NEW_LINE>}<NEW_LINE>}
getQueryParamOrThrowError(req, "sessionHandle", false);
1,484,790
public List<String> run() throws KeeperException, InterruptedException {<NEW_LINE>// only read volatile once for consistency<NEW_LINE>ImmutableCacheCopies lic = immutableCache;<NEW_LINE>if (lic.childrenCache.containsKey(zPath)) {<NEW_LINE>return lic.childrenCache.get(zPath);<NEW_LINE>}<NEW_LINE>cacheWriteLock.lock();<NEW_LINE>try {<NEW_LINE>if (childrenCache.containsKey(zPath)) {<NEW_LINE>return childrenCache.get(zPath);<NEW_LINE>}<NEW_LINE>final ZooKeeper zooKeeper = getZooKeeper();<NEW_LINE>List<String> children = zooKeeper.getChildren(zPath, watcher);<NEW_LINE>if (children != null) {<NEW_LINE>children = List.copyOf(children);<NEW_LINE>}<NEW_LINE><MASK><NEW_LINE>immutableCache = new ImmutableCacheCopies(++updateCount, immutableCache, childrenCache);<NEW_LINE>return children;<NEW_LINE>} catch (KeeperException ke) {<NEW_LINE>if (ke.code() != Code.NONODE) {<NEW_LINE>throw ke;<NEW_LINE>}<NEW_LINE>} finally {<NEW_LINE>cacheWriteLock.unlock();<NEW_LINE>}<NEW_LINE>return null;<NEW_LINE>}
childrenCache.put(zPath, children);
1,033,603
public static SignalServiceAddress toSignalServiceAddress(@NonNull Context context, @NonNull Recipient recipient) throws IOException {<NEW_LINE>recipient = recipient.resolve();<NEW_LINE>if (!recipient.getServiceId().isPresent() && !recipient.getE164().isPresent()) {<NEW_LINE>throw new AssertionError(recipient.getId() + " - No UUID or phone number!");<NEW_LINE>}<NEW_LINE>if (!recipient.getServiceId().isPresent()) {<NEW_LINE>Log.i(TAG, <MASK><NEW_LINE>RegisteredState state = ContactDiscovery.refresh(context, recipient, false);<NEW_LINE>recipient = Recipient.resolved(recipient.getId());<NEW_LINE>Log.i(TAG, "Successfully performed a UUID fetch for " + recipient.getId() + ". Registered: " + state);<NEW_LINE>}<NEW_LINE>if (recipient.hasServiceId()) {<NEW_LINE>return new SignalServiceAddress(recipient.requireServiceId(), Optional.ofNullable(recipient.resolve().getE164().orElse(null)));<NEW_LINE>} else {<NEW_LINE>throw new NotFoundException(recipient.getId() + " is not registered!");<NEW_LINE>}<NEW_LINE>}
recipient.getId() + " is missing a UUID...");
1,244,962
protected Object createNode(JSContext context, JSBuiltin builtin, boolean construct, boolean newTarget, TemporalPlainYearMonthPrototype builtinEnum) {<NEW_LINE>switch(builtinEnum) {<NEW_LINE>case calendar:<NEW_LINE>case year:<NEW_LINE>case month:<NEW_LINE>case monthCode:<NEW_LINE>case daysInMonth:<NEW_LINE>case daysInYear:<NEW_LINE>case monthsInYear:<NEW_LINE>case inLeapYear:<NEW_LINE>return JSTemporalPlainYearMonthGetterNodeGen.create(context, builtin, builtinEnum, args().withThis<MASK><NEW_LINE>case add:<NEW_LINE>return JSTemporalPlainYearMonthAddNodeGen.create(context, builtin, args().withThis().fixedArgs(2).createArgumentNodes(context));<NEW_LINE>case subtract:<NEW_LINE>return JSTemporalPlainYearMonthSubtractNodeGen.create(context, builtin, args().withThis().fixedArgs(2).createArgumentNodes(context));<NEW_LINE>case until:<NEW_LINE>return JSTemporalPlainYearMonthUntilNodeGen.create(context, builtin, args().withThis().fixedArgs(2).createArgumentNodes(context));<NEW_LINE>case since:<NEW_LINE>return JSTemporalPlainYearMonthSinceNodeGen.create(context, builtin, args().withThis().fixedArgs(2).createArgumentNodes(context));<NEW_LINE>case with:<NEW_LINE>return JSTemporalPlainYearMonthWithNodeGen.create(context, builtin, args().withThis().fixedArgs(2).createArgumentNodes(context));<NEW_LINE>case equals:<NEW_LINE>return JSTemporalPlainYearMonthEqualsNodeGen.create(context, builtin, args().withThis().fixedArgs(1).createArgumentNodes(context));<NEW_LINE>case toPlainDate:<NEW_LINE>return JSTemporalPlainYearMonthToPlainDateNodeGen.create(context, builtin, args().withThis().fixedArgs(1).createArgumentNodes(context));<NEW_LINE>case getISOFields:<NEW_LINE>return JSTemporalPlainYearMonthGetISOFieldsNodeGen.create(context, builtin, args().withThis().createArgumentNodes(context));<NEW_LINE>case toString:<NEW_LINE>return JSTemporalPlainYearMonthToStringNodeGen.create(context, builtin, args().withThis().fixedArgs(1).createArgumentNodes(context));<NEW_LINE>case toLocaleString:<NEW_LINE>case toJSON:<NEW_LINE>return JSTemporalPlainYearMonthToLocaleStringNodeGen.create(context, builtin, args().withThis().createArgumentNodes(context));<NEW_LINE>case valueOf:<NEW_LINE>return JSTemporalPlainYearMonthValueOfNodeGen.create(context, builtin, args().withThis().createArgumentNodes(context));<NEW_LINE>}<NEW_LINE>return null;<NEW_LINE>}
().createArgumentNodes(context));
1,038,207
public String render(ClassModel model, int index, int size, Map<String, Object> session) {<NEW_LINE>StringWriter sw = new StringWriter();<NEW_LINE>PrintWriter writer = new PrintWriter(sw);<NEW_LINE>if (index == 0) {<NEW_LINE>Util.generateLicense(writer);<NEW_LINE>writer.printf("/// <reference types=\"%s\" />\n\n", getNPMScope(model.getType().getRaw().getModule()));<NEW_LINE>writer.printf("/**\n" + " * @typedef { import(\"@vertx/core\") } Java\n" + " */\n");<NEW_LINE>registerJvmClasses();<NEW_LINE>for (Object fqcn : jvmClasses("api")) {<NEW_LINE>JVMClass.generateMJS(<MASK><NEW_LINE>writer.println();<NEW_LINE>}<NEW_LINE>// include a file if present<NEW_LINE>writer.print(includeFileIfPresent("module.header.mjs"));<NEW_LINE>}<NEW_LINE>writer.printf("export const %s = Java.type('%s');\n", model.getType().getRaw().getSimpleName(), model.getType().getName());<NEW_LINE>if (index == size - 1) {<NEW_LINE>// include a file if present<NEW_LINE>writer.print(includeFileIfPresent("module.footer.mjs"));<NEW_LINE>}<NEW_LINE>return sw.toString();<NEW_LINE>}
writer, fqcn.toString());
1,730,917
public NestedArray<T> append(ActiveTail<T> tail) {<NEW_LINE>if (last(last(array)).length < 32) {<NEW_LINE>Object[][][][] updatedNodes = Arrays.copyOf(array, array.length, Object[][][][].class);<NEW_LINE>updatedNodes[updatedNodes.length - 1] = Arrays.copyOf(last(updatedNodes), last(updatedNodes).length, Object[][][].class);<NEW_LINE>last(updatedNodes)[last(updatedNodes).length - 1] = Arrays.copyOf(last(last(updatedNodes)), last(last(updatedNodes)).length + 1, <MASK><NEW_LINE>last(last(updatedNodes))[last(last(array)).length] = tail.array;<NEW_LINE>return four(updatedNodes);<NEW_LINE>}<NEW_LINE>if (last(array).length < 32) {<NEW_LINE>Object[][][][] updatedNodes = Arrays.copyOf(array, array.length, Object[][][][].class);<NEW_LINE>updatedNodes[updatedNodes.length - 1] = Arrays.copyOf(last(updatedNodes), last(updatedNodes).length + 1, Object[][][].class);<NEW_LINE>last(updatedNodes)[last(array).length] = new Object[][] { tail.array };<NEW_LINE>return four(updatedNodes);<NEW_LINE>}<NEW_LINE>if (array.length < 32) {<NEW_LINE>Object[][][][] updatedNodes = Arrays.copyOf(array, array.length + 1, Object[][][][].class);<NEW_LINE>updatedNodes[array.length] = new Object[][][] { new Object[][] { tail.array } };<NEW_LINE>return four(updatedNodes);<NEW_LINE>}<NEW_LINE>return Five.five(new Object[][][][][] { array, new Object[][][][] { new Object[][][] { new Object[][] { tail.array } } } });<NEW_LINE>}
Object[][].class);
714,729
public void render(MatrixStack matrixStack, int mouseX, int mouseY, float partialTicks) {<NEW_LINE>updateColors();<NEW_LINE><MASK><NEW_LINE>GL11.glEnable(GL11.GL_BLEND);<NEW_LINE>GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);<NEW_LINE>// GL11.glShadeModel(GL11.GL_SMOOTH);<NEW_LINE>RenderSystem.lineWidth(1);<NEW_LINE>tooltip = "";<NEW_LINE>for (Window window : windows) {<NEW_LINE>if (window.isInvisible())<NEW_LINE>continue;<NEW_LINE>// dragging<NEW_LINE>if (window.isDragging())<NEW_LINE>if (leftMouseButtonPressed)<NEW_LINE>window.dragTo(mouseX, mouseY);<NEW_LINE>else {<NEW_LINE>window.stopDragging();<NEW_LINE>saveWindows();<NEW_LINE>}<NEW_LINE>// scrollbar dragging<NEW_LINE>if (window.isDraggingScrollbar())<NEW_LINE>if (leftMouseButtonPressed)<NEW_LINE>window.dragScrollbarTo(mouseY);<NEW_LINE>else<NEW_LINE>window.stopDraggingScrollbar();<NEW_LINE>renderWindow(matrixStack, window, mouseX, mouseY, partialTicks);<NEW_LINE>}<NEW_LINE>renderPopups(matrixStack, mouseX, mouseY);<NEW_LINE>renderTooltip(matrixStack, mouseX, mouseY);<NEW_LINE>GL11.glEnable(GL11.GL_CULL_FACE);<NEW_LINE>GL11.glDisable(GL11.GL_BLEND);<NEW_LINE>}
GL11.glDisable(GL11.GL_CULL_FACE);
285,544
private <T> List<T> filterCompletionItems(Collection<T> data, String search, Comparator<T> comparator, Function<T, String> getString) {<NEW_LINE>List<T> <MASK><NEW_LINE>List<T> matched = new ArrayList<>();<NEW_LINE>Pattern cSearch = Pattern.compile(Pattern.quote(search.substring(0, 1).toUpperCase(Locale.ENGLISH)) + "(?i)" + Pattern.quote(search.substring(1)));<NEW_LINE>String searchMode = main.getSettings().getString("completionSearch");<NEW_LINE>Set<String> added = new HashSet<>();<NEW_LINE>for (T item : data) {<NEW_LINE>String itemString = getString.apply(item);<NEW_LINE>if (added.contains(itemString)) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>String lc = StringUtil.toLowerCase(itemString);<NEW_LINE>if (lc.startsWith(search)) {<NEW_LINE>matched.add(item);<NEW_LINE>added.add(itemString);<NEW_LINE>} else if (searchMode.equals("words") && !input.getCompleteToCommonPrefix() && cSearch.matcher(itemString).find()) {<NEW_LINE>containing.add(item);<NEW_LINE>added.add(itemString);<NEW_LINE>} else if (searchMode.equals("anywhere") && lc.contains(search)) {<NEW_LINE>containing.add(item);<NEW_LINE>added.add(itemString);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>Collections.sort(matched, comparator);<NEW_LINE>Collections.sort(containing, comparator);<NEW_LINE>matched.addAll(containing);<NEW_LINE>return matched;<NEW_LINE>}
containing = new ArrayList<>();
17,555
public Map<String, String> run(EjbJarMetadata metadata) throws Exception {<NEW_LINE>EntityAndSession ejb = (EntityAndSession) metadata.findByEjbClass(ejbClass);<NEW_LINE>Map<String, String> result = new HashMap<String, String>();<NEW_LINE>if (ejb != null) {<NEW_LINE>result.put(Ejb.EJB_NAME, ejb.getEjbName());<NEW_LINE>result.put(EjbRef.EJB_REF_TYPE, ejb instanceof Entity ? EjbRef.EJB_REF_TYPE_ENTITY : EjbRef.EJB_REF_TYPE_SESSION);<NEW_LINE>result.put(EntityAndSession.LOCAL, ejb.getLocal());<NEW_LINE>result.put(EntityAndSession.LOCAL_HOME, ejb.getLocalHome());<NEW_LINE>result.put(EntityAndSession.<MASK><NEW_LINE>result.put(EntityAndSession.HOME, ejb.getHome());<NEW_LINE>}<NEW_LINE>return result;<NEW_LINE>}
REMOTE, ejb.getRemote());
916,051
// -----------------------------------------------------<NEW_LINE>// Actually Crud<NEW_LINE>// -------------<NEW_LINE>@Execute<NEW_LINE>@Secured({ ROLE })<NEW_LINE>public HtmlResponse create(final CreateForm form) {<NEW_LINE>verifyCrudMode(form.crudMode, CrudMode.CREATE);<NEW_LINE>validate(form, messages -> {<NEW_LINE>}, this::asEditHtml);<NEW_LINE>validateAttributes(form.attributes, v -> throwValidationError(v, this::asEditHtml));<NEW_LINE>verifyPassword(form, this::asEditHtml);<NEW_LINE>verifyToken(this::asEditHtml);<NEW_LINE>getUser(form).ifPresent(entity -> {<NEW_LINE>try {<NEW_LINE>userService.store(entity);<NEW_LINE>saveInfo(messages -> messages.addSuccessCrudCreateCrudTable(GLOBAL));<NEW_LINE>} catch (final Exception e) {<NEW_LINE>logger.<MASK><NEW_LINE>throwValidationError(messages -> messages.addErrorsCrudFailedToCreateCrudTable(GLOBAL, buildThrowableMessage(e)), this::asEditHtml);<NEW_LINE>}<NEW_LINE>}).orElse(() -> {<NEW_LINE>throwValidationError(messages -> messages.addErrorsCrudFailedToCreateInstance(GLOBAL), this::asEditHtml);<NEW_LINE>});<NEW_LINE>return redirect(getClass());<NEW_LINE>}
error("Failed to add {}", entity, e);
1,373,432
void checkOverlays(int opcode, VarnodeData[] in, int isize, VarnodeData out) {<NEW_LINE>if (overlayspace != null) {<NEW_LINE>if ((opcode == PcodeOp.LOAD) || (opcode == PcodeOp.STORE)) {<NEW_LINE>int spaceId = (int) in[0].offset;<NEW_LINE>AddressSpace space = addressFactory.getAddressSpace(spaceId);<NEW_LINE>if (space.isOverlaySpace()) {<NEW_LINE>space = ((OverlayAddressSpace) space).getOverlayedSpace();<NEW_LINE>in[0].offset = space.getSpaceID();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>for (int i = 0; i < isize; ++i) {<NEW_LINE>VarnodeData v = in[i];<NEW_LINE>if (v.space.equals(overlayspace)) {<NEW_LINE>v.space = ((OverlayAddressSpace) <MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (out != null) {<NEW_LINE>if (out.space.equals(overlayspace)) {<NEW_LINE>out.space = ((OverlayAddressSpace) out.space).getOverlayedSpace();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
v.space).getOverlayedSpace();
108,201
public boolean eIsSet(int featureID) {<NEW_LINE>switch(featureID) {<NEW_LINE>case ModelPackage.AMBIENT_TEMPERATURE__SENSOR_VALUE:<NEW_LINE>return sensorValue != null;<NEW_LINE>case ModelPackage.AMBIENT_TEMPERATURE__LOGGER:<NEW_LINE>return LOGGER_EDEFAULT == null ? logger != null : !LOGGER_EDEFAULT.equals(logger);<NEW_LINE>case ModelPackage.AMBIENT_TEMPERATURE__UID:<NEW_LINE>return UID_EDEFAULT == null ? uid != null <MASK><NEW_LINE>case ModelPackage.AMBIENT_TEMPERATURE__POLL:<NEW_LINE>return poll != POLL_EDEFAULT;<NEW_LINE>case ModelPackage.AMBIENT_TEMPERATURE__ENABLED_A:<NEW_LINE>return ENABLED_A_EDEFAULT == null ? enabledA != null : !ENABLED_A_EDEFAULT.equals(enabledA);<NEW_LINE>case ModelPackage.AMBIENT_TEMPERATURE__SUB_ID:<NEW_LINE>return SUB_ID_EDEFAULT == null ? subId != null : !SUB_ID_EDEFAULT.equals(subId);<NEW_LINE>case ModelPackage.AMBIENT_TEMPERATURE__MBRICK:<NEW_LINE>return basicGetMbrick() != null;<NEW_LINE>case ModelPackage.AMBIENT_TEMPERATURE__CALLBACK_PERIOD:<NEW_LINE>return callbackPeriod != CALLBACK_PERIOD_EDEFAULT;<NEW_LINE>case ModelPackage.AMBIENT_TEMPERATURE__THRESHOLD:<NEW_LINE>return THRESHOLD_EDEFAULT == null ? threshold != null : !THRESHOLD_EDEFAULT.equals(threshold);<NEW_LINE>case ModelPackage.AMBIENT_TEMPERATURE__TF_CONFIG:<NEW_LINE>return tfConfig != null;<NEW_LINE>case ModelPackage.AMBIENT_TEMPERATURE__DEVICE_TYPE:<NEW_LINE>return DEVICE_TYPE_EDEFAULT == null ? deviceType != null : !DEVICE_TYPE_EDEFAULT.equals(deviceType);<NEW_LINE>}<NEW_LINE>return super.eIsSet(featureID);<NEW_LINE>}
: !UID_EDEFAULT.equals(uid);
1,178,520
private void writeChunkToOutputStream(byte[] chunk, int offset, int length) {<NEW_LINE>if (compressor == null && !dwrfEncryptor.isPresent()) {<NEW_LINE>compressedOutputStream.write(chunk, offset, length);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>checkArgument(length <= maxBufferSize, "Write chunk length must be less than max compression buffer size");<NEW_LINE>boolean isCompressed = false;<NEW_LINE>byte[] compressionBuffer = null;<NEW_LINE>try {<NEW_LINE>if (compressor != null && length >= minCompressibleSize) {<NEW_LINE>int minCompressionBufferSize = compressor.maxCompressedLength(length);<NEW_LINE>compressionBuffer = compressionBufferPool.checkOut(minCompressionBufferSize);<NEW_LINE>int compressedSize = compressor.compress(chunk, offset, length, compressionBuffer, 0, compressionBuffer.length);<NEW_LINE>if (compressedSize < length) {<NEW_LINE>isCompressed = true;<NEW_LINE>chunk = compressionBuffer;<NEW_LINE>length = compressedSize;<NEW_LINE>offset = 0;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (dwrfEncryptor.isPresent()) {<NEW_LINE>chunk = dwrfEncryptor.get().encrypt(chunk, offset, length);<NEW_LINE>length = chunk.length;<NEW_LINE>offset = 0;<NEW_LINE>// size after encryption should not exceed what the 3 byte header can hold (2^23)<NEW_LINE>if (length > 8388608) {<NEW_LINE>throw new OrcEncryptionException("Encrypted data size %s exceeds limit of 2^23", length);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>int header = isCompressed ? length << 1 : (length << 1) + 1;<NEW_LINE>writeChunkedOutput(<MASK><NEW_LINE>} finally {<NEW_LINE>if (compressionBuffer != null) {<NEW_LINE>compressionBufferPool.checkIn(compressionBuffer);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
chunk, offset, length, header);
1,140,869
public static ListHistoryDeployVersionResponse unmarshall(ListHistoryDeployVersionResponse listHistoryDeployVersionResponse, UnmarshallerContext _ctx) {<NEW_LINE>listHistoryDeployVersionResponse.setRequestId(_ctx.stringValue("ListHistoryDeployVersionResponse.RequestId"));<NEW_LINE>listHistoryDeployVersionResponse.setCode(_ctx.integerValue("ListHistoryDeployVersionResponse.Code"));<NEW_LINE>listHistoryDeployVersionResponse.setMessage(_ctx.stringValue("ListHistoryDeployVersionResponse.Message"));<NEW_LINE>List<PackageVersion> packageVersionList <MASK><NEW_LINE>for (int i = 0; i < _ctx.lengthValue("ListHistoryDeployVersionResponse.PackageVersionList.Length"); i++) {<NEW_LINE>PackageVersion packageVersion = new PackageVersion();<NEW_LINE>packageVersion.setId(_ctx.stringValue("ListHistoryDeployVersionResponse.PackageVersionList[" + i + "].Id"));<NEW_LINE>packageVersion.setPackageVersion(_ctx.stringValue("ListHistoryDeployVersionResponse.PackageVersionList[" + i + "].PackageVersion"));<NEW_LINE>packageVersion.setAppId(_ctx.stringValue("ListHistoryDeployVersionResponse.PackageVersionList[" + i + "].AppId"));<NEW_LINE>packageVersion.setDescription(_ctx.stringValue("ListHistoryDeployVersionResponse.PackageVersionList[" + i + "].Description"));<NEW_LINE>packageVersion.setWarUrl(_ctx.stringValue("ListHistoryDeployVersionResponse.PackageVersionList[" + i + "].WarUrl"));<NEW_LINE>packageVersion.setCreateTime(_ctx.longValue("ListHistoryDeployVersionResponse.PackageVersionList[" + i + "].CreateTime"));<NEW_LINE>packageVersion.setUpdateTime(_ctx.longValue("ListHistoryDeployVersionResponse.PackageVersionList[" + i + "].UpdateTime"));<NEW_LINE>packageVersion.setType(_ctx.stringValue("ListHistoryDeployVersionResponse.PackageVersionList[" + i + "].Type"));<NEW_LINE>packageVersion.setPublicUrl(_ctx.stringValue("ListHistoryDeployVersionResponse.PackageVersionList[" + i + "].PublicUrl"));<NEW_LINE>packageVersionList.add(packageVersion);<NEW_LINE>}<NEW_LINE>listHistoryDeployVersionResponse.setPackageVersionList(packageVersionList);<NEW_LINE>return listHistoryDeployVersionResponse;<NEW_LINE>}
= new ArrayList<PackageVersion>();
1,805,929
public void onClick(View v) {<NEW_LINE>if (v == buttonRefresh) {<NEW_LINE>DialogUtils.createBothChoicesDialog(mContext, mContext.getString(R.string.title_warn), mContext.getString(R.string.tips_going_to_restart_app), mContext.getString(R.string.title_continue), mContext.getString(R.string.title_cancel), new DialogSupports() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void runWhenPositive() {<NEW_LINE>OldMainActivity.CURRENT_ACTIVITY<MASK><NEW_LINE>}<NEW_LINE>});<NEW_LINE>}<NEW_LINE>if (v == buttonBack) {<NEW_LINE>OldMainActivity.CURRENT_ACTIVITY.get().backFromHere();<NEW_LINE>}<NEW_LINE>if (v == buttonHome) {<NEW_LINE>OldMainActivity.CURRENT_ACTIVITY.get().switchUIs(OldMainActivity.CURRENT_ACTIVITY.get().mUiManager.uiStartGame, mContext.getString(R.string.title_home));<NEW_LINE>}<NEW_LINE>if (v == buttonLanguage) {<NEW_LINE>new LanguageDialog(mContext).show();<NEW_LINE>}<NEW_LINE>if (v == buttonInfo) {<NEW_LINE>OldMainActivity.CURRENT_ACTIVITY.get().mTipperManager.showTipper(buttonInfo);<NEW_LINE>}<NEW_LINE>}
.get().restarter();
1,078,321
final DeleteAddonResult executeDeleteAddon(DeleteAddonRequest deleteAddonRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(deleteAddonRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<DeleteAddonRequest> request = null;<NEW_LINE>Response<DeleteAddonResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new DeleteAddonRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(deleteAddonRequest));<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, "EKS");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteAddon");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<DeleteAddonResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(<MASK><NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
false), new DeleteAddonResultJsonUnmarshaller());
1,300,327
public void run(String cmd, String[] args, Context ctx, PrintStream out) throws DDRInteractiveCommandException {<NEW_LINE>hexformat = "0x%0" + (ctx.process.bytesPerPointer() * 2) + "x";<NEW_LINE>if ((DDRInteractive.getPath() == null) || (DDRInteractive.getPath().length() == 0)) {<NEW_LINE>out.println("DDR Interactive was not invoked with a command line pointing to a core file. Aborting command");<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (args.length == 0) {<NEW_LINE>showLibList(ctx, out);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (args.length >= 1) {<NEW_LINE>boolean overwrite = false;<NEW_LINE>if (args[0].toLowerCase().equals("extract")) {<NEW_LINE>File extractTo = null;<NEW_LINE>if (args.length == 2) {<NEW_LINE>// supplemental argument supplied<NEW_LINE>if (args[1].equalsIgnoreCase("overwrite")) {<NEW_LINE>overwrite = true;<NEW_LINE>} else {<NEW_LINE>// an extraction directory has been supplied<NEW_LINE>extractTo = new File(args[1]);<NEW_LINE>if (!extractTo.exists()) {<NEW_LINE>out.println("The specified extraction directory does not exist. " + extractTo.getAbsolutePath());<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>extractLibs(<MASK><NEW_LINE>return;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>out.println("Command not recognised");<NEW_LINE>}
ctx, out, extractTo, overwrite);
1,040,303
public MultiDataSet next() {<NEW_LINE>val features = new ArrayList<INDArray>();<NEW_LINE>val labels = new ArrayList<INDArray>();<NEW_LINE>val featuresMask = new ArrayList<INDArray>();<NEW_LINE>val labelsMask <MASK><NEW_LINE>boolean hasFM = false;<NEW_LINE>boolean hasLM = false;<NEW_LINE>int cnt = 0;<NEW_LINE>for (val i : iterators) {<NEW_LINE>val ds = i.next();<NEW_LINE>features.add(ds.getFeatures());<NEW_LINE>featuresMask.add(ds.getFeaturesMaskArray());<NEW_LINE>if (outcome < 0 || cnt == outcome) {<NEW_LINE>labels.add(ds.getLabels());<NEW_LINE>labelsMask.add(ds.getLabelsMaskArray());<NEW_LINE>}<NEW_LINE>if (ds.getFeaturesMaskArray() != null)<NEW_LINE>hasFM = true;<NEW_LINE>if (ds.getLabelsMaskArray() != null)<NEW_LINE>hasLM = true;<NEW_LINE>cnt++;<NEW_LINE>}<NEW_LINE>INDArray[] fm = hasFM ? featuresMask.toArray(new INDArray[0]) : null;<NEW_LINE>INDArray[] lm = hasLM ? labelsMask.toArray(new INDArray[0]) : null;<NEW_LINE>val mds = new org.nd4j.linalg.dataset.MultiDataSet(features.toArray(new INDArray[0]), labels.toArray(new INDArray[0]), fm, lm);<NEW_LINE>if (preProcessor != null)<NEW_LINE>preProcessor.preProcess(mds);<NEW_LINE>return mds;<NEW_LINE>}
= new ArrayList<INDArray>();
1,147,445
@Nonnull<NEW_LINE>public List<TextRange> intersectWithAllEditableFragments(@Nonnull PsiFile injectedPsi, @Nonnull TextRange rangeToEdit) {<NEW_LINE>Place shreds = InjectedLanguageUtil.getShreds(injectedPsi);<NEW_LINE>if (shreds == null)<NEW_LINE>return Collections.emptyList();<NEW_LINE>// optimization: TextRange or ArrayList<NEW_LINE>Object result = null;<NEW_LINE>int count = 0;<NEW_LINE>int offset = 0;<NEW_LINE>for (PsiLanguageInjectionHost.Shred shred : shreds) {<NEW_LINE>TextRange encodedRange = TextRange.from(offset + shred.getPrefix().length(), shred.<MASK><NEW_LINE>TextRange intersection = encodedRange.intersection(rangeToEdit);<NEW_LINE>if (intersection != null) {<NEW_LINE>count++;<NEW_LINE>if (count == 1) {<NEW_LINE>result = intersection;<NEW_LINE>} else if (count == 2) {<NEW_LINE>TextRange range = (TextRange) result;<NEW_LINE>if (range.isEmpty()) {<NEW_LINE>result = intersection;<NEW_LINE>count = 1;<NEW_LINE>} else if (intersection.isEmpty()) {<NEW_LINE>count = 1;<NEW_LINE>} else {<NEW_LINE>List<TextRange> list = new ArrayList<>();<NEW_LINE>list.add(range);<NEW_LINE>list.add(intersection);<NEW_LINE>result = list;<NEW_LINE>}<NEW_LINE>} else if (intersection.isEmpty()) {<NEW_LINE>count--;<NEW_LINE>} else {<NEW_LINE>// noinspection unchecked<NEW_LINE>((List<TextRange>) result).add(intersection);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>offset += shred.getPrefix().length() + shred.getRangeInsideHost().getLength() + shred.getSuffix().length();<NEW_LINE>}<NEW_LINE>// noinspection unchecked<NEW_LINE>return count == 0 ? Collections.emptyList() : count == 1 ? Collections.singletonList((TextRange) result) : (List<TextRange>) result;<NEW_LINE>}
getRangeInsideHost().getLength());
160,598
private // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents<NEW_LINE>void initComponents() {<NEW_LINE>java.awt.GridBagConstraints gridBagConstraints;<NEW_LINE>insidePanel = new javax.swing.JPanel();<NEW_LINE>xLabel = new javax.swing.JLabel();<NEW_LINE>xField = new javax.swing.JTextField();<NEW_LINE>yLabel = new javax.swing.JLabel();<NEW_LINE>yField = new javax.swing.JTextField();<NEW_LINE>setLayout(new java.awt.BorderLayout());<NEW_LINE>insidePanel.setLayout(new java.awt.GridBagLayout());<NEW_LINE>xLabel.setLabelFor(xField);<NEW_LINE>// NOI18N<NEW_LINE>java.util.ResourceBundle bundle = java.util.ResourceBundle.getBundle("org/netbeans/beaninfo/editors/Bundle");<NEW_LINE>// NOI18N<NEW_LINE>org.openide.awt.Mnemonics.setLocalizedText(xLabel, bundle.getString("CTL_X"));<NEW_LINE>gridBagConstraints = new java.awt.GridBagConstraints();<NEW_LINE>gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;<NEW_LINE>insidePanel.add(xLabel, gridBagConstraints);<NEW_LINE>gridBagConstraints = new java.awt.GridBagConstraints();<NEW_LINE>gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;<NEW_LINE>gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;<NEW_LINE>gridBagConstraints.weightx = 1.0;<NEW_LINE>gridBagConstraints.insets = new java.awt.Insets(4, 8, 4, 0);<NEW_LINE><MASK><NEW_LINE>yLabel.setLabelFor(yField);<NEW_LINE>// NOI18N<NEW_LINE>org.openide.awt.Mnemonics.setLocalizedText(yLabel, bundle.getString("CTL_Y"));<NEW_LINE>gridBagConstraints = new java.awt.GridBagConstraints();<NEW_LINE>gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;<NEW_LINE>insidePanel.add(yLabel, gridBagConstraints);<NEW_LINE>gridBagConstraints = new java.awt.GridBagConstraints();<NEW_LINE>gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;<NEW_LINE>gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;<NEW_LINE>gridBagConstraints.weightx = 1.0;<NEW_LINE>gridBagConstraints.insets = new java.awt.Insets(4, 8, 4, 0);<NEW_LINE>insidePanel.add(yField, gridBagConstraints);<NEW_LINE>add(insidePanel, java.awt.BorderLayout.CENTER);<NEW_LINE>}
insidePanel.add(xField, gridBagConstraints);
2,000
// ===========================================================<NEW_LINE>// Methods for/from SuperClass/Interfaces<NEW_LINE>// ===========================================================<NEW_LINE>@Override<NEW_LINE>public void onSensorChanged(final SensorEvent sensorEvent) {<NEW_LINE>int type = sensorEvent.sensor.getType();<NEW_LINE>if (type == Sensor.TYPE_ACCELEROMETER) {<NEW_LINE>mDeviceMotionEvent.accelerationIncludingGravity.x = sensorEvent.values[0];<NEW_LINE>mDeviceMotionEvent.accelerationIncludingGravity.y = sensorEvent.values[1];<NEW_LINE>mDeviceMotionEvent.accelerationIncludingGravity.<MASK><NEW_LINE>} else if (type == Sensor.TYPE_LINEAR_ACCELERATION) {<NEW_LINE>mDeviceMotionEvent.acceleration.x = sensorEvent.values[0];<NEW_LINE>mDeviceMotionEvent.acceleration.y = sensorEvent.values[1];<NEW_LINE>mDeviceMotionEvent.acceleration.z = sensorEvent.values[2];<NEW_LINE>} else if (type == Sensor.TYPE_GYROSCOPE) {<NEW_LINE>// The unit is rad/s, need to be converted to deg/s<NEW_LINE>mDeviceMotionEvent.rotationRate.alpha = (float) Math.toDegrees(sensorEvent.values[0]);<NEW_LINE>mDeviceMotionEvent.rotationRate.beta = (float) Math.toDegrees(sensorEvent.values[1]);<NEW_LINE>mDeviceMotionEvent.rotationRate.gamma = (float) Math.toDegrees(sensorEvent.values[2]);<NEW_LINE>}<NEW_LINE>}
z = sensorEvent.values[2];
1,032,054
protected void ensureKnown(Address min, Address max) {<NEW_LINE>if (minAddress == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>min = cmax(min, minAddress);<NEW_LINE>max = cmin(max, maxAddress);<NEW_LINE>if (known.contains(min, max)) {<NEW_LINE>// hits++;<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>// misses++;<NEW_LINE>AddressRangeIterator rangesBackward = delegate.getAddressRanges(min, false);<NEW_LINE>if (rangesBackward.hasNext()) {<NEW_LINE>AddressRange prev = rangesBackward.next();<NEW_LINE>cache.add(prev);<NEW_LINE>known.add(prev.getMinAddress(), min);<NEW_LINE>} else {<NEW_LINE>known.add(minAddress, min);<NEW_LINE>}<NEW_LINE>AddressRangeIterator rangesForward = <MASK><NEW_LINE>while (true) {<NEW_LINE>if (!rangesForward.hasNext()) {<NEW_LINE>known.add(min, maxAddress);<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>AddressRange next = rangesForward.next();<NEW_LINE>cache.add(next);<NEW_LINE>if (next.getMaxAddress().compareTo(max) >= 0) {<NEW_LINE>known.add(min, next.getMaxAddress());<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
delegate.getAddressRanges(min, true);
410,445
public static List<RexNode> pushThroughJoin(Collection<RexNode> predicates, Join join, List<RexNode> pushed) {<NEW_LINE>final <MASK><NEW_LINE>final int nSysFields = 0;<NEW_LINE>final int nFieldsLeft = join.getInputs().get(0).getRowType().getFieldCount();<NEW_LINE>final int nFieldsRight = join.getInputs().get(1).getRowType().getFieldCount();<NEW_LINE>final int nTotalFields = nFieldsLeft + nFieldsRight;<NEW_LINE>// set the reference bitmaps for the left and right children<NEW_LINE>ImmutableBitSet leftBitmap = ImmutableBitSet.range(nSysFields, nSysFields + nFieldsLeft);<NEW_LINE>ImmutableBitSet rightBitmap = ImmutableBitSet.range(nSysFields + nFieldsLeft, nTotalFields);<NEW_LINE>// Do not use "IS NULL" for partition pruning in "SELECT FROM a LEFT JOIN b ON a.id = b.id WHERE b.id IS NULL"<NEW_LINE>predicates.stream().filter(// Do not use "IS NULL" for partition pruning in "SELECT FROM a RIGHT JOIN b ON a.id = b.id WHERE a.id IS NULL"<NEW_LINE>predicate -> !joinType.generatesNullsOnRight() || !containsColumn(predicate, rightBitmap) || Strong.isNotTrue(predicate, rightBitmap)).filter(predicate -> !joinType.generatesNullsOnLeft() || !containsColumn(predicate, leftBitmap) || Strong.isNotTrue(predicate, leftBitmap)).forEachOrdered(pushed::add);<NEW_LINE>return pushed;<NEW_LINE>}
JoinRelType joinType = join.getJoinType();
817,736
public static View intersectViews(View first, View second) {<NEW_LINE>if (first == null)<NEW_LINE>throw new IllegalArgumentException("View is null");<NEW_LINE>if (second == null)<NEW_LINE>throw new IllegalArgumentException("View is null");<NEW_LINE>View resultView = new <MASK><NEW_LINE>Collection<ViewProperty> firstProps = first.getProperties();<NEW_LINE>for (ViewProperty firstProperty : firstProps) {<NEW_LINE>if (second.containsProperty(firstProperty.getName())) {<NEW_LINE>View resultPropView = null;<NEW_LINE>ViewProperty secondProperty = second.getProperty(firstProperty.getName());<NEW_LINE>if ((firstProperty.getView() != null) && (secondProperty.getView() != null)) {<NEW_LINE>resultPropView = intersectViews(firstProperty.getView(), secondProperty.getView());<NEW_LINE>}<NEW_LINE>resultView.addProperty(firstProperty.getName(), resultPropView);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return resultView;<NEW_LINE>}
View(first.getEntityClass());
1,715,402
// TODO This callback is not called (due to requestPermissions(this.getParent()?), so onCreate() is used<NEW_LINE>@Override<NEW_LINE>public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {<NEW_LINE>if (requestCode == REQUEST_LOCATION) {<NEW_LINE>// Check if the only required permission has been granted (could react on the response)<NEW_LINE>if (grantResults.length >= 1 && grantResults[0] == PackageManager.PERMISSION_GRANTED) {<NEW_LINE>String s = "Permission response OK";<NEW_LINE>Log.i(getClass(<MASK><NEW_LINE>if (mTracker.getState() != TrackerState.CONNECTED) {<NEW_LINE>startGps();<NEW_LINE>}<NEW_LINE>updateView();<NEW_LINE>} else {<NEW_LINE>String s = "Permission was not granted: " + " (" + grantResults.length + ", " + permissions.length + ")";<NEW_LINE>Log.i(getClass().getName(), s);<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>String s = "Unexpected permission request: " + requestCode;<NEW_LINE>Log.w(getClass().getName(), s);<NEW_LINE>super.onRequestPermissionsResult(requestCode, permissions, grantResults);<NEW_LINE>}<NEW_LINE>}
).getName(), s);
849,133
public void startRetrieveLogInternal(JobData jobData) {<NEW_LINE>if (!(jobData instanceof LinkisLogData)) {<NEW_LINE>throw new LinkisClientExecutionException("EXE0034", ErrorLevel.ERROR, CommonErrMsg.ExecutionErr, "JobData is not LinkisLogData");<NEW_LINE>}<NEW_LINE>if (jobData.getUser() == null || jobData.getJobID() == null) {<NEW_LINE>throw new LinkisClientExecutionException("EXE0036", ErrorLevel.<MASK><NEW_LINE>}<NEW_LINE>LinkisLogData logData = (LinkisLogData) jobData;<NEW_LINE>if (logData.getJobStatus() != null) {<NEW_LINE>try {<NEW_LINE>Thread logConsumer = new Thread(() -> logData.notifyLogListener(), "Log-Consumer");<NEW_LINE>Thread logRetriever = new Thread(() -> queryLogLoop(logData), "Log-Retriever");<NEW_LINE>SchedulerUtils.getCachedThreadPoolExecutor().execute(logRetriever);<NEW_LINE>SchedulerUtils.getCachedThreadPoolExecutor().execute(logConsumer);<NEW_LINE>} catch (Exception e) {<NEW_LINE>logger.warn("Failed to retrieve log", e);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
ERROR, CommonErrMsg.ExecutionErr, "user or jobID is null");
808,547
private void initiateDownload() {<NEW_LINE>mTiledLayer = (ArcGISTiledLayer) mMapView.getMap().getBasemap().getBaseLayers().get(0);<NEW_LINE>// initialize the export task<NEW_LINE>mExportTileCacheTask = new ExportTileCacheTask(mTiledLayer.getUri());<NEW_LINE>final ListenableFuture<ExportTileCacheParameters> parametersFuture = mExportTileCacheTask.createDefaultExportTileCacheParametersAsync(viewToExtent(), mMapView.getMapScale(), mMapView.getMapScale() * 0.1);<NEW_LINE>parametersFuture.addDoneListener(() -> {<NEW_LINE>try {<NEW_LINE>// export tile cache to directory<NEW_LINE>ExportTileCacheParameters parameters = parametersFuture.get();<NEW_LINE>mExportTileCacheJob = mExportTileCacheTask.exportTileCache(parameters, getCacheDir() + "/file.tpkx");<NEW_LINE>} catch (InterruptedException e) {<NEW_LINE>Log.e(TAG, "TileCacheParameters interrupted: " + e.getMessage());<NEW_LINE>} catch (ExecutionException e) {<NEW_LINE>Log.e(TAG, "Error generating parameters: " + e.getMessage());<NEW_LINE>}<NEW_LINE>mExportTileCacheJob.start();<NEW_LINE>createProgressDialog(mExportTileCacheJob);<NEW_LINE>mExportTileCacheJob.addJobDoneListener(() -> {<NEW_LINE>if (mExportTileCacheJob.getResult() != null) {<NEW_LINE>TileCache exportedTileCacheResult = mExportTileCacheJob.getResult();<NEW_LINE>showMapPreview(exportedTileCacheResult);<NEW_LINE>} else {<NEW_LINE>Log.e(TAG, "Tile cache job result null. File size may be too big.");<NEW_LINE>Toast.makeText(this, "Tile cache job result null. File size may be too big. Try zooming in before exporting tiles", <MASK><NEW_LINE>}<NEW_LINE>});<NEW_LINE>});<NEW_LINE>}
Toast.LENGTH_LONG).show();
1,515,275
public JsonNode executeQuery(Universe universe, RunQueryFormData queryParams, String username, String password) {<NEW_LINE>ObjectNode response = newObject();<NEW_LINE>// TODO: implement execute query for CQL<NEW_LINE>String ysqlEndpoints = universe.getYSQLServerAddresses();<NEW_LINE>String connectString = String.format("jdbc:postgresql://%s/%s", ysqlEndpoints.split(",")[0], queryParams.db_name);<NEW_LINE>Properties props = new Properties();<NEW_LINE>props.put("user", username);<NEW_LINE>props.put("password", password);<NEW_LINE>String caCert = universe.getCertificateClientToNode();<NEW_LINE>if (caCert != null) {<NEW_LINE>// Using verify CA since it is possible that the CN for the server cert<NEW_LINE>// is the loadbalancer DNS/some generic ID. Just verifying the cert<NEW_LINE>// is good enough.<NEW_LINE>props.put("sslmode", "verify-ca");<NEW_LINE>props.put("sslrootcert", caCert);<NEW_LINE>}<NEW_LINE>try (Connection conn = DriverManager.getConnection(connectString, props)) {<NEW_LINE>if (conn == null) {<NEW_LINE>response.put("error", "Unable to connect to DB");<NEW_LINE>} else {<NEW_LINE>PreparedStatement p = conn.prepareStatement(queryParams.query);<NEW_LINE>boolean hasResult = p.execute();<NEW_LINE>if (hasResult) {<NEW_LINE><MASK><NEW_LINE>List<Map<String, Object>> rows = resultSetToMap(result);<NEW_LINE>response.set("result", toJson(rows));<NEW_LINE>} else {<NEW_LINE>response.put("queryType", getQueryType(queryParams.query)).put("count", p.getUpdateCount());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} catch (SQLException | RuntimeException e) {<NEW_LINE>response.put("error", e.getMessage());<NEW_LINE>}<NEW_LINE>return response;<NEW_LINE>}
ResultSet result = p.getResultSet();
1,851,792
public List<ValidateError> validate() {<NEW_LINE>List<ValidateError> errors = new ArrayList<>();<NEW_LINE>Validator validator;<NEW_LINE>ValidateError error;<NEW_LINE>validator = ValidatorFactory.getInstance(Validator.REQUIRED);<NEW_LINE>error = validator.validate(this.userId, convLabelName("User Id"));<NEW_LINE>if (error != null) {<NEW_LINE>errors.add(error);<NEW_LINE>}<NEW_LINE>validator = ValidatorFactory.getInstance(Validator.INTEGER);<NEW_LINE>error = validator.validate(this.userId, convLabelName("User Id"));<NEW_LINE>if (error != null) {<NEW_LINE>errors.add(error);<NEW_LINE>}<NEW_LINE>validator = ValidatorFactory.getInstance(Validator.REQUIRED);<NEW_LINE>error = validator.validate(this.no, convLabelName("No"));<NEW_LINE>if (error != null) {<NEW_LINE>errors.add(error);<NEW_LINE>}<NEW_LINE>validator = ValidatorFactory.getInstance(Validator.INTEGER);<NEW_LINE>error = validator.validate(this.no, convLabelName("No"));<NEW_LINE>if (error != null) {<NEW_LINE>errors.add(error);<NEW_LINE>}<NEW_LINE>validator = <MASK><NEW_LINE>error = validator.validate(this.insertUser, convLabelName("Insert User"));<NEW_LINE>if (error != null) {<NEW_LINE>errors.add(error);<NEW_LINE>}<NEW_LINE>validator = ValidatorFactory.getInstance(Validator.INTEGER);<NEW_LINE>error = validator.validate(this.updateUser, convLabelName("Update User"));<NEW_LINE>if (error != null) {<NEW_LINE>errors.add(error);<NEW_LINE>}<NEW_LINE>validator = ValidatorFactory.getInstance(Validator.INTEGER);<NEW_LINE>error = validator.validate(this.deleteFlag, convLabelName("Delete Flag"));<NEW_LINE>if (error != null) {<NEW_LINE>errors.add(error);<NEW_LINE>}<NEW_LINE>return errors;<NEW_LINE>}
ValidatorFactory.getInstance(Validator.INTEGER);
34,521
final ListEventSourcesResult executeListEventSources(ListEventSourcesRequest listEventSourcesRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listEventSourcesRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<ListEventSourcesRequest> request = null;<NEW_LINE>Response<ListEventSourcesResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new ListEventSourcesRequestProtocolMarshaller(protocolFactory).marshall<MASK><NEW_LINE>// Binds the request metrics to the current request.<NEW_LINE>request.setAWSRequestMetrics(awsRequestMetrics);<NEW_LINE>request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);<NEW_LINE>request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SERVICE_ID, "EventBridge");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListEventSources");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<ListEventSourcesResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListEventSourcesResultJsonUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
(super.beforeMarshalling(listEventSourcesRequest));
567,445
public MessageStore create(SessionID sessionID) {<NEW_LINE>try {<NEW_LINE>String dbDir = settings.getString(sessionID, SETTING_SLEEPYCAT_DATABASE_DIR);<NEW_LINE>String seqDbName = "seq";<NEW_LINE>if (settings.isSetting(sessionID, SETTING_SLEEPYCAT_SEQUENCE_DB_NAME)) {<NEW_LINE>seqDbName = settings.getString(sessionID, SETTING_SLEEPYCAT_SEQUENCE_DB_NAME);<NEW_LINE>}<NEW_LINE>String msgDbName = "msg";<NEW_LINE>if (settings.isSetting(sessionID, SETTING_SLEEPYCAT_MESSAGE_DB_NAME)) {<NEW_LINE>msgDbName = <MASK><NEW_LINE>}<NEW_LINE>return new SleepycatStore(sessionID, dbDir, seqDbName, msgDbName);<NEW_LINE>} catch (Exception e) {<NEW_LINE>throw new RuntimeError(e);<NEW_LINE>}<NEW_LINE>}
settings.getString(sessionID, SETTING_SLEEPYCAT_MESSAGE_DB_NAME);
262,026
private CompletableFuture<Version> sealActiveTx(final int epoch, final UUID txId, final boolean commit, final ActiveTxnRecord previous, final Version version, final String writerId, final long timestamp, OperationContext context) {<NEW_LINE>CompletableFuture<ActiveTxnRecord> future;<NEW_LINE>if (commit) {<NEW_LINE>// if request is for commit --> add a new entry to orderer.<NEW_LINE>// update record<NEW_LINE>if (!previous.getTxnStatus().equals(TxnStatus.COMMITTING)) {<NEW_LINE>future = addTxnToCommitOrder(txId, context).thenApply(position -> new ActiveTxnRecord(previous.getTxCreationTimestamp(), previous.getLeaseExpiryTime(), previous.getMaxExecutionExpiryTime(), TxnStatus.COMMITTING, writerId, timestamp, position));<NEW_LINE>} else {<NEW_LINE>future = CompletableFuture.completedFuture(previous);<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>future = CompletableFuture.completedFuture(new ActiveTxnRecord(previous.getTxCreationTimestamp(), previous.getLeaseExpiryTime(), previous.getMaxExecutionExpiryTime(), TxnStatus.ABORTING));<NEW_LINE>}<NEW_LINE>return future.thenCompose(updated -> {<NEW_LINE>final VersionedMetadata<ActiveTxnRecord> data = new <MASK><NEW_LINE>return updateActiveTx(epoch, txId, data, context);<NEW_LINE>});<NEW_LINE>}
VersionedMetadata<>(updated, version);
219,167
/*<NEW_LINE>* (non-Javadoc)<NEW_LINE>* @see<NEW_LINE>* com.aptana.projects.internal.listeners.IProjectListenersManager#removeListener(com.aptana.projects.listeners.<NEW_LINE>* IStudioProjectListener, java.lang.String)<NEW_LINE>*/<NEW_LINE>public synchronized boolean removeListener(final IStudioProjectListener listener, String projectNature) {<NEW_LINE>if (listener == null) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>List<ProjectListenerElement> <MASK><NEW_LINE>if (values == null) {<NEW_LINE>// Nothing to remove!<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>ProjectListenerElement element = CollectionsUtil.find(values, new IFilter<ProjectListenerElement>() {<NEW_LINE><NEW_LINE>public boolean include(ProjectListenerElement item) {<NEW_LINE>return listener.equals(item.getListener());<NEW_LINE>}<NEW_LINE>});<NEW_LINE>if (element == null) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>values.remove(element);<NEW_LINE>listeners.put(projectNature, values);<NEW_LINE>return true;<NEW_LINE>}
values = listeners.get(projectNature);
1,391,235
public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {<NEW_LINE>// WUtil.debug(new String("In do Post"),"");<NEW_LINE>HttpSession sess = request.getSession();<NEW_LINE>WebSessionCtx wsc = WebSessionCtx.get(request);<NEW_LINE>Properties ctx = wsc.ctx;<NEW_LINE>if (ctx == null) {<NEW_LINE>WebUtil.createTimeoutPage(request, response, this, null);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>// String loginInfo = (String)sess.getAttribute(WEnv.SA_LOGININFO);<NEW_LINE>// get session attributes<NEW_LINE>MWorkflow wf = (MWorkflow) sess.getAttribute(WORKFLOW);<NEW_LINE>MWFNode[] nodes = (MWFNode[]) sess.getAttribute(NODES);<NEW_LINE>ArrayList nodes_ID = (ArrayList) sess.getAttribute(NODES_ID);<NEW_LINE>int[][] imageMap = (int[][<MASK><NEW_LINE>int activeNode = ((Integer) sess.getAttribute(ACTIVE_NODE)).intValue();<NEW_LINE>// execute commnad<NEW_LINE>String m_command = request.getParameter(M_Command);<NEW_LINE>int j_command = WebUtil.getParameterAsInt(request, J_Command);<NEW_LINE>// WUtil.debug(m_command,"m_command");<NEW_LINE>// WUtil.debug(""+j_command,"j_command");<NEW_LINE>executeCommand(m_command, j_command, wf, activeNode, nodes, nodes_ID, sess);<NEW_LINE>// get updated session attributes<NEW_LINE>wf = (MWorkflow) sess.getAttribute(WORKFLOW);<NEW_LINE>nodes = (MWFNode[]) sess.getAttribute(NODES);<NEW_LINE>nodes_ID = (ArrayList) sess.getAttribute(NODES_ID);<NEW_LINE>imageMap = (int[][]) sess.getAttribute(IMAGE_MAP);<NEW_LINE>activeNode = ((Integer) sess.getAttribute(ACTIVE_NODE)).intValue();<NEW_LINE>// create layout<NEW_LINE>WebDoc doc = preparePage("loginInfo");<NEW_LINE>doc = createLayout(doc, wf, activeNode, nodes, nodes_ID, imageMap);<NEW_LINE>WebUtil.createResponse(request, response, this, null, doc, false);<NEW_LINE>}
]) sess.getAttribute(IMAGE_MAP);
1,287,962
public List<InetRecord> resolve(final String fqdn, final String address, final DNSAccessRecord.Builder builder) throws UnknownHostException {<NEW_LINE>try {<NEW_LINE>final <MASK><NEW_LINE>Zone zone = getZone(name);<NEW_LINE>final InetAddress addr = InetAddress.getByName(address);<NEW_LINE>final int qtype = (addr instanceof Inet6Address) ? Type.AAAA : Type.A;<NEW_LINE>final DNSRequest request = new DNSRequest(zone, name, qtype);<NEW_LINE>request.setClientIP(addr.getHostAddress());<NEW_LINE>request.setHostname(name.relativize(Name.root).toString());<NEW_LINE>request.setDnssec(true);<NEW_LINE>final Zone dynamicZone = createDynamicZone(zone, builder, request);<NEW_LINE>if (dynamicZone != null) {<NEW_LINE>zone = dynamicZone;<NEW_LINE>}<NEW_LINE>if (zone == null) {<NEW_LINE>LOGGER.error("No zone - Defaulting to system resolver: " + fqdn);<NEW_LINE>return super.resolve(fqdn);<NEW_LINE>}<NEW_LINE>return lookup(name, zone, Type.A);<NEW_LINE>} catch (TextParseException e) {<NEW_LINE>LOGGER.error("TextParseException from: " + fqdn);<NEW_LINE>}<NEW_LINE>return null;<NEW_LINE>}
Name name = new Name(fqdn);
568,984
private static Histogram[] sparseBuildFP2(GBDTParam param, boolean[] isFeatUsed, int featLo, FeatureInfo featureInfo, DataSet dataset, GradPair[] gradPairs, int[] nodeToIns, int from, int to) {<NEW_LINE>Histogram[] histograms = new Histogram[isFeatUsed.length];<NEW_LINE>for (int i = 0; i < isFeatUsed.length; i++) {<NEW_LINE>if (isFeatUsed[i]) {<NEW_LINE>histograms[i] = new Histogram(featureInfo.getNumBin(featLo + i), param.numClass, param.<MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE>for (int posId = from; posId < to; posId++) {<NEW_LINE>int insId = nodeToIns[posId];<NEW_LINE>dataset.accumulate(histograms, insId, gradPairs[insId], isFeatUsed, featLo);<NEW_LINE>}<NEW_LINE>return histograms;<NEW_LINE>}
fullHessian, param.isMultiClassMultiTree());
1,678,257
private void realizePublishingTasksLater(final Project project, final PublishingExtension extension) {<NEW_LINE>final NamedDomainObjectSet<MavenPublicationInternal> mavenPublications = extension.getPublications().withType(MavenPublicationInternal.class);<NEW_LINE>final TaskContainer tasks = project.getTasks();<NEW_LINE>final DirectoryProperty buildDirectory = project.getLayout().getBuildDirectory();<NEW_LINE>final TaskProvider<Task> publishLifecycleTask = tasks.named(PublishingPlugin.PUBLISH_LIFECYCLE_TASK_NAME);<NEW_LINE>final TaskProvider<Task> publishLocalLifecycleTask = tasks.named(PUBLISH_LOCAL_LIFECYCLE_TASK_NAME);<NEW_LINE>final NamedDomainObjectList<MavenArtifactRepository> repositories = extension.getRepositories(<MASK><NEW_LINE>repositories.all(repository -> tasks.register(publishAllToSingleRepoTaskName(repository), publish -> {<NEW_LINE>publish.setDescription("Publishes all Maven publications produced by this project to the " + repository.getName() + " repository.");<NEW_LINE>publish.setGroup(PublishingPlugin.PUBLISH_TASK_GROUP);<NEW_LINE>}));<NEW_LINE>mavenPublications.all(publication -> {<NEW_LINE>createGenerateMetadataTask(tasks, publication, mavenPublications, buildDirectory);<NEW_LINE>createGeneratePomTask(tasks, publication, buildDirectory, project);<NEW_LINE>createLocalInstallTask(tasks, publishLocalLifecycleTask, publication);<NEW_LINE>createPublishTasksForEachMavenRepo(tasks, publishLifecycleTask, publication, repositories);<NEW_LINE>});<NEW_LINE>}
).withType(MavenArtifactRepository.class);
1,034,999
private void addAllDefsFromBundles(Map<ConfigDefinitionKey, UnparsedConfigDefinition> defs, List<Component> components) {<NEW_LINE>for (Component component : components) {<NEW_LINE>Bundle bundle = component.getBundle();<NEW_LINE>for (final Bundle.DefEntry def : bundle.getDefEntries()) {<NEW_LINE>final ConfigDefinitionKey defKey = new ConfigDefinitionKey(<MASK><NEW_LINE>if (!defs.containsKey(defKey)) {<NEW_LINE>defs.put(defKey, new UnparsedConfigDefinition() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public ConfigDefinition parse() {<NEW_LINE>DefParser parser = new DefParser(defKey.getName(), new StringReader(def.contents));<NEW_LINE>return ConfigDefinitionBuilder.createConfigDefinition(parser.getTree());<NEW_LINE>}<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public String getUnparsedContent() {<NEW_LINE>return def.contents;<NEW_LINE>}<NEW_LINE>});<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
def.defName, def.defNamespace);
1,609,509
public static void main(String[] args) {<NEW_LINE>Options options = createCommandLineOptions();<NEW_LINE>CommandLine cmd;<NEW_LINE>try {<NEW_LINE>CommandLineParser parser = new DefaultParser();<NEW_LINE>cmd = parser.parse(options, args);<NEW_LINE>} catch (ParseException e) {<NEW_LINE>System.out.println("ERROR: " + e.getMessage());<NEW_LINE>HelpFormatter formatter = new HelpFormatter();<NEW_LINE>formatter.setOptionComparator(null);<NEW_LINE>formatter.printHelp(" java -jar spoon-dataflow.jar", null, options, null, true);<NEW_LINE>System.exit(1);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>String[] sources = cmd.getOptionValues("sources");<NEW_LINE>String[] classpath = cmd.getOptionValues("classpath");<NEW_LINE>Launcher launcher = new Launcher();<NEW_LINE>// launcher.getEnvironment().setNoClasspath(false);<NEW_LINE>launcher.getEnvironment().setCommentEnabled(false);<NEW_LINE>launcher.<MASK><NEW_LINE>Arrays.stream(sources).forEach(launcher::addInputResource);<NEW_LINE>if (classpath != null) {<NEW_LINE>launcher.getEnvironment().setSourceClasspath(classpath);<NEW_LINE>}<NEW_LINE>CtModel ctModel = launcher.buildModel();<NEW_LINE>CheckersScanner scanner = new CheckersScanner(launcher.getFactory());<NEW_LINE>ctModel.getAllTypes().forEach(scanner::scan);<NEW_LINE>scanner.getWarnings().forEach(w -> System.out.println("WARNING: " + w));<NEW_LINE>}
getEnvironment().setComplianceLevel(10);
1,121,809
private static Document toDocument(URL url) throws Exception {<NEW_LINE>// web.xml is optional<NEW_LINE>if (url == null) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>try (InputStream is = url.openStream()) {<NEW_LINE>DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();<NEW_LINE>factory.setValidating(false);<NEW_LINE>factory.setNamespaceAware(false);<NEW_LINE>factory.setExpandEntityReferences(false);<NEW_LINE>try {<NEW_LINE>factory.setFeature("http://xml.org/sax/features/namespaces", false);<NEW_LINE><MASK><NEW_LINE>factory.setFeature("http://apache.org/xml/features/nonvalidating/load-dtd-grammar", false);<NEW_LINE>factory.setFeature("http://apache.org/xml/features/nonvalidating/load-external-dtd", false);<NEW_LINE>} catch (Throwable e) {<NEW_LINE>LOGGER.warning("DocumentBuilderFactory#setFeature not implemented. Skipping...");<NEW_LINE>}<NEW_LINE>boolean absolute = false;<NEW_LINE>try {<NEW_LINE>absolute = url.toURI().isAbsolute();<NEW_LINE>} catch (URISyntaxException e) {<NEW_LINE>// noop<NEW_LINE>}<NEW_LINE>DocumentBuilder builder = factory.newDocumentBuilder();<NEW_LINE>Document document;<NEW_LINE>if (absolute) {<NEW_LINE>InputSource source = new InputSource(url.toExternalForm());<NEW_LINE>source.setByteStream(is);<NEW_LINE>document = builder.parse(source);<NEW_LINE>} else {<NEW_LINE>document = builder.parse(is);<NEW_LINE>}<NEW_LINE>return document;<NEW_LINE>}<NEW_LINE>}
factory.setFeature("http://xml.org/sax/features/validation", false);
1,840,091
public Line2D computeExtendedLine(HeadInter head) {<NEW_LINE>if (isRemoved()) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>// Heads in exclusion<NEW_LINE>final Set<Inter> excluded = new LinkedHashSet<>();<NEW_LINE>for (Relation rel : sig.getRelations(head, Exclusion.class)) {<NEW_LINE>excluded.add(sig.getOppositeInter(head, rel));<NEW_LINE>}<NEW_LINE>Point2D extTop = new Point2D.Double(median.getX1(), median.getY1());<NEW_LINE>Point2D extBottom = new Point2D.Double(median.getX2(<MASK><NEW_LINE>for (Relation rel : sig.getRelations(this, AbstractStemConnection.class)) {<NEW_LINE>final AbstractStemConnection link = (AbstractStemConnection) rel;<NEW_LINE>final Inter otherHead = sig.getOppositeInter(this, rel);<NEW_LINE>if (excluded.contains(otherHead)) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>final Point2D ext = link.getExtensionPoint();<NEW_LINE>if (ext != null) {<NEW_LINE>if (ext.getY() < extTop.getY()) {<NEW_LINE>extTop = ext;<NEW_LINE>}<NEW_LINE>if (ext.getY() > extBottom.getY()) {<NEW_LINE>extBottom = ext;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return new Line2D.Double(extTop, extBottom);<NEW_LINE>}
), median.getY2());
178,258
public final ParseContext parse() throws RecognitionException {<NEW_LINE>ParseContext _localctx = new ParseContext(_ctx, getState());<NEW_LINE>enterRule(_localctx, 0, RULE_parse);<NEW_LINE>int _la;<NEW_LINE>try {<NEW_LINE>enterOuterAlt(_localctx, 1);<NEW_LINE>{<NEW_LINE>setState(25);<NEW_LINE>_errHandler.sync(this);<NEW_LINE>_la = _input.LA(1);<NEW_LINE>while ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << Backslash) | (1L << Exclamation) | (1L << Number) | (1L << LineBreak) | (1L << Space) | (1L << IdentifierChar))) != 0)) {<NEW_LINE>{<NEW_LINE>{<NEW_LINE>setState(22);<NEW_LINE>line();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>setState(27);<NEW_LINE>_errHandler.sync(this);<NEW_LINE>_la = _input.LA(1);<NEW_LINE>}<NEW_LINE>setState(28);<NEW_LINE>match(EOF);<NEW_LINE>}<NEW_LINE>} catch (RecognitionException re) {<NEW_LINE>_localctx.exception = re;<NEW_LINE><MASK><NEW_LINE>_errHandler.recover(this, re);<NEW_LINE>} finally {<NEW_LINE>exitRule();<NEW_LINE>}<NEW_LINE>return _localctx;<NEW_LINE>}
_errHandler.reportError(this, re);
474,919
public static Vector apply(LongLongVector v1, LongDummyVector v2, Binary op) {<NEW_LINE>LongLongVector res;<NEW_LINE>if (v1.isSparse()) {<NEW_LINE>if (op.isKeepStorage()) {<NEW_LINE>throw new AngelException("operation is not support!");<NEW_LINE>} else {<NEW_LINE>// multi-rehash<NEW_LINE>LongLongVectorStorage newStorage = v1.getStorage().emptySparse((int) (v1.getDim()));<NEW_LINE>LongLongVectorStorage v1Storage = v1.getStorage();<NEW_LINE>for (int i = 0; i < v1.getDim(); i++) {<NEW_LINE>if (v1Storage.hasKey(i)) {<NEW_LINE>newStorage.set(i, op.apply(v1.get(i), v2.get(i)));<NEW_LINE>} else {<NEW_LINE>newStorage.set(i, op.apply(0, v2.get(i)));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>res = new LongLongVector(v1.getMatrixId(), v1.getRowId(), v1.getClock(), v1.getDim(), newStorage);<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>// sorted<NEW_LINE>if (op.isKeepStorage()) {<NEW_LINE>throw new AngelException("operation is not support!");<NEW_LINE>} else {<NEW_LINE>LongLongVectorStorage newStorage = new LongLongSparseVectorStorage(v1.getDim());<NEW_LINE>LongLongVectorStorage v1Storage = v1.getStorage();<NEW_LINE>for (int i = 0; i < v1.getDim(); i++) {<NEW_LINE>if (v1Storage.hasKey(i)) {<NEW_LINE>newStorage.set(i, op.apply(v1.get(i), v2.get(i)));<NEW_LINE>} else {<NEW_LINE>newStorage.set(i, op.apply(0, <MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE>res = new LongLongVector(v1.getMatrixId(), v1.getRowId(), v1.getClock(), v1.getDim(), newStorage);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return res;<NEW_LINE>}
v2.get(i)));
1,265,188
//<NEW_LINE>"LogNotTimber", //<NEW_LINE>"StringFormatInTimber", //<NEW_LINE>"ThrowableNotAtBeginning", //<NEW_LINE>"BinaryOperationInTimber", //<NEW_LINE>"TimberArgCount", //<NEW_LINE>"TimberArgTypes", //<NEW_LINE>"TimberTagLength", "TimberExceptionLogging" })<NEW_LINE>//<NEW_LINE>@Override<NEW_LINE>protected void onCreate(@Nullable Bundle savedInstanceState) {<NEW_LINE>super.onCreate(savedInstanceState);<NEW_LINE>// LogNotTimber<NEW_LINE>Log.d("TAG", "msg");<NEW_LINE>Log.d("TAG", "msg", new Exception());<NEW_LINE>android.util.Log.d("TAG", "msg");<NEW_LINE>android.util.Log.d("TAG", "msg", new Exception());<NEW_LINE>// StringFormatInTimber<NEW_LINE>Timber.w(String.format("%s", getString()));<NEW_LINE>Timber.w(format("%s", getString()));<NEW_LINE>// ThrowableNotAtBeginning<NEW_LINE>Timber.d("%s", new Exception());<NEW_LINE>// BinaryOperationInTimber<NEW_LINE>String foo = "foo";<NEW_LINE>String bar = "bar";<NEW_LINE>Timber.d("foo" + "bar");<NEW_LINE>Timber.d("foo" + bar);<NEW_LINE>Timber.d(foo + "bar");<NEW_LINE>Timber.d(foo + bar);<NEW_LINE>// TimberArgCount<NEW_LINE>Timber.d("%s %s", "arg0");<NEW_LINE>Timber.d("%s", "arg0", "arg1");<NEW_LINE>Timber.tag("tag").d("%s %s", "arg0");<NEW_LINE>Timber.tag("tag").d("%s", "arg0", "arg1");<NEW_LINE>// TimberArgTypes<NEW_LINE>Timber.d("%d", "arg0");<NEW_LINE>Timber.tag("tag").d("%d", "arg0");<NEW_LINE>// TimberTagLength<NEW_LINE>Timber.tag("abcdefghijklmnopqrstuvwx");<NEW_LINE><MASK><NEW_LINE>// TimberExceptionLogging<NEW_LINE>Timber.d(new Exception(), new Exception().getMessage());<NEW_LINE>Timber.d(new Exception(), "");<NEW_LINE>Timber.d(new Exception(), null);<NEW_LINE>Timber.d(new Exception().getMessage());<NEW_LINE>}
Timber.tag("abcdefghijklmnopqrstuvw" + "x");
438,135
public T fromString(String value) {<NEW_LINE>if (value == null || value.isEmpty()) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>if (fromStringMethod != null) {<NEW_LINE>try {<NEW_LINE>Object constant = fromStringMethod.invoke(null, value);<NEW_LINE>// return if a value is found<NEW_LINE>if (constant != null) {<NEW_LINE>@SuppressWarnings("unchecked")<NEW_LINE>final T returnValue = (T) constant;<NEW_LINE>return returnValue;<NEW_LINE>}<NEW_LINE>final String errMsg = String.format("%s is not a valid %s", parameterName, rawType.getSimpleName());<NEW_LINE>throw new WebApplicationException(getErrorResponse(errMsg));<NEW_LINE>} catch (IllegalAccessException e) {<NEW_LINE>LOGGER.debug("Not permitted to call fromString on {}", rawType.getSimpleName(), e);<NEW_LINE>throw new WebApplicationException(getErrorResponse("Not permitted to call fromString on %s" + rawType.getSimpleName()));<NEW_LINE>} catch (InvocationTargetException e) {<NEW_LINE>if (e.getCause() instanceof WebApplicationException) {<NEW_LINE>throw (WebApplicationException) e.getCause();<NEW_LINE>}<NEW_LINE>LOGGER.debug("Failed to convert {} to {}", parameterName, rawType.getSimpleName(), e);<NEW_LINE>throw new WebApplicationException(getErrorResponse("Failed to convert " + parameterName + " to " + rawType.getSimpleName()));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>Object constant = Enums.fromStringFuzzy(value, constants);<NEW_LINE>// return if a value is found<NEW_LINE>if (constant != null) {<NEW_LINE>@SuppressWarnings("unchecked")<NEW_LINE>final T returnValue = (T) constant;<NEW_LINE>return returnValue;<NEW_LINE>}<NEW_LINE>final String constantsList = Arrays.stream(constants).map(Enum::toString).collect<MASK><NEW_LINE>final String errMsg = String.format("%s must be one of [%s]", parameterName, constantsList);<NEW_LINE>throw new WebApplicationException(getErrorResponse(errMsg));<NEW_LINE>}
(Collectors.joining(", "));
788,739
public com.squareup.okhttp.Call userCheckReferralCodeAsync(String referralCode, final ApiCallback<Double> callback) throws ApiException {<NEW_LINE>ProgressResponseBody.ProgressListener progressListener = null;<NEW_LINE>ProgressRequestBody.ProgressRequestListener progressRequestListener = null;<NEW_LINE>if (callback != null) {<NEW_LINE>progressListener = new ProgressResponseBody.ProgressListener() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void update(long bytesRead, long contentLength, boolean done) {<NEW_LINE>callback.onDownloadProgress(bytesRead, contentLength, done);<NEW_LINE>}<NEW_LINE>};<NEW_LINE>progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {<NEW_LINE>callback.<MASK><NEW_LINE>}<NEW_LINE>};<NEW_LINE>}<NEW_LINE>com.squareup.okhttp.Call call = userCheckReferralCodeValidateBeforeCall(referralCode, progressListener, progressRequestListener);<NEW_LINE>Type localVarReturnType = new TypeToken<Double>() {<NEW_LINE>}.getType();<NEW_LINE>apiClient.executeAsync(call, localVarReturnType, callback);<NEW_LINE>return call;<NEW_LINE>}
onUploadProgress(bytesWritten, contentLength, done);
399,507
/* (non-Javadoc)<NEW_LINE>* @see com.ibm.ejs.util.am.AlarmListener#alarm(java.lang.Object)<NEW_LINE>*<NEW_LINE>* If this timer alarms, then a Console message will be written to<NEW_LINE>* indicate that no response has been received.<NEW_LINE>*/<NEW_LINE>public void alarm(Object alarmContext) {<NEW_LINE>if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())<NEW_LINE>SibTr.entry(tc, "alarm", alarmContext);<NEW_LINE>synchronized (this) {<NEW_LINE>iAlarmCancelled = true;<NEW_LINE>// Did the request message fail<NEW_LINE>if (iRequestFailed) {<NEW_LINE>iRequestFailed = false;<NEW_LINE>// Get the reset subscription list.<NEW_LINE>SubscriptionMessage message = iBusGroup.generateResetSubscriptionMessage();<NEW_LINE>message.setSubscriptionMessageType(SubscriptionMessageType.REQUEST);<NEW_LINE>// If there is a reset message to send, then send it.<NEW_LINE>LocalTransaction transaction = iProxyHandler.getMessageProcessor().getTXManager().createLocalTransaction(true);<NEW_LINE>try {<NEW_LINE>// Send to the list of all neighbours.<NEW_LINE>sendToNeighbour(message, (Transaction) transaction);<NEW_LINE>transaction.commit();<NEW_LINE>} catch (SIException e) {<NEW_LINE>// No FFDC code needed<NEW_LINE>SibTr.exception(tc, e);<NEW_LINE>iRequestFailed = true;<NEW_LINE>}<NEW_LINE>// Kick off a new timer to wait for the proxy response.<NEW_LINE>setRequestedProxySubscriptions();<NEW_LINE>} else // Was the request actually sent<NEW_LINE>if (iRequestSent) {<NEW_LINE>String meName = JsAdminUtils.getMENameByUuidForMessage(iMEUuid.toString());<NEW_LINE>if (meName == null)<NEW_LINE>meName = iMEUuid.toString();<NEW_LINE>SibTr.push(iProxyHandler.getMessageProcessor().getMessagingEngine());<NEW_LINE>SibTr.warning(tc, "NO_NEIGHBOUR_REPLY_WARNING_CWSIP0381", <MASK><NEW_LINE>SibTr.pop();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())<NEW_LINE>SibTr.exit(tc, "alarm");<NEW_LINE>}
new Object[] { meName });
541,721
public boolean deleteRepository(String repositoryName) {<NEW_LINE>RepositoryModel repository = getRepositoryModel(repositoryName);<NEW_LINE>if (!canDelete(repository)) {<NEW_LINE>logger.warn("Attempt to delete {} rejected!", repositoryName);<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>close(repositoryName);<NEW_LINE>// clear the repository cache<NEW_LINE>clearRepositoryMetadataCache(repositoryName);<NEW_LINE>RepositoryModel model = removeFromCachedRepositoryList(repositoryName);<NEW_LINE>if (model != null && !ArrayUtils.isEmpty(model.forks)) {<NEW_LINE>resetRepositoryListCache();<NEW_LINE>}<NEW_LINE>File folder = new File(repositoriesFolder, repositoryName);<NEW_LINE>if (folder.exists() && folder.isDirectory()) {<NEW_LINE>FileUtils.delete(folder, FileUtils.RECURSIVE | FileUtils.RETRY);<NEW_LINE>if (userManager.deleteRepositoryRole(repositoryName)) {<NEW_LINE>logger.info(MessageFormat.format("Repository \"{0}\" deleted", repositoryName));<NEW_LINE>if (pluginManager != null) {<NEW_LINE>for (RepositoryLifeCycleListener listener : pluginManager.getExtensions(RepositoryLifeCycleListener.class)) {<NEW_LINE>try {<NEW_LINE>listener.onDeletion(repository);<NEW_LINE>} catch (Throwable t) {<NEW_LINE>logger.error(String.format("failed to call plugin onDeletion %s", repositoryName), t);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} catch (Throwable t) {<NEW_LINE>logger.error(MessageFormat.format<MASK><NEW_LINE>}<NEW_LINE>return false;<NEW_LINE>}
("Failed to delete repository {0}", repositoryName), t);
398,484
private Answer serializeIndependentConfigs(NetworkSnapshot snapshot) {<NEW_LINE>Answer answer = new Answer();<NEW_LINE>ConvertConfigurationAnswerElement answerElement = new ConvertConfigurationAnswerElement();<NEW_LINE>answerElement.<MASK><NEW_LINE>if (_settings.getVerboseParse()) {<NEW_LINE>answer.addAnswerElement(answerElement);<NEW_LINE>}<NEW_LINE>ConversionContext conversionContext;<NEW_LINE>try {<NEW_LINE>conversionContext = _storage.loadConversionContext(snapshot);<NEW_LINE>} catch (FileNotFoundException e) {<NEW_LINE>// Not written when it is empty.<NEW_LINE>conversionContext = new ConversionContext();<NEW_LINE>} catch (IOException e) {<NEW_LINE>throw new UncheckedIOException(e);<NEW_LINE>}<NEW_LINE>SnapshotRuntimeData runtimeData = firstNonNull(_storage.loadRuntimeData(snapshot.getNetwork(), snapshot.getSnapshot()), EMPTY_SNAPSHOT_RUNTIME_DATA);<NEW_LINE>Map<String, VendorConfiguration> vendorConfigs;<NEW_LINE>Map<String, Configuration> configurations;<NEW_LINE>LOGGER.info("Converting the Vendor-Specific configurations to Vendor-Independent configurations");<NEW_LINE>try {<NEW_LINE>vendorConfigs = _storage.loadVendorConfigurations(snapshot);<NEW_LINE>configurations = getConfigurations(vendorConfigs, conversionContext, runtimeData, answerElement);<NEW_LINE>} catch (IOException e) {<NEW_LINE>throw new UncheckedIOException(e);<NEW_LINE>}<NEW_LINE>Set<Layer1Edge> layer1Edges = vendorConfigs.values().stream().flatMap(vc -> vc.getLayer1Edges().stream()).collect(Collectors.toSet());<NEW_LINE>Warnings internetWarnings = answerElement.getWarnings().computeIfAbsent(INTERNET_HOST_NAME, i -> buildWarnings(_settings));<NEW_LINE>ModeledNodes modeledNodes = getInternetAndIspNodes(snapshot, configurations, vendorConfigs, internetWarnings);<NEW_LINE>mergeInternetAndIspNodes(modeledNodes, configurations, layer1Edges, internetWarnings);<NEW_LINE>LOGGER.info("Serializing Vendor-Independent configurations");<NEW_LINE>try {<NEW_LINE>// we don't write anything if no Layer1 edges were produced<NEW_LINE>_storage.// we don't write anything if no Layer1 edges were produced<NEW_LINE>storeConfigurations(// we don't write anything if no Layer1 edges were produced<NEW_LINE>configurations, // we don't write anything if no Layer1 edges were produced<NEW_LINE>answerElement, // empty topologies are currently dangerous for L1 computation<NEW_LINE>layer1Edges.isEmpty() ? null : new Layer1Topology(layer1Edges), snapshot.getNetwork(), snapshot.getSnapshot());<NEW_LINE>} catch (IOException e) {<NEW_LINE>throw new BatfishException("Could not store vendor independent configs to disk: %s", e);<NEW_LINE>}<NEW_LINE>LOGGER.info("Post-processing the Vendor-Independent devices");<NEW_LINE>postProcessSnapshot(snapshot, configurations);<NEW_LINE>LOGGER.info("Computing completion metadata");<NEW_LINE>computeAndStoreCompletionMetadata(snapshot, configurations);<NEW_LINE>return answer;<NEW_LINE>}
setVersion(BatfishVersion.getVersionStatic());