Program: 65867
Project: 65867
Buggy source:
public ArrayList getPublicMemberPropertiesForClass(JavaClass cls,TypeInfo info){
  ArrayList<Property> fieldProperties=getFieldPropertiesForClass(cls,info,false);
  ArrayList<Property> methodProperties=getPropertyPropertiesForClass(cls,info,false);
  ArrayList<Property> publicFieldProperties=new ArrayList<Property>();
  ArrayList<Property> publicMethodProperties=new ArrayList<Property>();
  for (  Property next : fieldProperties) {
    if (Modifier.isPublic(((JavaField)next.getElement()).getModifiers())) {
      publicFieldProperties.add(next);
    }
 else {
      if (hasJAXBAnnotations(next.getElement())) {
        publicFieldProperties.add(next);
      }
    }
  }
  for (  Property next : methodProperties) {
    if (next.getElement() != null) {
      if (Modifier.isPublic(((JavaMethod)next.getElement()).getModifiers())) {
        publicMethodProperties.add(next);
      }
 else {
        if (hasJAXBAnnotations(next.getElement())) {
          publicMethodProperties.add(next);
        }
      }
    }
  }
  if (publicFieldProperties.size() >= 0 && publicMethodProperties.size() == 0) {
    return publicFieldProperties;
  }
 else   if (publicMethodProperties.size() > 0 && publicFieldProperties.size() == 0) {
    return publicMethodProperties;
  }
 else {
    HashMap fieldPropertyMap=getPropertyMapFromArrayList(publicFieldProperties);
    for (int i=0; i < publicMethodProperties.size(); i++) {
      Property next=(Property)publicMethodProperties.get(i);
      if (fieldPropertyMap.get(next.getPropertyName()) == null) {
        publicFieldProperties.add(next);
      }
    }
    return publicFieldProperties;
  }
}

Fixed version (ground truth):
public ArrayList getPublicMemberPropertiesForClass(JavaClass cls,TypeInfo info){
  ArrayList<Property> fieldProperties=getFieldPropertiesForClass(cls,info,false);
  ArrayList<Property> methodProperties=getPropertyPropertiesForClass(cls,info,false);
  ArrayList<Property> publicFieldProperties=new ArrayList<Property>();
  ArrayList<Property> publicMethodProperties=new ArrayList<Property>();
  for (  Property next : fieldProperties) {
    if (Modifier.isPublic(((JavaField)next.getElement()).getModifiers())) {
      publicFieldProperties.add(next);
    }
 else {
      if (hasJAXBAnnotations(next.getElement())) {
        publicFieldProperties.add(next);
      }
    }
  }
  for (  Property next : methodProperties) {
    if (next.getElement() != null) {
      if (Modifier.isPublic(((JavaMethod)next.getElement()).getModifiers())) {
        publicMethodProperties.add(next);
      }
 else {
        if (hasJAXBAnnotations(next.getElement())) {
          publicMethodProperties.add(next);
        }
      }
    }
  }
  if (publicFieldProperties.size() >= 0 && publicMethodProperties.size() == 0) {
    return publicFieldProperties;
  }
 else   if (publicMethodProperties.size() > 0 && publicFieldProperties.size() == 0) {
    return publicMethodProperties;
  }
 else {
    HashMap<String,Property> fieldPropertyMap=getPropertyMapFromArrayList(publicFieldProperties);
    for (int i=0; i < publicMethodProperties.size(); i++) {
      Property next=(Property)publicMethodProperties.get(i);
      Property fieldProp=fieldPropertyMap.get(next.getPropertyName());
      if (fieldProp == null) {
        publicFieldProperties.add(next);
      }
 else       if (fieldProp.isTransient()) {
        publicFieldProperties.remove(fieldProp);
        publicFieldProperties.add(next);
      }
    }
    return publicFieldProperties;
  }
}