Program: 128824
Project: 128824
Buggy source:
/** 
 * This class is used for generating component schema information.
 * @param node
 * @param componentElement
 */
protected void generateComponentSchemaInfo(INode node,Element componentElement){
  List metaDataList=node.getMetadataList();
  Element schemasElement=null;
  if (metaDataList != null && metaDataList.size() != 0) {
    schemasElement=componentElement.addElement("String_Node_Str");
    boolean isBuiltIn=node.getConnectorFromName(EConnectionType.FLOW_MAIN.getName()).isMultiSchema() || node.getConnectorFromName(EConnectionType.TABLE.getName()).isMultiSchema();
    for (int j=0; j < metaDataList.size(); j++) {
      if ((!isBuiltIn) && (j > 0)) {
        break;
      }
      IMetadataTable table=(IMetadataTable)metaDataList.get(j);
      List columnTypeList=table.getListColumns();
      Element schemaElement=schemasElement.addElement("String_Node_Str");
      String metaName=table.getLabel();
      if (metaName == null) {
        metaName=table.getTableName();
      }
      schemaElement.addAttribute("String_Node_Str",HTMLDocUtils.checkString(metaName));
      boolean dbComponent=false;
      if (node.getComponent().getOriginalFamilyName().startsWith("String_Node_Str") || node.getComponent().getOriginalFamilyName().startsWith("String_Node_Str")) {
        dbComponent=true;
      }
      for (int k=0; k < columnTypeList.size(); k++) {
        IMetadataColumn columnType=(IMetadataColumn)columnTypeList.get(k);
        Element columnElement=schemaElement.addElement("String_Node_Str");
        columnElement.addAttribute("String_Node_Str",HTMLDocUtils.checkString(columnType.getLabel()));
        columnElement.addAttribute("String_Node_Str",HTMLDocUtils.checkString(columnType.isKey() + "String_Node_Str"));
        String type=HTMLDocUtils.checkString(columnType.getTalendType());
        if (node.getComponent().getOriginalFamilyName().startsWith("String_Node_Str")) {
          type=HTMLDocUtils.checkString(columnType.getType());
        }
 else         if (LanguageManager.getCurrentLanguage().equals(ECodeLanguage.JAVA)) {
          type=JavaTypesManager.getTypeToGenerate(columnType.getTalendType(),columnType.isNullable());
        }
        columnElement.addAttribute("String_Node_Str",type);
        String length;
        if ((columnType.getLength() == null) || (columnType.getLength() == 0)) {
          length="String_Node_Str";
        }
 else {
          length=String.valueOf(columnType.getLength());
        }
        columnElement.addAttribute("String_Node_Str",length);
        String precision;
        if ((columnType.getPrecision() == null) || (columnType.getPrecision() == 0)) {
          precision="String_Node_Str";
        }
 else {
          precision=String.valueOf(columnType.getPrecision());
        }
        columnElement.addAttribute("String_Node_Str",precision);
        columnElement.addAttribute("String_Node_Str",HTMLDocUtils.checkString(columnType.isNullable() + "String_Node_Str"));
        columnElement.addAttribute("String_Node_Str",HTMLDocUtils.checkString(ElementParameterParser.parse(node,columnType.getComment())));
        if (PluginChecker.isDatacertPluginLoaded()) {
          columnElement.addAttribute("String_Node_Str",HTMLDocUtils.checkString(ElementParameterParser.parse(node,columnType.getRelatedEntity())));
          columnElement.addAttribute("String_Node_Str",HTMLDocUtils.checkString(ElementParameterParser.parse(node,columnType.getRelationshipType())));
        }
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * This class is used for generating component schema information.
 * @param node
 * @param componentElement
 */
protected void generateComponentSchemaInfo(INode node,Element componentElement){
  List metaDataList=node.getMetadataList();
  Element schemasElement=null;
  if (metaDataList != null && metaDataList.size() != 0) {
    schemasElement=componentElement.addElement("String_Node_Str");
    boolean isBuiltIn=node.getConnectorFromName(EConnectionType.FLOW_MAIN.getName()).isMultiSchema() || node.getConnectorFromName(EConnectionType.TABLE.getName()).isMultiSchema();
    for (int j=0; j < metaDataList.size(); j++) {
      if ((!isBuiltIn) && (j > 0)) {
        break;
      }
      IMetadataTable table=(IMetadataTable)metaDataList.get(j);
      List columnTypeList=table.getListColumns();
      Element schemaElement=schemasElement.addElement("String_Node_Str");
      String metaName=table.getLabel();
      if (metaName == null) {
        metaName=table.getTableName();
      }
      schemaElement.addAttribute("String_Node_Str",HTMLDocUtils.checkString(metaName));
      boolean dbComponent=false;
      if (node.getComponent().getOriginalFamilyName().startsWith("String_Node_Str") || node.getComponent().getOriginalFamilyName().startsWith("String_Node_Str")) {
        dbComponent=true;
      }
      for (int k=0; k < columnTypeList.size(); k++) {
        IMetadataColumn columnType=(IMetadataColumn)columnTypeList.get(k);
        Element columnElement=schemaElement.addElement("String_Node_Str");
        columnElement.addAttribute("String_Node_Str",HTMLDocUtils.checkString(columnType.getLabel()));
        columnElement.addAttribute("String_Node_Str",HTMLDocUtils.checkString(columnType.isKey() + "String_Node_Str"));
        String type=HTMLDocUtils.checkString(columnType.getTalendType());
        if (node.getComponent().getOriginalFamilyName().startsWith("String_Node_Str")) {
          type=HTMLDocUtils.checkString(columnType.getType());
        }
 else         if (LanguageManager.getCurrentLanguage().equals(ECodeLanguage.JAVA)) {
          type=JavaTypesManager.getTypeToGenerate(columnType.getTalendType(),columnType.isNullable());
        }
        columnElement.addAttribute("String_Node_Str",type);
        String length;
        if ((columnType.getLength() == null) || (columnType.getLength() == 0)) {
          length="String_Node_Str";
        }
 else {
          length=String.valueOf(columnType.getLength());
        }
        columnElement.addAttribute("String_Node_Str",length);
        String precision;
        if ((columnType.getPrecision() == null) || (columnType.getPrecision() == 0)) {
          precision="String_Node_Str";
        }
 else {
          precision=String.valueOf(columnType.getPrecision());
        }
        columnElement.addAttribute("String_Node_Str",precision);
        columnElement.addAttribute("String_Node_Str",HTMLDocUtils.checkString(columnType.isNullable() + "String_Node_Str"));
        columnElement.addAttribute("String_Node_Str",HTMLDocUtils.handleString(HTMLDocUtils.checkString(ElementParameterParser.parse(node,columnType.getComment()))));
        if (PluginChecker.isDatacertPluginLoaded()) {
          columnElement.addAttribute("String_Node_Str",HTMLDocUtils.checkString(ElementParameterParser.parse(node,columnType.getRelatedEntity())));
          columnElement.addAttribute("String_Node_Str",HTMLDocUtils.checkString(ElementParameterParser.parse(node,columnType.getRelationshipType())));
        }
      }
    }
  }
}