Program: 63822
Project: 63822
Buggy source:
public ArrayList<Property> getFieldPropertiesForClass(JavaClass cls,TypeInfo info,boolean onlyPublic,boolean onlyExplicit){
  ArrayList<Property> properties=new ArrayList<Property>();
  if (cls == null) {
    return properties;
  }
  for (Iterator<JavaField> fieldIt=cls.getDeclaredFields().iterator(); fieldIt.hasNext(); ) {
    Property property=null;
    JavaField nextField=fieldIt.next();
    int modifiers=nextField.getModifiers();
    if (!Modifier.isTransient(modifiers) && ((Modifier.isPublic(nextField.getModifiers()) && onlyPublic) || !onlyPublic || hasJAXBAnnotations(nextField))) {
      if (!Modifier.isStatic(modifiers)) {
        if ((onlyExplicit && hasJAXBAnnotations(nextField)) || !onlyExplicit) {
          property=buildNewProperty(info,cls,nextField,nextField.getName(),nextField.getResolvedType());
          properties.add(property);
        }
      }
 else {
        try {
          property=buildNewProperty(info,cls,nextField,nextField.getName(),nextField.getResolvedType());
          if (helper.isAnnotationPresent(nextField,XmlAttribute.class)) {
            Object value=((JavaFieldImpl)nextField).get(null);
            if (value != null) {
              String stringValue=(String)XMLConversionManager.getDefaultXMLManager().convertObject(value,String.class,property.getSchemaType());
              property.setFixedValue(stringValue);
            }
          }
          property.setWriteOnly(true);
          if (!hasJAXBAnnotations(nextField)) {
            property.setTransient(true);
          }
          properties.add(property);
        }
 catch (        ClassCastException e) {
        }
catch (        IllegalAccessException e) {
        }
      }
    }
    if (helper.isAnnotationPresent(nextField,XmlTransient.class)) {
      if (property != null) {
        property.setTransient(true);
      }
    }
  }
  return properties;
}

Fixed version (ground truth):
public ArrayList<Property> getFieldPropertiesForClass(JavaClass cls,TypeInfo info,boolean onlyPublic,boolean onlyExplicit){
  ArrayList<Property> properties=new ArrayList<Property>();
  if (cls == null) {
    return properties;
  }
  for (Iterator<JavaField> fieldIt=cls.getDeclaredFields().iterator(); fieldIt.hasNext(); ) {
    Property property=null;
    JavaField nextField=fieldIt.next();
    int modifiers=nextField.getModifiers();
    if (!Modifier.isTransient(modifiers) && ((Modifier.isPublic(nextField.getModifiers()) && onlyPublic) || !onlyPublic || hasJAXBAnnotations(nextField))) {
      if (!Modifier.isStatic(modifiers)) {
        if ((onlyExplicit && hasJAXBAnnotations(nextField)) || !onlyExplicit) {
          try {
            property=buildNewProperty(info,cls,nextField,nextField.getName(),nextField.getResolvedType());
            properties.add(property);
          }
 catch (          JAXBException ex) {
            if (ex.getErrorCode() != JAXBException.INVALID_INTERFACE || !helper.isAnnotationPresent(nextField,XmlTransient.class)) {
              throw ex;
            }
          }
        }
      }
 else {
        try {
          property=buildNewProperty(info,cls,nextField,nextField.getName(),nextField.getResolvedType());
          if (helper.isAnnotationPresent(nextField,XmlAttribute.class)) {
            Object value=((JavaFieldImpl)nextField).get(null);
            if (value != null) {
              String stringValue=(String)XMLConversionManager.getDefaultXMLManager().convertObject(value,String.class,property.getSchemaType());
              property.setFixedValue(stringValue);
            }
          }
          property.setWriteOnly(true);
          if (!hasJAXBAnnotations(nextField)) {
            property.setTransient(true);
          }
          properties.add(property);
        }
 catch (        ClassCastException e) {
        }
catch (        IllegalAccessException e) {
        }
catch (        JAXBException ex) {
          if (ex.getErrorCode() != JAXBException.INVALID_INTERFACE || !helper.isAnnotationPresent(nextField,XmlTransient.class)) {
            throw ex;
          }
        }
      }
    }
    if (helper.isAnnotationPresent(nextField,XmlTransient.class)) {
      if (property != null) {
        property.setTransient(true);
      }
    }
  }
  return properties;
}