Unnamed: 0
int64
0
305k
body
stringlengths
7
52.9k
name
stringlengths
1
185
42,100
boolean (@NotNull String branchName) { return myNameValidator.checkInput(branchName); }
isBranchNameValid
42,101
String (@NotNull String suggestedName) { return myNameValidator.cleanUpBranchName(suggestedName); }
cleanUpBranchName
42,102
boolean () { return false; }
isRemote
42,103
int (GitReference o) { if (o instanceof GitLocalBranch) { // optimization: do not build getFullName return StringUtil.compare(myName, o.myName, SystemInfo.isFileSystemCaseSensitive); } return super.compareTo(o); }
compareTo
42,104
String (@NotNull GitRemote remote, @NotNull String nameAtRemote) { return remote.getName() + "/" + nameAtRemote; }
formStandardName
42,105
GitRemote () { return myRemote; }
getRemote
42,106
boolean (Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; if (!super.equals(o)) return false; GitStandardRemoteBranch branch = (GitStandardRemoteBranch)o; if (!myNameAtRemote.equals(branch.myNameAtRemote)) return false; if (!myRemote.equals(branch.myRemote)) return fals...
equals
42,107
int () { int result = super.hashCode(); result = 31 * result + myRemote.hashCode(); result = 31 * result + myNameAtRemote.hashCode(); return result; }
hashCode
42,108
String () { return myNameAtRemote; }
getNameForRemoteOperations
42,109
String () { return myName; }
getNameForLocalOperations
42,110
int (GitReference o) { if (o instanceof GitStandardRemoteBranch) { // optimization: do not build getFullName return StringUtil.compare(myName, o.myName, SystemInfo.isFileSystemCaseSensitive); } return super.compareTo(o); }
compareTo
42,111
String () { return getFullName(); }
toString
42,112
boolean (Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; GitReference reference = (GitReference)o; return BRANCH_NAME_HASHING_STRATEGY.equals(myName, reference.myName); }
equals
42,113
int () { return BRANCH_NAME_HASHING_STRATEGY.hashCode(myName); }
hashCode
42,114
int (GitReference o) { // NB: update overridden comparators on modifications return o == null ? 1 : StringUtil.compare(getFullName(), o.getFullName(), SystemInfo.isFileSystemCaseSensitive); }
compareTo
42,115
String () { return REFS_TAGS_PREFIX + myName; }
getFullName
42,116
int (GitReference o) { if (o instanceof GitTag) { // optimization: do not build getFullName return StringUtil.compare(myName, o.myName, SystemInfo.isFileSystemCaseSensitive); } return super.compareTo(o); }
compareTo
42,117
GitVcs (@NotNull Project project) { GitVcs gitVcs = (GitVcs)ProjectLevelVcsManager.getInstance(project).findVcsByName(NAME); return Objects.requireNonNull(gitVcs); }
getInstance
42,118
ReadWriteLock () { return myCommandLock; }
getCommandLock
42,119
void (Task.Backgroundable task) { task.queue(); }
runInBackground
42,120
CommittedChangesProvider () { return myProject.getService(GitCommittedChangeListProvider.class); }
getCommittedChangesProvider
42,121
String () { // return the full commit hash pattern, possibly other revision formats should be supported as well return "[0-9a-fA-F]+"; }
getRevisionPattern
42,122
MergeProvider () { return GitMergeProvider.detect(myProject); }
getMergeProvider
42,123
RollbackEnvironment () { return myProject.getService(GitRollbackEnvironment.class); }
getRollbackEnvironment
42,124
GitHistoryProvider () { return myProject.getService(GitHistoryProvider.class); }
getVcsHistoryProvider
42,125
GitHistoryProvider () { return myProject.getService(GitHistoryProvider.class); }
getVcsBlockHistoryProvider
42,126
String () { return DISPLAY_NAME.get(); }
getDisplayName
42,127
AnnotationProviderEx () { return myProject.getService(GitAnnotationProvider.class); }
getAnnotationProvider
42,128
DiffProvider () { return myProject.getService(GitDiffProvider.class); }
getDiffProvider
42,129
boolean (VirtualFile dir) { return dir.isDirectory() && GitUtil.isUnderGit(dir); }
isVersionedDirectory
42,130
void () { Disposable disposable = Disposer.newDisposable(); myDisposable = disposable; BackgroundTaskUtil.executeOnPooledThread(disposable, () -> GitExecutableManager.getInstance().testGitExecutableVersionValid(myProject)); myVFSListener = GitVFSListener.createInstance(this, disposable); // make sure to read the regist...
activate
42,131
void () { myVFSListener = null; if (myDisposable != null) { Disposer.dispose(myDisposable); myDisposable = null; } }
deactivate
42,132
void (@NotNull List<? extends VcsException> list, @NotNull @Nls String action) { if (list.size() > 0) { @Nls StringBuilder buffer = new StringBuilder(); buffer.append("\n"); buffer.append(GitBundle.message("error.list.title", action)); for (final VcsException exception : list) { buffer.append("\n"); buffer.append(excep...
showErrors
42,133
GitVersion () { return GitExecutableManager.getInstance().getVersion(myProject); }
getVersion
42,134
boolean () { return true; }
allowsNestedRoots
42,135
VcsKey () { return ourKey; }
getKey
42,136
VcsType () { return VcsType.distributed; }
getType
42,137
VcsOutgoingChangesProvider<CommittedChangeList> () { return myProject.getService(GitOutgoingChangesProvider.class); }
getOutgoingProviderImpl
42,138
RemoteDifferenceStrategy () { return RemoteDifferenceStrategy.ASK_TREE_PROVIDER; }
getRemoteDifferenceStrategy
42,139
List<CommitExecutor> () { if (myProject.isDefault()) return Collections.emptyList(); return Collections.singletonList(myProject.getService(GitCommitAndPushExecutor.class)); }
getCommitExecutors
42,140
GitExecutableValidator () { return new GitExecutableValidator(myProject); }
getExecutableValidator
42,141
boolean () { return false; }
fileListenerIsSynchronous
42,142
void (@Nullable VirtualFile targetDirectory) { new Task.Backgroundable(myProject, GitBundle.message("progress.title.enabling.git"), true) { @Override public void run(@NotNull ProgressIndicator indicator) { new GitIntegrationEnabler(GitVcs.this, targetDirectory).detectAndEnable(); } }.queue(); }
enableIntegration
42,143
void (@NotNull ProgressIndicator indicator) { new GitIntegrationEnabler(GitVcs.this, targetDirectory).detectAndEnable(); }
run
42,144
CheckoutProvider () { return new GitCheckoutProvider(); }
getCheckoutProvider
42,145
boolean () { return true; }
arePartialChangelistsSupported
42,146
GitVFSListener () { return myVFSListener; }
getVFSListener
42,147
boolean () { return true; }
needsCaseSensitiveDirtyScope
42,148
VcsDirtyScopeBuilder () { return new GitVcsDirtyScope(myProject); }
createDirtyScope
42,149
boolean () { return true; }
isWithCustomMenu
42,150
boolean () { return GitVcsApplicationSettings.getInstance().isStagingAreaEnabled() && GitStageManagerKt.canEnableStagingArea(); }
isWithCustomLocalChanges
42,151
boolean () { return GitStashContentProviderKt.stashToolWindowRegistryOption().asBoolean(); }
isWithCustomShelves
42,152
FilePath () { return myPath; }
getPath
42,153
VcsRevisionNumber () { return myRevision; }
getRevisionNumber
42,154
Date () { return myRevision.getTimestamp(); }
getRevisionDate
42,155
int (VcsFileRevision rev) { if (rev instanceof GitFileRevision) return myRevision.compareTo(((GitFileRevision)rev).myRevision); return getRevisionDate().compareTo(rev.getRevisionDate()); }
compareTo
42,156
String () { return myPath.getName() + ":" + myRevision.getShortRev(); }
toString
42,157
Collection<String> () { return myParents; }
getParents
42,158
String () { return myRevision.getRev(); }
getHash
42,159
boolean () { return myIsDeleted; }
isDeleted
42,160
boolean (@NotNull Project project, @NotNull MultiMap<Pair<GitRevisionNumber, VirtualFile>, FilePath> map, @Nullable ContentRevision revision) { if (revision == null) return true; if (!(revision instanceof GitContentRevision)) return false; FilePath filePath = revision.getFile(); GitRevisionNumber number = (GitRevisionN...
putRevision
42,161
void () { }
dispose
42,162
GitDisposable (Project project) { return project.getService(GitDisposable.class); }
getInstance
42,163
String () { return (isRemote() ? REFS_REMOTES_PREFIX : REFS_HEADS_PREFIX) + myName; }
getFullName
42,164
String () { return getFullName(); }
getNameForRemoteOperations
42,165
String () { return getFullName(); }
getNameForLocalOperations
42,166
GitRemote () { return GitRemote.DOT; }
getRemote
42,167
String () { return getName(); }
getFullName
42,168
void (@NotNull DialogWrapper dialog) { dialogManager().showDialog(dialog); }
show
42,169
int (final @NotNull @DialogMessage String message, final @NotNull @DialogTitle String title, final String @NotNull @Button [] options, final int defaultButtonIndex, final int focusedButtonIndex, final @Nullable Icon icon, final @Nullable DialogWrapper.DoNotAskOption dontAskOption) { return dialogManager().showMessageDi...
showMessage
42,170
int (@NotNull Project project, @NotNull @DialogMessage String message, @NotNull @DialogTitle String title, @NotNull @Button String okButtonText, @NotNull @Button String cancelButtonText, @Nullable Icon icon) { return dialogManager().showMessageDialog(project, message, title, new String[]{okButtonText, cancelButtonText}...
showOkCancelDialog
42,171
int (@NotNull Project project, @NotNull @DialogMessage String message, @NotNull @DialogTitle String title, @NotNull @Button String yesButtonText, @NotNull @Button String noButtonText, @NotNull @Button String cancelButtonText, @Nullable Icon icon) { return dialogManager() .showMessageDialog(project, message, title, new ...
showYesNoCancelDialog
42,172
void (@NotNull DialogWrapper dialog) { dialog.show(); }
showDialog
42,173
int (@NotNull Project project, @NotNull @DialogMessage String message, @NotNull @DialogTitle String title, String @NotNull @Button [] options, int defaultButtonIndex, @Nullable Icon icon) { return Messages.showDialog(project, message, title, options, defaultButtonIndex, icon); }
showMessageDialog
42,174
int (@NotNull Project project, @NotNull @DialogMessage String message, @NotNull @DialogTitle String title, String @NotNull @Button [] options, int defaultButtonIndex, int focusedButtonIndex, @Nullable Icon icon) { return Messages.showDialog(project, message, title, null, options, defaultButtonIndex, focusedButtonIndex,...
showMessageDialog
42,175
int (@NotNull @DialogMessage String message, @NotNull @DialogTitle String title, String @NotNull @Button [] options, int defaultButtonIndex, int focusedButtonIndex, @Nullable Icon icon, @Nullable DialogWrapper.DoNotAskOption dontAskOption) { return Messages.showDialog(message, title, options, defaultButtonIndex, focuse...
showMessageDialog
42,176
DialogManager () { return ApplicationManager.getApplication().getService(DialogManager.class); }
dialogManager
42,177
FilePath () { return myFile; }
getFile
42,178
VcsRevisionNumber () { return myRevision; }
getRevisionNumber
42,179
boolean (Object obj) { if (this == obj) return true; if (obj == null || obj.getClass() != getClass()) return false; GitContentRevision test = (GitContentRevision)obj; return myFile.equals(test.myFile) && myRevision.equals(test.myRevision); }
equals
42,180
int () { return myFile.hashCode() + myRevision.hashCode(); }
hashCode
42,181
ContentRevision (@NotNull FilePath filePath, @Nullable VcsRevisionNumber revisionNumber, @NotNull Project project) { if (revisionNumber == null) { File file = filePath.getIOFile(); VirtualFile virtualFile = LocalFileSystem.getInstance().refreshAndFindFileByIoFile(file); if (virtualFile != null) filePath = VcsUtil.getFi...
createRevisionForTypeChange
42,182
FilePath (@NotNull VirtualFile vcsRoot, @NotNull String unescapedPath) { return createPath(vcsRoot, unescapedPath, false); }
createPath
42,183
FilePath (@NotNull VirtualFile vcsRoot, @NotNull String unescapedPath, boolean isDirectory) { String absolutePath = makeAbsolutePath(vcsRoot, unescapedPath); return VcsUtil.getFilePath(absolutePath, isDirectory); }
createPath
42,184
String (@NotNull VirtualFile vcsRoot, @NotNull String unescapedPath) { return vcsRoot.getPath() + "/" + unescapedPath; }
makeAbsolutePath
42,185
ContentRevision (@NotNull FilePath filePath, @Nullable VcsRevisionNumber revisionNumber, @NotNull Project project) { return createRevision(filePath, revisionNumber, project, null); }
createRevision
42,186
ContentRevision (@NotNull FilePath filePath, @Nullable VcsRevisionNumber revisionNumber, @NotNull Project project, @Nullable Charset charset) { GitSubmodule submodule = getRepositoryIfSubmodule(project, filePath); if (revisionNumber != null && revisionNumber != VcsRevisionNumber.NULL) { if (submodule != null) { return ...
createRevision
42,187
String () { return myFile.getPath(); }
toString
42,188
JTextField (JComboBox comboBox) { return (JTextField)comboBox.getEditor().getEditorComponent(); }
getTextField
42,189
void (final @NotNull Project project, final @NotNull List<? extends VirtualFile> roots, final @Nullable VirtualFile defaultRoot, final @NotNull JComboBox gitRootChooser, final @Nullable JLabel currentBranchLabel) { for (VirtualFile root : roots) { gitRootChooser.addItem(root); } gitRootChooser.setRenderer(SimpleListCel...
setupRootChooser
42,190
void (final ActionEvent e) { VirtualFile root = (VirtualFile)gitRootChooser.getSelectedItem(); assert root != null : "The root must not be null"; GitRepository repo = GitUtil.getRepositoryManager(project).getRepositoryForRootQuick(root); assert repo != null : "The repository must not be null"; GitBranch current = repo....
actionPerformed
42,191
void (final Project project, final VcsException ex, final @Nls @NotNull String operation) { showOperationError(project, operation, ex.getMessage()); }
showOperationError
42,192
void (final Project project, final Collection<? extends VcsException> exs, final @Nls @NotNull String operation) { if (exs.size() == 1) { showOperationError(project, operation, exs.iterator().next().getMessage()); } else if (exs.size() > 1) { // TODO use dialog in order to show big messages StringBuilder b = new String...
showOperationErrors
42,193
void (final Project project, final String operation, final @Nls String message) { Messages.showErrorDialog(project, message, GitBundle.message("error.occurred.during", operation)); }
showOperationError
42,194
void (final JCheckBox first, final boolean firstState, final JCheckBox second, final boolean secondState) { ActionListener l = new ActionListener() { /** * One way check for the condition * @param checked the first to check * @param checkedState the state to match * @param changed the changed control * @param impliedSt...
exclusive
42,195
void (final JCheckBox checked, final boolean checkedState, final JCheckBox changed, final boolean impliedState) { if (checked.isSelected() == checkedState) { changed.setSelected(impliedState); changed.setEnabled(false); } else { changed.setEnabled(true); } }
check
42,196
void (ActionEvent e) { check(first, firstState, second, !secondState); check(second, secondState, first, !firstState); }
actionPerformed
42,197
String (String s) { return surround(s, "b"); }
bold
42,198
String (String s) { return surround(s, "code"); }
code
42,199
String (String s, String tag) { return String.format("<%2$s>%1$s</%2$s>", s, tag); }
surround