Program: 147588
Project: 147588
Buggy source:
@Test public void doRunTest() throws Exception {
  RemoveFromRepositoryAction removeAction=new RemoveFromRepositoryAction();
  RemoveFromRepositoryAction removeActionM=spy(removeAction);
  CommonViewer commonViewerM=mock(CommonViewer.class);
  Whitebox.setInternalState(removeActionM,"String_Node_Str",commonViewerM);
  IRepositoryViewObject objectRVO=mock(IRepositoryViewObject.class);
  MDMServerObjectItem mdmItemM=mock(MDMServerObjectItem.class);
  Property propertyM=mock(Property.class);
  when(objectRVO.getProperty()).thenReturn(propertyM);
  when(propertyM.getItem()).thenReturn(mdmItemM);
  FolderRepositoryObject folderRO=mock(FolderRepositoryObject.class);
  Property foldePropertyM=mock(Property.class);
  ContainerItem containerItem=mock(ContainerItem.class);
  when(folderRO.getProperty()).thenReturn(foldePropertyM);
  when(foldePropertyM.getItem()).thenReturn(containerItem);
  ItemState itemState=mock(ItemState.class);
  when(containerItem.getState()).thenReturn(itemState);
  when(itemState.getPath()).thenReturn("String_Node_Str");
  PowerMockito.mockStatic(RepositoryNodeProviderRegistryReader.class);
  RepositoryNodeProviderRegistryReader reader=mock(RepositoryNodeProviderRegistryReader.class);
  PowerMockito.when(RepositoryNodeProviderRegistryReader.getInstance()).thenReturn(reader);
  ERepositoryObjectType typeM=ERepositoryObjectType.PROCESS;
  when(containerItem.getRepObjType()).thenReturn(typeM);
  MDMServerObject mdmServerObjectM=mock(MDMServerObject.class);
  when(mdmItemM.getMDMServerObject()).thenReturn(mdmServerObjectM);
  Shell shellM=mock(Shell.class);
  Control controlM=mock(Control.class);
  when(commonViewerM.getControl()).thenReturn(controlM);
  when(controlM.getShell()).thenReturn(shellM);
  List<Object> selectedObjects=new ArrayList<Object>();
  selectedObjects.add(objectRVO);
  selectedObjects.add(folderRO);
  when(removeActionM.getSelectedObject()).thenReturn(selectedObjects);
  Whitebox.setInternalState(removeActionM,"String_Node_Str",Collections.EMPTY_LIST);
  PowerMockito.mockStatic(MessageDialog.class);
  when(MessageDialog.openConfirm((Shell)anyObject(),anyString(),anyString())).thenReturn(true);
  PowerMockito.mockStatic(RepositoryResourceUtil.class);
  when(RepositoryResourceUtil.isOpenedInEditor((IRepositoryViewObject)anyObject())).thenReturn(null);
  when(RepositoryResourceUtil.hasContainerItem(anyObject(),eq(FolderType.FOLDER_LITERAL))).thenReturn(true);
  PowerMockito.mockStatic(ContainerCacheService.class);
  FolderItem folderItemM=mock(FolderItem.class);
  when(repositoryFactory.getFolderItem(eq(projectM),eq(typeM),(IPath)anyObject())).thenReturn(folderItemM);
  when(folderItemM.getState()).thenReturn(itemState);
  removeActionM.doRun();
}

Fixed version (ground truth):
@Test public void doRunTest() throws Exception {
  PowerMockito.mockStatic(MDMWorbenchPlugin.class);
  when(MDMWorbenchPlugin.getImageDescriptor(anyString())).thenReturn(mock(ImageDescriptor.class));
  RemoveFromRepositoryAction removeAction=new RemoveFromRepositoryAction();
  RemoveFromRepositoryAction removeActionM=PowerMockito.spy(removeAction);
  CommonViewer commonViewerM=mock(CommonViewer.class);
  Whitebox.setInternalState(removeActionM,"String_Node_Str",commonViewerM);
  PowerMockito.doReturn(true).when(removeActionM,"String_Node_Str",2);
  PowerMockito.doNothing().when(removeActionM,"String_Node_Str");
  IRepositoryViewObject objectRVO=mock(IRepositoryViewObject.class);
  MDMServerObjectItem mdmItemM=mock(MDMServerObjectItem.class);
  Property propertyM=mock(Property.class);
  when(objectRVO.getProperty()).thenReturn(propertyM);
  when(propertyM.getItem()).thenReturn(mdmItemM);
  FolderRepositoryObject folderRO=mock(FolderRepositoryObject.class);
  Property foldePropertyM=mock(Property.class);
  ContainerItem containerItem=mock(ContainerItem.class);
  when(folderRO.getProperty()).thenReturn(foldePropertyM);
  when(foldePropertyM.getItem()).thenReturn(containerItem);
  ItemState itemState=mock(ItemState.class);
  when(containerItem.getState()).thenReturn(itemState);
  when(itemState.getPath()).thenReturn("String_Node_Str");
  PowerMockito.mockStatic(RepositoryNodeProviderRegistryReader.class);
  RepositoryNodeProviderRegistryReader reader=mock(RepositoryNodeProviderRegistryReader.class);
  PowerMockito.when(RepositoryNodeProviderRegistryReader.getInstance()).thenReturn(reader);
  ERepositoryObjectType typeM=ERepositoryObjectType.PROCESS;
  when(containerItem.getRepObjType()).thenReturn(typeM);
  MDMServerObject mdmServerObjectM=mock(MDMServerObject.class);
  when(mdmItemM.getMDMServerObject()).thenReturn(mdmServerObjectM);
  Shell shellM=mock(Shell.class);
  Control controlM=mock(Control.class);
  when(commonViewerM.getControl()).thenReturn(controlM);
  when(controlM.getShell()).thenReturn(shellM);
  List<Object> selectedObjects=new ArrayList<Object>();
  selectedObjects.add(objectRVO);
  selectedObjects.add(folderRO);
  when(removeActionM.getSelectedObject()).thenReturn(selectedObjects);
  Whitebox.setInternalState(removeActionM,"String_Node_Str",Collections.EMPTY_LIST);
  PowerMockito.mockStatic(MessageDialog.class);
  when(MessageDialog.openConfirm((Shell)anyObject(),anyString(),anyString())).thenReturn(true);
  PowerMockito.mockStatic(RepositoryResourceUtil.class);
  when(RepositoryResourceUtil.isOpenedInEditor((IRepositoryViewObject)anyObject())).thenReturn(null);
  when(RepositoryResourceUtil.hasContainerItem(anyObject(),eq(FolderType.FOLDER_LITERAL))).thenReturn(true);
  PowerMockito.mockStatic(ContainerCacheService.class);
  FolderItem folderItemM=mock(FolderItem.class);
  when(repositoryFactory.getFolderItem(eq(projectM),eq(typeM),(IPath)anyObject())).thenReturn(folderItemM);
  when(folderItemM.getState()).thenReturn(itemState);
  removeActionM.doRun();
}