Program: 47548
Project: 47548
Buggy source:
public void testRemoveModel() throws Exception {
  try {
    domainRepository.removeModel(null,null);
    fail("String_Node_Str");
  }
 catch (  Exception success) {
  }
  try {
    domainRepository.removeModel("String_Node_Str",null);
    fail("String_Node_Str");
  }
 catch (  Exception success) {
  }
  try {
    domainRepository.removeModel("String_Node_Str",null);
    fail("String_Node_Str");
  }
 catch (  Exception success) {
  }
  try {
    domainRepository.removeModel("String_Node_Str","String_Node_Str");
    fail("String_Node_Str");
  }
 catch (  Exception success) {
  }
  domainRepository.removeModel("String_Node_Str","String_Node_Str");
  domainRepository.setXmiParser(new XmiParser());
  domainRepository.storeDomain(loadDomain(STEEL_WHEELS,"String_Node_Str"),true);
  final Domain steelWheels=domainRepository.getDomain(STEEL_WHEELS);
  assertNotNull(steelWheels);
  final String validModelName="String_Node_Str";
{
    domainRepository.removeModel(STEEL_WHEELS,"String_Node_Str");
    final Domain test=domainRepository.getDomain(STEEL_WHEELS);
    assertNotNull(test);
    assertEquals(steelWheels.getPhysicalModels().size(),test.getPhysicalModels().size());
    assertEquals(steelWheels.getLogicalModels().size(),test.getLogicalModels().size());
    assertNotNull(getLogicalModelByName(test,validModelName));
  }
{
    domainRepository.removeModel(STEEL_WHEELS,validModelName);
    final Domain test=domainRepository.getDomain(STEEL_WHEELS);
    assertNotNull(test);
    assertEquals(steelWheels.getPhysicalModels().size(),test.getPhysicalModels().size());
    assertEquals(steelWheels.getLogicalModels().size() - 1,test.getLogicalModels().size());
    assertNull(getLogicalModelByName(test,validModelName));
  }
}

Fixed version (ground truth):
public void testRemoveModel() throws Exception {
  try {
    domainRepository.removeModel(null,null);
    fail("String_Node_Str");
  }
 catch (  Exception success) {
  }
  try {
    domainRepository.removeModel("String_Node_Str",null);
    fail("String_Node_Str");
  }
 catch (  Exception success) {
  }
  try {
    domainRepository.removeModel("String_Node_Str",null);
    fail("String_Node_Str");
  }
 catch (  Exception success) {
  }
  try {
    domainRepository.removeModel("String_Node_Str","String_Node_Str");
    fail("String_Node_Str");
  }
 catch (  Exception success) {
  }
  domainRepository.removeModel("String_Node_Str","String_Node_Str");
  domainRepository.setXmiParser(new XmiParser());
  domainRepository.storeDomain(loadDomain(STEEL_WHEELS,"String_Node_Str"),true);
  final Domain steelWheels=domainRepository.getDomain(STEEL_WHEELS);
  assertNotNull(steelWheels);
  final String validModelName="String_Node_Str";
{
    domainRepository.removeModel(STEEL_WHEELS,"String_Node_Str");
    final Domain test=domainRepository.getDomain(STEEL_WHEELS);
    assertNotNull(test);
    assertEquals(steelWheels.getPhysicalModels().size(),test.getPhysicalModels().size());
    assertEquals(steelWheels.getLogicalModels().size(),test.getLogicalModels().size());
    assertNotNull(getLogicalModelByName(test,validModelName));
  }
{
    domainRepository.flushDomains();
    domainRepository.removeModel(STEEL_WHEELS,validModelName);
    final Domain test=domainRepository.getDomain(STEEL_WHEELS);
    assertNotNull(test);
    assertEquals(steelWheels.getPhysicalModels().size(),test.getPhysicalModels().size());
    assertEquals(steelWheels.getLogicalModels().size() - 1,test.getLogicalModels().size());
    assertNull(getLogicalModelByName(test,validModelName));
  }
}