idx
int32
46
1.86M
input
stringlengths
321
6.6k
target
stringlengths
9
1.24k
1,244,231
final CreateConnectionResult executeCreateConnection(CreateConnectionRequest createConnectionRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(createConnectionRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<CreateConnectionRequest> request = null;<NEW_LINE>Response<CreateConnectionResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new CreateConnectionRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(createConnectionRequest));<NEW_LINE>// Binds the request metrics to the current request.<NEW_LINE>request.setAWSRequestMetrics(awsRequestMetrics);<NEW_LINE>request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);<NEW_LINE>request.addHandlerContext(<MASK><NEW_LINE>request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SERVICE_ID, "CloudWatch Events");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateConnection");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<CreateConnectionResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new CreateConnectionResultJsonUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
1,156,291
static void c_1() throws Exception {<NEW_LINE>AkSourceBatchOp dense_source = new AkSourceBatchOp().setFilePath(DATA_DIR + DENSE_TRAIN_FILE);<NEW_LINE>AkSourceBatchOp sparse_source = new AkSourceBatchOp().setFilePath(DATA_DIR + SPARSE_TRAIN_FILE);<NEW_LINE>Stopwatch sw = new Stopwatch();<NEW_LINE>ArrayList<Tuple2<String, Pipeline>> pipelineList = new ArrayList<>();<NEW_LINE>pipelineList.add(new Tuple2<>("KMeans EUCLIDEAN", new Pipeline().add(new KMeans().setK(10).setVectorCol(VECTOR_COL_NAME).setPredictionCol(PREDICTION_COL_NAME))));<NEW_LINE>pipelineList.add(new Tuple2<>("KMeans COSINE", new Pipeline().add(new KMeans().setDistanceType(DistanceType.COSINE).setK(10).setVectorCol(VECTOR_COL_NAME).setPredictionCol(PREDICTION_COL_NAME))));<NEW_LINE>pipelineList.add(new Tuple2<>("BisectingKMeans", new Pipeline().add(new BisectingKMeans().setK(10).setVectorCol(VECTOR_COL_NAME).setPredictionCol(PREDICTION_COL_NAME))));<NEW_LINE>for (Tuple2<String, Pipeline> pipelineTuple2 : pipelineList) {<NEW_LINE>sw.reset();<NEW_LINE>sw.start();<NEW_LINE>pipelineTuple2.f1.fit(dense_source).transform(dense_source).link(new EvalClusterBatchOp().setVectorCol(VECTOR_COL_NAME).setPredictionCol(PREDICTION_COL_NAME).setLabelCol(LABEL_COL_NAME).lazyPrintMetrics(pipelineTuple2.f0 + " DENSE"));<NEW_LINE>BatchOperator.execute();<NEW_LINE>sw.stop();<NEW_LINE>System.out.println(sw.getElapsedTimeSpan());<NEW_LINE>sw.reset();<NEW_LINE>sw.start();<NEW_LINE>pipelineTuple2.f1.fit(sparse_source).transform(sparse_source).link(new EvalClusterBatchOp().setVectorCol(VECTOR_COL_NAME).setPredictionCol(PREDICTION_COL_NAME).setLabelCol(LABEL_COL_NAME).lazyPrintMetrics(pipelineTuple2.f0 + " SPARSE"));<NEW_LINE>BatchOperator.execute();<NEW_LINE>sw.stop();<NEW_LINE>System.out.<MASK><NEW_LINE>}<NEW_LINE>}
println(sw.getElapsedTimeSpan());
681,292
private void addCreateNewImageProposal(final JavaContentAssistInvocationContext javaContext, ArrayList<ICompletionProposal> proposals, String prefix, int offset, int length) {<NEW_LINE>final IContainer parent = UmletPluginUtils.getCompilationUnitParent(javaContext.getCompilationUnit());<NEW_LINE>if (parent == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>// no empty files<NEW_LINE>if (prefix.length() == 0) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>final IFile uxfFile = parent.getFile(new Path("doc-files/" + prefix + ".uxf"));<NEW_LINE>if (uxfFile.exists()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>proposals.add(new ReplacementProposal("Create and link new Umlet diagram doc-files/" + prefix + ".uxf", "<img src=\"doc-files/" + prefix + ".png\" alt=\"\">", offset, length) {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void apply(IDocument document) {<NEW_LINE>super.apply(document);<NEW_LINE>try {<NEW_LINE>// create doc-files folder<NEW_LINE>IFolder docFiles = parent.getFolder(new Path("doc-files"));<NEW_LINE>if (!docFiles.exists()) {<NEW_LINE>docFiles.<MASK><NEW_LINE>}<NEW_LINE>// create image file<NEW_LINE>{<NEW_LINE>InputStream stream = null;<NEW_LINE>try {<NEW_LINE>stream = NewWizard.openContentStream();<NEW_LINE>uxfFile.create(stream, true, null);<NEW_LINE>stream.close();<NEW_LINE>} catch (IOException e) {<NEW_LINE>// ignore<NEW_LINE>} finally {<NEW_LINE>if (stream != null) {<NEW_LINE>try {<NEW_LINE>stream.close();<NEW_LINE>} catch (IOException e) {<NEW_LINE>// swallow<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// open editor<NEW_LINE>IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();<NEW_LINE>IDE.openEditor(page, uxfFile, true);<NEW_LINE>} catch (CoreException e) {<NEW_LINE>throw new RuntimeException(e);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}.setAutoInsertable(false));<NEW_LINE>}
create(true, true, null);
563,743
private void visitNewWithSpread(Node spreadParent) {<NEW_LINE>checkArgument(spreadParent.isNew());<NEW_LINE>// Must remove callee before extracting argument groups.<NEW_LINE>Node callee = spreadParent.removeFirstChild();<NEW_LINE>List<Node> groups = extractSpreadGroups(spreadParent);<NEW_LINE>// We need to generate<NEW_LINE>// `new (Function.prototype.bind.apply(callee, [null].concat(other, args))();`.<NEW_LINE>// `null` stands in for the 'this' arg to the contructor.<NEW_LINE>final Node baseArrayLit;<NEW_LINE>if (groups.get(0).isArrayLit()) {<NEW_LINE>baseArrayLit = groups.remove(0);<NEW_LINE>} else {<NEW_LINE>baseArrayLit = astFactory.createArraylit();<NEW_LINE>}<NEW_LINE>baseArrayLit.addChildToFront(astFactory.createNull());<NEW_LINE>Node joinedGroups = groups.isEmpty() ? baseArrayLit : astFactory.createCall(astFactory.createGetProp(baseArrayLit, "concat", concatFnType), arrayType, groups.toArray(new Node[0]));<NEW_LINE>if (FeatureSet.ES3.contains(compiler.getOptions().getOutputFeatureSet())) {<NEW_LINE>// TODO(tbreisacher): Support this in ES3 too by not relying on Function.bind.<NEW_LINE>Es6ToEs3Util.<MASK><NEW_LINE>}<NEW_LINE>// Function.prototype.bind =><NEW_LINE>// function(this:function(new:[spreadParent], ...?), ...?):function(new:[spreadParent])<NEW_LINE>// Function.prototype.bind.apply =><NEW_LINE>// function(function(new:[spreadParent], ...?), !Array<?>):function(new:[spreadParent])<NEW_LINE>Node bindApply = astFactory.createGetPropWithUnknownType(astFactory.createGetPropWithUnknownType(astFactory.createPrototypeAccess(astFactory.createName(this.namespace, "Function")), "bind"), "apply");<NEW_LINE>Node result = IR.newNode(astFactory.createCallWithUnknownType(bindApply, callee, joinedGroups)).setColor(spreadParent.getColor());<NEW_LINE>result.srcrefTreeIfMissing(spreadParent);<NEW_LINE>spreadParent.replaceWith(result);<NEW_LINE>compiler.reportChangeToEnclosingScope(result);<NEW_LINE>}
cannotConvert(compiler, spreadParent, "\"...\" passed to a constructor (consider using --language_out=ES5)");
277,941
public Collection<NicIpConfiguration> listNetworkInterfaceIPConfigurations() {<NEW_LINE>Collection<NicIpConfiguration> ipConfigs = new ArrayList<>();<NEW_LINE>Map<String, NetworkInterface> nics = new TreeMap<>();<NEW_LINE>List<IpConfigurationInner> ipConfigRefs = this.innerModel().ipConfigurations();<NEW_LINE>if (ipConfigRefs == null) {<NEW_LINE>return ipConfigs;<NEW_LINE>}<NEW_LINE>for (IpConfigurationInner ipConfigRef : ipConfigRefs) {<NEW_LINE>String nicID = ResourceUtils.parentResourceIdFromResourceId(ipConfigRef.id());<NEW_LINE>String ipConfigName = ResourceUtils.<MASK><NEW_LINE>// Check if NIC already cached<NEW_LINE>NetworkInterface nic = nics.get(nicID.toLowerCase(Locale.ROOT));<NEW_LINE>if (nic == null) {<NEW_LINE>// NIC not previously found, so ask Azure for it<NEW_LINE>nic = this.parent().manager().networkInterfaces().getById(nicID);<NEW_LINE>}<NEW_LINE>if (nic == null) {<NEW_LINE>// NIC doesn't exist so ignore this bad reference<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>// Cache the NIC<NEW_LINE>nics.put(nic.id().toLowerCase(Locale.ROOT), nic);<NEW_LINE>// Get the IP config<NEW_LINE>NicIpConfiguration ipConfig = nic.ipConfigurations().get(ipConfigName);<NEW_LINE>if (ipConfig == null) {<NEW_LINE>// IP config not found, so ignore this bad reference<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>ipConfigs.add(ipConfig);<NEW_LINE>}<NEW_LINE>return Collections.unmodifiableCollection(ipConfigs);<NEW_LINE>}
nameFromResourceId(ipConfigRef.id());
826,348
private void initComponents() {<NEW_LINE>// GEN-BEGIN:initComponents<NEW_LINE>mainPanel = new javax.swing.JPanel();<NEW_LINE>OrderPlanning = new javax.swing.JTabbedPane();<NEW_LINE>PanelOrder = new javax.swing.JPanel();<NEW_LINE>PanelFind = new javax.swing.JPanel();<NEW_LINE>PanelCenter = new javax.swing.JPanel();<NEW_LINE>PanelBottom = new javax.swing.JPanel();<NEW_LINE>Results = new javax.swing.JPanel();<NEW_LINE>panel.setLayout(new java.awt.BorderLayout());<NEW_LINE>mainPanel.setLayout(new java.awt.BorderLayout());<NEW_LINE>PanelOrder.setLayout(new java.awt.BorderLayout());<NEW_LINE>PanelOrder.add(PanelFind, java.awt.BorderLayout.NORTH);<NEW_LINE>PanelOrder.add(PanelCenter, <MASK><NEW_LINE>PanelOrder.add(PanelBottom, java.awt.BorderLayout.SOUTH);<NEW_LINE>OrderPlanning.addTab("Order", PanelOrder);<NEW_LINE>OrderPlanning.addTab("Results", Results);<NEW_LINE>mainPanel.add(OrderPlanning, java.awt.BorderLayout.CENTER);<NEW_LINE>panel.add(mainPanel, java.awt.BorderLayout.CENTER);<NEW_LINE>}
java.awt.BorderLayout.CENTER);
724,005
public RestMethodResult doPost(final Map<String, Object> propertySet) throws FrameworkException {<NEW_LINE>// virtual type?<NEW_LINE>if (virtualType != null) {<NEW_LINE>virtualType.transformInput(securityContext, entityClass, propertySet);<NEW_LINE>}<NEW_LINE>if (isNode) {<NEW_LINE>final RestMethodResult result = new RestMethodResult(HttpServletResponse.SC_CREATED);<NEW_LINE>final NodeInterface newNode = createNode(propertySet);<NEW_LINE>if (newNode != null) {<NEW_LINE>result.addHeader<MASK><NEW_LINE>result.addContent(newNode.getUuid());<NEW_LINE>}<NEW_LINE>// finally: return 201 Created<NEW_LINE>return result;<NEW_LINE>} else {<NEW_LINE>final App app = StructrApp.getInstance(securityContext);<NEW_LINE>final Relation template = getRelationshipTemplate();<NEW_LINE>final ErrorBuffer errorBuffer = new ErrorBuffer();<NEW_LINE>if (template != null) {<NEW_LINE>final NodeInterface sourceNode = identifyStartNode(template, propertySet);<NEW_LINE>final NodeInterface targetNode = identifyEndNode(template, propertySet);<NEW_LINE>final PropertyMap properties = PropertyMap.inputTypeToJavaType(securityContext, entityClass, propertySet);<NEW_LINE>RelationshipInterface newRelationship = null;<NEW_LINE>if (sourceNode == null) {<NEW_LINE>errorBuffer.add(new EmptyPropertyToken(entityClass.getSimpleName(), template.getSourceIdProperty()));<NEW_LINE>}<NEW_LINE>if (targetNode == null) {<NEW_LINE>errorBuffer.add(new EmptyPropertyToken(entityClass.getSimpleName(), template.getTargetIdProperty()));<NEW_LINE>}<NEW_LINE>if (errorBuffer.hasError()) {<NEW_LINE>throw new FrameworkException(422, "Source node ID and target node ID of relationship must be set", errorBuffer);<NEW_LINE>}<NEW_LINE>template.ensureCardinality(securityContext, sourceNode, targetNode);<NEW_LINE>newRelationship = app.create(sourceNode, targetNode, entityClass, properties);<NEW_LINE>RestMethodResult result = new RestMethodResult(HttpServletResponse.SC_CREATED);<NEW_LINE>if (newRelationship != null) {<NEW_LINE>result.addHeader("Location", buildLocationHeader(newRelationship));<NEW_LINE>result.addContent(newRelationship.getUuid());<NEW_LINE>}<NEW_LINE>// finally: return 201 Created<NEW_LINE>return result;<NEW_LINE>}<NEW_LINE>// shouldn't happen<NEW_LINE>throw new NotFoundException("Type" + rawType + " does not exist");<NEW_LINE>}<NEW_LINE>}
("Location", buildLocationHeader(newNode));
1,179,572
final RetryDataReplicationResult executeRetryDataReplication(RetryDataReplicationRequest retryDataReplicationRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(retryDataReplicationRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<RetryDataReplicationRequest> request = null;<NEW_LINE>Response<RetryDataReplicationResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new RetryDataReplicationRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(retryDataReplicationRequest));<NEW_LINE>// Binds the request metrics to the current request.<NEW_LINE>request.setAWSRequestMetrics(awsRequestMetrics);<NEW_LINE>request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);<NEW_LINE>request.addHandlerContext(<MASK><NEW_LINE>request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SERVICE_ID, "drs");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "RetryDataReplication");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<RetryDataReplicationResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new RetryDataReplicationResultJsonUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
514,499
public BitbucketClient createClient(ProjectAlmSettingDto projectAlmSettingDto, AlmSettingDto almSettingDto) {<NEW_LINE>String almRepo = Optional.ofNullable(StringUtils.trimToNull(projectAlmSettingDto.getAlmRepo())).orElseThrow(() -> new InvalidConfigurationException(InvalidConfigurationException.Scope.PROJECT, "ALM Repo must be set in configuration"));<NEW_LINE>if (almSettingDto.getAlm() == ALM.BITBUCKET_CLOUD) {<NEW_LINE>String appId = Optional.ofNullable(StringUtils.trimToNull(almSettingDto.getAppId())).orElseThrow(() -> new InvalidConfigurationException(InvalidConfigurationException.Scope.GLOBAL, "App ID must be set in configuration"));<NEW_LINE>String clientId = Optional.ofNullable(StringUtils.trimToNull(almSettingDto.getClientId())).orElseThrow(() -> new InvalidConfigurationException(InvalidConfigurationException.Scope.GLOBAL, "Client ID must be set in configuration"));<NEW_LINE>String clientSecret = Optional.ofNullable(StringUtils.trimToNull(almSettingDto.getDecryptedClientSecret(settings.getEncryption()))).orElseThrow(() -> new InvalidConfigurationException(InvalidConfigurationException.Scope.GLOBAL, "Client Secret must be set in configuration"));<NEW_LINE>return new BitbucketCloudClient(new BitbucketCloudConfiguration(appId, almRepo, clientId, clientSecret), createObjectMapper(), createBaseClientBuilder(okHttpClientBuilderSupplier));<NEW_LINE>} else {<NEW_LINE>String almSlug = Optional.ofNullable(StringUtils.trimToNull(projectAlmSettingDto.getAlmSlug())).orElseThrow(() -> new InvalidConfigurationException(InvalidConfigurationException.Scope.PROJECT, "ALM slug must be set in configuration"));<NEW_LINE>String url = Optional.ofNullable(StringUtils.trimToNull(almSettingDto.getUrl())).orElseThrow(() -> new InvalidConfigurationException(InvalidConfigurationException<MASK><NEW_LINE>String personalAccessToken = Optional.ofNullable(StringUtils.trimToNull(almSettingDto.getDecryptedPersonalAccessToken(settings.getEncryption()))).orElseThrow(() -> new InvalidConfigurationException(InvalidConfigurationException.Scope.PROJECT, "Personal access token must be set in configuration"));<NEW_LINE>return new BitbucketServerClient(new BitbucketServerConfiguration(almRepo, almSlug, url, personalAccessToken), createObjectMapper(), createBaseClientBuilder(okHttpClientBuilderSupplier));<NEW_LINE>}<NEW_LINE>}
.Scope.GLOBAL, "URL must be set in configuration"));
1,779,435
boolean askReloadFromDisk(VirtualFile file, Document document) {<NEW_LINE>if (myConflictAppeared != null) {<NEW_LINE>Throwable trace = myConflictAppeared;<NEW_LINE>myConflictAppeared = null;<NEW_LINE>throw new IllegalStateException("Unexpected memory-disk conflict in tests for " + file.getPath() + ", please use FileDocumentManager#reloadFromDisk or avoid VFS refresh", trace);<NEW_LINE>}<NEW_LINE>String message = UIBundle.message("file.cache.conflict.message.text", file.getPresentableUrl());<NEW_LINE>DialogBuilder builder = new DialogBuilder();<NEW_LINE>builder.setCenterPanel(new JBLabel(message, Messages.getQuestionIcon(), SwingConstants.CENTER));<NEW_LINE>builder.addOkAction().setText(UIBundle.message("file.cache.conflict.load.fs.changes.button"));<NEW_LINE>builder.addCancelAction().setText(UIBundle.message("file.cache.conflict.keep.memory.changes.button"));<NEW_LINE>builder.addAction(new AbstractAction(UIBundle.message("file.cache.conflict.show.difference.button")) {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void actionPerformed(ActionEvent e) {<NEW_LINE>Project project = ProjectLocator.getInstance().guessProjectForFile(file);<NEW_LINE>String fsContent = LoadTextUtil.loadText(file).toString();<NEW_LINE>DocumentContent content1 = DiffContentFactory.getInstance().create(project, fsContent, file.getFileType());<NEW_LINE>DocumentContent content2 = DiffContentFactory.getInstance().create(project, document, file);<NEW_LINE>String title = UIBundle.message("file.cache.conflict.for.file.dialog.title", file.getPresentableUrl());<NEW_LINE>String title1 = UIBundle.message("file.cache.conflict.diff.content.file.system.content");<NEW_LINE>String title2 = UIBundle.message("file.cache.conflict.diff.content.memory.content");<NEW_LINE>DiffRequest request = new SimpleDiffRequest(title, content1, content2, title1, title2);<NEW_LINE>request.<MASK><NEW_LINE>DialogBuilder diffBuilder = new DialogBuilder(project);<NEW_LINE>DiffRequestPanel diffPanel = DiffManager.getInstance().createRequestPanel(project, diffBuilder, diffBuilder.getWindow());<NEW_LINE>diffPanel.setRequest(request);<NEW_LINE>diffBuilder.setCenterPanel(diffPanel.getComponent());<NEW_LINE>diffBuilder.setDimensionServiceKey("FileDocumentManager.FileCacheConflict");<NEW_LINE>diffBuilder.addOkAction().setText(UIBundle.message("file.cache.conflict.save.changes.button"));<NEW_LINE>diffBuilder.addCancelAction();<NEW_LINE>diffBuilder.setTitle(title);<NEW_LINE>if (diffBuilder.show() == DialogWrapper.OK_EXIT_CODE) {<NEW_LINE>builder.getDialogWrapper().close(DialogWrapper.CANCEL_EXIT_CODE);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>});<NEW_LINE>builder.setTitle(UIBundle.message("file.cache.conflict.dialog.title"));<NEW_LINE>builder.setButtonsAlignment(SwingConstants.CENTER);<NEW_LINE>builder.setHelpId("reference.dialogs.fileCacheConflict");<NEW_LINE>return builder.show() == 0;<NEW_LINE>}
putUserData(DiffUserDataKeys.GO_TO_SOURCE_DISABLE, true);
1,618,088
public void startPausing(int timeOut, Set<String> ds, String dsStr, int queueLimit) throws MySQLOutPutException {<NEW_LINE>pauseLock.lock();<NEW_LINE>try {<NEW_LINE>if (isPausing.get()) {<NEW_LINE>// the error message can only show in single mod<NEW_LINE>if ((!Objects.equals(dsStr, currentParseInfo.getShardingNodes())) || (!Objects.equals(timeOut, currentParseInfo.getConnectionTimeOut()) || (!Objects.equals(queueLimit, currentParseInfo.getQueueLimit())))) {<NEW_LINE>throw new MySQLOutPutException(ErrorCode.ER_UNKNOWN_ERROR, "", "You can't run different PAUSE commands at the same time. Please resume previous PAUSE command first.");<NEW_LINE>} else {<NEW_LINE>throw new MySQLOutPutException(<MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE>currentParseInfo = new PauseInfo(SystemConfig.getInstance().getInstanceName(), dsStr, PAUSE, timeOut, queueLimit);<NEW_LINE>pauseThreadPool = new PauseEndThreadPool(timeOut, queueLimit);<NEW_LINE>lockWithShardingNodes(ds);<NEW_LINE>isPausing.set(true);<NEW_LINE>} finally {<NEW_LINE>pauseLock.unlock();<NEW_LINE>}<NEW_LINE>}
ErrorCode.ER_UNKNOWN_ERROR, "", "You are paused already");
175,014
public void marshall(CreateIntentRequest createIntentRequest, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (createIntentRequest == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(createIntentRequest.getIntentName(), INTENTNAME_BINDING);<NEW_LINE>protocolMarshaller.marshall(createIntentRequest.getDescription(), DESCRIPTION_BINDING);<NEW_LINE>protocolMarshaller.marshall(createIntentRequest.getParentIntentSignature(), PARENTINTENTSIGNATURE_BINDING);<NEW_LINE>protocolMarshaller.marshall(createIntentRequest.getSampleUtterances(), SAMPLEUTTERANCES_BINDING);<NEW_LINE>protocolMarshaller.marshall(createIntentRequest.getDialogCodeHook(), DIALOGCODEHOOK_BINDING);<NEW_LINE>protocolMarshaller.marshall(createIntentRequest.getFulfillmentCodeHook(), FULFILLMENTCODEHOOK_BINDING);<NEW_LINE>protocolMarshaller.marshall(<MASK><NEW_LINE>protocolMarshaller.marshall(createIntentRequest.getIntentClosingSetting(), INTENTCLOSINGSETTING_BINDING);<NEW_LINE>protocolMarshaller.marshall(createIntentRequest.getInputContexts(), INPUTCONTEXTS_BINDING);<NEW_LINE>protocolMarshaller.marshall(createIntentRequest.getOutputContexts(), OUTPUTCONTEXTS_BINDING);<NEW_LINE>protocolMarshaller.marshall(createIntentRequest.getKendraConfiguration(), KENDRACONFIGURATION_BINDING);<NEW_LINE>protocolMarshaller.marshall(createIntentRequest.getBotId(), BOTID_BINDING);<NEW_LINE>protocolMarshaller.marshall(createIntentRequest.getBotVersion(), BOTVERSION_BINDING);<NEW_LINE>protocolMarshaller.marshall(createIntentRequest.getLocaleId(), LOCALEID_BINDING);<NEW_LINE>} catch (Exception e) {<NEW_LINE>throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e);<NEW_LINE>}<NEW_LINE>}
createIntentRequest.getIntentConfirmationSetting(), INTENTCONFIRMATIONSETTING_BINDING);
1,253,110
public static GetDataCorrectOrderDetailResponse unmarshall(GetDataCorrectOrderDetailResponse getDataCorrectOrderDetailResponse, UnmarshallerContext _ctx) {<NEW_LINE>getDataCorrectOrderDetailResponse.setRequestId(_ctx.stringValue("GetDataCorrectOrderDetailResponse.RequestId"));<NEW_LINE>getDataCorrectOrderDetailResponse.setErrorCode(_ctx.stringValue("GetDataCorrectOrderDetailResponse.ErrorCode"));<NEW_LINE>getDataCorrectOrderDetailResponse.setErrorMessage(_ctx.stringValue("GetDataCorrectOrderDetailResponse.ErrorMessage"));<NEW_LINE>getDataCorrectOrderDetailResponse.setSuccess(_ctx.booleanValue("GetDataCorrectOrderDetailResponse.Success"));<NEW_LINE>DataCorrectOrderDetail dataCorrectOrderDetail = new DataCorrectOrderDetail();<NEW_LINE>dataCorrectOrderDetail.setStatus(_ctx.stringValue("GetDataCorrectOrderDetailResponse.DataCorrectOrderDetail.Status"));<NEW_LINE>OrderDetail orderDetail = new OrderDetail();<NEW_LINE>orderDetail.setRbSQL(_ctx.stringValue("GetDataCorrectOrderDetailResponse.DataCorrectOrderDetail.OrderDetail.RbSQL"));<NEW_LINE>orderDetail.setRbAttachmentName(_ctx.stringValue("GetDataCorrectOrderDetailResponse.DataCorrectOrderDetail.OrderDetail.RbAttachmentName"));<NEW_LINE>orderDetail.setClassify(_ctx.stringValue("GetDataCorrectOrderDetailResponse.DataCorrectOrderDetail.OrderDetail.Classify"));<NEW_LINE>orderDetail.setExeSQL(_ctx.stringValue("GetDataCorrectOrderDetailResponse.DataCorrectOrderDetail.OrderDetail.ExeSQL"));<NEW_LINE>orderDetail.setEstimateAffectRows(_ctx.longValue("GetDataCorrectOrderDetailResponse.DataCorrectOrderDetail.OrderDetail.EstimateAffectRows"));<NEW_LINE>orderDetail.setRbSQLType(_ctx.stringValue("GetDataCorrectOrderDetailResponse.DataCorrectOrderDetail.OrderDetail.RbSQLType"));<NEW_LINE>orderDetail.setActualAffectRows(_ctx.longValue("GetDataCorrectOrderDetailResponse.DataCorrectOrderDetail.OrderDetail.ActualAffectRows"));<NEW_LINE>orderDetail.setIgnoreAffectRows(_ctx.booleanValue("GetDataCorrectOrderDetailResponse.DataCorrectOrderDetail.OrderDetail.IgnoreAffectRows"));<NEW_LINE>orderDetail.setAttachmentName(_ctx.stringValue("GetDataCorrectOrderDetailResponse.DataCorrectOrderDetail.OrderDetail.AttachmentName"));<NEW_LINE>orderDetail.setSqlType(_ctx.stringValue("GetDataCorrectOrderDetailResponse.DataCorrectOrderDetail.OrderDetail.SqlType"));<NEW_LINE>orderDetail.setIgnoreAffectRowsReason(_ctx.stringValue("GetDataCorrectOrderDetailResponse.DataCorrectOrderDetail.OrderDetail.IgnoreAffectRowsReason"));<NEW_LINE>dataCorrectOrderDetail.setOrderDetail(orderDetail);<NEW_LINE>List<TaskCheckDO> preCheckDetail = new ArrayList<TaskCheckDO>();<NEW_LINE>for (int i = 0; i < _ctx.lengthValue("GetDataCorrectOrderDetailResponse.DataCorrectOrderDetail.PreCheckDetail.Length"); i++) {<NEW_LINE>TaskCheckDO taskCheckDO = new TaskCheckDO();<NEW_LINE>taskCheckDO.setUserTip(_ctx.stringValue("GetDataCorrectOrderDetailResponse.DataCorrectOrderDetail.PreCheckDetail[" + i + "].UserTip"));<NEW_LINE>taskCheckDO.setCheckStatus(_ctx.stringValue("GetDataCorrectOrderDetailResponse.DataCorrectOrderDetail.PreCheckDetail[" + i + "].CheckStatus"));<NEW_LINE>taskCheckDO.setCheckStep(_ctx.stringValue<MASK><NEW_LINE>preCheckDetail.add(taskCheckDO);<NEW_LINE>}<NEW_LINE>dataCorrectOrderDetail.setPreCheckDetail(preCheckDetail);<NEW_LINE>List<Database> databaseList = new ArrayList<Database>();<NEW_LINE>for (int i = 0; i < _ctx.lengthValue("GetDataCorrectOrderDetailResponse.DataCorrectOrderDetail.DatabaseList.Length"); i++) {<NEW_LINE>Database database = new Database();<NEW_LINE>database.setDbId(_ctx.integerValue("GetDataCorrectOrderDetailResponse.DataCorrectOrderDetail.DatabaseList[" + i + "].DbId"));<NEW_LINE>database.setDbType(_ctx.stringValue("GetDataCorrectOrderDetailResponse.DataCorrectOrderDetail.DatabaseList[" + i + "].DbType"));<NEW_LINE>database.setLogic(_ctx.booleanValue("GetDataCorrectOrderDetailResponse.DataCorrectOrderDetail.DatabaseList[" + i + "].Logic"));<NEW_LINE>database.setSearchName(_ctx.stringValue("GetDataCorrectOrderDetailResponse.DataCorrectOrderDetail.DatabaseList[" + i + "].SearchName"));<NEW_LINE>database.setEnvType(_ctx.stringValue("GetDataCorrectOrderDetailResponse.DataCorrectOrderDetail.DatabaseList[" + i + "].EnvType"));<NEW_LINE>databaseList.add(database);<NEW_LINE>}<NEW_LINE>dataCorrectOrderDetail.setDatabaseList(databaseList);<NEW_LINE>getDataCorrectOrderDetailResponse.setDataCorrectOrderDetail(dataCorrectOrderDetail);<NEW_LINE>return getDataCorrectOrderDetailResponse;<NEW_LINE>}
("GetDataCorrectOrderDetailResponse.DataCorrectOrderDetail.PreCheckDetail[" + i + "].CheckStep"));
745,820
public Pair<Long, Object> peekNextNotNullValue(long nextStartTime, long nextEndTime) throws IOException {<NEW_LINE>try {<NEW_LINE>if (preCachedData != null && preCachedData.hasCurrent()) {<NEW_LINE>// save context<NEW_LINE><MASK><NEW_LINE>int readCurListIndex = preCachedData.getReadCurListIndex();<NEW_LINE>List<AggregateResult> aggregateResults = calcResult(nextStartTime, nextEndTime);<NEW_LINE>if (aggregateResults == null || aggregateResults.get(0).getResult() == null) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>// restore context<NEW_LINE>lastReadCurListIndex = readCurListIndex;<NEW_LINE>lastReadCurArrayIndex = readCurArrayIndex;<NEW_LINE>preCachedData.resetBatchData(readCurArrayIndex, readCurListIndex);<NEW_LINE>return new Pair<>(nextStartTime, aggregateResults.get(0).getResult());<NEW_LINE>} else {<NEW_LINE>// save context<NEW_LINE>int readCurArrayIndex = lastReadCurArrayIndex;<NEW_LINE>int readCurListIndex = lastReadCurListIndex;<NEW_LINE>List<AggregateResult> aggregateResults = calcResult(nextStartTime, nextEndTime);<NEW_LINE>if (aggregateResults == null || aggregateResults.get(0).getResult() == null) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>// restore context<NEW_LINE>lastReadCurListIndex = readCurListIndex;<NEW_LINE>lastReadCurArrayIndex = readCurArrayIndex;<NEW_LINE>if (preCachedData != null) {<NEW_LINE>preCachedData.resetBatchData();<NEW_LINE>}<NEW_LINE>return new Pair<>(nextStartTime, aggregateResults.get(0).getResult());<NEW_LINE>}<NEW_LINE>} catch (QueryProcessException e) {<NEW_LINE>throw new IOException(e.getMessage(), e);<NEW_LINE>}<NEW_LINE>}
int readCurArrayIndex = preCachedData.getReadCurArrayIndex();
74,337
public static DescribePriceResponse unmarshall(DescribePriceResponse describePriceResponse, UnmarshallerContext _ctx) {<NEW_LINE>describePriceResponse.setRequestId(_ctx.stringValue("DescribePriceResponse.RequestId"));<NEW_LINE>describePriceResponse.setOrderParams(_ctx.stringValue("DescribePriceResponse.OrderParams"));<NEW_LINE>Order order = new Order();<NEW_LINE>order.setOriginalAmount(_ctx.stringValue("DescribePriceResponse.Order.OriginalAmount"));<NEW_LINE>order.setHandlingFeeAmount(_ctx.stringValue("DescribePriceResponse.Order.HandlingFeeAmount"));<NEW_LINE>order.setCurrency(_ctx.stringValue("DescribePriceResponse.Order.Currency"));<NEW_LINE>order.setDiscountAmount(_ctx.stringValue("DescribePriceResponse.Order.DiscountAmount"));<NEW_LINE>order.setTradeAmount(_ctx.stringValue("DescribePriceResponse.Order.TradeAmount"));<NEW_LINE>List<String> ruleIds1 = new ArrayList<String>();<NEW_LINE>for (int i = 0; i < _ctx.lengthValue("DescribePriceResponse.Order.RuleIds.Length"); i++) {<NEW_LINE>ruleIds1.add(_ctx.stringValue("DescribePriceResponse.Order.RuleIds[" + i + "]"));<NEW_LINE>}<NEW_LINE>order.setRuleIds1(ruleIds1);<NEW_LINE>List<Coupon> coupons = new ArrayList<Coupon>();<NEW_LINE>for (int i = 0; i < _ctx.lengthValue("DescribePriceResponse.Order.Coupons.Length"); i++) {<NEW_LINE>Coupon coupon = new Coupon();<NEW_LINE>coupon.setIsSelected(_ctx.stringValue("DescribePriceResponse.Order.Coupons[" + i + "].IsSelected"));<NEW_LINE>coupon.setCouponNo(_ctx.stringValue("DescribePriceResponse.Order.Coupons[" + i + "].CouponNo"));<NEW_LINE>coupon.setName(_ctx.stringValue("DescribePriceResponse.Order.Coupons[" + i + "].Name"));<NEW_LINE>coupon.setDescription(_ctx.stringValue("DescribePriceResponse.Order.Coupons[" + i + "].Description"));<NEW_LINE>coupons.add(coupon);<NEW_LINE>}<NEW_LINE>order.setCoupons(coupons);<NEW_LINE>describePriceResponse.setOrder(order);<NEW_LINE>List<Rule> rules = new ArrayList<Rule>();<NEW_LINE>for (int i = 0; i < _ctx.lengthValue("DescribePriceResponse.Rules.Length"); i++) {<NEW_LINE>Rule rule = new Rule();<NEW_LINE>rule.setRuleDescId(_ctx.longValue("DescribePriceResponse.Rules[" + i + "].RuleDescId"));<NEW_LINE>rule.setTitle(_ctx.stringValue("DescribePriceResponse.Rules[" + i + "].Title"));<NEW_LINE>rule.setName(_ctx.stringValue("DescribePriceResponse.Rules[" + i + "].Name"));<NEW_LINE>rules.add(rule);<NEW_LINE>}<NEW_LINE>describePriceResponse.setRules(rules);<NEW_LINE>List<SubOrder> subOrders = new ArrayList<SubOrder>();<NEW_LINE>for (int i = 0; i < _ctx.lengthValue("DescribePriceResponse.SubOrders.Length"); i++) {<NEW_LINE>SubOrder subOrder = new SubOrder();<NEW_LINE>subOrder.setOriginalAmount(_ctx.stringValue("DescribePriceResponse.SubOrders[" + i + "].OriginalAmount"));<NEW_LINE>subOrder.setInstanceId(_ctx.stringValue("DescribePriceResponse.SubOrders[" + i + "].InstanceId"));<NEW_LINE>subOrder.setDiscountAmount(_ctx.stringValue<MASK><NEW_LINE>subOrder.setTradeAmount(_ctx.stringValue("DescribePriceResponse.SubOrders[" + i + "].TradeAmount"));<NEW_LINE>List<String> ruleIds = new ArrayList<String>();<NEW_LINE>for (int j = 0; j < _ctx.lengthValue("DescribePriceResponse.SubOrders[" + i + "].RuleIds.Length"); j++) {<NEW_LINE>ruleIds.add(_ctx.stringValue("DescribePriceResponse.SubOrders[" + i + "].RuleIds[" + j + "]"));<NEW_LINE>}<NEW_LINE>subOrder.setRuleIds(ruleIds);<NEW_LINE>subOrders.add(subOrder);<NEW_LINE>}<NEW_LINE>describePriceResponse.setSubOrders(subOrders);<NEW_LINE>return describePriceResponse;<NEW_LINE>}
("DescribePriceResponse.SubOrders[" + i + "].DiscountAmount"));
1,567,230
public void onClick(DialogInterface arg0, int arg1) {<NEW_LINE>account.archiveAccount();<NEW_LINE>if (account instanceof EthAccount) {<NEW_LINE>for (WalletAccount walletAccount : getLinkedERC20Accounts(account)) {<NEW_LINE>walletAccount.archiveAccount();<NEW_LINE>}<NEW_LINE>} else if (!(account instanceof ERC20Account)) {<NEW_LINE>WalletAccount linkedAccount = Utils.getLinkedAccount(account, walletManager.getAccounts());<NEW_LINE>if (linkedAccount != null) {<NEW_LINE>linkedAccount.archiveAccount();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>_mbwManager.setSelectedAccount(_mbwManager.getWalletManager(false).getActiveSpendingAccounts().get(0).getId());<NEW_LINE>eventBus.post(new AccountChanged(account.getId()));<NEW_LINE>if (!linkedAccounts.isEmpty()) {<NEW_LINE>for (WalletAccount linkedAccount : linkedAccounts) {<NEW_LINE>eventBus.post(new AccountChanged(linkedAccount.getId()));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>updateIncludingMenus();<NEW_LINE>_toaster.toast(<MASK><NEW_LINE>}
R.string.archived, false);
774,736
private PriamInstance claimToken(PriamInstance originalInstance) {<NEW_LINE>String hostIP = config.usePrivateIP() ? myInstanceInfo.getPrivateIP() : myInstanceInfo.getHostIP();<NEW_LINE>if (originalInstance.getInstanceId().equals(myInstanceInfo.getInstanceId()) && originalInstance.getHostName().equals(myInstanceInfo.getHostname()) && originalInstance.getHostIP().equals(hostIP) && originalInstance.getRac().equals(myInstanceInfo.getRac())) {<NEW_LINE>return originalInstance;<NEW_LINE>}<NEW_LINE>PriamInstance newInstance = new PriamInstance();<NEW_LINE>newInstance.setApp(config.getAppName());<NEW_LINE>newInstance.setId(originalInstance.getId());<NEW_LINE>newInstance.setInstanceId(myInstanceInfo.getInstanceId());<NEW_LINE>newInstance.setHost(myInstanceInfo.getHostname());<NEW_LINE>newInstance.setHostIP(hostIP);<NEW_LINE>newInstance.setRac(myInstanceInfo.getRac());<NEW_LINE>newInstance.setVolumes(originalInstance.getVolumes());<NEW_LINE>newInstance.setToken(originalInstance.getToken());<NEW_LINE>newInstance.setDC(originalInstance.getDC());<NEW_LINE>try {<NEW_LINE>factory.update(originalInstance, newInstance);<NEW_LINE>} catch (Exception ex) {<NEW_LINE>long sleepTime = randomizer.nextInt(MAX_VALUE_IN_MILISECS);<NEW_LINE>String token = newInstance.getToken();<NEW_LINE>logger.<MASK><NEW_LINE>sleeper.sleepQuietly(sleepTime);<NEW_LINE>throw ex;<NEW_LINE>}<NEW_LINE>return newInstance;<NEW_LINE>}
warn("Failed updating token: {}; sleeping {} millis", token, sleepTime);
858,845
protected void configEngine(VideoEncoderConfiguration.VideoDimensions videoDimension, VideoEncoderConfiguration.FRAME_RATE fps, String encryptionKey, String encryptionMode) {<NEW_LINE>EncryptionConfig config = new EncryptionConfig();<NEW_LINE>if (!TextUtils.isEmpty(encryptionKey)) {<NEW_LINE>config.encryptionKey = encryptionKey;<NEW_LINE>if (TextUtils.equals(encryptionMode, "AES-128-XTS")) {<NEW_LINE>config.encryptionMode = EncryptionConfig.EncryptionMode.AES_128_XTS;<NEW_LINE>} else if (TextUtils.equals(encryptionMode, "AES-256-XTS")) {<NEW_LINE>config.encryptionMode = EncryptionConfig.EncryptionMode.AES_256_XTS;<NEW_LINE>}<NEW_LINE>rtcEngine(<MASK><NEW_LINE>} else {<NEW_LINE>rtcEngine().enableEncryption(false, config);<NEW_LINE>}<NEW_LINE>log.debug("configEngine " + videoDimension + " " + fps + " " + encryptionMode);<NEW_LINE>// Set the Resolution, FPS. Bitrate and Orientation of the video<NEW_LINE>rtcEngine().setVideoEncoderConfiguration(new VideoEncoderConfiguration(videoDimension, fps, VideoEncoderConfiguration.STANDARD_BITRATE, VideoEncoderConfiguration.ORIENTATION_MODE.ORIENTATION_MODE_FIXED_PORTRAIT));<NEW_LINE>}
).enableEncryption(true, config);
1,847,058
private static ValueNode canonical(LoadFieldNode loadFieldNode, StampPair stamp, ValueNode forObject, ResolvedJavaField field, ConstantFieldProvider constantFields, ConstantReflectionProvider constantReflection, OptionValues options, MetaAccessProvider metaAccess, boolean canonicalizeReads, boolean allUsagesAvailable) {<NEW_LINE>LoadFieldNode self = loadFieldNode;<NEW_LINE>if (canonicalizeReads && metaAccess != null) {<NEW_LINE>ConstantNode constant = asConstant(constantFields, constantReflection, metaAccess, options, forObject, field);<NEW_LINE>if (constant != null) {<NEW_LINE>return constant;<NEW_LINE>}<NEW_LINE>if (allUsagesAvailable) {<NEW_LINE>PhiNode phi = asPhi(constantFields, constantReflection, metaAccess, options, forObject, field, stamp.getTrustedStamp());<NEW_LINE>if (phi != null) {<NEW_LINE>return phi;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (self != null && !field.isStatic() && forObject.isNullConstant()) {<NEW_LINE>return new DeoptimizeNode(<MASK><NEW_LINE>}<NEW_LINE>if (self == null) {<NEW_LINE>self = new LoadFieldNode(stamp, forObject, field);<NEW_LINE>}<NEW_LINE>return self;<NEW_LINE>}
DeoptimizationAction.InvalidateReprofile, DeoptimizationReason.NullCheckException);
2,813
public static boolean handleCustomParameters(CommandLine commandLine) {<NEW_LINE>if (commandLine == null) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>boolean exit = false;<NEW_LINE>for (Option cliOption : commandLine.getOptions()) {<NEW_LINE>ParameterDescriptor param = customParameters.get(cliOption.getOpt());<NEW_LINE>if (param == null) {<NEW_LINE>param = customParameters.get(cliOption.getLongOpt());<NEW_LINE>}<NEW_LINE>if (param == null) {<NEW_LINE>// log.error("Wrong command line parameter " + cliOption);<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>if (param.hasArg) {<NEW_LINE>for (String optValue : commandLine.getOptionValues(param.name)) {<NEW_LINE>param.handler.handleParameter(commandLine, param.name, optValue);<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>param.handler.handleParameter(commandLine, param.name, null);<NEW_LINE>}<NEW_LINE>} catch (Exception e) {<NEW_LINE>log.error("Error evaluating parameter '" + <MASK><NEW_LINE>}<NEW_LINE>if (param.exitAfterExecute) {<NEW_LINE>exit = true;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return exit;<NEW_LINE>}
param.name + "'", e);
550,172
static int parseExitCode(ApiClient client, InputStream inputStream) {<NEW_LINE>try {<NEW_LINE>Type returnType = new TypeToken<V1Status>() {<NEW_LINE>}.getType();<NEW_LINE>String body;<NEW_LINE>try (final Reader reader = new InputStreamReader(inputStream)) {<NEW_LINE>body = Streams.toString(reader);<NEW_LINE>}<NEW_LINE>V1Status status = client.getJSON().deserialize(body, returnType);<NEW_LINE>if (status == null) {<NEW_LINE>return -1;<NEW_LINE>}<NEW_LINE>if (V1STATUS_SUCCESS.equals(status.getStatus()))<NEW_LINE>return 0;<NEW_LINE>if (V1STATUS_REASON_NONZEROEXITCODE.equals(status.getReason())) {<NEW_LINE>V1StatusDetails details = status.getDetails();<NEW_LINE>if (details != null) {<NEW_LINE>List<V1StatusCause<MASK><NEW_LINE>if (causes != null) {<NEW_LINE>for (V1StatusCause cause : causes) {<NEW_LINE>if (V1STATUS_CAUSE_REASON_EXITCODE.equals(cause.getReason())) {<NEW_LINE>try {<NEW_LINE>return Integer.parseInt(cause.getMessage());<NEW_LINE>} catch (NumberFormatException nfe) {<NEW_LINE>log.error("Error parsing exit code from status channel response", nfe);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} catch (Throwable t) {<NEW_LINE>log.error("Error parsing exit code from status channel response", t);<NEW_LINE>}<NEW_LINE>// Unable to parse the exit code from the content<NEW_LINE>return -1;<NEW_LINE>}
> causes = details.getCauses();
1,132,807
private boolean isCandidate(Map<ColumnHandle, NullableValue> bindings) {<NEW_LINE>if (intersection(bindings.keySet(), arguments).isEmpty()) {<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>Function<VariableReferenceExpression, Object> variableResolver = variable -> {<NEW_LINE>ColumnHandle column = assignments.get(variable.getName());<NEW_LINE>checkArgument(column != null, "Missing column assignment for %s", variable);<NEW_LINE>if (!bindings.containsKey(column)) {<NEW_LINE>return variable;<NEW_LINE>}<NEW_LINE>return bindings.get(column).getValue();<NEW_LINE>};<NEW_LINE>// Skip pruning if evaluation fails in a recoverable way. Failing here can cause<NEW_LINE>// spurious query failures for partitions that would otherwise be filtered out.<NEW_LINE>Object optimized = null;<NEW_LINE>try {<NEW_LINE>optimized = evaluator.getExpressionOptimizer().optimize(<MASK><NEW_LINE>} catch (PrestoException e) {<NEW_LINE>propagateIfUnhandled(e);<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>// If any conjuncts evaluate to FALSE or null, then the whole predicate will never be true and so the partition should be pruned<NEW_LINE>return !Boolean.FALSE.equals(optimized) && optimized != null && (!(optimized instanceof ConstantExpression) || !((ConstantExpression) optimized).isNull());<NEW_LINE>}
expression, OPTIMIZED, session, variableResolver);
1,724,629
public void createInitializrModel(IProgressMonitor monitor) {<NEW_LINE>InitializrModel initializrModel = null;<NEW_LINE>Exception error = null;<NEW_LINE>String url = urlField.getValue();<NEW_LINE>try {<NEW_LINE>writeToMonitor(monitor, "Getting Boot project...");<NEW_LINE>ISpringBootProject bootProject = getBootProject(url);<NEW_LINE>bootVersionField.setValue(bootProject.getBootVersion());<NEW_LINE>writeToMonitor(monitor, "Creating Initializr model...");<NEW_LINE>initializrModel <MASK><NEW_LINE>writeToMonitor(monitor, "Fetching starter information from Spring Boot Initializr...");<NEW_LINE>initializrModel.downloadDependencies();<NEW_LINE>} catch (Exception _e) {<NEW_LINE>error = _e;<NEW_LINE>}<NEW_LINE>// FIRST set the model even if there are errors<NEW_LINE>if (initializrModel != null) {<NEW_LINE>this.initializrModel.setValue(initializrModel);<NEW_LINE>}<NEW_LINE>if (error != null) {<NEW_LINE>Throwable e = ExceptionUtil.getDeepestCause(error);<NEW_LINE>if (e instanceof HttpRedirectionException) {<NEW_LINE>urlField.getVariable().setValue(((HttpRedirectionException) e).redirectedTo);<NEW_LINE>} else {<NEW_LINE>handleLoadingError(initializrModel, url, e);<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>initializrValidator.setValue(ValidationResult.OK);<NEW_LINE>}<NEW_LINE>}
= new InitializrModel(bootProject, preferences);
500,455
public byte[] doInTransform(Instrumentor instrumentor, ClassLoader classLoader, String className, Class<?> classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer) throws InstrumentException {<NEW_LINE>final InstrumentClass target = instrumentor.<MASK><NEW_LINE>if (getter) {<NEW_LINE>target.addGetter(StatefulConnectionGetter.class, "connection");<NEW_LINE>}<NEW_LINE>final LettuceMethodNameFilter lettuceMethodNameFilter = new LettuceMethodNameFilter();<NEW_LINE>for (InstrumentMethod method : target.getDeclaredMethods(MethodFilters.chain(lettuceMethodNameFilter, MethodFilters.modifierNot(MethodFilters.SYNTHETIC)))) {<NEW_LINE>try {<NEW_LINE>method.addScopedInterceptor(LettuceMethodInterceptor.class, LettuceConstants.REDIS_SCOPE);<NEW_LINE>} catch (Exception e) {<NEW_LINE>final PLogger logger = PLoggerFactory.getLogger(this.getClass());<NEW_LINE>if (logger.isWarnEnabled()) {<NEW_LINE>logger.warn("Unsupported method {}", method, e);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return target.toBytecode();<NEW_LINE>}
getInstrumentClass(classLoader, className, classfileBuffer);
1,405,811
public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException {<NEW_LINE>final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit();<NEW_LINE>if (!KeycloakAdapterConfigService.getInstance().isSecureDeployment(deploymentUnit)) {<NEW_LINE>WarMetaData warMetaData = deploymentUnit.getAttachment(WarMetaData.ATTACHMENT_KEY);<NEW_LINE>if (warMetaData == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>JBossWebMetaData webMetaData = warMetaData.getMergedJBossWebMetaData();<NEW_LINE>if (webMetaData == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>LoginConfigMetaData loginConfig = webMetaData.getLoginConfig();<NEW_LINE>if (loginConfig == null)<NEW_LINE>return;<NEW_LINE>if (loginConfig.getAuthMethod() == null)<NEW_LINE>return;<NEW_LINE>if (!loginConfig.getAuthMethod().equals("KEYCLOAK"))<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>final ModuleSpecification moduleSpecification = deploymentUnit.getAttachment(Attachments.MODULE_SPECIFICATION);<NEW_LINE>final <MASK><NEW_LINE>addCommonModules(moduleSpecification, moduleLoader);<NEW_LINE>addPlatformSpecificModules(moduleSpecification, moduleLoader);<NEW_LINE>}
ModuleLoader moduleLoader = Module.getBootModuleLoader();
990,712
public com.amazonaws.services.config.model.InvalidS3KeyPrefixException unmarshallFromContext(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>com.amazonaws.services.config.model.InvalidS3KeyPrefixException invalidS3KeyPrefixException = new com.amazonaws.services.config.model.InvalidS3KeyPrefixException(null);<NEW_LINE><MASK><NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>JsonToken token = context.getCurrentToken();<NEW_LINE>if (token == null)<NEW_LINE>token = context.nextToken();<NEW_LINE>if (token == VALUE_NULL) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>while (true) {<NEW_LINE>if (token == null)<NEW_LINE>break;<NEW_LINE>if (token == FIELD_NAME || token == START_OBJECT) {<NEW_LINE>} else if (token == END_ARRAY || token == END_OBJECT) {<NEW_LINE>if (context.getLastParsedParentElement() == null || context.getLastParsedParentElement().equals(currentParentElement)) {<NEW_LINE>if (context.getCurrentDepth() <= originalDepth)<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>token = context.nextToken();<NEW_LINE>}<NEW_LINE>return invalidS3KeyPrefixException;<NEW_LINE>}
int originalDepth = context.getCurrentDepth();
1,700,423
protected void internalTraverseAttributesByView(View view, Entity entity, EntityAttributeVisitor visitor, Map<Entity, Set<View>> visited, boolean checkLoaded) {<NEW_LINE>Set<View> views = visited.get(entity);<NEW_LINE>if (views == null) {<NEW_LINE>views = new HashSet<>();<NEW_LINE>visited.put(entity, views);<NEW_LINE>} else if (views.contains(view)) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>views.add(view);<NEW_LINE>MetaClass metaClass = metadata.getClassNN(entity.getClass());<NEW_LINE>for (ViewProperty property : view.getProperties()) {<NEW_LINE>MetaProperty metaProperty = metaClass.getPropertyNN(property.getName());<NEW_LINE>if (visitor.skip(metaProperty))<NEW_LINE>continue;<NEW_LINE>if (checkLoaded && !persistentAttributesLoadChecker.isLoaded(entity, metaProperty.getName()))<NEW_LINE>continue;<NEW_LINE>View propertyView = property.getView();<NEW_LINE>visitor.visit(entity, metaProperty);<NEW_LINE>Object value = entity.getValue(property.getName());<NEW_LINE>if (value != null && propertyView != null) {<NEW_LINE>if (value instanceof Collection) {<NEW_LINE>for (Object item : ((Collection) value)) {<NEW_LINE>if (item instanceof Instance)<NEW_LINE>internalTraverseAttributesByView(propertyView, (Entity) <MASK><NEW_LINE>}<NEW_LINE>} else if (value instanceof Instance) {<NEW_LINE>internalTraverseAttributesByView(propertyView, (Entity) value, visitor, visited, checkLoaded);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
item, visitor, visited, checkLoaded);
1,250,166
private Map<InputFile, NewCoverage> parse(List<String> lines) {<NEW_LINE>final Map<InputFile, FileData> files = new HashMap<>();<NEW_LINE>FileData fileData = null;<NEW_LINE>int reportLineNum = 0;<NEW_LINE>for (String line : lines) {<NEW_LINE>reportLineNum++;<NEW_LINE>if (line.startsWith(SF)) {<NEW_LINE>fileData = files.computeIfAbsent(inputFileForSourceFile(line), inputFile -> inputFile == null ? null : new FileData(inputFile));<NEW_LINE>} else if (fileData != null) {<NEW_LINE>if (line.startsWith(DA)) {<NEW_LINE>parseLineCoverage(fileData, reportLineNum, line);<NEW_LINE>} else if (line.startsWith(BRDA)) {<NEW_LINE>parseBranchCoverage(fileData, reportLineNum, line);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>Map<InputFile, NewCoverage> coveredFiles = new HashMap<>();<NEW_LINE>for (Map.Entry<InputFile, FileData> e : files.entrySet()) {<NEW_LINE>NewCoverage newCoverage = context.newCoverage().onFile(e.getKey());<NEW_LINE>e.getValue().save(newCoverage);<NEW_LINE>coveredFiles.put(<MASK><NEW_LINE>}<NEW_LINE>return coveredFiles;<NEW_LINE>}
e.getKey(), newCoverage);
1,029,075
final ModifyCacheParameterGroupResult executeModifyCacheParameterGroup(ModifyCacheParameterGroupRequest modifyCacheParameterGroupRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(modifyCacheParameterGroupRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<ModifyCacheParameterGroupRequest> request = null;<NEW_LINE>Response<ModifyCacheParameterGroupResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new ModifyCacheParameterGroupRequestMarshaller().marshall(super.beforeMarshalling(modifyCacheParameterGroupRequest));<NEW_LINE>// Binds the request metrics to the current request.<NEW_LINE>request.setAWSRequestMetrics(awsRequestMetrics);<NEW_LINE>request.<MASK><NEW_LINE>request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SERVICE_ID, "ElastiCache");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ModifyCacheParameterGroup");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>StaxResponseHandler<ModifyCacheParameterGroupResult> responseHandler = new StaxResponseHandler<ModifyCacheParameterGroupResult>(new ModifyCacheParameterGroupResultStaxUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
1,305,764
private static Multimap<Integer, Integer> generateMapping(RexBuilder rexBuilder, RelMetadataQuery mq, RelNode node, RelNode target, ImmutableBitSet positions, BiMap<RelTableRef, RelTableRef> tableMapping, EquivalenceClasses sourceEC) {<NEW_LINE>Map<RexTableInputRef, Set<RexTableInputRef>> equivalenceClassesMap = sourceEC.getEquivalenceClassesMap();<NEW_LINE>Multimap<String, Integer> exprsLineage = ArrayListMultimap.create();<NEW_LINE>for (int i = 0; i < target.getRowType().getFieldCount(); i++) {<NEW_LINE>Set<RexNode> s = mq.getExpressionLineage(target, rexBuilder.makeInputRef(target, i));<NEW_LINE>if (s == null) {<NEW_LINE>// Bail out<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>// We only support project - filter - join, thus it should map to<NEW_LINE>// a single expression<NEW_LINE>assert s.size() == 1;<NEW_LINE>// Rewrite expr to be expressed on query tables<NEW_LINE>exprsLineage.put(RexUtil.swapTableColumnReferences(rexBuilder, s.iterator().next(), tableMapping.inverse(), equivalenceClassesMap).toString(), i);<NEW_LINE>}<NEW_LINE>Multimap<Integer, Integer<MASK><NEW_LINE>for (int i : positions) {<NEW_LINE>Set<RexNode> s = mq.getExpressionLineage(node, rexBuilder.makeInputRef(node, i));<NEW_LINE>if (s == null) {<NEW_LINE>// Bail out<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>// We only support project - filter - join, thus it should map to<NEW_LINE>// a single expression<NEW_LINE>assert s.size() == 1;<NEW_LINE>// Rewrite expr to be expressed on query tables<NEW_LINE>Collection<Integer> c = exprsLineage.get(RexUtil.swapColumnReferences(rexBuilder, s.iterator().next(), equivalenceClassesMap).toString());<NEW_LINE>if (c == null) {<NEW_LINE>// Bail out<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>for (Integer j : c) {<NEW_LINE>m.put(i, j);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return m;<NEW_LINE>}
> m = ArrayListMultimap.create();
1,484,416
public Object sGet(SField sField) {<NEW_LINE>if (sField.getName().equals("identification")) {<NEW_LINE>return getIdentification();<NEW_LINE>}<NEW_LINE>if (sField.getName().equals("userId")) {<NEW_LINE>return getUserId();<NEW_LINE>}<NEW_LINE>if (sField.getName().equals("start")) {<NEW_LINE>return getStart();<NEW_LINE>}<NEW_LINE>if (sField.getName().equals("username")) {<NEW_LINE>return getUsername();<NEW_LINE>}<NEW_LINE>if (sField.getName().equals("name")) {<NEW_LINE>return getName();<NEW_LINE>}<NEW_LINE>if (sField.getName().equals("oid")) {<NEW_LINE>return getOid();<NEW_LINE>}<NEW_LINE>if (sField.getName().equals("rid")) {<NEW_LINE>return getRid();<NEW_LINE>}<NEW_LINE>if (sField.getName().equals("uuid")) {<NEW_LINE>return getUuid();<NEW_LINE>}<NEW_LINE>throw new RuntimeException("Field " + <MASK><NEW_LINE>}
sField.getName() + " not found");
254,734
final GetPhoneNumberSettingsResult executeGetPhoneNumberSettings(GetPhoneNumberSettingsRequest getPhoneNumberSettingsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(getPhoneNumberSettingsRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<GetPhoneNumberSettingsRequest> request = null;<NEW_LINE>Response<GetPhoneNumberSettingsResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new GetPhoneNumberSettingsRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(getPhoneNumberSettingsRequest));<NEW_LINE>// Binds the request metrics to the current request.<NEW_LINE>request.setAWSRequestMetrics(awsRequestMetrics);<NEW_LINE>request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);<NEW_LINE>request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SERVICE_ID, "Chime");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "GetPhoneNumberSettings");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<GetPhoneNumberSettingsResult>> 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 GetPhoneNumberSettingsResultJsonUnmarshaller());
89,509
public String determineServerBase(ServletContext theServletContext, HttpServletRequest theRequest) {<NEW_LINE>if (theRequest == null) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>String requestFullPath = StringUtils.defaultString(theRequest.getRequestURI());<NEW_LINE>String servletPath;<NEW_LINE>if (myServletPath != null) {<NEW_LINE>servletPath = myServletPath;<NEW_LINE>} else {<NEW_LINE>servletPath = StringUtils.defaultString(theRequest.getServletPath());<NEW_LINE>}<NEW_LINE>StringBuffer requestUrl = theRequest.getRequestURL();<NEW_LINE>String servletContextPath = StringUtils.defaultString(theRequest.getContextPath());<NEW_LINE>String requestPath = requestFullPath.substring(servletContextPath.length() + servletPath.length());<NEW_LINE>if (requestPath.length() > 0 && requestPath.charAt(0) == '/') {<NEW_LINE>requestPath = requestPath.substring(1);<NEW_LINE>}<NEW_LINE>int startOfPath = requestUrl.indexOf("//");<NEW_LINE>int requestUrlLength = requestUrl.length();<NEW_LINE>if (startOfPath != -1 && (startOfPath + 2) < requestUrlLength) {<NEW_LINE>startOfPath = requestUrl.indexOf("/", startOfPath + 2);<NEW_LINE>}<NEW_LINE>if (startOfPath == -1) {<NEW_LINE>startOfPath = 0;<NEW_LINE>}<NEW_LINE>int contextIndex;<NEW_LINE>if (servletPath.length() == 0 || servletPath.equals("/")) {<NEW_LINE>if (requestPath.length() == 0) {<NEW_LINE>contextIndex = requestUrlLength;<NEW_LINE>} else {<NEW_LINE>contextIndex = <MASK><NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>// servletContextPath can start with servletPath<NEW_LINE>contextIndex = requestUrl.indexOf(servletPath + "/", startOfPath);<NEW_LINE>if (contextIndex == -1) {<NEW_LINE>contextIndex = requestUrl.indexOf(servletPath, startOfPath);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>String fhirServerBase;<NEW_LINE>int length = contextIndex + servletPath.length();<NEW_LINE>if (length > requestUrlLength) {<NEW_LINE>length = requestUrlLength;<NEW_LINE>}<NEW_LINE>fhirServerBase = requestUrl.substring(0, length);<NEW_LINE>return fhirServerBase;<NEW_LINE>}
requestUrl.indexOf(requestPath, startOfPath);
1,245,249
private void completeTagIds(ParserResult parserInfo, String prefix, int astOffset, List<CompletionProposal> resultList) {<NEW_LINE>FileObject fo = parserInfo.getSnapshot().getSource().getFileObject();<NEW_LINE>if (fo == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>Project project = FileOwnerQuery.getOwner(fo);<NEW_LINE>HashSet<String> unique = new HashSet<String>();<NEW_LINE>try {<NEW_LINE>CssIndex cssIndex = CssIndex.create(project);<NEW_LINE>Map<FileObject, Collection<String>> findIdsByPrefix = cssIndex.findIdsByPrefix(prefix);<NEW_LINE>for (Collection<String> ids : findIdsByPrefix.values()) {<NEW_LINE>for (String id : ids) {<NEW_LINE>if (!id.isEmpty()) {<NEW_LINE>unique.add(id);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} catch (IOException ex) {<NEW_LINE>Exceptions.printStackTrace(ex);<NEW_LINE>}<NEW_LINE>if (!unique.isEmpty()) {<NEW_LINE>for (Iterator<String> iterator = unique.iterator(); iterator.hasNext(); ) {<NEW_LINE>resultList.add(new CssIdCompletionItem(iterator.next<MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
(), parserInfo, astOffset));
84,303
public void updateConditionRoute(ConditionRouteDTO newConditionRoute) {<NEW_LINE>String id = ConvertUtil.getIdFromDTO(newConditionRoute);<NEW_LINE>String path = <MASK><NEW_LINE>String existConfig = dynamicConfiguration.getConfig(path);<NEW_LINE>if (existConfig == null) {<NEW_LINE>throw new ResourceNotFoundException("no existing condition route for path: " + path);<NEW_LINE>}<NEW_LINE>RoutingRule routingRule = YamlParser.loadObject(existConfig, RoutingRule.class);<NEW_LINE>ConditionRouteDTO oldConditionRoute = RouteUtils.createConditionRouteFromRule(routingRule);<NEW_LINE>routingRule = RouteUtils.insertConditionRule(routingRule, newConditionRoute);<NEW_LINE>dynamicConfiguration.setConfig(path, YamlParser.dumpObject(routingRule));<NEW_LINE>// for 2.6<NEW_LINE>if (StringUtils.isNotEmpty(newConditionRoute.getService())) {<NEW_LINE>for (Route old : convertRouteToOldRoute(oldConditionRoute)) {<NEW_LINE>old.setService(id);<NEW_LINE>registry.unregister(old.toUrl().addParameter(Constants.COMPATIBLE_CONFIG, true));<NEW_LINE>}<NEW_LINE>for (Route updated : convertRouteToOldRoute(newConditionRoute)) {<NEW_LINE>registry.register(updated.toUrl().addParameter(Constants.COMPATIBLE_CONFIG, true));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
getPath(id, Constants.CONDITION_ROUTE);
1,247,640
// -------------------------------------<NEW_LINE>public static void register() {<NEW_LINE>// Check JEI recipes are enabled<NEW_LINE>if (!PersonalConfig.enableWeatherObeliskJEIRecipes.get()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>MachinesPlugin.iModRegistry.addRecipeCategories(new WeatherObeliskRecipeCategory(MachinesPlugin.iGuiHelper));<NEW_LINE>MachinesPlugin.iModRegistry.addRecipeCategoryCraftingItem(new ItemStack(MachineObject.block_weather_obelisk.getBlockNN()), WeatherObeliskRecipeCategory.UID);<NEW_LINE>MachinesPlugin.iModRegistry.addRecipeClickArea(GuiWeatherObelisk.class, 155, 42, 16, 16, WeatherObeliskRecipeCategory.UID);<NEW_LINE>long start = System.nanoTime();<NEW_LINE>List<WeatherObeliskRecipeWrapper> result = new ArrayList<WeatherObeliskRecipeWrapper>();<NEW_LINE>result.add(new WeatherObeliskRecipeWrapper(new ItemStack(Items.FIREWORKS), new FluidStack(TileWeatherObelisk.WeatherTask.CLEAR.getRequiredFluidAmountType(), TileWeatherObelisk.WeatherTask.CLEAR.getRequiredFluidAmount()), TileWeatherObelisk.WeatherTask.CLEAR.getRequiredFluidAmount() / CapacitorKey.WEATHER_POWER_FLUID_USE.getDefault() * CapacitorKey.WEATHER_POWER_USE.getDefault(), "weather_sun", MachinesPlugin.iGuiHelper));<NEW_LINE>result.add(new WeatherObeliskRecipeWrapper(new ItemStack(Items.FIREWORKS), new FluidStack(TileWeatherObelisk.WeatherTask.RAIN.getRequiredFluidAmountType(), TileWeatherObelisk.WeatherTask.RAIN.getRequiredFluidAmount()), TileWeatherObelisk.WeatherTask.RAIN.getRequiredFluidAmount() / CapacitorKey.WEATHER_POWER_FLUID_USE.getDefault() * CapacitorKey.WEATHER_POWER_USE.getDefault()<MASK><NEW_LINE>result.add(new WeatherObeliskRecipeWrapper(new ItemStack(Items.FIREWORKS), new FluidStack(TileWeatherObelisk.WeatherTask.STORM.getRequiredFluidAmountType(), TileWeatherObelisk.WeatherTask.STORM.getRequiredFluidAmount()), TileWeatherObelisk.WeatherTask.STORM.getRequiredFluidAmount() / CapacitorKey.WEATHER_POWER_FLUID_USE.getDefault() * CapacitorKey.WEATHER_POWER_USE.getDefault(), "weather_thunder", MachinesPlugin.iGuiHelper));<NEW_LINE>long end = System.nanoTime();<NEW_LINE>MachinesPlugin.iModRegistry.addRecipes(result, UID);<NEW_LINE>MachinesPlugin.iModRegistry.getRecipeTransferRegistry().addRecipeTransferHandler(ContainerWeatherObelisk.class, WeatherObeliskRecipeCategory.UID, 0, 1, 1, 4 * 9);<NEW_LINE>Log.info(String.format("WeatherObeliskRecipeCategory: Added %d weather changing recipes to JEI in %.3f seconds.", result.size(), (end - start) / 1000000000d));<NEW_LINE>}
, "weather_rain", MachinesPlugin.iGuiHelper));
1,543,470
// @formatter:on<NEW_LINE>@Override<NEW_LINE>PComplex compute(VirtualFrame frame, double real, double imag) {<NEW_LINE>PComplex result = specialValue(factory(), SPECIAL_VALUES, real, imag);<NEW_LINE>if (result != null) {<NEW_LINE>return result;<NEW_LINE>}<NEW_LINE>if (real == 0.0 && imag == 0.0) {<NEW_LINE>return factory().createComplex(0.0, imag);<NEW_LINE>}<NEW_LINE>double ax = Math.abs(real);<NEW_LINE>double ay = Math.abs(imag);<NEW_LINE>double s;<NEW_LINE>if (ax < Double.MIN_NORMAL && ay < Double.MIN_NORMAL && (ax > 0.0 || ay > 0.0)) {<NEW_LINE>final double scaleUp = 0x1.0p53;<NEW_LINE>final double scaleDown = 0x1.0p-27;<NEW_LINE>ax *= scaleUp;<NEW_LINE>s = Math.sqrt(ax + Math.hypot(ax, ay * scaleUp)) * scaleDown;<NEW_LINE>} else {<NEW_LINE>ax /= 8.0;<NEW_LINE>s = 2.0 * Math.sqrt(ax + Math.hypot<MASK><NEW_LINE>}<NEW_LINE>double d = ay / (2.0 * s);<NEW_LINE>if (real >= 0.0) {<NEW_LINE>return factory().createComplex(s, Math.copySign(d, imag));<NEW_LINE>}<NEW_LINE>return factory().createComplex(d, Math.copySign(s, imag));<NEW_LINE>}
(ax, ay / 8.0));
561,372
public com.amazonaws.services.cognitoidp.model.UsernameExistsException unmarshallFromContext(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>com.amazonaws.services.cognitoidp.model.UsernameExistsException usernameExistsException = new com.amazonaws.services.cognitoidp.model.UsernameExistsException(null);<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>} 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 usernameExistsException;<NEW_LINE>}
JsonToken token = context.getCurrentToken();
1,250,115
public CollectFieldResult collectFields(FieldCollectorNormalizedQueryParams parameters, NormalizedField normalizedField, MergedField mergedField, int level) {<NEW_LINE>GraphQLUnmodifiedType fieldType = GraphQLTypeUtil.unwrapAll(normalizedField.getFieldDefinition().getType());<NEW_LINE>// if not composite we don't have any selectionSet because it is a Scalar or enum<NEW_LINE>if (!(fieldType instanceof GraphQLCompositeType)) {<NEW_LINE>return new CollectFieldResult(Collections.emptyList(), Collections.emptyMap());<NEW_LINE>}<NEW_LINE>// result key -> ObjectType -> NormalizedField<NEW_LINE>Map<String, Map<GraphQLObjectType, NormalizedField>> subFields = new LinkedHashMap<>();<NEW_LINE>Map<NormalizedField, MergedField> mergedFieldByNormalizedField = new LinkedHashMap<>();<NEW_LINE>Set<GraphQLObjectType> possibleObjects = new LinkedHashSet<>(resolvePossibleObjects((GraphQLCompositeType) fieldType, parameters.getGraphQLSchema()));<NEW_LINE>for (Field field : mergedField.getFields()) {<NEW_LINE>if (field.getSelectionSet() == null) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>this.collectFields(parameters, field.getSelectionSet(), subFields, mergedFieldByNormalizedField, possibleObjects, level, normalizedField);<NEW_LINE>}<NEW_LINE>List<NormalizedField> children = subFieldsToList(subFields);<NEW_LINE><MASK><NEW_LINE>}
return new CollectFieldResult(children, mergedFieldByNormalizedField);
1,668,967
public void executeTest(final String name, CommandLineProgramTester test, final String expectedIndexExtension) throws IOException {<NEW_LINE>List<File> tmpFiles = new ArrayList<>();<NEW_LINE>for (int i = 0; i < nOutputFiles; i++) {<NEW_LINE>File fl = BaseTest.createTempFile(String.format(DEFAULT_TEMP_PREFIX + ".%d", i), tempExtension);<NEW_LINE>tmpFiles.add(fl);<NEW_LINE>}<NEW_LINE>final String preFormattedArgs = getArgs();<NEW_LINE>final String formattedArgs = String.format(<MASK><NEW_LINE>System.out.println(StringUtils.repeat('-', 80));<NEW_LINE>if (expectsException()) {<NEW_LINE>// this branch handles the case were we are testing that a walker will fail as expected<NEW_LINE>executeTest(name, test, null, null, tmpFiles, formattedArgs, getExpectedException(), expectedIndexExtension);<NEW_LINE>} else {<NEW_LINE>final List<String> expectedFileNames = new ArrayList<>(expectedFileNames());<NEW_LINE>if (!expectedFileNames.isEmpty() && preFormattedArgs.equals(formattedArgs)) {<NEW_LINE>throw new GATKException("Incorrect test specification - you're expecting " + expectedFileNames.size() + " file(s) the specified arguments do not contain the same number of \"%s\" placeholders");<NEW_LINE>}<NEW_LINE>executeTest(name, test, null, expectedFileNames, tmpFiles, formattedArgs, null, expectedIndexExtension);<NEW_LINE>}<NEW_LINE>}
preFormattedArgs, tmpFiles.toArray());
1,120,136
protected List<DateWithLabel> generateAdapterValues(boolean showOnlyFutureDates) {<NEW_LINE>final List<DateWithLabel> days = new ArrayList<>();<NEW_LINE>Calendar instance = Calendar.getInstance();<NEW_LINE>instance.setTimeZone(dateHelper.getTimeZone());<NEW_LINE>int startDayOffset = showOnlyFutureDates ? 0 : -1 * dayCount;<NEW_LINE>instance.add(Calendar.DATE, startDayOffset - 1);<NEW_LINE>for (int i = startDayOffset; i < 0; ++i) {<NEW_LINE>instance.add(Calendar.DAY_OF_MONTH, 1);<NEW_LINE>Date date = instance.getTime();<NEW_LINE>days.add(new DateWithLabel(getFormattedValue(date), date));<NEW_LINE>}<NEW_LINE>// today<NEW_LINE>days.add(new DateWithLabel(getTodayText(), new Date()));<NEW_LINE>instance = Calendar.getInstance();<NEW_LINE>instance.setTimeZone(dateHelper.getTimeZone());<NEW_LINE>for (int i = 0; i < dayCount; ++i) {<NEW_LINE>instance.<MASK><NEW_LINE>Date date = instance.getTime();<NEW_LINE>days.add(new DateWithLabel(getFormattedValue(date), date));<NEW_LINE>}<NEW_LINE>return days;<NEW_LINE>}
add(Calendar.DATE, 1);
443,222
private static void careplan(List<String> textRecord, CarePlan careplan, Boolean stat) {<NEW_LINE>String cpTime = dateFromTimestamp(careplan.start);<NEW_LINE>String cpDesc = careplan.codes.get(0).display;<NEW_LINE>String status = (careplan.stop == 0L) ? "CURRENT" : "STOPPED";<NEW_LINE>if (stat) {<NEW_LINE>textRecord.add(" " + cpTime + "[" + status + "] : " + cpDesc);<NEW_LINE>} else {<NEW_LINE>textRecord.add(" " + cpTime + " : " + cpDesc);<NEW_LINE>}<NEW_LINE>if (careplan.reasons != null && !careplan.reasons.isEmpty()) {<NEW_LINE>for (Code reason : careplan.reasons) {<NEW_LINE>textRecord.<MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (careplan.activities != null && !careplan.activities.isEmpty()) {<NEW_LINE>for (Code activity : careplan.activities) {<NEW_LINE>textRecord.add(" Activity: " + activity.display);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
add(" Reason: " + reason.display);
1,488,656
public AuroraPostgreSqlParameters unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>AuroraPostgreSqlParameters auroraPostgreSqlParameters = new AuroraPostgreSqlParameters();<NEW_LINE><MASK><NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>JsonToken token = context.getCurrentToken();<NEW_LINE>if (token == null)<NEW_LINE>token = context.nextToken();<NEW_LINE>if (token == VALUE_NULL) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>while (true) {<NEW_LINE>if (token == null)<NEW_LINE>break;<NEW_LINE>if (token == FIELD_NAME || token == START_OBJECT) {<NEW_LINE>if (context.testExpression("Host", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>auroraPostgreSqlParameters.setHost(context.getUnmarshaller(String.class).unmarshall(context));<NEW_LINE>}<NEW_LINE>if (context.testExpression("Port", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>auroraPostgreSqlParameters.setPort(context.getUnmarshaller(Integer.class).unmarshall(context));<NEW_LINE>}<NEW_LINE>if (context.testExpression("Database", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>auroraPostgreSqlParameters.setDatabase(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 auroraPostgreSqlParameters;<NEW_LINE>}
int originalDepth = context.getCurrentDepth();
1,455,733
private Vec3 reverseTransformVec(Vec3 in) {<NEW_LINE>float pt = AnimationTickHolder.getPartialTicks();<NEW_LINE>in = in.subtract(VecHelper.lerp(pt, prevAnimatedOffset, animatedOffset));<NEW_LINE>if (!animatedRotation.equals(Vec3.ZERO) || !prevAnimatedRotation.equals(Vec3.ZERO)) {<NEW_LINE>if (centerOfRotation == null)<NEW_LINE>centerOfRotation = section.getCenter();<NEW_LINE>double rotX = Mth.lerp(pt, prevAnimatedRotation.x, animatedRotation.x);<NEW_LINE>double rotZ = Mth.lerp(pt, prevAnimatedRotation.z, animatedRotation.z);<NEW_LINE>double rotY = Mth.lerp(pt, prevAnimatedRotation.y, animatedRotation.y);<NEW_LINE>in = in.subtract(centerOfRotation);<NEW_LINE>in = VecHelper.rotate(in, -rotX, Axis.X);<NEW_LINE>in = VecHelper.rotate(in, -rotZ, Axis.Z);<NEW_LINE>in = VecHelper.rotate(in, -rotY, Axis.Y);<NEW_LINE><MASK><NEW_LINE>if (stabilizationAnchor != null) {<NEW_LINE>in = in.subtract(stabilizationAnchor);<NEW_LINE>in = VecHelper.rotate(in, rotX, Axis.X);<NEW_LINE>in = VecHelper.rotate(in, rotZ, Axis.Z);<NEW_LINE>in = VecHelper.rotate(in, rotY, Axis.Y);<NEW_LINE>in = in.add(stabilizationAnchor);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return in;<NEW_LINE>}
in = in.add(centerOfRotation);
1,265,250
private void applyColumnWidths() {<NEW_LINE>Map<Integer, Double> constrainedWidths = new LinkedHashMap<Integer, Double>();<NEW_LINE>for (int index = 0; index < columns.size(); index++) {<NEW_LINE>Column<?, T> column = columns.get(index);<NEW_LINE>boolean hasAutoWidth = column.getWidth() < 0;<NEW_LINE>if (!hasAutoWidth) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>// TODO: bug: these don't honor the CSS max/min. :(<NEW_LINE>double actualWidth = column.getWidthActual();<NEW_LINE>if (actualWidth < getMinWidth(column)) {<NEW_LINE>constrainedWidths.put(index, column.getMinimumWidth());<NEW_LINE>} else if (actualWidth > getMaxWidth(column)) {<NEW_LINE>constrainedWidths.put(index, column.getMaximumWidth());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>Grid.this.escalator.<MASK><NEW_LINE>}
getColumnConfiguration().setColumnWidths(constrainedWidths);
993,909
private void updateDisplay(boolean announce) {<NEW_LINE>mYearView.setText(YEAR_FORMAT.format(mCalendar.getTime()));<NEW_LINE>if (mVersion == Version.VERSION_1) {<NEW_LINE>if (mDatePickerHeaderView != null) {<NEW_LINE>if (mTitle != null)<NEW_LINE>mDatePickerHeaderView.setText(mTitle);<NEW_LINE>else {<NEW_LINE>mDatePickerHeaderView.setText(mCalendar.getDisplayName(Calendar.DAY_OF_WEEK, Calendar.LONG, mLocale));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>mSelectedMonthTextView.setText(MONTH_FORMAT.format(mCalendar.getTime()));<NEW_LINE>mSelectedDayTextView.setText(DAY_FORMAT.format(mCalendar.getTime()));<NEW_LINE>}<NEW_LINE>if (mVersion == Version.VERSION_2) {<NEW_LINE>mSelectedDayTextView.setText(VERSION_2_FORMAT.format(mCalendar.getTime()));<NEW_LINE>if (mTitle != null)<NEW_LINE>mDatePickerHeaderView.setText(mTitle.toUpperCase(mLocale));<NEW_LINE>else<NEW_LINE>mDatePickerHeaderView.setVisibility(View.GONE);<NEW_LINE>}<NEW_LINE>// Accessibility.<NEW_LINE>long millis = mCalendar.getTimeInMillis();<NEW_LINE>mAnimator.setDateMillis(millis);<NEW_LINE>int flags = DateUtils.FORMAT_SHOW_DATE | DateUtils.FORMAT_NO_YEAR;<NEW_LINE>String monthAndDayText = DateUtils.formatDateTime(getActivity(), millis, flags);<NEW_LINE>mMonthAndDayView.setContentDescription(monthAndDayText);<NEW_LINE>if (announce) {<NEW_LINE>flags = DateUtils.FORMAT_SHOW_DATE | DateUtils.FORMAT_SHOW_YEAR;<NEW_LINE>String fullDateText = DateUtils.formatDateTime(<MASK><NEW_LINE>Utils.tryAccessibilityAnnounce(mAnimator, fullDateText);<NEW_LINE>}<NEW_LINE>}
getActivity(), millis, flags);
949,906
public void initializeDefaultPreferences() {<NEW_LINE>IEclipsePreferences prefs = DefaultScope.INSTANCE.getNode(HTMLPlugin.PLUGIN_ID);<NEW_LINE>// prefs.putBoolean(com.aptana.editor.common.preferences.IPreferenceConstants.LINK_OUTLINE_WITH_EDITOR, true);<NEW_LINE>prefs.putDouble(IPreferenceConstants.HTML_INDEX_VERSION, 0);<NEW_LINE>// $NON-NLS-1$<NEW_LINE>prefs.// $NON-NLS-1$<NEW_LINE>put(// $NON-NLS-1$<NEW_LINE>com.aptana.editor.common.contentassist.IPreferenceConstants.COMPLETION_PROPOSAL_ACTIVATION_CHARACTERS, "</>=&'\" ");<NEW_LINE>prefs.putBoolean(IPreferenceConstants.HTML_AUTO_CLOSE_TAG_PAIRS, true);<NEW_LINE>prefs.putBoolean(IPreferenceConstants.HTML_REMOTE_HREF_PROPOSALS, IPreferenceConstants.DEFAULT_REMOTE_HREF_PROPOSALS_VALUE);<NEW_LINE>prefs.putBoolean(com.aptana.editor.common.preferences.IPreferenceConstants.EDITOR_AUTO_INDENT, true);<NEW_LINE>prefs.putBoolean(com.aptana.editor.common.preferences.IPreferenceConstants.EDITOR_ENABLE_FOLDING, true);<NEW_LINE>prefs.<MASK><NEW_LINE>// mark occurrences<NEW_LINE>// prefs.putBoolean(com.aptana.editor.common.preferences.IPreferenceConstants.EDITOR_MARK_OCCURRENCES, true);<NEW_LINE>// Set Tidy validator to be on by default for reconcile<NEW_LINE>prefs.putBoolean(PreferenceUtil.getEnablementPreferenceKey(HTMLTidyValidator.ID, BuildType.BUILD), false);<NEW_LINE>prefs.putBoolean(PreferenceUtil.getEnablementPreferenceKey(HTMLTidyValidator.ID, BuildType.RECONCILE), true);<NEW_LINE>prefs.putInt(HTMLTidyValidator.ProblemType.IdNameAttributeMismatch.getPrefKey(), IProblem.Severity.ERROR.intValue());<NEW_LINE>// Set Parser Errors to be on by default for both<NEW_LINE>prefs.putBoolean(PreferenceUtil.getEnablementPreferenceKey(HTMLParserValidator.ID, BuildType.BUILD), true);<NEW_LINE>prefs.putBoolean(PreferenceUtil.getEnablementPreferenceKey(HTMLParserValidator.ID, BuildType.RECONCILE), true);<NEW_LINE>}
put(IPreferenceConstants.HTML_OUTLINE_TAG_ATTRIBUTES_TO_SHOW, DEFAULT_TAG_ATTRIBUTES_TO_SHOW);
1,697,104
public Filter springSecurityFilterChain() throws Exception {<NEW_LINE>boolean hasConfigurers = this.webSecurityConfigurers != null && !this.webSecurityConfigurers.isEmpty();<NEW_LINE>boolean hasFilterChain = !this.securityFilterChains.isEmpty();<NEW_LINE>Assert.state(!(hasConfigurers && hasFilterChain), "Found WebSecurityConfigurerAdapter as well as SecurityFilterChain. Please select just one.");<NEW_LINE>if (!hasConfigurers && !hasFilterChain) {<NEW_LINE>WebSecurityConfigurerAdapter adapter = this.objectObjectPostProcessor.postProcess(new WebSecurityConfigurerAdapter() {<NEW_LINE>});<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>for (SecurityFilterChain securityFilterChain : this.securityFilterChains) {<NEW_LINE>this.webSecurity.addSecurityFilterChainBuilder(() -> securityFilterChain);<NEW_LINE>for (Filter filter : securityFilterChain.getFilters()) {<NEW_LINE>if (filter instanceof FilterSecurityInterceptor) {<NEW_LINE>this.webSecurity.securityInterceptor((FilterSecurityInterceptor) filter);<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>for (WebSecurityCustomizer customizer : this.webSecurityCustomizers) {<NEW_LINE>customizer.customize(this.webSecurity);<NEW_LINE>}<NEW_LINE>return this.webSecurity.build();<NEW_LINE>}
this.webSecurity.apply(adapter);
700,758
public static boolean toBoolean(Object value) {<NEW_LINE>if (value == Boolean.TRUE) {<NEW_LINE>return true;<NEW_LINE>} else if (value == Boolean.FALSE || value == Undefined.instance || value == Null.instance) {<NEW_LINE>return false;<NEW_LINE>} else if (isNumber(value)) {<NEW_LINE>return toBoolean((Number) value);<NEW_LINE>} else if (Strings.isTString(value)) {<NEW_LINE>return Strings.length((TruffleString) value) != 0;<NEW_LINE>} else if (value instanceof BigInt) {<NEW_LINE>return ((BigInt) value).compareTo(BigInt.ZERO) != 0;<NEW_LINE>} else if (isForeignObject(value)) {<NEW_LINE>InteropLibrary interop = InteropLibrary.getFactory().getUncached(value);<NEW_LINE>if (interop.isNull(value)) {<NEW_LINE>return false;<NEW_LINE>} else if (JSInteropUtil.isBoxedPrimitive(value, interop)) {<NEW_LINE>return toBoolean(JSInteropUtil.toPrimitiveOrDefault(value, Null<MASK><NEW_LINE>} else {<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>}
.instance, interop, null));
1,228,488
public BatchPutGeofenceError unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>BatchPutGeofenceError batchPutGeofenceError = new BatchPutGeofenceError();<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("Error", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>batchPutGeofenceError.setError(BatchItemErrorJsonUnmarshaller.getInstance().unmarshall(context));<NEW_LINE>}<NEW_LINE>if (context.testExpression("GeofenceId", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>batchPutGeofenceError.setGeofenceId(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 batchPutGeofenceError;<NEW_LINE>}
JsonToken token = context.getCurrentToken();
1,425,422
public void extractBatchKeyPhrasesMaxOverload() {<NEW_LINE>// BEGIN: com.azure.ai.textanalytics.TextAnalyticsAsyncClient.extractKeyPhrasesBatch#Iterable-TextAnalyticsRequestOptions<NEW_LINE>List<TextDocumentInput> textDocumentInputs1 = Arrays.asList(new TextDocumentInput("0", "I had a wonderful trip to Seattle last week.").setLanguage("en"), new TextDocumentInput("1", <MASK><NEW_LINE>TextAnalyticsRequestOptions requestOptions = new TextAnalyticsRequestOptions().setIncludeStatistics(true);<NEW_LINE>textAnalyticsAsyncClient.extractKeyPhrasesBatchWithResponse(textDocumentInputs1, requestOptions).subscribe(response -> {<NEW_LINE>// Response's status code<NEW_LINE>System.out.printf("Status code of request response: %d%n", response.getStatusCode());<NEW_LINE>ExtractKeyPhrasesResultCollection resultCollection = response.getValue();<NEW_LINE>// Batch statistics<NEW_LINE>TextDocumentBatchStatistics batchStatistics = resultCollection.getStatistics();<NEW_LINE>System.out.printf("Batch statistics, transaction count: %s, valid document count: %s.%n", batchStatistics.getTransactionCount(), batchStatistics.getValidDocumentCount());<NEW_LINE>for (ExtractKeyPhraseResult extractKeyPhraseResult : resultCollection) {<NEW_LINE>System.out.println("Extracted phrases:");<NEW_LINE>for (String keyPhrase : extractKeyPhraseResult.getKeyPhrases()) {<NEW_LINE>System.out.printf("%s.%n", keyPhrase);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>});<NEW_LINE>// END: com.azure.ai.textanalytics.TextAnalyticsAsyncClient.extractKeyPhrasesBatch#Iterable-TextAnalyticsRequestOptions<NEW_LINE>}
"I work at Microsoft.").setLanguage("en"));
1,054,659
public boolean isEvenOddTree(TreeNode root) {<NEW_LINE>boolean even = true;<NEW_LINE>Deque<TreeNode> q = new ArrayDeque<>();<NEW_LINE>q.offerLast(root);<NEW_LINE>while (!q.isEmpty()) {<NEW_LINE>int prev = even ? 0 : 1000000;<NEW_LINE>for (int i = 0, n = q.size(); i < n; ++i) {<NEW_LINE>TreeNode node = q.pollFirst();<NEW_LINE>if (even && (prev >= node.val || node.val % 2 == 0)) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>if (!even && (prev <= node.val || node.val % 2 == 1)) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>prev = node.val;<NEW_LINE>if (node.left != null) {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>if (node.right != null) {<NEW_LINE>q.offerLast(node.right);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>even = !even;<NEW_LINE>}<NEW_LINE>return true;<NEW_LINE>}
q.offerLast(node.left);
1,207,019
public boolean onCreateOptionsMenu(Menu menu) {<NEW_LINE>MenuInflater inflater = getMenuInflater();<NEW_LINE>inflater.inflate(R.menu.itemslist, menu);<NEW_LINE>if (fs.isGlobalShared() || fs.isAllSocial() || fs.isFilterSaved() || fs.isAllSaved() || fs.isSingleSavedTag() || fs.isInfrequent() || fs.isAllRead()) {<NEW_LINE>menu.findItem(R.id.menu_mark_all_as_read).setVisible(false);<NEW_LINE>}<NEW_LINE>if (fs.isGlobalShared() || fs.isAllSocial() || fs.isAllRead()) {<NEW_LINE>menu.findItem(R.id.menu_story_order).setVisible(false);<NEW_LINE>}<NEW_LINE>if (fs.isGlobalShared() || fs.isFilterSaved() || fs.isAllSaved() || fs.isSingleSavedTag() || fs.isInfrequent() || fs.isAllRead()) {<NEW_LINE>menu.findItem(R.id<MASK><NEW_LINE>menu.findItem(R.id.menu_mark_read_on_scroll).setVisible(false);<NEW_LINE>menu.findItem(R.id.menu_story_content_preview_style).setVisible(false);<NEW_LINE>menu.findItem(R.id.menu_story_thumbnail_style).setVisible(false);<NEW_LINE>}<NEW_LINE>if (fs.isGlobalShared() || fs.isAllSocial() || fs.isInfrequent() || fs.isAllRead()) {<NEW_LINE>menu.findItem(R.id.menu_search_stories).setVisible(false);<NEW_LINE>}<NEW_LINE>if ((!fs.isSingleNormal()) || fs.isFilterSaved()) {<NEW_LINE>menu.findItem(R.id.menu_notifications).setVisible(false);<NEW_LINE>menu.findItem(R.id.menu_delete_feed).setVisible(false);<NEW_LINE>menu.findItem(R.id.menu_instafetch_feed).setVisible(false);<NEW_LINE>menu.findItem(R.id.menu_intel).setVisible(false);<NEW_LINE>menu.findItem(R.id.menu_rename_feed).setVisible(false);<NEW_LINE>menu.findItem(R.id.menu_statistics).setVisible(false);<NEW_LINE>}<NEW_LINE>if (!fs.isInfrequent()) {<NEW_LINE>menu.findItem(R.id.menu_infrequent_cutoff).setVisible(false);<NEW_LINE>}<NEW_LINE>return true;<NEW_LINE>}
.menu_read_filter).setVisible(false);
695,750
private void initDataTypeConstMap() {<NEW_LINE>for (int i = 0; i < DataTypeSensorToCK.values().length - 1; i++) {<NEW_LINE>DataTypeSensorToCK dt = DataTypeSensorToCK.values()[i];<NEW_LINE>if (i > this.getEntry().getDataTypeConst().size() - 1) {<NEW_LINE>dataTypeConstMap.put(dt.getIndex(), null);<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>String s = this.getEntry().<MASK><NEW_LINE>if ("NULL".equalsIgnoreCase(s)) {<NEW_LINE>dataTypeConstMap.put(dt.getIndex(), null);<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>switch(dt) {<NEW_LINE>case NUMBER:<NEW_LINE>dataTypeConstMap.put(dt.getIndex(), Long.valueOf(s));<NEW_LINE>break;<NEW_LINE>case STRING:<NEW_LINE>dataTypeConstMap.put(dt.getIndex(), s);<NEW_LINE>break;<NEW_LINE>case LIST:<NEW_LINE>dataTypeConstMap.put(dt.getIndex(), s);<NEW_LINE>break;<NEW_LINE>case DATE:<NEW_LINE>dataTypeConstMap.put(dt.getIndex(), Long.valueOf(s));<NEW_LINE>break;<NEW_LINE>case DATETIME:<NEW_LINE>dataTypeConstMap.put(dt.getIndex(), Long.valueOf(s));<NEW_LINE>break;<NEW_LINE>case BOOL:<NEW_LINE>dataTypeConstMap.put(dt.getIndex(), Integer.valueOf(s));<NEW_LINE>break;<NEW_LINE>case UNKNOWN:<NEW_LINE>dataTypeConstMap.put(dt.getIndex(), null);<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
getDataTypeConst().get(i);
1,388,931
private static Shape[] addBatterySymbol(Shape[] baseShape) {<NEW_LINE>Shape[] newShape = new Shape[baseShape.length + 1];<NEW_LINE>Rectangle2D bounds = baseShape[0].getBounds2D();<NEW_LINE>int offset = baseShape.length;<NEW_LINE>System.arraycopy(baseShape, 0, newShape, 0, baseShape.length);<NEW_LINE>Double vMargin = bounds.getHeight() / 8.0;<NEW_LINE>Double hMargin = bounds.getWidth() / 3.0;<NEW_LINE>Double cellWidth = hMargin / 3.0;<NEW_LINE>Double cellTop = bounds.getY() + 7 * vMargin;<NEW_LINE>Double cellBottom = bounds.getY() + vMargin;<NEW_LINE>Path2D.Double symbol = new Path2D.Double();<NEW_LINE>symbol.moveTo(bounds.getX() + hMargin, bounds.getCenterY());<NEW_LINE>symbol.lineTo(bounds.getX() + 2 * hMargin / 3, bounds.getCenterY());<NEW_LINE>for (Double x = bounds.getX() + hMargin; x < bounds.getX() + 2 * hMargin; x += cellWidth) {<NEW_LINE>symbol.moveTo(x, cellTop);<NEW_LINE><MASK><NEW_LINE>symbol.moveTo(x + cellWidth / 2.0, cellBottom + vMargin);<NEW_LINE>symbol.lineTo(x + cellWidth / 2.0, cellTop - vMargin);<NEW_LINE>}<NEW_LINE>symbol.moveTo(bounds.getX() + bounds.getWidth() - 2 * hMargin / 3 - cellWidth / 2, bounds.getCenterY());<NEW_LINE>symbol.lineTo(bounds.getX() + 2 * hMargin - cellWidth / 2, bounds.getCenterY());<NEW_LINE>newShape[offset] = symbol;<NEW_LINE>return newShape;<NEW_LINE>}
symbol.lineTo(x, cellBottom);
1,405,194
private TrainTestSplitter createStratifiedSplitter(Classification classification) {<NEW_LINE>String aggName = "dependent_variable_terms";<NEW_LINE>SearchRequestBuilder searchRequestBuilder = client.prepareSearch(config.getDest().getIndex()).setSize(0).setAllowPartialSearchResults(false).addAggregation(AggregationBuilders.terms(aggName).field(classification.getDependentVariable()).size(Classification.MAX_DEPENDENT_VARIABLE_CARDINALITY));<NEW_LINE>try {<NEW_LINE>SearchResponse searchResponse = ClientHelper.executeWithHeaders(config.getHeaders(), ClientHelper.ML_ORIGIN, client, searchRequestBuilder::get);<NEW_LINE>Aggregations aggs = searchResponse.getAggregations();<NEW_LINE>Terms terms = aggs.get(aggName);<NEW_LINE>Map<String, Long> <MASK><NEW_LINE>for (Terms.Bucket bucket : terms.getBuckets()) {<NEW_LINE>classCounts.put(String.valueOf(bucket.getKey()), bucket.getDocCount());<NEW_LINE>}<NEW_LINE>return new StratifiedTrainTestSplitter(fieldNames, classification.getDependentVariable(), classCounts, classification.getTrainingPercent(), classification.getRandomizeSeed());<NEW_LINE>} catch (Exception e) {<NEW_LINE>ParameterizedMessage msg = new ParameterizedMessage("[{}] Dependent variable terms search failed", config.getId());<NEW_LINE>LOGGER.error(msg, e);<NEW_LINE>throw new ElasticsearchException(msg.getFormattedMessage(), e);<NEW_LINE>}<NEW_LINE>}
classCounts = new HashMap<>();
248,892
public static void main(String[] args) throws Exception {<NEW_LINE>String loopBack = null;<NEW_LINE>LOG.log(Level.INFO, "Running main, port = ", args[0]);<NEW_LINE>Socket socket = new Socket(loopBack, Integer.parseInt(args[0]));<NEW_LINE>try {<NEW_LINE>AgentWorker worker = new AgentWorker();<NEW_LINE>LOG.log(Level.INFO, "Worker created", args[0]);<NEW_LINE>InputStream inStream = socket.getInputStream();<NEW_LINE>OutputStream outStream = socket.getOutputStream();<NEW_LINE>Map<String, Consumer<OutputStream>> chans = new HashMap<>();<NEW_LINE>chans.put("out", st -> System.setOut(new <MASK><NEW_LINE>chans.put("err", st -> System.setErr(new PrintStream(st, true)));<NEW_LINE>forwardExecutionControlAndIO(worker, inStream, outStream, chans, Collections.emptyMap());<NEW_LINE>} catch (EOFException ex) {<NEW_LINE>// ignore, forcible close by the tool<NEW_LINE>}<NEW_LINE>}
PrintStream(st, true)));
1,812,886
// Not public<NEW_LINE>Collection<LifecycleQueryInstalledChaincodesProposalResponse> lifecycleQueryInstalledChaincodes(LifecycleQueryInstalledChaincodesRequest lifecycleQueryInstalledChaincodesRequest, Collection<Peer> peers) throws InvalidArgumentException, ProposalException {<NEW_LINE>logger.trace("LifecycleQueryInstalledChaincodes");<NEW_LINE>if (null == lifecycleQueryInstalledChaincodesRequest) {<NEW_LINE>throw new InvalidArgumentException("The lifecycleQueryInstalledChaincodesRequest parameter can not be null.");<NEW_LINE>}<NEW_LINE>checkPeers(peers);<NEW_LINE>if (!isSystemChannel()) {<NEW_LINE>throw new InvalidArgumentException("LifecycleQueryInstalledChaincodes should only be invoked on system channel.");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>TransactionContext context = newTransactionContext(lifecycleQueryInstalledChaincodesRequest);<NEW_LINE>ProposalPackage.Proposal proposalBuilder = LifecycleQueryInstalledChaincodesBuilder.newBuilder().context(context).build();<NEW_LINE>ProposalPackage.SignedProposal <MASK><NEW_LINE>return sendProposalToPeers(peers, qProposal, context, LifecycleQueryInstalledChaincodesProposalResponse.class);<NEW_LINE>} catch (ProposalException e) {<NEW_LINE>throw e;<NEW_LINE>} catch (Exception e) {<NEW_LINE>throw new ProposalException(format("Query for peer %s channels failed. " + e.getMessage(), name), e);<NEW_LINE>}<NEW_LINE>}
qProposal = getSignedProposal(context, proposalBuilder);
1,605,819
public void formerSerialize(ByteBuffer buffer) {<NEW_LINE>buffer.put((byte) PhysicalPlanType.CREATE_ALIGNED_TIMESERIES.ordinal());<NEW_LINE>byte[] bytes = prefixPath.getFullPath().getBytes();<NEW_LINE>buffer.putInt(bytes.length);<NEW_LINE>buffer.put(bytes);<NEW_LINE>ReadWriteIOUtils.write(measurements.size(), buffer);<NEW_LINE>for (String measurement : measurements) {<NEW_LINE>ReadWriteIOUtils.write(measurement, buffer);<NEW_LINE>}<NEW_LINE>for (TSDataType dataType : dataTypes) {<NEW_LINE>buffer.put((byte) dataType.ordinal());<NEW_LINE>}<NEW_LINE>for (TSEncoding encoding : encodings) {<NEW_LINE>buffer.put((<MASK><NEW_LINE>}<NEW_LINE>for (CompressionType compressor : compressors) {<NEW_LINE>buffer.put((byte) compressor.ordinal());<NEW_LINE>}<NEW_LINE>// alias<NEW_LINE>if (aliasList != null && !aliasList.isEmpty()) {<NEW_LINE>buffer.put((byte) 1);<NEW_LINE>for (String alias : aliasList) {<NEW_LINE>ReadWriteIOUtils.write(alias, buffer);<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>buffer.put((byte) 0);<NEW_LINE>}<NEW_LINE>buffer.putLong(index);<NEW_LINE>}
byte) encoding.ordinal());
731,645
private Mono<Response<Void>> deleteWithResponseAsync(String resourceGroupName, String webTestName, Context context) {<NEW_LINE>if (this.client.getEndpoint() == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));<NEW_LINE>}<NEW_LINE>if (this.client.getSubscriptionId() == null) {<NEW_LINE>return Mono.<MASK><NEW_LINE>}<NEW_LINE>if (resourceGroupName == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));<NEW_LINE>}<NEW_LINE>if (webTestName == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter webTestName is required and cannot be null."));<NEW_LINE>}<NEW_LINE>final String apiVersion = "2015-05-01";<NEW_LINE>context = this.client.mergeContext(context);<NEW_LINE>return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, webTestName, apiVersion, context);<NEW_LINE>}
error(new IllegalArgumentException("Parameter this.client.getSubscriptionId() is required and cannot be null."));
1,063,400
protected JSDynamicObject doForeignObject(JSDynamicObject newTarget, Object object, Object byteOffset0, Object length0, @CachedLibrary("object") InteropLibrary interop, @Cached("createWriteOwn()") WriteElementNode writeOwnNode, @Cached ImportValueNode importValue, @Cached("createBinaryProfile()") ConditionProfile lengthIsUndefined) {<NEW_LINE>if (interop.hasBufferElements(object)) {<NEW_LINE>JSDynamicObject arrayBuffer = JSArrayBuffer.createInteropArrayBuffer(getContext(), getRealm(), object);<NEW_LINE>long bufferByteLength = getBufferSizeSafe(object, interop);<NEW_LINE>return doArrayBufferImpl(arrayBuffer, byteOffset0, length0, newTarget, bufferByteLength, false, true, lengthIsUndefined);<NEW_LINE>}<NEW_LINE>long length;<NEW_LINE>boolean fromArray = interop.hasArrayElements(object);<NEW_LINE>if (fromArray) {<NEW_LINE>length = toIndex(JSInteropUtil.getArraySize<MASK><NEW_LINE>} else if (interop.fitsInInt(object)) {<NEW_LINE>try {<NEW_LINE>length = toIndex(interop.asInt(object));<NEW_LINE>} catch (UnsupportedMessageException e) {<NEW_LINE>length = 0;<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>length = 0;<NEW_LINE>}<NEW_LINE>JSDynamicObject obj = createTypedArrayWithLength(length, newTarget);<NEW_LINE>if (fromArray) {<NEW_LINE>assert length <= Integer.MAX_VALUE;<NEW_LINE>for (int k = 0; k < length; k++) {<NEW_LINE>Object kValue = JSInteropUtil.readArrayElementOrDefault(object, k, 0, interop, importValue, this);<NEW_LINE>writeOwnNode.executeWithTargetAndIndexAndValue(obj, k, kValue);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return obj;<NEW_LINE>}
(object, interop, this));
730,006
public void onError(java.lang.Exception e) {<NEW_LINE>byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;<NEW_LINE>org.apache.thrift.TSerializable msg;<NEW_LINE>setQueryTimeParams_result result = new setQueryTimeParams_result();<NEW_LINE>if (e instanceof QueryException) {<NEW_LINE>result.err = (QueryException) e;<NEW_LINE>result.setErrIsSet(true);<NEW_LINE>msg = result;<NEW_LINE>} else if (e instanceof org.apache.thrift.transport.TTransportException) {<NEW_LINE>_LOGGER.error("TTransportException inside handler", e);<NEW_LINE>fb.close();<NEW_LINE>return;<NEW_LINE>} else if (e instanceof org.apache.thrift.TApplicationException) {<NEW_LINE>_LOGGER.error("TApplicationException inside handler", e);<NEW_LINE>msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;<NEW_LINE>msg = (org.apache.thrift.TApplicationException) e;<NEW_LINE>} else {<NEW_LINE>_LOGGER.error("Exception inside handler", e);<NEW_LINE>msgType = org.apache<MASK><NEW_LINE>msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>fcall.sendResponse(fb, msg, msgType, seqid);<NEW_LINE>} catch (java.lang.Exception ex) {<NEW_LINE>_LOGGER.error("Exception writing to internal frame buffer", ex);<NEW_LINE>fb.close();<NEW_LINE>}<NEW_LINE>}
.thrift.protocol.TMessageType.EXCEPTION;
1,212,622
protected void run() {<NEW_LINE>try {<NEW_LINE>runInterceptHook();<NEW_LINE>if (!trade.isPayoutPublished()) {<NEW_LINE>BtcWalletService walletService = processModel.getBtcWalletService();<NEW_LINE>String id = processModel.getOffer().getId();<NEW_LINE>Address address = walletService.getOrCreateAddressEntry(id, AddressEntry.Context.TRADE_PAYOUT).getAddress();<NEW_LINE>TransactionConfidence confidence = walletService.getConfidenceForAddress(address);<NEW_LINE>if (isInNetwork(confidence)) {<NEW_LINE>applyConfidence(confidence);<NEW_LINE>} else {<NEW_LINE>confidenceListener = new AddressConfidenceListener(address) {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void onTransactionConfidenceChanged(TransactionConfidence confidence) {<NEW_LINE>if (isInNetwork(confidence))<NEW_LINE>applyConfidence(confidence);<NEW_LINE>}<NEW_LINE>};<NEW_LINE>walletService.addAddressConfidenceListener(confidenceListener);<NEW_LINE>tradeStateSubscription = EasyBind.subscribe(trade.stateProperty(), newValue -> {<NEW_LINE>if (trade.isPayoutPublished()) {<NEW_LINE>processModel.getBtcWalletService().resetCoinLockedInMultiSigAddressEntry(trade.getId());<NEW_LINE>// hack to remove tradeStateSubscription at callback<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>});<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// we complete immediately, our object stays alive because the balanceListener is stored in the WalletService<NEW_LINE>complete();<NEW_LINE>} catch (Throwable t) {<NEW_LINE>failed(t);<NEW_LINE>}<NEW_LINE>}
UserThread.execute(this::unSubscribe);
1,367,608
public void run() {<NEW_LINE>start_sem.release();<NEW_LINE>long successful_accepts = 0;<NEW_LINE>long failed_accepts = 0;<NEW_LINE>while (!(manager_destroyed || search_destroyed)) {<NEW_LINE>try {<NEW_LINE>byte[] buf = new byte[8192];<NEW_LINE>DatagramPacket packet = new <MASK><NEW_LINE>control_socket.receive(packet);<NEW_LINE>successful_accepts++;<NEW_LINE>failed_accepts = 0;<NEW_LINE>if (receiveBeacon(packet.getAddress(), packet.getData(), packet.getLength())) {<NEW_LINE>persistent = true;<NEW_LINE>}<NEW_LINE>} catch (SocketTimeoutException e) {<NEW_LINE>} catch (Throwable e) {<NEW_LINE>if (control_socket != null && !search_destroyed && !manager_destroyed) {<NEW_LINE>failed_accepts++;<NEW_LINE>log("UDP receive on port " + CONTROL_PORT + " failed", e);<NEW_LINE>}<NEW_LINE>if ((failed_accepts > 100 && successful_accepts == 0) || failed_accepts > 1000) {<NEW_LINE>log(" too many failures, abandoning");<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
DatagramPacket(buf, buf.length);
1,740,413
public DispatchFrame mapRow(ResultSet rs, int rowNum) throws SQLException {<NEW_LINE>DispatchFrame frame = new DispatchFrame();<NEW_LINE>frame.id = rs.getString("pk_frame");<NEW_LINE>frame.name = rs.getString("frame_name");<NEW_LINE>frame.layerId = rs.getString("pk_layer");<NEW_LINE>frame.jobId = rs.getString("pk_job");<NEW_LINE>frame.showId = rs.getString("pk_show");<NEW_LINE>frame.facilityId = rs.getString("pk_facility");<NEW_LINE>frame.retries = rs.getInt("int_retries");<NEW_LINE>frame.state = FrameState.valueOf(rs.getString("frame_state"));<NEW_LINE>frame.command = rs.getString("str_cmd");<NEW_LINE>frame.<MASK><NEW_LINE>frame.layerName = rs.getString("layer_name");<NEW_LINE>frame.chunkSize = rs.getInt("int_chunk_size");<NEW_LINE>frame.range = rs.getString("str_range");<NEW_LINE>frame.logDir = rs.getString("str_log_dir");<NEW_LINE>frame.shot = rs.getString("str_shot");<NEW_LINE>frame.show = rs.getString("show_name");<NEW_LINE>frame.owner = rs.getString("str_user");<NEW_LINE>int uid = rs.getInt("int_uid");<NEW_LINE>frame.uid = rs.wasNull() ? Optional.empty() : Optional.of(uid);<NEW_LINE>frame.state = FrameState.valueOf(rs.getString("frame_state"));<NEW_LINE>frame.minCores = rs.getInt("int_cores_min");<NEW_LINE>frame.maxCores = rs.getInt("int_cores_max");<NEW_LINE>frame.threadable = rs.getBoolean("b_threadable");<NEW_LINE>frame.minMemory = rs.getLong("int_mem_min");<NEW_LINE>frame.minGpus = rs.getInt("int_gpus_min");<NEW_LINE>frame.maxGpus = rs.getInt("int_gpus_max");<NEW_LINE>frame.minGpuMemory = rs.getLong("int_gpu_mem_min");<NEW_LINE>frame.version = rs.getInt("int_version");<NEW_LINE>frame.services = rs.getString("str_services");<NEW_LINE>return frame;<NEW_LINE>}
jobName = rs.getString("job_name");
1,756,165
protected void initComponents(final String searchText) {<NEW_LINE>// TODO: merge here the changes from org.compiere.apps.search.InfoQueryCriteriaGeneral#initComponents, and drop that method<NEW_LINE>final IInfoSimple parent = getParent();<NEW_LINE>final I_AD_InfoColumn infoColumn = getAD_InfoColumn();<NEW_LINE>final Properties ctx = parent.getCtx();<NEW_LINE>final int windowNo = parent.getWindowNo();<NEW_LINE>final int displayType = infoColumn.getAD_Reference_ID();<NEW_LINE>final String columnName = infoColumn.getAD_Element().getColumnName();<NEW_LINE>Check.assumeNotNull(columnName, "The element {} does not have a column name set", infoColumn.getAD_Element());<NEW_LINE>if (DisplayType.YesNo == displayType) {<NEW_LINE>editor = createCheckboxEditor(label);<NEW_LINE>label = null;<NEW_LINE>} else if (DisplayType.List == displayType || DisplayType.Table == displayType || DisplayType.TableDir == displayType || DisplayType.Search == displayType) {<NEW_LINE>final MLookup lookup;<NEW_LINE>try {<NEW_LINE>lookup = // Column_ID,<NEW_LINE>MLookupFactory.// Column_ID,<NEW_LINE>get(// Column_ID,<NEW_LINE>ctx, // Column_ID,<NEW_LINE>windowNo, // tableName<NEW_LINE>0, // tableName<NEW_LINE>infoColumn.getAD_Reference_ID(), // IsParent<NEW_LINE>null, // IsParent<NEW_LINE>columnName, // IsParent<NEW_LINE>infoColumn.getAD_Reference_Value_ID(), <MASK><NEW_LINE>} catch (final Exception e) {<NEW_LINE>throw new AdempiereException(e);<NEW_LINE>}<NEW_LINE>// default value<NEW_LINE>final Object defaultValue = parent.getContextVariable(columnName);<NEW_LINE>editor = createLookupEditor(columnName, lookup, defaultValue);<NEW_LINE>//<NEW_LINE>if (infoColumn.isRange()) {<NEW_LINE>editor2 = createLookupEditor(columnName + "_2", lookup, null);<NEW_LINE>}<NEW_LINE>} else if (DisplayType.String == displayType) {<NEW_LINE>editor = createStringEditor(null);<NEW_LINE>//<NEW_LINE>if (infoColumn.isRange()) {<NEW_LINE>editor2 = createStringEditor(null);<NEW_LINE>}<NEW_LINE>} else // Number<NEW_LINE>if (DisplayType.isNumeric(displayType)) {<NEW_LINE>editor = createNumberEditor(columnName, infoColumn.getName(), displayType);<NEW_LINE>//<NEW_LINE>if (infoColumn.isRange()) {<NEW_LINE>editor2 = createNumberEditor(columnName + "_2", infoColumn.getName(), displayType);<NEW_LINE>}<NEW_LINE>} else // Date<NEW_LINE>if (DisplayType.isDate(displayType)) {<NEW_LINE>editor = createDateEditor(columnName, infoColumn.getName(), displayType);<NEW_LINE>//<NEW_LINE>if (infoColumn.isRange()) {<NEW_LINE>editor2 = createDateEditor(columnName + "_2", infoColumn.getName(), displayType);<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>throw new AdempiereException("Not supported reference: " + displayType);<NEW_LINE>}<NEW_LINE>}
false, infoColumn.getAD_Val_Rule_ID());
1,542,429
static private void scanDeadlineQueue(final long nowNanos, final PriorityBlockingQueue<QueryDeadline> deadlineQueue) {<NEW_LINE>final List<QueryDeadline> c = new ArrayList<QueryDeadline>(DEADLINE_QUEUE_SCAN_SIZE);<NEW_LINE>// drain up to that many elements.<NEW_LINE><MASK><NEW_LINE>int ndropped = 0, nrunning = 0;<NEW_LINE>for (QueryDeadline x : c) {<NEW_LINE>if (x.checkDeadline(nowNanos) != null) {<NEW_LINE>// return this query to the deadline queue.<NEW_LINE>deadlineQueue.add(x);<NEW_LINE>nrunning++;<NEW_LINE>} else {<NEW_LINE>ndropped++;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (log.isInfoEnabled())<NEW_LINE>log.info("Scan: threadhold=" + DEADLINE_QUEUE_SCAN_SIZE + ", ndropped=" + ndropped + ", nrunning=" + nrunning + ", deadlineQueueSize=" + deadlineQueue.size());<NEW_LINE>}
deadlineQueue.drainTo(c, DEADLINE_QUEUE_SCAN_SIZE);
648,347
public void sendWelcomeEmail(User user, boolean verifyEmail, HttpServletRequest req) {<NEW_LINE>// send welcome email notification<NEW_LINE>if (user != null) {<NEW_LINE>Map<String, Object> model = new HashMap<String, Object>();<NEW_LINE>Map<String, String> lang = getLang(req);<NEW_LINE>String subject = Utils.formatMessage(lang.get("signin.welcome"), CONF.appName());<NEW_LINE>String body1 = Utils.formatMessage(CONF.emailsWelcomeText1(lang), CONF.appName());<NEW_LINE>String body2 = CONF.emailsWelcomeText2(lang);<NEW_LINE>String body3 = getDefaultEmailSignature(CONF.emailsWelcomeText3(lang));<NEW_LINE>if (verifyEmail && !user.getActive() && !StringUtils.isBlank(user.getIdentifier())) {<NEW_LINE>Sysprop s = pc.read(user.getIdentifier());<NEW_LINE>if (s != null) {<NEW_LINE>String token = Utils.base64encURL(Utils.generateSecurityToken().getBytes());<NEW_LINE>s.addProperty(Config._EMAIL_TOKEN, token);<NEW_LINE>pc.update(s);<NEW_LINE>token = CONF.serverUrl() + CONF.serverContextPath() + SIGNINLINK + "/register?id=" + user.getId() + "&token=" + token;<NEW_LINE>body3 = "<b><a href=\"" + token + "\">" + lang.get("signin.welcome.verify") + "</a></b><br><br>" + body3;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>model.put("subject", escapeHtml(subject));<NEW_LINE>model.put("logourl", getSmallLogoUrl());<NEW_LINE>model.put("heading", Utils.formatMessage(lang.get("signin.welcome.title"), escapeHtml(user.getName())));<NEW_LINE>model.put("body", body1 + body2 + body3);<NEW_LINE>emailer.sendEmail(Arrays.asList(user.getEmail())<MASK><NEW_LINE>}<NEW_LINE>}
, subject, compileEmailTemplate(model));
214,567
public void login() throws LoginException {<NEW_LINE>// building the first one in the current thread ensures that LoginException and IllegalArgumentException can be thrown on login<NEW_LINE>JDAImpl jda = null;<NEW_LINE>try {<NEW_LINE>final int shardId = this.queue.isEmpty() ? 0 <MASK><NEW_LINE>jda = this.buildInstance(shardId);<NEW_LINE>try (UnlockHook hook = this.shards.writeLock()) {<NEW_LINE>this.shards.getMap().put(shardId, jda);<NEW_LINE>}<NEW_LINE>synchronized (queue) {<NEW_LINE>this.queue.remove(shardId);<NEW_LINE>}<NEW_LINE>} catch (final Exception e) {<NEW_LINE>if (jda != null) {<NEW_LINE>if (shardingConfig.isUseShutdownNow())<NEW_LINE>jda.shutdownNow();<NEW_LINE>else<NEW_LINE>jda.shutdown();<NEW_LINE>}<NEW_LINE>throw e;<NEW_LINE>}<NEW_LINE>runQueueWorker();<NEW_LINE>// this.worker = this.executor.scheduleWithFixedDelay(this::processQueue, 5000, 5000, TimeUnit.MILLISECONDS); // 5s for ratelimit<NEW_LINE>if (this.shutdownHook != null)<NEW_LINE>Runtime.getRuntime().addShutdownHook(this.shutdownHook);<NEW_LINE>}
: this.queue.peek();
830,996
public static void evaluateEventForStatement(EventBean theEvent, Map<String, Object> optionalTriggeringPattern, List<AgentInstance> agentInstances, AgentInstanceContext agentInstanceContextCreate) {<NEW_LINE>ContextStatementEventEvaluator evaluator = agentInstanceContextCreate.getContextServiceFactory().getContextStatementEventEvaluator();<NEW_LINE>if (theEvent != null) {<NEW_LINE>evaluator.evaluateEventForStatement(theEvent, agentInstances, agentInstanceContextCreate);<NEW_LINE>}<NEW_LINE>if (optionalTriggeringPattern != null) {<NEW_LINE>// evaluation order definition is up to the originator of the triggering pattern<NEW_LINE>for (Map.Entry<String, Object> entry : optionalTriggeringPattern.entrySet()) {<NEW_LINE>if (entry.getValue() instanceof EventBean) {<NEW_LINE>evaluator.evaluateEventForStatement((EventBean) entry.getValue(), agentInstances, agentInstanceContextCreate);<NEW_LINE>} else if (entry.getValue() instanceof EventBean[]) {<NEW_LINE>EventBean[] eventsArray = (EventBean[]) entry.getValue();<NEW_LINE>for (EventBean eventElement : eventsArray) {<NEW_LINE>evaluator.<MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
evaluateEventForStatement(eventElement, agentInstances, agentInstanceContextCreate);
1,104,284
private Finder doCheckLastSeenAndCreateFinder(ScreenImage base, Image img, double findTimeout, Pattern ptn) {<NEW_LINE>if (base == null) {<NEW_LINE>base = getScreen().capture(this);<NEW_LINE>}<NEW_LINE>boolean shouldCheckLastSeen = false;<NEW_LINE>float score = 0;<NEW_LINE>if (!Settings.UseImageFinder && Settings.CheckLastSeen && null != img.getLastSeen()) {<NEW_LINE>score = (float) (img.getLastSeenScore() - 0.01);<NEW_LINE>if (ptn != null) {<NEW_LINE>if (!(ptn.getSimilar() > score)) {<NEW_LINE>shouldCheckLastSeen = true;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (shouldCheckLastSeen) {<NEW_LINE>Region r = Region.create(img.getLastSeen());<NEW_LINE>if (this.contains(r)) {<NEW_LINE>Finder f = new Finder(base.getSub(r.getRect()), r);<NEW_LINE>if (Debug.shouldHighlight()) {<NEW_LINE>if (this.scr.getW() > w + 10 && this.scr.getH() > h + 10) {<NEW_LINE>highlight(2, "#000255000");<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (ptn == null) {<NEW_LINE>f.find(new Pattern(img).similar(score));<NEW_LINE>} else {<NEW_LINE>f.find(new Pattern(<MASK><NEW_LINE>}<NEW_LINE>if (f.hasNext()) {<NEW_LINE>log(lvl, "checkLastSeen: still there");<NEW_LINE>return f;<NEW_LINE>}<NEW_LINE>log(lvl, "checkLastSeen: not there");<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (Settings.UseImageFinder) {<NEW_LINE>ImageFinder f = new ImageFinder(this);<NEW_LINE>f.setFindTimeout(findTimeout);<NEW_LINE>return f;<NEW_LINE>} else {<NEW_LINE>return new Finder(base, this);<NEW_LINE>}<NEW_LINE>}
ptn).similar(score));
1,086,764
private void executeParallelProjections(List<Callable<Void>> parallelProjections, List<String> parallelProjectionNameOrder, BiConsumer<String, Throwable> projectionExceptionConsumer) {<NEW_LINE>ExecutorService executor = ForkJoinPool.commonPool();<NEW_LINE>try {<NEW_LINE>List<Future<Void>> futures = executor.invokeAll(parallelProjections);<NEW_LINE>// Futures are returned in the same order they were added, so<NEW_LINE>// use the list of ordered names to know which projections failed.<NEW_LINE>for (int i = 0; i < futures.size(); i++) {<NEW_LINE>try {<NEW_LINE>futures.get(i).get();<NEW_LINE>} catch (ExecutionException e) {<NEW_LINE>Throwable cause = e.getCause() != null ? e.getCause() : e;<NEW_LINE>String failedProjectionName = parallelProjectionNameOrder.get(i);<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE>} catch (InterruptedException e) {<NEW_LINE>throw new SmithyBuildException(e.getMessage(), e);<NEW_LINE>}<NEW_LINE>}
projectionExceptionConsumer.accept(failedProjectionName, cause);
375,451
public void updateBackground(Planar<T> frame) {<NEW_LINE>if (background.width != frame.width || background.height != frame.height) {<NEW_LINE>background.reshape(frame.width, frame.height);<NEW_LINE>GConvertImage.convert(frame, background);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>inputWrapper.wrap(frame);<NEW_LINE>final int numBands = background.getNumBands();<NEW_LINE>final float minusLearn = 1.0f - learnRate;<NEW_LINE>// CONCURRENT_REMOVE_LINE<NEW_LINE>storagePixels.reset();<NEW_LINE>// CONCURRENT_BELOW BoofConcurrency.loopBlocks(0, frame.height, 20, storagePixels, (inputPixels, idx0, idx1) -> {<NEW_LINE>final int idx0 = 0, idx1 = frame.height;<NEW_LINE>final float[] inputPixels = storagePixels.grow();<NEW_LINE>for (int y = idx0; y < idx1; y++) {<NEW_LINE>int indexBG = y * frame.width;<NEW_LINE>int indexInput = frame.startIndex + y * frame.stride;<NEW_LINE>final int end = indexInput + frame.width;<NEW_LINE>while (indexInput < end) {<NEW_LINE>inputWrapper.getF(indexInput, inputPixels);<NEW_LINE>for (int band = 0; band < numBands; band++) {<NEW_LINE>GrayF32 <MASK><NEW_LINE>backgroundBand.data[indexBG] = minusLearn * backgroundBand.data[indexBG] + learnRate * inputPixels[band];<NEW_LINE>}<NEW_LINE>indexInput++;<NEW_LINE>indexBG++;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// CONCURRENT_ABOVE }});<NEW_LINE>}
backgroundBand = background.getBand(band);
1,552,565
protected void updateBestResponse(SipServletRequest request, int errorCode, ProxyBranchImpl branch) {<NEW_LINE>if (c_logger.isTraceEntryExitEnabled()) {<NEW_LINE>c_logger.traceEntry(this, "updateBestResponse", new Object[] { request, new Integer(errorCode), branch });<NEW_LINE>}<NEW_LINE>if (branch.getRecurse() && errorCode >= 300 && errorCode < 400) {<NEW_LINE>// RFC 3261 Section 16.7 step 4,<NEW_LINE>// If the proxy chooses to recurse on any contacts in a 3xx response<NEW_LINE>// by adding them to the target set, it MUST remove them from the<NEW_LINE>// response before adding the response to the response context...<NEW_LINE>if (c_logger.isTraceDebugEnabled()) {<NEW_LINE>c_logger.traceDebug(this, <MASK><NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>SipServletResponseImpl response = null;<NEW_LINE>if (request.isInitial() && ((SipServletRequestImpl) request).isJSR289Application()) {<NEW_LINE>response = generateResponse(request, errorCode);<NEW_LINE>// Proxy Final response is not committed.<NEW_LINE>response.setIsCommited(false);<NEW_LINE>associateResponseWithSipSession(response, branch);<NEW_LINE>// Don't send branch response to application on 2xx & 6xx response<NEW_LINE>if (treat2xx6xxAsBestResponse(response.getStatus())) {<NEW_LINE>branch.notifyIntermediateBranchResponse(response);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (_bestResponse.getNewPreference(errorCode) != -1) {<NEW_LINE>if (response == null)<NEW_LINE>response = generateResponse(request, errorCode);<NEW_LINE>_bestResponse.updateBestResponse(response, branch);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (c_logger.isTraceEntryExitEnabled()) {<NEW_LINE>c_logger.traceExit(this, "updateBestResponse");<NEW_LINE>}<NEW_LINE>}
"updateBestResponse", getMyInfo() + "Not updating best response on a redirect response when proxy in recurse mode");
413,883
private static void startNewInlineLine(LayoutContext c, BlockBox box, int breakAtLine, byte blockLayoutDirection, SpaceVariables space, StateVariables current, StateVariables previous, int contentStart, List<InlineBox> openInlineBoxes, Map<InlineBox, InlineLayoutBox> iBMap, int minimumLineHeight, MarkerData markerData, List<FloatLayoutResult> pendingFloats, boolean hasFirstLinePEs, int lineOffset, InlineBox inlineBox, LineBreakContext lbContext) {<NEW_LINE>IdentValue align = inlineBox.getStyle().getIdent(CSSName.TEXT_ALIGN);<NEW_LINE>if (align != IdentValue.LEFT && (align != IdentValue.START || inlineBox.getTextDirection() != BidiSplitter.LTR)) {<NEW_LINE>current.line.trimTrailingSpace(c);<NEW_LINE>}<NEW_LINE>current.line.setEndsOnNL(lbContext.isEndsOnNL());<NEW_LINE>saveLine(current.line, c, box, minimumLineHeight, space.maxAvailableWidth, pendingFloats, hasFirstLinePEs, markerData, contentStart, isAlwaysBreak(c<MASK><NEW_LINE>if (current.line.isFirstLine() && hasFirstLinePEs) {<NEW_LINE>lbContext.setMaster(TextUtil.transformText(inlineBox.getText(), inlineBox.getStyle()));<NEW_LINE>}<NEW_LINE>previous.line = current.line;<NEW_LINE>current.line = newLine(c, previous.line, box);<NEW_LINE>current.line.setDirectionality(blockLayoutDirection);<NEW_LINE>current.layoutBox = addOpenInlineBoxes(c, current.line, openInlineBoxes, space.maxAvailableWidth, iBMap);<NEW_LINE>previous.layoutBox = current.layoutBox.getParent() instanceof LineBox ? null : (InlineLayoutBox) current.layoutBox.getParent();<NEW_LINE>space.remainingWidth = space.maxAvailableWidth;<NEW_LINE>space.remainingWidth -= c.getBlockFormattingContext().getFloatDistance(c, current.line, space.remainingWidth);<NEW_LINE>}
, box, breakAtLine, lineOffset));
826,111
final DescribePermissionSetResult executeDescribePermissionSet(DescribePermissionSetRequest describePermissionSetRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(describePermissionSetRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<DescribePermissionSetRequest> request = null;<NEW_LINE>Response<DescribePermissionSetResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new DescribePermissionSetRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(describePermissionSetRequest));<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, "SSO Admin");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DescribePermissionSet");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<DescribePermissionSetResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DescribePermissionSetResultJsonUnmarshaller());<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());
1,634,398
private int doStartService(Context context, Intent intent) {<NEW_LINE>// It seems that startService with intent without ClassName can fail due to a framework bug<NEW_LINE>// See: http://b/19873307 and http://b/24065801 for GCM<NEW_LINE>String className = resolveServiceClassName(context, intent);<NEW_LINE>if (className != null) {<NEW_LINE>if (Log.isLoggable(TAG, Log.DEBUG)) {<NEW_LINE>Log.d(TAG, "Restricting intent to a specific service: " + className);<NEW_LINE>}<NEW_LINE>intent.setClassName(context.getPackageName(), className);<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>ComponentName service;<NEW_LINE>if (hasWakeLockPermission(context)) {<NEW_LINE>service = WakeLockHolder.startWakefulService(context, intent);<NEW_LINE>} else {<NEW_LINE>service = context.startService(intent);<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>if (service == null) {<NEW_LINE>Log.e(TAG, "Error while delivering the message: ServiceIntent not found.");<NEW_LINE>return ERROR_NOT_FOUND;<NEW_LINE>}<NEW_LINE>return SUCCESS;<NEW_LINE>} catch (SecurityException ex) {<NEW_LINE>// It seems that startService with intent without ClassName can fail with<NEW_LINE>// SecurityException due to a framework bug. See: http://b/19873307 http://b/24065801<NEW_LINE>Log.e(TAG, "Error while delivering the message to the serviceIntent", ex);<NEW_LINE>return ERROR_SECURITY_EXCEPTION;<NEW_LINE>} catch (IllegalStateException e) {<NEW_LINE>// We tried to start a service while in the background, avoid crashing the app. This should<NEW_LINE>// never happen any more, but keep this catch here just in case.<NEW_LINE>Log.e(TAG, "Failed to start service while in background: " + e);<NEW_LINE>return ERROR_ILLEGAL_STATE_EXCEPTION;<NEW_LINE>}<NEW_LINE>}
Log.d(TAG, "Missing wake lock permission, service start may be delayed");
1,371,617
final GetLicenseResult executeGetLicense(GetLicenseRequest getLicenseRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(getLicenseRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<GetLicenseRequest> request = null;<NEW_LINE>Response<GetLicenseResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new GetLicenseRequestProtocolMarshaller(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, "License Manager");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "GetLicense");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<GetLicenseResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new GetLicenseResultJsonUnmarshaller());<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(getLicenseRequest));
1,770,841
public KeyspaceMetadata dropSecondaryIndex(final KeyspaceMetadata ksm, final CFMetaData cfm0, final Collection<Mutation> mutations, final Collection<Event.SchemaChange> events) throws RequestExecutionException {<NEW_LINE>KeyspaceMetadata ksm2 = ksm;<NEW_LINE>for (IndexMetadata idx : cfm0.getIndexes()) {<NEW_LINE>if (idx.isCustom() && idx.name.startsWith("elastic_")) {<NEW_LINE>String className = idx.options.get(IndexTarget.CUSTOM_INDEX_OPTION_NAME);<NEW_LINE>if (className != null && className.endsWith("ElasticSecondaryIndex")) {<NEW_LINE>IndexName indexName = new IndexName();<NEW_LINE>indexName.setKeyspace(ksm.name, true);<NEW_LINE>indexName.<MASK><NEW_LINE>DropIndexStatement dis = new DropIndexStatement(indexName, true);<NEW_LINE>CFMetaData cfm = dis.dropIndex(cfm0);<NEW_LINE>cfm.params = TableParams.builder(cfm.params).extensions(Collections.EMPTY_MAP).build();<NEW_LINE>ksm2 = ksm.withSwapped(ksm.tables.without(cfm.cfName).with(cfm));<NEW_LINE>logger.info("Drop secondary index '{}'", indexName);<NEW_LINE>Mutation.SimpleBuilder builder = SchemaKeyspace.makeCreateKeyspaceMutation(ksm.name, FBUtilities.timestampMicros());<NEW_LINE>SchemaKeyspace.dropIndexFromSchemaMutation(cfm, idx, builder);<NEW_LINE>// drop table extensions<NEW_LINE>SchemaKeyspace.addTableExtensionsToSchemaMutation(cfm, Collections.EMPTY_MAP, builder);<NEW_LINE>mutations.add(builder.build());<NEW_LINE>events.add(new Event.SchemaChange(Event.SchemaChange.Change.UPDATED, Event.SchemaChange.Target.TABLE, ksm.name, cfm.cfName));<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return ksm2;<NEW_LINE>}
setIndex(idx.name, true);
447,555
private Change updateSpectatorPositions() {<NEW_LINE>if (entityTracker == null) {<NEW_LINE>return CombinedChange.create();<NEW_LINE>}<NEW_LINE>List<Change> changes = new ArrayList<>();<NEW_LINE>timePath.updateAll();<NEW_LINE>for (Keyframe keyframe : positionPath.getKeyframes()) {<NEW_LINE>Optional<Integer> spectator = keyframe.getValue(SpectatorProperty.PROPERTY);<NEW_LINE>if (spectator.isPresent()) {<NEW_LINE>Optional<Integer> time = timePath.getValue(TimestampProperty.PROPERTY, keyframe.getTime());<NEW_LINE>if (!time.isPresent()) {<NEW_LINE>// No time keyframes set at this video time, cannot determine replay time<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>Location expected = entityTracker.getEntityPositionAtTimestamp(spectator.get(), time.get());<NEW_LINE>if (expected == null) {<NEW_LINE>// We don't have any data on this entity for some reason<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>Triple<Double, Double, Double> pos = keyframe.getValue(CameraProperties.POSITION).orElse(Triple.of(0D, 0D, 0D));<NEW_LINE>Triple<Float, Float, Float> rot = keyframe.getValue(CameraProperties.ROTATION).orElse(Triple.of<MASK><NEW_LINE>Location actual = new Location(pos.getLeft(), pos.getMiddle(), pos.getRight(), rot.getLeft(), rot.getRight());<NEW_LINE>if (!expected.equals(actual)) {<NEW_LINE>changes.add(UpdateKeyframeProperties.create(positionPath, keyframe).setValue(CameraProperties.POSITION, Triple.of(expected.getX(), expected.getY(), expected.getZ())).setValue(CameraProperties.ROTATION, Triple.of(expected.getYaw(), expected.getPitch(), 0f)).done());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return CombinedChange.create(changes.toArray(new Change[changes.size()]));<NEW_LINE>}
(0F, 0F, 0F));
922,625
final UpdateLoggerDefinitionResult executeUpdateLoggerDefinition(UpdateLoggerDefinitionRequest updateLoggerDefinitionRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(updateLoggerDefinitionRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<UpdateLoggerDefinitionRequest> request = null;<NEW_LINE>Response<UpdateLoggerDefinitionResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new UpdateLoggerDefinitionRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(updateLoggerDefinitionRequest));<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, "Greengrass");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "UpdateLoggerDefinition");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<UpdateLoggerDefinitionResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new UpdateLoggerDefinitionResultJsonUnmarshaller());<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());
1,553,728
public boolean performOk() {<NEW_LINE>List<QMObjectType> objectTypes = new ArrayList<>();<NEW_LINE>List<String> queryTypes = new ArrayList<>();<NEW_LINE>if (checkObjectTypeSessions.getSelection())<NEW_LINE>objectTypes.add(QMObjectType.session);<NEW_LINE>if (checkObjectTypeTxn.getSelection())<NEW_LINE>objectTypes.add(QMObjectType.txn);<NEW_LINE>if (checkObjectTypeQueries.getSelection())<NEW_LINE>objectTypes.add(QMObjectType.query);<NEW_LINE>if (checkQueryTypeUser.getSelection())<NEW_LINE>queryTypes.add(DBCExecutionPurpose.USER.name());<NEW_LINE>if (checkQueryTypeUserFiltered.getSelection())<NEW_LINE>queryTypes.add(DBCExecutionPurpose.USER_FILTERED.name());<NEW_LINE>if (checkQueryTypeScript.getSelection())<NEW_LINE>queryTypes.add(DBCExecutionPurpose.USER_SCRIPT.name());<NEW_LINE>if (checkQueryTypeUtil.getSelection())<NEW_LINE>queryTypes.add(DBCExecutionPurpose.UTIL.name());<NEW_LINE>if (checkQueryTypeMeta.getSelection())<NEW_LINE>queryTypes.add(DBCExecutionPurpose.META.name());<NEW_LINE>if (checkQueryTypeDDL.getSelection())<NEW_LINE>queryTypes.add(DBCExecutionPurpose.META_DDL.name());<NEW_LINE>Integer historyDays = UIUtils.getTextInteger(textHistoryDays);<NEW_LINE>Integer entriesPerPage = UIUtils.getTextInteger(textEntriesPerPage);<NEW_LINE>DBPPreferenceStore store = DBWorkbench.getPlatform().getPreferenceStore();<NEW_LINE>store.setValue(QMConstants.PROP_OBJECT_TYPES, QMObjectType.toString(objectTypes));<NEW_LINE>store.setValue(QMConstants.PROP_QUERY_TYPES, CommonUtils.makeString(queryTypes, ','));<NEW_LINE>if (historyDays != null) {<NEW_LINE>store.setValue(QMConstants.PROP_HISTORY_DAYS, historyDays);<NEW_LINE>}<NEW_LINE>if (entriesPerPage != null) {<NEW_LINE>store.setValue(QMConstants.PROP_ENTRIES_PER_PAGE, entriesPerPage);<NEW_LINE>}<NEW_LINE>store.setValue(QMConstants.PROP_STORE_LOG_FILE, checkStoreLog.getSelection());<NEW_LINE>store.setValue(QMConstants.<MASK><NEW_LINE>PrefUtils.savePreferenceStore(store);<NEW_LINE>return super.performOk();<NEW_LINE>}
PROP_LOG_DIRECTORY, textOutputFolder.getText());
1,321,532
private void basicCRUD(Realm realm) {<NEW_LINE>showStatus("Perform basic Create/Read/Update/Delete (CRUD) operations...");<NEW_LINE>// All writes must be wrapped in a transaction to facilitate safe multi threading<NEW_LINE>realm.executeTransaction(r -> {<NEW_LINE>// Add a person.<NEW_LINE>// RealmObjects with primary keys created with `createObject()` must specify the primary key value as an argument.<NEW_LINE>Person person = r.createObject(Person.class, 1);<NEW_LINE>person.setName("Young Person");<NEW_LINE>person.setAge(14);<NEW_LINE>// Even young people have at least one phone in this day and age.<NEW_LINE>// Please note that this is a RealmList that contains primitive values.<NEW_LINE>person.getPhoneNumbers().add("+1 123 4567");<NEW_LINE>});<NEW_LINE>// Find the first person (no query conditions) and read a field<NEW_LINE>final Person person = realm.where(Person.class).findFirst();<NEW_LINE>showStatus(person.getName() + ":" + person.getAge());<NEW_LINE>// Update person in a transaction<NEW_LINE>realm.executeTransaction(r -> {<NEW_LINE>// Managed objects can be modified inside transactions.<NEW_LINE>person.setName("Senior Person");<NEW_LINE>person.setAge(99);<NEW_LINE>showStatus(person.getName() + " got older: " + person.getAge());<NEW_LINE>});<NEW_LINE>// Delete all persons<NEW_LINE>showStatus("Deleting all persons");<NEW_LINE>realm.executeTransaction(r -> r<MASK><NEW_LINE>}
.delete(Person.class));
326,729
private FollowerInfo createTestFollowerInfo() {<NEW_LINE>List<Follower> test = new ArrayList<>();<NEW_LINE>test.add(createTestFollower(stream, 30, 24 * 60, true));<NEW_LINE>test.add(createTestFollower(stream, 80, 24 * 1087, true));<NEW_LINE>test.add(createTestFollower(stream, 90, 1, true));<NEW_LINE>test.add(createTestFollower(stream, 120, 10, false));<NEW_LINE>test.add(createTestFollower(stream, 180, 24 * 12, false));<NEW_LINE>test.add(createTestFollower(stream, 680, 36, false));<NEW_LINE>test.add(createTestFollower(stream, 980, 24 * 5, false));<NEW_LINE>test.add(createTestFollower(stream, 1800, 24 * 800, false));<NEW_LINE>test.add(createTestFollower(stream, 1900, 24 * 500, false));<NEW_LINE>test.add(createTestFollower(stream, 2900, 24 * 500, false));<NEW_LINE>test.add(createTestFollower(stream, 60 * 60, 24 * 321, false));<NEW_LINE>test.add(createTestFollower(stream, 60 * 60, 24 * 1234, false));<NEW_LINE>test.add(createTestFollower(stream, 60 * 60, 391, false));<NEW_LINE>test.add(createTestFollower(stream, 60 * 60 * 2, 60, false));<NEW_LINE>test.add(createTestFollower(stream, 60 * 60 * 3, 24 * 123, false));<NEW_LINE>test.add(createTestFollower(stream, 60 * 60 * 3, 24 * 5, false));<NEW_LINE>test.add(createTestFollower(stream, 60 * 60 * 24 * 2, 24 * 1, false));<NEW_LINE>test.add(createTestFollower(stream, 60 * 60 * 24 * 3, 24 * 234, false));<NEW_LINE>test.add(createTestFollower(stream, 60 * 60 * 24 * 8, 24 * 12, false));<NEW_LINE>test.add(createTestFollower(stream, 60 * 60 * 24 * 90, 24 * 800, false));<NEW_LINE>test.add(createTestFollower(stream, 60 * 60 * 24 * 90, 24 * 12544, false));<NEW_LINE>test.add(createTestFollower(stream, 60 * 60 * 24 * 180, 24 * 900, false));<NEW_LINE>test.add(createTestFollower(stream, 60 * 60 * 24 * 180, 24 * 900, false));<NEW_LINE>test.add(createTestFollower(stream, 60 * 60 * 24 * 180<MASK><NEW_LINE>test.add(createTestFollower(stream, 60 * 60 * 24 * 180, 24 * 900, false));<NEW_LINE>return new FollowerInfo(Follower.Type.FOLLOWER, stream, test, 1338, -1);<NEW_LINE>}
, 24 * 900, false));
1,419,143
public RecommendedList recommendRating(LibrecDataList<AbstractBaseDataEntry> dataList) throws LibrecException {<NEW_LINE>int numDataEntries = dataList.size();<NEW_LINE>RecommendedList recommendedList = new RecommendedList(numDataEntries);<NEW_LINE>for (int contextIdx = 0; contextIdx < numDataEntries; ++contextIdx) {<NEW_LINE>recommendedList.addList(new ArrayList<>());<NEW_LINE>BaseRatingDataEntry baseRatingDataEntry = (<MASK><NEW_LINE>int userIdx = baseRatingDataEntry.getUserId();<NEW_LINE>int[] itemIdsArray = baseRatingDataEntry.getItemIdsArray();<NEW_LINE>for (int itemIdx : itemIdsArray) {<NEW_LINE>double predictRating = predict(userIdx, itemIdx, true);<NEW_LINE>if (Double.isNaN(predictRating)) {<NEW_LINE>predictRating = globalMean;<NEW_LINE>}<NEW_LINE>recommendedList.add(contextIdx, itemIdx, predictRating);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return recommendedList;<NEW_LINE>}
BaseRatingDataEntry) dataList.getDataEntry(contextIdx);
651,619
public void run(String... args) {<NEW_LINE>CommandLineOptions options = new CommandLineOptions(args);<NEW_LINE>if (options.help()) {<NEW_LINE>out.println(options.helpText());<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>FileSource fileSource = options.filesRoot();<NEW_LINE>fileSource.createIfNecessary();<NEW_LINE>FileSource filesFileSource = fileSource.child(FILES_ROOT);<NEW_LINE>filesFileSource.createIfNecessary();<NEW_LINE>FileSource mappingsFileSource = fileSource.child(MAPPINGS_ROOT);<NEW_LINE>mappingsFileSource.createIfNecessary();<NEW_LINE>wireMockServer = new WireMockServer(options);<NEW_LINE>if (options.recordMappingsEnabled()) {<NEW_LINE>wireMockServer.enableRecordMappings(mappingsFileSource, filesFileSource);<NEW_LINE>}<NEW_LINE>if (options.specifiesProxyUrl()) {<NEW_LINE>addProxyMapping(options.proxyUrl());<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>wireMockServer.start();<NEW_LINE>boolean https = options.httpsSettings().enabled();<NEW_LINE>if (!options.getHttpDisabled()) {<NEW_LINE>options.setActualHttpPort(wireMockServer.port());<NEW_LINE>}<NEW_LINE>if (https) {<NEW_LINE>options.<MASK><NEW_LINE>}<NEW_LINE>if (!options.bannerDisabled()) {<NEW_LINE>out.println(BANNER);<NEW_LINE>out.println();<NEW_LINE>} else {<NEW_LINE>out.println();<NEW_LINE>out.println("The WireMock server is started .....");<NEW_LINE>}<NEW_LINE>out.println(options);<NEW_LINE>} catch (FatalStartupException e) {<NEW_LINE>System.err.println(e.getMessage());<NEW_LINE>System.exit(1);<NEW_LINE>}<NEW_LINE>}
setActualHttpsPort(wireMockServer.httpsPort());
1,533,204
public void marshall(StorageDescriptor storageDescriptor, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (storageDescriptor == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(storageDescriptor.getColumns(), COLUMNS_BINDING);<NEW_LINE>protocolMarshaller.marshall(storageDescriptor.getLocation(), LOCATION_BINDING);<NEW_LINE>protocolMarshaller.marshall(storageDescriptor.getAdditionalLocations(), ADDITIONALLOCATIONS_BINDING);<NEW_LINE>protocolMarshaller.marshall(storageDescriptor.getInputFormat(), INPUTFORMAT_BINDING);<NEW_LINE>protocolMarshaller.marshall(storageDescriptor.getOutputFormat(), OUTPUTFORMAT_BINDING);<NEW_LINE>protocolMarshaller.marshall(storageDescriptor.getCompressed(), COMPRESSED_BINDING);<NEW_LINE>protocolMarshaller.marshall(storageDescriptor.getNumberOfBuckets(), NUMBEROFBUCKETS_BINDING);<NEW_LINE>protocolMarshaller.marshall(storageDescriptor.getSerdeInfo(), SERDEINFO_BINDING);<NEW_LINE>protocolMarshaller.marshall(storageDescriptor.getBucketColumns(), BUCKETCOLUMNS_BINDING);<NEW_LINE>protocolMarshaller.marshall(storageDescriptor.getSortColumns(), SORTCOLUMNS_BINDING);<NEW_LINE>protocolMarshaller.marshall(storageDescriptor.getParameters(), PARAMETERS_BINDING);<NEW_LINE>protocolMarshaller.marshall(<MASK><NEW_LINE>protocolMarshaller.marshall(storageDescriptor.getStoredAsSubDirectories(), STOREDASSUBDIRECTORIES_BINDING);<NEW_LINE>protocolMarshaller.marshall(storageDescriptor.getSchemaReference(), SCHEMAREFERENCE_BINDING);<NEW_LINE>} catch (Exception e) {<NEW_LINE>throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e);<NEW_LINE>}<NEW_LINE>}
storageDescriptor.getSkewedInfo(), SKEWEDINFO_BINDING);
485,723
final DescribeOrganizationConformancePacksResult executeDescribeOrganizationConformancePacks(DescribeOrganizationConformancePacksRequest describeOrganizationConformancePacksRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(describeOrganizationConformancePacksRequest);<NEW_LINE><MASK><NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<DescribeOrganizationConformancePacksRequest> request = null;<NEW_LINE>Response<DescribeOrganizationConformancePacksResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new DescribeOrganizationConformancePacksRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(describeOrganizationConformancePacksRequest));<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, "Config Service");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DescribeOrganizationConformancePacks");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<DescribeOrganizationConformancePacksResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DescribeOrganizationConformancePacksResultJsonUnmarshaller());<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();
55,592
@JSONP<NEW_LINE>@NoCache<NEW_LINE>@Path("/reindex")<NEW_LINE>@Produces({ MediaType.APPLICATION_JSON })<NEW_LINE>public Response startReindex(@Context final HttpServletRequest request, @Context final HttpServletResponse response, @QueryParam("shards") int shards, @DefaultValue(DOTALL) @QueryParam("contentType") String contentType) throws DotDataException, DotSecurityException {<NEW_LINE>final InitDataObject <MASK><NEW_LINE>shards = (shards <= 0) ? Config.getIntProperty("es.index.number_of_shards", 2) : shards;<NEW_LINE>System.setProperty("es.index.number_of_shards", String.valueOf(shards));<NEW_LINE>Logger.info(this, "Running Contentlet Reindex");<NEW_LINE>if (!DOTALL.equals(contentType)) {<NEW_LINE>ContentType type = APILocator.getContentTypeAPI(APILocator.systemUser()).find(contentType);<NEW_LINE>Logger.info(this.getClass(), "Starting reindex of " + type.name());<NEW_LINE>APILocator.getContentletIndexAPI().removeContentFromIndexByStructureInode(type.id());<NEW_LINE>APILocator.getContentletAPI().refresh(type);<NEW_LINE>} else {<NEW_LINE>APILocator.getContentletAPI().refreshAllContent();<NEW_LINE>}<NEW_LINE>return getReindexationProgress(request, response);<NEW_LINE>}
init = auth(request, response);
774,997
public static void main(String[] args) {<NEW_LINE>Exercise19<Integer> linkedList = new Exercise19<>();<NEW_LINE>linkedList.add(0);<NEW_LINE>linkedList.add(1);<NEW_LINE>linkedList.add(2);<NEW_LINE>linkedList.add(3);<NEW_LINE>StdOut.println("Before removing last node");<NEW_LINE>StringJoiner listBeforeRemove = new StringJoiner(" ");<NEW_LINE>for (int number : linkedList) {<NEW_LINE>listBeforeRemove.add(String.valueOf(number));<NEW_LINE>}<NEW_LINE>StdOut.println(listBeforeRemove.toString());<NEW_LINE>StdOut.println("Expected: 0 1 2 3");<NEW_LINE>linkedList.deleteLastNode();<NEW_LINE>StdOut.println("\nAfter removing last node");<NEW_LINE>StringJoiner listAfterRemove = new StringJoiner(" ");<NEW_LINE>for (int number : linkedList) {<NEW_LINE>listAfterRemove.add<MASK><NEW_LINE>}<NEW_LINE>StdOut.println(listAfterRemove.toString());<NEW_LINE>StdOut.println("Expected: 0 1 2");<NEW_LINE>}
(String.valueOf(number));
1,748,926
public static TruffleString temporalDateTimeToString(int year, int month, int day, int hour, int minute, int second, int millisecond, int microsecond, int nanosecond, JSDynamicObject calendar, Object precision, ShowCalendar showCalendar) {<NEW_LINE>TruffleString yearString = TemporalUtil.padISOYear(year);<NEW_LINE>TruffleString monthString = Strings.format("%1$02d", month);<NEW_LINE>TruffleString dayString = <MASK><NEW_LINE>TruffleString hourString = Strings.format("%1$02d", hour);<NEW_LINE>TruffleString minuteString = Strings.format("%1$02d", minute);<NEW_LINE>TruffleString secondString = TemporalUtil.formatSecondsStringPart(second, millisecond, microsecond, nanosecond, precision);<NEW_LINE>TruffleString calendarID = JSRuntime.toString(calendar);<NEW_LINE>TruffleString calendarString = TemporalUtil.formatCalendarAnnotation(calendarID, showCalendar);<NEW_LINE>return Strings.format("%s-%s-%sT%s:%s%s%s", yearString, monthString, dayString, hourString, minuteString, secondString, calendarString);<NEW_LINE>}
Strings.format("%1$02d", day);
1,248,921
public Result process(CvPipeline pipeline) throws Exception {<NEW_LINE>if (templateMatchesStageName == null || templateMatchesStageName.trim().isEmpty()) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>Result result = pipeline.getExpectedResult(templateMatchesStageName);<NEW_LINE>if (result.model == null) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE><MASK><NEW_LINE>List<TemplateMatch> matches = result.getExpectedListModel(TemplateMatch.class, null);<NEW_LINE>for (int i = 0; i < matches.size(); i++) {<NEW_LINE>TemplateMatch match = matches.get(i);<NEW_LINE>double x = match.x;<NEW_LINE>double y = match.y;<NEW_LINE>double score = match.score;<NEW_LINE>double width = match.width;<NEW_LINE>double height = match.height;<NEW_LINE>Color color_ = this.color == null ? FluentCv.indexedColor(i) : this.color;<NEW_LINE>Scalar color = FluentCv.colorToScalar(color_);<NEW_LINE>Imgproc.rectangle(mat, new org.opencv.core.Point(x, y), new org.opencv.core.Point(x + width, y + height), color);<NEW_LINE>Imgproc.putText(mat, String.format(Locale.US, "%.3f", score), new org.opencv.core.Point(x + width, y + height), Imgproc.FONT_HERSHEY_PLAIN, 1.0, color);<NEW_LINE>}<NEW_LINE>return null;<NEW_LINE>}
Mat mat = pipeline.getWorkingImage();
609,560
public static RoaringBitmap or(final RoaringBitmap x1, final RoaringBitmap x2) {<NEW_LINE>final RoaringBitmap answer = new RoaringBitmap();<NEW_LINE>int pos1 = 0, pos2 = 0;<NEW_LINE>final int length1 = x1.highLowContainer.size(), length2 = x2.highLowContainer.size();<NEW_LINE>main: if (pos1 < length1 && pos2 < length2) {<NEW_LINE>char s1 = <MASK><NEW_LINE>char s2 = x2.highLowContainer.getKeyAtIndex(pos2);<NEW_LINE>while (true) {<NEW_LINE>if (s1 == s2) {<NEW_LINE>answer.highLowContainer.append(s1, x1.highLowContainer.getContainerAtIndex(pos1).or(x2.highLowContainer.getContainerAtIndex(pos2)));<NEW_LINE>pos1++;<NEW_LINE>pos2++;<NEW_LINE>if ((pos1 == length1) || (pos2 == length2)) {<NEW_LINE>break main;<NEW_LINE>}<NEW_LINE>s1 = x1.highLowContainer.getKeyAtIndex(pos1);<NEW_LINE>s2 = x2.highLowContainer.getKeyAtIndex(pos2);<NEW_LINE>} else if (s1 < s2) {<NEW_LINE>answer.highLowContainer.appendCopy(x1.highLowContainer, pos1);<NEW_LINE>pos1++;<NEW_LINE>if (pos1 == length1) {<NEW_LINE>break main;<NEW_LINE>}<NEW_LINE>s1 = x1.highLowContainer.getKeyAtIndex(pos1);<NEW_LINE>} else {<NEW_LINE>answer.highLowContainer.appendCopy(x2.highLowContainer, pos2);<NEW_LINE>pos2++;<NEW_LINE>if (pos2 == length2) {<NEW_LINE>break main;<NEW_LINE>}<NEW_LINE>s2 = x2.highLowContainer.getKeyAtIndex(pos2);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (pos1 == length1) {<NEW_LINE>answer.highLowContainer.appendCopy(x2.highLowContainer, pos2, length2);<NEW_LINE>} else if (pos2 == length2) {<NEW_LINE>answer.highLowContainer.appendCopy(x1.highLowContainer, pos1, length1);<NEW_LINE>}<NEW_LINE>return answer;<NEW_LINE>}
x1.highLowContainer.getKeyAtIndex(pos1);
537,738
public IHarvestResult harvestBlock(@Nonnull IFarmer farm, @Nonnull BlockPos bc, @Nonnull final IBlockState stateIn) {<NEW_LINE>IBlockState state = stateIn;<NEW_LINE>Block block = state.getBlock();<NEW_LINE>if (block != getPlantedBlock()) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>if (!farm.hasTool(FarmingTool.HOE)) {<NEW_LINE>farm.setNotification(FarmNotification.NO_HOE);<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>IHarvestResult res = new HarvestResult();<NEW_LINE>BlockPos checkBlock = bc;<NEW_LINE>while (checkBlock != null && checkBlock.getY() <= 255 && farm.hasTool(FarmingTool.HOE)) {<NEW_LINE>state = farm.getBlockState(checkBlock);<NEW_LINE>block = state.getBlock();<NEW_LINE>if (block != getPlantedBlock()) {<NEW_LINE>checkBlock = null;<NEW_LINE>} else {<NEW_LINE>if (getFullyGrownBlockMeta() == block.getMetaFromState(state)) {<NEW_LINE>IHarvestResult blockRes = super.<MASK><NEW_LINE>if (blockRes != null) {<NEW_LINE>res.getHarvestedBlocks().add(checkBlock);<NEW_LINE>res.getDrops().addAll(blockRes.getDrops());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>checkBlock = checkBlock.up();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (res.getHarvestedBlocks().isEmpty()) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>return res;<NEW_LINE>}
harvestBlock(farm, checkBlock, state);
40,163
NexentaStorZvol createIscsiVolume(String volumeName, Long volumeSize) {<NEW_LINE>final String zvolName = getVolumeName(volumeName);<NEW_LINE>String volumeSizeString = String.format("%dB", volumeSize);<NEW_LINE>client.execute(NmsResponse.class, "zvol", "create", zvolName, volumeSizeString, parameters.getVolumeBlockSize(), parameters.isSparseVolumes());<NEW_LINE>final String targetName = getTargetName(volumeName);<NEW_LINE>final String targetGroupName = getTargetGroupName(volumeName);<NEW_LINE>if (!isIscsiTargetExists(targetName)) {<NEW_LINE>createIscsiTarget(targetName);<NEW_LINE>}<NEW_LINE>if (!isIscsiTargetGroupExists(targetGroupName)) {<NEW_LINE>createIscsiTargetGroup(targetGroupName);<NEW_LINE>}<NEW_LINE>if (!isTargetMemberOfTargetGroup(targetGroupName, targetName)) {<NEW_LINE>addTargetGroupMember(targetGroupName, targetName);<NEW_LINE>}<NEW_LINE>if (!isLuExists(zvolName)) {<NEW_LINE>createLu(zvolName);<NEW_LINE>}<NEW_LINE>if (!isLuShared(zvolName)) {<NEW_LINE>addLuMappingEntry(zvolName, targetGroupName);<NEW_LINE>}<NEW_LINE><MASK><NEW_LINE>}
return new NexentaStorZvol(zvolName, targetName);
120,564
// TODO: export also UI gestures file if available, preferably based on user option<NEW_LINE>private static void export(final FileObject sourceFO, final File targetFile) {<NEW_LINE>final ProgressHandle progress = ProgressHandle.createHandle(Bundle.ExportSnapshotAction_ProgressMsg());<NEW_LINE>progress.setInitialDelay(500);<NEW_LINE>RequestProcessor.getDefault().post(new Runnable() {<NEW_LINE><NEW_LINE>public void run() {<NEW_LINE>progress.start();<NEW_LINE>try {<NEW_LINE>if (targetFile.exists() && !targetFile.delete()) {<NEW_LINE>ProfilerDialogs.displayError(Bundle.ExportSnapshotAction_CannotReplaceMsg(targetFile.getName()));<NEW_LINE>} else {<NEW_LINE>targetFile.toPath();<NEW_LINE>File targetParent = FileUtil.normalizeFile(targetFile.getParentFile());<NEW_LINE>FileObject targetFO = FileUtil.toFileObject(targetParent);<NEW_LINE>String targetName = targetFile.getName();<NEW_LINE>FileUtil.copyFile(sourceFO, targetFO, targetName, null);<NEW_LINE>}<NEW_LINE>} catch (Throwable t) {<NEW_LINE>// NOI18N<NEW_LINE>ProfilerLogger.log(<MASK><NEW_LINE>// NOI18N<NEW_LINE>String msg = t.getLocalizedMessage().replace("<", "&lt;").replace(">", "&gt;");<NEW_LINE>// NOI18N<NEW_LINE>ProfilerDialogs.// NOI18N<NEW_LINE>displayError(// NOI18N<NEW_LINE>"<html><b>" + Bundle.ExportSnapshotAction_ExportFailedMsg() + "</b><br><br>" + msg + "</html>");<NEW_LINE>} finally {<NEW_LINE>progress.finish();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>});<NEW_LINE>}
"Failed to export NPSS snapshot: " + t.getMessage());
636,828
Model fromModelRef(springfox.documentation.schema.ModelReference modelRef) {<NEW_LINE>if (modelRef.isCollection()) {<NEW_LINE>if (modelRef.getItemType().equals("byte")) {<NEW_LINE>ModelImpl baseModel = new ModelImpl();<NEW_LINE>baseModel.setType("string");<NEW_LINE>baseModel.setFormat("byte");<NEW_LINE>return maybeAddAllowableValuesToParameter(<MASK><NEW_LINE>} else if (modelRef.getItemType().equals("file")) {<NEW_LINE>ArrayModel files = new ArrayModel();<NEW_LINE>files.items(new FileProperty());<NEW_LINE>return files;<NEW_LINE>}<NEW_LINE>springfox.documentation.schema.ModelReference itemModel = modelRef.itemModel().orElseThrow(() -> new IllegalStateException("ModelRef that is a collection should have an itemModel"));<NEW_LINE>return new ArrayModel().items(maybeAddAllowableValues(springfox.documentation.swagger2.mappers.Properties.itemTypeProperty(itemModel), itemModel.getAllowableValues()));<NEW_LINE>}<NEW_LINE>if (modelRef.isMap()) {<NEW_LINE>ModelImpl baseModel = new ModelImpl();<NEW_LINE>springfox.documentation.schema.ModelReference itemModel = modelRef.itemModel().orElseThrow(() -> new IllegalStateException("ModelRef that is a map should have an itemModel"));<NEW_LINE>baseModel.additionalProperties(maybeAddAllowableValues(springfox.documentation.swagger2.mappers.Properties.itemTypeProperty(itemModel), itemModel.getAllowableValues()));<NEW_LINE>return baseModel;<NEW_LINE>}<NEW_LINE>if (springfox.documentation.schema.Types.isBaseType(modelRef.getType())) {<NEW_LINE>Property property = springfox.documentation.swagger2.mappers.Properties.property(modelRef.getType());<NEW_LINE>ModelImpl baseModel = new ModelImpl();<NEW_LINE>baseModel.setType(property.getType());<NEW_LINE>baseModel.setFormat(property.getFormat());<NEW_LINE>return maybeAddAllowableValuesToParameter(baseModel, modelRef.getAllowableValues());<NEW_LINE>}<NEW_LINE>return new RefModel(modelRef.getType());<NEW_LINE>}
baseModel, modelRef.getAllowableValues());
595,799
final DeleteUserPoolDomainResult executeDeleteUserPoolDomain(DeleteUserPoolDomainRequest deleteUserPoolDomainRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(deleteUserPoolDomainRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<DeleteUserPoolDomainRequest> request = null;<NEW_LINE>Response<DeleteUserPoolDomainResult> response = null;<NEW_LINE>try {<NEW_LINE><MASK><NEW_LINE>try {<NEW_LINE>request = new DeleteUserPoolDomainRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(deleteUserPoolDomainRequest));<NEW_LINE>// Binds the request metrics to the current request.<NEW_LINE>request.setAWSRequestMetrics(awsRequestMetrics);<NEW_LINE>request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);<NEW_LINE>request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SERVICE_ID, "Cognito Identity Provider");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteUserPoolDomain");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<DeleteUserPoolDomainResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeleteUserPoolDomainResultJsonUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
553,049
public void loginAsync(long accountId, String passwordTemp, long providerId, boolean retry) {<NEW_LINE>mAccountId = accountId;<NEW_LINE>mPassword = passwordTemp;<NEW_LINE>mProviderId = providerId;<NEW_LINE>mRetryLogin = retry;<NEW_LINE>ContentResolver contentResolver = mContext.getContentResolver();<NEW_LINE>if (mPassword == null)<NEW_LINE>mPassword = Imps.Account.getPassword(contentResolver, mAccountId);<NEW_LINE>mIsGoogleAuth = mPassword.startsWith(GTalkOAuth2.NAME);<NEW_LINE>if (mIsGoogleAuth) {<NEW_LINE>mPassword = mPassword<MASK><NEW_LINE>}<NEW_LINE>Cursor cursor = contentResolver.query(Imps.ProviderSettings.CONTENT_URI, new String[] { Imps.ProviderSettings.NAME, Imps.ProviderSettings.VALUE }, Imps.ProviderSettings.PROVIDER + "=?", new String[] { Long.toString(mProviderId) }, null);<NEW_LINE>if (cursor == null)<NEW_LINE>return;<NEW_LINE>Imps.ProviderSettings.QueryMap providerSettings = new Imps.ProviderSettings.QueryMap(cursor, contentResolver, mProviderId, false, null);<NEW_LINE>mUser = makeUser(providerSettings, contentResolver);<NEW_LINE>providerSettings.close();<NEW_LINE>execute(new Runnable() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void run() {<NEW_LINE>do_login();<NEW_LINE>}<NEW_LINE>});<NEW_LINE>}
.split(":")[1];
1,396,786
final UpdateDistributionResult executeUpdateDistribution(UpdateDistributionRequest updateDistributionRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(updateDistributionRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<UpdateDistributionRequest> request = null;<NEW_LINE>Response<UpdateDistributionResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new UpdateDistributionRequestMarshaller().marshall(super.beforeMarshalling(updateDistributionRequest));<NEW_LINE>// Binds the request metrics to the current request.<NEW_LINE>request.setAWSRequestMetrics(awsRequestMetrics);<NEW_LINE>request.<MASK><NEW_LINE>request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SERVICE_ID, "CloudFront");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "UpdateDistribution");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>StaxResponseHandler<UpdateDistributionResult> responseHandler = new StaxResponseHandler<UpdateDistributionResult>(new UpdateDistributionResultStaxUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);