Program: 118635
Project: 118635
Buggy source:
public void init(INode node,IElementParameter schemaParam,IMetadataTable currentOutputMetadata,IMetadataTable newOutputMetadata){
  this.node=node;
  this.schemaParam=schemaParam;
  if (schemaParam == null) {
    if (newOutputMetadata.getAttachedConnector() != null) {
      currentConnector=newOutputMetadata.getAttachedConnector();
    }
 else {
      if (node.isELTComponent()) {
        currentConnector=EConnectionType.TABLE.getName();
      }
 else {
        currentConnector=EConnectionType.FLOW_MAIN.getName();
      }
    }
    for (    IElementParameter param : node.getElementParameters()) {
      if (param.getFieldType().equals(EParameterFieldType.SCHEMA_TYPE) && param.getContext().equals(currentConnector)) {
        this.schemaParam=param;
      }
    }
  }
 else {
    currentConnector=this.schemaParam.getContext();
  }
  this.inputNode=null;
  this.currentInputMetadata=null;
  this.newInputMetadata=null;
  oldInputMetadata=null;
  this.currentOutputMetadata=currentOutputMetadata;
  if (this.currentOutputMetadata == null) {
    this.currentOutputMetadata=node.getMetadataFromConnector(currentConnector);
  }
  if (currentOutputMetadata == null && newOutputMetadata != null) {
    currentOutputMetadata=newOutputMetadata.clone(true);
  }
  oldOutputMetadata=this.currentOutputMetadata.clone(true);
  this.newOutputMetadata=newOutputMetadata.clone(true);
  this.newOutputMetadata.setReadOnly(this.currentOutputMetadata.isReadOnly());
  initializeContainer();
  setLabel(Messages.getString("String_Node_Str"));
}

Fixed version (ground truth):
public void init(INode node,IElementParameter schemaParam,IMetadataTable currentOutputMetadata,IMetadataTable newOutputMetadata){
  this.node=node;
  this.schemaParam=schemaParam;
  if (schemaParam == null) {
    if (newOutputMetadata.getAttachedConnector() != null) {
      currentConnector=newOutputMetadata.getAttachedConnector();
    }
 else {
      if (node.isELTComponent()) {
        currentConnector=EConnectionType.TABLE.getName();
      }
 else {
        currentConnector=EConnectionType.FLOW_MAIN.getName();
      }
    }
    for (    IElementParameter param : node.getElementParameters()) {
      if ((EParameterFieldType.SCHEMA_TYPE.equals(param.getFieldType()) || EParameterFieldType.SCHEMA_REFERENCE.equals(param.getFieldType())) && param.getContext().equals(currentConnector)) {
        this.schemaParam=param;
      }
    }
  }
 else {
    currentConnector=this.schemaParam.getContext();
  }
  this.inputNode=null;
  this.currentInputMetadata=null;
  this.newInputMetadata=null;
  oldInputMetadata=null;
  this.currentOutputMetadata=currentOutputMetadata;
  if (this.currentOutputMetadata == null) {
    this.currentOutputMetadata=node.getMetadataFromConnector(currentConnector);
  }
  if (currentOutputMetadata == null && newOutputMetadata != null) {
    currentOutputMetadata=newOutputMetadata.clone(true);
  }
  oldOutputMetadata=this.currentOutputMetadata.clone(true);
  this.newOutputMetadata=newOutputMetadata.clone(true);
  this.newOutputMetadata.setReadOnly(this.currentOutputMetadata.isReadOnly());
  initializeContainer();
  setLabel(Messages.getString("String_Node_Str"));
}