Program: 91527
Project: 91527
Buggy source:
@Override public boolean inputSet(){
  try {
    if (trace)     GitTraceLocation.getTrace().traceEntry(GitTraceLocation.HISTORYVIEW.getLocation());
    if (this.input != null)     return true;
    cancelRefreshJob();
    setErrorMessage(null);
    Object o=super.getInput();
    if (o == null) {
      setErrorMessage(UIText.GitHistoryPage_NoInputMessage);
      return false;
    }
    if (o instanceof IResource) {
      RepositoryMapping mapping=RepositoryMapping.getMapping((IResource)o);
      if (mapping != null) {
        Repository repo=mapping.getRepository();
        input=new HistoryPageInput(repo,new IResource[]{(IResource)o});
      }
    }
 else     if (o instanceof RepositoryTreeNode) {
      RepositoryTreeNode repoNode=(RepositoryTreeNode)o;
switch (repoNode.getType()) {
case FILE:
        File file=((FileNode)repoNode).getObject();
      input=new HistoryPageInput(repoNode.getRepository(),new File[]{file});
    break;
case FOLDER:
  File folder=((FolderNode)repoNode).getObject();
input=new HistoryPageInput(repoNode.getRepository(),new File[]{folder});
break;
default :
input=new HistoryPageInput(repoNode.getRepository());
}
}
 else if (o instanceof HistoryPageInput) input=(HistoryPageInput)o;
 else if (o instanceof IAdaptable) {
IResource resource=(IResource)((IAdaptable)o).getAdapter(IResource.class);
if (resource != null) {
RepositoryMapping mapping=RepositoryMapping.getMapping(resource);
Repository repo=mapping.getRepository();
input=new HistoryPageInput(repo,new IResource[]{resource});
}
}
if (input == null) {
this.name="String_Node_Str";
setErrorMessage(UIText.GitHistoryPage_NoInputMessage);
return false;
}
final IResource[] inResources=input.getItems();
final File[] inFiles=input.getFileList();
if (inResources != null && inResources.length == 0) {
this.name="String_Node_Str";
setErrorMessage(UIText.GitHistoryPage_NoInputMessage);
return false;
}
this.name=calculateName(input);
boolean filtersActive=inResources != null || inFiles != null;
actions.showAllRepoVersionsAction.setEnabled(filtersActive);
actions.showAllProjectVersionsAction.setEnabled(filtersActive);
actions.showAllFolderVersionsAction.setEnabled(inResources != null);
actions.showAllResourceVersionsAction.setEnabled(filtersActive);
try {
initAndStartRevWalk(true);
}
 catch (IllegalStateException e) {
Activator.handleError(e.getMessage(),e.getCause(),true);
return false;
}
return true;
}
  finally {
if (trace) GitTraceLocation.getTrace().traceExit(GitTraceLocation.HISTORYVIEW.getLocation());
}
}

Fixed version (ground truth):
@Override public boolean inputSet(){
  try {
    if (trace)     GitTraceLocation.getTrace().traceEntry(GitTraceLocation.HISTORYVIEW.getLocation());
    if (this.input != null)     return true;
    cancelRefreshJob();
    setErrorMessage(null);
    Object o=super.getInput();
    if (o == null) {
      setErrorMessage(UIText.GitHistoryPage_NoInputMessage);
      return false;
    }
    if (o instanceof IResource) {
      RepositoryMapping mapping=RepositoryMapping.getMapping((IResource)o);
      if (mapping != null) {
        Repository repo=mapping.getRepository();
        input=new HistoryPageInput(repo,new IResource[]{(IResource)o});
      }
    }
 else     if (o instanceof RepositoryTreeNode) {
      RepositoryTreeNode repoNode=(RepositoryTreeNode)o;
switch (repoNode.getType()) {
case FILE:
        File file=((FileNode)repoNode).getObject();
      input=new HistoryPageInput(repoNode.getRepository(),new File[]{file});
    break;
case FOLDER:
  File folder=((FolderNode)repoNode).getObject();
input=new HistoryPageInput(repoNode.getRepository(),new File[]{folder});
break;
default :
input=new HistoryPageInput(repoNode.getRepository());
}
}
 else if (o instanceof HistoryPageInput) input=(HistoryPageInput)o;
 else if (o instanceof IAdaptable) {
IResource resource=(IResource)((IAdaptable)o).getAdapter(IResource.class);
if (resource != null) {
RepositoryMapping mapping=RepositoryMapping.getMapping(resource);
Repository repo=mapping.getRepository();
input=new HistoryPageInput(repo,new IResource[]{resource});
}
}
if (input == null) {
this.name="String_Node_Str";
setErrorMessage(UIText.GitHistoryPage_NoInputMessage);
return false;
}
final IResource[] inResources=input.getItems();
final File[] inFiles=input.getFileList();
if (inResources != null && inResources.length == 0) {
this.name="String_Node_Str";
setErrorMessage(UIText.GitHistoryPage_NoInputMessage);
return false;
}
this.name=calculateName(input);
boolean filtersActive=inResources != null || inFiles != null;
actions.showAllRepoVersionsAction.setEnabled(filtersActive);
actions.showAllProjectVersionsAction.setEnabled(filtersActive);
actions.showAllFolderVersionsAction.setEnabled(inResources != null);
actions.showAllResourceVersionsAction.setEnabled(filtersActive);
try {
initAndStartRevWalk(true);
}
 catch (IllegalStateException e) {
Activator.handleError(e.getMessage(),e,true);
return false;
}
return true;
}
  finally {
if (trace) GitTraceLocation.getTrace().traceExit(GitTraceLocation.HISTORYVIEW.getLocation());
}
}