Program: 129319
Project: 129319
Buggy source:
private static IMetadataTable convert(MetadataTable old){
  ICoreService coreService=(ICoreService)GlobalServiceRegister.getDefault().getService(ICoreService.class);
  IMetadataTable result=new org.talend.core.model.metadata.MetadataTable();
  result.setComment(old.getComment());
  result.setId(old.getId());
  result.setLabel(old.getLabel());
  String sourceName=old.getName();
  if (sourceName == null) {
    sourceName=old.getLabel();
  }
  result.setTableName(sourceName);
  List<IMetadataColumn> columns=new ArrayList<IMetadataColumn>(old.getColumns().size());
  for (  Object o : old.getColumns()) {
    org.talend.core.model.metadata.builder.connection.MetadataColumn column=(org.talend.core.model.metadata.builder.connection.MetadataColumn)o;
    IMetadataColumn newColumn=new org.talend.core.model.metadata.MetadataColumn();
    columns.add(newColumn);
    newColumn.setComment(column.getComment());
    newColumn.setDefault(column.getDefaultValue());
    newColumn.setKey(column.isKey());
    String label2=column.getLabel();
    if (coreService != null) {
      if (coreService.isKeyword(label2)) {
        label2="String_Node_Str" + label2;
      }
    }
    newColumn.setLabel(label2);
    newColumn.setPattern(column.getPattern());
    if (column.getLength() < 0) {
      newColumn.setLength(null);
    }
 else {
      newColumn.setLength(Long.valueOf(column.getLength()).intValue());
    }
    if (column.getOriginalLength() < 0) {
      newColumn.setOriginalLength(null);
    }
 else {
      newColumn.setOriginalLength(Long.valueOf(column.getOriginalLength()).intValue());
    }
    newColumn.setNullable(column.isNullable());
    if (column.getPrecision() < 0) {
      newColumn.setPrecision(null);
    }
 else {
      newColumn.setPrecision(Long.valueOf(column.getPrecision()).intValue());
    }
    newColumn.setTalendType(column.getTalendType());
    newColumn.setType(column.getSourceType());
    if (column.getName() == null || column.getName().equals("String_Node_Str")) {
      String label=label2;
      if (label != null && label.length() > 0) {
        String substring=label.substring(1);
        if (coreService != null) {
          if (label.startsWith("String_Node_Str") && coreService.isKeyword(substring)) {
            label=substring;
          }
        }
      }
      newColumn.setOriginalDbColumnName(label);
    }
 else {
      newColumn.setOriginalDbColumnName(column.getName());
    }
  }
  result.setListColumns(columns);
  return result;
}

Fixed version (ground truth):
private static IMetadataTable convert(MetadataTable old){
  ICoreService coreService=(ICoreService)GlobalServiceRegister.getDefault().getService(ICoreService.class);
  IMetadataTable result=new org.talend.core.model.metadata.MetadataTable();
  result.setComment(old.getComment());
  result.setId(old.getId());
  result.setLabel(old.getLabel());
  String sourceName=old.getName();
  if (sourceName == null) {
    sourceName=old.getLabel();
  }
  result.setTableName(sourceName);
  List<IMetadataColumn> columns=new ArrayList<IMetadataColumn>(old.getColumns().size());
  for (  Object o : old.getColumns()) {
    org.talend.core.model.metadata.builder.connection.MetadataColumn column=(org.talend.core.model.metadata.builder.connection.MetadataColumn)o;
    IMetadataColumn newColumn=new org.talend.core.model.metadata.MetadataColumn();
    columns.add(newColumn);
    newColumn.setComment(column.getComment());
    newColumn.setDefault(column.getDefaultValue());
    newColumn.setKey(column.isKey());
    String label2=column.getLabel();
    if (coreService != null) {
      if (coreService.isKeyword(label2)) {
        label2="String_Node_Str" + label2;
      }
    }
    newColumn.setLabel(label2);
    newColumn.setPattern(column.getPattern());
    if (column.getLength() < 0) {
      newColumn.setLength(null);
    }
 else {
      newColumn.setLength(Long.valueOf(column.getLength()).intValue());
    }
    if (column.getOriginalLength() < 0) {
      newColumn.setOriginalLength(null);
    }
 else {
      newColumn.setOriginalLength(Long.valueOf(column.getOriginalLength()).intValue());
    }
    if (column.getTaggedValue().size() > 0) {
      for (      TaggedValue tv : column.getTaggedValue()) {
        String additionalTag=tv.getTag();
        if (additionalTag.startsWith("String_Node_Str")) {
          String[] splits=additionalTag.split("String_Node_Str");
          additionalTag=splits[1];
        }
        newColumn.getAdditionalField().put(additionalTag,tv.getValue());
      }
    }
    newColumn.setNullable(column.isNullable());
    if (column.getPrecision() < 0) {
      newColumn.setPrecision(null);
    }
 else {
      newColumn.setPrecision(Long.valueOf(column.getPrecision()).intValue());
    }
    newColumn.setTalendType(column.getTalendType());
    newColumn.setType(column.getSourceType());
    if (column.getName() == null || column.getName().equals("String_Node_Str")) {
      String label=label2;
      if (label != null && label.length() > 0) {
        String substring=label.substring(1);
        if (coreService != null) {
          if (label.startsWith("String_Node_Str") && coreService.isKeyword(substring)) {
            label=substring;
          }
        }
      }
      newColumn.setOriginalDbColumnName(label);
    }
 else {
      newColumn.setOriginalDbColumnName(column.getName());
    }
  }
  result.setListColumns(columns);
  return result;
}