Unnamed: 0 int64 0 305k | body stringlengths 7 52.9k | name stringlengths 1 185 |
|---|---|---|
285,400 | int () { return Integer.MAX_VALUE; } | getWeight |
285,401 | void (RemoteSdkAdditionalData data, CredentialsCase... cases) { for (CredentialsCase credentialsCase : cases) { if (credentialsCase.getType() == this) { T credentials = createCredentials(); credentialsCase.process(credentials); data.setCredentials(getCredentialsKey(), credentials); } } } | saveCredentials |
285,402 | boolean () { return myNoRouteToHost; } | isNoRouteToHost |
285,403 | boolean () { return myAuthFailed; } | isAuthFailed |
285,404 | String () { if (myNoRouteToHost) { return myCause.getMessage(); } else if (myAuthFailed) { return RemoteBundle.message("authentication.failed"); } else { return super.getMessage(); } } | getMessage |
285,405 | RemoteSdkException (@NotNull Throwable e) { if (e.getCause() instanceof RemoteCredentialException) { return new RemoteSdkException(RemoteBundle.message("remote.sdk.exception.cant.obtain.remote.credentials"), e); } else if (e instanceof RemoteSdkException) { return (RemoteSdkException)e; } else { return new RemoteSdkException(e.getMessage(), e); } } | cantObtainRemoteCredentials |
285,406 | String () { return getCredentials().getSdkId(); } | getId |
285,407 | void (@NotNull Element rootElement) { getCredentials().save(rootElement); } | save |
285,408 | String (String interpreterPath) { return getId(); } | getPresentableDetails |
285,409 | void (@Nullable Element rootElement) { getCredentials().load(rootElement); } | load |
285,410 | CredentialsType<T> () { return type; } | getType |
285,411 | void (T credentials) { consumer.accept(credentials); } | process |
285,412 | CredentialsManager () { return ApplicationManager.getApplication().getService(CredentialsManager.class); } | getInstance |
285,413 | void (@NotNull RemoteSdkAdditionalData<?> data, @Nullable Project project) { if (!(data.getRemoteConnectionType() instanceof OutdatedCredentialsType)) { return; } //noinspection unchecked Pair<CredentialsType<Object>, Object> pair = ((OutdatedCredentialsType)data.getRemoteConnectionType()) .transformToNewerType(data.connectionCredentials().getCredentials(), project); data.setCredentials(pair.getFirst().getCredentialsKey(), pair.getSecond()); } | updateOutdatedSdk |
285,414 | void (@NotNull Stream<? extends SdkAdditionalData> additionalData, @NotNull CredentialsType<?> credentialsType) { additionalData.forEach(data -> recogniseCredentialType(data, credentialsType)); } | recogniseCredentialType |
285,415 | void (@Nullable SdkAdditionalData additionalData, @NotNull CredentialsType credentialsType) { if (!(additionalData instanceof RemoteSdkAdditionalData<?> data)) return; if (data.getRemoteConnectionType() != CredentialsType.UNKNOWN) return; String credentialsId = data.connectionCredentials().getId(); if (!credentialsType.hasPrefix(credentialsId)) return; Element root = new Element("root"); data.connectionCredentials().save(root); Object credentials = credentialsType.createCredentials(); try { credentialsType.getHandler(credentials).load(root); } catch (CredentialsCantBeLoaded e) { Logger.getInstance(CredentialsManager.class).warn(e); return; } data.setCredentials(credentialsType.getCredentialsKey(), credentials); } | recogniseCredentialType |
285,416 | void (@NotNull Stream<? extends SdkAdditionalData> additionalData, @NotNull CredentialsType<?> credentialsType) { additionalData.forEach(data -> forgetCredentialType(data, credentialsType)); } | forgetCredentialType |
285,417 | void (@Nullable SdkAdditionalData additionalData, @NotNull CredentialsType<?> credentialsType) { if (!(additionalData instanceof RemoteSdkAdditionalData<?> data)) return; if (data.getRemoteConnectionType() != credentialsType) return; Element root = new Element("root"); data.connectionCredentials().save(root); UnknownCredentialsHolder unknownCredentials = CredentialsType.UNKNOWN.createCredentials(); unknownCredentials.setSdkId(data.getSdkId()); try { CredentialsType.UNKNOWN.getHandler(unknownCredentials).load(root); } catch (CredentialsCantBeLoaded e) { Logger.getInstance(CredentialsManager.class).warn(e); } data.setCredentials(CredentialsType.UNKNOWN.getCredentialsKey(), unknownCredentials); } | forgetCredentialType |
285,418 | String () { return mySdkId; } | getSdkId |
285,419 | void (@NotNull String sdkId) { mySdkId = sdkId; } | setSdkId |
285,420 | void (@NotNull Element element) { if (myElement != null) { JDOMUtil.copyMissingContent(myElement, element); } } | save |
285,421 | void (@NotNull Element element) { myElement = element.clone(); } | load |
285,422 | boolean (Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; UnknownCredentialsHolder holder = (UnknownCredentialsHolder)o; return Objects.equals(mySdkId, holder.mySdkId) && Objects.equals(myElement, holder.myElement); } | equals |
285,423 | int () { return Objects.hash(mySdkId, myElement); } | hashCode |
285,424 | T () { return myHolder; } | getCredentials |
285,425 | String (Matcher matcher) { return matcher.group("keyfile"); } | extractKeyPath |
285,426 | String (Matcher matcher) { return matcher.group("tokenLabel"); } | extractPkcsTokenLabel |
285,427 | String (Matcher matcher) { return matcher.group("username"); } | extractUsername |
285,428 | void () { if (!myDisposed) { myDisposed = true; cancelAllRequests(); if (myExecutorService != EdtExecutorService.getScheduledExecutorInstance()) { myExecutorService.shutdownNow(); } } } | dispose |
285,429 | void () { LOG.assertTrue(!myDisposed, "Already disposed"); } | checkDisposed |
285,430 | void () { flushPending(); } | showNotify |
285,431 | void (@NotNull Runnable request, int delayMillis, boolean runWithActiveFrameOnly) { if (runWithActiveFrameOnly && !ApplicationManager.getApplication().isActive()) { MessageBus bus = ApplicationManager.getApplication().getMessageBus(); MessageBusConnection connection = bus.connect(this); connection.subscribe(ApplicationActivationListener.TOPIC, new ApplicationActivationListener() { @Override public void applicationActivated(@NotNull IdeFrame ideFrame) { connection.disconnect(); addRequest(request, delayMillis); } }); } else { addRequest(request, delayMillis); } } | addRequest |
285,432 | void (@NotNull IdeFrame ideFrame) { connection.disconnect(); addRequest(request, delayMillis); } | applicationActivated |
285,433 | ModalityState () { if (myThreadToUse != ThreadToUse.SWING_THREAD) return null; Application application = ApplicationManager.getApplication(); if (application == null) return null; return application.getDefaultModalityState(); } | getModalityState |
285,434 | void (@NotNull Runnable request, long delayMillis) { _addRequest(request, delayMillis, getModalityState()); } | addRequest |
285,435 | void (@NotNull Runnable request, int delayMillis) { _addRequest(request, delayMillis, getModalityState()); } | addRequest |
285,436 | void (@NotNull Runnable request, int delayMillis) { ThreadingAssertions.assertEventDispatchThread(); assert myActivationComponent != null; _addRequest(request, delayMillis, ModalityState.stateForComponent(myActivationComponent)); } | addComponentRequest |
285,437 | void (@NotNull Runnable request, long delayMillis) { ThreadingAssertions.assertEventDispatchThread(); assert myActivationComponent != null; _addRequest(request, delayMillis, ModalityState.stateForComponent(myActivationComponent)); } | addComponentRequest |
285,438 | void (@NotNull Runnable request, int delayMillis, @Nullable ModalityState modalityState) { LOG.assertTrue(myThreadToUse == ThreadToUse.SWING_THREAD); _addRequest(request, delayMillis, modalityState); } | addRequest |
285,439 | void (@NotNull Runnable request, long delayMillis, @Nullable ModalityState modalityState) { LOG.assertTrue(myThreadToUse == ThreadToUse.SWING_THREAD); _addRequest(request, delayMillis, modalityState); } | addRequest |
285,440 | boolean () { ThreadingAssertions.assertEventDispatchThread(); assert myActivationComponent != null; return myActivationComponent.isShowing(); } | isActivationComponentShowing |
285,441 | void (@NotNull Request requestToSchedule) { requestToSchedule.schedule(); myRequests.add(requestToSchedule); } | add |
285,442 | void () { synchronized (LOCK) { for (Request each : myPendingRequests) { add(each); } myPendingRequests.clear(); } } | flushPending |
285,443 | boolean (@NotNull Runnable request) { synchronized (LOCK) { cancelAndRemoveRequestFrom(request, myRequests); cancelAndRemoveRequestFrom(request, myPendingRequests); return true; } } | cancelRequest |
285,444 | void (@NotNull Runnable request, @NotNull List<Request> list) { for (int i = list.size()-1; i>=0; i--) { Request r = list.get(i); if (r.myTask == request) { r.cancel(); list.remove(i); break; } } } | cancelAndRemoveRequestFrom |
285,445 | int () { synchronized (LOCK) { return cancelAllRequests(myRequests) + cancelAllRequests(myPendingRequests); } } | cancelAllRequests |
285,446 | int (@NotNull List<? extends Request> list) { int count = list.size(); for (Request request : list) { request.cancel(); } list.clear(); return count; } | cancelAllRequests |
285,447 | void () { assert ApplicationManager.getApplication().isUnitTestMode(); List<Runnable> result = new ArrayList<>(); synchronized (LOCK) { for (Request request : myRequests) { Runnable existingTask = request.cancel(); if (existingTask != null) { result.add(existingTask); } } myRequests.clear(); } for (Runnable task : result) { task.run(); } } | drainRequestsInTest |
285,448 | int () { synchronized (LOCK) { return myRequests.size(); } } | getActiveRequestCount |
285,449 | boolean () { synchronized (LOCK) { return myRequests.isEmpty(); } } | isEmpty |
285,450 | void () { try { if (myDisposed) { return; } Runnable task; synchronized (LOCK) { task = myTask; myTask = null; } if (task != null) { runSafely(task); } } catch (ProcessCanceledException ignored) { } } | run |
285,451 | void (@Nullable Runnable task) { try { if (!myDisposed && task != null) { try (AccessToken ignored = ClientId.withClientId(myClientId)) { if (myChildContext != null) { try (AccessToken ignored2 = ThreadContext.installThreadContext(myChildContext.getContext(), true)) { QueueProcessor.runSafely(() -> myChildContext.runAsCoroutine(task)); } } else { QueueProcessor.runSafely(task); } } } } finally { // remove from the list after execution to be able for {@link #waitForAllExecuted(long, TimeUnit)} to wait for completion synchronized (LOCK) { myRequests.remove(this); myFuture = null; } } } | runSafely |
285,452 | void () { if (myModalityState == null) { myFuture = myExecutorService.schedule(Propagation.contextAwareCallable(this), myDelayMillis, TimeUnit.MILLISECONDS); } else { myFuture = EdtScheduledExecutorService.getInstance().schedule((ContextAwareRunnable)this::run, myModalityState, myDelayMillis, TimeUnit.MILLISECONDS); } } | schedule |
285,453 | String () { Runnable task; synchronized (LOCK) { task = myTask; } return super.toString() + (task == null ? "" : ": " + task)+"; delay="+myDelayMillis+"ms"; } | toString |
285,454 | Alarm (@NotNull JComponent component) { PluginException.reportDeprecatedUsage("Alarm#setActivationComponent", "Please use `#Alarm(JComponent, Disposable)` instead"); ThreadingAssertions.assertEventDispatchThread(); myActivationComponent = component; //noinspection ResultOfObjectAllocationIgnored UiNotifyConnector.installOn(component, new Activatable() { @Override public void showNotify() { flushPending(); } }); return this; } | setActivationComponent |
285,455 | void () { flushPending(); } | showNotify |
285,456 | boolean () { return myDisposed; } | isDisposed |
285,457 | AlarmFactory () { return ourInstance; } | getInstance |
285,458 | Alarm () { return new Alarm(); } | create |
285,459 | Alarm (@NotNull Alarm.ThreadToUse threadToUse) { return new Alarm(threadToUse); } | create |
285,460 | Alarm (@NotNull Alarm.ThreadToUse threadToUse, @NotNull Disposable parentDisposable) { return new Alarm(threadToUse, parentDisposable); } | create |
285,461 | void (@NotNull Runnable command) { runOrInvokeAndWaitAboveProgress(command, ModalityState.defaultModalityState()); } | runOrInvokeAndWaitAboveProgress |
285,462 | void (@NotNull Runnable command, @Nullable ModalityState modalityState) { if (modalityState == null) modalityState = ModalityState.defaultModalityState(); ApplicationManager.getApplication().invokeAndWait(command, modalityState); } | runOrInvokeAndWaitAboveProgress |
285,463 | void (@NotNull Runnable command, @Nullable ModalityState modalityState, @NotNull Project project) { if (modalityState == null) modalityState = ModalityState.defaultModalityState(); ModalityUiUtil.invokeLaterIfNeeded(modalityState, project.getDisposed(), command); } | runOrInvokeLaterAboveProgress |
285,464 | void (ProgressIndicator pi) { if (pi.isShowing()) { final long maxWait = 3000; final long start = System.currentTimeMillis(); while ((!pi.isPopupWasShown()) && (pi.isRunning()) && (System.currentTimeMillis() - maxWait < start)) { final Object lock = new Object(); //noinspection SynchronizationOnLocalVariableOrMethodParameter synchronized (lock) { try { lock.wait(100); } catch (InterruptedException e) { // } } } ProgressManager.checkCanceled(); } } | execute |
285,465 | int () { return myStatusCode; } | getStatusCode |
285,466 | String () { return myUrl; } | getUrl |
285,467 | String () { return super.toString() + ". Status=" + myStatusCode + ", Url=" + myUrl; } | toString |
285,468 | RequestBuilder (@NotNull Url url) { return request(url.toExternalForm()); } | request |
285,469 | RequestBuilder (@NotNull String url) { return new RequestBuilderImpl(url, null); } | request |
285,470 | RequestBuilder (@NotNull String url) { return new RequestBuilderImpl(url, connection -> ((HttpURLConnection)connection).setRequestMethod("HEAD")); } | head |
285,471 | RequestBuilder (@NotNull String url) { return new RequestBuilderImpl(url, connection -> ((HttpURLConnection)connection).setRequestMethod("DELETE")); } | delete |
285,472 | RequestBuilder (@NotNull String url, @Nullable String contentType) { return requestWithBody(url, "DELETE", contentType, null); } | delete |
285,473 | RequestBuilder (@NotNull String url, @Nullable String contentType) { return requestWithBody(url, "POST", contentType, null); } | post |
285,474 | RequestBuilder (@NotNull String url, @Nullable String contentType) { return requestWithBody(url, "PUT", contentType, null); } | put |
285,475 | RequestBuilder (@NotNull String url, @Nullable String contentType) { return requestWithBody(url, "POST", contentType, connection -> connection.setRequestProperty("X-HTTP-Method-Override", "PATCH")); } | patch |
285,476 | RequestBuilder (@NotNull String url, @NotNull String bytes) { return requestWithBody(url, "GET", null, connection -> connection.setRequestProperty("Range", "bytes=" + bytes)); } | requestWithRange |
285,477 | RequestBuilder (String url, String requestMethod, @Nullable String contentType, @Nullable ConnectionTuner tuner) { return new RequestBuilderImpl(url, rawConnection -> { HttpURLConnection connection = (HttpURLConnection)rawConnection; connection.setRequestMethod(requestMethod); connection.setDoOutput(true); if (contentType != null) connection.setRequestProperty("Content-Type", contentType); if (tuner != null) tuner.tune(connection); }); } | requestWithBody |
285,478 | String (@NotNull IOException e, @NotNull Request request, boolean includeHeaders) { StringBuilder builder = new StringBuilder(); builder.append("Cannot download '").append(request.getURL()).append("': ").append(e.getMessage()); try { URLConnection connection = request.getConnection(); if (includeHeaders) { builder.append("\n, headers: ").append(connection.getHeaderFields()); } if (connection instanceof HttpURLConnection httpConnection) { builder.append("\n, response: ").append(httpConnection.getResponseCode()).append(' ').append(httpConnection.getResponseMessage()); } } catch (Throwable ignored) { } return builder.toString(); } | createErrorMessage |
285,479 | RequestBuilder (int value) { myConnectTimeout = value; return this; } | connectTimeout |
285,480 | RequestBuilder (int value) { myTimeout = value; return this; } | readTimeout |
285,481 | RequestBuilder (int redirectLimit) { myRedirectLimit = redirectLimit; return this; } | redirectLimit |
285,482 | RequestBuilder (boolean value) { myGzip = value; return this; } | gzip |
285,483 | RequestBuilder (boolean forceHttps) { myForceHttps = forceHttps; return this; } | forceHttps |
285,484 | RequestBuilder (boolean useProxy) { myUseProxy = useProxy; return this; } | useProxy |
285,485 | RequestBuilder (boolean isReadResponseOnError) { myIsReadResponseOnError = isReadResponseOnError; return this; } | isReadResponseOnError |
285,486 | RequestBuilder (@Nullable HostnameVerifier hostnameVerifier) { myHostnameVerifier = hostnameVerifier; return this; } | hostNameVerifier |
285,487 | RequestBuilder (@Nullable String userAgent) { myUserAgent = userAgent; return this; } | userAgent |
285,488 | RequestBuilder () { Application app = ApplicationManager.getApplication(); if (app != null && !app.isDisposed()) { String productName = ApplicationNamesInfo.getInstance().getFullProductName(); String version = ApplicationInfo.getInstance().getBuild().asStringWithoutProductCode(); return userAgent(productName + '/' + version); } else { return userAgent("IntelliJ"); } } | productNameAsUserAgent |
285,489 | RequestBuilder (@Nullable String mimeType) { myAccept = mimeType; return this; } | accept |
285,490 | RequestBuilder (@Nullable ConnectionTuner tuner) { myTuner = tuner; return this; } | tuner |
285,491 | RequestBuilder (boolean shouldThrow) { myThrowStatusCodeException = shouldThrow; return this; } | throwStatusCodeException |
285,492 | String () { return myUrl; } | getURL |
285,493 | boolean () { return Patches.JDK_BUG_ID_8032832 && SystemProperties.getBooleanProperty("http.requests.override.context.classloader", true); } | shouldOverrideContextClassLoader |
285,494 | void (@NotNull String url, @NotNull HttpsURLConnection connection) { if (!LoadingState.COMPONENTS_REGISTERED.isOccurred()) { LOG.info("Application is not initialized yet; Using default SSL configuration to connect to " + url); return; } try { SSLSocketFactory factory = IdeUiService.getInstance().getSslSocketFactory(); if (factory == null) { LOG.info("SSLSocketFactory is not defined by the IDE Certificate Manager; Using default SSL configuration to connect to " + url); } else { connection.setSSLSocketFactory(factory); } } catch (Throwable e) { LOG.info("Problems configuring SSL connection to " + url, e); } } | configureSslConnection |
285,495 | void (URLConnection connection) { for (Map.Entry<String, List<String>> header : connection.getRequestProperties().entrySet()) { for (String headerValue : header.getValue()) { if (headerValue.indexOf('\0') >= 0) { connection.setRequestProperty(header.getKey(), null); LOG.error(String.format("Problem during request to '%s'. Header's '%s' value contains NUL bytes: '%s'. Omitting this header.", connection.getURL().toString(), header.getKey(), headerValue)); break; } } } } | checkRequestHeadersForNulBytes |
285,496 | String () { return requestingHost; } | getRequestingHost |
285,497 | void (String requestingHost) { this.requestingHost = requestingHost; } | setRequestingHost |
285,498 | InetAddress () { return requestingSite; } | getRequestingSite |
285,499 | void (InetAddress requestingSite) { this.requestingSite = requestingSite; } | setRequestingSite |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.