Program: 167310
Project: 167310
Buggy source:
@Override public void flowCompleted(boolean cancelled){
  StringBuilder assertFailed=new StringBuilder();
  if (expectedControlMessageCount != controlMessageCount) {
    assertFailed.append(String.format("String_Node_Str",expectedControlMessageCount,controlMessageCount));
  }
  if (expectedEmptyPayloadMessageCount != emptyPayloadMessageCount) {
    assertFailed.append(String.format("String_Node_Str",expectedEmptyPayloadMessageCount,emptyPayloadMessageCount));
  }
  if (expectedEntityMessageCount != entityMessageCount) {
    assertFailed.append(String.format("String_Node_Str",expectedEntityMessageCount,entityMessageCount));
  }
  if (expectedTextMessageCount != textMessageCount) {
    assertFailed.append(String.format("String_Node_Str",expectedTextMessageCount,textMessageCount));
  }
  if (expectedBinaryMessageCount != binaryMessageCount) {
    assertFailed.append(String.format("String_Node_Str",expectedBinaryMessageCount,binaryMessageCount));
  }
  if (expectedDistinctAttributeTypeCount != -1 && expectedDistinctAttributeTypeCount != distinctAttributeIds.size()) {
    assertFailed.append(String.format("String_Node_Str",expectedDistinctAttributeTypeCount,distinctAttributeIds.size()));
  }
  if (expectedDistinctEntityTypeCount != -1 && expectedDistinctEntityTypeCount != distinctEntityIds.size()) {
    assertFailed.append(String.format("String_Node_Str",expectedDistinctEntityTypeCount,distinctEntityIds.size()));
  }
  if (expectedEntityCountPerMessage.intValue() != -1 && expectedEntityCountPerMessage.intValue() != entityCountPerMessage) {
    assertFailed.append(String.format("String_Node_Str",expectedEntityCountPerMessage.intValue(),entityCountPerMessage));
  }
  if (isNotBlank(expectedTextPayload) && !expectedTextPayload.trim().equals(textPayload.toString().trim())) {
    assertFailed.append(String.format("String_Node_Str",expectedTextPayload,textPayload.toString().trim()));
  }
  if (isNotBlank(expectedCustomHeaderPairs) && !expectedCustomHeaderPairs.trim().equals(messageHeaders.toString().trim())) {
    assertFailed.append(String.format("String_Node_Str",expectedCustomHeaderPairs.trim(),messageHeaders.toString().trim()));
  }
  if (isNotBlank(expectedCustomControlMsgHeaderPairs) && !expectedCustomControlMsgHeaderPairs.trim().equals(controlMessageHeaders.toString().trim())) {
    assertFailed.append(String.format("String_Node_Str",expectedCustomControlMsgHeaderPairs.trim(),controlMessageHeaders.toString().trim()));
  }
  if (isNotBlank(sql)) {
    IResourceRuntime targetResource=context.getDeployedResources().get(dataSourceId);
    DataSource ds=targetResource.reference();
    JdbcTemplate template=new JdbcTemplate(ds);
    int sqlCount=template.queryForObject(sql,Integer.class);
    if (expectedSqlCount != sqlCount) {
      assertFailed.append(String.format("String_Node_Str",expectedSqlCount,sqlCount));
    }
  }
  if (assertFailed.length() > 0) {
    throw new AssertException("String_Node_Str" + this.context.flowStep.getName() + assertFailed.toString());
  }
}

Fixed version (ground truth):
@Override public void flowCompleted(boolean cancelled){
  StringBuilder assertFailed=new StringBuilder();
  if (expectedControlMessageCount != controlMessageCount) {
    assertFailed.append(String.format("String_Node_Str",expectedControlMessageCount,controlMessageCount));
  }
  if (expectedEmptyPayloadMessageCount != emptyPayloadMessageCount) {
    assertFailed.append(String.format("String_Node_Str",expectedEmptyPayloadMessageCount,emptyPayloadMessageCount));
  }
  if (expectedEntityMessageCount != entityMessageCount) {
    assertFailed.append(String.format("String_Node_Str",expectedEntityMessageCount,entityMessageCount));
  }
  if (expectedTextMessageCount != textMessageCount) {
    assertFailed.append(String.format("String_Node_Str",expectedTextMessageCount,textMessageCount));
  }
  if (expectedBinaryMessageCount != binaryMessageCount) {
    assertFailed.append(String.format("String_Node_Str",expectedBinaryMessageCount,binaryMessageCount));
  }
  if (expectedDistinctAttributeTypeCount != -1 && expectedDistinctAttributeTypeCount != distinctAttributeIds.size()) {
    assertFailed.append(String.format("String_Node_Str",expectedDistinctAttributeTypeCount,distinctAttributeIds.size()));
  }
  if (expectedDistinctEntityTypeCount != -1 && expectedDistinctEntityTypeCount != distinctEntityIds.size()) {
    assertFailed.append(String.format("String_Node_Str",expectedDistinctEntityTypeCount,distinctEntityIds.size()));
  }
  if (expectedEntityCountPerMessage.intValue() != -1 && expectedEntityCountPerMessage.intValue() != entityCountPerMessage) {
    assertFailed.append(String.format("String_Node_Str",expectedEntityCountPerMessage.intValue(),entityCountPerMessage));
  }
  if (isNotBlank(expectedTextPayload) && !expectedTextPayload.trim().equals(textPayload.toString().trim())) {
    assertFailed.append(String.format("String_Node_Str",expectedTextPayload,textPayload.toString().trim()));
  }
  if (isNotBlank(expectedCustomHeaderPairs) && !expectedCustomHeaderPairs.trim().equals(messageHeaders.toString().trim())) {
    assertFailed.append(String.format("String_Node_Str",expectedCustomHeaderPairs.trim(),messageHeaders.toString().trim()));
  }
  if (isNotBlank(expectedCustomControlMsgHeaderPairs) && !expectedCustomControlMsgHeaderPairs.trim().equals(controlMessageHeaders.toString().trim())) {
    assertFailed.append(String.format("String_Node_Str",expectedCustomControlMsgHeaderPairs.trim(),controlMessageHeaders.toString().trim()));
  }
  if (isNotBlank(sql)) {
    IResourceRuntime targetResource=context.getDeployedResources().get(dataSourceId);
    DataSource ds=targetResource.reference();
    JdbcTemplate template=new JdbcTemplate(ds);
    int sqlCount=template.queryForObject(sql,Integer.class);
    if (expectedSqlCount != sqlCount) {
      assertFailed.append(String.format("String_Node_Str",expectedSqlCount,sqlCount));
    }
  }
  if (assertFailed.length() > 0) {
    throw new AssertException("String_Node_Str" + this.context.getFlowStep().getName() + assertFailed.toString());
  }
}