Program: 73085
Project: 73085
Buggy source:
/** 
 * Gets a copy of source data. If copy multi-selection, skip all children's clone
 * @param source source to clone
 * @return copy of source
 */
public static Object cloneSource(Object source){
  source=unwrapToModel(source);
  if (source instanceof Object[]) {
    Object[] array=(Object[])source;
    ArrayList list=new ArrayList();
    for (int i=0; i < array.length; i++) {
      if (array[i] instanceof ColumnHandle) {
        list.add(cloneSource(array[i]));
      }
    }
    if (!list.isEmpty()) {
      return list.toArray();
    }
    for (int i=0; i < array.length; i++) {
      if (!checkContainerExists(array[i],array)) {
        list.add(cloneSource(array[i]));
      }
    }
    return list.toArray();
  }
  if (source instanceof StructuredSelection) {
    return cloneSource(((StructuredSelection)source).toArray());
  }
  if (source instanceof ColumnHandle) {
    try {
      int columnNumber=HandleAdapterFactory.getInstance().getColumnHandleAdapter(source).getColumnNumber();
      Object parent=((ColumnHandle)source).getContainer();
      if (parent instanceof TableHandle) {
        return ((TableHandle)parent).copyColumn(columnNumber);
      }
 else       if (parent instanceof GridHandle) {
        return ((GridHandle)parent).copyColumn(columnNumber);
      }
    }
 catch (    SemanticException e) {
      logger.log(Level.SEVERE,e.getMessage(),e);
    }
    return null;
  }
  if (source instanceof DesignElementHandle) {
    IDesignElement copyElement=((DesignElementHandle)source).copy();
    return copyElement;
  }
  if (source instanceof IDesignElement) {
    try {
      return ((IDesignElement)source).clone();
    }
 catch (    CloneNotSupportedException e) {
      logger.log(Level.SEVERE,e.getMessage(),e);
    }
  }
  if (source instanceof SlotHandle) {
    SlotHandle slot=(SlotHandle)source;
    Object[] array=new Object[slot.getCount()];
    for (int i=0; i < array.length; i++) {
      array[i]=slot.get(i);
    }
    return cloneSource(array);
  }
  if (source instanceof StructureHandle) {
    return ((StructureHandle)source).getStructure().copy();
  }
  return null;
}

Fixed version (ground truth):
/** 
 * Gets a copy of source data. If copy multi-selection, skip all children's clone
 * @param source source to clone
 * @return copy of source
 */
public static Object cloneSource(Object source){
  source=unwrapToModel(source);
  if (source instanceof Object[]) {
    Object[] array=(Object[])source;
    ArrayList list=new ArrayList();
    for (int i=0; i < array.length; i++) {
      if (array[i] instanceof ColumnHandle) {
        list.add(cloneSource(array[i]));
      }
    }
    if (!list.isEmpty()) {
      return list.toArray();
    }
    for (int i=0; i < array.length; i++) {
      if (!checkContainerExists(array[i],array)) {
        list.add(cloneSource(array[i]));
      }
    }
    return list.toArray();
  }
  if (source instanceof StructuredSelection) {
    return cloneSource(((StructuredSelection)source).toArray());
  }
  if (source instanceof ColumnHandle) {
    try {
      int columnNumber=HandleAdapterFactory.getInstance().getColumnHandleAdapter(source).getColumnNumber();
      Object parent=((ColumnHandle)source).getContainer();
      if (parent instanceof TableHandle) {
        return ((TableHandle)parent).copyColumn(columnNumber);
      }
 else       if (parent instanceof GridHandle) {
        return ((GridHandle)parent).copyColumn(columnNumber);
      }
    }
 catch (    SemanticException e) {
      logger.log(Level.SEVERE,e.getMessage(),e);
    }
    return null;
  }
  if (source instanceof DesignElementHandle) {
    IElementCopy copyElement=CopyUtil.copy((DesignElementHandle)source);
    return copyElement;
  }
  if (source instanceof IDesignElement) {
    try {
      return ((IDesignElement)source).clone();
    }
 catch (    CloneNotSupportedException e) {
      logger.log(Level.SEVERE,e.getMessage(),e);
    }
  }
  if (source instanceof SlotHandle) {
    SlotHandle slot=(SlotHandle)source;
    Object[] array=new Object[slot.getCount()];
    for (int i=0; i < array.length; i++) {
      array[i]=slot.get(i);
    }
    return cloneSource(array);
  }
  if (source instanceof StructureHandle) {
    return ((StructureHandle)source).getStructure().copy();
  }
  return null;
}