Program: 27163
Project: 27163
Buggy source:
public static String getLoadFromCursorDefinitionField(ProcessorManager processorManager,String columnFieldType,String columnFieldName,String columnName,String foreignColumnName,TypeElement modelType,boolean hasTypeConverter,boolean isModelContainerDefinition,boolean isFieldModelContainer){
  AdapterQueryBuilder queryBuilder=new AdapterQueryBuilder().appendVariable(isModelContainerDefinition);
  if (isFieldModelContainer) {
    queryBuilder.append("String_Node_Str").append(columnFieldName);
  }
  if (isModelContainerDefinition) {
    queryBuilder.appendPut(columnFieldName);
  }
 else   if (isFieldModelContainer) {
    queryBuilder.appendPut(foreignColumnName);
  }
 else {
    queryBuilder.append("String_Node_Str").append(columnFieldName).appendSpaceSeparated("String_Node_Str");
  }
  String newFieldType;
  if (hasTypeConverter) {
    TypeConverterDefinition typeConverterDefinition=processorManager.getTypeConverterDefinition(modelType);
    newFieldType=typeConverterDefinition.getDbElement().asType().toString();
  }
 else {
    newFieldType=columnFieldType;
  }
  String cursorStatment=ModelUtils.getCursorStatement(newFieldType,columnName);
  if (hasTypeConverter && !isModelContainerDefinition) {
    queryBuilder.appendTypeConverter(columnFieldType,columnFieldType,true);
  }
  queryBuilder.append(cursorStatment);
  if (hasTypeConverter && !isModelContainerDefinition) {
    queryBuilder.append("String_Node_Str");
  }
 else   if (isModelContainerDefinition || isFieldModelContainer) {
    queryBuilder.append("String_Node_Str");
  }
  return queryBuilder.getQuery();
}

Fixed version (ground truth):
public static String getLoadFromCursorDefinitionField(ProcessorManager processorManager,String columnFieldType,String columnFieldName,String columnName,String foreignColumnName,TypeElement modelType,boolean hasTypeConverter,boolean isModelContainerDefinition,boolean isFieldModelContainer){
  AdapterQueryBuilder queryBuilder=new AdapterQueryBuilder().appendVariable(isModelContainerDefinition);
  if (isFieldModelContainer) {
    queryBuilder.append("String_Node_Str").append(columnFieldName);
  }
  if (isModelContainerDefinition) {
    queryBuilder.appendPut(columnFieldName);
  }
 else   if (isFieldModelContainer) {
    queryBuilder.appendPut(foreignColumnName);
  }
 else {
    queryBuilder.append("String_Node_Str").append(columnFieldName).appendSpaceSeparated("String_Node_Str");
  }
  String newFieldType=null;
  if (hasTypeConverter) {
    TypeConverterDefinition typeConverterDefinition=processorManager.getTypeConverterDefinition(modelType);
    if (typeConverterDefinition != null) {
      newFieldType=typeConverterDefinition.getDbElement().asType().toString();
    }
  }
 else {
    newFieldType=columnFieldType;
  }
  String cursorStatment=ModelUtils.getCursorStatement(newFieldType,columnName);
  if (hasTypeConverter && !isModelContainerDefinition) {
    queryBuilder.appendTypeConverter(columnFieldType,columnFieldType,true);
  }
  queryBuilder.append(cursorStatment);
  if (hasTypeConverter && !isModelContainerDefinition) {
    queryBuilder.append("String_Node_Str");
  }
 else   if (isModelContainerDefinition || isFieldModelContainer) {
    queryBuilder.append("String_Node_Str");
  }
  return queryBuilder.getQuery();
}