Program: 137374
Project: 137374
Buggy source:
private List<Map<String,String>> getMatchRulesFromRules(MatchRuleDefinition matchRuleDefinition,boolean retrieveDisplayValue){
  if (matchRuleDefinition != null) {
    List<Map<String,String>> ruleValues=new ArrayList<Map<String,String>>();
    for (    MatchRule matchRule : matchRuleDefinition.getMatchRules()) {
      for (      MatchKeyDefinition matchKey : matchRule.getMatchKeys()) {
        Map<String,String> pr=new HashMap<String,String>();
        pr.put(MatchRulesTableLabelProvider.MATCH_KEY_NAME,null == matchKey.getName() ? StringUtils.EMPTY : matchKey.getName());
        pr.put(MatchRulesTableLabelProvider.INPUT_COLUMN,null == matchKey.getColumn() ? StringUtils.EMPTY : matchKey.getColumn());
        if (getLookupColumnNames().size() > 0) {
          for (          String lookupColumnName : getLookupColumnNames()) {
            if (lookupColumnName.equalsIgnoreCase(matchKey.getColumn()) || lookupColumnName.equalsIgnoreCase(matchKey.getName())) {
              pr.put("String_Node_Str",null == matchKey.getColumn() ? StringUtils.EMPTY : lookupColumnName);
              break;
            }
          }
        }
        String algorithmType=matchKey.getAlgorithm().getAlgorithmType();
        if (retrieveDisplayValue) {
          pr.put(MatchRulesTableLabelProvider.MATCHING_TYPE,null == algorithmType ? StringUtils.EMPTY : AttributeMatcherType.valueOf(algorithmType).getLabel());
        }
 else {
          pr.put(MatchRulesTableLabelProvider.MATCHING_TYPE,null == algorithmType ? StringUtils.EMPTY : AttributeMatcherType.valueOf(algorithmType).getComponentValue());
        }
        pr.put(MatchRulesTableLabelProvider.CUSTOM_MATCHER,null == matchKey.getAlgorithm().getAlgorithmParameters() ? StringUtils.EMPTY : matchKey.getAlgorithm().getAlgorithmParameters());
        pr.put(MatchRulesTableLabelProvider.CONFIDENCE_WEIGHT,String.valueOf(matchKey.getConfidenceWeight()));
        if (retrieveDisplayValue) {
          pr.put(MatchRulesTableLabelProvider.HANDLE_NULL,null == matchKey.getHandleNull() ? StringUtils.EMPTY : HandleNullEnum.getTypeByValue(matchKey.getHandleNull()).getLabel());
        }
 else {
          pr.put(MatchRulesTableLabelProvider.HANDLE_NULL,null == matchKey.getHandleNull() ? StringUtils.EMPTY : matchKey.getHandleNull());
        }
        ruleValues.add(pr);
      }
    }
    return ruleValues;
  }
  return null;
}

Fixed version (ground truth):
private List<Map<String,String>> getMatchRulesFromRules(MatchRuleDefinition matchRuleDefinition,boolean retrieveDisplayValue){
  if (matchRuleDefinition != null) {
    List<Map<String,String>> ruleValues=new ArrayList<Map<String,String>>();
    for (    MatchRule matchRule : matchRuleDefinition.getMatchRules()) {
      for (      MatchKeyDefinition matchKey : matchRule.getMatchKeys()) {
        Map<String,String> pr=new HashMap<String,String>();
        pr.put(MatchRulesTableLabelProvider.MATCH_KEY_NAME,null == matchKey.getName() ? StringUtils.EMPTY : matchKey.getName());
        String matchedColumnName=matchExistingColumnForMatchRule(matchKey);
        pr.put(MatchRulesTableLabelProvider.INPUT_COLUMN,null == matchedColumnName ? StringUtils.EMPTY : matchedColumnName);
        if (getLookupColumnNames().size() > 0) {
          for (          String lookupColumnName : getLookupColumnNames()) {
            if (lookupColumnName.equalsIgnoreCase(matchKey.getColumn()) || lookupColumnName.equalsIgnoreCase(matchKey.getName())) {
              pr.put("String_Node_Str",null == matchKey.getColumn() ? StringUtils.EMPTY : lookupColumnName);
              break;
            }
          }
        }
        String algorithmType=matchKey.getAlgorithm().getAlgorithmType();
        if (retrieveDisplayValue) {
          pr.put(MatchRulesTableLabelProvider.MATCHING_TYPE,null == algorithmType ? StringUtils.EMPTY : AttributeMatcherType.valueOf(algorithmType).getLabel());
        }
 else {
          pr.put(MatchRulesTableLabelProvider.MATCHING_TYPE,null == algorithmType ? StringUtils.EMPTY : AttributeMatcherType.valueOf(algorithmType).getComponentValue());
        }
        pr.put(MatchRulesTableLabelProvider.CUSTOM_MATCHER,null == matchKey.getAlgorithm().getAlgorithmParameters() ? StringUtils.EMPTY : matchKey.getAlgorithm().getAlgorithmParameters());
        pr.put(MatchRulesTableLabelProvider.CONFIDENCE_WEIGHT,String.valueOf(matchKey.getConfidenceWeight()));
        if (retrieveDisplayValue) {
          pr.put(MatchRulesTableLabelProvider.HANDLE_NULL,null == matchKey.getHandleNull() ? StringUtils.EMPTY : HandleNullEnum.getTypeByValue(matchKey.getHandleNull()).getLabel());
        }
 else {
          pr.put(MatchRulesTableLabelProvider.HANDLE_NULL,null == matchKey.getHandleNull() ? StringUtils.EMPTY : matchKey.getHandleNull());
        }
        ruleValues.add(pr);
      }
    }
    return ruleValues;
  }
  return null;
}