Program: 6565
Project: 6565
Buggy source:
/** 
 * Private helper method to create code for restriction checking. The function determines, if any restrictions are set on the given member variable, and generates check-code accordingly.
 * @param member Element object with restrictions
 * @return String with code that includes restriction checks
 * @throws Exception Error during check code generation
 */
private String generateRestrictionChecks(AttributeContainer.Element member) throws Exception {
  String result="String_Node_Str";
  AttributeContainer.Restriction r=member.restrictions;
  String message="String_Node_Str";
  String comment="String_Node_Str";
  if (member.isLengthRestricted()) {
    result+=JavaRestrictionHelper.createCheckCode(String.format("String_Node_Str",member.name,Long.parseLong(r.length)),String.format(message,"String_Node_Str",member.name),String.format(comment,"String_Node_Str"));
  }
  if (member.isMinLengthRestricted()) {
    result+=JavaRestrictionHelper.createCheckCode(String.format("String_Node_Str",member.name,Long.parseLong(r.minLength)),String.format(message,"String_Node_Str",member.name),String.format(comment,"String_Node_Str"));
  }
  if (member.isMaxLengthRestricted()) {
    result+=JavaRestrictionHelper.createCheckCode(String.format("String_Node_Str",member.name,Long.parseLong(r.maxLength)),String.format(message,"String_Node_Str",member.name),String.format(comment,"String_Node_Str"));
  }
  if (member.isMinInclusiveRestricted()) {
    result+=JavaRestrictionHelper.createCheckCode(String.format("String_Node_Str",member.name,Long.parseLong(r.minInclusive)),String.format(message,"String_Node_Str",member.name),String.format(comment,"String_Node_Str"));
  }
  if (member.isMaxInclusiveRestricted()) {
    result+=JavaRestrictionHelper.createCheckCode(String.format("String_Node_Str",member.name,Long.parseLong(r.maxInclusive)),String.format(message,"String_Node_Str",member.name),String.format(comment,"String_Node_Str"));
  }
  if (member.isMinExclusiveRestricted()) {
    result+=JavaRestrictionHelper.createCheckCode(String.format("String_Node_Str",member.name,Long.parseLong(r.minExclusive)),String.format(message,"String_Node_Str",member.name),String.format(comment,"String_Node_Str"));
  }
  if (member.isMaxExclusiveRestricted()) {
    result+=JavaRestrictionHelper.createCheckCode(String.format("String_Node_Str",member.name,Long.parseLong(r.maxExclusive)),String.format(message,"String_Node_Str",member.name),String.format(comment,"String_Node_Str"));
  }
  if (member.isPatternRestricted()) {
    result+=JavaRestrictionHelper.createPatternCheckCode(member.name,r.pattern,String.format(message,"String_Node_Str",member.name));
  }
  if (member.isWhiteSpaceRestricted() && ("String_Node_Str").equals(member.type)) {
    result+=JavaRestrictionHelper.createWhiteSpaceCheckCode(member.name,r.whiteSpace);
  }
  if (member.isTotalDigitsRestricted()) {
    result+=JavaRestrictionHelper.createTotalDigitsCheckCode(member.name,r.totalDigits);
  }
  if (member.isFractionDigitsRestricted()) {
    result+=JavaRestrictionHelper.createFractionDigitsCheckCode(member.name,r.fractionDigits);
  }
  return result;
}

Fixed version (ground truth):
/** 
 * Private helper method to create code for restriction checking. The function determines, if any restrictions are set on the given member variable, and generates check-code accordingly.
 * @param member Element object with restrictions
 * @return String with code that includes restriction checks
 * @throws Exception Error during check code generation
 */
private String generateRestrictionChecks(AttributeContainer.Element member) throws Exception {
  String result="String_Node_Str";
  AttributeContainer.Restriction r=member.restrictions;
  String message="String_Node_Str";
  String comment="String_Node_Str";
  if (member.isLengthRestricted()) {
    result+=JavaRestrictionHelper.createCheckCode(String.format("String_Node_Str",member.name,Long.parseLong(r.length)),String.format(message,"String_Node_Str",member.name),String.format(comment,"String_Node_Str"));
  }
  if (member.isMinLengthRestricted()) {
    result+=JavaRestrictionHelper.createCheckCode(String.format("String_Node_Str",member.name,Long.parseLong(r.minLength)),String.format(message,"String_Node_Str",member.name),String.format(comment,"String_Node_Str"));
  }
  if (member.isMaxLengthRestricted()) {
    result+=JavaRestrictionHelper.createCheckCode(String.format("String_Node_Str",member.name,Long.parseLong(r.maxLength)),String.format(message,"String_Node_Str",member.name),String.format(comment,"String_Node_Str"));
  }
  if (member.isMinInclusiveRestricted()) {
    result+=JavaRestrictionHelper.createCheckCode(JavaRestrictionHelper.minInclusiveExpression(member),String.format(message,"String_Node_Str",member.name),String.format(comment,"String_Node_Str"));
  }
  if (member.isMaxInclusiveRestricted()) {
    result+=JavaRestrictionHelper.createCheckCode(JavaRestrictionHelper.maxInclusiveExpression(member),String.format(message,"String_Node_Str",member.name),String.format(comment,"String_Node_Str"));
  }
  if (member.isMinExclusiveRestricted()) {
    result+=JavaRestrictionHelper.createCheckCode(JavaRestrictionHelper.minExclusiveExpression(member),String.format(message,"String_Node_Str",member.name),String.format(comment,"String_Node_Str"));
  }
  if (member.isMaxExclusiveRestricted()) {
    result+=JavaRestrictionHelper.createCheckCode(JavaRestrictionHelper.maxExclusiveExpression(member),String.format(message,"String_Node_Str",member.name),String.format(comment,"String_Node_Str"));
  }
  if (member.isPatternRestricted()) {
    result+=JavaRestrictionHelper.createPatternCheckCode(member.name,r.pattern,String.format(message,"String_Node_Str",member.name));
  }
  if (member.isWhiteSpaceRestricted() && ("String_Node_Str").equals(member.type)) {
    result+=JavaRestrictionHelper.createWhiteSpaceCheckCode(member.name,r.whiteSpace);
  }
  if (member.isTotalDigitsRestricted()) {
    result+=JavaRestrictionHelper.createTotalDigitsCheckCode(member.name,r.totalDigits);
  }
  if (member.isFractionDigitsRestricted()) {
    result+=JavaRestrictionHelper.createFractionDigitsCheckCode(member.name,r.fractionDigits);
  }
  return result;
}