Program: 27166
Project: 27166
Buggy source:
private void writeConstructor(JavaWriter javaWriter) throws IOException {
  javaWriter.emitEmptyLine();
  javaWriter.beginConstructor(Sets.newHashSet(Modifier.PUBLIC),"String_Node_Str","String_Node_Str");
  for (  TableDefinition tableDefinition : manager.getTableDefinitions(databaseName)) {
    javaWriter.emitStatement("String_Node_Str",ModelUtils.getFieldClass(tableDefinition.getQualifiedModelClassName()));
  }
  for (  ModelViewDefinition modelViewDefinition : manager.getModelViewDefinitions(databaseName)) {
    javaWriter.emitStatement("String_Node_Str",ModelUtils.getFieldClass(modelViewDefinition.getFullyQualifiedModelClassName()));
  }
  javaWriter.emitEmptyLine();
  javaWriter.emitSingleLineComment("String_Node_Str");
  Map<Integer,List<MigrationDefinition>> migrationDefinitionMap=manager.getMigrationsForDatabase(databaseName);
  if (migrationDefinitionMap != null && !migrationDefinitionMap.isEmpty()) {
    List<Integer> versionSet=new ArrayList<>(migrationDefinitionMap.keySet());
    Collections.sort(versionSet);
    for (    Integer version : versionSet) {
      List<MigrationDefinition> migrationDefinitions=migrationDefinitionMap.get(version);
      javaWriter.emitStatement("String_Node_Str",Classes.MIGRATION,version);
      javaWriter.emitStatement("String_Node_Str",FlowManagerHandler.MIGRATION_FIELD_NAME,version,"String_Node_Str",version);
      for (      MigrationDefinition migrationDefinition : migrationDefinitions) {
        javaWriter.emitStatement("String_Node_Str","String_Node_Str",version,migrationDefinition.getSourceFileName());
      }
    }
  }
  javaWriter.emitSingleLineComment("String_Node_Str");
  javaWriter.emitEmptyLine();
  for (  TableDefinition tableDefinition : manager.getTableDefinitions(databaseName)) {
    javaWriter.emitStatement(FlowManagerHandler.MODEL_FIELD_NAME + "String_Node_Str",ModelUtils.getFieldClass(tableDefinition.getQualifiedModelClassName()));
    javaWriter.emitStatement(FlowManagerHandler.MODEL_ADAPTER_MAP_FIELD_NAME + "String_Node_Str",ModelUtils.getFieldClass(tableDefinition.getQualifiedModelClassName()),tableDefinition.getQualifiedAdapterClassName());
  }
  for (  ModelContainerDefinition modelContainerDefinition : manager.getModelContainers(databaseName)) {
    javaWriter.emitStatement(FlowManagerHandler.MODEL_CONTAINER_ADAPTER_MAP_FIELD_NAME + "String_Node_Str",ModelUtils.getFieldClass(modelContainerDefinition.getModelClassQualifiedName()),modelContainerDefinition.getSourceFileName());
  }
  for (  ModelViewDefinition modelViewDefinition : manager.getModelViewDefinitions(databaseName)) {
    javaWriter.emitStatement(FlowManagerHandler.MODEL_VIEW_FIELD_NAME + "String_Node_Str",ModelUtils.getFieldClass(modelViewDefinition.getFullyQualifiedModelClassName()));
    javaWriter.emitStatement(FlowManagerHandler.MODEL_VIEW_ADAPTER_MAP_FIELD_NAME + "String_Node_Str",ModelUtils.getFieldClass(modelViewDefinition.getFullyQualifiedModelClassName()),modelViewDefinition.getSourceFileName());
  }
  javaWriter.endConstructor();
}

Fixed version (ground truth):
private void writeConstructor(JavaWriter javaWriter) throws IOException {
  javaWriter.emitEmptyLine();
  javaWriter.beginConstructor(Sets.newHashSet(Modifier.PUBLIC),"String_Node_Str","String_Node_Str");
  javaWriter.emitSingleLineComment("String_Node_Str" + databaseName);
  for (  TableDefinition tableDefinition : manager.getTableDefinitions(databaseName)) {
    javaWriter.emitStatement("String_Node_Str",ModelUtils.getFieldClass(tableDefinition.getQualifiedModelClassName()));
  }
  for (  ModelViewDefinition modelViewDefinition : manager.getModelViewDefinitions(databaseName)) {
    javaWriter.emitStatement("String_Node_Str",ModelUtils.getFieldClass(modelViewDefinition.getFullyQualifiedModelClassName()));
  }
  javaWriter.emitEmptyLine();
  javaWriter.emitSingleLineComment("String_Node_Str");
  Map<Integer,List<MigrationDefinition>> migrationDefinitionMap=manager.getMigrationsForDatabase(databaseName);
  if (migrationDefinitionMap != null && !migrationDefinitionMap.isEmpty()) {
    List<Integer> versionSet=new ArrayList<>(migrationDefinitionMap.keySet());
    Collections.sort(versionSet);
    for (    Integer version : versionSet) {
      List<MigrationDefinition> migrationDefinitions=migrationDefinitionMap.get(version);
      javaWriter.emitStatement("String_Node_Str",Classes.MIGRATION,version);
      javaWriter.emitStatement("String_Node_Str",FlowManagerHandler.MIGRATION_FIELD_NAME,version,"String_Node_Str",version);
      for (      MigrationDefinition migrationDefinition : migrationDefinitions) {
        javaWriter.emitStatement("String_Node_Str","String_Node_Str",version,migrationDefinition.getSourceFileName());
      }
    }
  }
  javaWriter.emitSingleLineComment("String_Node_Str");
  javaWriter.emitEmptyLine();
  for (  TableDefinition tableDefinition : manager.getTableDefinitions(databaseName)) {
    javaWriter.emitStatement(FlowManagerHandler.MODEL_FIELD_NAME + "String_Node_Str",ModelUtils.getFieldClass(tableDefinition.getQualifiedModelClassName()));
    javaWriter.emitStatement(FlowManagerHandler.MODEL_ADAPTER_MAP_FIELD_NAME + "String_Node_Str",ModelUtils.getFieldClass(tableDefinition.getQualifiedModelClassName()),tableDefinition.getQualifiedAdapterClassName());
  }
  for (  ModelContainerDefinition modelContainerDefinition : manager.getModelContainers(databaseName)) {
    javaWriter.emitStatement(FlowManagerHandler.MODEL_CONTAINER_ADAPTER_MAP_FIELD_NAME + "String_Node_Str",ModelUtils.getFieldClass(modelContainerDefinition.getModelClassQualifiedName()),modelContainerDefinition.getSourceFileName());
  }
  for (  ModelViewDefinition modelViewDefinition : manager.getModelViewDefinitions(databaseName)) {
    javaWriter.emitStatement(FlowManagerHandler.MODEL_VIEW_FIELD_NAME + "String_Node_Str",ModelUtils.getFieldClass(modelViewDefinition.getFullyQualifiedModelClassName()));
    javaWriter.emitStatement(FlowManagerHandler.MODEL_VIEW_ADAPTER_MAP_FIELD_NAME + "String_Node_Str",ModelUtils.getFieldClass(modelViewDefinition.getFullyQualifiedModelClassName()),modelViewDefinition.getSourceFileName());
  }
  javaWriter.endConstructor();
}