Program: 128931
Project: 128931
Buggy source:
@Override protected Control createDialogArea(final Composite parent){
  Composite composite=(Composite)super.createDialogArea(parent);
  MetadataTableEditor metadataTableEditor;
  if (inputMetaTable == null) {
    composite.setLayout(new FillLayout());
    metadataTableEditor=new MetadataTableEditor(outputMetaTable,titleOutput);
    outputMetaView=new MetadataTableEditorView(composite,SWT.NONE,metadataTableEditor,outputReadOnly,true,true,false);
    initializeMetadataTableView(outputMetaView,outputNode,outputMetaTable);
    outputMetaView.initGraphicComponents();
    outputMetaView.getExtendedTableViewer().setCommandStack(commandStack);
  }
 else {
    compositesSachForm=new ThreeCompositesSashForm(composite,SWT.NONE);
    GridLayout gridLayout=new GridLayout(1,false);
    gridLayout.marginBottom=0;
    gridLayout.marginHeight=0;
    gridLayout.marginLeft=0;
    gridLayout.marginRight=0;
    gridLayout.marginTop=0;
    gridLayout.marginWidth=0;
    gridLayout.horizontalSpacing=0;
    composite.setLayout(gridLayout);
    GridData gridData=new GridData(GridData.FILL_BOTH);
    composite.setLayoutData(gridData);
    metadataTableEditor=new MetadataTableEditor(inputMetaTable,titleInput);
    inputMetaView=new MetadataTableEditorView(compositesSachForm.getLeftComposite(),SWT.NONE,metadataTableEditor,inputReadOnly,true,true,false);
    initializeMetadataTableView(inputMetaView,inputNode,inputMetaTable);
    inputMetaView.initGraphicComponents();
    inputMetaView.getExtendedTableViewer().setCommandStack(commandStack);
    inputMetaView.setGridDataSize(size.x / 2 - 50,size.y - 150);
    Label label1=new Label(compositesSachForm.getMidComposite(),SWT.NONE);
    GridDataFactory.swtDefaults().hint(42,18).applyTo(label1);
    Composite buttonComposite=new Composite(compositesSachForm.getMidComposite(),SWT.BORDER);
    Label label2=new Label(compositesSachForm.getMidComposite(),SWT.NONE);
    GridDataFactory.swtDefaults().hint(42,36).applyTo(label2);
    gridLayout=new GridLayout(1,true);
    buttonComposite.setLayout(gridLayout);
    gridData=new GridData(GridData.FILL_BOTH);
    buttonComposite.setLayoutData(gridData);
    Composite buttonComposite2=new Composite(buttonComposite,SWT.NONE);
    gridLayout=new GridLayout(1,true);
    gridLayout.marginBottom=0;
    gridLayout.marginHeight=0;
    gridLayout.marginLeft=0;
    gridLayout.marginRight=0;
    gridLayout.marginTop=0;
    gridLayout.marginWidth=0;
    buttonComposite2.setLayout(gridLayout);
    gridData=new GridData(GridData.FILL_BOTH);
    gridData.verticalAlignment=GridData.CENTER;
    buttonComposite2.setLayoutData(gridData);
    Button copySelectionToOutput=new Button(buttonComposite2,SWT.NONE);
    copySelectionToOutput.setImage(ImageProvider.getImage(EImage.RIGHT_ICON));
    copySelectionToOutput.setToolTipText(Messages.getString("String_Node_Str"));
    GridDataFactory.swtDefaults().align(SWT.CENTER,SWT.CENTER).applyTo(copySelectionToOutput);
    copySelectionToOutput.addListener(SWT.Selection,new Listener(){
      public void handleEvent(      Event event){
        tableItem=inputMetaView.getTable().getSelection();
        list=new ArrayList<IMetadataColumn>();
        for (        TableItem element : tableItem) {
          column=(IMetadataColumn)element.getData();
          list.add(column);
        }
        if (tableItem.length > 0) {
          MetadataTool.copyTable(list,getOutputMetaData());
          outputMetaView.getTableViewerCreator().refresh();
        }
      }
    }
);
    Button copyToOutput=new Button(buttonComposite2,SWT.NONE);
    copyToOutput.setImage(ImageProvider.getImage(EImage.RIGHTX_ICON));
    copyToOutput.setToolTipText(Messages.getString("String_Node_Str"));
    GridDataFactory.swtDefaults().align(SWT.CENTER,SWT.CENTER).applyTo(copyToOutput);
    copyToOutput.addListener(SWT.Selection,new Listener(){
      public void handleEvent(      Event event){
        MessageBox messageBox=new MessageBox(parent.getShell(),SWT.APPLICATION_MODAL | SWT.OK | SWT.CANCEL);
        messageBox.setText(Messages.getString("String_Node_Str"));
        messageBox.setMessage(Messages.getString("String_Node_Str"));
        if (messageBox.open() == SWT.OK) {
          MetadataTool.copyTable(getInputMetaData(),getOutputMetaData());
          outputMetaView.getTableViewerCreator().refresh();
        }
      }
    }
);
    Label lable1=new Label(buttonComposite2,SWT.NONE);
    GridDataFactory.swtDefaults().align(SWT.CENTER,SWT.CENTER).applyTo(lable1);
    Label lable2=new Label(buttonComposite2,SWT.NONE);
    GridDataFactory.swtDefaults().align(SWT.CENTER,SWT.CENTER).applyTo(lable2);
    Label lable3=new Label(buttonComposite2,SWT.NONE);
    GridDataFactory.swtDefaults().align(SWT.CENTER,SWT.CENTER).applyTo(lable3);
    Button copySelectionToInput=new Button(buttonComposite2,SWT.NONE);
    copySelectionToInput.setImage(ImageProvider.getImage(EImage.LEFT_ICON));
    copySelectionToInput.setToolTipText(Messages.getString("String_Node_Str"));
    gridData.verticalAlignment=GridData.CENTER;
    copySelectionToInput.setLayoutData(gridData);
    copySelectionToInput.addListener(SWT.Selection,new Listener(){
      public void handleEvent(      Event event){
        tableItem=outputMetaView.getTable().getSelection();
        list=new ArrayList<IMetadataColumn>();
        for (        TableItem element : tableItem) {
          column=(IMetadataColumn)element.getData();
          list.add(column);
        }
        if (tableItem.length > 0) {
          MetadataTool.copyTable(list,getInputMetaData());
          inputMetaView.getTableViewerCreator().refresh();
        }
      }
    }
);
    Button copyToInput=new Button(buttonComposite2,SWT.NONE);
    copyToInput.setImage(ImageProvider.getImage(EImage.LEFTX_ICON));
    copyToInput.setToolTipText(Messages.getString("String_Node_Str"));
    gridData.verticalAlignment=GridData.CENTER;
    copyToInput.setLayoutData(gridData);
    copyToInput.addListener(SWT.Selection,new Listener(){
      public void handleEvent(      Event event){
        MessageBox messageBox=new MessageBox(parent.getShell(),SWT.APPLICATION_MODAL | SWT.OK | SWT.CANCEL);
        messageBox.setText(Messages.getString("String_Node_Str"));
        messageBox.setMessage(Messages.getString("String_Node_Str"));
        if (messageBox.open() == SWT.OK) {
          MetadataTool.copyTable(getOutputMetaData(),getInputMetaData());
          inputMetaView.getTableViewerCreator().refresh();
        }
      }
    }
);
    if (inputReadOnly || inputMetaTable.isReadOnly()) {
      copyToInput.setEnabled(false);
      copySelectionToInput.setEnabled(false);
    }
    outputMetaView=new MetadataTableEditorView(compositesSachForm.getRightComposite(),SWT.NONE,new MetadataTableEditor(outputMetaTable,titleOutput + "String_Node_Str"),outputReadOnly,true,true,false);
    initializeMetadataTableView(outputMetaView,outputNode,outputMetaTable);
    outputMetaView.initGraphicComponents();
    outputMetaView.getExtendedTableViewer().setCommandStack(commandStack);
    outputMetaView.setGridDataSize(size.x / 2 - 50,size.y - 150);
    outputMetaView.getMetadataTableEditor().addModifiedBeanListener(new IModifiedBeanListener<IMetadataColumn>(){
      public void handleEvent(      ModifiedBeanEvent<IMetadataColumn> event){
        if (AbstractMetadataTableEditorView.ID_COLUMN_NAME.equals(event.column.getId())) {
          IMetadataColumn modifiedObject=event.bean;
          if (modifiedObject != null) {
            String originalLabel=changeNameOutColumns.get(modifiedObject);
            if (originalLabel == null) {
              changeNameOutColumns.put(modifiedObject.getLabel(),(String)event.previousValue);
            }
          }
        }
      }
    }
);
    if (outputReadOnly || outputMetaTable.isReadOnly()) {
      copyToOutput.setEnabled(false);
      copySelectionToOutput.setEnabled(false);
    }
    compositesSachForm.setGridDatas();
    CustomTableManager.addCustomManagementToTable(inputMetaView,inputReadOnly);
    CustomTableManager.addCustomManagementToToolBar(inputMetaView,inputMetaTable,inputReadOnly,outputMetaView,outputMetaTable,outputNode.getComponent().isSchemaAutoPropagated());
  }
  CustomTableManager.addCustomManagementToTable(outputMetaView,outputReadOnly);
  CustomTableManager.addCustomManagementToToolBar(outputMetaView,outputMetaTable,outputReadOnly,inputMetaView,inputMetaTable,false);
  metadataTableEditor.addModifiedBeanListener(new IModifiedBeanListener<IMetadataColumn>(){
    public void handleEvent(    ModifiedBeanEvent<IMetadataColumn> event){
      if ((inputMetaTable != null) && outputMetaTable.isReadOnly() && outputNode.getComponent().isSchemaAutoPropagated()) {
        MetadataTool.copyTable(inputMetaTable,outputMetaTable);
        outputMetaView.getTableViewerCreator().refresh();
      }
      if (AbstractMetadataTableEditorView.ID_COLUMN_NAME.equals(event.column.getId())) {
        IMetadataColumn modifiedObject=event.bean;
        if (modifiedObject != null) {
          String originalLabel=changedNameColumns.get(modifiedObject);
          if (originalLabel == null) {
            changedNameColumns.put(modifiedObject,(String)event.previousValue);
            changeNameInColumns.put(modifiedObject.getLabel(),(String)event.previousValue);
          }
        }
      }
    }
  }
);
  return composite;
}

Fixed version (ground truth):
@Override protected Control createDialogArea(final Composite parent){
  Composite composite=(Composite)super.createDialogArea(parent);
  MetadataTableEditor metadataTableEditor;
  if (inputMetaTable == null) {
    composite.setLayout(new FillLayout());
    metadataTableEditor=new MetadataTableEditor(outputMetaTable,titleOutput);
    outputMetaView=new DialogMetadataTableEditorView(composite,SWT.NONE,metadataTableEditor,outputReadOnly,true,true,false);
    initializeMetadataTableView(outputMetaView,outputNode,outputMetaTable);
    outputMetaView.initGraphicComponents();
    outputMetaView.getExtendedTableViewer().setCommandStack(commandStack);
  }
 else {
    compositesSachForm=new ThreeCompositesSashForm(composite,SWT.NONE);
    GridLayout gridLayout=new GridLayout(1,false);
    gridLayout.marginBottom=0;
    gridLayout.marginHeight=0;
    gridLayout.marginLeft=0;
    gridLayout.marginRight=0;
    gridLayout.marginTop=0;
    gridLayout.marginWidth=0;
    gridLayout.horizontalSpacing=0;
    composite.setLayout(gridLayout);
    GridData gridData=new GridData(GridData.FILL_BOTH);
    composite.setLayoutData(gridData);
    metadataTableEditor=new MetadataTableEditor(inputMetaTable,titleInput);
    inputMetaView=new DialogMetadataTableEditorView(compositesSachForm.getLeftComposite(),SWT.NONE,metadataTableEditor,inputReadOnly,true,true,false);
    initializeMetadataTableView(inputMetaView,inputNode,inputMetaTable);
    inputMetaView.initGraphicComponents();
    inputMetaView.getExtendedTableViewer().setCommandStack(commandStack);
    inputMetaView.setGridDataSize(size.x / 2 - 50,size.y - 150);
    Label label1=new Label(compositesSachForm.getMidComposite(),SWT.NONE);
    GridDataFactory.swtDefaults().hint(42,18).applyTo(label1);
    Composite buttonComposite=new Composite(compositesSachForm.getMidComposite(),SWT.BORDER);
    Label label2=new Label(compositesSachForm.getMidComposite(),SWT.NONE);
    GridDataFactory.swtDefaults().hint(42,36).applyTo(label2);
    gridLayout=new GridLayout(1,true);
    buttonComposite.setLayout(gridLayout);
    gridData=new GridData(GridData.FILL_BOTH);
    buttonComposite.setLayoutData(gridData);
    Composite buttonComposite2=new Composite(buttonComposite,SWT.NONE);
    gridLayout=new GridLayout(1,true);
    gridLayout.marginBottom=0;
    gridLayout.marginHeight=0;
    gridLayout.marginLeft=0;
    gridLayout.marginRight=0;
    gridLayout.marginTop=0;
    gridLayout.marginWidth=0;
    buttonComposite2.setLayout(gridLayout);
    gridData=new GridData(GridData.FILL_BOTH);
    gridData.verticalAlignment=GridData.CENTER;
    buttonComposite2.setLayoutData(gridData);
    Button copySelectionToOutput=new Button(buttonComposite2,SWT.NONE);
    copySelectionToOutput.setImage(ImageProvider.getImage(EImage.RIGHT_ICON));
    copySelectionToOutput.setToolTipText(Messages.getString("String_Node_Str"));
    GridDataFactory.swtDefaults().align(SWT.CENTER,SWT.CENTER).applyTo(copySelectionToOutput);
    copySelectionToOutput.addListener(SWT.Selection,new Listener(){
      public void handleEvent(      Event event){
        tableItem=inputMetaView.getTable().getSelection();
        list=new ArrayList<IMetadataColumn>();
        for (        TableItem element : tableItem) {
          column=(IMetadataColumn)element.getData();
          list.add(column);
        }
        if (tableItem.length > 0) {
          MetadataTool.copyTable(list,getOutputMetaData());
          outputMetaView.getTableViewerCreator().refresh();
        }
      }
    }
);
    Button copyToOutput=new Button(buttonComposite2,SWT.NONE);
    copyToOutput.setImage(ImageProvider.getImage(EImage.RIGHTX_ICON));
    copyToOutput.setToolTipText(Messages.getString("String_Node_Str"));
    GridDataFactory.swtDefaults().align(SWT.CENTER,SWT.CENTER).applyTo(copyToOutput);
    copyToOutput.addListener(SWT.Selection,new Listener(){
      public void handleEvent(      Event event){
        MessageBox messageBox=new MessageBox(parent.getShell(),SWT.APPLICATION_MODAL | SWT.OK | SWT.CANCEL);
        messageBox.setText(Messages.getString("String_Node_Str"));
        messageBox.setMessage(Messages.getString("String_Node_Str"));
        if (messageBox.open() == SWT.OK) {
          MetadataTool.copyTable(getInputMetaData(),getOutputMetaData());
          outputMetaView.getTableViewerCreator().refresh();
        }
      }
    }
);
    Label lable1=new Label(buttonComposite2,SWT.NONE);
    GridDataFactory.swtDefaults().align(SWT.CENTER,SWT.CENTER).applyTo(lable1);
    Label lable2=new Label(buttonComposite2,SWT.NONE);
    GridDataFactory.swtDefaults().align(SWT.CENTER,SWT.CENTER).applyTo(lable2);
    Label lable3=new Label(buttonComposite2,SWT.NONE);
    GridDataFactory.swtDefaults().align(SWT.CENTER,SWT.CENTER).applyTo(lable3);
    Button copySelectionToInput=new Button(buttonComposite2,SWT.NONE);
    copySelectionToInput.setImage(ImageProvider.getImage(EImage.LEFT_ICON));
    copySelectionToInput.setToolTipText(Messages.getString("String_Node_Str"));
    gridData.verticalAlignment=GridData.CENTER;
    copySelectionToInput.setLayoutData(gridData);
    copySelectionToInput.addListener(SWT.Selection,new Listener(){
      public void handleEvent(      Event event){
        tableItem=outputMetaView.getTable().getSelection();
        list=new ArrayList<IMetadataColumn>();
        for (        TableItem element : tableItem) {
          column=(IMetadataColumn)element.getData();
          list.add(column);
        }
        if (tableItem.length > 0) {
          MetadataTool.copyTable(list,getInputMetaData());
          inputMetaView.getTableViewerCreator().refresh();
        }
      }
    }
);
    Button copyToInput=new Button(buttonComposite2,SWT.NONE);
    copyToInput.setImage(ImageProvider.getImage(EImage.LEFTX_ICON));
    copyToInput.setToolTipText(Messages.getString("String_Node_Str"));
    gridData.verticalAlignment=GridData.CENTER;
    copyToInput.setLayoutData(gridData);
    copyToInput.addListener(SWT.Selection,new Listener(){
      public void handleEvent(      Event event){
        MessageBox messageBox=new MessageBox(parent.getShell(),SWT.APPLICATION_MODAL | SWT.OK | SWT.CANCEL);
        messageBox.setText(Messages.getString("String_Node_Str"));
        messageBox.setMessage(Messages.getString("String_Node_Str"));
        if (messageBox.open() == SWT.OK) {
          MetadataTool.copyTable(getOutputMetaData(),getInputMetaData());
          inputMetaView.getTableViewerCreator().refresh();
        }
      }
    }
);
    if (inputReadOnly || inputMetaTable.isReadOnly()) {
      copyToInput.setEnabled(false);
      copySelectionToInput.setEnabled(false);
    }
    outputMetaView=new DialogMetadataTableEditorView(compositesSachForm.getRightComposite(),SWT.NONE,new MetadataTableEditor(outputMetaTable,titleOutput + "String_Node_Str"),outputReadOnly,true,true,false);
    initializeMetadataTableView(outputMetaView,outputNode,outputMetaTable);
    outputMetaView.initGraphicComponents();
    outputMetaView.getExtendedTableViewer().setCommandStack(commandStack);
    outputMetaView.setGridDataSize(size.x / 2 - 50,size.y - 150);
    outputMetaView.getMetadataTableEditor().addModifiedBeanListener(new IModifiedBeanListener<IMetadataColumn>(){
      public void handleEvent(      ModifiedBeanEvent<IMetadataColumn> event){
        if (AbstractMetadataTableEditorView.ID_COLUMN_NAME.equals(event.column.getId())) {
          IMetadataColumn modifiedObject=event.bean;
          if (modifiedObject != null) {
            String originalLabel=changeNameOutColumns.get(modifiedObject);
            if (originalLabel == null) {
              changeNameOutColumns.put(modifiedObject.getLabel(),(String)event.previousValue);
            }
          }
        }
      }
    }
);
    if (outputReadOnly || outputMetaTable.isReadOnly()) {
      copyToOutput.setEnabled(false);
      copySelectionToOutput.setEnabled(false);
    }
    compositesSachForm.setGridDatas();
    CustomTableManager.addCustomManagementToTable(inputMetaView,inputReadOnly);
    CustomTableManager.addCustomManagementToToolBar(inputMetaView,inputMetaTable,inputReadOnly,outputMetaView,outputMetaTable,outputNode.getComponent().isSchemaAutoPropagated());
  }
  CustomTableManager.addCustomManagementToTable(outputMetaView,outputReadOnly);
  CustomTableManager.addCustomManagementToToolBar(outputMetaView,outputMetaTable,outputReadOnly,inputMetaView,inputMetaTable,false);
  metadataTableEditor.addModifiedBeanListener(new IModifiedBeanListener<IMetadataColumn>(){
    public void handleEvent(    ModifiedBeanEvent<IMetadataColumn> event){
      if ((inputMetaTable != null) && outputMetaTable.isReadOnly() && outputNode.getComponent().isSchemaAutoPropagated()) {
        MetadataTool.copyTable(inputMetaTable,outputMetaTable);
        outputMetaView.getTableViewerCreator().refresh();
      }
      if (AbstractMetadataTableEditorView.ID_COLUMN_NAME.equals(event.column.getId())) {
        IMetadataColumn modifiedObject=event.bean;
        if (modifiedObject != null) {
          String originalLabel=changedNameColumns.get(modifiedObject);
          if (originalLabel == null) {
            changedNameColumns.put(modifiedObject,(String)event.previousValue);
            changeNameInColumns.put(modifiedObject.getLabel(),(String)event.previousValue);
          }
        }
      }
    }
  }
);
  return composite;
}