Program: 124961
Project: 124961
Buggy source:
/** 
 * @return
 */
private JobContext initJobContextForOozie(JobSubmissionType jobSubType,IContext context){
  JobContext jobContext=new JobContext();
  IProcess2 process=OozieJobTrackerListener.getProcess();
  if (ComponentCategory.CATEGORY_4_MAPREDUCE.getName().equals(process.getComponentsType())) {
    String fsForMapReduceJob=(String)process.getElementParameter("String_Node_Str").getValue();
    jobContext.set("String_Node_Str",TalendQuoteUtils.removeQuotesIfExist(fsForMapReduceJob));
    String jtForMapReduceJob=(String)process.getElementParameter("String_Node_Str").getValue();
    jobContext.set("String_Node_Str",TalendQuoteUtils.removeQuotesIfExist(jtForMapReduceJob));
  }
  if (TOozieParamUtils.enableKerberos()) {
    jobContext.set("String_Node_Str",TOozieParamUtils.getPrincipal());
  }
  if (process != null) {
    JSONArray props=new JSONArray();
    for (    Map<String,Object> property : settingDialog.getPropertiesValue()) {
      props.put(property);
    }
    jobContext.set("String_Node_Str",props.toString());
    StringBuffer libJars=new StringBuffer();
    Set<String> libNames=JavaProcessorUtilities.extractLibNamesOnlyForMapperAndReducer(process);
    if (libNames != null && libNames.size() > 0) {
      Iterator<String> itLibNames=libNames.iterator();
      while (itLibNames.hasNext()) {
        libJars.append(itLibNames.next()).append("String_Node_Str");
      }
    }
    jobContext.set("String_Node_Str",libJars.substring(0,libJars.length() - 1));
  }
  String jobName=process.getLabel();
  jobContext.setJobName(jobName);
  String path=executeJobComposite.getPathValue();
  jobContext.setJobPathOnHDFS(path);
  String oozieEPValue=getOozieEndPoint();
  jobContext.setOozieEndPoint(oozieEPValue);
  String nameNodeEPValue=getNameNode();
  jobContext.setNameNodeEndPoint(nameNodeEPValue);
  String jobTrackerEPValue=getJobTracker();
  jobContext.setJobTrackerEndPoint(jobTrackerEPValue);
  String appPath=path;
  String hadoopDistribution=getHadoopDistribution();
  EHadoopDistributions distribution=EHadoopDistributions.getDistributionByName(hadoopDistribution,false);
  if (distribution == EHadoopDistributions.MAPR) {
    appPath="String_Node_Str".concat(appPath);
  }
 else   if (nameNodeEPValue != null) {
    appPath=nameNodeEPValue.concat(appPath);
  }
  jobContext.set(OozieClient.APP_PATH,appPath);
  String userNameValue=getUserNameForHadoop();
  jobContext.set(OozieClient.USER_NAME,userNameValue);
  String tosJobFQCN=getTOSJobFQCNValue();
  jobContext.setJobFQClassName(tosJobFQCN);
  jobContext.setTosContextPath(context.getName());
switch (jobSubType) {
case LOCAL:
    break;
case REMOTE:
  break;
case SCHEDULED:
int fequency=getFrequencyValue();
jobContext.setFrequency(fequency);
Timeunit timeUnit=getTimeUnitValue();
jobContext.setTimeUnit(timeUnit);
Date startTime=getStartTimeValue();
jobContext.setStartTime(startTime);
Date endTime=getEndTimeValue();
jobContext.setEndTime(endTime);
break;
default :
}
return jobContext;
}

Fixed version (ground truth):
/** 
 * @return
 */
private JobContext initJobContextForOozie(JobSubmissionType jobSubType,IContext context){
  JobContext jobContext=new JobContext();
  IProcess2 process=OozieJobTrackerListener.getProcess();
  if (ComponentCategory.CATEGORY_4_MAPREDUCE.getName().equals(process.getComponentsType())) {
    String fsForMapReduceJob=(String)process.getElementParameter("String_Node_Str").getValue();
    jobContext.set("String_Node_Str",TalendQuoteUtils.removeQuotesIfExist(fsForMapReduceJob));
    String jtForMapReduceJob=(String)process.getElementParameter("String_Node_Str").getValue();
    jobContext.set("String_Node_Str",TalendQuoteUtils.removeQuotesIfExist(jtForMapReduceJob));
  }
  if (TOozieParamUtils.enableKerberos()) {
    jobContext.set("String_Node_Str",TOozieParamUtils.getPrincipal());
  }
  if (process != null && settingDialog != null) {
    JSONArray props=new JSONArray();
    for (    Map<String,Object> property : settingDialog.getPropertiesValue()) {
      props.put(property);
    }
    jobContext.set("String_Node_Str",props.toString());
    StringBuffer libJars=new StringBuffer();
    Set<String> libNames=JavaProcessorUtilities.extractLibNamesOnlyForMapperAndReducer(process);
    if (libNames != null && libNames.size() > 0) {
      Iterator<String> itLibNames=libNames.iterator();
      while (itLibNames.hasNext()) {
        libJars.append(itLibNames.next()).append("String_Node_Str");
      }
    }
    jobContext.set("String_Node_Str",libJars.substring(0,libJars.length() - 1));
  }
  String jobName=process.getLabel();
  jobContext.setJobName(jobName);
  String path=executeJobComposite.getPathValue();
  jobContext.setJobPathOnHDFS(path);
  String oozieEPValue=getOozieEndPoint();
  jobContext.setOozieEndPoint(oozieEPValue);
  String nameNodeEPValue=getNameNode();
  jobContext.setNameNodeEndPoint(nameNodeEPValue);
  String jobTrackerEPValue=getJobTracker();
  jobContext.setJobTrackerEndPoint(jobTrackerEPValue);
  String appPath=path;
  String hadoopDistribution=getHadoopDistribution();
  EHadoopDistributions distribution=EHadoopDistributions.getDistributionByName(hadoopDistribution,false);
  if (distribution == EHadoopDistributions.MAPR) {
    appPath="String_Node_Str".concat(appPath);
  }
 else   if (nameNodeEPValue != null) {
    appPath=nameNodeEPValue.concat(appPath);
  }
  jobContext.set(OozieClient.APP_PATH,appPath);
  String userNameValue=getUserNameForHadoop();
  jobContext.set(OozieClient.USER_NAME,userNameValue);
  String tosJobFQCN=getTOSJobFQCNValue();
  jobContext.setJobFQClassName(tosJobFQCN);
  jobContext.setTosContextPath(context.getName());
switch (jobSubType) {
case LOCAL:
    break;
case REMOTE:
  break;
case SCHEDULED:
int fequency=getFrequencyValue();
jobContext.setFrequency(fequency);
Timeunit timeUnit=getTimeUnitValue();
jobContext.setTimeUnit(timeUnit);
Date startTime=getStartTimeValue();
jobContext.setStartTime(startTime);
Date endTime=getEndTimeValue();
jobContext.setEndTime(endTime);
break;
default :
}
return jobContext;
}