Program: 136451
Project: 136451
Buggy source:
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();
          }
        }
      }
    }
  }
}

Fixed version (ground truth):
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();
          }
        }
      }
    }
  }
}