Program: 153224
Project: 153224
Buggy source:
/** 
 * Here we have a single ChangeSet which will be analyzed separate.
 * @param indexWriter 
 * @param repository
 * @param logEntry
 */
private void workOnChangeSet(IndexWriter indexWriter,Repository repository,SVNLogEntry logEntry){
  Set changedPathsSet=logEntry.getChangedPaths().keySet();
  TagBranchRecognition tbr=new TagBranchRecognition(repository);
  TagBranch res=null;
  if (changedPathsSet.size() == 1) {
    res=tbr.checkForTagOrBranch(logEntry,changedPathsSet);
  }
 else {
    res=tbr.checkForMavenTag(logEntry,changedPathsSet);
    if (res == null) {
      res=tbr.checkForSubverisonTag(logEntry,changedPathsSet);
    }
  }
  int count=0;
  LOGGER.debug("String_Node_Str" + changedPathsSet.size());
  for (Iterator changedPaths=changedPathsSet.iterator(); changedPaths.hasNext(); ) {
    count++;
    Document doc=new Document();
    if (res != null) {
switch (res.getType()) {
case BRANCH:
        addUnTokenizedField(doc,FieldNames.BRANCH,res.getName());
      break;
case TAG:
    addUnTokenizedField(doc,FieldNames.TAG,res.getName());
switch (res.getTagType()) {
case NONE:
    break;
case TAG:
  break;
case MAVENTAG:
addUnTokenizedField(doc,FieldNames.MAVENTAG,res.getName());
break;
case SUBVERSIONTAG:
addUnTokenizedField(doc,FieldNames.SUBVERSIONTAG,res.getName());
break;
}
break;
default :
break;
}
}
SVNLogEntryPath entryPath=(SVNLogEntryPath)logEntry.getChangedPaths().get(changedPaths.next());
LOGGER.debug("String_Node_Str" + entryPath.getType() + "String_Node_Str"+ entryPath.getPath()+ ((entryPath.getCopyPath() != null) ? "String_Node_Str" + entryPath.getCopyPath() + "String_Node_Str"+ entryPath.getCopyRevision()+ "String_Node_Str" : "String_Node_Str"));
SVNDirEntry dirEntry=tbr.getEntryCache().getEntry(logEntry.getRevision(),entryPath.getPath());
try {
indexFile(doc,indexWriter,dirEntry,repository,logEntry,entryPath);
}
 catch (IOException e) {
LOGGER.error("String_Node_Str" + e);
}
catch (SVNException e) {
LOGGER.error("String_Node_Str" + e);
}
catch (Exception e) {
LOGGER.error("String_Node_Str" + e);
}
}
}

Fixed version (ground truth):
/** 
 * Here we have a single ChangeSet which will be analyzed separate.
 * @param indexWriter 
 * @param repository
 * @param logEntry
 */
private void workOnChangeSet(IndexWriter indexWriter,Repository repository,SVNLogEntry logEntry){
  Set changedPathsSet=logEntry.getChangedPaths().keySet();
  TagBranchRecognition tbr=new TagBranchRecognition(repository);
  TagBranch res=null;
  if (changedPathsSet.size() == 1) {
    res=tbr.checkForTagOrBranch(logEntry,changedPathsSet);
  }
 else {
    res=tbr.checkForMavenTag(logEntry,changedPathsSet);
    if (res == null) {
      res=tbr.checkForSubverisonTag(logEntry,changedPathsSet);
    }
  }
  int count=0;
  LOGGER.debug("String_Node_Str" + changedPathsSet.size());
  startIndexChangeSet();
  for (Iterator changedPaths=changedPathsSet.iterator(); changedPaths.hasNext(); ) {
    count++;
    Document doc=new Document();
    if (res != null) {
switch (res.getType()) {
case BRANCH:
        addUnTokenizedField(doc,FieldNames.BRANCH,res.getName());
      break;
case TAG:
    addUnTokenizedField(doc,FieldNames.TAG,res.getName());
switch (res.getTagType()) {
case NONE:
    break;
case TAG:
  break;
case MAVENTAG:
addUnTokenizedField(doc,FieldNames.MAVENTAG,res.getName());
break;
case SUBVERSIONTAG:
addUnTokenizedField(doc,FieldNames.SUBVERSIONTAG,res.getName());
break;
}
break;
default :
break;
}
}
SVNLogEntryPath entryPath=(SVNLogEntryPath)logEntry.getChangedPaths().get(changedPaths.next());
LOGGER.debug("String_Node_Str" + entryPath.getType() + "String_Node_Str"+ entryPath.getPath()+ ((entryPath.getCopyPath() != null) ? "String_Node_Str" + entryPath.getCopyPath() + "String_Node_Str"+ entryPath.getCopyRevision()+ "String_Node_Str" : "String_Node_Str"));
SVNDirEntry dirEntry=tbr.getEntryCache().getEntry(logEntry.getRevision(),entryPath.getPath());
try {
beginIndexChangeSetItem(dirEntry);
indexFile(doc,indexWriter,dirEntry,repository,logEntry,entryPath);
endIndexChangeSetItem(dirEntry);
}
 catch (IOException e) {
LOGGER.error("String_Node_Str",e);
}
catch (SVNException e) {
LOGGER.error("String_Node_Str",e);
}
catch (Exception e) {
LOGGER.error("String_Node_Str",e);
}
}
stopIndexChangeSet();
}