nus-yam/ex-repair huggingface dataset:
Program: 52770
Project: 52770
Buggy source:
private void addMessages(ChangeInfo changeInfo,StringBuilder sb){
  if (changeInfo.messages != null && changeInfo.messages.size() > 0) {
    sb.append("String_Node_Str");
    for (    ChangeMessageInfo changeMessageInfo : changeInfo.messages) {
      AccountInfo author=changeMessageInfo.author;
      if (author != null && author.name != null) {
        sb.append("String_Node_Str").append(author.name).append("String_Node_Str");
        if (changeMessageInfo.date != null) {
          sb.append("String_Node_Str").append(DateFormatUtil.formatPrettyDateTime(changeMessageInfo.date)).append(')');
        }
        sb.append("String_Node_Str");
      }
      sb.append(TextToHtml.textToHtml(changeMessageInfo.message)).append("String_Node_Str");
    }
    sb.append("String_Node_Str");
  }
}

Fixed version (ground truth):
private void addMessages(ChangeInfo changeInfo,StringBuilder sb){
  if (changeInfo.messages != null && !changeInfo.messages.isEmpty()) {
    sb.append("String_Node_Str");
    for (    ChangeMessageInfo changeMessageInfo : changeInfo.messages) {
      AccountInfo author=changeMessageInfo.author;
      if (author != null && author.name != null) {
        sb.append("String_Node_Str").append(author.name).append("String_Node_Str");
        if (changeMessageInfo.date != null) {
          sb.append("String_Node_Str").append(DateFormatUtil.formatPrettyDateTime(changeMessageInfo.date)).append(')');
        }
        sb.append("String_Node_Str");
      }
      sb.append(TextToHtml.textToHtml(changeMessageInfo.message)).append("String_Node_Str");
    }
    sb.append("String_Node_Str");
  }
}
Program: 52771
Project: 52771
Buggy source:
private static String getNumber(ChangeInfo change){
  return "String_Node_Str" + change._number;
}

Fixed version (ground truth):
private static String getNumber(ChangeInfo change){
  return Integer.toString(change._number);
}
Program: 52774
Project: 52774
Buggy source:
@NotNull protected Action[] createActions(){
  return new Action[]{getOKAction(),getCancelAction(),getHelpAction()};
}

Fixed version (ground truth):
@Override @NotNull protected Action[] createActions(){
  return new Action[]{getOKAction(),getCancelAction(),getHelpAction()};
}
Program: 52775
Project: 52775
Buggy source:
private String buildBranchName(ChangeInfo changeDetails){
  RevisionInfo revisionInfo=changeDetails.revisions.get(selectedRevisions.get(changeDetails));
  String topic=changeDetails.topic;
  if (topic == null) {
    topic="String_Node_Str" + changeDetails._number;
  }
  String branchName="String_Node_Str" + changeDetails.owner.name.toLowerCase().replace("String_Node_Str","String_Node_Str").replace("String_Node_Str","String_Node_Str") + '/'+ topic;
  if (revisionInfo._number != changeDetails.revisions.size()) {
    branchName+="String_Node_Str" + revisionInfo._number;
  }
  return branchName;
}

Fixed version (ground truth):
private String buildBranchName(ChangeInfo changeDetails){
  RevisionInfo revisionInfo=changeDetails.revisions.get(selectedRevisions.get(changeDetails));
  String topic=changeDetails.topic;
  if (topic == null) {
    topic=Integer.toString(changeDetails._number);
  }
  String branchName="String_Node_Str" + changeDetails.owner.name.toLowerCase().replace("String_Node_Str","String_Node_Str").replace("String_Node_Str","String_Node_Str") + '/'+ topic;
  if (revisionInfo._number != changeDetails.revisions.size()) {
    branchName+="String_Node_Str" + revisionInfo._number;
  }
  return branchName;
}
Program: 52776
Project: 52776
Buggy source:
public String getLongCommitMessage(){
  return String.format(PATTERN,getParentLine(),gitCommit.getAuthor().getName(),gitCommit.getAuthor().getEmail(),DATE_FORMAT.format(new Date(gitCommit.getAuthorTime())),gitCommit.getCommitter().getName(),gitCommit.getCommitter().getEmail(),DATE_FORMAT.format(gitCommit.getCommitTime()),gitCommit.getFullMessage());
}

Fixed version (ground truth):
public String getLongCommitMessage(){
  return String.format(PATTERN,getParentLine(),gitCommit.getAuthor().getName(),gitCommit.getAuthor().getEmail(),DATE_FORMAT.get().format(new Date(gitCommit.getAuthorTime())),gitCommit.getCommitter().getName(),gitCommit.getCommitter().getEmail(),DATE_FORMAT.get().format(gitCommit.getCommitTime()),gitCommit.getFullMessage());
}
Program: 52777
Project: 52777
Buggy source:
public void requestFocus(){
  IdeFocusManager.findInstanceByComponent(reviewTextField).requestFocus(reviewTextField,true);
}

Fixed version (ground truth):
@Override public void requestFocus(){
  IdeFocusManager.findInstanceByComponent(reviewTextField).requestFocus(reviewTextField,true);
}
Program: 52778
Project: 52778
Buggy source:
public CommentableDiffPanel(Window window,DiffRequest request,ChangeInfo changeInfo,String selectedRevisionId,Optional<Pair<String,RevisionInfo>> baseRevision){
  super(window,request.getProject(),true,true,DiffManagerImpl.FULL_DIFF_DIVIDER_POLYGONS_OFFSET,CommentsDiffTool.this);
  this.changeInfo=changeInfo;
  this.selectedRevisionId=selectedRevisionId;
  this.baseRevision=baseRevision;
}

Fixed version (ground truth):
private CommentableDiffPanel(Window window,DiffRequest request,ChangeInfo changeInfo,String selectedRevisionId,Optional<Pair<String,RevisionInfo>> baseRevision){
  super(window,request.getProject(),true,true,DiffManagerImpl.FULL_DIFF_DIVIDER_POLYGONS_OFFSET,CommentsDiffTool.this);
  this.changeInfo=changeInfo;
  this.selectedRevisionId=selectedRevisionId;
  this.baseRevision=baseRevision;
}
Program: 52779
Project: 52779
Buggy source:
public static RangeHighlighter highlightRangeComment(Comment.Range range,Editor editor,Project project){
  CharSequence charsSequence=editor.getMarkupModel().getDocument().getCharsSequence();
  RangeUtils.Offset offset=RangeUtils.rangeToTextOffset(charsSequence,range);
  TextAttributes attributes=new TextAttributes();
  attributes.setBackgroundColor(JBColor.YELLOW);
  ArrayList<RangeHighlighter> highlighters=Lists.newArrayList();
  HighlightManager highlightManager=HighlightManager.getInstance(project);
  highlightManager.addRangeHighlight(editor,offset.start,offset.end,attributes,false,highlighters);
  return highlighters.get(0);
}

Fixed version (ground truth):
private static RangeHighlighter highlightRangeComment(Comment.Range range,Editor editor,Project project){
  CharSequence charsSequence=editor.getMarkupModel().getDocument().getCharsSequence();
  RangeUtils.Offset offset=RangeUtils.rangeToTextOffset(charsSequence,range);
  TextAttributes attributes=new TextAttributes();
  attributes.setBackgroundColor(JBColor.YELLOW);
  ArrayList<RangeHighlighter> highlighters=Lists.newArrayList();
  HighlightManager highlightManager=HighlightManager.getInstance(project);
  highlightManager.addRangeHighlight(editor,offset.start,offset.end,attributes,false,highlighters);
  return highlighters.get(0);
}
Program: 52780
Project: 52780
Buggy source:
@Override @Nullable public String getSearchQueryPart(){
  if (value.isPresent()) {
    if (value.get().forQuery.isPresent()) {
      return String.format("String_Node_Str",value.get().forQuery.get());
    }
 else {
      return queryForAll.get();
    }
  }
 else {
    return null;
  }
}

Fixed version (ground truth):
@Override @Nullable public String getSearchQueryPart(){
  if (value.isPresent()) {
    if (value.get().forQuery.isPresent()) {
      return String.format("String_Node_Str",value.get().forQuery.get());
    }
 else {
      return QUERY_FOR_ALL.get();
    }
  }
 else {
    return null;
  }
}
Program: 52781
Project: 52781
Buggy source:
@Override protected void createActions(Consumer<AnAction> actionConsumer){
  for (  final Status status : statuses) {
    actionConsumer.consume(new DumbAwareAction(status.label){
      @Override public void actionPerformed(      AnActionEvent e){
        value=Optional.of(status);
        updateFilterValueLabel(status.label);
        setChanged();
        notifyObservers(project);
      }
    }
);
  }
}

Fixed version (ground truth):
@Override protected void createActions(Consumer<AnAction> actionConsumer){
  for (  final Status status : STATUSES) {
    actionConsumer.consume(new DumbAwareAction(status.label){
      @Override public void actionPerformed(      AnActionEvent e){
        value=Optional.of(status);
        updateFilterValueLabel(status.label);
        setChanged();
        notifyObservers(project);
      }
    }
);
  }
}
Program: 52782
Project: 52782
Buggy source:
@Override public String get(){
  Set<String> queryForAll=Sets.newHashSet();
  for (  Status status : statuses) {
    if (status.forQuery.isPresent()) {
      queryForAll.add(String.format("String_Node_Str",status.forQuery.get()));
    }
  }
  return String.format("String_Node_Str",Joiner.on("String_Node_Str").join(queryForAll));
}

Fixed version (ground truth):
@Override public String get(){
  Set<String> queryForAll=Sets.newHashSet();
  for (  Status status : STATUSES) {
    if (status.forQuery.isPresent()) {
      queryForAll.add(String.format("String_Node_Str",status.forQuery.get()));
    }
  }
  return String.format("String_Node_Str",Joiner.on("String_Node_Str").join(queryForAll));
}
Program: 52783
Project: 52783
Buggy source:
public StatusFilter(){
  value=Optional.of(statuses.get(1));
}

Fixed version (ground truth):
public StatusFilter(){
  value=Optional.of(STATUSES.get(1));
}
Program: 52784
Project: 52784
Buggy source:
/** 
 * Load the next page of changes into the provided consumer
 */
public void getNextPage(final Consumer<List<ChangeInfo>> consumer){
  if (hasMore) {
    lock.lock();
    Changes.QueryRequest myRequest=queryRequest.withLimit(PAGE_SIZE).withStart(changes.size());
    if (sortkey != null) {
      myRequest.withSortkey(sortkey);
    }
    Consumer<List<ChangeInfo>> myConsumer=new Consumer<List<ChangeInfo>>(){
      @Override public void consume(      List<ChangeInfo> changeInfos){
        if (changeInfos != null && !changeInfos.isEmpty()) {
          ChangeInfo lastChangeInfo=Iterables.getLast(changeInfos);
          hasMore=lastChangeInfo._moreChanges != null && lastChangeInfo._moreChanges;
          sortkey=lastChangeInfo._sortkey;
          changes.addAll(changeInfos);
          consumer.consume(changeInfos);
        }
 else {
          hasMore=false;
        }
        lock.unlock();
      }
    }
;
    gerritUtil.getChanges(myRequest,project,myConsumer);
  }
}

Fixed version (ground truth):
/** 
 * Load the next page of changes into the provided consumer
 */
public void getNextPage(final Consumer<List<ChangeInfo>> consumer){
  if (hasMore) {
    lock.lock();
    Changes.QueryRequest myRequest=queryRequest.withLimit(PAGE_SIZE).withStart(changes.size());
    if (sortkey != null) {
      myRequest.withSortkey(sortkey);
    }
    Consumer<List<ChangeInfo>> myConsumer=new Consumer<List<ChangeInfo>>(){
      @Override public void consume(      List<ChangeInfo> changeInfos){
        if (changeInfos != null && !changeInfos.isEmpty()) {
          ChangeInfo lastChangeInfo=Iterables.getLast(changeInfos);
          hasMore=lastChangeInfo._moreChanges != null && lastChangeInfo._moreChanges;
          sortkey=lastChangeInfo._sortkey;
          changes.addAll(changeInfos);
        }
 else {
          hasMore=false;
        }
        consumer.consume(changeInfos);
        lock.unlock();
      }
    }
;
    gerritUtil.getChanges(myRequest,project,myConsumer);
  }
}
Program: 52785
Project: 52785
Buggy source:
@Override public void consume(List<ChangeInfo> changeInfos){
  if (changeInfos != null && !changeInfos.isEmpty()) {
    ChangeInfo lastChangeInfo=Iterables.getLast(changeInfos);
    hasMore=lastChangeInfo._moreChanges != null && lastChangeInfo._moreChanges;
    sortkey=lastChangeInfo._sortkey;
    changes.addAll(changeInfos);
    consumer.consume(changeInfos);
  }
 else {
    hasMore=false;
  }
  lock.unlock();
}

Fixed version (ground truth):
@Override public void consume(List<ChangeInfo> changeInfos){
  if (changeInfos != null && !changeInfos.isEmpty()) {
    ChangeInfo lastChangeInfo=Iterables.getLast(changeInfos);
    hasMore=lastChangeInfo._moreChanges != null && lastChangeInfo._moreChanges;
    sortkey=lastChangeInfo._sortkey;
    changes.addAll(changeInfos);
  }
 else {
    hasMore=false;
  }
  consumer.consume(changeInfos);
  lock.unlock();
}
Program: 52786
Project: 52786
Buggy source:
/** 
 * Load the next page of changes into the provided consumer
 */
public void getNextPage(final Consumer<List<ChangeInfo>> consumer){
  if (hasMore) {
    lock.lock();
    Changes.QueryRequest myRequest=queryRequest.withLimit(PAGE_SIZE).withStart(changes.size());
    if (sortkey != null) {
      myRequest.withSortkey(sortkey);
    }
    Consumer<List<ChangeInfo>> myConsumer=new Consumer<List<ChangeInfo>>(){
      @Override public void consume(      List<ChangeInfo> changeInfos){
        if (changeInfos != null && !changeInfos.isEmpty()) {
          ChangeInfo lastChangeInfo=Iterables.getLast(changeInfos);
          hasMore=lastChangeInfo._moreChanges != null && lastChangeInfo._moreChanges;
          sortkey=lastChangeInfo._sortkey;
          changes.addAll(changeInfos);
          consumer.consume(changeInfos);
        }
 else {
          hasMore=false;
        }
        lock.unlock();
      }
    }
;
    gerritUtil.getChanges(myRequest,project,myConsumer);
  }
}

Fixed version (ground truth):
/** 
 * Load the next page of changes into the provided consumer
 */
public void getNextPage(final Consumer<List<ChangeInfo>> consumer){
  if (hasMore) {
    lock.lock();
    Changes.QueryRequest myRequest=queryRequest.withLimit(PAGE_SIZE).withStart(changes.size());
    if (sortkey != null) {
      myRequest.withSortkey(sortkey);
    }
    Consumer<List<ChangeInfo>> myConsumer=new Consumer<List<ChangeInfo>>(){
      @Override public void consume(      List<ChangeInfo> changeInfos){
        if (changeInfos != null && !changeInfos.isEmpty()) {
          ChangeInfo lastChangeInfo=Iterables.getLast(changeInfos);
          hasMore=lastChangeInfo._moreChanges != null && lastChangeInfo._moreChanges;
          sortkey=lastChangeInfo._sortkey;
          changes.addAll(changeInfos);
        }
 else {
          hasMore=false;
        }
        consumer.consume(changeInfos);
        lock.unlock();
      }
    }
;
    gerritUtil.getChanges(myRequest,project,myConsumer);
  }
}
Program: 52787
Project: 52787
Buggy source:
@Override public void consume(List<ChangeInfo> changeInfos){
  if (changeInfos != null && !changeInfos.isEmpty()) {
    ChangeInfo lastChangeInfo=Iterables.getLast(changeInfos);
    hasMore=lastChangeInfo._moreChanges != null && lastChangeInfo._moreChanges;
    sortkey=lastChangeInfo._sortkey;
    changes.addAll(changeInfos);
    consumer.consume(changeInfos);
  }
 else {
    hasMore=false;
  }
  lock.unlock();
}

Fixed version (ground truth):
@Override public void consume(List<ChangeInfo> changeInfos){
  if (changeInfos != null && !changeInfos.isEmpty()) {
    ChangeInfo lastChangeInfo=Iterables.getLast(changeInfos);
    hasMore=lastChangeInfo._moreChanges != null && lastChangeInfo._moreChanges;
    sortkey=lastChangeInfo._sortkey;
    changes.addAll(changeInfos);
  }
 else {
    hasMore=false;
  }
  consumer.consume(changeInfos);
  lock.unlock();
}
Program: 52788
Project: 52788
Buggy source:
public SimpleToolWindowPanel createToolWindowContent(final Project project){
  this.project=project;
  changeListPanel.registerChangeListPanel(this);
  diffManager.registerDiffTool(commentsDiffTool);
  SimpleToolWindowPanel panel=new SimpleToolWindowPanel(true,true);
  ActionToolbar toolbar=createToolbar(project);
  toolbar.setTargetComponent(changeListPanel);
  panel.setToolbar(toolbar.getComponent());
  RepositoryChangesBrowser repositoryChangesBrowser=repositoryChangesBrowserProvider.get(project);
  Splitter detailsSplitter=new Splitter(true,0.6f);
  detailsSplitter.setShowDividerControls(true);
  changeListPanel.setBorder(IdeBorderFactory.createBorder(SideBorder.TOP | SideBorder.RIGHT | SideBorder.BOTTOM));
  detailsSplitter.setFirstComponent(changeListPanel);
  detailsPanel=new GerritChangeDetailsPanel(project);
  changeListPanel.addListSelectionListener(new Consumer<ChangeInfo>(){
    @Override public void consume(    ChangeInfo changeInfo){
      changeSelected(changeInfo,project);
    }
  }
);
  JPanel details=detailsPanel.getComponent();
  details.setBorder(IdeBorderFactory.createBorder(SideBorder.TOP | SideBorder.RIGHT));
  detailsSplitter.setSecondComponent(details);
  Splitter horizontalSplitter=new Splitter(false,0.7f);
  horizontalSplitter.setShowDividerControls(true);
  horizontalSplitter.setFirstComponent(detailsSplitter);
  horizontalSplitter.setSecondComponent(repositoryChangesBrowser);
  panel.setContent(horizontalSplitter);
  reloadChanges(project,false);
  return panel;
}

Fixed version (ground truth):
public SimpleToolWindowPanel createToolWindowContent(final Project project){
  changeListPanel.registerChangeListPanel(this);
  diffManager.registerDiffTool(commentsDiffTool);
  SimpleToolWindowPanel panel=new SimpleToolWindowPanel(true,true);
  ActionToolbar toolbar=createToolbar(project);
  toolbar.setTargetComponent(changeListPanel);
  panel.setToolbar(toolbar.getComponent());
  RepositoryChangesBrowser repositoryChangesBrowser=repositoryChangesBrowserProvider.get(project,changeListPanel);
  Splitter detailsSplitter=new Splitter(true,0.6f);
  detailsSplitter.setShowDividerControls(true);
  changeListPanel.setBorder(IdeBorderFactory.createBorder(SideBorder.TOP | SideBorder.RIGHT | SideBorder.BOTTOM));
  detailsSplitter.setFirstComponent(changeListPanel);
  detailsPanel=new GerritChangeDetailsPanel(project);
  changeListPanel.addListSelectionListener(new Consumer<ChangeInfo>(){
    @Override public void consume(    ChangeInfo changeInfo){
      changeSelected(changeInfo,project);
    }
  }
);
  JPanel details=detailsPanel.getComponent();
  details.setBorder(IdeBorderFactory.createBorder(SideBorder.TOP | SideBorder.RIGHT));
  detailsSplitter.setSecondComponent(details);
  Splitter horizontalSplitter=new Splitter(false,0.7f);
  horizontalSplitter.setShowDividerControls(true);
  horizontalSplitter.setFirstComponent(detailsSplitter);
  horizontalSplitter.setSecondComponent(repositoryChangesBrowser);
  panel.setContent(horizontalSplitter);
  reloadChanges(project,false);
  return panel;
}
Program: 52789
Project: 52789
Buggy source:
@Override protected void configure(){
  install(new GerritFilterModule());
  bind(GerritSelectRevisionInfoColumn.class).asEagerSingleton();
  Multibinder<GerritChangeNodeDecorator> decorators=Multibinder.newSetBinder(binder(),GerritChangeNodeDecorator.class);
  decorators.addBinding().to(GerritCommentCountChangeNodeDecorator.class);
  bind(RepositoryChangesBrowserProvider.class);
  bind(SettingsPanel.class);
  bind(GerritSettingsConfigurable.class);
  bind(GerritUpdatesNotificationComponent.class).asEagerSingleton();
  bind(GerritChangeListPanel.class).asEagerSingleton();
}

Fixed version (ground truth):
@Override protected void configure(){
  install(new GerritFilterModule());
  bind(GerritSelectRevisionInfoColumn.class);
  Multibinder<GerritChangeNodeDecorator> decorators=Multibinder.newSetBinder(binder(),GerritChangeNodeDecorator.class);
  decorators.addBinding().to(GerritCommentCountChangeNodeDecorator.class);
  bind(RepositoryChangesBrowserProvider.class);
  bind(SettingsPanel.class);
  bind(GerritSettingsConfigurable.class);
  bind(GerritUpdatesNotificationComponent.class).asEagerSingleton();
  bind(GerritChangeListPanel.class);
}
Program: 52790
Project: 52790
Buggy source:
public RepositoryChangesBrowser get(final Project project){
  selectBaseRevisionAction=new SelectBaseRevisionAction(project,selectedRevisions);
  TableView<ChangeInfo> table=changeListPanel.getTable();
  final GerritRepositoryChangesBrowser changesBrowser=new GerritRepositoryChangesBrowser(project);
  changesBrowser.getDiffAction().registerCustomShortcutSet(CommonShortcuts.getDiff(),table);
  changesBrowser.getViewer().setScrollPaneBorder(IdeBorderFactory.createBorder(SideBorder.LEFT | SideBorder.TOP));
  changesBrowser.getViewer().setChangeDecorator(changesBrowser.getChangeNodeDecorator());
  reviewCommentSink.addObserver(new Observer(){
    @Override public void update(    Observable o,    Object arg){
      changesBrowser.repaint();
    }
  }
);
  changeListPanel.addListSelectionListener(new Consumer<ChangeInfo>(){
    @Override public void consume(    ChangeInfo changeInfo){
      changesBrowser.setSelectedChange(changeInfo);
    }
  }
);
  return changesBrowser;
}

Fixed version (ground truth):
public RepositoryChangesBrowser get(Project project,GerritChangeListPanel changeListPanel){
  selectBaseRevisionAction=new SelectBaseRevisionAction(project,selectedRevisions);
  TableView<ChangeInfo> table=changeListPanel.getTable();
  final GerritRepositoryChangesBrowser changesBrowser=new GerritRepositoryChangesBrowser(project);
  changesBrowser.getDiffAction().registerCustomShortcutSet(CommonShortcuts.getDiff(),table);
  changesBrowser.getViewer().setScrollPaneBorder(IdeBorderFactory.createBorder(SideBorder.LEFT | SideBorder.TOP));
  changesBrowser.getViewer().setChangeDecorator(changesBrowser.getChangeNodeDecorator());
  reviewCommentSink.addObserver(new Observer(){
    @Override public void update(    Observable o,    Object arg){
      changesBrowser.repaint();
    }
  }
);
  changeListPanel.addListSelectionListener(new Consumer<ChangeInfo>(){
    @Override public void consume(    ChangeInfo changeInfo){
      changesBrowser.setSelectedChange(changeInfo);
    }
  }
);
  return changesBrowser;
}
Program: 52791
Project: 52791
Buggy source:
public void getChangesToReview(Project project,Consumer<LoadChangesProxy> consumer){
  getChanges("String_Node_Str",project,consumer);
}

Fixed version (ground truth):
public void getChangesToReview(Project project,Consumer<List<ChangeInfo>> consumer){
  Changes.QueryRequest queryRequest=gerritClient.changes().query("String_Node_Str");
  getChanges(queryRequest,project,consumer);
}
Program: 52792
Project: 52792
Buggy source:
@Override public void consume(LoadChangesProxy proxy){
  boolean newChange=false;
  List<ChangeInfo> changes=proxy.getChanges();
  for (  ChangeInfo change : changes) {
    if (!notifiedChanges.contains(change.changeId)) {
      newChange=true;
      break;
    }
  }
  if (newChange) {
    StringBuilder stringBuilder=new StringBuilder();
    stringBuilder.append("String_Node_Str");
    for (    ChangeInfo change : changes) {
      stringBuilder.append("String_Node_Str").append(!notifiedChanges.contains(change.changeId) ? "String_Node_Str" : "String_Node_Str").append(change.project).append("String_Node_Str").append(change.subject).append("String_Node_Str").append(change.owner.name).append(')').append("String_Node_Str");
      notifiedChanges.add(change.changeId);
    }
    stringBuilder.append("String_Node_Str");
    NotificationBuilder notification=new NotificationBuilder(project,"String_Node_Str",stringBuilder.toString());
    notificationService.notifyInformation(notification);
  }
}

Fixed version (ground truth):
@Override public void consume(List<ChangeInfo> changes){
  boolean newChange=false;
  for (  ChangeInfo change : changes) {
    if (!notifiedChanges.contains(change.changeId)) {
      newChange=true;
      break;
    }
  }
  if (newChange) {
    StringBuilder stringBuilder=new StringBuilder();
    stringBuilder.append("String_Node_Str");
    for (    ChangeInfo change : changes) {
      stringBuilder.append("String_Node_Str").append(!notifiedChanges.contains(change.changeId) ? "String_Node_Str" : "String_Node_Str").append(change.project).append("String_Node_Str").append(change.subject).append("String_Node_Str").append(change.owner.name).append(')').append("String_Node_Str");
      notifiedChanges.add(change.changeId);
    }
    stringBuilder.append("String_Node_Str");
    NotificationBuilder notification=new NotificationBuilder(project,"String_Node_Str",stringBuilder.toString());
    notificationService.notifyInformation(notification);
  }
}
Program: 52793
Project: 52793
Buggy source:
@Nullable @Override public AuthData getAuthData(@NotNull String url){
  return delegate.getAuthData(url);
}

Fixed version (ground truth):
@Nullable @Override public AuthData getAuthData(@NotNull String url,@Nullable ModalityState modalityState){
  return delegate.getAuthData(url,modalityState);
}
Program: 52794
Project: 52794
Buggy source:
@Override protected void onFailure(){
  log.warn("String_Node_Str" + h.errors());
  Collection<Exception> errors=Lists.newArrayList();
  if (!h.hadAuthRequest()) {
    errors.addAll(h.errors());
  }
 else {
    errors.add(new VcsException("String_Node_Str"));
  }
  result.set(GitFetchResult.error(errors));
}

Fixed version (ground truth):
@Override protected void onFailure(){
  log.warn("String_Node_Str" + h.errors());
  Collection<Exception> errors=Lists.newArrayList();
  errors.addAll(h.errors());
  result.set(GitFetchResult.error(errors));
}
Program: 52795
Project: 52795
Buggy source:
@NotNull public GitFetchResult fetchNatively(@NotNull VirtualFile root,@NotNull GitRemote remote,@NotNull String url,@Nullable String branch,Project project,ProgressIndicator progressIndicator){
  final GitLineHandlerPasswordRequestAware h=new GitLineHandlerPasswordRequestAware(project,root,GitCommand.FETCH);
  h.setUrl(url);
  h.addProgressParameter();
  String remoteName=remote.getName();
  h.addParameters(remoteName);
  if (branch != null) {
    h.addParameters(branch);
  }
  final GitTask fetchTask=new GitTask(project,h,"String_Node_Str" + remote.getFirstUrl());
  fetchTask.setProgressIndicator(progressIndicator);
  fetchTask.setProgressAnalyzer(new GitStandardProgressAnalyzer());
  final AtomicReference<GitFetchResult> result=new AtomicReference<GitFetchResult>();
  fetchTask.execute(true,false,new GitTaskResultHandlerAdapter(){
    @Override protected void onSuccess(){
      result.set(GitFetchResult.success());
    }
    @Override protected void onCancel(){
      log.info("String_Node_Str");
      result.set(GitFetchResult.cancel());
    }
    @Override protected void onFailure(){
      log.warn("String_Node_Str" + h.errors());
      Collection<Exception> errors=Lists.newArrayList();
      if (!h.hadAuthRequest()) {
        errors.addAll(h.errors());
      }
 else {
        errors.add(new VcsException("String_Node_Str"));
      }
      result.set(GitFetchResult.error(errors));
    }
  }
);
  return result.get();
}

Fixed version (ground truth):
@NotNull public GitFetchResult fetchNatively(@NotNull VirtualFile root,@NotNull GitRemote remote,@NotNull String url,@Nullable String branch,Project project,ProgressIndicator progressIndicator){
  final GitLineHandler h=new GitLineHandler(project,root,GitCommand.FETCH);
  h.setUrl(url);
  h.addProgressParameter();
  String remoteName=remote.getName();
  h.addParameters(remoteName);
  if (branch != null) {
    h.addParameters(branch);
  }
  final GitTask fetchTask=new GitTask(project,h,"String_Node_Str" + remote.getFirstUrl());
  fetchTask.setProgressIndicator(progressIndicator);
  fetchTask.setProgressAnalyzer(new GitStandardProgressAnalyzer());
  final AtomicReference<GitFetchResult> result=new AtomicReference<GitFetchResult>();
  fetchTask.execute(true,false,new GitTaskResultHandlerAdapter(){
    @Override protected void onSuccess(){
      result.set(GitFetchResult.success());
    }
    @Override protected void onCancel(){
      log.info("String_Node_Str");
      result.set(GitFetchResult.cancel());
    }
    @Override protected void onFailure(){
      log.warn("String_Node_Str" + h.errors());
      Collection<Exception> errors=Lists.newArrayList();
      errors.addAll(h.errors());
      result.set(GitFetchResult.error(errors));
    }
  }
);
  return result.get();
}
Program: 52796
Project: 52796
Buggy source:
@Override public void consume(ChangeInfo changeDetails){
  selectedChange=changeDetails;
  baseRevision=Optional.absent();
  updateChangesBrowser();
  selectBaseRevisionAction.setSelectedChange(selectedChange);
  for (  GerritChangeNodeDecorator decorator : changeNodeDecorators) {
    decorator.onChangeSelected(project,selectedChange);
  }
}

Fixed version (ground truth):
@Override public void consume(ChangeInfo changeDetails){
  if (selectedChange.changeId.equals(changeDetails.changeId)) {
    selectedChange=changeDetails;
    baseRevision=Optional.absent();
    selectBaseRevisionAction.setSelectedChange(selectedChange);
    for (    GerritChangeNodeDecorator decorator : changeNodeDecorators) {
      decorator.onChangeSelected(project,selectedChange);
    }
    updateChangesBrowser();
  }
}
Program: 52797
Project: 52797
Buggy source:
protected void setSelectedChange(ChangeInfo changeInfo){
  gerritUtil.getChangeDetails(changeInfo._number,project,new Consumer<ChangeInfo>(){
    @Override public void consume(    ChangeInfo changeDetails){
      selectedChange=changeDetails;
      baseRevision=Optional.absent();
      updateChangesBrowser();
      selectBaseRevisionAction.setSelectedChange(selectedChange);
      for (      GerritChangeNodeDecorator decorator : changeNodeDecorators) {
        decorator.onChangeSelected(project,selectedChange);
      }
    }
  }
);
}

Fixed version (ground truth):
protected void setSelectedChange(ChangeInfo changeInfo){
  selectedChange=changeInfo;
  gerritUtil.getChangeDetails(changeInfo._number,project,new Consumer<ChangeInfo>(){
    @Override public void consume(    ChangeInfo changeDetails){
      if (selectedChange.changeId.equals(changeDetails.changeId)) {
        selectedChange=changeDetails;
        baseRevision=Optional.absent();
        selectBaseRevisionAction.setSelectedChange(selectedChange);
        for (        GerritChangeNodeDecorator decorator : changeNodeDecorators) {
          decorator.onChangeSelected(project,selectedChange);
        }
        updateChangesBrowser();
      }
    }
  }
);
}
Program: 52798
Project: 52798
Buggy source:
@Override protected void configure(){
  installOpenIdeDependenciesModule();
  setupSettingsProvider();
  bind(NotificationService.class);
  bind(ReviewCommentSink.class).toInstance(new ReviewCommentSink());
  bind(GerritGitUtil.class).asEagerSingleton();
  bind(GerritUtil.class).asEagerSingleton();
  bind(GerritToolWindow.class).asEagerSingleton();
  bind(GerritCheckoutProvider.class);
  bind(GerritHttpAuthDataProvider.class);
  install(new GerritActionsModule());
  install(new GerritDiffModule());
  install(new GerritRestModule());
  install(new GerritUiModule());
}

Fixed version (ground truth):
@Override protected void configure(){
  installOpenIdeDependenciesModule();
  setupSettingsProvider();
  bind(NotificationService.class);
  bind(ReviewCommentSink.class).toInstance(new ReviewCommentSink());
  bind(GerritGitUtil.class).asEagerSingleton();
  bind(GerritUtil.class).asEagerSingleton();
  bind(GerritToolWindow.class);
  bind(GerritCheckoutProvider.class);
  bind(GerritHttpAuthDataProvider.class);
  install(new GerritActionsModule());
  install(new GerritDiffModule());
  install(new GerritRestModule());
  install(new GerritUiModule());
}
Program: 52799
Project: 52799
Buggy source:
@Override public void calcData(DataKey key,DataSink sink){
  if (VcsDataKeys.CHANGES.equals(key)) {
    int[] rows=table.getSelectedRows();
    if (rows.length != 1)     return;
    int row=rows[0];
  }
}

Fixed version (ground truth):
@Override public void calcData(DataKey key,DataSink sink){
  sink.put(GerritDataKeys.TOOL_WINDOW,gerritToolWindow);
  if (VcsDataKeys.CHANGES.equals(key)) {
    int[] rows=table.getSelectedRows();
    if (rows.length != 1)     return;
    int row=rows[0];
  }
}
Program: 52800
Project: 52800
Buggy source:
public SimpleToolWindowPanel createToolWindowContent(final Project project){
  diffManager.registerDiffTool(commentsDiffTool);
  SimpleToolWindowPanel panel=new SimpleToolWindowPanel(true,true);
  ActionToolbar toolbar=createToolbar(project);
  toolbar.setTargetComponent(changeListPanel);
  panel.setToolbar(toolbar.getComponent());
  repositoryChangesBrowser=createRepositoryChangesBrowser(project);
  detailsSplitter=new Splitter(true,0.6f);
  detailsSplitter.setShowDividerControls(true);
  changeListPanel.setBorder(IdeBorderFactory.createBorder(SideBorder.TOP | SideBorder.RIGHT | SideBorder.BOTTOM));
  detailsSplitter.setFirstComponent(changeListPanel);
  detailsPanel=new GerritChangeDetailsPanel(project);
  JPanel details=detailsPanel.getComponent();
  details.setBorder(IdeBorderFactory.createBorder(SideBorder.TOP | SideBorder.RIGHT));
  detailsSplitter.setSecondComponent(details);
  Splitter horizontalSplitter=new Splitter(false,0.7f);
  horizontalSplitter.setShowDividerControls(true);
  horizontalSplitter.setFirstComponent(detailsSplitter);
  horizontalSplitter.setSecondComponent(repositoryChangesBrowser);
  panel.setContent(horizontalSplitter);
  reloadChanges(project,false);
  return panel;
}

Fixed version (ground truth):
public SimpleToolWindowPanel createToolWindowContent(final Project project){
  changeListPanel.registerChangeListPanel(this);
  diffManager.registerDiffTool(commentsDiffTool);
  SimpleToolWindowPanel panel=new SimpleToolWindowPanel(true,true);
  ActionToolbar toolbar=createToolbar(project);
  toolbar.setTargetComponent(changeListPanel);
  panel.setToolbar(toolbar.getComponent());
  repositoryChangesBrowser=createRepositoryChangesBrowser(project);
  detailsSplitter=new Splitter(true,0.6f);
  detailsSplitter.setShowDividerControls(true);
  changeListPanel.setBorder(IdeBorderFactory.createBorder(SideBorder.TOP | SideBorder.RIGHT | SideBorder.BOTTOM));
  detailsSplitter.setFirstComponent(changeListPanel);
  detailsPanel=new GerritChangeDetailsPanel(project);
  JPanel details=detailsPanel.getComponent();
  details.setBorder(IdeBorderFactory.createBorder(SideBorder.TOP | SideBorder.RIGHT));
  detailsSplitter.setSecondComponent(details);
  Splitter horizontalSplitter=new Splitter(false,0.7f);
  horizontalSplitter.setShowDividerControls(true);
  horizontalSplitter.setFirstComponent(detailsSplitter);
  horizontalSplitter.setSecondComponent(repositoryChangesBrowser);
  panel.setContent(horizontalSplitter);
  reloadChanges(project,false);
  return panel;
}
Program: 52801
Project: 52801
Buggy source:
private ActionToolbar createToolbar(final Project project){
  DefaultActionGroup group=(DefaultActionGroup)ActionManager.getInstance().getAction("String_Node_Str");
  DefaultActionGroup filterGroup=new DefaultActionGroup();
  Iterable<ChangesFilter> filters=changesFilters.getFilters();
  for (  ChangesFilter filter : filters) {
    filterGroup.add(filter.getAction(project));
  }
  filterGroup.add(new Separator());
  group.add(filterGroup,Constraints.FIRST);
  changesFilters.addObserver(new Observer(){
    @Override public void update(    Observable observable,    Object o){
      reloadChanges(project,true);
    }
  }
);
  return ActionManager.getInstance().createActionToolbar("String_Node_Str",group,true);
}

Fixed version (ground truth):
private ActionToolbar createToolbar(final Project project){
  DefaultActionGroup groupFromConfig=(DefaultActionGroup)ActionManager.getInstance().getAction("String_Node_Str");
  DefaultActionGroup group=new DefaultActionGroup(groupFromConfig);
  DefaultActionGroup filterGroup=new DefaultActionGroup();
  Iterable<ChangesFilter> filters=changesFilters.getFilters();
  for (  ChangesFilter filter : filters) {
    filterGroup.add(filter.getAction(project));
  }
  filterGroup.add(new Separator());
  group.add(filterGroup,Constraints.FIRST);
  changesFilters.addObserver(new Observer(){
    @Override public void update(    Observable observable,    Object o){
      reloadChanges(project,true);
    }
  }
);
  return ActionManager.getInstance().createActionToolbar("String_Node_Str",group,true);
}
Program: 52803
Project: 52803
Buggy source:
private void handleComments(final DiffPanelImpl diffPanel,final String filePathString){
  final FilePath filePath=new FilePathImpl(new File(filePathString),false);
  addCommentAction(diffPanel,filePath,changeInfo);
  gerritUtil.getChangeDetails(changeInfo.getNumber(),project,new Consumer<ChangeInfo>(){
    @Override public void consume(    ChangeInfo changeDetails){
      gerritUtil.getComments(changeDetails.getId(),changeDetails.getCurrentRevision(),project,new Consumer<TreeMap<String,List<CommentInfo>>>(){
        @Override public void consume(        TreeMap<String,List<CommentInfo>> comments){
          addCommentsGutter(diffPanel,filePath,comments,changeInfo,project);
        }
      }
);
      String repositoryPath=getGitRepositoryPathForChange(project,changeDetails);
      String relativePath=filePathString.replace(repositoryPath + File.separator,"String_Node_Str");
      gerritUtil.getChangeReviewed(changeDetails.getId(),changeDetails.getCurrentRevision(),relativePath,true,project);
    }
  }
);
}

Fixed version (ground truth):
private void handleComments(final DiffPanelImpl diffPanel,final String filePathString,final Project project,final ChangeInfo changeInfo){
  final FilePath filePath=new FilePathImpl(new File(filePathString),false);
  addCommentAction(diffPanel,filePath,changeInfo);
  gerritUtil.getChangeDetails(changeInfo.getNumber(),project,new Consumer<ChangeInfo>(){
    @Override public void consume(    ChangeInfo changeDetails){
      gerritUtil.getComments(changeDetails.getId(),changeDetails.getCurrentRevision(),project,new Consumer<TreeMap<String,List<CommentInfo>>>(){
        @Override public void consume(        TreeMap<String,List<CommentInfo>> comments){
          addCommentsGutter(diffPanel,filePath,comments,changeInfo,project);
        }
      }
);
      String repositoryPath=getGitRepositoryPathForChange(project,changeDetails);
      String relativePath=filePathString.replace(repositoryPath + File.separator,"String_Node_Str");
      gerritUtil.getChangeReviewed(changeDetails.getId(),changeDetails.getCurrentRevision(),relativePath,true,project);
    }
  }
);
}
Program: 52804
Project: 52804
Buggy source:
public CommentableDiffPanel(Window window,DiffRequest request){
  super(window,request.getProject(),true,true,DiffManagerImpl.FULL_DIFF_DIVIDER_POLYGONS_OFFSET,CommentsDiffTool.this);
}

Fixed version (ground truth):
public CommentableDiffPanel(Window window,DiffRequest request,ChangeInfo changeInfo){
  super(window,request.getProject(),true,true,DiffManagerImpl.FULL_DIFF_DIVIDER_POLYGONS_OFFSET,CommentsDiffTool.this);
  this.changeInfo=changeInfo;
}
Program: 52805
Project: 52805
Buggy source:
@Override public boolean canShow(DiffRequest request){
  final boolean superCanShow=super.canShow(request);
  final AsyncResult<DataContext> dataContextFromFocus=dataManager.getDataContextFromFocus();
  final DataContext context=dataContextFromFocus.getResult();
  if (context == null)   return false;
  changeInfo=GerritDataKeys.CHANGE.getData(context);
  project=PlatformDataKeys.PROJECT.getData(context);
  return superCanShow && changeInfo != null;
}

Fixed version (ground truth):
@Override public boolean canShow(DiffRequest request){
  final boolean superCanShow=super.canShow(request);
  final AsyncResult<DataContext> dataContextFromFocus=dataManager.getDataContextFromFocus();
  final DataContext context=dataContextFromFocus.getResult();
  if (context == null)   return false;
  ChangeInfo changeInfo=GerritDataKeys.CHANGE.getData(context);
  return superCanShow && changeInfo != null;
}
Program: 52806
Project: 52806
Buggy source:
@Override public void setDiffRequest(DiffRequest request){
  super.setDiffRequest(request);
  Object chain=request.getGenericData().get(VcsDataKeys.DIFF_REQUEST_CHAIN.getName());
  if (chain instanceof ChangeRequestChain) {
    DiffRequestPresentable currentRequest=((ChangeRequestChain)chain).getCurrentRequest();
    if (currentRequest != null) {
      String path=currentRequest.getPathPresentation();
      handleComments(this,path);
    }
  }
}

Fixed version (ground truth):
@Override public void setDiffRequest(DiffRequest request){
  super.setDiffRequest(request);
  Object chain=request.getGenericData().get(VcsDataKeys.DIFF_REQUEST_CHAIN.getName());
  if (chain instanceof ChangeRequestChain) {
    DiffRequestPresentable currentRequest=((ChangeRequestChain)chain).getCurrentRequest();
    if (currentRequest != null) {
      String path=currentRequest.getPathPresentation();
      handleComments(this,path,request.getProject(),changeInfo);
    }
  }
}
Program: 52807
Project: 52807
Buggy source:
@Nullable @Override protected DiffPanelImpl createDiffPanelImpl(@NotNull DiffRequest request,@Nullable Window window,@NotNull Disposable parentDisposable){
  DiffPanelImpl diffPanel=new CommentableDiffPanel(window,request);
  diffPanel.setDiffRequest(request);
  Disposer.register(parentDisposable,diffPanel);
  return diffPanel;
}

Fixed version (ground truth):
@Nullable @Override protected DiffPanelImpl createDiffPanelImpl(@NotNull DiffRequest request,@Nullable Window window,@NotNull Disposable parentDisposable){
  DataContext context=dataManager.getDataContextFromFocus().getResult();
  ChangeInfo changeInfo=GerritDataKeys.CHANGE.getData(context);
  DiffPanelImpl diffPanel=new CommentableDiffPanel(window,request,changeInfo);
  diffPanel.setDiffRequest(request);
  Disposer.register(parentDisposable,diffPanel);
  return diffPanel;
}
Program: 52808
Project: 52808
Buggy source:
public Element getState(){
  log.assertTrue(!ProgressManager.getInstance().hasProgressIndicator(),"String_Node_Str");
  try {
    if (passwordChanged && !masterPasswordRefused) {
      PasswordSafe.getInstance().storePassword(null,GerritSettings.class,GERRIT_SETTINGS_PASSWORD_KEY,getPassword());
    }
  }
 catch (  MasterPasswordUnavailableException e) {
    log.info("String_Node_Str" + GERRIT_SETTINGS_PASSWORD_KEY + "String_Node_Str",e);
    masterPasswordRefused=true;
  }
catch (  Exception e) {
    Messages.showErrorDialog("String_Node_Str","String_Node_Str");
    log.info("String_Node_Str" + GERRIT_SETTINGS_PASSWORD_KEY + "String_Node_Str",e);
  }
  passwordChanged=false;
  final Element element=new Element(GERRIT_SETTINGS_TAG);
  element.setAttribute(LOGIN,getLogin());
  element.setAttribute(HOST,getHost());
  element.setAttribute(AUTOMATIC_REFRESH,"String_Node_Str" + getAutomaticRefresh());
  element.setAttribute(REFRESH_TIMEOUT,"String_Node_Str" + getRefreshTimeout());
  element.setAttribute(REVIEW_NOTIFICATIONS,"String_Node_Str" + getReviewNotifications());
  Element trustedHosts=new Element(TRUSTED_HOSTS);
  for (  String host : myTrustedHosts) {
    Element hostEl=new Element(TRUSTED_HOST);
    hostEl.setAttribute(TRUSTED_URL,host);
    trustedHosts.addContent(hostEl);
  }
  element.addContent(trustedHosts);
  return element;
}

Fixed version (ground truth):
public Element getState(){
  log.assertTrue(!ProgressManager.getInstance().hasProgressIndicator(),"String_Node_Str");
  try {
    if (passwordChanged && !masterPasswordRefused) {
      PasswordSafe.getInstance().storePassword(null,GerritSettings.class,GERRIT_SETTINGS_PASSWORD_KEY,getPassword());
    }
  }
 catch (  MasterPasswordUnavailableException e) {
    log.info("String_Node_Str" + GERRIT_SETTINGS_PASSWORD_KEY + "String_Node_Str",e);
    masterPasswordRefused=true;
  }
catch (  Exception e) {
    Messages.showErrorDialog("String_Node_Str","String_Node_Str");
    log.info("String_Node_Str" + GERRIT_SETTINGS_PASSWORD_KEY + "String_Node_Str",e);
  }
  passwordChanged=false;
  final Element element=new Element(GERRIT_SETTINGS_TAG);
  element.setAttribute(LOGIN,(getLogin() != null ? getLogin() : "String_Node_Str"));
  element.setAttribute(HOST,(getHost() != null ? getHost() : "String_Node_Str"));
  element.setAttribute(AUTOMATIC_REFRESH,"String_Node_Str" + getAutomaticRefresh());
  element.setAttribute(REFRESH_TIMEOUT,"String_Node_Str" + getRefreshTimeout());
  element.setAttribute(REVIEW_NOTIFICATIONS,"String_Node_Str" + getReviewNotifications());
  Element trustedHosts=new Element(TRUSTED_HOSTS);
  for (  String host : myTrustedHosts) {
    Element hostEl=new Element(TRUSTED_HOST);
    hostEl.setAttribute(TRUSTED_URL,host);
    trustedHosts.addContent(hostEl);
  }
  element.addContent(trustedHosts);
  return element;
}
Program: 52809
Project: 52809
Buggy source:
private static String getProjectName(String url){
  String path=parseUri(url).getPath();
  int index=path.indexOf('/');
  path=path.substring(index + 1);
  path=path.replace("String_Node_Str","String_Node_Str");
  return path;
}

Fixed version (ground truth):
private static String getProjectName(String repositoryUrl,String url){
  if (!repositoryUrl.endsWith("String_Node_Str"))   repositoryUrl=repositoryUrl + "String_Node_Str";
  String basePath=parseUri(repositoryUrl).getPath();
  String path=parseUri(url).getPath();
  path=path.substring(basePath.length());
  path=path.replace("String_Node_Str","String_Node_Str");
  if (path.endsWith("String_Node_Str"))   path=path.substring(0,path.length() - 1);
  return path;
}
Program: 52810
Project: 52810
Buggy source:
/** 
 * Provide information only for current project
 */
@NotNull public static List<ChangeInfo> getChangesForProject(@NotNull String url,@NotNull String login,@NotNull String password,@NotNull final Project project){
  List<GitRepository> repositories=GitUtil.getRepositoryManager(project).getRepositories();
  if (repositories.isEmpty()) {
    showAddGitRepositoryNotification(project);
    return Lists.newArrayList();
  }
  List<GitRemote> remotes=Lists.newArrayList();
  for (  GitRepository repository : repositories) {
    remotes.addAll(repository.getRemotes());
  }
  String host=parseUri(url).getHost();
  List<String> projectNames=Lists.newArrayList();
  for (  GitRemote remote : remotes) {
    for (    String repositoryUrl : remote.getUrls()) {
      String repositoryHost=parseUri(repositoryUrl).getHost();
      if (repositoryHost != null && repositoryHost.equals(host)) {
        projectNames.add("String_Node_Str" + getProjectName(repositoryUrl));
      }
    }
  }
  if (projectNames.isEmpty()) {
    return Collections.emptyList();
  }
  String projectQuery=Joiner.on("String_Node_Str").join(projectNames);
  return getChanges(url,login,password,"String_Node_Str" + projectQuery + ')');
}

Fixed version (ground truth):
/** 
 * Provide information only for current project
 */
@NotNull public static List<ChangeInfo> getChangesForProject(@NotNull String url,@NotNull String login,@NotNull String password,@NotNull final Project project){
  List<GitRepository> repositories=GitUtil.getRepositoryManager(project).getRepositories();
  if (repositories.isEmpty()) {
    showAddGitRepositoryNotification(project);
    return Lists.newArrayList();
  }
  List<GitRemote> remotes=Lists.newArrayList();
  for (  GitRepository repository : repositories) {
    remotes.addAll(repository.getRemotes());
  }
  String host=parseUri(url).getHost();
  List<String> projectNames=Lists.newArrayList();
  for (  GitRemote remote : remotes) {
    for (    String repositoryUrl : remote.getUrls()) {
      String repositoryHost=parseUri(repositoryUrl).getHost();
      if (repositoryHost != null && repositoryHost.equals(host)) {
        projectNames.add("String_Node_Str" + getProjectName(url,repositoryUrl));
      }
    }
  }
  if (projectNames.isEmpty()) {
    return Collections.emptyList();
  }
  String projectQuery=Joiner.on("String_Node_Str").join(projectNames);
  return getChanges(url,login,password,"String_Node_Str" + projectQuery + ')');
}