Program: 10995
Project: 10995
Buggy source:
/** 
 * Sets the paint as specified by the parameters. If <var>paintType</var> requires a URI, then <var>uri</var> must be non-null; otherwise, <var>uri</var> must be null. If <var>paintType</var> requires an <code>RGBColor</code>, then <var>rgbColor</var> must be a string that matches <a href='types.html#DataTypeColor'>&lt;color&gt;</a>; otherwise, <var>rgbColor</var> must be null. If <var>paintType</var> requires an   {@link org.vectomatic.dom.svg.OMSVGICCColor}, then <var>iccColor</var> must be a string that matches <a href='types.html#DataTypeICCColor'>&lt;icccolor&gt;</a>; otherwise, <var>iccColor</var> must be null.
 * @param paintType One of the defined constants for {@link org.vectomatic.dom.svg.OMSVGPaint#getPaintType()}.
 * @param uri The URI for the desired paint server, or null.
 * @param rgbColor The specification of an sRGB color, or null.
 * @param iccColor The specification of an ICC color, or null.
 * @throws SVGException (SVG_INVALID_VALUE_ERR) Raised if one of the  parameters has an invalid value.
 */
public final void setPaint(short paintType,String uri,String rgbColor,String iccColor) throws JavaScriptException {
  if (((paintType == SVG_PAINTTYPE_RGBCOLOR && uri == null) || (paintType == SVG_PAINTTYPE_URI_RGBCOLOR && uri != null)) && iccColor == null) {
    setRGBColor(rgbColor);
  }
 else   if ((paintType == SVG_PAINTTYPE_RGBCOLOR_ICCCOLOR && uri == null) || (paintType == SVG_PAINTTYPE_URI_RGBCOLOR_ICCCOLOR && uri != null)) {
    setRGBColorICCColor(rgbColor,iccColor);
  }
 else   if ((paintType == SVG_PAINTTYPE_NONE && uri == null) || (paintType == SVG_PAINTTYPE_URI_NONE && uri != null)) {
    setColor(SVG_COLORTYPE_UNKNOWN,rgbColor,iccColor);
  }
 else   if ((paintType == SVG_PAINTTYPE_CURRENTCOLOR && uri == null) || (paintType == SVG_PAINTTYPE_URI_CURRENTCOLOR && uri != null)) {
    setColor(SVG_COLORTYPE_CURRENTCOLOR,rgbColor,iccColor);
  }
 else   if (paintType == SVG_PAINTTYPE_URI) {
    this.rgbColor=null;
    this.iccColor=null;
  }
 else {
    throw new JavaScriptException("String_Node_Str");
  }
  this.paintType=paintType;
  this.uri=uri;
  if (cssText != null && uri != null) {
    cssText=uri + "String_Node_Str" + cssText;
  }
}

Fixed version (ground truth):
/** 
 * Sets the paint as specified by the parameters. If <var>paintType</var> requires a URI, then <var>uri</var> must be non-null; otherwise, <var>uri</var> must be null. If <var>paintType</var> requires an <code>RGBColor</code>, then <var>rgbColor</var> must be a string that matches <a href='types.html#DataTypeColor'>&lt;color&gt;</a>; otherwise, <var>rgbColor</var> must be null. If <var>paintType</var> requires an   {@link org.vectomatic.dom.svg.OMSVGICCColor}, then <var>iccColor</var> must be a string that matches <a href='types.html#DataTypeICCColor'>&lt;icccolor&gt;</a>; otherwise, <var>iccColor</var> must be null.
 * @param paintType One of the defined constants for {@link org.vectomatic.dom.svg.OMSVGPaint#getPaintType()}.
 * @param uri The URI for the desired paint server, or null.
 * @param rgbColor The specification of an sRGB color, or null.
 * @param iccColor The specification of an ICC color, or null.
 * @throws SVGException (SVG_INVALID_VALUE_ERR) Raised if one of the  parameters has an invalid value.
 */
public final void setPaint(short paintType,String uri,String rgbColor,String iccColor) throws JavaScriptException {
  if (((paintType == SVG_PAINTTYPE_RGBCOLOR && uri == null) || (paintType == SVG_PAINTTYPE_URI_RGBCOLOR && uri != null)) && iccColor == null) {
    setRGBColor(rgbColor);
  }
 else   if ((paintType == SVG_PAINTTYPE_RGBCOLOR_ICCCOLOR && uri == null) || (paintType == SVG_PAINTTYPE_URI_RGBCOLOR_ICCCOLOR && uri != null)) {
    setRGBColorICCColor(rgbColor,iccColor);
  }
 else   if ((paintType == SVG_PAINTTYPE_NONE && uri == null) || (paintType == SVG_PAINTTYPE_URI_NONE && uri != null)) {
    setColor(SVG_COLORTYPE_UNKNOWN,rgbColor,iccColor);
  }
 else   if ((paintType == SVG_PAINTTYPE_CURRENTCOLOR && uri == null) || (paintType == SVG_PAINTTYPE_URI_CURRENTCOLOR && uri != null)) {
    setColor(SVG_COLORTYPE_CURRENTCOLOR,rgbColor,iccColor);
  }
 else   if (paintType == SVG_PAINTTYPE_URI) {
    this.rgbColor=null;
    this.iccColor=null;
    this.cssText="String_Node_Str" + uri + "String_Node_Str";
  }
 else {
    throw new JavaScriptException("String_Node_Str");
  }
  this.paintType=paintType;
  this.uri=uri;
  if (paintType != SVG_PAINTTYPE_URI && cssText != null && uri != null) {
    cssText="String_Node_Str" + uri + "String_Node_Str"+ cssText;
  }
}