Program: 121765
Project: 121765
Buggy source:
private void init(String schema,String main_table,String lookup_table){
  List<IConnection> incomingConnections=new ArrayList<IConnection>();
  incomingConnections.add(mockConnection(schema,main_table));
  incomingConnections.add(mockConnection(schema,lookup_table));
  component.setIncomingConnections(incomingConnections);
  ExternalDbMapData externalData=new ExternalDbMapData();
  List<ExternalDbMapTable> inputs=new ArrayList<ExternalDbMapTable>();
  List<ExternalDbMapTable> outputs=new ArrayList<ExternalDbMapTable>();
  ExternalDbMapTable inputTable=new ExternalDbMapTable();
  inputTable.setTableName(schema + "String_Node_Str" + main_table);
  List<ExternalDbMapEntry> entities=getMetadataEntities(new String[]{"String_Node_Str","String_Node_Str","String_Node_Str"},new String[3]);
  inputTable.setMetadataTableEntries(entities);
  inputs.add(inputTable);
  inputTable=new ExternalDbMapTable();
  inputTable.setTableName(schema + "String_Node_Str" + lookup_table);
  entities=getMetadataEntities(new String[]{"String_Node_Str","String_Node_Str"},new String[2]);
  inputTable.setMetadataTableEntries(entities);
  inputs.add(inputTable);
  ExternalDbMapTable outputTable=new ExternalDbMapTable();
  outputTable.setName("String_Node_Str");
  List<ExternalDbMapEntry> conditions=new ArrayList<ExternalDbMapEntry>();
  conditions.add(new ExternalDbMapEntry(schema + "String_Node_Str" + main_table+ "String_Node_Str"));
  outputTable.setCustomConditionsEntries(conditions);
  String[] names=new String[]{"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"};
  String[] expressions=new String[]{schema + "String_Node_Str" + main_table+ "String_Node_Str",schema + "String_Node_Str" + main_table+ "String_Node_Str",schema + "String_Node_Str" + main_table+ "String_Node_Str",schema + "String_Node_Str" + lookup_table+ "String_Node_Str"};
  outputTable.setMetadataTableEntries(getMetadataEntities(names,expressions));
  outputs.add(outputTable);
  externalData.setInputTables(inputs);
  externalData.setOutputTables(outputs);
  component.setExternalData(externalData);
  List<IMetadataTable> metadataList=new ArrayList<IMetadataTable>();
  MetadataTable metadataTable=getMetadataTable(names);
  metadataTable.setLabel("String_Node_Str");
  metadataList.add(metadataTable);
  component.setMetadataList(metadataList);
  Process process=mock(Process.class);
  when(process.getContextManager()).thenReturn(new JobContextManager());
  component.setProcess(process);
}

Fixed version (ground truth):
private void init(String schema,String main_table,String lookup_table){
  List<IConnection> incomingConnections=new ArrayList<IConnection>();
  String[] mainTableEntities=new String[]{"String_Node_Str","String_Node_Str","String_Node_Str"};
  String[] lookupEndtities=new String[]{"String_Node_Str","String_Node_Str"};
  incomingConnections.add(mockConnection(schema,main_table,mainTableEntities));
  incomingConnections.add(mockConnection(schema,lookup_table,lookupEndtities));
  component.setIncomingConnections(incomingConnections);
  ExternalDbMapData externalData=new ExternalDbMapData();
  List<ExternalDbMapTable> inputs=new ArrayList<ExternalDbMapTable>();
  List<ExternalDbMapTable> outputs=new ArrayList<ExternalDbMapTable>();
  ExternalDbMapTable inputTable=new ExternalDbMapTable();
  inputTable.setTableName(schema + "String_Node_Str" + main_table);
  List<ExternalDbMapEntry> entities=getMetadataEntities(mainTableEntities,new String[3]);
  inputTable.setMetadataTableEntries(entities);
  inputs.add(inputTable);
  inputTable=new ExternalDbMapTable();
  inputTable.setTableName(schema + "String_Node_Str" + lookup_table);
  entities=getMetadataEntities(lookupEndtities,new String[2]);
  inputTable.setMetadataTableEntries(entities);
  inputs.add(inputTable);
  ExternalDbMapTable outputTable=new ExternalDbMapTable();
  outputTable.setName("String_Node_Str");
  List<ExternalDbMapEntry> conditions=new ArrayList<ExternalDbMapEntry>();
  conditions.add(new ExternalDbMapEntry(schema + "String_Node_Str" + main_table+ "String_Node_Str"));
  outputTable.setCustomConditionsEntries(conditions);
  String[] names=new String[]{"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"};
  String[] expressions=new String[]{schema + "String_Node_Str" + main_table+ "String_Node_Str",schema + "String_Node_Str" + main_table+ "String_Node_Str",schema + "String_Node_Str" + main_table+ "String_Node_Str",schema + "String_Node_Str" + lookup_table+ "String_Node_Str"};
  outputTable.setMetadataTableEntries(getMetadataEntities(names,expressions));
  outputs.add(outputTable);
  externalData.setInputTables(inputs);
  externalData.setOutputTables(outputs);
  component.setExternalData(externalData);
  List<IMetadataTable> metadataList=new ArrayList<IMetadataTable>();
  MetadataTable metadataTable=getMetadataTable(names);
  metadataTable.setLabel("String_Node_Str");
  metadataList.add(metadataTable);
  component.setMetadataList(metadataList);
  Process process=mock(Process.class);
  when(process.getContextManager()).thenReturn(new JobContextManager());
  component.setProcess(process);
}