Program: 150505
Project: 150505
Buggy source:
@SuppressWarnings("String_Node_Str") public static void main(Configuration configuration) throws Exception {
  Jdbc j=configuration.getJdbc();
  org.jooq.util.jaxb.Generator g=configuration.getGenerator();
  if (g.getStrategy() == null)   g.setStrategy(new Strategy());
  if (g.getTarget() == null)   g.setTarget(new Target());
  Class.forName(j.getDriver());
  Connection connection=null;
  try {
    Properties properties=new Properties();
    for (    Property p : j.getProperties()) {
      properties.put(p.getKey(),p.getValue());
    }
    if (!properties.containsKey("String_Node_Str"))     properties.put("String_Node_Str",defaultString(j.getUser()));
    if (!properties.containsKey("String_Node_Str"))     properties.put("String_Node_Str",defaultString(j.getPassword()));
    connection=DriverManager.getConnection(defaultString(j.getUrl()),properties);
    Class<Generator> generatorClass=(Class<Generator>)(!isBlank(g.getName()) ? Class.forName(trim(g.getName())) : DefaultGenerator.class);
    Generator generator=generatorClass.newInstance();
    Class<GeneratorStrategy> strategyClass=(Class<GeneratorStrategy>)(!isBlank(g.getStrategy().getName()) ? Class.forName(trim(g.getStrategy().getName())) : DefaultGeneratorStrategy.class);
    GeneratorStrategy strategy=strategyClass.newInstance();
    generator.setStrategy(strategy);
    Class<Database> databaseClass=(Class<Database>)Class.forName(trim(g.getDatabase().getName()));
    Database database=databaseClass.newInstance();
    List<Schema> schemata=g.getDatabase().getSchemata();
    if (schemata.isEmpty()) {
      Schema schema=new Schema();
      schema.setInputSchema(trim(g.getDatabase().getInputSchema()));
      schema.setOutputSchema(trim(g.getDatabase().getOutputSchema()));
      schemata.add(schema);
    }
 else {
      if (!StringUtils.isBlank(g.getDatabase().getInputSchema())) {
        log.warn("String_Node_Str");
      }
      if (!StringUtils.isBlank(g.getDatabase().getOutputSchema())) {
        log.warn("String_Node_Str");
      }
    }
    for (    Schema schema : schemata) {
      if (StringUtils.isBlank(schema.getInputSchema())) {
        if (!StringUtils.isBlank(j.getSchema())) {
          log.warn("String_Node_Str");
        }
        schema.setInputSchema(trim(j.getSchema()));
      }
      if (StringUtils.isBlank(schema.getOutputSchema())) {
        schema.setOutputSchema(trim(schema.getInputSchema()));
      }
    }
    if (schemata.size() == 1) {
      if (StringUtils.isBlank(schemata.get(0).getInputSchema())) {
        log.info("String_Node_Str");
      }
    }
    database.setConnection(connection);
    database.setConfiguredSchemata(schemata);
    database.setIncludes(defaultString(g.getDatabase().getIncludes()).split("String_Node_Str"));
    database.setExcludes(defaultString(g.getDatabase().getExcludes()).split("String_Node_Str"));
    database.setConfiguredMasterDataTables(g.getDatabase().getMasterDataTables());
    database.setConfiguredCustomTypes(g.getDatabase().getCustomTypes());
    database.setConfiguredEnumTypes(g.getDatabase().getEnumTypes());
    database.setConfiguredForcedTypes(g.getDatabase().getForcedTypes());
    if (g.getDatabase().getEnumTypes().size() > 0) {
      log.warn("String_Node_Str");
    }
    if (g.getDatabase().isDateAsTimestamp() != null)     database.setDateAsTimestamp(g.getDatabase().isDateAsTimestamp());
    if (g.getDatabase().isUnsignedTypes() != null)     database.setSupportsUnsignedTypes(g.getDatabase().isUnsignedTypes());
    if (StringUtils.isBlank(g.getTarget().getPackageName()))     g.getTarget().setPackageName("String_Node_Str");
    if (StringUtils.isBlank(g.getTarget().getDirectory()))     g.getTarget().setPackageName("String_Node_Str");
    generator.setTargetPackage(g.getTarget().getPackageName());
    generator.setTargetDirectory(g.getTarget().getDirectory());
    if (g.getGenerate().isRelations() != null)     generator.setGenerateRelations(g.getGenerate().isRelations());
    if (g.getGenerate().isNavigationMethods() != null)     generator.setGenerateNavigationMethods(g.getGenerate().isNavigationMethods());
    if (g.getGenerate().isDeprecated() != null)     generator.setGenerateDeprecated(g.getGenerate().isDeprecated());
    if (g.getGenerate().isInstanceFields() != null)     generator.setGenerateInstanceFields(g.getGenerate().isInstanceFields());
    if (g.getGenerate().isGeneratedAnnotation() != null)     generator.setGenerateGeneratedAnnotation(g.getGenerate().isGeneratedAnnotation());
    if (g.getGenerate().isPojos() != null)     generator.setGeneratePojos(g.getGenerate().isPojos());
    if (g.getGenerate().isRecords() != null)     generator.setGenerateRecords(g.getGenerate().isRecords());
    if (g.getGenerate().isJpaAnnotations() != null)     generator.setGenerateJPAAnnotations(g.getGenerate().isJpaAnnotations());
    if (g.getGenerate().isValidationAnnotations() != null)     generator.setGenerateValidationAnnotations(g.getGenerate().isValidationAnnotations());
    strategy.setInstanceFields(generator.generateInstanceFields());
    generator.generate(database);
  }
 catch (  Exception e) {
    e.printStackTrace();
    throw e;
  }
 finally {
    if (connection != null) {
      connection.close();
    }
  }
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") public static void main(Configuration configuration) throws Exception {
  Jdbc j=configuration.getJdbc();
  org.jooq.util.jaxb.Generator g=configuration.getGenerator();
  if (g.getStrategy() == null)   g.setStrategy(new Strategy());
  if (g.getTarget() == null)   g.setTarget(new Target());
  Class.forName(j.getDriver());
  Connection connection=null;
  try {
    Properties properties=new Properties();
    for (    Property p : j.getProperties()) {
      properties.put(p.getKey(),p.getValue());
    }
    if (!properties.containsKey("String_Node_Str"))     properties.put("String_Node_Str",defaultString(j.getUser()));
    if (!properties.containsKey("String_Node_Str"))     properties.put("String_Node_Str",defaultString(j.getPassword()));
    connection=DriverManager.getConnection(defaultString(j.getUrl()),properties);
    Class<Generator> generatorClass=(Class<Generator>)(!isBlank(g.getName()) ? Class.forName(trim(g.getName())) : DefaultGenerator.class);
    Generator generator=generatorClass.newInstance();
    Class<GeneratorStrategy> strategyClass=(Class<GeneratorStrategy>)(!isBlank(g.getStrategy().getName()) ? Class.forName(trim(g.getStrategy().getName())) : DefaultGeneratorStrategy.class);
    GeneratorStrategy strategy=strategyClass.newInstance();
    generator.setStrategy(strategy);
    Class<Database> databaseClass=(Class<Database>)Class.forName(trim(g.getDatabase().getName()));
    Database database=databaseClass.newInstance();
    List<Schema> schemata=g.getDatabase().getSchemata();
    if (schemata.isEmpty()) {
      Schema schema=new Schema();
      schema.setInputSchema(trim(g.getDatabase().getInputSchema()));
      schema.setOutputSchema(trim(g.getDatabase().getOutputSchema()));
      schemata.add(schema);
    }
 else {
      if (!StringUtils.isBlank(g.getDatabase().getInputSchema())) {
        log.warn("String_Node_Str");
      }
      if (!StringUtils.isBlank(g.getDatabase().getOutputSchema())) {
        log.warn("String_Node_Str");
      }
    }
    for (    Schema schema : schemata) {
      if (StringUtils.isBlank(schema.getInputSchema())) {
        if (!StringUtils.isBlank(j.getSchema())) {
          log.warn("String_Node_Str");
        }
        schema.setInputSchema(trim(j.getSchema()));
      }
      if (StringUtils.isBlank(schema.getOutputSchema())) {
        schema.setOutputSchema(trim(schema.getInputSchema()));
      }
    }
    if (schemata.size() == 1) {
      if (StringUtils.isBlank(schemata.get(0).getInputSchema())) {
        log.info("String_Node_Str");
      }
    }
    database.setConnection(connection);
    database.setConfiguredSchemata(schemata);
    database.setIncludes(defaultString(g.getDatabase().getIncludes()).split("String_Node_Str"));
    database.setExcludes(defaultString(g.getDatabase().getExcludes()).split("String_Node_Str"));
    database.setConfiguredMasterDataTables(g.getDatabase().getMasterDataTables());
    database.setConfiguredCustomTypes(g.getDatabase().getCustomTypes());
    database.setConfiguredEnumTypes(g.getDatabase().getEnumTypes());
    database.setConfiguredForcedTypes(g.getDatabase().getForcedTypes());
    if (g.getDatabase().getEnumTypes().size() > 0) {
      log.warn("String_Node_Str");
    }
    if (g.getDatabase().isDateAsTimestamp() != null)     database.setDateAsTimestamp(g.getDatabase().isDateAsTimestamp());
    if (g.getDatabase().isUnsignedTypes() != null)     database.setSupportsUnsignedTypes(g.getDatabase().isUnsignedTypes());
    if (StringUtils.isBlank(g.getTarget().getPackageName()))     g.getTarget().setPackageName("String_Node_Str");
    if (StringUtils.isBlank(g.getTarget().getDirectory()))     g.getTarget().setDirectory("String_Node_Str");
    generator.setTargetPackage(g.getTarget().getPackageName());
    generator.setTargetDirectory(g.getTarget().getDirectory());
    if (g.getGenerate().isRelations() != null)     generator.setGenerateRelations(g.getGenerate().isRelations());
    if (g.getGenerate().isNavigationMethods() != null)     generator.setGenerateNavigationMethods(g.getGenerate().isNavigationMethods());
    if (g.getGenerate().isDeprecated() != null)     generator.setGenerateDeprecated(g.getGenerate().isDeprecated());
    if (g.getGenerate().isInstanceFields() != null)     generator.setGenerateInstanceFields(g.getGenerate().isInstanceFields());
    if (g.getGenerate().isGeneratedAnnotation() != null)     generator.setGenerateGeneratedAnnotation(g.getGenerate().isGeneratedAnnotation());
    if (g.getGenerate().isPojos() != null)     generator.setGeneratePojos(g.getGenerate().isPojos());
    if (g.getGenerate().isRecords() != null)     generator.setGenerateRecords(g.getGenerate().isRecords());
    if (g.getGenerate().isJpaAnnotations() != null)     generator.setGenerateJPAAnnotations(g.getGenerate().isJpaAnnotations());
    if (g.getGenerate().isValidationAnnotations() != null)     generator.setGenerateValidationAnnotations(g.getGenerate().isValidationAnnotations());
    strategy.setInstanceFields(generator.generateInstanceFields());
    generator.generate(database);
  }
 catch (  Exception e) {
    e.printStackTrace();
    throw e;
  }
 finally {
    if (connection != null) {
      connection.close();
    }
  }
}