Program: 125775
Project: 125775
Buggy source:
/** 
 * DOC qiang.zhang Comment method "convert".
 * @param metadataTable
 * @return
 */
public static MetadataTable convert(IMetadataTable old){
  MetadataTable result=ConnectionFactory.eINSTANCE.createMetadataTable();
  result.setComment(old.getComment());
  result.setId(old.getId());
  result.setLabel(old.getLabel());
  result.setSourceName(old.getTableName());
  List<MetadataColumn> columns=new ArrayList<MetadataColumn>(old.getListColumns().size());
  for (  IMetadataColumn column : old.getListColumns()) {
    MetadataColumn newColumn=ConnectionFactory.eINSTANCE.createMetadataColumn();
    columns.add(newColumn);
    newColumn.setComment(column.getComment());
    newColumn.setDefaultValue(column.getDefault());
    newColumn.setKey(column.isKey());
    newColumn.setLabel(column.getLabel());
    newColumn.setPattern(column.getPattern());
    if (column.getLength() == null || column.getLength() < 0) {
      newColumn.setLength(-1);
    }
 else {
      newColumn.setLength(column.getLength());
    }
    newColumn.setNullable(column.isNullable());
    if (column.getPrecision() == null || column.getPrecision() < 0) {
      newColumn.setPrecision(-1);
    }
 else {
      newColumn.setPrecision(column.getPrecision());
    }
    newColumn.setTalendType(column.getTalendType());
    newColumn.setSourceType(column.getType());
    if (column.getOriginalDbColumnName() == null || column.getOriginalDbColumnName().equals("String_Node_Str")) {
      newColumn.setName(column.getLabel());
    }
 else {
      newColumn.setName(column.getOriginalDbColumnName());
    }
  }
  result.getColumns().addAll(columns);
  return result;
}

Fixed version (ground truth):
/** 
 * DOC qiang.zhang Comment method "convert".
 * @param metadataTable
 * @return
 */
public static MetadataTable convert(IMetadataTable old){
  MetadataTable result=ConnectionFactory.eINSTANCE.createMetadataTable();
  result.setComment(old.getComment());
  result.setId(old.getId());
  result.setLabel(old.getLabel());
  result.setSourceName(old.getTableName());
  List<MetadataColumn> columns=new ArrayList<MetadataColumn>(old.getListColumns().size());
  for (  IMetadataColumn column : old.getListColumns()) {
    MetadataColumn newColumn=ConnectionFactory.eINSTANCE.createMetadataColumn();
    columns.add(newColumn);
    newColumn.setComment(column.getComment());
    newColumn.setDefaultValue(column.getDefault());
    newColumn.setKey(column.isKey());
    newColumn.setLabel(column.getLabel());
    newColumn.setPattern(column.getPattern());
    if (column.getLength() == null || column.getLength() < 0) {
      newColumn.setLength(-1);
    }
 else {
      newColumn.setLength(column.getLength());
    }
    if (column.getOriginalLength() == null || column.getOriginalLength() < 0) {
      newColumn.setOriginalLength(-1);
    }
 else {
      newColumn.setOriginalLength(column.getOriginalLength());
    }
    newColumn.setNullable(column.isNullable());
    if (column.getPrecision() == null || column.getPrecision() < 0) {
      newColumn.setPrecision(-1);
    }
 else {
      newColumn.setPrecision(column.getPrecision());
    }
    newColumn.setTalendType(column.getTalendType());
    newColumn.setSourceType(column.getType());
    if (column.getOriginalDbColumnName() == null || column.getOriginalDbColumnName().equals("String_Node_Str")) {
      newColumn.setName(column.getLabel());
    }
 else {
      newColumn.setName(column.getOriginalDbColumnName());
    }
  }
  result.getColumns().addAll(columns);
  return result;
}