Program: 121502
Project: 121502
Buggy source:
private URL generateRestJobSpringConfig(ProcessItem processItem) throws IOException {
  File targetFile=new File(getTmpFolder() + PATH_SEPARATOR + "String_Node_Str");
  NodeType restRequestComponent=getRESTRequestComponent(processItem);
  Map<String,Object> endpointInfo=new HashMap<String,Object>();
  endpointInfo.put("String_Node_Str",jobName);
  endpointInfo.put("String_Node_Str",jobClassName);
  final String runtimeServicesContext="String_Node_Str";
  final String runtimeServicesContextFull=runtimeServicesContext + "String_Node_Str";
  String endpointUri=EmfModelUtils.computeTextElementValue("String_Node_Str",restRequestComponent);
  if (!endpointUri.isEmpty() && !endpointUri.contains("String_Node_Str") && !endpointUri.startsWith("String_Node_Str")) {
    endpointUri="String_Node_Str" + endpointUri;
  }
  if (runtimeServicesContextFull.equals(endpointUri) || runtimeServicesContext.equals(endpointUri)) {
  }
 else   if (endpointUri.startsWith(runtimeServicesContextFull)) {
    endpointUri=endpointUri.substring(runtimeServicesContextFull.length() - 1);
  }
  endpointInfo.put("String_Node_Str",endpointUri);
  endpointInfo.put("String_Node_Str",EmfModelUtils.computeCheckElementValue("String_Node_Str",restRequestComponent));
  endpointInfo.put("String_Node_Str",EmfModelUtils.computeCheckElementValue("String_Node_Str",restRequestComponent));
  endpointInfo.put("String_Node_Str",EmfModelUtils.computeCheckElementValue("String_Node_Str",restRequestComponent));
  endpointInfo.put("String_Node_Str",EmfModelUtils.computeCheckElementValue("String_Node_Str",restRequestComponent));
  endpointInfo.put("String_Node_Str",EmfModelUtils.computeCheckElementValue("String_Node_Str",restRequestComponent));
  Map<String,String> slCustomProperties=new HashMap<String,String>();
  ElementParameterType customPropsType=EmfModelUtils.findElementParameterByName("String_Node_Str",restRequestComponent);
  if (null != customPropsType) {
    EList<?> elementValues=customPropsType.getElementValue();
    final int size=elementValues.size();
    for (int i=0; i < size; i+=2) {
      if (size <= i + 1) {
        break;
      }
      ElementValueType name=(ElementValueType)elementValues.get(i);
      ElementValueType value=(ElementValueType)elementValues.get(i + 1);
      if (null != name && null != value) {
        if (null != name.getValue() && null != value.getValue()) {
          slCustomProperties.put(unquote(name.getValue()),unquote(value.getValue()));
        }
      }
    }
  }
  endpointInfo.put("String_Node_Str",slCustomProperties);
  endpointInfo.put("String_Node_Str",EmfModelUtils.computeTextElementValue("String_Node_Str",restRequestComponent));
  endpointInfo.put("String_Node_Str",EmfModelUtils.computeTextElementValue("String_Node_Str",restRequestComponent));
  endpointInfo.put("String_Node_Str",DataSourceConfig.getAliases(processItem));
  Map<String,Object> contextParams=new HashMap<String,Object>();
  contextParams.put("String_Node_Str",endpointInfo);
  processVelocityTemplate(TEMPLATE_SPRING_JOB_REST,targetFile,contextParams);
  return targetFile.toURI().toURL();
}

Fixed version (ground truth):
private URL generateRestJobSpringConfig(ProcessItem processItem) throws IOException {
  File targetFile=new File(getTmpFolder() + PATH_SEPARATOR + "String_Node_Str");
  NodeType restRequestComponent=getRESTRequestComponent(processItem);
  Map<String,Object> endpointInfo=new HashMap<String,Object>();
  endpointInfo.put("String_Node_Str",jobName);
  endpointInfo.put("String_Node_Str",jobClassName);
  final String runtimeServicesContext="String_Node_Str";
  final String runtimeServicesContextFull=runtimeServicesContext + "String_Node_Str";
  String endpointUri=EmfModelUtils.computeTextElementValue("String_Node_Str",restRequestComponent);
  if (!endpointUri.isEmpty() && !endpointUri.contains("String_Node_Str") && !endpointUri.startsWith("String_Node_Str")) {
    endpointUri="String_Node_Str" + endpointUri;
  }
  if (runtimeServicesContextFull.equals(endpointUri) || runtimeServicesContext.equals(endpointUri)) {
  }
 else   if (endpointUri.startsWith(runtimeServicesContextFull)) {
    endpointUri=endpointUri.substring(runtimeServicesContextFull.length() - 1);
  }
  endpointInfo.put("String_Node_Str",endpointUri);
  endpointInfo.put("String_Node_Str",EmfModelUtils.computeCheckElementValue("String_Node_Str",restRequestComponent));
  endpointInfo.put("String_Node_Str",EmfModelUtils.computeCheckElementValue("String_Node_Str",restRequestComponent));
  endpointInfo.put("String_Node_Str",EmfModelUtils.computeCheckElementValue("String_Node_Str",restRequestComponent));
  endpointInfo.put("String_Node_Str",EmfModelUtils.computeCheckElementValue("String_Node_Str",restRequestComponent));
  endpointInfo.put("String_Node_Str",EmfModelUtils.computeCheckElementValue("String_Node_Str",restRequestComponent));
  Map<String,String> slCustomProperties=new HashMap<String,String>();
  ElementParameterType customPropsType=EmfModelUtils.findElementParameterByName("String_Node_Str",restRequestComponent);
  if (null != customPropsType) {
    EList<?> elementValues=customPropsType.getElementValue();
    final int size=elementValues.size();
    for (int i=0; i < size; i+=2) {
      if (size <= i + 1) {
        break;
      }
      ElementValueType name=(ElementValueType)elementValues.get(i);
      ElementValueType value=(ElementValueType)elementValues.get(i + 1);
      if (null != name && null != value) {
        if (null != name.getValue() && null != value.getValue()) {
          slCustomProperties.put(unquote(name.getValue()),unquote(value.getValue()));
        }
      }
    }
  }
  endpointInfo.put("String_Node_Str",slCustomProperties);
  endpointInfo.put("String_Node_Str",EmfModelUtils.computeTextElementValue("String_Node_Str",restRequestComponent));
  endpointInfo.put("String_Node_Str",EmfModelUtils.computeTextElementValue("String_Node_Str",restRequestComponent));
  endpointInfo.put("String_Node_Str",DataSourceConfig.getAliases(processItem));
  Map<String,Object> contextParams=new HashMap<String,Object>();
  contextParams.put("String_Node_Str",endpointInfo);
  TemplateProcessor.processTemplate("String_Node_Str",contextParams,targetFile,new InputStreamReader(this.getClass().getResourceAsStream(TEMPLATE_SPRING_JOB_REST)));
  return targetFile.toURI().toURL();
}