Program: 90069
Project: 90069
Buggy source:
/** 
 * {@inheritDoc}
 */
@Override public void executeTask(@NotNull final Map<String,Object> context) throws GenieException {
  log.debug("String_Node_Str");
  super.executeTask(context);
  final Writer writer=Utils.getWriter(this.runScript);
  if (this.jobExecEnv.getApplications() != null) {
    for (    Application application : this.jobExecEnv.getApplications()) {
      createEntityInstanceDirectory(application.getId(),Constants.AdminResources.APPLICATION);
      final String applicationSetupFile=application.getSetupFile();
      if (applicationSetupFile != null && StringUtils.isNotBlank(applicationSetupFile)) {
        final String localPath=super.buildLocalFilePath(this.jobWorkigDirectory,application.getId(),applicationSetupFile,Constants.FileType.SETUP,Constants.AdminResources.APPLICATION);
        this.fts.getFile(applicationSetupFile,localPath);
        Utils.appendToWriter(writer,"String_Node_Str" + localPath + "String_Node_Str");
      }
      for (      final String dependencyFile : application.getDependencies()) {
        final String localPath=super.buildLocalFilePath(this.jobWorkigDirectory,application.getId(),dependencyFile,Constants.FileType.DEPENDENCIES,Constants.AdminResources.APPLICATION);
        this.fts.getFile(dependencyFile,localPath);
      }
      for (      final String configFile : application.getConfigs()) {
        final String localPath=super.buildLocalFilePath(this.jobWorkigDirectory,application.getId(),configFile,Constants.FileType.CONFIG,Constants.AdminResources.APPLICATION);
        this.fts.getFile(configFile,localPath);
      }
    }
  }
  Utils.closeWriter(writer);
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
@Override public void executeTask(@NotNull final Map<String,Object> context) throws GenieException {
  log.debug("String_Node_Str");
  super.executeTask(context);
  final Writer writer=Utils.getWriter(this.runScript);
  if (this.jobExecEnv.getApplications() != null) {
    for (    Application application : this.jobExecEnv.getApplications()) {
      createEntityInstanceDirectory(application.getId(),Constants.AdminResources.APPLICATION);
      createEntityInstanceConfigDirectory(application.getId(),Constants.AdminResources.APPLICATION);
      createEntityInstanceDependenciesDirectory(application.getId(),Constants.AdminResources.APPLICATION);
      final String applicationSetupFile=application.getSetupFile();
      if (applicationSetupFile != null && StringUtils.isNotBlank(applicationSetupFile)) {
        final String localPath=super.buildLocalFilePath(this.jobWorkigDirectory,application.getId(),applicationSetupFile,Constants.FileType.SETUP,Constants.AdminResources.APPLICATION);
        this.fts.getFile(applicationSetupFile,localPath);
        Utils.appendToWriter(writer,"String_Node_Str" + localPath + "String_Node_Str");
      }
      for (      final String dependencyFile : application.getDependencies()) {
        final String localPath=super.buildLocalFilePath(this.jobWorkigDirectory,application.getId(),dependencyFile,Constants.FileType.DEPENDENCIES,Constants.AdminResources.APPLICATION);
        this.fts.getFile(dependencyFile,localPath);
      }
      for (      final String configFile : application.getConfigs()) {
        final String localPath=super.buildLocalFilePath(this.jobWorkigDirectory,application.getId(),configFile,Constants.FileType.CONFIG,Constants.AdminResources.APPLICATION);
        this.fts.getFile(configFile,localPath);
      }
    }
  }
  Utils.closeWriter(writer);
}