Program: 91586
Project: 91586
Buggy source:
private String getSimpleText(RepositoryTreeNode node){
switch (node.getType()) {
case REPO:
    File directory=((Repository)node.getObject()).getDirectory();
  StringBuilder sb=new StringBuilder();
sb.append(directory.getParentFile().getName());
sb.append("String_Node_Str");
sb.append(directory.getAbsolutePath());
return sb.toString();
case FILE:
case FOLDER:
return ((File)node.getObject()).getName();
case BRANCHES:
return UIText.RepositoriesView_Branches_Nodetext;
case LOCAL:
return UIText.RepositoriesViewLabelProvider_LocalNodetext;
case REMOTETRACKING:
return UIText.RepositoriesViewLabelProvider_RemoteTrackingNodetext;
case BRANCHHIERARCHY:
IPath fullPath=(IPath)node.getObject();
return fullPath.lastSegment();
case TAGS:
return UIText.RepositoriesViewLabelProvider_TagsNodeText;
case ADDITIONALREFS:
return UIText.RepositoriesViewLabelProvider_SymbolicRefNodeText;
case REMOTES:
return UIText.RepositoriesView_RemotesNodeText;
case REF:
case TAG:
{
Ref ref=(Ref)node.getObject();
String refName=node.getRepository().shortenRefName(ref.getName());
if (node.getParent().getType() == RepositoryTreeNodeType.BRANCHHIERARCHY) {
int index=refName.lastIndexOf('/');
refName=refName.substring(index + 1);
}
return refName;
}
case ADDITIONALREF:
{
Ref ref=(Ref)node.getObject();
String refName=node.getRepository().shortenRefName(ref.getName());
if (ref.isSymbolic()) {
refName=refName + "String_Node_Str" + ref.getLeaf().getName()+ "String_Node_Str"+ ObjectId.toString(ref.getLeaf().getObjectId());
}
 else {
refName=refName + "String_Node_Str" + ObjectId.toString(ref.getObjectId());
}
return refName;
}
case WORKINGDIR:
if (node.getRepository().isBare()) return UIText.RepositoriesView_WorkingDir_treenode + "String_Node_Str" + UIText.RepositoriesViewLabelProvider_BareRepositoryMessage;
 else return UIText.RepositoriesView_WorkingDir_treenode + "String_Node_Str" + node.getRepository().getWorkTree().getAbsolutePath();
case REMOTE:
case PUSH:
case FETCH:
case ERROR:
return (String)node.getObject();
}
return null;
}

Fixed version (ground truth):
private String getSimpleText(RepositoryTreeNode node){
switch (node.getType()) {
case REPO:
    File directory=((Repository)node.getObject()).getDirectory();
  StringBuilder sb=new StringBuilder();
sb.append(directory.getParentFile().getName());
sb.append("String_Node_Str");
sb.append(directory.getAbsolutePath());
return sb.toString();
case FILE:
case FOLDER:
return ((File)node.getObject()).getName();
case BRANCHES:
return UIText.RepositoriesView_Branches_Nodetext;
case LOCAL:
return UIText.RepositoriesViewLabelProvider_LocalNodetext;
case REMOTETRACKING:
return UIText.RepositoriesViewLabelProvider_RemoteTrackingNodetext;
case BRANCHHIERARCHY:
IPath fullPath=(IPath)node.getObject();
return fullPath.lastSegment();
case TAGS:
return UIText.RepositoriesViewLabelProvider_TagsNodeText;
case ADDITIONALREFS:
return UIText.RepositoriesViewLabelProvider_SymbolicRefNodeText;
case REMOTES:
return UIText.RepositoriesView_RemotesNodeText;
case REF:
case TAG:
{
Ref ref=(Ref)node.getObject();
String refName=Repository.shortenRefName(ref.getName());
if (node.getParent().getType() == RepositoryTreeNodeType.BRANCHHIERARCHY) {
int index=refName.lastIndexOf('/');
refName=refName.substring(index + 1);
}
return refName;
}
case ADDITIONALREF:
{
Ref ref=(Ref)node.getObject();
String refName=Repository.shortenRefName(ref.getName());
if (ref.isSymbolic()) {
refName=refName + "String_Node_Str" + ref.getLeaf().getName()+ "String_Node_Str"+ ObjectId.toString(ref.getLeaf().getObjectId());
}
 else {
refName=refName + "String_Node_Str" + ObjectId.toString(ref.getObjectId());
}
return refName;
}
case WORKINGDIR:
if (node.getRepository().isBare()) return UIText.RepositoriesView_WorkingDir_treenode + "String_Node_Str" + UIText.RepositoriesViewLabelProvider_BareRepositoryMessage;
 else return UIText.RepositoriesView_WorkingDir_treenode + "String_Node_Str" + node.getRepository().getWorkTree().getAbsolutePath();
case REMOTE:
case PUSH:
case FETCH:
case ERROR:
return (String)node.getObject();
}
return null;
}