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/plugins/tasks/tasks-core/src/com/intellij/tasks/mantis/MantisFilter.java
equals
@Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; return myId == ((MantisFilter)o).myId; }
[ 27, 33 ]
@Override public boolean equals(Object o)
188
39,510
../intellij-community/java/java-analysis-impl/src/com/siyeh/ig/classlayout/FinalClassInspection.java
visitClass
@Override public void visitClass(@NotNull PsiClass aClass) { if (!aClass.hasModifierProperty(PsiModifier.FINAL)) { return; } if (SealedUtils.hasSealedParent(aClass)) { // removing `final` in this case would make the code uncompilable return; } registerModifierError(PsiModifier.FINAL, aClass, PsiModifier.FINAL, aClass); }
[ 26, 36 ]
@Override public void visitClass(@NotNull PsiClass aClass)
384
347,725
../intellij-community/platform/platform-impl/src/com/intellij/openapi/editor/impl/view/EditorSizeManager.java
reset
void reset() { assert !myDocument.isInBulkUpdate(); assert !myEditor.getInlayModel().isInBatchMode(); doInvalidateRange(0, myDocument.getTextLength()); invalidateCachedBlockInlayWidth(); }
[ 5, 10 ]
void reset()
206
327,579
../intellij-community/platform/vcs-impl/src/com/intellij/openapi/vcs/history/actions/GetVersionAction.java
doGet
public static void doGet(@NotNull Project project, @NotNull VcsFileRevision revision, @NotNull FilePath filePath) { String activityName = VcsBundle.message("activity.name.get.from", revision.getRevisionNumber()); doGet(project, activityName, Collections.singletonList(new VcsFileRevisionProvider(filePath, revision)), null); }
[ 19, 24 ]
public static void doGet(@NotNull Project project, @NotNull VcsFileRevision revision, @NotNull FilePath filePath)
336
223,707
../intellij-community/platform/lang-impl/src/com/intellij/find/impl/FindUI.java
showUI
void showUI();
[ 5, 11 ]
void showUI()
14
205,225
../intellij-community/python/python-ast/src/com/jetbrains/python/ast/PyAstDecorator.java
getTarget
@Nullable default PyAstFunction getTarget() { return PsiTreeUtil.getStubOrPsiParentOfType(this, PyAstFunction.class); }
[ 34, 43 ]
@Nullable default PyAstFunction getTarget()
127
1,030
../intellij-community/plugins/editorconfig/gen/org/editorconfig/language/psi/EditorConfigCharClassLetter.java
isEscape
boolean isEscape();
[ 8, 16 ]
boolean isEscape()
19
145,950
../intellij-community/java/debugger/impl/src/com/intellij/debugger/impl/DebuggerUtilsEx.java
create
public static ClassFilter create(Element element) throws InvalidDataException { ClassFilter filter = new ClassFilter(); DefaultJDOMExternalizer.readExternal(filter, element); return filter; }
[ 26, 32 ]
public static ClassFilter create(Element element)
205
383,237
../intellij-community/platform/lvcs-impl/src/com/intellij/history/integration/ui/models/EntireFileDifferenceModel.java
getReadOnlyRightDiffContent
@Override protected @Nullable DiffContent getReadOnlyRightDiffContent(@NotNull RevisionProcessingProgress p) { return getDiffContent(myRight); }
[ 44, 71 ]
@Override protected @Nullable DiffContent getReadOnlyRightDiffContent(@NotNull RevisionProcessingProgress p)
152
189,055
../intellij-community/plugins/groovy/src/org/jetbrains/plugins/groovy/annotator/intentions/CreateLocalVariableFromUsageFix.java
positionCursor
@Nullable protected static Editor positionCursor(Project project, PsiFile targetFile, PsiElement element) { TextRange range = element.getTextRange(); int textOffset = range.getStartOffset(); VirtualFile vFile = targetFile.getVirtualFile(); assert vFile != null; OpenFileDescriptor descriptor = new OpenFileDescriptor(project, vFile, textOffset); return FileEditorManager.getInstance(project).openTextEditor(descriptor, true); }
[ 36, 50 ]
@Nullable protected static Editor positionCursor(Project project, PsiFile targetFile, PsiElement element)
456
169,443
../intellij-community/plugins/lombok/src/main/java/de/plushnikov/intellij/plugin/processor/handler/singular/SingularMapHandler.java
renderBuildPrepare
@Override public String renderBuildPrepare(@NotNull BuilderInfo info) { return renderBuildCode(info.getVariable(), info.getFieldName(), "this"); }
[ 26, 44 ]
@Override public String renderBuildPrepare(@NotNull BuilderInfo info)
154
47,249
../intellij-community/platform/platform-impl/src/com/intellij/buildfiles/ForcedBuildFileAttribute.java
getFrameworkIdOfBuildFile
public static @Nullable String getFrameworkIdOfBuildFile(VirtualFile file) { if (file instanceof NewVirtualFile) { try (DataInputStream is = FRAMEWORK_FILE_ATTRIBUTE.readFileAttribute(file)) { if (is != null) { if (is.available() == 0) { return null; } return IOUtil.readString(is); } } catch (IOException e) { LOG.error(file.getPath(), e); } return ""; } return file.getUserData(FRAMEWORK_FILE_MARKER); }
[ 31, 56 ]
public static @Nullable String getFrameworkIdOfBuildFile(VirtualFile file)
515
329,398
../intellij-community/platform/execution-process-elevation/src/com/intellij/execution/process/elevation/ElevationBundle.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
268,242
../intellij-community/platform/core-nio-fs/src/com/intellij/platform/core/nio/fs/MultiRoutingFileSystemProvider.java
fromDelegatePath
@Contract("null -> null; !null -> !null") @Override protected @Nullable Path fromDelegatePath(@Nullable Path path) { if (path instanceof MultiRoutingFsPath) { // `MultiRoutingFsPath` is encapsulated and can't be created outside this package. // Tricks with classloaders are not expected here. return ((MultiRoutingFsPath)path).getDelegate(); } else { return path; } }
[ 81, 97 ]
@Contract("null -> null; !null -> !null") @Override protected @Nullable Path fromDelegatePath(@Nullable Path path)
413
263,792
../intellij-community/platform/analysis-impl/src/com/intellij/codeInsight/daemon/impl/HighlightInfoUpdaterImpl.java
copy
@Override public PsiElement copy() { return null; }
[ 34, 38 ]
@Override public PsiElement copy()
71
247,364
../intellij-community/java/java-impl/src/com/intellij/codeInsight/CodeInsightUtil.java
findStatementsInRange
public static PsiElement @NotNull [] findStatementsInRange(@NotNull PsiFile file, int startOffset, int endOffset) { Language language = findJavaOrLikeLanguage(file); if (language == null) return PsiElement.EMPTY_ARRAY; FileViewProvider viewProvider = file.getViewProvider(); PsiElement element1 = viewProvider.findElementAt(startOffset, language); PsiElement element2 = viewProvider.findElementAt(endOffset - 1, language); if (element1 instanceof PsiWhiteSpace) { startOffset = element1.getTextRange().getEndOffset(); element1 = file.findElementAt(startOffset); } if (element2 instanceof PsiWhiteSpace) { endOffset = element2.getTextRange().getStartOffset(); element2 = file.findElementAt(endOffset - 1); } if (element1 == null || element2 == null) return PsiElement.EMPTY_ARRAY; PsiElement parent = PsiTreeUtil.findCommonParent(element1, element2); if (parent == null) return PsiElement.EMPTY_ARRAY; while (true) { if (parent instanceof PsiStatement) { if (!(element1 instanceof PsiComment)) { parent = parent.getParent(); } break; } if (parent instanceof PsiCodeBlock) break; if (FileTypeUtils.isInServerPageFile(parent) && parent instanceof PsiFile) break; if (parent instanceof PsiCodeFragment) break; if (parent == null || parent instanceof PsiFile) return PsiElement.EMPTY_ARRAY; parent = parent.getParent(); } if (!parent.equals(element1)) { while (!parent.equals(element1.getParent())) { element1 = element1.getParent(); } } if (startOffset != element1.getTextRange().getStartOffset()) return PsiElement.EMPTY_ARRAY; if (!parent.equals(element2)) { while (!parent.equals(element2.getParent())) { element2 = element2.getParent(); } } if (endOffset != element2.getTextRange().getEndOffset() && !isAtTrailingComment(element1, element2, endOffset)) { return PsiElement.EMPTY_ARRAY; } if (parent instanceof PsiCodeBlock && element1 == ((PsiCodeBlock)parent).getLBrace() && element2 == ((PsiCodeBlock)parent).getRBrace()) { if (parent.getParent() instanceof PsiBlockStatement) { return new PsiElement[]{parent.getParent()}; } PsiElement[] children = parent.getChildren(); return getStatementsInRange(children, ((PsiCodeBlock)parent).getFirstBodyElement(), ((PsiCodeBlock)parent).getLastBodyElement()); } PsiElement[] children = parent.getChildren(); return getStatementsInRange(children, element1, element2); }
[ 37, 58 ]
public static PsiElement @NotNull [] findStatementsInRange(@NotNull PsiFile file, int startOffset, int endOffset)
2,605
373,339
../intellij-community/java/java-psi-impl/src/com/intellij/psi/impl/source/javadoc/PsiSnippetDocTagBodyImpl.java
getContent
@Override public PsiElement @NotNull [] getContent() { return getChildrenAsPsiElements(JavaDocTokenType.DOC_COMMENT_DATA, ARRAY_FACTORY); }
[ 42, 52 ]
@Override public PsiElement @NotNull [] getContent()
147
496,942
../intellij-community/platform/indexing-api/src/com/intellij/psi/search/TodoPattern.java
getAttributes
public @NotNull TodoAttributes getAttributes() { return attributes; }
[ 31, 44 ]
public @NotNull TodoAttributes getAttributes()
75
281,077
../intellij-community/platform/util/ui/src/com/intellij/util/ui/JBUI.java
miniFont
public static @NotNull JBFont miniFont() { return JBFont.label().deriveFont(UIUtil.getFontSize(UIUtil.FontSize.MINI)); }
[ 30, 38 ]
public static @NotNull JBFont miniFont()
130
227,492
../intellij-community/platform/external-process-auth-helper/src/externalProcessAuthHelper/ScriptGeneratorUtil.java
createBatchScript
@NotNull private static File createBatchScript(@NotNull @NonNls String fileName, @NotNull @NonNls String commandLine) throws IOException { String batchScriptText = "@echo off" + "\n" + commandLine + " %*\n"; return createTempExecutable(fileName + ".bat", batchScriptText); }
[ 31, 48 ]
@NotNull private static File createBatchScript(@NotNull @NonNls String fileName, @NotNull @NonNls String commandLine)
286
186,868
../intellij-community/platform/vcs-log/impl/src/com/intellij/vcs/log/ui/filter/MultipleValueFilterPopupComponent.java
createSelectMultipleValuesAction
protected @NotNull AnAction createSelectMultipleValuesAction() { return new SelectMultipleValuesAction(); }
[ 28, 60 ]
protected @NotNull AnAction createSelectMultipleValuesAction()
113
279,027
../intellij-community/xml/xml-psi-impl/src/com/intellij/xml/impl/schema/AnyXmlElementDescriptor.java
getContentType
@Override public int getContentType() { return CONTENT_TYPE_UNKNOWN; }
[ 23, 37 ]
@Override public int getContentType()
78
506,241
../intellij-community/java/java-impl/src/com/siyeh/ig/serialization/NonSerializableFieldInSerializableClassInspection.java
buildErrorString
@Override public @NotNull String buildErrorString(Object... infos) { boolean isRecord = (boolean)infos[1]; return isRecord ? InspectionGadgetsBundle.message("non.serializable.component.in.serializable.record.problem.descriptor") :InspectionGadgetsBundle.message("non.serializable.field.in.serializable.class.problem.descriptor"); }
[ 35, 51 ]
@Override public @NotNull String buildErrorString(Object... infos)
365
365,640
../intellij-community/plugins/groovy/groovy-psi/src/org/jetbrains/plugins/groovy/lang/psi/util/PsiUtil.java
getAnnoAttributeValue
public static boolean getAnnoAttributeValue(@NotNull PsiAnnotation annotation, final String attributeName, boolean defaultValue) { PsiAnnotationMemberValue value = annotation.findAttributeValue(attributeName); if (value instanceof GrExpression) { Object o = GroovyConstantExpressionEvaluator.evaluate((GrExpression)value); if (o instanceof Boolean) { return (Boolean)o; } } return defaultValue; }
[ 22, 43 ]
public static boolean getAnnoAttributeValue(@NotNull PsiAnnotation annotation, final String attributeName, boolean defaultValue)
440
167,458
../intellij-community/java/java-psi-impl/src/com/intellij/psi/impl/light/LightClassReferenceExpression.java
getParameterList
@Override public PsiReferenceParameterList getParameterList() { return null; }
[ 45, 61 ]
@Override public PsiReferenceParameterList getParameterList()
86
498,859
../intellij-community/jps/model-impl/src/org/jetbrains/jps/model/artifact/impl/elements/JpsPackagingElementFactoryImpl.java
createFileCopy
@Override @NotNull public JpsFileCopyPackagingElement createFileCopy(@NotNull String filePath, @Nullable String outputFileName) { return new JpsFileCopyPackagingElementImpl(filePath, outputFileName); }
[ 58, 72 ]
@Override @NotNull public JpsFileCopyPackagingElement createFileCopy(@NotNull String filePath, @Nullable String outputFileName)
211
336,528
../intellij-community/plugins/groovy/groovy-psi/src/org/jetbrains/plugins/groovy/lang/psi/impl/statements/typedef/GrTypeDefinitionImpl.java
getRBrace
@Nullable @Override public PsiElement getRBrace() { final GrTypeDefinitionBody body = getBody(); return body == null ? null : body.getRBrace(); }
[ 42, 51 ]
@Nullable @Override public PsiElement getRBrace()
159
165,855
../intellij-community/platform/util/jdom/src/org/jdom/JDOMFactory.java
element
Element element(String name, Namespace namespace);
[ 8, 15 ]
Element element(String name, Namespace namespace)
50
232,635
../intellij-community/platform/lang-impl/src/com/intellij/refactoring/ui/RefactoringDialog.java
actionPerformed
@Override public void actionPerformed(ActionEvent e) { try (AccessToken ignore = SlowOperations.startSection(SlowOperations.ACTION_PERFORM)) { doRefactorAction(); } }
[ 26, 41 ]
@Override public void actionPerformed(ActionEvent e)
194
207,794
../intellij-community/platform/lang-impl/src/com/intellij/application/options/CodeStyleSchemesConfigurable.java
revert
public void revert() { if (myModel.isSchemeListModified() || isSomeSchemeModified()) { myRevertCompleted = false; } if (!myRevertCompleted) { try { resetImpl(); } finally { myRevertCompleted = true; } } }
[ 12, 18 ]
public void revert()
268
205,966
../intellij-community/python/src/com/jetbrains/python/newProject/steps/ProjectSpecificSettingsStep.java
getInterpreterInfoForStatistics
public @Nullable InterpreterStatisticsInfo getInterpreterInfoForStatistics() { if (myInterpreterPanel == null) return null; PyAddSdkPanel panel = myInterpreterPanel.getSelectedPanel(); return panel.getStatisticInfo(); }
[ 43, 74 ]
public @Nullable InterpreterStatisticsInfo getInterpreterInfoForStatistics()
233
23,974
../intellij-community/platform/util/src/com/intellij/openapi/util/UserDataHolderBase.java
getUserData
@Override public <T> T getUserData(@NotNull Key<T> key) { T t = getUserMap().get(key); if (t == null && key instanceof KeyWithDefaultValue) { t = putUserDataIfAbsent(key, ((KeyWithDefaultValue<T>)key).getDefaultValue()); } return t; }
[ 25, 36 ]
@Override public <T> T getUserData(@NotNull Key<T> key)
260
240,265
../intellij-community/platform/lang-impl/src/com/intellij/codeInsight/actions/AbstractLayoutCodeProcessor.java
updateIndicatorText
private void updateIndicatorText(@NotNull @NlsContexts.ProgressText String upperLabel, @NotNull @NlsContexts.ProgressDetails String downLabel) { myProgressIndicator.setText(upperLabel); myProgressIndicator.setText2(downLabel); }
[ 13, 32 ]
private void updateIndicatorText(@NotNull @NlsContexts.ProgressText String upperLabel, @NotNull @NlsContexts.ProgressDetails String downLabel)
244
214,131
../intellij-community/platform/editor-ui-api/src/com/intellij/openapi/editor/EditorSettings.java
setFullLineHeightCursor
void setFullLineHeightCursor(boolean fullLineHeightCursor);
[ 5, 28 ]
void setFullLineHeightCursor(boolean fullLineHeightCursor)
59
300,836
../intellij-community/platform/platform-api/src/com/intellij/ui/hover/TreeHoverListener.java
update
private void update(@NotNull Component component, @NotNull ToIntFunction<? super JTree> rowFunc) { if (component instanceof JTree tree) { int rowNew = rowFunc.applyAsInt(tree); int rowOld = rowHolder.getAndSet(rowNew); if (rowNew != rowOld) onHover(tree, rowNew); } }
[ 13, 19 ]
private void update(@NotNull Component component, @NotNull ToIntFunction<? super JTree> rowFunc)
295
251,912
../intellij-community/platform/extensions/src/com/intellij/openapi/components/ComponentManager.java
createError
@ApiStatus.Internal @NotNull RuntimeException createError(@NotNull @NonNls String message, @NotNull PluginId pluginId);
[ 48, 59 ]
@ApiStatus.Internal @NotNull RuntimeException createError(@NotNull @NonNls String message, @NotNull PluginId pluginId)
121
268,460
../intellij-community/plugins/groovy/src/org/jetbrains/plugins/groovy/lang/parameterInfo/GroovyParameterInfoHandler.java
getActualParameterDelimiterType
@NotNull @Override public IElementType getActualParameterDelimiterType() { return GroovyTokenTypes.mCOMMA; }
[ 43, 74 ]
@NotNull @Override public IElementType getActualParameterDelimiterType()
118
169,892
../intellij-community/java/idea-ui/src/com/intellij/ide/util/newProjectWizard/FrameworkSupportNodeBase.java
sortByName
public static void sortByName(@Nullable List<? extends FrameworkSupportNodeBase> nodes, @Nullable final Comparator<? super FrameworkSupportNodeBase> comparator) { if (nodes == null) return; nodes.sort((o1, o2) -> { if (comparator != null) { int compare = comparator.compare(o1, o2); if (compare != 0) return compare; } if (o1 instanceof FrameworkGroupNode && !(o2 instanceof FrameworkGroupNode)) return -1; if (o2 instanceof FrameworkGroupNode && !(o1 instanceof FrameworkGroupNode)) return 1; if (o1.getChildCount() < o2.getChildCount()) return 1; if (o1.getChildCount() > o2.getChildCount()) return -1; return o1.getTitle().compareToIgnoreCase(o2.getTitle()); }); for (FrameworkSupportNodeBase<?> node : nodes) { @SuppressWarnings({"unchecked", "rawtypes"}) List<FrameworkSupportNodeBase<?>> children = (List)node.children; sortByName(children, null); } }
[ 19, 29 ]
public static void sortByName(@Nullable List<? extends FrameworkSupportNodeBase> nodes, @Nullable final Comparator<? super FrameworkSupportNodeBase> comparator)
956
361,318
../intellij-community/plugins/properties/properties-psi-api/src/com/intellij/lang/properties/IProperty.java
getPropertiesFile
PropertiesFile getPropertiesFile() throws PsiInvalidElementAccessException;
[ 15, 32 ]
PropertiesFile getPropertiesFile()
75
146,527
../intellij-community/platform/core-api/src/com/intellij/openapi/util/BuildNumber.java
fromFile
private static @NotNull BuildNumber fromFile() { String homePath = PathManager.getHomePath(); Path home = Paths.get(homePath); BuildNumber result = readFile(home.resolve("build.txt")); if (result != null) { return result; } if (SystemInfoRt.isMac) { result = readFile(home.resolve("Resources/build.txt")); if (result != null) { return result; } } String communityHomePath = PathManager.getCommunityHomePath(); if (!communityHomePath.equals(homePath)) { result = readFile(Paths.get(communityHomePath, "build.txt")); if (result != null) { return result; } } return Objects.requireNonNull(fromString(FALLBACK_VERSION)); }
[ 36, 44 ]
private static @NotNull BuildNumber fromFile()
726
292,383
../intellij-community/platform/util/jdom/src/org/jdom/DescendantIterator.java
iterator
@Override public @NotNull DescendantIterator iterator() { // Implement the Iterable stuff. return new DescendantIterator(parent); }
[ 47, 55 ]
@Override public @NotNull DescendantIterator iterator()
143
232,222
../intellij-community/platform/external-system-impl/src/com/intellij/openapi/externalSystem/service/task/ui/ExternalSystemTasksTreeModel.java
findIndexFor
private static int findIndexFor(MutableTreeNode child, MutableTreeNode parent) { int childCount = parent.getChildCount(); if (childCount == 0) { return 0; } if (childCount == 1) { return NODE_COMPARATOR.compare(child, parent.getChildAt(0)) <= 0 ? 0 : 1; } return findIndexFor(child, parent, 0, childCount - 1); }
[ 19, 31 ]
private static int findIndexFor(MutableTreeNode child, MutableTreeNode parent)
350
333,281
../intellij-community/platform/util-class-loader/src/com/intellij/util/lang/FileLoader.java
processResources
@Override public void processResources(@NotNull String dir, @NotNull Predicate<? super String> fileNameFilter, @NotNull BiConsumer<? super String, ? super InputStream> consumer) throws IOException { try (DirectoryStream<Path> paths = Files.newDirectoryStream(path.resolve(dir))) { for (Path childPath : paths) { String name = path.relativize(childPath).toString(); if (fileNameFilter.test(name) && Files.isRegularFile(childPath)) { try (InputStream stream = new BufferedInputStream(Files.newInputStream(childPath))) { consumer.accept(name, stream); } } } } catch (NotDirectoryException | NoSuchFileException ignore) { } }
[ 24, 40 ]
@Override public void processResources(@NotNull String dir, @NotNull Predicate<? super String> fileNameFilter, @NotNull BiConsumer<? super String, ? super InputStream> consumer)
771
264,613
../intellij-community/platform/util/diff/src/com/intellij/diff/comparison/ByWordRt.java
build
@NotNull public List<MergeRange> build() { for (MergeRange range : myIterable) { int start1 = range.start1; int start2 = range.start2; int start3 = range.start3; int end1 = range.end1; int end2 = range.end2; int end3 = range.end3; if (isLeadingTrailingSpace(myText1, start1)) { start1 = trimStart(myText1, start1, end1); } if (isLeadingTrailingSpace(myText1, end1 - 1)) { end1 = trimEnd(myText1, start1, end1); } if (isLeadingTrailingSpace(myText2, start2)) { start2 = trimStart(myText2, start2, end2); } if (isLeadingTrailingSpace(myText2, end2 - 1)) { end2 = trimEnd(myText2, start2, end2); } if (isLeadingTrailingSpace(myText3, start3)) { start3 = trimStart(myText3, start3, end3); } if (isLeadingTrailingSpace(myText3, end3 - 1)) { end3 = trimEnd(myText3, start3, end3); } MergeRange trimmed = new MergeRange(start1, end1, start2, end2, start3, end3); if (!trimmed.isEmpty() && !isEquals(myText1, myText2, myText3, trimmed)) { myChanges.add(trimmed); } } return myChanges; }
[ 37, 42 ]
@NotNull public List<MergeRange> build()
1,258
229,830
../intellij-community/java/java-analysis-impl/src/com/intellij/codeInspection/dataFlow/inference/ContractInferenceInterpreter.java
getParameters
@NotNull List<LighterASTNode> getParameters() { LighterASTNode paramList = firstChildOfType(myTree, myMethod, PARAMETER_LIST); return paramList != null ? getChildrenOfType(myTree, paramList, PARAMETER) : emptyList(); }
[ 32, 45 ]
@NotNull List<LighterASTNode> getParameters()
230
351,659
../intellij-community/java/java-analysis-impl/src/org/jetbrains/java/generate/inspection/ClassHasNoToStringMethodInspection.java
readSettings
@Override public void readSettings(@NotNull Element node) { super.readSettings(node); try { excludeClassNamesPattern = Pattern.compile(excludeClassNames); } catch (PatternSyntaxException ignored) { } }
[ 26, 38 ]
@Override public void readSettings(@NotNull Element node)
253
343,955
../intellij-community/jps/model-api/src/com/intellij/openapi/fileTypes/FileNameMatcher.java
getPresentableString
@NlsSafe @NotNull String getPresentableString();
[ 25, 45 ]
@NlsSafe @NotNull String getPresentableString()
48
335,948
../intellij-community/platform/platform-api/src/com/intellij/ide/util/DelegatingProgressIndicator.java
startNonCancelableSection
@Override public void startNonCancelableSection() { myIndicator.startNonCancelableSection(); }
[ 24, 49 ]
@Override public void startNonCancelableSection()
102
249,341
../intellij-community/java/java-analysis-impl/src/com/intellij/codeInspection/dataFlow/jvm/transfer/TryCatchTrap.java
parameter
@Nullable VariableDescriptor parameter();
[ 29, 38 ]
@Nullable VariableDescriptor parameter()
41
351,052
../intellij-community/java/java-impl/src/com/siyeh/ig/migration/IfCanBeSwitchInspection.java
dumpBranch
private static void dumpBranch(IfStatementBranch branch, boolean castToInt, boolean wrap, boolean renameBreaks, String breakLabelName, @NonNls StringBuilder switchStatementText) { dumpComments(branch.getComments(), switchStatementText); for (PsiExpression caseExpression : branch.getCaseExpressions()) { if (caseExpression instanceof PsiLiteralExpression literalExpression && PsiTypes.nullType().equals(literalExpression.getType())) { switchStatementText.append("case null:"); } else { switchStatementText.append("case ").append(getCaseLabelText(caseExpression, castToInt)).append(": "); } } if (branch.isElse()) { switchStatementText.append("default: "); } dumpComments(branch.getStatementComments(), switchStatementText); dumpBody(branch.getStatement(), wrap, renameBreaks, breakLabelName, switchStatementText); }
[ 20, 30 ]
private static void dumpBranch(IfStatementBranch branch, boolean castToInt, boolean wrap, boolean renameBreaks, String breakLabelName, @NonNls StringBuilder switchStatementText)
924
366,997
../intellij-community/java/java-impl/src/com/intellij/codeInsight/completion/JavaCompletionContributor.java
addAllClasses
public static void addAllClasses(CompletionParameters parameters, CompletionResultSet result, JavaCompletionSession session) { if (!isClassNamePossible(parameters) || !mayStartClassName(result)) { return; } if (parameters.getInvocationCount() >= 2) { JavaNoVariantsDelegator.suggestNonImportedClasses(parameters, result, session); } else { advertiseSecondCompletion(parameters.getPosition().getProject(), result); } }
[ 19, 32 ]
public static void addAllClasses(CompletionParameters parameters, CompletionResultSet result, JavaCompletionSession session)
462
375,516
../intellij-community/platform/analysis-impl/src/com/intellij/codeInspection/dataFlow/lang/ir/DataFlowIRProvider.java
unreachableSegments
default @NotNull Collection<TextRange> unreachableSegments(@NotNull PsiElement startAnchor, @NotNull Set<PsiElement> unreachableElements) { return Collections.emptyList(); }
[ 39, 58 ]
default @NotNull Collection<TextRange> unreachableSegments(@NotNull PsiElement startAnchor, @NotNull Set<PsiElement> unreachableElements)
179
243,936
../intellij-community/plugins/lombok/src/main/java/de/plushnikov/intellij/plugin/action/delombok/DelombokHandler.java
invoke
public void invoke(@NotNull Project project, @NotNull PsiFile psiFile, @NotNull PsiClass psiClass) { if (psiFile.isWritable()) { invoke(project, psiClass, processInnerClasses); finish(project, psiFile); } }
[ 12, 18 ]
public void invoke(@NotNull Project project, @NotNull PsiFile psiFile, @NotNull PsiClass psiClass)
228
47,906
../intellij-community/platform/lang-impl/src/com/intellij/refactoring/rename/inplace/InplaceRefactoring.java
addReferenceIfNeeded
private void addReferenceIfNeeded(@NotNull Collection<? super PsiReference> refs, @Nullable PsiReference reference) { if (reference != null && reference.isReferenceTo(myElementToRename) && !refs.contains(reference)) { refs.add(reference); } }
[ 13, 33 ]
private void addReferenceIfNeeded(@NotNull Collection<? super PsiReference> refs, @Nullable PsiReference reference)
258
209,273
../intellij-community/python/gen/com/jetbrains/python/console/protocol/PythonConsoleFrontendService.java
read
@Override public void read(org.apache.thrift.protocol.TProtocol prot, showConsole_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; }
[ 28, 32 ]
@Override public void read(org.apache.thrift.protocol.TProtocol prot, showConsole_result struct)
256
5,995
../intellij-community/plugins/tasks/tasks-core/src/com/intellij/tasks/actions/vcs/VcsOpenTaskPanel.java
updateFields
private void updateFields(boolean initial) { if (!initial && myBranchFrom.getItemCount() == 0 && myCreateBranch.isSelected()) { Messages.showWarningDialog(myPanel, TaskBundle.message("dialog.message.can.t.create.branch.if.no.commit.exists.create.commit.first"), TaskBundle.message("dialog.title.cannot.create.branch")); myCreateBranch.setSelected(false); } myBranchName.setEnabled(myCreateBranch.isSelected()); myFromLabel.setEnabled(myCreateBranch.isSelected()); myBranchFrom.setEnabled(myCreateBranch.isSelected()); myUseBranchCombo.setEnabled(myUseBranch.isSelected()); myChangelistName.setEnabled(myCreateChangelist.isSelected()); }
[ 13, 25 ]
private void updateFields(boolean initial)
711
39,965
../intellij-community/platform/platform-impl/src/com/intellij/ide/actions/ToolWindowMoveAction.java
isSplit
public boolean isSplit() { return Arrays.asList(LeftBottom, BottomRight, RightBottom, TopRight).contains(this); }
[ 15, 22 ]
public boolean isSplit()
123
309,620
../intellij-community/platform/platform-impl/src/com/intellij/ui/ComboBoxCompositeEditor.java
addActionListener
void addActionListener(ActionListener l);
[ 5, 22 ]
void addActionListener(ActionListener l)
41
311,674
../intellij-community/platform/execution-impl/src/com/intellij/execution/ui/layout/impl/RunnerContentUi.java
isEmpty
@Override public boolean isEmpty() { return tabs.isEmptyVisible() || myDisposing; }
[ 27, 34 ]
@Override public boolean isEmpty()
91
267,319
../intellij-community/platform/platform-impl/src/com/intellij/openapi/vfs/newvfs/persistent/PersistentFSRecordsOverLockFreePagedStorage.java
setLongHeaderField
private void setLongHeaderField(final @HeaderOffset int headerRelativeOffsetBytes, final long headerValue) throws IOException { checkHeaderOffset(headerRelativeOffsetBytes); try (final Page page = storage.pageByOffset(headerRelativeOffsetBytes, /*forWrite: */ true)) { page.putLong(headerRelativeOffsetBytes, headerValue); } }
[ 13, 31 ]
private void setLongHeaderField(final @HeaderOffset int headerRelativeOffsetBytes, final long headerValue)
380
319,697
../intellij-community/RegExpSupport/src/org/intellij/lang/regexp/RegExpLanguageHost.java
supportsPerl5EmbeddedComments
boolean supportsPerl5EmbeddedComments();
[ 8, 37 ]
boolean supportsPerl5EmbeddedComments()
40
514,601
../intellij-community/platform/lang-impl/src/com/intellij/largeFilesEditor/file/LargeFileManagerImpl.java
getCharsetName
@Override public String getCharsetName() { return fileAdapter.getCharsetName(); }
[ 26, 40 ]
@Override public String getCharsetName()
89
209,338
../intellij-community/platform/util/ui/src/com/intellij/util/ui/tree/AbstractTreeModel.java
dispose
@Override public void dispose() { disposed = true; listeners.clear(); }
[ 24, 31 ]
@Override public void dispose()
83
228,538
../intellij-community/plugins/groovy/jps-plugin/src/org/jetbrains/jps/incremental/groovy/JpsGroovycRunner.java
getGroovyCompilerSettings
static @NotNull JpsGroovySettings getGroovyCompilerSettings(CompileContext context) { return JpsGroovySettings.getSettings(context.getProjectDescriptor().getProject()); }
[ 34, 59 ]
static @NotNull JpsGroovySettings getGroovyCompilerSettings(CompileContext context)
176
159,018
../intellij-community/java/java-psi-api/src/com/intellij/psi/util/PsiUtil.java
preferCompiledElement
@NotNull public static PsiModifierListOwner preferCompiledElement(@NotNull PsiModifierListOwner element) { PsiElement original = element.getOriginalElement(); return original instanceof PsiModifierListOwner ? (PsiModifierListOwner)original : element; }
[ 46, 67 ]
@NotNull public static PsiModifierListOwner preferCompiledElement(@NotNull PsiModifierListOwner element)
264
489,335
../intellij-community/python/python-psi-impl/src/com/jetbrains/python/psi/impl/PyClassImpl.java
getDeprecationMessage
@Override public @Nullable String getDeprecationMessage() { PyClassStub stub = getStub(); if (stub != null) { return stub.getDeprecationMessage(); } return PyClass.super.getDeprecationMessage(); }
[ 36, 57 ]
@Override public @Nullable String getDeprecationMessage()
222
10,359
../intellij-community/java/java-impl/src/com/intellij/codeInsight/template/postfix/templates/editable/JavaEditablePostfixTemplate.java
getElementRenderer
@Override protected @NotNull Function<PsiElement, String> getElementRenderer() { return JavaPostfixTemplatesUtils.getRenderer(); }
[ 60, 78 ]
@Override protected @NotNull Function<PsiElement, String> getElementRenderer()
138
374,975
../intellij-community/platform/core-api/src/com/intellij/psi/util/PsiTreeUtil.java
findChildOfAnyType
@SafeVarargs @Contract("null, _, _ -> null") public static @Nullable <T extends PsiElement> T findChildOfAnyType(@Nullable PsiElement element, boolean strict, @NotNull Class<? extends T> @NotNull ... classes) { if (element == null) return null; FindElement<PsiElement> processor = new FindElement<PsiElement>() { @Override public boolean execute(@NotNull PsiElement each) { if (strict && each == element) return true; if (instanceOf(each, classes)) { return setFound(each); } return true; }
[ 98, 116 ]
@SafeVarargs @Contract("null, _, _ -> null") public static @Nullable <T extends PsiElement> T findChildOfAnyType(@Nullable PsiElement element, boolean strict, @NotNull Class<? extends T> @NotNull ... classes) { if (element == null) return null; FindElement<PsiElement> processor = new FindElement<PsiElement>() { @Override public boolean execute(@NotNull PsiElement each)
703
294,547
../intellij-community/jps/antLayout/src/jetbrains/antlayout/tasks/LayoutTask.java
validateArguments
private void validateArguments() throws BuildException { if (destDir == null) { throw new BuildException("todir attribute must be specified"); } for (Content content : containers) { content.validateArguments(); } }
[ 13, 30 ]
private void validateArguments()
275
336,640
../intellij-community/platform/lang-impl/src/com/intellij/refactoring/ui/ConflictsDialog.java
getTooltipText
@Override public String getTooltipText() { return myUpdatedDialog ? null : myConflictDescription; }
[ 28, 42 ]
@Override public String getTooltipText()
113
207,823
../intellij-community/platform/execution.dashboard/src/RunDashboardManagerImpl.java
getTypes
@Override public @NotNull Set<String> getTypes() { return Collections.unmodifiableSet(myTypes); }
[ 40, 48 ]
@Override public @NotNull Set<String> getTypes()
105
280,571
../intellij-community/python/python-rest/src/com/intellij/python/reStructuredText/psi/RestReference.java
toString
@Override public String toString() { return "RestReference:" + getNode().getElementType().toString(); }
[ 26, 34 ]
@Override public String toString()
111
7,443
../intellij-community/platform/lang-impl/src/com/intellij/codeInsight/daemon/impl/CleanupIntentionMenuContributor.java
appendCleanupCode
private static boolean appendCleanupCode(@NotNull List<HighlightInfo.IntentionActionDescriptor> actionDescriptors, @NotNull PsiFile file) { for (HighlightInfo.IntentionActionDescriptor descriptor : actionDescriptors) { if (descriptor.canCleanup(file)) { IntentionManager manager = IntentionManager.getInstance(); actionDescriptors.add(new HighlightInfo.IntentionActionDescriptor(manager.createCleanupAllIntention(), manager.getCleanupIntentionOptions(), InspectionsBundle.message("action.description.code.cleanup.options"), null, null, null, null)); return true; } } return false; }
[ 23, 40 ]
private static boolean appendCleanupCode(@NotNull List<HighlightInfo.IntentionActionDescriptor> actionDescriptors, @NotNull PsiFile file)
854
213,906
../intellij-community/plugins/xslt-debugger/engine/src/org/intellij/plugins/xsltDebugger/rt/engine/remote/ValueImpl.java
getValue
public Serializable getValue() { return myValue; }
[ 20, 28 ]
public Serializable getValue()
56
173,969
../intellij-community/python/python-core-impl/src/com/jetbrains/python/psi/FileReferenceWithOneContext.java
rename
@Override protected PsiElement rename(final String newName) throws IncorrectOperationException { if (FileUtil.isAbsolutePlatformIndependent(newName)) { return super.rename(newName); } else { PsiElement element = getElement(); return CachingReference.getManipulator(element).handleContentChange(element, getRangeInElement(), newName); } }
[ 33, 39 ]
@Override protected PsiElement rename(final String newName)
375
1,531
../intellij-community/python/src/com/jetbrains/python/refactoring/move/makeFunctionTopLevel/PyBaseMakeFunctionTopLevelProcessor.java
performRefactoring
@Override protected final void performRefactoring(UsageInfo @NotNull [] usages) { final List<String> newParameters = collectNewParameterNames(); assert ApplicationManager.getApplication().isWriteAccessAllowed(); final PyFile targetFile = PyClassRefactoringUtil.getOrCreateFile(myDestinationPath, myProject); if (targetFile.findTopLevelFunction(myFunction.getName()) != null) { throw new IncorrectOperationException( PyBundle.message("refactoring.move.error.destination.file.contains.function", myFunction.getName())); } if (importsRequired(usages, targetFile)) { PyMoveRefactoringUtil.checkValidImportableFile(targetFile, targetFile.getVirtualFile()); } final PsiElement position = PyMoveRefactoringUtil.findLowestPossibleTopLevelInsertionPosition(Arrays.asList(usages), targetFile); // We should update usages before we generate and insert new function, because we have to update its usages inside // (e.g. recursive calls) it first updateUsages(newParameters, usages); final PyFunction newFunction = insertFunction(createNewFunction(newParameters), targetFile, position); myFunction.delete(); updateImports(newFunction, usages); }
[ 33, 51 ]
@Override protected final void performRefactoring(UsageInfo @NotNull [] usages)
1,219
25,816
../intellij-community/xml/xml-psi-impl/gen/com/intellij/lexer/__XmlLexer.java
yybegin
public final void yybegin(int newState) { zzLexicalState = newState; }
[ 18, 25 ]
public final void yybegin(int newState)
76
505,525
../intellij-community/platform/diff-impl/src/com/intellij/diff/tools/dir/DirDiffTool.java
createViewer
@NotNull public static FrameDiffTool.DiffViewer createViewer(@NotNull DiffContext context, @NotNull ContentDiffRequest request) { return new DirDiffViewer(context, request); }
[ 50, 62 ]
@NotNull public static FrameDiffTool.DiffViewer createViewer(@NotNull DiffContext context, @NotNull ContentDiffRequest request)
237
273,830
../intellij-community/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/ClasspathEditor.java
moduleStateChanged
@Override public void moduleStateChanged() { if (myPanel != null) { myPanel.initFromModel(); } }
[ 24, 42 ]
@Override public void moduleStateChanged()
114
362,524
../intellij-community/java/debugger/impl/src/com/intellij/debugger/ui/tree/render/ExpressionChildrenRenderer.java
getChildrenRenderer
private static NodeRenderer getChildrenRenderer(Type type, ValueDescriptor parentDescriptor) { NodeRenderer renderer = getLastChildrenRenderer(parentDescriptor); if (renderer == null || type == null/* || !renderer.isApplicable(type)*/) { renderer = DebugProcessImpl.getDefaultRenderer(type); setPreferableChildrenRenderer(parentDescriptor, renderer); } return renderer; }
[ 28, 47 ]
private static NodeRenderer getChildrenRenderer(Type type, ValueDescriptor parentDescriptor)
401
384,496
../intellij-community/python/python-psi-impl/src/com/jetbrains/python/psi/impl/PyBinaryExpressionImpl.java
operandIsKnown
private static boolean operandIsKnown(@Nullable PyExpression operand, @NotNull TypeEvalContext context) { if (operand == null) return false; final PyType operandType = context.getType(operand); if (operandType instanceof PyStructuralType || PyTypeChecker.isUnknown(operandType, context)) return false; return true; }
[ 23, 37 ]
private static boolean operandIsKnown(@Nullable PyExpression operand, @NotNull TypeEvalContext context)
336
10,000
../intellij-community/java/java-psi-impl/src/com/intellij/psi/impl/source/resolve/PsiResolveHelperImpl.java
acceptVarargs
@Override protected boolean acceptVarargs() { return checkVarargs; }
[ 34, 47 ]
@Override protected boolean acceptVarargs()
88
496,531
../intellij-community/plugins/svn4idea/src/org/jetbrains/idea/svn/SvnVcs.java
loadSettings
@Override public void loadSettings() { super.loadSettings(); ProjectLevelVcsManager vcsManager = ProjectLevelVcsManager.getInstance(myProject); vcsManager.getStandardConfirmation(VcsConfiguration.StandardConfirmation.ADD, this); vcsManager.getStandardConfirmation(VcsConfiguration.StandardConfirmation.REMOVE, this); vcsManager.getStandardOption(VcsConfiguration.StandardOption.CHECKOUT, this); }
[ 24, 36 ]
@Override public void loadSettings()
421
151,402
../intellij-community/plugins/hg4idea/src/org/zmlx/hg4idea/provider/annotate/HgAnnotation.java
getLineDate
@Override @Nullable public Date getLineDate(int lineNumber) { //if (lineNumber >= myLines.size() || lineNumber < 0) { // return null; //} //lines.get(lineNumber).get(HgAnnotation.FIELD.DATE) // todo : parse date return null; }
[ 36, 47 ]
@Override @Nullable public Date getLineDate(int lineNumber)
257
138,538
../intellij-community/platform/code-style-impl/src/com/intellij/formatting/FormatterImpl.java
adjustLineIndentsForRange
@Override public void adjustLineIndentsForRange(final FormattingModel model, final CodeStyleSettings settings, final CommonCodeStyleSettings.IndentOptions indentOptions, final TextRange rangeToAdjust) { try { validateModel(model); final FormattingDocumentModel documentModel = model.getDocumentModel(); final Block block = model.getRootBlock(); final FormatProcessor processor = buildProcessorAndWrapBlocks( documentModel, block, settings, indentOptions, new FormatTextRanges(rangeToAdjust, true) ); LeafBlockWrapper tokenBlock = processor.getFirstTokenBlock(); while (tokenBlock != null) { final WhiteSpace whiteSpace = tokenBlock.getWhiteSpace(); whiteSpace.setLineFeedsAreReadOnly(true); if (!whiteSpace.containsLineFeeds()) { whiteSpace.setIsReadOnly(true); } tokenBlock = tokenBlock.getNextBlock(); } processor.formatWithoutRealModifications(); processor.performModifications(model); } catch (FormattingModelInconsistencyException e) { LOG.error(e); } }
[ 24, 49 ]
@Override public void adjustLineIndentsForRange(final FormattingModel model, final CodeStyleSettings settings, final CommonCodeStyleSettings.IndentOptions indentOptions, final TextRange rangeToAdjust)
1,222
268,530
../intellij-community/platform/platform-impl/src/com/intellij/ide/plugins/newui/PluginPriceService.java
checkAccess
private static void checkAccess() { assert SwingUtilities.isEventDispatchThread(); }
[ 20, 31 ]
private static void checkAccess()
90
308,536
../intellij-community/platform/platform-impl/src/com/intellij/ide/plugins/PluginNode.java
getChannel
@ApiStatus.Experimental public @NonNls String getChannel() { return myChannel; }
[ 48, 58 ]
@ApiStatus.Experimental public @NonNls String getChannel()
88
307,752
../intellij-community/plugins/git4idea/src/git4idea/util/GitVcsConsoleWriter.java
showMessage
public void showMessage(@NotNull @NlsSafe String message) { showMessage(message, ConsoleViewContentType.NORMAL_OUTPUT); }
[ 12, 23 ]
public void showMessage(@NotNull @NlsSafe String message)
127
36,269
../intellij-community/java/java-impl/src/com/intellij/slicer/JavaSliceBuilder.java
getSearchScope
@NotNull SearchScope getSearchScope() { AnalysisScope scope = myParent.getScope(); return myFilter.correctScope(scope.toSearchScope()); }
[ 21, 35 ]
@NotNull SearchScope getSearchScope()
147
369,984
../intellij-community/xml/impl/src/com/intellij/codeInsight/completion/XmlTagInsertHandler.java
completeAttribute
private static void completeAttribute(PsiFile file, Template template) { template.addTextSegment(" "); template.addVariable(new MacroCallNode(new CompleteMacro()), true); template.addTextSegment("=" + XmlEditUtil.getAttributeQuote(file)); template.addEndVariable(); template.addTextSegment(XmlEditUtil.getAttributeQuote(file)); }
[ 20, 37 ]
private static void completeAttribute(PsiFile file, Template template)
351
501,848
../intellij-community/platform/platform-impl/src/com/intellij/openapi/wm/impl/content/ContentLayout.java
updateIdLabel
protected void updateIdLabel(BaseLabel label) { String title = ui.window.getStripeTitle(); String suffix = getTitleSuffix(); if (ExperimentalUI.isNewUI()) suffix = null; if (suffix != null) title += suffix; label.setText(title); Border border = JBUI.Borders.empty(0, 2, 0, 7); if (ExperimentalUI.isNewUI()) { border = shouldShowId() ? JBUI.Borders.empty(JBUI.CurrentTheme.ToolWindow.headerLabelLeftRightInsets()) : JBUI.Borders.empty(JBUI.CurrentTheme.ToolWindow.headerTabLeftRightInsets()); } Border oldBorder = label.getBorder(); // Don't update component border (with following revalidation and repainting) if existing border is exactly the same we're going to set if (oldBorder == null || !Objects.equals(oldBorder.getClass(), border.getClass()) || !oldBorder.getBorderInsets(label).equals(border.getBorderInsets(label))) { label.setBorder(border); } label.setVisible(shouldShowId()); }
[ 15, 28 ]
protected void updateIdLabel(BaseLabel label)
996
322,403
../intellij-community/platform/lang-impl/src/com/intellij/ide/bookmarks/BookmarkManager.java
applyNewState
private void applyNewState(@NotNull List<Bookmark> newList, boolean fireEvents) { if (!myBookmarks.isEmpty()) { Bookmark[] bookmarks = myBookmarks.values().toArray(new Bookmark[0]); for (Bookmark bookmark : bookmarks) { bookmark.release(); } myBookmarks.clear(); } int bookmarkIndex = newList.size() - 1; List<Bookmark> addedBookmarks = new ArrayList<>(newList.size()); for (Bookmark bookmark : newList) { OpenFileDescriptor target = bookmark.init(myProject); if (target == null) { continue; } if (target.getLine() == -1 && findFileBookmark(target.getFile()) != null) { continue; } bookmark.index = bookmarkIndex--; char mnemonic = bookmark.getMnemonic(); if (mnemonic != Character.MIN_VALUE ) { Bookmark old = findBookmarkForMnemonic(mnemonic); if (old != null) { removeBookmark(old); } } myBookmarks.putValue(target.getFile(), bookmark); addedBookmarks.add(bookmark); } if (fireEvents) { for (Bookmark bookmark : addedBookmarks) { getPublisher().bookmarkAdded(bookmark); } } }
[ 13, 26 ]
private void applyNewState(@NotNull List<Bookmark> newList, boolean fireEvents)
1,186
193,701
../intellij-community/java/java-impl/src/com/intellij/codeInsight/daemon/impl/quickfix/GuessTypeParameters.java
substituteToTypeParameters
private int substituteToTypeParameters(PsiTypeElement typeElement, PsiType expectedType, PsiSubstitutor rawingSubstitutor, boolean toplevel) { final List<PsiTypeParameter> matchedParameters = matchingTypeParameters(mySubstitutor, expectedType, TYPE_STRICTLY); if (!matchedParameters.isEmpty()) { List<PsiType> types = new SmartList<>(map(matchedParameters, it -> myFactory.createType(it))); PsiType substituted = rawingSubstitutor.substitute(expectedType); if (!CommonClassNames.JAVA_LANG_OBJECT.equals(substituted.getCanonicalText()) && (toplevel || substituted.equals(expectedType))) { types.add(substituted); } myBuilder.replaceElement(typeElement, new TypeExpression(myProject, types)); return toplevel ? SUBSTITUTED_IN_REF : SUBSTITUTED_IN_PARAMETERS; } final PsiTypeElement[] innerTypeElements = typeArguments(typeElement); if (innerTypeElements == null) return SUBSTITUTED_NONE; final PsiType[] expectedTypeArguments = typeArguments(expectedType); if (expectedTypeArguments == null) return SUBSTITUTED_NONE; boolean substituted = false; for (int i = 0; i < innerTypeElements.length; i++) { substituted |= substituteToTypeParameters(innerTypeElements[i], expectedTypeArguments[i], rawingSubstitutor, false) != SUBSTITUTED_NONE; } return substituted ? SUBSTITUTED_IN_PARAMETERS : SUBSTITUTED_NONE; }
[ 12, 38 ]
private int substituteToTypeParameters(PsiTypeElement typeElement, PsiType expectedType, PsiSubstitutor rawingSubstitutor, boolean toplevel)
1,576
376,595
../intellij-community/platform/analysis-api/src/com/intellij/codeInspection/InspectionProfile.java
getErrorLevel
@NotNull HighlightDisplayLevel getErrorLevel(@NotNull HighlightDisplayKey inspectionToolKey, PsiElement element);
[ 31, 44 ]
@NotNull HighlightDisplayLevel getErrorLevel(@NotNull HighlightDisplayKey inspectionToolKey, PsiElement element)
113
302,432
../intellij-community/xml/xml-psi-impl/src/com/intellij/embedding/IndentEatingLexer.java
getTokenStart
@Override public int getTokenStart() { return super.getTokenStart() + myTotalDelta; }
[ 23, 36 ]
@Override public int getTokenStart()
93
505,770
../intellij-community/plugins/svn4idea/src/org/jetbrains/idea/svn/dialogs/browserCache/SyntheticWorker.java
removeSelf
public void removeSelf() { final Url parentUrl; try { parentUrl = removePathTail(myUrl); } catch (SvnBindException e) { return; } final List<DirectoryEntry> children = myCache.getChildren(parentUrl); if (children == null) { return; } for (Iterator<DirectoryEntry> iterator = children.iterator(); iterator.hasNext(); ) { final DirectoryEntry entry = iterator.next(); if (myUrl.equals(entry.getUrl())) { iterator.remove(); } } myCache.put(parentUrl, children); }
[ 12, 22 ]
public void removeSelf()
551
154,547
../intellij-community/plugins/devkit/devkit-core/src/dom/impl/ExtensionImpl.java
getExtensionPoint
@Override @Nullable public ExtensionPoint getExtensionPoint() { final DomElement domDeclaration = getChildDescription().getDomDeclaration(); if (domDeclaration instanceof ExtensionPoint) { return (ExtensionPoint)domDeclaration; } return null; }
[ 46, 63 ]
@Override @Nullable public ExtensionPoint getExtensionPoint()
272
158,015
../intellij-community/java/java-impl/src/com/intellij/codeInspection/java18StreamApi/PseudoLambdaReplaceTemplate.java
getDefaultValuePosition
public int getDefaultValuePosition() { return myDefaultValuePosition; }
[ 11, 34 ]
public int getDefaultValuePosition()
81
369,399
../intellij-community/plugins/groovy/groovy-psi/src/org/jetbrains/plugins/groovy/lang/psi/impl/synthetic/GrLightMethodBuilder.java
addParameter
@NotNull public GrLightMethodBuilder addParameter(@NlsSafe @NotNull String name, @NlsSafe @Nullable PsiType type) { return addParameter(name, type, false); }
[ 39, 51 ]
@NotNull public GrLightMethodBuilder addParameter(@NlsSafe @NotNull String name, @NlsSafe @Nullable PsiType type)
165
166,660
../intellij-community/python/python-psi-impl/src/com/jetbrains/python/psi/PyUtil.java
turnInitIntoDir
@Contract("null -> null") @Nullable public static PsiElement turnInitIntoDir(@Nullable PsiElement target) { if (target instanceof PyFile && isPackage((PsiFile)target)) { return ((PsiFile)target).getContainingDirectory(); } return target; }
[ 65, 80 ]
@Contract("null -> null") @Nullable public static PsiElement turnInitIntoDir(@Nullable PsiElement target)
263
9,654