Program: 125773
Project: 125773
Buggy source:
public static org.talend.core.model.metadata.builder.connection.MetadataColumn convertFromAvroForDynamic(Schema schema){
  org.talend.core.model.metadata.builder.connection.MetadataColumn col=ConnectionFactory.eINSTANCE.createMetadataColumn();
  String prop;
  if (null != (prop=schema.getProp(Talend6SchemaConstants.TALEND6_DYNAMIC_COLUMN_ID))) {
    col.setId(prop);
  }
  if (null != (prop=schema.getProp(Talend6SchemaConstants.TALEND6_DYNAMIC_COLUMN_COMMENT))) {
    col.setComment(prop);
  }
  if (null != (prop=schema.getProp(Talend6SchemaConstants.TALEND6_DYNAMIC_COLUMN_NAME))) {
    col.setLabel(prop);
  }
  if (null != (prop=schema.getProp(Talend6SchemaConstants.TALEND6_DYNAMIC_IS_READ_ONLY))) {
    TaggedValue tv=TaggedValueHelper.createTaggedValue(Talend6SchemaConstants.TALEND6_IS_READ_ONLY,prop);
    col.getTaggedValue().add(tv);
  }
  for (  String key : schema.getJsonProps().keySet()) {
    if (key.startsWith(Talend6SchemaConstants.TALEND6_ADDITIONAL_PROPERTIES)) {
      String originalKey=key.substring(Talend6SchemaConstants.TALEND6_ADDITIONAL_PROPERTIES.length());
      TaggedValue tv=TaggedValueHelper.createTaggedValue(originalKey,schema.getProp(key));
      col.getTaggedValue().add(tv);
    }
  }
  if (null != (prop=schema.getProp(Talend6SchemaConstants.TALEND6_COLUMN_IS_KEY))) {
    col.setKey(Boolean.parseBoolean(prop));
  }
  if (null != (prop=schema.getProp(Talend6SchemaConstants.TALEND6_COLUMN_SOURCE_TYPE))) {
    col.setSourceType(prop);
  }
  if (null != (prop=schema.getProp(Talend6SchemaConstants.TALEND6_COLUMN_TALEND_TYPE))) {
    col.setTalendType(prop);
  }
  if (null != (prop=schema.getProp(Talend6SchemaConstants.TALEND6_COLUMN_PATTERN))) {
    if (!StringUtils.isEmpty(prop)) {
      col.setPattern(TalendQuoteUtils.addQuotesIfNotExist(prop));
    }
  }
  if (null != (prop=schema.getProp(Talend6SchemaConstants.TALEND6_COLUMN_LENGTH))) {
    Long value=Long.parseLong(prop);
    col.setLength(value > 0 ? value : -1);
  }
 else {
    col.setLength(-1);
  }
  if (null != (prop=schema.getProp(Talend6SchemaConstants.TALEND6_COLUMN_ORIGINAL_LENGTH))) {
    Long value=Long.parseLong(prop);
    col.setOriginalLength(value > 0 ? value : -1);
  }
 else {
    col.setOriginalLength(-1);
  }
  if (null != (prop=schema.getProp(Talend6SchemaConstants.TALEND6_COLUMN_IS_NULLABLE))) {
    col.setNullable(Boolean.parseBoolean(prop));
  }
  if (null != (prop=schema.getProp(Talend6SchemaConstants.TALEND6_COLUMN_PRECISION))) {
    Long value=Long.parseLong(prop);
    col.setPrecision(value > 0 ? value : -1);
  }
 else {
    col.setPrecision(-1);
  }
  if (null != (prop=schema.getProp(Talend6SchemaConstants.TALEND6_COLUMN_DEFAULT))) {
    col.setDefaultValue(prop);
  }
  if (null != (prop=schema.getProp(Talend6SchemaConstants.TALEND6_COLUMN_ORIGINAL_DB_COLUMN_NAME))) {
    col.setName(prop);
  }
  if (null != (prop=schema.getProp(Talend6SchemaConstants.TALEND6_COLUMN_RELATED_ENTITY))) {
    col.setRelatedEntity(prop);
  }
  if (null != (prop=schema.getProp(Talend6SchemaConstants.TALEND6_COLUMN_RELATIONSHIP_TYPE))) {
    col.setRelationshipType(prop);
  }
  col.setTalendType("String_Node_Str");
  return col;
}

Fixed version (ground truth):
public static org.talend.core.model.metadata.builder.connection.MetadataColumn convertFromAvroForDynamic(Schema schema){
  org.talend.core.model.metadata.builder.connection.MetadataColumn col=ConnectionFactory.eINSTANCE.createMetadataColumn();
  String prop;
  if (null != (prop=schema.getProp(Talend6SchemaConstants.TALEND6_DYNAMIC_COLUMN_ID))) {
    col.setId(prop);
  }
  if (null != (prop=schema.getProp(Talend6SchemaConstants.TALEND6_DYNAMIC_COLUMN_COMMENT))) {
    col.setComment(prop);
  }
  if (null != (prop=schema.getProp(Talend6SchemaConstants.TALEND6_DYNAMIC_COLUMN_NAME))) {
    col.setLabel(prop);
  }
  if (null != (prop=schema.getProp(Talend6SchemaConstants.TALEND6_DYNAMIC_IS_READ_ONLY))) {
    TaggedValue tv=TaggedValueHelper.createTaggedValue(Talend6SchemaConstants.TALEND6_IS_READ_ONLY,prop);
    col.getTaggedValue().add(tv);
  }
  for (  String key : schema.getJsonProps().keySet()) {
    if (key.startsWith(Talend6SchemaConstants.TALEND6_ADDITIONAL_PROPERTIES)) {
      String originalKey=key.substring(Talend6SchemaConstants.TALEND6_ADDITIONAL_PROPERTIES.length());
      TaggedValue tv=TaggedValueHelper.createTaggedValue(originalKey,schema.getProp(key));
      col.getTaggedValue().add(tv);
    }
  }
  if (null != (prop=schema.getProp(Talend6SchemaConstants.TALEND6_COLUMN_IS_KEY))) {
    col.setKey(Boolean.parseBoolean(prop));
  }
  if (null != (prop=schema.getProp(Talend6SchemaConstants.TALEND6_COLUMN_SOURCE_TYPE))) {
    col.setSourceType(prop);
  }
  if (null != (prop=schema.getProp(Talend6SchemaConstants.TALEND6_COLUMN_TALEND_TYPE))) {
    col.setTalendType(prop);
  }
  if (null != (prop=schema.getProp(Talend6SchemaConstants.TALEND6_COLUMN_PATTERN))) {
    if (!StringUtils.isEmpty(prop)) {
      col.setPattern(TalendQuoteUtils.addQuotesIfNotExist(prop));
    }
  }
  if (null != (prop=schema.getProp(Talend6SchemaConstants.TALEND6_COLUMN_LENGTH))) {
    Long value=Long.parseLong(prop);
    col.setLength(value >= 0 ? value : -1);
  }
 else {
    col.setLength(-1);
  }
  if (null != (prop=schema.getProp(Talend6SchemaConstants.TALEND6_COLUMN_ORIGINAL_LENGTH))) {
    Long value=Long.parseLong(prop);
    col.setOriginalLength(value >= 0 ? value : -1);
  }
 else {
    col.setOriginalLength(-1);
  }
  if (null != (prop=schema.getProp(Talend6SchemaConstants.TALEND6_COLUMN_IS_NULLABLE))) {
    col.setNullable(Boolean.parseBoolean(prop));
  }
  if (null != (prop=schema.getProp(Talend6SchemaConstants.TALEND6_COLUMN_PRECISION))) {
    Long value=Long.parseLong(prop);
    col.setPrecision(value >= 0 ? value : -1);
  }
 else {
    col.setPrecision(-1);
  }
  if (null != (prop=schema.getProp(Talend6SchemaConstants.TALEND6_COLUMN_DEFAULT))) {
    col.setDefaultValue(prop);
  }
  if (null != (prop=schema.getProp(Talend6SchemaConstants.TALEND6_COLUMN_ORIGINAL_DB_COLUMN_NAME))) {
    col.setName(prop);
  }
  if (null != (prop=schema.getProp(Talend6SchemaConstants.TALEND6_COLUMN_RELATED_ENTITY))) {
    col.setRelatedEntity(prop);
  }
  if (null != (prop=schema.getProp(Talend6SchemaConstants.TALEND6_COLUMN_RELATIONSHIP_TYPE))) {
    col.setRelationshipType(prop);
  }
  col.setTalendType("String_Node_Str");
  return col;
}