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/xdebugger-impl/src/com/intellij/xdebugger/impl/settings/XDebuggerSettingManagerImpl.java
getGeneralSettings
@Property(surroundWithTag = false) public XDebuggerGeneralSettings getGeneralSettings() { return myGeneralSettings; }
[ 71, 89 ]
@Property(surroundWithTag = false) public XDebuggerGeneralSettings getGeneralSettings()
131
260,532
../intellij-community/xml/relaxng/src/org/intellij/plugins/relaxNG/compact/psi/RncAnnotation.java
getNameElement
@Nullable RncName getNameElement();
[ 20, 34 ]
@Nullable RncName getNameElement()
37
508,759
../intellij-community/plugins/ui-designer-core/src/com/intellij/designer/propertyTable/actions/RestoreDefault.java
update
@Override public void update(@NotNull AnActionEvent e) { setEnabled(myTable, e.getPresentation()); }
[ 24, 30 ]
@Override public void update(@NotNull AnActionEvent e)
108
62,789
../intellij-community/plugins/svn4idea/src/org/jetbrains/idea/svn/dialogs/ServerSSHDialog.java
createActions
@Override protected Action @NotNull [] createActions() { return new Action[]{getOKAction(), getCancelAction()}; }
[ 41, 54 ]
@Override protected Action @NotNull [] createActions()
121
154,142
../intellij-community/python/python-psi-impl/src/com/jetbrains/python/refactoring/PyPsiRefactoringUtil.java
addSuperclasses
public static void addSuperclasses(@NotNull final Project project, @NotNull final PyClass clazz, final PyClass @NotNull ... superClasses) { final Collection<String> superClassNames = new ArrayList<>(); for (final PyClass superClass : Collections2.filter(Arrays.asList(superClasses), NotNullPredicate.INSTANCE)) { if (superClass.getName() != null) { superClassNames.add(superClass.getName()); insertImport(clazz, superClass); } } addSuperClassExpressions(project, clazz, superClassNames, null); }
[ 19, 34 ]
public static void addSuperclasses(@NotNull final Project project, @NotNull final PyClass clazz, final PyClass @NotNull ... superClasses)
619
11,805
../intellij-community/java/java-psi-impl/src/com/intellij/psi/impl/source/resolve/graphInference/constraints/SubtypingConstraint.java
toString
@Override public String toString() { return myS.getPresentableText() + " <= " + myT.getPresentableText(); }
[ 26, 34 ]
@Override public String toString()
115
496,797
../intellij-community/platform/platform-impl/src/com/intellij/openapi/vfs/impl/VirtualFilePointerManagerImpl.java
resolveUrlBasedPointers
synchronized void resolveUrlBasedPointers() { resolveUrlBasedPointers(myLocalRoot); resolveUrlBasedPointers(myTempRoot); }
[ 18, 41 ]
synchronized void resolveUrlBasedPointers()
132
318,663
../intellij-community/plugins/xpath/xpath-lang/src/org/intellij/lang/xpath/context/ContextProvider.java
getNamespaceContext
@Override @Nullable public NamespaceContext getNamespaceContext() { return myNamespaceContext; }
[ 60, 79 ]
@Override @Nullable public NamespaceContext getNamespaceContext()
130
50,472
../intellij-community/platform/usageView/src/com/intellij/usages/similarity/bag/Bag.java
isEmpty
public boolean isEmpty() { return myBag.isEmpty(); }
[ 15, 22 ]
public boolean isEmpty()
58
263,007
../intellij-community/platform/analysis-impl/src/com/intellij/codeInsight/problems/ProblemImpl.java
equals
public boolean equals(final Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; final ProblemImpl problem = (ProblemImpl)o; if (isSyntax != problem.isSyntax) return false; if (!highlightInfo.equals(problem.highlightInfo)) return false; if (!virtualFile.equals(problem.virtualFile)) return false; return true; }
[ 15, 21 ]
public boolean equals(final Object o)
390
246,724
../intellij-community/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/patch/PatchFileType.java
getDefaultExtension
@Override @NotNull @NonNls public String getDefaultExtension() { return "patch"; }
[ 47, 66 ]
@Override @NotNull @NonNls public String getDefaultExtension()
94
222,492
../intellij-community/platform/platform-api/src/com/intellij/ui/mac/screenmenu/Menu.java
setOnClose
public void setOnClose(Component component, Runnable onClose) { this.myOnClose = onClose; this.myComponent = component; }
[ 12, 22 ]
public void setOnClose(Component component, Runnable onClose)
131
252,708
../intellij-community/platform/xdebugger-impl/src/com/intellij/xdebugger/impl/DebuggerSupport.java
getAddToWatchesActionHandler
@NotNull public DebuggerActionHandler getAddToWatchesActionHandler() { return DisabledActionHandler.INSTANCE; }
[ 40, 68 ]
@NotNull public DebuggerActionHandler getAddToWatchesActionHandler()
119
259,485
../intellij-community/platform/util/ui/src/com/intellij/util/ui/EmptyIcon.java
copy
@Override public @NotNull EmptyIconUIResource copy() { return new EmptyIconUIResource(this); }
[ 50, 54 ]
@Override public @NotNull EmptyIconUIResource copy()
108
227,308
../intellij-community/plugins/coverage-common/src/com/intellij/coverage/CoverageSuitesBundle.java
isValid
public boolean isValid() { for (CoverageSuite suite : mySuites) { if (!suite.isValid()) return false; } return true; }
[ 15, 22 ]
public boolean isValid()
138
148,189
../intellij-community/xml/dom-openapi/src/com/intellij/util/xml/converters/DelimitedListConverter.java
createPsiReference
protected @NotNull PsiReference createPsiReference(final PsiElement element, int start, int end, @NotNull ConvertContext context, final GenericDomValue<List<T>> genericDomValue, final boolean delimitersOnly) { return new MyPsiReference(element, getTextRange(genericDomValue, start, end), context, genericDomValue, delimitersOnly); }
[ 32, 50 ]
protected @NotNull PsiReference createPsiReference(final PsiElement element, int start, int end, @NotNull ConvertContext context, final GenericDomValue<List<T>> genericDomValue, final boolean delimitersOnly)
604
505,340
../intellij-community/java/java-psi-api/src/com/intellij/psi/util/PsiExpressionTrimRenderer.java
visitSwitchExpression
@Override public void visitSwitchExpression(@NotNull PsiSwitchExpression switchExpression) { myBuf.append("switch ("); final PsiExpression expression = switchExpression.getExpression(); if (expression != null) { expression.accept(this); } myBuf.append(") {...}"); }
[ 24, 45 ]
@Override public void visitSwitchExpression(@NotNull PsiSwitchExpression switchExpression)
295
489,222
../intellij-community/java/debugger/impl/src/com/intellij/debugger/ui/impl/watch/LocalVariableDescriptorImpl.java
setValueImpl
@Override protected void setValueImpl(@NotNull XExpression expression, @NotNull XModificationCallback callback) { final LocalVariableProxyImpl local = LocalVariableDescriptorImpl.this.getLocalVariable(); if (local != null) { final DebuggerContextImpl debuggerContext = DebuggerManagerEx.getInstanceEx(getProject()).getContext(); set(expression, callback, debuggerContext, new SetValueRunnable() { @Override public void setValue(EvaluationContextImpl evaluationContext, Value newValue) throws ClassNotLoadedException, InvalidTypeException, EvaluateException { debuggerContext.getFrameProxy().setValue(local, preprocessValue(evaluationContext, newValue, getLType())); update(debuggerContext); } @NotNull @Override public Type getLType() throws EvaluateException, ClassNotLoadedException { return local.getType(); } }); } }
[ 31, 43 ]
@Override protected void setValueImpl(@NotNull XExpression expression, @NotNull XModificationCallback callback)
1,207
384,054
../intellij-community/plugins/groovy/groovy-psi/src/org/jetbrains/plugins/groovy/lang/typing/CurriedSignature.java
getParameters
@NotNull @Override public List<CallParameter> getParameters() { final int argumentCount = myArguments.size(); final List<? extends CallParameter> originalParameters = myOriginal.getParameters(); final int originalParameterCount = originalParameters.size(); if (isVararg()) { final CallParameter varargParameter = ContainerUtil.getLastItem(originalParameters); final List<? extends CallParameter> nonVarargParameters = originalParameters.subList(0, originalParameterCount - 1); return ContainerUtil.concat( nonVarargParameters.subList(0, myPosition), nonVarargParameters.subList(myPosition + argumentCount, nonVarargParameters.size() - 1), Collections.singletonList(varargParameter) ); } else { return ContainerUtil.concat( originalParameters.subList(0, myPosition), originalParameters.subList(myPosition + argumentCount, originalParameterCount) ); } }
[ 50, 63 ]
@NotNull @Override public List<CallParameter> getParameters()
961
164,386
../intellij-community/platform/lang-impl/src/com/intellij/find/FindUtil.java
showInUsageView
public static <T> UsageView showInUsageView(@Nullable PsiElement sourceElement, T @NotNull [] targets, @NotNull Function<? super T, ? extends Usage> usageConverter, @NlsContexts.TabTitle @NotNull String title, @Nullable Consumer<? super UsageViewPresentation> presentationSetup, @NotNull Project project) { if (targets.length == 0) return null; final UsageViewPresentation presentation = new UsageViewPresentation(); presentation.setCodeUsagesString(title); presentation.setTabName(title); presentation.setTabText(title); if (presentationSetup != null) { presentationSetup.consume(presentation); } UsageTarget[] usageTargets = sourceElement == null ? UsageTarget.EMPTY_ARRAY : new UsageTarget[]{new PsiElement2UsageTargetAdapter(sourceElement)}; UsageView view = UsageViewManager.getInstance(project).showUsages(usageTargets, Usage.EMPTY_ARRAY, presentation); ProgressManager.getInstance().run(new Task.Backgroundable(project, FindBundle.message("progress.title.updating.usage.view")) { @Override public void run(@NotNull ProgressIndicator indicator) { UsageViewImpl impl = (view instanceof UsageViewImpl) ? (UsageViewImpl)view : null; for (T pointer : targets) { if (impl != null && impl.isDisposed()) break; ApplicationManager.getApplication().runReadAction(() -> { Usage usage = usageConverter.fun(pointer); if (usage != null) { view.appendUsage(usage); } }); } UIUtil.invokeLaterIfNeeded(() -> { if (impl != null && !impl.isDisposed()) impl.expandRoot(); }); } }); return view; }
[ 28, 43 ]
public static <T> UsageView showInUsageView(@Nullable PsiElement sourceElement, T @NotNull [] targets, @NotNull Function<? super T, ? extends Usage> usageConverter, @NlsContexts.TabTitle @NotNull String title, @Nullable Consumer<? super UsageViewPresentation> presentationSetup, @NotNull Project project)
1,919
204,916
../intellij-community/plugins/java-decompiler/engine/src/org/jetbrains/java/decompiler/struct/StructMethod.java
create
public static StructMethod create(DataInputFullStream in, ConstantPool pool, String clQualifiedName, int bytecodeVersion, boolean own) throws IOException { int accessFlags = in.readUnsignedShort(); int nameIndex = in.readUnsignedShort(); int descriptorIndex = in.readUnsignedShort(); String[] values = pool.getClassElement(ConstantPool.METHOD, clQualifiedName, nameIndex, descriptorIndex); Map<String, StructGeneralAttribute> attributes = readAttributes(in, pool); StructCodeAttribute code = (StructCodeAttribute)attributes.remove(StructGeneralAttribute.ATTRIBUTE_CODE.name); if (code != null) { attributes.putAll(code.codeAttributes); } return new StructMethod(accessFlags, attributes, values[0], values[1], bytecodeVersion, own ? code : null); }
[ 27, 33 ]
public static StructMethod create(DataInputFullStream in, ConstantPool pool, String clQualifiedName, int bytecodeVersion, boolean own)
794
31,845
../intellij-community/platform/util/src/com/intellij/util/concurrency/BoundedTaskExecutor.java
isShutdown
@Override public boolean isShutdown() { return myShutdown; }
[ 27, 37 ]
@Override public boolean isShutdown()
68
237,300
../intellij-community/java/debugger/impl/src/com/intellij/debugger/ui/tree/render/BasicRendererProperties.java
isEnabled
public boolean isEnabled() { return myEnabled; }
[ 15, 24 ]
public boolean isEnabled()
54
384,574
../intellij-community/platform/platform-impl/src/com/intellij/formatting/LineWrappingPostFormatProcessor.java
processElement
@Override public @NotNull PsiElement processElement(@NotNull PsiElement source, @NotNull CodeStyleSettings settings) { processText(source.getContainingFile(), source.getTextRange(), settings); return source; }
[ 39, 53 ]
@Override public @NotNull PsiElement processElement(@NotNull PsiElement source, @NotNull CodeStyleSettings settings)
221
329,133
../intellij-community/RegExpSupport/gen/org/intellij/lang/regexp/_RegExLexer.java
zzUnpacktrans
private static int zzUnpacktrans(String packed, int offset, int [] result) { int i = 0; /* index in packed string */ int j = offset; /* index in unpacked array */ int l = packed.length(); while (i < l) { int count = packed.charAt(i++); int value = packed.charAt(i++); value--; do result[j++] = value; while (--count > 0); } return j; }
[ 19, 32 ]
private static int zzUnpacktrans(String packed, int offset, int [] result)
393
514,476
../intellij-community/java/debugger/impl/src/com/intellij/debugger/memory/ui/InstancesView.java
error
@NotNull @Override public Action error(@NotNull JavaReferenceInfo ref, @NotNull String description) { final JavaValue val = new InstanceJavaValue(ref.createDescriptor(myDebugProcess.getProject()), myEvaluationContext, myNodeManager); myErrorsGroup.addErrorValue(description, val); myProceedCount++; myErrorsCount++; updateProgress(); return Action.CONTINUE; }
[ 41, 46 ]
@NotNull @Override public Action error(@NotNull JavaReferenceInfo ref, @NotNull String description)
457
385,731
../intellij-community/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/artifacts/PackagingElementDraggingObject.java
setTargetNode
public void setTargetNode(PackagingElementNode<?> targetNode) { myTargetNode = targetNode; }
[ 12, 25 ]
public void setTargetNode(PackagingElementNode<?> targetNode)
98
362,715
../intellij-community/java/java-analysis-impl/src/com/intellij/codeInsight/daemon/impl/quickfix/WrapObjectWithOptionalOfNullableFix.java
getModifiedArgument
@Nullable @Override protected PsiExpression getModifiedArgument(final PsiExpression expression, final PsiType toType) throws IncorrectOperationException { return getModifiedExpression(expression); }
[ 52, 71 ]
@Nullable @Override protected PsiExpression getModifiedArgument(final PsiExpression expression, final PsiType toType)
216
355,168
../intellij-community/platform/lang-impl/src/com/intellij/util/indexing/EntityIndexingServiceImpl.java
getIterators
@TestOnly @NotNull static List<IndexableFilesIterator> getIterators(@NotNull Project project, @NotNull Collection<? extends EntityChange<?>> events) { EntityStorage entityStorage = WorkspaceModel.getInstance(project).getCurrentSnapshot(); List<IndexableIteratorBuilder> result = getBuildersOnWorkspaceChange(project, events, entityStorage); return IndexableIteratorBuilders.INSTANCE.instantiateBuilders(result, project, entityStorage); }
[ 59, 71 ]
@TestOnly @NotNull static List<IndexableFilesIterator> getIterators(@NotNull Project project, @NotNull Collection<? extends EntityChange<?>> events)
506
197,588
../intellij-community/platform/structuralsearch/source/com/intellij/structuralsearch/impl/matcher/GlobalMatchingVisitor.java
setResult
@Contract("true->true;false->false") public boolean setResult(boolean result) { return myResult = result; }
[ 54, 63 ]
@Contract("true->true;false->false") public boolean setResult(boolean result)
115
270,182
../intellij-community/platform/util/base/src/com/intellij/openapi/util/TextRange.java
isEmpty
@Contract(pure = true) public boolean isEmpty() { return myStartOffset >= myEndOffset; }
[ 40, 47 ]
@Contract(pure = true) public boolean isEmpty()
96
233,810
../intellij-community/jps/jps-builders/src/org/jetbrains/jps/cache/model/JpsLoaderContext.java
checkCanceled
public void checkCanceled() throws ProcessCanceledException { if (canceledStatus.isCanceled()) { LOG.info("JPS Caches download process canceled"); throw new ProcessCanceledException(); } }
[ 12, 25 ]
public void checkCanceled()
210
340,185
../intellij-community/platform/lang-impl/src/com/intellij/openapi/util/registry/RegistryUi.java
getAttributes
private static @NotNull SimpleTextAttributes getAttributes(RegistryValue value, boolean isSelected) { boolean changedFromDefault = value.isChangedFromDefault(); if (isSelected) { return new SimpleTextAttributes(changedFromDefault ? SimpleTextAttributes.STYLE_BOLD : SimpleTextAttributes.STYLE_PLAIN, NamedColorUtil.getListSelectionForeground(true)); } if (changedFromDefault) { return new SimpleTextAttributes(SimpleTextAttributes.STYLE_BOLD, JBColor.blue); } return SimpleTextAttributes.REGULAR_ATTRIBUTES; }
[ 45, 58 ]
private static @NotNull SimpleTextAttributes getAttributes(RegistryValue value, boolean isSelected)
606
200,623
../intellij-community/platform/lang-impl/src/com/intellij/codeInsight/highlighting/HyperlinkAnnotator.java
getReferences
private static @NotNull List<PsiReference> getReferences(@NotNull PsiElement element) { return CachedValuesManager.getManager(element.getProject()) .getParameterizedCachedValue(element, REFS_KEY, REFS_PROVIDER, false, element); }
[ 43, 56 ]
private static @NotNull List<PsiReference> getReferences(@NotNull PsiElement element)
241
211,509
../intellij-community/platform/platform-api/src/com/intellij/ui/TitledSeparator.java
getLabelBorder
private static Border getLabelBorder(boolean focused) { if (!focused) { return new EmptyBorder(getInsets()); } int arcSize = JBUIScale.scale(Registry.intValue("ide.link.button.focus.round.arc", 4)); return JBUI.Borders.compound( new EmptyBorder(getOutsideFrameInsets()), new RoundedLineBorder(JBUI.CurrentTheme.Link.FOCUSED_BORDER_COLOR, arcSize, FOCUS_THICKNESS), new EmptyBorder(getInsideFrameInsets())); }
[ 22, 36 ]
private static Border getLabelBorder(boolean focused)
469
249,760
../intellij-community/jps/jps-builders/gen/org/jetbrains/jps/api/CmdlineRemoteProto.java
getDeletedPaths
@java.lang.Override public java.lang.String getDeletedPaths(int index) { return instance.getDeletedPaths(index); }
[ 54, 69 ]
@java.lang.Override public java.lang.String getDeletedPaths(int index)
146
337,027
../intellij-community/python/python-parser/gen/com/jetbrains/python/lexer/_PythonLexer.java
zzUnpackcmap_top
private static int zzUnpackcmap_top(String packed, int offset, int [] result) { int i = 0; /* index in packed string */ int j = offset; /* index in unpacked array */ int l = packed.length(); while (i < l) { int count = packed.charAt(i++); int value = packed.charAt(i++); do result[j++] = value; while (--count > 0); } return j; }
[ 19, 35 ]
private static int zzUnpackcmap_top(String packed, int offset, int [] result)
381
7,607
../intellij-community/platform/lang-impl/src/com/intellij/codeInsight/template/postfix/templates/editable/PostfixTemplateWrapper.java
expand
@Override public void expand(@NotNull PsiElement context, @NotNull Editor editor) { myDelegate.expand(context, editor); }
[ 24, 30 ]
@Override public void expand(@NotNull PsiElement context, @NotNull Editor editor)
129
212,382
../intellij-community/java/java-impl/src/com/intellij/javadoc/JavadocSnippetEnterHandler.java
calcPrefix
private static String calcPrefix(PsiSnippetDocTag host) { final PsiFile file = host.getContainingFile(); final String text = file.getText(); int offset = host.getTextOffset(); int asteriskOffset = offset; while (text.charAt(offset) != '\n' && offset > 0) { if (text.charAt(offset) == '*') asteriskOffset = offset; offset --; } final String whitespacesPrefix = text.substring(offset + 1, asteriskOffset); final JavaCodeStyleSettings settings = CodeStyle.getCustomSettings(file, JavaCodeStyleSettings.class); return settings.JD_LEADING_ASTERISKS_ARE_ENABLED ? whitespacesPrefix + "* " : whitespacesPrefix; }
[ 22, 32 ]
private static String calcPrefix(PsiSnippetDocTag host)
659
373,215
../intellij-community/platform/core-impl/src/com/intellij/lang/impl/PsiBuilderImpl.java
onSkip
private void onSkip(IElementType type, int start, int end) { if (myWhitespaceSkippedCallback != null) { myWhitespaceSkippedCallback.onSkip(type, start, end); } }
[ 13, 19 ]
private void onSkip(IElementType type, int start, int end)
177
184,107
../intellij-community/platform/code-style-api/src/com/intellij/formatting/Wrap.java
createWrap
public static Wrap createWrap(final int type, final boolean wrapFirstElement) { return Formatter.getInstance().createWrap(WrapType.byLegacyRepresentation(type), wrapFirstElement); }
[ 19, 29 ]
public static Wrap createWrap(final int type, final boolean wrapFirstElement)
187
277,082
../intellij-community/platform/diff-impl/src/com/intellij/diff/impl/DiffRequestProcessor.java
reloadDiffRequest
@Override public void reloadDiffRequest() { reloadRequest(); }
[ 26, 43 ]
@Override public void reloadDiffRequest()
76
272,851
../intellij-community/platform/lang-impl/src/com/intellij/psi/impl/source/codeStyle/lineIndent/IndentCalculator.java
indentToSize
private static int indentToSize(@NotNull Indent indent, @NotNull CommonCodeStyleSettings.IndentOptions options) { if (indent.getType() == NORMAL) { return options.INDENT_SIZE; } else if (indent.getType() == CONTINUATION) { return options.CONTINUATION_INDENT_SIZE; } else if (indent.getType() == SPACES && indent instanceof IndentImpl) { return ((IndentImpl)indent).getSpaces(); } return 0; }
[ 19, 31 ]
private static int indentToSize(@NotNull Indent indent, @NotNull CommonCodeStyleSettings.IndentOptions options)
439
204,121
../intellij-community/platform/util/src/com/intellij/util/io/keyStorage/AppendableStorageBackedByPagedStorageLockFree.java
close
@Override public void close() { currentPage.close(); }
[ 30, 35 ]
@Override public void close()
80
236,208
../intellij-community/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/ChangesListView.java
updateTreeModel
@Override @ApiStatus.Internal public void updateTreeModel(@NotNull DefaultTreeModel model, @NotNull TreeStateStrategy treeStateStrategy) { super.updateTreeModel(model, treeStateStrategy); }
[ 46, 61 ]
@Override @ApiStatus.Internal public void updateTreeModel(@NotNull DefaultTreeModel model, @NotNull TreeStateStrategy treeStateStrategy)
229
221,275
../intellij-community/java/java-impl/src/com/siyeh/ig/redundancy/RedundantOperationOnEmptyContainerInspection.java
getFindCauseFix
private static @NotNull LocalQuickFix getFindCauseFix(@NotNull PsiExpression value) { PsiType type = value.getType(); SpecialField field; if (type instanceof PsiArrayType) { field = SpecialField.ARRAY_LENGTH; } else { field = SpecialField.COLLECTION_SIZE; } return new FindDfaProblemCauseFix(false, value, new TrackingRunner.ZeroSizeDfaProblemType(field)); }
[ 38, 53 ]
private static @NotNull LocalQuickFix getFindCauseFix(@NotNull PsiExpression value)
432
365,702
../intellij-community/python/python-psi-impl/src/com/jetbrains/python/documentation/PyTypeModelBuilder.java
collectionOf
@Override public void collectionOf(CollectionOf collectionOf) { typingGenericFormat(collectionOf); }
[ 26, 38 ]
@Override public void collectionOf(CollectionOf collectionOf)
114
8,398
../intellij-community/java/java-impl-inspections/src/com/intellij/codeInspection/PatternVariableCanBeUsedInspection.java
visitTypeCastExpression
@Override public void visitTypeCastExpression(@NotNull PsiTypeCastExpression expression) { PsiTypeElement castType = expression.getCastType(); if (castType == null) return; if (!castType.textMatches(originalTypeElement)) { return; } InstanceOfCandidateResult result = findInstanceOfCandidateResult(expression); if (result != null && result.instanceOf == instanceOf) { myCasts.add(expression); } }
[ 30, 53 ]
@Override public void visitTypeCastExpression(@NotNull PsiTypeCastExpression expression)
506
379,186
../intellij-community/plugins/lombok/src/main/java/de/plushnikov/intellij/plugin/psi/LombokLightClassBuilder.java
withModifier
public LombokLightClassBuilder withModifier(@PsiModifier.ModifierConstant @NotNull @NonNls String modifier) { myModifierList.addModifier(modifier); return this; }
[ 31, 43 ]
public LombokLightClassBuilder withModifier(@PsiModifier.ModifierConstant @NotNull @NonNls String modifier)
172
48,135
../intellij-community/java/java-impl/src/com/intellij/psi/codeStyle/arrangement/JavaSectionArrangementEntry.java
getText
@Override public @NotNull String getText() { return myText; }
[ 35, 42 ]
@Override public @NotNull String getText()
69
372,370
../intellij-community/platform/xdebugger-impl/src/com/intellij/xdebugger/impl/breakpoints/XBreakpointManagerImpl.java
fireBreakpointPresentationUpdated
public void fireBreakpointPresentationUpdated(XBreakpoint<?> breakpoint, @Nullable XDebugSession session) { if (isRegistered(breakpoint)) { sendBreakpointEvent(breakpoint.getType(), listener -> listener.breakpointPresentationUpdated(breakpoint, session)); } }
[ 12, 45 ]
public void fireBreakpointPresentationUpdated(XBreakpoint<?> breakpoint, @Nullable XDebugSession session)
275
261,566
../intellij-community/java/java-psi-api/src/com/intellij/codeInsight/NullableNotNullManager.java
hasHardcodedContracts
protected boolean hasHardcodedContracts(@NotNull PsiElement element) { return false; }
[ 18, 39 ]
protected boolean hasHardcodedContracts(@NotNull PsiElement element)
92
489,836
../intellij-community/platform/dvcs-impl/src/com/intellij/dvcs/push/ui/VcsPushDialog.java
getPreferredFocusedComponent
@Nullable @Override public JComponent getPreferredFocusedComponent() { return myListPanel.getPreferredFocusedComponent(); }
[ 42, 70 ]
@Nullable @Override public JComponent getPreferredFocusedComponent()
133
242,695
../intellij-community/python/src/com/jetbrains/python/packaging/ui/PyPackageManagementService.java
started
@Override public void started() { listener.operationStarted(packageName); }
[ 28, 35 ]
@Override public void started()
95
23,704
../intellij-community/java/java-impl/src/com/intellij/codeInspection/ex/GlobalJavaInspectionContextImpl.java
enqueueFieldUsagesProcessor
@Override public void enqueueFieldUsagesProcessor(RefField refField, UsagesProcessor p) { if (myFieldUsagesRequests == null) myFieldUsagesRequests = new HashMap<>(); enqueueRequestImpl(refField, myFieldUsagesRequests, p); }
[ 24, 51 ]
@Override public void enqueueFieldUsagesProcessor(RefField refField, UsagesProcessor p)
235
369,348
../intellij-community/platform/platform-impl/src/com/intellij/ide/actions/OccurenceNavigatorActionBase.java
findNavigator
private static @Nullable OccurenceNavigator findNavigator(JComponent parent) { LinkedList<JComponent> queue = new LinkedList<>(); queue.addLast(parent); while (!queue.isEmpty()) { JComponent component = queue.removeFirst(); if (component instanceof OccurenceNavigator) { return (OccurenceNavigator)component; } if (component instanceof JTabbedPane) { JComponent selectedComponent = (JComponent)((JTabbedPane)component).getSelectedComponent(); if (selectedComponent != null) { queue.addLast(selectedComponent); } } else if (component != null){ for (int i = 0; i < component.getComponentCount(); i++) { Component child = component.getComponent(i); if (!(child instanceof JComponent)) { continue; } queue.addLast((JComponent)child); } } } return null; }
[ 44, 57 ]
private static @Nullable OccurenceNavigator findNavigator(JComponent parent)
924
310,107
../intellij-community/java/java-psi-impl/src/com/intellij/psi/impl/source/resolve/graphInference/InferenceSessionContainer.java
inferNested
private static PsiSubstitutor inferNested(final PsiParameter @NotNull [] parameters, final PsiExpression @NotNull [] arguments, final @NotNull PsiCall parent, final @NotNull MethodCandidateInfo currentMethod, final @NotNull InferenceSession parentSession) { final List<String> errorMessages = parentSession.getIncompatibleErrorMessages(); if (errorMessages != null && !MethodCandidateInfo.isOverloadCheck()) { //for lambda parameter type calculation, the parent inference may contain errors due to skipping that lambda constraints //but the type of the lambda parameter should not depend on the lambda body, thus the nested inference may still provide valid results return null; } final CompoundInitialState compoundInitialState = createState(parentSession); InitialInferenceState initialInferenceState = compoundInitialState.getInitialState(parent); if (initialInferenceState != null) { InferenceSession childSession = new InferenceSession(initialInferenceState, parentSession.getInferencePolicy()); return childSession.collectAdditionalAndInfer(parameters, arguments, currentMethod, compoundInitialState.getInitialSubstitutor()); } //we do not investigate lambda return expressions when lambda's return type is already inferred (proper) //this way all calls from lambda's return expressions won't appear in nested sessions PsiElement gParent = PsiUtil.skipParenthesizedExprUp(parent.getParent()); //find the nearest parent which appears in the map and start inference with a provided target type for a nested lambda while (true) { if (gParent instanceof PsiReturnStatement) { //process code block lambda gParent = PsiTreeUtil.getParentOfType(gParent, PsiLambdaExpression.class); } if (gParent instanceof PsiConditionalExpression) { gParent = PsiUtil.skipParenthesizedExprUp(gParent.getParent()); } if (gParent instanceof PsiLambdaExpression) { final PsiCall call = PsiTreeUtil.getParentOfType(gParent, PsiCall.class); if (call != null) { initialInferenceState = compoundInitialState.getInitialState(call); if (initialInferenceState != null) { final PsiExpressionList argumentList = call.getArgumentList(); final int idx = argumentList != null ? LambdaUtil.getLambdaIdx(argumentList, gParent) : -1; final JavaResolveResult result = PsiDiamondType.getDiamondsAwareResolveResult(call); final PsiElement method = result.getElement(); if (method instanceof PsiMethod && idx > -1) { final PsiParameter[] methodParameters = ((PsiMethod)method).getParameterList().getParameters(); if (methodParameters.length == 0) { break; } //one of the grand parents were found in the top inference session //start from it as it is the top level call InferenceSession sessionInsideLambda = new InferenceSession(initialInferenceState, parentSession.getInferencePolicy()); sessionInsideLambda.collectAdditionalAndInfer(methodParameters, argumentList.getExpressions(), ((MethodCandidateInfo)result), compoundInitialState.getInitialSubstitutor()); return inferNested(parameters, arguments, parent, currentMethod, sessionInsideLambda); } } else { gParent = PsiUtil.skipParenthesizedExprUp(call.getParent()); continue; } } } break; } return null; }
[ 30, 41 ]
private static PsiSubstitutor inferNested(final PsiParameter @NotNull [] parameters, final PsiExpression @NotNull [] arguments, final @NotNull PsiCall parent, final @NotNull MethodCandidateInfo currentMethod, final @NotNull InferenceSession parentSession)
3,746
496,587
../intellij-community/platform/platform-impl/src/com/intellij/designer/LightToolWindow.java
isLeft
private boolean isLeft() { return myAnchor == ToolWindowAnchor.LEFT; }
[ 16, 22 ]
private boolean isLeft()
76
329,198
../intellij-community/java/java-runtime/src/com/intellij/rt/ant/execution/IdeaAntLogger2.java
buildFinished
@Override public synchronized void buildFinished(BuildEvent event) { myAlwaysSend.sendMessage(BUILD_END, event.getPriority(), event.getException()); }
[ 37, 50 ]
@Override public synchronized void buildFinished(BuildEvent event)
158
359,191
../intellij-community/plugins/ant/src/com/intellij/lang/ant/config/impl/configuration/UIPropertyBinding.java
beEnabled
@Override public void beEnabled() { for (JComponent component : myComponents) { component.setEnabled(true); } }
[ 26, 35 ]
@Override public void beEnabled()
139
29,396
../intellij-community/platform/util/src/com/intellij/openapi/diagnostic/LogLevel.java
getPrettyLevelName
public @NotNull String getPrettyLevelName() { return getPrettyLevelName(myLevel); }
[ 23, 41 ]
public @NotNull String getPrettyLevelName()
89
241,400
../intellij-community/plugins/coverage-common/src/com/intellij/execution/configurations/coverage/CoverageEnabledConfiguration.java
coverageRunnerExtensionRemoved
@ApiStatus.Internal public void coverageRunnerExtensionRemoved(@NotNull CoverageRunner runner) { if (runner.getId().equals(myRunnerId)) { myConfiguration.putCopyableUserData(COVERAGE_KEY, null); myCachedRunner = null; } }
[ 34, 64 ]
@ApiStatus.Internal public void coverageRunnerExtensionRemoved(@NotNull CoverageRunner runner)
245
148,052
../intellij-community/plugins/maven/src/main/java/org/jetbrains/idea/maven/project/MavenGeneralSettings.java
getEffectiveUserSettingsFile
@Deprecated(forRemoval = true) public @Nullable VirtualFile getEffectiveUserSettingsFile() { File file = getEffectiveUserSettingsIoFile(); return file == null ? null : LocalFileSystem.getInstance().findFileByIoFile(file); }
[ 62, 90 ]
@Deprecated(forRemoval = true) public @Nullable VirtualFile getEffectiveUserSettingsFile()
235
58,222
../intellij-community/platform/util-rt/src/com/intellij/openapi/util/io/FileUtilRt.java
beforeDeleting
void beforeDeleting(Path path);
[ 5, 19 ]
void beforeDeleting(Path path)
31
264,206
../intellij-community/platform/vcs-log/api/src/com/intellij/vcs/log/VcsShortCommitDetails.java
getCommitter
@NotNull VcsUser getCommitter();
[ 19, 31 ]
@NotNull VcsUser getCommitter()
34
280,441
../intellij-community/plugins/xslt-debugger/engine/impl/src/org/intellij/plugins/xsltDebugger/rt/engine/remote/DebuggerServer.java
getState
@Override public Debugger.State getState() { return myDebugger.getState(); }
[ 34, 42 ]
@Override public Debugger.State getState()
84
173,819
../intellij-community/plugins/kotlin/core/src/org/jetbrains/kotlin/idea/stubindex/IdeStubIndexService.java
indexSuperNames
private static void indexSuperNames(KotlinClassOrObjectStub<? extends KtClassOrObject> stub, IndexSink sink) { for (String superName : stub.getSuperNames()) { sink.occurrence(KotlinSuperClassIndex.Helper.getIndexKey(), superName); } if (!(stub instanceof KotlinClassStub)) { return; } KotlinModifierListStub modifierListStub = getModifierListStub(stub); if (modifierListStub == null) return; if (modifierListStub.hasModifier(KtTokens.ENUM_KEYWORD)) { sink.occurrence(KotlinSuperClassIndex.Helper.getIndexKey(), Enum.class.getSimpleName()); } if (modifierListStub.hasModifier(KtTokens.ANNOTATION_KEYWORD)) { sink.occurrence(KotlinSuperClassIndex.Helper.getIndexKey(), Annotation.class.getSimpleName()); } }
[ 20, 35 ]
private static void indexSuperNames(KotlinClassOrObjectStub<? extends KtClassOrObject> stub, IndexSink sink)
840
76,851
../intellij-community/platform/lang-impl/src/com/intellij/refactoring/inline/InlineOptions.java
isInlineThisOnly
boolean isInlineThisOnly();
[ 8, 24 ]
boolean isInlineThisOnly()
27
208,559
../intellij-community/java/compiler/impl/src/com/intellij/compiler/options/ProcessorProfilePanel.java
addRow
@Override public void addRow() { myRows.add(new KeyValuePair()); final int index = myRows.size() - 1; fireTableRowsInserted(index, index); }
[ 26, 32 ]
@Override public void addRow()
166
491,115
../intellij-community/platform/platform-api/src/com/intellij/openapi/options/MasterDetails.java
getMaster
JComponent getMaster();
[ 11, 20 ]
JComponent getMaster()
23
257,106
../intellij-community/platform/lang-impl/src/com/intellij/find/impl/livePreview/LivePreviewController.java
dispose
public void dispose() { if (myDisposed) return; off(); mySearchResults.dispose(); getEditor().getDocument().removeDocumentListener(myDocumentListener); myDisposed = true; }
[ 12, 19 ]
public void dispose()
196
205,310
../intellij-community/java/compiler/instrumentation-util/src/com/intellij/compiler/instrumentation/InstrumenterClassWriter.java
getCommonSuperClass
@Override protected String getCommonSuperClass(String type1, String type2) { try { InstrumentationClassFinder.PseudoClass cls1 = myFinder.loadClass(type1); InstrumentationClassFinder.PseudoClass cls2 = myFinder.loadClass(type2); if (cls1.isAssignableFrom(cls2)) { return cls1.getName(); } if (cls2.isAssignableFrom(cls1)) { return cls2.getName(); } if (cls1.isInterface() || cls2.isInterface()) { return "java/lang/Object"; } InstrumentationClassFinder.PseudoClass c = cls1; do { c = c.getSuperClass(); } while (!c.isAssignableFrom(cls2)); return c.getName(); } catch (Exception e) { throw new RuntimeException(e.toString(), e); } }
[ 29, 48 ]
@Override protected String getCommonSuperClass(String type1, String type2)
770
492,022