Program: 107950
Project: 107950
Buggy source:
/** 
 * Creates a new instance.
 * @param parent
 * @param controller
 */
public LayoutRisks(final Composite parent,final Controller controller){
  centerSash=new SashForm(parent,SWT.VERTICAL);
  centerSash.setLayoutData(SWTUtil.createFillGridData());
  SashForm center=new SashForm(centerSash,SWT.HORIZONTAL | SWT.SMOOTH);
  center.setLayoutData(SWTUtil.createFillGridData());
  centerLeft=new Composite(center,SWT.NONE);
  centerLeft.setLayoutData(SWTUtil.createFillGridData());
  centerLeft.setLayout(new FillLayout());
  centerRight=new Composite(center,SWT.NONE);
  centerRight.setLayoutData(SWTUtil.createFillGridData());
  centerRight.setLayout(new FillLayout());
  layoutTopLeft=new LayoutRisksTop(centerLeft,controller,ModelPart.INPUT,null);
  layoutTopRight=new LayoutRisksTop(centerRight,controller,ModelPart.OUTPUT,ModelPart.INPUT);
  final Composite compositeBottom=new Composite(centerSash,SWT.NONE);
  compositeBottom.setLayout(new FillLayout());
  final SashForm bottomSash=new SashForm(compositeBottom,SWT.HORIZONTAL | SWT.SMOOTH);
  bottomLeft=new Composite(bottomSash,SWT.NONE);
  bottomLeft.setLayout(new FillLayout());
  bottomRight=new Composite(bottomSash,SWT.NONE);
  bottomRight.setLayout(new FillLayout());
  layoutBottomLeft=new LayoutRisksBottom(bottomLeft,controller,ModelPart.INPUT,null);
  layoutBottomRight=new LayoutRisksBottom(bottomRight,controller,ModelPart.OUTPUT,ModelPart.INPUT);
  layoutBottomLeft.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    final SelectionEvent arg0){
      layoutBottomRight.setSelectionIdex(layoutBottomLeft.getSelectionIndex());
      if (layoutBottomLeft.getSelectionIndex() == 4) {
        layoutTopLeft.setSelectionIdex(2);
        layoutTopRight.setSelectionIdex(2);
      }
 else       if (layoutBottomLeft.getSelectionIndex() == 0) {
        layoutTopLeft.setSelectionIdex(3);
        layoutTopRight.setSelectionIdex(3);
      }
      controller.update(new ModelEvent(this,ModelPart.SELECTED_RISK_VISUALIZATION,null));
    }
  }
);
  layoutBottomRight.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    final SelectionEvent arg0){
      layoutBottomLeft.setSelectionIdex(layoutBottomRight.getSelectionIndex());
      if (layoutBottomRight.getSelectionIndex() == 0) {
        layoutTopLeft.setSelectionIdex(3);
        layoutTopRight.setSelectionIdex(3);
      }
      controller.update(new ModelEvent(this,ModelPart.SELECTED_RISK_VISUALIZATION,null));
    }
  }
);
  layoutTopLeft.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    final SelectionEvent arg0){
      layoutTopRight.setSelectionIdex(layoutTopLeft.getSelectionIndex());
      if (layoutTopLeft.getSelectionIndex() == 2) {
        layoutBottomLeft.setSelectionIdex(4);
      }
 else       if (layoutTopLeft.getSelectionIndex() == 3) {
        layoutBottomLeft.setSelectionIdex(0);
        layoutBottomRight.setSelectionIdex(0);
      }
      controller.update(new ModelEvent(this,ModelPart.SELECTED_RISK_VISUALIZATION,null));
    }
  }
);
  layoutTopRight.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    final SelectionEvent arg0){
      layoutTopLeft.setSelectionIdex(layoutTopRight.getSelectionIndex());
      if (layoutTopRight.getSelectionIndex() == 2) {
        layoutBottomLeft.setSelectionIdex(4);
      }
 else       if (layoutTopRight.getSelectionIndex() == 3) {
        layoutBottomLeft.setSelectionIdex(0);
        layoutBottomRight.setSelectionIdex(0);
      }
      controller.update(new ModelEvent(this,ModelPart.SELECTED_RISK_VISUALIZATION,null));
    }
  }
);
  centerSash.setWeights(new int[]{WEIGHT_TOP,WEIGHT_BOTTOM});
  bottomSash.setWeights(new int[]{WEIGHT_LEFT,WEIGHT_RIGHT});
  center.setWeights(new int[]{WEIGHT_LEFT,WEIGHT_RIGHT});
  SWTUtil.fixOSXSashBug(centerSash);
  SWTUtil.fixOSXSashBug(bottomSash);
  SWTUtil.fixOSXSashBug(center);
}

Fixed version (ground truth):
/** 
 * Creates a new instance.
 * @param parent
 * @param controller
 */
public LayoutRisks(final Composite parent,final Controller controller){
  centerSash=new SashForm(parent,SWT.VERTICAL);
  centerSash.setLayoutData(SWTUtil.createFillGridData());
  SashForm center=new SashForm(centerSash,SWT.HORIZONTAL | SWT.SMOOTH);
  center.setLayoutData(SWTUtil.createFillGridData());
  centerLeft=new Composite(center,SWT.NONE);
  centerLeft.setLayoutData(SWTUtil.createFillGridData());
  centerLeft.setLayout(new FillLayout());
  centerRight=new Composite(center,SWT.NONE);
  centerRight.setLayoutData(SWTUtil.createFillGridData());
  centerRight.setLayout(new FillLayout());
  layoutTopLeft=new LayoutRisksTop(centerLeft,controller,ModelPart.INPUT,null);
  layoutTopRight=new LayoutRisksTop(centerRight,controller,ModelPart.OUTPUT,ModelPart.INPUT);
  final Composite compositeBottom=new Composite(centerSash,SWT.NONE);
  compositeBottom.setLayout(new FillLayout());
  final SashForm bottomSash=new SashForm(compositeBottom,SWT.HORIZONTAL | SWT.SMOOTH);
  bottomLeft=new Composite(bottomSash,SWT.NONE);
  bottomLeft.setLayout(new FillLayout());
  bottomRight=new Composite(bottomSash,SWT.NONE);
  bottomRight.setLayout(new FillLayout());
  layoutBottomLeft=new LayoutRisksBottom(bottomLeft,controller,ModelPart.INPUT,null);
  layoutBottomRight=new LayoutRisksBottom(bottomRight,controller,ModelPart.OUTPUT,ModelPart.INPUT);
  layoutBottomLeft.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    final SelectionEvent arg0){
      layoutBottomRight.setSelectionIdex(layoutBottomLeft.getSelectionIndex());
      if (layoutBottomLeft.getSelectionIndex() == 3) {
        layoutTopLeft.setSelectionIdex(2);
        layoutTopRight.setSelectionIdex(2);
      }
 else       if (layoutBottomLeft.getSelectionIndex() == 0) {
        layoutTopLeft.setSelectionIdex(3);
        layoutTopRight.setSelectionIdex(3);
      }
      controller.update(new ModelEvent(this,ModelPart.SELECTED_RISK_VISUALIZATION,null));
    }
  }
);
  layoutBottomRight.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    final SelectionEvent arg0){
      layoutBottomLeft.setSelectionIdex(layoutBottomRight.getSelectionIndex());
      if (layoutBottomRight.getSelectionIndex() == 0) {
        layoutTopLeft.setSelectionIdex(3);
        layoutTopRight.setSelectionIdex(3);
      }
      controller.update(new ModelEvent(this,ModelPart.SELECTED_RISK_VISUALIZATION,null));
    }
  }
);
  layoutTopLeft.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    final SelectionEvent arg0){
      layoutTopRight.setSelectionIdex(layoutTopLeft.getSelectionIndex());
      if (layoutTopLeft.getSelectionIndex() == 2) {
        layoutBottomLeft.setSelectionIdex(3);
      }
 else       if (layoutTopLeft.getSelectionIndex() == 3) {
        layoutBottomLeft.setSelectionIdex(0);
        layoutBottomRight.setSelectionIdex(0);
      }
      controller.update(new ModelEvent(this,ModelPart.SELECTED_RISK_VISUALIZATION,null));
    }
  }
);
  layoutTopRight.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    final SelectionEvent arg0){
      layoutTopLeft.setSelectionIdex(layoutTopRight.getSelectionIndex());
      if (layoutTopRight.getSelectionIndex() == 2) {
        layoutBottomLeft.setSelectionIdex(3);
      }
 else       if (layoutTopRight.getSelectionIndex() == 3) {
        layoutBottomLeft.setSelectionIdex(0);
        layoutBottomRight.setSelectionIdex(0);
      }
      controller.update(new ModelEvent(this,ModelPart.SELECTED_RISK_VISUALIZATION,null));
    }
  }
);
  centerSash.setWeights(new int[]{WEIGHT_TOP,WEIGHT_BOTTOM});
  bottomSash.setWeights(new int[]{WEIGHT_LEFT,WEIGHT_RIGHT});
  center.setWeights(new int[]{WEIGHT_LEFT,WEIGHT_RIGHT});
  SWTUtil.fixOSXSashBug(centerSash);
  SWTUtil.fixOSXSashBug(bottomSash);
  SWTUtil.fixOSXSashBug(center);
}