Program: 6560
Project: 6560
Buggy source:
/** 
 * Private helper method for member variable creation. This function will create an annotated JField with a comment.
 * @param member MemberVariable object for creation
 * @return Generated JField object
 * @throws Exception Error during JField creation
 */
private JField createMemberVariable(MemberVariable member) throws Exception {
  JField jf=null;
  if (member.getClass() == AttributeContainer.Element.class) {
    AttributeContainer.Element e=(AttributeContainer.Element)member;
    if (("String_Node_Str").equals(e.value)) {
      jf=JField.factory.create(JModifier.PRIVATE,e.type,e.name);
    }
 else {
      String value=e.value;
      if (("String_Node_Str").equals(e.type)) {
        value="String_Node_Str" + value + "String_Node_Str";
      }
      jf=JField.factory.create(JModifier.PRIVATE,e.type,e.name,value);
    }
    jf.setComment(new JFieldCommentImpl(String.format("String_Node_Str",e.name)));
    for (    String annotation : this.xmlMapper.getElementAnnotations(e.name)) {
      jf.addAnnotation(new JFieldAnnotationImpl(annotation));
    }
  }
 else   if (member.getClass() == AttributeContainer.ConstantElement.class) {
    AttributeContainer.ConstantElement ce=(AttributeContainer.ConstantElement)member;
    String value=ce.value;
    if (("String_Node_Str").equals(ce.type)) {
      value="String_Node_Str" + value + "String_Node_Str";
    }
    jf=JField.factory.create(JModifier.PRIVATE | JModifier.STATIC | JModifier.FINAL,ce.type,ce.name,value);
    jf.setComment(new JFieldCommentImpl(String.format("String_Node_Str",ce.name)));
    for (    String annotation : this.xmlMapper.getElementAnnotations(ce.name)) {
      jf.addAnnotation(new JFieldAnnotationImpl(annotation));
    }
  }
 else   if (member.getClass() == AttributeContainer.Attribute.class) {
    AttributeContainer.Attribute a=(AttributeContainer.Attribute)member;
    if (("String_Node_Str").equals(a.value)) {
      jf=JField.factory.create(JModifier.PRIVATE,a.type,a.name);
    }
 else {
      String value=a.value;
      if (("String_Node_Str").equals(a.type)) {
        value="String_Node_Str" + value + "String_Node_Str";
      }
      jf=JField.factory.create(JModifier.PRIVATE,a.type,a.name,value);
    }
    jf.setComment(new JFieldCommentImpl(String.format("String_Node_Str",a.name)));
    for (    String annotation : this.xmlMapper.getAttributeAnnotations(a.name)) {
      jf.addAnnotation(new JFieldAnnotationImpl(annotation));
    }
  }
 else   if (member.getClass() == AttributeContainer.EnumElement.class) {
    AttributeContainer.EnumElement ee=(AttributeContainer.EnumElement)member;
    jf=JField.factory.create(JModifier.PRIVATE,ee.type,ee.name);
    jf.setComment(new JFieldCommentImpl(String.format("String_Node_Str",ee.name)));
    for (    String annotation : this.xmlMapper.getEnumAnnotations(ee.name)) {
      jf.addAnnotation(new JFieldAnnotationImpl(annotation));
    }
  }
 else   if (member.getClass() == AttributeContainer.ElementArray.class) {
    AttributeContainer.ElementArray ea=(AttributeContainer.ElementArray)member;
    String type=String.format("String_Node_Str",this.fixPrimitiveTypes(ea.type));
    if (ea.maxSize == Integer.MAX_VALUE) {
      jf=JField.factory.create(JModifier.PRIVATE,type,ea.name,"String_Node_Str" + type + "String_Node_Str");
    }
 else {
      jf=JField.factory.create(JModifier.PRIVATE,type,ea.name,"String_Node_Str" + type + "String_Node_Str"+ ea.maxSize+ "String_Node_Str");
    }
    jf.setComment(new JFieldCommentImpl(String.format("String_Node_Str",ea.name)));
    for (    String annotation : this.xmlMapper.getArrayAnnotations(ea.name,ea.type,"String_Node_Str",ea.type)) {
      jf.addAnnotation(new JFieldAnnotationImpl(annotation));
    }
  }
 else   if (member.getClass() == AttributeContainer.ElementList.class) {
    AttributeContainer.ElementList el=(AttributeContainer.ElementList)member;
    String type=String.format("String_Node_Str",this.fixPrimitiveTypes(el.type));
    if (el.maxSize == Integer.MAX_VALUE) {
      jf=JField.factory.create(JModifier.PRIVATE,type,el.name,"String_Node_Str" + type + "String_Node_Str");
    }
 else {
      jf=JField.factory.create(JModifier.PRIVATE,type,el.name,"String_Node_Str" + type + "String_Node_Str"+ el.maxSize+ "String_Node_Str");
    }
    jf.setComment(new JFieldCommentImpl(String.format("String_Node_Str",el.name)));
    for (    String annotation : this.xmlMapper.getListAnnotations(el.name,"String_Node_Str",el.type)) {
      jf.addAnnotation(new JFieldAnnotationImpl(annotation));
    }
  }
 else {
    throw new FabricTypeGenException("String_Node_Str");
  }
  return jf;
}

Fixed version (ground truth):
/** 
 * Private helper method for member variable creation. This function will create an annotated JField with a comment.
 * @param member MemberVariable object for creation
 * @return Generated JField object
 * @throws Exception Error during JField creation
 */
private JField createMemberVariable(MemberVariable member) throws Exception {
  JField jf=null;
  if (member.getClass() == AttributeContainer.Element.class) {
    AttributeContainer.Element e=(AttributeContainer.Element)member;
    if (("String_Node_Str").equals(e.value)) {
      jf=JField.factory.create(JModifier.PRIVATE,e.type,e.name);
    }
 else {
      String value=e.value;
      if (("String_Node_Str").equals(e.type)) {
        value="String_Node_Str" + value + "String_Node_Str";
      }
      jf=JField.factory.create(JModifier.PRIVATE,e.type,e.name,value);
    }
    jf.setComment(new JFieldCommentImpl(String.format("String_Node_Str",e.name)));
    for (    String annotation : this.xmlMapper.getElementAnnotations(e.name)) {
      jf.addAnnotation(new JFieldAnnotationImpl(annotation));
    }
  }
 else   if (member.getClass() == AttributeContainer.ConstantElement.class) {
    AttributeContainer.ConstantElement ce=(AttributeContainer.ConstantElement)member;
    String value=ce.value;
    if (("String_Node_Str").equals(ce.type)) {
      value="String_Node_Str" + value + "String_Node_Str";
    }
    jf=JField.factory.create(JModifier.PRIVATE | JModifier.STATIC | JModifier.FINAL,ce.type,ce.name,value);
    jf.setComment(new JFieldCommentImpl(String.format("String_Node_Str",ce.name)));
    for (    String annotation : this.xmlMapper.getElementAnnotations(ce.name)) {
      jf.addAnnotation(new JFieldAnnotationImpl(annotation));
    }
  }
 else   if (member.getClass() == AttributeContainer.Attribute.class) {
    AttributeContainer.Attribute a=(AttributeContainer.Attribute)member;
    if (("String_Node_Str").equals(a.value)) {
      jf=JField.factory.create(JModifier.PRIVATE,a.type,a.name);
    }
 else {
      String value=a.value;
      if (("String_Node_Str").equals(a.type)) {
        value="String_Node_Str" + value + "String_Node_Str";
      }
      jf=JField.factory.create(JModifier.PRIVATE,a.type,a.name,value);
    }
    jf.setComment(new JFieldCommentImpl(String.format("String_Node_Str",a.name)));
    for (    String annotation : this.xmlMapper.getAttributeAnnotations(a.name)) {
      jf.addAnnotation(new JFieldAnnotationImpl(annotation));
    }
  }
 else   if (member.getClass() == AttributeContainer.EnumElement.class) {
    AttributeContainer.EnumElement ee=(AttributeContainer.EnumElement)member;
    jf=JField.factory.create(JModifier.PRIVATE,ee.type,ee.name);
    jf.setComment(new JFieldCommentImpl(String.format("String_Node_Str",ee.name)));
    for (    String annotation : this.xmlMapper.getEnumAnnotations(ee.name)) {
      jf.addAnnotation(new JFieldAnnotationImpl(annotation));
    }
  }
 else   if (member.getClass() == AttributeContainer.ElementArray.class) {
    AttributeContainer.ElementArray ea=(AttributeContainer.ElementArray)member;
    String type=String.format("String_Node_Str",this.fixPrimitiveTypes(ea.type));
    if (ea.maxSize == Integer.MAX_VALUE) {
      jf=JField.factory.create(JModifier.PRIVATE,type,ea.name,"String_Node_Str" + type + "String_Node_Str");
    }
 else {
      jf=JField.factory.create(JModifier.PRIVATE,type,ea.name,"String_Node_Str" + type + "String_Node_Str"+ ea.maxSize+ "String_Node_Str");
    }
    jf.setComment(new JFieldCommentImpl(String.format("String_Node_Str",ea.name)));
    for (    String annotation : this.xmlMapper.getArrayAnnotations(ea.name,ea.type,ea.name,ea.type)) {
      jf.addAnnotation(new JFieldAnnotationImpl(annotation));
    }
  }
 else   if (member.getClass() == AttributeContainer.ElementList.class) {
    AttributeContainer.ElementList el=(AttributeContainer.ElementList)member;
    String type=String.format("String_Node_Str",this.fixPrimitiveTypes(el.type));
    if (el.maxSize == Integer.MAX_VALUE) {
      jf=JField.factory.create(JModifier.PRIVATE,type,el.name,"String_Node_Str" + type + "String_Node_Str");
    }
 else {
      jf=JField.factory.create(JModifier.PRIVATE,type,el.name,"String_Node_Str" + type + "String_Node_Str"+ el.maxSize+ "String_Node_Str");
    }
    jf.setComment(new JFieldCommentImpl(String.format("String_Node_Str",el.name)));
    for (    String annotation : this.xmlMapper.getListAnnotations(el.name,"String_Node_Str",el.type)) {
      jf.addAnnotation(new JFieldAnnotationImpl(annotation));
    }
  }
 else {
    throw new FabricTypeGenException("String_Node_Str");
  }
  return jf;
}