Program: 168625
Project: 168625
Buggy source:
@SuppressWarnings("String_Node_Str") @Override public List<AlarmDefinition> find(String tenantId,String name,Map<String,String> dimensions,List<String> sortBy,String offset,int limit){
  try (Handle h=db.open()){
    String query="String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str";
    StringBuilder sbWhere=new StringBuilder();
    if (name != null) {
      sbWhere.append("String_Node_Str");
    }
    String orderByPart="String_Node_Str";
    if (sortBy != null && !sortBy.isEmpty()) {
      orderByPart="String_Node_Str" + COMMA_JOINER.join(sortBy);
      if (!orderByPart.contains("String_Node_Str")) {
        orderByPart=orderByPart + "String_Node_Str";
      }
    }
 else {
      orderByPart="String_Node_Str";
    }
    String limitPart="String_Node_Str";
    if (limit > 0) {
      limitPart="String_Node_Str";
    }
    String offsetPart="String_Node_Str";
    if (offset != null) {
      offsetPart="String_Node_Str" + offset + ' ';
    }
    String sql=String.format(query,SubAlarmDefinitionQueries.buildJoinClauseFor(dimensions),sbWhere,orderByPart,limitPart,offsetPart);
    Query<?> q=h.createQuery(sql);
    q.bind("String_Node_Str",tenantId);
    if (name != null) {
      q.bind("String_Node_Str",name);
    }
    if (limit > 0) {
      q.bind("String_Node_Str",limit + 1);
    }
    q.registerMapper(new AlarmDefinitionMapper());
    q=q.mapTo(AlarmDefinition.class);
    DimensionQueries.bindDimensionsToQuery(q,dimensions);
    List<AlarmDefinition> resultSet=(List<AlarmDefinition>)q.list();
    return resultSet;
  }
 }

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") @Override public List<AlarmDefinition> find(String tenantId,String name,Map<String,String> dimensions,List<String> sortBy,String offset,int limit){
  try (Handle h=db.open()){
    String query="String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str";
    StringBuilder sbWhere=new StringBuilder();
    if (name != null) {
      sbWhere.append("String_Node_Str");
    }
    String orderByPart="String_Node_Str";
    if (sortBy != null && !sortBy.isEmpty()) {
      orderByPart="String_Node_Str" + COMMA_JOINER.join(sortBy);
      if (!orderByPart.contains("String_Node_Str")) {
        orderByPart=orderByPart + "String_Node_Str";
      }
    }
 else {
      orderByPart="String_Node_Str";
    }
    String limitPart="String_Node_Str";
    if (limit > 0) {
      limitPart="String_Node_Str";
    }
    String offsetPart="String_Node_Str";
    if (offset != null) {
      offsetPart="String_Node_Str" + offset + ' ';
    }
    String sql=String.format(query,SubAlarmDefinitionQueries.buildJoinClauseFor(dimensions),sbWhere,orderByPart,limitPart,offsetPart);
    Query<?> q=h.createQuery(sql);
    q.bind("String_Node_Str",tenantId);
    if (name != null) {
      q.bind("String_Node_Str",name);
    }
    if (limit > 0) {
      q.bind("String_Node_Str",limit + 1);
    }
    q.registerMapper(new AlarmDefinitionMapper());
    q=q.mapTo(AlarmDefinition.class);
    SubAlarmDefinitionQueries.bindDimensionsToQuery(q,dimensions);
    List<AlarmDefinition> resultSet=(List<AlarmDefinition>)q.list();
    return resultSet;
  }
 }