Program: 168455
Project: 168455
Buggy source:
private static DBObject getCustomIndexDBObject(IndexMetadata indexMetadata) throws MongoValidationException {
  DBObject indexDBObject=new BasicDBObject();
  Map<String,Selector> options=SelectorOptionsUtils.processOptions(indexMetadata.getOptions());
  if (options == null) {
    String msg="String_Node_Str";
    logger.debug(msg);
    throw new MongoValidationException(msg);
  }
  Selector selector=options.get(INDEX_TYPE.getOptionName());
  if (selector == null) {
    String msg="String_Node_Str";
    logger.debug(msg);
    throw new MongoValidationException(msg);
  }
  String indexType=((StringSelector)selector).getValue().trim();
  String[] fields=getCustomIndexDBObjectFields(options,indexType,indexMetadata);
  if (COMPOUND.getIndexType().equals(indexType)) {
    for (    String field : fields) {
      String[] fieldInfo=field.split("String_Node_Str");
      if (fieldInfo.length != 2) {
        String msg="String_Node_Str";
        logger.debug(msg);
        throw new MongoValidationException(msg);
      }
      int order=fieldInfo[1].trim().equals("String_Node_Str") ? 1 : -1;
      indexDBObject.put(fieldInfo[0],order);
    }
  }
 else {
    if (fields.length != 1) {
      String msg="String_Node_Str" + indexType + "String_Node_Str";
      logger.debug(msg);
      throw new MongoValidationException(msg);
    }
    String mongoIndexType;
    if (CustomMongoIndexType.HASHED.getIndexType().equals(indexType)) {
      mongoIndexType="String_Node_Str";
    }
 else     if (GEOSPATIAL_SPHERE.getIndexType().equals(indexType)) {
      mongoIndexType="String_Node_Str";
    }
 else     if (GEOSPATIAL_FLAT.getIndexType().equals(indexType)) {
      mongoIndexType="String_Node_Str";
    }
 else {
      throw new MongoValidationException("String_Node_Str" + indexType + "String_Node_Str");
    }
    indexDBObject.put(fields[0],mongoIndexType);
  }
  return indexDBObject;
}

Fixed version (ground truth):
private static DBObject getCustomIndexDBObject(IndexMetadata indexMetadata) throws MongoValidationException {
  DBObject indexDBObject=new BasicDBObject();
  Map<String,Selector> options=SelectorOptionsUtils.processOptions(indexMetadata.getOptions());
  if (options == null) {
    String msg="String_Node_Str";
    LOGGER.debug(msg);
    throw new MongoValidationException(msg);
  }
  Selector selector=options.get(INDEX_TYPE.getOptionName());
  if (selector == null) {
    String msg="String_Node_Str";
    LOGGER.debug(msg);
    throw new MongoValidationException(msg);
  }
  String indexType=((StringSelector)selector).getValue().trim();
  String[] fields=getCustomIndexDBObjectFields(options,indexType,indexMetadata);
  if (COMPOUND.getIndexType().equals(indexType)) {
    for (    String field : fields) {
      String[] fieldInfo=field.split("String_Node_Str");
      if (fieldInfo.length != 2) {
        String msg="String_Node_Str";
        LOGGER.debug(msg);
        throw new MongoValidationException(msg);
      }
      int order=fieldInfo[1].trim().equals("String_Node_Str") ? 1 : -1;
      indexDBObject.put(fieldInfo[0],order);
    }
  }
 else {
    if (fields.length != 1) {
      String msg="String_Node_Str" + indexType + "String_Node_Str";
      LOGGER.debug(msg);
      throw new MongoValidationException(msg);
    }
    String mongoIndexType;
    if (CustomMongoIndexType.HASHED.getIndexType().equals(indexType)) {
      mongoIndexType="String_Node_Str";
    }
 else     if (GEOSPATIAL_SPHERE.getIndexType().equals(indexType)) {
      mongoIndexType="String_Node_Str";
    }
 else     if (GEOSPATIAL_FLAT.getIndexType().equals(indexType)) {
      mongoIndexType="String_Node_Str";
    }
 else {
      throw new MongoValidationException("String_Node_Str" + indexType + "String_Node_Str");
    }
    indexDBObject.put(fields[0],mongoIndexType);
  }
  return indexDBObject;
}