Program: 117995
Project: 117995
Buggy source:
/** 
 * DOC hcw Comment method "createContents".
 * @param composite
 */
@Override Control createScdContents(Composite parent){
  SashForm sashForm=new SashForm(parent,SWT.VERTICAL | SWT.SMOOTH);
  GridDataFactory.fillDefaults().grab(true,true).applyTo(sashForm);
  sashForm.setLayout(new GridLayout(1,true));
  sashForm.SASH_WIDTH=1;
  Composite sashPart1=new Composite(sashForm,SWT.NONE);
  GridLayoutFactory.swtDefaults().numColumns(2).equalWidth(true).spacing(20,10).applyTo(sashPart1);
  GridDataFactory.fillDefaults().align(SWT.FILL,SWT.FILL).grab(true,true).applyTo(sashPart1);
  Composite filterUnusedComposite=new Composite(sashPart1,SWT.NONE);
  GridLayoutFactory.swtDefaults().margins(0,0).spacing(0,0).applyTo(filterUnusedComposite);
  GridDataFactory.fillDefaults().span(1,2).grab(true,true).applyTo(filterUnusedComposite);
  ViewerFilter filter=createFilter(filterUnusedComposite);
  unusedFields=new FieldSection(filterUnusedComposite,scdManager,false,false);
  unusedFields.setTitle(Messages.getString("String_Node_Str"),SWTResourceManager.getColor(198,195,198));
  unusedFields.setTableInput(scdManager.getUnusedFields());
  unusedFields.getTableViewer().addFilter(filter);
  unusedFields.setSortable(true);
  GridDataFactory.swtDefaults().grab(true,true).align(SWT.FILL,SWT.FILL).applyTo(unusedFields.getControl());
  addContextHelp(unusedFields.getTableViewer().getTable(),"String_Node_Str");
  type0Fields=new FieldSection(sashPart1,scdManager,false,false);
  type0Fields.setTitle(Messages.getString("String_Node_Str"),SWTResourceManager.getColor(255,146,0));
  GridDataFactory.swtDefaults().align(SWT.FILL,SWT.FILL).grab(true,true).applyTo(type0Fields.getControl());
  type0Fields.setTableInput(scdManager.getType0Table());
  addContextHelp(type0Fields.getTableViewer().getTable(),"String_Node_Str");
  type1Fields=new FieldSection(sashPart1,scdManager,false,false,ScdParameterConstants.DROP_COPY_TYPE1FIELDS);
  type1Fields.setTitle(Messages.getString("String_Node_Str"),SWTResourceManager.getColor(255,203,0));
  GridDataFactory.swtDefaults().align(SWT.FILL,SWT.FILL).grab(true,true).applyTo(type1Fields.getControl());
  type1Fields.setTableInput(scdManager.getType1Table());
  addContextHelp(type1Fields.getTableViewer().getTable(),"String_Node_Str");
  Composite sashPart2=new Composite(sashForm,SWT.NONE);
  GridLayoutFactory.swtDefaults().numColumns(2).equalWidth(true).spacing(20,10).applyTo(sashPart2);
  GridDataFactory.fillDefaults().align(SWT.FILL,SWT.FILL).grab(true,true).applyTo(sashPart2);
  sourceKeys=new FieldSection(sashPart2,scdManager,false,false,ScdParameterConstants.DROP_COPY_SOURCEKEYS);
  sourceKeys.setTitle(Messages.getString("String_Node_Str"),SWTResourceManager.getColor(156,0,255));
  GridDataFactory.swtDefaults().align(SWT.FILL,SWT.FILL).grab(true,true).applyTo(sourceKeys.getControl());
  sourceKeys.setTableInput(scdManager.getSourceKeys());
  addContextHelp(sourceKeys.getTableViewer().getTable(),"String_Node_Str");
  type2Fields=new Type2Section(sashPart2,scdManager,ScdParameterConstants.DROP_COPY_TYPE2FIELDS);
  type2Fields.setTitle(Messages.getString("String_Node_Str"),SWTResourceManager.getColor(255,255,0));
  GridDataFactory.swtDefaults().span(1,2).align(SWT.FILL,SWT.FILL).grab(true,true).applyTo(type2Fields.getControl());
  type2Fields.setTableInput(scdManager.getType2Table());
  if (scdManager.getVersionData() != null) {
    type2Fields.setVersionInput(scdManager.getVersionData());
  }
 else {
    type2Fields.setVersionInput(new Versioning());
  }
  addContextHelp(type2Fields.getTableViewer().getTable(),"String_Node_Str");
  surrogateKeys=new SurrogateSection(sashPart2,scdManager);
  surrogateKeys.setTitle(Messages.getString("String_Node_Str"),SWTResourceManager.getColor(214,40,255));
  GridDataFactory.swtDefaults().align(SWT.FILL,SWT.FILL).grab(true,false).applyTo(surrogateKeys.getControl());
  surrogateKeys.setTableInput(scdManager.getSurrogateKeys());
  surrogateKeys.addContextHelp(this);
  Composite sashPart3=new Composite(sashForm,SWT.NONE);
  GridLayoutFactory.swtDefaults().numColumns(2).equalWidth(true).spacing(20,10).applyTo(sashPart3);
  GridDataFactory.fillDefaults().align(SWT.FILL,SWT.FILL).grab(true,true).applyTo(sashPart3);
  Label placeHolder=new Label(sashPart3,SWT.NONE);
  GridDataFactory.swtDefaults().align(SWT.FILL,SWT.FILL).grab(true,true).applyTo(placeHolder);
  type3Fields=new Type3Section(sashPart3,scdManager);
  type3Fields.setTitle(Messages.getString("String_Node_Str"),SWTResourceManager.getColor(24,182,255));
  GridDataFactory.swtDefaults().align(SWT.FILL,SWT.FILL).grab(true,true).applyTo(type3Fields.getControl());
  type3Fields.setTableInput(scdManager.getType3Table());
  addContextHelp(type3Fields.getTable(),"String_Node_Str");
  scdManager.setUnusedFieldsSource(unusedFields);
  ScdSection[] sections={surrogateKeys,sourceKeys,type0Fields,type1Fields,type2Fields,type3Fields};
  for (  ScdSection scd : sections) {
    scdManager.addUnusedFieldsTarget(scd);
  }
  sashForm.setSashWidth(3);
  int totalHeight=getDialogSize().y;
  sashForm.setWeights(new int[]{totalHeight / 4,totalHeight / 2,totalHeight / 4});
  return sashForm;
}

Fixed version (ground truth):
/** 
 * DOC hcw Comment method "createContents".
 * @param composite
 */
@Override Control createScdContents(Composite parent){
  SashForm sashForm=new SashForm(parent,SWT.VERTICAL | SWT.SMOOTH);
  GridDataFactory.fillDefaults().grab(true,true).applyTo(sashForm);
  sashForm.setLayout(new GridLayout(1,true));
  sashForm.SASH_WIDTH=1;
  Composite sashPart1=new Composite(sashForm,SWT.NONE);
  GridLayoutFactory.swtDefaults().numColumns(2).equalWidth(true).spacing(20,10).applyTo(sashPart1);
  GridDataFactory.fillDefaults().align(SWT.FILL,SWT.FILL).grab(true,true).applyTo(sashPart1);
  Composite filterUnusedComposite=new Composite(sashPart1,SWT.NONE);
  GridLayoutFactory.swtDefaults().margins(0,0).spacing(0,0).applyTo(filterUnusedComposite);
  GridDataFactory.fillDefaults().span(1,2).grab(true,true).applyTo(filterUnusedComposite);
  ViewerFilter filter=createFilter(filterUnusedComposite);
  unusedFields=new FieldSection(filterUnusedComposite,scdManager,false,false);
  unusedFields.setTitle(Messages.getString("String_Node_Str"),SWTResourceManager.getColor(198,195,198));
  unusedFields.setTableInput(scdManager.getUnusedFields());
  unusedFields.getTableViewer().addFilter(filter);
  unusedFields.setSortable(true);
  GridDataFactory.swtDefaults().grab(true,true).align(SWT.FILL,SWT.FILL).applyTo(unusedFields.getControl());
  addContextHelp(unusedFields.getTableViewer().getTable(),"String_Node_Str");
  type0Fields=new FieldSection(sashPart1,scdManager,false,false);
  type0Fields.setTitle(Messages.getString("String_Node_Str"),SWTResourceManager.getColor(255,146,0));
  GridDataFactory.swtDefaults().align(SWT.FILL,SWT.FILL).grab(true,true).applyTo(type0Fields.getControl());
  GridData fieldsData=new GridData(GridData.FILL_BOTH);
  fieldsData.heightHint=100;
  type0Fields.getControl().setLayoutData(fieldsData);
  type0Fields.setTableInput(scdManager.getType0Table());
  addContextHelp(type0Fields.getTableViewer().getTable(),"String_Node_Str");
  type1Fields=new FieldSection(sashPart1,scdManager,false,false,ScdParameterConstants.DROP_COPY_TYPE1FIELDS);
  type1Fields.setTitle(Messages.getString("String_Node_Str"),SWTResourceManager.getColor(255,203,0));
  GridDataFactory.swtDefaults().align(SWT.FILL,SWT.FILL).grab(true,true).applyTo(type1Fields.getControl());
  type1Fields.getControl().setLayoutData(fieldsData);
  type1Fields.setTableInput(scdManager.getType1Table());
  addContextHelp(type1Fields.getTableViewer().getTable(),"String_Node_Str");
  Composite sashPart2=new Composite(sashForm,SWT.NONE);
  GridLayoutFactory.swtDefaults().numColumns(2).equalWidth(true).spacing(20,10).applyTo(sashPart2);
  GridDataFactory.fillDefaults().align(SWT.FILL,SWT.FILL).grab(true,true).applyTo(sashPart2);
  sourceKeys=new FieldSection(sashPart2,scdManager,false,false,ScdParameterConstants.DROP_COPY_SOURCEKEYS);
  sourceKeys.setTitle(Messages.getString("String_Node_Str"),SWTResourceManager.getColor(156,0,255));
  GridDataFactory.swtDefaults().align(SWT.FILL,SWT.FILL).grab(true,true).applyTo(sourceKeys.getControl());
  sourceKeys.setTableInput(scdManager.getSourceKeys());
  addContextHelp(sourceKeys.getTableViewer().getTable(),"String_Node_Str");
  type2Fields=new Type2Section(sashPart2,scdManager,ScdParameterConstants.DROP_COPY_TYPE2FIELDS);
  type2Fields.setTitle(Messages.getString("String_Node_Str"),SWTResourceManager.getColor(255,255,0));
  GridDataFactory.swtDefaults().span(1,2).align(SWT.FILL,SWT.FILL).grab(true,true).applyTo(type2Fields.getControl());
  type2Fields.setTableInput(scdManager.getType2Table());
  if (scdManager.getVersionData() != null) {
    type2Fields.setVersionInput(scdManager.getVersionData());
  }
 else {
    type2Fields.setVersionInput(new Versioning());
  }
  addContextHelp(type2Fields.getTableViewer().getTable(),"String_Node_Str");
  surrogateKeys=new SurrogateSection(sashPart2,scdManager);
  surrogateKeys.setTitle(Messages.getString("String_Node_Str"),SWTResourceManager.getColor(214,40,255));
  GridDataFactory.swtDefaults().align(SWT.FILL,SWT.FILL).grab(true,false).applyTo(surrogateKeys.getControl());
  surrogateKeys.setTableInput(scdManager.getSurrogateKeys());
  surrogateKeys.addContextHelp(this);
  Composite sashPart3=new Composite(sashForm,SWT.NONE);
  GridLayoutFactory.swtDefaults().numColumns(2).equalWidth(true).spacing(20,10).applyTo(sashPart3);
  GridDataFactory.fillDefaults().align(SWT.FILL,SWT.FILL).grab(true,true).applyTo(sashPart3);
  Label placeHolder=new Label(sashPart3,SWT.NONE);
  GridDataFactory.swtDefaults().align(SWT.FILL,SWT.FILL).grab(true,true).applyTo(placeHolder);
  type3Fields=new Type3Section(sashPart3,scdManager);
  type3Fields.setTitle(Messages.getString("String_Node_Str"),SWTResourceManager.getColor(24,182,255));
  GridDataFactory.swtDefaults().align(SWT.FILL,SWT.FILL).grab(true,true).applyTo(type3Fields.getControl());
  type3Fields.setTableInput(scdManager.getType3Table());
  addContextHelp(type3Fields.getTable(),"String_Node_Str");
  scdManager.setUnusedFieldsSource(unusedFields);
  ScdSection[] sections={surrogateKeys,sourceKeys,type0Fields,type1Fields,type2Fields,type3Fields};
  for (  ScdSection scd : sections) {
    scdManager.addUnusedFieldsTarget(scd);
  }
  sashForm.setSashWidth(3);
  int totalHeight=getDialogSize().y;
  sashForm.setWeights(new int[]{totalHeight / 4,totalHeight / 2,totalHeight / 4});
  return sashForm;
}