Program: 176710
Project: 176710
Buggy source:
/** 
 * update method update schema and table for the list of tableInfos
 * @param tableInfos list of TableInfos.
 */
protected void update(List<TableInfo> tableInfos){
  for (  TableInfo tableInfo : tableInfos) {
    if (tableInfo != null && tableInfo.getTableName() != null) {
      HTableDescriptor hTableDescriptor=getTableMetaData(tableInfo);
      try {
        HTableDescriptor descriptor=admin.getTableDescriptor(tableInfo.getTableName().getBytes());
        if (descriptor.getNameAsString().equalsIgnoreCase(tableInfo.getTableName())) {
          if (admin.isTableEnabled(tableInfo.getTableName().getBytes())) {
            admin.disableTable(tableInfo.getTableName().getBytes());
          }
          HColumnDescriptor[] descriptors=descriptor.getColumnFamilies();
          if (tableInfo.getColumnMetadatas() != null) {
            boolean found=false;
            HColumnDescriptor columnDescriptor=new HColumnDescriptor(tableInfo.getTableName());
            for (            HColumnDescriptor hColumnDescriptor : descriptors) {
              if (hColumnDescriptor.getNameAsString().equalsIgnoreCase(tableInfo.getTableName())) {
                found=true;
                break;
              }
            }
            if (!found) {
              admin.addColumn(tableInfo.getTableName(),columnDescriptor);
            }
          }
          if (tableInfo.getEmbeddedColumnMetadatas() != null) {
          }
        }
      }
 catch (      IOException e) {
        try {
          admin.createTable(hTableDescriptor);
        }
 catch (        IOException e1) {
          logger.error("String_Node_Str" + e.getMessage());
          throw new SchemaGenerationException(e,"String_Node_Str");
        }
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * update method update schema and table for the list of tableInfos
 * @param tableInfos list of TableInfos.
 */
protected void update(List<TableInfo> tableInfos){
  for (  TableInfo tableInfo : tableInfos) {
    if (tableInfo != null && tableInfo.getTableName() != null) {
      HTableDescriptor hTableDescriptor=getTableMetaData(tableInfo);
      try {
        HTableDescriptor descriptor=admin.getTableDescriptor(tableInfo.getTableName().getBytes());
        if (descriptor.getNameAsString().equalsIgnoreCase(tableInfo.getTableName())) {
          if (admin.isTableEnabled(tableInfo.getTableName().getBytes())) {
            admin.disableTable(tableInfo.getTableName().getBytes());
          }
          HColumnDescriptor[] descriptors=descriptor.getColumnFamilies();
          if (tableInfo.getColumnMetadatas() != null) {
            boolean found=false;
            HColumnDescriptor columnDescriptor=new HColumnDescriptor(tableInfo.getTableName());
            for (            HColumnDescriptor hColumnDescriptor : descriptors) {
              if (hColumnDescriptor.getNameAsString().equalsIgnoreCase(tableInfo.getTableName())) {
                found=true;
                break;
              }
            }
            if (!found) {
              admin.addColumn(tableInfo.getTableName(),columnDescriptor);
            }
          }
        }
      }
 catch (      IOException e) {
        try {
          admin.createTable(hTableDescriptor);
        }
 catch (        IOException e1) {
          logger.error("String_Node_Str" + e.getMessage());
          throw new SchemaGenerationException(e,"String_Node_Str");
        }
      }
    }
  }
}