Program: 177069
Project: 177069
Buggy source:
@Override public final void index(EntityMetadata metadata,Object object){
  if (!metadata.isIndexable()) {
    return;
  }
  log.debug("String_Node_Str" + metadata.getEntityClazz().getName() + "String_Node_Str"+ object);
  Document currentDoc=null;
  Object embeddedObject=null;
  if (metadata.getType().equals(EntityMetadata.Type.SUPER_COLUMN_FAMILY)) {
    Map<String,EmbeddedColumn> superColMap=metadata.getEmbeddedColumnsMap();
    for (    String superColumnName : superColMap.keySet()) {
      EmbeddedColumn superColumn=superColMap.get(superColumnName);
      try {
        embeddedObject=PropertyAccessorHelper.getObject(object,superColumn.getField());
        if (embeddedObject == null) {
          return;
        }
        if (embeddedObject instanceof Collection<?>) {
          for (          Object obj : (Collection<?>)embeddedObject) {
            currentDoc=prepareDocumentForSuperColumn(metadata,object,superColumnName);
            indexSuperColumn(metadata,object,currentDoc,obj,superColumn);
          }
          return;
        }
 else {
          currentDoc=prepareDocumentForSuperColumn(metadata,object,superColumnName);
        }
      }
 catch (      PropertyAccessException e) {
        log.error("String_Node_Str" + superColumnName);
      }
      indexSuperColumn(metadata,object,currentDoc,metadata.isEmbeddable(embeddedObject.getClass()) ? embeddedObject : object,superColumn);
    }
  }
 else {
    currentDoc=new Document();
    addEntityClassToDocument(metadata,object,currentDoc);
    addFieldsToDocument(metadata,object,currentDoc);
    indexDocument(metadata,currentDoc);
  }
  try {
    w.commit();
    isInitialized=true;
  }
 catch (  CorruptIndexException e) {
    throw new IndexingException(e.getMessage());
  }
catch (  IOException e) {
    throw new IndexingException(e.getMessage());
  }
}

Fixed version (ground truth):
@Override public final void index(EntityMetadata metadata,Object object){
  if (!metadata.isIndexable()) {
    return;
  }
  log.debug("String_Node_Str" + metadata.getEntityClazz().getName() + "String_Node_Str"+ object);
  Document currentDoc=null;
  Object embeddedObject=null;
  if (metadata.getType().equals(EntityMetadata.Type.SUPER_COLUMN_FAMILY)) {
    Map<String,EmbeddedColumn> superColMap=metadata.getEmbeddedColumnsMap();
    for (    String superColumnName : superColMap.keySet()) {
      EmbeddedColumn superColumn=superColMap.get(superColumnName);
      try {
        embeddedObject=PropertyAccessorHelper.getObject(object,superColumn.getField());
        if (embeddedObject == null) {
          return;
        }
        if (embeddedObject instanceof Collection<?>) {
          for (          Object obj : (Collection<?>)embeddedObject) {
            currentDoc=prepareDocumentForSuperColumn(metadata,object,superColumnName);
            indexSuperColumn(metadata,object,currentDoc,obj,superColumn);
          }
        }
 else {
          currentDoc=prepareDocumentForSuperColumn(metadata,object,superColumnName);
          indexSuperColumn(metadata,object,currentDoc,metadata.isEmbeddable(embeddedObject.getClass()) ? embeddedObject : object,superColumn);
        }
      }
 catch (      PropertyAccessException e) {
        log.error("String_Node_Str" + superColumnName);
      }
    }
  }
 else {
    currentDoc=new Document();
    addEntityClassToDocument(metadata,object,currentDoc);
    addFieldsToDocument(metadata,object,currentDoc);
    indexDocument(metadata,currentDoc);
  }
  try {
    w.commit();
    isInitialized=true;
  }
 catch (  CorruptIndexException e) {
    throw new IndexingException(e.getMessage());
  }
catch (  IOException e) {
    throw new IndexingException(e.getMessage());
  }
}