Program: 47763
Project: 47763
Buggy source:
public MappingEditor(Shell shell,Composite parent,ConfigurationProducer producer,int tableViewStyle,boolean allowTableCreate,PropsUI props,TransMeta transMeta){
  super(parent,SWT.NONE);
  m_shell=shell;
  m_parent=parent;
  m_producer=producer;
  m_allowTableCreate=allowTableCreate;
  int middle=props.getMiddlePct();
  int margin=Const.MARGIN;
  FormLayout controlLayout=new FormLayout();
  controlLayout.marginWidth=3;
  controlLayout.marginHeight=3;
  setLayout(controlLayout);
  props.setLook(this);
  Label tableNameLab=new Label(this,SWT.RIGHT);
  tableNameLab.setText(Messages.getString("String_Node_Str"));
  props.setLook(tableNameLab);
  FormData fd=new FormData();
  fd.left=new FormAttachment(0,0);
  fd.top=new FormAttachment(0,margin);
  fd.right=new FormAttachment(middle,-margin);
  tableNameLab.setLayoutData(fd);
  m_existingTableNamesCombo=new CCombo(this,SWT.BORDER);
  props.setLook(m_existingTableNamesCombo);
  fd=new FormData();
  fd.left=new FormAttachment(middle,0);
  fd.top=new FormAttachment(0,margin);
  fd.right=new FormAttachment(100,0);
  m_existingTableNamesCombo.setLayoutData(fd);
  m_existingTableNamesCombo.setEditable(m_allowTableCreate);
  Label mappingNameLab=new Label(this,SWT.RIGHT);
  mappingNameLab.setText(Messages.getString("String_Node_Str"));
  props.setLook(tableNameLab);
  fd=new FormData();
  fd.left=new FormAttachment(0,0);
  fd.top=new FormAttachment(m_existingTableNamesCombo,margin);
  fd.right=new FormAttachment(middle,-margin);
  mappingNameLab.setLayoutData(fd);
  m_existingMappingNamesCombo=new CCombo(this,SWT.BORDER);
  props.setLook(m_existingMappingNamesCombo);
  fd=new FormData();
  fd.left=new FormAttachment(middle,0);
  fd.top=new FormAttachment(m_existingTableNamesCombo,margin);
  fd.right=new FormAttachment(100,0);
  m_existingMappingNamesCombo.setLayoutData(fd);
  m_existingTableNamesCombo.addSelectionListener(new SelectionAdapter(){
    public void widgetSelected(    SelectionEvent e){
      m_familiesInvalidated=true;
      populateMappingComboAndFamilyStuff();
    }
    public void widgetDefaultSelected(    SelectionEvent e){
      m_familiesInvalidated=true;
      populateMappingComboAndFamilyStuff();
    }
  }
);
  m_existingTableNamesCombo.addKeyListener(new KeyAdapter(){
    public void keyPressed(    KeyEvent e){
      m_familiesInvalidated=true;
    }
  }
);
  m_existingTableNamesCombo.addFocusListener(new FocusListener(){
    public void focusGained(    FocusEvent e){
      populateTableCombo();
    }
    public void focusLost(    FocusEvent e){
      m_familiesInvalidated=true;
      populateMappingComboAndFamilyStuff();
    }
  }
);
  m_existingMappingNamesCombo.addSelectionListener(new SelectionAdapter(){
    public void widgetSelected(    SelectionEvent e){
      loadTableViewFromMapping();
    }
    public void widgetDefaultSelected(    SelectionEvent e){
      loadTableViewFromMapping();
    }
  }
);
  ColumnInfo[] colinf=new ColumnInfo[]{new ColumnInfo(Messages.getString("String_Node_Str"),ColumnInfo.COLUMN_TYPE_TEXT,false),new ColumnInfo(Messages.getString("String_Node_Str"),ColumnInfo.COLUMN_TYPE_CCOMBO,true),new ColumnInfo(Messages.getString("String_Node_Str"),ColumnInfo.COLUMN_TYPE_CCOMBO,true),new ColumnInfo(Messages.getString("String_Node_Str"),ColumnInfo.COLUMN_TYPE_TEXT,false),new ColumnInfo(Messages.getString("String_Node_Str"),ColumnInfo.COLUMN_TYPE_CCOMBO,true),new ColumnInfo(Messages.getString("String_Node_Str"),ColumnInfo.COLUMN_TYPE_TEXT,false)};
  m_keyCI=colinf[1];
  m_keyCI.setComboValues(new String[]{"String_Node_Str","String_Node_Str"});
  m_familyCI=colinf[2];
  m_familyCI.setComboValues(new String[]{"String_Node_Str"});
  m_typeCI=colinf[4];
  m_typeCI.setComboValues(new String[]{"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"});
  m_typeCI.setComboValuesSelectionListener(new ComboValuesSelectionListener(){
    public String[] getComboValues(    TableItem tableItem,    int rowNr,    int colNr){
      String[] comboValues=null;
      String keyOrNot=tableItem.getText(2);
      if (Const.isEmpty(keyOrNot) || keyOrNot.equalsIgnoreCase("String_Node_Str")) {
        comboValues=new String[]{"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"};
      }
 else {
        comboValues=new String[]{"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"};
      }
      return comboValues;
    }
  }
);
  m_saveBut=new Button(this,SWT.PUSH | SWT.CENTER);
  props.setLook(m_saveBut);
  m_saveBut.setText("String_Node_Str");
  fd=new FormData();
  fd.left=new FormAttachment(0,margin);
  fd.bottom=new FormAttachment(100,-margin * 2);
  m_saveBut.setLayoutData(fd);
  m_saveBut.addSelectionListener(new SelectionAdapter(){
    public void widgetSelected(    SelectionEvent e){
      saveMapping();
    }
  }
);
  m_fieldsView=new TableView(transMeta,this,tableViewStyle,colinf,1,null,props);
  fd=new FormData();
  fd.top=new FormAttachment(m_existingMappingNamesCombo,margin * 2);
  fd.bottom=new FormAttachment(m_saveBut,-margin * 2);
  fd.left=new FormAttachment(0,0);
  fd.right=new FormAttachment(100,0);
  m_fieldsView.setLayoutData(fd);
}

Fixed version (ground truth):
public MappingEditor(Shell shell,Composite parent,ConfigurationProducer configProducer,FieldProducer fieldProducer,int tableViewStyle,boolean allowTableCreate,PropsUI props,TransMeta transMeta){
  super(parent,SWT.NONE);
  m_shell=shell;
  m_parent=parent;
  m_configProducer=configProducer;
  m_incomingFieldsProducer=fieldProducer;
  m_allowTableCreate=allowTableCreate;
  int middle=props.getMiddlePct();
  int margin=Const.MARGIN;
  FormLayout controlLayout=new FormLayout();
  controlLayout.marginWidth=3;
  controlLayout.marginHeight=3;
  setLayout(controlLayout);
  props.setLook(this);
  Label tableNameLab=new Label(this,SWT.RIGHT);
  tableNameLab.setText(Messages.getString("String_Node_Str"));
  props.setLook(tableNameLab);
  FormData fd=new FormData();
  fd.left=new FormAttachment(0,0);
  fd.top=new FormAttachment(0,margin);
  fd.right=new FormAttachment(middle,-margin);
  tableNameLab.setLayoutData(fd);
  m_existingTableNamesCombo=new CCombo(this,SWT.BORDER);
  props.setLook(m_existingTableNamesCombo);
  fd=new FormData();
  fd.left=new FormAttachment(middle,0);
  fd.top=new FormAttachment(0,margin);
  fd.right=new FormAttachment(100,0);
  m_existingTableNamesCombo.setLayoutData(fd);
  m_existingTableNamesCombo.setEditable(m_allowTableCreate);
  Label mappingNameLab=new Label(this,SWT.RIGHT);
  mappingNameLab.setText(Messages.getString("String_Node_Str"));
  props.setLook(tableNameLab);
  fd=new FormData();
  fd.left=new FormAttachment(0,0);
  fd.top=new FormAttachment(m_existingTableNamesCombo,margin);
  fd.right=new FormAttachment(middle,-margin);
  mappingNameLab.setLayoutData(fd);
  m_existingMappingNamesCombo=new CCombo(this,SWT.BORDER);
  props.setLook(m_existingMappingNamesCombo);
  fd=new FormData();
  fd.left=new FormAttachment(middle,0);
  fd.top=new FormAttachment(m_existingTableNamesCombo,margin);
  fd.right=new FormAttachment(100,0);
  m_existingMappingNamesCombo.setLayoutData(fd);
  m_existingTableNamesCombo.addSelectionListener(new SelectionAdapter(){
    public void widgetSelected(    SelectionEvent e){
      m_familiesInvalidated=true;
      populateMappingComboAndFamilyStuff();
    }
    public void widgetDefaultSelected(    SelectionEvent e){
      m_familiesInvalidated=true;
      populateMappingComboAndFamilyStuff();
    }
  }
);
  m_existingTableNamesCombo.addKeyListener(new KeyAdapter(){
    public void keyPressed(    KeyEvent e){
      m_familiesInvalidated=true;
    }
  }
);
  m_existingTableNamesCombo.addFocusListener(new FocusListener(){
    public void focusGained(    FocusEvent e){
      populateTableCombo(false);
    }
    public void focusLost(    FocusEvent e){
      m_familiesInvalidated=true;
      populateMappingComboAndFamilyStuff();
    }
  }
);
  m_existingMappingNamesCombo.addSelectionListener(new SelectionAdapter(){
    public void widgetSelected(    SelectionEvent e){
      loadTableViewFromMapping();
    }
    public void widgetDefaultSelected(    SelectionEvent e){
      loadTableViewFromMapping();
    }
  }
);
  ColumnInfo[] colinf=new ColumnInfo[]{new ColumnInfo(Messages.getString("String_Node_Str"),ColumnInfo.COLUMN_TYPE_TEXT,false),new ColumnInfo(Messages.getString("String_Node_Str"),ColumnInfo.COLUMN_TYPE_CCOMBO,true),new ColumnInfo(Messages.getString("String_Node_Str"),ColumnInfo.COLUMN_TYPE_CCOMBO,true),new ColumnInfo(Messages.getString("String_Node_Str"),ColumnInfo.COLUMN_TYPE_TEXT,false),new ColumnInfo(Messages.getString("String_Node_Str"),ColumnInfo.COLUMN_TYPE_CCOMBO,true),new ColumnInfo(Messages.getString("String_Node_Str"),ColumnInfo.COLUMN_TYPE_TEXT,false)};
  m_keyCI=colinf[1];
  m_keyCI.setComboValues(new String[]{"String_Node_Str","String_Node_Str"});
  m_familyCI=colinf[2];
  m_familyCI.setComboValues(new String[]{"String_Node_Str"});
  m_typeCI=colinf[4];
  m_typeCI.setComboValues(new String[]{"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"});
  m_keyCI.setComboValuesSelectionListener(new ComboValuesSelectionListener(){
    public String[] getComboValues(    TableItem tableItem,    int rowNr,    int colNr){
      tableItem.setText(5,"String_Node_Str");
      return m_keyCI.getComboValues();
    }
  }
);
  m_typeCI.setComboValuesSelectionListener(new ComboValuesSelectionListener(){
    public String[] getComboValues(    TableItem tableItem,    int rowNr,    int colNr){
      String[] comboValues=null;
      String keyOrNot=tableItem.getText(2);
      if (Const.isEmpty(keyOrNot) || keyOrNot.equalsIgnoreCase("String_Node_Str")) {
        comboValues=new String[]{"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"};
      }
 else {
        comboValues=new String[]{"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"};
      }
      return comboValues;
    }
  }
);
  m_saveBut=new Button(this,SWT.PUSH | SWT.CENTER);
  props.setLook(m_saveBut);
  m_saveBut.setText(Messages.getString("String_Node_Str"));
  fd=new FormData();
  fd.left=new FormAttachment(0,margin);
  fd.bottom=new FormAttachment(100,-margin * 2);
  m_saveBut.setLayoutData(fd);
  m_saveBut.addSelectionListener(new SelectionAdapter(){
    public void widgetSelected(    SelectionEvent e){
      saveMapping();
    }
  }
);
  if (m_allowTableCreate) {
    m_getFieldsBut=new Button(this,SWT.PUSH | SWT.CENTER);
    props.setLook(m_getFieldsBut);
    m_getFieldsBut.setText(Messages.getString("String_Node_Str"));
    fd=new FormData();
    fd.right=new FormAttachment(100,0);
    fd.bottom=new FormAttachment(100,-margin * 2);
    m_getFieldsBut.setLayoutData(fd);
    m_getFieldsBut.addSelectionListener(new SelectionAdapter(){
      public void widgetSelected(      SelectionEvent e){
        populateTableWithIncomingFields();
      }
    }
);
  }
  m_fieldsView=new TableView(transMeta,this,tableViewStyle,colinf,1,null,props);
  fd=new FormData();
  fd.top=new FormAttachment(m_existingMappingNamesCombo,margin * 2);
  fd.bottom=new FormAttachment(m_saveBut,-margin * 2);
  fd.left=new FormAttachment(0,0);
  fd.right=new FormAttachment(100,0);
  m_fieldsView.setLayoutData(fd);
}