file_path
stringlengths
57
191
method_name
stringlengths
2
80
method_block
stringlengths
8
32.6k
method_name_pointers
sequencelengths
2
2
method_signature
stringlengths
7
4.42k
length
int64
8
32.6k
__index_level_0__
int64
0
516k
../intellij-community/platform/util/text-matching/src/com/intellij/psi/codeStyle/MinusculeMatcherImpl.java
isWildcard
private boolean isWildcard(int patternIndex) { if (patternIndex >= 0 && patternIndex < myPattern.length) { char pc = myPattern[patternIndex]; return pc == ' ' || pc == '*'; } return false; }
[ 16, 26 ]
private boolean isWildcard(int patternIndex)
216
229,555
../intellij-community/java/java-impl/src/com/intellij/psi/formatter/java/JavaFormatterUtil.java
isAssignment
public static boolean isAssignment(ASTNode node) { return ASSIGNMENT_ELEMENT_TYPES.contains(node.getElementType()); }
[ 22, 34 ]
public static boolean isAssignment(ASTNode node)
123
372,102
../intellij-community/platform/platform-impl/src/com/intellij/util/ScrambledOutputStream.java
write
@Override public void write(byte[] b, int off, int len) throws IOException { byte[] newBytes = new byte[len]; for (int i = 0; i < len; i++) { newBytes[i] = (byte)(b[off + i] ^ MASK); } myOriginalStream.write(newBytes, 0, len); }
[ 24, 29 ]
@Override public void write(byte[] b, int off, int len)
254
314,706
../intellij-community/RegExpSupport/src/org/intellij/lang/regexp/RegExpLanguageHost.java
isValidNamedCharacter
default boolean isValidNamedCharacter(RegExpNamedCharacter namedCharacter) { return supportsNamedCharacters(namedCharacter); }
[ 16, 37 ]
default boolean isValidNamedCharacter(RegExpNamedCharacter namedCharacter)
132
514,613
../intellij-community/plugins/devkit/devkit-core/src/dom/ModuleComponents.java
getComponents
@NotNull List<? extends Component.Module> getComponents();
[ 42, 55 ]
@NotNull List<? extends Component.Module> getComponents()
58
157,662
../intellij-community/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/artifacts/nodes/PackagingElementNode.java
getPackagingElements
public List<E> getPackagingElements() { return myPackagingElements; }
[ 15, 35 ]
public List<E> getPackagingElements()
75
363,205
../intellij-community/java/manifest/src/org/jetbrains/lang/manifest/highlighting/MissingFinalNewlineInspection.java
checkFile
@Override public ProblemDescriptor[] checkFile(@NotNull PsiFile file, @NotNull InspectionManager manager, boolean isOnTheFly) { if (file instanceof ManifestFile) { String text = file.getText(); if (text != null && !text.isEmpty() && !StringUtil.endsWith(text, "\n")) { List<Section> sections = ((ManifestFile)file).getSections(); assert !sections.isEmpty() : text; Section section = sections.get(sections.size() - 1); ModCommandAction action = new AddNewlineQuickFix(section); ProblemDescriptor descriptor = manager.createProblemDescriptor( section.getLastChild(), ManifestBundle.message("inspection.newline.message"), LocalQuickFix.from(action), ProblemHighlightType.GENERIC_ERROR_OR_WARNING, isOnTheFly ); return new ProblemDescriptor[]{descriptor}; } } return null; }
[ 39, 48 ]
@Override public ProblemDescriptor[] checkFile(@NotNull PsiFile file, @NotNull InspectionManager manager, boolean isOnTheFly)
881
356,882
../intellij-community/python/gen/com/jetbrains/python/console/protocol/PythonConsoleBackendService.java
read
@Override public void read(org.apache.thrift.protocol.TProtocol prot, evaluate_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.expression = iprot.readString(); struct.setExpressionIsSet(true); } if (incoming.get(1)) { struct.doTrunc = iprot.readBool(); struct.setDoTruncIsSet(true); } }
[ 28, 32 ]
@Override public void read(org.apache.thrift.protocol.TProtocol prot, evaluate_args struct)
568
5,102
../intellij-community/java/java-psi-impl/src/com/intellij/psi/impl/light/LightRecordCanonicalConstructor.java
hashCode
@Override public int hashCode() { return getPrototype().hashCode(); }
[ 25, 33 ]
@Override public int hashCode()
83
498,501
../intellij-community/plugins/gradle/src/org/jetbrains/plugins/gradle/model/data/CompositeBuildData.java
getCompositeParticipants
@NotNull public List<BuildParticipant> getCompositeParticipants() { return myCompositeParticipants; }
[ 41, 65 ]
@NotNull public List<BuildParticipant> getCompositeParticipants()
109
142,448
../intellij-community/platform/util/ui/src/com/intellij/util/ui/UIUtil.java
getViewFactory
@Override public ViewFactory getViewFactory() { return ExtendableHTMLViewFactory.DEFAULT_WORD_WRAP; }
[ 33, 47 ]
@Override public ViewFactory getViewFactory()
115
228,217
../intellij-community/json/src/com/jetbrains/jsonSchema/remote/JsonFileResolver.java
isRemoteEnabled
public static boolean isRemoteEnabled(Project project) { return !ApplicationManager.getApplication().isUnitTestMode() && JsonSchemaCatalogProjectConfiguration.getInstance(project).isRemoteActivityEnabled(); }
[ 22, 37 ]
public static boolean isRemoteEnabled(Project project)
225
513,530
../intellij-community/java/debugger/impl/src/com/intellij/debugger/engine/SuspendOtherThreadsRequestor.java
shouldIgnoreThreadFiltering
@Override public boolean shouldIgnoreThreadFiltering() { return true; }
[ 27, 54 ]
@Override public boolean shouldIgnoreThreadFiltering()
79
387,409
../intellij-community/platform/lang-impl/src/com/intellij/execution/impl/ConsoleViewImpl.java
mouseDragged
@Override public void mouseDragged(MouseEvent e) { updateStickToEndState(editor, false); }
[ 28, 40 ]
@Override public void mouseDragged(MouseEvent e)
110
202,388
../intellij-community/platform/lang-impl/src/com/intellij/util/indexing/impl/storage/VfsAwareMapReduceIndex.java
isIndexConfigurationUpToDate
protected FileIndexingState isIndexConfigurationUpToDate(int fileId, @NotNull IndexedFile file) { return FileIndexingState.OUT_DATED; }
[ 28, 56 ]
protected FileIndexingState isIndexConfigurationUpToDate(int fileId, @NotNull IndexedFile file)
141
197,665
../intellij-community/plugins/groovy/groovy-psi/src/org/jetbrains/plugins/groovy/codeInspection/metrics/ReturnPointCountVisitor.java
getCount
public int getCount() { return m_count; }
[ 11, 19 ]
public int getCount()
47
162,448
../intellij-community/xml/xml-analysis-impl/src/com/intellij/codeInspection/htmlInspections/HtmlLocalInspectionTool.java
isEnabledByDefault
@Override public boolean isEnabledByDefault() { return true; }
[ 27, 45 ]
@Override public boolean isEnabledByDefault()
70
507,952
../intellij-community/notebooks/visualization/src/org/jetbrains/plugins/notebooks/visualization/r/inlays/table/filters/gui/editor/ChoicesListModel.java
index
public Choice index(int position) { this.idx = position; return this; }
[ 14, 19 ]
public Choice index(int position)
103
515,536
../intellij-community/platform/lang-api/src/com/intellij/framework/FrameworkAvailabilityCondition.java
isAvailableFor
@Override public boolean isAvailableFor(@NotNull FrameworkSupportModel model) { return true; }
[ 29, 43 ]
@Override public boolean isAvailableFor(@NotNull FrameworkSupportModel model)
108
215,657
../intellij-community/java/debugger/impl/src/com/intellij/debugger/ui/tree/render/EnumerationChildrenRenderer.java
setChildren
public void setChildren(List<ChildInfo> children) { myChildren = children; }
[ 12, 23 ]
public void setChildren(List<ChildInfo> children)
82
384,686
../intellij-community/platform/diff-impl/src/com/intellij/diff/tools/util/side/OnesideDiffViewer.java
onInit
@Override protected void onInit() { super.onInit(); myPanel.setPersistentNotifications(DiffUtil.createCustomNotifications(this, myContext, myRequest)); DiffTitleHandler.createHandler(() -> createTitle(), myContentPanel, myRequest, this); }
[ 27, 33 ]
@Override protected void onInit()
255
273,205
../intellij-community/platform/core-impl/src/com/intellij/psi/impl/PsiManagerImpl.java
isDisposed
@Override public boolean isDisposed() { return myProject.isDisposed(); }
[ 27, 37 ]
@Override public boolean isDisposed()
80
184,775
../intellij-community/platform/core-api/src/com/intellij/psi/stubs/StubInputStream.java
readUTFFast
public @NotNull String readUTFFast() throws IOException { return IOUtil.readUTF(this); }
[ 23, 34 ]
public @NotNull String readUTFFast()
94
294,130
../intellij-community/plugins/groovy/src/org/jetbrains/plugins/groovy/config/GroovyLibraryPresentationProviderBase.java
getDescription
@Override public String getDescription(@NotNull GroovyLibraryProperties properties) { final String version = properties.getVersion(); if (version == null) { return GroovyBundle.message("framework.0.library", getLibraryCategoryName()); } else { return GroovyBundle.message("framework.0.library.version.1", getLibraryCategoryName(), version); } }
[ 26, 40 ]
@Override public String getDescription(@NotNull GroovyLibraryProperties properties)
380
169,258
../intellij-community/plugins/hg4idea/src/org/zmlx/hg4idea/provider/HgChangeProvider.java
process
@Override void process(Project project, VcsKey vcsKey, ChangelistBuilder builder, HgRevisionNumber currentNumber, HgRevisionNumber parentRevision, HgFile beforeFile, HgFile afterFile) { //DO NOTHING }
[ 21, 28 ]
@Override void process(Project project, VcsKey vcsKey, ChangelistBuilder builder, HgRevisionNumber currentNumber, HgRevisionNumber parentRevision, HgFile beforeFile, HgFile afterFile)
236
138,467
../intellij-community/java/java-impl/src/com/intellij/lang/OuterModelsModificationTracker.java
beforeChildAddition
@Override public void beforeChildAddition(@NotNull PsiTreeChangeEvent event) { processChange(event, event.getParent(), event.getChild()); }
[ 26, 45 ]
@Override public void beforeChildAddition(@NotNull PsiTreeChangeEvent event)
153
370,742
../intellij-community/plugins/java-i18n/src/com/intellij/codeInspection/i18n/TitleCapitalizationInspection.java
getPropertyArgument
@Nullable private static Property getPropertyArgument(UCallExpression arg) { List<UExpression> args = arg.getValueArguments(); if (!args.isEmpty()) { return JavaI18nUtil.resolveProperty(args.get(0)); } return null; }
[ 36, 55 ]
@Nullable private static Property getPropertyArgument(UCallExpression arg)
242
55,080
../intellij-community/platform/platform-impl/src/com/intellij/openapi/fileChooser/tree/FileNode.java
getIcon
public Icon getIcon() { return myIcon.get(); }
[ 12, 19 ]
public Icon getIcon()
52
321,118
../intellij-community/platform/execution/src/com/intellij/execution/target/value/TargetValue.java
create
static <V> TargetValue<V> create(@NotNull V localValue, @NotNull Promise<V> targetValue){ return new PromiseBasedTargetValue<>(localValue, targetValue); }
[ 26, 32 ]
static <V> TargetValue<V> create(@NotNull V localValue, @NotNull Promise<V> targetValue)
160
276,321
../intellij-community/platform/platform-impl/src/com/intellij/openapi/ui/impl/DialogWrapperPeerImpl.java
setAppIcons
@Override public void setAppIcons() { AppUIUtilKt.updateAppWindowIcon(getWindow()); }
[ 24, 35 ]
@Override public void setAppIcons()
93
317,358
../intellij-community/java/java-analysis-impl/src/com/siyeh/ig/psiutils/EquivalenceChecker.java
codeBlocksAreEquivalent
public boolean codeBlocksAreEquivalent(@Nullable PsiCodeBlock block1, @Nullable PsiCodeBlock block2) { return codeBlocksMatch(block1, block2).isExactMatch(); }
[ 15, 38 ]
public boolean codeBlocksAreEquivalent(@Nullable PsiCodeBlock block1, @Nullable PsiCodeBlock block2)
165
344,468
../intellij-community/platform/duplicates-analysis/src/com/intellij/dupLocator/iterators/SiblingNodeIterator.java
hasNext
@Override public boolean hasNext() { return current != null; }
[ 27, 34 ]
@Override public boolean hasNext()
70
281,556
../intellij-community/platform/code-style-api/src/com/intellij/formatting/SpacingBuilder.java
parentDependentLFSpacing
public SpacingBuilder parentDependentLFSpacing(int minSpaces, int maxSpaces, boolean keepLineBreaks, int keepBlankLines) { for (RuleCondition condition : myConditions) { myRules.add(new DependentLFSpacingRule(condition, minSpaces, maxSpaces, keepLineBreaks, keepBlankLines)); } return SpacingBuilder.this; }
[ 22, 46 ]
public SpacingBuilder parentDependentLFSpacing(int minSpaces, int maxSpaces, boolean keepLineBreaks, int keepBlankLines)
337
277,049
../intellij-community/python/python-psi-impl/src/com/jetbrains/python/psi/PyUtil.java
turnDirIntoInit
@Nullable public static PsiElement turnDirIntoInit(@Nullable PsiElement target) { if (target instanceof PsiDirectory dir) { final PsiFile initStub = dir.findFile(PyNames.INIT_DOT_PYI); if (initStub != null && !PyiStubSuppressor.isIgnoredStub(initStub)) { return initStub; } final PsiFile initFile = dir.findFile(PyNames.INIT_DOT_PY); if (initFile != null) { return initFile; // ResolveImportUtil will extract directory part as needed, everyone else are better off with a file. } else { return null; } // dir without __init__.py does not resolve } else { return target; } // don't touch non-dirs }
[ 37, 52 ]
@Nullable public static PsiElement turnDirIntoInit(@Nullable PsiElement target)
694
9,650
../intellij-community/python/gen/com/jetbrains/python/console/protocol/PythonConsoleBackendService.java
equals
public boolean equals(evaluate_result that) { if (that == null) return false; if (this == that) return true; boolean this_present_success = true && this.isSetSuccess(); boolean that_present_success = true && that.isSetSuccess(); if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; if (!this.success.equals(that.success)) return false; } boolean this_present_unhandledException = true && this.isSetUnhandledException(); boolean that_present_unhandledException = true && that.isSetUnhandledException(); if (this_present_unhandledException || that_present_unhandledException) { if (!(this_present_unhandledException && that_present_unhandledException)) return false; if (!this.unhandledException.equals(that.unhandledException)) return false; } return true; }
[ 15, 21 ]
public boolean equals(evaluate_result that)
984
5,128
../intellij-community/platform/diff-impl/src/com/intellij/diff/merge/MergeRequestProcessor.java
updateBottomActions
private void updateBottomActions() { Action applyLeft = myViewer.getResolveAction(MergeResult.LEFT); Action applyRight = myViewer.getResolveAction(MergeResult.RIGHT); Action resolveAction = myViewer.getResolveAction(MergeResult.RESOLVED); Action cancelAction = myViewer.getResolveAction(MergeResult.CANCEL); if (resolveAction != null) { resolveAction.putValue(DialogWrapper.DEFAULT_ACTION, true); new DumbAwareAction() { @Override public void actionPerformed(@NotNull AnActionEvent e) { resolveAction.actionPerformed(null); } }.registerCustomShortcutSet(CommonShortcuts.getCtrlEnter(), getRootPane(), this); } List<Action> leftActions = ContainerUtil.packNullables(applyLeft, applyRight); List<Action> rightActions = SystemInfo.isMac ? ContainerUtil.packNullables(cancelAction, resolveAction) : ContainerUtil.packNullables(resolveAction, cancelAction); JRootPane rootPane = getRootPane(); JPanel buttonsPanel = new NonOpaquePanel(new BorderLayout()); buttonsPanel.setBorder(new JBEmptyBorder(UIUtil.PANEL_REGULAR_INSETS)); if (!leftActions.isEmpty()) { buttonsPanel.add(createButtonsPanel(leftActions, rootPane), BorderLayout.WEST); } if (!rightActions.isEmpty()) { buttonsPanel.add(createButtonsPanel(rightActions, rootPane), BorderLayout.EAST); } BorderLayoutPanel toolbarPanel = createFeedbackToolbarPanel(); buttonsPanel.add(toolbarPanel, BorderLayout.CENTER); myButtonsPanel.setContent(buttonsPanel); }
[ 13, 32 ]
private void updateBottomActions()
1,601
274,555
../intellij-community/plugins/java-decompiler/engine/src/org/jetbrains/java/decompiler/modules/decompiler/decompose/DominatorEngine.java
orderStatements
private void orderStatements() { for (Statement stat : statement.getReversePostOrderList()) { colOrderedIDoms.addWithKey(null, stat.id); } }
[ 13, 28 ]
private void orderStatements()
157
33,020
../intellij-community/platform/ide-core/src/com/intellij/ide/dnd/DnDEvent.java
clearDelegatedTarget
void clearDelegatedTarget();
[ 5, 25 ]
void clearDelegatedTarget()
28
247,706
../intellij-community/plugins/maven/src/main/java/org/jetbrains/idea/maven/navigator/structure/BaseDependenciesNode.java
getMenuId
@Override String getMenuId() { return "Maven.DependencyMenu"; }
[ 19, 28 ]
@Override String getMenuId()
71
58,992
../intellij-community/plugins/ui-designer-core/src/com/intellij/designer/designSurface/tools/ToolProvider.java
setArea
public void setArea(@Nullable EditableArea area) { myArea = area; }
[ 12, 19 ]
public void setArea(@Nullable EditableArea area)
73
62,326
../intellij-community/platform/util/src/com/intellij/util/concurrency/SchedulingWrapper.java
checkAlreadyShutdown
private void checkAlreadyShutdown() { if (isShutdown()) { throw new RejectedExecutionException("Already shutdown"); } }
[ 13, 33 ]
private void checkAlreadyShutdown()
135
237,229
../intellij-community/platform/lang-impl/src/com/intellij/codeInsight/intention/impl/FileLevelIntentionComponent.java
handlePanelActionClick
@Override public void handlePanelActionClick(@NotNull EditorNotificationPanel panel, @NotNull HyperlinkEvent event) { PsiDocumentManager.getInstance(project).commitAllDocuments(); ShowIntentionActionsHandler.chooseActionAndInvoke(psiFile, editor, action, text); }
[ 34, 56 ]
@Override public void handlePanelActionClick(@NotNull EditorNotificationPanel panel, @NotNull HyperlinkEvent event)
315
210,404
../intellij-community/platform/lang-impl/src/com/intellij/ide/projectView/impl/nodes/ProjectViewDirectoryHelper.java
getTopLevelModuleRoots
@NotNull List<VirtualFile> getTopLevelModuleRoots(Module module, ViewSettings settings) { return ContainerUtil.filter(ModuleRootManager.getInstance(module).getContentRoots(), root -> { if (!shouldBeShown(root, settings)) return false; VirtualFile parent = root.getParent(); if (parent == null) return true; if (!module.equals(myFileIndex.getModuleForFile(parent, false))) return true; //show inner content root separately only if it won't be shown under outer content root return myFileIndex.isExcluded(parent) && !shouldShowExcludedFiles(settings); }); }
[ 29, 51 ]
@NotNull List<VirtualFile> getTopLevelModuleRoots(Module module, ViewSettings settings)
603
192,727
../intellij-community/platform/lang-impl/src/com/intellij/ide/util/MemberChooser.java
createSouthPanel
@Override protected JComponent createSouthPanel() { JPanel panel = new JPanel(new GridBagLayout()); customizeOptionsPanel(); JPanel optionsPanel = new JPanel(new VerticalFlowLayout()); for (final JComponent component : myOptionControls) { optionsPanel.add(component); } panel.add( optionsPanel, new GridBagConstraints(0, 0, 1, 1, 1, 0, GridBagConstraints.WEST, GridBagConstraints.NONE, JBUI.insetsRight(5), 0, 0) ); if (!myAllowEmptySelection && (myElements == null || myElements.length == 0)) { setOKActionEnabled(false); } panel.add( super.createSouthPanel(), new GridBagConstraints(1, 0, 1, 1, 0, 0, GridBagConstraints.SOUTH, GridBagConstraints.NONE, JBInsets.emptyInsets(), 0, 0) ); return panel; }
[ 33, 49 ]
@Override protected JComponent createSouthPanel()
851
190,532
../intellij-community/platform/xdebugger-impl/src/com/intellij/xdebugger/impl/ui/tree/nodes/MessageTreeNode.java
createInfoMessage
public static MessageTreeNode createInfoMessage(XDebuggerTree tree, @NotNull @Nls String message) { return createInfoMessage(tree, message, null); }
[ 30, 47 ]
public static MessageTreeNode createInfoMessage(XDebuggerTree tree, @NotNull @Nls String message)
154
260,443
../intellij-community/java/java-analysis-impl/src/com/siyeh/ig/psiutils/ReorderingUtils.java
isNecessaryCheck
@Override boolean isNecessaryCheck(PsiExpression condition, boolean negated) { if (negated) return false; if (condition instanceof PsiInstanceOfExpression) { PsiExpression op = ((PsiInstanceOfExpression)condition).getOperand(); return EquivalenceChecker.getCanonicalPsiEquivalence().expressionsAreEquivalent(op, myOperand); } return false; }
[ 22, 38 ]
@Override boolean isNecessaryCheck(PsiExpression condition, boolean negated)
389
344,319
../intellij-community/java/compiler/instrumentation-util/src/com/intellij/compiler/notNullVerification/NotNullVerifyingInstrumenter.java
visitInvokeDynamicInsn
@Override public void visitInvokeDynamicInsn(String name, String descriptor, Handle bootstrapMethodHandle, Object... bootstrapMethodArguments) { myCanBeNull = nextCanBeNullValue(INVOKEDYNAMIC); super.visitInvokeDynamicInsn(name, descriptor, bootstrapMethodHandle, bootstrapMethodArguments); }
[ 26, 48 ]
@Override public void visitInvokeDynamicInsn(String name, String descriptor, Handle bootstrapMethodHandle, Object... bootstrapMethodArguments)
312
492,155
../intellij-community/java/java-impl/src/com/intellij/find/findUsages/JavaUsageTargetProvider.java
getTargets
@Override public UsageTarget @Nullable [] getTargets(@NotNull Editor editor, final @NotNull PsiFile file) { int offset = editor.getCaretModel().getOffset(); PsiElement element = file.findElementAt(TargetElementUtil.adjustOffset(file, editor.getDocument(), offset)); if (element == null) return null; if (element instanceof PsiKeyword && PsiKeyword.THROWS.equals(element.getText())) { return new UsageTarget[]{new PsiElement2UsageTargetAdapter(element)}; } final PsiElement parent = element.getParent(); if (parent instanceof PsiThrowStatement) { return new UsageTarget[] {new PsiElement2UsageTargetAdapter(parent)}; } PsiMethod constructor = getRecordCanonicalConstructor(element, offset); if (constructor instanceof SyntheticElement) { return new UsageTarget[] {new PsiElement2UsageTargetAdapter(constructor)}; } return null; }
[ 44, 54 ]
@Override public UsageTarget @Nullable [] getTargets(@NotNull Editor editor, final @NotNull PsiFile file)
902
372,424
../intellij-community/python/gen/com/jetbrains/python/console/protocol/PythonConsoleBackendService.java
setTableVariable
public execTableCommand_args setTableVariable(@org.apache.thrift.annotation.Nullable java.lang.String tableVariable) { this.tableVariable = tableVariable; return this; }
[ 29, 45 ]
public execTableCommand_args setTableVariable(@org.apache.thrift.annotation.Nullable java.lang.String tableVariable)
185
5,409
../intellij-community/java/debugger/impl/src/com/intellij/debugger/impl/DebuggerContextImpl.java
setPositionCache
public void setPositionCache(SourcePosition position) { //LOG.assertTrue(!myInitialized, "Debugger context is initialized. Cannot change caches"); mySourcePosition = position; }
[ 12, 28 ]
public void setPositionCache(SourcePosition position)
187
383,378
../intellij-community/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/actions/UnshelveSilentlyAction.java
actionPerformed
@Override public void actionPerformed(@NotNull AnActionEvent e) { final Project project = Objects.requireNonNull(getEventProject(e)); FileDocumentManager.getInstance().saveAllDocuments(); DataContext dataContext = e.getDataContext(); ShelveChangesManager.getInstance(project). unshelveSilentlyAsynchronously(project, getShelvedLists(dataContext), getShelveChanges(dataContext), getBinaryShelveChanges(dataContext), null); }
[ 24, 39 ]
@Override public void actionPerformed(@NotNull AnActionEvent e)
486
222,777
../intellij-community/platform/platform-impl/src/com/intellij/ui/ColorPicker.java
changedUpdate
@Override public void changedUpdate(DocumentEvent e) { // ignore }
[ 24, 37 ]
@Override public void changedUpdate(DocumentEvent e)
74
310,513
../intellij-community/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/GeneralProjectSettingsElement.java
hashCode
@Override public int hashCode() { return 0; }
[ 23, 31 ]
@Override public int hashCode()
53
362,434
../intellij-community/platform/xdebugger-impl/src/com/intellij/xdebugger/impl/breakpoints/XBreakpointItem.java
setEnabled
@Override public void setEnabled(boolean state) { myBreakpoint.setEnabled(state); }
[ 24, 34 ]
@Override public void setEnabled(boolean state)
91
261,825
../intellij-community/java/java-psi-impl/src/com/intellij/psi/impl/compiled/ClsTypeParameterImpl.java
isInterface
@Override public boolean isInterface() { return false; }
[ 27, 38 ]
@Override public boolean isInterface()
64
498,212
../intellij-community/java/java-psi-api/src/com/intellij/psi/PsiJavaFile.java
getImplicitlyImportedPackageReferences
@Deprecated @ApiStatus.ScheduledForRemoval PsiJavaCodeReferenceElement @NotNull [] getImplicitlyImportedPackageReferences();
[ 87, 125 ]
@Deprecated @ApiStatus.ScheduledForRemoval PsiJavaCodeReferenceElement @NotNull [] getImplicitlyImportedPackageReferences()
128
488,240
../intellij-community/plugins/gradle/tooling-extension-impl/src/com/intellij/gradle/toolingExtension/impl/modelBuilder/ExtraModelBuilder.java
getRootGradle
@NotNull private static Gradle getRootGradle(@NotNull Gradle gradle) { Gradle root = gradle; while (root.getParent() != null) { root = root.getParent(); } return root; }
[ 33, 46 ]
@NotNull private static Gradle getRootGradle(@NotNull Gradle gradle)
195
141,049
../intellij-community/platform/vcs-api/src/com/intellij/openapi/vcs/CommittedChangesProvider.java
getForNonLocal
@Nullable default RepositoryLocation getForNonLocal(@NotNull VirtualFile file) { return null; }
[ 39, 53 ]
@Nullable default RepositoryLocation getForNonLocal(@NotNull VirtualFile file)
103
281,983
../intellij-community/python/python-rest/src/com/intellij/python/reStructuredText/RestBundle.java
message
public static @NotNull @Nls String message(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) { return INSTANCE.getMessage(key, params); }
[ 35, 42 ]
public static @NotNull @Nls String message(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params)
180
7,334
../intellij-community/plugins/svn4idea/src/org/jetbrains/idea/svn/integrate/ToBeMergedDialog.java
actionPerformed
@Override public void actionPerformed(@NotNull AnActionEvent e) { myWiseSelection.setAll(); myRevisionsList.repaint(); }
[ 26, 41 ]
@Override public void actionPerformed(@NotNull AnActionEvent e)
140
152,294
../intellij-community/notebooks/visualization/src/org/jetbrains/plugins/notebooks/visualization/r/inlays/table/filters/gui/NonAdaptiveChoicesHandler.java
allFiltersDisabled
@Override public void allFiltersDisabled() { setEnableTableModelEvents(false); }
[ 22, 40 ]
@Override public void allFiltersDisabled()
92
515,370
../intellij-community/xml/xml-psi-impl/src/com/intellij/embedding/MasqueradingPsiBuilderAdapter.java
logPos
@SuppressWarnings({"StringConcatenationInsideStringBufferAppend", "UnusedDeclaration"}) private void logPos() { StringBuilder sb = new StringBuilder(); sb.append("\nmyLexPosition=" + myLexPosition + "/" + myShrunkSequence.size()); if (myLexPosition < myShrunkSequence.size()) { final MyShiftedToken token = myShrunkSequence.get(myLexPosition); sb.append("\nshrunk:" + token.shrunkStart + "," + token.shrunkEnd); sb.append("\nreal:" + token.realStart + "," + token.realEnd); sb.append("\nTT:" + getTokenText()); } sb.append("\ndelegate:"); sb.append("eof=" + myDelegate.eof()); if (!myDelegate.eof()) { //noinspection ConstantConditions sb.append("\nposition:" + myDelegate.getCurrentOffset() + "," + (myDelegate.getCurrentOffset() + myDelegate.getTokenText().length())); sb.append("\nTT:" + myDelegate.getTokenText()); } LOG.info(sb.toString()); }
[ 103, 109 ]
@SuppressWarnings({"StringConcatenationInsideStringBufferAppend", "UnusedDeclaration"}) private void logPos()
929
505,797
../intellij-community/plugins/kotlin/idea/src/org/jetbrains/kotlin/idea/refactoring/safeDelete/KotlinOverridingDialog.java
updateData
void updateData() { fireTableDataChanged(); }
[ 5, 15 ]
void updateData()
65
125,762
../intellij-community/plugins/groovy/groovy-psi/src/org/jetbrains/plugins/groovy/lang/psi/api/statements/typedef/GrTypeDefinitionBody.java
getLBrace
@Nullable PsiElement getLBrace();
[ 23, 32 ]
@Nullable PsiElement getLBrace()
35
167,811
../intellij-community/plugins/git4idea/src/git4idea/repo/GitRepositoryInitializer.java
initRepository
@Override public void initRepository(@NotNull File rootDir) throws VcsException { GitLineHandler handler = new GitLineHandler(null, rootDir, GitCommand.INIT); Git.getInstance().runCommand(handler).throwOnError(); }
[ 24, 38 ]
@Override public void initRepository(@NotNull File rootDir)
226
38,134
../intellij-community/java/java-impl-inspections/src/com/intellij/codeInspection/miscGenerics/RawUseOfParameterizedTypeInspection.java
applyFix
@Override protected void applyFix(@NotNull Project project, @NotNull PsiElement startElement, @NotNull ModPsiUpdater updater) { PsiJavaCodeReferenceElement element = ObjectUtils.tryCast(startElement, PsiJavaCodeReferenceElement.class); if (element == null) return; PsiReferenceParameterList parameterList = element.getParameterList(); if (parameterList == null) return; RemoveRedundantTypeArgumentsUtil.replaceExplicitWithDiamond(parameterList); }
[ 29, 37 ]
@Override protected void applyFix(@NotNull Project project, @NotNull PsiElement startElement, @NotNull ModPsiUpdater updater)
485
380,147
../intellij-community/plugins/git4idea/src/git4idea/repo/GitBranchState.java
getCurrentRevision
public @Nullable String getCurrentRevision() { return currentRevision; }
[ 24, 42 ]
public @Nullable String getCurrentRevision()
78
38,077
../intellij-community/platform/lang-impl/src/com/intellij/refactoring/changeSignature/inplace/InplaceChangeSignature.java
recalculateLocation
@Override public RelativePoint recalculateLocation(@NotNull Balloon object) { int offset = myStableChange.getMethod().getTextOffset(); VisualPosition visualPosition = myEditor.offsetToVisualPosition(offset); Point point = myEditor.visualPositionToXY(new VisualPosition(visualPosition.line, visualPosition.column)); return new RelativePoint(myEditor.getContentComponent(), point); }
[ 37, 56 ]
@Override public RelativePoint recalculateLocation(@NotNull Balloon object)
425
208,221
../intellij-community/java/java-impl-refactorings/src/com/intellij/refactoring/typeMigration/ui/TypeMigrationDialog.java
isIllegalVarargMigration
private boolean isIllegalVarargMigration() { if (!(getMigrationType() instanceof PsiEllipsisType)) return false; for (PsiElement root : myRoots) { if (!(root instanceof PsiParameter parameter)) return true; PsiElement scope = parameter.getDeclarationScope(); if (!(scope instanceof PsiMethod method)) return true; PsiParameterList parameterList = method.getParameterList(); PsiParameter lastParameter = parameterList.getParameter(parameterList.getParametersCount() - 1); if (!parameter.equals(lastParameter)) return true; } return false; }
[ 16, 40 ]
private boolean isIllegalVarargMigration()
615
483,315
../intellij-community/platform/platform-impl/src/com/intellij/openapi/vfs/newvfs/persistent/IPersistentFSRecordsStorage.java
readRecord
R readRecord(final @NotNull RecordForRead record) throws E;
[ 2, 12 ]
R readRecord(final @NotNull RecordForRead record)
59
319,892
../intellij-community/java/java-psi-api/src/com/intellij/codeInsight/NullableNotNullManager.java
isNullable
public boolean isNullable(@NotNull PsiModifierListOwner owner, boolean checkBases) { NullabilityAnnotationInfo info = findEffectiveNullabilityInfo(owner); return info != null && info.getNullability() == Nullability.NULLABLE && (checkBases || info.getInheritedFrom() == null); }
[ 15, 25 ]
public boolean isNullable(@NotNull PsiModifierListOwner owner, boolean checkBases)
287
489,837
../intellij-community/plugins/xpath/xpath-lang/src/org/intellij/lang/xpath/psi/impl/XPath2TypeElementImpl.java
getQName
@Override public PrefixedName getQName() { final ASTNode[] nodes = getNode().getChildren(TokenSet.create(XPathTokenTypes.NCNAME)); if (nodes.length == 0) { final ASTNode node = getNode().findChildByType(XPathTokenTypes.STAR); if (node != null) { return new PrefixedNameImpl(null, node); } } else if (nodes.length == 1) { return new PrefixedNameImpl(nodes[0]); } else if (nodes.length == 2) { return new PrefixedNameImpl(nodes[0], nodes[1]); } return null; }
[ 32, 40 ]
@Override public PrefixedName getQName()
523
50,885
../intellij-community/platform/webSymbols/gen/com/intellij/webSymbols/webTypes/json/BaseContribution.java
setDocUrl
@JsonProperty("doc-url") public void setDocUrl(String docUrl) { this.docUrl = docUrl; }
[ 41, 50 ]
@JsonProperty("doc-url") public void setDocUrl(String docUrl)
103
331,053
../intellij-community/plugins/ui-designer-core/src/com/intellij/designer/actions/DesignerActionPanel.java
getToolbarComponent
public JComponent getToolbarComponent() { return myToolbar; }
[ 18, 37 ]
public JComponent getToolbarComponent()
67
62,690
../intellij-community/platform/indexing-impl/src/com/intellij/util/xml/NanoXmlUtil.java
getRootTagName
public String getRootTagName() { return myRootTagName; }
[ 14, 28 ]
public String getRootTagName()
66
301,284
../intellij-community/plugins/maven/maven3-server-common/src/org/jetbrains/idea/maven/server/embedder/CustomMaven3Artifact.java
setFile
@Override public void setFile(File destination) { myWrapee.setFile(destination); }
[ 24, 31 ]
@Override public void setFile(File destination)
90
55,927
../intellij-community/python/python-psi-impl/src/com/jetbrains/python/psi/impl/stubs/PyFromImportStatementStubImpl.java
isStarImport
@Override public boolean isStarImport() { return myStarImport; }
[ 27, 39 ]
@Override public boolean isStarImport()
72
10,786
../intellij-community/plugins/tasks/tasks-core/jira/src/com/intellij/tasks/jira/jql/psi/impl/JqlAndClauseImpl.java
accept
@Override public void accept(JqlElementVisitor visitor) { visitor.visitJqlAndClause(this); }
[ 24, 30 ]
@Override public void accept(JqlElementVisitor visitor)
100
39,039
../intellij-community/java/java-analysis-impl/src/com/siyeh/ig/bugs/MathRoundingWithIntArgumentInspection.java
visitMethodCallExpression
@Override public void visitMethodCallExpression(@NotNull PsiMethodCallExpression expression) { super.visitMethodCallExpression(expression); if (!MATH_ROUNDING_MATCHERS.matches(expression)) return; PsiExpression[] arguments = expression.getArgumentList().getExpressions(); if (arguments.length != 1) { return; } PsiExpression argument = arguments[0]; PsiType type = argument.getType(); if (type == null) return; if (!PsiTypes.intType().equals(type) && !type.equalsToText(JAVA_LANG_INTEGER)) { return; } registerMethodCallError(expression, expression); }
[ 26, 51 ]
@Override public void visitMethodCallExpression(@NotNull PsiMethodCallExpression expression)
643
346,256
../intellij-community/platform/analysis-impl/src/com/intellij/codeInspection/InspectionToolResultExporter.java
getContent
@NotNull Map<String, Set<RefEntity>> getContent();
[ 39, 49 ]
@NotNull Map<String, Set<RefEntity>> getContent()
52
243,348
../intellij-community/java/java-impl/src/com/intellij/codeInsight/intention/impl/RunRefactoringAction.java
getText
@Override public @NotNull String getText() { return myCommandName; }
[ 35, 42 ]
@Override public @NotNull String getText()
76
373,955
../intellij-community/platform/util/src/com/intellij/serialization/FieldAccessor.java
readDouble
@Override public double readDouble(@NotNull Object o) throws IllegalAccessException { return field.getDouble(o); }
[ 26, 36 ]
@Override public double readDouble(@NotNull Object o)
122
239,767
../intellij-community/plugins/terminal/src/org/jetbrains/plugins/terminal/ShellTerminalWidget.java
getLineNumberAtCursor
int getLineNumberAtCursor() { TerminalTextBuffer textBuffer = getTerminalPanel().getTerminalTextBuffer(); Terminal terminal = getTerminal(); return Math.max(0, Math.min(terminal.getCursorY() - 1, textBuffer.getHeight() - 1)); }
[ 4, 25 ]
int getLineNumberAtCursor()
241
63,289
../intellij-community/platform/remote-servers/api/src/com/intellij/remoteServer/runtime/ServerConnection.java
getServer
@NotNull RemoteServer<?> getServer();
[ 27, 36 ]
@NotNull RemoteServer<?> getServer()
39
265,700
../intellij-community/platform/core-api/src/com/intellij/openapi/application/Application.java
invokeLater
@RequiresBlockingContext void invokeLater(@NotNull Runnable runnable, @NotNull ModalityState state, @NotNull Condition<?> expired);
[ 32, 43 ]
@RequiresBlockingContext void invokeLater(@NotNull Runnable runnable, @NotNull ModalityState state, @NotNull Condition<?> expired)
133
292,662
../intellij-community/jps/jps-builders/gen/org/jetbrains/jps/api/CmdlineRemoteProto.java
clearColumn
public Builder clearColumn() { copyOnWrite(); instance.clearColumn(); return this; }
[ 15, 26 ]
public Builder clearColumn()
130
337,940
../intellij-community/platform/core-impl/src/com/intellij/openapi/application/ex/ApplicationEx.java
runWriteActionWithNonCancellableProgressInDispatchThread
@ApiStatus.Experimental default boolean runWriteActionWithNonCancellableProgressInDispatchThread(@NotNull @NlsContexts.ProgressTitle String title, @Nullable Project project, @Nullable JComponent parentComponent, @NotNull Consumer<? super ProgressIndicator> action) { throw new UnsupportedOperationException(); }
[ 42, 98 ]
@ApiStatus.Experimental default boolean runWriteActionWithNonCancellableProgressInDispatchThread(@NotNull @NlsContexts.ProgressTitle String title, @Nullable Project project, @Nullable JComponent parentComponent, @NotNull Consumer<? super ProgressIndicator> action)
544
183,362
../intellij-community/platform/platform-impl/src/org/jetbrains/io/JsonReaderEx.java
nextUnquotedValue
private String nextUnquotedValue() { int i = position; findNonLiteralCharacter: for (; i < limit; i++) { switch (sourceSequence.charAt(i)) { case '/': case '\\': case ';': case '#': case '=': checkLenient(); // fall-through case '{': case '}': case '[': case ']': case ':': case ',': case ' ': case '\t': case '\f': case '\r': case '\n': break findNonLiteralCharacter; } } String result = sourceSequence.subSequence(position, i).toString(); position = i; return result; }
[ 15, 32 ]
private String nextUnquotedValue()
662
305,577
../intellij-community/platform/util-class-loader/src/com/intellij/util/lang/UrlClassLoader.java
useCache
@ApiStatus.Internal public @NotNull UrlClassLoader.Builder useCache(@NotNull UrlClassLoader.CachePool pool, @NotNull Predicate<? super Path> condition) { useCache = true; cachePool = (CachePoolImpl)pool; cachingCondition = condition; return this; }
[ 63, 71 ]
@ApiStatus.Internal public @NotNull UrlClassLoader.Builder useCache(@NotNull UrlClassLoader.CachePool pool, @NotNull Predicate<? super Path> condition)
280
264,703
../intellij-community/plugins/stream-debugger/src/com/intellij/debugger/streams/trace/TracingResult.java
resolve
@NotNull ResolvedTracingResult resolve(@NotNull ResolverFactory resolverFactory);
[ 33, 40 ]
@NotNull ResolvedTracingResult resolve(@NotNull ResolverFactory resolverFactory)
83
34,757
../intellij-community/platform/platform-impl/src/com/intellij/openapi/ui/popup/MultiSelectionListPopupStep.java
onChosen
@Override public final PopupStep<?> onChosen(T selectedValue, boolean finalChoice) { return onChosen(Collections.singletonList(selectedValue), finalChoice); }
[ 38, 46 ]
@Override public final PopupStep<?> onChosen(T selectedValue, boolean finalChoice)
166
317,542
../intellij-community/jps/jps-builders/src/org/jetbrains/jps/api/CmdlineProtoUtil.java
createBuildCompletedEvent
public static BuilderMessage createBuildCompletedEvent(@Nullable String description, final BuilderMessage.BuildEvent.Status status) { return createBuildEvent(BuilderMessage.BuildEvent.Type.BUILD_COMPLETED, description, status, null, null); }
[ 29, 54 ]
public static BuilderMessage createBuildCompletedEvent(@Nullable String description, final BuilderMessage.BuildEvent.Status status)
247
342,383
../intellij-community/plugins/generate-tostring/src/org/jetbrains/java/generate/element/AbstractElement.java
setDouble
public void setDouble(boolean isDouble) { this.isDouble = isDouble; }
[ 12, 21 ]
public void setDouble(boolean isDouble)
81
52,839
../intellij-community/java/structuralsearch-java/src/com/intellij/structuralsearch/impl/matcher/JavaMatchingVisitor.java
visitClass
@Override public void visitClass(@NotNull PsiClass clazz) { final PsiClass other = myMatchingVisitor.getElement(PsiClass.class); if (other == null) return; if (clazz.hasTypeParameters()) { if (!myMatchingVisitor.setResult(myMatchingVisitor.match(clazz.getTypeParameterList(), other.getTypeParameterList()))) return; } final PsiDocComment comment = clazz.getDocComment(); if (comment != null) { if (!myMatchingVisitor.setResult(myMatchingVisitor.match(comment, other.getDocComment()))) return; } final PsiIdentifier identifier1 = clazz.getNameIdentifier(); final MatchContext context = myMatchingVisitor.getMatchContext(); final CompiledPattern pattern = context.getPattern(); final boolean isTypedVar = pattern.isTypedVar(identifier1); final PsiModifierList modifierList = clazz.getModifierList(); if (modifierList != null && modifierList.getTextLength() > 0) { if (!myMatchingVisitor.setResult(myMatchingVisitor.match(modifierList, other.getModifierList()))) { return; } } final PsiIdentifier identifier2 = other.getNameIdentifier(); if (myMatchingVisitor.setResult((isTypedVar || myMatchingVisitor.matchText(identifier1, identifier2)) && matchClasses(clazz, other)) && isTypedVar) { final PsiElement matchElement = identifier2 == null ? other : identifier2; final SubstitutionHandler handler = (SubstitutionHandler)pattern.getHandler(identifier1); final PsiElement result = other instanceof PsiAnonymousClass ? ((PsiAnonymousClass)other).getBaseClassReference().getReferenceNameElement() : identifier2; if (handler.isSubtype() || handler.isStrictSubtype()) { if (myMatchingVisitor.setResult(matchWithinHierarchy(identifier1, other, handler))) { handler.addResult(result == null ? other : result, context); } } else if (myMatchingVisitor.setResult(handler.validate(matchElement, context))) { handler.addResult(result == null ? other : result, context); } } }
[ 24, 34 ]
@Override public void visitClass(@NotNull PsiClass clazz)
2,143
360,281
../intellij-community/platform/vcs-log/graph/src/com/intellij/vcs/log/graph/impl/print/EdgesInRowGenerator.java
getNeighborU
@NotNull private GraphEdges getNeighborU(int rowIndex) { int upNeighborIndex = getUpNeighborIndex(rowIndex); GraphEdges graphEdges = cacheNU.get(upNeighborIndex); if (graphEdges == null) { graphEdges = getUCorrectEdges(upNeighborIndex); cacheNU.put(upNeighborIndex, graphEdges); } return graphEdges.copyInstance(); }
[ 30, 42 ]
@NotNull private GraphEdges getNeighborU(int rowIndex)
352
279,963
../intellij-community/platform/platform-impl/src/com/intellij/openapi/updateSettings/impl/pluginsAdvertisement/UnknownFeaturesCollector.java
isIgnored
public boolean isIgnored(@NotNull UnknownFeature feature) { return myIgnoredUnknownFeatures.contains(feature); }
[ 15, 24 ]
public boolean isIgnored(@NotNull UnknownFeature feature)
118
321,877
../intellij-community/platform/platform-impl/src/com/intellij/ide/IdeTooltip.java
setTipComponent
protected void setTipComponent(JComponent tipComponent) { myTipComponent = tipComponent; }
[ 15, 30 ]
protected void setTipComponent(JComponent tipComponent)
96
305,824
../intellij-community/plugins/java-decompiler/engine/src/org/jetbrains/java/decompiler/modules/decompiler/stats/Statement.java
replaceExprent
public void replaceExprent(Exprent oldexpr, Exprent newexpr) { // do nothing }
[ 12, 26 ]
public void replaceExprent(Exprent oldexpr, Exprent newexpr)
84
33,083
../intellij-community/platform/lang-api/src/com/intellij/codeInspection/ui/RegExInputVerifier.java
verify
@Override public boolean verify(JComponent input) { return true; }
[ 27, 33 ]
@Override public boolean verify(JComponent input)
74
215,610
../intellij-community/plugins/git4idea/src/git4idea/merge/MergeChangeCollector.java
addAll
private static void addAll(@NotNull UpdatedFiles updates, @NotNull String groupId, @NotNull Set<String> paths) { FileGroup fileGroup = updates.getGroupById(groupId); for (String path : paths) { fileGroup.add(path, GitVcs.getKey(), null); } }
[ 20, 26 ]
private static void addAll(@NotNull UpdatedFiles updates, @NotNull String groupId, @NotNull Set<String> paths)
261
36,327