Program: 125346
Project: 125346
Buggy source:
/** 
 * Copy all of the information from the IMetadataColumn in the form of key/value properties into an Avro object.
 * @param builder Any Avro builder capable of taking key/value in the form of strings.
 * @param in The element to copy information from.
 * @return the instance of the builder passed in.
 */
private static <T extends PropBuilder<T>>PropBuilder<T> copyColumnProperties(PropBuilder<T> builder,org.talend.core.model.metadata.builder.connection.MetadataColumn in){
  if (in.getId() != null) {
    builder.prop(DiSchemaConstants.TALEND6_ID,in.getId());
  }
  if (in.getComment() != null) {
    builder.prop(DiSchemaConstants.TALEND6_COMMENT,in.getComment());
  }
  if (in.getLabel() != null) {
    builder.prop(DiSchemaConstants.TALEND6_LABEL,in.getLabel());
  }
  for (  TaggedValue tv : in.getTaggedValue()) {
    String additionalTag=tv.getTag();
    if (DiSchemaConstants.TALEND6_IS_READ_ONLY.equals(additionalTag)) {
      builder.prop(DiSchemaConstants.TALEND6_IS_READ_ONLY,tv.getValue());
    }
 else     if (tv.getValue() != null) {
      builder.prop(DiSchemaConstants.TALEND6_ADDITIONAL_PROPERTIES + additionalTag,tv.getValue());
    }
  }
  if (in.isKey()) {
    builder.prop(DiSchemaConstants.TALEND6_COLUMN_IS_KEY,"String_Node_Str");
  }
  if (in.getType() != null) {
    builder.prop(DiSchemaConstants.TALEND6_COLUMN_SOURCE_TYPE,in.getSourceType());
  }
  if (in.getTalendType() != null) {
    builder.prop(DiSchemaConstants.TALEND6_COLUMN_TALEND_TYPE,in.getTalendType());
  }
  if (in.getPattern() != null) {
    builder.prop(DiSchemaConstants.TALEND6_COLUMN_PATTERN,TalendQuoteUtils.removeQuotesIfExist(in.getPattern()));
  }
  if (in.getLength() >= 0) {
    builder.prop(DiSchemaConstants.TALEND6_COLUMN_LENGTH,String.valueOf((int)in.getLength()));
  }
  if (in.getOriginalLength() >= 0) {
    builder.prop(DiSchemaConstants.TALEND6_COLUMN_ORIGINAL_LENGTH,String.valueOf(in.getOriginalLength()));
  }
  if (in.isNullable()) {
    builder.prop(DiSchemaConstants.TALEND6_COLUMN_IS_NULLABLE,"String_Node_Str");
  }
  if (in.getPrecision() >= 0) {
    builder.prop(DiSchemaConstants.TALEND6_COLUMN_PRECISION,String.valueOf(in.getPrecision()));
  }
  if (in.getInitialValue() != null && in.getInitialValue().getBody() != null) {
    builder.prop(DiSchemaConstants.TALEND6_COLUMN_DEFAULT,in.getInitialValue().getBody());
  }
  if (in.getName() != null) {
    builder.prop(DiSchemaConstants.TALEND6_COLUMN_ORIGINAL_DB_COLUMN_NAME,in.getName());
  }
  if (in.getRelatedEntity() != null) {
    builder.prop(DiSchemaConstants.TALEND6_COLUMN_RELATED_ENTITY,in.getRelatedEntity());
  }
  if (in.getRelationshipType() != null) {
    builder.prop(DiSchemaConstants.TALEND6_COLUMN_RELATIONSHIP_TYPE,in.getRelationshipType());
  }
  return builder;
}

Fixed version (ground truth):
/** 
 * Copy all of the information from the IMetadataColumn in the form of key/value properties into an Avro object.
 * @param builder Any Avro builder capable of taking key/value in the form of strings.
 * @param in The element to copy information from.
 * @return the instance of the builder passed in.
 */
private static <T extends PropBuilder<T>>PropBuilder<T> copyColumnProperties(PropBuilder<T> builder,org.talend.core.model.metadata.builder.connection.MetadataColumn in){
  if (in.getId() != null) {
    builder.prop(DiSchemaConstants.TALEND6_ID,in.getId());
  }
  if (in.getComment() != null) {
    builder.prop(DiSchemaConstants.TALEND6_COMMENT,in.getComment());
  }
  if (in.getLabel() != null) {
    builder.prop(DiSchemaConstants.TALEND6_LABEL,in.getLabel());
  }
  for (  TaggedValue tv : in.getTaggedValue()) {
    String additionalTag=tv.getTag();
    if (DiSchemaConstants.TALEND6_IS_READ_ONLY.equals(additionalTag)) {
      builder.prop(DiSchemaConstants.TALEND6_IS_READ_ONLY,tv.getValue());
    }
 else     if (tv.getValue() != null) {
      builder.prop(DiSchemaConstants.TALEND6_ADDITIONAL_PROPERTIES + additionalTag,tv.getValue());
    }
  }
  if (in.isKey()) {
    builder.prop(DiSchemaConstants.TALEND6_COLUMN_IS_KEY,"String_Node_Str");
  }
  if (in.getSourceType() != null) {
    builder.prop(DiSchemaConstants.TALEND6_COLUMN_SOURCE_TYPE,in.getSourceType());
  }
  if (in.getTalendType() != null) {
    builder.prop(DiSchemaConstants.TALEND6_COLUMN_TALEND_TYPE,in.getTalendType());
  }
  if (in.getPattern() != null) {
    builder.prop(DiSchemaConstants.TALEND6_COLUMN_PATTERN,TalendQuoteUtils.removeQuotesIfExist(in.getPattern()));
  }
  if (in.getLength() >= 0) {
    builder.prop(DiSchemaConstants.TALEND6_COLUMN_LENGTH,String.valueOf((int)in.getLength()));
  }
  if (in.getOriginalLength() >= 0) {
    builder.prop(DiSchemaConstants.TALEND6_COLUMN_ORIGINAL_LENGTH,String.valueOf(in.getOriginalLength()));
  }
  if (in.isNullable()) {
    builder.prop(DiSchemaConstants.TALEND6_COLUMN_IS_NULLABLE,"String_Node_Str");
  }
  if (in.getPrecision() >= 0) {
    builder.prop(DiSchemaConstants.TALEND6_COLUMN_PRECISION,String.valueOf(in.getPrecision()));
  }
  if (in.getInitialValue() != null && in.getInitialValue().getBody() != null) {
    builder.prop(DiSchemaConstants.TALEND6_COLUMN_DEFAULT,in.getInitialValue().getBody());
  }
  if (in.getName() != null) {
    builder.prop(DiSchemaConstants.TALEND6_COLUMN_ORIGINAL_DB_COLUMN_NAME,in.getName());
  }
  if (in.getRelatedEntity() != null) {
    builder.prop(DiSchemaConstants.TALEND6_COLUMN_RELATED_ENTITY,in.getRelatedEntity());
  }
  if (in.getRelationshipType() != null) {
    builder.prop(DiSchemaConstants.TALEND6_COLUMN_RELATIONSHIP_TYPE,in.getRelationshipType());
  }
  return builder;
}