Program: 31670
Project: 31670
Buggy source:
private void init(MasterContext<NNParams,NNParams> context){
  this.isDry=Boolean.TRUE.toString().equals(context.getProps().getProperty(CommonConstants.SHIFU_DRY_DTRAIN));
  this.isBinaryNNModel=Boolean.TRUE.toString().equals(context.getProps().getProperty(Constants.SHIFU_NN_INDEPENDENT_MODEL,"String_Node_Str"));
  if (this.isDry) {
    return;
  }
  if (isInit.compareAndSet(false,true)) {
    loadConfigFiles(context.getProps());
    this.trainerId=context.getProps().getProperty(CommonConstants.SHIFU_TRAINER_ID);
    this.tmpModelsFolder=context.getProps().getProperty(CommonConstants.SHIFU_TMP_MODELS_FOLDER);
    gridSearch=new GridSearch(modelConfig.getTrain().getParams());
    validParams=this.modelConfig.getTrain().getParams();
    if (gridSearch.hasHyperParam()) {
      validParams=gridSearch.getParams(Integer.parseInt(trainerId));
      LOG.info("String_Node_Str",validParams);
    }
    Integer kCrossValidation=this.modelConfig.getTrain().getNumKFold();
    if (kCrossValidation != null && kCrossValidation > 0) {
      isKFoldCV=true;
    }
    Object dropoutRateObj=validParams.get(CommonConstants.DROPOUT_RATE);
    if (dropoutRateObj != null) {
      this.dropoutRate=Double.valueOf(dropoutRateObj.toString());
    }
    LOG.info("String_Node_Str",this.dropoutRate);
    this.bModel=new Path(context.getProps().getProperty(Constants.SHIFU_NN_BINARY_MODEL_PATH));
    initNetwork(context);
  }
  try {
    Path progressLog=new Path(context.getProps().getProperty(CommonConstants.SHIFU_DTRAIN_PROGRESS_FILE));
    if (ShifuFileUtils.isFileExists(progressLog,SourceType.HDFS)) {
      this.progressOutput=FileSystem.get(new Configuration()).append(progressLog);
    }
 else {
      this.progressOutput=FileSystem.get(new Configuration()).create(progressLog);
    }
  }
 catch (  IOException e) {
    LOG.error("String_Node_Str",e);
  }
}

Fixed version (ground truth):
private void init(MasterContext<NNParams,NNParams> context){
  this.isDry=Boolean.TRUE.toString().equals(context.getProps().getProperty(CommonConstants.SHIFU_DRY_DTRAIN));
  if (this.isDry) {
    return;
  }
  if (isInit.compareAndSet(false,true)) {
    loadConfigFiles(context.getProps());
    this.trainerId=context.getProps().getProperty(CommonConstants.SHIFU_TRAINER_ID);
    this.tmpModelsFolder=context.getProps().getProperty(CommonConstants.SHIFU_TMP_MODELS_FOLDER);
    gridSearch=new GridSearch(modelConfig.getTrain().getParams());
    validParams=this.modelConfig.getTrain().getParams();
    if (gridSearch.hasHyperParam()) {
      validParams=gridSearch.getParams(Integer.parseInt(trainerId));
      LOG.info("String_Node_Str",validParams);
    }
    Integer kCrossValidation=this.modelConfig.getTrain().getNumKFold();
    if (kCrossValidation != null && kCrossValidation > 0) {
      isKFoldCV=true;
    }
    Object dropoutRateObj=validParams.get(CommonConstants.DROPOUT_RATE);
    if (dropoutRateObj != null) {
      this.dropoutRate=Double.valueOf(dropoutRateObj.toString());
    }
    LOG.info("String_Node_Str",this.dropoutRate);
    this.bModel=new Path(context.getProps().getProperty(Constants.SHIFU_NN_BINARY_MODEL_PATH));
    initNetwork(context);
  }
  try {
    Path progressLog=new Path(context.getProps().getProperty(CommonConstants.SHIFU_DTRAIN_PROGRESS_FILE));
    if (ShifuFileUtils.isFileExists(progressLog,SourceType.HDFS)) {
      this.progressOutput=FileSystem.get(new Configuration()).append(progressLog);
    }
 else {
      this.progressOutput=FileSystem.get(new Configuration()).create(progressLog);
    }
  }
 catch (  IOException e) {
    LOG.error("String_Node_Str",e);
  }
}