Program: 39104
Project: 39104
Buggy source:
private String getInferenceText(String inferenceName,String vector,Long kpiId,KPISentiment sentiment,String schedule,Object[] values,boolean isComparison,String resultOutputType){
  boolean zeroVal=false;
  String messageId="String_Node_Str";
  String zeroValCode="String_Node_Str";
  if (isComparison) {
    for (int i=0; i < values.length; i++) {
      if (resultOutputType.toLowerCase().contains(ResultOutputType.TIMERESULTOUTPUT.toString())) {
        if (values[i] instanceof Long && (Long)values[i] > 0) {
          Long result=(Long)values[i];
          Long secVal=TimeUnit.MILLISECONDS.toSeconds(result.longValue());
          values[i]=secVal;
          zeroValCode=zeroValCode + "String_Node_Str";
        }
 else {
          zeroVal=true;
          zeroValCode=zeroValCode + "String_Node_Str";
        }
      }
 else       if (values[i] instanceof Long) {
        if ((Long)values[i] == 0) {
          zeroVal=true;
          zeroValCode=zeroValCode + "String_Node_Str";
        }
 else {
          zeroValCode=zeroValCode + "String_Node_Str";
        }
      }
    }
  }
 else {
    messageId=vector.toLowerCase() + "String_Node_Str" + kpiId+ "String_Node_Str"+ KPISentiment.NEUTRAL.toString()+ "String_Node_Str"+ schedule.toLowerCase();
  }
  if (zeroVal) {
    messageId=vector.toLowerCase() + "String_Node_Str" + kpiId+ "String_Node_Str"+ sentiment.toString()+ "String_Node_Str"+ schedule.toLowerCase()+ "String_Node_Str"+ zeroValCode;
  }
 else {
    messageId=vector.toLowerCase() + "String_Node_Str" + kpiId+ "String_Node_Str"+ sentiment.toString()+ "String_Node_Str"+ schedule.toLowerCase();
  }
  String inferenceText=messageSource.getMessage(messageId,values,Locale.getDefault());
  return inferenceText;
}

Fixed version (ground truth):
private String getInferenceText(String inferenceName,String vector,Long kpiId,KPISentiment sentiment,String schedule,Object[] values,boolean isComparison,String resultOutputType){
  boolean zeroVal=false;
  String messageId="String_Node_Str";
  String zeroValCode="String_Node_Str";
  String msgZeroCode="String_Node_Str";
  if (isComparison) {
    for (int i=0; i < values.length; i++) {
      if (resultOutputType.toLowerCase().contains(ResultOutputType.TIMERESULTOUTPUT.toString())) {
        if (values[i] instanceof Long && (Long)values[i] > 0) {
          Long result=(Long)values[i];
          Long secVal=TimeUnit.MILLISECONDS.toSeconds(result.longValue());
          values[i]=secVal;
          zeroValCode=zeroValCode + "String_Node_Str";
        }
 else {
          zeroVal=true;
          zeroValCode=zeroValCode + "String_Node_Str";
        }
      }
 else       if (values[i] instanceof Long) {
        if ((Long)values[i] == 0) {
          zeroVal=true;
          zeroValCode=zeroValCode + "String_Node_Str";
        }
 else {
          zeroValCode=zeroValCode + "String_Node_Str";
        }
      }
    }
  }
 else {
    messageId=vector.toLowerCase() + "String_Node_Str" + kpiId+ "String_Node_Str"+ KPISentiment.NEUTRAL.toString()+ "String_Node_Str"+ schedule.toLowerCase();
  }
  if (zeroVal && !zeroValCode.equals(InsightsMessageEnum.NEUTRALVALZERO.toString()) && !zeroValCode.equals(InsightsMessageEnum.PREVIOUSVALZERO.toString())) {
    if (zeroValCode.equals(InsightsMessageEnum.CURRENTVALZERO.toString())) {
      msgZeroCode=InsightsMessageEnum.ZEROVALMSG.toString();
    }
    messageId=vector.toLowerCase() + "String_Node_Str" + kpiId+ "String_Node_Str"+ sentiment.toString()+ "String_Node_Str"+ schedule.toLowerCase()+ "String_Node_Str"+ msgZeroCode;
  }
 else {
    messageId=vector.toLowerCase() + "String_Node_Str" + kpiId+ "String_Node_Str"+ sentiment.toString()+ "String_Node_Str"+ schedule.toLowerCase();
  }
  String inferenceText=messageSource.getMessage(messageId,values,Locale.getDefault());
  return inferenceText;
}