Unnamed: 0 int64 0 305k | body stringlengths 7 52.9k | name stringlengths 1 185 |
|---|---|---|
263,900 | boolean () { return myExitedByTimeout; } | isExitedByTimeout |
263,901 | void (final Runnable runnable) { final TimeoutWaiter waiter = new TimeoutWaiter(); final DuringUpdateTest test = new DuringUpdateTest(waiter, runnable); myChangeProvider.setTest(test); waiter.setControlled(test); myDirtyScopeManager.markEverythingDirty(); myClManager.ensureUpToDate(); waiter.startTimeout(); if (test.ge... | doTest |
263,902 | void () { try { myRunnable.run(); } catch (final Exception e) { myException = e; } myDone = myException == null; myChangeProvider.setTest(null); myChangeProvider.unlock(); synchronized (myWaiter) { myWaiter.notifyAll(); } } | run |
263,903 | Exception () { return myException; } | getException |
263,904 | Boolean () { return myDone; } | get |
263,905 | void (final VirtualFile[] files, final String listName, final ChangeListManager manager) { checkFilesAreInList(listName, manager, files); } | checkFilesAreInList |
263,906 | void (final String listName, final ChangeListManager manager, final VirtualFile... files) { assert manager.findChangeList(listName) != null : manager.getChangeLists(); final LocalChangeList list = manager.findChangeList(listName); final Collection<Change> changes = list.getChanges(); assert changes.size() == files.leng... | checkFilesAreInList |
263,907 | void (final VirtualFile[] files, final String listName, final ChangeListManager manager) { assert manager.findChangeList(listName) != null; final LocalChangeList list = manager.findChangeList(listName); final Collection<Change> changes = list.getChanges(); assert changes.size() == files.length : debugRealListContent(li... | checkDeletedFilesAreInList |
263,908 | String (final LocalChangeList list) { final StringBuilder sb = new StringBuilder(list.getName() + ": "); final Collection<Change> changeCollection = list.getChanges(); for (Change change : changeCollection) { sb.append(change.toString()).append(' '); } return sb.toString(); } | debugRealListContent |
263,909 | List<LocalChangeList> () { return myManager.getChangeLists(); } | getListsCopy |
263,910 | LocalChangeList (final String name) { return myManager.findChangeList(name); } | findChangeList |
263,911 | LocalChangeList (@NotNull final String name, final String comment) { return myManager.addChangeList(name, comment); } | addChangeList |
263,912 | LocalChangeList (@NotNull final String name, final String comment) { LocalChangeList changeList = myManager.findChangeList(name); if (changeList == null) { changeList = myManager.addChangeList(name, comment); } return changeList; } | findOrCreateList |
263,913 | void (@NotNull final String name, final String comment) { myManager.editComment(name, comment); } | editComment |
263,914 | void (@NotNull String oldName, @NotNull String newName) { myManager.editName(oldName, newName); } | editName |
263,915 | void (@NotNull Collection<String> names) { } | setListsToDisappear |
263,916 | FileStatus (@NotNull VirtualFile file) { return null; } | getStatus |
263,917 | FileStatus (@NotNull FilePath filePath) { return null; } | getStatus |
263,918 | void (@NotNull String list) { } | setDefaultChangeList |
263,919 | void () { FontMetrics metrics = new JLabel().getFontMetrics(new Font(Font.DIALOG, Font.PLAIN, 10)); String longString = "This is a long string that needs to be truncated. ".repeat(10000); String truncatedString = CommittedChangeListRenderer.truncateDescription(longString, metrics, 100); assertEquals("This is a long str... | testTruncationByWords |
263,920 | void () { FontMetrics metrics = new JLabel().getFontMetrics(new Font(Font.DIALOG, Font.PLAIN, 10)); String longString = "Thisisalongstringwithoutspaces".repeat(100); String truncatedString = CommittedChangeListRenderer.truncateDescription(longString, metrics, 100000); assertEquals("Thisisalongstringwithoutspaces".repea... | testTruncationByWordsWithoutSpace |
263,921 | void () { AllVcsesI myVcses = AllVcses.getInstance(myProject); myVcses.registerManually(new MockAbstractVcs(myProject, MOCK)); List<VirtualFile> roots = createRootStructure( Pair.create(myBaseDir.getPath(), MOCK), Pair.create("community", MOCK) ); Change changeBeforeCommunity = createChangeForPath("a.txt"); Change chan... | testChangesInTwoGitRoots |
263,922 | void (Map<VirtualFile, Collection<Change>> expected, Map<VirtualFile, Collection<Change>> actual) { assertEquals("Maps size is different. " + expectedActualMessage(expected, actual), expected.size(), actual.size()); for (Map.Entry<VirtualFile, Collection<Change>> expectedEntry : expected.entrySet()) { VirtualFile root ... | assertEqualMaps |
263,923 | String (Object expected, Object actual) { return "\nExpected:\n " + expected + "\nActual:\n" + actual; } | expectedActualMessage |
263,924 | List<VirtualFile> (Pair<String, String>... pathAndVcs) { List<VirtualFile> roots = new ArrayList<>(); List<VcsDirectoryMapping> mappings = new ArrayList<>(); for (Pair<String, String> pathAndVc : pathAndVcs) { String path = pathAndVc.first; String vcs = pathAndVc.second; VirtualFile vf; if (path.equals(myBaseDir.getPat... | createRootStructure |
263,925 | Change (String path) { VirtualFile file = VfsTestUtil.createFile(myBaseDir, path); FilePath filePath = VcsUtil.getFilePath(file); ContentRevision beforeRevision = new MockContentRevision(filePath, new VcsRevisionNumber.Int(1)); ContentRevision afterRevision = new MockContentRevision(filePath, new VcsRevisionNumber.Int(... | createChangeForPath |
263,926 | void () { configure("Test\n\nCo-<caret>"); myFixture.completeBasic(); myFixture.checkResult(""" Test Co-authored-by:\s"""); } | testCoAuthored |
263,927 | void () { configure("Test\n\nSig<caret>"); myFixture.completeBasic(); myFixture.checkResult(""" Test Signed-off-by:\s"""); } | testSignedOff |
263,928 | void () { configure("Co-<caret>"); assertEquals(0, myFixture.completeBasic().length); } | testNoCoAuthoredAtStart |
263,929 | void () { configure("Test\n\nHello Co-<caret>"); assertEquals(0, myFixture.completeBasic().length); } | testNoCoAuthoredAtLineMiddle |
263,930 | void () { ServiceContainerUtil.registerOrReplaceServiceInstance(getProject(), VcsUserRegistry.class, new MockVcsUserRegistry(), getTestRootDisposable()); configure("Test\n\nCo-authored-by: x<caret>"); myFixture.completeBasic(); myFixture.assertPreferredCompletionItems(0, "xyz <xyz@example.com>", "xyz2 <xyz2@example.com... | testAuthors |
263,931 | void (String text) { myFixture.configureByText("a.txt", text); var commitMessage = new CommitMessage(getProject()); Disposer.register(myFixture.getTestRootDisposable(), commitMessage); myFixture.getEditor().getDocument().putUserData(CommitMessage.DATA_KEY, commitMessage); } | configure |
263,932 | Set<VcsUser> () { return Set.of(createUser("xyz", "xyz@example.com"), createUser("xyz2", "xyz2@example.com"), createUser("abc", "abc@example.com")); } | getUsers |
263,933 | VcsUser (@NotNull String name, @NotNull String email) { return new VcsUserImpl(name, email); } | createUser |
263,934 | VcsRootConfiguration (String @NotNull ... vcsRoots) { myVcsRoots = Arrays.asList(vcsRoots); return this; } | vcsRoots |
263,935 | VcsRootConfiguration (String @NotNull ... mappings) { myMappings = Arrays.asList(mappings); return this; } | mappings |
263,936 | VcsRootConfiguration (String @NotNull ... contentRoots) { myContentRoots = Arrays.asList(contentRoots); return this; } | contentRoots |
263,937 | VcsRootConfiguration (String @NotNull ... unregErrors) { myUnregErrors = Arrays.asList(unregErrors); return this; } | unregErrors |
263,938 | VcsRootConfiguration (String @NotNull ... extraErrors) { myExtraErrors = Arrays.asList(extraErrors); return this; } | extraErrors |
263,939 | Collection<String> () { return myVcsRoots; } | getVcsRoots |
263,940 | Collection<String> () { Set<String> result = new HashSet<>(myContentRoots); result.addAll(myVcsRoots); return result; } | getContentRoots |
263,941 | Collection<String> () { return myMappings; } | getVcsMappings |
263,942 | Collection<String> () { return myUnregErrors; } | getUnregErrors |
263,943 | Collection<String> () { return myExtraErrors; } | getExtraErrors |
263,944 | void () { assertEquals(-1, compare("~/project/A.java", "~/project/B.java")); assertEquals(1, compare("~/project/Z.java", "~/project/B.java")); } | testInOneDirectory |
263,945 | void () { assertEquals(-1, compare("~/project/aaa/A.java", "~/project/bbb/B.java")); assertEquals(-1, compare("~/project/aaa/B.java", "~/project/zzz/A.java")); assertEquals(1, compare("~/project/zzz/A.java", "~/project/aaa/B.java")); } | testInDifferentDirs |
263,946 | void () { // all folders precede plain files assertEquals("Folders should precede plain files", -1, compare("~/project/dir/subdir/A.java", "~/project/dir/B.java")); assertEquals("Folders should precede plain files", -1, compare("~/project/dir/A.java", "~/project/B.java")); assertEquals("Folders should precede plain fil... | testInSubDir |
263,947 | void () { assertEquals("Equal paths should compare to 0", 0, compare("~/project/A.java", "~/project/A.java")); assertEquals("Equal paths should compare to 0", 0, compare("~/project/aaa/A.java", "~/project/aaa/A.java")); } | testEqualPaths |
263,948 | void () { assertEquals(0, compare("", "")); } | testEmptyPaths |
263,949 | void () { assertEquals(-1, compare("~/project/aaa/", "~/project/aaa-qwe/")); assertEquals(-1, compare("~/project/aaa/A.java", "~/project/aaa-qwe/A.java")); assertEquals(1, compare("~/project/zzz-qwe.java", "~/project/zzz/")); } | testSamePrefixFolder |
263,950 | void () { assertEquals(0, compare("A.java", "A.java")); assertEquals(0, compare("/aaa/", "/aaa/")); assertEquals(-1, compare("/aaa/", "/aaa-qwe/")); assertEquals(-1, compare("/aaa/", "/ZZ.java")); } | testRootDirectory |
263,951 | void () { assertEquals(-1, compare("a.java", "B.java")); assertEquals(-1, compare("A.java", "b.java")); } | testCaseIgnored |
263,952 | void () { assertEquals(1, compare("/folder/aaa-qwerty/", "/folder/aaa/")); assertEquals(1, compare("/folder/aaa/.gitignore", "/folder/aaa/")); assertEquals(-1, compare("/folder/aaa/.gitignore", "/folder/aaa-qwerty/")); assertEquals(1, compare("/folder/aaa-qwerty/qwerty", "/folder/aaa/qwerty/")); } | testAssociativeBug |
263,953 | void () { assertEquals(1, compare("/folder/abd", "/folder/abd/")); assertEquals(1, compare("/folder/abx/", "/folder/abd/")); assertEquals(-1, compare("/folder/abx/", "/folder/abd")); } | testTransitiveBug |
263,954 | void () { assertStrictOrderedPaths( HierarchicalFilePathComparator.CASE_SENSITIVE, "/a/Test1.txt", "/a/Test1.txt_1", "/a/Test1.txt_12", "/a/Test1.txt_2", "/a/Test1.txt_22" ); assertStrictOrderedPaths( HierarchicalFilePathComparator.CASE_SENSITIVE, "/a/TEST3-1.TXT", "/a/TEST3-2.txt", "/a/Test3-12.TXT", "/a/Test3.TXT" );... | testCaseSensitiveOrder |
263,955 | void () { assertStrictOrderedPaths( HierarchicalFilePathComparator.CASE_INSENSITIVE, "/a/Test1.txt", "/a/Test1.txt_1", "/a/Test1.txt_12", "/a/Test1.txt_2", "/a/Test1.txt_22" ); assertStrictOrderedPaths( HierarchicalFilePathComparator.CASE_INSENSITIVE, "/a/TEST3-1.TXT", "/a/Test3-12.TXT", "/a/TEST3-2.txt", "/a/Test3.TXT... | testCaseInsensitiveOrder |
263,956 | void () { assertStrictOrderedPaths( HierarchicalFilePathComparator.NATURAL, "/a/Test1.txt", "/a/Test1.txt_1", "/a/Test1.txt_2", "/a/Test1.txt_12", "/a/Test1.txt_22" ); assertStrictOrderedPaths( HierarchicalFilePathComparator.NATURAL, "/a/Test3.TXT", "/a/TEST3-1.TXT", "/a/TEST3-2.txt", "/a/Test3-12.TXT" ); assertStrictO... | testNaturalOrder |
263,957 | void () { List<String> paths = Arrays .asList("", "/", "~", "/~", "/~/", "~/project/A.java", "~/project/B.java", "~/project/Z.java", "~/project/a.java", "~/project/b.java", "~/project/z.java", "/aaa/", "/aaa-qwe/", "/ZZ.java", "A.java", "~/project/zzz/", "~/project/zzz", "~/project/zzz-qwe.java", "~/project/zzz-qwe.jav... | testTransitive |
263,958 | void () { List<FilePath> filePaths = generatePerformanceTestFilePaths(); PlatformTestUtil.startPerformanceTest("Natural hierarchical comparator", 7000, () -> { assertComparisonContractNotViolated(filePaths, HierarchicalFilePathComparator.NATURAL); }).assertTiming(); } | testNaturalPerformance |
263,959 | void () { List<FilePath> filePaths = generatePerformanceTestFilePaths(); PlatformTestUtil.startPerformanceTest("Case-insensitive hierarchical comparator", 4000, () -> { assertComparisonContractNotViolated(filePaths, HierarchicalFilePathComparator.CASE_INSENSITIVE); }).assertTiming(); } | testCaseInsensitivePerformance |
263,960 | void () { List<FilePath> filePaths = generatePerformanceTestFilePaths(); PlatformTestUtil.startPerformanceTest("Case-sensitive hierarchical comparator", 3000, () -> { assertComparisonContractNotViolated(filePaths, HierarchicalFilePathComparator.CASE_SENSITIVE); }).assertTiming(); } | testCaseSensitivePerformance |
263,961 | List<FilePath> () { Random rng = new Random(0); int totalPaths = 300; int maxLength = 5; List<String> chunks = Arrays.asList("Test1.txt", "Test2.txt", "TEST1.TXT", "TEST2.txt", "Test1-txt", "Test2-txt", "Test1", "Test2", "Test1A1", "Test1b1", "Test1_txt", "Test2_txt", "1", "2", "a", "b", "A", "B", "HierarchicalFilePath... | generatePerformanceTestFilePaths |
263,962 | void (@NotNull Comparator<FilePath> comparator, String @NotNull ... paths) { assertOrderedPaths(Arrays.asList(paths), comparator, true); } | assertStrictOrderedPaths |
263,963 | void (@NotNull Comparator<FilePath> comparator, String @NotNull ... paths) { assertOrderedPaths(Arrays.asList(paths), comparator, false); } | assertOrderedPaths |
263,964 | void (@NotNull List<String> paths, @NotNull Comparator<FilePath> comparator, boolean strict) { List<FilePath> filePaths = ContainerUtil.map(paths, it -> filePath(it)); List<FilePath> sortedFilePaths = ContainerUtil.sorted(filePaths, comparator); if (strict) { TreeSet<FilePath> pathsSet = new TreeSet<>(comparator); path... | assertOrderedPaths |
263,965 | void (@NotNull List<FilePath> filePaths, @NotNull Comparator<FilePath> comparator) { PlatformTestUtil.assertComparisonContractNotViolated(filePaths, (path1, path2) -> compare(path1, path2, comparator), (path1, path2) -> equals(path1, path2, comparator)); } | assertComparisonContractNotViolated |
263,966 | boolean (@NotNull FilePath path1, @NotNull FilePath path2, @NotNull Comparator<FilePath> comparator) { if (path1.isDirectory() != path2.isDirectory()) return false; boolean ignoreCase = comparator == HierarchicalFilePathComparator.NATURAL || comparator == HierarchicalFilePathComparator.CASE_INSENSITIVE; return ignoreCa... | equals |
263,967 | int (@NotNull String path1, @NotNull String path2) { int compare1 = compare(filePath(path1), filePath(path2), HierarchicalFilePathComparator.NATURAL); int compare2 = compare(filePath(path2), filePath(path1), HierarchicalFilePathComparator.NATURAL); assert compare1 == -compare2; return compare1; } | compare |
263,968 | int (FilePath path1, FilePath path2, @NotNull Comparator<FilePath> comparator) { return Integer.signum(comparator.compare(path1, path2)); } | compare |
263,969 | FilePath (@NotNull String path) { return new LocalFilePath(path, StringUtil.endsWithChar(path, '/')); } | filePath |
263,970 | String () { return myName; } | getName |
263,971 | boolean () { return myStarted; } | isStarted |
263,972 | void (boolean started) { myStarted = started; } | setStarted |
263,973 | void (String line) { // } | lineLogged |
263,974 | void (String line, Runnable action) { // } | printHyperlink |
263,975 | void () { // } | close |
263,976 | void () { // } | clear |
263,977 | void (int offset) { // } | scrollTo |
263,978 | void () { myTerminalListener = myLoggingHandler.createTerminal(myLogPipeName, getOutputStream(), getInputStream(), getStderr()); if (myTerminalListener == null) { myTerminalListener = TerminalListener.NULL; } myTerminalListener.setTtyResizeHandler(getTtyResizeHandler()); hookTerminal(myTerminalListener); } | open |
263,979 | void (TerminalListener terminal) { // } | hookTerminal |
263,980 | InputStream () { return null; } | getStderr |
263,981 | void () { myTerminalListener.close(); } | close |
263,982 | void () { // } | close |
263,983 | void (TtyResizeHandler ttyResizeHandler) { // } | setTtyResizeHandler |
263,984 | void (String deploymentName, LogPipeProvider provider) { stopListeningLog(deploymentName); doStartListeningLog(deploymentName, provider); } | startListeningLog |
263,985 | void (String deploymentName, LogPipeProvider provider) { if (!myDeploymentName2ActiveLogPipes.containsKey(deploymentName)) { doStartListeningLog(deploymentName, provider); } } | startOrContinueListeningLog |
263,986 | void (String deploymentName, LogPipeProvider provider) { ArrayList<LogPipeBase> pipes = new ArrayList<>(provider.createLogPipes(deploymentName)); myDeploymentName2ActiveLogPipes.put(deploymentName, pipes); for (LogPipeBase pipe : pipes) { pipe.open(); } } | doStartListeningLog |
263,987 | void () { for (String deploymentName : new ArrayList<>(myDeploymentName2ActiveLogPipes.keySet())) { stopListeningLog(deploymentName); } } | stopListeningAllLogs |
263,988 | void (String deploymentName) { List<LogPipeBase> pipes = myDeploymentName2ActiveLogPipes.remove(deploymentName); if (pipes != null) { for (LogPipeBase pipe : pipes) { pipe.close(); } } } | stopListeningLog |
263,989 | int () { return ourInstanceCounter++; } | advanceInstanceCounter |
263,990 | void () { InputStream inputStream = createInputStream(myDeploymentName); if (inputStream == null) { return; } InputStreamReader streamReader = new InputStreamReader(inputStream); final BufferedReader bufferedReader = new BufferedReader(streamReader); myTotalLines = 0; myLines2Skip = 0; new Thread("log pipe") { @Overrid... | open |
263,991 | void () { //init log listener onStartListening(getLogListener()); try { while (true) { String line = bufferedReader.readLine(); if (line == null) { if (isLogDebugEnabled()) { debug("Thread[LP]: end of log stream found: " + this); } break; } if (isLogDebugEnabled()) { debug("Thread[LP]: read line: ``" + line + "`` :" + ... | run |
263,992 | String () { int NAME_SIZE = 8; String shortName = myDeploymentName.length() < NAME_SIZE ? myDeploymentName : myDeploymentName.substring(0, NAME_SIZE); return "Thread[LP]@" + Integer.toHexString(System.identityHashCode(this)) + " for: " + shortName + "[" + myLogPipeName + "]"; } | toString |
263,993 | void () { myClosed = true; } | close |
263,994 | String () { return getClass().getSimpleName() + "@" + Integer.toHexString(System.identityHashCode(this)) + " {" + myInstanceNumber + "}" + ", closed: " + isClosed(); } | toString |
263,995 | void () { myLines2Skip = myTotalLines; } | cutTail |
263,996 | boolean () { return myClosed; } | isClosed |
263,997 | LogListener () { return myLoggingHandler.getOrCreateLogListener(myLogPipeName); } | getLogListener |
263,998 | void (boolean enabled) { myLogDebugEnabled = enabled; } | setLogDebugEnabled |
263,999 | boolean () { return myLogDebugEnabled; } | isLogDebugEnabled |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.