Program: 151407
Project: 151407
Buggy source:
@Test public void testCreateNestedProjectWithParentThatHasInheritedVersion() throws Exception {
  DirectoryResource addonDir=factory.create(forge.getRepositories().get(0).getRootDirectory()).reify(DirectoryResource.class);
  DirectoryResource projectDir=addonDir.createTempResource();
  Project parentProject=projectFactory.createProject(projectDir,locator);
  Assert.assertNotNull(parentProject);
  MetadataFacet metadata=parentProject.getFacet(MetadataFacet.class);
  metadata.setProjectName("String_Node_Str");
  metadata.setProjectGroupName("String_Node_Str");
  parentProject.getFacet(PackagingFacet.class).setPackagingType("String_Node_Str");
  DirectoryResource intermediateProjectDir=parentProject.getRoot().reify(DirectoryResource.class).getChildDirectory("String_Node_Str");
  Project intermediateProject=projectFactory.createProject(intermediateProjectDir,locator);
  MavenFacet parentMavenFacet=parentProject.getFacet(MavenFacet.class);
  List<String> modules=parentMavenFacet.getModel().getModules();
  Assert.assertFalse(modules.isEmpty());
  Assert.assertEquals("String_Node_Str",modules.get(0));
  intermediateProject.getFacet(MetadataFacet.class).setProjectVersion("String_Node_Str");
  intermediateProject.getFacet(PackagingFacet.class).setPackagingType("String_Node_Str");
  DirectoryResource subProjectDir=intermediateProject.getRoot().reify(DirectoryResource.class).getChildDirectory("String_Node_Str");
  Project subProject=projectFactory.createProject(subProjectDir,locator);
  MavenFacet intermediateMavenFacet=intermediateProject.getFacet(MavenFacet.class);
  List<String> intermediateModules=intermediateMavenFacet.getModel().getModules();
  Assert.assertFalse(intermediateModules.isEmpty());
  Assert.assertEquals("String_Node_Str",intermediateModules.get(0));
  String version=subProject.getFacet(MetadataFacet.class).getProjectVersion();
  Assert.assertEquals(parentProject.getFacet(MetadataFacet.class).getProjectVersion(),version);
}

Fixed version (ground truth):
@Test public void testCreateNestedProjectWithParentThatHasInheritedVersion() throws Exception {
  Project parentProject=projectFactory.createTempProject(buildSystem);
  Assert.assertNotNull(parentProject);
  MetadataFacet metadata=parentProject.getFacet(MetadataFacet.class);
  metadata.setProjectName("String_Node_Str");
  metadata.setProjectGroupName("String_Node_Str");
  parentProject.getFacet(PackagingFacet.class).setPackagingType("String_Node_Str");
  DirectoryResource intermediateProjectDir=parentProject.getRoot().reify(DirectoryResource.class).getChildDirectory("String_Node_Str");
  Project intermediateProject=projectFactory.createProject(intermediateProjectDir,buildSystem);
  MavenFacet parentMavenFacet=parentProject.getFacet(MavenFacet.class);
  Model parentModel=parentMavenFacet.getModel();
  List<String> modules=parentModel.getModules();
  Assert.assertFalse(modules.isEmpty());
  Assert.assertEquals("String_Node_Str",modules.get(0));
  intermediateProject.getFacet(MetadataFacet.class).setProjectVersion("String_Node_Str");
  intermediateProject.getFacet(PackagingFacet.class).setPackagingType("String_Node_Str");
  DirectoryResource subProjectDir=intermediateProject.getRoot().reify(DirectoryResource.class).getChildDirectory("String_Node_Str");
  Project subProject=projectFactory.createProject(subProjectDir,buildSystem);
  MavenFacet intermediateMavenFacet=intermediateProject.getFacet(MavenFacet.class);
  Model intermediateModel=intermediateMavenFacet.getModel();
  Assert.assertEquals(parentModel.getGroupId(),intermediateModel.getParent().getGroupId());
  List<String> intermediateModules=intermediateModel.getModules();
  Assert.assertFalse(intermediateModules.isEmpty());
  Assert.assertEquals("String_Node_Str",intermediateModules.get(0));
  String version=subProject.getFacet(MetadataFacet.class).getProjectVersion();
  Assert.assertEquals(parentProject.getFacet(MetadataFacet.class).getProjectVersion(),version);
  Model subModel=subProject.getFacet(MavenFacet.class).getModel();
  Assert.assertEquals(parentModel.getGroupId(),subModel.getParent().getGroupId());
}