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

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