Program: 71718
Project: 71718
Buggy source:
public IStyle getStyle(Chart model,StyledComponent name){
  SimpleStyle ss=null;
  if (cache == null || !useCache) {
    StyleHandle style=handle.getPrivateStyle();
    ss=new SimpleStyle();
    String fname=style.getFontFamilyHandle().getStringValue();
    int fsize=getFontSizeIntValue(handle);
    boolean fbold=getFontWeight(style.getFontWeight()) >= 700;
    boolean fitalic=DesignChoiceConstants.FONT_STYLE_ITALIC.equals(style.getFontStyle());
    boolean funder=DesignChoiceConstants.TEXT_UNDERLINE_UNDERLINE.equals(style.getTextUnderline());
    boolean fstrike=DesignChoiceConstants.TEXT_LINE_THROUGH_LINE_THROUGH.equals(style.getTextLineThrough());
    if (dstyle != null) {
      CSSValueList valueList=(CSSValueList)dstyle.getProperty(StyleConstants.STYLE_FONT_FAMILY);
      if (valueList.getLength() > 0) {
        fname=valueList.item(0).getCssText();
      }
      fsize=getSize(dstyle.getProperty(StyleConstants.STYLE_FONT_SIZE));
      fbold=isBoldFont(dstyle.getProperty(StyleConstants.STYLE_FONT_WEIGHT));
      fitalic=isItalicFont(dstyle.getFontStyle());
      funder=CSSConstants.CSS_UNDERLINE_VALUE.equals(dstyle.getTextUnderline());
      fstrike=CSSConstants.CSS_LINE_THROUGH_VALUE.equals(dstyle.getTextLineThrough());
    }
    HorizontalAlignment ha=HorizontalAlignment.LEFT_LITERAL;
    if (DesignChoiceConstants.TEXT_ALIGN_CENTER.equals(style.getTextAlign())) {
      ha=HorizontalAlignment.CENTER_LITERAL;
    }
 else     if (DesignChoiceConstants.TEXT_ALIGN_RIGHT.equals(style.getTextAlign())) {
      ha=HorizontalAlignment.RIGHT_LITERAL;
    }
    VerticalAlignment va=VerticalAlignment.TOP_LITERAL;
    if (DesignChoiceConstants.VERTICAL_ALIGN_MIDDLE.equals(style.getVerticalAlign())) {
      va=VerticalAlignment.CENTER_LITERAL;
    }
 else     if (DesignChoiceConstants.VERTICAL_ALIGN_BOTTOM.equals(style.getVerticalAlign())) {
      va=VerticalAlignment.BOTTOM_LITERAL;
    }
    TextAlignment ta=TextAlignmentImpl.create();
    ta.setHorizontalAlignment(ha);
    ta.setVerticalAlignment(va);
    FontDefinition fd=FontDefinitionImpl.create(fname,fsize,fbold,fitalic,funder,fstrike,true,0,ta);
    ss.setFont(fd);
    ColorHandle ch=style.getColor();
    if (dstyle != null) {
      ss.setColor(getColor(dstyle.getProperty(StyleConstants.STYLE_COLOR)));
    }
 else     if (ch != null && ch.getRGB() != -1) {
      int rgbValue=ch.getRGB();
      ColorDefinition cd=ColorDefinitionImpl.create((rgbValue >> 16) & 0xff,(rgbValue >> 8) & 0xff,rgbValue & 0xff);
      ss.setColor(cd);
    }
 else {
      ss.setColor(ColorDefinitionImpl.BLACK());
    }
    ch=style.getBackgroundColor();
    if (dstyle != null) {
      ss.setBackgroundColor(getColor(dstyle.getProperty(StyleConstants.STYLE_BACKGROUND_COLOR)));
    }
 else     if (ch != null && ch.getRGB() != -1) {
      int rgbValue=ch.getRGB();
      ColorDefinition cd=ColorDefinitionImpl.create((rgbValue >> 16) & 0xff,(rgbValue >> 8) & 0xff,rgbValue & 0xff);
      ss.setBackgroundColor(cd);
    }
    if (style.getBackgroundImage() != null && style.getBackgroundImage().length() > 0) {
      String urlString=style.getBackgroundImage();
      try {
        new URL(urlString);
        ss.setBackgroundImage(ImageImpl.create(urlString));
      }
 catch (      Exception _) {
        urlString="String_Node_Str" + urlString;
        try {
          new URL(urlString);
          ss.setBackgroundImage(ImageImpl.create(urlString));
        }
 catch (        Exception __) {
          logger.log(_);
        }
      }
    }
    double pt=convertToPixel(style.getPaddingTop());
    double pb=convertToPixel(style.getPaddingBottom());
    double pl=convertToPixel(style.getPaddingLeft());
    double pr=convertToPixel(style.getPaddingRight());
    ss.setPadding(InsetsImpl.create(pt,pl,pb,pr));
    if (useCache) {
      cache=ss;
    }
  }
  if (useCache) {
    ss=cache.copy();
  }
  return ss;
}

Fixed version (ground truth):
public IStyle getStyle(Chart model,StyledComponent name){
  SimpleStyle ss=null;
  if (cache == null || !useCache) {
    StyleHandle style=handle.getPrivateStyle();
    ss=new SimpleStyle();
    String fname=style.getFontFamilyHandle().getStringValue();
    int fsize=getFontSizeIntValue(handle);
    boolean fbold=getFontWeight(style.getFontWeight()) >= 700;
    boolean fitalic=DesignChoiceConstants.FONT_STYLE_ITALIC.equals(style.getFontStyle());
    boolean funder=DesignChoiceConstants.TEXT_UNDERLINE_UNDERLINE.equals(style.getTextUnderline());
    boolean fstrike=DesignChoiceConstants.TEXT_LINE_THROUGH_LINE_THROUGH.equals(style.getTextLineThrough());
    if (dstyle != null) {
      CSSValueList valueList=(CSSValueList)dstyle.getProperty(StyleConstants.STYLE_FONT_FAMILY);
      if (valueList.getLength() > 0) {
        fname=valueList.item(0).getCssText();
      }
      fsize=getSize(dstyle.getProperty(StyleConstants.STYLE_FONT_SIZE));
      fbold=isBoldFont(dstyle.getProperty(StyleConstants.STYLE_FONT_WEIGHT));
      fitalic=isItalicFont(dstyle.getFontStyle());
      funder=CSSConstants.CSS_UNDERLINE_VALUE.equals(dstyle.getTextUnderline());
      fstrike=CSSConstants.CSS_LINE_THROUGH_VALUE.equals(dstyle.getTextLineThrough());
    }
    HorizontalAlignment ha=HorizontalAlignment.LEFT_LITERAL;
    if (DesignChoiceConstants.TEXT_ALIGN_CENTER.equals(style.getTextAlign())) {
      ha=HorizontalAlignment.CENTER_LITERAL;
    }
 else     if (DesignChoiceConstants.TEXT_ALIGN_RIGHT.equals(style.getTextAlign())) {
      ha=HorizontalAlignment.RIGHT_LITERAL;
    }
    VerticalAlignment va=VerticalAlignment.TOP_LITERAL;
    if (DesignChoiceConstants.VERTICAL_ALIGN_MIDDLE.equals(style.getVerticalAlign())) {
      va=VerticalAlignment.CENTER_LITERAL;
    }
 else     if (DesignChoiceConstants.VERTICAL_ALIGN_BOTTOM.equals(style.getVerticalAlign())) {
      va=VerticalAlignment.BOTTOM_LITERAL;
    }
    TextAlignment ta=TextAlignmentImpl.create();
    ta.setHorizontalAlignment(ha);
    ta.setVerticalAlignment(va);
    FontDefinition fd=FontDefinitionImpl.create(fname,fsize,fbold,fitalic,funder,fstrike,true,0,ta);
    ss.setFont(fd);
    ColorHandle ch=style.getColor();
    if (dstyle != null) {
      ss.setColor(getColor(dstyle.getProperty(StyleConstants.STYLE_COLOR)));
    }
 else     if (ch != null && ch.getRGB() != -1) {
      int rgbValue=ch.getRGB();
      ColorDefinition cd=ColorDefinitionImpl.create((rgbValue >> 16) & 0xff,(rgbValue >> 8) & 0xff,rgbValue & 0xff);
      ss.setColor(cd);
    }
 else {
      ss.setColor(ColorDefinitionImpl.BLACK());
    }
    ch=style.getBackgroundColor();
    if (dstyle != null) {
      ss.setBackgroundColor(getColor(dstyle.getProperty(StyleConstants.STYLE_BACKGROUND_COLOR)));
    }
 else     if (ch != null && ch.getRGB() != -1) {
      int rgbValue=ch.getRGB();
      ColorDefinition cd=ColorDefinitionImpl.create((rgbValue >> 16) & 0xff,(rgbValue >> 8) & 0xff,rgbValue & 0xff);
      ss.setBackgroundColor(cd);
    }
    if (style.getBackgroundImage() != null && style.getBackgroundImage().length() > 0) {
      String urlString=style.getBackgroundImage();
      try {
        new URL(urlString);
        ss.setBackgroundImage(ImageImpl.create(urlString));
      }
 catch (      Exception _) {
        if (urlString != null && urlString.startsWith("String_Node_Str")) {
          urlString="String_Node_Str" + urlString;
        }
 else {
          urlString="String_Node_Str" + urlString;
        }
        try {
          new URL(urlString);
          ss.setBackgroundImage(ImageImpl.create(urlString));
        }
 catch (        Exception __) {
          logger.log(_);
        }
      }
    }
    double pt=convertToPixel(style.getPaddingTop());
    double pb=convertToPixel(style.getPaddingBottom());
    double pl=convertToPixel(style.getPaddingLeft());
    double pr=convertToPixel(style.getPaddingRight());
    ss.setPadding(InsetsImpl.create(pt,pl,pb,pr));
    if (useCache) {
      cache=ss;
    }
  }
  if (useCache) {
    ss=cache.copy();
  }
  return ss;
}