Unnamed: 0
int64
0
305k
body
stringlengths
7
52.9k
name
stringlengths
1
185
253,800
E () { return element; }
getElement
253,801
PsiFile () { return containingFile; }
getContainingFile
253,802
Project () { return containingFile.getProject(); }
getProject
253,803
VirtualFile () { return containingFile.getVirtualFile(); }
getVirtualFile
253,804
Segment () { return element.getTextRange(); }
getRange
253,805
Segment () { return getRange(); }
getPsiRange
253,806
boolean (@NotNull SmartPsiElementPointer<?> pointer1, @NotNull SmartPsiElementPointer<?> pointer2) { return false; }
pointToTheSameElement
253,807
void (@NotNull SmartPsiElementPointer<?> pointer) { }
removePointer
253,808
VirtualFileSystem () { return MockVirtualFileSystem.this; }
getFileSystem
253,809
MyVirtualFile (@NotNull String path) { String normalized = path.replace(File.separatorChar, '/').replace('/', ':'); if (StringUtil.startsWithChar(normalized, ':')) normalized = normalized.substring(1); MyVirtualFile file = myRoot; for (String component : StringUtil.split(normalized, ":")) { file = file.getOrCreate(comp...
findFileByPath
253,810
MockVirtualFileSystem (@NotNull String path, @NotNull String data) { MyVirtualFile file = findFileByPath(path); file.setContent(null, data, false); return this; }
file
253,811
VirtualFile () { return myRoot; }
getRoot
253,812
String () { return PROTOCOL; }
getProtocol
253,813
void (boolean asynchronous) { }
refresh
253,814
VirtualFile (@NotNull String path) { return findFileByPath(path); }
refreshAndFindFileByPath
253,815
VirtualFileSystem () { return myParent.getFileSystem(); }
getFileSystem
253,816
MyVirtualFile (@NotNull String name) { MyVirtualFile file = findChild(name); if (file == null) { if (myChildren == null) { myChildren = CollectionFactory.createSmallMemoryFootprintMap(); } file = new MyVirtualFile(name, this); myChildren.put(name, file); } return file; }
getOrCreate
253,817
boolean () { return myParent == null || (myChildren != null && !myChildren.isEmpty()); }
isDirectory
253,818
String () { MockVirtualFileSystem.MyVirtualFile parent = getParent(); return parent == null ? getName() : parent.getPath() + "/" + getName(); }
getPath
253,819
MyVirtualFile () { return myParent; }
getParent
253,820
VirtualFile[] () { return myChildren == null ? EMPTY_ARRAY : VfsUtilCore.toVirtualFileArray(myChildren.values()); }
getChildren
253,821
MyVirtualFile (@NotNull String name) { return myChildren == null ? null : myChildren.get(name); }
findChild
253,822
void (boolean requestFocus) { throw new UnsupportedOperationException("Method navigate is not yet implemented in " + getClass().getName()); }
navigate
253,823
boolean () { throw new UnsupportedOperationException("Method canNavigate is not yet implemented in " + getClass().getName()); }
canNavigate
253,824
boolean () { throw new UnsupportedOperationException("Method canNavigateToSource is not yet implemented in " + getClass().getName()); }
canNavigateToSource
253,825
List<PsiElement> () { return myDeclarations; }
getDeclarations
253,826
void (@NotNull final PsiElementVisitor visitor) { throw new UnsupportedOperationException("Method accept is not yet implemented in " + getClass().getName()); }
accept
253,827
void (@NotNull final PsiElementVisitor visitor) { throw new UnsupportedOperationException("Method acceptChildren is not yet implemented in " + getClass().getName()); }
acceptChildren
253,828
PsiElement () { throw new UnsupportedOperationException("Method copy is not yet implemented in " + getClass().getName()); }
copy
253,829
PsiElement (final int offset) { throw new UnsupportedOperationException("Method findElementAt is not yet implemented in " + getClass().getName()); }
findElementAt
253,830
PsiReference (final int offset) { throw new UnsupportedOperationException("Method findReferenceAt is not yet implemented in " + getClass().getName()); }
findReferenceAt
253,831
PsiElement () { return getParent(); }
getContext
253,832
PsiElement () { throw new UnsupportedOperationException("Method getFirstChild is not yet implemented in " + getClass().getName()); }
getFirstChild
253,833
Language () { throw new UnsupportedOperationException("Method getLanguage is not yet implemented in " + getClass().getName()); }
getLanguage
253,834
PsiElement () { throw new UnsupportedOperationException("Method getLastChild is not yet implemented in " + getClass().getName()); }
getLastChild
253,835
PsiManager () { return myManager; }
getManager
253,836
void (final PsiManager manager) { myManager = manager; }
setManager
253,837
PsiElement () { throw new UnsupportedOperationException("Method getNavigationElement is not yet implemented in " + getClass().getName()); }
getNavigationElement
253,838
PsiElement () { throw new UnsupportedOperationException("Method getNextSibling is not yet implemented in " + getClass().getName()); }
getNextSibling
253,839
ASTNode () { throw new UnsupportedOperationException("Method getNode is not yet implemented in " + getClass().getName()); }
getNode
253,840
PsiElement () { throw new UnsupportedOperationException("Method getOriginalElement is not yet implemented in " + getClass().getName()); }
getOriginalElement
253,841
void (PsiElement parent) { myParent = Ref.create(parent); }
setParent
253,842
PsiElement () { if (myParent == null) { throw new UnsupportedOperationException("Method getParent is not yet implemented in " + getClass().getName()); } return myParent.get(); }
getParent
253,843
PsiElement () { throw new UnsupportedOperationException("Method getPrevSibling is not yet implemented in " + getClass().getName()); }
getPrevSibling
253,844
Project () { return myProject; }
getProject
253,845
PsiReference () { throw new UnsupportedOperationException("Method getReference is not yet implemented in " + getClass().getName()); }
getReference
253,846
GlobalSearchScope () { throw new UnsupportedOperationException("Method getResolveScope is not yet implemented in " + getClass().getName()); }
getResolveScope
253,847
int () { throw new UnsupportedOperationException("Method getStartOffsetInParent is not yet implemented in " + getClass().getName()); }
getStartOffsetInParent
253,848
String () { return myText; }
getText
253,849
int () { return myText.length(); }
getTextLength
253,850
int () { return getTextRange().getStartOffset(); }
getTextOffset
253,851
TextRange () { throw new UnsupportedOperationException("Method getTextRange is not yet implemented in " + getClass().getName()); }
getTextRange
253,852
SearchScope () { throw new UnsupportedOperationException("Method getUseScope is not yet implemented in " + getClass().getName()); }
getUseScope
253,853
boolean () { return false; }
isPhysical
253,854
boolean () { return true; }
isValid
253,855
boolean () { throw new UnsupportedOperationException("Method isWritable is not yet implemented in " + getClass().getName()); }
isWritable
253,856
void (PsiElement declaration) { if (myDeclarations.contains(declaration)) { myDeclarations.remove(declaration); } else if (declaration instanceof PsiNamedElement) { myDeclarations.remove(findDeclaration(((PsiNamedElement)declaration).getName(), ((PsiNamedElement)declaration).getClass())); } myDeclarations.add(declarati...
addDeclaration
253,857
boolean (@NotNull final PsiScopeProcessor processor, @NotNull final ResolveState state, final PsiElement lastParent, @NotNull final PsiElement place) { for (final PsiElement declaration : myDeclarations) { if (!processor.execute(declaration, state)) return false; } return true; }
processDeclarations
253,858
boolean (final char c) { throw new UnsupportedOperationException("Method textContains is not yet implemented in " + getClass().getName()); }
textContains
253,859
boolean (@NotNull final PsiElement element) { throw new UnsupportedOperationException("Method textMatches is not yet implemented in " + getClass().getName()); }
textMatches
253,860
boolean (@NotNull final CharSequence text) { throw new UnsupportedOperationException("Method textMatches is not yet implemented in " + getClass().getName()); }
textMatches
253,861
Icon (final int flags) { return null; }
getIcon
253,862
boolean (final PsiElement another) { return this == another; }
isEquivalentTo
253,863
void (LauncherSession session) { session.getLauncher().registerTestExecutionListeners(new TestExecutionListener() { @Override public void testPlanExecutionStarted(TestPlan testPlan) { if (suiteStarted == 0) { if (!includeFirstLast) return; suiteStarted = System.nanoTime(); String tempDirectory = FileUtilRt.getTempDirec...
launcherSessionOpened
253,864
void (TestPlan testPlan) { if (suiteStarted == 0) { if (!includeFirstLast) return; suiteStarted = System.nanoTime(); String tempDirectory = FileUtilRt.getTempDirectory(); String[] list = new File(tempDirectory).list(); assert list != null; System.out.println("FileUtil.getTempDirectory() = " + tempDirectory + " (" + lis...
testPlanExecutionStarted
253,865
void (@NotNull String property) { String encoding = System.getProperty(property); System.out.println("** " + property + "=" + encoding); Assertions.assertNotNull(encoding, "The property '" + property + "' is 'null'. Please check build configuration settings."); Assertions.assertFalse( Charset.forName(encoding).aliases(...
assertEncoding
253,866
void (LauncherSession session) { if (!includeFirstLast || suiteStarted == 0) return; try { Assertions.assertAll(() -> { boolean testDynamicExtensions = SystemProperties.getBooleanProperty("intellij.test.all.dynamic.extension.points", false); if (testDynamicExtensions) { DynamicExtensionPointsTester.checkDynamicExtensio...
launcherSessionClosed
253,867
void (Function<? super String, String> namer) { Application app = ApplicationManager.getApplication(); if (app == null) { return; } app.invokeAndWait(() -> PlatformTestUtil.cleanupAllProjects()); Map<ExtensionPointImpl<?>, Collection<WeakReference<Object>>> extensionPointToNonPlatformExtensions = collectDynamicNonPlatf...
checkDynamicExtensionPoints
253,868
void (@NotNull IdeaPluginDescriptor plugin) { ApplicationManager.getApplication().invokeAndWait(() -> { ApplicationManager.getApplication().getMessageBus().syncPublisher(DynamicPluginListener.TOPIC).beforePluginUnload(plugin, false); }); }
fireBeforePluginUnloadEvent
253,869
void (@NotNull IdeaPluginDescriptor plugin) { ApplicationManager.getApplication().invokeAndWait(() -> { ApplicationManager.getApplication().getMessageBus().syncPublisher(DynamicPluginListener.TOPIC).pluginUnloaded(plugin, false); }); }
firePluginUnloadedEvent
253,870
String (String s) { return MapSerializerUtil.escapeStr(s, MapSerializerUtil.STD_ESCAPER); }
escape
253,871
void (@NotNull ExtensionsAreaImpl area, boolean useWhiteList, @NotNull Map<ExtensionPointImpl<?>, Collection<WeakReference<Object>>> extensions) { area.processExtensionPoints(ep -> { if (!ep.isDynamic() || (useWhiteList && !EXTENSION_POINTS_WHITE_LIST.contains(ep.name))) { return Unit.INSTANCE; } List<WeakReference<Obj...
collectForArea
253,872
void (LauncherSession session) { // Method could be called several times, don't override field if (listener == null) { listener = OutOfProcessRetries.getListenerForOutOfProcessRetry(); } if (listener == null) { return; } session.getLauncher().registerTestExecutionListeners(new TestExecutionListener() { @Override public...
launcherSessionOpened
253,873
void (TestPlan testPlan) { suiteStarted = System.nanoTime(); }
testPlanExecutionStarted
253,874
void (TestIdentifier testIdentifier, TestExecutionResult testExecutionResult) { final TestExecutionResult.Status status = testExecutionResult.getStatus(); final Throwable throwable = testExecutionResult.getThrowable().orElse(null); if (status != TestExecutionResult.Status.FAILED) { return; } testIdentifier.getSource()....
executionFinished
253,875
void (LauncherSession session) { if (listener == null || suiteStarted == 0) return; try { listener.save(); } catch (IOException e) { e.printStackTrace(); } }
launcherSessionClosed
253,876
String () { return String.format("CPU=%d (%d%% reference CPU), I/O=%d (%d%% reference IO), %d cores (%s)", CPU_TIMING, CPU_TIMING * 100 / REFERENCE_CPU_TIMING, IO_TIMING, IO_TIMING * 100 / REFERENCE_IO_TIMING, Runtime.getRuntime().availableProcessors(), CpuArch.CURRENT); }
getStatistics
253,877
VirtualFile[] (AbstractTreeNode<?> kid, Function<? super AbstractTreeNode<?>, VirtualFile[]> converterFunction) { if (kid instanceof BasePsiNode) { Object value = kid.getValue(); VirtualFile virtualFile = PsiUtilCore.getVirtualFile((PsiElement)value); return new VirtualFile[]{virtualFile}; } if (converterFunction != nu...
getFiles
253,878
void (AbstractTreeNode node, MultiValuesMap<VirtualFile, AbstractTreeNode<?>> map, AbstractTreeStructure structure, Function<? super AbstractTreeNode<?>, VirtualFile[]> converterFunction) { Object[] kids = structure.getChildElements(node); for (Object kid1 : kids) { ProjectViewNode kid = (ProjectViewNode)kid1; final Vi...
collect
253,879
void (final Object rootElement, final AbstractTreeStructure structure, Function<? super AbstractTreeNode<?>, VirtualFile[]> converterFunction) { MultiValuesMap<VirtualFile, AbstractTreeNode<?>> map = new MultiValuesMap<>(); collect((AbstractTreeNode)rootElement, map, structure, converterFunction); for (VirtualFile each...
checkContainsMethod
253,880
void (AbstractTreeStructure structure, Object from) { Object[] childElements = structure.getChildElements(from); for (Object childElement : childElements) { Assert.assertSame(from, structure.getParentElement(childElement)); checkGetParentConsistency(structure, childElement); } }
checkGetParentConsistency
253,881
void (AbstractTreeStructure structure, String expected, @Nullable Queryable.PrintInfo printInfo) { assertStructureEqual(structure, expected, 27, null, structure.getRootElement(), printInfo); }
assertStructureEqual
253,882
void (AbstractTreeStructure structure, String expected, int maxRowCount, @Nullable Comparator comparator, Object rootNode, @Nullable Queryable.PrintInfo printInfo) { checkGetParentConsistency(structure, rootNode); String actual = PlatformTestUtil.print(structure, rootNode, 0, comparator, maxRowCount, ' ', printInfo).to...
assertStructureEqual
253,883
boolean (PsiElement element, AbstractProjectViewPane pane) { return null != getVisiblePath(element, pane); }
isExpanded
253,884
void (@NotNull Project project, boolean loadPaneExtensions) { ToolWindowHeadlessManagerImpl toolWindowManager = (ToolWindowHeadlessManagerImpl)ToolWindowManager.getInstance(project); ToolWindow toolWindow = toolWindowManager.getToolWindow(ToolWindowId.PROJECT_VIEW); if (toolWindow == null) { for (ToolWindowEP bean : To...
setupImpl
253,885
void (@NotNull String text) { doTest(text, null); }
doTest
253,886
void (@NotNull String text, @Nullable String expected) { doTest(text, expected, createLexer()); }
doTest
253,887
void (@NotNull String text, @Nullable String expected, @NotNull Lexer lexer) { String result = printTokens(lexer, text, 0); if (expected != null) { assertSameLines(expected, result); } else { assertSameLinesWithFile(getPathToTestDataFile(getExpectedFileExtension()), result); } }
doTest
253,888
String (@NotNull Lexer lexer, @NotNull CharSequence text, int start) { return printTokens(text, start, lexer); }
printTokens
253,889
String (@NotNull String extension) { return IdeaTestExecutionPolicy.getHomePathWithPolicy() + "/" + getDirPath() + "/" + getTestName(true) + extension; }
getPathToTestDataFile
253,890
String () { return ".txt"; }
getExpectedFileExtension
253,891
void (@NotNull String text, TokenSet tokenTypes) { Lexer lexer = createLexer(); lexer.start(text); while (true) { IElementType type = lexer.getTokenType(); if (type == null) { break; } if (tokenTypes.contains(type) && lexer.getState() != 0) { fail("Non-zero lexer state on token \"" + lexer.getTokenText() + "\" (" + typ...
checkZeroState
253,892
String (@NotNull String text, int start) { return printTokens(text, start, createLexer()); }
printTokens
253,893
void (@NotNull String text) { Lexer mainLexer = createLexer(); List<Trinity<IElementType, Integer, Integer>> allTokens = tokenize(text, 0, 0, mainLexer); Lexer auxLexer = createLexer(); auxLexer.start(text); int index = 0; while (true) { IElementType type = auxLexer.getTokenType(); if (type == null) { break; } int stat...
checkCorrectRestart
253,894
String (@NotNull CharSequence text, int start, @NotNull Lexer lexer) { lexer.start(text, start, text.length()); StringBuilder result = new StringBuilder(); IElementType tokenType; while ((tokenType = lexer.getTokenType()) != null) { result.append(printSingleToken(text, tokenType, lexer.getTokenStart(), lexer.getTokenEn...
printTokens
253,895
String (@NotNull HighlighterIterator iterator) { CharSequence text = iterator.getDocument().getCharsSequence(); StringBuilder result = new StringBuilder(); IElementType tokenType; while (!iterator.atEnd()) { tokenType = iterator.getTokenType(); result.append(printSingleToken(text, tokenType, iterator.getStart(), iterat...
printTokens
253,896
String (@NotNull CharSequence fileText, @NotNull IElementType tokenType, int start, int end) { return tokenType + " ('" + getTokenText(tokenType, fileText, start, end) + "')\n"; }
printSingleToken
253,897
void (@NotNull String fileExt) { doTest(loadTestDataFile("." + fileExt)); }
doFileTest
253,898
String (String fileExt) { String fileName = getPathToTestDataFile(fileExt); String text = ""; try { String fileText = FileUtil.loadFile(new File(fileName)); text = StringUtil.convertLineSeparators(shouldTrim() ? fileText.trim() : fileText); } catch (IOException e) { fail("can't load file " + fileName + ": " + e.getMess...
loadTestDataFile
253,899
boolean () { return true; }
shouldTrim