Program: 168818
Project: 168818
Buggy source:
@SuppressWarnings("String_Node_Str") private Map.Entry<TypedQuery<T>,KeysetExtractionObjectBuilder<T>> getObjectQuery(boolean normalQueryMode,Set<JoinNode> keyRestrictedLeftJoins){
  String queryString=getBaseQueryString();
  Class<?> expectedResultType;
  if (keysetExtraction) {
    expectedResultType=Object[].class;
  }
 else {
    expectedResultType=selectManager.getExpectedQueryResultType();
  }
  TypedQuery<T> query;
  if (normalQueryMode && isEmpty(keyRestrictedLeftJoins,EnumSet.noneOf(ClauseType.class))) {
    query=(TypedQuery<T>)em.createQuery(queryString,expectedResultType);
    parameterManager.parameterizeQuery(query);
  }
 else {
    TypedQuery<T> baseQuery=(TypedQuery<T>)em.createQuery(queryString,expectedResultType);
    Set<String> parameterListNames=parameterManager.getParameterListNames(baseQuery);
    List<String> keyRestrictedLeftJoinAliases=getKeyRestrictedLeftJoinAliases(baseQuery,keyRestrictedLeftJoins,EnumSet.noneOf(ClauseType.class));
    List<EntityFunctionNode> entityFunctionNodes=getEntityFunctionNodes(baseQuery);
    boolean shouldRenderCteNodes=renderCteNodes(false);
    List<CTENode> ctes=shouldRenderCteNodes ? getCteNodes(baseQuery,false) : Collections.EMPTY_LIST;
    QuerySpecification querySpecification=new CustomQuerySpecification(this,baseQuery,parameterListNames,null,null,keyRestrictedLeftJoinAliases,entityFunctionNodes,mainQuery.cteManager.isRecursive(),ctes,shouldRenderCteNodes);
    query=new CustomSQLTypedQuery<T>(querySpecification,baseQuery,(CommonQueryBuilder<?>)this,cbf.getExtendedQuerySupport(),parameterManager.getValuesParameters(),parameterManager.getValuesBinders());
    parameterManager.parameterizeQuery(query);
  }
  KeysetExtractionObjectBuilder<T> objectBuilder=null;
  ObjectBuilder<T> transformerObjectBuilder=selectManager.getSelectObjectBuilder();
  if (keysetExtraction) {
    int keysetSize=orderByManager.getOrderByCount();
    if (transformerObjectBuilder == null) {
      objectBuilder=new KeysetExtractionObjectBuilder<T>(keysetSize);
    }
 else {
      objectBuilder=new DelegatingKeysetExtractionObjectBuilder<T>(transformerObjectBuilder,keysetSize);
    }
    transformerObjectBuilder=objectBuilder;
  }
  if (transformerObjectBuilder != null) {
    for (    QueryTransformer transformer : cbf.getQueryTransformers()) {
      query=transformer.transformQuery((TypedQuery<T>)query,transformerObjectBuilder);
    }
  }
  return new AbstractMap.SimpleEntry<TypedQuery<T>,KeysetExtractionObjectBuilder<T>>(query,objectBuilder);
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") private Map.Entry<TypedQuery<T>,KeysetExtractionObjectBuilder<T>> getObjectQuery(boolean normalQueryMode,Set<JoinNode> keyRestrictedLeftJoins){
  String queryString=getBaseQueryString();
  Class<?> expectedResultType;
  if (keysetExtraction) {
    expectedResultType=Object[].class;
  }
 else {
    expectedResultType=selectManager.getExpectedQueryResultType();
  }
  TypedQuery<T> query;
  if (normalQueryMode && isEmpty(keyRestrictedLeftJoins,EnumSet.noneOf(ClauseType.class))) {
    query=(TypedQuery<T>)em.createQuery(queryString,expectedResultType);
    parameterManager.parameterizeQuery(query);
  }
 else {
    TypedQuery<T> baseQuery=(TypedQuery<T>)em.createQuery(queryString,expectedResultType);
    Set<String> parameterListNames=parameterManager.getParameterListNames(baseQuery);
    List<String> keyRestrictedLeftJoinAliases=getKeyRestrictedLeftJoinAliases(baseQuery,keyRestrictedLeftJoins,EnumSet.noneOf(ClauseType.class));
    List<EntityFunctionNode> entityFunctionNodes=getEntityFunctionNodes(baseQuery);
    boolean shouldRenderCteNodes=renderCteNodes(false);
    List<CTENode> ctes=shouldRenderCteNodes ? getCteNodes(baseQuery,false) : Collections.EMPTY_LIST;
    QuerySpecification querySpecification=new CustomQuerySpecification(this,baseQuery,parameterListNames,null,null,keyRestrictedLeftJoinAliases,entityFunctionNodes,mainQuery.cteManager.isRecursive(),ctes,shouldRenderCteNodes);
    query=new CustomSQLTypedQuery<T>(querySpecification,baseQuery,(CommonQueryBuilder<?>)this,cbf.getExtendedQuerySupport(),parameterManager.getValuesParameters(),parameterManager.getValuesBinders());
    parameterManager.parameterizeQuery(query);
  }
  KeysetExtractionObjectBuilder<T> objectBuilder=null;
  ObjectBuilder<T> transformerObjectBuilder=selectManager.getSelectObjectBuilder();
  if (keysetExtraction) {
    int keysetSize=orderByManager.getOrderByCount();
    if (transformerObjectBuilder == null) {
      objectBuilder=new KeysetExtractionObjectBuilder<T>(keysetSize,keysetMode);
    }
 else {
      objectBuilder=new DelegatingKeysetExtractionObjectBuilder<T>(transformerObjectBuilder,keysetSize,keysetMode);
    }
    transformerObjectBuilder=objectBuilder;
  }
  if (transformerObjectBuilder != null) {
    for (    QueryTransformer transformer : cbf.getQueryTransformers()) {
      query=transformer.transformQuery((TypedQuery<T>)query,transformerObjectBuilder);
    }
  }
  return new AbstractMap.SimpleEntry<TypedQuery<T>,KeysetExtractionObjectBuilder<T>>(query,objectBuilder);
}