Program: 125911
Project: 125911
Buggy source:
private static Schema copyDynamicColumnProperties(Schema schema,org.talend.core.model.metadata.builder.connection.MetadataColumn in){
  Map<String,String> props=new HashMap<String,String>();
  if (in.getId() != null) {
    schema=AvroUtils.setProperty(schema,Talend6SchemaConstants.TALEND6_DYNAMIC_COLUMN_ID,in.getId());
  }
  if (in.getComment() != null) {
    schema=AvroUtils.setProperty(schema,Talend6SchemaConstants.TALEND6_DYNAMIC_COLUMN_COMMENT,in.getComment());
  }
  if (in.getLabel() != null) {
    schema=AvroUtils.setProperty(schema,Talend6SchemaConstants.TALEND6_DYNAMIC_COLUMN_NAME,in.getLabel());
  }
  if (in.isReadOnly()) {
    schema=AvroUtils.setProperty(schema,Talend6SchemaConstants.TALEND6_DYNAMIC_IS_READ_ONLY,"String_Node_Str");
  }
  for (  TaggedValue tv : in.getTaggedValue()) {
    String additionalTag=tv.getTag();
    if (tv.getValue() != null) {
      schema=AvroUtils.setProperty(schema,Talend6SchemaConstants.TALEND6_DYNAMIC_ADDITIONAL_PROPERTIES + additionalTag,tv.getValue());
    }
  }
  if (in.isKey()) {
    schema=AvroUtils.setProperty(schema,Talend6SchemaConstants.TALEND6_COLUMN_IS_KEY,"String_Node_Str");
  }
  if (in.getType() != null) {
    schema=AvroUtils.setProperty(schema,Talend6SchemaConstants.TALEND6_COLUMN_SOURCE_TYPE,in.getSourceType());
  }
  if (in.getTalendType() != null) {
    schema=AvroUtils.setProperty(schema,Talend6SchemaConstants.TALEND6_COLUMN_TALEND_TYPE,in.getTalendType());
  }
  if (in.getPattern() != null) {
    schema=AvroUtils.setProperty(schema,Talend6SchemaConstants.TALEND6_COLUMN_PATTERN,TalendQuoteUtils.addQuotesIfNotExist(in.getPattern()));
  }
  if (in.getLength() >= 0) {
    schema=AvroUtils.setProperty(schema,Talend6SchemaConstants.TALEND6_COLUMN_LENGTH,String.valueOf((int)in.getLength()));
  }
  if (in.getOriginalLength() >= 0) {
    schema=AvroUtils.setProperty(schema,Talend6SchemaConstants.TALEND6_COLUMN_ORIGINAL_LENGTH,String.valueOf(in.getOriginalLength()));
  }
  if (in.isNullable()) {
    schema=AvroUtils.setProperty(schema,Talend6SchemaConstants.TALEND6_COLUMN_IS_NULLABLE,"String_Node_Str");
  }
  if (in.getPrecision() >= 0) {
    schema=AvroUtils.setProperty(schema,Talend6SchemaConstants.TALEND6_COLUMN_PRECISION,String.valueOf(in.getPrecision()));
  }
  if (in.getInitialValue() != null && in.getInitialValue().getBody() != null) {
    schema=AvroUtils.setProperty(schema,Talend6SchemaConstants.TALEND6_COLUMN_DEFAULT,in.getInitialValue().getBody());
  }
  if (in.getName() != null) {
    schema=AvroUtils.setProperty(schema,Talend6SchemaConstants.TALEND6_COLUMN_ORIGINAL_DB_COLUMN_NAME,in.getName());
  }
  if (in.getRelatedEntity() != null) {
    schema=AvroUtils.setProperty(schema,Talend6SchemaConstants.TALEND6_COLUMN_RELATED_ENTITY,in.getRelatedEntity());
  }
  if (in.getRelationshipType() != null) {
    schema=AvroUtils.setProperty(schema,Talend6SchemaConstants.TALEND6_COLUMN_RELATIONSHIP_TYPE,in.getRelationshipType());
  }
  return schema;
}

Fixed version (ground truth):
private static Schema copyDynamicColumnProperties(Schema schema,org.talend.core.model.metadata.builder.connection.MetadataColumn in){
  Map<String,String> props=new HashMap<String,String>();
  if (in.getId() != null) {
    schema=AvroUtils.setProperty(schema,Talend6SchemaConstants.TALEND6_DYNAMIC_COLUMN_ID,in.getId());
  }
  if (in.getComment() != null) {
    schema=AvroUtils.setProperty(schema,Talend6SchemaConstants.TALEND6_DYNAMIC_COLUMN_COMMENT,in.getComment());
  }
  if (in.getLabel() != null) {
    schema=AvroUtils.setProperty(schema,Talend6SchemaConstants.TALEND6_DYNAMIC_COLUMN_NAME,in.getLabel());
  }
  if (in.isReadOnly()) {
    schema=AvroUtils.setProperty(schema,Talend6SchemaConstants.TALEND6_DYNAMIC_IS_READ_ONLY,"String_Node_Str");
  }
  for (  TaggedValue tv : in.getTaggedValue()) {
    String additionalTag=tv.getTag();
    if (tv.getValue() != null) {
      schema=AvroUtils.setProperty(schema,Talend6SchemaConstants.TALEND6_DYNAMIC_ADDITIONAL_PROPERTIES + additionalTag,tv.getValue());
    }
  }
  if (in.isKey()) {
    schema=AvroUtils.setProperty(schema,Talend6SchemaConstants.TALEND6_COLUMN_IS_KEY,"String_Node_Str");
  }
  if (in.getType() != null) {
    schema=AvroUtils.setProperty(schema,Talend6SchemaConstants.TALEND6_COLUMN_SOURCE_TYPE,in.getSourceType());
  }
  if (in.getTalendType() != null) {
    schema=AvroUtils.setProperty(schema,Talend6SchemaConstants.TALEND6_COLUMN_TALEND_TYPE,in.getTalendType());
  }
  if (in.getPattern() != null) {
    schema=AvroUtils.setProperty(schema,Talend6SchemaConstants.TALEND6_COLUMN_PATTERN,TalendQuoteUtils.removeQuotesIfExist(in.getPattern()));
  }
  if (in.getLength() >= 0) {
    schema=AvroUtils.setProperty(schema,Talend6SchemaConstants.TALEND6_COLUMN_LENGTH,String.valueOf((int)in.getLength()));
  }
  if (in.getOriginalLength() >= 0) {
    schema=AvroUtils.setProperty(schema,Talend6SchemaConstants.TALEND6_COLUMN_ORIGINAL_LENGTH,String.valueOf(in.getOriginalLength()));
  }
  if (in.isNullable()) {
    schema=AvroUtils.setProperty(schema,Talend6SchemaConstants.TALEND6_COLUMN_IS_NULLABLE,"String_Node_Str");
  }
  if (in.getPrecision() >= 0) {
    schema=AvroUtils.setProperty(schema,Talend6SchemaConstants.TALEND6_COLUMN_PRECISION,String.valueOf(in.getPrecision()));
  }
  if (in.getInitialValue() != null && in.getInitialValue().getBody() != null) {
    schema=AvroUtils.setProperty(schema,Talend6SchemaConstants.TALEND6_COLUMN_DEFAULT,in.getInitialValue().getBody());
  }
  if (in.getName() != null) {
    schema=AvroUtils.setProperty(schema,Talend6SchemaConstants.TALEND6_COLUMN_ORIGINAL_DB_COLUMN_NAME,in.getName());
  }
  if (in.getRelatedEntity() != null) {
    schema=AvroUtils.setProperty(schema,Talend6SchemaConstants.TALEND6_COLUMN_RELATED_ENTITY,in.getRelatedEntity());
  }
  if (in.getRelationshipType() != null) {
    schema=AvroUtils.setProperty(schema,Talend6SchemaConstants.TALEND6_COLUMN_RELATIONSHIP_TYPE,in.getRelationshipType());
  }
  return schema;
}