#vulnerable code 
                              private Flow build(Properties cascasdingProperties,
                     TapOrTapMap sources) throws IOException {

    pipe = new DomainBuilderAssembly(properties.getDomainName(), pipe, keyFieldName, valueFieldName);

    // Open new version and check for success
    openNewVersion();

    Flow flow = null;
    try {

      // Build flow
      flow = getFlow(cascasdingProperties, sources);

      // Set up job
      DomainBuilderOutputCommitter.setupJob(properties.getDomainName(), flow.getJobConf());

      // Complete flow
      flow.complete();

      // Commit job
      DomainBuilderOutputCommitter.commitJob(properties.getDomainName(), flow.getJobConf());

    } catch (Exception e) {
      // In case of failure, cancel this new version
      cancelNewVersion();
      // Clean up job
      if (flow != null) {
        DomainBuilderOutputCommitter.cleanupJob(properties.getDomainName(), flow.getJobConf());
      }
      e.printStackTrace();
      throw new IOException("Failed at building version " + domainVersion.getVersionNumber() +
          " of domain " + properties.getDomainName() + ". Cancelling version.", e);
    }
    // Close the new version
    closeNewVersion();
    // Clean up job
    DomainBuilderOutputCommitter.cleanupJob(properties.getDomainName(), flow.getJobConf());
    return flow;
  } 
                            #location 32 
                            #vulnerability type NULL_DEREFERENCE
#fixed code
                              private Flow build(Properties cascasdingProperties,
                     TapOrTapMap sources) throws IOException {

    pipe = new DomainBuilderAssembly(properties.getDomainName(), pipe, keyFieldName, valueFieldName);

    // Open new version and check for success
    openNewVersion();

    Flow flow = null;
    try {

      // Build flow
      flow = getFlow(cascasdingProperties, sources);

      // Set up job
      DomainBuilderOutputCommitter.setupJob(properties.getDomainName(), flow.getJobConf());

      // Complete flow
      flow.complete();

      // Commit job
      DomainBuilderOutputCommitter.commitJob(properties.getDomainName(), flow.getJobConf());

    } catch (Exception e) {
      String exceptionMessage = "Failed at building version " + domainVersion.getVersionNumber() +
          " of domain " + properties.getDomainName() + ". Cancelling version.";
      // In case of failure, cancel this new version
      cancelNewVersion();
      // Clean up job
      if (flow != null) {
        DomainBuilderOutputCommitter.cleanupJob(properties.getDomainName(), flow.getJobConf());
      }
      e.printStackTrace();
      throw new IOException(exceptionMessage, e);
    }
    // Close the new version
    closeNewVersion();
    // Clean up job
    DomainBuilderOutputCommitter.cleanupJob(properties.getDomainName(), flow.getJobConf());
    return flow;
  }