Unnamed: 0 int64 0 305k | body stringlengths 7 52.9k | name stringlengths 1 185 |
|---|---|---|
285,500 | int () { return requestingPort; } | getRequestingPort |
285,501 | void (int requestingPort) { this.requestingPort = requestingPort; } | setRequestingPort |
285,502 | String () { return requestingProtocol; } | getRequestingProtocol |
285,503 | void (String requestingProtocol) { this.requestingProtocol = requestingProtocol; } | setRequestingProtocol |
285,504 | String () { return requestingPrompt; } | getRequestingPrompt |
285,505 | void (@Nls String requestingPrompt) { this.requestingPrompt = requestingPrompt; } | setRequestingPrompt |
285,506 | String () { return requestingScheme; } | getRequestingScheme |
285,507 | void (String requestingScheme) { this.requestingScheme = requestingScheme; } | setRequestingScheme |
285,508 | URL () { return requestingURL; } | getRequestingURL |
285,509 | void (URL requestingURL) { this.requestingURL = requestingURL; } | setRequestingURL |
285,510 | void (Authenticator.RequestorType requestingAuthType) { this.requestingAuthType = requestingAuthType; } | setRequestorType |
285,511 | CommonProxy () { return ourInstance; } | getInstance |
285,512 | void () { final ProxySelector aDefault = ProxySelector.getDefault(); if (ourInstance != aDefault) { // to report only once if (ourWrong != aDefault || itsTime()) { LOG.error("ProxySelector.setDefault() was changed to [" + aDefault.toString() + "] - other than com.intellij.util.proxy.CommonProxy.ourInstance.\n" + "This will make some " + ApplicationNamesInfo.getInstance().getProductName() + " network calls fail.\n" + "Instead, methods of com.intellij.util.proxy.CommonProxy should be used for proxying."); ourWrong = aDefault; } ProxySelector.setDefault(ourInstance); ourInstance.ensureAuthenticator(); } assertSystemPropertiesSet(); } | isInstalledAssertion |
285,513 | boolean () { final boolean b = System.currentTimeMillis() - ourErrorTime > ourErrorInterval && ourNotificationCount.get() < 5; if (b) { ourErrorTime = System.currentTimeMillis(); ourNotificationCount.incrementAndGet(); } return b; } | itsTime |
285,514 | void () { Map<String, String> props = getOldStyleProperties(); Map<String, String> was = ourProps.get(); if (Comparing.equal(was, props) && !itsTime()) { return; } ourProps.set(props); String message = getMessageFromProps(props); if (message != null) { // we only intend to somehow report possible misconfiguration // will not show to the user since on macOS this setting is typical LOG.info(message); } } | assertSystemPropertiesSet |
285,515 | void () { Authenticator.setDefault(myAuthenticator); } | ensureAuthenticator |
285,516 | void (final @NotNull String protocol, final @NotNull String host, final int port) { synchronized (myLock) { LOG.debug("no proxy added: " + protocol + "://" + host + ":" + port); myNoProxy.add(Pair.create(new HostInfo(protocol, host, port), Thread.currentThread())); } } | noProxy |
285,517 | void (final @NotNull String protocol, final @NotNull String host, final int port) { synchronized (myLock) { LOG.debug("no proxy removed: " + protocol + "://" + host + ":" + port); myNoProxy.remove(Pair.create(new HostInfo(protocol, host, port), Thread.currentThread())); } } | removeNoProxy |
285,518 | void (final @NotNull String protocol, final @NotNull String host, final int port) { synchronized (myLock) { LOG.debug("no proxy added: " + protocol + "://" + host + ":" + port); myNoProxy.add(Pair.create(new HostInfo(protocol, host, port), Thread.currentThread())); } } | noAuthentication |
285,519 | void (final @NotNull String protocol, final @NotNull String host, final int port) { synchronized (myLock) { LOG.debug("no proxy removed: " + protocol + "://" + host + ":" + port); myNoProxy.remove(Pair.create(new HostInfo(protocol, host, port), Thread.currentThread())); } } | removeNoAuthentication |
285,520 | void (final @NotNull String key, final @NotNull ProxySelector proxySelector) { synchronized (myLock) { LOG.debug("custom set: " + key + ", " + proxySelector); myCustom.put(key, proxySelector); } } | setCustom |
285,521 | void (@NotNull String key, @NotNull NonStaticAuthenticator authenticator) { synchronized (myLock) { LOG.debug("custom auth set: " + key + ", " + authenticator); myCustomAuth.put(key, authenticator); } } | setCustomAuth |
285,522 | void (final @NotNull String key) { synchronized (myLock) { LOG.debug("custom auth removed: " + key); myCustomAuth.remove(key); } } | removeCustomAuth |
285,523 | void (final @NotNull String key) { synchronized (myLock) { LOG.debug("custom set: " + key); myCustom.remove(key); } } | removeCustom |
285,524 | List<Proxy> (@NotNull URL url) { return select(createUri(url)); } | select |
285,525 | boolean (@NotNull String hostName) { return hostName.equalsIgnoreCase("localhost") || hostName.equals("127.0.0.1") || hostName.equals("::1"); } | isLocalhost |
285,526 | List<Proxy> (@Nullable URI uri) { isInstalledAssertion(); if (uri == null) { return NO_PROXY_LIST; } LOG.debug("CommonProxy.select called for " + uri); if (Boolean.TRUE.equals(ourReenterDefence.get())) { return NO_PROXY_LIST; } try { ourReenterDefence.set(Boolean.TRUE); String host = Strings.notNullize(uri.getHost()); if (isLocalhost(host)) { return NO_PROXY_LIST; } final HostInfo info = new HostInfo(uri.getScheme(), host, correctPortByProtocol(uri)); final Map<String, ProxySelector> copy; synchronized (myLock) { if (myNoProxy.contains(Pair.create(info, Thread.currentThread()))) { LOG.debug("CommonProxy.select returns no proxy (in no proxy list) for " + uri); return NO_PROXY_LIST; } copy = Map.copyOf(myCustom); } for (Map.Entry<String, ProxySelector> entry : copy.entrySet()) { List<Proxy> proxies = entry.getValue().select(uri); if (proxies != null && !proxies.isEmpty()) { LOG.debug("CommonProxy.select returns custom proxy for " + uri + ", " + proxies); return proxies; } } return NO_PROXY_LIST; } finally { ourReenterDefence.remove(); } } | select |
285,527 | int (@NotNull URI uri) { if (uri.getPort() == -1) { if ("http".equals(uri.getScheme())) { return ProtocolDefaultPorts.HTTP; } else if ("https".equals(uri.getScheme())) { return ProtocolDefaultPorts.SSL; } } return uri.getPort(); } | correctPortByProtocol |
285,528 | void (URI uri, SocketAddress sa, IOException ioe) { LOG.info("connect failed to " + uri.toString() + ", sa: " + sa.toString(), ioe); final Map<String, ProxySelector> copy; synchronized (myLock) { copy = new HashMap<>(myCustom); } for (Map.Entry<String, ProxySelector> entry : copy.entrySet()) { entry.getValue().connectFailed(uri, sa, ioe); } } | connectFailed |
285,529 | Authenticator () { return myAuthenticator; } | getAuthenticator |
285,530 | PasswordAuthentication () { String siteStr = getRequestingSite() == null ? null : getRequestingSite().toString(); LOG.debug("CommonAuthenticator.getPasswordAuthentication called for " + siteStr); String host = getHostNameReliably(getRequestingHost(), getRequestingSite(), getRequestingURL()); int port = getRequestingPort(); final Map<String, NonStaticAuthenticator> copy; synchronized (myLock) { // for hosts defined as no proxy we will NOT pass authentication to not provoke credentials HostInfo hostInfo = new HostInfo(getRequestingProtocol(), host, port); Pair<HostInfo, Thread> pair = new Pair<>(hostInfo, Thread.currentThread()); if (myNoProxy.contains(pair)) { LOG.debug("CommonAuthenticator.getPasswordAuthentication found host in no proxies set (" + siteStr + ")"); return null; } copy = Map.copyOf(myCustomAuth); } if (!copy.isEmpty()) { for (Map.Entry<String, NonStaticAuthenticator> entry : copy.entrySet()) { final NonStaticAuthenticator authenticator = entry.getValue(); prepareAuthenticator(authenticator); final PasswordAuthentication authentication = authenticator.getPasswordAuthentication(); if (authentication != null) { LOG.debug("CommonAuthenticator.getPasswordAuthentication found custom authenticator for " + siteStr + ", " + entry.getKey() + ", " + authenticator); logAuthentication(authentication); return authentication; } } } return null; } | getPasswordAuthentication |
285,531 | void (NonStaticAuthenticator authenticator) { authenticator.setRequestingHost(getRequestingHost()); authenticator.setRequestingSite(getRequestingSite()); authenticator.setRequestingPort(getRequestingPort()); authenticator.setRequestingProtocol(getRequestingProtocol());//http @NlsSafe String requestingPrompt = getRequestingPrompt(); authenticator.setRequestingPrompt(requestingPrompt); authenticator.setRequestingScheme(getRequestingScheme());//ntlm authenticator.setRequestingURL(getRequestingURL()); authenticator.setRequestorType(getRequestorType()); } | prepareAuthenticator |
285,532 | void (PasswordAuthentication authentication) { if (authentication == null) { LOG.debug("CommonAuthenticator.getPasswordAuthentication returned null"); } else { LOG.debug("CommonAuthenticator.getPasswordAuthentication returned authentication pair with login: " + authentication.getUserName()); } } | logAuthentication |
285,533 | String (final String requestingHost, final InetAddress site, final URL requestingUrl) { String host = requestingHost; if (host == null) { if (site != null) { host = site.getHostName(); } else if (requestingUrl != null) { host = requestingUrl.getHost(); } } host = host == null ? "" : host; return host; } | getHostNameReliably |
285,534 | URI (final URL url) { return VfsUtil.toUri(url.toString()); } | createUri |
285,535 | String () { return myProtocol; } | getProtocol |
285,536 | String () { return myHost; } | getHost |
285,537 | int () { return myPort; } | getPort |
285,538 | boolean (Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } HostInfo info = (HostInfo)o; return myPort == info.myPort && myHost.equals(info.myHost) && Objects.equals(myProtocol, info.myProtocol); } | equals |
285,539 | int () { int result = myProtocol != null ? myProtocol.hashCode() : 0; result = 31 * result + myHost.hashCode(); result = 31 * result + myPort; return result; } | hashCode |
285,540 | Key () { final byte[] bytes = new byte[16]; new SecureRandom().nextBytes(bytes); return new SecretKeySpec(bytes, "AES"); } | generateKey |
285,541 | UiNotifyConnector (@NotNull Component component, @NotNull Activatable target, boolean deferred) { UiNotifyConnector connector = new UiNotifyConnector(component, target, deferred, null); connector.setupListeners(); return connector; } | installOn |
285,542 | UiNotifyConnector (@NotNull Component component, @NotNull Activatable target) { UiNotifyConnector connector = new UiNotifyConnector(component, target, null); connector.setupListeners(); return connector; } | installOn |
285,543 | void () { Component component = Objects.requireNonNull(myComponent.get()); if (ComponentUtil.isShowing(component, false)) { showNotify(); } else { hideNotify(); } if (isDisposed()) { return; } component.addHierarchyListener(this); } | setupListeners |
285,544 | void (@NotNull HierarchyEvent e) { if (isDisposed() || (e.getChangeFlags() & HierarchyEvent.SHOWING_CHANGED) <= 0) { return; } ContextAwareRunnable runnable = () -> { Component c = myComponent.get(); if (isDisposed() || c == null) { return; } if (UIUtil.isShowing(c, false)) { showNotify(); } else { hideNotify(); } }; if (myDeferred) { Application app = ApplicationManager.getApplication(); if (app != null && app.isDispatchThread()) { app.invokeLater(runnable, ModalityState.current()); } else { SwingUtilities.invokeLater(runnable); } } else { runnable.run(); } } | hierarchyChanged |
285,545 | void () { myTarget.hideNotify(); } | hideNotify |
285,546 | void () { myTarget.showNotify(); } | showNotify |
285,547 | void () { myTarget.hideNotify(); } | hideOnDispose |
285,548 | void () { if (isDisposed()) { return; } hideOnDispose(); Component c = myComponent.get(); if (c != null) { c.removeHierarchyListener(this); } myTarget = null; myComponent.clear(); } | dispose |
285,549 | boolean () { return myTarget == null; } | isDisposed |
285,550 | Once (final @NotNull Component component, final @NotNull Activatable target) { Once once = new Once(component, target, null); once.setupListeners(); return once; } | installOn |
285,551 | void () { super.hideNotify(); myHidden = true; disposeIfNeeded(); } | hideNotify |
285,552 | void () { super.showNotify(); myShown = true; disposeIfNeeded(); } | showNotify |
285,553 | void () {} | hideOnDispose |
285,554 | void () { if (myShown && myHidden) { Disposer.dispose(this); } } | disposeIfNeeded |
285,555 | void (@NotNull JComponent c, @NotNull Runnable runnable) { doWhenFirstShown(c, runnable, null); } | doWhenFirstShown |
285,556 | void (@NotNull Component c, @NotNull Runnable runnable) { doWhenFirstShown(c, runnable, null); } | doWhenFirstShown |
285,557 | void (@NotNull Component c, @NotNull Runnable runnable, @Nullable Disposable parent) { doWhenFirstShown(c, new Activatable() { @Override public void showNotify() { runnable.run(); } }, parent); } | doWhenFirstShown |
285,558 | void () { runnable.run(); } | showNotify |
285,559 | void (@NotNull Component c, @NotNull Activatable activatable, @Nullable Disposable parent) { UiNotifyConnector connector = new UiNotifyConnector(c, activatable, null) { @Override protected void showNotify() { super.showNotify(); Disposer.dispose(this); } }; connector.setupListeners(); if (parent != null) { Disposer.register(parent, connector); } } | doWhenFirstShown |
285,560 | void () { super.showNotify(); Disposer.dispose(this); } | showNotify |
285,561 | void (@NotNull Component c) { UIUtil.uiTraverser(c).forEach(child -> { if (UIUtil.isShowing(child, false)) { for (HierarchyListener listener : child.getHierarchyListeners()) { if (listener instanceof UiNotifyConnector notifyConnector && !notifyConnector.isDisposed()) { notifyConnector.showNotify(); } } } }); } | forceNotifyIsShown |
285,562 | void (int timeSpan) { myMergingTimeSpan = timeSpan; if (myActive) { restartTimer(); } } | setMergingTimeSpan |
285,563 | void () { synchronized (myScheduledUpdates) { for (Update each : getAllScheduledUpdates()) { try { each.setRejected(); } catch (ProcessCanceledException ignored) { } } myScheduledUpdates.clear(); finishActivity(); } } | cancelAllUpdates |
285,564 | List<Update> () { return ContainerUtil.concat(myScheduledUpdates.values(), map -> map.keySet()); } | getAllScheduledUpdates |
285,565 | boolean () { return myPassThrough; } | isPassThrough |
285,566 | void (boolean passThrough) { myPassThrough = passThrough; } | setPassThrough |
285,567 | MergingUpdateQueue () { Application app = ApplicationManager.getApplication(); if (app == null || app.isUnitTestMode()) myPassThrough = true; return this; } | usePassThroughInUnitTestMode |
285,568 | void () { showNotify(); } | activate |
285,569 | void () { hideNotify(); } | deactivate |
285,570 | void () { mySuspended = true; } | suspend |
285,571 | void () { mySuspended = false; restartTimer(); } | resume |
285,572 | void () { if (!myActive) { return; } myActive = false; finishActivity(); clearWaiter(); } | hideNotify |
285,573 | void () { if (myActive) { return; } myActive = true; restartTimer(); flush(); } | showNotify |
285,574 | void () { restart(myMergingTimeSpan); } | restartTimer |
285,575 | void (int mergingTimeSpanMillis) { if (!myActive) return; clearWaiter(); if (myExecuteInDispatchThread) { myWaiterForMerge.addRequest(this, mergingTimeSpanMillis, getMergerModalityState()); } else { myWaiterForMerge.addRequest(this, mergingTimeSpanMillis); } } | restart |
285,576 | void () { if (mySuspended) return; flush(); } | run |
285,577 | void () { if (ourQueues != null) { for (MergingUpdateQueue queue : ourQueues) { queue.flush(); } } } | flushAllQueues |
285,578 | void () { if (isEmpty()) { return; } if (myFlushing) { return; } if (!isModalityStateCorrect()) { return; } if (myExecuteInDispatchThread) { EdtInvocationManager.invokeAndWaitIfNeeded(() -> doFlush()); } else { doFlush(); } } | flush |
285,579 | void () { myFlushing = true; try { List<Update> all; synchronized (myScheduledUpdates) { all = getAllScheduledUpdates(); myScheduledUpdates.clear(); } for (Update each : all) { each.setProcessed(); } Update[] array = all.toArray(new Update[0]); Arrays.sort(array, Comparator.comparingInt(Update::getPriority)); execute(array); } finally { myFlushing = false; if (isEmpty()) { finishActivity(); } } } | doFlush |
285,580 | void (JComponent modalityStateComponent) { myModalityStateComponent = modalityStateComponent; } | setModalityStateComponent |
285,581 | boolean () { if (!myExecuteInDispatchThread || myModalityStateComponent == ANY_COMPONENT) { return true; } ModalityState current = ModalityState.current(); ModalityState modalityState = getModalityState(); return !current.dominates(modalityState); } | isModalityStateCorrect |
285,582 | boolean () { return mySuspended; } | isSuspended |
285,583 | boolean (@NotNull Update each) { return each.isDisposed() || each.isExpired(); } | isExpired |
285,584 | void (Update @NotNull [] update) { for (Update each : update) { if (isExpired(each)) { each.setRejected(); continue; } if (each.executeInWriteAction()) { ApplicationManager.getApplication().runWriteAction(() -> execute(each)); } else { execute(each); } } } | execute |
285,585 | void (@NotNull Update each) { if (myDisposed) { each.setRejected(); } else { each.runUpdate(); } } | execute |
285,586 | void (@NotNull Update update) { if (myDisposed) return; if (myTrackUiActivity) { startActivity(); } if (myPassThrough) { update.runUpdate(); finishActivity(); return; } boolean active = myActive; synchronized (myScheduledUpdates) { try { if (eatThisOrOthers(update)) { return; } if (active && myScheduledUpdates.isEmpty()) { restartTimer(); } put(update); if (myRestartOnAdd) { restartTimer(); } } finally { if (isEmpty()) { finishActivity(); } } } } | queue |
285,587 | boolean (@NotNull Update update) { Map<Update, Update> updates = myScheduledUpdates.get(update.getPriority()); if (updates != null && updates.containsKey(update)) { return false; } for (Update eachInQueue : getAllScheduledUpdates()) { if (eachInQueue.actuallyCanEat(update)) { update.setRejected(); return true; } if (update.actuallyCanEat(eachInQueue)) { myScheduledUpdates.get(eachInQueue.getPriority()).remove(eachInQueue); eachInQueue.setRejected(); } } return false; } | eatThisOrOthers |
285,588 | void (@NotNull Update update) { execute(new Update[]{update}); } | run |
285,589 | void (@NotNull Update update) { Map<Update, Update> updates = myScheduledUpdates.cacheOrGet(update.getPriority(), new LinkedHashMap<>()); Update existing = updates.remove(update); if (existing != null && existing != update) { existing.setProcessed(); existing.setRejected(); } updates.put(update, update); } | put |
285,590 | boolean () { return myActive; } | isActive |
285,591 | void () { try { myDisposed = true; myActive = false; finishActivity(); clearWaiter(); cancelAllUpdates(); } finally { if (ourQueues != null) { ourQueues.remove(this); } } } | dispose |
285,592 | void () { myWaiterForMerge.cancelAllRequests(); } | clearWaiter |
285,593 | String () { return myName + " active=" + myActive + " scheduled=" + getAllScheduledUpdates().size(); } | toString |
285,594 | ModalityState () { return myModalityStateComponent == ANY_COMPONENT ? null : getModalityState(); } | getMergerModalityState |
285,595 | ModalityState () { if (myModalityStateComponent == null) { return ModalityState.nonModal(); } return ModalityState.stateForComponent(myModalityStateComponent); } | getModalityState |
285,596 | MergingUpdateQueue (boolean restart) { myRestartOnAdd = restart; return this; } | setRestartTimerOnAdd |
285,597 | boolean () { return myScheduledUpdates.isEmpty(); } | isEmpty |
285,598 | void () { restart(0); } | sendFlush |
285,599 | boolean () { return myFlushing; } | isFlushing |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.