Program: 26909
Project: 26909
Buggy source:
@Override public CodeBlock getLoadFromCursorMethod(boolean isModelContainerAdapter){
  CodeBlock.Builder builder=CodeBlock.builder().add("String_Node_Str");
  CodeBlock.Builder ifNullBuilder=CodeBlock.builder().add("String_Node_Str");
  CodeBlock.Builder selectBuilder=CodeBlock.builder();
  for (int i=0; i < foreignKeyReferenceDefinitionList.size(); i++) {
    ForeignKeyReferenceDefinition referenceDefinition=foreignKeyReferenceDefinitionList.get(i);
    String indexName="String_Node_Str" + referenceDefinition.columnName;
    builder.addStatement("String_Node_Str",indexName,LoadFromCursorMethod.PARAM_CURSOR,referenceDefinition.columnName);
    if (i > 0) {
      ifNullBuilder.add("String_Node_Str");
    }
    ifNullBuilder.add("String_Node_Str",indexName,LoadFromCursorMethod.PARAM_CURSOR,indexName);
    selectBuilder.add("String_Node_Str",ClassName.get(referencedTableClassName.packageName(),referencedTableClassName.simpleName() + "String_Node_Str" + TableDefinition.DBFLOW_TABLE_TAG),referenceDefinition.foreignColumnName,LoadFromCursorMethod.PARAM_MODEL,columnAccess.getShortAccessString(elementName,isModelContainerAdapter) + "String_Node_Str" + referenceDefinition.columnAccess.getShortAccessString(referenceDefinition.foreignColumnName,isModelContainerAdapter));
  }
  ifNullBuilder.add("String_Node_Str");
  builder.beginControlFlow(ifNullBuilder.build().toString());
  builder.addStatement(columnAccess.setColumnAccessString(elementTypeName,elementName,elementName,isModelContainerAdapter,LoadFromCursorMethod.PARAM_MODEL,CodeBlock.builder().add("String_Node_Str",ClassNames.SELECT,referencedTableClassName).add(selectBuilder.build()).add("String_Node_Str").build().toString()));
  builder.endControlFlow();
  return builder.build();
}

Fixed version (ground truth):
@Override public CodeBlock getLoadFromCursorMethod(boolean isModelContainerAdapter){
  CodeBlock.Builder builder=CodeBlock.builder().add("String_Node_Str");
  CodeBlock.Builder ifNullBuilder=CodeBlock.builder().add("String_Node_Str");
  CodeBlock.Builder selectBuilder=CodeBlock.builder();
  for (int i=0; i < foreignKeyReferenceDefinitionList.size(); i++) {
    ForeignKeyReferenceDefinition referenceDefinition=foreignKeyReferenceDefinitionList.get(i);
    String indexName="String_Node_Str" + referenceDefinition.columnName;
    builder.addStatement("String_Node_Str",indexName,LoadFromCursorMethod.PARAM_CURSOR,referenceDefinition.columnName);
    if (i > 0) {
      ifNullBuilder.add("String_Node_Str");
    }
    ifNullBuilder.add("String_Node_Str",indexName,LoadFromCursorMethod.PARAM_CURSOR,indexName);
    selectBuilder.add("String_Node_Str",ClassName.get(referencedTableClassName.packageName(),referencedTableClassName.simpleName() + "String_Node_Str" + TableDefinition.DBFLOW_TABLE_TAG),referenceDefinition.foreignColumnName,ModelUtils.getVariable(isModelContainerAdapter),columnAccess.getShortAccessString(elementName,isModelContainerAdapter) + "String_Node_Str" + referenceDefinition.columnAccess.getShortAccessString(referenceDefinition.foreignColumnName,isModelContainerAdapter));
  }
  ifNullBuilder.add("String_Node_Str");
  builder.beginControlFlow(ifNullBuilder.build().toString());
  builder.addStatement(columnAccess.setColumnAccessString(elementTypeName,elementName,elementName,isModelContainerAdapter,ModelUtils.getVariable(isModelContainerAdapter),CodeBlock.builder().add("String_Node_Str",ClassNames.SELECT,referencedTableClassName).add(selectBuilder.build()).add("String_Node_Str").build().toString()));
  builder.endControlFlow();
  return builder.build();
}