Program: 143634
Project: 143634
Buggy source:
public static String createBorderString(Object currentBorder){
  String retval=null;
  if (currentBorder != null) {
    if (currentBorder instanceof CompoundBorder) {
      Border oborder=((CompoundBorder)currentBorder).getOutsideBorder();
      Border iborder=((CompoundBorder)currentBorder).getInsideBorder();
      retval=COMPOUND_BORDER + "String_Node_Str";
      retval+="String_Node_Str" + createBorderString(oborder);
      retval+="String_Node_Str" + createBorderString(iborder) + "String_Node_Str";
    }
 else     if (currentBorder instanceof BevelBorder) {
      BevelBorder border=(BevelBorder)currentBorder;
      int type=border.getBevelType();
      retval=BEVEL_BORDER + "String_Node_Str" + type;
      if (border.getHighlightInnerColor() != null || border.getHighlightOuterColor() != null || border.getShadowInnerColor() != null || border.getShadowOuterColor() != null) {
        retval+="String_Node_Str" + PersistHelper.createColorString(border.getHighlightOuterColor());
        retval+="String_Node_Str" + PersistHelper.createColorString(border.getHighlightInnerColor());
        retval+="String_Node_Str" + PersistHelper.createColorString(border.getShadowOuterColor());
        retval+="String_Node_Str" + PersistHelper.createColorString(border.getShadowInnerColor());
      }
    }
 else     if (currentBorder instanceof EtchedBorder) {
      EtchedBorder border=(EtchedBorder)currentBorder;
      int type=border.getEtchType();
      Color hi=border.getHighlightColor();
      Color sh=border.getShadowColor();
      retval=ETCHED_BORDER + "String_Node_Str" + type+ "String_Node_Str"+ PersistHelper.createColorString(hi)+ "String_Node_Str"+ PersistHelper.createColorString(sh);
    }
 else     if (currentBorder instanceof LineBorder) {
      LineBorder border=(LineBorder)currentBorder;
      int thick=border.getThickness();
      Color lineColor=border.getLineColor();
      retval=LINE_BORDER + "String_Node_Str" + thick+ "String_Node_Str"+ PersistHelper.createColorString(lineColor);
    }
 else     if (currentBorder instanceof TitledBorder) {
      TitledBorder border=(TitledBorder)currentBorder;
      String s=border.getTitle();
      s=Utils.stringReplace(s,"String_Node_Str","String_Node_Str");
      Font f=border.getTitleFont();
      Color c=border.getTitleColor();
      retval=TITLED_BORDER + "String_Node_Str" + s;
      int justification=border.getTitleJustification();
      int position=border.getTitlePosition();
      if (justification != 0 || position != 0 || f != null || c != null) {
        retval+="String_Node_Str" + justification + "String_Node_Str"+ position;
        if (f != null) {
          retval+="String_Node_Str" + PersistHelper.createFontString(f);
          if (c != null) {
            retval+="String_Node_Str" + PersistHelper.createColorString(c);
          }
        }
      }
    }
 else     if (currentBorder instanceof SpecialMatteBorder) {
      SpecialMatteBorder border=(SpecialMatteBorder)currentBorder;
      retval=((border instanceof RoundedBorder) ? ROUNDED_BORDER : SPECIAL_MATTE_BORDER) + "String_Node_Str" + border.getTop()+ "String_Node_Str"+ border.getRight()+ "String_Node_Str"+ border.getBottom()+ "String_Node_Str"+ border.getLeft();
      retval+="String_Node_Str" + PersistHelper.createColorString(border.getTopColor());
      retval+="String_Node_Str" + PersistHelper.createColorString(border.getRightColor());
      retval+="String_Node_Str" + PersistHelper.createColorString(border.getBottomColor());
      retval+="String_Node_Str" + PersistHelper.createColorString(border.getLeftColor());
      if (border instanceof RoundedBorder) {
        retval+="String_Node_Str" + ((RoundedBorder)border).getRoundingRadiusString();
        retval+="String_Node_Str" + ((RoundedBorder)border).getBorderStylesString();
      }
 else {
        retval+="String_Node_Str" + border.getRoundingRadius();
        retval+="String_Node_Str" + SpecialMatteBorder.createDashString(border.getDashPattern());
      }
    }
 else     if (currentBorder instanceof MatteBorder) {
      MatteBorder border=(MatteBorder)currentBorder;
      Insets i=border.getBorderInsets(null);
      Color lineColor=border.getMatteColor();
      retval=MATTE_BORDER + "String_Node_Str" + i.top+ "String_Node_Str"+ i.right+ "String_Node_Str"+ i.bottom+ "String_Node_Str"+ i.left+ "String_Node_Str"+ PersistHelper.createColorString(lineColor);
    }
 else     if (currentBorder instanceof EmptyBorder) {
      EmptyBorder border=(EmptyBorder)currentBorder;
      Insets i=border.getBorderInsets(null);
      retval=EMPTY_BORDER + "String_Node_Str" + i.top+ "String_Node_Str"+ i.right+ "String_Node_Str"+ i.bottom+ "String_Node_Str"+ i.left;
    }
 else {
      retval="String_Node_Str";
    }
  }
  return retval;
}

Fixed version (ground truth):
public static String createBorderString(Object currentBorder){
  String retval=null;
  if (currentBorder != null) {
    if (currentBorder instanceof CompoundBorder) {
      Border oborder=((CompoundBorder)currentBorder).getOutsideBorder();
      Border iborder=((CompoundBorder)currentBorder).getInsideBorder();
      retval=COMPOUND_BORDER + "String_Node_Str";
      retval+="String_Node_Str" + createBorderString(oborder);
      retval+="String_Node_Str" + createBorderString(iborder) + "String_Node_Str";
    }
 else     if (currentBorder instanceof BevelBorder) {
      BevelBorder border=(BevelBorder)currentBorder;
      int type=border.getBevelType();
      retval=BEVEL_BORDER + "String_Node_Str" + type;
      if (border.getHighlightInnerColor() != null || border.getHighlightOuterColor() != null || border.getShadowInnerColor() != null || border.getShadowOuterColor() != null) {
        retval+="String_Node_Str" + PersistHelper.createColorString(border.getHighlightOuterColor());
        retval+="String_Node_Str" + PersistHelper.createColorString(border.getHighlightInnerColor());
        retval+="String_Node_Str" + PersistHelper.createColorString(border.getShadowOuterColor());
        retval+="String_Node_Str" + PersistHelper.createColorString(border.getShadowInnerColor());
      }
    }
 else     if (currentBorder instanceof EtchedBorder) {
      EtchedBorder border=(EtchedBorder)currentBorder;
      int type=border.getEtchType();
      Color hi=border.getHighlightColor();
      Color sh=border.getShadowColor();
      retval=ETCHED_BORDER + "String_Node_Str" + type+ "String_Node_Str"+ PersistHelper.createColorString(hi)+ "String_Node_Str"+ PersistHelper.createColorString(sh);
    }
 else     if (currentBorder instanceof LineBorder) {
      LineBorder border=(LineBorder)currentBorder;
      int thick=border.getThickness();
      Color lineColor=border.getLineColor();
      retval=LINE_BORDER + "String_Node_Str" + thick+ "String_Node_Str"+ PersistHelper.createColorString(lineColor);
    }
 else     if (currentBorder instanceof TitledBorder) {
      TitledBorder border=(TitledBorder)currentBorder;
      String s=border.getTitle();
      s=Utils.stringReplace(s,"String_Node_Str","String_Node_Str");
      Font f=border.getTitleFont();
      Color c=border.getTitleColor();
      retval=TITLED_BORDER + "String_Node_Str" + s;
      int justification=border.getTitleJustification();
      int position=border.getTitlePosition();
      if (justification != 0 || position != 0 || f != null || c != null) {
        retval+="String_Node_Str" + justification + "String_Node_Str"+ position;
        if (f != null) {
          retval+="String_Node_Str" + PersistHelper.createFontString(f);
          if (c != null) {
            retval+="String_Node_Str" + PersistHelper.createColorString(c);
          }
        }
      }
    }
 else     if (currentBorder instanceof SpecialMatteBorder) {
      SpecialMatteBorder border=(SpecialMatteBorder)currentBorder;
      retval=((border instanceof RoundedBorder) ? ROUNDED_BORDER : SPECIAL_MATTE_BORDER) + "String_Node_Str" + border.getTop()+ "String_Node_Str"+ border.getRight()+ "String_Node_Str"+ border.getBottom()+ "String_Node_Str"+ border.getLeft();
      retval+="String_Node_Str" + PersistHelper.createColorString(border.getTopColor());
      retval+="String_Node_Str" + PersistHelper.createColorString(border.getRightColor());
      retval+="String_Node_Str" + PersistHelper.createColorString(border.getBottomColor());
      retval+="String_Node_Str" + PersistHelper.createColorString(border.getLeftColor());
      if (border instanceof RoundedBorder) {
        retval+="String_Node_Str" + ((RoundedBorder)border).getRoundingRadiusString();
        retval+="String_Node_Str" + ((RoundedBorder)border).getBorderStylesString();
      }
 else {
        retval+="String_Node_Str" + border.getRoundingRadius();
        retval+="String_Node_Str" + SpecialMatteBorder.createDashString(border.getDashPattern());
      }
    }
 else     if (currentBorder instanceof MatteBorder) {
      MatteBorder border=(MatteBorder)currentBorder;
      Insets i=ComponentFactoryHelper.getBorderInsetsForNoComponent(border);
      Color lineColor=border.getMatteColor();
      retval=MATTE_BORDER + "String_Node_Str" + i.top+ "String_Node_Str"+ i.right+ "String_Node_Str"+ i.bottom+ "String_Node_Str"+ i.left+ "String_Node_Str"+ PersistHelper.createColorString(lineColor);
    }
 else     if (currentBorder instanceof EmptyBorder) {
      EmptyBorder border=(EmptyBorder)currentBorder;
      Insets i=ComponentFactoryHelper.getBorderInsetsForNoComponent(border);
      retval=EMPTY_BORDER + "String_Node_Str" + i.top+ "String_Node_Str"+ i.right+ "String_Node_Str"+ i.bottom+ "String_Node_Str"+ i.left;
    }
 else {
      retval="String_Node_Str";
    }
  }
  return retval;
}