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/analysis-api/src/com/intellij/codeInsight/lookup/LookupElementPresentation.java
setTypeIconRightAligned
public void setTypeIconRightAligned(boolean typeIconRightAligned) { ensureMutable(); myTypeIconRightAligned = typeIconRightAligned; }
[ 12, 35 ]
public void setTypeIconRightAligned(boolean typeIconRightAligned)
143
304,695
../intellij-community/plugins/xpath/xpath-lang/src/org/intellij/lang/xpath/psi/impl/XPathElementImpl.java
addBefore
@Override public PsiElement addBefore(@NotNull PsiElement psiElement, final PsiElement anchor) throws IncorrectOperationException { final ASTNode node = getNode(); final ASTNode child = psiElement.getNode(); assert child != null; node.addChild(child, anchor.getNode()); return node.getPsi(); }
[ 30, 39 ]
@Override public PsiElement addBefore(@NotNull PsiElement psiElement, final PsiElement anchor)
317
50,759
../intellij-community/java/debugger/impl/src/com/intellij/debugger/settings/CaptureSettingsProvider.java
asString
String asString();
[ 7, 15 ]
String asString()
18
385,704
../intellij-community/plugins/groovy/groovy-psi/src/org/jetbrains/plugins/groovy/lang/psi/impl/GroovyPsiElementFactoryImpl.java
createConstructor
@NotNull @Override public PsiMethod createConstructor(@NotNull @NonNls String name) { return createConstructorFromText(name, name + "(){}", null); }
[ 40, 57 ]
@NotNull @Override public PsiMethod createConstructor(@NotNull @NonNls String name)
158
165,163
../intellij-community/platform/core-api/src/com/intellij/psi/LanguageSubstitutors.java
processLanguageSubstitution
private static void processLanguageSubstitution(final @NotNull VirtualFile file, @NotNull Language originalLang, final @NotNull Language substitutedLang, @NotNull Project project) { if (file instanceof VirtualFileWindow) { // Injected files are created with substituted language, no need to reparse: // com.intellij.psi.impl.source.tree.injected.MultiHostRegistrarImpl#doneInjecting return; } Key<String> projectKey = getOrCreateProjectKey(project); Language prevSubstitutedLang = Language.findLanguageByID(projectKey.get(file)); final Language prevLang = ObjectUtils.notNull(prevSubstitutedLang, originalLang); if (!prevLang.is(substitutedLang)) { if (file.replace(projectKey, prevSubstitutedLang != null ? prevSubstitutedLang.getID() : null, substitutedLang.getID())) { if (prevSubstitutedLang == null) { return; // no need to reparse for the first language substitution } if (ApplicationManager.getApplication().isUnitTestMode()) { return; } requestReparsing(file, prevLang, substitutedLang); } } }
[ 20, 47 ]
private static void processLanguageSubstitution(final @NotNull VirtualFile file, @NotNull Language originalLang, final @NotNull Language substitutedLang, @NotNull Project project)
1,273
293,894
../intellij-community/plugins/groovy/groovy-psi/src/org/jetbrains/plugins/groovy/findUsages/GrImplicitUsageProvider.java
isImplicitUsage
@Override public boolean isImplicitUsage(@NotNull PsiElement element) { if (element instanceof GrMethod method) { if (PsiUtil.OPERATOR_METHOD_NAMES.contains(method.getName())) return true; if (MissingMethodAndPropertyUtil.isPropertyMissing(method)) return true; if (MissingMethodAndPropertyUtil.isMethodMissing(method)) return true; if (isDelegateAnnotated(method)) return true; } else if (element instanceof GrParameter parameter) { final PsiElement scope = parameter.getDeclarationScope(); if (scope instanceof GrMethod && (MissingMethodAndPropertyUtil.isMethodMissing((GrMethod)scope) || MissingMethodAndPropertyUtil .isPropertyMissing((GrMethod)scope))) return true; } return false; }
[ 27, 42 ]
@Override public boolean isImplicitUsage(@NotNull PsiElement element)
760
168,390
../intellij-community/java/java-psi-impl/src/com/intellij/core/JavaCoreApplicationEnvironment.java
shouldShowExplicitLambdaType
@Override protected boolean shouldShowExplicitLambdaType(@NotNull PsiAnonymousClass anonymousClass, @NotNull PsiNewExpression expression) { return false; }
[ 34, 62 ]
@Override protected boolean shouldShowExplicitLambdaType(@NotNull PsiAnonymousClass anonymousClass, @NotNull PsiNewExpression expression)
175
493,676
../intellij-community/plugins/coverage-common/src/com/intellij/coverage/BaseCoverageSuite.java
loadProjectInfo
@Nullable protected ProjectData loadProjectInfo() { String sessionDataFileName = myCoverageDataFileProvider.getCoverageDataFilePath(); if (sessionDataFileName == null) return null; File sessionDataFile = new File(sessionDataFileName); if (!sessionDataFile.exists()) { if (LOG.isDebugEnabled()) { LOG.debug("Nonexistent file given +" + sessionDataFileName); } return null; } final long startNs = System.nanoTime(); final ProjectData projectData = myRunner.loadCoverageData(sessionDataFile, this); final long timeMs = TimeUnit.NANOSECONDS.toMillis(System.nanoTime() - startNs); if (projectData != null) { CoverageLogger.logReportLoading(myProject, myRunner, timeMs, projectData.getClassesNumber()); } return projectData; }
[ 34, 49 ]
@Nullable protected ProjectData loadProjectInfo()
800
148,290
../intellij-community/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/ChangesBrowserNode.java
acceptDrop
public void acceptDrop(final ChangeListOwner dragOwner, final ChangeListDragBean dragBean) { }
[ 12, 22 ]
public void acceptDrop(final ChangeListOwner dragOwner, final ChangeListDragBean dragBean)
96
221,157
../intellij-community/platform/platform-impl/src/com/intellij/ui/tree/ui/ModelAccessor.java
getContent
public @NotNull NodeContent getContent() { return content; }
[ 28, 38 ]
public @NotNull NodeContent getContent()
70
312,653
../intellij-community/platform/lang-impl/src/com/intellij/facet/FacetManagerBase.java
createFacet
@Override @NotNull public <F extends Facet<?>, C extends FacetConfiguration> F createFacet(@NotNull final FacetType<F, C> type, @NotNull final String name, @NotNull final C configuration, @Nullable final Facet<?> underlying) { return createFacet(getModule(), type, name, configuration, underlying); }
[ 83, 94 ]
@Override @NotNull public <F extends Facet<?>, C extends FacetConfiguration> F createFacet(@NotNull final FacetType<F, C> type, @NotNull final String name, @NotNull final C configuration, @Nullable final Facet<?> underlying)
384
214,995
../intellij-community/platform/core-impl/src/com/intellij/psi/impl/PsiCachedValue.java
isUpToDate
@Override protected boolean isUpToDate(@NotNull Data<T> data) { if (myManager.isDisposed()) return false; Object[] dependencies = data.getDependencies(); if (dependencies.length > 0 && dependencies[0] == PSI_MOD_COUNT_OPTIMIZATION && data.getTimeStamps()[0] == myManager.getModificationTracker().getModificationCount()) { return true; } return super.isUpToDate(data); }
[ 30, 40 ]
@Override protected boolean isUpToDate(@NotNull Data<T> data)
417
184,676
../intellij-community/java/execution/impl/src/com/intellij/execution/application/AbstractApplicationConfigurationProducer.java
setupConfiguration
private void setupConfiguration(T configuration, final PsiClass aClass, final ConfigurationContext context) { if (aClass instanceof PsiImplicitClass) { configuration.setImplicitClassConfiguration(true); } configuration.setMainClassName(JavaExecutionUtil.getRuntimeQualifiedName(aClass)); configuration.setGeneratedName(); setupConfigurationModule(context, configuration); }
[ 13, 31 ]
private void setupConfiguration(T configuration, final PsiClass aClass, final ConfigurationContext context)
401
382,085
../intellij-community/platform/code-style-impl/src/com/intellij/formatting/templateLanguages/DataLanguageBlockFragmentWrapper.java
getAlignment
@Override public Alignment getAlignment() { return myOwner.getAlignment(); }
[ 29, 41 ]
@Override public Alignment getAlignment()
84
268,920
../intellij-community/platform/execution/src/com/intellij/execution/ui/ConsoleView.java
performWhenNoDeferredOutput
void performWhenNoDeferredOutput(@NotNull Runnable runnable);
[ 5, 32 ]
void performWhenNoDeferredOutput(@NotNull Runnable runnable)
61
276,185
../intellij-community/platform/util/ui/src/com/intellij/ui/paint/RectanglePainter2D.java
paint
@Override public void paint(@NotNull Graphics2D g, double x, double y, double width, double height, @NotNull StrokeType strokeType, double strokeWidth) { paint(g, x, y, width, height, null, strokeType, strokeWidth, RenderingHints.VALUE_ANTIALIAS_DEFAULT); }
[ 26, 31 ]
@Override public void paint(@NotNull Graphics2D g, double x, double y, double width, double height, @NotNull StrokeType strokeType, double strokeWidth)
337
226,713
../intellij-community/platform/lang-impl/src/com/intellij/util/gist/storage/GistStorageImpl.java
newGist
@Override public @NotNull <Data> Gist<Data> newGist(@NotNull String id, int version, @NotNull DataExternalizer<Data> externalizer) { @SuppressWarnings("unchecked") GistImpl<Data> gist = (GistImpl<Data>)knownGists.computeIfAbsent( id, __ -> new GistImpl<>(id, version, externalizer) ); if (gist.version() != version) { throw new IllegalArgumentException("Gist[" + id + "] already exists, but with version(=" + gist.version() + ") != " + version); } if (gist.externalizer() != externalizer) { throw new IllegalArgumentException( "Gist[" + id + "] already exists, but with externalizer(=" + gist.externalizer() + ") != " + externalizer); } return gist; }
[ 46, 53 ]
@Override public @NotNull <Data> Gist<Data> newGist(@NotNull String id, int version, @NotNull DataExternalizer<Data> externalizer)
808
197,951
../intellij-community/plugins/groovy/groovy-psi/src/org/jetbrains/plugins/groovy/lang/groovydoc/psi/impl/GrDocCommentImpl.java
getOwner
@Override public GrDocCommentOwner getOwner() { return GrDocCommentUtil.findDocOwner(this); }
[ 37, 45 ]
@Override public GrDocCommentOwner getOwner()
101
163,978
../intellij-community/plugins/git4idea/src/git4idea/merge/GitConflictResolver.java
setMergeDescription
public Params setMergeDescription(@Nls String mergeDescription) { myMergeDescription = mergeDescription; return this; }
[ 14, 33 ]
public Params setMergeDescription(@Nls String mergeDescription)
135
36,305
../intellij-community/java/java-analysis-impl/src/com/intellij/codeInspection/dataFlow/CommonDataflow.java
getResult
DataflowResult getResult() { return myResult == null || myResult.myResult != RunnerResult.OK ? null : myResult; }
[ 15, 24 ]
DataflowResult getResult()
127
350,312
../intellij-community/xml/xml-psi-impl/src/com/intellij/xml/impl/schema/SchemaNSDescriptor.java
getName
@Override public String getName(final @NotNull XmlTag t) { return t.getAttributeValue(NAME_ATTR_NAME); }
[ 28, 35 ]
@Override public String getName(final @NotNull XmlTag t)
118
506,221
../intellij-community/platform/core-api/src/com/intellij/psi/util/PsiTreeUtil.java
processElements
public static boolean processElements(@NotNull PsiElementProcessor<? super PsiElement> processor, PsiElement @Nullable ... elements) { if (elements != null) { for (PsiElement element : elements) { if (!processElements(element, processor)) { return false; } } } return true; }
[ 22, 37 ]
public static boolean processElements(@NotNull PsiElementProcessor<? super PsiElement> processor, PsiElement @Nullable ... elements)
327
294,599
../intellij-community/java/java-analysis-impl/src/com/siyeh/ig/threading/NonAtomicOperationOnVolatileFieldInspection.java
buildVisitor
@Override public BaseInspectionVisitor buildVisitor() { return new NonAtomicOperationOnVolatileFieldVisitor(); }
[ 41, 53 ]
@Override public BaseInspectionVisitor buildVisitor()
120
348,827
../intellij-community/platform/platform-impl/src/com/intellij/xml/breadcrumbs/BreadcrumbsComponent.java
getAttributes
static @NotNull TextAttributes getAttributes(Crumb c) { return EditorColorsManager.getInstance().getGlobalScheme().getAttributes(getKey(c)); }
[ 31, 44 ]
static @NotNull TextAttributes getAttributes(Crumb c)
152
328,703
../intellij-community/platform/platform-api/src/com/intellij/openapi/ui/JBPopupMenu.java
updateShift
private void updateShift(int increment) { int maxHeight = super.preferredLayoutSize(myTarget).height - getMaxHeight(); int newShift = Math.max(0, Math.min(maxHeight, myShift + increment)); if (newShift != myShift) { myShift = newShift; myTarget.revalidate(); myTarget.repaint(); Window w = ComponentUtil.getWindow(myTarget.getComponent()); if (w != null) { for (Window window : w.getOwnedWindows()) { window.dispose(); } } } }
[ 13, 24 ]
private void updateShift(int increment)
534
255,606
../intellij-community/platform/remote-driver/core/src/com/intellij/driver/impl/Invoker.java
getProductVersion
@Override public ProductVersion getProductVersion() { BuildNumber build = ApplicationInfoImpl.getShadowInstanceImpl().getBuild(); return new ProductVersion( build.getProductCode(), build.isSnapshot(), build.getBaselineVersion(), build.asString() ); }
[ 34, 51 ]
@Override public ProductVersion getProductVersion()
291
180,922
../intellij-community/xml/impl/src/com/intellij/xml/util/documentation/HtmlDocumentationProvider.java
getUrlForHtml
private String getUrlForHtml(PsiElement element, PsiElement originalElement) { return doIfNotNull(getDocumentation(element, originalElement), MdnSymbolDocumentation::getUrl); }
[ 15, 28 ]
private String getUrlForHtml(PsiElement element, PsiElement originalElement)
182
500,735
../intellij-community/platform/util/src/com/intellij/util/containers/ConcurrentFactoryMap.java
hasNext
@Override public boolean hasNext() { return it.hasNext(); }
[ 33, 40 ]
@Override public boolean hasNext()
85
238,213
../intellij-community/platform/usageView-impl/src/com/intellij/usages/impl/UsageViewManagerImpl.java
showToolWindow
void showToolWindow(boolean activateWindow) { ToolWindow toolWindow = ToolWindowManager.getInstance(project).getToolWindow(ToolWindowId.FIND); toolWindow.show(null); if (activateWindow && !toolWindow.isActive()) { toolWindow.activate(null); } }
[ 5, 19 ]
void showToolWindow(boolean activateWindow)
268
263,460
../intellij-community/platform/core-impl/src/com/intellij/psi/impl/file/PsiDirectoryImpl.java
findElementAt
@Override public PsiElement findElementAt(int offset) { return null; }
[ 30, 43 ]
@Override public PsiElement findElementAt(int offset)
78
185,078
../intellij-community/platform/platform-impl/src/com/intellij/ui/mac/touchbar/ActionsLoader.java
getAutoCloseActions
private static String[] getAutoCloseActions(@NotNull String toolWindowId) { if (toolWindowId.isEmpty()) { return null; } // TODO: read setting from proper place (think where) final String propVal = System.getProperty(SETTINS_AUTOCLOSE_KEY + '.' + toolWindowId); if (propVal == null || propVal.isEmpty()) { return getAutoCloseActionsDefault(toolWindowId); } final String[] split = propVal.split(","); if (split.length == 0) { return null; } for (int c = 0; c < split.length; ++c) { split[c] = split[c].trim(); } return split; }
[ 24, 43 ]
private static String[] getAutoCloseActions(@NotNull String toolWindowId)
603
314,401
../intellij-community/platform/lang-impl/src/com/intellij/codeInsight/daemon/impl/SeverityUtil.java
getRegisteredHighlightingInfoTypes
public static @NotNull Collection<SeverityRegistrar.SeverityBasedTextAttributes> getRegisteredHighlightingInfoTypes(@NotNull SeverityRegistrar registrar) { List<SeverityRegistrar.SeverityBasedTextAttributes> collection = new ArrayList<>(registrar.allRegisteredAttributes()); for (HighlightInfoType type : SeverityRegistrar.standardSeverities()) { if (HighlightInfoType.INFORMATION.equals(type) || HighlightInfoType.INFO.equals(type)) continue; collection.add(getSeverityBasedTextAttributes(registrar, type)); } collection.sort(Comparator.comparing(SeverityRegistrar.SeverityBasedTextAttributes::getSeverity, registrar.reversed())); return collection; }
[ 81, 115 ]
public static @NotNull Collection<SeverityRegistrar.SeverityBasedTextAttributes> getRegisteredHighlightingInfoTypes(@NotNull SeverityRegistrar registrar)
686
213,764
../intellij-community/plugins/hg4idea/src/org/zmlx/hg4idea/command/HgCommitTypeCommand.java
saveCommitMessage
protected File saveCommitMessage() throws VcsException { File systemDir = new File(PathManager.getSystemPath()); File tempFile = new File(systemDir, TEMP_FILE_NAME); try { FileUtil.writeToFile(tempFile, myMessage.getBytes(myCharset)); } catch (IOException e) { throw new VcsException(HgBundle.message("action.hg4idea.Commit.cant.prepare.commit.message.file"), e); } return tempFile; }
[ 15, 32 ]
protected File saveCommitMessage()
426
139,014
../intellij-community/plugins/ui-designer-core/src/com/intellij/designer/palette/PalettePanel.java
valueChanged
@Override public void valueChanged(ListSelectionEvent event) { notifySelection(event); }
[ 26, 38 ]
@Override public void valueChanged(ListSelectionEvent event)
102
62,956
../intellij-community/jps/model-impl/src/org/jetbrains/jps/model/module/impl/JpsSdkDependencyImpl.java
resolveSdk
@Override public JpsLibrary resolveSdk() { final JpsSdkReference<?> reference = getSdkReference(); if (reference == null) return null; return reference.resolve(); }
[ 30, 40 ]
@Override public JpsLibrary resolveSdk()
180
336,129
../intellij-community/platform/platform-impl/src/com/intellij/openapi/editor/impl/EditorGutterComponentImpl.java
mouseReleased
@Override public void mouseReleased(MouseEvent e) { try { if (e.isPopupTrigger()) { invokePopup(e); } else { invokeGutterAction(e); } } finally { removeLoadingIconForGutterMark(); } }
[ 24, 37 ]
@Override public void mouseReleased(MouseEvent e)
249
325,206
../intellij-community/plugins/properties/src/com/intellij/lang/properties/refactoring/PropertiesFilesSafeDeleteProcessor.java
prepareForDeletion
@Override public void prepareForDeletion(final @NotNull PsiElement element) throws IncorrectOperationException { }
[ 24, 42 ]
@Override public void prepareForDeletion(final @NotNull PsiElement element)
118
147,861
../intellij-community/java/java-impl-refactorings/src/com/intellij/refactoring/introduceField/IntroduceConstantDialog.java
actionPerformed
@Override public void actionPerformed(final ActionEvent e) { enableEnumDependant(introduceEnumConstant()); }
[ 28, 43 ]
@Override public void actionPerformed(final ActionEvent e)
128
481,762
../intellij-community/platform/diff-api/src/com/intellij/diff/chains/SimpleDiffRequestChain.java
getListSelection
@Override public @NotNull ListSelection<? extends DiffRequestProducer> getListSelection() { return myRequests; }
[ 73, 89 ]
@Override public @NotNull ListSelection<? extends DiffRequestProducer> getListSelection()
120
180,866
../intellij-community/plugins/hg4idea/src/org/zmlx/hg4idea/status/ui/HgIncomingOutgoingWidget.java
registerCustomListeners
@Override protected void registerCustomListeners(@NotNull MessageBusConnection connection) { super.registerCustomListeners(connection); connection.subscribe(VcsRepositoryManager.VCS_REPOSITORY_MAPPING_UPDATED, () -> updateLater()); connection.subscribe(HgVcs.STATUS_TOPIC, (project, root) -> updateLater()); connection.subscribe(HgVcs.REMOTE_TOPIC, (project, root) -> updateLater()); connection.subscribe(HgVcs.INCOMING_OUTGOING_CHECK_TOPIC, new HgWidgetUpdater() { @Override public void update() { updateLater(); } }); connection.subscribe(FileEditorManagerListener.FILE_EDITOR_MANAGER, new FileEditorManagerListener() { @Override public void fileOpened(@NotNull FileEditorManager source, @NotNull VirtualFile file) { updateLater(); } @Override public void fileClosed(@NotNull FileEditorManager source, @NotNull VirtualFile file) { updateLater(); } @Override public void selectionChanged(@NotNull FileEditorManagerEvent event) { updateLater(); } }); }
[ 27, 50 ]
@Override protected void registerCustomListeners(@NotNull MessageBusConnection connection)
1,096
138,575
../intellij-community/platform/editor-ui-api/src/com/intellij/openapi/editor/SoftWrapModel.java
getSoftWrapsForRange
@NotNull List<? extends SoftWrap> getSoftWrapsForRange(int start, int end);
[ 36, 56 ]
@NotNull List<? extends SoftWrap> getSoftWrapsForRange(int start, int end)
77
300,588
../intellij-community/plugins/properties/properties-psi-impl/src/com/intellij/lang/properties/editor/ResourceBundlePropertiesUpdateManager.java
getIn
@NotNull @Override public Iterator<String> getIn(String n) { final Collection<String> siblings = new LinkedHashSet<>(); for (PropertiesOrder order : propertiesOrders) { for (String nextKey : order.getNext(n)) { if (isAlphaSorted[0] && String.CASE_INSENSITIVE_ORDER.compare(n, nextKey) > 0) { isAlphaSorted[0] = false; } siblings.add(nextKey); } } return siblings.iterator(); }
[ 55, 60 ]
@NotNull @Override public Iterator<String> getIn(String n)
498
147,564
../intellij-community/platform/platform-api/src/com/intellij/ui/messager/CalloutComponent.java
eventDispatched
@Override public void eventDispatched(AWTEvent event) { if (event.getID() == MouseEvent.MOUSE_PRESSED) { dispose(); } }
[ 28, 43 ]
@Override public void eventDispatched(AWTEvent event)
157
252,591
../intellij-community/jvm/jvm-analysis-impl/src/com/intellij/codeInspection/blockingCallsDetection/BlockingMethodInNonBlockingContextInspection.java
getNonBlockingContextCheckers
private static @NotNull List<NonBlockingContextChecker> getNonBlockingContextCheckers(@NotNull PsiFile file, @NotNull Collection<String> blockingAnnotations, @NotNull Collection<String> nonBlockingAnnotations) { List<NonBlockingContextChecker> nonBlockingContextCheckers = new ArrayList<>(NonBlockingContextChecker.EP_NAME.getExtensionList()); nonBlockingContextCheckers.add(new AnnotationBasedNonBlockingContextChecker(blockingAnnotations, nonBlockingAnnotations)); nonBlockingContextCheckers.removeIf(checker -> !checker.isApplicable(file)); return nonBlockingContextCheckers; }
[ 56, 85 ]
private static @NotNull List<NonBlockingContextChecker> getNonBlockingContextCheckers(@NotNull PsiFile file, @NotNull Collection<String> blockingAnnotations, @NotNull Collection<String> nonBlockingAnnotations)
774
342,571
../intellij-community/java/java-impl/src/com/siyeh/ig/performance/DynamicRegexReplaceableByCompiledPatternInspection.java
getFamilyName
@Override public @NotNull String getFamilyName() { return InspectionGadgetsBundle.message( "dynamic.regex.replaceable.by.compiled.pattern.quickfix"); }
[ 37, 50 ]
@Override public @NotNull String getFamilyName()
173
366,804
../intellij-community/platform/lang-impl/src/com/intellij/ide/projectView/impl/nodes/ProjectViewDirectoryHelper.java
supportsFlattenPackages
public boolean supportsFlattenPackages() { return false; }
[ 15, 38 ]
public boolean supportsFlattenPackages()
64
192,718
../intellij-community/java/java-impl/src/com/intellij/codeInspection/inferNullity/NullityInferrer.java
expressionIsSometimesNull
private boolean expressionIsSometimesNull(@Nullable PsiExpression expression) { if (expression == null) { return false; } if (ExpressionUtils.nonStructuralChildren(expression).anyMatch( expr -> expr instanceof PsiMethodCallExpression && isNullable(((PsiMethodCallExpression)expr).resolveMethod()))) { return true; } return NullabilityUtil.getExpressionNullability(expression, true) == Nullability.NULLABLE; }
[ 16, 41 ]
private boolean expressionIsSometimesNull(@Nullable PsiExpression expression)
448
369,173
../intellij-community/plugins/groovy/groovy-psi/src/org/jetbrains/plugins/groovy/codeInspection/utils/ControlFlowUtils.java
statementContainsReturn
public static boolean statementContainsReturn(@NotNull GrStatement statement) { final ReturnFinder returnFinder = new ReturnFinder(); statement.accept(returnFinder); return returnFinder.returnFound(); }
[ 22, 45 ]
public static boolean statementContainsReturn(@NotNull GrStatement statement)
216
162,755
../intellij-community/java/debugger/impl/src/com/intellij/debugger/ui/breakpoints/JavaFieldBreakpointType.java
getText
@Nls private static String getText(XBreakpoint<JavaFieldBreakpointProperties> breakpoint, boolean simple) { //if (!isValid()) { // return JavaDebuggerBundle.message("status.breakpoint.invalid"); //} JavaFieldBreakpointProperties properties = breakpoint.getProperties(); String className = properties.myClassName; if (className == null || className.isEmpty()) return properties.myFieldName; String displayedClassName = simple ? ClassUtil.extractClassName(className) : className; return displayedClassName + "." + properties.myFieldName; }
[ 29, 36 ]
@Nls private static String getText(XBreakpoint<JavaFieldBreakpointProperties> breakpoint, boolean simple)
575
384,920
../intellij-community/platform/vcs-impl/src/com/intellij/openapi/diff/impl/patch/apply/GenericPatchApplier.java
trySolveSomehow
public void trySolveSomehow() { try { assert !myNotExact.isEmpty(); for (final SplitHunk hunk : myNotExact) { hunk.cutSameTail(); if (!testForPartialContextMatch(hunk, new LongTryMismatchSolver(hunk), ourMaxWalk, null)) { if (complementIfShort(hunk)) { if (!testForPartialContextMatch(hunk, new LongTryMismatchSolver(hunk), ourMaxWalk, null)) { myNotBound.add(hunk); } } else { myNotBound.add(hunk); } } } myNotBound.sort(HunksComparator.getInstance()); myNotExact.clear(); return; } catch (ProcessCanceledException e) { throw e; } catch (Throwable e) { LOG.error(e); // GenericPatchApplier is buggy, limit AIOOB impact on user } // fallback root on internal error resetToFallbackStateOnError(true); }
[ 12, 27 ]
public void trySolveSomehow()
899
218,714
../intellij-community/platform/dvcs-impl/src/com/intellij/dvcs/ui/CloneDvcsDialog.java
rememberSettings
public void rememberSettings() { final DvcsRememberedInputs rememberedInputs = getRememberedInputs(); rememberedInputs.addUrl(getSourceRepositoryURL()); rememberedInputs.setCloneParentDir(getParentDirectory()); }
[ 12, 28 ]
public void rememberSettings()
226
242,313
../intellij-community/java/java-psi-api/src/com/intellij/psi/util/PsiFormatUtil.java
formatModifiers
private static void formatModifiers(PsiModifierListOwner element, int options, StringBuilder buffer) { PsiModifierList list = element.getModifierList(); if (list == null) return; if (!BitUtil.isSet(options, SHOW_REDUNDANT_MODIFIERS) ? list.hasExplicitModifier(PsiModifier.PUBLIC) : list.hasModifierProperty(PsiModifier.PUBLIC)) { appendModifier(buffer, PsiModifier.PUBLIC); } if (list.hasModifierProperty(PsiModifier.PROTECTED)) { appendModifier(buffer, PsiModifier.PROTECTED); } if (list.hasModifierProperty(PsiModifier.PRIVATE)) { appendModifier(buffer, PsiModifier.PRIVATE); } if (!BitUtil.isSet(options, SHOW_REDUNDANT_MODIFIERS) ? list.hasExplicitModifier(PsiModifier.PACKAGE_LOCAL) : list.hasModifierProperty(PsiModifier.PACKAGE_LOCAL)) { if (element instanceof PsiClass && element.getParent() instanceof PsiDeclarationStatement) { // local class append(buffer, JavaPsiBundle.message("local.class.preposition")); } else { appendModifier(buffer, PsiModifier.PACKAGE_LOCAL); } } if (!BitUtil.isSet(options, SHOW_REDUNDANT_MODIFIERS) ? list.hasExplicitModifier(PsiModifier.STATIC) : list.hasModifierProperty(PsiModifier.STATIC)) { if (!BitUtil.isSet(options, JAVADOC_MODIFIERS_ONLY) || !(element instanceof PsiClass && ((PsiClass)element).isEnum())) { appendModifier(buffer, PsiModifier.STATIC); } } boolean isInterface = element instanceof PsiClass && ((PsiClass)element).isInterface(); if (!isInterface && //cls modifier list (!BitUtil.isSet(options, SHOW_REDUNDANT_MODIFIERS) ? list.hasExplicitModifier(PsiModifier.ABSTRACT) : list.hasModifierProperty(PsiModifier.ABSTRACT))) appendModifier(buffer, PsiModifier.ABSTRACT); if (!BitUtil.isSet(options, SHOW_REDUNDANT_MODIFIERS) ? list.hasExplicitModifier(PsiModifier.FINAL) : list.hasModifierProperty(PsiModifier.FINAL)) { if (!BitUtil.isSet(options, JAVADOC_MODIFIERS_ONLY) || !(element instanceof PsiClass && ((PsiClass)element).isEnum())) { appendModifier(buffer, PsiModifier.FINAL); } } if (list.hasModifierProperty(PsiModifier.NATIVE) && !BitUtil.isSet(options, JAVADOC_MODIFIERS_ONLY)) { appendModifier(buffer, PsiModifier.NATIVE); } if (list.hasModifierProperty(PsiModifier.SYNCHRONIZED) && !BitUtil.isSet(options, JAVADOC_MODIFIERS_ONLY)) { appendModifier(buffer, PsiModifier.SYNCHRONIZED); } if (list.hasModifierProperty(PsiModifier.STRICTFP) && !BitUtil.isSet(options, JAVADOC_MODIFIERS_ONLY)) { appendModifier(buffer, PsiModifier.STRICTFP); } if (list.hasModifierProperty(PsiModifier.TRANSIENT) && element instanceof PsiVariable) { // javac 5 puts transient attr for methods appendModifier(buffer, PsiModifier.TRANSIENT); } if (list.hasModifierProperty(PsiModifier.VOLATILE)) { appendModifier(buffer, PsiModifier.VOLATILE); } }
[ 20, 35 ]
private static void formatModifiers(PsiModifierListOwner element, int options, StringBuilder buffer)
3,043
489,152
../intellij-community/plugins/IntelliLang/src/org/intellij/plugins/intelliLang/InjectionsSettingsUI.java
hashCode
@Override public int hashCode() { return System.identityHashCode(this); }
[ 25, 33 ]
@Override public int hashCode()
87
33,776
../intellij-community/java/java-analysis-impl/src/com/intellij/codeInspection/dataFlow/TypeConstraints.java
isAbstract
boolean isAbstract();
[ 8, 18 ]
boolean isAbstract()
21
350,131
../intellij-community/platform/lang-impl/src/com/intellij/ide/util/gotoByName/ChooseByNamePopup.java
createPopup
public static ChooseByNamePopup createPopup(final Project project, final ChooseByNameModel model, final PsiElement context) { return createPopup(project, model, ChooseByNameModelEx.getItemProvider(model, context), null); }
[ 32, 43 ]
public static ChooseByNamePopup createPopup(final Project project, final ChooseByNameModel model, final PsiElement context)
228
191,170
../intellij-community/platform/platform-api/src/com/intellij/openapi/ui/Messages.java
createTextFieldComponent
protected JTextComponent createTextFieldComponent() { JTextField field = new JTextField(INPUT_DIALOG_COLUMNS); field.setMargin(JBInsets.create(0, 5)); return field; }
[ 25, 49 ]
protected JTextComponent createTextFieldComponent()
188
255,934
../intellij-community/platform/platform-impl/src/com/intellij/ui/SuitableFontProviderImpl.java
getFontAbleToDisplay
@Override public Font getFontAbleToDisplay(int codePoint, int size, @JdkConstants.FontStyle int style, @NotNull String defaultFontFamily) { return ComplementaryFontsRegistry.getFontAbleToDisplay(codePoint, size, style, defaultFontFamily, null).getFont(); }
[ 24, 44 ]
@Override public Font getFontAbleToDisplay(int codePoint, int size, @JdkConstants.FontStyle int style, @NotNull String defaultFontFamily)
264
310,360
../intellij-community/platform/lang-core/src/com/intellij/facet/ui/ValidationResult.java
isOk
public boolean isOk() { return myErrorMessage == null; }
[ 15, 19 ]
public boolean isOk()
62
181,432
../intellij-community/java/java-psi-impl/src/com/intellij/psi/impl/compiled/ClsReferenceExpressionImpl.java
getQualifiedName
@Override public String getQualifiedName() { return getCanonicalText(); }
[ 26, 42 ]
@Override public String getQualifiedName()
81
497,587
../intellij-community/plugins/lombok/src/main/java/de/plushnikov/intellij/plugin/processor/clazz/builder/BuilderProcessor.java
validate
Override protected boolean validate(@NotNull PsiAnnotation psiAnnotation, @NotNull PsiClass psiClass, @NotNull ProblemSink builder) { // we skip validation here, because it will be validated by other BuilderClassProcessor return true;//builderHandler.validate(psiClass, psiAnnotation, builder); }
[ 30, 38 ]
Override protected boolean validate(@NotNull PsiAnnotation psiAnnotation, @NotNull PsiClass psiClass, @NotNull ProblemSink builder)
309
47,602
../intellij-community/platform/dvcs-impl/src/com/intellij/dvcs/push/ui/PushLog.java
layout
@Override public void layout() { super.layout(); if (syncStrategyPanel != null) { Rectangle bounds = this.getViewport().getBounds(); int height = bounds.height - syncStrategyPanel.getPreferredSize().height; this.getViewport().setBounds(bounds.x, bounds.y, bounds.width, height); syncStrategyPanel.setBounds(bounds.x, bounds.y + height, bounds.width, syncStrategyPanel.getPreferredSize().height); } }
[ 28, 34 ]
@Override public void layout()
513
242,597
../intellij-community/platform/lang-impl/src/com/intellij/execution/console/DuplexConsoleView.java
printHyperlink
@Override public void printHyperlink(@NotNull String hyperlinkText, HyperlinkInfo info) { myPrimaryConsoleView.printHyperlink(hyperlinkText, info); mySecondaryConsoleView.printHyperlink(hyperlinkText, info); }
[ 24, 38 ]
@Override public void printHyperlink(@NotNull String hyperlinkText, HyperlinkInfo info)
221
202,862
../intellij-community/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/LocalChangeListImpl.java
isDefault
@Override public boolean isDefault() { return myIsDefault; }
[ 27, 36 ]
@Override public boolean isDefault()
68
220,185
../intellij-community/plugins/kotlin/idea/src/org/jetbrains/kotlin/idea/refactoring/introduce/extractFunction/ui/KotlinExtractFunctionDialog.java
createUIComponents
private void createUIComponents() { this.signaturePreviewField = new KotlinSignatureComponent("", project); }
[ 13, 31 ]
private void createUIComponents()
121
125,720
../intellij-community/platform/vcs-impl/src/com/intellij/vcs/AnnotationProviderEx.java
isAnnotationValid
@Override default boolean isAnnotationValid(@NotNull VcsFileRevision rev) { if (rev instanceof VcsFileRevisionEx) { return isAnnotationValid(((VcsFileRevisionEx)rev).getPath(), rev.getRevisionNumber()); } return true; }
[ 28, 45 ]
@Override default boolean isAnnotationValid(@NotNull VcsFileRevision rev)
241
224,354
../intellij-community/java/idea-ui/src/com/intellij/ide/projectWizard/ProjectCategory.java
getAssociatedFrameworkIds
public String @NotNull [] getAssociatedFrameworkIds() { return ArrayUtilRt.EMPTY_STRING_ARRAY; }
[ 26, 51 ]
public String @NotNull [] getAssociatedFrameworkIds()
102
361,529
../intellij-community/java/java-impl/src/com/intellij/codeInsight/ExpectedTypesProvider.java
processType
private static void processType(@NotNull PsiType type, @NotNull PsiTypeVisitor<? extends PsiType> visitor, @NotNull Set<? super PsiType> typeSet) { PsiType accepted = type.accept(visitor); if (accepted != null) typeSet.add(accepted); }
[ 20, 31 ]
private static void processType(@NotNull PsiType type, @NotNull PsiTypeVisitor<? extends PsiType> visitor, @NotNull Set<? super PsiType> typeSet)
245
373,376
../intellij-community/java/java-impl/src/com/siyeh/ig/migration/IfCanBeSwitchInspection.java
extractStatementComments
private static void extractStatementComments(PsiElement element, IfStatementBranch out) { PsiComment comment = getPrevSiblingOfType(element, PsiComment.class, PsiStatement.class, PsiKeyword.class); while (comment != null) { out.addStatementComment(getCommentText(comment)); comment = getPrevSiblingOfType(comment, PsiComment.class, PsiStatement.class, PsiKeyword.class); } }
[ 20, 44 ]
private static void extractStatementComments(PsiElement element, IfStatementBranch out)
400
366,994
../intellij-community/json/src/com/jetbrains/jsonSchema/impl/JsonSchemaDocumentationProvider.java
hasNonTrustedProjects
private static boolean hasNonTrustedProjects() { for (Project project : ProjectManager.getInstance().getOpenProjects()) { if (!TrustedProjects.isTrusted(project)) { return true; } } return false; }
[ 23, 44 ]
private static boolean hasNonTrustedProjects()
231
512,756
../intellij-community/plugins/dev/intellij.dev.psiViewer/src/formatter/BlockViewerPsiBasedTree.java
resetBlockTree
private void resetBlockTree() { myBlockTree.removeAll(); if (myTreeModel != null) { Disposer.dispose(myTreeModelDisposable); myTreeModel = null; myTreeModelDisposable = Disposer.newDisposable(); } myPsiToBlockMap = null; ViewerPsiBasedTree.removeListenerOfClass(myBlockTree, BlockTreeSelectionListener.class); }
[ 13, 27 ]
private void resetBlockTree()
351
150,730
../intellij-community/platform/core-api/src/com/intellij/util/SlowOperations.java
reportOnceIfViolatedFor
@ApiStatus.Internal public static @NotNull AccessToken reportOnceIfViolatedFor(@NotNull Object target) { if (!EDT.isCurrentThreadEdt()) { return AccessToken.EMPTY_ACCESS_TOKEN; } String prev = ourTargetClass; ourTargetClass = target.getClass().getName(); return new AccessToken() { @Override public void finish() { //noinspection AssignmentToStaticFieldFromInstanceMethod ourTargetClass = prev; } }; }
[ 57, 80 ]
@ApiStatus.Internal public static @NotNull AccessToken reportOnceIfViolatedFor(@NotNull Object target)
469
291,084
../intellij-community/plugins/groovy/src/org/jetbrains/plugins/groovy/refactoring/ui/MethodOrClosureScopeChooser.java
dropHighlighters
private static void dropHighlighters(List<RangeHighlighter> highlighters) { for (RangeHighlighter highlighter : highlighters) { highlighter.dispose(); } highlighters.clear(); }
[ 20, 36 ]
private static void dropHighlighters(List<RangeHighlighter> highlighters)
196
171,438
../intellij-community/plugins/stream-debugger/src/com/intellij/debugger/streams/trace/impl/IntermediateStateImpl.java
getPrevCall
@NotNull @Override public StreamCall getPrevCall() { return myPrevCall; }
[ 41, 52 ]
@NotNull @Override public StreamCall getPrevCall()
83
34,775
../intellij-community/jps/jps-builders/src/org/jetbrains/jps/dependency/impl/DependencyGraphImpl.java
getDelta
@Override public Delta getDelta() { return delta; }
[ 31, 39 ]
@Override public Delta getDelta()
77
341,378
../intellij-community/plugins/eclipse/common-eclipse-util/src/EclipseModuleManager.java
registerUnknownCons
void registerUnknownCons(String con);
[ 5, 24 ]
void registerUnknownCons(String con)
37
41,496
../intellij-community/platform/analysis-impl/src/com/intellij/psi/impl/source/tree/injected/RangeMarkerWindow.java
setGreedyToRight
@Override public void setGreedyToRight(boolean greedy) { myHostMarker.setGreedyToRight(greedy); }
[ 24, 40 ]
@Override public void setGreedyToRight(boolean greedy)
105
245,384
../intellij-community/java/java-impl/src/com/intellij/psi/impl/source/codeStyle/JavaCodeStyleManagerImpl.java
isJavaUtilMethod
private static boolean isJavaUtilMethod(@NotNull PsiMethod method) { String name = PsiUtil.getMemberQualifiedName(method); return name != null && name.startsWith("java.util."); }
[ 23, 39 ]
private static boolean isJavaUtilMethod(@NotNull PsiMethod method)
188
371,454
../intellij-community/java/java-analysis-impl/src/com/intellij/codeInspection/deadCode/UnusedDeclarationInspectionBase.java
runInspection
@Override public void runInspection(@NotNull AnalysisScope scope, @NotNull InspectionManager manager, @NotNull GlobalInspectionContext globalContext, @NotNull ProblemDescriptionsProcessor problemDescriptionsProcessor) { globalContext.getRefManager().iterate(new RefJavaVisitor() { @Override public void visitElement(@NotNull RefEntity refEntity) { if (refEntity instanceof RefElementImpl refElement) { if (!refElement.isSuspicious()) return; PsiFile file = refElement.getContainingFile(); if (file == null) return; if (!((GlobalInspectionContextBase)globalContext).isToCheckFile(file, UnusedDeclarationInspectionBase.this) && !scope.contains(file)) { getEntryPointsManager(globalContext).addEntryPoint(refElement, false); } } } }); globalContext.putUserData(PHASE_KEY, 1); globalContext.putUserData(PROCESSED_SUSPICIOUS_ELEMENTS_KEY, new HashSet<>()); }
[ 24, 37 ]
@Override public void runInspection(@NotNull AnalysisScope scope, @NotNull InspectionManager manager, @NotNull GlobalInspectionContext globalContext, @NotNull ProblemDescriptionsProcessor problemDescriptionsProcessor)
1,055
352,484
../intellij-community/images/src/org/intellij/images/editor/impl/ImageEditorUI.java
centerComponents
private void centerComponents() { Rectangle bounds = getBounds(); Point point = imageComponent.getLocation(); // in embedded mode images should be left-side aligned point.x = isEmbedded ? 0 : (bounds.width - imageComponent.getWidth()) / 2; point.y = (bounds.height - imageComponent.getHeight()) / 2; imageComponent.setLocation(point); }
[ 13, 29 ]
private void centerComponents()
376
28,302
../intellij-community/platform/platform-api/src/com/intellij/openapi/keymap/NationalKeyboardSupport.java
loadState
@Override public void loadState(@NotNull OptionSet state) { isEnabled = state.enabled || "true".equals(System.getProperty(VMOption)); myOptions = state; }
[ 24, 33 ]
@Override public void loadState(@NotNull OptionSet state)
166
257,476
../intellij-community/plugins/hg4idea/src/org/zmlx/hg4idea/provider/HgDiffProvider.java
getLastRevision
@Override public ItemLatestState getLastRevision(VirtualFile file) { VirtualFile vcsRoot = VcsUtil.getVcsRootFor(project, file); if (vcsRoot == null) { return null; } HgRevisionNumber revision = (HgRevisionNumber) getCurrentRevision(file); if (revision == null) { return null; } return new ItemLatestState(revision, file.exists(), true); }
[ 35, 50 ]
@Override public ItemLatestState getLastRevision(VirtualFile file)
383
138,378
../intellij-community/platform/platform-impl/src/com/intellij/openapi/options/ConfigurableBuilder.java
apply
void apply() { myAccessor.setValue(getComponentValue()); }
[ 5, 10 ]
void apply()
68
317,795
../intellij-community/platform/lang-impl/src/com/intellij/codeInsight/daemon/impl/WholeFileLocalInspectionPassTracker.java
clearCaches
private void clearCaches() { synchronized (mySkipWholeInspectionsCache) { mySkipWholeInspectionsCache.clear(); } synchronized (myPsiModificationCount) { myPsiModificationCount.clear(); } }
[ 13, 24 ]
private void clearCaches()
218
213,370
../intellij-community/java/java-impl-refactorings/src/com/intellij/refactoring/extractMethodObject/ExtractLightMethodObjectHandler.java
getReturnType
@Override public PsiType getReturnType() { return null; }
[ 29, 42 ]
@Override public PsiType getReturnType()
71
483,567
../intellij-community/python/gen/com/jetbrains/python/console/protocol/PythonConsoleFrontendService.java
hashCode
@Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); if (isSetSuccess()) hashCode = hashCode * 8191 + success.hashCode(); hashCode = hashCode * 8191 + ((isSetInterrupted()) ? 131071 : 524287); if (isSetInterrupted()) hashCode = hashCode * 8191 + interrupted.hashCode(); return hashCode; }
[ 25, 33 ]
@Override public int hashCode()
417
5,856
../intellij-community/platform/util/src/com/intellij/util/containers/FilteredTraverserBase.java
interceptTraversal
public Meta<T> interceptTraversal(Function<? super TreeTraversal, ? extends TreeTraversal> interceptor) { if (interceptor == Functions.<TreeTraversal, TreeTraversal>identity()) return this; return new Meta<>(roots, traversal, tree, expand, regard, filter, forceExpand, forceIgnore, forceDisregard, Functions.compose(this.interceptor, interceptor), original); }
[ 15, 33 ]
public Meta<T> interceptTraversal(Function<? super TreeTraversal, ? extends TreeTraversal> interceptor)
400
238,163
../intellij-community/images/src/org/intellij/images/search/ImageTagManager.java
removeTag
public void removeTag(String tag, VirtualFile file) { State.Files files = myState.myTags.get(tag); if (files != null) { files.remove(file.getPath()); } }
[ 12, 21 ]
public void removeTag(String tag, VirtualFile file)
173
28,197
../intellij-community/platform/platform-api/src/com/intellij/openapi/ui/StripeTable.java
apply
public static void apply(@NotNull JBTable table) { table.setAutoResizeMode(AUTO_RESIZE_OFF); table.setTableHeader(createTableHeader(table.getColumnModel())); table.getTableHeader().setReorderingAllowed(false); //setOpaque(false); table.setGridColor(GRID_COLOR); table.setIntercellSpacing(new Dimension(1, 0)); table.setShowGrid(false); table.setStriped(true); }
[ 19, 24 ]
public static void apply(@NotNull JBTable table)
395
255,978
../intellij-community/platform/lang-impl/src/com/intellij/codeInsight/generation/CommentByLineCommentHandler.java
markInjectedFileUnsuitableForLineComment
public static void markInjectedFileUnsuitableForLineComment(@NotNull PsiFile file) { if (!InjectedLanguageManager.getInstance(file.getProject()).isInjectedFragment(file)) { throw new IllegalArgumentException("This method should be called only on injected files"); } file.putUserData(INJECTION_FORBIDS_LINE_COMMENTS, true); }
[ 19, 59 ]
public static void markInjectedFileUnsuitableForLineComment(@NotNull PsiFile file)
345
214,916
../intellij-community/plugins/properties/properties-psi-impl/src/com/intellij/lang/properties/PropertiesReferenceManager.java
processFile
private boolean processFile(@NotNull VirtualFile file, @NotNull BundleNameEvaluator evaluator, @NotNull PropertiesFileProcessor processor) { final PsiFile psiFile = myPsiManager.findFile(file); PropertiesFile propertiesFile = PropertiesImplUtil.getPropertiesFile(psiFile); if (propertiesFile != null) { final String qName = evaluator.evaluateBundleName(psiFile); if (qName != null) { if (!processor.process(qName, propertiesFile)) return false; } } return true; }
[ 16, 27 ]
private boolean processFile(@NotNull VirtualFile file, @NotNull BundleNameEvaluator evaluator, @NotNull PropertiesFileProcessor processor)
511
147,078
../intellij-community/java/compiler/openapi/src/com/intellij/openapi/compiler/options/ExcludeEntryDescription.java
isIncludeSubdirectories
public boolean isIncludeSubdirectories() { return myIncludeSubdirectories; }
[ 15, 38 ]
public boolean isIncludeSubdirectories()
82
493,491
../intellij-community/platform/lang-impl/src/com/intellij/framework/detection/impl/FrameworkDetectionContextImpl.java
getBaseDir
@Override public VirtualFile getBaseDir() { return myProject.getBaseDir(); }
[ 31, 41 ]
@Override public VirtualFile getBaseDir()
84
198,884
../intellij-community/platform/platform-impl/src/com/intellij/openapi/vfs/newvfs/persistent/PersistentFSTreeAccessor.java
doSaveChildren
void doSaveChildren(int parentId, @NotNull ListResult toSave) throws IOException { if (parentId == SUPER_ROOT_ID) { throw new AssertionError( "Incorrect call .doSaveChildren() with a super-root record id(=" + SUPER_ROOT_ID + "). " + "Super-root is a special file record for internal use, it MUST NOT be used directly"); } try (DataOutputStream record = attributeAccessor.writeAttribute(parentId, CHILDREN_ATTR)) { DataInputOutputUtil.writeINT(record, toSave.children.size()); int prevId = parentId; for (ChildInfo childInfo : toSave.children) { final int childId = childInfo.getId(); if (childId <= 0) { throw new IllegalArgumentException("ids must be >0 but got: " + childId + "; childInfo: " + childInfo + "; list: " + toSave); } if (childId == parentId) { FSRecords.LOG.error("Cyclic parent-child relations. parentId=" + parentId + "; list: " + toSave); } else { final int delta = childId - prevId; if (prevId != parentId && delta <= 0) { throw new IllegalArgumentException("The list must be sorted by (unique) id but got parentId: " + parentId + "; delta: " + delta + "; childInfo: " + childInfo + "; prevId: " + prevId + "; toSave: " + toSave); } DataInputOutputUtil.writeINT(record, delta); prevId = childId; } } } }
[ 5, 19 ]
void doSaveChildren(int parentId, @NotNull ListResult toSave)
1,520
320,317
../intellij-community/platform/analysis-api/src/com/intellij/psi/WeighingService.java
weigh
public static @NotNull <T, Loc> WeighingComparable<T, Loc> weigh(Key<? extends Weigher<T, Loc>> key, T element, @Nullable Loc location) { return weigh(key, new Computable.PredefinedValueComputable<>(element), location); }
[ 59, 64 ]
public static @NotNull <T, Loc> WeighingComparable<T, Loc> weigh(Key<? extends Weigher<T, Loc>> key, T element, @Nullable Loc location)
227
303,868
../intellij-community/platform/core-impl/src/com/intellij/psi/impl/ElementBase.java
getElementIcon
protected @Nullable Icon getElementIcon(@Iconable.IconFlags int flags) { PsiElement element = (PsiElement)this; if (!element.isValid()) { return null; } boolean isLocked = BitUtil.isSet(flags, ICON_FLAG_READ_STATUS) && !element.isWritable(); int elementFlags = isLocked ? FLAGS_LOCKED : 0; if (element instanceof ItemPresentation) { Icon baseIcon = ((ItemPresentation)element).getIcon(false); if (baseIcon != null) { return IconManager.getInstance().createLayeredIcon(this, baseIcon, elementFlags); } } if (element instanceof PsiFileSystemItem) { VirtualFile file = PsiUtilCore.getVirtualFile(element); Icon baseIcon = null; if (file == null && element instanceof PsiFile) { baseIcon = ((PsiFile)element).getFileType().getIcon(); } else if (file != null) { IconManager iconManager = IconManager.getInstance(); if (iconManager instanceof CoreAwareIconManager) { baseIcon = ((CoreAwareIconManager)iconManager).getIcon(file, flags & ~ICON_FLAG_READ_STATUS, element.getProject()); } else { baseIcon = isVisibilitySupported() ? getAdjustedBaseIcon(getBaseIcon(), flags) : getBaseIcon(); } } if (baseIcon == null) return null; return IconManager.getInstance().createLayeredIcon(this, baseIcon, elementFlags); } return null; }
[ 25, 39 ]
protected @Nullable Icon getElementIcon(@Iconable.IconFlags int flags)
1,413
184,670
../intellij-community/platform/ide-core-impl/src/com/intellij/openapi/editor/ex/EditorSettingsExternalizable.java
setLineNumeration
public void setLineNumeration(EditorSettings.LineNumerationType val) { EditorSettings.LineNumerationType old = myOptions.LINE_NUMERATION; if (old == val) return; myOptions.LINE_NUMERATION = val; myPropertyChangeSupport.firePropertyChange(PropNames.PROP_LINE_NUMERATION, old, val); }
[ 12, 29 ]
public void setLineNumeration(EditorSettings.LineNumerationType val)
301
217,917
../intellij-community/plugins/maven-server-api/src/main/java/org/jetbrains/idea/maven/model/MavenExplicitProfiles.java
getEnabledProfiles
public @NotNull Collection<@NotNull String> getEnabledProfiles() { return myEnabledProfiles; }
[ 44, 62 ]
public @NotNull Collection<@NotNull String> getEnabledProfiles()
100
155,047
../intellij-community/java/java-impl/src/com/intellij/find/findUsages/similarity/JavaSimilarityFeaturesExtractor.java
visitForeachStatement
@Override public void visitForeachStatement(@NotNull PsiForeachStatement statement) { myUsageSimilarityFeaturesRecorder.addAllFeatures(statement, "FOREACH"); super.visitForeachStatement(statement); }
[ 24, 45 ]
@Override public void visitForeachStatement(@NotNull PsiForeachStatement statement)
211
372,455
../intellij-community/plugins/grazie/src/main/kotlin/com/intellij/grazie/text/TextProblem.java
getRule
public final @NotNull Rule getRule() { return rule; }
[ 27, 34 ]
public final @NotNull Rule getRule()
59
150,395
../intellij-community/platform/lang-impl/src/com/intellij/ide/util/gotoByName/GotoActionModel.java
getPresentation
public @NotNull Presentation getPresentation() { return myPresentation; }
[ 29, 44 ]
public @NotNull Presentation getPresentation()
83
191,306