Program: 125679
Project: 125679
Buggy source:
/** 
 * Add the properties for job.
 */
@Override @SuppressWarnings("String_Node_Str") protected void addProperties(Model model){
  super.addProperties(model);
  Properties properties=model.getProperties();
  final IProcessor jProcessor=getJobProcessor();
  final IProcess process=jProcessor.getProcess();
  final IContext context=jProcessor.getContext();
  final Property property=jProcessor.getProperty();
  String jobClassPackageFolder=JavaResourcesHelper.getJobClassPackageFolder(property.getItem());
  String jobClassPackage=JavaResourcesHelper.getJobClassPackageName(property.getItem());
  String jobFolderName=JavaResourcesHelper.getJobFolderName(property.getLabel(),property.getVersion());
  Project project=ProjectManager.getInstance().getProject(property);
  if (project == null) {
    project=ProjectManager.getInstance().getCurrentProject().getEmfProject();
  }
  String mainProjectBranch=ProjectManager.getInstance().getMainProjectBranch(project);
  if (mainProjectBranch == null) {
    mainProjectBranch=SVNConstant.NAME_TRUNK;
  }
  checkPomProperty(properties,"String_Node_Str",ETalendMavenVariables.JobPath,jobClassPackageFolder);
  checkPomProperty(properties,"String_Node_Str",ETalendMavenVariables.JobPackage,jobClassPackage);
  String contextName=getOptionString(TalendProcessArgumentConstant.ARG_CONTEXT_NAME);
  if (contextName == null) {
    contextName=context.getName();
  }
  JobInfoProperties jobInfoProp=new JobInfoProperties((ProcessItem)property.getItem(),contextName,isOptionChecked(TalendProcessArgumentConstant.ARG_ENABLE_APPLY_CONTEXT_TO_CHILDREN),isOptionChecked(TalendProcessArgumentConstant.ARG_ENABLE_STATS));
  checkPomProperty(properties,"String_Node_Str",ETalendMavenVariables.ProjectName,jobInfoProp.getProperty(JobInfoProperties.PROJECT_NAME,project.getTechnicalLabel()));
  checkPomProperty(properties,"String_Node_Str",ETalendMavenVariables.ProjectName,jobInfoProp.getProperty(JobInfoProperties.PROJECT_NAME,project.getTechnicalLabel()).toLowerCase());
  checkPomProperty(properties,"String_Node_Str",ETalendMavenVariables.ProjectId,jobInfoProp.getProperty(JobInfoProperties.PROJECT_ID,String.valueOf(project.getId())));
  checkPomProperty(properties,"String_Node_Str",ETalendMavenVariables.ProjectBranch,jobInfoProp.getProperty(JobInfoProperties.BRANCH,mainProjectBranch));
  checkPomProperty(properties,"String_Node_Str",ETalendMavenVariables.JobName,jobInfoProp.getProperty(JobInfoProperties.JOB_NAME,property.getLabel()));
  checkPomProperty(properties,"String_Node_Str",ETalendMavenVariables.JobVersion,"String_Node_Str");
  checkPomProperty(properties,"String_Node_Str",ETalendMavenVariables.JobDate,jobInfoProp.getProperty(JobInfoProperties.DATE,JobInfoProperties.DATAFORMAT.format(new Date())));
  checkPomProperty(properties,"String_Node_Str",ETalendMavenVariables.JobContext,jobInfoProp.getProperty(JobInfoProperties.CONTEXT_NAME,context.getName()));
  checkPomProperty(properties,"String_Node_Str",ETalendMavenVariables.JobId,jobInfoProp.getProperty(JobInfoProperties.JOB_ID,process.getId()));
  checkPomProperty(properties,"String_Node_Str",ETalendMavenVariables.JobType,jobInfoProp.getProperty(JobInfoProperties.JOB_TYPE));
  if (process instanceof IProcess2) {
    String framework=(String)((IProcess2)process).getAdditionalProperties().get("String_Node_Str");
    if (framework == null) {
      framework="String_Node_Str";
    }
    checkPomProperty(properties,"String_Node_Str",ETalendMavenVariables.Framework,framework);
  }
  checkPomProperty(properties,"String_Node_Str",ETalendMavenVariables.JobClass,"String_Node_Str");
  checkPomProperty(properties,"String_Node_Str",ETalendMavenVariables.JobStat,jobInfoProp.getProperty(JobInfoProperties.ADD_STATIC_CODE,Boolean.FALSE.toString()));
  checkPomProperty(properties,"String_Node_Str",ETalendMavenVariables.JobApplyContextToChildren,jobInfoProp.getProperty(JobInfoProperties.APPLY_CONTEXY_CHILDREN,Boolean.FALSE.toString()));
  checkPomProperty(properties,"String_Node_Str",ETalendMavenVariables.ProductVersion,jobInfoProp.getProperty(JobInfoProperties.COMMANDLINE_VERSION,VersionUtils.getVersion()));
  StringBuffer windowsScriptAdditionValue=new StringBuffer(50);
  StringBuffer unixScriptAdditionValue=new StringBuffer(50);
  addScriptAddition(windowsScriptAdditionValue,this.getWindowsScriptAddition());
  addScriptAddition(unixScriptAdditionValue,this.getUnixScriptAddition());
  if (isOptionChecked(TalendProcessArgumentConstant.ARG_NEED_CONTEXT)) {
    final String contextPart=TalendProcessArgumentConstant.CMD_ARG_CONTEXT_NAME + contextName;
    addScriptAddition(windowsScriptAdditionValue,contextPart);
    addScriptAddition(unixScriptAdditionValue,contextPart);
  }
  List paramsList=ProcessUtils.getOptionValue(getArgumentsMap(),TalendProcessArgumentConstant.ARG_CONTEXT_PARAMS,(List)null);
  if (paramsList != null && !paramsList.isEmpty()) {
    StringBuffer contextParamPart=new StringBuffer(100);
    for (    Object param : paramsList) {
      if (param instanceof ContextParameterType) {
        ContextParameterType contextParamType=(ContextParameterType)param;
        contextParamPart.append(' ');
        contextParamPart.append(TalendProcessArgumentConstant.CMD_ARG_CONTEXT_PARAMETER);
        contextParamPart.append(' ');
        contextParamPart.append(contextParamType.getName());
        contextParamPart.append('=');
        String value=contextParamType.getRawValue();
        if (value == null) {
          contextParamPart.append((String)null);
        }
 else         if (value.contains("String_Node_Str")) {
          contextParamPart.append(TalendQuoteUtils.addQuotesIfNotExist(value));
        }
 else {
          contextParamPart.append(value);
        }
      }
    }
    if (contextParamPart.length() > 0) {
      addScriptAddition(windowsScriptAdditionValue,contextParamPart.toString());
      addScriptAddition(unixScriptAdditionValue,contextParamPart.toString());
    }
  }
  if (isOptionChecked(TalendProcessArgumentConstant.ARG_ENABLE_LOG4J) && isOptionChecked(TalendProcessArgumentConstant.ARG_NEED_LOG4J_LEVEL)) {
    String log4jLevel=getOptionString(TalendProcessArgumentConstant.ARG_LOG4J_LEVEL);
    if (StringUtils.isNotEmpty(log4jLevel)) {
      String log4jLevelPart=TalendProcessArgumentConstant.CMD_ARG_LOG4J_LEVEL + log4jLevel;
      addScriptAddition(windowsScriptAdditionValue,log4jLevelPart);
      addScriptAddition(unixScriptAdditionValue,log4jLevelPart);
    }
  }
  if (isOptionChecked(TalendProcessArgumentConstant.ARG_ENABLE_STATS)) {
    String statsPort=getOptionString(TalendProcessArgumentConstant.ARG_PORT_STATS);
    if (StringUtils.isNotEmpty(statsPort)) {
      String statsPortPart=TalendProcessArgumentConstant.CMD_ARG_STATS_PORT + statsPort;
      addScriptAddition(windowsScriptAdditionValue,statsPortPart);
      addScriptAddition(unixScriptAdditionValue,statsPortPart);
    }
  }
  if (isOptionChecked(TalendProcessArgumentConstant.ARG_ENABLE_TRACS)) {
    String tracPort=getOptionString(TalendProcessArgumentConstant.ARG_PORT_TRACS);
    if (StringUtils.isNotEmpty(tracPort)) {
      String tracPortPart=TalendProcessArgumentConstant.CMD_ARG_TRACE_PORT + tracPort;
      addScriptAddition(windowsScriptAdditionValue,tracPortPart);
      addScriptAddition(unixScriptAdditionValue,tracPortPart);
    }
  }
  String watchParam=getOptionString(TalendProcessArgumentConstant.ARG_ENABLE_WATCH);
  if (StringUtils.isNotEmpty(watchParam)) {
    addScriptAddition(windowsScriptAdditionValue,TalendProcessArgumentConstant.CMD_ARG_WATCH);
    addScriptAddition(unixScriptAdditionValue,TalendProcessArgumentConstant.CMD_ARG_WATCH);
  }
  String[] jvmArgs=jProcessor.getJVMArgs();
  StringBuffer jvmArgsStr=new StringBuffer();
  if (jvmArgs != null && jvmArgs.length > 0) {
    for (    String arg : jvmArgs) {
      jvmArgsStr.append(arg);
      jvmArgsStr.append(' ');
    }
  }
  checkPomProperty(properties,"String_Node_Str",ETalendMavenVariables.JobJvmArgs,jvmArgsStr.toString());
  checkPomProperty(properties,"String_Node_Str",ETalendMavenVariables.JobBatClasspath,this.getWindowsClasspath());
  checkPomProperty(properties,"String_Node_Str",ETalendMavenVariables.JobBatAddition,windowsScriptAdditionValue.toString());
  checkPomProperty(properties,"String_Node_Str",ETalendMavenVariables.JobShClasspath,this.getUnixClasspath());
  checkPomProperty(properties,"String_Node_Str",ETalendMavenVariables.JobShAddition,unixScriptAdditionValue.toString());
  String finalNameStr=JavaResourcesHelper.getJobJarName(property.getLabel(),property.getVersion());
  checkPomProperty(properties,"String_Node_Str",ETalendMavenVariables.JobFinalName,finalNameStr);
}

Fixed version (ground truth):
/** 
 * Add the properties for job.
 */
@Override @SuppressWarnings("String_Node_Str") protected void addProperties(Model model){
  super.addProperties(model);
  Properties properties=model.getProperties();
  final IProcessor jProcessor=getJobProcessor();
  final IProcess process=jProcessor.getProcess();
  final IContext context=jProcessor.getContext();
  final Property property=jProcessor.getProperty();
  String jobClassPackageFolder=JavaResourcesHelper.getJobClassPackageFolder(property.getItem());
  String jobClassPackage=JavaResourcesHelper.getJobClassPackageName(property.getItem());
  String jobFolderName=JavaResourcesHelper.getJobFolderName(property.getLabel(),property.getVersion());
  Project project=ProjectManager.getInstance().getProject(property);
  if (project == null) {
    project=ProjectManager.getInstance().getCurrentProject().getEmfProject();
  }
  String mainProjectBranch=ProjectManager.getInstance().getMainProjectBranch(project);
  if (mainProjectBranch == null) {
    mainProjectBranch=SVNConstant.NAME_TRUNK;
  }
  checkPomProperty(properties,"String_Node_Str",ETalendMavenVariables.JobPath,jobClassPackageFolder);
  checkPomProperty(properties,"String_Node_Str",ETalendMavenVariables.JobPackage,jobClassPackage);
  String contextName=getOptionString(TalendProcessArgumentConstant.ARG_CONTEXT_NAME);
  if (contextName == null) {
    contextName=context.getName();
  }
  JobInfoProperties jobInfoProp=new JobInfoProperties((ProcessItem)property.getItem(),contextName,isOptionChecked(TalendProcessArgumentConstant.ARG_ENABLE_APPLY_CONTEXT_TO_CHILDREN),isOptionChecked(TalendProcessArgumentConstant.ARG_ENABLE_STATS));
  checkPomProperty(properties,"String_Node_Str",ETalendMavenVariables.ProjectName,jobInfoProp.getProperty(JobInfoProperties.PROJECT_NAME,project.getTechnicalLabel()));
  checkPomProperty(properties,"String_Node_Str",ETalendMavenVariables.ProjectName,jobInfoProp.getProperty(JobInfoProperties.PROJECT_NAME,project.getTechnicalLabel()).toLowerCase());
  checkPomProperty(properties,"String_Node_Str",ETalendMavenVariables.ProjectId,jobInfoProp.getProperty(JobInfoProperties.PROJECT_ID,String.valueOf(project.getId())));
  checkPomProperty(properties,"String_Node_Str",ETalendMavenVariables.ProjectBranch,jobInfoProp.getProperty(JobInfoProperties.BRANCH,mainProjectBranch));
  checkPomProperty(properties,"String_Node_Str",ETalendMavenVariables.JobName,jobInfoProp.getProperty(JobInfoProperties.JOB_NAME,property.getLabel()));
  checkPomProperty(properties,"String_Node_Str",ETalendMavenVariables.JobVersion,"String_Node_Str");
  checkPomProperty(properties,"String_Node_Str",ETalendMavenVariables.JobDate,jobInfoProp.getProperty(JobInfoProperties.DATE,JobInfoProperties.DATAFORMAT.format(new Date())));
  checkPomProperty(properties,"String_Node_Str",ETalendMavenVariables.JobContext,jobInfoProp.getProperty(JobInfoProperties.CONTEXT_NAME,context.getName()));
  checkPomProperty(properties,"String_Node_Str",ETalendMavenVariables.JobId,jobInfoProp.getProperty(JobInfoProperties.JOB_ID,process.getId()));
  checkPomProperty(properties,"String_Node_Str",ETalendMavenVariables.JobType,jobInfoProp.getProperty(JobInfoProperties.JOB_TYPE));
  if (process instanceof IProcess2) {
    String framework=(String)((IProcess2)process).getAdditionalProperties().get("String_Node_Str");
    if (framework == null) {
      framework="String_Node_Str";
    }
    checkPomProperty(properties,"String_Node_Str",ETalendMavenVariables.Framework,framework);
  }
  checkPomProperty(properties,"String_Node_Str",ETalendMavenVariables.JobClass,"String_Node_Str");
  checkPomProperty(properties,"String_Node_Str",ETalendMavenVariables.JobStat,jobInfoProp.getProperty(JobInfoProperties.ADD_STATIC_CODE,Boolean.FALSE.toString()));
  checkPomProperty(properties,"String_Node_Str",ETalendMavenVariables.JobApplyContextToChildren,jobInfoProp.getProperty(JobInfoProperties.APPLY_CONTEXY_CHILDREN,Boolean.FALSE.toString()));
  checkPomProperty(properties,"String_Node_Str",ETalendMavenVariables.ProductVersion,jobInfoProp.getProperty(JobInfoProperties.COMMANDLINE_VERSION,VersionUtils.getVersion()));
  StringBuffer windowsScriptAdditionValue=new StringBuffer(50);
  StringBuffer unixScriptAdditionValue=new StringBuffer(50);
  addScriptAddition(windowsScriptAdditionValue,this.getWindowsScriptAddition());
  addScriptAddition(unixScriptAdditionValue,this.getUnixScriptAddition());
  if (isOptionChecked(TalendProcessArgumentConstant.ARG_NEED_CONTEXT)) {
    final String contextPart=TalendProcessArgumentConstant.CMD_ARG_CONTEXT_NAME + contextName;
    addScriptAddition(windowsScriptAdditionValue,contextPart);
    addScriptAddition(unixScriptAdditionValue,contextPart);
  }
  List paramsList=ProcessUtils.getOptionValue(getArgumentsMap(),TalendProcessArgumentConstant.ARG_CONTEXT_PARAMS,(List)null);
  if (paramsList != null && !paramsList.isEmpty()) {
    StringBuffer contextParamPart=new StringBuffer(100);
    for (    Object param : paramsList) {
      if (param instanceof ContextParameterType) {
        ContextParameterType contextParamType=(ContextParameterType)param;
        contextParamPart.append(' ');
        contextParamPart.append(TalendProcessArgumentConstant.CMD_ARG_CONTEXT_PARAMETER);
        contextParamPart.append(' ');
        contextParamPart.append(contextParamType.getName());
        contextParamPart.append('=');
        String value=contextParamType.getRawValue();
        if (value == null) {
          contextParamPart.append((String)null);
        }
 else {
          value=TalendQuoteUtils.addPairQuotesIfNotExist(value);
          contextParamPart.append(value);
        }
      }
    }
    if (contextParamPart.length() > 0) {
      addScriptAddition(windowsScriptAdditionValue,contextParamPart.toString());
      addScriptAddition(unixScriptAdditionValue,contextParamPart.toString());
    }
  }
  if (isOptionChecked(TalendProcessArgumentConstant.ARG_ENABLE_LOG4J) && isOptionChecked(TalendProcessArgumentConstant.ARG_NEED_LOG4J_LEVEL)) {
    String log4jLevel=getOptionString(TalendProcessArgumentConstant.ARG_LOG4J_LEVEL);
    if (StringUtils.isNotEmpty(log4jLevel)) {
      String log4jLevelPart=TalendProcessArgumentConstant.CMD_ARG_LOG4J_LEVEL + log4jLevel;
      addScriptAddition(windowsScriptAdditionValue,log4jLevelPart);
      addScriptAddition(unixScriptAdditionValue,log4jLevelPart);
    }
  }
  if (isOptionChecked(TalendProcessArgumentConstant.ARG_ENABLE_STATS)) {
    String statsPort=getOptionString(TalendProcessArgumentConstant.ARG_PORT_STATS);
    if (StringUtils.isNotEmpty(statsPort)) {
      String statsPortPart=TalendProcessArgumentConstant.CMD_ARG_STATS_PORT + statsPort;
      addScriptAddition(windowsScriptAdditionValue,statsPortPart);
      addScriptAddition(unixScriptAdditionValue,statsPortPart);
    }
  }
  if (isOptionChecked(TalendProcessArgumentConstant.ARG_ENABLE_TRACS)) {
    String tracPort=getOptionString(TalendProcessArgumentConstant.ARG_PORT_TRACS);
    if (StringUtils.isNotEmpty(tracPort)) {
      String tracPortPart=TalendProcessArgumentConstant.CMD_ARG_TRACE_PORT + tracPort;
      addScriptAddition(windowsScriptAdditionValue,tracPortPart);
      addScriptAddition(unixScriptAdditionValue,tracPortPart);
    }
  }
  String watchParam=getOptionString(TalendProcessArgumentConstant.ARG_ENABLE_WATCH);
  if (StringUtils.isNotEmpty(watchParam)) {
    addScriptAddition(windowsScriptAdditionValue,TalendProcessArgumentConstant.CMD_ARG_WATCH);
    addScriptAddition(unixScriptAdditionValue,TalendProcessArgumentConstant.CMD_ARG_WATCH);
  }
  String[] jvmArgs=jProcessor.getJVMArgs();
  StringBuffer jvmArgsStr=new StringBuffer();
  if (jvmArgs != null && jvmArgs.length > 0) {
    for (    String arg : jvmArgs) {
      jvmArgsStr.append(arg);
      jvmArgsStr.append(' ');
    }
  }
  checkPomProperty(properties,"String_Node_Str",ETalendMavenVariables.JobJvmArgs,jvmArgsStr.toString());
  checkPomProperty(properties,"String_Node_Str",ETalendMavenVariables.JobBatClasspath,this.getWindowsClasspath());
  checkPomProperty(properties,"String_Node_Str",ETalendMavenVariables.JobBatAddition,windowsScriptAdditionValue.toString());
  checkPomProperty(properties,"String_Node_Str",ETalendMavenVariables.JobShClasspath,this.getUnixClasspath());
  checkPomProperty(properties,"String_Node_Str",ETalendMavenVariables.JobShAddition,unixScriptAdditionValue.toString());
  String finalNameStr=JavaResourcesHelper.getJobJarName(property.getLabel(),property.getVersion());
  checkPomProperty(properties,"String_Node_Str",ETalendMavenVariables.JobFinalName,finalNameStr);
}