Program: 118233
Project: 118233
Buggy source:
private void initHadoopVersionType(){
  if (elem instanceof Node) {
    Node node=(Node)elem;
    String compName=node.getComponent().getName();
    if (compName.startsWith("String_Node_Str")) {
      versionType=ECustomVersionType.PIG;
      IElementParameter elementParameter=node.getElementParameter("String_Node_Str");
      if (elementParameter != null) {
        String value=elementParameter.getListItemsDisplayCodeName()[elementParameter.getIndexOfItemFromList(String.valueOf(elementParameter.getValue()))];
        if ("String_Node_Str".equals(value)) {
          versionType=ECustomVersionType.PIG_HCATALOG;
        }
 else         if ("String_Node_Str".equals(value)) {
          versionType=ECustomVersionType.PIG_HBASE;
        }
      }
    }
 else {
      compName=compName.substring(1).toUpperCase();
      ECustomVersionType[] versions=ECustomVersionType.values();
      for (      ECustomVersionType version : versions) {
        if (compName.startsWith(version.getName())) {
          versionType=version;
          break;
        }
      }
    }
  }
  if (versionType == null) {
    if (elem instanceof org.talend.designer.core.ui.editor.process.Process) {
      Object frameworkObj=((org.talend.designer.core.ui.editor.process.Process)elem).getAdditionalProperties().get(HadoopConstants.FRAMEWORK);
      if (frameworkObj != null) {
        String framework=frameworkObj.toString();
        if (HadoopConstants.FRAMEWORK_SPARK.equals(framework)) {
          versionType=ECustomVersionType.SPARK;
        }
 else         if (HadoopConstants.FRAMEWORK_SPARKSTREAMING.equals(framework)) {
          versionType=ECustomVersionType.SPARK_STREAMING;
        }
      }
    }
    if (versionType == null) {
      versionType=ECustomVersionType.MAP_REDUCE;
    }
  }
}

Fixed version (ground truth):
private void initHadoopVersionType(){
  if (elem instanceof Node) {
    Node node=(Node)elem;
    String compName=node.getComponent().getName();
    if (compName.startsWith("String_Node_Str")) {
      versionType=ECustomVersionType.PIG;
      IElementParameter elementParameter=node.getElementParameter("String_Node_Str");
      if (elementParameter != null) {
        String value=elementParameter.getListItemsDisplayCodeName()[elementParameter.getIndexOfItemFromList(String.valueOf(elementParameter.getValue()))];
        if ("String_Node_Str".equals(value)) {
          versionType=ECustomVersionType.PIG_HCATALOG;
        }
 else         if ("String_Node_Str".equals(value)) {
          versionType=ECustomVersionType.PIG_HBASE;
        }
      }
    }
 else     if (compName.startsWith("String_Node_Str")) {
      versionType=ECustomVersionType.HIVE;
    }
 else {
      compName=compName.substring(1).toUpperCase();
      ECustomVersionType[] versions=ECustomVersionType.values();
      for (      ECustomVersionType version : versions) {
        if (compName.startsWith(version.getName())) {
          versionType=version;
          break;
        }
      }
    }
  }
  if (versionType == null) {
    if (elem instanceof org.talend.designer.core.ui.editor.process.Process) {
      Object frameworkObj=((org.talend.designer.core.ui.editor.process.Process)elem).getAdditionalProperties().get(HadoopConstants.FRAMEWORK);
      if (frameworkObj != null) {
        String framework=frameworkObj.toString();
        if (HadoopConstants.FRAMEWORK_SPARK.equals(framework)) {
          versionType=ECustomVersionType.SPARK;
        }
 else         if (HadoopConstants.FRAMEWORK_SPARKSTREAMING.equals(framework)) {
          versionType=ECustomVersionType.SPARK_STREAMING;
        }
      }
    }
    if (versionType == null) {
      versionType=ECustomVersionType.MAP_REDUCE;
    }
  }
}