Unnamed: 0
int64
0
305k
body
stringlengths
7
52.9k
name
stringlengths
1
185
42,700
GitCommand () { return new GitCommand(this, LockingPolicy.WRITE); }
writeLockingCommand
42,701
GitCommand (@NotNull @NonNls String name) { return new GitCommand(name, LockingPolicy.READ); }
read
42,702
GitCommand (@NotNull @NonNls String name) { return new GitCommand(name, LockingPolicy.READ_OPTIONAL_LOCKING); }
readOptional
42,703
GitCommand (@NotNull @NonNls String name) { return new GitCommand(name, LockingPolicy.WRITE); }
write
42,704
String () { return myName; }
name
42,705
LockingPolicy () { return myLocking; }
lockingPolicy
42,706
String () { return myName; }
toString
42,707
void (@NotNull String line, @NotNull Key outputType) { if (ContainerUtil.exists(myEvent.messageStartMarkers, marker -> marker.matcher(line).matches())) { LOG.debug("|" + myEvent.name + "| message start marker detected in [" + line + "]" + "of type " + outputType); myMessageDetected = true; myMessageOutputType = outputT...
onLineAvailable
42,708
boolean () { return myMessageDetected; }
wasMessageDetected
42,709
Set<String> () { return myAffectedFiles; }
getRelativeFilePaths
42,710
Collection<VirtualFile> () { Collection<VirtualFile> files = new ArrayList<>(myAffectedFiles.size()); for (String affectedFile : myAffectedFiles) { VirtualFile file = myRoot.findFileByRelativePath(FileUtil.toSystemIndependentName(affectedFile)); if (file != null) { files.add(file); } } return files; }
getFiles
42,711
GitHttpGuiAuthenticator (@NotNull Project project, @NotNull Collection<String> urls, @NotNull File workingDirectory, @NotNull AuthenticationGate authenticationGate, @NotNull AuthenticationMode authenticationMode) { return new GitHttpGuiAuthenticator(project, urls, workingDirectory, authenticationGate, authenticationMod...
createAuthenticator
42,712
void () { handleStream(myProcess.getErrorStream(), myStderr, "Error stream copy of " + myCommandLine.getCommandLineString()); handleStream(myProcess.getInputStream(), myStdout, "Output stream copy of " + myCommandLine.getCommandLineString()); }
startHandlingStreams
42,713
void (final InputStream in, final ByteArrayOutputStream out, @NotNull @NonNls String cmd) { Thread t = new Thread(() -> { try { byte[] buffer = new byte[BUFFER_SIZE]; while (true) { int rc = in.read(buffer); if (rc == -1) { break; } out.write(buffer, 0, rc); } } catch (IOException e) { if (!myException.compareAndSet(nu...
handleStream
42,714
void () { int exitCode; try { mySteamSemaphore.acquire(2); myProcess.waitFor(); exitCode = myProcess.exitValue(); } catch (InterruptedException e) { if (LOG.isDebugEnabled()) { LOG.debug("Ignoring process exception: ", e); } exitCode = 255; } OUTPUT_LOG.debug(String.format("%s %% %s terminated (%s)", getCommand(), this...
waitForProcess
42,715
void (int exitCode) { if (exitCode != 0) { Charset cs = getCharset(); String message = new String(myStderr.toByteArray(), cs); if (message.isEmpty()) { if (myException.get() != null) { message = IdeCoreBundle.message("finished.with.exit.code.text.message", exitCode); } else { message = null; } } else { if (vcsConsoleWr...
processTerminated
42,716
void (@NotNull Throwable exception) { VcsException err = new VcsException(GitBundle.message("git.executable.unknown.error.message", exception.getMessage()), exception); VcsException oldErr = myException.getAndSet(err); if (oldErr != null) { LOG.warn("Dropping previous exception: ", oldErr); } }
startFailed
42,717
GitCommandResult (@NotNull GitLineHandler handler) { return run(handler, getCollectingCollector()); }
runCommand
42,718
GitCommandResult (@NotNull Computable<? extends GitLineHandler> handlerConstructor) { return run(handlerConstructor, GitImplBase::getCollectingCollector); }
runCommand
42,719
OutputCollector () { return new OutputCollector() { @Override public void outputLineReceived(@NotNull String line) { addOutputLine(line); } @Override public void errorLineReceived(@NotNull String line) { if (Registry.is("git.allow.stderr.to.stdout.mixing") && !looksLikeError(line)) { addOutputLine(line); } else { addEr...
getCollectingCollector
42,720
void (@NotNull String line) { addOutputLine(line); }
outputLineReceived
42,721
void (@NotNull String line) { if (Registry.is("git.allow.stderr.to.stdout.mixing") && !looksLikeError(line)) { addOutputLine(line); } else { addErrorLine(line); } }
errorLineReceived
42,722
GitCommandResult (@NotNull GitLineHandler handler) { return run(handler, new OutputCollector() { @Override protected void outputLineReceived(@NotNull String line) { } @Override protected void errorLineReceived(@NotNull String line) { addErrorLine(line); } }); }
runCommandWithoutCollectingOutput
42,723
void (@NotNull String line) { }
outputLineReceived
42,724
void (@NotNull String line) { addErrorLine(line); }
errorLineReceived
42,725
GitCommandResult (@NotNull Computable<? extends GitLineHandler> handlerConstructor, @NotNull Computable<? extends OutputCollector> outputCollectorConstructor) { @NotNull GitCommandResult result; int authAttempt = 0; do { GitLineHandler handler = handlerConstructor.compute(); OutputCollector outputCollector = outputColl...
run
42,726
GitCommandResult (@NotNull GitLineHandler handler, @NotNull OutputCollector outputCollector) { GitVersion version = GitVersion.NULL; if (handler.isPreValidateExecutable()) { GitExecutable executable = handler.getExecutable(); try { version = GitExecutableManager.getInstance().identifyVersion(executable); if (version.ge...
run
42,727
GitHandlerRebaseEditorManager (@NotNull Project project, @NotNull GitLineHandler handler) { return GitHandlerRebaseEditorManager.prepareEditor(handler, new GitSimpleEditorHandler(project)); }
prepareGeneralPurposeEditor
42,728
GitCommandResult (@NotNull GitLineHandler handler, @NotNull GitVersion version, @NotNull OutputCollector outputCollector) { getGitTraceEnvironmentVariables(version).forEach(handler::addCustomEnvironmentVariable); boolean canSuppressOptionalLocks = Registry.is("git.use.no.optional.locks") && GitVersionSpecialty.ENV_GIT_...
doRun
42,729
String (@NotNull String text) { String[] lines = splitByLinesKeepSeparators(text); return StreamEx.of(lines) .filter(line -> !line.startsWith(GitUtil.COMMENT_CHAR)) .joining(); }
ignoreComments
42,730
void (String line, Key outputType) { if (outputType == ProcessOutputTypes.STDOUT) { myOutputCollector.outputLineReceived(line); } else if (outputType == ProcessOutputTypes.STDERR && !looksLikeProgress(line)) { myOutputCollector.errorLineReceived(line); } }
onLineAvailable
42,731
void (int code) { myExitCode = code; }
processTerminated
42,732
void (@NotNull Throwable t) { myStartFailed = true; myOutputCollector.errorLineReceived(GitBundle.message("git.executable.unknown.error.message", t.getLocalizedMessage())); }
startFailed
42,733
void (@NotNull String line) { synchronized (myOutput) { myOutput.add(line); } }
addOutputLine
42,734
void (@NotNull String line) { synchronized (myErrorOutput) { myErrorOutput.add(line); } }
addErrorLine
42,735
GitCommandResult (@Nullable Project project, @NotNull Exception e) { // Show notification if it's a project non-modal task and cancel the task ProgressIndicator progressIndicator = ProgressManager.getInstance().getProgressIndicator(); if (project != null && progressIndicator != null && !progressIndicator.getModalitySta...
handlePreValidationException
42,736
void (@NotNull GitLineHandler handler) { if (handler.isSilent()) return; Project project = handler.project(); if (project != null && !project.isDefault()) { String workingDir = stringifyWorkingDir(project.getBasePath(), handler.getWorkingDirectory()); GitVcsConsoleWriter.getInstance(project).showCommandLine(String.form...
writeOutputToConsole
42,737
void (String line, Key outputType) { try { if (StringUtil.isEmptyOrSpaces(line)) return; if (outputType == ProcessOutputTypes.SYSTEM) return; if (outputType == ProcessOutputTypes.STDOUT && myHandler.isStdoutSuppressed()) return; if (outputType == ProcessOutputTypes.STDERR && myHandler.isStderrSuppressed()) return; List...
onLineAvailable
42,738
AccessToken (@NotNull GitLineHandler handler, boolean canSuppressOptionalLocks) { Project project = handler.project(); LockingPolicy lockingPolicy = handler.getCommand().lockingPolicy(); if (project == null || project.isDefault() || lockingPolicy == READ) { return AccessToken.EMPTY_ACCESS_TOKEN; } ReadWriteLock executi...
lock
42,739
void () { lock.unlock(); }
finish
42,740
boolean (@NotNull String line) { if (PROGRESS_PATTERN.matcher(line).matches()) return true; return ContainerUtil.exists(SUPPRESSED_PROGRESS_INDICATORS, prefix -> { if (StringUtil.startsWith(line, prefix)) return true; if (StringUtil.startsWith(line, REMOTE_PROGRESS_PREFIX)) { return StringUtil.startsWith(line, REMOTE_P...
looksLikeProgress
42,741
boolean (@NotNull @NonNls String text) { return ContainerUtil.exists(ERROR_INDICATORS, indicator -> StringUtil.startsWithIgnoreCase(text.trim(), indicator)); }
looksLikeError
42,742
String (@Nullable String basePath, @NotNull File workingDir) { if (basePath != null) { String relPath = FileUtil.getRelativePath(basePath, FileUtil.toSystemIndependentName(workingDir.getPath()), '/'); if (".".equals(relPath)) { return workingDir.getName(); } else if (relPath != null) { return FileUtil.toSystemDependent...
stringifyWorkingDir
42,743
void (final String line, final Key outputType) { }
onLineAvailable
42,744
void (char[] input, int contentLength) { int offset = 0; while (offset < contentLength) { int nextLine = indexOfNewline(input, offset, contentLength); if (nextLine == -1) { if (myBufferedCr) sendBufferLine(); myLineBuffer.append(input, offset, contentLength - offset); break; } boolean isCr = input[nextLine] == '\r'; if...
process
42,745
int (char[] input, int offset, int contentLength) { for (int i = offset; i < contentLength; i++) { char character = input[i]; if (character == '\n' || character == '\r') return i; } return -1; }
indexOfNewline
42,746
void () { myLineConsumer.consume(myLineBuffer.toString(), myBufferedCr); myLineBuffer.setLength(0); myBufferedCr = false; }
sendBufferLine
42,747
void () { if (myLineBuffer.length() > 0 || myBufferedCr) { sendBufferLine(); } }
flush
42,748
void (@NotNull @NonNls String url) { setUrls(Collections.singletonList(url)); }
setUrl
42,749
void (@NotNull Collection<String> urls) { myUrls = urls; }
setUrls
42,750
Collection<String> () { return myUrls; }
getUrls
42,751
boolean () { return !myUrls.isEmpty(); }
isRemote
42,752
AuthenticationMode () { return myIgnoreAuthenticationRequest; }
getIgnoreAuthenticationMode
42,753
void (@NotNull AuthenticationMode authenticationMode) { myIgnoreAuthenticationRequest = authenticationMode; }
setIgnoreAuthenticationMode
42,754
void (@NotNull AuthenticationGate authenticationGate) { myAuthenticationGate = authenticationGate; }
setAuthenticationGate
42,755
void (final int exitCode) { }
processTerminated
42,756
void (GitLineHandlerListener listener) { super.addListener(listener); myLineListeners.addListener(listener); }
addLineListener
42,757
void (@NotNull String line, boolean isCr, @NotNull Key outputType) { if (outputType == ProcessOutputTypes.SYSTEM) return; // do not log git remote progress if (!isCr) logOutput(line, outputType); if (OUTPUT_LOG.isDebugEnabled()) { OUTPUT_LOG.debug(String.format("%s %% %s (%s):'%s'", getCommand(), this.hashCode(), outpu...
onLineAvailable
42,758
void (@NotNull String line, @NotNull Key outputType) { if (mySilent) return; boolean shouldLogOutput = outputType == ProcessOutputTypes.STDOUT && !isStdoutSuppressed() || outputType == ProcessOutputTypes.STDERR && !isStderrSuppressed(); if (!shouldLogOutput) return; if (StringUtil.isEmptyOrSpaces(line)) return; LOG.inf...
logOutput
42,759
BaseDataReader () { return new LineReader(createProcessOutReader(), readerOptions().policy(), new BufferingTextSplitter((line, isCr) -> onLineAvailable(line, isCr, ProcessOutputTypes.STDOUT)), myPresentableName); }
createOutputDataReader
42,760
BaseDataReader () { return new LineReader(createProcessErrReader(), readerOptions().policy(), new BufferingTextSplitter((line, isCr) -> onLineAvailable(line, isCr, ProcessOutputTypes.STDERR)), myPresentableName); }
createErrorDataReader
42,761
void (@NonNls String ... params) { overwriteConfig(Arrays.asList(params)); }
overwriteConfig
42,762
void (@NonNls List<String> params) { for (String param : params) { myCommandLine.getParametersList().prependAll("-c", param); } }
overwriteConfig
42,763
GitLineHandlerListener (final @NotNull ProgressIndicator indicator) { final GitStandardProgressAnalyzer progressAnalyzer = new GitStandardProgressAnalyzer(); return new GitLineHandlerListener() { @Override public void onLineAvailable(String line, Key outputType) { final double fraction = progressAnalyzer.analyzeProgres...
createListener
42,764
void (String line, Key outputType) { final double fraction = progressAnalyzer.analyzeProgress(line); if (fraction >= 0) { indicator.setIndeterminate(false); indicator.setFraction(fraction); indicator.setText2(line); } }
onLineAvailable
42,765
double (String output) { for (Operation operation : Operation.values()) { final Matcher matcher = operation.myPattern.matcher(output); if (matcher.matches()) { try { double operationProgress = operation.getProgress(Integer.parseInt(matcher.group(1))); // progress of this operation myOperationsProgress.put(operation, op...
analyzeProgress
42,766
double (Operation currentOperation) { // marking all operations before this one as completed for (Operation op : Operation.values()) { if (currentOperation.compareTo(op) > 0) { myOperationsProgress.put(op, 1.0); } } // counting progress double totalProgress = 0; for (Object2DoubleMap.Entry<Operation> entry : myOperatio...
updateTotalProgress
42,767
String () { return super.getExtension(); }
getFilename
42,768
IgnoreFileType () { return GitExcludeFileType.INSTANCE; }
getFileType
42,769
IgnoreFileType () { return GitIgnoreFileType.INSTANCE; }
getFileType
42,770
boolean (@NotNull GitVersion version) { return version.isLaterOrEqual(new GitVersion(1, 7, 1, 1)); }
existsIn
42,771
boolean (@NotNull GitVersion version) { return version.getType().equals(GitVersion.Type.MSYS) && version.isLaterOrEqual(new GitVersion(2, 3, 0, 0)); }
existsIn
42,772
boolean (@NotNull GitVersion version) { return version.isLaterOrEqual(new GitVersion(1, 7, 2, 0)); }
existsIn
42,773
boolean (@NotNull GitVersion version) { return version.isLaterOrEqual(new GitVersion(1, 7, 7, 2)); }
existsIn
42,774
boolean (@NotNull GitVersion version) { return version.isOlderOrEqual(new GitVersion(1, 7, 3, 0)); }
existsIn
42,775
boolean (@NotNull GitVersion version) { return version.isLaterOrEqual(new GitVersion(1, 7, 9, 0)); }
existsIn
42,776
boolean (@NotNull GitVersion version) { return version.isLaterOrEqual(new GitVersion(2, 6, 0, 0)); }
existsIn
42,777
boolean (@NotNull GitVersion version) { return version.isLaterOrEqual(new GitVersion(1, 7, 11, 0)); }
existsIn
42,778
boolean (@NotNull GitVersion version) { return version.isLaterOrEqual(new GitVersion(1, 7, 12, 1)); }
existsIn
42,779
boolean (@NotNull GitVersion version) { return version.isLaterOrEqual(new GitVersion(1, 7, 11, 3)); }
existsIn
42,780
boolean (@NotNull GitVersion version) { return version.isLaterOrEqual(new GitVersion(1, 8, 3, 0)); }
existsIn
42,781
boolean (@NotNull GitVersion version) { return version.isLaterOrEqual(new GitVersion(1, 7, 2, 0)); }
existsIn
42,782
boolean (@NotNull GitVersion version) { return version.isLaterOrEqual(new GitVersion(2, 9, 0, 0)); }
existsIn
42,783
boolean (@NotNull GitVersion version) { return version.isLaterOrEqual(new GitVersion(2, 14, 0, 0)) && version.getType().equals(GitVersion.Type.MSYS); }
existsIn
42,784
boolean (@NotNull GitVersion version) { return version.isLaterOrEqual(new GitVersion(1, 9, 0, 0)); }
existsIn
42,785
boolean (@NotNull GitVersion version) { return !SystemInfo.isMac || version.isLaterOrEqual(new GitVersion(1, 8, 3, 3)); }
existsIn
42,786
boolean (@NotNull GitVersion version) { return version.isLaterOrEqual(new GitVersion(1, 8, 0, 0)); }
existsIn
42,787
boolean (@NotNull GitVersion version) { return version.isLaterOrEqual(new GitVersion(1, 8, 2, 0)); }
existsIn
42,788
boolean (@NotNull GitVersion version) { return version.isLaterOrEqual(new GitVersion(1, 8, 2, 0)); }
existsIn
42,789
boolean (@NotNull GitVersion version) { return version.isLaterOrEqual(new GitVersion(2, 9, 4, 0)); }
existsIn
42,790
boolean (@NotNull GitVersion version) { return version.isLaterOrEqual(new GitVersion(2, 9, 0, 0)); }
existsIn
42,791
boolean (@NotNull GitVersion version) { // before 2.8.0 git for windows expects to have LF symbol as line separator in standard input instead of CRLF return SystemInfo.isWindows && !version.isLaterOrEqual(new GitVersion(2, 8, 0, 0)); }
existsIn
42,792
boolean (@NotNull GitVersion version) { return version.isLaterOrEqual(new GitVersion(2, 1, 0, 0)); }
existsIn
42,793
boolean (@NotNull GitVersion version) { return version.isLaterOrEqual(new GitVersion(2, 15, 0, 0)); }
existsIn
42,794
boolean (@NotNull GitVersion version) { return version.isLaterOrEqual(new GitVersion(2, 0, 0, 0)); }
existsIn
42,795
boolean (@NotNull GitVersion version) { return version.isLaterOrEqual(new GitVersion(2, 11, 0, 0)); }
existsIn
42,796
boolean (@NotNull GitVersion version) { return version.isLaterOrEqual(new GitVersion(2, 2, 0, 0)); }
existsIn
42,797
boolean (@NotNull GitVersion version) { return version.isLaterOrEqual(new GitVersion(2, 22, 0, 0)); }
existsIn
42,798
boolean (@NotNull GitVersion version) { return version.isLaterOrEqual(new GitVersion(2, 16, 0, 0)); }
existsIn
42,799
boolean (@NotNull GitVersion version) { return version.isLaterOrEqual(new GitVersion(2, 18, 0, 0)); }
existsIn