idx
int32
46
1.86M
input
stringlengths
321
6.6k
target
stringlengths
9
1.24k
160,133
final AssociateExternalConnectionResult executeAssociateExternalConnection(AssociateExternalConnectionRequest associateExternalConnectionRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(associateExternalConnectionRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<AssociateExternalConnectionRequest> request = null;<NEW_LINE>Response<AssociateExternalConnectionResult> response = null;<NEW_LINE>try {<NEW_LINE><MASK><NEW_LINE>try {<NEW_LINE>request = new AssociateExternalConnectionRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(associateExternalConnectionRequest));<NEW_LINE>// Binds the request metrics to the current request.<NEW_LINE>request.setAWSRequestMetrics(awsRequestMetrics);<NEW_LINE>request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);<NEW_LINE>request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SERVICE_ID, "codeartifact");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "AssociateExternalConnection");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<AssociateExternalConnectionResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new AssociateExternalConnectionResultJsonUnmarshaller());<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);
328,487
private int computedJump(int from, int to) throws Exception {<NEW_LINE>int thisInstructionsSize = 2;<NEW_LINE>String fromString = "0x" + Integer.toHexString(from);<NEW_LINE>String toString = "0x" + Integer.toHexString(to);<NEW_LINE>String endString = "0x" + Integer.toHexString(from + thisInstructionsSize - 1);<NEW_LINE>int distance = to - from - thisInstructionsSize;<NEW_LINE>byte[] bytes = new byte[thisInstructionsSize];<NEW_LINE>// Unconditional Jump. (and just force computed jump ref type.)<NEW_LINE>bytes[0] = (byte) 0xeb;<NEW_LINE>bytes[1] = (byte) distance;<NEW_LINE>clearCodeUnits(fromString, endString, false);<NEW_LINE>setBytes(fromString, bytes, true);<NEW_LINE>createMemoryReference(fromString, toString, RefType.<MASK><NEW_LINE>// instruction size in bytes.<NEW_LINE>return thisInstructionsSize;<NEW_LINE>}
COMPUTED_JUMP, SourceType.ANALYSIS, 0);
83,153
JPanel createCheckPanel() {<NEW_LINE>JPanel panelChecks = new JPanel(<MASK><NEW_LINE>panelChecks.add(checkShowTargets);<NEW_LINE>panelChecks.add(checkShowNumbers);<NEW_LINE>panelChecks.add(checkShowClusters);<NEW_LINE>panelChecks.add(checkShowPerpendicular);<NEW_LINE>panelChecks.add(checkShowCorners);<NEW_LINE>panelChecks.add(checkLogIntensity);<NEW_LINE>panelChecks.add(showRawIntensity.check);<NEW_LINE>panelChecks.setPreferredSize(panelChecks.getMinimumSize());<NEW_LINE>panelChecks.setMaximumSize(panelChecks.getMinimumSize());<NEW_LINE>StandardAlgConfigPanel vertPanel = new StandardAlgConfigPanel();<NEW_LINE>vertPanel.add(panelChecks);<NEW_LINE>vertPanel.addLabeled(spinnerDMinPyrLevel, "Min Level");<NEW_LINE>vertPanel.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), "Visualize", TitledBorder.CENTER, TitledBorder.TOP));<NEW_LINE>return vertPanel;<NEW_LINE>}
new GridLayout(0, 2));
206,659
public UntagResourceResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>UntagResourceResult untagResourceResult = new UntagResourceResult();<NEW_LINE><MASK><NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>JsonToken token = context.getCurrentToken();<NEW_LINE>if (token == null)<NEW_LINE>token = context.nextToken();<NEW_LINE>if (token == VALUE_NULL) {<NEW_LINE>return untagResourceResult;<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("Tags", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>untagResourceResult.setTags(new ListUnmarshaller<Tag>(TagJsonUnmarshaller.getInstance()).unmarshall(context));<NEW_LINE>}<NEW_LINE>} else if (token == END_ARRAY || token == END_OBJECT) {<NEW_LINE>if (context.getLastParsedParentElement() == null || context.getLastParsedParentElement().equals(currentParentElement)) {<NEW_LINE>if (context.getCurrentDepth() <= originalDepth)<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>token = context.nextToken();<NEW_LINE>}<NEW_LINE>return untagResourceResult;<NEW_LINE>}
int originalDepth = context.getCurrentDepth();
427,714
private void createButtonPanel(Composite parent) {<NEW_LINE>Composite client = new Composite(parent, SWT.NULL);<NEW_LINE>GridLayout layout = new GridLayout();<NEW_LINE>layout.marginHeight = 0;<NEW_LINE>layout.marginWidth = 0;<NEW_LINE>client.setLayout(layout);<NEW_LINE>GridData gd = new GridData(GridData.VERTICAL_ALIGN_BEGINNING);<NEW_LINE>client.setLayoutData(gd);<NEW_LINE>fButtonDelete = new Button(client, SWT.PUSH);<NEW_LINE>fButtonDelete.setText(Messages.UserPropertiesManagerDialog_9);<NEW_LINE>gd = new GridData(GridData.FILL_HORIZONTAL);<NEW_LINE>fButtonDelete.setLayoutData(gd);<NEW_LINE>fButtonDelete.addSelectionListener(new SelectionAdapter() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void widgetSelected(SelectionEvent e) {<NEW_LINE>deleteSelectedPropertyKeys();<NEW_LINE>}<NEW_LINE>});<NEW_LINE>fButtonDelete.setEnabled(false);<NEW_LINE>fButtonRename = new Button(client, SWT.PUSH);<NEW_LINE>fButtonRename.setText(Messages.UserPropertiesManagerDialog_10);<NEW_LINE>gd <MASK><NEW_LINE>fButtonRename.setLayoutData(gd);<NEW_LINE>fButtonRename.addSelectionListener(new SelectionAdapter() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void widgetSelected(SelectionEvent e) {<NEW_LINE>renameSelectedPropertyKey();<NEW_LINE>}<NEW_LINE>});<NEW_LINE>fButtonRename.setEnabled(false);<NEW_LINE>}
= new GridData(GridData.FILL_HORIZONTAL);
693,072
public void apply(Request request, Response response) {<NEW_LINE>response<MASK><NEW_LINE>String format = request.format;<NEW_LINE>if (request.isAjax() && "html".equals(format)) {<NEW_LINE>format = "txt";<NEW_LINE>}<NEW_LINE>response.contentType = MimeTypes.getContentType("xx." + format);<NEW_LINE>Map<String, Object> binding = Scope.RenderArgs.current().data;<NEW_LINE>binding.put("result", this);<NEW_LINE>binding.put("session", Scope.Session.current());<NEW_LINE>binding.put("request", Http.Request.current());<NEW_LINE>binding.put("flash", Scope.Flash.current());<NEW_LINE>binding.put("params", Scope.Params.current());<NEW_LINE>binding.put("play", new Play());<NEW_LINE>String errorHtml = "Not found";<NEW_LINE>try {<NEW_LINE>errorHtml = TemplateLoader.load("errors/404." + (format == null ? "html" : format)).render(binding);<NEW_LINE>} catch (Exception e) {<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>response.out.write(errorHtml.getBytes(getEncoding()));<NEW_LINE>} catch (Exception e) {<NEW_LINE>throw new UnexpectedException(e);<NEW_LINE>}<NEW_LINE>}
.status = Http.StatusCode.NOT_FOUND;
1,725,298
public void userLogout() throws TimeoutException, ExecutionException, InterruptedException, ApiException {<NEW_LINE>Object postBody = null;<NEW_LINE>// create path and map variables<NEW_LINE>String path = "/user/logout";<NEW_LINE>// query params<NEW_LINE>List<Pair> queryParams = new ArrayList<Pair>();<NEW_LINE>// header params<NEW_LINE>Map<String, String> headerParams = new HashMap<String, String>();<NEW_LINE>// form params<NEW_LINE>Map<String, String> formParams = new HashMap<String, String>();<NEW_LINE>String[] contentTypes = { "application/json", "application/x-www-form-urlencoded" };<NEW_LINE>String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json";<NEW_LINE>if (contentType.startsWith("multipart/form-data")) {<NEW_LINE>// file uploading<NEW_LINE>MultipartEntityBuilder localVarBuilder = MultipartEntityBuilder.create();<NEW_LINE>HttpEntity httpEntity = localVarBuilder.build();<NEW_LINE>postBody = httpEntity;<NEW_LINE>} else {<NEW_LINE>// normal form params<NEW_LINE>}<NEW_LINE>String[] authNames = new String[] {};<NEW_LINE>try {<NEW_LINE>String localVarResponse = apiInvoker.invokeAPI(basePath, path, "POST", queryParams, postBody, headerParams, formParams, contentType, authNames);<NEW_LINE>if (localVarResponse != null) {<NEW_LINE>return;<NEW_LINE>} else {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>} catch (ApiException ex) {<NEW_LINE>throw ex;<NEW_LINE>} catch (InterruptedException ex) {<NEW_LINE>throw ex;<NEW_LINE>} catch (ExecutionException ex) {<NEW_LINE>if (ex.getCause() instanceof VolleyError) {<NEW_LINE>VolleyError volleyError = (VolleyError) ex.getCause();<NEW_LINE>if (volleyError.networkResponse != null) {<NEW_LINE>throw new ApiException(volleyError.networkResponse.<MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE>throw ex;<NEW_LINE>} catch (TimeoutException ex) {<NEW_LINE>throw ex;<NEW_LINE>}<NEW_LINE>}
statusCode, volleyError.getMessage());
1,669,437
public void onMoveItemEnded(int adapterIndex) {<NEW_LINE>// Fire a "move" event.<NEW_LINE>final TiListView listView = getListView();<NEW_LINE>if ((listView != null) && this.moveEventInfo.isMoving()) {<NEW_LINE>final ListItemProxy targetItemProxy = listView.getAdapterItem(adapterIndex);<NEW_LINE>if (targetItemProxy != null) {<NEW_LINE>final TiViewProxy targetParentProxy = targetItemProxy.getParent();<NEW_LINE>if (targetParentProxy instanceof ListSectionProxy) {<NEW_LINE>ListSectionProxy targetSectionProxy = (ListSectionProxy) targetParentProxy;<NEW_LINE>KrollDict data = new KrollDict();<NEW_LINE>data.put(TiC.PROPERTY_SECTION, this.moveEventInfo.sectionProxy);<NEW_LINE>data.put(TiC.PROPERTY_SECTION_INDEX, this.moveEventInfo.sectionIndex);<NEW_LINE>data.put(TiC.PROPERTY_ITEM_INDEX, this.moveEventInfo.itemIndex);<NEW_LINE>data.put(TiC.PROPERTY_TARGET_SECTION, targetSectionProxy);<NEW_LINE>data.put(TiC.PROPERTY_TARGET_SECTION_INDEX, getIndexOfSection(targetSectionProxy));<NEW_LINE>data.put(TiC.<MASK><NEW_LINE>targetItemProxy.fireEvent(TiC.EVENT_MOVE, data);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// Clear last "move" event info.<NEW_LINE>this.moveEventInfo.clear();<NEW_LINE>}
PROPERTY_TARGET_ITEM_INDEX, targetItemProxy.getIndexInSection());
420,796
private void handleHttpRequest(final HttpServerRequest request, final Map<String, Object> data) {<NEW_LINE>if (debug) {<NEW_LINE>setupMetrics(request);<NEW_LINE>logger.debug("HttpServerVertx::handleHttpRequest::{}:{}", request.method(), request.uri());<NEW_LINE>}<NEW_LINE>switch(request.method().toString()) {<NEW_LINE>case "PUT":<NEW_LINE>case "POST":<NEW_LINE>final String contentType = request.<MASK><NEW_LINE>if (HttpContentTypes.isFormContentType(contentType)) {<NEW_LINE>request.setExpectMultipart(true);<NEW_LINE>}<NEW_LINE>final Buffer[] bufferHolder = new Buffer[1];<NEW_LINE>final HttpRequest bodyHttpRequest = vertxUtils.createRequest(request, () -> bufferHolder[0], data, simpleHttpServer.getDecorators(), simpleHttpServer.getHttpResponseCreator());<NEW_LINE>if (simpleHttpServer.getShouldContinueReadingRequestBody().test(bodyHttpRequest)) {<NEW_LINE>request.bodyHandler((buffer) -> {<NEW_LINE>bufferHolder[0] = buffer;<NEW_LINE>simpleHttpServer.handleRequest(bodyHttpRequest);<NEW_LINE>});<NEW_LINE>} else {<NEW_LINE>logger.info("Request body rejected {} {}", request.method(), request.absoluteURI());<NEW_LINE>}<NEW_LINE>break;<NEW_LINE>case "HEAD":<NEW_LINE>case "OPTIONS":<NEW_LINE>case "DELETE":<NEW_LINE>case "GET":<NEW_LINE>final HttpRequest getRequest;<NEW_LINE>getRequest = vertxUtils.createRequest(request, null, data, simpleHttpServer.getDecorators(), simpleHttpServer.getHttpResponseCreator());<NEW_LINE>simpleHttpServer.handleRequest(getRequest);<NEW_LINE>break;<NEW_LINE>default:<NEW_LINE>throw new IllegalStateException("method not supported yet " + request.method());<NEW_LINE>}<NEW_LINE>}
headers().get("Content-Type");
1,506,009
public void hook(ExtensionHook extensionHook) {<NEW_LINE>super.hook(extensionHook);<NEW_LINE>extensionHook.addApiImplementor(new ParamsAPI(this));<NEW_LINE>extensionHook.addSessionListener(this);<NEW_LINE>extensionHook.addSiteMapListener(this);<NEW_LINE>if (getView() != null) {<NEW_LINE>@SuppressWarnings("unused")<NEW_LINE>ExtensionHookView pv = extensionHook.getHookView();<NEW_LINE>extensionHook.getHookView().addStatusPanel(getParamsPanel());<NEW_LINE>final ExtensionLoader extLoader = Control.getSingleton().getExtensionLoader();<NEW_LINE>if (extLoader.isExtensionEnabled(ExtensionSearch.NAME)) {<NEW_LINE>extensionHook.getHookMenu().addPopupMenuItem(getPopupMenuParamSearch());<NEW_LINE>}<NEW_LINE>if (extLoader.isExtensionEnabled(ExtensionAntiCSRF.NAME)) {<NEW_LINE>extensionHook.getHookMenu().addPopupMenuItem(getPopupMenuAddAntiCSRF());<NEW_LINE>extensionHook.getHookMenu().addPopupMenuItem(getPopupMenuRemoveAntiCSRF());<NEW_LINE>}<NEW_LINE>if (extLoader.isExtensionEnabled(ExtensionHttpSessions.NAME)) {<NEW_LINE>extensionHook.getHookMenu(<MASK><NEW_LINE>extensionHook.getHookMenu().addPopupMenuItem(getPopupMenuRemoveSession());<NEW_LINE>}<NEW_LINE>ExtensionHelp.enableHelpKey(getParamsPanel(), "ui.tabs.params");<NEW_LINE>}<NEW_LINE>ExtensionPassiveScan extensionPassiveScan = Control.getSingleton().getExtensionLoader().getExtension(ExtensionPassiveScan.class);<NEW_LINE>if (extensionPassiveScan != null) {<NEW_LINE>paramScanner = new ParamScanner(this);<NEW_LINE>extensionPassiveScan.addPassiveScanner(new ParamScanner(this));<NEW_LINE>}<NEW_LINE>}
).addPopupMenuItem(getPopupMenuAddSession());
1,465,357
public void write(JsonWriter out, BasquePig value) throws IOException {<NEW_LINE>JsonObject obj = thisAdapter.<MASK><NEW_LINE>obj.remove("additionalProperties");<NEW_LINE>// serialize additonal properties<NEW_LINE>if (value.getAdditionalProperties() != null) {<NEW_LINE>for (Map.Entry<String, Object> entry : value.getAdditionalProperties().entrySet()) {<NEW_LINE>if (entry.getValue() instanceof String)<NEW_LINE>obj.addProperty(entry.getKey(), (String) entry.getValue());<NEW_LINE>else if (entry.getValue() instanceof Number)<NEW_LINE>obj.addProperty(entry.getKey(), (Number) entry.getValue());<NEW_LINE>else if (entry.getValue() instanceof Boolean)<NEW_LINE>obj.addProperty(entry.getKey(), (Boolean) entry.getValue());<NEW_LINE>else if (entry.getValue() instanceof Character)<NEW_LINE>obj.addProperty(entry.getKey(), (Character) entry.getValue());<NEW_LINE>else {<NEW_LINE>obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>elementAdapter.write(out, obj);<NEW_LINE>}
toJsonTree(value).getAsJsonObject();
1,359,508
private void showSearchMessageOrSuggestions() {<NEW_LINE>boolean hasQuery = !isSearchViewEmpty();<NEW_LINE>boolean hasPerformedSearch = !TextUtils.isEmpty(mCurrentSearchQuery);<NEW_LINE>boolean isSearching = getPostListType() == ReaderPostListType.SEARCH_RESULTS;<NEW_LINE>// prevents suggestions from being shown after the search view has been collapsed<NEW_LINE>if (!isSearching) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>// prevents suggestions from being shown above search results after configuration changes<NEW_LINE>if (mWasPaused && hasPerformedSearch) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (!hasQuery || !hasPerformedSearch) {<NEW_LINE>// clear posts and sites so only the suggestions or the empty view are visible<NEW_LINE>getPostAdapter().clear();<NEW_LINE>getSiteSearchAdapter().clear();<NEW_LINE>hideSearchTabs();<NEW_LINE>// clears the last performed query<NEW_LINE>mCurrentSearchQuery = null;<NEW_LINE>final boolean hasSuggestions = mSearchSuggestionRecyclerAdapter != null <MASK><NEW_LINE>if (hasSuggestions) {<NEW_LINE>hideSearchMessage();<NEW_LINE>showSearchSuggestions();<NEW_LINE>} else {<NEW_LINE>showSearchMessage();<NEW_LINE>hideSearchSuggestions();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
&& mSearchSuggestionRecyclerAdapter.getItemCount() > 0;
1,657,405
@Override<NEW_LINE>protected Task<Void> onStartPreview() {<NEW_LINE>LOG.i("onStartPreview:", "Dispatching onCameraPreviewStreamSizeChanged.");<NEW_LINE>getCallback().onCameraPreviewStreamSizeChanged();<NEW_LINE>Size previewSizeForView = getPreviewStreamSize(Reference.VIEW);<NEW_LINE>if (previewSizeForView == null) {<NEW_LINE>throw new IllegalStateException("previewStreamSize should not be null at this point.");<NEW_LINE>}<NEW_LINE>mPreview.setStreamSize(previewSizeForView.getWidth(), previewSizeForView.getHeight());<NEW_LINE>mPreview.setDrawRotation(getAngles().offset(Reference.BASE, Reference.VIEW, Axis.ABSOLUTE));<NEW_LINE>if (hasFrameProcessors()) {<NEW_LINE>getFrameManager().setUp(mFrameProcessingFormat, mFrameProcessingSize, getAngles());<NEW_LINE>}<NEW_LINE>LOG.i("onStartPreview:", "Starting preview.");<NEW_LINE>addRepeatingRequestBuilderSurfaces();<NEW_LINE>applyRepeatingRequestBuilder(false, CameraException.REASON_FAILED_TO_START_PREVIEW);<NEW_LINE>LOG.i("onStartPreview:", "Started preview.");<NEW_LINE>// Start delayed video if needed.<NEW_LINE>if (mFullVideoPendingStub != null) {<NEW_LINE>// Do not call takeVideo/onTakeVideo. It will reset some stub parameters that<NEW_LINE>// the recorder sets. Also we are posting so that doTakeVideo sees a started preview.<NEW_LINE>final VideoResult.Stub stub = mFullVideoPendingStub;<NEW_LINE>mFullVideoPendingStub = null;<NEW_LINE>getOrchestrator().scheduleStateful("do take video", CameraState.PREVIEW, new Runnable() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void run() {<NEW_LINE>doTakeVideo(stub);<NEW_LINE>}<NEW_LINE>});<NEW_LINE>}<NEW_LINE>// Wait for the first frame.<NEW_LINE>final TaskCompletionSource<Void> <MASK><NEW_LINE>new BaseAction() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void onCaptureCompleted(@NonNull ActionHolder holder, @NonNull CaptureRequest request, @NonNull TotalCaptureResult result) {<NEW_LINE>super.onCaptureCompleted(holder, request, result);<NEW_LINE>setState(STATE_COMPLETED);<NEW_LINE>task.trySetResult(null);<NEW_LINE>}<NEW_LINE>}.start(this);<NEW_LINE>return task.getTask();<NEW_LINE>}
task = new TaskCompletionSource<>();
221,890
public String[] authorize(URL home) {<NEW_LINE>FormLogin panel = new FormLogin();<NEW_LINE>String server = HudsonManager.simplifyServerLocation(home.toString(), true);<NEW_LINE>String username = loginPrefs().get(server, null);<NEW_LINE>if (username != null) {<NEW_LINE>panel.userField.setText(username);<NEW_LINE>char[] savedPassword = Keyring.read(server);<NEW_LINE>if (savedPassword != null) {<NEW_LINE>panel.passField.setText(new String(savedPassword));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>panel.locationField.setText(home.toString());<NEW_LINE>DialogDescriptor dd = new DialogDescriptor(panel, Bundle.FormLogin_log_in());<NEW_LINE>if (DialogDisplayer.getDefault().notify(dd) != NotifyDescriptor.OK_OPTION) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>username = panel.userField.getText();<NEW_LINE>loginPrefs().put(server, username);<NEW_LINE>String password = new String(panel.passField.getPassword());<NEW_LINE>panel.passField.setText("");<NEW_LINE>Keyring.save(server, password.toCharArray(), Bundle.FormLogin_password_description(home, username));<NEW_LINE>return new <MASK><NEW_LINE>}
String[] { username, password };
175,182
private CompletableFuture<Void> seekAsyncInternal(long requestId, ByteBuf seek, MessageId seekId, String seekBy) {<NEW_LINE>final CompletableFuture<Void> <MASK><NEW_LINE>ClientCnx cnx = cnx();<NEW_LINE>BatchMessageIdImpl originSeekMessageId = seekMessageId;<NEW_LINE>seekMessageId = new BatchMessageIdImpl((MessageIdImpl) seekId);<NEW_LINE>duringSeek.set(true);<NEW_LINE>log.info("[{}][{}] Seeking subscription to {}", topic, subscription, seekBy);<NEW_LINE>cnx.sendRequestWithId(seek, requestId).thenRun(() -> {<NEW_LINE>log.info("[{}][{}] Successfully reset subscription to {}", topic, subscription, seekBy);<NEW_LINE>acknowledgmentsGroupingTracker.flushAndClean();<NEW_LINE>lastDequeuedMessageId = MessageId.earliest;<NEW_LINE>clearIncomingMessages();<NEW_LINE>seekFuture.complete(null);<NEW_LINE>}).exceptionally(e -> {<NEW_LINE>// re-set duringSeek and seekMessageId if seek failed<NEW_LINE>seekMessageId = originSeekMessageId;<NEW_LINE>duringSeek.set(false);<NEW_LINE>log.error("[{}][{}] Failed to reset subscription: {}", topic, subscription, e.getCause().getMessage());<NEW_LINE>seekFuture.completeExceptionally(PulsarClientException.wrap(e.getCause(), String.format("Failed to seek the subscription %s of the topic %s to %s", subscription, topicName.toString(), seekBy)));<NEW_LINE>return null;<NEW_LINE>});<NEW_LINE>return seekFuture;<NEW_LINE>}
seekFuture = new CompletableFuture<>();
1,689,676
public Set<Link> links(final Project project) {<NEW_LINE>SourceSetContainer sourceSets = project.getExtensions().getByType(JavaPluginExtension.class).getSourceSets();<NEW_LINE>EclipseClasspath classpath = project.getExtensions().getByType(EclipseModel.class).getClasspath();<NEW_LINE>File defaultOutputDir = classpath == null ? project.file(EclipsePluginConstants.<MASK><NEW_LINE>List<SourceFolder> sourceFolders = new SourceFoldersCreator().getBasicExternalSourceFolders(sourceSets, new Function<File, String>() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public String apply(File dir) {<NEW_LINE>return project.relativePath(dir);<NEW_LINE>}<NEW_LINE>}, defaultOutputDir);<NEW_LINE>Set<Link> links = Sets.newLinkedHashSetWithExpectedSize(sourceFolders.size());<NEW_LINE>for (SourceFolder sourceFolder : sourceFolders) {<NEW_LINE>links.add(new Link(sourceFolder.getName(), "2", sourceFolder.getAbsolutePath(), null));<NEW_LINE>}<NEW_LINE>return links;<NEW_LINE>}
DEFAULT_PROJECT_OUTPUT_PATH) : classpath.getDefaultOutputDir();
73,458
protected void onCreate(Bundle savedInstanceState) {<NEW_LINE>super.onCreate(savedInstanceState);<NEW_LINE><MASK><NEW_LINE>Toolbar toolbar = (Toolbar) findViewById(R.id.my_toolbar);<NEW_LINE>setSupportActionBar(toolbar);<NEW_LINE>String jsonString = FileUtils.loadSettingsJsonFile(getApplicationContext());<NEW_LINE>if (!TextUtils.isEmpty(jsonString)) {<NEW_LINE>alCustomizationSettings = (AlCustomizationSettings) GsonUtils.getObjectFromJson(jsonString, AlCustomizationSettings.class);<NEW_LINE>} else {<NEW_LINE>alCustomizationSettings = new AlCustomizationSettings();<NEW_LINE>}<NEW_LINE>connectivityReceiver = new ConnectivityReceiver();<NEW_LINE>userPreference = MobiComUserPreference.getInstance(ChannelCreateActivity.this);<NEW_LINE>mActionBar = getSupportActionBar();<NEW_LINE>if (!TextUtils.isEmpty(alCustomizationSettings.getThemeColorPrimary()) && !TextUtils.isEmpty(alCustomizationSettings.getThemeColorPrimaryDark())) {<NEW_LINE>mActionBar.setBackgroundDrawable(new ColorDrawable(Color.parseColor(alCustomizationSettings.getThemeColorPrimary())));<NEW_LINE>if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {<NEW_LINE>getWindow().setStatusBarColor(Color.parseColor(alCustomizationSettings.getThemeColorPrimaryDark()));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>mActionBar.setTitle(R.string.channel_create_title);<NEW_LINE>mActionBar.setDisplayShowHomeEnabled(true);<NEW_LINE>mActionBar.setDisplayHomeAsUpEnabled(true);<NEW_LINE>finishActivityReceiver = new FinishActivityReceiver();<NEW_LINE>registerReceiver(finishActivityReceiver, new IntentFilter(ACTION_FINISH_CHANNEL_CREATE));<NEW_LINE>layout = (LinearLayout) findViewById(R.id.footerAd);<NEW_LINE>applozicPermissions = new ApplozicPermissions(this, layout);<NEW_LINE>channelName = (EditText) findViewById(R.id.channelName);<NEW_LINE>circleImageView = (CircleImageView) findViewById(R.id.channelIcon);<NEW_LINE>uploadImageButton = (CircleImageView) findViewById(R.id.applozic_channel_profile_camera);<NEW_LINE>uploadImageButton.setOnClickListener(new View.OnClickListener() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void onClick(View v) {<NEW_LINE>processImagePicker();<NEW_LINE>}<NEW_LINE>});<NEW_LINE>int drawableResourceId = getResources().getIdentifier(alCustomizationSettings.getAttachCameraIconName(), "drawable", getPackageName());<NEW_LINE>uploadImageButton.setImageResource(drawableResourceId);<NEW_LINE>fileClientService = new FileClientService(this);<NEW_LINE>if (getIntent() != null) {<NEW_LINE>groupType = getIntent().getIntExtra(GROUP_TYPE, Channel.GroupType.PUBLIC.getValue().intValue());<NEW_LINE>}<NEW_LINE>registerReceiver(connectivityReceiver, new IntentFilter(ConnectivityManager.CONNECTIVITY_ACTION));<NEW_LINE>}
setContentView(R.layout.channel_create_activty_layout);
1,443,987
static long secondsToNextMonthTick(String currentMonthValue, long offsetInSecond) {<NEW_LINE>// date time formatter only has year and month, so when incrementing the month by one, the day will<NEW_LINE>// still be 0, which would be the first day of next month.<NEW_LINE>// For example, if the currentMonth is "2020-11", then the currentMonthDateTime would be LocalDate(2020, 11, 0).<NEW_LINE>// When calling plusMonth, it will return (2020, 12, 0), which is the first day of the next month.<NEW_LINE>String[] parts = currentMonthValue.split("-");<NEW_LINE>int year = Integer.parseInt(parts[0]);<NEW_LINE>int month = Integer.parseInt(parts[1]);<NEW_LINE>LocalDateTime currentMonthDateTime = LocalDateTime.of(year, Month.of(month), 1, 0, 0);<NEW_LINE>long secondsNextMonth = currentMonthDateTime.plusMonths(1).plusSeconds(offsetInSecond).atOffset(ZONE_OFFSET).toEpochSecond();<NEW_LINE><MASK><NEW_LINE>}
return secondsNextMonth - time.seconds();
1,314,572
private AspectRatio parseAspectRatioName(String name) {<NEW_LINE>if ("square".equals(name)) {<NEW_LINE>return new AspectRatio(null, 1.0f, 1.0f);<NEW_LINE>} else if ("original".equals(name)) {<NEW_LINE>return new AspectRatio(activity.getString(R.string.ucrop_label_original).toUpperCase(), CropImageView.SOURCE_IMAGE_ASPECT_RATIO, 1.0f);<NEW_LINE>} else if ("3x2".equals(name)) {<NEW_LINE>return new AspectRatio(null, 3.0f, 2.0f);<NEW_LINE>} else if ("4x3".equals(name)) {<NEW_LINE>return new AspectRatio(null, 4.0f, 3.0f);<NEW_LINE>} else if ("5x3".equals(name)) {<NEW_LINE>return new <MASK><NEW_LINE>} else if ("5x4".equals(name)) {<NEW_LINE>return new AspectRatio(null, 5.0f, 4.0f);<NEW_LINE>} else if ("7x5".equals(name)) {<NEW_LINE>return new AspectRatio(null, 7.0f, 5.0f);<NEW_LINE>} else if ("16x9".equals(name)) {<NEW_LINE>return new AspectRatio(null, 16.0f, 9.0f);<NEW_LINE>} else {<NEW_LINE>return new AspectRatio(activity.getString(R.string.ucrop_label_original).toUpperCase(), CropImageView.SOURCE_IMAGE_ASPECT_RATIO, 1.0f);<NEW_LINE>}<NEW_LINE>}
AspectRatio(null, 5.0f, 3.0f);
391,802
private void stepDisable(Map<String, Map<String, Object>> dirtyprops) throws IOException {<NEW_LINE>LOG.fine("ModuleList: stepDisable");<NEW_LINE>Set<Module> todisable = new HashSet<Module>();<NEW_LINE>for (Map.Entry<String, Map<String, Object>> entry : dirtyprops.entrySet()) {<NEW_LINE>String cnb = entry.getKey();<NEW_LINE>Map<String, Object> props = entry.getValue();<NEW_LINE>if (props.get("enabled") == null || !((Boolean) props.get("enabled")).booleanValue()) {<NEW_LINE>// NOI18N<NEW_LINE>DiskStatus status = statuses.get(cnb);<NEW_LINE>// #159001<NEW_LINE>assert status != null : cnb;<NEW_LINE>if (Boolean.TRUE.equals(status.diskProps.get("enabled"))) {<NEW_LINE>// NOI18N<NEW_LINE>// NOI18N<NEW_LINE>if (!status.module.isEnabled())<NEW_LINE>throw new <MASK><NEW_LINE>todisable.add(status.module);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (todisable.isEmpty()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>List<Module> reallydisable = mgr.simulateDisable(todisable);<NEW_LINE>for (Module m : reallydisable) {<NEW_LINE>if (!m.isAutoload() && !m.isEager() && !todisable.contains(m)) {<NEW_LINE>todisable.add(m);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>mgr.disable(todisable);<NEW_LINE>}
IllegalStateException("Already disabled: " + status.module);
127,612
public Builder mergeFrom(com.didiglobal.booster.aapt2.Resources.Styleable other) {<NEW_LINE>if (other == com.didiglobal.booster.aapt2.Resources.Styleable.getDefaultInstance())<NEW_LINE>return this;<NEW_LINE>if (entryBuilder_ == null) {<NEW_LINE>if (!other.entry_.isEmpty()) {<NEW_LINE>if (entry_.isEmpty()) {<NEW_LINE>entry_ = other.entry_;<NEW_LINE>bitField0_ = (bitField0_ & ~0x00000001);<NEW_LINE>} else {<NEW_LINE>ensureEntryIsMutable();<NEW_LINE>entry_.addAll(other.entry_);<NEW_LINE>}<NEW_LINE>onChanged();<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>if (!other.entry_.isEmpty()) {<NEW_LINE>if (entryBuilder_.isEmpty()) {<NEW_LINE>entryBuilder_.dispose();<NEW_LINE>entryBuilder_ = null;<NEW_LINE>entry_ = other.entry_;<NEW_LINE>bitField0_ = (bitField0_ & ~0x00000001);<NEW_LINE>entryBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getEntryFieldBuilder() : null;<NEW_LINE>} else {<NEW_LINE>entryBuilder_.addAllMessages(other.entry_);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE><MASK><NEW_LINE>onChanged();<NEW_LINE>return this;<NEW_LINE>}
this.mergeUnknownFields(other.unknownFields);
504,599
public String sqlAD_getUnsequencedDocuments(String vendorName, String catalogName, String schemaName) {<NEW_LINE>// table name<NEW_LINE>String tableName = "AD_Table";<NEW_LINE>// column names<NEW_LINE>ArrayList<String> columnNames = new ArrayList<String>();<NEW_LINE>columnNames.add("TableName");<NEW_LINE>// aliases<NEW_LINE>ArrayList<String> aliasNames = null;<NEW_LINE>// conditions<NEW_LINE>ArrayList<String> conditions = new ArrayList<String>();<NEW_LINE>conditions.add("t.IsView = 'N'");<NEW_LINE>String subQuery = sql_select(vendorName, catalogName, schemaName, "AD_Column", "t0", new ArrayList<String>(Arrays.asList("AD_Table_ID")), null, new ArrayList<String>(Arrays.asList("t0.ColumnName LIKE 'DocumentNo' OR t0.ColumnName LIKE 'Value'")), null, false);<NEW_LINE>conditions.add(new StringBuffer("AD_Table_ID IN (").append(subQuery).append(")").toString());<NEW_LINE>subQuery = sql_select(vendorName, catalogName, schemaName, "AD_Sequence", "t1", new ArrayList<String>(Arrays.asList("Name")), null, new ArrayList<String>(Arrays.asList("t1.AD_Client_ID = ?")), null, false);<NEW_LINE>conditions.add(new StringBuffer("'DocumentNo_'||t.TableName NOT IN (").append(subQuery).append(")").toString());<NEW_LINE>// sort order<NEW_LINE>ArrayList<String> sortColumns <MASK><NEW_LINE>sortColumns.add("1");<NEW_LINE>// get SQL command<NEW_LINE>return sql_select(vendorName, catalogName, schemaName, tableName, null, columnNames, aliasNames, conditions, sortColumns, false);<NEW_LINE>}
= new ArrayList<String>();
66,351
final DeleteChannelMessageResult executeDeleteChannelMessage(DeleteChannelMessageRequest deleteChannelMessageRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(deleteChannelMessageRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<DeleteChannelMessageRequest> request = null;<NEW_LINE>Response<DeleteChannelMessageResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new DeleteChannelMessageRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(deleteChannelMessageRequest));<NEW_LINE>// Binds the request metrics to the current request.<NEW_LINE>request.setAWSRequestMetrics(awsRequestMetrics);<NEW_LINE>request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);<NEW_LINE>request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());<NEW_LINE>request.<MASK><NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteChannelMessage");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<DeleteChannelMessageResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeleteChannelMessageResultJsonUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
addHandlerContext(HandlerContextKey.SERVICE_ID, "Chime SDK Messaging");
1,475,413
protected void trainModel() throws LibrecException {<NEW_LINE>for (int iter = 1; iter <= numIterations; iter++) {<NEW_LINE>loss = 0.0d;<NEW_LINE>for (MatrixEntry me : trainMatrix) {<NEW_LINE>// user<NEW_LINE>int userId = me.row();<NEW_LINE>// item<NEW_LINE>int itemId = me.column();<NEW_LINE><MASK><NEW_LINE>double predictRating = predict(userId, itemId);<NEW_LINE>double error = realRating - predictRating;<NEW_LINE>loss += error * error;<NEW_LINE>// update factors<NEW_LINE>for (int factorId = 0; factorId < numFactors; factorId++) {<NEW_LINE>double userFactor = userFactors.get(userId, factorId), itemFactor = itemFactors.get(itemId, factorId);<NEW_LINE>userFactors.plus(userId, factorId, learnRate * (error * itemFactor - regUser * userFactor));<NEW_LINE>itemFactors.plus(itemId, factorId, learnRate * (error * userFactor - regItem * itemFactor));<NEW_LINE>loss += regUser * userFactor * userFactor + regItem * itemFactor * itemFactor;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>loss *= 0.5;<NEW_LINE>if (isConverged(iter) && earlyStop) {<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>updateLRate(iter);<NEW_LINE>}<NEW_LINE>}
double realRating = me.get();
510,853
private void copyGL(MAcctSchema targetAS) throws Exception {<NEW_LINE>MAcctSchemaGL source = MAcctSchemaGL.get(getCtx(), p_SourceAcctSchema_ID);<NEW_LINE>MAcctSchemaGL target = new MAcctSchemaGL(getCtx(), 0, get_TrxName());<NEW_LINE>target.setC_AcctSchema_ID(p_TargetAcctSchema_ID);<NEW_LINE>ArrayList<KeyNamePair> list = source.getAcctInfo();<NEW_LINE>for (int i = 0; i < list.size(); i++) {<NEW_LINE>KeyNamePair keyNamePair = list.get(i);<NEW_LINE>int sourceValidCombinationId = keyNamePair.getKey();<NEW_LINE>String columnName = keyNamePair.getName();<NEW_LINE>MAccount sourceAccount = MAccount.getValidCombination(getCtx(), sourceValidCombinationId, get_TrxName());<NEW_LINE>MAccount targetAccount = createAccount(targetAS, sourceAccount);<NEW_LINE>target.setValue(columnName, new Integer<MASK><NEW_LINE>}<NEW_LINE>if (!target.save())<NEW_LINE>throw new AdempiereSystemError("Could not Save GL");<NEW_LINE>}
(targetAccount.getC_ValidCombination_ID()));
1,378,831
private static <K, V> CacheConfigurationBuilder<K, V> addDefaultCopiers(CacheConfigurationBuilder<K, V> builder, Class<K> keyType, Class<V> valueType) {<NEW_LINE>Set<Class<?>> immutableTypes = new HashSet<>();<NEW_LINE><MASK><NEW_LINE>immutableTypes.add(Long.class);<NEW_LINE>immutableTypes.add(Float.class);<NEW_LINE>immutableTypes.add(Double.class);<NEW_LINE>immutableTypes.add(Character.class);<NEW_LINE>immutableTypes.add(Integer.class);<NEW_LINE>if (immutableTypes.contains(keyType)) {<NEW_LINE>builder = builder.withService(new DefaultCopierConfiguration<K>((Class) Eh107IdentityCopier.class, DefaultCopierConfiguration.Type.KEY));<NEW_LINE>} else {<NEW_LINE>builder = builder.withService(new DefaultCopierConfiguration<>(SerializingCopier.<K>asCopierClass(), DefaultCopierConfiguration.Type.KEY));<NEW_LINE>}<NEW_LINE>if (immutableTypes.contains(valueType)) {<NEW_LINE>builder = builder.withService(new DefaultCopierConfiguration<K>((Class) Eh107IdentityCopier.class, DefaultCopierConfiguration.Type.VALUE));<NEW_LINE>} else {<NEW_LINE>builder = builder.withService(new DefaultCopierConfiguration<>(SerializingCopier.<K>asCopierClass(), DefaultCopierConfiguration.Type.VALUE));<NEW_LINE>}<NEW_LINE>return builder;<NEW_LINE>}
immutableTypes.add(String.class);
100,430
final ListFleetsResult executeListFleets(ListFleetsRequest listFleetsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listFleetsRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<ListFleetsRequest> request = null;<NEW_LINE>Response<ListFleetsResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new ListFleetsRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listFleetsRequest));<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, "ListFleets");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<ListFleetsResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListFleetsResultJsonUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
1,727,104
public Dataset deleteDatasetAttributes(String datasetId, List<String> attributeKeyList, Boolean deleteAll) {<NEW_LINE>try (var session = modelDBHibernateUtil.getSessionFactory().openSession()) {<NEW_LINE>var transaction = session.beginTransaction();<NEW_LINE>var stringQueryBuilder = new StringBuilder("delete from AttributeEntity attr WHERE ");<NEW_LINE>if (deleteAll) {<NEW_LINE>stringQueryBuilder.append(" attr.datasetEntity." + ModelDBConstants.ID + DATASET_ID_POST_QUERY_PARAM);<NEW_LINE>var query = session.createQuery(stringQueryBuilder.toString()).setLockOptions(new LockOptions()<MASK><NEW_LINE>query.setParameter(ModelDBConstants.DATASET_ID_STR, datasetId);<NEW_LINE>query.executeUpdate();<NEW_LINE>} else {<NEW_LINE>stringQueryBuilder.append(" attr." + ModelDBConstants.KEY + " in (:keys)");<NEW_LINE>stringQueryBuilder.append(" AND attr.datasetEntity." + ModelDBConstants.ID + DATASET_ID_POST_QUERY_PARAM);<NEW_LINE>var query = session.createQuery(stringQueryBuilder.toString()).setLockOptions(new LockOptions().setLockMode(LockMode.PESSIMISTIC_WRITE));<NEW_LINE>query.setParameter("keys", attributeKeyList);<NEW_LINE>query.setParameter(ModelDBConstants.DATASET_ID_STR, datasetId);<NEW_LINE>query.executeUpdate();<NEW_LINE>}<NEW_LINE>DatasetEntity datasetObj = session.get(DatasetEntity.class, datasetId);<NEW_LINE>datasetObj.setTime_updated(Calendar.getInstance().getTimeInMillis());<NEW_LINE>session.update(datasetObj);<NEW_LINE>transaction.commit();<NEW_LINE>return datasetObj.getProtoObject(mdbRoleService);<NEW_LINE>} catch (Exception ex) {<NEW_LINE>if (ModelDBUtils.needToRetry(ex)) {<NEW_LINE>return deleteDatasetAttributes(datasetId, attributeKeyList, deleteAll);<NEW_LINE>} else {<NEW_LINE>throw ex;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
.setLockMode(LockMode.PESSIMISTIC_WRITE));
736,162
final DeleteMemberResult executeDeleteMember(DeleteMemberRequest deleteMemberRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(deleteMemberRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<DeleteMemberRequest> request = null;<NEW_LINE>Response<DeleteMemberResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new DeleteMemberRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(deleteMemberRequest));<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, "ManagedBlockchain");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteMember");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<DeleteMemberResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeleteMemberResultJsonUnmarshaller());<NEW_LINE>response = <MASK><NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
invoke(request, responseHandler, executionContext);
516,437
private static void mget(CoapClient client, int port, String resourcePath, MulticastMode mode, long leisureMillis) throws ConnectorException, IOException {<NEW_LINE>String uri;<NEW_LINE>switch(mode) {<NEW_LINE>default:<NEW_LINE>case IPv4:<NEW_LINE>if (NetworkInterfacesUtil.isAnyIpv4()) {<NEW_LINE>uri = "coap://" + CoAP.MULTICAST_IPV4.getHostAddress() + ":" + port + "/" + resourcePath;<NEW_LINE>break;<NEW_LINE>} else {<NEW_LINE>System.err.print("IPv4 not supported!");<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>case IPv4_BROADCAST:<NEW_LINE>if (NetworkInterfacesUtil.isAnyIpv4() && NetworkInterfacesUtil.getBroadcastIpv4() != null) {<NEW_LINE>uri = "coap://" + NetworkInterfacesUtil.getBroadcastIpv4().getHostAddress() + ":" + port + "/" + resourcePath + "?B";<NEW_LINE>break;<NEW_LINE>} else {<NEW_LINE>System.err.print("IPv4 broadcast not supported!");<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>case IPv6_LINK:<NEW_LINE>if (NetworkInterfacesUtil.isAnyIpv6()) {<NEW_LINE>uri = "coap://[" + CoAP.MULTICAST_IPV6_LINKLOCAL.getHostAddress() + "]:" + port + "/" + resourcePath + "?6L";<NEW_LINE>break;<NEW_LINE>} else {<NEW_LINE>System.err.print("IPv6 not supported!");<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>case Ipv6_SITE:<NEW_LINE>if (NetworkInterfacesUtil.isAnyIpv6()) {<NEW_LINE>uri = "coap://[" + CoAP.MULTICAST_IPV6_SITELOCAL.getHostAddress() + "]:" + port + "/" + resourcePath + "?6SL";<NEW_LINE>break;<NEW_LINE>} else {<NEW_LINE>System.err.print("IPv6 not supported!");<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>client.setURI(uri);<NEW_LINE>System.out.println(FORMAT.format(new Date<MASK><NEW_LINE>Request multicastRequest = Request.newGet();<NEW_LINE>multicastRequest.setType(Type.NON);<NEW_LINE>// sends a multicast request<NEW_LINE>MultiCoapHandler handler = new MultiCoapHandler();<NEW_LINE>client.advanced(handler, multicastRequest);<NEW_LINE>while (handler.waitOn(leisureMillis + 2000)) ;<NEW_LINE>}
()) + "GET " + uri);
1,313,310
protected boolean doEncode(DocumentMessage obj, DocumentSerializer buf) {<NEW_LINE>VisitorInfoMessage msg = (VisitorInfoMessage) obj;<NEW_LINE>buf.putInt(null, msg.getFinishedBuckets().size());<NEW_LINE>for (BucketId id : msg.getFinishedBuckets()) {<NEW_LINE>long rawid = id.getRawId();<NEW_LINE>long reversed = ((rawid >>> 56) & 0x00000000000000FFl) | ((rawid >>> 40) & 0x000000000000FF00l) | ((rawid >>> 24) & 0x0000000000FF0000l) | ((rawid >>> 8) & 0x00000000FF000000l) | ((rawid << 8) & 0x000000FF00000000l) | ((rawid << 24) & 0x0000FF0000000000l) | ((rawid << 40) & 0x00FF000000000000l) | (<MASK><NEW_LINE>buf.putLong(null, reversed);<NEW_LINE>}<NEW_LINE>encodeString(msg.getErrorMessage(), buf);<NEW_LINE>return true;<NEW_LINE>}
(rawid << 56) & 0xFF00000000000000l);
870,835
private Void paintComponentPrivileged(final Graphics g) {<NEW_LINE>if (componentHasNoArea() || disabledDueToJavaBug) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>if (isPrinting()) {<NEW_LINE>paintOriginalImage(g);<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>final Graphics2D g2 = (Graphics2D) g;<NEW_LINE>final AffineTransform transform = g2.getTransform();<NEW_LINE>final double scaleX = transform.getScaleX();<NEW_LINE>final double scaleY = transform.getScaleY();<NEW_LINE>final int targetWidth = getWidth();<NEW_LINE>int requiredImageWidth = <MASK><NEW_LINE>int requiredImageHeight = (int) (getHeight() * scaleY);<NEW_LINE>BufferedImage cachedImage = loadImageFromCacheFile();<NEW_LINE>if (!isCachedImageValid(requiredImageWidth, requiredImageHeight)) {<NEW_LINE>if (this.targetWidth.getAndSet(targetWidth) != targetWidth)<NEW_LINE>AsyncScalrService.getService().submit(() -> {<NEW_LINE>if (targetWidth != getWidth()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>final BufferedImage image = loadImageFromURL();<NEW_LINE>if (image == null || hasNoArea(image)) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>BufferedImage scaledImage = null;<NEW_LINE>try {<NEW_LINE>scaledImage = Scalr.resize(image, Scalr.Mode.BEST_FIT_BOTH, requiredImageWidth, requiredImageHeight);<NEW_LINE>} finally {<NEW_LINE>image.flush();<NEW_LINE>}<NEW_LINE>setCachedImage(scaledImage);<NEW_LINE>if (getCacheType().equals(CacheType.IC_FILE)) {<NEW_LINE>writeCacheFile();<NEW_LINE>}<NEW_LINE>SwingUtilities.invokeLater(() -> {<NEW_LINE>this.targetWidth.set(0);<NEW_LINE>if (rendererListener != null)<NEW_LINE>rendererListener.run();<NEW_LINE>if (isVisible())<NEW_LINE>repaint();<NEW_LINE>});<NEW_LINE>});<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>if (cachedImage == null || hasNoArea(cachedImage)) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>final int cachedImageWidth = cachedImage.getWidth();<NEW_LINE>final int cachedImageHeight = cachedImage.getHeight();<NEW_LINE>final Rectangle imageCoordinates = calculateImageCoordinates(requiredImageWidth, requiredImageHeight, cachedImageWidth, cachedImageHeight);<NEW_LINE>if (scaleX != 1 || scaleY != 1) {<NEW_LINE>Graphics2D gg = (Graphics2D) g.create();<NEW_LINE>gg.setTransform(AffineTransform.getTranslateInstance(imageCoordinates.x + transform.getTranslateX(), imageCoordinates.y + transform.getTranslateY()));<NEW_LINE>gg.drawImage(cachedImage, 0, 0, imageCoordinates.width, imageCoordinates.height, null);<NEW_LINE>gg.dispose();<NEW_LINE>} else<NEW_LINE>g.drawImage(cachedImage, imageCoordinates.x, imageCoordinates.y, imageCoordinates.width, imageCoordinates.height, null);<NEW_LINE>} catch (ClassCastException e) {<NEW_LINE>LogUtils.severe("Disabled bitmap image painting due to java bug https://bugs.openjdk.java.net/browse/JDK-8160328. Modify freeplane.sh to run java with option '-Dsun.java2d.xrender=false'");<NEW_LINE>disabledDueToJavaBug = true;<NEW_LINE>}<NEW_LINE>flushImage();<NEW_LINE>return null;<NEW_LINE>}
(int) (targetWidth * scaleX);
102,224
private X509CertRecord itemToX509CertRecord(Item item) {<NEW_LINE>boolean clientCert;<NEW_LINE>try {<NEW_LINE>clientCert = item.getBoolean(KEY_CLIENT_CERT);<NEW_LINE>} catch (Exception ex) {<NEW_LINE>LOGGER.warn("clientCert for item doesn't exist. Will set it to false. Item: {}", item.toString());<NEW_LINE>clientCert = false;<NEW_LINE>}<NEW_LINE>X509CertRecord certRecord = new X509CertRecord();<NEW_LINE>certRecord.setProvider<MASK><NEW_LINE>certRecord.setInstanceId(item.getString(KEY_INSTANCE_ID));<NEW_LINE>certRecord.setService(item.getString(KEY_SERVICE));<NEW_LINE>certRecord.setCurrentSerial(item.getString(KEY_CURRENT_SERIAL));<NEW_LINE>certRecord.setCurrentIP(item.getString(KEY_CURRENT_IP));<NEW_LINE>certRecord.setCurrentTime(DynamoDBUtils.getDateFromItem(item, KEY_CURRENT_TIME));<NEW_LINE>certRecord.setPrevSerial(item.getString(KEY_PREV_SERIAL));<NEW_LINE>certRecord.setPrevIP(item.getString(KEY_PREV_IP));<NEW_LINE>certRecord.setPrevTime(DynamoDBUtils.getDateFromItem(item, KEY_PREV_TIME));<NEW_LINE>certRecord.setClientCert(clientCert);<NEW_LINE>certRecord.setLastNotifiedTime(DynamoDBUtils.getDateFromItem(item, KEY_LAST_NOTIFIED_TIME));<NEW_LINE>certRecord.setLastNotifiedServer(item.getString(KEY_LAST_NOTIFIED_SERVER));<NEW_LINE>certRecord.setExpiryTime(DynamoDBUtils.getDateFromItem(item, KEY_EXPIRY_TIME));<NEW_LINE>certRecord.setHostName(item.getString(KEY_HOSTNAME));<NEW_LINE>certRecord.setSvcDataUpdateTime(DynamoDBUtils.getDateFromItem(item, KEY_SVC_DATA_UPDATE_TIME));<NEW_LINE>return certRecord;<NEW_LINE>}
(item.getString(KEY_PROVIDER));
1,739,425
private int bsearch_index_internal(ThreadContext context, Block block) {<NEW_LINE>Ruby runtime = context.runtime;<NEW_LINE>int low = 0, high = realLength, mid;<NEW_LINE>boolean smaller = false, satisfied = false;<NEW_LINE>IRubyObject v;<NEW_LINE>CallSite op_cmp = null;<NEW_LINE>while (low < high) {<NEW_LINE>mid = low + ((high - low) / 2);<NEW_LINE>v = block.yieldSpecific(context, eltOk(mid));<NEW_LINE>if (v instanceof RubyFixnum) {<NEW_LINE>long fixValue = ((RubyFixnum) v).getLongValue();<NEW_LINE>if (fixValue == 0)<NEW_LINE>return mid;<NEW_LINE>smaller = fixValue < 0;<NEW_LINE>} else if (v == context.tru) {<NEW_LINE>satisfied = true;<NEW_LINE>smaller = true;<NEW_LINE>} else if (v == context.fals || v == context.nil) {<NEW_LINE>smaller = false;<NEW_LINE>} else if (runtime.getNumeric().isInstance(v)) {<NEW_LINE>if (op_cmp == null)<NEW_LINE><MASK><NEW_LINE>switch(RubyComparable.cmpint(context, op_cmp.call(context, v, v, RubyFixnum.zero(runtime)), v, RubyFixnum.zero(runtime))) {<NEW_LINE>case 0:<NEW_LINE>return mid;<NEW_LINE>case 1:<NEW_LINE>smaller = true;<NEW_LINE>break;<NEW_LINE>case -1:<NEW_LINE>smaller = false;<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>throw runtime.newTypeError(str(runtime, "wrong argument type ", types(runtime, v.getType()), " (must be numeric, true, false or nil"));<NEW_LINE>}<NEW_LINE>if (smaller) {<NEW_LINE>high = mid;<NEW_LINE>} else {<NEW_LINE>low = mid + 1;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (low == realLength)<NEW_LINE>return -1;<NEW_LINE>if (!satisfied)<NEW_LINE>return -1;<NEW_LINE>return low;<NEW_LINE>}
op_cmp = sites(context).op_cmp_bsearch;
1,010,707
protected void doService(HttpServletRequest request, HttpServletResponse response) throws Exception {<NEW_LINE>logRequest(request);<NEW_LINE>// Keep a snapshot of the request attributes in case of an include,<NEW_LINE>// to be able to restore the original attributes after the include.<NEW_LINE>Map<String, Object> attributesSnapshot = null;<NEW_LINE>if (WebUtils.isIncludeRequest(request)) {<NEW_LINE>attributesSnapshot = new HashMap<>();<NEW_LINE>Enumeration<?> attrNames = request.getAttributeNames();<NEW_LINE>while (attrNames.hasMoreElements()) {<NEW_LINE>String attrName = <MASK><NEW_LINE>if (this.cleanupAfterInclude || attrName.startsWith(DEFAULT_STRATEGIES_PREFIX)) {<NEW_LINE>attributesSnapshot.put(attrName, request.getAttribute(attrName));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// Make framework objects available to handlers and view objects.<NEW_LINE>request.setAttribute(WEB_APPLICATION_CONTEXT_ATTRIBUTE, getWebApplicationContext());<NEW_LINE>request.setAttribute(LOCALE_RESOLVER_ATTRIBUTE, this.localeResolver);<NEW_LINE>request.setAttribute(THEME_RESOLVER_ATTRIBUTE, this.themeResolver);<NEW_LINE>request.setAttribute(THEME_SOURCE_ATTRIBUTE, getThemeSource());<NEW_LINE>if (this.flashMapManager != null) {<NEW_LINE>FlashMap inputFlashMap = this.flashMapManager.retrieveAndUpdate(request, response);<NEW_LINE>if (inputFlashMap != null) {<NEW_LINE>request.setAttribute(INPUT_FLASH_MAP_ATTRIBUTE, Collections.unmodifiableMap(inputFlashMap));<NEW_LINE>}<NEW_LINE>request.setAttribute(OUTPUT_FLASH_MAP_ATTRIBUTE, new FlashMap());<NEW_LINE>request.setAttribute(FLASH_MAP_MANAGER_ATTRIBUTE, this.flashMapManager);<NEW_LINE>}<NEW_LINE>RequestPath previousRequestPath = null;<NEW_LINE>if (this.parseRequestPath) {<NEW_LINE>previousRequestPath = (RequestPath) request.getAttribute(ServletRequestPathUtils.PATH_ATTRIBUTE);<NEW_LINE>ServletRequestPathUtils.parseAndCache(request);<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>doDispatch(request, response);<NEW_LINE>} finally {<NEW_LINE>if (!WebAsyncUtils.getAsyncManager(request).isConcurrentHandlingStarted()) {<NEW_LINE>// Restore the original attribute snapshot, in case of an include.<NEW_LINE>if (attributesSnapshot != null) {<NEW_LINE>restoreAttributesAfterInclude(request, attributesSnapshot);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (this.parseRequestPath) {<NEW_LINE>ServletRequestPathUtils.setParsedRequestPath(previousRequestPath, request);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
(String) attrNames.nextElement();
318,272
public void testPersistentMessageReceiveTopic(HttpServletRequest request, HttpServletResponse response) throws Exception {<NEW_LINE>boolean testFailed = false;<NEW_LINE>JMSContext jmsContext = jmsTCFBindings.createContext();<NEW_LINE>JMSConsumer jmsConsumer1 = jmsContext.createDurableConsumer(jmsTopic, "durPersMsg1");<NEW_LINE>JMSConsumer jmsConsumer2 = jmsContext.createDurableConsumer(jmsTopic1, "durPersMsg2");<NEW_LINE>JMSProducer jmsProducer = jmsContext.createProducer();<NEW_LINE>TextMessage recMsg1 = (TextMessage) jmsConsumer1.receive(30000);<NEW_LINE>TextMessage recMsg2 = (<MASK><NEW_LINE>if (((recMsg1 == null) || (recMsg1.getText() == null) || !recMsg1.getText().equals("testPersistentMessage_PersistentMsgTopic")) || (recMsg2 != null)) {<NEW_LINE>testFailed = true;<NEW_LINE>}<NEW_LINE>jmsConsumer1.close();<NEW_LINE>jmsConsumer2.close();<NEW_LINE>jmsContext.unsubscribe("durPersMsg1");<NEW_LINE>jmsContext.unsubscribe("durPersMsg2");<NEW_LINE>jmsContext.close();<NEW_LINE>if (testFailed) {<NEW_LINE>throw new Exception("testPersistentMessageReceiveTopic failed");<NEW_LINE>}<NEW_LINE>}
TextMessage) jmsConsumer2.receive(30000);
1,541,432
private void enforceChildDistribution(DistributionSpec distributionSpec, GroupExpression child, PhysicalPropertySet childOutputProperty) {<NEW_LINE>double childCosts = child.getCost(childOutputProperty);<NEW_LINE>Group childGroup = child.getGroup();<NEW_LINE>if (child.getOp() instanceof PhysicalDistributionOperator) {<NEW_LINE>DistributionProperty newDistributionProperty = new DistributionProperty(distributionSpec);<NEW_LINE>PhysicalPropertySet newOutputProperty = new PhysicalPropertySet(newDistributionProperty);<NEW_LINE>GroupExpression enforcer = newDistributionProperty.appendEnforcers(childGroup);<NEW_LINE>enforcer.setOutputPropertySatisfyRequiredProperty(newOutputProperty, newOutputProperty);<NEW_LINE>context.getMemo().insertEnforceExpression(enforcer, childGroup);<NEW_LINE>enforcer.updatePropertyWithCost(newOutputProperty, child.getInputProperties(childOutputProperty), childCosts);<NEW_LINE>childGroup.setBestExpression(enforcer, childCosts, newOutputProperty);<NEW_LINE>if (ConnectContext.get().getSessionVariable().isSetUseNthExecPlan()) {<NEW_LINE>enforcer.addValidOutputInputProperties(newOutputProperty, Lists<MASK><NEW_LINE>enforcer.getGroup().addSatisfyRequiredPropertyGroupExpression(newOutputProperty, enforcer);<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>// add physical distribution operator<NEW_LINE>addChildEnforcer(childOutputProperty, new DistributionProperty(distributionSpec), childCosts, child.getGroup());<NEW_LINE>}<NEW_LINE>}
.newArrayList(PhysicalPropertySet.EMPTY));
998,755
private String executeArgs(ProfilerAction action) {<NEW_LINE>StringBuilder sb = new StringBuilder();<NEW_LINE>// start - start profiling<NEW_LINE>// resume - start or resume profiling without resetting collected data<NEW_LINE>// stop - stop profiling<NEW_LINE>sb.append(action).append(',');<NEW_LINE>if (this.event != null) {<NEW_LINE>sb.append("event=").append(this.event).append(',');<NEW_LINE>}<NEW_LINE>if (this.file != null) {<NEW_LINE>sb.append("file=").append(this.file).append(',');<NEW_LINE>}<NEW_LINE>if (this.interval != null) {<NEW_LINE>sb.append("interval=").append(this<MASK><NEW_LINE>}<NEW_LINE>if (this.framebuf != null) {<NEW_LINE>sb.append("framebuf=").append(this.framebuf).append(',');<NEW_LINE>}<NEW_LINE>if (this.threads) {<NEW_LINE>sb.append("threads").append(',');<NEW_LINE>}<NEW_LINE>if (this.allkernel) {<NEW_LINE>sb.append("allkernel").append(',');<NEW_LINE>}<NEW_LINE>if (this.alluser) {<NEW_LINE>sb.append("alluser").append(',');<NEW_LINE>}<NEW_LINE>if (this.includes != null) {<NEW_LINE>for (String include : includes) {<NEW_LINE>sb.append("include=").append(include).append(',');<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (this.excludes != null) {<NEW_LINE>for (String exclude : excludes) {<NEW_LINE>sb.append("exclude=").append(exclude).append(',');<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return sb.toString();<NEW_LINE>}
.interval).append(',');
1,180,712
private void update() {<NEW_LINE>List<NavigationHistory.Waypoint> waypoints = NavigationHistory.getNavigations().getNextWaypoints();<NEW_LINE>// Update popup menu<NEW_LINE>if (popupMenu != null) {<NEW_LINE>updatePopupMenu = true;<NEW_LINE>}<NEW_LINE>// Set the short description<NEW_LINE>if (!waypoints.isEmpty()) {<NEW_LINE>NavigationHistory.Waypoint <MASK><NEW_LINE>String fileName = NavigationHistoryBackAction.getWaypointName(wpt);<NEW_LINE>if (fileName != null) {<NEW_LINE>putValue(SHORT_DESCRIPTION, // NOI18N<NEW_LINE>NbBundle.// NOI18N<NEW_LINE>getMessage(// NOI18N<NEW_LINE>NavigationHistoryForwardAction.class, // NOI18N<NEW_LINE>"NavigationHistoryForwardAction_Tooltip", fileName));<NEW_LINE>} else {<NEW_LINE>putValue(SHORT_DESCRIPTION, // NOI18N<NEW_LINE>NbBundle.// NOI18N<NEW_LINE>getMessage(// NOI18N<NEW_LINE>NavigationHistoryForwardAction.class, "NavigationHistoryForwardAction_Tooltip_simple"));<NEW_LINE>}<NEW_LINE>setEnabled(true);<NEW_LINE>} else {<NEW_LINE>putValue(SHORT_DESCRIPTION, // NOI18N<NEW_LINE>NbBundle.// NOI18N<NEW_LINE>getMessage(// NOI18N<NEW_LINE>NavigationHistoryForwardAction.class, "NavigationHistoryForwardAction_Tooltip_simple"));<NEW_LINE>setEnabled(false);<NEW_LINE>}<NEW_LINE>}
wpt = waypoints.get(0);
1,084,610
public void removeWebsearchSettings(int order) {<NEW_LINE>if (prefs.getString("websearch_baseurl_" + order, null) == null)<NEW_LINE>// The settings that were requested to be removed do not exist<NEW_LINE>return;<NEW_LINE>// Copy all settings higher than the supplied order number to the previous spot<NEW_LINE>Editor edit = prefs.edit();<NEW_LINE>int max = getMaxWebsearch();<NEW_LINE>for (int i = order; i < max; i++) {<NEW_LINE>edit.putString("websearch_name_" + i, prefs.getString("websearch_name_" + (i + 1), null));<NEW_LINE>edit.putString("websearch_baseurl_" + i, prefs.getString("websearch_baseurl_" + (i + 1), null));<NEW_LINE>edit.putString("websearch_cookies_" + i, prefs.getString("websearch_cookies_" + (i + 1), null));<NEW_LINE>}<NEW_LINE>// Remove the last settings, of which we are now sure are no longer required<NEW_LINE><MASK><NEW_LINE>edit.remove("websearch_baseurl_" + max);<NEW_LINE>edit.remove("websearch_cookies_" + max);<NEW_LINE>edit.apply();<NEW_LINE>}
edit.remove("websearch_name_" + max);
39,438
public Object convert(Class type, Object value) {<NEW_LINE>if (value == null) {<NEW_LINE>if (useDefault) {<NEW_LINE>return (defaultValue);<NEW_LINE>} else {<NEW_LINE>throw new ConversionException("No value specified");<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (value instanceof java.sql.Date && java.sql.Date.class.equals(type)) {<NEW_LINE>return value;<NEW_LINE>} else if (value instanceof java.sql.Time && java.sql.Time.class.equals(type)) {<NEW_LINE>return value;<NEW_LINE>} else if (value instanceof java.sql.Timestamp && java.sql.Timestamp.class.equals(type)) {<NEW_LINE>return value;<NEW_LINE>} else {<NEW_LINE>try {<NEW_LINE>if (java.sql.Date.class.equals(type)) {<NEW_LINE>return new java.sql.Date(convertTimestamp2TimeMillis(value.toString()));<NEW_LINE>} else if (java.sql.Time.class.equals(type)) {<NEW_LINE>return new java.sql.Time(convertTimestamp2TimeMillis(value.toString()));<NEW_LINE>} else if (java.sql.Timestamp.class.equals(type)) {<NEW_LINE>return new java.sql.Timestamp(convertTimestamp2TimeMillis(value.toString()));<NEW_LINE>} else {<NEW_LINE>return new Timestamp(convertTimestamp2TimeMillis<MASK><NEW_LINE>}<NEW_LINE>} catch (Exception e) {<NEW_LINE>throw new ConversionException("Value format invalid: " + e.getMessage(), e);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
(value.toString()));
464,589
protected void deleteRows() {<NEW_LINE>// If a table cell is being edited, we must cancel the editing<NEW_LINE>// before deleting the row.<NEW_LINE>GuiUtils.cancelEditing(headerTable);<NEW_LINE>int[] rowsSelected = headerTable.getSelectedRows();<NEW_LINE>int anchorSelection = headerTable.getSelectionModel().getAnchorSelectionIndex();<NEW_LINE>headerTable.clearSelection();<NEW_LINE>if (rowsSelected.length > 0) {<NEW_LINE>for (int i = rowsSelected.length - 1; i >= 0; i--) {<NEW_LINE>tableModel.removeRow(rowsSelected[i]);<NEW_LINE>}<NEW_LINE>tableModel.fireTableDataChanged();<NEW_LINE>// Table still contains one or more rows, so highlight (select)<NEW_LINE>// the appropriate one.<NEW_LINE>if (tableModel.getRowCount() > 0) {<NEW_LINE>if (anchorSelection >= tableModel.getRowCount()) {<NEW_LINE>anchorSelection = tableModel.getRowCount() - 1;<NEW_LINE>}<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>checkButtonsStatus();<NEW_LINE>} else {<NEW_LINE>if (tableModel.getRowCount() > 0) {<NEW_LINE>tableModel.removeRow(0);<NEW_LINE>tableModel.fireTableDataChanged();<NEW_LINE>headerTable.setRowSelectionInterval(0, 0);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
headerTable.setRowSelectionInterval(anchorSelection, anchorSelection);
1,707,910
private STNode validateCallExpression(STNode callExpr) {<NEW_LINE>STCheckExpressionNode checkExpr = (STCheckExpressionNode) callExpr;<NEW_LINE>STNode expr = checkExpr.expression;<NEW_LINE>if (expr.kind == SyntaxKind.FUNCTION_CALL || expr.kind == SyntaxKind.METHOD_CALL) {<NEW_LINE>return callExpr;<NEW_LINE>}<NEW_LINE>STNode checkKeyword = checkExpr.checkKeyword;<NEW_LINE>if (expr.kind == SyntaxKind.CHECK_EXPRESSION) {<NEW_LINE>expr = validateCallExpression(expr);<NEW_LINE>return STNodeFactory.createCheckExpressionNode(SyntaxKind.CHECK_EXPRESSION, checkKeyword, expr);<NEW_LINE>}<NEW_LINE>STNode openParenToken = SyntaxErrors.createMissingToken(SyntaxKind.OPEN_PAREN_TOKEN);<NEW_LINE>STNode arguments = STNodeFactory.createEmptyNodeList();<NEW_LINE>STNode closeParenToken = SyntaxErrors.createMissingToken(SyntaxKind.CLOSE_PAREN_TOKEN);<NEW_LINE>STNode funcOrMethodCall;<NEW_LINE>if (expr.kind == SyntaxKind.FIELD_ACCESS) {<NEW_LINE>STFieldAccessExpressionNode fieldAccessExpr = (STFieldAccessExpressionNode) expr;<NEW_LINE>funcOrMethodCall = STNodeFactory.createMethodCallExpressionNode(fieldAccessExpr.expression, fieldAccessExpr.dotToken, fieldAccessExpr.fieldName, openParenToken, arguments, closeParenToken);<NEW_LINE>funcOrMethodCall = SyntaxErrors.addDiagnostic(funcOrMethodCall, DiagnosticErrorCode.ERROR_INVALID_EXPRESSION_EXPECTED_CALL_EXPRESSION);<NEW_LINE>} else if (expr.kind == SyntaxKind.SIMPLE_NAME_REFERENCE || expr.kind == SyntaxKind.QUALIFIED_NAME_REFERENCE) {<NEW_LINE>STNode funcName = SyntaxErrors.addDiagnostic(expr, DiagnosticErrorCode.ERROR_INVALID_EXPRESSION_EXPECTED_CALL_EXPRESSION);<NEW_LINE>funcOrMethodCall = STNodeFactory.createFunctionCallExpressionNode(funcName, openParenToken, arguments, closeParenToken);<NEW_LINE>} else {<NEW_LINE>checkKeyword = SyntaxErrors.cloneWithTrailingInvalidNodeMinutiae(<MASK><NEW_LINE>STNode funcName = SyntaxErrors.createMissingToken(SyntaxKind.IDENTIFIER_TOKEN);<NEW_LINE>funcName = STNodeFactory.createSimpleNameReferenceNode(funcName);<NEW_LINE>funcOrMethodCall = STNodeFactory.createFunctionCallExpressionNode(funcName, openParenToken, arguments, closeParenToken);<NEW_LINE>}<NEW_LINE>return STNodeFactory.createCheckExpressionNode(SyntaxKind.CHECK_EXPRESSION, checkKeyword, funcOrMethodCall);<NEW_LINE>}
checkKeyword, expr, DiagnosticErrorCode.ERROR_INVALID_EXPRESSION_EXPECTED_CALL_EXPRESSION);
349,598
public ICapabilityProvider initCapabilities(ItemStack stack, CompoundTag nbt) {<NEW_LINE>if (!stack.isEmpty())<NEW_LINE>return new IEItemStackHandler(stack) {<NEW_LINE><NEW_LINE>final LazyOptional<EnergyHelper.ItemEnergyStorage> energyStorage = CapabilityUtils.constantOptional(new EnergyHelper.ItemEnergyStorage(stack));<NEW_LINE><NEW_LINE>final LazyOptional<ShaderWrapper_Item> shaders = CapabilityUtils.constantOptional(new ShaderWrapper_Item(new ResourceLocation(ImmersiveEngineering.MODID, "shield"), stack));<NEW_LINE><NEW_LINE>@Nonnull<NEW_LINE>@Override<NEW_LINE>public <T> LazyOptional<T> getCapability(@Nonnull Capability<T> capability, Direction facing) {<NEW_LINE>if (capability == CapabilityEnergy.ENERGY)<NEW_LINE>return energyStorage.cast();<NEW_LINE>if (capability == CapabilityShader.SHADER_CAPABILITY)<NEW_LINE>return shaders.cast();<NEW_LINE>return <MASK><NEW_LINE>}<NEW_LINE>};<NEW_LINE>return null;<NEW_LINE>}
super.getCapability(capability, facing);
1,335,987
public CurrencyAmount presentValue(ResolvedSwaption swaption, RatesProvider ratesProvider, SwaptionVolatilities swaptionVolatilities) {<NEW_LINE>validate(swaption, ratesProvider, swaptionVolatilities);<NEW_LINE>double expiry = swaptionVolatilities.relativeTime(swaption.getExpiry());<NEW_LINE>ResolvedSwap underlying = swaption.getUnderlying();<NEW_LINE>ResolvedSwapLeg fixedLeg = fixedLeg(underlying);<NEW_LINE>if (expiry < 0d) {<NEW_LINE>// Option has expired already<NEW_LINE>return CurrencyAmount.of(fixedLeg.getCurrency(), 0d);<NEW_LINE>}<NEW_LINE>double forward = forwardRate(swaption, ratesProvider);<NEW_LINE>double numeraire = calculateNumeraire(swaption, fixedLeg, forward, ratesProvider);<NEW_LINE>double strike = calculateStrike(fixedLeg);<NEW_LINE>double tenor = swaptionVolatilities.tenor(fixedLeg.getStartDate(), fixedLeg.getEndDate());<NEW_LINE>double volatility = swaptionVolatilities.volatility(expiry, tenor, strike, forward);<NEW_LINE>PutCall putCall = PutCall.ofPut(fixedLeg.<MASK><NEW_LINE>double price = numeraire * swaptionVolatilities.price(expiry, tenor, putCall, strike, forward, volatility);<NEW_LINE>return CurrencyAmount.of(fixedLeg.getCurrency(), price * swaption.getLongShort().sign());<NEW_LINE>}
getPayReceive().isReceive());
422,166
public static ModifyDesktopsPolicyGroupResponse unmarshall(ModifyDesktopsPolicyGroupResponse modifyDesktopsPolicyGroupResponse, UnmarshallerContext _ctx) {<NEW_LINE>modifyDesktopsPolicyGroupResponse.setRequestId(_ctx.stringValue("ModifyDesktopsPolicyGroupResponse.RequestId"));<NEW_LINE>List<ModifyResult> modifyResults = new ArrayList<ModifyResult>();<NEW_LINE>for (int i = 0; i < _ctx.lengthValue("ModifyDesktopsPolicyGroupResponse.ModifyResults.Length"); i++) {<NEW_LINE>ModifyResult modifyResult = new ModifyResult();<NEW_LINE>modifyResult.setCode(_ctx.stringValue("ModifyDesktopsPolicyGroupResponse.ModifyResults[" + i + "].Code"));<NEW_LINE>modifyResult.setMessage(_ctx.stringValue<MASK><NEW_LINE>modifyResult.setDesktopId(_ctx.stringValue("ModifyDesktopsPolicyGroupResponse.ModifyResults[" + i + "].DesktopId"));<NEW_LINE>modifyResults.add(modifyResult);<NEW_LINE>}<NEW_LINE>modifyDesktopsPolicyGroupResponse.setModifyResults(modifyResults);<NEW_LINE>return modifyDesktopsPolicyGroupResponse;<NEW_LINE>}
("ModifyDesktopsPolicyGroupResponse.ModifyResults[" + i + "].Message"));
618,541
public void handle(net.md_5.bungee.protocol.packet.Team team) throws Exception {<NEW_LINE>Scoreboard serverScoreboard = con.getServerSentScoreboard();<NEW_LINE>// Remove team and move on<NEW_LINE>if (team.getMode() == 1) {<NEW_LINE>serverScoreboard.removeTeam(team.getName());<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>// Create or get old team<NEW_LINE>Team t;<NEW_LINE>if (team.getMode() == 0) {<NEW_LINE>t = new Team(team.getName());<NEW_LINE>serverScoreboard.addTeam(t);<NEW_LINE>} else {<NEW_LINE>t = serverScoreboard.getTeam(team.getName());<NEW_LINE>}<NEW_LINE>if (t != null) {<NEW_LINE>if (team.getMode() == 0 || team.getMode() == 2) {<NEW_LINE>t.setDisplayName(team.getDisplayName());<NEW_LINE>t.setPrefix(team.getPrefix());<NEW_LINE>t.setSuffix(team.getSuffix());<NEW_LINE>t.setFriendlyFire(team.getFriendlyFire());<NEW_LINE>t.setNameTagVisibility(team.getNameTagVisibility());<NEW_LINE>t.setCollisionRule(team.getCollisionRule());<NEW_LINE>t.<MASK><NEW_LINE>}<NEW_LINE>if (team.getPlayers() != null) {<NEW_LINE>for (String s : team.getPlayers()) {<NEW_LINE>if (team.getMode() == 0 || team.getMode() == 3) {<NEW_LINE>t.addPlayer(s);<NEW_LINE>} else if (team.getMode() == 4) {<NEW_LINE>t.removePlayer(s);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
setColor(team.getColor());
615,707
public Payload apply(ByteBuf byteBuf) {<NEW_LINE>ByteBuf m;<NEW_LINE>ByteBuf d;<NEW_LINE>FrameType type = FrameHeaderCodec.frameType(byteBuf);<NEW_LINE>switch(type) {<NEW_LINE>case REQUEST_FNF:<NEW_LINE>d = RequestFireAndForgetFrameCodec.data(byteBuf);<NEW_LINE>m = RequestFireAndForgetFrameCodec.metadata(byteBuf);<NEW_LINE>break;<NEW_LINE>case REQUEST_RESPONSE:<NEW_LINE>d = RequestResponseFrameCodec.data(byteBuf);<NEW_LINE>m = RequestResponseFrameCodec.metadata(byteBuf);<NEW_LINE>break;<NEW_LINE>case REQUEST_STREAM:<NEW_LINE>d = RequestStreamFrameCodec.data(byteBuf);<NEW_LINE>m = RequestStreamFrameCodec.metadata(byteBuf);<NEW_LINE>break;<NEW_LINE>case REQUEST_CHANNEL:<NEW_LINE>d = RequestChannelFrameCodec.data(byteBuf);<NEW_LINE>m = RequestChannelFrameCodec.metadata(byteBuf);<NEW_LINE>break;<NEW_LINE>case NEXT:<NEW_LINE>case NEXT_COMPLETE:<NEW_LINE>d = PayloadFrameCodec.data(byteBuf);<NEW_LINE>m = PayloadFrameCodec.metadata(byteBuf);<NEW_LINE>break;<NEW_LINE>case METADATA_PUSH:<NEW_LINE>d = Unpooled.EMPTY_BUFFER;<NEW_LINE>m = MetadataPushFrameCodec.metadata(byteBuf);<NEW_LINE>break;<NEW_LINE>default:<NEW_LINE>throw new IllegalArgumentException("unsupported frame type: " + type);<NEW_LINE>}<NEW_LINE>ByteBuffer data = ByteBuffer.<MASK><NEW_LINE>data.put(d.nioBuffer());<NEW_LINE>data.flip();<NEW_LINE>if (m != null) {<NEW_LINE>ByteBuffer metadata = ByteBuffer.allocate(m.readableBytes());<NEW_LINE>metadata.put(m.nioBuffer());<NEW_LINE>metadata.flip();<NEW_LINE>return DefaultPayload.create(data, metadata);<NEW_LINE>}<NEW_LINE>return DefaultPayload.create(data);<NEW_LINE>}
allocate(d.readableBytes());
1,011,829
/*<NEW_LINE>* (non-Javadoc)<NEW_LINE>* @see org.eclipse.ui.dialogs.WizardNewProjectCreationPage#createControl(org.eclipse.swt.widgets.Composite)<NEW_LINE>*/<NEW_LINE>@Override<NEW_LINE>public void createControl(Composite parent) {<NEW_LINE>Composite pageComposite = new Composite(parent, SWT.NONE);<NEW_LINE>GridLayout pageLayout = GridLayoutFactory.fillDefaults().spacing(0, 5).create();<NEW_LINE>pageComposite.setLayout(pageLayout);<NEW_LINE>pageComposite.setLayoutData(GridDataFactory.fillDefaults().create());<NEW_LINE>stepIndicatorComposite = new StepIndicatorComposite(pageComposite, stepNames);<NEW_LINE>stepIndicatorComposite.setSelection(getStepName());<NEW_LINE>createTopArea(pageComposite);<NEW_LINE>super.createControl(pageComposite);<NEW_LINE>((Composite) getControl()).setLayout(GridLayoutFactory.fillDefaults().spacing(0<MASK><NEW_LINE>((Composite) getControl()).setLayoutData(GridDataFactory.swtDefaults().align(SWT.FILL, SWT.BEGINNING).create());<NEW_LINE>setControl(pageComposite);<NEW_LINE>createProjectTemplateSection(pageComposite);<NEW_LINE>createWarningArea();<NEW_LINE>}
, 0).create());
1,495,128
void checkRoleQuota(ObjectStoreConnection con, String domainName, Role role, String caller) {<NEW_LINE>// if quota check is disabled we have nothing to do<NEW_LINE>if (!quotaCheckEnabled) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>// if our role is null then there is no quota check<NEW_LINE>if (role == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>// first retrieve the domain quota<NEW_LINE>final Quota quota = getDomainQuota(con, domainName);<NEW_LINE>// first we're going to verify the elements that do not<NEW_LINE>// require any further data from the object store<NEW_LINE>int objectCount = <MASK><NEW_LINE>if (quota.getRoleMember() < objectCount) {<NEW_LINE>throw ZMSUtils.quotaLimitError("role member quota exceeded - limit: " + quota.getRoleMember() + " actual: " + objectCount, caller);<NEW_LINE>}<NEW_LINE>// now we're going to check if we'll be allowed<NEW_LINE>// to create this role in the domain<NEW_LINE>objectCount = con.countRoles(domainName) + 1;<NEW_LINE>if (quota.getRole() < objectCount) {<NEW_LINE>throw ZMSUtils.quotaLimitError("role quota exceeded - limit: " + quota.getRole() + " actual: " + objectCount, caller);<NEW_LINE>}<NEW_LINE>}
getListSize(role.getRoleMembers());
973,693
private void initNamespace(Properties properties) {<NEW_LINE>String namespaceTmp = null;<NEW_LINE>String isUseCloudNamespaceParsing = properties.getProperty(PropertyKeyConst.IS_USE_CLOUD_NAMESPACE_PARSING, System.getProperty(SystemPropertyKeyConst.IS_USE_CLOUD_NAMESPACE_PARSING, String.valueOf(Constants.DEFAULT_USE_CLOUD_NAMESPACE_PARSING)));<NEW_LINE>if (Boolean.valueOf(isUseCloudNamespaceParsing)) {<NEW_LINE>namespaceTmp = TemplateUtils.stringBlankAndThenExecute(namespaceTmp, new Callable<String>() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public String call() {<NEW_LINE>return TenantUtil.getUserTenantForAcm();<NEW_LINE>}<NEW_LINE>});<NEW_LINE>namespaceTmp = TemplateUtils.stringBlankAndThenExecute(namespaceTmp, new Callable<String>() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public String call() {<NEW_LINE>String namespace = System.getenv(PropertyKeyConst.SystemEnv.ALIBABA_ALIWARE_NAMESPACE);<NEW_LINE>return StringUtils.<MASK><NEW_LINE>}<NEW_LINE>});<NEW_LINE>}<NEW_LINE>if (StringUtils.isBlank(namespaceTmp)) {<NEW_LINE>namespaceTmp = properties.getProperty(PropertyKeyConst.NAMESPACE);<NEW_LINE>}<NEW_LINE>namespace = StringUtils.isNotBlank(namespaceTmp) ? namespaceTmp.trim() : EMPTY;<NEW_LINE>properties.put(PropertyKeyConst.NAMESPACE, namespace);<NEW_LINE>}
isNotBlank(namespace) ? namespace : EMPTY;
793,998
final DeleteTargetGroupResult executeDeleteTargetGroup(DeleteTargetGroupRequest deleteTargetGroupRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(deleteTargetGroupRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<DeleteTargetGroupRequest> request = null;<NEW_LINE>Response<DeleteTargetGroupResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new DeleteTargetGroupRequestMarshaller().marshall(super.beforeMarshalling(deleteTargetGroupRequest));<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, "Elastic Load Balancing v2");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteTargetGroup");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>StaxResponseHandler<DeleteTargetGroupResult> responseHandler = new StaxResponseHandler<<MASK><NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
DeleteTargetGroupResult>(new DeleteTargetGroupResultStaxUnmarshaller());
1,065,460
protected CompoundTag translateExplosionToBedrock(CompoundTag explosion, String newName) {<NEW_LINE>CompoundTag newExplosionData = new CompoundTag(newName);<NEW_LINE>if (explosion.get("Type") != null) {<NEW_LINE>newExplosionData.put(new ByteTag("FireworkType", MathUtils.getNbtByte(explosion.get("Type").getValue())));<NEW_LINE>}<NEW_LINE>if (explosion.get("Colors") != null) {<NEW_LINE>int[] oldColors = (int[]) explosion.<MASK><NEW_LINE>byte[] colors = new byte[oldColors.length];<NEW_LINE>int i = 0;<NEW_LINE>for (int color : oldColors) {<NEW_LINE>colors[i++] = FireworkColor.fromJavaRGB(color);<NEW_LINE>}<NEW_LINE>newExplosionData.put(new ByteArrayTag("FireworkColor", colors));<NEW_LINE>}<NEW_LINE>if (explosion.get("FadeColors") != null) {<NEW_LINE>int[] oldColors = (int[]) explosion.get("FadeColors").getValue();<NEW_LINE>byte[] colors = new byte[oldColors.length];<NEW_LINE>int i = 0;<NEW_LINE>for (int color : oldColors) {<NEW_LINE>colors[i++] = FireworkColor.fromJavaRGB(color);<NEW_LINE>}<NEW_LINE>newExplosionData.put(new ByteArrayTag("FireworkFade", colors));<NEW_LINE>}<NEW_LINE>if (explosion.get("Trail") != null) {<NEW_LINE>newExplosionData.put(new ByteTag("FireworkTrail", MathUtils.getNbtByte(explosion.get("Trail").getValue())));<NEW_LINE>}<NEW_LINE>if (explosion.get("Flicker") != null) {<NEW_LINE>newExplosionData.put(new ByteTag("FireworkFlicker", MathUtils.getNbtByte(explosion.get("Flicker").getValue())));<NEW_LINE>}<NEW_LINE>return newExplosionData;<NEW_LINE>}
get("Colors").getValue();
1,747,434
private synchronized void recordRpcFinished(RpcType rpcType, Status status) {<NEW_LINE>String method = getRpcTypeString(rpcType);<NEW_LINE>if (status.isOk()) {<NEW_LINE>int count = rpcsSucceededByMethod.containsKey(method) ? rpcsSucceededByMethod.get(method) : 0;<NEW_LINE>rpcsSucceededByMethod.<MASK><NEW_LINE>} else {<NEW_LINE>int count = rpcsFailedByMethod.containsKey(method) ? rpcsFailedByMethod.get(method) : 0;<NEW_LINE>rpcsFailedByMethod.put(method, count + 1);<NEW_LINE>}<NEW_LINE>int statusCode = status.getCode().value();<NEW_LINE>Map<Integer, Integer> statusCounts = rpcStatusByMethod.get(method);<NEW_LINE>if (statusCounts == null) {<NEW_LINE>statusCounts = new HashMap<>();<NEW_LINE>rpcStatusByMethod.put(method, statusCounts);<NEW_LINE>}<NEW_LINE>int count = statusCounts.containsKey(statusCode) ? statusCounts.get(statusCode) : 0;<NEW_LINE>statusCounts.put(statusCode, count + 1);<NEW_LINE>}
put(method, count + 1);
1,482,325
public void filterPoorlyModeledEvidence(final ToDoubleFunction<EVIDENCE> log10MinTrueLikelihood) {<NEW_LINE>Utils.validateArg(alleles.numberOfAlleles() > 0, "unsupported for read-likelihood collections with no alleles");<NEW_LINE>final int numberOfSamples = samples.numberOfSamples();<NEW_LINE>for (int s = 0; s < numberOfSamples; s++) {<NEW_LINE>final int sampleIndex = s;<NEW_LINE>final List<EVIDENCE> sampleEvidence = evidenceBySampleIndex.get(s);<NEW_LINE>final int numberOfEvidence = sampleEvidence.size();<NEW_LINE>final int[] indexesToRemove = IntStream.range(0, numberOfEvidence).filter(i -> maximumLikelihoodOverAllAlleles(sampleIndex, i) < log10MinTrueLikelihood.applyAsDouble(sampleEvidence.get(i))).toArray();<NEW_LINE>// Retain the filtered evidence for later genotyping purposes<NEW_LINE>final List<EVIDENCE> filtered = filteredEvidenceBySampleIndex.get(sampleIndex);<NEW_LINE>Arrays.stream(indexesToRemove).forEach(idx -> {<NEW_LINE>if (HaplotypeCallerGenotypingDebugger.isEnabled()) {<NEW_LINE>HaplotypeCallerGenotypingDebugger.println("disqualified read: " + idx + " " + ((GATKRead) sampleEvidence.get(idx)).getName() + " with max likelihood " + maximumLikelihoodOverAllAlleles(sampleIndex, idx) + " and threshold " + log10MinTrueLikelihood.applyAsDouble(sampleEvidence.get(idx)));<NEW_LINE>}<NEW_LINE>filtered.add<MASK><NEW_LINE>});<NEW_LINE>// Remove the evidence now<NEW_LINE>removeEvidenceByIndex(s, indexesToRemove);<NEW_LINE>}<NEW_LINE>}
(sampleEvidence.get(idx));
837,830
public boolean addMsg(String attr, ByteBuffer data) {<NEW_LINE>checkMode(true);<NEW_LINE>if ((version.intValue() == Version.v3.intValue()) && !checkData(data)) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>DataBuffer <MASK><NEW_LINE>if (outputBuffer == null) {<NEW_LINE>outputBuffer = new DataBuffer();<NEW_LINE>attr2MsgBuffer.put(attr, outputBuffer);<NEW_LINE>// attrlen + utflen + meglen + compress<NEW_LINE>this.datalen += attr.length() + 2 + 4 + 1;<NEW_LINE>}<NEW_LINE>int len = data.remaining();<NEW_LINE>try {<NEW_LINE>outputBuffer.write(data.array(), data.position(), len);<NEW_LINE>this.datalen += len + 4;<NEW_LINE>if (version.intValue() == Version.v2.intValue()) {<NEW_LINE>this.datalen += 4;<NEW_LINE>}<NEW_LINE>} catch (IOException e) {<NEW_LINE>e.printStackTrace();<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>msgcnt++;<NEW_LINE>return checkLen(attr, len);<NEW_LINE>}
outputBuffer = attr2MsgBuffer.get(attr);
1,466,512
public void refresh() {<NEW_LINE>// Refresh is called as hints when gRPC detects network failures.<NEW_LINE>// We don't want to repeatedly attempt discovery; following logic will limit discovery on failures to<NEW_LINE>// once every FAILURE_RETRY_TIMEOUT_MS seconds. Also we want to trigger discovery sooner on failures.<NEW_LINE>if (!shutdown && this.resolverUpdater != null) {<NEW_LINE>if (this.scheduledFuture != null && !this.scheduledFuture.isDone()) {<NEW_LINE>final long nextUpdateDuration = this.scheduledFuture.getDelay(TimeUnit.MILLISECONDS);<NEW_LINE>final long lastUpdateDuration = System.currentTimeMillis() - this.lastUpdateTimeMS;<NEW_LINE>if (nextUpdateDuration > 0 && (nextUpdateDuration + lastUpdateDuration) > FAILURE_RETRY_TIMEOUT_MS) {<NEW_LINE>// Cancel the existing schedule and advance the discovery process.<NEW_LINE>this.scheduledFuture.cancel(true);<NEW_LINE>// Ensure there is a delay of at least FAILURE_RETRY_TIMEOUT_MS between 2 discovery attempts.<NEW_LINE>long scheduleDelay = 0;<NEW_LINE>if (lastUpdateDuration < FAILURE_RETRY_TIMEOUT_MS) {<NEW_LINE>scheduleDelay = FAILURE_RETRY_TIMEOUT_MS - lastUpdateDuration;<NEW_LINE>}<NEW_LINE>this.scheduledFuture = this.scheduledExecutor.schedule(this::<MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
getControllers, scheduleDelay, TimeUnit.MILLISECONDS);
830,791
public PkiBlockCreationConfiguration load(final PkiKeyStoreConfiguration pkiKeyStoreConfiguration) {<NEW_LINE>KeyStoreWrapper keyStore;<NEW_LINE>try {<NEW_LINE>keyStore = keyStoreWrapperProvider.apply(pkiKeyStoreConfiguration.getKeyStoreType(), pkiKeyStoreConfiguration.getKeyStorePath(), <MASK><NEW_LINE>LOG.info("Loaded PKI Block Creation KeyStore {}", pkiKeyStoreConfiguration.getKeyStorePath());<NEW_LINE>} catch (Exception e) {<NEW_LINE>throw new IllegalStateException("Error loading PKI Block Creation KeyStore", e);<NEW_LINE>}<NEW_LINE>KeyStoreWrapper trustStore;<NEW_LINE>try {<NEW_LINE>trustStore = keyStoreWrapperProvider.apply(pkiKeyStoreConfiguration.getTrustStoreType(), pkiKeyStoreConfiguration.getTrustStorePath(), pkiKeyStoreConfiguration.getTrustStorePassword(), pkiKeyStoreConfiguration.getCrlFilePath().orElse(null));<NEW_LINE>LOG.info("Loaded PKI Block Creation TrustStore {}", pkiKeyStoreConfiguration.getTrustStorePath());<NEW_LINE>} catch (Exception e) {<NEW_LINE>throw new IllegalStateException("Error loading PKI Block Creation TrustStore", e);<NEW_LINE>}<NEW_LINE>return new PkiBlockCreationConfiguration(keyStore, trustStore, pkiKeyStoreConfiguration.getCertificateAlias());<NEW_LINE>}
pkiKeyStoreConfiguration.getKeyStorePassword(), null);
1,064,806
public AutogenConfigDiff generate(SourceOfRandomness r, GenerationStatus status) {<NEW_LINE>// if (r.nextBoolean())<NEW_LINE>// return null;<NEW_LINE>AutogenConfigDiff obj = new AutogenConfigDiff();<NEW_LINE>if (r.nextBoolean()) {<NEW_LINE>int size = r.nextInt(0, 10);<NEW_LINE>List<AutogenHyperparameterSetConfigDiff> ret = new ArrayList(size);<NEW_LINE>for (int i = 0; i < size; i++) {<NEW_LINE>ret.add(gen().type(AutogenHyperparameterSetConfigDiff.class).generate(r, status));<NEW_LINE>}<NEW_LINE>obj.setHyperparameterSet(Utils.removeEmpty(ret));<NEW_LINE>}<NEW_LINE>if (r.nextBoolean()) {<NEW_LINE>int size = r.nextInt(0, 10);<NEW_LINE>List<AutogenHyperparameterConfigDiff> ret = new ArrayList(size);<NEW_LINE>for (int i = 0; i < size; i++) {<NEW_LINE>ret.add(gen().type(AutogenHyperparameterConfigDiff.class)<MASK><NEW_LINE>}<NEW_LINE>obj.setHyperparameters(Utils.removeEmpty(ret));<NEW_LINE>}<NEW_LINE>return obj;<NEW_LINE>}
.generate(r, status));
786,055
private Map<String, Object> toMap(JobDetail detail, List<? extends Trigger> triggers, ZoneId zoneId) throws SchedulerException {<NEW_LINE>Map<String, Object> json = new LinkedHashMap<>();<NEW_LINE>json.put("key", detail.getKey().toString());<NEW_LINE>Optional.ofNullable(detail.getDescription()).ifPresent(value -> json<MASK><NEW_LINE>json.put("stoppable", InterruptableJob.class.isAssignableFrom(detail.getJobClass()));<NEW_LINE>json.put("concurrentExecutionDisallowed", detail.isConcurrentExectionDisallowed());<NEW_LINE>json.put("durable", detail.isDurable());<NEW_LINE>json.put("persistJobDataAfterExecution", detail.isPersistJobDataAfterExecution());<NEW_LINE>json.put("requestsRecovery", detail.requestsRecovery());<NEW_LINE>json.put("triggers", toJson(triggers, zoneId));<NEW_LINE>json.put("jobDataMap", detail.getJobDataMap());<NEW_LINE>return json;<NEW_LINE>}
.put("description", value));
952,198
public Trigger parseTrigger(String jobName, XContentParser parser) throws IOException {<NEW_LINE>XContentParser.<MASK><NEW_LINE>assert token == XContentParser.Token.START_OBJECT;<NEW_LINE>token = parser.nextToken();<NEW_LINE>if (token != XContentParser.Token.FIELD_NAME) {<NEW_LINE>throw new ElasticsearchParseException("could not parse trigger for [{}]. expected trigger type string field, but found [{}]", jobName, token);<NEW_LINE>}<NEW_LINE>String type = parser.currentName();<NEW_LINE>token = parser.nextToken();<NEW_LINE>if (token != XContentParser.Token.START_OBJECT) {<NEW_LINE>throw new ElasticsearchParseException("could not parse trigger [{}] for [{}]. expected trigger an object as the trigger body," + " but found [{}]", type, jobName, token);<NEW_LINE>}<NEW_LINE>Trigger trigger = parseTrigger(jobName, type, parser);<NEW_LINE>token = parser.nextToken();<NEW_LINE>if (token != XContentParser.Token.END_OBJECT) {<NEW_LINE>throw new ElasticsearchParseException("could not parse trigger [{}] for [{}]. expected [END_OBJECT] token, but found [{}]", type, jobName, token);<NEW_LINE>}<NEW_LINE>return trigger;<NEW_LINE>}
Token token = parser.currentToken();
458,826
public void run() {<NEW_LINE>final IdleStrategy idleStrategy = SampleConfiguration.newIdleStrategy();<NEW_LINE>final AtomicBoolean running = this.running;<NEW_LINE>final Publication publication = this.publication;<NEW_LINE>final BufferClaim bufferClaim = new BufferClaim();<NEW_LINE>long backPressureCount = 0;<NEW_LINE>long totalMessageCount = 0;<NEW_LINE>outputResults: while (running.get()) {<NEW_LINE>for (int i = 0; i < BURST_LENGTH; i++) {<NEW_LINE>idleStrategy.reset();<NEW_LINE>while (publication.tryClaim(MESSAGE_LENGTH, bufferClaim) <= 0) {<NEW_LINE>++backPressureCount;<NEW_LINE>if (!running.get()) {<NEW_LINE>break outputResults;<NEW_LINE>}<NEW_LINE>idleStrategy.idle();<NEW_LINE>}<NEW_LINE>final int offset = bufferClaim.offset();<NEW_LINE>// Example field write<NEW_LINE>bufferClaim.buffer().putInt(offset, i);<NEW_LINE>// Real app would write whatever fields are required via a flyweight like SBE<NEW_LINE>bufferClaim.commit();<NEW_LINE>++totalMessageCount;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>final double <MASK><NEW_LINE>System.out.format("Publisher back pressure ratio: %f%n", backPressureRatio);<NEW_LINE>}
backPressureRatio = backPressureCount / (double) totalMessageCount;
837,798
public PushBuilder newPushBuilder() {<NEW_LINE>String methodName = "newPushBuilder";<NEW_LINE>if (TraceComponent.isAnyTracingEnabled() && logger.isLoggable(Level.FINE)) {<NEW_LINE>// 306998.15<NEW_LINE>logger.entering(CLASS_NAME, methodName, "this -> " + this);<NEW_LINE>}<NEW_LINE>IRequest40 iRequest = (IRequest40) getIRequest();<NEW_LINE>if (!((Http2Request) iRequest.getHttpRequest()).isPushSupported()) {<NEW_LINE>if (TraceComponent.isAnyTracingEnabled() && logger.isLoggable(Level.FINE)) {<NEW_LINE>// 306998.15<NEW_LINE>logger.logp(Level.<MASK><NEW_LINE>}<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>String sessionID = null;<NEW_LINE>if (_sessionCreated)<NEW_LINE>sessionID = getSession(false).getId();<NEW_LINE>else<NEW_LINE>sessionID = getRequestedSessionId();<NEW_LINE>if (TraceComponent.isAnyTracingEnabled() && logger.isLoggable(Level.FINE)) {<NEW_LINE>// 306998.15<NEW_LINE>logger.logp(Level.FINE, CLASS_NAME, methodName, "sessionId = " + sessionID);<NEW_LINE>}<NEW_LINE>SRTServletResponse40 response = (SRTServletResponse40) this._connContext.getResponse();<NEW_LINE>PushBuilder pb = new HttpPushBuilder(this, sessionID, getPushBuilderHeaders(), response.getAddedCookies());<NEW_LINE>if (TraceComponent.isAnyTracingEnabled() && logger.isLoggable(Level.FINE)) {<NEW_LINE>// 306998.15<NEW_LINE>logger.exiting(CLASS_NAME, methodName);<NEW_LINE>}<NEW_LINE>return pb;<NEW_LINE>}
FINE, CLASS_NAME, methodName, "push not supported");
545,049
private static void solve(String solverType) {<NEW_LINE>System.out.println("---- CoinsGridMIP with " + solverType);<NEW_LINE>MPSolver solver = MPSolver.createSolver(solverType);<NEW_LINE>if (solver == null)<NEW_LINE>return;<NEW_LINE>int n = 31;<NEW_LINE>int c = 14;<NEW_LINE>MPVariable[][] x = new MPVariable[n][n];<NEW_LINE>for (int i = 0; i < n; i++) {<NEW_LINE>x[i] = solver.makeBoolVarArray(n);<NEW_LINE>}<NEW_LINE>MPConstraint[] constraints = new MPConstraint[2 * n];<NEW_LINE>MPObjective obj = solver.objective();<NEW_LINE>for (int i = 0; i < n; i++) {<NEW_LINE>constraints[2 * i] = solver.makeConstraint(c, c);<NEW_LINE>constraints[2 * i + 1] = solver.makeConstraint(c, c);<NEW_LINE>for (int j = 0; j < n; j++) {<NEW_LINE>constraints[2 * i].setCoefficient(x[i][j], 1);<NEW_LINE>constraints[2 * i + 1].setCoefficient(x[j][i], 1);<NEW_LINE>obj.setCoefficient(x[i][j], (i - j) * (j - i));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>solver.solve();<NEW_LINE>System.out.println("Problem solved in " + solver.wallTime() + "ms");<NEW_LINE>for (int i = 0; i < n; i++) {<NEW_LINE>for (int j = 0; j < n; j++) {<NEW_LINE>System.out.print((int) x[i][j<MASK><NEW_LINE>}<NEW_LINE>System.out.println();<NEW_LINE>}<NEW_LINE>}
].solutionValue() + " ");
1,562,647
public void writeTo(DexFile file, AnnotatedOutput out) {<NEW_LINE>boolean annotates = out.annotates();<NEW_LINE>TypeIdsSection typeIds = file.getTypeIds();<NEW_LINE>int classIdx = typeIds.indexOf(thisClass);<NEW_LINE>int superIdx = (superclass == null) ? -1 : typeIds.indexOf(superclass);<NEW_LINE>int interOff = OffsettedItem.getAbsoluteOffsetOr0(interfaces);<NEW_LINE>int annoOff = annotationsDirectory.isEmpty() ? 0 : annotationsDirectory.getAbsoluteOffset();<NEW_LINE>int sourceFileIdx = (sourceFile == null) ? -1 : file.getStringIds().indexOf(sourceFile);<NEW_LINE>int dataOff = classData.isEmpty() ? 0 : classData.getAbsoluteOffset();<NEW_LINE>int staticValuesOff = OffsettedItem.getAbsoluteOffsetOr0(staticValuesItem);<NEW_LINE>if (annotates) {<NEW_LINE>out.annotate(0, indexString() + ' ' + thisClass.toHuman());<NEW_LINE>out.annotate(4, " class_idx: " + Hex.u4(classIdx));<NEW_LINE>out.annotate(4, " access_flags: " + AccessFlags.classString(accessFlags));<NEW_LINE>out.annotate(4, " superclass_idx: " + Hex.u4(superIdx) + " // " + ((superclass == null) ? "<none>" : superclass.toHuman()));<NEW_LINE>out.annotate(4, " interfaces_off: " + Hex.u4(interOff));<NEW_LINE>if (interOff != 0) {<NEW_LINE>TypeList list = interfaces.getList();<NEW_LINE>int sz = list.size();<NEW_LINE>for (int i = 0; i < sz; i++) {<NEW_LINE>out.annotate(0, " " + list.getType(i).toHuman());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>out.annotate(4, " source_file_idx: " + Hex.u4(sourceFileIdx) + " // " + ((sourceFile == null) ? "<none>" : sourceFile.toHuman()));<NEW_LINE>out.annotate(4, " annotations_off: " + Hex.u4(annoOff));<NEW_LINE>out.annotate(4, " class_data_off: " + Hex.u4(dataOff));<NEW_LINE>out.annotate(4, " static_values_off: " <MASK><NEW_LINE>}<NEW_LINE>out.writeInt(classIdx);<NEW_LINE>out.writeInt(accessFlags);<NEW_LINE>out.writeInt(superIdx);<NEW_LINE>out.writeInt(interOff);<NEW_LINE>out.writeInt(sourceFileIdx);<NEW_LINE>out.writeInt(annoOff);<NEW_LINE>out.writeInt(dataOff);<NEW_LINE>out.writeInt(staticValuesOff);<NEW_LINE>}
+ Hex.u4(staticValuesOff));
1,824,381
static void pollCheckAppContextLocal(final Locale destLocale, final int index, final Utils.Consumer<Boolean> consumer) {<NEW_LINE>Resources appResources = Utils.getApp().getResources();<NEW_LINE>Configuration appConfig = appResources.getConfiguration();<NEW_LINE>Locale appLocal = getLocal(appConfig);<NEW_LINE>setLocal(appConfig, destLocale);<NEW_LINE>Utils.getApp().getResources().updateConfiguration(appConfig, appResources.getDisplayMetrics());<NEW_LINE>if (consumer == null)<NEW_LINE>return;<NEW_LINE>if (isSameLocale(appLocal, destLocale)) {<NEW_LINE>consumer.accept(true);<NEW_LINE>} else {<NEW_LINE>if (index < 20) {<NEW_LINE>UtilsBridge.runOnUiThreadDelayed(new Runnable() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void run() {<NEW_LINE>pollCheckAppContextLocal(<MASK><NEW_LINE>}<NEW_LINE>}, 16);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>Log.e("LanguageUtils", "appLocal didn't update.");<NEW_LINE>consumer.accept(false);<NEW_LINE>}<NEW_LINE>}
destLocale, index + 1, consumer);
346,841
public void emitComment(String commentID, String possibleComment, int linkType) {<NEW_LINE>if (noCommentsOnRemovals && linkType == 0) {<NEW_LINE>reportFile.println(" <TD>&nbsp;</TD>");<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (noCommentsOnAdditions && linkType == 1) {<NEW_LINE>reportFile.println(" <TD>&nbsp;</TD>");<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (noCommentsOnChanges && linkType == 2) {<NEW_LINE>reportFile.println(" <TD>&nbsp;</TD>");<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>// We have to use this global hash table because the *Diff classes<NEW_LINE>// do not store the possible comment from the new *API object.<NEW_LINE>if (!noCommentsOnChanges && possibleComment == null) {<NEW_LINE>possibleComment = (String) Comments.allPossibleComments.get(commentID);<NEW_LINE>}<NEW_LINE>// Just use the first sentence of the possible comment.<NEW_LINE>if (possibleComment != null) {<NEW_LINE>int fsidx = <MASK><NEW_LINE>if (fsidx != -1 && fsidx != 0)<NEW_LINE>possibleComment = possibleComment.substring(0, fsidx + 1);<NEW_LINE>}<NEW_LINE>// String comment = Comments.getComment(existingComments_, commentID);<NEW_LINE>// if (comment.compareTo(Comments.placeHolderText) == 0) {<NEW_LINE>// if (possibleComment != null &&<NEW_LINE>// possibleComment.indexOf("InsertOtherCommentsHere") == -1)<NEW_LINE>// reportFile.println(" <TD VALIGN=\"TOP\">" + possibleComment + "</TD>");<NEW_LINE>// else<NEW_LINE>// reportFile.println(" <TD>&nbsp;</TD>");<NEW_LINE>// } else {<NEW_LINE>// int idx = comment.indexOf("@first");<NEW_LINE>// if (idx == -1) {<NEW_LINE>// reportFile.println(" <TD VALIGN=\"TOP\">" + Comments.convertAtLinks(comment, "", null, null) + "</TD>");<NEW_LINE>// } else {<NEW_LINE>// reportFile.print(" <TD VALIGN=\"TOP\">" + comment.substring(0, idx));<NEW_LINE>// if (possibleComment != null &&<NEW_LINE>// possibleComment.indexOf("InsertOtherCommentsHere") == -1)<NEW_LINE>// reportFile.print(possibleComment);<NEW_LINE>// reportFile.println(comment.substring(idx + 6) + "</TD>");<NEW_LINE>// }<NEW_LINE>// }<NEW_LINE>// SingleComment newComment = new SingleComment(commentID, comment);<NEW_LINE>// newComments_.addComment(newComment);<NEW_LINE>}
RootDocToXML.endOfFirstSentence(possibleComment, false);
417,496
public DimensionKeyDetail unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>DimensionKeyDetail dimensionKeyDetail = new DimensionKeyDetail();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE><MASK><NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>JsonToken token = context.getCurrentToken();<NEW_LINE>if (token == null)<NEW_LINE>token = context.nextToken();<NEW_LINE>if (token == VALUE_NULL) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>while (true) {<NEW_LINE>if (token == null)<NEW_LINE>break;<NEW_LINE>if (token == FIELD_NAME || token == START_OBJECT) {<NEW_LINE>if (context.testExpression("Value", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>dimensionKeyDetail.setValue(context.getUnmarshaller(String.class).unmarshall(context));<NEW_LINE>}<NEW_LINE>if (context.testExpression("Dimension", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>dimensionKeyDetail.setDimension(context.getUnmarshaller(String.class).unmarshall(context));<NEW_LINE>}<NEW_LINE>if (context.testExpression("Status", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>dimensionKeyDetail.setStatus(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 dimensionKeyDetail;<NEW_LINE>}
String currentParentElement = context.getCurrentParentElement();
633,598
private void saveFile(File file) {<NEW_LINE>try {<NEW_LINE>BufferedWriter writer = new BufferedWriter(new FileWriter(file));<NEW_LINE>try {<NEW_LINE>writer.write("global DR_GROUP_ID\n");<NEW_LINE>writer.write("global drg\n");<NEW_LINE>writer.write("try:\n");<NEW_LINE>writer.write(" if DR_GROUP_ID >= 0:\n");<NEW_LINE>writer.write(" DR_GROUP_ID += 1\n");<NEW_LINE>writer.write("except NameError:\n");<NEW_LINE>writer.write(" DR_GROUP_ID = 0\n" + " drg = []\n\n");<NEW_LINE>writer.write("drg.append(trick." + format + "(\"" + nameField.getText().trim() + "\"))\n");<NEW_LINE>writer.<MASK><NEW_LINE>writer.write("drg[DR_GROUP_ID].set_cycle(" + cycleField.getText() + ")\n");<NEW_LINE>writer.write("drg[DR_GROUP_ID].set_single_prec_only(" + single_prec_only + ")\n");<NEW_LINE>for (String variable : variables) {<NEW_LINE>writer.write("drg[DR_GROUP_ID].add_variable(\"" + variable + "\")\n");<NEW_LINE>}<NEW_LINE>writer.write("drg[DR_GROUP_ID].set_max_file_size(" + maxFileSizeField.getText().trim() + getMultiplier((String) sizeUnitsBox.getSelectedItem()));<NEW_LINE>writer.write("trick.add_data_record_group(drg[DR_GROUP_ID], trick." + buffering + ")\n");<NEW_LINE>writer.write("drg[DR_GROUP_ID].enable()\n");<NEW_LINE>} finally {<NEW_LINE>writer.close();<NEW_LINE>}<NEW_LINE>} catch (Exception e) {<NEW_LINE>JOptionPane.showMessageDialog(getMainFrame(), e.toString(), "Error Saving File", JOptionPane.ERROR_MESSAGE);<NEW_LINE>}<NEW_LINE>}
write("drg[DR_GROUP_ID].set_freq(trick." + frequency + ")\n");
999,062
final DeleteUserResult executeDeleteUser(DeleteUserRequest deleteUserRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(deleteUserRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<DeleteUserRequest> request = null;<NEW_LINE>Response<DeleteUserResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new DeleteUserRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(deleteUserRequest));<NEW_LINE>// Binds the request metrics to the current request.<NEW_LINE>request.setAWSRequestMetrics(awsRequestMetrics);<NEW_LINE>request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);<NEW_LINE>request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());<NEW_LINE>request.addHandlerContext(<MASK><NEW_LINE>request.addHandlerContext(HandlerContextKey.SERVICE_ID, "AppStream");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteUser");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<DeleteUserResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeleteUserResultJsonUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
HandlerContextKey.SIGNING_REGION, getSigningRegion());
878,699
public void handleSetStoreInfoRequest(final SetStoreInfoRequest request, final RequestProcessClosure<BaseRequest, BaseResponse> closure) {<NEW_LINE>final long clusterId = request.getClusterId();<NEW_LINE>final SetStoreInfoResponse response = new SetStoreInfoResponse();<NEW_LINE>response.setClusterId(clusterId);<NEW_LINE><MASK><NEW_LINE>if (!this.isLeader) {<NEW_LINE>response.setError(Errors.NOT_LEADER);<NEW_LINE>closure.sendResponse(response);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>final CompletableFuture<Store> future = this.metadataStore.updateStoreInfo(clusterId, request.getStore());<NEW_LINE>future.whenComplete((prevStore, throwable) -> {<NEW_LINE>if (throwable == null) {<NEW_LINE>response.setValue(prevStore);<NEW_LINE>} else {<NEW_LINE>LOG.error("Failed to handle: {}, {}.", request, StackTraceUtil.stackTrace(throwable));<NEW_LINE>response.setError(Errors.forException(throwable));<NEW_LINE>}<NEW_LINE>closure.sendResponse(response);<NEW_LINE>});<NEW_LINE>} catch (final Throwable t) {<NEW_LINE>LOG.error("Failed to handle: {}, {}.", request, StackTraceUtil.stackTrace(t));<NEW_LINE>response.setError(Errors.forException(t));<NEW_LINE>closure.sendResponse(response);<NEW_LINE>}<NEW_LINE>}
LOG.info("Handling {}.", request);
322,063
public GetRelationalDatabaseBundlesResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>GetRelationalDatabaseBundlesResult getRelationalDatabaseBundlesResult = new GetRelationalDatabaseBundlesResult();<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 getRelationalDatabaseBundlesResult;<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("bundles", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>getRelationalDatabaseBundlesResult.setBundles(new ListUnmarshaller<RelationalDatabaseBundle>(RelationalDatabaseBundleJsonUnmarshaller.getInstance(<MASK><NEW_LINE>}<NEW_LINE>if (context.testExpression("nextPageToken", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>getRelationalDatabaseBundlesResult.setNextPageToken(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 getRelationalDatabaseBundlesResult;<NEW_LINE>}
)).unmarshall(context));
938,097
private boolean reuseCachedHandle(boolean hasNewTypeDefinitions, boolean discardCurrentCacheItem) {<NEW_LINE>// No re-use of caching for cursorable statements (statements that WILL use sp_cursor*)<NEW_LINE>if (isCursorable(executeMethod))<NEW_LINE>return false;<NEW_LINE>// If current cache items needs to be discarded or New type definitions found with existing cached handle<NEW_LINE>// reference then deregister cached<NEW_LINE>// handle.<NEW_LINE>if (discardCurrentCacheItem || hasNewTypeDefinitions) {<NEW_LINE>if (null != cachedPreparedStatementHandle && (discardCurrentCacheItem || (hasPreparedStatementHandle() && prepStmtHandle == cachedPreparedStatementHandle.getHandle()))) {<NEW_LINE>cachedPreparedStatementHandle.removeReference();<NEW_LINE>}<NEW_LINE>// Make sure the cached handle does not get re-used more if it should be discarded<NEW_LINE>resetPrepStmtHandle(discardCurrentCacheItem);<NEW_LINE>cachedPreparedStatementHandle = null;<NEW_LINE>if (discardCurrentCacheItem)<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>// Check for new cache reference.<NEW_LINE>if (null == cachedPreparedStatementHandle) {<NEW_LINE>PreparedStatementHandle cachedHandle = connection.getCachedPreparedStatementHandle(new CityHash128Key(preparedSQL, preparedTypeDefinitions));<NEW_LINE>// If handle was found then re-use, only if AE is not on and is not a batch query with new type definitions<NEW_LINE>// (We shouldn't reuse handle<NEW_LINE>// if it is batch query and has new type definition, or if it is on, make sure encryptionMetadataIsRetrieved<NEW_LINE>// is retrieved.<NEW_LINE>if (null != cachedHandle) {<NEW_LINE>if (!connection.isColumnEncryptionSettingEnabled() || (connection.isColumnEncryptionSettingEnabled() && encryptionMetadataIsRetrieved)) {<NEW_LINE>if (cachedHandle.tryAddReference()) {<NEW_LINE><MASK><NEW_LINE>cachedPreparedStatementHandle = cachedHandle;<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return false;<NEW_LINE>}
setPreparedStatementHandle(cachedHandle.getHandle());
1,044,312
public DescribeMitigationActionResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>DescribeMitigationActionResult describeMitigationActionResult = new DescribeMitigationActionResult();<NEW_LINE>AwsJsonReader reader = context.getReader();<NEW_LINE>reader.beginObject();<NEW_LINE>while (reader.hasNext()) {<NEW_LINE>String name = reader.nextName();<NEW_LINE>if (name.equals("actionName")) {<NEW_LINE>describeMitigationActionResult.setActionName(StringJsonUnmarshaller.getInstance<MASK><NEW_LINE>} else if (name.equals("actionType")) {<NEW_LINE>describeMitigationActionResult.setActionType(StringJsonUnmarshaller.getInstance().unmarshall(context));<NEW_LINE>} else if (name.equals("actionArn")) {<NEW_LINE>describeMitigationActionResult.setActionArn(StringJsonUnmarshaller.getInstance().unmarshall(context));<NEW_LINE>} else if (name.equals("actionId")) {<NEW_LINE>describeMitigationActionResult.setActionId(StringJsonUnmarshaller.getInstance().unmarshall(context));<NEW_LINE>} else if (name.equals("roleArn")) {<NEW_LINE>describeMitigationActionResult.setRoleArn(StringJsonUnmarshaller.getInstance().unmarshall(context));<NEW_LINE>} else if (name.equals("actionParams")) {<NEW_LINE>describeMitigationActionResult.setActionParams(MitigationActionParamsJsonUnmarshaller.getInstance().unmarshall(context));<NEW_LINE>} else if (name.equals("creationDate")) {<NEW_LINE>describeMitigationActionResult.setCreationDate(DateJsonUnmarshaller.getInstance().unmarshall(context));<NEW_LINE>} else if (name.equals("lastModifiedDate")) {<NEW_LINE>describeMitigationActionResult.setLastModifiedDate(DateJsonUnmarshaller.getInstance().unmarshall(context));<NEW_LINE>} else {<NEW_LINE>reader.skipValue();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>reader.endObject();<NEW_LINE>return describeMitigationActionResult;<NEW_LINE>}
().unmarshall(context));
658,418
public void grant(Cube cube, Access access) {<NEW_LINE>Util.assertPrecondition(cube != null, "cube != null");<NEW_LINE>assert access == Access.ALL || access == Access.NONE || access == Access.CUSTOM;<NEW_LINE>Util.assertPrecondition(isMutable(), "isMutable()");<NEW_LINE>LOGGER.trace("Grant " + access + " on cube " + cube.getName());<NEW_LINE>cubeGrants.put(cube, access);<NEW_LINE>// Set the schema's access to 'custom' if no rules already exist.<NEW_LINE>final Access schemaAccess = getAccess(cube.getSchema());<NEW_LINE>if (schemaAccess == Access.NONE) {<NEW_LINE>LOGGER.trace("Cascading grant " + Access.CUSTOM + " on schema " + cube.getSchema().getName());<NEW_LINE>grant(cube.getSchema(), Access.CUSTOM);<NEW_LINE>}<NEW_LINE>hashCache.add(new Object[] { cube.getClass().getName(), cube.getName()<MASK><NEW_LINE>hash = 0;<NEW_LINE>}
, access.name() });
72,198
public void write(LogoutRequestType logOutRequest) throws ProcessingException {<NEW_LINE>StaxUtil.writeStartElement(writer, PROTOCOL_PREFIX, JBossSAMLConstants.LOGOUT_REQUEST.get(), PROTOCOL_NSURI.get());<NEW_LINE>StaxUtil.writeNameSpace(writer, PROTOCOL_PREFIX, PROTOCOL_NSURI.get());<NEW_LINE>StaxUtil.writeNameSpace(writer, ASSERTION_PREFIX, ASSERTION_NSURI.get());<NEW_LINE>StaxUtil.writeDefaultNameSpace(writer, ASSERTION_NSURI.get());<NEW_LINE>// Attributes<NEW_LINE>StaxUtil.writeAttribute(writer, JBossSAMLConstants.ID.get(), logOutRequest.getID());<NEW_LINE>StaxUtil.writeAttribute(writer, JBossSAMLConstants.VERSION.get(), logOutRequest.getVersion());<NEW_LINE>StaxUtil.writeAttribute(writer, JBossSAMLConstants.ISSUE_INSTANT.get(), logOutRequest.getIssueInstant().toString());<NEW_LINE>URI destination = logOutRequest.getDestination();<NEW_LINE>if (destination != null) {<NEW_LINE>StaxUtil.writeAttribute(writer, JBossSAMLConstants.DESTINATION.get(<MASK><NEW_LINE>}<NEW_LINE>String consent = logOutRequest.getConsent();<NEW_LINE>if (StringUtil.isNotNull(consent))<NEW_LINE>StaxUtil.writeAttribute(writer, JBossSAMLConstants.CONSENT.get(), consent);<NEW_LINE>NameIDType issuer = logOutRequest.getIssuer();<NEW_LINE>write(issuer, new QName(ASSERTION_NSURI.get(), JBossSAMLConstants.ISSUER.get(), ASSERTION_PREFIX));<NEW_LINE>Element signature = logOutRequest.getSignature();<NEW_LINE>if (signature != null) {<NEW_LINE>StaxUtil.writeDOMElement(writer, signature);<NEW_LINE>}<NEW_LINE>ExtensionsType extensions = logOutRequest.getExtensions();<NEW_LINE>if (extensions != null && !extensions.getAny().isEmpty()) {<NEW_LINE>write(extensions);<NEW_LINE>}<NEW_LINE>NameIDType nameID = logOutRequest.getNameID();<NEW_LINE>if (nameID != null) {<NEW_LINE>write(nameID, new QName(ASSERTION_NSURI.get(), JBossSAMLConstants.NAMEID.get(), ASSERTION_PREFIX));<NEW_LINE>}<NEW_LINE>List<String> sessionIndexes = logOutRequest.getSessionIndex();<NEW_LINE>for (String sessionIndex : sessionIndexes) {<NEW_LINE>StaxUtil.writeStartElement(writer, PROTOCOL_PREFIX, JBossSAMLConstants.SESSION_INDEX.get(), PROTOCOL_NSURI.get());<NEW_LINE>StaxUtil.writeCharacters(writer, sessionIndex);<NEW_LINE>StaxUtil.writeEndElement(writer);<NEW_LINE>StaxUtil.flush(writer);<NEW_LINE>}<NEW_LINE>StaxUtil.writeEndElement(writer);<NEW_LINE>StaxUtil.flush(writer);<NEW_LINE>}
), destination.toASCIIString());
928,102
public Request<ListJobExecutionsForThingRequest> marshall(ListJobExecutionsForThingRequest listJobExecutionsForThingRequest) {<NEW_LINE>if (listJobExecutionsForThingRequest == null) {<NEW_LINE>throw new AmazonClientException("Invalid argument passed to marshall(ListJobExecutionsForThingRequest)");<NEW_LINE>}<NEW_LINE>Request<ListJobExecutionsForThingRequest> request = new DefaultRequest<ListJobExecutionsForThingRequest>(listJobExecutionsForThingRequest, "AWSIot");<NEW_LINE>request.setHttpMethod(HttpMethodName.GET);<NEW_LINE>String uriResourcePath = "/things/{thingName}/jobs";<NEW_LINE>uriResourcePath = uriResourcePath.replace("{thingName}", (listJobExecutionsForThingRequest.getThingName() == null) ? "" : StringUtils.fromString(listJobExecutionsForThingRequest.getThingName()));<NEW_LINE>if (listJobExecutionsForThingRequest.getStatus() != null) {<NEW_LINE>request.addParameter("status", StringUtils.fromString(listJobExecutionsForThingRequest.getStatus()));<NEW_LINE>}<NEW_LINE>if (listJobExecutionsForThingRequest.getNamespaceId() != null) {<NEW_LINE>request.addParameter("namespaceId", StringUtils.fromString(listJobExecutionsForThingRequest.getNamespaceId()));<NEW_LINE>}<NEW_LINE>if (listJobExecutionsForThingRequest.getMaxResults() != null) {<NEW_LINE>request.addParameter("maxResults", StringUtils.fromInteger(listJobExecutionsForThingRequest.getMaxResults()));<NEW_LINE>}<NEW_LINE>if (listJobExecutionsForThingRequest.getNextToken() != null) {<NEW_LINE>request.addParameter("nextToken", StringUtils.fromString(listJobExecutionsForThingRequest.getNextToken()));<NEW_LINE>}<NEW_LINE>if (listJobExecutionsForThingRequest.getJobId() != null) {<NEW_LINE>request.addParameter("jobId", StringUtils.fromString(listJobExecutionsForThingRequest.getJobId()));<NEW_LINE>}<NEW_LINE>request.setResourcePath(uriResourcePath);<NEW_LINE>if (!request.getHeaders().containsKey("Content-Type")) {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>return request;<NEW_LINE>}
request.addHeader("Content-Type", "application/x-amz-json-1.0");
1,603,085
public static double[] normalize(double[] x, int samplingRate, double windowSizeInSeconds, double skipSizeInSeconds, int windowType, double targetEnergy) {<NEW_LINE>double[] y = new double[x.length];<NEW_LINE>double[] w = new double[x.length];<NEW_LINE>Arrays.fill(y, 0.0);<NEW_LINE><MASK><NEW_LINE>int ws = (int) Math.floor(windowSizeInSeconds * samplingRate + 0.5);<NEW_LINE>if (ws % 2 != 0)<NEW_LINE>ws++;<NEW_LINE>int half_ws = (int) (ws / 2.0);<NEW_LINE>int ss = (int) Math.floor(skipSizeInSeconds * samplingRate + 0.5);<NEW_LINE>Window win = Window.get(windowType, ws);<NEW_LINE>// Normalize to sum up to unity<NEW_LINE>win.normalize(1.0f);<NEW_LINE>double[] wgt = new double[ws];<NEW_LINE>double[] frm = new double[ws];<NEW_LINE>int start = 0;<NEW_LINE>boolean bLastFrame = false;<NEW_LINE>double frmEn, gain;<NEW_LINE>int i;<NEW_LINE>while (true) {<NEW_LINE>if (start + ws - 1 >= x.length - 1)<NEW_LINE>bLastFrame = true;<NEW_LINE>wgt = win.getCoeffs();<NEW_LINE>if (// First frame<NEW_LINE>start == 0)<NEW_LINE>Arrays.fill(wgt, 0, half_ws - 1, 1.0);<NEW_LINE>else if (bLastFrame)<NEW_LINE>Arrays.fill(wgt, half_ws, ws - 1, 1.0);<NEW_LINE>Arrays.fill(frm, 0.0);<NEW_LINE>System.arraycopy(x, start, frm, 0, Math.min(ws, x.length - start));<NEW_LINE>frm = MathUtils.multiply(frm, wgt);<NEW_LINE>frmEn = SignalProcUtils.energy(frm);<NEW_LINE>gain = Math.sqrt(targetEnergy / frmEn);<NEW_LINE>System.out.println(String.valueOf(gain));<NEW_LINE>frm = MathUtils.multiply(frm, gain);<NEW_LINE>frm = MathUtils.multiply(frm, wgt);<NEW_LINE>for (i = 0; i < ws; i++) {<NEW_LINE>if (i + start >= y.length) {<NEW_LINE>bLastFrame = true;<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>y[i + start] += frm[i];<NEW_LINE>w[i + start] += wgt[i] * wgt[i];<NEW_LINE>}<NEW_LINE>if (bLastFrame)<NEW_LINE>break;<NEW_LINE>start += ss;<NEW_LINE>}<NEW_LINE>for (i = 0; i < y.length; i++) {<NEW_LINE>if (w[i] > 0.0)<NEW_LINE>y[i] /= w[i];<NEW_LINE>}<NEW_LINE>return y;<NEW_LINE>}
Arrays.fill(w, 0.0);
122,113
// ///////////////////////////////// Registration Methods ///////////////////////////////////<NEW_LINE>public void register(BundleContext bndCtx) {<NEW_LINE>final String methodName = "register()";<NEW_LINE>final boolean trace = TraceComponent.isAnyTracingEnabled();<NEW_LINE>if (trace && tc.isEntryEnabled())<NEW_LINE>Tr.entry(tc, methodName, this);<NEW_LINE>Hashtable<String, String> props = new <MASK><NEW_LINE>props.put("jmx.objectname", this.obn.toString());<NEW_LINE>if (IS_DEBUGGING)<NEW_LINE>// Extra Check: Does this MBean exist already?<NEW_LINE>MBeanHelper.isMbeanExist(objectName.toString() + "*", className, methodName);<NEW_LINE>// Register the MBean<NEW_LINE>if (trace && tc.isDebugEnabled())<NEW_LINE>Tr.debug(tc, "activateMBean started for " + this.obn.toString());<NEW_LINE>this.reg = bndCtx.registerService(JCAManagedConnectionFactoryMBean.class.getName(), this, props);<NEW_LINE>if (trace && tc.isEntryEnabled())<NEW_LINE>Tr.exit(tc, methodName, this);<NEW_LINE>}
Hashtable<String, String>();
739,498
static void clientSetup(final FMLClientSetupEvent event) {<NEW_LINE>// render layers<NEW_LINE>RenderType cutout = RenderType.cutout();<NEW_LINE>// seared<NEW_LINE>// casting<NEW_LINE>ItemBlockRenderTypes.setRenderLayer(TinkerSmeltery.searedFaucet.get(), cutout);<NEW_LINE>ItemBlockRenderTypes.setRenderLayer(TinkerSmeltery.searedBasin.get(), cutout);<NEW_LINE>ItemBlockRenderTypes.setRenderLayer(TinkerSmeltery.searedTable.get(), cutout);<NEW_LINE>// controller<NEW_LINE>ItemBlockRenderTypes.setRenderLayer(TinkerSmeltery.searedMelter.get(), cutout);<NEW_LINE>ItemBlockRenderTypes.setRenderLayer(TinkerSmeltery.smelteryController.get(), cutout);<NEW_LINE>ItemBlockRenderTypes.setRenderLayer(TinkerSmeltery.foundryController.get(), cutout);<NEW_LINE>// peripherals<NEW_LINE>ItemBlockRenderTypes.setRenderLayer(TinkerSmeltery.searedDrain.get(), cutout);<NEW_LINE>ItemBlockRenderTypes.setRenderLayer(TinkerSmeltery.searedDuct.get(), cutout);<NEW_LINE>TinkerSmeltery.searedTank.forEach(tank -> ItemBlockRenderTypes.setRenderLayer(tank, cutout));<NEW_LINE>ItemBlockRenderTypes.setRenderLayer(TinkerSmeltery.searedLantern.get(), cutout);<NEW_LINE>ItemBlockRenderTypes.setRenderLayer(TinkerSmeltery.searedGlass.get(), cutout);<NEW_LINE>ItemBlockRenderTypes.setRenderLayer(TinkerSmeltery.searedGlassPane.get(), cutout);<NEW_LINE>// scorched<NEW_LINE>// casting<NEW_LINE>ItemBlockRenderTypes.setRenderLayer(TinkerSmeltery.scorchedFaucet.get(), cutout);<NEW_LINE>ItemBlockRenderTypes.setRenderLayer(TinkerSmeltery.scorchedBasin.get(), cutout);<NEW_LINE>ItemBlockRenderTypes.setRenderLayer(TinkerSmeltery.<MASK><NEW_LINE>// controller<NEW_LINE>ItemBlockRenderTypes.setRenderLayer(TinkerSmeltery.scorchedAlloyer.get(), cutout);<NEW_LINE>// peripherals<NEW_LINE>ItemBlockRenderTypes.setRenderLayer(TinkerSmeltery.scorchedDrain.get(), cutout);<NEW_LINE>ItemBlockRenderTypes.setRenderLayer(TinkerSmeltery.scorchedDuct.get(), cutout);<NEW_LINE>TinkerSmeltery.scorchedTank.forEach(tank -> ItemBlockRenderTypes.setRenderLayer(tank, cutout));<NEW_LINE>ItemBlockRenderTypes.setRenderLayer(TinkerSmeltery.scorchedLantern.get(), cutout);<NEW_LINE>ItemBlockRenderTypes.setRenderLayer(TinkerSmeltery.scorchedGlass.get(), cutout);<NEW_LINE>ItemBlockRenderTypes.setRenderLayer(TinkerSmeltery.scorchedGlassPane.get(), cutout);<NEW_LINE>// screens<NEW_LINE>MenuScreens.register(TinkerSmeltery.melterContainer.get(), MelterScreen::new);<NEW_LINE>MenuScreens.register(TinkerSmeltery.smelteryContainer.get(), HeatingStructureScreen::new);<NEW_LINE>MenuScreens.register(TinkerSmeltery.singleItemContainer.get(), new SingleItemScreenFactory());<NEW_LINE>MenuScreens.register(TinkerSmeltery.alloyerContainer.get(), AlloyerScreen::new);<NEW_LINE>}
scorchedTable.get(), cutout);
35,001
public void deleteChildRecursive(ViewGroup viewParent, View child, int childIndex) {<NEW_LINE>if (viewParent == null || child == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>HippyViewController hippyChildViewController = null;<NEW_LINE>String childTagString = HippyTag.getClassName(child);<NEW_LINE>if (!TextUtils.isEmpty(childTagString)) {<NEW_LINE>hippyChildViewController = mControllerRegistry.getViewController(childTagString);<NEW_LINE>if (hippyChildViewController != null) {<NEW_LINE>hippyChildViewController.onViewDestroy(child);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (child instanceof ViewGroup) {<NEW_LINE>ViewGroup childViewGroup = (ViewGroup) child;<NEW_LINE>if (hippyChildViewController != null) {<NEW_LINE>for (int i = hippyChildViewController.getChildCount(childViewGroup) - 1; i >= 0; i--) {<NEW_LINE>deleteChildRecursive(childViewGroup, hippyChildViewController.getChildAt(childViewGroup, i), -1);<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>for (int i = childViewGroup.getChildCount() - 1; i >= 0; i--) {<NEW_LINE>deleteChildRecursive(childViewGroup, childViewGroup.getChildAt(i), -1);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (mControllerRegistry.getView(child.getId()) != child && mControllerRegistry.getView(viewParent.getId()) != viewParent) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>String parentTagString = HippyTag.getClassName(viewParent);<NEW_LINE>if (parentTagString != null) {<NEW_LINE>// remove component Like listView there is a RecycleItemView is not js UI<NEW_LINE>if (mControllerRegistry.getControllerHolder(parentTagString) != null) {<NEW_LINE>HippyViewController hippyViewController = mControllerRegistry.getViewController(parentTagString);<NEW_LINE>hippyViewController.<MASK><NEW_LINE>// LogUtils.d("HippyListView", "delete " + child.getId());<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>viewParent.removeView(child);<NEW_LINE>}<NEW_LINE>// mContext.getGlobalConfigs().getLogAdapter().log(TAG, "deleteChildRecursive id:" + child.getId() + " className:" + childTagString);<NEW_LINE>mControllerRegistry.removeView(child.getId());<NEW_LINE>}
deleteChild(viewParent, child, childIndex);
992,066
private void readObject(java.io.ObjectInputStream in) throws IOException, ClassNotFoundException {<NEW_LINE>in.defaultReadObject();<NEW_LINE>// Add mapping field to 4.0, 4.1 models and rearrange the dimensions.<NEW_LINE>if (mapping == null) {<NEW_LINE>this.mapping = ((ImmutableRegressionInfo) outputIDInfo).getIDtoNaturalOrderMapping();<NEW_LINE>List<svm_model> newModels = new ArrayList<>(this.models);<NEW_LINE>double[] newMeans = new <MASK><NEW_LINE>double[] newVariances = new double[newModels.size()];<NEW_LINE>for (int i = 0; i < mapping.length; i++) {<NEW_LINE>newModels.set(i, this.models.get(mapping[i]));<NEW_LINE>if (this.means != null) {<NEW_LINE>newMeans[i] = this.means[mapping[i]];<NEW_LINE>newVariances[i] = this.variances[mapping[i]];<NEW_LINE>}<NEW_LINE>}<NEW_LINE>this.models = Collections.unmodifiableList(newModels);<NEW_LINE>this.means = newMeans;<NEW_LINE>this.variances = newVariances;<NEW_LINE>}<NEW_LINE>}
double[newModels.size()];
561,674
private Mono<PagedResponse<ExpressRouteServiceProviderInner>> listSinglePageAsync() {<NEW_LINE>if (this.client.getEndpoint() == null) {<NEW_LINE>return Mono.<MASK><NEW_LINE>}<NEW_LINE>if (this.client.getSubscriptionId() == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter this.client.getSubscriptionId() is required and cannot be null."));<NEW_LINE>}<NEW_LINE>final String apiVersion = "2018-11-01";<NEW_LINE>final String accept = "application/json";<NEW_LINE>return FluxUtil.withContext(context -> service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), accept, context)).<PagedResponse<ExpressRouteServiceProviderInner>>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)).contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));<NEW_LINE>}
error(new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
1,381,970
protected void writeVerboseExecutorState(StringBuilder sb) {<NEW_LINE>if (_executorState != null) {<NEW_LINE>// There is no execution task summary if no execution is in progress.<NEW_LINE>if (!IN_PROGRESS_STATES.contains(_executorState.state())) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>Map<TaskType, Map<ExecutionTaskState, Set<ExecutionTask>>> taskSnapshot = _executorState.executionTasksSummary().filteredTasksByState();<NEW_LINE>taskSnapshot.forEach((type, taskMap) -> {<NEW_LINE>String taskTypeString = type == TaskType.INTER_BROKER_REPLICA_ACTION ? INTER_BROKER_PARTITION_MOVEMENTS : type == TaskType.INTRA_BROKER_REPLICA_ACTION ? INTRA_BROKER_PARTITION_MOVEMENTS : LEADERSHIP_MOVEMENTS;<NEW_LINE>sb.append(String.format("%n%n%s %s:%n", _executorState.state() == ExecutorState.State.STOPPING_EXECUTION ? "Cancelled" : "Pending", taskTypeString));<NEW_LINE>for (ExecutionTask task : taskMap.get(ExecutionTaskState.PENDING)) {<NEW_LINE>sb.append(String.format("%s%n", task));<NEW_LINE>}<NEW_LINE>sb.append(String.format("%n%nIn progress %s:%n", taskTypeString));<NEW_LINE>for (ExecutionTask task : taskMap.get(ExecutionTaskState.IN_PROGRESS)) {<NEW_LINE>sb.append(String.format("%s%n", task));<NEW_LINE>}<NEW_LINE>sb.append(String.format("%n%nAborting %s:%n", taskTypeString));<NEW_LINE>for (ExecutionTask task : taskMap.get(ExecutionTaskState.ABORTING)) {<NEW_LINE>sb.append(String.format("%s%n", task));<NEW_LINE>}<NEW_LINE>sb.append(String.format("%n%nAborted %s:%n", taskTypeString));<NEW_LINE>for (ExecutionTask task : taskMap.get(ExecutionTaskState.ABORTED)) {<NEW_LINE>sb.append(String.format("%s%n", task));<NEW_LINE>}<NEW_LINE>sb.append(String.format("%n%nDead %s:%n", taskTypeString));<NEW_LINE>for (ExecutionTask task : taskMap.get(ExecutionTaskState.DEAD)) {<NEW_LINE>sb.append(String<MASK><NEW_LINE>}<NEW_LINE>});<NEW_LINE>}<NEW_LINE>}
.format("%s%n", task));
130,521
final DisassociateElasticIpResult executeDisassociateElasticIp(DisassociateElasticIpRequest disassociateElasticIpRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(disassociateElasticIpRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<DisassociateElasticIpRequest> request = null;<NEW_LINE>Response<DisassociateElasticIpResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new DisassociateElasticIpRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(disassociateElasticIpRequest));<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, "OpsWorks");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DisassociateElasticIp");<NEW_LINE>request.<MASK><NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<DisassociateElasticIpResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DisassociateElasticIpResultJsonUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
1,805,819
public void write(DataOutput out) throws IOException {<NEW_LINE>// ATTN: must write type first<NEW_LINE>Text.writeString(<MASK><NEW_LINE>out.writeLong(id);<NEW_LINE>Text.writeString(out, name);<NEW_LINE>Text.writeString(out, clusterName);<NEW_LINE>out.writeLong(dbId);<NEW_LINE>out.writeLong(tableId);<NEW_LINE>out.writeInt(desireTaskConcurrentNum);<NEW_LINE>Text.writeString(out, state.name());<NEW_LINE>out.writeLong(maxErrorNum);<NEW_LINE>out.writeLong(taskSchedIntervalS);<NEW_LINE>out.writeLong(maxBatchRows);<NEW_LINE>out.writeLong(maxBatchSizeBytes);<NEW_LINE>progress.write(out);<NEW_LINE>out.writeLong(createTimestamp);<NEW_LINE>out.writeLong(pauseTimestamp);<NEW_LINE>out.writeLong(endTimestamp);<NEW_LINE>out.writeLong(currentErrorRows);<NEW_LINE>out.writeLong(currentTotalRows);<NEW_LINE>out.writeLong(errorRows);<NEW_LINE>out.writeLong(totalRows);<NEW_LINE>out.writeLong(unselectedRows);<NEW_LINE>out.writeLong(receivedBytes);<NEW_LINE>out.writeLong(totalTaskExcutionTimeMs);<NEW_LINE>out.writeLong(committedTaskNum);<NEW_LINE>out.writeLong(abortedTaskNum);<NEW_LINE>origStmt.write(out);<NEW_LINE>out.writeInt(jobProperties.size());<NEW_LINE>for (Map.Entry<String, String> entry : jobProperties.entrySet()) {<NEW_LINE>Text.writeString(out, entry.getKey());<NEW_LINE>Text.writeString(out, entry.getValue());<NEW_LINE>}<NEW_LINE>out.writeInt(sessionVariables.size());<NEW_LINE>for (Map.Entry<String, String> entry : sessionVariables.entrySet()) {<NEW_LINE>Text.writeString(out, entry.getKey());<NEW_LINE>Text.writeString(out, entry.getValue());<NEW_LINE>}<NEW_LINE>}
out, dataSourceType.name());
353,009
public void onSensorChanged(SensorEvent event) {<NEW_LINE>if (event.sensor.getType() == Sensor.TYPE_ACCELEROMETER) {<NEW_LINE>if (nativeOrientation == Orientation.Portrait) {<NEW_LINE>System.arraycopy(event.values, 0, accelerometerValues, 0, accelerometerValues.length);<NEW_LINE>} else {<NEW_LINE>accelerometerValues[0] = event.values[1];<NEW_LINE>accelerometerValues[1] = -event.values[0];<NEW_LINE>accelerometerValues[2] = event.values[2];<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (event.sensor.getType() == Sensor.TYPE_MAGNETIC_FIELD) {<NEW_LINE>System.arraycopy(event.values, 0, magneticFieldValues, 0, magneticFieldValues.length);<NEW_LINE>}<NEW_LINE>if (event.sensor.getType() == Sensor.TYPE_GYROSCOPE) {<NEW_LINE>if (nativeOrientation == Orientation.Portrait) {<NEW_LINE>System.arraycopy(event.values, 0, gyroscopeValues, 0, gyroscopeValues.length);<NEW_LINE>} else {<NEW_LINE>gyroscopeValues[0] = event.values[1];<NEW_LINE>gyroscopeValues[1] = -event.values[0];<NEW_LINE>gyroscopeValues[2<MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (event.sensor.getType() == Sensor.TYPE_ROTATION_VECTOR) {<NEW_LINE>if (nativeOrientation == Orientation.Portrait) {<NEW_LINE>System.arraycopy(event.values, 0, rotationVectorValues, 0, rotationVectorValues.length);<NEW_LINE>} else {<NEW_LINE>rotationVectorValues[0] = event.values[1];<NEW_LINE>rotationVectorValues[1] = -event.values[0];<NEW_LINE>rotationVectorValues[2] = event.values[2];<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
] = event.values[2];
96,051
private boolean isCharSetMatch(PDCIDSystemInfo cidSystemInfo, FontInfo info) {<NEW_LINE>if (info.getCIDSystemInfo() != null) {<NEW_LINE>return info.getCIDSystemInfo().getRegistry().equals(cidSystemInfo.getRegistry()) && info.getCIDSystemInfo().getOrdering().<MASK><NEW_LINE>} else {<NEW_LINE>long codePageRange = info.getCodePageRange();<NEW_LINE>long JIS_JAPAN = 1 << 17;<NEW_LINE>long CHINESE_SIMPLIFIED = 1 << 18;<NEW_LINE>long KOREAN_WANSUNG = 1 << 19;<NEW_LINE>long CHINESE_TRADITIONAL = 1 << 20;<NEW_LINE>long KOREAN_JOHAB = 1 << 21;<NEW_LINE>if (cidSystemInfo.getOrdering().equals("GB1") && (codePageRange & CHINESE_SIMPLIFIED) == CHINESE_SIMPLIFIED) {<NEW_LINE>return true;<NEW_LINE>} else if (cidSystemInfo.getOrdering().equals("CNS1") && (codePageRange & CHINESE_TRADITIONAL) == CHINESE_TRADITIONAL) {<NEW_LINE>return true;<NEW_LINE>} else if (cidSystemInfo.getOrdering().equals("Japan1") && (codePageRange & JIS_JAPAN) == JIS_JAPAN) {<NEW_LINE>return true;<NEW_LINE>} else {<NEW_LINE>return cidSystemInfo.getOrdering().equals("Korea1") && (codePageRange & KOREAN_WANSUNG) == KOREAN_WANSUNG || (codePageRange & KOREAN_JOHAB) == KOREAN_JOHAB;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
equals(cidSystemInfo.getOrdering());
1,643,289
public void receiveEmptyMessage(final EmptyMessage message, final EndpointReceiver receiver) {<NEW_LINE>// an empty ACK or RST always is received as a reply to a message<NEW_LINE>// exchange originating locally, i.e. the message will echo an MID<NEW_LINE>// that has been created here<NEW_LINE>EndpointContext context = message.getSourceContext();<NEW_LINE>Object identity = endpointContextMatcher.getEndpointIdentity(context);<NEW_LINE>KeyMID byMID = new KeyMID(message.getMID(), identity);<NEW_LINE>Exchange tempExchange = exchangeStore.get(byMID);<NEW_LINE>if (tempExchange == null && identity != context.getPeerAddress()) {<NEW_LINE>KeyMID pongByMID = new KeyMID(message.getMID(), context.getPeerAddress());<NEW_LINE>tempExchange = exchangeStore.get(pongByMID);<NEW_LINE>if (tempExchange != null) {<NEW_LINE>byMID = pongByMID;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (tempExchange == null) {<NEW_LINE>LOGGER.debug("ignoring {} message unmatchable by {}", message.getType(), byMID);<NEW_LINE>cancel(message, receiver);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>final KeyMID idByMID = byMID;<NEW_LINE>final Exchange exchange = tempExchange;<NEW_LINE>exchange.execute(new Runnable() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void run() {<NEW_LINE>if (exchange.getCurrentRequest().isMulticast()) {<NEW_LINE>LOGGER.debug("ignoring {} message for multicast request {}", message.getType(), idByMID);<NEW_LINE>cancel(message, receiver);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (exchangeStore.get(idByMID) != exchange) {<NEW_LINE>if (running) {<NEW_LINE>LOGGER.debug("ignoring {} message not longer matching by {}", message.getType(), idByMID);<NEW_LINE>}<NEW_LINE>cancel(message, receiver);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>if (endpointContextMatcher.isResponseRelatedToRequest(exchange.getEndpointContext(), message.getSourceContext())) {<NEW_LINE>exchangeStore.remove(idByMID, exchange);<NEW_LINE>LOGGER.debug("received expected {} reply for {}", message.getType(), idByMID);<NEW_LINE><MASK><NEW_LINE>return;<NEW_LINE>} else {<NEW_LINE>LOGGER.debug("ignoring potentially forged {} reply for {} with non-matching endpoint context", message.getType(), idByMID);<NEW_LINE>}<NEW_LINE>} catch (RuntimeException ex) {<NEW_LINE>LOGGER.warn("error receiving {} message for {}", message.getType(), exchange, ex);<NEW_LINE>}<NEW_LINE>cancel(message, receiver);<NEW_LINE>}<NEW_LINE>});<NEW_LINE>}
receiver.receiveEmptyMessage(exchange, message);
1,792,009
private boolean skipSendingToTarget(PartitionReplica target) {<NEW_LINE>ClusterServiceImpl clusterService = nodeEngine<MASK><NEW_LINE>assert !target.isIdentical(nodeEngine.getLocalMember()) : "Could not send anti-entropy operation, because " + target + " is local member itself! Local-member: " + clusterService.getLocalMember() + ", " + partitionService.getPartition(partitionId);<NEW_LINE>if (clusterService.getMember(target.address(), target.uuid()) == null) {<NEW_LINE>ILogger logger = nodeEngine.getLogger(getClass());<NEW_LINE>if (logger.isFinestEnabled()) {<NEW_LINE>if (clusterService.isMissingMember(target.address(), target.uuid())) {<NEW_LINE>logger.finest("Could not send anti-entropy operation, because " + target + " is a missing member. " + partitionService.getPartition(partitionId));<NEW_LINE>} else {<NEW_LINE>logger.finest("Could not send anti-entropy operation, because " + target + " is not a known member. " + partitionService.getPartition(partitionId));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>return false;<NEW_LINE>}
.getNode().getClusterService();
439,901
final UntagResourceResult executeUntagResource(UntagResourceRequest untagResourceRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(untagResourceRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<UntagResourceRequest> request = null;<NEW_LINE>Response<UntagResourceResult> response = null;<NEW_LINE>try {<NEW_LINE><MASK><NEW_LINE>try {<NEW_LINE>request = new UntagResourceRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(untagResourceRequest));<NEW_LINE>// Binds the request metrics to the current request.<NEW_LINE>request.setAWSRequestMetrics(awsRequestMetrics);<NEW_LINE>request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);<NEW_LINE>request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SERVICE_ID, "FMS");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "UntagResource");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<UntagResourceResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new UntagResourceResultJsonUnmarshaller());<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);
547,430
public static SearchObjectResponse unmarshall(SearchObjectResponse searchObjectResponse, UnmarshallerContext _ctx) {<NEW_LINE>searchObjectResponse.setRequestId(_ctx.stringValue("SearchObjectResponse.RequestId"));<NEW_LINE>searchObjectResponse.setMessage(_ctx.stringValue("SearchObjectResponse.Message"));<NEW_LINE>searchObjectResponse.setCode(_ctx.stringValue("SearchObjectResponse.Code"));<NEW_LINE>Data data = new Data();<NEW_LINE>data.setTotalPage(_ctx.integerValue("SearchObjectResponse.Data.TotalPage"));<NEW_LINE>data.setPageNumber(_ctx.integerValue("SearchObjectResponse.Data.PageNumber"));<NEW_LINE>data.setPageSize(_ctx.integerValue("SearchObjectResponse.Data.PageSize"));<NEW_LINE>data.setTotalCount(_ctx.integerValue("SearchObjectResponse.Data.TotalCount"));<NEW_LINE>List<RecordsItem> records = new ArrayList<RecordsItem>();<NEW_LINE>for (int i = 0; i < _ctx.lengthValue("SearchObjectResponse.Data.Records.Length"); i++) {<NEW_LINE>RecordsItem recordsItem = new RecordsItem();<NEW_LINE>recordsItem.setDeviceID(_ctx.stringValue<MASK><NEW_LINE>recordsItem.setCompareResult(_ctx.stringValue("SearchObjectResponse.Data.Records[" + i + "].CompareResult"));<NEW_LINE>recordsItem.setRightBtmX(_ctx.integerValue("SearchObjectResponse.Data.Records[" + i + "].RightBtmX"));<NEW_LINE>recordsItem.setScore(_ctx.floatValue("SearchObjectResponse.Data.Records[" + i + "].Score"));<NEW_LINE>recordsItem.setSourceImageUrl(_ctx.stringValue("SearchObjectResponse.Data.Records[" + i + "].SourceImageUrl"));<NEW_LINE>recordsItem.setSourceID(_ctx.stringValue("SearchObjectResponse.Data.Records[" + i + "].SourceID"));<NEW_LINE>recordsItem.setRightBtmY(_ctx.integerValue("SearchObjectResponse.Data.Records[" + i + "].RightBtmY"));<NEW_LINE>recordsItem.setTargetImageUrl(_ctx.stringValue("SearchObjectResponse.Data.Records[" + i + "].TargetImageUrl"));<NEW_LINE>recordsItem.setLeftTopY(_ctx.integerValue("SearchObjectResponse.Data.Records[" + i + "].LeftTopY"));<NEW_LINE>recordsItem.setTargetImagePath(_ctx.stringValue("SearchObjectResponse.Data.Records[" + i + "].TargetImagePath"));<NEW_LINE>recordsItem.setShotTime(_ctx.longValue("SearchObjectResponse.Data.Records[" + i + "].ShotTime"));<NEW_LINE>recordsItem.setLeftTopX(_ctx.integerValue("SearchObjectResponse.Data.Records[" + i + "].LeftTopX"));<NEW_LINE>recordsItem.setSourceImagePath(_ctx.stringValue("SearchObjectResponse.Data.Records[" + i + "].SourceImagePath"));<NEW_LINE>records.add(recordsItem);<NEW_LINE>}<NEW_LINE>data.setRecords(records);<NEW_LINE>searchObjectResponse.setData(data);<NEW_LINE>return searchObjectResponse;<NEW_LINE>}
("SearchObjectResponse.Data.Records[" + i + "].DeviceID"));
1,252,925
public void visit(BLangBreak breakStmt) {<NEW_LINE>BIRLockDetailsHolder toUnlock = this.env.unlockVars.peek();<NEW_LINE>if (!toUnlock.isEmpty()) {<NEW_LINE>BIRBasicBlock goToBB = new BIRBasicBlock(this.env.nextBBId(names));<NEW_LINE>this.<MASK><NEW_LINE>this.env.enclBB.terminator = new BIRTerminator.GOTO(breakStmt.pos, goToBB, this.currentScope);<NEW_LINE>this.env.enclBB = goToBB;<NEW_LINE>}<NEW_LINE>int numLocks = toUnlock.size();<NEW_LINE>while (numLocks > 0) {<NEW_LINE>BIRBasicBlock unlockBB = new BIRBasicBlock(this.env.nextBBId(names));<NEW_LINE>this.env.enclBasicBlocks.add(unlockBB);<NEW_LINE>BIRTerminator.Unlock unlock = new BIRTerminator.Unlock(null, unlockBB, this.currentScope);<NEW_LINE>this.env.enclBB.terminator = unlock;<NEW_LINE>unlock.relatedLock = toUnlock.getLock(numLocks - 1);<NEW_LINE>this.env.enclBB = unlockBB;<NEW_LINE>numLocks--;<NEW_LINE>}<NEW_LINE>this.env.enclBB.terminator = new BIRTerminator.GOTO(breakStmt.pos, this.env.enclLoopEndBB, this.currentScope);<NEW_LINE>}
env.enclBasicBlocks.add(goToBB);
312,486
public void merge(EvaluationBinary other) {<NEW_LINE>if (other.countTruePositive == null) {<NEW_LINE>// Other is empty - no op<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (countTruePositive == null) {<NEW_LINE>// This evaluation is empty -> take results from other<NEW_LINE>this.countTruePositive = other.countTruePositive;<NEW_LINE>this.countFalsePositive = other.countFalsePositive;<NEW_LINE>this.countTrueNegative = other.countTrueNegative;<NEW_LINE>this.countFalseNegative = other.countFalseNegative;<NEW_LINE>this.rocBinary = other.rocBinary;<NEW_LINE>} else {<NEW_LINE>if (this.countTruePositive.length != other.countTruePositive.length) {<NEW_LINE>throw new IllegalStateException("Cannot merge EvaluationBinary instances with different sizes. This " + "size: " + this.countTruePositive.length + ", other size: " + other.countTruePositive.length);<NEW_LINE>}<NEW_LINE>// Both have stats<NEW_LINE>addInPlace(this.countTruePositive, other.countTruePositive);<NEW_LINE>addInPlace(this.countTrueNegative, other.countTrueNegative);<NEW_LINE>addInPlace(this.countFalsePositive, other.countFalsePositive);<NEW_LINE>addInPlace(this.countFalseNegative, other.countFalseNegative);<NEW_LINE>if (this.rocBinary != null) {<NEW_LINE>this.<MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
rocBinary.merge(other.rocBinary);
513,006
private // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents<NEW_LINE>void initComponents() {<NEW_LINE>tabbedPane = new javax.swing.JTabbedPane();<NEW_LINE>tab1ScrollPane = new javax.swing.JScrollPane();<NEW_LINE>issuesOutline = new org.netbeans.swing.outline.Outline();<NEW_LINE>tab2ScrollPane = new javax.swing.JScrollPane();<NEW_LINE>reportEditor = new javax.swing.JEditorPane();<NEW_LINE>tab1ScrollPane.setViewportView(issuesOutline);<NEW_LINE>// NOI18N<NEW_LINE>tabbedPane.// NOI18N<NEW_LINE>addTab(// NOI18N<NEW_LINE>org.openide.util.NbBundle.getMessage(ProcessorIssuesReportPanel<MASK><NEW_LINE>reportEditor.setEditable(false);<NEW_LINE>reportEditor.setFocusable(false);<NEW_LINE>tab2ScrollPane.setViewportView(reportEditor);<NEW_LINE>// NOI18N<NEW_LINE>tabbedPane.// NOI18N<NEW_LINE>addTab(// NOI18N<NEW_LINE>org.openide.util.NbBundle.getMessage(ProcessorIssuesReportPanel.class, "ProcessorIssuesReportPanel.tab2ScrollPane.TabConstraints.tabTitle"), tab2ScrollPane);<NEW_LINE>javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);<NEW_LINE>this.setLayout(layout);<NEW_LINE>layout.setHorizontalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGroup(layout.createSequentialGroup().addContainerGap().addComponent(tabbedPane, javax.swing.GroupLayout.DEFAULT_SIZE, 557, Short.MAX_VALUE).addContainerGap()));<NEW_LINE>layout.setVerticalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGroup(layout.createSequentialGroup().addContainerGap().addComponent(tabbedPane, javax.swing.GroupLayout.PREFERRED_SIZE, 270, javax.swing.GroupLayout.PREFERRED_SIZE).addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));<NEW_LINE>}
.class, "ProcessorIssuesReportPanel.tab1ScrollPane.TabConstraints.tabTitle"), tab1ScrollPane);
1,158,583
public void run() {<NEW_LINE>ApplicationManager.getApplication().runWriteAction(new Runnable() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void run() {<NEW_LINE>final PsiModificationTracker tracker = PsiManager.getInstance(myView.<MASK><NEW_LINE>final long startCount = tracker.getModificationCount();<NEW_LINE>CommandProcessor.getInstance().markCurrentCommandAsGlobal(myView.getProject());<NEW_LINE>// CCE here means QuickFix was incorrectly inherited<NEW_LINE>fix.applyFix(myView.getProject(), descriptor);<NEW_LINE>if (startCount != tracker.getModificationCount()) {<NEW_LINE>InspectionToolWrapper toolWrapper = myView.getTree().getSelectedToolWrapper();<NEW_LINE>if (toolWrapper != null) {<NEW_LINE>InspectionToolPresentation presentation = myView.getGlobalInspectionContext().getPresentation(toolWrapper);<NEW_LINE>presentation.ignoreProblem(element, descriptor, idx);<NEW_LINE>}<NEW_LINE>myView.updateView(false);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>});<NEW_LINE>}
getProject()).getModificationTracker();
1,423,636
public byte[] serialize() {<NEW_LINE>int length = 2 + this.chassisId.getLength() + 2 + this.portId.getLength() + 2 + this.ttl.getLength() + 2;<NEW_LINE>for (LLDPTLV tlv : this.optionalTLVList) {<NEW_LINE>if (tlv != null)<NEW_LINE>length += 2 + tlv.getLength();<NEW_LINE>}<NEW_LINE>byte[] data = new byte[length];<NEW_LINE>ByteBuffer bb = ByteBuffer.wrap(data);<NEW_LINE>bb.put(this.chassisId.serialize());<NEW_LINE>bb.put(<MASK><NEW_LINE>bb.put(this.ttl.serialize());<NEW_LINE>for (LLDPTLV tlv : this.optionalTLVList) {<NEW_LINE>if (tlv != null)<NEW_LINE>bb.put(tlv.serialize());<NEW_LINE>}<NEW_LINE>// End of LLDPDU<NEW_LINE>bb.putShort((short) 0);<NEW_LINE>if (this.parent != null && this.parent instanceof Ethernet)<NEW_LINE>((Ethernet) this.parent).setEtherType(ethType);<NEW_LINE>return data;<NEW_LINE>}
this.portId.serialize());
1,402,558
public static void main(String[] args) {<NEW_LINE>final int numElements = 8;<NEW_LINE>final int numKernels = 8;<NEW_LINE>int[] a = new int[numElements];<NEW_LINE>Arrays.fill(a, 0);<NEW_LINE>// @formatter:off<NEW_LINE>TaskSchedule s0 = new TaskSchedule("s0");<NEW_LINE>for (int i = 0; i < numKernels; i++) {<NEW_LINE>s0.task("t" + i, MigratingArrayAccInt::acc, a, 1);<NEW_LINE>}<NEW_LINE>s0.streamOut(a);<NEW_LINE>// @formatter:on<NEW_LINE>TornadoDriver driver = TornadoRuntime.getTornadoRuntime().getDriver(0);<NEW_LINE>s0.mapAllTo(driver.getDevice(0));<NEW_LINE>s0.execute();<NEW_LINE>System.out.println("a: " + Arrays.toString(a));<NEW_LINE><MASK><NEW_LINE>s0.mapAllTo(driver.getDevice(1));<NEW_LINE>s0.execute();<NEW_LINE>s0.dumpEvents();<NEW_LINE>System.out.println("a: " + Arrays.toString(a));<NEW_LINE>}
System.out.println("migrating devices...");
295,675
private void startAdditionalServices() {<NEW_LINE>Script command = new Script("/bin/systemctl", LOGGER);<NEW_LINE>command.add("stop");<NEW_LINE>command.add("apache2");<NEW_LINE>String result = command.execute();<NEW_LINE>if (result != null) {<NEW_LINE>LOGGER.warn("Error in stopping httpd service err=" + result);<NEW_LINE>}<NEW_LINE>String port = Integer.toString(TemplateConstants.DEFAULT_TMPLT_COPY_PORT);<NEW_LINE>String intf = TemplateConstants.DEFAULT_TMPLT_COPY_INTF;<NEW_LINE>command <MASK><NEW_LINE>command.add("-c");<NEW_LINE>command.add("iptables -I INPUT -i " + intf + " -p tcp -m state --state NEW -m tcp --dport " + port + " -j ACCEPT;" + "iptables -I INPUT -i " + intf + " -p tcp -m state --state NEW -m tcp --dport " + "443" + " -j ACCEPT;");<NEW_LINE>result = command.execute();<NEW_LINE>if (result != null) {<NEW_LINE>LOGGER.warn("Error in opening up apache2 port err=" + result);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>command = new Script("/bin/systemctl", LOGGER);<NEW_LINE>command.add("start");<NEW_LINE>command.add("apache2");<NEW_LINE>result = command.execute();<NEW_LINE>if (result != null) {<NEW_LINE>LOGGER.warn("Error in starting apache2 service err=" + result);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>command = new Script("/bin/su", LOGGER);<NEW_LINE>command.add("-s");<NEW_LINE>command.add("/bin/bash");<NEW_LINE>command.add("-c");<NEW_LINE>command.add("mkdir -p /var/www/html/copy/template");<NEW_LINE>command.add("www-data");<NEW_LINE>result = command.execute();<NEW_LINE>if (result != null) {<NEW_LINE>LOGGER.warn("Error in creating directory =" + result);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>}
= new Script("/bin/bash", LOGGER);
481,934
public void onStyleLoaded(@NonNull Style style) {<NEW_LINE>initCoordinates();<NEW_LINE>// Create the LineString from the list of coordinates and then make a GeoJSON<NEW_LINE>// FeatureCollection so we can add the line to our map as a layer.<NEW_LINE>LineString lineString = LineString.fromLngLats(routeCoordinates);<NEW_LINE>FeatureCollection featureCollection = FeatureCollection.fromFeature<MASK><NEW_LINE>style.addSource(new GeoJsonSource("line-source", featureCollection, new GeoJsonOptions().withLineMetrics(true)));<NEW_LINE>// The layer properties for our line. This is where we set the gradient colors, set the<NEW_LINE>// line width, etc<NEW_LINE>style.addLayer(new LineLayer("linelayer", "line-source").withProperties(lineCap(Property.LINE_CAP_ROUND), lineJoin(Property.LINE_JOIN_ROUND), lineWidth(14f), lineGradient(// blue<NEW_LINE>interpolate(// blue<NEW_LINE>linear(), // blue<NEW_LINE>lineProgress(), // royal blue<NEW_LINE>stop(0f, rgb(6, 1, 255)), // cyan<NEW_LINE>stop(0.1f, rgb(59, 118, 227)), // lime<NEW_LINE>stop(0.3f, rgb(7, 238, 251)), // yellow<NEW_LINE>stop(0.5f, rgb(0, 255, 42)), // red<NEW_LINE>stop(0.7f, rgb(255, 252, 0)), stop(1f, rgb(255, 30, 0))))));<NEW_LINE>}
(Feature.fromGeometry(lineString));