Program: 118636
Project: 118636
Buggy source:
@Override public void execute(){
  propagatedChange.clear();
  propagateDatas(true);
  if (currentInputMetadata != null) {
    if (!currentInputMetadata.sameMetadataAs(newInputMetadata,IMetadataColumn.OPTIONS_NONE)) {
      if (!currentInputMetadata.sameMetadataAs(newInputMetadata,IMetadataColumn.OPTIONS_IGNORE_USED)) {
        String type=(String)inputNode.getPropertyValue(EParameterName.SCHEMA_TYPE.getName());
        if (type != null) {
          if (type.equals(EmfComponent.REPOSITORY)) {
            inputWasRepository=true;
            inputNode.setPropertyValue(EParameterName.SCHEMA_TYPE.getName(),EmfComponent.BUILTIN);
          }
        }
      }
      MetadataToolHelper.copyTable(newInputMetadata,currentInputMetadata);
    }
  }
  if (!currentOutputMetadata.sameMetadataAs(newOutputMetadata,IMetadataColumn.OPTIONS_NONE)) {
    if (!currentOutputMetadata.sameMetadataAs(newOutputMetadata,IMetadataColumn.OPTIONS_IGNORE_USED)) {
      String type=(String)node.getPropertyValue(EParameterName.SCHEMA_TYPE.getName());
      if (type != null && type.equals(EmfComponent.REPOSITORY) && !repositoryMode) {
        if ((node.getElementParameter("String_Node_Str").getContext().equals(currentOutputMetadata.getAttachedConnector()))) {
          outputWasRepository=true;
          node.setPropertyValue(EParameterName.SCHEMA_TYPE.getName(),EmfComponent.BUILTIN);
        }
      }
    }
    MetadataToolHelper.copyTable(newOutputMetadata,currentOutputMetadata);
    IGenericWizardService wizardService=null;
    if (GlobalServiceRegister.getDefault().isServiceRegistered(IGenericWizardService.class)) {
      wizardService=(IGenericWizardService)GlobalServiceRegister.getDefault().getService(IGenericWizardService.class);
    }
    if (wizardService != null && wizardService.isGenericConnection(connection)) {
      wizardService.updateComponentSchema(node.getComponentProperties(),schemaParam.getName(),currentOutputMetadata);
    }
  }
  if (inputSchemaParam != null && inputSchemaParam.getChildParameters().get(EParameterName.SCHEMA_TYPE.getName()) != null && EmfComponent.REPOSITORY.equals(inputSchemaParam.getChildParameters().get(EParameterName.SCHEMA_TYPE.getName()).getValue())) {
    IElementParameter elementParameter=node.getElementParameter(EParameterName.MAPPING.getName());
    if (elementParameter != null) {
      if (elementParameter.getValue() instanceof String) {
        String value=(String)elementParameter.getValue();
        if (!isDBComponent(value)) {
          schemaParam.getChildParameters().get(EParameterName.SCHEMA_TYPE.getName()).setValue(EmfComponent.REPOSITORY);
          schemaParam.getChildParameters().get(EParameterName.REPOSITORY_SCHEMA_TYPE.getName()).setValue(inputSchemaParam.getChildParameters().get(EParameterName.REPOSITORY_SCHEMA_TYPE.getName()).getValue());
        }
      }
    }
  }
  for (  INodeConnector connector : node.getListConnector()) {
    if ((!connector.getName().equals(currentConnector)) && connector.getBaseSchema().equals(currentConnector)) {
      if (node.getComponent() != null && "String_Node_Str".equals(node.getComponent().getName()) && "String_Node_Str".equals(connector.getName())) {
        IMetadataTable clone=newOutputMetadata.clone(true);
        Iterator<IMetadataColumn> iterator=clone.getListColumns().iterator();
        while (iterator.hasNext()) {
          IMetadataColumn column=iterator.next();
          if (column.isCustom()) {
            iterator.remove();
          }
        }
        MetadataToolHelper.copyTable(clone,node.getMetadataFromConnector(connector.getName()));
      }
 else {
        MetadataToolHelper.copyTable(newOutputMetadata,node.getMetadataFromConnector(connector.getName()));
      }
    }
  }
  List<ColumnNameChanged> columnNameChanged=MetadataToolHelper.getColumnNameChanged(oldOutputMetadata,newOutputMetadata);
  ColumnListController.updateColumnList(node,columnNameChanged,true);
  if (inputNode != null) {
    List<ColumnNameChanged> inputColumnNameChangedExt=MetadataToolHelper.getColumnNameChangedExt(inputNode,oldInputMetadata,newInputMetadata);
    ColumnListController.updateColumnList(node,inputColumnNameChangedExt);
  }
  List<ColumnNameChanged> outputColumnNameChangedExt=MetadataToolHelper.getColumnNameChangedExt(node,oldOutputMetadata,newOutputMetadata);
  syncOutputNodeColumnsList(outputColumnNameChangedExt);
  setXMLMAPPING();
  if (!internal) {
    updateColumnList(oldOutputMetadata,newOutputMetadata);
    ((Process)node.getProcess()).checkProcess();
  }
  refreshMetadataChanged();
}

Fixed version (ground truth):
@Override public void execute(){
  propagatedChange.clear();
  propagateDatas(true);
  if (currentInputMetadata != null) {
    if (!currentInputMetadata.sameMetadataAs(newInputMetadata,IMetadataColumn.OPTIONS_NONE)) {
      if (!currentInputMetadata.sameMetadataAs(newInputMetadata,IMetadataColumn.OPTIONS_IGNORE_USED)) {
        String type=(String)inputNode.getPropertyValue(EParameterName.SCHEMA_TYPE.getName());
        if (type != null) {
          if (type.equals(EmfComponent.REPOSITORY)) {
            inputWasRepository=true;
            inputNode.setPropertyValue(EParameterName.SCHEMA_TYPE.getName(),EmfComponent.BUILTIN);
          }
        }
      }
      MetadataToolHelper.copyTable(newInputMetadata,currentInputMetadata);
    }
  }
  if (!currentOutputMetadata.sameMetadataAs(newOutputMetadata,IMetadataColumn.OPTIONS_NONE)) {
    if (!currentOutputMetadata.sameMetadataAs(newOutputMetadata,IMetadataColumn.OPTIONS_IGNORE_USED)) {
      String type=(String)node.getPropertyValue(EParameterName.SCHEMA_TYPE.getName());
      if (type != null && type.equals(EmfComponent.REPOSITORY) && !repositoryMode) {
        if ((node.getElementParameter("String_Node_Str").getContext().equals(currentOutputMetadata.getAttachedConnector()))) {
          outputWasRepository=true;
          node.setPropertyValue(EParameterName.SCHEMA_TYPE.getName(),EmfComponent.BUILTIN);
        }
      }
    }
    MetadataToolHelper.copyTable(newOutputMetadata,currentOutputMetadata);
  }
  if (inputSchemaParam != null && inputSchemaParam.getChildParameters().get(EParameterName.SCHEMA_TYPE.getName()) != null && EmfComponent.REPOSITORY.equals(inputSchemaParam.getChildParameters().get(EParameterName.SCHEMA_TYPE.getName()).getValue())) {
    IElementParameter elementParameter=node.getElementParameter(EParameterName.MAPPING.getName());
    if (elementParameter != null) {
      if (elementParameter.getValue() instanceof String) {
        String value=(String)elementParameter.getValue();
        if (!isDBComponent(value)) {
          schemaParam.getChildParameters().get(EParameterName.SCHEMA_TYPE.getName()).setValue(EmfComponent.REPOSITORY);
          schemaParam.getChildParameters().get(EParameterName.REPOSITORY_SCHEMA_TYPE.getName()).setValue(inputSchemaParam.getChildParameters().get(EParameterName.REPOSITORY_SCHEMA_TYPE.getName()).getValue());
        }
      }
    }
  }
  for (  INodeConnector connector : node.getListConnector()) {
    if ((!connector.getName().equals(currentConnector)) && connector.getBaseSchema().equals(currentConnector)) {
      if (node.getComponent() != null && "String_Node_Str".equals(node.getComponent().getName()) && "String_Node_Str".equals(connector.getName())) {
        IMetadataTable clone=newOutputMetadata.clone(true);
        Iterator<IMetadataColumn> iterator=clone.getListColumns().iterator();
        while (iterator.hasNext()) {
          IMetadataColumn column=iterator.next();
          if (column.isCustom()) {
            iterator.remove();
          }
        }
        MetadataToolHelper.copyTable(clone,node.getMetadataFromConnector(connector.getName()));
      }
 else {
        MetadataToolHelper.copyTable(newOutputMetadata,node.getMetadataFromConnector(connector.getName()));
      }
    }
  }
  updateComponentSchema();
  List<ColumnNameChanged> columnNameChanged=MetadataToolHelper.getColumnNameChanged(oldOutputMetadata,newOutputMetadata);
  ColumnListController.updateColumnList(node,columnNameChanged,true);
  if (inputNode != null) {
    List<ColumnNameChanged> inputColumnNameChangedExt=MetadataToolHelper.getColumnNameChangedExt(inputNode,oldInputMetadata,newInputMetadata);
    ColumnListController.updateColumnList(node,inputColumnNameChangedExt);
  }
  List<ColumnNameChanged> outputColumnNameChangedExt=MetadataToolHelper.getColumnNameChangedExt(node,oldOutputMetadata,newOutputMetadata);
  syncOutputNodeColumnsList(outputColumnNameChangedExt);
  setXMLMAPPING();
  if (!internal) {
    updateColumnList(oldOutputMetadata,newOutputMetadata);
    ((Process)node.getProcess()).checkProcess();
  }
  refreshMetadataChanged();
}