Unnamed: 0
int64
0
305k
body
stringlengths
7
52.9k
name
stringlengths
1
185
68,700
String (@NotNull String path) { return path.contains("@") ? path + "@" : path; }
escape
68,701
boolean (@NotNull ValidationEvent event) { // Fail on exceptions, but not on other errors like "unexpected element" as sometimes we do not use all provided xml data. return event.getLinkedException() == null; }
handleEvent
68,702
File () { return new File(PathManager.getHomePath()); }
getHomeDirectory
68,703
char (@Nullable String type) { return !StringUtil.isEmpty(type) ? type.charAt(0) : ' '; }
getStatusChar
68,704
StatusType (@Nullable String type) { return getStatusType(getStatusChar(type)); }
getStatusType
68,705
StatusType (char first) { final StatusType contentsStatus; if ('A' == first) { contentsStatus = StatusType.STATUS_ADDED; } else if ('D' == first) { contentsStatus = StatusType.STATUS_DELETED; } else if ('U' == first) { contentsStatus = StatusType.CHANGED; } else if ('C' == first) { contentsStatus = StatusType.CONFLICTE...
getStatusType
68,706
File (@Nullable File file) { while (file != null) { if (file.exists() && file.isDirectory()) return file; file = file.getParentFile(); } return null; }
findExistingParent
68,707
File (@NotNull File file) { File result = findExistingParent(file); if (result == null) { LOG.error("Existing parent not found for " + file.getAbsolutePath()); } return Objects.requireNonNull(result); }
requireExistingParent
68,708
void (@NotNull Command command) { }
onStart
68,709
boolean (String line, Key outputType) { boolean result = doHandlePrompt(line, outputType); if (!result && mySkipOneLine) { LOG.debug("Skipped " + outputType + " line: " + line); mySkipOneLine = false; result = true; } return result; }
handlePrompt
68,710
boolean (@NotNull String data) { try { mySkipOneLine = true; myExecutor.write(data + LineSeparator.CRLF.getSeparatorString()); return true; } catch (SvnBindException e) { // TODO: handle this more carefully LOG.info(e); } return false; }
sendData
68,711
void () { myExecutor.destroyProcess( message("error.authentication.canceled.for.repository", myExecutor.getCommand().requireRepositoryUrl().toDecodedString())); }
cancelAuthentication
68,712
List<String> (@NotNull File file, boolean force) { List<String> parameters = new ArrayList<>(); CommandUtil.put(parameters, file); CommandUtil.put(parameters, force, "--force"); return parameters; }
prepareParameters
68,713
ProgressEvent (@NotNull File file, @NotNull EventAction action, @Nullable String error) { return new ProgressEvent(file, -1, null, null, action, error, null); }
createEvent
68,714
String () { return myComment; }
getComment
68,715
Date () { return myCreationDate; }
getCreationDate
68,716
Date () { return myExpirationDate; }
getExpirationDate
68,717
String () { return myOwner; }
getOwner
68,718
LogicalLock (boolean isLocal) { return new LogicalLock(isLocal, myOwner, myComment, myCreationDate, myExpirationDate); }
toLogicalLock
68,719
Builder (String token) { this.token = token; return this; }
setToken
68,720
Builder (String owner) { this.owner = owner; return this; }
setOwner
68,721
Builder (String comment) { this.comment = comment; return this; }
setComment
68,722
Builder (Date creationDate) { this.created = creationDate; return this; }
setCreationDate
68,723
Builder (@Nullable Date expirationDate) { this.expires = expirationDate; return this; }
setExpirationDate
68,724
Lock () { return new Lock(this); }
build
68,725
long () { return myRevisionNumber; }
getRevisionNumber
68,726
Revision () { return myRevision; }
getRevision
68,727
Date () { return myDate; }
getDate
68,728
long () { return revisionNumber; }
getRevisionNumber
68,729
String () { return author; }
getAuthor
68,730
Date () { return date; }
getDate
68,731
Builder (long revisionNumber) { this.revisionNumber = revisionNumber; return this; }
setRevisionNumber
68,732
Builder (String author) { this.author = author; return this; }
setAuthor
68,733
Builder (Date date) { this.date = date; return this; }
setDate
68,734
CommitInfo () { return new CommitInfo(this); }
build
68,735
String () { return myText; }
getText
68,736
CommitEventType (String text) { text = text.trim(); for (CommitEventType value : CommitEventType.values()) { if (value.getText().equals(text)) return value; } return null; }
create
68,737
RefreshableOnComponent (@NotNull CheckinProjectPanel commitPanel, @NotNull CommitContext commitContext) { return new KeepLocksComponent(mySvnVcs); }
createCommitOptions
68,738
String () { return null; }
getHelpId
68,739
void (@NotNull Collection<? extends FilePath> committables, String comment, List<VcsException> exception, @NotNull Set<? super String> feedback) { MultiMap<Pair<Url, WorkingCopyFormat>, FilePath> map = SvnUtil.splitIntoRepositoriesMap(mySvnVcs, committables, Convertor.self()); for (Map.Entry<Pair<Url, WorkingCopyFormat...
doCommit
68,740
Collection<FilePath> (@NotNull List<? extends Change> changes) { Set<FilePath> result = CollectionFactory.createCustomHashingStrategySet(ChangesUtil.CASE_SENSITIVE_FILE_PATH_HASHING_STRATEGY); ChangesUtil.getPaths(changes).forEach(path -> { if (result.add(path)) { addParents(result, path); } }); return result; }
getCommitables
68,741
void (@NotNull Collection<FilePath> paths, @NotNull FilePath path) { FilePath parent = path; while ((parent = parent.getParentPath()) != null && isAddedOrReplaced(parent)) { paths.add(parent); } }
addParents
68,742
boolean (@NotNull FilePath file) { Status status = getStatus(file); return status != null && status.is(StatusType.STATUS_ADDED, StatusType.STATUS_REPLACED); }
isAddedOrReplaced
68,743
Status (@NotNull FilePath file) { Status result = null; try { result = mySvnVcs.getFactory(file.getIOFile()).createStatusClient().doStatus(file.getIOFile(), false); } catch (SvnBindException e) { LOG.info(e); } return result; }
getStatus
68,744
String () { return SvnBundle.message("checkin.operation.name"); }
getCheckinOperationName
68,745
List<VcsException> (@NotNull List<? extends Change> changes, @NotNull String commitMessage, @NotNull CommitContext commitContext, @NotNull Set<? super String> feedback) { final List<VcsException> exception = new ArrayList<>(); final Collection<FilePath> committables = getCommitables(changes); final ProgressIndicator pr...
commit
68,746
List<VcsException> (@NotNull List<? extends FilePath> filePaths) { List<VcsException> exceptions = new ArrayList<>(); List<File> files = ChangesUtil.filePathsToFiles(filePaths); for (File file : files) { try { mySvnVcs.getFactory(file).createDeleteClient().delete(file, true, false, null); } catch (VcsException e) { exc...
scheduleMissingFileForDeletion
68,747
List<VcsException> (@NotNull List<? extends VirtualFile> files) { return scheduleUnversionedFilesForAddition(mySvnVcs, files); }
scheduleUnversionedFilesForAddition
68,748
List<VcsException> (@NotNull SvnVcs vcs, List<? extends VirtualFile> files) { return scheduleUnversionedFilesForAddition(vcs, files, false); }
scheduleUnversionedFilesForAddition
68,749
List<VcsException> (@NotNull SvnVcs vcs, List<? extends VirtualFile> files, final boolean recursive) { files.sort(FilePathComparator.getInstance()); ProgressTracker eventHandler = new SvnProgressCanceller() { @Override public void consume(ProgressEvent event) { // TODO: indicator is null here when invoking "Add" action...
scheduleUnversionedFilesForAddition
68,750
void (ProgressEvent event) { // TODO: indicator is null here when invoking "Add" action ProgressIndicator indicator = ProgressManager.getInstance().getProgressIndicator(); File file = event.getFile(); if (indicator != null && file != null) { indicator.setText(SvnBundle.message("progress.text2.adding", file.getName() + ...
consume
68,751
boolean () { return true; }
isRefreshAfterCommitNeeded
68,752
void (List<? extends File> list) { Collections.sort(list); }
sortAscending
68,753
boolean (File parent, File child) { // strict here will ensure that for case insensitive file systems paths different only by case will not be treated as ancestors // of each other which is what we need to perform renames from one case to another on Windows final boolean isAncestor = FileUtil.isAncestor(parent, child, ...
isAncestor
68,754
long () { return myCommittedRevision; }
getCommittedRevision
68,755
void (@NotNull File file) { myBase = file; }
setBaseDirectory
68,756
void (String line, Key outputType) { final String trim = line.trim(); if (ProcessOutputTypes.STDOUT.equals(outputType)) { try { parseLine(trim); } catch (SvnBindException e) { myException = e; } } }
onLineAvailable
68,757
File (@NotNull String path) { return SvnUtil.resolvePath(myBase, path); }
toFile
68,758
CheckinHandler (@NotNull CheckinProjectPanel panel, @NotNull CommitContext commitContext) { final Project project = panel.getProject(); return new CheckinHandler() { @Override public RefreshableOnComponent getBeforeCheckinConfigurationPanel() { return null; } @Override public ReturnResult beforeCheckin(@Nullable Commit...
createVcsHandler
68,759
RefreshableOnComponent () { return null; }
getBeforeCheckinConfigurationPanel
68,760
ReturnResult (@Nullable CommitExecutor executor, PairConsumer<Object, Object> additionalDataConsumer) { if (executor instanceof LocalCommitExecutor) return ReturnResult.COMMIT; final SvnVcs vcs = SvnVcs.getInstance(project); MultiMap<Url, WorkingCopyFormat> copiesInfo = splitIntoCopies(vcs, panel.getSelectedChanges());...
beforeCheckin
68,761
void () { if (SvnConfiguration.getInstance(project).isAutoUpdateAfterCommit()) { final VirtualFile[] roots = ProjectLevelVcsManager.getInstance(project).getRootsUnderVcs(SvnVcs.getInstance(project)); final List<FilePath> paths = new ArrayList<>(); for (VirtualFile root : roots) { boolean take = false; for (VirtualFile ...
checkinSuccessful
68,762
List<VirtualFile> () { return myDeletedFiles; }
getDeletedFiles
68,763
void (CommitEventType type, File target) { if (myProgress == null) return; myProgress.checkCanceled(); updateProgress(type, target.getPath()); }
commitEvent
68,764
void (long revNum) { if (myProgress == null) return; myProgress.checkCanceled(); myProgress.setText2(SvnBundle.message("status.text.committed.revision", revNum)); }
committedRevision
68,765
void (ProgressEvent event) { final String path = event.getPath(); if (path != null) { CommitEventType eventType = convert(event.getAction()); if (CommitEventType.deleting.equals(eventType) && myTrackDeletedFiles) { trackDeletedFile(event); } updateProgress(eventType, path); } }
consume
68,766
void (@NotNull CommitEventType type, @NotNull String target) { if (myProgress == null) return; if (CommitEventType.adding.equals(type)) { myProgress.setText2(SvnBundle.message("progress.text2.adding", target)); } else if (CommitEventType.deleting.equals(type)) { myProgress.setText2(SvnBundle.message("progress.text2.del...
updateProgress
68,767
void (@NotNull ProgressEvent event) { @NonNls final String filePath = "file://" + event.getFile().getAbsolutePath().replace(File.separatorChar, '/'); VirtualFile virtualFile = ReadAction.compute(() -> VirtualFileManager.getInstance().findFileByUrl(filePath)); if (virtualFile != null) { myDeletedFiles.add(virtualFile); ...
trackDeletedFile
68,768
CommitEventType (@NotNull EventAction action) { CommitEventType result = CommitEventType.unknown; if (EventAction.COMMIT_ADDED.equals(action)) { result = CommitEventType.adding; } else if (EventAction.COMMIT_DELETED.equals(action)) { result = CommitEventType.deleting; } else if (EventAction.COMMIT_MODIFIED.equals(actio...
convert
68,769
boolean () { return myIgnoreAllWhitespace; }
isIgnoreAllWhitespace
68,770
boolean () { return myIgnoreAmountOfWhitespace; }
isIgnoreAmountOfWhitespace
68,771
boolean () { return myIgnoreEOLStyle; }
isIgnoreEOLStyle
68,772
void () { final ProgressIndicator indicator = ProgressManager.getInstance().getProgressIndicator(); if (indicator != null) { indicator.setIndeterminate(true); } }
beforeCompare
68,773
void () { if (!success.isNull()) { String title = SvnBundle.message("compare.with.branch.diff.title"); String title1 = remoteTitleBuilder.toString(); String title2 = myVirtualFile.getPresentableUrl(); try { DiffContent content1 = DiffContentFactory.getInstance().createFromBytes(myProject, content.get(), myVirtualFile);...
showResult
68,774
String () { return SvnBundle.message("compare.with.branch.progress.loading.content"); }
getTitle
68,775
void () { new Task.Modal(myProject, getTitle(), true) { @Override public void run(@NotNull ProgressIndicator indicator) { try { beforeCompare(); myElementUrl = resolveElementUrl(); if (myElementUrl == null) { reportNotFound(); } else { compare(); } } catch (SvnBindException ex) { reportException(ex); } catch (VcsExcept...
run
68,776
void (@NotNull ProgressIndicator indicator) { try { beforeCompare(); myElementUrl = resolveElementUrl(); if (myElementUrl == null) { reportNotFound(); } else { compare(); } } catch (SvnBindException ex) { reportException(ex); } catch (VcsException ex) { reportGeneralException(ex); } }
run
68,777
void () { }
beforeCompare
68,778
void (final SvnBindException e) { if (e.contains(ErrorCode.RA_ILLEGAL_URL) || e.contains(ErrorCode.CLIENT_UNRELATED_RESOURCES) || e.contains(ErrorCode.RA_DAV_PATH_NOT_FOUND) || e.contains(ErrorCode.FS_NOT_FOUND) || e.contains(ErrorCode.ILLEGAL_TARGET)) { reportNotFound(); } else { reportGeneralException(e); } }
reportException
68,779
void (final Exception e) { WaitForProgressToShow.runOrInvokeLaterAboveProgress( () -> Messages .showMessageDialog(myProject, e.getMessage(), SvnBundle.message("compare.with.branch.error.title"), Messages.getErrorIcon()), null, myProject); LOG.info(e); }
reportGeneralException
68,780
void () { WaitForProgressToShow.runOrInvokeLaterAboveProgress(() -> Messages .showMessageDialog(myProject, SvnBundle .message("compare.with.branch.location.error", myVirtualFile.getPresentableUrl(), myBranchUrl.toDecodedString()), SvnBundle.message("compare.with.branch.error.title"), Messages.getErrorIcon()), null, myP...
reportNotFound
68,781
ClientFactory () { return getClientFactory(myVcs, virtualToIoFile(myVirtualFile)); }
getClientFactory
68,782
ClientFactory (@NotNull SvnVcs vcs, @NotNull File file) { // TODO: Fix for svn 1.7 and lower as svn 1.7 command line "--summarize" option for "diff" command does not support comparing working // TODO: copy directories with repository directories return vcs.getFactory(file); }
getClientFactory
68,783
void () { AbstractVcsHelper.getInstance(myProject).showWhatDiffersBrowser(changes, titleBuilder.toString()); }
showResult
68,784
String () { return message("dialog.title.computing.difference"); }
getTitle
68,785
void (@NotNull AnActionEvent e) { Project project = e.getRequiredData(CommonDataKeys.PROJECT); VirtualFile file = e.getRequiredData(CommonDataKeys.VIRTUAL_FILE); SelectBranchPopup.show(project, file, (p, configuration, url, revision) -> { ElementWithBranchComparer comparer = file.isDirectory() ? new DirectoryWithBranch...
actionPerformed
68,786
ActionUpdateThread () { return ActionUpdateThread.BGT; }
getActionUpdateThread
68,787
void (@NotNull AnActionEvent e) { Project project = e.getData(CommonDataKeys.PROJECT); VirtualFile file = e.getData(CommonDataKeys.VIRTUAL_FILE); e.getPresentation().setEnabled(project != null && file != null && VcsUtil.isFileForVcs(file, project, SvnVcs.getInstance(project)) && AbstractVcs.fileInVcsByFileStatus(projec...
update
68,788
ContentRevision (@NotNull FilePath path, @NotNull FilePath localPath, @NotNull Revision revision, @NotNull FileStatus status) { ContentRevision result; if (path.isNonLocal()) { // explicitly use local path for deleted items - so these items will be correctly displayed as deleted under local working copy node // and not...
createRevision
68,789
FilePath (@NotNull Target target, boolean isDirectory) { return target.isFile() ? VcsUtil.getFilePath(target.getFile(), isDirectory) : VcsUtil.getFilePathOnNonLocal(SvnUtil.toDecodedString(target), isDirectory); }
createFilePath
68,790
Change (@NotNull final FileStatus status, @Nullable final ContentRevision beforeRevision, @Nullable final ContentRevision afterRevision) { // isRenamed() and isMoved() are always false here not to have text like "moved from ..." in changes window - by default different // paths in before and after revisions are treated...
createChange
68,791
boolean () { return false; }
isRenamed
68,792
boolean () { return false; }
isMoved
68,793
StatusType (@NotNull String code) { StatusType result = StatusType.forStatusOperation(code); if (result == null) { LOG.info("Unknown status type " + code); } return result; }
getStatus
68,794
boolean () { return kind.isDirectory(); }
isDirectory
68,795
void (@NotNull AnnotationConsumer handler, @NotNull LineEntry entry) { if (entry.commit != null) { // line numbers in our api start from 0 - not from 1 like in svn output handler.consume(entry.lineNumber - 1, entry.commit.build(), entry.mergedCommit()); } }
invokeHandler
68,796
CommitInfo () { return merged != null && merged.commit != null ? merged.commit.build() : null; }
mergedCommit
68,797
void (SvnRevisionNumber number) { ShowAllAffectedGenericAction.showSubmittedFiles(myVcs.getProject(), number, myCurrentFile, SvnVcs.getKey(), null, false); }
showAllAffectedPaths
68,798
VirtualFile () { return myCurrentFile; }
getFile
68,799
void (File ioFile, Info info, @NotNull SvnBindException e, @NotNull VirtualFile file, @NotNull SvnRevisionNumber revisionNumber, FileAnnotation @NotNull [] annotation, VcsException @NotNull [] exception) { // TODO: Check how this scenario could be reproduced by user and what changes needs to be done for command line cl...
handleSvnException