Program: 147700
Project: 147700
Buggy source:
@Test public void testCreateItemWith2Args() throws Exception {
  String propLabel="String_Node_Str";
  String nextId="String_Node_Str";
  Item mockItem=mock(Item.class);
  ItemState mockItemState=mock(ItemState.class);
  when(mockItem.getState()).thenReturn(mockItemState);
  when(mockItem.getState().getPath()).thenReturn("String_Node_Str");
  IProxyRepositoryFactory repositoryFactory=mock(IProxyRepositoryFactory.class);
  when(CoreRuntimePlugin.getInstance().getProxyRepositoryFactory()).thenReturn(repositoryFactory);
  RepositoryContext mockContext=mock(RepositoryContext.class);
  when(repositoryFactory.getRepositoryContext()).thenReturn(mockContext);
  when(repositoryFactory.getNextId()).thenReturn(nextId);
  Property mockProperty=mock(Property.class);
  when(mockItem.getProperty()).thenReturn(mockProperty);
  PropertiesFactory proFactory=PropertiesFactory.eINSTANCE;
  PropertiesFactory spyProFactory=PowerMockito.spy(proFactory);
  when(spyProFactory.createProperty()).thenReturn(mockProperty);
  User user=mock(User.class);
  when(mockContext.getUser()).thenReturn(user);
  RecycleBinNodeConfiguration mockRBNConf=mock(RecycleBinNodeConfiguration.class);
  PowerMockito.whenNew(RecycleBinNodeConfiguration.class).withNoArguments().thenReturn(mockRBNConf);
  PowerMockito.mockStatic(RepositoryNodeConfigurationManager.class);
  IRepositoryNodeConfiguration mockConfManager=mock(IRepositoryNodeConfiguration.class);
  when(RepositoryNodeConfigurationManager.getConfiguration(Mockito.any(Item.class))).thenReturn(mockConfManager);
  IRepositoryNodeResourceProvider mockResourceProvider=mock(IRepositoryNodeResourceProvider.class);
  when(mockConfManager.getResourceProvider()).thenReturn(mockResourceProvider);
  when(mockResourceProvider.needSaveReferenceFile()).thenReturn(true);
  when(repositoryFactory.isEditableAndLockIfPossible(mockItem)).thenReturn(true);
  boolean createItem=RepositoryResourceUtil.createItem(mockItem,propLabel);
  verify(mockProperty,times(1)).setId(nextId);
  verify(mockProperty,times(1)).setVersion(Mockito.anyString());
  verify(mockProperty,times(1)).setAuthor(user);
  verify(mockProperty,times(1)).setLabel(propLabel);
  verify(repositoryFactory,times(1)).create(Mockito.any(Item.class),Mockito.any(IPath.class),Mockito.any(Boolean.class));
  verify(mockResourceProvider,times(1)).handleReferenceFile(mockItem);
  verify(repositoryFactory,times(1)).unlock(mockItem);
  assertTrue(createItem);
}

Fixed version (ground truth):
@Test public void testCreateItemWith2Args() throws Exception {
  String propLabel="String_Node_Str";
  String nextId="String_Node_Str";
  Item mockItem=mock(Item.class);
  ItemState mockItemState=mock(ItemState.class);
  when(mockItem.getState()).thenReturn(mockItemState);
  when(mockItem.getState().getPath()).thenReturn("String_Node_Str");
  IProxyRepositoryFactory repositoryFactory=mock(IProxyRepositoryFactory.class);
  when(CoreRuntimePlugin.getInstance().getProxyRepositoryFactory()).thenReturn(repositoryFactory);
  RepositoryContext mockContext=mock(RepositoryContext.class);
  when(repositoryFactory.getRepositoryContext()).thenReturn(mockContext);
  when(repositoryFactory.getNextId()).thenReturn(nextId);
  Property mockProperty=mock(Property.class);
  when(mockItem.getProperty()).thenReturn(mockProperty);
  PropertiesFactory proFactory=PropertiesFactory.eINSTANCE;
  PropertiesFactory spyProFactory=PowerMockito.spy(proFactory);
  when(spyProFactory.createProperty()).thenReturn(mockProperty);
  User user=mock(User.class);
  when(mockContext.getUser()).thenReturn(user);
  RecycleBinNodeConfiguration mockRBNConf=mock(RecycleBinNodeConfiguration.class);
  PowerMockito.whenNew(RecycleBinNodeConfiguration.class).withNoArguments().thenReturn(mockRBNConf);
  PowerMockito.mockStatic(RepositoryNodeConfigurationManager.class);
  IRepositoryNodeConfiguration mockConfManager=mock(IRepositoryNodeConfiguration.class);
  when(RepositoryNodeConfigurationManager.getConfiguration(Mockito.any(Item.class))).thenReturn(mockConfManager);
  IRepositoryNodeResourceProvider mockResourceProvider=mock(IRepositoryNodeResourceProvider.class);
  when(mockConfManager.getResourceProvider()).thenReturn(mockResourceProvider);
  when(mockResourceProvider.needSaveReferenceFile()).thenReturn(true);
  when(repositoryFactory.isEditableAndLockIfPossible(mockItem)).thenReturn(true);
  boolean createItem=RepositoryResourceUtil.createItem(mockItem,propLabel);
  verify(mockProperty,times(1)).setId(nextId);
  verify(mockProperty,times(1)).setVersion(Mockito.anyString());
  verify(mockProperty,times(1)).setAuthor(user);
  verify(mockProperty,times(1)).setLabel(propLabel);
  verify(repositoryFactory,times(1)).create(Mockito.any(Item.class),Mockito.any(IPath.class));
  verify(mockResourceProvider,times(1)).handleReferenceFile(mockItem);
  verify(repositoryFactory,times(1)).unlock(mockItem);
  assertTrue(createItem);
}