Program: 71935
Project: 71935
Buggy source:
/** 
 * Draws a 3D style line with the specified side, style & width.
 * @param g The graphics object used for drawing
 * @param side the side to draw.
 * @param style the style to draw.
 * @param width the border width array, arranged by {top, bottom, left, right};
 * @param r the rectangle for drawing.
 */
public static void draw3DLine(Graphics g,int side,int style,int[] width,Rectangle r){
  if (width.length <= side || width[side] <= 0) {
    return;
  }
  Color foreColor=g.getForegroundColor();
  Color inSideColor=foreColor;
  Color outSideColor=foreColor;
  Color darkColor=ColorManager.darker(foreColor);
  Color brightColor=ColorManager.brighter(foreColor,new Color(null,255,255,255));
switch (style) {
case BaseBorder.LINE_STYLE_RIDGE:
    if (side == TOP || side == LEFT) {
      inSideColor=darkColor;
      outSideColor=brightColor;
    }
 else     if (side == BOTTOM || side == RIGHT) {
      inSideColor=brightColor;
      outSideColor=darkColor;
    }
  break;
case BaseBorder.LINE_STYLE_GROOVE:
if (side == TOP || side == LEFT) {
  inSideColor=brightColor;
  outSideColor=darkColor;
}
 else if (side == BOTTOM || side == RIGHT) {
  inSideColor=darkColor;
  outSideColor=brightColor;
}
break;
case BaseBorder.LINE_STYLE_INSET:
if (side == TOP || side == LEFT) {
inSideColor=darkColor;
outSideColor=darkColor;
}
 else if (side == BOTTOM || side == RIGHT) {
inSideColor=brightColor;
outSideColor=brightColor;
}
break;
case BaseBorder.LINE_STYLE_OUTSET:
if (side == TOP || side == LEFT) {
inSideColor=brightColor;
outSideColor=brightColor;
}
 else if (side == BOTTOM || side == RIGHT) {
inSideColor=darkColor;
outSideColor=darkColor;
}
break;
}
int inSideWidth=(width[side] + 1) / 2;
int outSideWidth=width[side] - inSideWidth;
g.setForegroundColor(outSideColor);
drawSingleLine(g,side,SWT.LINE_SOLID,width,outSideWidth,0,r);
g.setForegroundColor(inSideColor);
drawSingleLine(g,side,SWT.LINE_SOLID,width,inSideWidth,outSideWidth,r);
}

Fixed version (ground truth):
/** 
 * Draws a 3D style line with the specified side, style & width.
 * @param g The graphics object used for drawing
 * @param side the side to draw.
 * @param style the style to draw.
 * @param width the border width array, arranged by {top, bottom, left, right};
 * @param r the rectangle for drawing.
 */
public static void draw3DLine(Graphics g,int side,int style,int[] width,Rectangle r){
  if (width.length <= side || width[side] <= 0) {
    return;
  }
  Color foreColor=g.getForegroundColor();
  Color inSideColor=foreColor;
  Color outSideColor=foreColor;
  Color darkColor=ColorManager.darker(foreColor);
  Color brightColor=ColorManager.brighter(foreColor,ColorConstants.white);
switch (style) {
case BaseBorder.LINE_STYLE_RIDGE:
    if (side == TOP || side == LEFT) {
      inSideColor=darkColor;
      outSideColor=brightColor;
    }
 else     if (side == BOTTOM || side == RIGHT) {
      inSideColor=brightColor;
      outSideColor=darkColor;
    }
  break;
case BaseBorder.LINE_STYLE_GROOVE:
if (side == TOP || side == LEFT) {
  inSideColor=brightColor;
  outSideColor=darkColor;
}
 else if (side == BOTTOM || side == RIGHT) {
  inSideColor=darkColor;
  outSideColor=brightColor;
}
break;
case BaseBorder.LINE_STYLE_INSET:
if (side == TOP || side == LEFT) {
inSideColor=darkColor;
outSideColor=darkColor;
}
 else if (side == BOTTOM || side == RIGHT) {
inSideColor=brightColor;
outSideColor=brightColor;
}
break;
case BaseBorder.LINE_STYLE_OUTSET:
if (side == TOP || side == LEFT) {
inSideColor=brightColor;
outSideColor=brightColor;
}
 else if (side == BOTTOM || side == RIGHT) {
inSideColor=darkColor;
outSideColor=darkColor;
}
break;
}
int inSideWidth=(width[side] + 1) / 2;
int outSideWidth=width[side] - inSideWidth;
g.setForegroundColor(outSideColor);
drawSingleLine(g,side,SWT.LINE_SOLID,width,outSideWidth,0,r);
g.setForegroundColor(inSideColor);
drawSingleLine(g,side,SWT.LINE_SOLID,width,inSideWidth,outSideWidth,r);
}