Program: 45102
Project: 45102
Buggy source:
private static SAPFunctionUnit createFunctionUnit(String tableName,SAPConnection connection,JCoFunction function){
  SAPFunctionUnit functionUnit;
  OutputSAPFunctionParameterTable outputParameterTable;
  InputSAPFunctionParameterTable inputParameterTable;
  MetadataTable metadataTable;
  SAPTestInputParameterTable testInputParameterTable;
  ProxyRepositoryFactory proxyRepositoryFactory=ProxyRepositoryFactory.getInstance();
  functionUnit=ConnectionFactory.eINSTANCE.createSAPFunctionUnit();
  functionUnit.setName(tableName);
  functionUnit.setLabel(tableName);
  functionUnit.setOutputType(SapParameterTypeEnum.OUTPUT_SINGLE.getDisplayLabel());
  functionUnit.setConnection(connection);
  functionUnit.setId(proxyRepositoryFactory.getNextId());
  inputParameterTable=ConnectionFactory.eINSTANCE.createInputSAPFunctionParameterTable();
  inputParameterTable.setFunctionUnit(functionUnit);
  inputParameterTable.setId(proxyRepositoryFactory.getNextId());
  inputParameterTable.setLabel(functionUnit.getName());
  outputParameterTable=ConnectionFactory.eINSTANCE.createOutputSAPFunctionParameterTable();
  outputParameterTable.setFunctionUnit(functionUnit);
  outputParameterTable.setId(proxyRepositoryFactory.getNextId());
  outputParameterTable.setLabel(functionUnit.getName());
  testInputParameterTable=ConnectionFactory.eINSTANCE.createSAPTestInputParameterTable();
  testInputParameterTable.setFunctionUnit(functionUnit);
  testInputParameterTable.setId(proxyRepositoryFactory.getNextId());
  testInputParameterTable.setLabel(function.getName());
  metadataTable=ConnectionFactory.eINSTANCE.createMetadataTable();
  metadataTable.setId(proxyRepositoryFactory.getNextId());
  metadataTable.setLabel(tableName);
  metadataTable.getColumns().addAll(getColumns(function));
  functionUnit.setInputParameterTable(inputParameterTable);
  functionUnit.setOutputParameterTable(outputParameterTable);
  functionUnit.setMetadataTable(metadataTable);
  functionUnit.setTestInputParameterTable(testInputParameterTable);
  connection.getFuntions().add(functionUnit);
  return functionUnit;
}

Fixed version (ground truth):
private static SAPFunctionUnit createFunctionUnit(String tableName,SAPConnection connection,JCoFunction function){
  SAPFunctionUnit functionUnit;
  OutputSAPFunctionParameterTable outputParameterTable;
  InputSAPFunctionParameterTable inputParameterTable;
  MetadataTable metadataTable;
  SAPTestInputParameterTable testInputParameterTable;
  ProxyRepositoryFactory proxyRepositoryFactory=ProxyRepositoryFactory.getInstance();
  functionUnit=ConnectionFactory.eINSTANCE.createSAPFunctionUnit();
  functionUnit.setName(function.getName());
  functionUnit.setLabel(tableName);
  functionUnit.setOutputType(SapParameterTypeEnum.OUTPUT_SINGLE.getDisplayLabel());
  functionUnit.setConnection(connection);
  functionUnit.setId(proxyRepositoryFactory.getNextId());
  inputParameterTable=ConnectionFactory.eINSTANCE.createInputSAPFunctionParameterTable();
  inputParameterTable.setFunctionUnit(functionUnit);
  inputParameterTable.setId(proxyRepositoryFactory.getNextId());
  inputParameterTable.setLabel(functionUnit.getName());
  outputParameterTable=ConnectionFactory.eINSTANCE.createOutputSAPFunctionParameterTable();
  outputParameterTable.setFunctionUnit(functionUnit);
  outputParameterTable.setId(proxyRepositoryFactory.getNextId());
  outputParameterTable.setLabel(functionUnit.getName());
  testInputParameterTable=ConnectionFactory.eINSTANCE.createSAPTestInputParameterTable();
  testInputParameterTable.setFunctionUnit(functionUnit);
  testInputParameterTable.setId(proxyRepositoryFactory.getNextId());
  testInputParameterTable.setLabel(function.getName());
  metadataTable=ConnectionFactory.eINSTANCE.createMetadataTable();
  metadataTable.setId(proxyRepositoryFactory.getNextId());
  metadataTable.setLabel(tableName);
  metadataTable.getColumns().addAll(getColumns(function));
  functionUnit.setInputParameterTable(inputParameterTable);
  functionUnit.setOutputParameterTable(outputParameterTable);
  functionUnit.setMetadataTable(metadataTable);
  functionUnit.setTestInputParameterTable(testInputParameterTable);
  connection.getFuntions().add(functionUnit);
  return functionUnit;
}