Unnamed: 0
int64
0
305k
body
stringlengths
7
52.9k
name
stringlengths
1
185
7,900
void (@NotNull IJPerfVisitor visitor) { visitor.visitStatement(this); }
accept
7,901
void (@NotNull PsiElementVisitor visitor) { if (visitor instanceof IJPerfVisitor) accept((IJPerfVisitor)visitor); else super.accept(visitor); }
accept
7,902
IJPerfCommandLine () { return findChildByClass(IJPerfCommandLine.class); }
getCommandLine
7,903
void (@NotNull IJPerfVisitor visitor) { visitor.visitSimpleOption(this); }
accept
7,904
void (@NotNull PsiElementVisitor visitor) { if (visitor instanceof IJPerfVisitor) accept((IJPerfVisitor)visitor); else super.accept(visitor); }
accept
7,905
int (int ch) { return ZZ_CMAP_A[(ZZ_CMAP_Y[(ZZ_CMAP_Z[ch>>9]<<6)|((ch>>3)&0x3f)]<<3)|(ch&0x7)]; }
ZZ_CMAP
7,906
int (String packed, int offset, int [] result) { int i = 0; /* index in packed string */ int j = offset; /* index in unpacked array */ int l = packed.length(); while (i < l) { int count = packed.charAt(i++); int value = packed.charAt(i++); do result[j++] = value; while (--count > 0); } return j; }
zzUnpackAction
7,907
int (String packed, int offset, int [] result) { int i = 0; /* index in packed string */ int j = offset; /* index in unpacked array */ int l = packed.length(); while (i < l) { int high = packed.charAt(i++) << 16; result[j++] = high | packed.charAt(i++); } return j; }
zzUnpackRowMap
7,908
int (String packed, int offset, int [] result) { int i = 0; /* index in packed string */ int j = offset; /* index in unpacked array */ int l = packed.length(); while (i < l) { int count = packed.charAt(i++); int value = packed.charAt(i++); value--; do result[j++] = value; while (--count > 0); } return j; }
zzUnpackTrans
7,909
int (String packed, int offset, int [] result) { int i = 0; /* index in packed string */ int j = offset; /* index in unpacked array */ int l = packed.length(); while (i < l) { int count = packed.charAt(i++); int value = packed.charAt(i++); do result[j++] = value; while (--count > 0); } return j; }
zzUnpackAttribute
7,910
int () { return zzStartRead; }
getTokenStart
7,911
int () { return getTokenStart() + yylength(); }
getTokenEnd
7,912
void (CharSequence buffer, int start, int end, int initialState) { zzBuffer = buffer; zzCurrentPos = zzMarkedPos = zzStartRead = start; zzAtEOF = false; zzAtBOL = true; zzEndRead = end; yybegin(initialState); }
reset
7,913
int () { return zzLexicalState; }
yystate
7,914
void (int newState) { zzLexicalState = newState; }
yybegin
7,915
CharSequence () { return zzBuffer.subSequence(zzStartRead, zzMarkedPos); }
yytext
7,916
char (int pos) { return zzBuffer.charAt(zzStartRead+pos); }
yycharat
7,917
int () { return zzMarkedPos-zzStartRead; }
yylength
7,918
void (int errorCode) { String message; try { message = ZZ_ERROR_MSG[errorCode]; } catch (ArrayIndexOutOfBoundsException e) { message = ZZ_ERROR_MSG[ZZ_UNKNOWN_ERROR]; } throw new Error(message); }
zzScanError
7,919
void (int number) { if ( number > yylength() ) zzScanError(ZZ_PUSHBACK_2BIG); zzMarkedPos -= number; }
yypushback
7,920
void () { if (!zzEOFDone) { zzEOFDone = true; } }
zzDoEOF
7,921
void (@NotNull Project project) { System.setProperty(getClass().getName(), "123"); }
method123
7,922
void () { System.setProperty(getClass().getName(), "123"); }
method123
7,923
void () { String home = computeJavaHome(); doCommand("mock-jdk-6" + System.currentTimeMillis(), SimpleJavaSdkType.getInstance(), home); Sdk sdk = ProjectRootManager.getInstance(getProject()).getProjectSdk(); Assert.assertNotNull(sdk); Assert.assertTrue(FileUtil.pathsEqual(sdk.getHomePath(), home)); }
testSetupJavaHome
7,924
void (@NotNull String sdkName, @NotNull SdkType type, @NotNull String home) { new SetupProjectSdkCommand("command-name " + sdkName + " " + type.getName() + " \"" + home + "\"", 1) { @Override protected void registerNewSdk(@NotNull Sdk newSdk) { ProjectJdkTable.getInstance().addJdk(newSdk, getTestRootDisposable()); } }.computePromise(System.out::println, getProject()); }
doCommand
7,925
void (@NotNull Sdk newSdk) { ProjectJdkTable.getInstance().addJdk(newSdk, getTestRootDisposable()); }
registerNewSdk
7,926
String () { String home = SystemProperties.getJavaHome(); if (home.endsWith("/jre")) home = new File(home).getParent(); return home; }
computeJavaHome
7,927
String (@NonNls String theme) { return "/plugins/performanceTesting/testData/" + theme; }
getDataSubPath
7,928
void () { myFixture.configureByFile(getTestName(true) + "." + IJPerfFileType.DEFAULT_EXTENSION); final LookupElement[] lookupElements = myFixture.completeBasic(); Assert.assertNotNull(lookupElements); List<String> expectedCommands = new ArrayList<>(CommandProvider.getAllCommandNames()); expectedCommands.add("%%project"); expectedCommands.add("%%profileIndexing"); List<String> strings = myFixture.getLookupElementStrings(); assertTrue(strings.containsAll(expectedCommands)); }
testEmptyFile
7,929
void () { myFixture.configureByFile(getTestName(true) + "." + IJPerfFileType.DEFAULT_EXTENSION); final LookupElement[] lookupElements = myFixture.completeBasic(); Assert.assertNull(lookupElements); }
testAfterCommand
7,930
void () { myFixture.configureByFile(getTestName(true) + "." + IJPerfFileType.DEFAULT_EXTENSION); final LookupElement[] lookupElements = myFixture.completeBasic(); Assert.assertNotNull(lookupElements); List<String> expectedCommands = new ArrayList<>(CommandProvider.getAllCommandNames()); expectedCommands.add("%%project"); expectedCommands.add("%%profileIndexing"); List<String> strings = myFixture.getLookupElementStrings(); assertTrue(strings.containsAll(expectedCommands)); }
testBetweenStatements
7,931
void () { myFixture.configureByFile(getTestName(true) + "." + IJPerfFileType.DEFAULT_EXTENSION); final LookupElement[] lookupElements = myFixture.completeBasic(); assertNotNull(lookupElements); assertNotEmpty(Arrays.asList(lookupElements)); List<String> expectedCommands = Arrays.asList("%%project", "%%profileIndexing"); List<String> strings = myFixture.getLookupElementStrings(); assertTrue(expectedCommands.containsAll(strings)); }
testDoublePrefix
7,932
void () { myFixture.configureByFile(getTestName(true) + "." + IJPerfFileType.DEFAULT_EXTENSION); final LookupElement[] lookupElements = myFixture.completeBasic(); Assert.assertNotNull(lookupElements); assertEmpty(lookupElements); }
testEndOfStatement
7,933
void () { myFixture.configureByFile(getTestName(true) + "." + IJPerfFileType.DEFAULT_EXTENSION); final LookupElement[] lookupElements = myFixture.completeBasic(); Assert.assertNotNull(lookupElements); assertEmpty(lookupElements); }
testInOptionList
7,934
void () { myFixture.configureByFile(getTestName(true) + "." + IJPerfFileType.DEFAULT_EXTENSION); final LookupElement[] lookupElements = myFixture.completeBasic(); Assert.assertNotNull(lookupElements); List<String> expectedCommands = new ArrayList<>(CommandProvider.getAllCommandNames()); List<String> strings = myFixture.getLookupElementStrings(); assertTrue(strings.containsAll(expectedCommands)); }
testSinglePrefix
7,935
void () { myFixture.configureByFile(getTestName(true) + "." + IJPerfFileType.DEFAULT_EXTENSION); final LookupElement[] lookupElements = myFixture.completeBasic(); Assert.assertNotNull(lookupElements); List<String> expectedCommands = ContainerUtil.filter(CommandProvider.getAllCommandNames(), command -> command.startsWith("%start")); List<String> strings = myFixture.getLookupElementStrings(); assertTrue(strings.containsAll(expectedCommands)); }
testOnCommand
7,936
void () { myFixture.configureByFile(getTestName(true) + "." + IJPerfFileType.DEFAULT_EXTENSION); final LookupElement[] lookupElements = myFixture.completeBasic(); Assert.assertNotNull(lookupElements); List<String> expectedCommands = ContainerUtil.filter(CommandProvider.getAllCommandNames(), command -> command.contains("proj")); List<String> strings = myFixture.getLookupElementStrings(); assertTrue(strings.containsAll(expectedCommands)); }
testWithoutPrefix
7,937
String () { return PathManager.getHomePath() + TestUtil.getDataSubPath("completion"); }
getTestDataPath
7,938
void () { doTest(true); }
testCommandWithoutOptions
7,939
void () { doTest(true); }
testCommandWithSimpleOption
7,940
void () { doTest(true); }
testCommandWithSeveralOptions
7,941
void () { doTest(true); }
testCommandWithSeveralOptionsWithValue
7,942
void () { doTest(true); }
testCommandWithSeveralOptionsSeparated
7,943
void () { doTest(true); }
testCommandWithNumberOptions
7,944
void () { doTest(true); }
testCommandWithPipeOptionSeparator
7,945
void () { doTest(true); }
testCommandWithSimpleOptionWithValue
7,946
void () { doTest(true); }
testSimpleExample
7,947
void () { doTest(true); }
testCommandWithFilePathInParameters
7,948
String () { return PathManager.getHomePath() + TestUtil.getDataSubPath(""); }
getTestDataPath
7,949
void () { doTest(); }
testDoublePrefixCommand
7,950
void () { doTest(); }
testSinglePrefixCommand
7,951
void () { doTest(); }
testSpaceSeparatedParameters
7,952
void () { doTest(); }
testSpaceSeparatedParametersValue
7,953
void () { doTest(); }
testCommandWithoutParams
7,954
void () { doTest(); }
testOptionWithValue
7,955
void () { doTest(); }
testNumberOptions
7,956
void () { doTest(); }
testPipeSeparatedOption
7,957
void () { doTest(); }
testComment
7,958
void () { doTest(); }
testFilePathInParameters
7,959
void () { doTest(); }
testScriptWithEmptyLines
7,960
void () { doTest(); }
testTextOptionWithSymbols
7,961
void () { doFileTest(IJPerfFileType.DEFAULT_EXTENSION); }
doTest
7,962
Lexer () { return new IJPerfLexerAdapter(); }
createLexer
7,963
String () { return TestUtil.getDataSubPath("lexer"); }
getDirPath
7,964
EventLogGroup () { return GROUP; }
getGroup
7,965
Set<MetricEvent> (@NotNull Project project) { TaskManager taskManager = TaskManager.getManager(project); LocalTask activeTask = taskManager.getActiveTask(); return Collections.singleton( TASKS_COMBO_ON_TOOLBAR.metric(SwitchTaskAction.isTaskManagerComboInToolbarEnabledAndVisible(activeTask, taskManager))); }
getMetrics
7,966
String () { return String.valueOf(myResponse.get("id")); }
getId
7,967
String () { return (String)myResponse.get("summary"); }
getSummary
7,968
String () { return null; }
getDescription
7,969
Icon () { return TasksCoreIcons.Bugzilla; }
getIcon
7,970
TaskType () { String severity = (String)myResponse.get("severity"); return severity.equalsIgnoreCase("enhancement")? TaskType.FEATURE : TaskType.BUG; }
getType
7,971
TaskState () { final String status = (String)myResponse.get("status"); return switch (status) { case "IN_PROGRESS" -> TaskState.IN_PROGRESS; case "CONFIRMED" -> TaskState.OPEN; case "UNCONFIRMED" -> TaskState.SUBMITTED; case "RESOLVED" -> TaskState.RESOLVED; default -> TaskState.OTHER; }; }
getState
7,972
Date () { return (Date)myResponse.get("last_change_time"); }
getUpdated
7,973
Date () { return (Date)myResponse.get("creation_time"); }
getCreated
7,974
boolean () { return !(Boolean)myResponse.get("is_open"); }
isClosed
7,975
boolean () { return true; }
isIssue
7,976
String () { String repositoryUrl = myRepository.getUrl(); repositoryUrl = StringUtil.trimEnd(repositoryUrl, "xmlrpc.cgi"); return repositoryUrl + "/show_bug.cgi?id=" + getId(); }
getIssueUrl
7,977
TaskRepository () { return myRepository; }
getRepository
7,978
BaseRepository () { return new BugzillaRepository(this); }
clone
7,979
List<String> (@NotNull Vector<Hashtable<String, ?>> vector) { return ContainerUtil.mapNotNull(vector, table -> StringUtil.nullize((String)table.get("name"))); }
extractNotEmptyNames
7,980
CancellableConnection () { return new CancellableConnection() { BugzillaXmlRpcRequest myRequest; @Override protected void doTest() throws Exception { // Reset information about server. myVersion = null; myAuthenticated = false; myAuthenticationToken = null; myRequest = createIssueSearchRequest(null, 0, 1, true); myRequest.execute(); } @Override public void cancel() { myRequest.cancel(); } }; }
createCancellableConnection
7,981
void () { myRequest.cancel(); }
cancel
7,982
String (@NotNull String taskName) { String id = taskName.trim(); return id.matches("\\d+") ? id : null; }
extractId
7,983
boolean () { return super.isConfigured() && StringUtil.isNotEmpty(getUsername()) && StringUtil.isNotEmpty(getPassword()); }
isConfigured
7,984
int () { int features = super.getFeatures(); // Status and work time updates are available through Bug.update method which is available only in Bugzilla 4.0+ if (myVersion != null && myVersion.isOrGreaterThan(4, 0)) { return features | STATE_UPDATING | TIME_MANAGEMENT; } return features; }
getFeatures
7,985
void () { method.abort(); }
cancel
7,986
BugzillaXmlRpcRequest (@NotNull String name, @Nullable Object value) { if (value != null) { myParameters.put(name, value); } return this; }
withParameter
7,987
BugzillaXmlRpcRequest (boolean require) { myRequireAuthentication = require; return this; }
requireAuthentication
7,988
void () { myTransport.cancel(); }
cancel
7,989
boolean (Object o) { if (!super.equals(o)) return false; if (!(o instanceof BugzillaRepository repository)) return false; if (!Objects.equals(myProductName, repository.getProductName())) return false; if (!Objects.equals(myComponentName, repository.getComponentName())) return false; return true; }
equals
7,990
String () { return myProductName; }
getProductName
7,991
void (@NotNull String productName) { myProductName = productName; }
setProductName
7,992
String () { return myComponentName; }
getComponentName
7,993
void (@NotNull String componentName) { myComponentName = componentName; }
setComponentName
7,994
String () { return "Bugzilla"; }
getName
7,995
Icon () { return TasksCoreIcons.Bugzilla; }
getIcon
7,996
TaskRepositoryEditor (BugzillaRepository repository, Project project, Consumer<? super BugzillaRepository> changeListener) { return new BugzillaRepositoryEditor(project, repository, changeListener); }
createEditor
7,997
TaskRepository () { return new BugzillaRepository(this); }
createRepository
7,998
Class<BugzillaRepository> () { return BugzillaRepository.class; }
getRepositoryClass
7,999
EnumSet<TaskState> () { // UNCONFIRMED, CONFIRMED, IN_PROGRESS, RESOLVED (resolution=FIXED) return EnumSet.of(TaskState.SUBMITTED, TaskState.OPEN, TaskState.IN_PROGRESS, TaskState.RESOLVED); }
getPossibleTaskStates