Program: 63174
Project: 63174
Buggy source:
@Override protected ExecuteResult doWork(ExecutableContext context) throws ExecuteException {
  final CubeInstance cube=cubeManager.getCube(getCubeName());
  final CubeSegment segment=cube.getSegmentById(getSegmentId());
  String sourceRecordsSize=jobService.getOutput(getCreateFlatTableStepId()).getExtra().get(ExecutableConstants.SOURCE_RECORDS_SIZE);
  Preconditions.checkState(StringUtils.isNotEmpty(sourceRecordsSize),"String_Node_Str");
  long sourceSize=Long.parseLong(sourceRecordsSize);
  String sourceRecordsCount=jobService.getOutput(getBaseCuboidStepId()).getExtra().get(ExecutableConstants.SOURCE_RECORDS_COUNT);
  Preconditions.checkState(StringUtils.isNotEmpty(sourceRecordsCount),"String_Node_Str");
  long sourceCount=Long.parseLong(sourceRecordsCount);
  String cubeSizeString=jobService.getOutput(getConvertToHfileStepId()).getExtra().get(ExecutableConstants.HDFS_BYTES_WRITTEN);
  Preconditions.checkState(StringUtils.isNotEmpty(cubeSizeString),"String_Node_Str");
  long size=Long.parseLong(cubeSizeString) / 1024;
  segment.setLastBuildJobID(getId());
  segment.setLastBuildTime(System.currentTimeMillis());
  segment.setSizeKB(size);
  segment.setSourceRecords(sourceCount);
  segment.setSourceRecordsSize(sourceSize);
  segment.setStatus(SegmentStatusEnum.READY);
  cube.setStatus(RealizationStatusEnum.READY);
  try {
    cubeManager.updateCube(cube);
    return new ExecuteResult(ExecuteResult.State.SUCCEED,"String_Node_Str");
  }
 catch (  IOException e) {
    logger.error("String_Node_Str",e);
    return new ExecuteResult(ExecuteResult.State.ERROR,e.getLocalizedMessage());
  }
}

Fixed version (ground truth):
@Override protected ExecuteResult doWork(ExecutableContext context) throws ExecuteException {
  final CubeInstance cube=cubeManager.getCube(getCubeName());
  final CubeSegment segment=cube.getSegmentById(getSegmentId());
  String sourceRecordsSize=jobService.getOutput(getCreateFlatTableStepId()).getExtra().get(ExecutableConstants.SOURCE_RECORDS_SIZE);
  Preconditions.checkState(StringUtils.isNotEmpty(sourceRecordsSize),"String_Node_Str");
  long sourceSize=Long.parseLong(sourceRecordsSize);
  String sourceRecordsCount=jobService.getOutput(getBaseCuboidStepId()).getExtra().get(ExecutableConstants.SOURCE_RECORDS_COUNT);
  Preconditions.checkState(StringUtils.isNotEmpty(sourceRecordsCount),"String_Node_Str");
  long sourceCount=Long.parseLong(sourceRecordsCount);
  String cubeSizeString=jobService.getOutput(getConvertToHfileStepId()).getExtra().get(ExecutableConstants.HDFS_BYTES_WRITTEN);
  Preconditions.checkState(StringUtils.isNotEmpty(cubeSizeString),"String_Node_Str");
  long size=Long.parseLong(cubeSizeString) / 1024;
  segment.setLastBuildJobID(getCubingJobId());
  segment.setLastBuildTime(System.currentTimeMillis());
  segment.setSizeKB(size);
  segment.setSourceRecords(sourceCount);
  segment.setSourceRecordsSize(sourceSize);
  segment.setStatus(SegmentStatusEnum.READY);
  cube.setStatus(RealizationStatusEnum.READY);
  try {
    cubeManager.updateCube(cube);
    return new ExecuteResult(ExecuteResult.State.SUCCEED,"String_Node_Str");
  }
 catch (  IOException e) {
    logger.error("String_Node_Str",e);
    return new ExecuteResult(ExecuteResult.State.ERROR,e.getLocalizedMessage());
  }
}