Program: 176327
Project: 176327
Buggy source:
/** 
 * Generates schema for Collection columns 
 * @param translator
 * @param collectionColumnInfos
 * @param queryBuilder
 */
private void onCollectionColumns(CQLTranslator translator,List<CollectionColumnInfo> collectionColumnInfos,StringBuilder queryBuilder){
  for (  CollectionColumnInfo cci : collectionColumnInfos) {
    String dataType=CassandraValidationClassMapper.getValidationClass(cci.getType(),true);
    String collectionCqlType=translator.getCQLType(dataType);
    String collectionColumnName=new String(cci.getCollectionColumnName());
    StringBuilder genericTypesBuilder=null;
    List<Class<?>> genericClasses=cci.getGenericClasses();
    if (!genericClasses.isEmpty()) {
      genericTypesBuilder=new StringBuilder();
      if (MapType.class.getSimpleName().equals(dataType) && genericClasses.size() == 2) {
        genericTypesBuilder.append("String_Node_Str");
        String keyDataType=CassandraValidationClassMapper.getValidationClass(genericClasses.get(0),true);
        genericTypesBuilder.append(translator.getCQLType(keyDataType));
        genericTypesBuilder.append("String_Node_Str");
        String valueDataType=CassandraValidationClassMapper.getValidationClass(genericClasses.get(1),true);
        genericTypesBuilder.append(translator.getCQLType(valueDataType));
        genericTypesBuilder.append("String_Node_Str");
      }
 else       if ((ListType.class.getSimpleName().equals(dataType) || SetType.class.getSimpleName().equals(dataType)) && genericClasses.size() == 1) {
        genericTypesBuilder.append("String_Node_Str");
        String valueDataType=CassandraValidationClassMapper.getValidationClass(genericClasses.get(0),true);
        genericTypesBuilder.append(translator.getCQLType(valueDataType));
        genericTypesBuilder.append("String_Node_Str");
      }
 else {
        throw new SchemaGenerationException("String_Node_Str" + cci.getCollectionColumnName() + "String_Node_Str");
      }
    }
    if (genericTypesBuilder != null) {
      collectionCqlType+=genericTypesBuilder.toString();
    }
    translator.appendColumnName(queryBuilder,collectionColumnName,collectionCqlType);
    queryBuilder.append("String_Node_Str");
  }
}

Fixed version (ground truth):
/** 
 * Generates schema for Collection columns
 * @param translator
 * @param collectionColumnInfos
 * @param queryBuilder
 */
private void onCollectionColumns(CQLTranslator translator,List<CollectionColumnInfo> collectionColumnInfos,StringBuilder queryBuilder){
  for (  CollectionColumnInfo cci : collectionColumnInfos) {
    String dataType=CassandraValidationClassMapper.getValidationClass(cci.getType(),true);
    String collectionCqlType=translator.getCQLType(dataType);
    String collectionColumnName=new String(cci.getCollectionColumnName());
    StringBuilder genericTypesBuilder=null;
    List<Class<?>> genericClasses=cci.getGenericClasses();
    if (!genericClasses.isEmpty()) {
      genericTypesBuilder=new StringBuilder();
      if (MapType.class.getSimpleName().equals(dataType) && genericClasses.size() == 2) {
        genericTypesBuilder.append("String_Node_Str");
        String keyDataType=CassandraValidationClassMapper.getValidationClass(genericClasses.get(0),true);
        genericTypesBuilder.append(translator.getCQLType(keyDataType));
        genericTypesBuilder.append("String_Node_Str");
        String valueDataType=CassandraValidationClassMapper.getValidationClass(genericClasses.get(1),true);
        genericTypesBuilder.append(translator.getCQLType(valueDataType));
        genericTypesBuilder.append("String_Node_Str");
      }
 else       if ((ListType.class.getSimpleName().equals(dataType) || SetType.class.getSimpleName().equals(dataType)) && genericClasses.size() == 1) {
        genericTypesBuilder.append("String_Node_Str");
        String valueDataType=CassandraValidationClassMapper.getValidationClass(genericClasses.get(0),true);
        genericTypesBuilder.append(translator.getCQLType(valueDataType));
        genericTypesBuilder.append("String_Node_Str");
      }
 else {
        throw new SchemaGenerationException("String_Node_Str" + cci.getCollectionColumnName() + "String_Node_Str");
      }
    }
    if (genericTypesBuilder != null) {
      collectionCqlType+=genericTypesBuilder.toString();
    }
    translator.appendColumnName(queryBuilder,collectionColumnName,collectionCqlType);
    queryBuilder.append("String_Node_Str");
  }
}