Program: 129398
Project: 129398
Buggy source:
public static void getTableXmlFileValue(Connection connection,String value,IElementParameter param,List<Map<String,Object>> tableInfo,IMetadataTable metaTable){
  if (connection instanceof XmlFileConnection) {
    XmlFileConnection xmlConnection=(XmlFileConnection)connection;
    if (xmlConnection.isInputModel()) {
      EList objectList=xmlConnection.getSchema();
      XmlXPathLoopDescriptor xmlDesc=(XmlXPathLoopDescriptor)objectList.get(0);
      if (value.equals("String_Node_Str")) {
        if (xmlDesc == null) {
          return;
        }
 else {
          String[] list=param.getListRepositoryItems();
          int column=0;
          boolean found=false;
          for (int k=0; (k < list.length) && (!found); k++) {
            if (list[k].equals("String_Node_Str")) {
              column=k;
              found=true;
            }
          }
          EList schemaList=xmlDesc.getSchemaTargets();
          String[] names=param.getListItemsDisplayCodeName();
          for (int k=0; k < schemaList.size(); k++) {
            if (tableInfo.size() > k) {
              Map<String,Object> line=tableInfo.get(k);
              if (metaTable != null) {
                if (metaTable.getListColumns().size() > k) {
                  SchemaTarget schemaTarget=(SchemaTarget)schemaList.get(k);
                  String strValue=TalendQuoteUtils.addQuotes(schemaTarget.getRelativeXPathQuery());
                  line.put(names[column],strValue);
                }
              }
            }
          }
        }
      }
    }
  }
  if (connection instanceof MDMConnection) {
    MDMConnection mdmConnection=(MDMConnection)connection;
    EList objectList=mdmConnection.getSchemas();
    for (    Concept concept : (List<Concept>)objectList) {
      if (concept.getLabel() == null || concept.getLabel().equals(metaTable.getLabel())) {
        if (value.equals("String_Node_Str")) {
          if (concept == null) {
            return;
          }
 else {
            String[] list=param.getListRepositoryItems();
            int column=0;
            boolean found=false;
            for (int k=0; (k < list.length) && (!found); k++) {
              if (list[k].equals("String_Node_Str")) {
                column=k;
                found=true;
              }
            }
            EList conceptTargetsList=concept.getConceptTargets();
            String[] names=param.getListItemsDisplayCodeName();
            for (int k=0; k < conceptTargetsList.size(); k++) {
              if (tableInfo.size() > k) {
                Map<String,Object> line=tableInfo.get(k);
                if (metaTable != null) {
                  if (metaTable.getListColumns().size() > k) {
                    ConceptTarget conceptTarget=(ConceptTarget)conceptTargetsList.get(k);
                    String strValue=TalendQuoteUtils.addQuotes(conceptTarget.getRelativeLoopExpression());
                    line.put(names[column],strValue);
                  }
                }
              }
            }
          }
        }
        break;
      }
    }
  }
}

Fixed version (ground truth):
public static void getTableXmlFileValue(Connection connection,String value,IElementParameter param,List<Map<String,Object>> tableInfo,IMetadataTable metaTable){
  if (connection instanceof XmlFileConnection) {
    XmlFileConnection xmlConnection=(XmlFileConnection)connection;
    if (xmlConnection.isInputModel()) {
      EList objectList=xmlConnection.getSchema();
      XmlXPathLoopDescriptor xmlDesc=(XmlXPathLoopDescriptor)objectList.get(0);
      if (value.equals("String_Node_Str")) {
        if (xmlDesc == null) {
          return;
        }
 else {
          String[] list=param.getListRepositoryItems();
          int column=0;
          boolean found=false;
          for (int k=0; (k < list.length) && (!found); k++) {
            if (list[k].equals("String_Node_Str")) {
              column=k;
              found=true;
            }
          }
          EList schemaList=xmlDesc.getSchemaTargets();
          String[] names=param.getListItemsDisplayCodeName();
          for (int k=0; k < schemaList.size(); k++) {
            if (tableInfo.size() > k) {
              Map<String,Object> line=tableInfo.get(k);
              if (metaTable != null) {
                if (metaTable.getListColumns().size() > k) {
                  SchemaTarget schemaTarget=(SchemaTarget)schemaList.get(k);
                  String strValue=TalendQuoteUtils.addQuotes(schemaTarget.getRelativeXPathQuery());
                  line.put(names[column],strValue);
                }
              }
            }
          }
        }
      }
    }
  }
  if (connection instanceof MDMConnection) {
    MDMConnection mdmConnection=(MDMConnection)connection;
    EList objectList=mdmConnection.getSchemas();
    for (    Concept concept : (List<Concept>)objectList) {
      if (concept.getLabel() != null && concept.getLabel().equals(metaTable.getLabel())) {
        if (value.equals("String_Node_Str")) {
          String[] list=param.getListRepositoryItems();
          int column=0;
          boolean found=false;
          for (int k=0; (k < list.length) && (!found); k++) {
            if (list[k].equals("String_Node_Str")) {
              column=k;
              found=true;
            }
          }
          EList conceptTargetsList=concept.getConceptTargets();
          String[] names=param.getListItemsDisplayCodeName();
          for (int k=0; k < conceptTargetsList.size(); k++) {
            if (tableInfo.size() > k) {
              Map<String,Object> line=tableInfo.get(k);
              if (metaTable != null) {
                if (metaTable.getListColumns().size() > k) {
                  ConceptTarget conceptTarget=(ConceptTarget)conceptTargetsList.get(k);
                  String strValue=TalendQuoteUtils.addQuotes(conceptTarget.getRelativeLoopExpression());
                  line.put(names[column],strValue);
                }
              }
            }
          }
        }
        break;
      }
    }
  }
}