Program: 63169
Project: 63169
Buggy source:
public CubingJob buildJob(){
  checkPreconditions();
  final int groupRowkeyColumnsCount=segment.getCubeDesc().getRowkey().getNCuboidBuildLevels();
  final int totalRowkeyColumnsCount=segment.getCubeDesc().getRowkey().getRowKeyColumns().length;
  CubingJob result=initialJob("String_Node_Str");
  final String jobId=result.getId();
  final CubeJoinedFlatTableDesc intermediateTableDesc=new CubeJoinedFlatTableDesc(segment.getCubeDesc(),this.segment);
  final String intermediateHiveTableName=getIntermediateHiveTableName(intermediateTableDesc,jobId);
  final String factDistinctColumnsPath=getFactDistinctColumnsPath(jobId);
  final String cuboidRootPath=getJobWorkingDir(jobId) + "String_Node_Str" + getCubeName()+ "String_Node_Str";
  final String cuboidPath=cuboidRootPath + "String_Node_Str";
  final String[] cuboidOutputTempPath=getCuboidOutputPaths(cuboidRootPath,totalRowkeyColumnsCount,groupRowkeyColumnsCount);
  final ShellExecutable intermediateHiveTableStep=createIntermediateHiveTableStep(intermediateTableDesc,jobId);
  result.addTask(intermediateHiveTableStep);
  result.addTask(createFactDistinctColumnsStep(intermediateHiveTableName,jobId));
  result.addTask(createBuildDictionaryStep(factDistinctColumnsPath));
  final MapReduceExecutable baseCuboidStep=createBaseCuboidStep(intermediateHiveTableName,cuboidOutputTempPath);
  result.addTask(baseCuboidStep);
  for (int i=1; i <= groupRowkeyColumnsCount; i++) {
    int dimNum=totalRowkeyColumnsCount - i;
    result.addTask(createNDimensionCuboidStep(cuboidOutputTempPath,dimNum,totalRowkeyColumnsCount));
  }
  result.addTask(createRangeRowkeyDistributionStep(cuboidPath));
  result.addTask(createCreateHTableStep());
  final MapReduceExecutable convertCuboidToHfileStep=createConvertCuboidToHfileStep(cuboidPath,jobId);
  result.addTask(convertCuboidToHfileStep);
  result.addTask(createBulkLoadStep(jobId));
  result.addTask(createUpdateCubeInfoStep(intermediateHiveTableStep.getId(),baseCuboidStep.getId(),convertCuboidToHfileStep.getId()));
  return result;
}

Fixed version (ground truth):
public CubingJob buildJob(){
  checkPreconditions();
  final int groupRowkeyColumnsCount=segment.getCubeDesc().getRowkey().getNCuboidBuildLevels();
  final int totalRowkeyColumnsCount=segment.getCubeDesc().getRowkey().getRowKeyColumns().length;
  CubingJob result=initialJob("String_Node_Str");
  final String jobId=result.getId();
  final CubeJoinedFlatTableDesc intermediateTableDesc=new CubeJoinedFlatTableDesc(segment.getCubeDesc(),this.segment);
  final String intermediateHiveTableName=getIntermediateHiveTableName(intermediateTableDesc,jobId);
  final String factDistinctColumnsPath=getFactDistinctColumnsPath(jobId);
  final String cuboidRootPath=getJobWorkingDir(jobId) + "String_Node_Str" + getCubeName()+ "String_Node_Str";
  final String cuboidPath=cuboidRootPath + "String_Node_Str";
  final String[] cuboidOutputTempPath=getCuboidOutputPaths(cuboidRootPath,totalRowkeyColumnsCount,groupRowkeyColumnsCount);
  final ShellExecutable intermediateHiveTableStep=createIntermediateHiveTableStep(intermediateTableDesc,jobId);
  result.addTask(intermediateHiveTableStep);
  result.addTask(createFactDistinctColumnsStep(intermediateHiveTableName,jobId));
  result.addTask(createBuildDictionaryStep(factDistinctColumnsPath));
  final MapReduceExecutable baseCuboidStep=createBaseCuboidStep(intermediateHiveTableName,cuboidOutputTempPath);
  result.addTask(baseCuboidStep);
  for (int i=1; i <= groupRowkeyColumnsCount; i++) {
    int dimNum=totalRowkeyColumnsCount - i;
    result.addTask(createNDimensionCuboidStep(cuboidOutputTempPath,dimNum,totalRowkeyColumnsCount));
  }
  result.addTask(createRangeRowkeyDistributionStep(cuboidPath));
  result.addTask(createCreateHTableStep());
  final MapReduceExecutable convertCuboidToHfileStep=createConvertCuboidToHfileStep(cuboidPath,jobId);
  result.addTask(convertCuboidToHfileStep);
  result.addTask(createBulkLoadStep(jobId));
  result.addTask(createUpdateCubeInfoStep(intermediateHiveTableStep.getId(),baseCuboidStep.getId(),convertCuboidToHfileStep.getId(),jobId));
  return result;
}