Program: 14178
Project: 14178
Buggy source:
private void parseOutputs(Template template,JsonNode templateJsonNode) throws CloudFormationException {
  Map<String,Boolean> conditionMap=StackEntityHelper.jsonToConditionMap(template.getStackEntity().getConditionMapJson());
  ArrayList<StackEntity.Output> outputs=StackEntityHelper.jsonToOutputs(template.getStackEntity().getOutputsJson());
  JsonNode outputsJsonNode=JsonHelper.checkObject(templateJsonNode,TemplateSection.Outputs.toString());
  if (outputsJsonNode != null) {
    List<String> outputKeys=Lists.newArrayList(outputsJsonNode.fieldNames());
    for (    String outputKey : outputKeys) {
      JsonNode outputJsonNode=outputsJsonNode.get(outputKey);
      Set<String> tempOutputKeys=Sets.newHashSet(outputJsonNode.fieldNames());
      for (      OutputKey validOutputKey : OutputKey.values()) {
        tempOutputKeys.remove(validOutputKey.toString());
      }
      if (!tempOutputKeys.isEmpty()) {
        throw new ValidationErrorException("String_Node_Str" + tempOutputKeys);
      }
      String description=JsonHelper.getString(outputsJsonNode.get(outputKey),OutputKey.Description.toString());
      if (description != null && description.length() > 4000) {
        throw new ValidationErrorException("String_Node_Str" + OutputKey.Description + "String_Node_Str"+ "String_Node_Str");
      }
      String conditionKey=JsonHelper.getString(outputJsonNode,OutputKey.Condition.toString());
      if (conditionKey != null) {
        if (!conditionMap.containsKey(conditionKey)) {
          throw new ValidationErrorException("String_Node_Str" + conditionKey + "String_Node_Str");
        }
      }
      if (!outputJsonNode.has(OutputKey.Value.toString())) {
        throw new ValidationErrorException("String_Node_Str");
      }
      FunctionEvaluation.validateNonConditionSectionArgTypesWherePossible(outputsJsonNode.get(outputKey));
      StackEntity.Output output=new StackEntity.Output();
      output.setKey(outputKey);
      JsonNode outputValueNode=outputJsonNode.get(OutputKey.Value.toString());
      for (      IntrinsicFunction intrinsicFunction : IntrinsicFunctions.values()) {
        IntrinsicFunction.MatchResult matchResult=intrinsicFunction.evaluateMatch(outputValueNode);
        if (matchResult.isMatch()) {
          intrinsicFunction.validateArgTypesWherePossible(matchResult);
          if (intrinsicFunction == IntrinsicFunctions.IF) {
            throw new ValidationErrorException("String_Node_Str");
          }
        }
      }
      if (outputValueNode.isObject()) {
        throw new ValidationErrorException("String_Node_Str");
      }
      if (outputValueNode.isArray()) {
        throw new ValidationErrorException("String_Node_Str");
      }
      output.setJsonValue(JsonHelper.getStringFromJsonNode(outputJsonNode.get(OutputKey.Value.toString())));
      output.setReady(false);
      output.setAllowedByCondition(conditionMap.get(conditionKey) != Boolean.FALSE);
      outputs.add(output);
    }
    template.getStackEntity().setOutputsJson(StackEntityHelper.outputsToJson(outputs));
  }
}

Fixed version (ground truth):
private void parseOutputs(Template template,JsonNode templateJsonNode) throws CloudFormationException {
  Map<String,Boolean> conditionMap=StackEntityHelper.jsonToConditionMap(template.getStackEntity().getConditionMapJson());
  ArrayList<StackEntity.Output> outputs=StackEntityHelper.jsonToOutputs(template.getStackEntity().getOutputsJson());
  JsonNode outputsJsonNode=JsonHelper.checkObject(templateJsonNode,TemplateSection.Outputs.toString());
  if (outputsJsonNode != null) {
    List<String> outputKeys=Lists.newArrayList(outputsJsonNode.fieldNames());
    for (    String outputKey : outputKeys) {
      JsonNode outputJsonNode=outputsJsonNode.get(outputKey);
      Set<String> tempOutputKeys=Sets.newHashSet(outputJsonNode.fieldNames());
      for (      OutputKey validOutputKey : OutputKey.values()) {
        tempOutputKeys.remove(validOutputKey.toString());
      }
      if (!tempOutputKeys.isEmpty()) {
        throw new ValidationErrorException("String_Node_Str" + tempOutputKeys);
      }
      String description=JsonHelper.getString(outputsJsonNode.get(outputKey),OutputKey.Description.toString());
      if (description != null && description.length() > 4000) {
        throw new ValidationErrorException("String_Node_Str" + OutputKey.Description + "String_Node_Str"+ "String_Node_Str");
      }
      String conditionKey=JsonHelper.getString(outputJsonNode,OutputKey.Condition.toString());
      if (conditionKey != null) {
        if (!conditionMap.containsKey(conditionKey)) {
          throw new ValidationErrorException("String_Node_Str" + conditionKey + "String_Node_Str");
        }
      }
      if (!outputJsonNode.has(OutputKey.Value.toString())) {
        throw new ValidationErrorException("String_Node_Str");
      }
      FunctionEvaluation.validateNonConditionSectionArgTypesWherePossible(outputsJsonNode.get(outputKey));
      StackEntity.Output output=new StackEntity.Output();
      output.setKey(outputKey);
      JsonNode outputValueNode=outputJsonNode.get(OutputKey.Value.toString());
      boolean match=false;
      for (      IntrinsicFunction intrinsicFunction : IntrinsicFunctions.values()) {
        IntrinsicFunction.MatchResult matchResult=intrinsicFunction.evaluateMatch(outputValueNode);
        if (matchResult.isMatch()) {
          match=true;
          intrinsicFunction.validateArgTypesWherePossible(matchResult);
          if (intrinsicFunction == IntrinsicFunctions.IF) {
            throw new ValidationErrorException("String_Node_Str");
          }
        }
      }
      if (!match) {
        if (outputValueNode.isObject()) {
          throw new ValidationErrorException("String_Node_Str");
        }
        if (outputValueNode.isArray()) {
          throw new ValidationErrorException("String_Node_Str");
        }
      }
      output.setJsonValue(JsonHelper.getStringFromJsonNode(outputJsonNode.get(OutputKey.Value.toString())));
      output.setReady(false);
      output.setAllowedByCondition(conditionMap.get(conditionKey) != Boolean.FALSE);
      outputs.add(output);
    }
    template.getStackEntity().setOutputsJson(StackEntityHelper.outputsToJson(outputs));
  }
}