Unnamed: 0
int64
0
305k
body
stringlengths
7
52.9k
name
stringlengths
1
185
247,500
void () { updateIconAndNotify(); }
entryWasRead
247,501
boolean () { Window activeWindow = KeyboardFocusManager.getCurrentKeyboardFocusManager().getActiveWindow(); return activeWindow instanceof JDialog && ((JDialog)activeWindow).isModal() && (dialog == null || dialog.getWindow() != activeWindow); }
isOtherModalWindowActive
247,502
void () { MessagePool.State state = messagePool.getState(); updateIcon(state); if (state == MessagePool.State.NoErrors) { if (balloon != null) { Disposer.dispose(balloon); } } else if (state == MessagePool.State.UnreadErrors && balloon == null && isActive(frame) && NOTIFICATIONS_ENABLED) { Project project = frame.getPr...
updateIconAndNotify
247,503
boolean (@Nullable IdeFrame frame) { if (frame instanceof ProjectFrameHelper) { frame = ((ProjectFrameHelper)frame).getFrame(); } return frame instanceof Window && ((Window)frame).isActive(); }
isActive
247,504
void (@NotNull Project project) { if (balloon != null) { return; } NotificationDisplayType displayType = NotificationsConfiguration.getNotificationsConfiguration().getDisplayType(GROUP_ID); if (displayType == NotificationDisplayType.NONE) { return; } BalloonLayout layout = frame.getBalloonLayout(); if (layout == null) ...
showErrorNotification
247,505
void (@NotNull AnActionEvent e) { openErrorsDialog(null); }
actionPerformed
247,506
ActionUpdateThread () { return ActionUpdateThread.BGT; }
getActionUpdateThread
247,507
void (@NotNull AnActionEvent e) { e.getPresentation().setEnabledAndVisible(state != MessagePool.State.NoErrors); e.getPresentation().setIcon(icon); }
update
247,508
Path () { return VMOptions.getUserOptionsFile(); }
getUserOptionsFile
247,509
WindowsDefenderChecker () { return ApplicationManager.getApplication().getService(WindowsDefenderChecker.class); }
getInstance
247,510
boolean (@NotNull Project project) { return !Registry.is("ide.check.windows.defender.rules") || PropertiesComponent.getInstance().isTrueValue(IGNORE_STATUS_CHECK) || PropertiesComponent.getInstance(project).isTrueValue(IGNORE_STATUS_CHECK); }
isStatusCheckIgnored
247,511
void (@Nullable Project project, boolean ignore) { var component = project == null ? PropertiesComponent.getInstance() : PropertiesComponent.getInstance(project); if (ignore) { logCaller("scope=" + (project == null ? "global" : project)); component.setValue(IGNORE_STATUS_CHECK, true); } else { component.unsetValue(IGNO...
ignoreStatusCheck
247,512
List<Path> (@NotNull Project project) { var paths = new TreeSet<Path>(); var projectDir = ProjectUtil.guessProjectDir(project); if (projectDir != null && projectDir.getFileSystem() instanceof LocalFileSystem) { paths.add(projectDir.toNioPath()); } paths.add(PathManager.getSystemDir()); EP_NAME.forEachExtensionSafe(ext ...
getPathsToExclude
247,513
boolean (@NotNull Project project, @NotNull List<Path> paths) { logCaller("paths=" + paths); try { var script = PathManager.findBinFile(HELPER_SCRIPT_NAME); if (script == null) { LOG.info("'" + HELPER_SCRIPT_NAME + "' is missing from '" + PathManager.getBinPath() + "'"); return false; } var psh = PathEnvironmentVariabl...
excludeProjectPaths
247,514
void (String prefix) { var options = EnumSet.of(StackWalker.Option.SHOW_HIDDEN_FRAMES, StackWalker.Option.SHOW_REFLECT_FRAMES); var trace = StackWalker.getInstance(options).walk(stack -> stack.skip(1).limit(10) .map(frame -> " " + frame.toStackTraceElement()) .collect(Collectors.joining("\n", prefix + "; called from:\n...
logCaller
247,515
String () { return "https://intellij.com/antivirus-impact-on-build-speed"; }
getConfigurationInstructionsUrl
247,516
int (boolean memoryLow, VMOptions.MemoryKind option) { var current = VMOptions.readOption(option, true); var suggested = 0; if (memoryLow && option == VMOptions.MemoryKind.HEAP) { var cap = Registry.intValue("max.suggested.heap.size"); if (current > 0) { suggested = current + HEAP_INCREMENT; if (suggested > cap) sugges...
getSuggestedValue
247,517
JComponent () { return content.panel; }
createCenterPanel
247,518
void (ActionEvent e) { if (save()) { ((ApplicationEx)ApplicationManager.getApplication()).restart(true); } }
doAction
247,519
void (ActionEvent e) { if (save()) { close(OK_EXIT_CODE); } }
doAction
247,520
boolean () { try { var value = Integer.parseInt(content.newValueField.getText()); EditMemorySettingsService.getInstance().save(myOption, value); return true; } catch (IOException e) { Messages.showErrorDialog(content.newValueField, IoErrorText.message(e), OptionsBundle.message("cannot.save.settings.default.dialog.title...
save
247,521
void (String category, String message) { Logger.getInstance(category).debug(message); }
trace
247,522
boolean (String category) { return Logger.getInstance(category).isDebugEnabled(); }
isTraceEnabled
247,523
void (String category, Throwable exception) { Logger.getInstance(category).error(exception); }
trace
247,524
boolean (String category, String message, boolean condition) { if (condition) return true; Logger.getInstance(category).error(message); return false; }
assertTrue
247,525
void (@NotNull Collection<PluginId> foundPlugins, final boolean hasConflictWithPlatform) { if (foundPlugins.size() < 2) { Logger.getInstance(GuiPluginConflictReporter.class).warn("One should provide at least two conflicting classes to report"); return; } Runnable task = () -> { new PluginConflictDialog(new ArrayList<>(...
reportConflict
247,526
void (@NotNull AnActionEvent e) { int r = myRandom.nextInt(10); if (r < 3) { String message = wrap("Test error message.", r); Messages.showErrorDialog(message, "Test"); } else if (r < 6) { String message = wrap("Test warning message.", r); Messages.showWarningDialog(message, "Test"); } else { String message = wrap("Tes...
actionPerformed
247,527
String (String s, int r) { return r % 2 == 0 ? s : "<html><body><i>" + StringUtil.repeat(s + "<br>", 10) + "</i></body></html>"; }
wrap
247,528
ActionUpdateThread () { return ActionUpdateThread.BGT; }
getActionUpdateThread
247,529
long () { return myTotalCount - mySluggishCount - mySatisfiedCount; }
getSlowCount
247,530
void (@NotNull String processId, long startedAtMs, @NotNull Class<? extends Runnable> runnableClass) { InvocationDescription description = new InvocationDescription(processId, startedAtMs, System.currentTimeMillis()); logTimeMillis(description, runnableClass); }
logTimeMillis
247,531
void (final @NotNull Runnable runnable, final long waitedInQueueNs, final int queueSize, final long executionDurationNs, final boolean wasInSkippedItems) { final long finishedAtMs = System.currentTimeMillis(); final long startedExecutionAtMs = finishedAtMs - NANOSECONDS.toMillis(executionDurationNs); Class<?> runnableO...
runnableTaskFinished
247,532
void (@NotNull AWTEvent event, long startedAtMs) { myCurrentResults.put(event, startedAtMs); }
edtEventStarted
247,533
void (@NotNull AWTEvent event, long finishedAtMs) { InvocationDescription description = new InvocationDescription(toDescription(event.toString()), Objects.requireNonNull(myCurrentResults.remove(event)), finishedAtMs); Class<? extends AWTEvent> eventClass = event.getClass(); myEventsByClass.putIfAbsent(eventClass, new C...
edtEventFinished
247,534
void () { myWrappers.clear(); myDurationsByFqn.clear(); myRunnables.clear(); myEventsByClass.clear(); reschedule(scheduleDumping()); }
reset
247,535
void () { myLogFileWriter.dump(); reschedule(null); myExecutor.shutdownNow(); }
dispose
247,536
void (@Nullable ScheduledFuture<?> future) { if (myFuture != null) { myFuture.cancel(true); } myFuture = future; }
reschedule
247,537
void (@NotNull RunnablesListener publisher) { myEventsByClass.forEach((eventClass, events) -> publisher.eventsProcessed(eventClass, joinPolling(events))); publisher.runnablesProcessed(joinPolling(myRunnables), myDurationsByFqn.values(), myWrappers.values()); }
dumpDescriptions
247,538
boolean (@NotNull Field field) { Class<?> fieldType = field.getType(); return isAssignable(Runnable.class, fieldType) || isAssignable(Callable.class, fieldType); }
isCallableOrRunnable
247,539
void (@NotNull InvocationDescription description, @NotNull Class<?> runnableClass) { int threshold = myThreshold.asInteger(); if (threshold < 0 || threshold > description.getDuration()) { return; // do not measure a time if the threshold is too small } LOG.info(description.toString()); if (runnableClass != Runnable.cla...
logTimeMillis
247,540
void (@NotNull Class<?> runnableClass, long duration) { ClassLoader loader = runnableClass.getClassLoader(); String pluginId = loader instanceof PluginAwareClassLoader ? ((PluginAwareClassLoader)loader).getPluginId().getIdString() : PluginManagerCore.CORE_PLUGIN_ID; StartUpMeasurer.addPluginCost(pluginId, "invokeLater"...
addPluginCost
247,541
String (@NotNull String string) { Matcher matcher = DESCRIPTION_BY_EVENT.matcher(string); MatchResult matchResult = matcher.find() ? matcher.toMatchResult() : null; return matchResult instanceof Matcher ? ((Matcher)matchResult).group("description") : string; }
toDescription
247,542
void (@NotNull Class<? extends AWTEvent> eventClass, @NotNull Collection<InvocationDescription> descriptions) { appendToFile(eventClass.getSimpleName(), descriptions); }
eventsProcessed
247,543
void (@NotNull Collection<InvocationDescription> invocations, @NotNull Collection<InvocationInfo> infos, @NotNull Collection<WrapperDescription> wrappers) { appendToFile("Runnables", invocations); myInfos.addAll(infos); myWrappers.addAll(wrappers); }
runnablesProcessed
247,544
void () { sortAndDumpToFile("Timings", myInfos); sortAndDumpToFile("Wrappers", myWrappers); }
dump
247,545
Throwable () { return myThrowable; }
getThrowable
247,546
String () { return IdeaLogRecordFormatter.formatThrowable(myThrowable); }
getThrowableText
247,547
String () { return myMessage != null ? myMessage : ""; }
getMessage
247,548
List<Attachment> () { return Collections.unmodifiableList(myAttachments); }
getAllAttachments
247,549
IdeaLoggingEvent (@NotNull Throwable throwable, @Nullable String userMessage, @NotNull List<@NotNull Attachment> attachments) { return new IdeaLoggingEvent(userMessage, throwable, new LogMessage(throwable, userMessage, attachments)); }
eventOf
247,550
IdeaLoggingEvent (@NotNull Throwable throwable, @Nullable String userMessage, Attachment @NotNull ... attachments) { return new IdeaLoggingEvent(userMessage, throwable, new LogMessage(throwable, userMessage, List.of(attachments))); }
createEvent
247,551
void () { if (myJitProblemReported.compareAndSet(false, true)) { ApplicationEx app = ApplicationManagerEx.getApplicationEx(); String action = IdeBundle.message(app.isRestartCapable() ? "ide.restart.action" : "ide.shutdown.action"); String title = IdeBundle.message("notification.title.jit.compiler.disabled"); String con...
notifyJitDisabled
247,552
void (@NotNull Notification notification, @NotNull HyperlinkEvent e) { if ("help".equals(e.getDescription())) { HelpManager.getInstance().invokeHelp("Tuning_product_"); } }
hyperlinkActivated
247,553
void (@NotNull AnActionEvent e, @NotNull Notification notification) { notification.expire(); app.restart(true); }
actionPerformed
247,554
CompilerState () { if (myIsCompilationEnabledMethod != null && myIsCompilationStoppedForeverMethod != null) { try { boolean compilationStateCurrentValue = (Boolean)myIsCompilationEnabledMethod.invoke(null); if ((Boolean)myIsCompilationStoppedForeverMethod.invoke(null)) { return CompilerState.STOPPED_FOREVER; } if (comp...
getJitCompilerState
247,555
String () { return myProcessId; }
getProcessId
247,556
long () { return myStartedAt; }
getStartedAt
247,557
Date () { return new Date(getStartedAt()); }
getStartDateTime
247,558
long () { return myFinishedAt; }
getFinishedAt
247,559
long () { return myFinishedAt - myStartedAt; }
getDuration
247,560
int (@NotNull InvocationDescription description) { int result = Long.compare(myStartedAt, description.myStartedAt); return result != 0 ? result : Long.compare(myFinishedAt, description.myFinishedAt); }
compareTo
247,561
boolean (Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; InvocationDescription description = (InvocationDescription)o; return myStartedAt == description.myStartedAt && myFinishedAt == description.myFinishedAt && myProcessId.equals(description.myProcessId); }
equals
247,562
int () { return Objects.hash(myProcessId, myStartedAt, myFinishedAt); }
hashCode
247,563
String () { return "InvocationDescription{" + "processId='" + myProcessId + '\'' + ", duration=" + DEFAULT_DURATION_FORMAT.format(getDuration()) + " ms" + '}'; }
toString
247,564
String () { return myFQN; }
getFQN
247,565
int () { return myCount; }
getCount
247,566
double () { return (double)myDuration / myCount; }
getAverageDuration
247,567
int (@NotNull RunnablesListener.InvocationInfo info) { int result = Integer.compare(info.myCount, myCount); return result != 0 ? result : Double.compare(info.myDuration, myDuration); }
compareTo
247,568
boolean (Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; InvocationInfo info = (InvocationInfo)o; return myCount == info.myCount && myDuration == info.myDuration && myFQN.equals(info.myFQN); }
equals
247,569
int () { return Objects.hash(myFQN, myCount, myDuration); }
hashCode
247,570
String () { return "InvocationsInfo{" + "FQN='" + myFQN + '\'' + ", count=" + myCount + ", averageDuration=" + DEFAULT_DURATION_FORMAT.format(getAverageDuration()) + " ms" + '}'; }
toString
247,571
WrapperDescription (@NotNull String fqn, @Nullable WrapperDescription description) { return new WrapperDescription(fqn, description != null ? description.myUsagesCount : 0); }
computeNext
247,572
String () { return myFQN; }
getFQN
247,573
int () { return myUsagesCount; }
getUsagesCount
247,574
int (@NotNull WrapperDescription description) { return Integer.compare(description.myUsagesCount, myUsagesCount); }
compareTo
247,575
boolean (Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; WrapperDescription description = (WrapperDescription)o; return myUsagesCount == description.myUsagesCount && myFQN.equals(description.myFQN); }
equals
247,576
int () { return Objects.hash(myFQN, myUsagesCount); }
hashCode
247,577
String () { return "WrapperDescription{" + "FQN='" + myFQN + '\'' + ", usagesCount=" + myUsagesCount + '}'; }
toString
247,578
EventLogGroup () { return GROUP; }
getGroup
247,579
void () { CLEAR_ALL.log(); }
logClearAll
247,580
void () { REPORT.log(); }
logReport
247,581
void () { REPORT_ALL.log(); }
logReportAll
247,582
void () { REPORT_AND_CLEAR_ALL.log(); }
logReportAndClearAll
247,583
void (@NotNull Project project) { PROTECTION_CHECK_EVENT.log(project, Status.Skipped); }
protectionCheckSkipped
247,584
void (@NotNull Project project, @Nullable Boolean status) { PROTECTION_CHECK_EVENT.log(project, status == Boolean.TRUE ? Status.Enabled : status == Boolean.FALSE ? Status.Disabled : Status.Error); }
protectionCheckStatus
247,585
void (@NotNull Project project) { NOTIFICATION_EVENT.log(project, Reaction.Auto); }
auto
247,586
void (@NotNull Project project) { NOTIFICATION_EVENT.log(project, Reaction.Manual); }
manual
247,587
void (@NotNull Project project, boolean globally) { NOTIFICATION_EVENT.log(project, globally ? Reaction.GlobalMute : Reaction.ProjectMute); }
suppressed
247,588
void (@NotNull Project project, boolean success) { AUTO_CONFIG_EVENT.log(project, success); }
configured
247,589
EventLogGroup () { return GROUP; }
getGroup
247,590
EditMemorySettingsService () { return ApplicationManager.getApplication().getService(EditMemorySettingsService.class); }
getInstance
247,591
String () { return getData().getThrowableText(); }
getOriginalThrowableText
247,592
Throwable () { return myThrowable; }
getThrowable
247,593
String () { return myThrowable.myStacktrace; }
getThrowableText
247,594
AbstractMessage () { return (AbstractMessage)super.getData(); }
getData
247,595
void (PrintWriter s) { s.print(myStacktrace); }
printStackTrace
247,596
void (PrintStream s) { s.print(myStacktrace); }
printStackTrace
247,597
void () { myWatcher.stop(); }
dispose
247,598
void (@NotNull VMOptions.MemoryKind kind, boolean error) { if (!ourNotifications.add(kind)) return; var message = error ? IdeBundle.message("low.memory.notification.error", kind.label()) : IdeBundle.message("low.memory.notification.warning"); var type = error ? NotificationType.ERROR : NotificationType.WARNING; var not...
showNotification
247,599
ThreadDump (ThreadDump threadDump) { IdeEventQueue eventQueue = IdeEventQueue.getInstance(); String enrichedDump = threadDump.getRawDump() + "\n" + EVENT_COUNTS_HEADER + "\nPosted: " + eventQueue.getPostedEventCount() + "\nPosted (system): " + eventQueue.getPostedSystemEventCount() + "\nReturned: " + eventQueue.getRetu...
addEventCountersTo