Program: 128023
Project: 128023
Buggy source:
@Override protected Control createDialogArea(final Composite parent){
  Composite composite=(Composite)super.createDialogArea(parent);
  MetadataTableEditor metadataTableEditor;
  if (inputMetaTable == null) {
    composite.setLayout(new FillLayout());
    if (isRepository(outputNode)) {
      metadataTableEditor=new MetadataTableEditor(outputMetaTable,titleOutput,true);
    }
 else {
      metadataTableEditor=new MetadataTableEditor(outputMetaTable,titleOutput);
    }
    outputMetaView=new DialogMetadataTableEditorView(composite,SWT.NONE,metadataTableEditor,outputReadOnly,true,true,false);
    if (outputNode != null && outputNode.getComponent() != null && outputNode.getComponent().getPaletteType() != null && outputNode.getComponent().getPaletteType().equals("String_Node_Str")) {
      outputMetaView.setMapreduce(true);
    }
    outputMetaView.setIsRepository(isRepository(outputNode));
    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);
    if (inputNode != null && inputNode.getComponent() != null && inputNode.getComponent().getPaletteType() != null && inputNode.getComponent().getPaletteType().equals("String_Node_Str")) {
      inputMetaView.setMapreduce(true);
    }
    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 list=new ArrayList<IMetadataColumn>();
        for (        TableItem element : tableItem) {
          column=(IMetadataColumn)element.getData();
          list.add(column);
        }
        if (tableItem.length > 0) {
          MetadataToolHelper.copyTable(list,getOutputMetaData(),outputMetaView.getMetadataTableEditor().getMetadataColumnList());
          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) {
          MetadataToolHelper.copyTable(getInputMetaData().getListColumns(),getOutputMetaData(),outputMetaView.getMetadataTableEditor().getMetadataColumnList());
          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 list=new ArrayList<IMetadataColumn>();
        for (        TableItem element : tableItem) {
          column=(IMetadataColumn)element.getData();
          list.add(column);
        }
        if (tableItem.length > 0) {
          MetadataToolHelper.copyTable(list,getInputMetaData(),inputMetaView.getMetadataTableEditor().getMetadataColumnList());
          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) {
          List<IMetadataColumn> temp=new ArrayList<IMetadataColumn>();
          for (          IMetadataColumn column : list) {
            if (column.isUsefulColumn()) {
              temp.add(column);
            }
          }
          if (temp.size() == 0) {
            temp=getOutputMetaData().getListColumns();
          }
          MetadataToolHelper.copyTable(temp,getInputMetaData(),inputMetaView.getMetadataTableEditor().getMetadataColumnList());
          inputMetaView.getTableViewerCreator().refresh();
        }
      }
    }
);
    if (inputReadOnly || inputMetaTable.isReadOnly()) {
      copyToInput.setEnabled(false);
      copySelectionToInput.setEnabled(false);
    }
    MetadataTableEditor metadataTableEditorForOutput;
    if (isRepository(outputNode)) {
      metadataTableEditorForOutput=new MetadataTableEditor(outputMetaTable,titleOutput + "String_Node_Str",true);
    }
 else {
      metadataTableEditorForOutput=new MetadataTableEditor(outputMetaTable,titleOutput + "String_Node_Str");
    }
    outputMetaView=new DialogMetadataTableEditorView(compositesSachForm.getRightComposite(),SWT.NONE,metadataTableEditorForOutput,outputReadOnly,true,true,false);
    outputMetaView.setIsRepository(isRepository(outputNode));
    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()) {
        MetadataToolHelper.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);
          }
        }
      }
      if (AbstractMetadataTableEditorView.ID_COLUMN_USEFUL.equals(event.column.getId())) {
        isUsefulChange=true;
      }
    }
  }
);
  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());
    if (isRepository(outputNode)) {
      metadataTableEditor=new MetadataTableEditor(outputMetaTable,titleOutput,true);
    }
 else {
      metadataTableEditor=new MetadataTableEditor(outputMetaTable,titleOutput);
    }
    outputMetaView=new DialogMetadataTableEditorView(composite,SWT.NONE,metadataTableEditor,outputReadOnly,true,true,false);
    if (outputNode != null && outputNode.getComponent() != null && outputNode.getComponent().getPaletteType() != null && outputNode.getComponent().getPaletteType().equals("String_Node_Str")) {
      outputMetaView.setMapreduce(true);
    }
    outputMetaView.setIsRepository(isRepository(outputNode));
    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);
    if (inputNode != null && inputNode.getComponent() != null && inputNode.getComponent().getPaletteType() != null && inputNode.getComponent().getPaletteType().equals("String_Node_Str")) {
      inputMetaView.setMapreduce(true);
    }
    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 list=new ArrayList<IMetadataColumn>();
        for (        TableItem element : tableItem) {
          column=(IMetadataColumn)element.getData();
          list.add(column);
        }
        if (tableItem.length > 0) {
          MetadataToolHelper.copyTable(list,getOutputMetaData(),outputMetaView.getMetadataTableEditor().getMetadataColumnList());
          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) {
          MetadataToolHelper.copyTable(getInputMetaData().getListColumns(),getOutputMetaData(),outputMetaView.getMetadataTableEditor().getMetadataColumnList());
          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 list=new ArrayList<IMetadataColumn>();
        for (        TableItem element : tableItem) {
          column=(IMetadataColumn)element.getData();
          list.add(column);
        }
        if (tableItem.length > 0) {
          MetadataToolHelper.copyTable(list,getInputMetaData(),inputMetaView.getMetadataTableEditor().getMetadataColumnList());
          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) {
          MetadataToolHelper.copyTable(getOutputMetaData().getListColumns(),getInputMetaData(),inputMetaView.getMetadataTableEditor().getMetadataColumnList());
          inputMetaView.getTableViewerCreator().refresh();
        }
      }
    }
);
    if (inputReadOnly || inputMetaTable.isReadOnly()) {
      copyToInput.setEnabled(false);
      copySelectionToInput.setEnabled(false);
    }
    MetadataTableEditor metadataTableEditorForOutput;
    if (isRepository(outputNode)) {
      metadataTableEditorForOutput=new MetadataTableEditor(outputMetaTable,titleOutput + "String_Node_Str",true);
    }
 else {
      metadataTableEditorForOutput=new MetadataTableEditor(outputMetaTable,titleOutput + "String_Node_Str");
    }
    outputMetaView=new DialogMetadataTableEditorView(compositesSachForm.getRightComposite(),SWT.NONE,metadataTableEditorForOutput,outputReadOnly,true,true,false);
    outputMetaView.setIsRepository(isRepository(outputNode));
    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()) {
        MetadataToolHelper.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);
          }
        }
      }
      if (AbstractMetadataTableEditorView.ID_COLUMN_USEFUL.equals(event.column.getId())) {
        isUsefulChange=true;
      }
    }
  }
);
  return composite;
}