Program: 136450
Project: 136450
Buggy source:
@Override protected Control createDialogArea(final Composite parent){
  final SashForm form=new SashForm(parent,SWT.SMOOTH | SWT.VERTICAL | SWT.FILL);
  form.setSize(Math.min(Display.getCurrent().getActiveShell().getSize().x,800),580);
  GridData data=new GridData(SWT.FILL,SWT.FILL,true,true,0,0);
  form.setLayoutData(data);
  Composite composite=(Composite)super.createDialogArea(form);
  getTreeViewer().addSelectionChangedListener(new ISelectionChangedListener(){
    public void selectionChanged(    SelectionChangedEvent event){
      if (dialogType != SUGGEST_TYPE) {
        IStructuredSelection selection=(IStructuredSelection)event.getSelection();
        Object[] array=selection.toArray();
        if (array.length == 1) {
          if (array[0] != null) {
            MatchRuleDefinition matchRuleDefinition=null;
            if (array[0] instanceof RuleRepNode) {
              RuleRepNode node=(RuleRepNode)array[0];
              matchRuleDefinition=(MatchRuleDefinition)node.getRule();
            }
            if (matchRuleDefinition != null) {
              if (blockingKeysTable != null) {
                blockingKeysTable.setInput(getBlockingKeysFromNodes(array,true));
              }
              if (matchingRulesTable != null) {
                matchRulesTableComposite.dispose();
                if (StringUtils.equals(RecordMatcherType.T_SwooshAlgorithm.name(),matchRuleDefinition.getRecordLinkageAlgorithm())) {
                  if (particularSurvivRulesTableComposite != null) {
                    particularSurvivRulesTableComposite.dispose();
                    particularSurvivRulesTableComposite=null;
                  }
                  createSelectMatchRulesTableTswoosh(form);
                  if (dialogType == MATCHGROUP_TYPE) {
                    createParticularSurvivorshipRulesTableTswoosh(form);
                    form.setWeights(new int[]{5,3,2});
                  }
 else                   if (dialogType == MATCH_ANALYSIS_TYPE) {
                    createParticularSurvivorshipRulesTableTswoosh(form);
                    form.setWeights(new int[]{4,2,2,2});
                  }
                  particularSurvivRulesTable.setInput(getParticularRulesFromNodes(array,true));
                  algorithmValue.setText(RecordMatcherType.T_SwooshAlgorithm.getLabel());
                }
 else {
                  createSelectMatchRulesTableVsr(form);
                  if (particularSurvivRulesTableComposite != null && dialogType == MATCHGROUP_TYPE) {
                    particularSurvivRulesTableComposite.dispose();
                    particularSurvivRulesTableComposite=null;
                    form.setWeights(new int[]{3,2});
                  }
 else                   if (particularSurvivRulesTableComposite != null && dialogType == MATCH_ANALYSIS_TYPE) {
                    particularSurvivRulesTableComposite.dispose();
                    particularSurvivRulesTableComposite=null;
                    form.setWeights(new int[]{5,3,2});
                  }
                  algorithmValue.setText(RecordMatcherType.simpleVSRMatcher.getLabel());
                }
                matchingRulesTable.setInput(getMatchRulesFromNodes(array,true));
                matchRulesTableComposite.getParent().layout();
                matchRulesTableComposite.getParent().redraw();
              }
            }
          }
        }
      }
    }
  }
);
  if (dialogType == GENKEY_TYPE) {
    createSelectBlockingKeysTable(form);
    form.setWeights(new int[]{3,2});
  }
 else   if (dialogType == MATCHGROUP_TYPE) {
    createSelectMatchRulesTableVsr(form);
    createParticularSurvivorshipRulesTableTswoosh(form);
    form.setWeights(new int[]{5,3,2});
  }
 else   if (dialogType == RECORD_MATCHING_TYPE) {
    createSelectMatchRulesTableVsr(form);
    form.setWeights(new int[]{3,2});
  }
 else   if (dialogType == MATCH_ANALYSIS_TYPE) {
    createSelectBlockingKeysTable(form);
    createSelectMatchRulesTableVsr(form);
    createParticularSurvivorshipRulesTableTswoosh(form);
    form.setWeights(new int[]{4,2,2,2});
  }
 else   if (dialogType == SUGGEST_TYPE) {
    createSelectBlockingKeysTable(form);
    createSelectMatchRulesTableVsr(form);
    form.setWeights(new int[]{5,2,3});
    if (blockingKeysTable != null) {
      blockingKeysTable.setInput(getBlockingKeysFromRules(matchRuleDefinitionInput,true));
    }
    if (matchingRulesTable != null) {
      matchingRulesTable.setInput(getMatchRulesFromRules(matchRuleDefinitionInput,true));
    }
  }
  createCheckerArea(composite);
  return composite;
}

Fixed version (ground truth):
@Override protected Control createDialogArea(final Composite parent){
  final SashForm form=new SashForm(parent,SWT.SMOOTH | SWT.VERTICAL | SWT.FILL);
  form.setSize(Math.min(Display.getCurrent().getActiveShell().getSize().x,800),580);
  GridData data=new GridData(SWT.FILL,SWT.FILL,true,true,0,0);
  form.setLayoutData(data);
  Composite composite=(Composite)super.createDialogArea(form);
  getTreeViewer().addSelectionChangedListener(new ISelectionChangedListener(){
    public void selectionChanged(    SelectionChangedEvent event){
      if (dialogType != SUGGEST_TYPE) {
        IStructuredSelection selection=(IStructuredSelection)event.getSelection();
        Object[] array=selection.toArray();
        if (array.length == 1) {
          if (array[0] != null) {
            MatchRuleDefinition matchRuleDefinition=null;
            if (array[0] instanceof RuleRepNode) {
              RuleRepNode node=(RuleRepNode)array[0];
              matchRuleDefinition=(MatchRuleDefinition)node.getRule();
            }
            if (matchRuleDefinition != null) {
              algorithmValue.setText(RecordMatcherType.valueOf(matchRuleDefinition.getRecordLinkageAlgorithm()).getLabel());
              if (blockingKeysTable != null) {
                blockingKeysTable.setInput(getBlockingKeysFromNodes(array,true));
              }
              if (matchingRulesTable != null) {
                matchRulesTableComposite.dispose();
                if (StringUtils.equals(RecordMatcherType.T_SwooshAlgorithm.name(),matchRuleDefinition.getRecordLinkageAlgorithm())) {
                  if (particularSurvivRulesTableComposite != null) {
                    particularSurvivRulesTableComposite.dispose();
                    particularSurvivRulesTableComposite=null;
                  }
                  createSelectMatchRulesTableTswoosh(form);
                  if (dialogType == MATCHGROUP_TYPE) {
                    createParticularSurvivorshipRulesTableTswoosh(form);
                    form.setWeights(new int[]{5,3,2});
                  }
 else                   if (dialogType == MATCH_ANALYSIS_TYPE) {
                    createParticularSurvivorshipRulesTableTswoosh(form);
                    form.setWeights(new int[]{4,2,2,2});
                  }
                  if (particularSurvivRulesTable != null) {
                    particularSurvivRulesTable.setInput(getParticularRulesFromNodes(array,true));
                  }
                }
 else {
                  createSelectMatchRulesTableVsr(form);
                  if (particularSurvivRulesTableComposite != null && dialogType == MATCHGROUP_TYPE) {
                    particularSurvivRulesTableComposite.dispose();
                    particularSurvivRulesTableComposite=null;
                    form.setWeights(new int[]{3,2});
                  }
 else                   if (particularSurvivRulesTableComposite != null && dialogType == MATCH_ANALYSIS_TYPE) {
                    particularSurvivRulesTableComposite.dispose();
                    particularSurvivRulesTableComposite=null;
                    form.setWeights(new int[]{5,3,2});
                  }
                }
                matchingRulesTable.setInput(getMatchRulesFromNodes(array,true));
                matchRulesTableComposite.getParent().layout();
                matchRulesTableComposite.getParent().redraw();
              }
            }
          }
        }
      }
    }
  }
);
  if (dialogType == GENKEY_TYPE) {
    createSelectBlockingKeysTable(form);
    form.setWeights(new int[]{3,2});
  }
 else   if (dialogType == MATCHGROUP_TYPE) {
    createSelectMatchRulesTableVsr(form);
    createParticularSurvivorshipRulesTableTswoosh(form);
    form.setWeights(new int[]{5,3,2});
  }
 else   if (dialogType == RECORD_MATCHING_TYPE) {
    createSelectMatchRulesTableVsr(form);
    form.setWeights(new int[]{3,2});
  }
 else   if (dialogType == MATCH_ANALYSIS_TYPE) {
    createSelectBlockingKeysTable(form);
    createSelectMatchRulesTableVsr(form);
    createParticularSurvivorshipRulesTableTswoosh(form);
    form.setWeights(new int[]{4,2,2,2});
  }
 else   if (dialogType == SUGGEST_TYPE) {
    createSelectBlockingKeysTable(form);
    createSelectMatchRulesTableVsr(form);
    form.setWeights(new int[]{5,2,3});
    if (blockingKeysTable != null) {
      blockingKeysTable.setInput(getBlockingKeysFromRules(matchRuleDefinitionInput,true));
    }
    if (matchingRulesTable != null) {
      matchingRulesTable.setInput(getMatchRulesFromRules(matchRuleDefinitionInput,true));
    }
  }
  createCheckerArea(composite);
  return composite;
}