Program: 104001
Project: 104001
Buggy source:
private WhiteboardObject updateWhiteboardObjects(WhiteboardObject ws){
  WhiteboardObjectJabberImpl wbObj=null;
  int i=0;
  while (i < whiteboardObjects.size()) {
    WhiteboardObjectJabberImpl wbObjTmp=(WhiteboardObjectJabberImpl)whiteboardObjects.get(i);
    if (wbObjTmp.getID().equals(ws.getID())) {
      wbObj=wbObjTmp;
      break;
    }
 else     i++;
  }
  if (wbObj == null)   return null;
  if (ws instanceof WhiteboardObjectPath) {
    WhiteboardObjectPathJabberImpl obj=(WhiteboardObjectPathJabberImpl)wbObj;
    obj.setPoints(((WhiteboardObjectPath)ws).getPoints());
    obj.setColor(ws.getColor());
    obj.setThickness(ws.getThickness());
  }
 else   if (ws instanceof WhiteboardObjectPolyLine) {
    WhiteboardObjectPolyLineJabberImpl obj=(WhiteboardObjectPolyLineJabberImpl)wbObj;
    obj.setPoints(((WhiteboardObjectPolyLine)ws).getPoints());
    obj.setColor(ws.getColor());
    obj.setThickness(ws.getThickness());
  }
 else   if (ws instanceof WhiteboardObjectPolygon) {
    WhiteboardObjectPolygonJabberImpl obj=(WhiteboardObjectPolygonJabberImpl)wbObj;
    obj.setPoints(((WhiteboardObjectPolygon)ws).getPoints());
    obj.setBackgroundColor(((WhiteboardObjectPolygon)ws).getBackgroundColor());
    obj.setFill(((WhiteboardObjectPolygon)ws).isFill());
    obj.setColor(ws.getColor());
    obj.setThickness(ws.getThickness());
  }
 else   if (ws instanceof WhiteboardObjectLine) {
    WhiteboardObjectLineJabberImpl obj=(WhiteboardObjectLineJabberImpl)wbObj;
    obj.setWhiteboardPointStart(((WhiteboardObjectLine)ws).getWhiteboardPointStart());
    obj.setWhiteboardPointEnd(((WhiteboardObjectLine)ws).getWhiteboardPointEnd());
    obj.setColor(ws.getColor());
    obj.setThickness(ws.getThickness());
  }
 else   if (ws instanceof WhiteboardObjectRect) {
    WhiteboardObjectRectJabberImpl obj=(WhiteboardObjectRectJabberImpl)wbObj;
    obj.setFill(((WhiteboardObjectRect)ws).isFill());
    obj.setHeight(((WhiteboardObjectRect)ws).getHeight());
    obj.setWhiteboardPoint(((WhiteboardObjectRect)ws).getWhiteboardPoint());
    obj.setWidth((((WhiteboardObjectRect)ws)).getWidth());
    obj.setColor(ws.getColor());
    obj.setThickness(ws.getThickness());
  }
 else   if (ws instanceof WhiteboardObjectCircle) {
    WhiteboardObjectCircleJabberImpl obj=(WhiteboardObjectCircleJabberImpl)wbObj;
    obj.setFill(((WhiteboardObjectCircle)ws).isFill());
    obj.setRadius(((WhiteboardObjectCircle)ws).getRadius());
    obj.setWhiteboardPoint(((WhiteboardObjectCircle)ws).getWhiteboardPoint());
    obj.setBackgroundColor((((WhiteboardObjectCircle)ws)).getBackgroundColor());
    obj.setColor(ws.getColor());
    obj.setThickness(ws.getThickness());
  }
 else   if (ws instanceof WhiteboardObjectText) {
    WhiteboardObjectTextJabberImpl obj=(WhiteboardObjectTextJabberImpl)wbObj;
    obj.setFontName(((WhiteboardObjectText)ws).getFontName());
    obj.setFontSize(((WhiteboardObjectText)ws).getFontSize());
    obj.setText(((WhiteboardObjectText)ws).getText());
    obj.setWhiteboardPoint(((WhiteboardObjectText)ws).getWhiteboardPoint());
    obj.setColor(ws.getColor());
    obj.setThickness(ws.getThickness());
  }
 else   if (ws instanceof WhiteboardObjectImage) {
    WhiteboardObjectImageJabberImpl obj=(WhiteboardObjectImageJabberImpl)wbObj;
    obj.setBackgroundImage(((WhiteboardObjectImage)ws).getBackgroundImage());
    obj.setHeight(((WhiteboardObjectImage)ws).getHeight());
    obj.setWhiteboardPoint(((WhiteboardObjectImage)ws).getWhiteboardPoint());
    obj.setWidth(((WhiteboardObjectImage)ws).getWidth());
    obj.setColor(ws.getColor());
    obj.setThickness(ws.getThickness());
  }
  whiteboardObjects.set(i,wbObj);
  return wbObj;
}

Fixed version (ground truth):
private WhiteboardObject updateWhiteboardObjects(WhiteboardObject ws){
  WhiteboardObjectJabberImpl wbObj=null;
  int i=0;
  while (i < whiteboardObjects.size()) {
    WhiteboardObjectJabberImpl wbObjTmp=whiteboardObjects.get(i);
    if (wbObjTmp.getID().equals(ws.getID())) {
      wbObj=wbObjTmp;
      break;
    }
 else     i++;
  }
  if (wbObj == null)   return null;
  if (ws instanceof WhiteboardObjectPath) {
    WhiteboardObjectPathJabberImpl obj=(WhiteboardObjectPathJabberImpl)wbObj;
    obj.setPoints(((WhiteboardObjectPath)ws).getPoints());
    obj.setColor(ws.getColor());
    obj.setThickness(ws.getThickness());
  }
 else   if (ws instanceof WhiteboardObjectPolyLine) {
    WhiteboardObjectPolyLineJabberImpl obj=(WhiteboardObjectPolyLineJabberImpl)wbObj;
    obj.setPoints(((WhiteboardObjectPolyLine)ws).getPoints());
    obj.setColor(ws.getColor());
    obj.setThickness(ws.getThickness());
  }
 else   if (ws instanceof WhiteboardObjectPolygon) {
    WhiteboardObjectPolygonJabberImpl obj=(WhiteboardObjectPolygonJabberImpl)wbObj;
    obj.setPoints(((WhiteboardObjectPolygon)ws).getPoints());
    obj.setBackgroundColor(((WhiteboardObjectPolygon)ws).getBackgroundColor());
    obj.setFill(((WhiteboardObjectPolygon)ws).isFill());
    obj.setColor(ws.getColor());
    obj.setThickness(ws.getThickness());
  }
 else   if (ws instanceof WhiteboardObjectLine) {
    WhiteboardObjectLineJabberImpl obj=(WhiteboardObjectLineJabberImpl)wbObj;
    obj.setWhiteboardPointStart(((WhiteboardObjectLine)ws).getWhiteboardPointStart());
    obj.setWhiteboardPointEnd(((WhiteboardObjectLine)ws).getWhiteboardPointEnd());
    obj.setColor(ws.getColor());
    obj.setThickness(ws.getThickness());
  }
 else   if (ws instanceof WhiteboardObjectRect) {
    WhiteboardObjectRectJabberImpl obj=(WhiteboardObjectRectJabberImpl)wbObj;
    obj.setFill(((WhiteboardObjectRect)ws).isFill());
    obj.setHeight(((WhiteboardObjectRect)ws).getHeight());
    obj.setWhiteboardPoint(((WhiteboardObjectRect)ws).getWhiteboardPoint());
    obj.setWidth((((WhiteboardObjectRect)ws)).getWidth());
    obj.setColor(ws.getColor());
    obj.setThickness(ws.getThickness());
  }
 else   if (ws instanceof WhiteboardObjectCircle) {
    WhiteboardObjectCircleJabberImpl obj=(WhiteboardObjectCircleJabberImpl)wbObj;
    obj.setFill(((WhiteboardObjectCircle)ws).isFill());
    obj.setRadius(((WhiteboardObjectCircle)ws).getRadius());
    obj.setWhiteboardPoint(((WhiteboardObjectCircle)ws).getWhiteboardPoint());
    obj.setBackgroundColor((((WhiteboardObjectCircle)ws)).getBackgroundColor());
    obj.setColor(ws.getColor());
    obj.setThickness(ws.getThickness());
  }
 else   if (ws instanceof WhiteboardObjectText) {
    WhiteboardObjectTextJabberImpl obj=(WhiteboardObjectTextJabberImpl)wbObj;
    obj.setFontName(((WhiteboardObjectText)ws).getFontName());
    obj.setFontSize(((WhiteboardObjectText)ws).getFontSize());
    obj.setText(((WhiteboardObjectText)ws).getText());
    obj.setWhiteboardPoint(((WhiteboardObjectText)ws).getWhiteboardPoint());
    obj.setColor(ws.getColor());
    obj.setThickness(ws.getThickness());
  }
 else   if (ws instanceof WhiteboardObjectImage) {
    WhiteboardObjectImageJabberImpl obj=(WhiteboardObjectImageJabberImpl)wbObj;
    obj.setBackgroundImage(((WhiteboardObjectImage)ws).getBackgroundImage());
    obj.setHeight(((WhiteboardObjectImage)ws).getHeight());
    obj.setWhiteboardPoint(((WhiteboardObjectImage)ws).getWhiteboardPoint());
    obj.setWidth(((WhiteboardObjectImage)ws).getWidth());
    obj.setColor(ws.getColor());
    obj.setThickness(ws.getThickness());
  }
  whiteboardObjects.set(i,wbObj);
  return wbObj;
}