Program: 147595
Project: 147595
Buggy source:
/** 
 * Test for: findViewObjects(ERepositoryObjectType type, Item parentItem, boolean useRepositoryViewObject, boolean withDeleted)
 */
@Test public void testFindViewObjects4Args() throws Exception {
  boolean withDeleted=false;
  boolean useRepositoryViewObject=true;
  String path="String_Node_Str";
  String parentPath="String_Node_Str";
  Item mockParentItem=mock(Item.class);
  ItemState mockItemState=mock(ItemState.class);
  when(mockParentItem.getState()).thenReturn(mockItemState);
  when(mockItemState.getPath()).thenReturn(parentPath);
  PowerMockito.mockStatic(ProjectManager.class);
  ProjectManager mockManager=mock(ProjectManager.class);
  when(ProjectManager.getInstance()).thenReturn(mockManager);
  Project mockProject=mock(Project.class);
  when(ProjectManager.getInstance().getCurrentProject()).thenReturn(mockProject);
  IProject mockIProject=mock(IProject.class);
  PowerMockito.mockStatic(ResourceModelUtils.class);
  when(ResourceModelUtils.getProject(mockProject)).thenReturn(mockIProject);
  PowerMockito.mockStatic(ERepositoryObjectType.class);
  ERepositoryObjectType mockType=mock(ERepositoryObjectType.class);
  when(ERepositoryObjectType.getFolderName(mockType)).thenReturn(path);
  IFolder mockFolder=mock(IFolder.class);
  when(mockIProject.getFolder(any(IPath.class))).thenReturn(mockFolder);
  List<IRepositoryViewObject> viewObjects=new ArrayList<IRepositoryViewObject>();
  viewObjects.add(mock(IRepositoryViewObject.class));
  PowerMockito.mockStatic(RepositoryResourceUtil.class);
  when(RepositoryResourceUtil.findViewObjects(mockType,mockParentItem,mockFolder,useRepositoryViewObject,withDeleted)).thenReturn(viewObjects);
  PowerMockito.doCallRealMethod().when(RepositoryResourceUtil.class,"String_Node_Str",mockType,mockParentItem,useRepositoryViewObject,withDeleted);
  List<IRepositoryViewObject> result=RepositoryResourceUtil.findViewObjects(mockType,mockParentItem,useRepositoryViewObject,withDeleted);
  assertEquals(1,result.size());
  assertSame(viewObjects,result);
  when(ERepositoryObjectType.getFolderName(mockType)).thenReturn("String_Node_Str");
  result=RepositoryResourceUtil.findViewObjects(mockType,mockParentItem,useRepositoryViewObject,withDeleted);
  assertEquals(0,result.size());
  assertEquals(Collections.EMPTY_LIST,result);
}

Fixed version (ground truth):
/** 
 * Test for: findViewObjects(ERepositoryObjectType type, Item parentItem, boolean useRepositoryViewObject, boolean withDeleted)
 */
@Test public void testFindViewObjects4Args() throws Exception {
  boolean withDeleted=false;
  boolean useRepositoryViewObject=true;
  String path="String_Node_Str";
  String parentPath="String_Node_Str";
  Item mockParentItem=mock(Item.class);
  ItemState mockItemState=mock(ItemState.class);
  when(mockParentItem.getState()).thenReturn(mockItemState);
  when(mockItemState.getPath()).thenReturn(parentPath);
  PowerMockito.mockStatic(ProjectManager.class);
  ProjectManager mockManager=mock(ProjectManager.class);
  when(ProjectManager.getInstance()).thenReturn(mockManager);
  Project mockProject=mock(Project.class);
  when(ProjectManager.getInstance().getCurrentProject()).thenReturn(mockProject);
  IProject mockIProject=mock(IProject.class);
  PowerMockito.mockStatic(ResourceUtils.class);
  when(ResourceUtils.getProject(mockProject)).thenReturn(mockIProject);
  PowerMockito.mockStatic(ERepositoryObjectType.class);
  ERepositoryObjectType mockType=mock(ERepositoryObjectType.class);
  when(ERepositoryObjectType.getFolderName(mockType)).thenReturn(path);
  IFolder mockFolder=mock(IFolder.class);
  when(mockIProject.getFolder(any(IPath.class))).thenReturn(mockFolder);
  List<IRepositoryViewObject> viewObjects=new ArrayList<IRepositoryViewObject>();
  viewObjects.add(mock(IRepositoryViewObject.class));
  PowerMockito.mockStatic(RepositoryResourceUtil.class);
  when(RepositoryResourceUtil.findViewObjects(mockType,mockParentItem,mockFolder,useRepositoryViewObject,withDeleted)).thenReturn(viewObjects);
  PowerMockito.doCallRealMethod().when(RepositoryResourceUtil.class,"String_Node_Str",mockType,mockParentItem,useRepositoryViewObject,withDeleted);
  List<IRepositoryViewObject> result=RepositoryResourceUtil.findViewObjects(mockType,mockParentItem,useRepositoryViewObject,withDeleted);
  assertEquals(1,result.size());
  assertSame(viewObjects,result);
  when(ERepositoryObjectType.getFolderName(mockType)).thenReturn("String_Node_Str");
  result=RepositoryResourceUtil.findViewObjects(mockType,mockParentItem,useRepositoryViewObject,withDeleted);
  assertEquals(0,result.size());
  assertEquals(Collections.EMPTY_LIST,result);
}