Unnamed: 0
int64
0
305k
body
stringlengths
7
52.9k
name
stringlengths
1
185
42,600
boolean (int code) { return myIgnoredErrorCodes.contains(code); }
isIgnoredErrorCode
42,601
GitCommandResult (@NotNull GitCommandResult result, boolean authenticationFailed) { return new GitCommandResult(result.myStartFailed, result.myExitCode, authenticationFailed, result.myErrorOutput, result.myOutput, result.myRootName); }
withAuthentication
42,602
boolean () { return success(new int[]{}); }
success
42,603
boolean (int... ignoredErrorCodes) { return !myStartFailed && (Arrays.stream(ignoredErrorCodes).anyMatch(i -> i == myExitCode) || myExitCode == 0); }
success
42,604
List<String> () { return Collections.unmodifiableList(myOutput); }
getOutput
42,605
int () { return myExitCode; }
getExitCode
42,606
boolean () { return myAuthenticationFailed; }
isAuthenticationFailed
42,607
List<String> () { return Collections.unmodifiableList(myErrorOutput); }
getErrorOutput
42,608
GitCommandResult (@NotNull @Nls String error) { return new GitCommandResult(true, -1, Collections.singletonList(error), Collections.emptyList(), null); }
startError
42,609
GitCommandResult (@NotNull @Nls String error) { return new GitCommandResult(false, 1, Collections.singletonList(error), Collections.emptyList(), null); }
error
42,610
boolean () { return false; }
cancelled
42,611
Collection<String> (@NotNull Collection<String> errorOutput) { return ContainerUtil.map(errorOutput, errorMessage -> GitUtil.cleanupErrorPrefixes(errorMessage)); }
cleanup
42,612
boolean () { return myStartFailed; }
hasStartFailed
42,613
void (@NotNull String line, @NotNull Key outputType) { super.onLineAvailable(line, outputType); for (Pattern pattern : myOperation.getPatterns()) { Matcher m = pattern.matcher(line); if (m.matches()) { myMessageDetected = true; myAffectedFiles.add(m.group(1)); break; } } }
onLineAvailable
42,614
void (@NotNull String line, @NotNull Key outputType) { super.onLineAvailable(line, outputType); Matcher m = OLD_UNTRACKED_FILES_PATTERN.matcher(line); if (m.matches()) { myMessageDetected = true; myAffectedFiles.add(m.group(1)); } }
onLineAvailable
42,615
List<AuthDataProvider> (@NotNull String unifiedUrl) { List<AuthDataProvider> delegates = new ArrayList<>(); PasswordSafeProvider passwordSafeProvider = new PasswordSafeProvider(unifiedUrl, GitRememberedInputs.getInstance(), PasswordSafe.getInstance()); boolean showActionForGitHelper = GitConfigUtil.isCredentialHelperUs...
getProviders
42,616
void () { ProviderAndData providerAndData = myProviderAndData; if (providerAndData == null) return; LOG.debug("saveAuthData. " + providerAndData.toString()); providerAndData.getProvider().onAuthSuccess(); }
saveAuthData
42,617
void () { ProviderAndData providerAndData = myProviderAndData; if (providerAndData == null) return; LOG.debug("forgetPassword. " + providerAndData.toString()); providerAndData.getProvider().onAuthFailure(); }
forgetPassword
42,618
boolean () { if (myCredentialHelperShouldBeUsed) { return false; } ProviderAndData providerAndData = myProviderAndData; return providerAndData != null && providerAndData.getProvider() instanceof CancelledProvider; }
wasCancelled
42,619
boolean () { return myWasRequested; }
wasRequested
42,620
String (@Nullable String urlFromGit) { if (urlFromGit != null && !StringUtil.isEmptyOrSpaces(urlFromGit)) { return urlFromGit; } else { if (myPresetUrl == null) throw new IllegalStateException("Invalid remote urls in handler"); return myPresetUrl; } }
getRequiredUrl
42,621
Couple<String> (@NotNull String url) { if (StringUtil.isEmptyOrSpaces(url)) return Couple.of(null, url); Couple<String> couple = UriUtil.splitScheme(url); String urlWithoutScheme = couple.second; if (StringUtil.isEmptyOrSpaces(urlWithoutScheme)) return Couple.of(null, url); int i = urlWithoutScheme.indexOf('@'); if (i ...
splitToUsernameAndUnifiedUrl
42,622
String () { return myDelegate.getClass().getName(); }
getName
42,623
AuthData () { return (myData = myDelegate.getAuthData(myProject, myUrl)); }
getData
42,624
AuthData (@NotNull String login) { return (myData = myDelegate.getAuthData(myProject, myUrl, login)); }
getDataForKnownLogin
42,625
void () { }
onAuthSuccess
42,626
void () { if (myData != null) myDelegate.forgetPassword(myProject, myUrl, myData); }
onAuthFailure
42,627
String () { return "ExtensionAdapterProvider(" + myDelegate + ")"; }
toString
42,628
String () { return myDataForSession ? "Session Provider" : "Dialog"; }
getName
42,629
void () { if (myDataForSession) return; myPasswordSafeDelegate.onAuthSuccess(); }
onAuthSuccess
42,630
void () { if (myDataForSession) return; myPasswordSafeDelegate.onAuthFailure(); }
onAuthFailure
42,631
AuthData (@NotNull String url, @Nullable String username, boolean editableUsername) { Map<String, InteractiveGitHttpAuthDataProvider> providers = new HashMap<>(); for (GitRepositoryHostingService service : GitRepositoryHostingService.EP_NAME.getExtensionList()) { InteractiveGitHttpAuthDataProvider provider = editableUs...
getDataFromDialog
42,632
GitHttpLoginDialog (@NotNull String url, @Nullable String username, boolean editableUsername, @NotNull Map<String, ? extends InteractiveGitHttpAuthDataProvider> interactiveProviders) { Ref<GitHttpLoginDialog> dialogRef = Ref.create(); ApplicationManager.getApplication().invokeAndWait(() -> { GitHttpLoginDialog dialog =...
showAuthDialog
42,633
boolean () { return myCancelled; }
isCancelled
42,634
String () { return "Password Safe"; }
getName
42,635
void () { }
onAuthSuccess
42,636
void () { if (myData == null) return; String key = makeKey(myUrl, myData.getLogin()); CredentialAttributes attributes = credentialAttributes(key); LOG.debug("forgetPassword. key=" + attributes.getUserName()); myPasswordSafe.set(attributes, null); }
onAuthFailure
42,637
void (@NotNull AuthData data) { myData = data; }
setData
42,638
void (boolean remember) { mySavePassword = remember; myPasswordSafe.setRememberPasswordByDefault(remember); }
setRememberPassword
42,639
boolean () { return myPasswordSafe.isRememberPasswordByDefault(); }
isRememberPasswordByDefault
42,640
void (@NotNull String url) { if (myData == null || myData.getPassword() == null) return; myRememberedInputs.addUrl(url, myData.getLogin()); if (!mySavePassword) return; String key = makeKey(url, myData.getLogin()); Credentials credentials = new Credentials(key, myData.getPassword()); myPasswordSafe.set(credentialAttrib...
savePassword
42,641
CredentialAttributes (@NotNull String key) { return new CredentialAttributes(generateServiceName(GitBundle.message("label.credential.store.key.http.password"), key), key); }
credentialAttributes
42,642
String (@NotNull String url, @Nullable String login) { if (login == null) { return url; } Couple<String> pair = UriUtil.splitScheme(url); String scheme = pair.getFirst(); if (!StringUtil.isEmpty(scheme)) { return scheme + URLUtil.SCHEME_SEPARATOR + login + "@" + pair.getSecond(); } return login + "@" + url; }
makeKey
42,643
AuthDataProvider () { return myProvider; }
getProvider
42,644
String () { return myLogin; }
getLogin
42,645
String () { return myPassword; }
getPassword
42,646
void (@NotNull GitHandler handler, @Nullable ProgressIndicator indicator, boolean setIndeterminateFlag, @Nullable @Nls String operationName) { runInCurrentThread(handler, () -> { if (indicator != null) { indicator.setText(operationName == null ? GitBundle.message("git.running", handler.printableCommandLine()) : operati...
runInCurrentThread
42,647
void (@NotNull GitHandler handler, @Nullable Runnable postStartAction) { handler.runInCurrentThread(postStartAction); }
runInCurrentThread
42,648
boolean (@NotNull String text) { for (String prefix : GitImplBase.ERROR_INDICATORS) { if (text.startsWith(prefix)) { return true; } } return false; }
isErrorLine
42,649
Git () { return ApplicationManager.getApplication().getService(Git.class); }
getInstance
42,650
void (@NotNull String line, Key outputType) { if (myEvent.matches(line)) { myHappened = true; } }
onLineAvailable
42,651
boolean () { return myHappened; }
hasHappened
42,652
void () { Disposer.dispose(myDisposable); }
close
42,653
void (@NonNls String line, Key outputType) { if (!httpAuthenticator.wasRequested()) { return; } String lowerCaseLine = StringUtil.toLowerCase(line); if (lowerCaseLine.contains("authentication failed") || lowerCaseLine.contains("403 forbidden") || lowerCaseLine.contains("but was used to access one of realms") || lowerCa...
onLineAvailable
42,654
void (int exitCode) { if (!httpAuthenticator.wasRequested()) { return; } LOG.debug("auth listener: process terminated. auth failed=" + myHttpAuthFailed + ", cancelled=" + httpAuthenticator.wasCancelled()); if (!httpAuthenticator.wasCancelled()) { if (myHttpAuthFailed) { httpAuthenticator.forgetPassword(); } else { http...
processTerminated
42,655
boolean () { return myHttpAuthFailed; }
isHttpAuthFailed
42,656
boolean (@NotNull GitExecutable executable) { if (!SystemInfo.isWindows) return false; if (!executable.isLocal()) return false; if (Registry.is("git.use.shell.script.on.windows") && GitVersionSpecialty.CAN_USE_SHELL_HELPER_SCRIPT_ON_WINDOWS.existsIn(myVersion)) { return isCustomSshExecutableConfigured(); } return true;...
shouldUseBatchScript
42,657
boolean () { String sshCommand = readSshCommand(); String command = StringUtil.trim(StringUtil.unquoteString(StringUtil.notNullize(sshCommand))); // do not treat 'ssh -vvv' as custom executable return !command.isEmpty() && !command.startsWith("ssh "); }
isCustomSshExecutableConfigured
42,658
String () { String sshCommand = EnvironmentUtil.getValue(GitCommand.GIT_SSH_COMMAND_ENV); if (sshCommand != null) return sshCommand; sshCommand = EnvironmentUtil.getValue(GitCommand.GIT_SSH_ENV); if (sshCommand != null) return sshCommand; VirtualFile root = myHandler.getExecutableContext().getRoot(); if (root == null) ...
readSshCommand
42,659
ProcessEventListener () { return myListeners.getMulticaster(); }
listeners
42,660
VcsExecutableContext () { return myExecutableContext; }
getExecutableContext
42,661
GitExecutable () { return myExecutable; }
getExecutable
42,662
void (@NotNull ProcessEventListener listener) { myListeners.addListener(listener); }
addListener
42,663
void () { myExecutableContext.withLowPriority(true); }
withLowPriority
42,664
void () { myExecutableContext.withNoTty(true); }
withNoTty
42,665
void (@NonNls String @NotNull ... parameters) { addParameters(Arrays.asList(parameters)); }
addParameters
42,666
void (@NotNull List<@NonNls String> parameters) { for (String parameter : parameters) { myCommandLine.addParameter(escapeParameterIfNeeded(parameter)); } }
addParameters
42,667
String (@NotNull @NonNls String parameter) { if (escapeNeeded(parameter)) { return parameter.replaceAll("\\^", "^^^^"); } return parameter; }
escapeParameterIfNeeded
42,668
boolean (@NotNull @NonNls String parameter) { return SystemInfo.isWindows && isCmd() && parameter.contains("^"); }
escapeNeeded
42,669
boolean () { return StringUtil.toLowerCase(myCommandLine.getExePath()).endsWith("cmd"); //NON-NLS }
isCmd
42,670
void (FilePath @NotNull ... parameters) { addRelativePaths(Arrays.asList(parameters)); }
addRelativePaths
42,671
void (@NotNull Collection<? extends FilePath> filePaths) { for (FilePath path : filePaths) { myCommandLine.addParameter(VcsFileUtil.relativePath(getWorkingDirectory(), path)); } }
addRelativePaths
42,672
void (final @NotNull Collection<? extends VirtualFile> files) { for (VirtualFile file : files) { myCommandLine.addParameter(VcsFileUtil.relativePath(getWorkingDirectory(), file)); } }
addRelativeFiles
42,673
void (@NotNull File file) { myCommandLine.addParameter(myExecutable.convertFilePath(file)); }
addAbsoluteFile
42,674
void () { myCommandLine.addParameter("--"); }
endOptions
42,675
boolean () { return myProcess != null; }
isStarted
42,676
boolean () { return myCommandLine.getCommandLineString().length() > VcsFileUtil.FILE_PATH_LIMIT; }
isLargeCommandLine
42,677
String (@NotNull String commandLine) { if (escapeNeeded(commandLine)) { return commandLine.replaceAll("\\^\\^\\^\\^", "^"); } return commandLine; }
unescapeCommandLine
42,678
Charset () { return myCommandLine.getCharset(); }
getCharset
42,679
void (@NotNull Charset charset) { myCommandLine.setCharset(charset); }
setCharset
42,680
void (boolean silent) { mySilent = silent; if (silent) { setStderrSuppressed(true); setStdoutSuppressed(true); } }
setSilent
42,681
void (final boolean stdoutSuppressed) { myStdoutSuppressed = stdoutSuppressed; }
setStdoutSuppressed
42,682
void (boolean stderrSuppressed) { myStderrSuppressed = stderrSuppressed; }
setStderrSuppressed
42,683
void (@Nullable ThrowableConsumer<? super OutputStream, IOException> inputProcessor) { myInputProcessor = inputProcessor; }
setInputProcessor
42,684
void (@NotNull @NonNls String name, @Nullable @NonNls String value) { myCustomEnv.put(name, value); }
addCustomEnvironmentVariable
42,685
void (@NotNull @NonNls String name, @NotNull File file) { myCustomEnv.put(name, myExecutable.convertFilePath(file)); }
addCustomEnvironmentVariable
42,686
boolean (@NotNull @NonNls String key) { return myCustomEnv.containsKey(key); }
containsCustomEnvironmentVariable
42,687
void (boolean preValidateExecutable) { myPreValidateExecutable = preValidateExecutable; }
setPreValidateExecutable
42,688
boolean () { return myEnableInteractiveCallbacks; }
isEnableInteractiveCallbacks
42,689
void (boolean enableInteractiveCallbacks) { myEnableInteractiveCallbacks = enableInteractiveCallbacks; }
setEnableInteractiveCallbacks
42,690
void () { if (myStartTime > 0) { long time = System.currentTimeMillis() - myStartTime; if (!TIME_LOG.isDebugEnabled() && time > LONG_TIME) { LOG.info(String.format("git %s took %s ms. Command parameters: %n%s", myCommand, time, myCommandLine.getCommandLineString())); } else { TIME_LOG.debug(String.format("git %s took %...
logTime
42,691
void () { if (myProject != null && !myProject.isDefault() && !TrustedProjects.isTrusted(myProject)) { throw new IllegalStateException("Shouldn't be possible to run a Git command in the safe mode"); } if (isStarted()) { throw new IllegalStateException("The process has been already started"); } try { myStartTime = System...
start
42,692
void () { Map<String, String> executionEnvironment = myCommandLine.getEnvironment(); executionEnvironment.clear(); if (myExecutable.isLocal()) { executionEnvironment.putAll(EnvironmentUtil.getEnvironmentMap()); } executionEnvironment.putAll(myExecutable.getLocaleEnv()); executionEnvironment.putAll(myCustomEnv); executi...
prepareEnvironment
42,693
boolean () { if (ProgressManager.getInstance().getProgressIndicator() instanceof PotemkinProgress) { return !ApplicationManager.getApplication().isDispatchThread(); } return false; }
shouldSuppressReadLocks
42,694
String () { return myCommandLine.toString(); }
toString
42,695
int () { if (myExitCode == null) { return -1; } return myExitCode.intValue(); }
getExitCode
42,696
void (int exitCode) { if (myExitCode == null) { myExitCode = exitCode; } else { LOG.info("Not setting exit code " + exitCode + ", because it was already set to " + myExitCode); } }
setExitCode
42,697
void (VcsException ex) { myErrors.add(ex); }
addError
42,698
List<VcsException> () { return Collections.unmodifiableList(myErrors); }
errors
42,699
GitCommand () { return new GitCommand(this, LockingPolicy.READ); }
readLockingCommand