Program: 137240
Project: 137240
Buggy source:
/** 
 * Test method for  {@link org.talend.dq.analysis.ExecuteMatchRuleHandler#execute(java.util.Map,org.talend.dataquality.indicators.columnset.RecordMatchingIndicator,java.util.List,org.talend.dataquality.indicators.columnset.BlockKeyIndicator)}. no block key one match key
 */
@Test public void testExecute1(){
  Map<MetadataColumn,String> columnMap=new HashMap<MetadataColumn,String>();
  MetadataColumn col0=ConnectionFactory.eINSTANCE.createMetadataColumn();
  col0.setName(columnName0);
  columnMap.put(col0,"String_Node_Str");
  MetadataColumn col1=ConnectionFactory.eINSTANCE.createMetadataColumn();
  col1.setName(columnName1);
  columnMap.put(col1,"String_Node_Str");
  MetadataColumn col2=ConnectionFactory.eINSTANCE.createMetadataColumn();
  col2.setName(columnName2);
  columnMap.put(col2,"String_Node_Str");
  MetadataColumn col3=ConnectionFactory.eINSTANCE.createMetadataColumn();
  col3.setName(columnName3);
  columnMap.put(col3,"String_Node_Str");
  RecordMatchingIndicator recordMatchingIndicator=ColumnsetFactory.eINSTANCE.createRecordMatchingIndicator();
  MatchRuleDefinition matchRuleDef=RulesPackage.eINSTANCE.getRulesFactory().createMatchRuleDefinition();
  recordMatchingIndicator.setBuiltInMatchRuleDefinition(matchRuleDef);
  MatchRule createMatchRule1=RulesFactory.eINSTANCE.createMatchRule();
  MatchKeyDefinition createMatchKeyDefinition1=RulesFactory.eINSTANCE.createMatchKeyDefinition();
  createMatchRule1.getMatchKeys().add(createMatchKeyDefinition1);
  createMatchKeyDefinition1.setColumn(columnName0);
  createMatchKeyDefinition1.setConfidenceWeight(1);
  createMatchKeyDefinition1.setName("String_Node_Str");
  createMatchKeyDefinition1.setHandleNull(HandleNullEnum.NULL_MATCH_NULL.getValue());
  AlgorithmDefinition createAlgorithmDefinition1=RulesFactory.eINSTANCE.createAlgorithmDefinition();
  createAlgorithmDefinition1.setAlgorithmType(AttributeMatcherType.EXACT.name());
  createMatchKeyDefinition1.setAlgorithm(createAlgorithmDefinition1);
  matchRuleDef.getMatchRules().add(createMatchRule1);
  List<Object[]> matchRows=new ArrayList<Object[]>();
  matchRows.add(new String[]{"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"});
  matchRows.add(new String[]{"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"});
  matchRows.add(new String[]{"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"});
  matchRows.add(new String[]{"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"});
  BlockKeyIndicator blockKeyIndicator=ColumnsetFactory.eINSTANCE.createBlockKeyIndicator();
  ExecuteMatchRuleHandler execHandler=new ExecuteMatchRuleHandler();
  MatchGroupResultConsumer matchResultConsumer=createMatchGroupResultConsumer(columnMap,recordMatchingIndicator);
  TypedReturnCode<MatchGroupResultConsumer> executeResult=execHandler.execute(columnMap,recordMatchingIndicator,matchRows,blockKeyIndicator,matchResultConsumer);
  Assert.assertTrue(executeResult.isOk());
  Assert.assertTrue(executeResult.getMessage() == null);
  Assert.assertTrue(executeResult.getObject() != null);
  MatchGroupResultConsumer ResultConsumer=executeResult.getObject();
  List<Object[]> fullMatchResult=ResultConsumer.getFullMatchResult();
  Assert.assertTrue(fullMatchResult.size() == 4);
  for (  Object[] objectArray : fullMatchResult) {
    Object object=objectArray[7];
    Assert.assertTrue(Boolean.parseBoolean(object.toString()));
  }
}

Fixed version (ground truth):
/** 
 * Test method for  {@link org.talend.dq.analysis.match.org.talend.dq.analysis.match.ExecuteMatchRuleHandler#execute(java.util.Map,org.talend.dataquality.indicators.columnset.RecordMatchingIndicator,java.util.List,org.talend.dataquality.indicators.columnset.BlockKeyIndicator)}. no block key one match key
 */
@Test public void testExecute1(){
  Map<MetadataColumn,String> columnMap=new HashMap<MetadataColumn,String>();
  MetadataColumn col0=ConnectionFactory.eINSTANCE.createMetadataColumn();
  col0.setName(columnName0);
  columnMap.put(col0,"String_Node_Str");
  MetadataColumn col1=ConnectionFactory.eINSTANCE.createMetadataColumn();
  col1.setName(columnName1);
  columnMap.put(col1,"String_Node_Str");
  MetadataColumn col2=ConnectionFactory.eINSTANCE.createMetadataColumn();
  col2.setName(columnName2);
  columnMap.put(col2,"String_Node_Str");
  MetadataColumn col3=ConnectionFactory.eINSTANCE.createMetadataColumn();
  col3.setName(columnName3);
  columnMap.put(col3,"String_Node_Str");
  RecordMatchingIndicator recordMatchingIndicator=ColumnsetFactory.eINSTANCE.createRecordMatchingIndicator();
  MatchRuleDefinition matchRuleDef=RulesPackage.eINSTANCE.getRulesFactory().createMatchRuleDefinition();
  recordMatchingIndicator.setBuiltInMatchRuleDefinition(matchRuleDef);
  MatchRule createMatchRule1=RulesFactory.eINSTANCE.createMatchRule();
  MatchKeyDefinition createMatchKeyDefinition1=RulesFactory.eINSTANCE.createMatchKeyDefinition();
  createMatchRule1.getMatchKeys().add(createMatchKeyDefinition1);
  createMatchKeyDefinition1.setColumn(columnName0);
  createMatchKeyDefinition1.setConfidenceWeight(1);
  createMatchKeyDefinition1.setName("String_Node_Str");
  createMatchKeyDefinition1.setHandleNull(HandleNullEnum.NULL_MATCH_NULL.getValue());
  AlgorithmDefinition createAlgorithmDefinition1=RulesFactory.eINSTANCE.createAlgorithmDefinition();
  createAlgorithmDefinition1.setAlgorithmType(AttributeMatcherType.EXACT.name());
  createMatchKeyDefinition1.setAlgorithm(createAlgorithmDefinition1);
  matchRuleDef.getMatchRules().add(createMatchRule1);
  List<Object[]> matchRows=new ArrayList<Object[]>();
  matchRows.add(new String[]{"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"});
  matchRows.add(new String[]{"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"});
  matchRows.add(new String[]{"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"});
  matchRows.add(new String[]{"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"});
  BlockKeyIndicator blockKeyIndicator=ColumnsetFactory.eINSTANCE.createBlockKeyIndicator();
  ExecuteMatchRuleHandler execHandler=new ExecuteMatchRuleHandler();
  MatchGroupResultConsumer matchResultConsumer=createMatchGroupResultConsumer(columnMap,recordMatchingIndicator);
  TypedReturnCode<MatchGroupResultConsumer> executeResult=execHandler.execute(columnMap,recordMatchingIndicator,matchRows,blockKeyIndicator,matchResultConsumer);
  Assert.assertTrue(executeResult.isOk());
  Assert.assertTrue(executeResult.getMessage() == null);
  Assert.assertTrue(executeResult.getObject() != null);
  MatchGroupResultConsumer ResultConsumer=executeResult.getObject();
  List<Object[]> fullMatchResult=ResultConsumer.getFullMatchResult();
  Assert.assertTrue(fullMatchResult.size() == 4);
  for (  Object[] objectArray : fullMatchResult) {
    Object object=objectArray[7];
    Assert.assertTrue(Boolean.parseBoolean(object.toString()));
  }
}