Program: 127845
Project: 127845
Buggy source:
@Override protected Control createDialogArea(final Composite parent){
  Composite composite=(Composite)super.createDialogArea(parent);
  boolean showTalendTypeColumnForInput=!(inputFamily != null && inputFamily.startsWith(ELT_LABEL));
  boolean showTalendTypeColumnForOutput=!outputFamily.startsWith(ELT_LABEL);
  if (inputMetaTable == null) {
    composite.setLayout(new FillLayout());
    metadataTableEditor=new MetadataTableEditor(outputMetaTable,titleOutput,true);
    outputMetaView=new MetadataTableEditorView(composite,SWT.NONE,metadataTableEditor,outputReadOnly,true,true,false);
    outputMetaView.setIsRepository(isRepository(outputNode));
    MetadataDialog.initializeMetadataTableView(outputMetaView,outputNode,outputMetaTable);
    outputMetaView.setShowTalendTypeColumn(showTalendTypeColumnForOutput);
    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);
    final CTabFolder folderInput=new CTabFolder(compositesSachForm.getLeftComposite(),SWT.BORDER);
    folderInput.setLayoutData(new GridData(GridData.FILL_BOTH));
    folderInput.setSimple(false);
    folderInput.setUnselectedImageVisible(false);
    folderInput.setUnselectedCloseVisible(false);
    Set<INode> inputNodeskey=inputInfos.keySet();
    INode mainNode=null;
    for (    INode inputNode : inputNodeskey) {
      List<? extends IConnection> outgoingConnections=inputNode.getOutgoingConnections();
      if (outgoingConnections.size() > 0) {
        EConnectionType lineStyle=outgoingConnections.get(0).getLineStyle();
        if (lineStyle.equals(EConnectionType.FLOW_MAIN)) {
          mainNode=inputNode;
          createTabItem(inputNode,folderInput,showTalendTypeColumnForInput);
        }
      }
    }
    for (    INode inputNode : inputNodeskey) {
      if (inputNode != mainNode) {
        createTabItem(inputNode,folderInput,showTalendTypeColumnForInput);
      }
    }
    folderInput.addSelectionListener(new SelectionListener(){
      public void widgetDefaultSelected(      SelectionEvent e){
      }
      public void widgetSelected(      SelectionEvent e){
        CTabFolder source=(CTabFolder)e.getSource();
        CTabItem tabItem=source.getSelection();
        inputNode=(INode)tabItem.getData(INPUTNODE_KEY);
        inputMetaTable=(IMetadataTable)tabItem.getData(INPUTMETATABLE_KEY);
        inputMetaView=(MetadataTableEditorView)tabItem.getData(INPUTMETAVIEW_KEY);
        inputFamily=inputNode.getComponent().getOriginalFamilyName();
        inputReadOnly=(Boolean)tabItem.getData(INPUTREADONLY_KEY);
        if (inputReadOnly || inputMetaTable.isReadOnly()) {
          copyToInput.setEnabled(false);
          copySelectionToInput.setEnabled(false);
        }
 else {
          copyToInput.setEnabled(true);
          copySelectionToInput.setEnabled(true);
        }
      }
    }
);
    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,0).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) {
          MetadataToolHelper.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) {
          MetadataToolHelper.copyTable(getInputMetaData(),getOutputMetaData());
          outputMetaView.getTableViewerCreator().getTableViewer().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);
    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) {
          MetadataToolHelper.copyTable(list,getInputMetaData());
          inputMetaView.getTableViewerCreator().refresh();
        }
      }
    }
);
    copyToInput=new Button(buttonComposite2,SWT.NONE);
    copyToInput.setImage(ImageProvider.getImage(EImage.LEFTX_ICON));
    copyToInput.setToolTipText(Messages.getString("String_Node_Str"));
    gridData=new GridData();
    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(),getInputMetaData());
          inputMetaView.getTableViewerCreator().getTableViewer().refresh();
        }
      }
    }
);
    if (inputReadOnly || inputMetaTable.isReadOnly()) {
      copyToInput.setEnabled(false);
      copySelectionToInput.setEnabled(false);
    }
    final CTabFolder folderOutput=new CTabFolder(compositesSachForm.getRightComposite(),SWT.BORDER);
    folderOutput.setLayoutData(new GridData(GridData.FILL_BOTH));
    folderOutput.setSimple(false);
    folderOutput.setUnselectedImageVisible(false);
    folderOutput.setUnselectedCloseVisible(false);
    CTabItem item=new CTabItem(folderOutput,SWT.NONE);
    item.setText(titleOutput);
    Composite compositeRight=new Composite(folderOutput,SWT.NONE);
    compositeRight.setLayoutData(new GridData(GridData.FILL_BOTH));
    compositeRight.setLayout(new GridLayout());
    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 MetadataTableEditorView(compositeRight,SWT.NONE,metadataTableEditorForOutput,outputReadOnly,true,false,false);
    outputMetaView.setIsRepository(isRepository(outputNode));
    MetadataDialog.initializeMetadataTableView(outputMetaView,outputNode,outputMetaTable);
    outputMetaView.setShowTalendTypeColumn(showTalendTypeColumnForOutput);
    outputMetaView.initGraphicComponents();
    outputMetaView.getExtendedTableViewer().setCommandStack(commandStack);
    outputMetaView.setGridDataSize(size.x / 2 - 50,size.y - 150);
    item.setControl(compositeRight);
    folderOutput.setSelection(item);
    if (outputReadOnly || outputMetaTable.isReadOnly()) {
      copyToOutput.setEnabled(false);
      copySelectionToOutput.setEnabled(false);
    }
    compositesSachForm.setGridDatas();
  }
  CustomTableManager.addCustomManagementToTable(outputMetaView,outputReadOnly);
  CustomTableManager.addCustomManagementToToolBar(outputMetaView,outputMetaTable,outputReadOnly,null,null,false);
  metadataTableEditor.addModifiedBeanListener(new IModifiedBeanListener<IMetadataColumn>(){
    public void handleEvent(    ModifiedBeanEvent<IMetadataColumn> event){
      if (outputMetaTable.isReadOnly() && outputNode.getComponent().isSchemaAutoPropagated()) {
        MetadataToolHelper.copyTable(inputMetaTable,outputMetaTable);
        outputMetaView.getTableViewerCreator().getTableViewer().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);
          }
        }
      }
    }
  }
);
  return composite;
}

Fixed version (ground truth):
@Override protected Control createDialogArea(final Composite parent){
  Composite composite=(Composite)super.createDialogArea(parent);
  boolean showTalendTypeColumnForInput=!(inputFamily != null && inputFamily.startsWith(ELT_LABEL));
  boolean showTalendTypeColumnForOutput=!outputFamily.startsWith(ELT_LABEL);
  if (inputMetaTable == null) {
    composite.setLayout(new FillLayout());
    metadataTableEditor=new MetadataTableEditor(outputMetaTable,titleOutput,true);
    outputMetaView=new MetadataTableEditorView(composite,SWT.NONE,metadataTableEditor,outputReadOnly,true,true,false);
    outputMetaView.setIsRepository(isRepository(outputNode));
    MetadataDialog.initializeMetadataTableView(outputMetaView,outputNode,outputMetaTable);
    outputMetaView.setShowTalendTypeColumn(showTalendTypeColumnForOutput);
    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);
    final CTabFolder folderInput=new CTabFolder(compositesSachForm.getLeftComposite(),SWT.BORDER);
    folderInput.setLayoutData(new GridData(GridData.FILL_BOTH));
    folderInput.setSimple(false);
    folderInput.setUnselectedImageVisible(false);
    folderInput.setUnselectedCloseVisible(false);
    Set<INode> inputNodeskey=inputInfos.keySet();
    INode mainNode=null;
    for (    INode inputNode : inputNodeskey) {
      List<? extends IConnection> outgoingConnections=inputNode.getOutgoingConnections();
      if (outgoingConnections.size() > 0) {
        EConnectionType lineStyle=outgoingConnections.get(0).getLineStyle();
        if (lineStyle.equals(EConnectionType.FLOW_MAIN)) {
          mainNode=inputNode;
          createTabItem(inputNode,folderInput,showTalendTypeColumnForInput);
        }
      }
    }
    for (    INode inputNode : inputNodeskey) {
      if (inputNode != mainNode) {
        createTabItem(inputNode,folderInput,showTalendTypeColumnForInput);
      }
    }
    folderInput.addSelectionListener(new SelectionListener(){
      @Override public void widgetDefaultSelected(      SelectionEvent e){
      }
      @Override public void widgetSelected(      SelectionEvent e){
        CTabFolder source=(CTabFolder)e.getSource();
        CTabItem tabItem=source.getSelection();
        inputNode=(INode)tabItem.getData(INPUTNODE_KEY);
        inputMetaTable=(IMetadataTable)tabItem.getData(INPUTMETATABLE_KEY);
        inputMetaView=(MetadataTableEditorView)tabItem.getData(INPUTMETAVIEW_KEY);
        inputFamily=inputNode.getComponent().getOriginalFamilyName();
        inputReadOnly=(Boolean)tabItem.getData(INPUTREADONLY_KEY);
        if (inputReadOnly || inputMetaTable.isReadOnly()) {
          copyToInput.setEnabled(false);
          copySelectionToInput.setEnabled(false);
        }
 else {
          copyToInput.setEnabled(true);
          copySelectionToInput.setEnabled(true);
        }
      }
    }
);
    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,0).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(){
      @Override 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) {
          MetadataToolHelper.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(){
      @Override 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(),getOutputMetaData(),true);
          outputMetaView.getTableViewerCreator().getTableViewer().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);
    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(){
      @Override 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) {
          MetadataToolHelper.copyTable(list,getInputMetaData());
          inputMetaView.getTableViewerCreator().refresh();
        }
      }
    }
);
    copyToInput=new Button(buttonComposite2,SWT.NONE);
    copyToInput.setImage(ImageProvider.getImage(EImage.LEFTX_ICON));
    copyToInput.setToolTipText(Messages.getString("String_Node_Str"));
    gridData=new GridData();
    gridData.verticalAlignment=GridData.CENTER;
    copyToInput.setLayoutData(gridData);
    copyToInput.addListener(SWT.Selection,new Listener(){
      @Override 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(),getInputMetaData());
          inputMetaView.getTableViewerCreator().getTableViewer().refresh();
        }
      }
    }
);
    if (inputReadOnly || inputMetaTable.isReadOnly()) {
      copyToInput.setEnabled(false);
      copySelectionToInput.setEnabled(false);
    }
    final CTabFolder folderOutput=new CTabFolder(compositesSachForm.getRightComposite(),SWT.BORDER);
    folderOutput.setLayoutData(new GridData(GridData.FILL_BOTH));
    folderOutput.setSimple(false);
    folderOutput.setUnselectedImageVisible(false);
    folderOutput.setUnselectedCloseVisible(false);
    CTabItem item=new CTabItem(folderOutput,SWT.NONE);
    item.setText(titleOutput);
    Composite compositeRight=new Composite(folderOutput,SWT.NONE);
    compositeRight.setLayoutData(new GridData(GridData.FILL_BOTH));
    compositeRight.setLayout(new GridLayout());
    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 MetadataTableEditorView(compositeRight,SWT.NONE,metadataTableEditorForOutput,outputReadOnly,true,false,false);
    outputMetaView.setIsRepository(isRepository(outputNode));
    MetadataDialog.initializeMetadataTableView(outputMetaView,outputNode,outputMetaTable);
    outputMetaView.setShowTalendTypeColumn(showTalendTypeColumnForOutput);
    outputMetaView.initGraphicComponents();
    outputMetaView.getExtendedTableViewer().setCommandStack(commandStack);
    outputMetaView.setGridDataSize(size.x / 2 - 50,size.y - 150);
    item.setControl(compositeRight);
    folderOutput.setSelection(item);
    if (outputReadOnly || outputMetaTable.isReadOnly()) {
      copyToOutput.setEnabled(false);
      copySelectionToOutput.setEnabled(false);
    }
    compositesSachForm.setGridDatas();
  }
  CustomTableManager.addCustomManagementToTable(outputMetaView,outputReadOnly);
  CustomTableManager.addCustomManagementToToolBar(outputMetaView,outputMetaTable,outputReadOnly,null,null,false);
  metadataTableEditor.addModifiedBeanListener(new IModifiedBeanListener<IMetadataColumn>(){
    @Override public void handleEvent(    ModifiedBeanEvent<IMetadataColumn> event){
      if (outputMetaTable.isReadOnly() && outputNode.getComponent().isSchemaAutoPropagated()) {
        MetadataToolHelper.copyTable(inputMetaTable,outputMetaTable);
        outputMetaView.getTableViewerCreator().getTableViewer().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);
          }
        }
      }
    }
  }
);
  return composite;
}