idx
int32
46
1.86M
input
stringlengths
321
6.6k
target
stringlengths
9
1.24k
235,981
public static DescribeLiveDomainStreamTranscodeDataResponse unmarshall(DescribeLiveDomainStreamTranscodeDataResponse describeLiveDomainStreamTranscodeDataResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeLiveDomainStreamTranscodeDataResponse.setRequestId<MASK><NEW_LINE>List<TranscodeData> transcodeDataList = new ArrayList<TranscodeData>();<NEW_LINE>for (int i = 0; i < _ctx.lengthValue("DescribeLiveDomainStreamTranscodeDataResponse.TranscodeDataList.Length"); i++) {<NEW_LINE>TranscodeData transcodeData = new TranscodeData();<NEW_LINE>transcodeData.setTanscodeType(_ctx.stringValue("DescribeLiveDomainStreamTranscodeDataResponse.TranscodeDataList[" + i + "].TanscodeType"));<NEW_LINE>transcodeData.setDomain(_ctx.stringValue("DescribeLiveDomainStreamTranscodeDataResponse.TranscodeDataList[" + i + "].Domain"));<NEW_LINE>transcodeData.setRegion(_ctx.stringValue("DescribeLiveDomainStreamTranscodeDataResponse.TranscodeDataList[" + i + "].Region"));<NEW_LINE>transcodeData.setDuration(_ctx.integerValue("DescribeLiveDomainStreamTranscodeDataResponse.TranscodeDataList[" + i + "].Duration"));<NEW_LINE>transcodeData.setTimeStamp(_ctx.stringValue("DescribeLiveDomainStreamTranscodeDataResponse.TranscodeDataList[" + i + "].TimeStamp"));<NEW_LINE>transcodeData.setFps(_ctx.stringValue("DescribeLiveDomainStreamTranscodeDataResponse.TranscodeDataList[" + i + "].Fps"));<NEW_LINE>transcodeData.setResolution(_ctx.stringValue("DescribeLiveDomainStreamTranscodeDataResponse.TranscodeDataList[" + i + "].Resolution"));<NEW_LINE>transcodeDataList.add(transcodeData);<NEW_LINE>}<NEW_LINE>describeLiveDomainStreamTranscodeDataResponse.setTranscodeDataList(transcodeDataList);<NEW_LINE>return describeLiveDomainStreamTranscodeDataResponse;<NEW_LINE>}
(_ctx.stringValue("DescribeLiveDomainStreamTranscodeDataResponse.RequestId"));
1,303,952
private void convertContextIDBeforeInvoke(ContextID contextID, int index) throws CSErrorException {<NEW_LINE>if (null == contextID) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (StringUtils.isNumeric(contextID.getContextId())) {<NEW_LINE>if (HAContextID.class.isInstance(contextID)) {<NEW_LINE>logger.error("ContextId of HAContextID instance cannot be numberic. contextId : " + gson.toJson(contextID));<NEW_LINE>throw new CSErrorException(CSErrorCode.INVALID_CONTEXTID, "ContextId of HAContextID instance cannot be numberic. contextId : " + gson.toJson(contextID));<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>if (HAContextID.class.isInstance(contextID)) {<NEW_LINE>if (null == contextID.getContextId()) {<NEW_LINE>this.contextHAManager<MASK><NEW_LINE>} else if (this.contextHAManager.getContextHAChecker().isHAIDValid(contextID.getContextId())) {<NEW_LINE>if (index > 0) {<NEW_LINE>this.contextIDCacheMap.put(index, contextID.getContextId());<NEW_LINE>}<NEW_LINE>this.contextHAManager.convertProxyHAID((HAContextID) contextID);<NEW_LINE>} else {<NEW_LINE>logger.error("Invalid haContextId. contextId : " + gson.toJson(contextID));<NEW_LINE>throw new CSErrorException(CSErrorCode.INVALID_HAID, "Invalid haContextId. contextId : " + gson.toJson(contextID));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
.convertProxyHAID((HAContextID) contextID);
1,319,972
public ShardingRuleConfiguration swapToObject(final YamlShardingRuleConfiguration yamlConfig) {<NEW_LINE>ShardingRuleConfiguration result = new ShardingRuleConfiguration();<NEW_LINE>for (Entry<String, YamlTableRuleConfiguration> entry : yamlConfig.getTables().entrySet()) {<NEW_LINE>YamlTableRuleConfiguration tableRuleConfig = entry.getValue();<NEW_LINE>tableRuleConfig.setLogicTable(entry.getKey());<NEW_LINE>result.getTables().add(tableYamlSwapper.swapToObject(tableRuleConfig));<NEW_LINE>}<NEW_LINE>for (Entry<String, YamlShardingAutoTableRuleConfiguration> entry : yamlConfig.getAutoTables().entrySet()) {<NEW_LINE>YamlShardingAutoTableRuleConfiguration tableRuleConfig = entry.getValue();<NEW_LINE>tableRuleConfig.setLogicTable(entry.getKey());<NEW_LINE>result.getAutoTables().add(autoTableYamlSwapper.swapToObject(tableRuleConfig));<NEW_LINE>}<NEW_LINE>result.getBindingTableGroups().addAll(yamlConfig.getBindingTables());<NEW_LINE>result.getBroadcastTables().addAll(yamlConfig.getBroadcastTables());<NEW_LINE>setDefaultStrategies(yamlConfig, result);<NEW_LINE>setAlgorithms(yamlConfig, result);<NEW_LINE>result.<MASK><NEW_LINE>result.setScalingName(yamlConfig.getScalingName());<NEW_LINE>return result;<NEW_LINE>}
setDefaultShardingColumn(yamlConfig.getDefaultShardingColumn());
502,791
public CampaignPropertiesDto toDto() {<NEW_LINE>var dto = CampaignPropertiesDto.newBuilder();<NEW_LINE>tokenTypeMap.forEach((k, v) -> dto.putTokenTypes(k, TokenPropertyListDto.newBuilder().addAllProperties(v.stream().map(TokenProperty::toDto).collect(Collectors.toList()<MASK><NEW_LINE>dto.setDefaultSightType(defaultSightType);<NEW_LINE>dto.addAllTokenStates(tokenStates.values().stream().map(BooleanTokenOverlay::toDto).collect(Collectors.toList()));<NEW_LINE>dto.addAllTokenBars(tokenBars.values().stream().map(BarTokenOverlay::toDto).collect(Collectors.toList()));<NEW_LINE>dto.putAllCharacterSheets(characterSheets);<NEW_LINE>dto.setInitiativeOwnerPermissions(initiativeOwnerPermissions);<NEW_LINE>dto.setInitiativeMovementLock(initiativeMovementLock);<NEW_LINE>dto.setInitiativeUseReverseSort(initiativeUseReverseSort);<NEW_LINE>dto.setInitiativePanelButtonsDisabled(initiativePanelButtonsDisabled);<NEW_LINE>lightSourcesMap.forEach((k, v) -> dto.putLightSources(k, LightSourceListDto.newBuilder().addAllLightSources(v.values().stream().map(LightSource::toDto).collect(Collectors.toList())).build()));<NEW_LINE>dto.addAllRemoteRepositories(remoteRepositoryList);<NEW_LINE>dto.addAllLookupTables(lookupTableMap.values().stream().map(LookupTable::toDto).collect(Collectors.toList()));<NEW_LINE>dto.addAllSightTypes(sightTypeMap.values().stream().map(SightType::toDto).collect(Collectors.toList()));<NEW_LINE>return dto.build();<NEW_LINE>}
)).build()));
744,697
private Object readMark3(int b) throws IOException {<NEW_LINE>switch(b) {<NEW_LINE>case ObjectWriter.DATE16:<NEW_LINE>return DateCache.getDate(readUInt16());<NEW_LINE>// return new java.sql.Date(ObjectWriter.BASEDATE + readUInt16() * 86400000L);<NEW_LINE>case ObjectWriter.DATE32:<NEW_LINE>return new java.sql.Date(ObjectWriter.BASEDATE - readULong32() * 1000L);<NEW_LINE>case ObjectWriter.DATETIME32:<NEW_LINE>return new java.sql.Timestamp(readULong32() * 1000L);<NEW_LINE>case ObjectWriter.DATETIME33:<NEW_LINE>return new java.sql.Timestamp(readULong32() * -1000L);<NEW_LINE>case ObjectWriter.DATETIME64:<NEW_LINE>return new java.sql.Timestamp(readLong64());<NEW_LINE>case ObjectWriter.TIME16:<NEW_LINE>return new java.sql.Time(ObjectWriter.<MASK><NEW_LINE>case ObjectWriter.TIME17:<NEW_LINE>return new java.sql.Time(ObjectWriter.BASETIME + (0x10000 | readUInt16()) * 1000);<NEW_LINE>case ObjectWriter.TIME32:<NEW_LINE>return new java.sql.Time(ObjectWriter.BASETIME + readInt32());<NEW_LINE>case ObjectWriter.DATE24:<NEW_LINE>return new java.sql.Date(ObjectWriter.BASEDATE + readUInt24() * 86400000L);<NEW_LINE>default:<NEW_LINE>// ObjectWriter.DATE64<NEW_LINE>return new java.sql.Date(readLong64());<NEW_LINE>}<NEW_LINE>}
BASETIME + readUInt16() * 1000);
610,417
private boolean probe(JPDADebugger debugger, Session session) {<NEW_LINE>String key = getKey();<NEW_LINE>if (key == null) {<NEW_LINE>// NOI18N<NEW_LINE>LOG.<MASK><NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>if ("".equals(key)) {<NEW_LINE>// NOI18N<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>// NOI18N<NEW_LINE>LOG.log(Level.FINE, "Authentication key acquired from JDI: {0}", key);<NEW_LINE>this.readKey = key;<NEW_LINE>ShellAgent agent;<NEW_LINE>synchronized (ShellLaunchManager.this) {<NEW_LINE>agent = registeredAgents.get(key);<NEW_LINE>if (agent == null) {<NEW_LINE>// NOI18N<NEW_LINE>LOG.log(Level.FINE, "Could not find agent matching key: {0}", key);<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>synchronized (ShellLaunchManager.this) {<NEW_LINE>uninitializedDebuggers.remove(this);<NEW_LINE>}<NEW_LINE>agent.attachDebugger(session);<NEW_LINE>// no longer uninitialized :)<NEW_LINE>return false;<NEW_LINE>}
log(Level.FINE, "NB Java Shell Agent did not execute far enough; queueing until the agent connects back");
89,233
public ResponseData<Integer> addTransaction(TransactionArgs transactionArgs) {<NEW_LINE>if (StringUtils.isEmpty(transactionArgs.getRequestId())) {<NEW_LINE>logger.error("[redis->add] the id of the data is empty.");<NEW_LINE>return new ResponseData<Integer>(FAILED_STATUS, KEY_INVALID);<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>RedisDomain redisDomain = new RedisDomain(DataDriverConstant.DOMAIN_OFFLINE_TRANSACTION_INFO);<NEW_LINE>String datakey = transactionArgs.getRequestId();<NEW_LINE>Object[] datas = { transactionArgs.getRequestId(), transactionArgs.getMethod(), transactionArgs.getArgs(), transactionArgs.getTimeStamp(), transactionArgs.getExtra(), transactionArgs.getBatch() };<NEW_LINE>return new RedisExecutor(redisDomain).<MASK><NEW_LINE>} catch (WeIdBaseException e) {<NEW_LINE>logger.error("[redis->add] add the data error.", e);<NEW_LINE>return new ResponseData<Integer>(FAILED_STATUS, e.getErrorCode());<NEW_LINE>}<NEW_LINE>}
execute(client, datakey, datas);
1,351,616
private void processTagLibrary(ServletContext sc, DocumentInfo info, Element documentElement, String namespace, Compiler compiler) {<NEW_LINE><MASK><NEW_LINE>if (children != null && children.getLength() > 0) {<NEW_LINE>String taglibNamespace = null;<NEW_LINE>String compositeLibraryName = null;<NEW_LINE>for (int i = 0, ilen = children.getLength(); i < ilen; i++) {<NEW_LINE>Node n = children.item(i);<NEW_LINE>if (TAGLIB_NAMESPACE.equals(n.getLocalName())) {<NEW_LINE>taglibNamespace = getNodeText(n);<NEW_LINE>} else if (COMPOSITE_LIBRARY_NAME.equals(n.getLocalName())) {<NEW_LINE>compositeLibraryName = getNodeText(n);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>URL sourceUrl;<NEW_LINE>try {<NEW_LINE>sourceUrl = info.getSourceURI().toURL();<NEW_LINE>} catch (MalformedURLException ex) {<NEW_LINE>LOGGER.log(Level.INFO, null, ex);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>NodeList tags = documentElement.getElementsByTagNameNS(namespace, TAG);<NEW_LINE>NodeList functions = documentElement.getElementsByTagNameNS(namespace, FUNCTION);<NEW_LINE>FaceletsLibrary taglibrary = compositeLibraryName != null ? new CompositeComponentLibrary(support, compositeLibraryName, taglibNamespace, sourceUrl) : new FaceletsLibrary(support, taglibNamespace, sourceUrl);<NEW_LINE>processTags(sc, documentElement, tags, taglibrary);<NEW_LINE>processFunctions(sc, functions, taglibrary);<NEW_LINE>compiler.addTagLibrary(taglibrary);<NEW_LINE>}<NEW_LINE>}
NodeList children = documentElement.getChildNodes();
1,662,847
public static Info create(Frame frame, boolean modal, int windowNo, String tableName, String keyColumn, int record_id, String value, boolean multiSelection, boolean saveResult, String whereClause) {<NEW_LINE>Info info = null;<NEW_LINE>if (tableName.equals("C_BPartner"))<NEW_LINE>info = new InfoBPartner(frame, modal, windowNo, record_id, value, !Env.getContext(Env.getCtx(), "IsSOTrx").equals("N"), <MASK><NEW_LINE>else if (tableName.equals("M_Product"))<NEW_LINE>info = new InfoProduct(frame, modal, windowNo, 0, 0, record_id, value, multiSelection, saveResult, whereClause);<NEW_LINE>else if (tableName.equals("C_Invoice"))<NEW_LINE>info = new InfoInvoice(frame, modal, windowNo, record_id, value, multiSelection, saveResult, whereClause);<NEW_LINE>else if (tableName.equals("A_Asset"))<NEW_LINE>info = new InfoAsset(frame, modal, windowNo, record_id, value, multiSelection, saveResult, whereClause);<NEW_LINE>else if (tableName.equals("C_Order"))<NEW_LINE>info = new InfoOrder(frame, modal, windowNo, record_id, value, multiSelection, saveResult, whereClause);<NEW_LINE>else if (tableName.equals("M_InOut"))<NEW_LINE>info = new InfoInOut(frame, modal, windowNo, record_id, value, multiSelection, saveResult, whereClause);<NEW_LINE>else if (tableName.equals("C_Payment"))<NEW_LINE>info = new InfoPayment(frame, modal, windowNo, record_id, value, multiSelection, saveResult, whereClause);<NEW_LINE>else if (tableName.equals("C_CashLine"))<NEW_LINE>info = new InfoCashLine(frame, modal, windowNo, record_id, value, multiSelection, saveResult, whereClause);<NEW_LINE>else if (tableName.equals("S_ResourceAssigment"))<NEW_LINE>info = new InfoAssignment(frame, modal, windowNo, record_id, value, multiSelection, saveResult, whereClause);<NEW_LINE>else<NEW_LINE>info = new InfoGeneral(frame, modal, windowNo, record_id, value, tableName, keyColumn, multiSelection, saveResult, whereClause);<NEW_LINE>//<NEW_LINE>AEnv.positionCenterWindow(frame, info);<NEW_LINE>return info;<NEW_LINE>}
false, multiSelection, saveResult, whereClause);
616,747
ImmutableList<Change<GitRevision>> run(String refExpression) throws RepoException, ValidationException {<NEW_LINE>LogCmd logCmd = repository.log(refExpression).firstParent(firstParent);<NEW_LINE>if (limit != -1) {<NEW_LINE>logCmd = logCmd.withLimit(limit);<NEW_LINE>}<NEW_LINE>if (skip > 0) {<NEW_LINE>logCmd = logCmd.withSkip(skip);<NEW_LINE>}<NEW_LINE>if (grepString != null) {<NEW_LINE>logCmd = logCmd.grep(grepString);<NEW_LINE>}<NEW_LINE>if (partialFetch && roots.contains("")) {<NEW_LINE>throw new ValidationException("Config error: partial_fetch feature is not compatible " + "with fetching the whole repo.");<NEW_LINE>}<NEW_LINE>if (partialFetch) {<NEW_LINE>logCmd = logCmd.withPaths(roots);<NEW_LINE>}<NEW_LINE>// Log command does not filter by roots here because of how git log works. Some commits (e.g.<NEW_LINE>// fake merges) might not include the files in the log, and filtering here would return<NEW_LINE>// incorrect results. We do filter later on the changes to match the actual glob.<NEW_LINE>return parseChanges(logCmd.includeFiles(true).includeMergeDiff<MASK><NEW_LINE>}
(true).run());
1,237,709
public void onCreate(final Bundle savedInstanceState) {<NEW_LINE>super.onCreate(savedInstanceState);<NEW_LINE>setContentView(R.layout.activity_error);<NEW_LINE>final Toolbar toolbar = findViewById(R.id.toolbar);<NEW_LINE>setSupportActionBar(toolbar);<NEW_LINE>final Intent intent = getIntent();<NEW_LINE>final ActionBar actionBar = getSupportActionBar();<NEW_LINE>if (actionBar != null) {<NEW_LINE>actionBar.setDisplayHomeAsUpEnabled(true);<NEW_LINE>actionBar.<MASK><NEW_LINE>actionBar.setDisplayShowTitleEnabled(true);<NEW_LINE>}<NEW_LINE>final Button reportEmailButton = findViewById(R.id.errorReportEmailButton);<NEW_LINE>final Button reportTelegramButton = findViewById(R.id.errorReportTelegramButton);<NEW_LINE>final Button copyButton = findViewById(R.id.errorReportCopyButton);<NEW_LINE>final Button reportGithubButton = findViewById(R.id.errorReportGitHubButton);<NEW_LINE>userCommentBox = findViewById(R.id.errorCommentBox);<NEW_LINE>final TextView errorView = findViewById(R.id.errorView);<NEW_LINE>final TextView errorMessageView = findViewById(R.id.errorMessageView);<NEW_LINE>returnActivity = MainActivity.class;<NEW_LINE>errorInfo = intent.getParcelableExtra(ERROR_INFO);<NEW_LINE>errorList = intent.getStringArrayExtra(ERROR_LIST);<NEW_LINE>// important add guru meditation<NEW_LINE>addGuruMeditation();<NEW_LINE>currentTimeStamp = getCurrentTimeStamp();<NEW_LINE>reportEmailButton.setOnClickListener((View v) -> sendReportEmail());<NEW_LINE>reportTelegramButton.setOnClickListener((View v) -> {<NEW_LINE>FileUtils.copyToClipboard(this, buildMarkdown());<NEW_LINE>Toast.makeText(this, R.string.crash_report_copied, Toast.LENGTH_SHORT).show();<NEW_LINE>Utils.openTelegramURL(this);<NEW_LINE>});<NEW_LINE>copyButton.setOnClickListener((View v) -> {<NEW_LINE>FileUtils.copyToClipboard(this, buildMarkdown());<NEW_LINE>Toast.makeText(this, R.string.crash_report_copied, Toast.LENGTH_SHORT).show();<NEW_LINE>});<NEW_LINE>reportGithubButton.setOnClickListener((View v) -> {<NEW_LINE>FileUtils.copyToClipboard(this, buildMarkdown());<NEW_LINE>Toast.makeText(this, R.string.crash_report_copied, Toast.LENGTH_SHORT).show();<NEW_LINE>Utils.openURL(ERROR_GITHUB_ISSUE_URL, this);<NEW_LINE>});<NEW_LINE>// normal bugreport<NEW_LINE>buildInfo(errorInfo);<NEW_LINE>if (errorInfo.message != 0) {<NEW_LINE>errorMessageView.setText(errorInfo.message);<NEW_LINE>} else {<NEW_LINE>errorMessageView.setVisibility(View.GONE);<NEW_LINE>findViewById(R.id.messageWhatHappenedView).setVisibility(View.GONE);<NEW_LINE>}<NEW_LINE>errorView.setText(formErrorText(errorList));<NEW_LINE>// print stack trace once again for debugging:<NEW_LINE>for (final String e : errorList) {<NEW_LINE>Log.e(TAG, e);<NEW_LINE>}<NEW_LINE>initStatusBarResources(findViewById(R.id.parent_view));<NEW_LINE>}
setTitle(R.string.error_report_title);
1,063,136
public void write(org.apache.thrift.protocol.TProtocol prot, TIntStringStringValue struct) throws org.apache.thrift.TException {<NEW_LINE>org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;<NEW_LINE>java.util.BitSet optionals = <MASK><NEW_LINE>if (struct.isSetIntValue()) {<NEW_LINE>optionals.set(0);<NEW_LINE>}<NEW_LINE>if (struct.isSetStringValue1()) {<NEW_LINE>optionals.set(1);<NEW_LINE>}<NEW_LINE>if (struct.isSetStringValue2()) {<NEW_LINE>optionals.set(2);<NEW_LINE>}<NEW_LINE>oprot.writeBitSet(optionals, 3);<NEW_LINE>if (struct.isSetIntValue()) {<NEW_LINE>oprot.writeI32(struct.intValue);<NEW_LINE>}<NEW_LINE>if (struct.isSetStringValue1()) {<NEW_LINE>oprot.writeString(struct.stringValue1);<NEW_LINE>}<NEW_LINE>if (struct.isSetStringValue2()) {<NEW_LINE>oprot.writeString(struct.stringValue2);<NEW_LINE>}<NEW_LINE>}
new java.util.BitSet();
623,511
public static <K> LongBinding longValueAt(final ObservableMap<K, ? extends Number> op, final K key) {<NEW_LINE>if (op == null) {<NEW_LINE>throw new NullPointerException("Map cannot be null.");<NEW_LINE>}<NEW_LINE>return new LongBinding() {<NEW_LINE><NEW_LINE>{<NEW_LINE>super.bind(op);<NEW_LINE>}<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void dispose() {<NEW_LINE>super.unbind(op);<NEW_LINE>}<NEW_LINE><NEW_LINE>@Override<NEW_LINE>protected long computeValue() {<NEW_LINE>try {<NEW_LINE>final Number <MASK><NEW_LINE>if (value == null) {<NEW_LINE>Logging.getLogger().fine("Element not found in map, returning default value instead.", new NullPointerException());<NEW_LINE>} else {<NEW_LINE>return value.longValue();<NEW_LINE>}<NEW_LINE>} catch (ClassCastException ex) {<NEW_LINE>Logging.getLogger().warning("Exception while evaluating binding", ex);<NEW_LINE>// ignore<NEW_LINE>} catch (NullPointerException ex) {<NEW_LINE>Logging.getLogger().warning("Exception while evaluating binding", ex);<NEW_LINE>// ignore<NEW_LINE>}<NEW_LINE>return 0L;<NEW_LINE>}<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public ObservableList<?> getDependencies() {<NEW_LINE>return FXCollections.singletonObservableList(op);<NEW_LINE>}<NEW_LINE>};<NEW_LINE>}
value = op.get(key);
1,511,598
protected void executeSynchronous(FlowNode flowNode) {<NEW_LINE>CommandContextUtil.getActivityInstanceEntityManager(commandContext).recordActivityStart(execution);<NEW_LINE>// Execution listener<NEW_LINE>if (CollectionUtil.isNotEmpty(flowNode.getExecutionListeners())) {<NEW_LINE>executeExecutionListeners(flowNode, ExecutionListener.EVENTNAME_START);<NEW_LINE>}<NEW_LINE>// Execute actual behavior<NEW_LINE>ActivityBehavior activityBehavior = <MASK><NEW_LINE>LOGGER.debug("Executing activityBehavior {} on activity '{}' with execution {}", activityBehavior.getClass(), flowNode.getId(), execution.getId());<NEW_LINE>ProcessEngineConfigurationImpl processEngineConfiguration = CommandContextUtil.getProcessEngineConfiguration(commandContext);<NEW_LINE>FlowableEventDispatcher eventDispatcher = null;<NEW_LINE>if (processEngineConfiguration != null) {<NEW_LINE>eventDispatcher = processEngineConfiguration.getEventDispatcher();<NEW_LINE>}<NEW_LINE>if (eventDispatcher != null && eventDispatcher.isEnabled()) {<NEW_LINE>processEngineConfiguration.getEventDispatcher().dispatchEvent(FlowableEventBuilder.createActivityEvent(FlowableEngineEventType.ACTIVITY_STARTED, flowNode.getId(), flowNode.getName(), execution.getId(), execution.getProcessInstanceId(), execution.getProcessDefinitionId(), flowNode), processEngineConfiguration.getEngineCfgKey());<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>activityBehavior.execute(execution);<NEW_LINE>} catch (BpmnError error) {<NEW_LINE>// re-throw business fault so that it can be caught by an Error Intermediate Event or Error Event Sub-Process in the process<NEW_LINE>ErrorPropagation.propagateError(error, execution);<NEW_LINE>} catch (RuntimeException e) {<NEW_LINE>if (LogMDC.isMDCEnabled()) {<NEW_LINE>LogMDC.putMDCExecution(execution);<NEW_LINE>}<NEW_LINE>throw e;<NEW_LINE>}<NEW_LINE>}
(ActivityBehavior) flowNode.getBehavior();
1,011,782
public void afterTestClass() {<NEW_LINE>// Cleanup before assertion.<NEW_LINE>assert TestAgentListenerAccess.getInstrumentationErrorCount() == 0 : TestAgentListenerAccess.getInstrumentationErrorCount() + " Instrumentation errors during test";<NEW_LINE>int muzzleFailureCount = TestAgentListenerAccess.getAndResetMuzzleFailureCount();<NEW_LINE>assert muzzleFailureCount == 0 : muzzleFailureCount + " Muzzle failures during test";<NEW_LINE>// additional library ignores are ignored during tests, because they can make it really<NEW_LINE>// confusing for contributors wondering why their instrumentation is not applied<NEW_LINE>//<NEW_LINE>// but we then need to make sure that the additional library ignores won't then silently prevent<NEW_LINE>// the instrumentation from being applied in real life outside of these tests<NEW_LINE>assert TestAgentListenerAccess.getIgnoredButTransformedClassNames().isEmpty() <MASK><NEW_LINE>}
: "Transformed classes match global libraries ignore matcher: " + TestAgentListenerAccess.getIgnoredButTransformedClassNames();
105,158
void read(WizardDescriptor settings) {<NEW_LINE>// NOI18N<NEW_LINE>File projectLocation = (File) settings.getProperty("projdir");<NEW_LINE>if (projectLocation == null || projectLocation.getParentFile() == null || !projectLocation.getParentFile().isDirectory()) {<NEW_LINE>// honor the contract in issue 58987<NEW_LINE>File currentDirectory = null;<NEW_LINE>FileObject existingSourcesFO = Templates.getExistingSourcesFolder(settings);<NEW_LINE>if (existingSourcesFO != null) {<NEW_LINE>File existingSourcesFile = FileUtil.toFile(existingSourcesFO);<NEW_LINE>if (existingSourcesFile != null && existingSourcesFile.isDirectory()) {<NEW_LINE>currentDirectory = existingSourcesFile;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (currentDirectory != null) {<NEW_LINE>projectLocation = currentDirectory;<NEW_LINE>} else {<NEW_LINE>projectLocation = ProjectChooser.getProjectsFolder();<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>projectLocation = projectLocation.getParentFile();<NEW_LINE>}<NEW_LINE>this.projectLocationTextField.<MASK><NEW_LINE>// NOI18N<NEW_LINE>String projectName = (String) settings.getProperty("name");<NEW_LINE>if (projectName == null) {<NEW_LINE>int baseCount = 1;<NEW_LINE>while ((projectName = validFreeProjectName(projectLocation, nameFormatter, baseCount)) == null) {<NEW_LINE>baseCount++;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>this.projectNameTextField.setText(projectName);<NEW_LINE>this.projectNameTextField.selectAll();<NEW_LINE>}
setText(projectLocation.getAbsolutePath());
1,383,834
private ClientRegistration buildClientRegistration(Map.Entry<String, AuthorizationClientProperties> client) {<NEW_LINE>AuthorizationGrantType authGrantType = Optional.ofNullable(client.getValue().getAuthorizationGrantType()).map(AadAuthorizationGrantType::getValue).map(AuthorizationGrantType<MASK><NEW_LINE>if (!AuthorizationGrantType.CLIENT_CREDENTIALS.equals(authGrantType)) {<NEW_LINE>LOGGER.warn("The authorization type of the {} client registration is not supported.", client.getKey());<NEW_LINE>}<NEW_LINE>return ClientRegistration.withRegistrationId(client.getKey()).clientName(client.getKey()).clientId(properties.getCredential().getClientId()).clientSecret(properties.getCredential().getClientSecret()).clientAuthenticationMethod(ClientAuthenticationMethod.POST).authorizationGrantType(authGrantType).scope(client.getValue().getScopes()).tokenUri(AadB2cUrl.getAADTokenUrl(properties.getProfile().getTenantId())).jwkSetUri(AadB2cUrl.getAADJwkSetUrl(properties.getProfile().getTenantId())).build();<NEW_LINE>}
::new).orElse(null);
661,290
public CharSequence handleTable(Theme theme, PostParser.Callback callback, Post.Builder builder, CharSequence text, Element table) {<NEW_LINE>List<CharSequence> parts = new ArrayList<>();<NEW_LINE>Elements <MASK><NEW_LINE>for (int i = 0; i < tableRows.size(); i++) {<NEW_LINE>Element tableRow = tableRows.get(i);<NEW_LINE>if (tableRow.text().length() > 0) {<NEW_LINE>Elements tableDatas = tableRow.getElementsByTag("td");<NEW_LINE>for (int j = 0; j < tableDatas.size(); j++) {<NEW_LINE>Element tableData = tableDatas.get(j);<NEW_LINE>SpannableString tableDataPart = new SpannableString(tableData.text());<NEW_LINE>if (tableData.getElementsByTag("b").size() > 0) {<NEW_LINE>tableDataPart.setSpan(new StyleSpan(Typeface.BOLD), 0, tableDataPart.length(), 0);<NEW_LINE>tableDataPart.setSpan(new UnderlineSpan(), 0, tableDataPart.length(), 0);<NEW_LINE>}<NEW_LINE>parts.add(tableDataPart);<NEW_LINE>if (j < tableDatas.size() - 1)<NEW_LINE>parts.add(": ");<NEW_LINE>}<NEW_LINE>if (i < tableRows.size() - 1)<NEW_LINE>parts.add("\n");<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// Overrides the text (possibly) parsed by child nodes.<NEW_LINE>return span(TextUtils.concat(parts.toArray(new CharSequence[parts.size()])), new ForegroundColorSpanHashed(theme.inlineQuoteColor), new AbsoluteSizeSpanHashed(sp(12f)));<NEW_LINE>}
tableRows = table.getElementsByTag("tr");
147,448
public AtlasData load(ResourceUrn urn, List<AssetDataFile> inputs) throws IOException {<NEW_LINE>try (Reader reader = new InputStreamReader(inputs.get(0).openStream(), Charsets.UTF_8)) {<NEW_LINE>AtlasDefinition def = gson.fromJson(reader, AtlasDefinition.class);<NEW_LINE>Optional<? extends Texture> texture = assetManager.getAsset(def.getTexture(), Texture.class);<NEW_LINE>if (texture.isPresent()) {<NEW_LINE>Vector2i size = def.getTextureSize();<NEW_LINE>if (size == null) {<NEW_LINE>size = new Vector2i(texture.get().getWidth(), texture.get().getHeight());<NEW_LINE>}<NEW_LINE>Map<Name, SubtextureData> result = Maps.newHashMap();<NEW_LINE>if (def.getGrid() != null) {<NEW_LINE>process(def.getGrid(), texture.get(), size, result);<NEW_LINE>}<NEW_LINE>if (def.getGrids() != null) {<NEW_LINE>for (GridDefinition grid : def.getGrids()) {<NEW_LINE>process(grid, texture.get(), size, result);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (def.getSubimage() != null) {<NEW_LINE>process(def.getSubimage(), texture.<MASK><NEW_LINE>}<NEW_LINE>if (def.getSubimages() != null) {<NEW_LINE>for (FreeformDefinition freeform : def.getSubimages()) {<NEW_LINE>process(freeform, texture.get(), size, result);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return new AtlasData(result);<NEW_LINE>}<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>}
get(), size, result);
1,533,114
protected ControlRequestFlush createControlRequestFlush(SIBUuid8 target, long ID, SIBUuid12 stream) throws SIResourceException {<NEW_LINE>if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())<NEW_LINE><MASK><NEW_LINE>ControlRequestFlush rflushMsg;<NEW_LINE>// Create new message and send it<NEW_LINE>try {<NEW_LINE>rflushMsg = _cmf.createNewControlRequestFlush();<NEW_LINE>} catch (MessageCreateFailedException e) {<NEW_LINE>// FFDC<NEW_LINE>FFDCFilter.processException(e, "com.ibm.ws.sib.processor.impl.AbstractInputHandler.createControlRequestFlush", "1:667:1.170", this);<NEW_LINE>if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {<NEW_LINE>SibTr.exception(tc, e);<NEW_LINE>SibTr.exit(tc, "createControlRequestFlush", e);<NEW_LINE>}<NEW_LINE>SibTr.error(tc, "INTERNAL_MESSAGING_ERROR_CWSIP0002", new Object[] { "com.ibm.ws.sib.processor.impl.AbstractInputHandler", "1:679:1.170", e });<NEW_LINE>throw new SIResourceException(nls.getFormattedMessage("INTERNAL_MESSAGING_ERROR_CWSIP0002", new Object[] { "com.ibm.ws.sib.processor.impl.AbstractInputHandler", "1:687:1.170", e }, null), e);<NEW_LINE>}<NEW_LINE>// As we are using the Guaranteed Header - set all the attributes as<NEW_LINE>// well as the ones we want.<NEW_LINE>SIMPUtils.setGuaranteedDeliveryProperties(rflushMsg, _messageProcessor.getMessagingEngineUuid(), target, stream, null, _destination.getUuid(), null, GDConfig.PROTOCOL_VERSION);<NEW_LINE>if (_destination.isPubSub()) {<NEW_LINE>rflushMsg.setGuaranteedProtocolType(ProtocolType.PUBSUBOUTPUT);<NEW_LINE>} else {<NEW_LINE>rflushMsg.setGuaranteedProtocolType(ProtocolType.UNICASTOUTPUT);<NEW_LINE>}<NEW_LINE>rflushMsg.setRequestID(ID);<NEW_LINE>rflushMsg.setPriority(SIMPConstants.CTRL_MSG_PRIORITY);<NEW_LINE>rflushMsg.setReliability(SIMPConstants.CONTROL_MESSAGE_RELIABILITY);<NEW_LINE>if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())<NEW_LINE>SibTr.exit(tc, "createControlRequestFlush", rflushMsg);<NEW_LINE>return rflushMsg;<NEW_LINE>}
SibTr.entry(tc, "createControlRequestFlush");
77,174
/* (non-Javadoc)<NEW_LINE>* @see com.kkalice.adempiere.migrate.DBObjectInterface#loadHeaders(java.util.HashMap, com.kkalice.adempiere.migrate.MigrateLogger, com.kkalice.adempiere.migrate.MigrateDBEngine, com.kkalice.adempiere.migrate.DBConnection, java.lang.String)<NEW_LINE>*/<NEW_LINE>public void loadHeaders(HashMap<Integer, DBObjectDefinition> headerMap, Parameters parameters, MigrateLogger logger, DBEngine dbEngine, DBConnection parent, String name, PreparedStatementWrapper statement) {<NEW_LINE>parent.setPreparedStatementString(statement, 1, name);<NEW_LINE>ResultSet rs = parent.executeQuery(statement);<NEW_LINE>int counter = 0;<NEW_LINE>while (parent.getResultSetNext(rs)) {<NEW_LINE>String fkName = parent.getResultSetString(rs, "FK_NAME");<NEW_LINE>String tableName = parent.getResultSetString(rs, "TABLE_NAME");<NEW_LINE>String fTableName = <MASK><NEW_LINE>boolean isDeferrable = dbEngine.isTrue(parent.getResultSetString(rs, "IS_DEFERRABLE"));<NEW_LINE>boolean isDeferred = dbEngine.isTrue(parent.getResultSetString(rs, "INITIALLY_DEFERRED"));<NEW_LINE>String matchType = parent.getResultSetString(rs, "MATCH_TYPE");<NEW_LINE>String onUpdate = parent.getResultSetString(rs, "ON_UPDATE");<NEW_LINE>String onDelete = parent.getResultSetString(rs, "ON_DELETE");<NEW_LINE>DBObject_ForeignKey_Table obj = new DBObject_ForeignKey_Table(parent, fkName, counter);<NEW_LINE>obj.initializeDefinition(tableName, fTableName, isDeferrable, isDeferred, matchType, onUpdate, onDelete);<NEW_LINE>headerMap.put(new Integer(counter), obj);<NEW_LINE>counter++;<NEW_LINE>}<NEW_LINE>parent.releaseResultSet(rs);<NEW_LINE>}
parent.getResultSetString(rs, "FTABLE_NAME");
190,149
private void addItemsInRange(AssetInfo asset, List<FeeItem> feeItems, FeeItemsAlgorithm algorithm, int txSize, int scale) {<NEW_LINE>for (int i = algorithm.getMinPosition(); i < algorithm.getMaxPosition(); i++) {<NEW_LINE>FeeItem currFeeItem = createFeeItem(asset, txSize, algorithm.computeValue(i), scale);<NEW_LINE>FeeItem prevFeeItem = !feeItems.isEmpty() ? feeItems.get(feeItems.<MASK><NEW_LINE>boolean canAdd = prevFeeItem == null || prevFeeItem.feePerKb < currFeeItem.feePerKb;<NEW_LINE>if (currFeeItem.value != null && prevFeeItem != null && prevFeeItem.value != null && currFeeItem.fiatValue != null && prevFeeItem.fiatValue != null) {<NEW_LINE>String currFiatFee = currFeeItem.fiatValue.toString();<NEW_LINE>String prevFiatFee = prevFeeItem.fiatValue.toString();<NEW_LINE>// if we reached this, then we can override canAdd<NEW_LINE>canAdd = (float) currFeeItem.feePerKb / prevFeeItem.feePerKb >= MIN_FEE_INCREMENT && !currFiatFee.equals(prevFiatFee);<NEW_LINE>}<NEW_LINE>if (canAdd) {<NEW_LINE>feeItems.add(currFeeItem);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
size() - 1) : null;
1,519,077
public static <T extends ServiceDefinition> void build(T sd, final Class<?> interfaceClass) {<NEW_LINE>sd.setCanonicalName(interfaceClass.getCanonicalName());<NEW_LINE>sd.setCodeSource(ClassUtils.getCodeSource(interfaceClass));<NEW_LINE>Annotation[] classAnnotations = interfaceClass.getAnnotations();<NEW_LINE>sd.setAnnotations(annotationToStringList(classAnnotations));<NEW_LINE>TypeDefinitionBuilder builder = new TypeDefinitionBuilder();<NEW_LINE>List<Method> methods = ClassUtils.getPublicNonStaticMethods(interfaceClass);<NEW_LINE>for (Method method : methods) {<NEW_LINE>MethodDefinition md = new MethodDefinition();<NEW_LINE>md.setName(method.getName());<NEW_LINE>Annotation[] methodAnnotations = method.getAnnotations();<NEW_LINE>md.setAnnotations(annotationToStringList(methodAnnotations));<NEW_LINE>// Process parameter types.<NEW_LINE>Class<?>[] paramTypes = method.getParameterTypes();<NEW_LINE>Type[] genericParamTypes = method.getGenericParameterTypes();<NEW_LINE>String[] parameterTypes <MASK><NEW_LINE>for (int i = 0; i < paramTypes.length; i++) {<NEW_LINE>TypeDefinition td = builder.build(genericParamTypes[i], paramTypes[i]);<NEW_LINE>parameterTypes[i] = td.getType();<NEW_LINE>}<NEW_LINE>md.setParameterTypes(parameterTypes);<NEW_LINE>// Process return type.<NEW_LINE>TypeDefinition td = builder.build(method.getGenericReturnType(), method.getReturnType());<NEW_LINE>md.setReturnType(td.getType());<NEW_LINE>sd.getMethods().add(md);<NEW_LINE>}<NEW_LINE>sd.setTypes(builder.getTypeDefinitions());<NEW_LINE>}
= new String[paramTypes.length];
1,109,856
private boolean runInServlet(String test) throws IOException {<NEW_LINE>boolean result = false;<NEW_LINE>URL url = new URL("http://" + HOST + ":" + PORT + "/DurableUnshared?test=" + test);<NEW_LINE>System.out.println("The Servlet URL is : " + url.toString());<NEW_LINE>HttpURLConnection con = <MASK><NEW_LINE>try {<NEW_LINE>con.setDoInput(true);<NEW_LINE>con.setDoOutput(true);<NEW_LINE>con.setUseCaches(false);<NEW_LINE>con.setRequestMethod("GET");<NEW_LINE>con.connect();<NEW_LINE>InputStream is = con.getInputStream();<NEW_LINE>InputStreamReader isr = new InputStreamReader(is);<NEW_LINE>BufferedReader br = new BufferedReader(isr);<NEW_LINE>String sep = System.lineSeparator();<NEW_LINE>StringBuilder lines = new StringBuilder();<NEW_LINE>for (String line = br.readLine(); line != null; line = br.readLine()) lines.append(line).append(sep);<NEW_LINE>if (lines.indexOf("COMPLETED SUCCESSFULLY") < 0) {<NEW_LINE>org.junit.Assert.fail("Missing success message in output. " + lines);<NEW_LINE>result = false;<NEW_LINE>} else<NEW_LINE>result = true;<NEW_LINE>return result;<NEW_LINE>} finally {<NEW_LINE>con.disconnect();<NEW_LINE>}<NEW_LINE>}
(HttpURLConnection) url.openConnection();
1,036,114
private void initDatabasesTab() {<NEW_LINE>new ViewModelListCellFactory<StudyDatabaseItem>().withText(StudyDatabaseItem::getName).install(databaseSelector);<NEW_LINE>databaseSelector.<MASK><NEW_LINE>setupCommonPropertiesForTables(databaseSelector, this::addDatabase, databaseColumn, databaseActionColumn);<NEW_LINE>databaseEnabledColumn.setResizable(false);<NEW_LINE>databaseEnabledColumn.setReorderable(false);<NEW_LINE>databaseEnabledColumn.setCellValueFactory(param -> param.getValue().enabledProperty());<NEW_LINE>databaseEnabledColumn.setCellFactory(CheckBoxTableCell.forTableColumn(databaseEnabledColumn));<NEW_LINE>databaseColumn.setCellValueFactory(param -> param.getValue().nameProperty());<NEW_LINE>databaseActionColumn.setCellValueFactory(param -> param.getValue().nameProperty());<NEW_LINE>new ValueTableCellFactory<org.jabref.gui.slr.StudyDatabaseItem, String>().withGraphic(item -> IconTheme.JabRefIcons.DELETE_ENTRY.getGraphicNode()).withTooltip(name -> Localization.lang("Remove")).withOnMouseClickedEvent(item -> evt -> viewModel.removeDatabase(item)).install(databaseActionColumn);<NEW_LINE>databaseTable.setItems(viewModel.getDatabases());<NEW_LINE>}
setItems(viewModel.getNonSelectedDatabases());
245,923
protected CompletableFuture<Long> submitAssignment(SegmentInfo segmentInfo, boolean pin, Duration timeout) {<NEW_LINE>SegmentProperties properties = segmentInfo.getProperties();<NEW_LINE>if (properties.isDeleted()) {<NEW_LINE>// Stream does not exist. Fail the request with the appropriate exception.<NEW_LINE>failAssignment(properties.getName(), new StreamSegmentNotExistsException("StreamSegment does not exist."));<NEW_LINE>return Futures.failedFuture(new StreamSegmentNotExistsException(properties.getName()));<NEW_LINE>}<NEW_LINE>long existingSegmentId = this.connector.getContainerMetadata().getStreamSegmentId(properties.getName(), true);<NEW_LINE>if (isValidSegmentId(existingSegmentId)) {<NEW_LINE>// Looks like someone else beat us to it. Still, we need to know if the Segment needs to be pinned.<NEW_LINE>return pinSegment(existingSegmentId, properties.<MASK><NEW_LINE>} else {<NEW_LINE>String streamSegmentName = properties.getName();<NEW_LINE>return this.connector.getMapSegmentId().apply(segmentInfo.getSegmentId(), properties, pin, timeout).thenApply(id -> completeAssignment(streamSegmentName, id));<NEW_LINE>}<NEW_LINE>}
getName(), pin, timeout);
550,484
private void sendVerifyShardBlockRequest(final IndexShardRoutingTable shardRoutingTable, final ClusterBlock block, final ActionListener<ReplicationResponse> listener) {<NEW_LINE>final ShardId shardId = shardRoutingTable.shardId();<NEW_LINE>if (shardRoutingTable.primaryShard().unassigned()) {<NEW_LINE>logger.debug("primary shard {} is unassigned, ignoring", shardId);<NEW_LINE>final ReplicationResponse response = new ReplicationResponse();<NEW_LINE>response.setShardInfo(new ReplicationResponse.ShardInfo(shardRoutingTable.size(), shardRoutingTable.size()));<NEW_LINE>listener.onResponse(response);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>final TaskId parentTaskId = new TaskId(clusterService.localNode().getId(), request.taskId());<NEW_LINE>final TransportVerifyShardIndexBlockAction.ShardRequest shardRequest = new TransportVerifyShardIndexBlockAction.ShardRequest(shardId, block, parentTaskId);<NEW_LINE>if (request.ackTimeout() != null) {<NEW_LINE>shardRequest.<MASK><NEW_LINE>}<NEW_LINE>transportVerifyShardIndexBlockAction.execute(shardRequest, listener);<NEW_LINE>}
timeout(request.ackTimeout());
90,079
public void onAction(CrdtInfoReplicationContext context) {<NEW_LINE>try {<NEW_LINE>RedisInstanceInfo info = context.instance().getCheckInfo();<NEW_LINE>if (info.isMaster()) {<NEW_LINE>CRDTInfoResultExtractor extractor = (CRDTInfoResultExtractor) context.getResult();<NEW_LINE>long recvTimeMilli = context.getRecvTimeMilli();<NEW_LINE>extractor.extractPeerMasters().forEach(peerInfo -> {<NEW_LINE>MetricData data = getPoint(METRIC_TYPE, peerInfo.getReplOffset(), recvTimeMilli, info);<NEW_LINE>HostPort peer = new HostPort(peerInfo.getEndpoint().getHost(), peerInfo.getEndpoint().getPort());<NEW_LINE>data.addTag(KEY_SRC_PEER, peer.toString());<NEW_LINE>String dc;<NEW_LINE>try {<NEW_LINE><MASK><NEW_LINE>data.addTag(KEY_SRC_PEER_DC, dc);<NEW_LINE>} catch (Exception ignore) {<NEW_LINE>logger.debug("{} not find peer {} dc", info.getHostPort(), peer);<NEW_LINE>data.addTag(KEY_SRC_PEER_DC, UNKNOWN_DC);<NEW_LINE>}<NEW_LINE>tryWriteMetric(data);<NEW_LINE>});<NEW_LINE>}<NEW_LINE>} catch (Throwable throwable) {<NEW_LINE>logger.error("[onAction] {}", context.instance().getCheckInfo().getHostPort(), throwable);<NEW_LINE>}<NEW_LINE>}
dc = metaCache.getDc(peer);
91,107
public <T extends DatabaseCommunicationEngine> T newBinaryProtocolInstance(final SQLStatementContext<?> sqlStatementContext, final String sql, final List<Object> parameters, final BackendConnection<?> backendConnection) {<NEW_LINE>ShardingSphereMetaData metaData = ProxyContext.getInstance().getMetaData(backendConnection.getConnectionSession().getSchemaName());<NEW_LINE>LogicSQL logicSQL = new LogicSQL(sqlStatementContext, sql, parameters);<NEW_LINE>T result;<NEW_LINE>if (backendConnection instanceof JDBCBackendConnection) {<NEW_LINE>JDBCBackendConnection jdbcBackendConnection = (JDBCBackendConnection) backendConnection;<NEW_LINE>result = (T) new JDBCDatabaseCommunicationEngine(JDBCDriverType.<MASK><NEW_LINE>jdbcBackendConnection.add((JDBCDatabaseCommunicationEngine) result);<NEW_LINE>} else {<NEW_LINE>VertxBackendConnection vertxBackendConnection = (VertxBackendConnection) backendConnection;<NEW_LINE>result = (T) new VertxDatabaseCommunicationEngine(metaData, logicSQL, vertxBackendConnection);<NEW_LINE>}<NEW_LINE>return result;<NEW_LINE>}
PREPARED_STATEMENT, metaData, logicSQL, jdbcBackendConnection);
1,428,036
public static void writeCSVRows(XYSeries series, String path2Dir) {<NEW_LINE>File newFile = new File(path2Dir + series.getName() + ".csv");<NEW_LINE>Writer out = null;<NEW_LINE>try {<NEW_LINE>out = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(newFile), "UTF8"));<NEW_LINE>String csv = join(series.getXData(), ",") + System.getProperty("line.separator");<NEW_LINE>out.write(csv);<NEW_LINE>csv = join(series.getYData(), ",") + System.getProperty("line.separator");<NEW_LINE>out.write(csv);<NEW_LINE>if (series.getExtraValues() != null) {<NEW_LINE>csv = join(series.getExtraValues(), ","<MASK><NEW_LINE>out.write(csv);<NEW_LINE>}<NEW_LINE>} catch (Exception e) {<NEW_LINE>e.printStackTrace();<NEW_LINE>} finally {<NEW_LINE>if (out != null) {<NEW_LINE>try {<NEW_LINE>out.flush();<NEW_LINE>out.close();<NEW_LINE>} catch (IOException e) {<NEW_LINE>// NOP<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
) + System.getProperty("line.separator");
151,614
private static List<Property> projectProperties(TypeDef typeDef) {<NEW_LINE>final <MASK><NEW_LINE>return Stream.concat(typeDef.getProperties().stream().filter(p -> {<NEW_LINE>// enums have self-referential static properties for each enum case so we cannot ignore them<NEW_LINE>if (typeDef.isEnum()) {<NEW_LINE>final TypeRef typeRef = p.getTypeRef();<NEW_LINE>if (typeRef instanceof ClassRef && fqn.equals(((ClassRef) typeRef).getFullyQualifiedName())) {<NEW_LINE>// we're dealing with an enum case so keep it<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// otherwise exclude all static properties<NEW_LINE>return !p.isStatic();<NEW_LINE>}), typeDef.getExtendsList().stream().filter(e -> !e.getFullyQualifiedName().startsWith("java.")).flatMap(e -> projectProperties(projectDefinition(e)).stream().filter(p -> filterCustomResourceProperties(e).test(p)))).collect(Collectors.toList());<NEW_LINE>}
String fqn = typeDef.getFullyQualifiedName();
170,935
protected void validateSortingPath(Path path, Set<String> allFields) {<NEW_LINE>List<Path.PathElement> pathElements = path.getPathElements();<NEW_LINE>if (pathElements.size() > 1) {<NEW_LINE>throw new InvalidOperationException("Relationship traversal not supported for analytic queries.");<NEW_LINE>}<NEW_LINE>Path.PathElement currentElement = pathElements.get(0);<NEW_LINE>String currentField = currentElement.getAlias();<NEW_LINE>Type<?<MASK><NEW_LINE>// TODO: support sorting using alias<NEW_LINE>if (allFields.stream().noneMatch(currentField::equals)) {<NEW_LINE>throw new InvalidOperationException("Can not sort on " + currentField + " as it is not present in query");<NEW_LINE>}<NEW_LINE>if (dictionary.getIdFieldName(currentClass).equals(currentField) || currentField.equals(EntityDictionary.REGULAR_ID_NAME)) {<NEW_LINE>throw new InvalidOperationException("Sorting on id field is not permitted");<NEW_LINE>}<NEW_LINE>}
> currentClass = currentElement.getType();
346,865
public void propagate(InstanceState state) {<NEW_LINE>Object triggerType = state.getAttributeValue(StdAttr.EDGE_TRIGGER);<NEW_LINE>final var <MASK><NEW_LINE>ShiftRegisterData data = getData(state);<NEW_LINE>final var len = data.getLength();<NEW_LINE>final var triggered = data.updateClock(state.getPortValue(CK), triggerType);<NEW_LINE>if (state.getPortValue(CLR) == Value.TRUE) {<NEW_LINE>data.clear();<NEW_LINE>} else if (triggered) {<NEW_LINE>if (parallel && state.getPortValue(LD) == Value.TRUE) {<NEW_LINE>data.clear();<NEW_LINE>for (int i = len - 1; i >= 0; i--) {<NEW_LINE>data.push(state.getPortValue(6 + 2 * i));<NEW_LINE>}<NEW_LINE>} else if (state.getPortValue(SH) != Value.FALSE) {<NEW_LINE>data.push(state.getPortValue(IN));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>state.setPort(OUT, data.get(0), 4);<NEW_LINE>if (parallel) {<NEW_LINE>for (var i = 0; i < len - 1; i++) {<NEW_LINE>state.setPort(6 + 2 * i + 1, data.get(len - 1 - i), 4);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
parallel = state.getAttributeValue(ATTR_LOAD);
1,579,250
public float calculateAverageSlope(float originalSlope, float checkingOffset) {<NEW_LINE>Vector3f contactPoint = this.getHitPointWorld();<NEW_LINE>float slope = 1f;<NEW_LINE>boolean foundSlope = false;<NEW_LINE>Vector3f fromWorld = new Vector3f(contactPoint);<NEW_LINE>fromWorld.y += 0.2f;<NEW_LINE>Vector3f toWorld = new Vector3f(contactPoint);<NEW_LINE>toWorld.y -= 0.2f;<NEW_LINE>ClosestRayResultCallback resultCallback = new ClosestRayResultCallback(fromWorld, toWorld);<NEW_LINE>Matrix4f from = new Matrix4f().setTranslation(fromWorld);<NEW_LINE>Matrix4f to = new Matrix4f().setTranslation(toWorld);<NEW_LINE>Matrix4f targetTransform = this.getHitCollisionObject().getWorldTransform();<NEW_LINE>btDiscreteDynamicsWorld.rayTestSingle(from, to, this.getHitCollisionObject(), this.getHitCollisionObject().getCollisionShape(), targetTransform, resultCallback);<NEW_LINE>if (resultCallback.hasHit()) {<NEW_LINE>foundSlope = true;<NEW_LINE>Vector3f result = new Vector3f();<NEW_LINE>resultCallback.getHitNormalWorld(result);<NEW_LINE>slope = Math.min(slope, result.dot(0, 1, 0));<NEW_LINE>}<NEW_LINE>Vector3f secondTraceOffset = new Vector3f();<NEW_LINE>this.getHitNormalWorld(secondTraceOffset);<NEW_LINE>secondTraceOffset.y = 0;<NEW_LINE>secondTraceOffset.normalize();<NEW_LINE>secondTraceOffset.mul(checkingOffset);<NEW_LINE>fromWorld.add(secondTraceOffset);<NEW_LINE>toWorld.add(secondTraceOffset);<NEW_LINE>resultCallback = new ClosestRayResultCallback(fromWorld, toWorld);<NEW_LINE>from = new Matrix4f().setTranslation(fromWorld);<NEW_LINE>to = new Matrix4f().setTranslation(toWorld);<NEW_LINE>targetTransform = this.getHitCollisionObject().getWorldTransform();<NEW_LINE>btDiscreteDynamicsWorld.rayTestSingle(from, to, this.getHitCollisionObject(), this.getHitCollisionObject().getCollisionShape(), targetTransform, resultCallback);<NEW_LINE>if (resultCallback.hasHit()) {<NEW_LINE>foundSlope = true;<NEW_LINE>Vector3f hitNormal = new Vector3f();<NEW_LINE>resultCallback.getHitNormalWorld(hitNormal);<NEW_LINE>slope = Math.min(slope, hitNormal.dot<MASK><NEW_LINE>}<NEW_LINE>if (!foundSlope) {<NEW_LINE>slope = originalSlope;<NEW_LINE>}<NEW_LINE>resultCallback.dispose();<NEW_LINE>return slope;<NEW_LINE>}
(0, 1, 0));
323,607
final UpdateMatchmakingConfigurationResult executeUpdateMatchmakingConfiguration(UpdateMatchmakingConfigurationRequest updateMatchmakingConfigurationRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(updateMatchmakingConfigurationRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<UpdateMatchmakingConfigurationRequest> request = null;<NEW_LINE>Response<UpdateMatchmakingConfigurationResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new UpdateMatchmakingConfigurationRequestProtocolMarshaller(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, "GameLift");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "UpdateMatchmakingConfiguration");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<UpdateMatchmakingConfigurationResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new UpdateMatchmakingConfigurationResultJsonUnmarshaller());<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(updateMatchmakingConfigurationRequest));
823,340
protected static <A, B> double[] computeBivariateRanks(NumberArrayAdapter<?, A> adapter1, A data1, NumberArrayAdapter<?, B> adapter2, B data2, int len) {<NEW_LINE>double[] ret = new double[len];<NEW_LINE>for (int i = 0; i < len; i++) {<NEW_LINE>for (int j = i + 1; j < len; j++) {<NEW_LINE>double xi = adapter1.getDouble(data1, i), xj = adapter1.getDouble(data1, j);<NEW_LINE>double yi = adapter2.getDouble(data2, i), yj = adapter2.getDouble(data2, j);<NEW_LINE>if (xi < xj) {<NEW_LINE>ret[j] += (yi < yj) ? 1 : (yi == yj) ? .5 : 0;<NEW_LINE>} else if (xj < xi) {<NEW_LINE>ret[i] += (yj < yi) ? 1 : (<MASK><NEW_LINE>} else {<NEW_LINE>// tied on x<NEW_LINE>if (yi < yj) {<NEW_LINE>ret[j] += .5;<NEW_LINE>} else if (yj < yi) {<NEW_LINE>ret[i] += .5;<NEW_LINE>} else {<NEW_LINE>// Double tied<NEW_LINE>ret[i] += .25;<NEW_LINE>ret[j] += .25;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return ret;<NEW_LINE>}
yj == yi) ? .5 : 0;
547,976
private DataStream<Row> dataStreamFirstNPartitionRebalance(DataStream<Row> input, final int numWorkers, final int numPSs) {<NEW_LINE>return input.flatMap(new RichFlatMapFunction<Row, Tuple2<Integer, Row>>() {<NEW_LINE><NEW_LINE>private static final long serialVersionUID = 5072779969295321676L;<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void open(Configuration parameters) throws Exception {<NEW_LINE>this.idx = -1;<NEW_LINE>}<NEW_LINE><NEW_LINE>int idx;<NEW_LINE><NEW_LINE>boolean firstItem = true;<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void flatMap(Row value, Collector<Tuple2<Integer, Row>> out) throws Exception {<NEW_LINE>idx++;<NEW_LINE>idx = idx >= numWorkers ? idx - numWorkers : idx;<NEW_LINE>out.collect(Tuple2.of(idx, value));<NEW_LINE>if (firstItem) {<NEW_LINE>for (int i = 0; i < numPSs; i++) {<NEW_LINE>out.collect(Tuple2.of<MASK><NEW_LINE>}<NEW_LINE>firstItem = false;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}).partitionCustom(new Partitioner<Integer>() {<NEW_LINE><NEW_LINE>private static final long serialVersionUID = -44838855219045312L;<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public int partition(Integer key, int nPart) {<NEW_LINE>return key % nPart;<NEW_LINE>}<NEW_LINE>}, 0).map(new MapFunction<Tuple2<Integer, Row>, Row>() {<NEW_LINE><NEW_LINE>private static final long serialVersionUID = 5543012093523253627L;<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public Row map(Tuple2<Integer, Row> value) throws Exception {<NEW_LINE>return value.f1;<NEW_LINE>}<NEW_LINE>});<NEW_LINE>}
(numWorkers + i, value));
1,275,042
private static void emitTryCatchBlocks(final InstructionAdapter mv, final Class<?>[] declaredExceptions, final List<TryBlock> tryBlocks) {<NEW_LINE>if (isThrowableDeclared(declaredExceptions)) {<NEW_LINE>// Method declares Throwable, no need for a try-catch<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>// If Throwable is not declared, we need an adapter from Throwable to RuntimeException<NEW_LINE>final Label rethrowHandler = new Label();<NEW_LINE>mv.visitLabel(rethrowHandler);<NEW_LINE>// Rethrow handler for RuntimeException, Error, and all declared exception types<NEW_LINE>mv.athrow();<NEW_LINE>// Add "throw new RuntimeException(Throwable)" handler for Throwable<NEW_LINE>final Label throwableHandler = new Label();<NEW_LINE>mv.visitLabel(throwableHandler);<NEW_LINE>wrapThrowable(mv);<NEW_LINE>mv.athrow();<NEW_LINE>for (TryBlock tryBlock : tryBlocks) {<NEW_LINE>mv.visitTryCatchBlock(tryBlock.start, tryBlock.end, rethrowHandler, RUNTIME_EXCEPTION_TYPE_NAME);<NEW_LINE>mv.visitTryCatchBlock(tryBlock.start, tryBlock.end, rethrowHandler, ERROR_TYPE_NAME);<NEW_LINE>for (Class<?> exception : declaredExceptions) {<NEW_LINE>mv.visitTryCatchBlock(tryBlock.start, tryBlock.end, rethrowHandler, Type.getInternalName(exception));<NEW_LINE>}<NEW_LINE>mv.visitTryCatchBlock(tryBlock.start, <MASK><NEW_LINE>}<NEW_LINE>}
tryBlock.end, throwableHandler, THROWABLE_TYPE_NAME);
1,378,743
private void updateHelpImage() {<NEW_LINE>if (Build.VERSION.SDK_INT >= 18) {<NEW_LINE>OsmandSettings settings = getSettings();<NEW_LINE>int count = settings.DISPLAYED_MARKERS_WIDGETS_COUNT.get();<NEW_LINE>LinkedList<Drawable> imgList = new LinkedList<>();<NEW_LINE>imgList.add(getDeviceImg());<NEW_LINE>if (settings.SHOW_LINES_TO_FIRST_MARKERS.get()) {<NEW_LINE>imgList.add(getGuideLineOneImg());<NEW_LINE>if (count == 2) {<NEW_LINE>imgList.add(getGuideLineTwoImg());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (settings.SHOW_ARROWS_TO_FIRST_MARKERS.get()) {<NEW_LINE>imgList.add(getArrowOneImg());<NEW_LINE>if (count == 2) {<NEW_LINE>imgList.add(getArrowTwoImg());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (settings.MARKERS_DISTANCE_INDICATION_ENABLED.get()) {<NEW_LINE>if (settings.MAP_MARKERS_MODE.get().isWidgets()) {<NEW_LINE>imgList.add(getWidget1Img());<NEW_LINE>if (count == 2) {<NEW_LINE>imgList.add(getWidget2Img());<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>imgList.add(getTopBar1Img());<NEW_LINE>if (count == 2) {<NEW_LINE>imgList.add(getTopBar2Img());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>((ImageView) mainView.findViewById(R.id.action_bar_image)).setImageDrawable(new LayerDrawable(imgList.toArray(new Drawable[0])));<NEW_LINE>} else {<NEW_LINE>mainView.findViewById(R.id.action_bar_image_container<MASK><NEW_LINE>}<NEW_LINE>}
).setVisibility(View.GONE);
908,126
public void postIteration() {<NEW_LINE>if (this.ready) {<NEW_LINE>final double currentError = this.mainTrain.getError();<NEW_LINE>this.lastImprovement = (currentError - <MASK><NEW_LINE>EncogLogging.log(EncogLogging.LEVEL_DEBUG, "Last improvement: " + this.lastImprovement);<NEW_LINE>if ((this.lastImprovement > 0) || (Math.abs(this.lastImprovement) < this.minImprovement)) {<NEW_LINE>this.lastHybrid++;<NEW_LINE>if (this.lastHybrid > this.tolerateMinImprovement) {<NEW_LINE>this.lastHybrid = 0;<NEW_LINE>EncogLogging.log(EncogLogging.LEVEL_DEBUG, "Performing hybrid cycle");<NEW_LINE>for (int i = 0; i < this.alternateCycles; i++) {<NEW_LINE>this.altTrain.iteration();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>this.ready = true;<NEW_LINE>}<NEW_LINE>}
this.lastError) / this.lastError;
1,422,317
public boolean initDesktop(int ad_Desktop_ID) {<NEW_LINE>AD_Desktop_ID = ad_Desktop_ID;<NEW_LINE>// Get WB info<NEW_LINE>String sql = null;<NEW_LINE>if (Env.isBaseLanguage(m_ctx, "AD_Desktop"))<NEW_LINE>// 1..3<NEW_LINE>sql = // 4..7<NEW_LINE>"SELECT Name,Description,Help," + " AD_Column_ID,AD_Image_ID,AD_Color_ID,PA_Goal_ID " + "FROM AD_Desktop " + "WHERE AD_Desktop_ID=? AND IsActive='Y'";<NEW_LINE>else<NEW_LINE>sql = "SELECT t.Name,t.Description,t.Help," + " w.AD_Column_ID,w.AD_Image_ID,w.AD_Color_ID,w.PA_Goal_ID " + "FROM AD_Desktop w, AD_Desktop_Trl t " + "WHERE w.AD_Desktop_ID=? AND w.IsActive='Y'" + " AND w.AD_Desktop_ID=t.AD_Desktop_ID" + " AND t.AD_Language='" + Env.getAD_Language(m_ctx) + "'";<NEW_LINE>try {<NEW_LINE>PreparedStatement pstmt = DB.prepareStatement(sql, null);<NEW_LINE>pstmt.setInt(1, AD_Desktop_ID);<NEW_LINE>ResultSet rs = pstmt.executeQuery();<NEW_LINE>if (rs.next()) {<NEW_LINE><MASK><NEW_LINE>Description = rs.getString(2);<NEW_LINE>if (Description == null)<NEW_LINE>Description = "";<NEW_LINE>Help = rs.getString(3);<NEW_LINE>if (Help == null)<NEW_LINE>Help = "";<NEW_LINE>//<NEW_LINE>AD_Column_ID = rs.getInt(4);<NEW_LINE>AD_Image_ID = rs.getInt(5);<NEW_LINE>AD_Color_ID = rs.getInt(6);<NEW_LINE>PA_Goal_ID = rs.getInt(7);<NEW_LINE>} else<NEW_LINE>AD_Desktop_ID = 0;<NEW_LINE>rs.close();<NEW_LINE>pstmt.close();<NEW_LINE>} catch (SQLException e) {<NEW_LINE>log.log(Level.SEVERE, sql, e);<NEW_LINE>}<NEW_LINE>if (AD_Desktop_ID == 0)<NEW_LINE>return false;<NEW_LINE>return initDesktopWorkbenches();<NEW_LINE>}
Name = rs.getString(1);
283,704
final AllocatePublicVirtualInterfaceResult executeAllocatePublicVirtualInterface(AllocatePublicVirtualInterfaceRequest allocatePublicVirtualInterfaceRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(allocatePublicVirtualInterfaceRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<AllocatePublicVirtualInterfaceRequest> request = null;<NEW_LINE>Response<AllocatePublicVirtualInterfaceResult> response = null;<NEW_LINE>try {<NEW_LINE><MASK><NEW_LINE>try {<NEW_LINE>request = new AllocatePublicVirtualInterfaceRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(allocatePublicVirtualInterfaceRequest));<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, "Direct Connect");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "AllocatePublicVirtualInterface");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<AllocatePublicVirtualInterfaceResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new AllocatePublicVirtualInterfaceResultJsonUnmarshaller());<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);
394,547
private void viewChanged(AddressSetView p1AddressSet) {<NEW_LINE>if (primaryProgram != null && !showingSecondProgram) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>p1ViewAddrSet = p1AddressSet;<NEW_LINE>if (showingSecondProgram) {<NEW_LINE>ProgramSelection previousP1Selection = currentSelection;<NEW_LINE>ProgramSelection previousP2DiffHighlight = p2DiffHighlight;<NEW_LINE>ProgramSelection previousP2Selection = p2Selection;<NEW_LINE><MASK><NEW_LINE>AddressSet p1AddressSetAsP2 = DiffUtility.getCompatibleAddressSet(p1AddressSet, secondaryDiffProgram);<NEW_LINE>AddressIndexMap p2IndexMap = new AddressIndexMap(p1AddressSetAsP2);<NEW_LINE>markerManager.getOverviewProvider().setProgram(secondaryDiffProgram, p2IndexMap);<NEW_LINE>fp.setBackgroundColorModel(new MarkerServiceBackgroundColorModel(markerManager, p2IndexMap));<NEW_LINE>currentSelection = previousP1Selection;<NEW_LINE>p2DiffHighlight = previousP2DiffHighlight;<NEW_LINE>p2Selection = previousP2Selection;<NEW_LINE>setProgram2Selection(p2Selection);<NEW_LINE>if (p2DiffHighlight != null) {<NEW_LINE>setDiffHighlight(p2DiffHighlight);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
FieldPanel fp = diffListingPanel.getFieldPanel();
1,326,612
private boolean copyColumn(Domain domain, Column targetColumn) {<NEW_LINE>Table targetTable = targetColumn.getTable();<NEW_LINE>if (dropAction == ConstraintActionType.RESTRICT) {<NEW_LINE>throw DbException.get(ErrorCode.CANNOT_DROP_2, domainName, targetTable.getCreateSQL());<NEW_LINE>}<NEW_LINE>String columnName = targetColumn.getName();<NEW_LINE>ArrayList<ConstraintDomain> constraints = domain.getConstraints();<NEW_LINE>if (constraints != null && !constraints.isEmpty()) {<NEW_LINE>for (ConstraintDomain constraint : constraints) {<NEW_LINE>Expression checkCondition = constraint.getCheckConstraint(session, columnName);<NEW_LINE>AlterTableAddConstraint check = new AlterTableAddConstraint(session, targetTable.getSchema(<MASK><NEW_LINE>check.setTableName(targetTable.getName());<NEW_LINE>check.setCheckExpression(checkCondition);<NEW_LINE>check.update();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>copyExpressions(session, domain, targetColumn);<NEW_LINE>return true;<NEW_LINE>}
), CommandInterface.ALTER_TABLE_ADD_CONSTRAINT_CHECK, false);
1,826,024
public void putInfo(@Nonnull Map<String, String> info) {<NEW_LINE>StringBuilder result = new StringBuilder();<NEW_LINE>for (int i = 0; i < myList.size(); i++) {<NEW_LINE>NavBarItem each = myList.get(i);<NEW_LINE>if (each.isSelected()) {<NEW_LINE>result.append("[").append(each.getText()).append("]");<NEW_LINE>} else {<NEW_LINE>result.<MASK><NEW_LINE>}<NEW_LINE>if (i < myList.size() - 1) {<NEW_LINE>result.append(">");<NEW_LINE>}<NEW_LINE>}<NEW_LINE>info.put("navBar", result.toString());<NEW_LINE>if (isNodePopupActive()) {<NEW_LINE>StringBuilder popupText = new StringBuilder();<NEW_LINE>JBList list = myNodePopup.getList();<NEW_LINE>for (int i = 0; i < list.getModel().getSize(); i++) {<NEW_LINE>Object eachElement = list.getModel().getElementAt(i);<NEW_LINE>String text = new NavBarItem(this, eachElement, myNodePopup, true).getText();<NEW_LINE>int selectedIndex = list.getSelectedIndex();<NEW_LINE>if (selectedIndex != -1 && eachElement.equals(list.getSelectedValue())) {<NEW_LINE>popupText.append("[").append(text).append("]");<NEW_LINE>} else {<NEW_LINE>popupText.append(text);<NEW_LINE>}<NEW_LINE>if (i < list.getModel().getSize() - 1) {<NEW_LINE>popupText.append(">");<NEW_LINE>}<NEW_LINE>}<NEW_LINE>info.put("navBarPopup", popupText.toString());<NEW_LINE>}<NEW_LINE>}
append(each.getText());
925,112
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {<NEW_LINE>super.onCreateView(inflater, container, savedInstanceState);<NEW_LINE>logDebug("Parent Handle: " + managerActivity.getParentHandleIncoming());<NEW_LINE>if (megaApi.getRootNode() == null) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>managerActivity.showFabButton();<NEW_LINE>View v;<NEW_LINE>if (managerActivity.isList) {<NEW_LINE>v = getListView(inflater, container);<NEW_LINE>if (adapter == null) {<NEW_LINE>adapter = new MegaNodeAdapter(context, this, nodes, managerActivity.getParentHandleIncoming(), recyclerView, <MASK><NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>v = getGridView(inflater, container);<NEW_LINE>if (adapter == null) {<NEW_LINE>adapter = new MegaNodeAdapter(context, this, nodes, managerActivity.getParentHandleIncoming(), recyclerView, INCOMING_SHARES_ADAPTER, MegaNodeAdapter.ITEM_VIEW_TYPE_GRID, sortByHeaderViewModel);<NEW_LINE>}<NEW_LINE>gridLayoutManager.setSpanSizeLookup(adapter.getSpanSizeLookup(gridLayoutManager.getSpanCount()));<NEW_LINE>}<NEW_LINE>adapter.setParentHandle(managerActivity.getParentHandleIncoming());<NEW_LINE>adapter.setListFragment(recyclerView);<NEW_LINE>if (managerActivity.getParentHandleIncoming() == INVALID_HANDLE) {<NEW_LINE>logWarning("ParentHandle -1");<NEW_LINE>findNodes();<NEW_LINE>} else {<NEW_LINE>managerActivity.hideTabs(true, INCOMING_TAB);<NEW_LINE>MegaNode parentNode = megaApi.getNodeByHandle(managerActivity.getParentHandleIncoming());<NEW_LINE>logDebug("ParentHandle to find children: " + managerActivity.getParentHandleIncoming());<NEW_LINE>nodes = megaApi.getChildren(parentNode, sortOrderManagement.getOrderCloud());<NEW_LINE>adapter.setNodes(nodes);<NEW_LINE>}<NEW_LINE>managerActivity.supportInvalidateOptionsMenu();<NEW_LINE>adapter.setMultipleSelect(false);<NEW_LINE>recyclerView.setAdapter(adapter);<NEW_LINE>visibilityFastScroller();<NEW_LINE>setEmptyView();<NEW_LINE>logDebug("Deep browser tree: " + managerActivity.deepBrowserTreeIncoming);<NEW_LINE>return v;<NEW_LINE>}
INCOMING_SHARES_ADAPTER, MegaNodeAdapter.ITEM_VIEW_TYPE_LIST, sortByHeaderViewModel);
699,534
public ApiResponse<List<File>> filesGetRandomPhotosWithHttpInfo(String id, Integer numberOfPhotos) throws ApiException {<NEW_LINE>Object localVarPostBody = null;<NEW_LINE>// verify the required parameter 'id' is set<NEW_LINE>if (id == null) {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>// create path and map variables<NEW_LINE>String localVarPath = "/v4/files/{id}/randomphotos".replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString()));<NEW_LINE>// query params<NEW_LINE>List<Pair> localVarQueryParams = new ArrayList<Pair>();<NEW_LINE>Map<String, String> localVarHeaderParams = new HashMap<String, String>();<NEW_LINE>Map<String, Object> localVarFormParams = new HashMap<String, Object>();<NEW_LINE>localVarQueryParams.addAll(apiClient.parameterToPairs("", "numberOfPhotos", numberOfPhotos));<NEW_LINE>final String[] localVarAccepts = { "application/json", "text/json" };<NEW_LINE>final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);<NEW_LINE>final String[] localVarContentTypes = {};<NEW_LINE>final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);<NEW_LINE>String[] localVarAuthNames = new String[] { "oauth2" };<NEW_LINE>GenericType<List<File>> localVarReturnType = new GenericType<List<File>>() {<NEW_LINE>};<NEW_LINE>return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);<NEW_LINE>}
throw new ApiException(400, "Missing the required parameter 'id' when calling filesGetRandomPhotos");
810,009
public void marshall(BusinessReportSchedule businessReportSchedule, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (businessReportSchedule == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(businessReportSchedule.getScheduleArn(), SCHEDULEARN_BINDING);<NEW_LINE>protocolMarshaller.marshall(<MASK><NEW_LINE>protocolMarshaller.marshall(businessReportSchedule.getS3BucketName(), S3BUCKETNAME_BINDING);<NEW_LINE>protocolMarshaller.marshall(businessReportSchedule.getS3KeyPrefix(), S3KEYPREFIX_BINDING);<NEW_LINE>protocolMarshaller.marshall(businessReportSchedule.getFormat(), FORMAT_BINDING);<NEW_LINE>protocolMarshaller.marshall(businessReportSchedule.getContentRange(), CONTENTRANGE_BINDING);<NEW_LINE>protocolMarshaller.marshall(businessReportSchedule.getRecurrence(), RECURRENCE_BINDING);<NEW_LINE>protocolMarshaller.marshall(businessReportSchedule.getLastBusinessReport(), LASTBUSINESSREPORT_BINDING);<NEW_LINE>} catch (Exception e) {<NEW_LINE>throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e);<NEW_LINE>}<NEW_LINE>}
businessReportSchedule.getScheduleName(), SCHEDULENAME_BINDING);
580,555
protected SnapshotPolicyVO persistSnapshotPolicy(VolumeVO volume, String schedule, String timezone, IntervalType intervalType, int maxSnaps, boolean display, boolean active, Map<String, String> tags) {<NEW_LINE>long volumeId = volume.getId();<NEW_LINE><MASK><NEW_LINE>GlobalLock createSnapshotPolicyLock = GlobalLock.getInternLock("createSnapshotPolicy_" + volumeId);<NEW_LINE>boolean isLockAcquired = createSnapshotPolicyLock.lock(5);<NEW_LINE>if (!isLockAcquired) {<NEW_LINE>throw new CloudRuntimeException(String.format("Unable to aquire lock for creating snapshot policy [%s] for %s.", intervalType, volumeDescription));<NEW_LINE>}<NEW_LINE>s_logger.debug(String.format("Acquired lock for creating snapshot policy [%s] for volume %s.", intervalType, volumeDescription));<NEW_LINE>try {<NEW_LINE>SnapshotPolicyVO policy = _snapshotPolicyDao.findOneByVolumeInterval(volumeId, intervalType);<NEW_LINE>if (policy == null) {<NEW_LINE>policy = createSnapshotPolicy(volumeId, schedule, timezone, intervalType, maxSnaps, display);<NEW_LINE>} else {<NEW_LINE>updateSnapshotPolicy(policy, schedule, timezone, intervalType, maxSnaps, active, display);<NEW_LINE>}<NEW_LINE>createTagsForSnapshotPolicy(tags, policy);<NEW_LINE>CallContext.current().putContextParameter(SnapshotPolicy.class, policy.getUuid());<NEW_LINE>return policy;<NEW_LINE>} finally {<NEW_LINE>createSnapshotPolicyLock.unlock();<NEW_LINE>}<NEW_LINE>}
String volumeDescription = volume.getVolumeDescription();
1,617,892
synchronized public byte put(byte b, int index) {<NEW_LINE>if (index >= 0) {<NEW_LINE>throw new IndexOutOfBoundsException("Value must be negative: " + index);<NEW_LINE>} else if (index < -guardBytes) {<NEW_LINE>throw new IndexOutOfBoundsException("Insufficient guard bytes to insert at index: " + index);<NEW_LINE>}<NEW_LINE>int distance = -index;<NEW_LINE>byte original;<NEW_LINE>byte[] data;<NEW_LINE>Slice slice = null;<NEW_LINE>int offset = 0;<NEW_LINE>for (int i = rawData.size() - 1; i >= 0; i--, slice = null) {<NEW_LINE>slice = (Slice) rawData.get(i);<NEW_LINE>if (distance <= slice.length) {<NEW_LINE>break;<NEW_LINE>} else {<NEW_LINE>distance -= slice.length;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>data = slice.data;<NEW_LINE>offset = slice<MASK><NEW_LINE>} else {<NEW_LINE>data = buffer.array();<NEW_LINE>offset = buffer.arrayOffset() + buffer.position() + buffer.remaining() - distance;<NEW_LINE>} else {<NEW_LINE>throw new IndexOutOfBoundsException("Index references past the begining of the data");<NEW_LINE>}<NEW_LINE>}<NEW_LINE>original = data[offset];<NEW_LINE>data[offset] = b;<NEW_LINE>return original;<NEW_LINE>}
.offset + slice.length - distance;
1,150,569
public static ListAppGroupsResponse unmarshall(ListAppGroupsResponse listAppGroupsResponse, UnmarshallerContext _ctx) {<NEW_LINE>listAppGroupsResponse.setRequestId(_ctx.stringValue("ListAppGroupsResponse.requestId"));<NEW_LINE>listAppGroupsResponse.setTotalCount(_ctx.integerValue("ListAppGroupsResponse.totalCount"));<NEW_LINE>List<ResultItem> result = new ArrayList<ResultItem>();<NEW_LINE>for (int i = 0; i < _ctx.lengthValue("ListAppGroupsResponse.result.Length"); i++) {<NEW_LINE>ResultItem resultItem = new ResultItem();<NEW_LINE>resultItem.setId(_ctx.stringValue("ListAppGroupsResponse.result[" + i + "].id"));<NEW_LINE>resultItem.setName(_ctx.stringValue("ListAppGroupsResponse.result[" + i + "].name"));<NEW_LINE>resultItem.setCurrentVersion(_ctx.stringValue("ListAppGroupsResponse.result[" + i + "].currentVersion"));<NEW_LINE>resultItem.setSwitchedTime(_ctx.integerValue("ListAppGroupsResponse.result[" + i + "].switchedTime"));<NEW_LINE>resultItem.setChargingWay(_ctx.integerValue("ListAppGroupsResponse.result[" + i + "].chargingWay"));<NEW_LINE>resultItem.setType(_ctx.stringValue("ListAppGroupsResponse.result[" + i + "].type"));<NEW_LINE>resultItem.setProjectId(_ctx.stringValue("ListAppGroupsResponse.result[" + i + "].projectId"));<NEW_LINE>resultItem.setChargeType(_ctx.stringValue("ListAppGroupsResponse.result[" + i + "].chargeType"));<NEW_LINE>resultItem.setExpireOn(_ctx.stringValue("ListAppGroupsResponse.result[" + i + "].expireOn"));<NEW_LINE>resultItem.setInstanceId(_ctx.stringValue("ListAppGroupsResponse.result[" + i + "].instanceId"));<NEW_LINE>resultItem.setCommodityCode(_ctx.stringValue("ListAppGroupsResponse.result[" + i + "].commodityCode"));<NEW_LINE>resultItem.setProcessingOrderId(_ctx.stringValue("ListAppGroupsResponse.result[" + i + "].processingOrderId"));<NEW_LINE>resultItem.setFirstRankAlgoDeploymentId(_ctx.integerValue("ListAppGroupsResponse.result[" + i + "].firstRankAlgoDeploymentId"));<NEW_LINE>resultItem.setSecondRankAlgoDeploymentId(_ctx.integerValue("ListAppGroupsResponse.result[" + i + "].secondRankAlgoDeploymentId"));<NEW_LINE>resultItem.setPendingSecondRankAlgoDeploymentId(_ctx.integerValue("ListAppGroupsResponse.result[" + i + "].pendingSecondRankAlgoDeploymentId"));<NEW_LINE>resultItem.setDescription(_ctx.stringValue<MASK><NEW_LINE>resultItem.setProduced(_ctx.integerValue("ListAppGroupsResponse.result[" + i + "].produced"));<NEW_LINE>resultItem.setLockedByExpiration(_ctx.integerValue("ListAppGroupsResponse.result[" + i + "].lockedByExpiration"));<NEW_LINE>resultItem.setHasPendingQuotaReviewTask(_ctx.integerValue("ListAppGroupsResponse.result[" + i + "].hasPendingQuotaReviewTask"));<NEW_LINE>resultItem.setCreated(_ctx.integerValue("ListAppGroupsResponse.result[" + i + "].created"));<NEW_LINE>resultItem.setUpdated(_ctx.integerValue("ListAppGroupsResponse.result[" + i + "].updated"));<NEW_LINE>resultItem.setStatus(_ctx.stringValue("ListAppGroupsResponse.result[" + i + "].status"));<NEW_LINE>resultItem.setLockMode(_ctx.stringValue("ListAppGroupsResponse.result[" + i + "].lockMode"));<NEW_LINE>resultItem.setDomain(_ctx.stringValue("ListAppGroupsResponse.result[" + i + "].domain"));<NEW_LINE>Quota quota = new Quota();<NEW_LINE>quota.setDocSize(_ctx.integerValue("ListAppGroupsResponse.result[" + i + "].quota.docSize"));<NEW_LINE>quota.setComputeResource(_ctx.integerValue("ListAppGroupsResponse.result[" + i + "].quota.computeResource"));<NEW_LINE>quota.setSpec(_ctx.stringValue("ListAppGroupsResponse.result[" + i + "].quota.spec"));<NEW_LINE>resultItem.setQuota(quota);<NEW_LINE>result.add(resultItem);<NEW_LINE>}<NEW_LINE>listAppGroupsResponse.setResult(result);<NEW_LINE>return listAppGroupsResponse;<NEW_LINE>}
("ListAppGroupsResponse.result[" + i + "].description"));
852,760
private Release doDeployStream(StreamDefinition streamDefinition, Map<String, String> deploymentProperties) {<NEW_LINE>// Extract skipper properties<NEW_LINE>Map<String, String> skipperDeploymentProperties = getSkipperProperties(deploymentProperties);<NEW_LINE>if (!skipperDeploymentProperties.containsKey(SkipperStream.SKIPPER_PACKAGE_VERSION)) {<NEW_LINE>skipperDeploymentProperties.put(SkipperStream.SKIPPER_PACKAGE_VERSION, DEFAULT_SKIPPER_PACKAGE_VERSION);<NEW_LINE>}<NEW_LINE>// Create map without any skipper properties<NEW_LINE>Map<String, String> deploymentPropertiesToUse = deploymentProperties.entrySet().stream().filter(mapEntry -> !mapEntry.getKey().startsWith(SkipperStream.SKIPPER_KEY_PREFIX)).collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue));<NEW_LINE>final String platformName = skipperDeploymentProperties.getOrDefault(SkipperStream.SKIPPER_PLATFORM_NAME, "default");<NEW_LINE>String platformType = this.platformList().stream().filter(deployer -> deployer.getName().equalsIgnoreCase(platformName)).map(Deployer::getType).findFirst().orElse("unknown");<NEW_LINE>if (platformType.equals("kubernetes") && !STREAM_NAME_PATTERN.matcher(streamDefinition.getName()).matches()) {<NEW_LINE>throw new InvalidStreamDefinitionException(String.format("Stream name %s is invalid. %s", streamDefinition.getName(), STREAM_NAME_VALIDATION_MSG));<NEW_LINE>}<NEW_LINE>List<AppDeploymentRequest> appDeploymentRequests = this.appDeploymentRequestCreator.createRequests(streamDefinition, deploymentPropertiesToUse, platformType);<NEW_LINE>DeploymentPropertiesUtils.validateSkipperDeploymentProperties(deploymentPropertiesToUse);<NEW_LINE>StreamDeploymentRequest streamDeploymentRequest = new StreamDeploymentRequest(streamDefinition.getName(), streamDefinition.getDslText(), appDeploymentRequests, skipperDeploymentProperties);<NEW_LINE>Release release = <MASK><NEW_LINE>if (release != null) {<NEW_LINE>updateStreamDefinitionFromReleaseManifest(streamDefinition.getName(), release.getManifest().getData());<NEW_LINE>} else {<NEW_LINE>logger.error("Missing skipper release after Stream deploy!");<NEW_LINE>}<NEW_LINE>return release;<NEW_LINE>}
this.skipperStreamDeployer.deployStream(streamDeploymentRequest);
600,891
public static List<List<Writable>> executeJoin(Join join, List<List<Writable>> left, List<List<Writable>> right) {<NEW_LINE>String[] leftColumnNames = join.getJoinColumnsLeft();<NEW_LINE>int[] leftColumnIndexes = new int[leftColumnNames.length];<NEW_LINE>for (int i = 0; i < leftColumnNames.length; i++) {<NEW_LINE>leftColumnIndexes[i] = join.getLeftSchema().getIndexOfColumn(leftColumnNames[i]);<NEW_LINE>}<NEW_LINE><MASK><NEW_LINE>List<Pair<List<Writable>, List<Writable>>> leftJV = left.stream().filter(input -> input.size() != leftColumnNames.length).map(input -> extractKeysFunction1.apply(input)).collect(toList());<NEW_LINE>String[] rightColumnNames = join.getJoinColumnsRight();<NEW_LINE>int[] rightColumnIndexes = new int[rightColumnNames.length];<NEW_LINE>for (int i = 0; i < rightColumnNames.length; i++) {<NEW_LINE>rightColumnIndexes[i] = join.getRightSchema().getIndexOfColumn(rightColumnNames[i]);<NEW_LINE>}<NEW_LINE>ExtractKeysFunction extractKeysFunction = new ExtractKeysFunction(rightColumnIndexes);<NEW_LINE>List<Pair<List<Writable>, List<Writable>>> rightJV = right.stream().filter(input -> input.size() != rightColumnNames.length).map(input -> extractKeysFunction.apply(input)).collect(toList());<NEW_LINE>Map<List<Writable>, Pair<List<List<Writable>>, List<List<Writable>>>> cogroupedJV = FunctionalUtils.cogroup(leftJV, rightJV);<NEW_LINE>ExecuteJoinFromCoGroupFlatMapFunction executeJoinFromCoGroupFlatMapFunction = new ExecuteJoinFromCoGroupFlatMapFunction(join);<NEW_LINE>List<List<Writable>> ret = cogroupedJV.entrySet().stream().flatMap(input -> executeJoinFromCoGroupFlatMapFunction.call(Pair.of(input.getKey(), input.getValue())).stream()).collect(toList());<NEW_LINE>Schema retSchema = join.getOutputSchema();<NEW_LINE>return ArrowConverter.toArrowWritables(ArrowConverter.toArrowColumns(bufferAllocator, retSchema, ret), retSchema);<NEW_LINE>}
ExtractKeysFunction extractKeysFunction1 = new ExtractKeysFunction(leftColumnIndexes);
619,474
public void handleLineComment(int commentIndex) {<NEW_LINE>Token commentToken = this.tm.get(commentIndex);<NEW_LINE>boolean isOnFirstColumn = handleWhitespaceAround(commentIndex);<NEW_LINE>if (handleFormatOnOffTags(commentToken))<NEW_LINE>return;<NEW_LINE>if (isOnFirstColumn) {<NEW_LINE>if (this.options.comment_format_line_comment && !this.options.comment_format_line_comment_starting_on_first_column) {<NEW_LINE>this.lastLineComment = null;<NEW_LINE>commentToken.setIndent(0);<NEW_LINE>commentToken.setWrapPolicy(WrapPolicy.FORCE_FIRST_COLUMN);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (this.options.never_indent_line_comments_on_first_column) {<NEW_LINE>commentToken.setIndent(0);<NEW_LINE>commentToken.setWrapPolicy(WrapPolicy.FORCE_FIRST_COLUMN);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>handleNLSTags(commentToken, commentIndex);<NEW_LINE>int positionInLine = this.tm.findSourcePositionInLine(commentToken.originalStart);<NEW_LINE>boolean isContinuation = commentIndex > 0 && this.tm.get(commentIndex - 1) == this.lastLineComment && (positionInLine >= this.lastLineCommentPosition - this.options.indentation_size + 1) && this.tm.countLineBreaksBetween(this.lastLineComment, commentToken) == 1;<NEW_LINE>boolean isHeader = this.tm.isInHeader(commentIndex);<NEW_LINE>boolean formattingEnabled = (this.options.comment_format_line_comment && !isHeader) || (this.options.comment_format_header && isHeader);<NEW_LINE>if (!formattingEnabled) {<NEW_LINE>preserveWhitespace(commentToken, commentIndex);<NEW_LINE>if (isContinuation) {<NEW_LINE>WrapPolicy policy = this.lastLineComment.getWrapPolicy();<NEW_LINE>if (policy == null) {<NEW_LINE>int lineStart = this.tm.getPositionInLine(this.tm.findFirstTokenInLine(commentIndex - 1));<NEW_LINE>int commentStart = this.tm.getPositionInLine(commentIndex - 1);<NEW_LINE>policy = new WrapPolicy(WrapMode.WHERE_NECESSARY, commentIndex - 1, commentStart - lineStart);<NEW_LINE>}<NEW_LINE>commentToken.setWrapPolicy(policy);<NEW_LINE>this.lastLineComment = commentToken;<NEW_LINE>} else if (commentToken.getLineBreaksBefore() == 0) {<NEW_LINE>this.lastLineComment = commentToken;<NEW_LINE>this.lastLineCommentPosition = positionInLine;<NEW_LINE>}<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>List<Token> structure = tokenizeLineComment(commentToken);<NEW_LINE>if (isContinuation) {<NEW_LINE>Token first = structure.get(0);<NEW_LINE>first.breakBefore();<NEW_LINE>first.setWrapPolicy(new WrapPolicy(WrapMode.WHERE_NECESSARY, commentIndex - 1, this.lastLineCommentPosition));<NEW_LINE>// merge previous and current line comment<NEW_LINE>Token previous = this.lastLineComment;<NEW_LINE>Token merged = new Token(previous, previous.originalStart, commentToken.originalEnd, previous.tokenType);<NEW_LINE>this.tm.remove(commentIndex - 1);<NEW_LINE>this.tm.insert(commentIndex - 1, merged);<NEW_LINE>this.tm.remove(commentIndex);<NEW_LINE>List<Token> lastStructure <MASK><NEW_LINE>lastStructure.addAll(structure);<NEW_LINE>merged.setInternalStructure(lastStructure);<NEW_LINE>this.lastLineComment = merged;<NEW_LINE>} else {<NEW_LINE>commentToken.setInternalStructure(structure);<NEW_LINE>handleCompilerTags(commentToken, commentIndex);<NEW_LINE>preserveWhitespace(commentToken, commentIndex);<NEW_LINE>this.lastLineComment = commentToken;<NEW_LINE>this.lastLineCommentPosition = positionInLine;<NEW_LINE>}<NEW_LINE>}
= this.lastLineComment.getInternalStructure();
470,707
public DescribeEnvironmentRevisionResponse describeEnvironmentRevision(@NonNull final DescribeEnvironmentRevisionRequest describeEnvironmentRevisionRequest) throws ResourceNotFoundException, InternalServiceException {<NEW_LINE>final com.amazonaws.blox.dataservicemodel.v1.model.EnvironmentId environmentIdFromRequest = describeEnvironmentRevisionRequest.getEnvironmentId();<NEW_LINE>final EnvironmentId environmentId = apiModelMapper.toModelEnvironmentId(environmentIdFromRequest);<NEW_LINE>final String environmentRevisionId = describeEnvironmentRevisionRequest.getEnvironmentRevisionId();<NEW_LINE>try {<NEW_LINE>final EnvironmentRevision environmentRevision = environmentRepository.getEnvironmentRevision(environmentId, environmentRevisionId);<NEW_LINE>return DescribeEnvironmentRevisionResponse.builder().environmentRevision(apiModelMapper.toWrapperEnvironmentRevision(environmentRevision)).build();<NEW_LINE>} catch (final ResourceNotFoundException | InternalServiceException e) {<NEW_LINE>log.error(e.getMessage(), e);<NEW_LINE>throw e;<NEW_LINE>} catch (final Exception e) {<NEW_LINE>log.error(e.getMessage(), e);<NEW_LINE>throw new InternalServiceException(<MASK><NEW_LINE>}<NEW_LINE>}
e.getMessage(), e);
950,301
Object doIt(Object clazz, String name, PTuple mroTuple, @Cached("createClassProfile()") ValueProfile profile) {<NEW_LINE>CyclicAssumption nativeClassStableAssumption = getContext().getNativeClassStableAssumption((PythonNativeClass) clazz, false);<NEW_LINE>if (nativeClassStableAssumption != null) {<NEW_LINE>nativeClassStableAssumption.invalidate("PyType_Modified(\"" + name + "\") called");<NEW_LINE>}<NEW_LINE>SequenceStorage sequenceStorage = profile.profile(mroTuple.getSequenceStorage());<NEW_LINE>if (sequenceStorage instanceof MroSequenceStorage) {<NEW_LINE>((<MASK><NEW_LINE>} else {<NEW_LINE>CompilerDirectives.transferToInterpreterAndInvalidate();<NEW_LINE>throw new IllegalStateException("invalid MRO object for native type \"" + name + "\"");<NEW_LINE>}<NEW_LINE>SpecialMethodSlot.reinitializeSpecialMethodSlots(PythonNativeClass.cast(clazz), getLanguage());<NEW_LINE>return PNone.NONE;<NEW_LINE>}
MroSequenceStorage) sequenceStorage).lookupChanged();
1,262,012
public OResultSet execute(ODatabaseDocumentInternal database, String script, Map params) {<NEW_LINE>preExecute(database, script, params);<NEW_LINE>final OScriptManager scriptManager = database.getSharedContext()<MASK><NEW_LINE>final Set<String> allowedPackaged = scriptManager.getAllowedPackages();<NEW_LINE>try (Context ctx = Context.newBuilder().allowHostAccess(HostAccess.ALL).allowNativeAccess(false).allowCreateProcess(false).allowCreateThread(false).allowIO(false).allowHostClassLoading(false).allowHostClassLookup(s -> {<NEW_LINE>if (allowedPackaged.contains(s))<NEW_LINE>return true;<NEW_LINE>final int pos = s.lastIndexOf('.');<NEW_LINE>if (pos > -1)<NEW_LINE>return allowedPackaged.contains(s.substring(0, pos) + ".*");<NEW_LINE>return false;<NEW_LINE>}).build()) {<NEW_LINE>OPolyglotScriptBinding bindings = new OPolyglotScriptBinding(ctx.getBindings(language));<NEW_LINE>scriptManager.bindContextVariables(null, bindings, database, null, params);<NEW_LINE>Value result = ctx.eval(language, script);<NEW_LINE>return transformer.toResultSet(result);<NEW_LINE>} catch (PolyglotException e) {<NEW_LINE>final int col = e.getSourceLocation() != null ? e.getSourceLocation().getStartColumn() : 0;<NEW_LINE>throw OException.wrapException(new OCommandScriptException("Error on execution of the script", script, col), new ScriptException(e));<NEW_LINE>}<NEW_LINE>}
.getOrientDB().getScriptManager();
1,560,615
public void upgrade() throws Exception {<NEW_LINE>checkNotNull(initialSchemaVersion);<NEW_LINE>if (initialSchemaVersion == CURR_SCHEMA_VERSION) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (initialSchemaVersion > CURR_SCHEMA_VERSION) {<NEW_LINE>startupLogger.warn("running an older version of glowroot on a newer glowroot schema" + <MASK><NEW_LINE>return;<NEW_LINE>}<NEW_LINE>startupLogger.info("upgrading glowroot schema from version {} to version {}...", initialSchemaVersion, CURR_SCHEMA_VERSION);<NEW_LINE>// 0.9.28 to 0.10.0<NEW_LINE>if (initialSchemaVersion < 3) {<NEW_LINE>renameOldGaugeNameTable();<NEW_LINE>updateSchemaVersion(3);<NEW_LINE>}<NEW_LINE>if (initialSchemaVersion < 4) {<NEW_LINE>populateNewGaugeNameTable();<NEW_LINE>updateSchemaVersion(4);<NEW_LINE>}<NEW_LINE>if (initialSchemaVersion == 4) {<NEW_LINE>// only applies when upgrading from immediately prior schema version (4)<NEW_LINE>// (fix bad upgrade that populated gauge_name table based on gauge_value_rollup_3<NEW_LINE>// instead of gauge_value_rollup_4)<NEW_LINE>populateNewGaugeNameTable();<NEW_LINE>updateSchemaVersion(5);<NEW_LINE>} else {<NEW_LINE>updateSchemaVersion(5);<NEW_LINE>}<NEW_LINE>// upgrade from 0.10.12 to 0.11.0<NEW_LINE>if (initialSchemaVersion < 6) {<NEW_LINE>renameAggregateColumnNames();<NEW_LINE>updateSchemaVersion(6);<NEW_LINE>}<NEW_LINE>// when adding new schema upgrade, make sure to update CURR_SCHEMA_VERSION above<NEW_LINE>startupLogger.info("upgraded glowroot schema from version {} to version {}", initialSchemaVersion, CURR_SCHEMA_VERSION);<NEW_LINE>}
" (expecting glowroot schema version <= {} but found version {}), this could" + " be problematic", CURR_SCHEMA_VERSION, initialSchemaVersion);
163,529
private void checkIndex(RuntimeEnvironment env) {<NEW_LINE>if (env.isProjectsEnabled()) {<NEW_LINE>Map<String, Project> projects = env.getProjects();<NEW_LINE>File indexRoot = new File(env.getDataRootPath(), IndexDatabase.INDEX_DIR);<NEW_LINE>if (indexRoot.exists()) {<NEW_LINE>LOGGER.log(Level.FINE, "Checking indexes for all projects");<NEW_LINE>for (Map.Entry<String, Project> projectEntry : projects.entrySet()) {<NEW_LINE>try {<NEW_LINE>IndexCheck.checkDir(new File(indexRoot, projectEntry.getKey()));<NEW_LINE>} catch (Exception e) {<NEW_LINE>LOGGER.log(Level.WARNING, String.format("Project %s index check failed, marking as not indexed", projectEntry.getKey()), e);<NEW_LINE>projectEntry.getValue().setIndexed(false);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>LOGGER.log(Level.FINE, "Index check for all projects done");<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>LOGGER.<MASK><NEW_LINE>try {<NEW_LINE>IndexCheck.checkDir(new File(env.getDataRootPath(), IndexDatabase.INDEX_DIR));<NEW_LINE>} catch (Exception e) {<NEW_LINE>LOGGER.log(Level.SEVERE, "index check failed", e);<NEW_LINE>}<NEW_LINE>LOGGER.log(Level.FINE, "Index check done");<NEW_LINE>}<NEW_LINE>}
log(Level.FINE, "Checking index");
314,776
public static ListPolicyAttachmentsResponse unmarshall(ListPolicyAttachmentsResponse listPolicyAttachmentsResponse, UnmarshallerContext _ctx) {<NEW_LINE>listPolicyAttachmentsResponse.setRequestId(_ctx.stringValue("ListPolicyAttachmentsResponse.RequestId"));<NEW_LINE>listPolicyAttachmentsResponse.setTotalCount(_ctx.integerValue("ListPolicyAttachmentsResponse.TotalCount"));<NEW_LINE>listPolicyAttachmentsResponse.setPageSize(_ctx.integerValue("ListPolicyAttachmentsResponse.PageSize"));<NEW_LINE>listPolicyAttachmentsResponse.setPageNumber(_ctx.integerValue("ListPolicyAttachmentsResponse.PageNumber"));<NEW_LINE>List<PolicyAttachment> policyAttachments = new ArrayList<PolicyAttachment>();<NEW_LINE>for (int i = 0; i < _ctx.lengthValue("ListPolicyAttachmentsResponse.PolicyAttachments.Length"); i++) {<NEW_LINE>PolicyAttachment policyAttachment = new PolicyAttachment();<NEW_LINE>policyAttachment.setDescription(_ctx.stringValue("ListPolicyAttachmentsResponse.PolicyAttachments[" + i + "].Description"));<NEW_LINE>policyAttachment.setResourceGroupId(_ctx.stringValue("ListPolicyAttachmentsResponse.PolicyAttachments[" + i + "].ResourceGroupId"));<NEW_LINE>policyAttachment.setPolicyName(_ctx.stringValue("ListPolicyAttachmentsResponse.PolicyAttachments[" + i + "].PolicyName"));<NEW_LINE>policyAttachment.setPrincipalName(_ctx.stringValue("ListPolicyAttachmentsResponse.PolicyAttachments[" + i + "].PrincipalName"));<NEW_LINE>policyAttachment.setAttachDate(_ctx.stringValue("ListPolicyAttachmentsResponse.PolicyAttachments[" + i + "].AttachDate"));<NEW_LINE>policyAttachment.setPolicyType(_ctx.stringValue("ListPolicyAttachmentsResponse.PolicyAttachments[" + i + "].PolicyType"));<NEW_LINE>policyAttachment.setPrincipalType(_ctx.stringValue<MASK><NEW_LINE>policyAttachments.add(policyAttachment);<NEW_LINE>}<NEW_LINE>listPolicyAttachmentsResponse.setPolicyAttachments(policyAttachments);<NEW_LINE>return listPolicyAttachmentsResponse;<NEW_LINE>}
("ListPolicyAttachmentsResponse.PolicyAttachments[" + i + "].PrincipalType"));
377,823
public void run() {<NEW_LINE>if (!myProject.isInitialized() || myProject.isDisposed())<NEW_LINE>return;<NEW_LINE>final List<VcsDirectoryMapping> copy = myNewMappings.getDirectoryMappings();<NEW_LINE>final List<<MASK><NEW_LINE>added.removeAll(myDirectoryMappingWatches.keySet());<NEW_LINE>final List<VcsDirectoryMapping> deleted = newLinkedList(myDirectoryMappingWatches.keySet());<NEW_LINE>deleted.removeAll(copy);<NEW_LINE>final Map<String, VcsDirectoryMapping> toAdd = Maps.newHashMap(FileUtil.PATH_HASHING_STRATEGY);<NEW_LINE>for (VcsDirectoryMapping mapping : added) {<NEW_LINE>if (!mapping.isDefaultMapping()) {<NEW_LINE>toAdd.put(FileUtil.toCanonicalPath(mapping.getDirectory()), mapping);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>final Collection<LocalFileSystem.WatchRequest> toRemove = newLinkedList();<NEW_LINE>for (VcsDirectoryMapping mapping : deleted) {<NEW_LINE>if (mapping.isDefaultMapping())<NEW_LINE>continue;<NEW_LINE>final LocalFileSystem.WatchRequest removed = myDirectoryMappingWatches.remove(mapping);<NEW_LINE>if (removed != null) {<NEW_LINE>toRemove.add(removed);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>final Set<LocalFileSystem.WatchRequest> requests = myLfs.replaceWatchedRoots(toRemove, toAdd.keySet(), null);<NEW_LINE>for (LocalFileSystem.WatchRequest request : requests) {<NEW_LINE>final VcsDirectoryMapping mapping = toAdd.get(request.getRootPath());<NEW_LINE>if (mapping != null) {<NEW_LINE>myDirectoryMappingWatches.put(mapping, request);<NEW_LINE>} else {<NEW_LINE>LOG.error("root=" + request.getRootPath() + " toAdd=" + toAdd.keySet());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
VcsDirectoryMapping> added = newLinkedList(copy);
521,713
private static void populateMatrix4fArray(Matrix4f[] array, LittleEndien stream, int count, int byteOffset, int byteStride, int numComponents, VertexBuffer.Format format) throws IOException {<NEW_LINE><MASK><NEW_LINE>int index = byteOffset;<NEW_LINE>int dataLength = componentSize * numComponents;<NEW_LINE>int stride = Math.max(dataLength, byteStride);<NEW_LINE>int end = count * stride + byteOffset;<NEW_LINE>stream.skipBytes(byteOffset);<NEW_LINE>int arrayIndex = 0;<NEW_LINE>while (index < end) {<NEW_LINE>array[arrayIndex] = toRowMajor(readAsFloat(stream, format), readAsFloat(stream, format), readAsFloat(stream, format), readAsFloat(stream, format), readAsFloat(stream, format), readAsFloat(stream, format), readAsFloat(stream, format), readAsFloat(stream, format), readAsFloat(stream, format), readAsFloat(stream, format), readAsFloat(stream, format), readAsFloat(stream, format), readAsFloat(stream, format), readAsFloat(stream, format), readAsFloat(stream, format), readAsFloat(stream, format));<NEW_LINE>// gltf matrix are column major, JME ones are row major.<NEW_LINE>arrayIndex++;<NEW_LINE>if (dataLength < stride) {<NEW_LINE>stream.skipBytes(stride - dataLength);<NEW_LINE>}<NEW_LINE>index += stride;<NEW_LINE>}<NEW_LINE>}
int componentSize = format.getComponentSize();
647,536
private void updateActionsButtons() {<NEW_LINE>View header = view.findViewById(R.id.header);<NEW_LINE>View content = view.findViewById(R.id.content);<NEW_LINE>AppCompatImageView upDownButton = view.findViewById(R.id.up_down_button);<NEW_LINE>header.setOnClickListener(v -> {<NEW_LINE>boolean expanded = content.getVisibility() == View.VISIBLE;<NEW_LINE>int arrowIconId = expanded ? R.drawable.ic_action_arrow_down : R.drawable.ic_action_arrow_up;<NEW_LINE>int arrowIconColorId = ColorUtilities.getDefaultIconColorId(nightMode);<NEW_LINE>upDownButton.setImageDrawable(getColoredIcon(arrowIconId, arrowIconColorId));<NEW_LINE>AndroidUiHelper<MASK><NEW_LINE>});<NEW_LINE>ViewGroup actionButtonsContainer = view.findViewById(R.id.action_buttons_container);<NEW_LINE>actionButtonsContainer.removeAllViews();<NEW_LINE>for (BaseBottomSheetItem actionButton : actionButtonsItems) {<NEW_LINE>actionButton.inflate(mapActivity, actionButtonsContainer, nightMode);<NEW_LINE>int dp20 = getDimen(R.dimen.title_padding);<NEW_LINE>AndroidUtils.setPadding(actionButton.getView(), dp20, 0, 0, 0);<NEW_LINE>boolean disableSaveAsCopy = !isSourceFileSaved() && Algorithms.objectEquals(actionButton.getTag(), ActionButton.SAVE_AS_COPY.ordinal());<NEW_LINE>if (disableSaveAsCopy) {<NEW_LINE>actionButton.getView().setEnabled(false);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
.updateVisibility(content, !expanded);
19,343
// for ALTER ROUTINE LOAD<NEW_LINE>protected void modifyCommonJobProperties(Map<String, String> jobProperties) {<NEW_LINE>if (jobProperties.containsKey(CreateRoutineLoadStmt.DESIRED_CONCURRENT_NUMBER_PROPERTY)) {<NEW_LINE>this.desireTaskConcurrentNum = Integer.valueOf(jobProperties.remove(CreateRoutineLoadStmt.DESIRED_CONCURRENT_NUMBER_PROPERTY));<NEW_LINE>}<NEW_LINE>if (jobProperties.containsKey(CreateRoutineLoadStmt.MAX_ERROR_NUMBER_PROPERTY)) {<NEW_LINE>this.maxErrorNum = Long.valueOf(jobProperties.remove(CreateRoutineLoadStmt.MAX_ERROR_NUMBER_PROPERTY));<NEW_LINE>}<NEW_LINE>if (jobProperties.containsKey(CreateRoutineLoadStmt.MAX_BATCH_INTERVAL_SEC_PROPERTY)) {<NEW_LINE>this.maxBatchIntervalS = Long.valueOf(jobProperties<MASK><NEW_LINE>}<NEW_LINE>if (jobProperties.containsKey(CreateRoutineLoadStmt.MAX_BATCH_ROWS_PROPERTY)) {<NEW_LINE>this.maxBatchRows = Long.valueOf(jobProperties.remove(CreateRoutineLoadStmt.MAX_BATCH_ROWS_PROPERTY));<NEW_LINE>}<NEW_LINE>if (jobProperties.containsKey(CreateRoutineLoadStmt.MAX_BATCH_SIZE_PROPERTY)) {<NEW_LINE>this.maxBatchSizeBytes = Long.valueOf(jobProperties.remove(CreateRoutineLoadStmt.MAX_BATCH_SIZE_PROPERTY));<NEW_LINE>}<NEW_LINE>}
.remove(CreateRoutineLoadStmt.MAX_BATCH_INTERVAL_SEC_PROPERTY));
22,490
public static void main(String[] args) {<NEW_LINE>NGrinderAgentStarter starter = new NGrinderAgentStarter();<NEW_LINE>final NGrinderAgentStarterParam param = new NGrinderAgentStarterParam();<NEW_LINE><MASK><NEW_LINE>commander.setProgramName("ngrinder-agent");<NEW_LINE>commander.setAcceptUnknownOptions(true);<NEW_LINE>try {<NEW_LINE>commander.parse(args);<NEW_LINE>} catch (Exception e) {<NEW_LINE>LOG.error(e.getMessage());<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>final List<String> unknownOptions = commander.getUnknownOptions();<NEW_LINE>modeParam = param.getModeParam();<NEW_LINE>modeParam.parse(unknownOptions.toArray(new String[0]));<NEW_LINE>if (modeParam.version != null) {<NEW_LINE>LOG.info("nGrinder v" + getStaticVersion());<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (modeParam.help != null) {<NEW_LINE>modeParam.usage();<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>System.getProperties().putAll(modeParam.params);<NEW_LINE>starter.init();<NEW_LINE>final String startMode = modeParam.name();<NEW_LINE>if ("stop".equalsIgnoreCase(param.command)) {<NEW_LINE>starter.stopProcess(startMode);<NEW_LINE>LOG.info("Stop the " + startMode);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>starter.checkDuplicatedRun(startMode);<NEW_LINE>java.security.Security.setProperty("networkaddress.cache.ttl", NETWORK_ADDRESS_CACHE_TTL_SECOND);<NEW_LINE>if (startMode.equalsIgnoreCase("agent")) {<NEW_LINE>starter.startAgent();<NEW_LINE>} else if (startMode.equalsIgnoreCase("monitor")) {<NEW_LINE>starter.startMonitor();<NEW_LINE>} else {<NEW_LINE>staticPrintHelpAndExit("Invalid agent.conf, '--mode' must be set as 'monitor' or 'agent'.");<NEW_LINE>}<NEW_LINE>}
JCommander commander = new JCommander(param);
1,002,961
public static GetGameCcuResponse unmarshall(GetGameCcuResponse getGameCcuResponse, UnmarshallerContext _ctx) {<NEW_LINE>getGameCcuResponse.setRequestId(_ctx.stringValue("GetGameCcuResponse.RequestId"));<NEW_LINE>List<DataListItem> dataList <MASK><NEW_LINE>for (int i = 0; i < _ctx.lengthValue("GetGameCcuResponse.DataList.Length"); i++) {<NEW_LINE>DataListItem dataListItem = new DataListItem();<NEW_LINE>dataListItem.setCcu(_ctx.longValue("GetGameCcuResponse.DataList[" + i + "].Ccu"));<NEW_LINE>dataListItem.setGameId(_ctx.stringValue("GetGameCcuResponse.DataList[" + i + "].GameId"));<NEW_LINE>dataListItem.setRegionId(_ctx.stringValue("GetGameCcuResponse.DataList[" + i + "].RegionId"));<NEW_LINE>dataList.add(dataListItem);<NEW_LINE>}<NEW_LINE>getGameCcuResponse.setDataList(dataList);<NEW_LINE>return getGameCcuResponse;<NEW_LINE>}
= new ArrayList<DataListItem>();
1,492,127
public final Fetch_path_pathContext fetch_path_path() throws RecognitionException {<NEW_LINE>Fetch_path_pathContext _localctx = new Fetch_path_pathContext(_ctx, getState());<NEW_LINE>enterRule(_localctx, 30, RULE_fetch_path_path);<NEW_LINE>int _la;<NEW_LINE>try {<NEW_LINE>enterOuterAlt(_localctx, 1);<NEW_LINE>{<NEW_LINE>setState(183);<NEW_LINE>_la = _input.LA(1);<NEW_LINE>if (!(_la == PATH_VARIABLE || _la == QUOTED_PATH_VARIABLE)) {<NEW_LINE>_errHandler.recoverInline(this);<NEW_LINE>} else {<NEW_LINE>if (_input.LA(1) == Token.EOF)<NEW_LINE>matchedEOF = true;<NEW_LINE>_errHandler.reportMatch(this);<NEW_LINE>consume();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} catch (RecognitionException re) {<NEW_LINE>_localctx.exception = re;<NEW_LINE>_errHandler.reportError(this, re);<NEW_LINE><MASK><NEW_LINE>} finally {<NEW_LINE>exitRule();<NEW_LINE>}<NEW_LINE>return _localctx;<NEW_LINE>}
_errHandler.recover(this, re);
423,405
public LinearEquationSystem transform(LinearEquationSystem linearEquationSystem) {<NEW_LINE>double[][] coeff = linearEquationSystem.getCoefficents();<NEW_LINE>double[] rhs = linearEquationSystem.getRHS();<NEW_LINE>int[] row = linearEquationSystem.getRowPermutations();<NEW_LINE>int[] col = linearEquationSystem.getColumnPermutations();<NEW_LINE>for (int r = 0; r < coeff.length; r++) {<NEW_LINE>final double[] coeff_r <MASK><NEW_LINE>double sum = 0.0;<NEW_LINE>for (int c = 0; c < coeff_r.length; c++) {<NEW_LINE>sum += (coeff_r[col[c]] /= mean[c]);<NEW_LINE>}<NEW_LINE>rhs[row[r]] += sum;<NEW_LINE>}<NEW_LINE>return new LinearEquationSystem(coeff, rhs, row, col);<NEW_LINE>}
= coeff[row[r]];
243,190
public static DescribeApisByTrafficControlResponse unmarshall(DescribeApisByTrafficControlResponse describeApisByTrafficControlResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeApisByTrafficControlResponse.setRequestId(_ctx.stringValue("DescribeApisByTrafficControlResponse.RequestId"));<NEW_LINE>describeApisByTrafficControlResponse.setTotalCount(_ctx.integerValue("DescribeApisByTrafficControlResponse.TotalCount"));<NEW_LINE>describeApisByTrafficControlResponse.setPageSize(_ctx.integerValue("DescribeApisByTrafficControlResponse.PageSize"));<NEW_LINE>describeApisByTrafficControlResponse.setPageNumber(_ctx.integerValue("DescribeApisByTrafficControlResponse.PageNumber"));<NEW_LINE>List<ApiInfo> apiInfos = new ArrayList<ApiInfo>();<NEW_LINE>for (int i = 0; i < _ctx.lengthValue("DescribeApisByTrafficControlResponse.ApiInfos.Length"); i++) {<NEW_LINE>ApiInfo apiInfo = new ApiInfo();<NEW_LINE>apiInfo.setRegionId(_ctx.stringValue("DescribeApisByTrafficControlResponse.ApiInfos[" + i + "].RegionId"));<NEW_LINE>apiInfo.setGroupId(_ctx.stringValue("DescribeApisByTrafficControlResponse.ApiInfos[" + i + "].GroupId"));<NEW_LINE>apiInfo.setGroupName(_ctx.stringValue("DescribeApisByTrafficControlResponse.ApiInfos[" + i + "].GroupName"));<NEW_LINE>apiInfo.setStageName(_ctx.stringValue<MASK><NEW_LINE>apiInfo.setApiId(_ctx.stringValue("DescribeApisByTrafficControlResponse.ApiInfos[" + i + "].ApiId"));<NEW_LINE>apiInfo.setApiName(_ctx.stringValue("DescribeApisByTrafficControlResponse.ApiInfos[" + i + "].ApiName"));<NEW_LINE>apiInfo.setDescription(_ctx.stringValue("DescribeApisByTrafficControlResponse.ApiInfos[" + i + "].Description"));<NEW_LINE>apiInfo.setVisibility(_ctx.stringValue("DescribeApisByTrafficControlResponse.ApiInfos[" + i + "].Visibility"));<NEW_LINE>apiInfo.setBoundTime(_ctx.stringValue("DescribeApisByTrafficControlResponse.ApiInfos[" + i + "].BoundTime"));<NEW_LINE>apiInfos.add(apiInfo);<NEW_LINE>}<NEW_LINE>describeApisByTrafficControlResponse.setApiInfos(apiInfos);<NEW_LINE>return describeApisByTrafficControlResponse;<NEW_LINE>}
("DescribeApisByTrafficControlResponse.ApiInfos[" + i + "].StageName"));
1,261,677
public ListStreamProcessorsResult listStreamProcessors(ListStreamProcessorsRequest listStreamProcessorsRequest) throws AmazonServiceException, AmazonClientException {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listStreamProcessorsRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<ListStreamProcessorsRequest> request = null;<NEW_LINE>Response<ListStreamProcessorsResult> response = null;<NEW_LINE>try {<NEW_LINE><MASK><NEW_LINE>try {<NEW_LINE>request = new ListStreamProcessorsRequestMarshaller().marshall(listStreamProcessorsRequest);<NEW_LINE>// Binds the request metrics to the current request.<NEW_LINE>request.setAWSRequestMetrics(awsRequestMetrics);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>Unmarshaller<ListStreamProcessorsResult, JsonUnmarshallerContext> unmarshaller = new ListStreamProcessorsResultJsonUnmarshaller();<NEW_LINE>JsonResponseHandler<ListStreamProcessorsResult> responseHandler = new JsonResponseHandler<ListStreamProcessorsResult>(unmarshaller);<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.ClientExecuteTime);<NEW_LINE>endClientExecution(awsRequestMetrics, request, response, LOGGING_AWS_REQUEST_METRIC);<NEW_LINE>}<NEW_LINE>}
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
236,764
private static ResultCursor handleExplainWithStage(ExecutionContext executionContext, ExecutionPlan executionPlan) {<NEW_LINE>final Function<RexNode, Object> evalFunc = RexUtils.getEvalFunc(executionContext);<NEW_LINE>CalcitePlanOptimizerTrace.getOptimizerTracer().get().addSnapshot("End", executionPlan.getPlan(), PlannerContext.getPlannerContext(executionContext, evalFunc));<NEW_LINE>if (executionPlan.getAst() != null) {<NEW_LINE>if (SqlKind.SUPPORT_DDL.contains(executionPlan.getAst().getKind())) {<NEW_LINE>return handleExplainDdl(executionContext, executionPlan);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>List<Map.Entry<String, String>> optimizerSnapshots = CalcitePlanOptimizerTrace.getOptimizerTracer().get().getPlanSnapshots();<NEW_LINE>ArrayResultCursor result = new ArrayResultCursor("ExecutionPlan");<NEW_LINE>result.addColumn("Stage", DataTypes.StringType);<NEW_LINE>result.addColumn("Logical ExecutionPlan", DataTypes.StringType);<NEW_LINE>result.initMeta();<NEW_LINE>for (Map.Entry<String, String> snapShots : optimizerSnapshots) {<NEW_LINE>String ruleName = snapShots.getKey();<NEW_LINE>for (String row : StringUtils.split(snapShots.getValue(), "\r\n")) {<NEW_LINE>result.addRow(new Object[] { "", row });<NEW_LINE>}<NEW_LINE>result.addRow(new Object[] { ruleName, "" });<NEW_LINE>result.addRow(new Object[] { "", "" });<NEW_LINE>}<NEW_LINE>CalcitePlanOptimizerTrace.setOpen(false);<NEW_LINE>CalcitePlanOptimizerTrace.getOptimizerTracer()<MASK><NEW_LINE>return result;<NEW_LINE>}
.get().clean();
22,047
public void addPlainMenuItems(String typeStr, PointDescription pointDescription, final LatLon latLon) {<NEW_LINE>MapActivity mapActivity = getMapActivity();<NEW_LINE>if (mapActivity != null) {<NEW_LINE>MapPoiTypes poiTypes = mapActivity.getMyApplication().getPoiTypes();<NEW_LINE>for (Map.Entry<String, String> entry : renderedObject.getTags().entrySet()) {<NEW_LINE>if (entry.getKey().equalsIgnoreCase("maxheight")) {<NEW_LINE>AbstractPoiType pt = poiTypes.getAnyPoiAdditionalTypeByKey(entry.getKey());<NEW_LINE>if (pt != null) {<NEW_LINE>addPlainMenuItem(R.drawable.ic_action_note_dark, null, pt.getTranslation() + ": " + entry.getValue(), false, false, null);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>boolean osmEditingEnabled = OsmandPlugin.isActive(OsmEditingPlugin.class);<NEW_LINE>Long id = renderedObject.getId();<NEW_LINE>if (osmEditingEnabled && id != null && id > 0 && (id % 2 == MapObject.AMENITY_ID_RIGHT_SHIFT || (id >> MapObject.NON_AMENITY_ID_RIGHT_SHIFT) < Integer.MAX_VALUE)) {<NEW_LINE>String link = getOsmUrlForId(id, MapObject.NON_AMENITY_ID_RIGHT_SHIFT);<NEW_LINE>addPlainMenuItem(R.drawable.ic_action_info_dark, null, <MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
link, true, true, null);
1,207,610
public Client testClientModel(Client body) throws ApiException {<NEW_LINE>Object localVarPostBody = body;<NEW_LINE>// verify the required parameter 'body' is set<NEW_LINE>if (body == null) {<NEW_LINE>throw new ApiException(400, "Missing the required parameter 'body' when calling testClientModel");<NEW_LINE>}<NEW_LINE>// create path and map variables<NEW_LINE>String localVarPath = "/fake";<NEW_LINE>// query params<NEW_LINE>List<Pair> localVarQueryParams = new ArrayList<Pair>();<NEW_LINE>List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();<NEW_LINE>Map<String, String> localVarHeaderParams = new HashMap<String, String>();<NEW_LINE>Map<String, String> localVarCookieParams = new <MASK><NEW_LINE>Map<String, Object> localVarFormParams = new HashMap<String, Object>();<NEW_LINE>final String[] localVarAccepts = { "application/json" };<NEW_LINE>final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);<NEW_LINE>final String[] localVarContentTypes = { "application/json" };<NEW_LINE>final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);<NEW_LINE>String[] localVarAuthNames = new String[] {};<NEW_LINE>GenericType<Client> localVarReturnType = new GenericType<Client>() {<NEW_LINE>};<NEW_LINE>return apiClient.invokeAPI(localVarPath, "PATCH", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);<NEW_LINE>}
HashMap<String, String>();
248,442
private void sizeToScreen() {<NEW_LINE>Rectangle rect = this.getBounds();<NEW_LINE>if (rect.height < 720) {<NEW_LINE>if (!smallMode) {<NEW_LINE>smallMode = true;<NEW_LINE>Dimension bbDimension = new Dimension(128, 184);<NEW_LINE>bigCard.setMaximumSize(bbDimension);<NEW_LINE>bigCard.setMinimumSize(bbDimension);<NEW_LINE>bigCard.setPreferredSize(bbDimension);<NEW_LINE>pnlShortCuts.revalidate();<NEW_LINE>pnlShortCuts.repaint();<NEW_LINE>for (PlayAreaPanel p : players.values()) {<NEW_LINE>p.sizePlayer(smallMode);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} else if (smallMode) {<NEW_LINE>smallMode = false;<NEW_LINE>Dimension bbDimension = new Dimension(256, 367);<NEW_LINE>bigCard.setMaximumSize(bbDimension);<NEW_LINE>bigCard.setMinimumSize(bbDimension);<NEW_LINE>bigCard.setPreferredSize(bbDimension);<NEW_LINE>pnlShortCuts.revalidate();<NEW_LINE>pnlShortCuts.repaint();<NEW_LINE>for (PlayAreaPanel p : players.values()) {<NEW_LINE>p.sizePlayer(smallMode);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>ArrowBuilder.getBuilder().setSize(rect.width, rect.height);<NEW_LINE>DialogManager.getManager(gameId).setScreenWidth(rect.width);<NEW_LINE>DialogManager.getManager(gameId<MASK><NEW_LINE>DialogManager.getManager(gameId).setBounds(0, 0, rect.width, rect.height);<NEW_LINE>}
).setScreenHeight(rect.height);
765,014
public void run(RegressionEnvironment env) {<NEW_LINE>String[] fields = new String[] { "theString" };<NEW_LINE>String epl = "@name('s0') create window NW#expr(true) as SupportBean;\n" + "insert into NW select * from SupportBean;\n" + "on SupportBean_A delete from NW where theString = id;\n";<NEW_LINE>env.compileDeploy(epl).addListener("s0");<NEW_LINE>env.sendEventBean(new SupportBean("E1", 1));<NEW_LINE>env.sendEventBean(new SupportBean("E2", 2));<NEW_LINE>env.sendEventBean(new SupportBean("E3", 3));<NEW_LINE>env.listenerReset("s0");<NEW_LINE>env.assertPropsPerRowIterator("s0", fields, new Object[][] { { "E1" }, { "E2" }, { "E3" } });<NEW_LINE>env.milestone(0);<NEW_LINE>env.sendEventBean(new SupportBean_A("E2"));<NEW_LINE>env.assertPropsPerRowIterator("s0", fields, new Object[][] { { <MASK><NEW_LINE>env.assertPropsOld("s0", fields, new Object[] { "E2" });<NEW_LINE>env.undeployAll();<NEW_LINE>}
"E1" }, { "E3" } });
230,523
public static GetProjectInfoResponse unmarshall(GetProjectInfoResponse getProjectInfoResponse, UnmarshallerContext _ctx) {<NEW_LINE>getProjectInfoResponse.setRequestId(_ctx.stringValue("GetProjectInfoResponse.RequestId"));<NEW_LINE>getProjectInfoResponse.setCode(_ctx.integerValue("GetProjectInfoResponse.Code"));<NEW_LINE>getProjectInfoResponse.setSuccess(_ctx.booleanValue("GetProjectInfoResponse.Success"));<NEW_LINE>getProjectInfoResponse.setMessage(_ctx.stringValue("GetProjectInfoResponse.Message"));<NEW_LINE>Data data = new Data();<NEW_LINE>data.setGmtModified(_ctx.stringValue("GetProjectInfoResponse.Data.GmtModified"));<NEW_LINE>data.setDescription<MASK><NEW_LINE>data.setStamp(_ctx.stringValue("GetProjectInfoResponse.Data.Stamp"));<NEW_LINE>data.setGmtCreate(_ctx.stringValue("GetProjectInfoResponse.Data.GmtCreate"));<NEW_LINE>data.setType(_ctx.stringValue("GetProjectInfoResponse.Data.Type"));<NEW_LINE>data.setParentId(_ctx.integerValue("GetProjectInfoResponse.Data.ParentId"));<NEW_LINE>data.setMode(_ctx.stringValue("GetProjectInfoResponse.Data.Mode"));<NEW_LINE>data.setIdPath(_ctx.stringValue("GetProjectInfoResponse.Data.IdPath"));<NEW_LINE>data.setName(_ctx.stringValue("GetProjectInfoResponse.Data.Name"));<NEW_LINE>data.setId(_ctx.integerValue("GetProjectInfoResponse.Data.Id"));<NEW_LINE>data.setRegion(_ctx.stringValue("GetProjectInfoResponse.Data.Region"));<NEW_LINE>data.setCustomValues(_ctx.stringValue("GetProjectInfoResponse.Data.CustomValues"));<NEW_LINE>data.setStatus(_ctx.stringValue("GetProjectInfoResponse.Data.Status"));<NEW_LINE>Creator creator = new Creator();<NEW_LINE>creator.setRealName(_ctx.stringValue("GetProjectInfoResponse.Data.Creator.RealName"));<NEW_LINE>creator.setNickName(_ctx.stringValue("GetProjectInfoResponse.Data.Creator.NickName"));<NEW_LINE>creator.setAvatar(_ctx.stringValue("GetProjectInfoResponse.Data.Creator.Avatar"));<NEW_LINE>creator.setId(_ctx.integerValue("GetProjectInfoResponse.Data.Creator.Id"));<NEW_LINE>creator.setEmail(_ctx.stringValue("GetProjectInfoResponse.Data.Creator.Email"));<NEW_LINE>creator.setStaffId(_ctx.stringValue("GetProjectInfoResponse.Data.Creator.StaffId"));<NEW_LINE>data.setCreator(creator);<NEW_LINE>Modifier modifier = new Modifier();<NEW_LINE>modifier.setRealName(_ctx.stringValue("GetProjectInfoResponse.Data.Modifier.RealName"));<NEW_LINE>modifier.setNickName(_ctx.stringValue("GetProjectInfoResponse.Data.Modifier.NickName"));<NEW_LINE>modifier.setAvatar(_ctx.stringValue("GetProjectInfoResponse.Data.Modifier.Avatar"));<NEW_LINE>modifier.setId(_ctx.integerValue("GetProjectInfoResponse.Data.Modifier.Id"));<NEW_LINE>modifier.setEmail(_ctx.stringValue("GetProjectInfoResponse.Data.Modifier.Email"));<NEW_LINE>modifier.setStaffId(_ctx.stringValue("GetProjectInfoResponse.Data.Modifier.StaffId"));<NEW_LINE>data.setModifier(modifier);<NEW_LINE>List<ProjectMember> projectMembers = new ArrayList<ProjectMember>();<NEW_LINE>for (int i = 0; i < _ctx.lengthValue("GetProjectInfoResponse.Data.ProjectMembers.Length"); i++) {<NEW_LINE>ProjectMember projectMember = new ProjectMember();<NEW_LINE>projectMember.setIdentifier(_ctx.stringValue("GetProjectInfoResponse.Data.ProjectMembers[" + i + "].Identifier"));<NEW_LINE>projectMember.setName(_ctx.stringValue("GetProjectInfoResponse.Data.ProjectMembers[" + i + "].Name"));<NEW_LINE>projectMember.setId(_ctx.integerValue("GetProjectInfoResponse.Data.ProjectMembers[" + i + "].Id"));<NEW_LINE>List<User> users = new ArrayList<User>();<NEW_LINE>for (int j = 0; j < _ctx.lengthValue("GetProjectInfoResponse.Data.ProjectMembers[" + i + "].Users.Length"); j++) {<NEW_LINE>User user = new User();<NEW_LINE>user.setRealName(_ctx.stringValue("GetProjectInfoResponse.Data.ProjectMembers[" + i + "].Users[" + j + "].RealName"));<NEW_LINE>user.setNickName(_ctx.stringValue("GetProjectInfoResponse.Data.ProjectMembers[" + i + "].Users[" + j + "].NickName"));<NEW_LINE>user.setAvatar(_ctx.stringValue("GetProjectInfoResponse.Data.ProjectMembers[" + i + "].Users[" + j + "].Avatar"));<NEW_LINE>user.setId(_ctx.integerValue("GetProjectInfoResponse.Data.ProjectMembers[" + i + "].Users[" + j + "].Id"));<NEW_LINE>user.setEmail(_ctx.stringValue("GetProjectInfoResponse.Data.ProjectMembers[" + i + "].Users[" + j + "].Email"));<NEW_LINE>user.setStaffId(_ctx.stringValue("GetProjectInfoResponse.Data.ProjectMembers[" + i + "].Users[" + j + "].StaffId"));<NEW_LINE>users.add(user);<NEW_LINE>}<NEW_LINE>projectMember.setUsers(users);<NEW_LINE>projectMembers.add(projectMember);<NEW_LINE>}<NEW_LINE>data.setProjectMembers(projectMembers);<NEW_LINE>getProjectInfoResponse.setData(data);<NEW_LINE>return getProjectInfoResponse;<NEW_LINE>}
(_ctx.stringValue("GetProjectInfoResponse.Data.Description"));
1,597,964
public void parentExplotion(int PP_Product_BOM_ID) throws Exception {<NEW_LINE>PreparedStatement stmt = null;<NEW_LINE>ResultSet rs = null;<NEW_LINE>String sql = "SELECT PP_Product_BOMLine_ID, M_Product_ID FROM PP_Product_BOMLine boml " + "WHERE IsActive = 'Y' AND PP_Product_BOM_ID = ? ORDER BY Line ";<NEW_LINE>try {<NEW_LINE>stmt = DB.prepareStatement(sql, get_TrxName());<NEW_LINE>stmt.setInt(1, PP_Product_BOM_ID);<NEW_LINE>rs = stmt.executeQuery();<NEW_LINE>while (rs.next()) {<NEW_LINE>SeqNo += 1;<NEW_LINE>X_T_BOMLine tboml = new X_T_BOMLine(ctx, 0, null);<NEW_LINE>tboml.setPP_Product_BOM_ID(PP_Product_BOM_ID);<NEW_LINE>tboml.setPP_Product_BOMLine_ID(rs.getInt(1));<NEW_LINE>tboml.setM_Product_ID(rs.getInt(2));<NEW_LINE>tboml.setLevelNo(LevelNo);<NEW_LINE>tboml.setLevels(levels.substring(0, LevelNo) + LevelNo);<NEW_LINE>tboml.setSeqNo(SeqNo);<NEW_LINE>tboml.setAD_PInstance_ID(AD_PInstance_ID);<NEW_LINE>tboml.setSel_Product_ID(p_M_Product_ID);<NEW_LINE>tboml.setImplosion(p_implosion);<NEW_LINE>tboml.save();<NEW_LINE>component(rs.getInt(2));<NEW_LINE>}<NEW_LINE>} catch (SQLException e) {<NEW_LINE>log.log(Level.SEVERE, e.<MASK><NEW_LINE>throw new Exception("SQLException: " + e.getLocalizedMessage());<NEW_LINE>} finally {<NEW_LINE>DB.close(rs, stmt);<NEW_LINE>rs = null;<NEW_LINE>stmt = null;<NEW_LINE>}<NEW_LINE>}
getLocalizedMessage() + sql, e);
1,760,434
static void parseGeoPoints(XContentParser parser, List<GeoPoint> geoPoints) throws IOException {<NEW_LINE>while (!parser.nextToken().equals(XContentParser.Token.END_ARRAY)) {<NEW_LINE>if (parser.currentToken() == XContentParser.Token.VALUE_NUMBER) {<NEW_LINE>// we might get here if the geo point is " number, number] " and the parser already moved over the<NEW_LINE>// opening bracket in this case we cannot use GeoUtils.parseGeoPoint(..) because this expects an opening<NEW_LINE>// bracket<NEW_LINE><MASK><NEW_LINE>parser.nextToken();<NEW_LINE>if (!parser.currentToken().equals(XContentParser.Token.VALUE_NUMBER)) {<NEW_LINE>throw new ElasticsearchParseException("geo point parsing: expected second number but got [{}] instead", parser.currentToken());<NEW_LINE>}<NEW_LINE>double lat = parser.doubleValue();<NEW_LINE>GeoPoint point = new GeoPoint();<NEW_LINE>point.reset(lat, lon);<NEW_LINE>geoPoints.add(point);<NEW_LINE>} else {<NEW_LINE>GeoPoint point = new GeoPoint();<NEW_LINE>GeoUtils.parseGeoPoint(parser, point);<NEW_LINE>geoPoints.add(point);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
double lon = parser.doubleValue();
200,887
protected void addCompletions(@Nullable CompletionParameters completionParameters, ProcessingContext processingContext, @Nullable CompletionResultSet completionResultSet) {<NEW_LINE>if (completionResultSet == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (completionParameters == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>PsiElement element = completionParameters.getPosition();<NEW_LINE>PsiMethodCallExpression eventHandlerSetter = PsiTreeUtil.getParentOfType(element, PsiMethodCallExpression.class);<NEW_LINE>if (eventHandlerSetter == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>final String eventQualifiedName = resolveEventName(eventHandlerSetter);<NEW_LINE>if (eventQualifiedName == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>final PsiClass parentCls = (PsiClass) PsiTreeUtil.findFirstParent(eventHandlerSetter, PsiClass.class::isInstance);<NEW_LINE>if (parentCls == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>final SpecModel parentModel = ComponentGenerateService.getInstance().getOrCreateSpecModel(parentCls);<NEW_LINE>if (parentModel == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>final ImmutableList<SpecMethodModel<EventMethod, EventDeclarationModel><MASK><NEW_LINE>implementedEventHandlers.stream().filter(handler -> eventQualifiedName.equals(handler.typeModel.getReflectionName())).map(handler -> createLookupElement(eventHandlerSetter.getMethodExpression().getReferenceName(), parentModel.getComponentName(), handler)).map(lookupElement -> PrioritizedLookupElement.withPriority(lookupElement, Integer.MAX_VALUE)).forEach(completionResultSet::addElement);<NEW_LINE>}
> implementedEventHandlers = parentModel.getEventMethods();
57,616
public InputSource unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>InputSource inputSource = new InputSource();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>JsonToken token = context.getCurrentToken();<NEW_LINE>if (token == null)<NEW_LINE>token = context.nextToken();<NEW_LINE>if (token == VALUE_NULL) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>while (true) {<NEW_LINE>if (token == null)<NEW_LINE>break;<NEW_LINE>if (token == FIELD_NAME || token == START_OBJECT) {<NEW_LINE>if (context.testExpression("passwordParam", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>inputSource.setPasswordParam(context.getUnmarshaller(String.class).unmarshall(context));<NEW_LINE>}<NEW_LINE>if (context.testExpression("url", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>inputSource.setUrl(context.getUnmarshaller(String.<MASK><NEW_LINE>}<NEW_LINE>if (context.testExpression("username", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>inputSource.setUsername(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 inputSource;<NEW_LINE>}
class).unmarshall(context));
1,627,928
public AirbyteConnectionStatus check(final JsonNode config) {<NEW_LINE>try {<NEW_LINE>final String projectId = config.get(CONFIG_PROJECT_ID).asText();<NEW_LINE>final String topicId = config.get(CONFIG_TOPIC_ID).asText();<NEW_LINE>final String credentialsString = config.get(CONFIG_CREDS).isObject() ? Jsons.serialize(config.get(CONFIG_CREDS)) : config.get(CONFIG_CREDS).asText();<NEW_LINE>final ServiceAccountCredentials credentials = ServiceAccountCredentials.fromStream(new ByteArrayInputStream(credentialsString.getBytes(Charsets.UTF_8)));<NEW_LINE>final TopicAdminClient adminClient = TopicAdminClient.create(TopicAdminSettings.newBuilder().setCredentialsProvider(FixedCredentialsProvider.create(credentials)).build());<NEW_LINE>// check if topic is present and the service account has necessary permissions on it<NEW_LINE>final TopicName topicName = TopicName.of(projectId, topicId);<NEW_LINE>final List<String> requiredPermissions = List.of("pubsub.topics.publish");<NEW_LINE>final TestIamPermissionsResponse response = adminClient.testIamPermissions(TestIamPermissionsRequest.newBuilder().setResource(topicName.toString()).addAllPermissions<MASK><NEW_LINE>Preconditions.checkArgument(response.getPermissionsList().containsAll(requiredPermissions), "missing required permissions " + requiredPermissions);<NEW_LINE>return new AirbyteConnectionStatus().withStatus(Status.SUCCEEDED);<NEW_LINE>} catch (final Exception e) {<NEW_LINE>LOGGER.info("Check failed.", e);<NEW_LINE>return new AirbyteConnectionStatus().withStatus(Status.FAILED).withMessage(e.getMessage() != null ? e.getMessage() : e.toString());<NEW_LINE>}<NEW_LINE>}
(requiredPermissions).build());
1,176,660
private ActivityStubs concreteActivityStubs(Business business, String processId) throws Exception {<NEW_LINE>List<ActivityStub> list = new ArrayList<>();<NEW_LINE>list.addAll(this.listActivity(business, Agent.class, processId));<NEW_LINE>list.addAll(this.listActivity(business, Begin.class, processId));<NEW_LINE>list.addAll(this.listActivity(business, Cancel.class, processId));<NEW_LINE>list.addAll(this.listActivity(business, Choice.class, processId));<NEW_LINE>list.addAll(this.listActivity(business, Delay.class, processId));<NEW_LINE>list.addAll(this.listActivity(business, Embed.class, processId));<NEW_LINE>list.addAll(this.listActivity(business, End.class, processId));<NEW_LINE>list.addAll(this.listActivity(business, Invoke.class, processId));<NEW_LINE>list.addAll(this.listActivity(business, Manual.class, processId));<NEW_LINE>list.addAll(this.listActivity(business, Merge.class, processId));<NEW_LINE>list.addAll(this.listActivity(business, Parallel.class, processId));<NEW_LINE>list.addAll(this.listActivity(business<MASK><NEW_LINE>list.addAll(this.listActivity(business, Split.class, processId));<NEW_LINE>list = list.stream().sorted(Comparator.comparing(ActivityStub::getName, Comparator.nullsLast(String::compareTo))).collect(Collectors.toList());<NEW_LINE>ActivityStubs stubs = new ActivityStubs();<NEW_LINE>stubs.addAll(list);<NEW_LINE>return stubs;<NEW_LINE>}
, Service.class, processId));
433,710
private static Artifact createSingleOptimizationAction(String runtypeSuffix, RuleContext ruleContext, String mnemonic, int optimizationPassNum, FilesToRunProvider executable, Artifact programJar, ImmutableList<Artifact> proguardSpecs, @Nullable Artifact proguardMapping, @Nullable Artifact proguardDictionary, NestedSet<Artifact> libraryJars, ProguardOutput output, Artifact lastStageOutput) {<NEW_LINE>Artifact optimizationOutput = getProguardTempArtifact(ruleContext, mnemonic + "_optimization" + Ascii.toLowerCase(runtypeSuffix) + "_" + optimizationPassNum + ".jar");<NEW_LINE>SpawnAction.Builder <MASK><NEW_LINE>CustomCommandLine.Builder optimizationCommandLine = CustomCommandLine.builder();<NEW_LINE>defaultAction(optimizationAction, optimizationCommandLine, executable, programJar, proguardSpecs, proguardMapping, proguardDictionary, libraryJars, output.getOutputJar(), /* proguardOutputMap */<NEW_LINE>null, /* proguardOutputProtoMap */<NEW_LINE>null, /* proguardSeeds */<NEW_LINE>null, /* proguardUsage */<NEW_LINE>null, /* constantStringObfuscatedMapping */<NEW_LINE>null, /* proguardConfigOutput */<NEW_LINE>null, mnemonic);<NEW_LINE>optimizationAction.setProgressMessage("Trimming binary with %s: Optimization%s Pass %d", mnemonic, Ascii.toLowerCase(runtypeSuffix), optimizationPassNum).setMnemonic(mnemonic).addInput(lastStageOutput).addOutput(optimizationOutput);<NEW_LINE>optimizationCommandLine.addDynamicString("-runtype OPTIMIZATION" + runtypeSuffix).addExecPath("-laststageoutput", lastStageOutput).addExecPath("-nextstageoutput", optimizationOutput);<NEW_LINE>optimizationAction.addCommandLine(optimizationCommandLine.build());<NEW_LINE>ruleContext.registerAction(optimizationAction.build(ruleContext));<NEW_LINE>return optimizationOutput;<NEW_LINE>}
optimizationAction = new SpawnAction.Builder();
1,296,495
public void send(String queueName, Command command, int deliveryMode, int priority, long timeToLive, long deliveryTime) {<NEW_LINE>checkStarted();<NEW_LINE>long now = System.currentTimeMillis();<NEW_LINE>try (Session session = senderSessionPool.getSession()) {<NEW_LINE>checkInRange(deliveryMode, 1, 2, "delivery mode");<NEW_LINE>checkInRange(priority, 0, 9, "priority");<NEW_LINE>if (timeToLive < 0)<NEW_LINE>throw new AsyncException("time to live cannot be negative");<NEW_LINE>Queue queue = (Queue) initialContext.lookup(QUEUE_NAMESPACE + queueName);<NEW_LINE>if (queue == null)<NEW_LINE>throw new AsyncException("Failed to find queue: " + queueName);<NEW_LINE>Message message;<NEW_LINE>if (binaryMode) {<NEW_LINE>BytesMessage msg = session.createBytesMessage();<NEW_LINE>msg.writeBytes(command.toBytes());<NEW_LINE>message = msg;<NEW_LINE>} else {<NEW_LINE>message = session.createTextMessage(command.toXml());<NEW_LINE>}<NEW_LINE>if (deliveryTime > 0) {<NEW_LINE>message.setLongProperty(HDR_SCHEDULED_DELIVERY_TIME.toString(), deliveryTime);<NEW_LINE>}<NEW_LINE>try (MessageProducer producer = session.createProducer(queue)) {<NEW_LINE>producer.send(message, deliveryMode, priority, timeToLive);<NEW_LINE>}<NEW_LINE>} catch (AsyncException e) {<NEW_LINE>throw e;<NEW_LINE>} catch (Exception e) {<NEW_LINE><MASK><NEW_LINE>} finally {<NEW_LINE>LOGGER.debug(JSONHelper.toJsonString(map("message", "completed sending command", "time_millis", now - System.currentTimeMillis(), "command", command.getClass(), "queue", queueName)));<NEW_LINE>}<NEW_LINE>}
throw new AsyncException("Failed to send message", e);
1,449,296
private int index(Rope source, Rope other, int byteOffset, Encoding enc, NormalizeIndexNode normalizeIndexNode, ByteIndexFromCharIndexNode byteIndexFromCharIndexNode) {<NEW_LINE>// Taken from org.jruby.util.StringSupport.index.<NEW_LINE>assert byteOffset >= 0;<NEW_LINE><MASK><NEW_LINE>int otherLen = other.characterLength();<NEW_LINE>byteOffset = normalizeIndexNode.executeNormalize(byteOffset, sourceLen);<NEW_LINE>if (sourceLen - byteOffset < otherLen) {<NEW_LINE>return -1;<NEW_LINE>}<NEW_LINE>byte[] bytes = source.getBytes();<NEW_LINE>int p = 0;<NEW_LINE>final int end = source.byteLength();<NEW_LINE>if (byteOffset != 0) {<NEW_LINE>if (!source.isSingleByteOptimizable()) {<NEW_LINE>final int pp = byteIndexFromCharIndexNode.execute(source, 0, byteOffset);<NEW_LINE>byteOffset = StringSupport.offset(0, end, pp);<NEW_LINE>}<NEW_LINE>p += byteOffset;<NEW_LINE>}<NEW_LINE>if (otherLen == 0) {<NEW_LINE>return byteOffset;<NEW_LINE>}<NEW_LINE>while (true) {<NEW_LINE>int pos = indexOf(source, other, p);<NEW_LINE>if (pos < 0) {<NEW_LINE>return pos;<NEW_LINE>}<NEW_LINE>pos -= p;<NEW_LINE>int t = enc.rightAdjustCharHead(bytes, p, p + pos, end);<NEW_LINE>if (t == p + pos) {<NEW_LINE>return pos + byteOffset;<NEW_LINE>}<NEW_LINE>if ((sourceLen -= t - p) <= 0) {<NEW_LINE>return -1;<NEW_LINE>}<NEW_LINE>byteOffset += t - p;<NEW_LINE>p = t;<NEW_LINE>}<NEW_LINE>}
int sourceLen = source.characterLength();
578,549
public void start(List<FlinkBatchSource> sources, List<FlinkBatchTransform> transforms, List<FlinkBatchSink> sinks) throws Exception {<NEW_LINE>List<DataSet<Row>> data = new ArrayList<>();<NEW_LINE>for (FlinkBatchSource source : sources) {<NEW_LINE>DataSet<Row> dataSet = source.getData(flinkEnvironment);<NEW_LINE>data.add(dataSet);<NEW_LINE>registerResultTable(source.getConfig(), dataSet);<NEW_LINE>}<NEW_LINE>DataSet<Row> input = data.get(0);<NEW_LINE>for (FlinkBatchTransform transform : transforms) {<NEW_LINE>DataSet<Row> dataSet = fromSourceTable(transform.getConfig()).orElse(input);<NEW_LINE>input = transform.processBatch(flinkEnvironment, dataSet);<NEW_LINE>registerResultTable(<MASK><NEW_LINE>transform.registerFunction(flinkEnvironment);<NEW_LINE>}<NEW_LINE>for (FlinkBatchSink sink : sinks) {<NEW_LINE>DataSet<Row> dataSet = fromSourceTable(sink.getConfig()).orElse(input);<NEW_LINE>sink.outputBatch(flinkEnvironment, dataSet);<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>LOGGER.info("Flink Execution Plan:{}", flinkEnvironment.getBatchEnvironment().getExecutionPlan());<NEW_LINE>JobExecutionResult execute = flinkEnvironment.getBatchEnvironment().execute(flinkEnvironment.getJobName());<NEW_LINE>LOGGER.info(execute.toString());<NEW_LINE>} catch (Exception e) {<NEW_LINE>LOGGER.warn("Flink with job name [{}] execute failed", flinkEnvironment.getJobName());<NEW_LINE>throw e;<NEW_LINE>}<NEW_LINE>}
transform.getConfig(), input);
106,741
private void loadNode724() {<NEW_LINE>PropertyTypeNode node = new PropertyTypeNode(this.context, Identifiers.ProgramDiagnosticType_CreateClientName, new QualifiedName(0, "CreateClientName"), new LocalizedText("en", "CreateClientName"), LocalizedText.NULL_VALUE, UInteger.valueOf(0), UInteger.valueOf(0), new DataValue(Variant.NULL_VALUE), Identifiers.String, -1, new UInteger[] {}, UByte.valueOf(1), UByte.valueOf(1), 0.0, false);<NEW_LINE>node.addReference(new Reference(Identifiers.ProgramDiagnosticType_CreateClientName, Identifiers.HasTypeDefinition, Identifiers.PropertyType<MASK><NEW_LINE>node.addReference(new Reference(Identifiers.ProgramDiagnosticType_CreateClientName, Identifiers.HasModellingRule, Identifiers.ModellingRule_Mandatory.expanded(), true));<NEW_LINE>node.addReference(new Reference(Identifiers.ProgramDiagnosticType_CreateClientName, Identifiers.HasProperty, Identifiers.ProgramDiagnosticType.expanded(), false));<NEW_LINE>this.nodeManager.addNode(node);<NEW_LINE>}
.expanded(), true));
55,544
private List<Wo> list(Wi wi) throws Exception {<NEW_LINE>try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {<NEW_LINE>Business business = new Business(emc);<NEW_LINE>List<Unit> unitList = emc.listIn(Unit.class, Unit.levelName_FIELDNAME, wi.getUnitList());<NEW_LINE>unitList = business.unit().sort(unitList);<NEW_LINE>List<Wo> <MASK><NEW_LINE>if (ListTools.isNotEmpty(unitList)) {<NEW_LINE>for (Unit unit : unitList) {<NEW_LINE>Wo wo = Wo.copier.copy(unit);<NEW_LINE>wo.setMatchKey(wo.getLevelName());<NEW_LINE>wo.setSubDirectIdentityCount(this.countSubDirectIdentity(business, wo));<NEW_LINE>wo.setSubDirectUnitCount(this.countSubDirectUnit(business, wo));<NEW_LINE>wos.add(wo);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return wos;<NEW_LINE>}<NEW_LINE>}
wos = new ArrayList<>();
1,146,291
public void write(HttpServletRequest request, HttpServletResponse response, AuraContext context) throws IOException {<NEW_LINE>try {<NEW_LINE>// For appcached apps, inline is not expected to return a CSRF token<NEW_LINE>if (!manifestUtil.isManifestEnabled()) {<NEW_LINE>String <MASK><NEW_LINE>if (!configAdapter.validateBootstrap(token)) {<NEW_LINE>throw new AuraJWTError("Invalid jwt parameter");<NEW_LINE>}<NEW_LINE>}<NEW_LINE>DefDescriptor<? extends BaseComponentDef> appDefDesc = context.getLoadingApplicationDescriptor();<NEW_LINE>if (appDefDesc != null) {<NEW_LINE>internalWrite(request, response, appDefDesc, context);<NEW_LINE>} else {<NEW_LINE>servletUtilAdapter.send404(request.getServletContext(), request, response);<NEW_LINE>}<NEW_LINE>} catch (Throwable t) {<NEW_LINE>if (t instanceof AuraJWTError) {<NEW_LINE>// If jwt validation fails, just 404. Do not gack.<NEW_LINE>try {<NEW_LINE>servletUtilAdapter.send404(request.getServletContext(), request, response);<NEW_LINE>} catch (ServletException e) {<NEW_LINE>// ignore<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>servletUtilAdapter.handleServletException(t, false, context, request, response, false);<NEW_LINE>exceptionAdapter.handleException(new AuraResourceException(getName(), response.getStatus(), t));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
token = request.getParameter("jwt");
153,839
public static <T> void assertEqualBinaryTrees(TreeLike<T, ?> expected, TreeLike<T, ?> result) throws TestFailure {<NEW_LINE>Stack<TwoNodesAndPath<T>> s = new Stack<>();<NEW_LINE>s.push(new TwoNodesAndPath<>(expected, result, new TreePath()));<NEW_LINE>while (!s.empty()) {<NEW_LINE>TwoNodesAndPath<T> nodes = s.pop();<NEW_LINE>T expectedData = nodes.node1 != null ? nodes.node1.getData() : null;<NEW_LINE>T resultData = nodes.node2 != null ? nodes.node2.getData() : null;<NEW_LINE>if (!Objects.equals(expectedData, resultData)) {<NEW_LINE>throw new TestFailure().withProperty(TestFailure.PropertyName.RESULT, result).withProperty(TestFailure.PropertyName.EXPECTED, expected).withMismatchInfo(nodes.path, expectedData, resultData);<NEW_LINE>}<NEW_LINE>if (nodes.node1 != null && nodes.node2 != null) {<NEW_LINE>s.push(new TwoNodesAndPath<>(nodes.node1.getLeft(), nodes.node2.getLeft(), nodes<MASK><NEW_LINE>s.push(new TwoNodesAndPath<>(nodes.node1.getRight(), nodes.node2.getRight(), nodes.path.withRight()));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
.path.withLeft()));
1,573,534
final ListUserProfilesResult executeListUserProfiles(ListUserProfilesRequest listUserProfilesRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listUserProfilesRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<ListUserProfilesRequest> request = null;<NEW_LINE>Response<ListUserProfilesResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new ListUserProfilesRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listUserProfilesRequest));<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, "CodeStar");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListUserProfiles");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<ListUserProfilesResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListUserProfilesResultJsonUnmarshaller());<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,249,094
public void alterSession(DBCSession session, OracleServerSession sessionType, Map<String, Object> options) throws DBException {<NEW_LINE>final boolean toKill = Boolean.TRUE.equals(options.get(PROP_KILL_SESSION));<NEW_LINE>final boolean immediate = Boolean.TRUE.equals(options.get(PROP_IMMEDIATE));<NEW_LINE>try {<NEW_LINE>StringBuilder sql = new StringBuilder("ALTER SYSTEM ");<NEW_LINE>if (toKill) {<NEW_LINE>sql.append("KILL SESSION ");<NEW_LINE>} else {<NEW_LINE>sql.append("DISCONNECT SESSION ");<NEW_LINE>}<NEW_LINE>sql.append("'").append(sessionType.getSid()).append(',').append(sessionType.getSerial());<NEW_LINE>if (sessionType.getInstId() != 0 && sessionType.getInstId() != 1) {<NEW_LINE>// INSET_ID = 1 is hardcoded constant, means no RAC<NEW_LINE>sql.append(",@").<MASK><NEW_LINE>}<NEW_LINE>sql.append("'");<NEW_LINE>if (immediate) {<NEW_LINE>sql.append(" IMMEDIATE");<NEW_LINE>} else if (!toKill) {<NEW_LINE>sql.append(" POST_TRANSACTION");<NEW_LINE>}<NEW_LINE>try (JDBCPreparedStatement dbStat = ((JDBCSession) session).prepareStatement(sql.toString())) {<NEW_LINE>dbStat.execute();<NEW_LINE>}<NEW_LINE>} catch (SQLException e) {<NEW_LINE>throw new DBException(e, session.getDataSource());<NEW_LINE>}<NEW_LINE>}
append(sessionType.getInstId());
1,630,908
public void execute() {<NEW_LINE>validateRoleParameters();<NEW_LINE>Role role = null;<NEW_LINE>if (getRoleId() != null) {<NEW_LINE>Role existingRole = roleService.findRole(getRoleId());<NEW_LINE>if (existingRole == null) {<NEW_LINE>throw new ServerApiException(ApiErrorCode.PARAM_ERROR, "Invalid role id provided");<NEW_LINE>}<NEW_LINE>CallContext.current().setEventDetails("Role: " + getRoleName() + ", from role: " + getRoleId() + ", description: " + getRoleDescription());<NEW_LINE>role = roleService.createRole(getRoleName(), existingRole, getRoleDescription());<NEW_LINE>} else {<NEW_LINE>CallContext.current().setEventDetails("Role: " + getRoleName() + ", type: " + getRoleType() + ", description: " + getRoleDescription());<NEW_LINE>role = roleService.createRole(getRoleName(), <MASK><NEW_LINE>}<NEW_LINE>if (role == null) {<NEW_LINE>throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to create role");<NEW_LINE>}<NEW_LINE>setupResponse(role);<NEW_LINE>}
getRoleType(), getRoleDescription());
1,164,084
private List<LocalStatisticsJsonStringObject> filterOncePerProvinceStatistics(List<LocalStatisticsJsonStringObject> jsonStringObjects) {<NEW_LINE>List<LocalStatisticsJsonStringObject> onePerProvinceStatistics = new ArrayList<>();<NEW_LINE>Map<String, List<LocalStatisticsJsonStringObject>> groupedByProvince = jsonStringObjects.stream().filter(LocalStatisticsJsonStringObject::isComplete).collect(groupingBy(LocalStatisticsJsonStringObject::getProvinceCode, toList()));<NEW_LINE>groupedByProvince.keySet().stream().forEach(key -> {<NEW_LINE>List<LocalStatisticsJsonStringObject> <MASK><NEW_LINE>LocalStatisticsJsonStringObject mostRecentStatistic = null;<NEW_LINE>LocalStatisticsJsonStringObject mostRecentHospitalizationStatistic = null;<NEW_LINE>for (LocalStatisticsJsonStringObject provinceStatistic : sameProvinceStatistics) {<NEW_LINE>if (hasEmptyMostRecentStatistics(mostRecentStatistic, mostRecentHospitalizationStatistic)) {<NEW_LINE>mostRecentStatistic = provinceStatistic;<NEW_LINE>if (hasSevenDayHospitalizationStatistics(provinceStatistic)) {<NEW_LINE>mostRecentHospitalizationStatistic = provinceStatistic;<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>if (isBeforeMostRecentStatistics(mostRecentStatistic, provinceStatistic)) {<NEW_LINE>mostRecentStatistic = provinceStatistic;<NEW_LINE>}<NEW_LINE>if (mostRecentHospitalizationStatistic == null) {<NEW_LINE>if (hasSevenDayHospitalizationStatistics(provinceStatistic)) {<NEW_LINE>mostRecentHospitalizationStatistic = provinceStatistic;<NEW_LINE>}<NEW_LINE>} else if (isBeforeMostRecentStatistics(mostRecentHospitalizationStatistic, provinceStatistic) && hasSevenDayHospitalizationStatistics(provinceStatistic)) {<NEW_LINE>mostRecentHospitalizationStatistic = provinceStatistic;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>onePerProvinceStatistics.add(enhanceWithHospitalization(mostRecentStatistic, mostRecentHospitalizationStatistic));<NEW_LINE>});<NEW_LINE>return onePerProvinceStatistics;<NEW_LINE>}
sameProvinceStatistics = groupedByProvince.get(key);
1,133,377
public void insert(Object key, CacheObject value) {<NEW_LINE>boolean forceInMemory = false;<NEW_LINE>// for (Object cred : value.getSubject().getPrivateCredentials()) {<NEW_LINE>// if ("ClassNameHere".equals(cred.getClass().getSimpleName())) {<NEW_LINE>// forceInMemory = true;<NEW_LINE>// break;<NEW_LINE>// }<NEW_LINE>// }<NEW_LINE>if (!forceInMemory) {<NEW_LINE>try {<NEW_LINE>Cache<Object, Object> jCache = getJCache();<NEW_LINE>if (jCache != null) {<NEW_LINE>jCache.put(key, value);<NEW_LINE>}<NEW_LINE>} catch (SerializationException e) {<NEW_LINE>if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {<NEW_LINE>Tr.debug(tc, "Failed to insert value for key " + key + " into JCache due to SerializationException. Inserting into in-memory cache instead.", e);<NEW_LINE>}<NEW_LINE>inMemoryCache.insert(key, value);<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {<NEW_LINE>Tr.debug(tc, "Refused to insert value for key " + key + " into JCache due to known limitation. Inserting into in-memory cache instead.");<NEW_LINE>}<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>}
inMemoryCache.insert(key, value);
234,365
protected void buildAreas() {<NEW_LINE><MASK><NEW_LINE>String mapProperty = properties.get(Image.PN_MAP, String.class);<NEW_LINE>if (StringUtils.isNotEmpty(mapProperty)) {<NEW_LINE>// Parse the image map areas as defined at {@code Image.PN_MAP}<NEW_LINE>String[] mapAreas = StringUtils.split(mapProperty, "][");<NEW_LINE>for (String area : mapAreas) {<NEW_LINE>int coordinatesEndIndex = area.indexOf(')');<NEW_LINE>if (coordinatesEndIndex < 0) {<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>String shapeAndCoords = StringUtils.substring(area, 0, coordinatesEndIndex + 1);<NEW_LINE>String shape = StringUtils.substringBefore(shapeAndCoords, "(");<NEW_LINE>String coordinates = StringUtils.substringBetween(shapeAndCoords, "(", ")");<NEW_LINE>String remaining = StringUtils.substring(area, coordinatesEndIndex + 1);<NEW_LINE>String[] remainingTokens = StringUtils.split(remaining, "|");<NEW_LINE>if (StringUtils.isBlank(shape) || StringUtils.isBlank(coordinates)) {<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>if (remainingTokens.length > 0) {<NEW_LINE>String href = StringUtils.removeAll(remainingTokens[0], "\"");<NEW_LINE>String target = remainingTokens.length > 1 ? StringUtils.removeAll(remainingTokens[1], "\"") : "";<NEW_LINE>Link link = linkHandler.getLink(href, target).orElse(null);<NEW_LINE>if (link == null || !link.isValid()) {<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>String alt = remainingTokens.length > 2 ? StringUtils.removeAll(remainingTokens[2], "\"") : "";<NEW_LINE>String relativeCoordinates = remainingTokens.length > 3 ? remainingTokens[3] : "";<NEW_LINE>relativeCoordinates = StringUtils.substringBetween(relativeCoordinates, "(", ")");<NEW_LINE>areas.add(newImageArea(shape, coordinates, relativeCoordinates, link, alt));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
areas = new ArrayList<>();
652,558
private Category checkUniqueKey(Category category, User user) throws DotDataException, DotSecurityException {<NEW_LINE>// If the category is new or if the category doesn't have any key: Let's generate a potential<NEW_LINE>// key and test until we have a unique one.<NEW_LINE>if (!InodeUtils.isSet(category.getInode()) || !UtilMethods.isSet(category.getKey())) {<NEW_LINE>final String potentialKey = getPotentialKeyFromCategory(category);<NEW_LINE>final String uniqueKey = <MASK><NEW_LINE>category.setKey(uniqueKey);<NEW_LINE>} else {<NEW_LINE>// If the category is already in the DB, let's double check that the key is unique,<NEW_LINE>// maybe the the user is editing the category and changing it's key and that key<NEW_LINE>// already used by another Category.<NEW_LINE>final Category categoryInDB = findByKey(category.getKey(), user, false);<NEW_LINE>if (UtilMethods.isSet(categoryInDB) && !category.getInode().equals(categoryInDB.getInode())) {<NEW_LINE>final String uniqueKey = getUniqueKey(category.getKey(), user, 1);<NEW_LINE>category.setKey(uniqueKey);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return category;<NEW_LINE>}
getUniqueKey(potentialKey, user, 1);
996,902
public static void applyOptions(boolean holdConsole, boolean isReport) {<NEW_LINE>int style = Font.PLAIN;<NEW_LINE>if (ConfigOptions.bBold.booleanValue()) {<NEW_LINE>style += Font.BOLD;<NEW_LINE>}<NEW_LINE>if (ConfigOptions.bItalic.booleanValue()) {<NEW_LINE>style += Font.ITALIC;<NEW_LINE>}<NEW_LINE>GC.font = new Font(ConfigOptions.sFontName, style, ConfigOptions.iFontSize.intValue());<NEW_LINE>Env.setPaths(GM.getPaths());<NEW_LINE>String tempPath = ConfigOptions.sTempPath;<NEW_LINE>if (tempPath != null)<NEW_LINE>if (tempPath.trim().length() == 0)<NEW_LINE>tempPath = null;<NEW_LINE>Env.setTempPath(null);<NEW_LINE>if (StringUtils.isValidString(ConfigOptions.sMainPath)) {<NEW_LINE>String mainPath = ConfigUtil.getPath(System.getProperty("start.home"), ConfigOptions.sMainPath);<NEW_LINE>Env.setMainPath(mainPath);<NEW_LINE>if (StringUtils.isValidString(tempPath)) {<NEW_LINE>Env.setTempPath(ConfigUtil.getPath(mainPath, tempPath));<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>GM.setCurrentPath(null);<NEW_LINE>if (StringUtils.isValidString(tempPath)) {<NEW_LINE>File tempDir = new File(tempPath);<NEW_LINE>if (tempDir.isAbsolute()) {<NEW_LINE>Env.setTempPath(tempPath);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (StringUtils.isValidString(Env.getTempPath())) {<NEW_LINE>try {<NEW_LINE>File f = new File(Env.getTempPath());<NEW_LINE>if (!f.exists()) {<NEW_LINE>f.mkdir();<NEW_LINE>}<NEW_LINE>} catch (Exception ex) {<NEW_LINE>Logger.info("Make temp directory failed:");<NEW_LINE>ex.printStackTrace();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (StringUtils.isValidString(sDateFormat))<NEW_LINE>Env.setDateFormat(sDateFormat);<NEW_LINE>if (StringUtils.isValidString(sTimeFormat))<NEW_LINE>Env.setTimeFormat(sTimeFormat);<NEW_LINE>if (StringUtils.isValidString(sDateTimeFormat))<NEW_LINE>Env.setDateTimeFormat(sDateTimeFormat);<NEW_LINE>if (StringUtils.isValidString(sDefCharsetName))<NEW_LINE>Env.setDefaultChartsetName(sDefCharsetName);<NEW_LINE>ICursor.FETCHCOUNT = iFetchCount.intValue();<NEW_LINE>Env.setLocalHost(sLocalHost);<NEW_LINE>if (iLocalPort != null)<NEW_LINE>Env.setLocalPort(iLocalPort.intValue());<NEW_LINE>if (GM.isBlockSizeEnabled()) {<NEW_LINE>Env.setFileBufSize(ConfigUtil.parseBufferSize(sFileBuffer));<NEW_LINE>if (StringUtils.isValidString(sBlockSize))<NEW_LINE>ConfigUtil.setEnvBlockSize(sBlockSize);<NEW_LINE>}<NEW_LINE>Env.setNullStrings(ConfigUtil.splitNullStrings(sNullStrings));<NEW_LINE>Env.<MASK><NEW_LINE>Env.setCursorParallelNum(iCursorParallelNum.intValue());<NEW_LINE>Env.setAdjustNoteCell(bAdjustNoteCell.booleanValue());<NEW_LINE>if (holdConsole && ConfigOptions.bIdeConsole.booleanValue())<NEW_LINE>AppFrame.holdConsole();<NEW_LINE>if (!isReport) {<NEW_LINE>try {<NEW_LINE>Logger.setPropertyConfig(getLoggerProperty());<NEW_LINE>} catch (Exception e) {<NEW_LINE>GM.showException(e);<NEW_LINE>}<NEW_LINE>DriverManager.setLoginTimeout(iConnectTimeout.intValue());<NEW_LINE>}<NEW_LINE>}
setParallelNum(iParallelNum.intValue());
963,672
public final int sendToAddress(long memoryAddress, int pos, int limit, InetAddress addr, int port, boolean fastOpen) throws IOException {<NEW_LINE>// just duplicate the toNativeInetAddress code here to minimize object creation as this method is expected<NEW_LINE>// to be called frequently<NEW_LINE>byte[] address;<NEW_LINE>int scopeId;<NEW_LINE>if (addr instanceof Inet6Address) {<NEW_LINE>address = addr.getAddress();<NEW_LINE>scopeId = ((<MASK><NEW_LINE>} else {<NEW_LINE>// convert to ipv4 mapped ipv6 address;<NEW_LINE>scopeId = 0;<NEW_LINE>address = ipv4MappedIpv6Address(addr.getAddress());<NEW_LINE>}<NEW_LINE>int flags = fastOpen ? msgFastopen() : 0;<NEW_LINE>int res = sendToAddress(fd, useIpv6(addr), memoryAddress, pos, limit, address, scopeId, port, flags);<NEW_LINE>if (res >= 0) {<NEW_LINE>return res;<NEW_LINE>}<NEW_LINE>if (res == ERRNO_EINPROGRESS_NEGATIVE && fastOpen) {<NEW_LINE>// This happens when we (as a client) have no pre-existing cookie for doing a fast-open connection.<NEW_LINE>// In this case, our TCP connection will be established normally, but no data was transmitted at this time.<NEW_LINE>// We'll just transmit the data with normal writes later.<NEW_LINE>return 0;<NEW_LINE>}<NEW_LINE>if (res == ERROR_ECONNREFUSED_NEGATIVE) {<NEW_LINE>throw new PortUnreachableException("sendToAddress failed");<NEW_LINE>}<NEW_LINE>return ioResult("sendToAddress", res);<NEW_LINE>}
Inet6Address) addr).getScopeId();
374,658
private void decodeConnectionChange(FacesContext context, Diagram diagram) {<NEW_LINE>DiagramModel model = (DiagramModel) diagram.getValue();<NEW_LINE>if (model != null) {<NEW_LINE>Map<String, String> params = context.getExternalContext().getRequestParameterMap();<NEW_LINE>String clientId = diagram.getClientId(context);<NEW_LINE>Element originalSourceElement = model.findElement(params.get(clientId + "_originalSourceId"));<NEW_LINE>Element newSourceElement = model.findElement(params.get(clientId + "_newSourceId"));<NEW_LINE>Element originalTargetElement = model.findElement(params.get(clientId + "_originalTargetId"));<NEW_LINE>Element newTargetElement = model.findElement(params.get(clientId + "_newTargetId"));<NEW_LINE>EndPoint originalSourceEndPoint = model.findEndPoint(originalSourceElement, params.get(clientId + "_originalSourceEndPointId"));<NEW_LINE>EndPoint newSourceEndPoint = model.findEndPoint(newSourceElement, params.get(clientId + "_newSourceEndPointId"));<NEW_LINE>EndPoint originalTargetEndPoint = model.findEndPoint(originalTargetElement, params.get(clientId + "_originalTargetEndPointId"));<NEW_LINE>EndPoint newTargetEndPoint = model.findEndPoint(newTargetElement, params.get(clientId + "_newTargetEndPointId"));<NEW_LINE>model.disconnect(findConnection(model, originalSourceEndPoint, originalTargetEndPoint));<NEW_LINE>model.connect(<MASK><NEW_LINE>}<NEW_LINE>}
new Connection(newSourceEndPoint, newTargetEndPoint));