Program: 102380
Project: 102380
Buggy source:
/** 
 * @param name the property name
 * @param value the proposed new value
 * @return <code>true</code> if the property exists and the proposed value is valid
 * @since 7.0
 */
public boolean isValidPropertyValue(String name,String value){
  PropertyDefinition definition=this.type.getPropertyDefinition(name);
  if (definition == null)   return false;
  String type=definition.getPropertyTypeClassName();
  if ("String_Node_Str".equals(type)) {
    if (value == null) {
      return false;
    }
    if (!value.equalsIgnoreCase(Boolean.TRUE.toString()) && !value.equalsIgnoreCase(Boolean.FALSE.toString())) {
      return false;
    }
  }
 else   if ("String_Node_Str".equals(type)) {
    if ((value != null) && (value.length() > 1)) {
      return false;
    }
  }
 else   if ("String_Node_Str".equals(type)) {
    try {
      Byte.parseByte(value);
    }
 catch (    Exception e) {
      return false;
    }
  }
 else   if ("String_Node_Str".equals(type)) {
    try {
      Short.parseShort(value);
    }
 catch (    Exception e) {
      return false;
    }
  }
 else   if ("String_Node_Str".equals(type)) {
    try {
      Integer.parseInt(value);
    }
 catch (    Exception e) {
      return false;
    }
  }
 else   if ("String_Node_Str".equals(type)) {
    try {
      Long.parseLong(value);
    }
 catch (    Exception e) {
      return false;
    }
  }
 else   if ("String_Node_Str".equals(type)) {
    try {
      Float.parseFloat(value);
    }
 catch (    Exception e) {
      return false;
    }
  }
 else   if ("String_Node_Str".equals(type)) {
    try {
      Double.parseDouble(value);
    }
 catch (    Exception e) {
      return false;
    }
  }
  if (definition.isConstrainedToAllowedValues()) {
    Collection values=definition.getAllowedValues();
    assert((values != null) && !values.isEmpty());
    for (    Object allowedValue : values) {
      if (allowedValue.equals(value)) {
        return true;
      }
    }
    return false;
  }
  return true;
}

Fixed version (ground truth):
/** 
 * @param name the property name
 * @param value the proposed new value
 * @return <code>true</code> if the property exists and the proposed value is valid
 * @since 7.0
 */
public boolean isValidPropertyValue(String name,String value){
  if (value == null) {
    return false;
  }
  PropertyDefinition definition=this.type.getPropertyDefinition(name);
  if (definition == null)   return false;
  String type=definition.getPropertyTypeClassName();
  if (Boolean.class.getName().equals(type)) {
    if (!value.equalsIgnoreCase(Boolean.TRUE.toString()) && !value.equalsIgnoreCase(Boolean.FALSE.toString())) {
      return false;
    }
  }
 else   if (Character.class.getName().equals(type)) {
    if (value.length() != 1) {
      return false;
    }
  }
 else   if (Byte.class.getName().equals(type)) {
    try {
      Byte.parseByte(value);
    }
 catch (    Exception e) {
      return false;
    }
  }
 else   if (Short.class.getName().equals(type)) {
    try {
      Short.parseShort(value);
    }
 catch (    Exception e) {
      return false;
    }
  }
 else   if (Integer.class.getName().equals(type)) {
    try {
      Integer.parseInt(value);
    }
 catch (    Exception e) {
      return false;
    }
  }
 else   if (Long.class.getName().equals(type)) {
    try {
      Long.parseLong(value);
    }
 catch (    Exception e) {
      return false;
    }
  }
 else   if (Float.class.getName().equals(type)) {
    try {
      Float.parseFloat(value);
    }
 catch (    Exception e) {
      return false;
    }
  }
 else   if (Double.class.getName().equals(type)) {
    try {
      Double.parseDouble(value);
    }
 catch (    Exception e) {
      return false;
    }
  }
  if (definition.isConstrainedToAllowedValues()) {
    Collection values=definition.getAllowedValues();
    assert((values != null) && !values.isEmpty());
    for (    Object allowedValue : values) {
      if (allowedValue.equals(value)) {
        return true;
      }
    }
    return false;
  }
  return true;
}