Program: 57859
Project: 57859
Buggy source:
/** 
 * Creates a new   {@link TableBasedDimensionGroupData} object with a new dataPerspective class. The newdataPerspective is created using the clusterNode (all leaves of the clusterNode eg are in the VA of the new perspective). Since nodes and trees are independent of the perspective's data type, we need the dataPersperctivClass parameter to tell us which perspective should be created.
 * @param dataDomain
 * @param recordPerspective
 * @param dimensionPerspective
 * @param rootNode
 * @param dataPerspectiveClass the class type of the newly generated perspective
 */
public TableBasedDimensionGroupData(ATableBasedDataDomain dataDomain,RecordPerspective recordPerspective,DimensionPerspective dimensionPerspective,ClusterNode rootNode,Class<? extends DataPerspective<?,?,?,?>> dataPerspectiveClass){
  super(dataDomain,recordPerspective,dimensionPerspective);
  label=rootNode.getLabel();
  if (dataPerspectiveClass.equals(RecordPerspective.class)) {
    this.recordPerspective=new RecordPerspective();
    this.recordPerspective.createVA(rootNode.getLeaveIds());
    this.recordPerspective.setTree((ClusterTree)rootNode.getTree());
    this.recordPerspective.setTreeRoot(rootNode);
    this.recordPerspective.finish();
    dataDomain.getTable().registerRecordPerspecive(recordPerspective);
  }
 else   if (dataPerspectiveClass.equals(DimensionPerspective.class)) {
    this.dimensionPerspective=new DimensionPerspective(dataDomain);
    this.dimensionPerspective.createVA(rootNode.getLeaveIds());
    this.dimensionPerspective.setTree((ClusterTree)rootNode.getTree());
    this.dimensionPerspective.setTreeRoot(rootNode);
    this.dimensionPerspective.finish();
    dataDomain.getTable().registerDimensionPerspective(this.dimensionPerspective);
  }
 else {
    throw new IllegalStateException("String_Node_Str" + dataPerspectiveClass);
  }
}

Fixed version (ground truth):
/** 
 * Creates a new   {@link TableBasedDimensionGroupData} object with a new dataPerspective class. The newdataPerspective is created using the clusterNode (all leaves of the clusterNode eg are in the VA of the new perspective). Since nodes and trees are independent of the perspective's data type, we need the dataPersperctivClass parameter to tell us which perspective should be created.
 * @param dataDomain
 * @param recordPerspective
 * @param dimensionPerspective
 * @param rootNode
 * @param dataPerspectiveClass the class type of the newly generated perspective
 */
public TableBasedDimensionGroupData(ATableBasedDataDomain dataDomain,RecordPerspective recordPerspective,DimensionPerspective dimensionPerspective,ClusterNode rootNode,Class<? extends ADataPerspective<?,?,?,?>> dataPerspectiveClass){
  super(dataDomain,recordPerspective,dimensionPerspective);
  label=rootNode.getLabel();
  if (dataPerspectiveClass.equals(RecordPerspective.class)) {
    this.recordPerspective=new RecordPerspective();
    this.recordPerspective.createVA(rootNode.getLeaveIds());
    this.recordPerspective.setTree((ClusterTree)rootNode.getTree());
    this.recordPerspective.setTreeRoot(rootNode);
    this.recordPerspective.finish();
    dataDomain.getTable().registerRecordPerspecive(recordPerspective);
  }
 else   if (dataPerspectiveClass.equals(DimensionPerspective.class)) {
    this.dimensionPerspective=new DimensionPerspective(dataDomain);
    this.dimensionPerspective.createVA(rootNode.getLeaveIds());
    this.dimensionPerspective.setTree((ClusterTree)rootNode.getTree());
    this.dimensionPerspective.setTreeRoot(rootNode);
    this.dimensionPerspective.finish();
    dataDomain.getTable().registerDimensionPerspective(this.dimensionPerspective);
  }
 else {
    throw new IllegalStateException("String_Node_Str" + dataPerspectiveClass);
  }
}