Program: 137490
Project: 137490
Buggy source:
/** 
 * Test method for   {@link org.talend.dataprofiler.core.ui.action.actions.DQEmptyRecycleBinAction#run()}. there is not any dependcy for each node in recycle bin
 * @throws Exception
 */
@Test public void testRun_1() throws Exception {
  PowerMockito.doNothing().when(dqEmptyAction_mock,"String_Node_Str");
  IRepositoryNode node1=mock(IRepositoryNode.class);
  IRepositoryNode node2=mock(IRepositoryNode.class);
  IRepositoryObject object1=mock(IRepositoryObject.class);
  when(node1.getObject()).thenReturn(object1);
  when(node2.getObject()).thenReturn(object1);
  Property prop=mock(Property.class);
  when(object1.getProperty()).thenReturn(prop);
  List<IRepositoryNode> seleLs=new ArrayList<IRepositoryNode>();
  ISelection selecetion=new StructuredSelection(seleLs);
  PowerMockito.doReturn(selecetion).when(dqEmptyAction_mock).getSelection();
  seleLs.add(node2);
  seleLs.add(node1);
  stub(method(MessageDialog.class,"String_Node_Str")).toReturn(true);
  PowerMockito.mockStatic(ProxyRepositoryFactory.class);
  ProxyRepositoryFactory factory=mock(ProxyRepositoryFactory.class);
  when(ProxyRepositoryFactory.getInstance()).thenReturn(factory);
  stub(method(DQDeleteHelper.class,"String_Node_Str"));
  PowerMockito.mockStatic(DQDeleteHelper.class);
  when(DQDeleteHelper.getCanNotDeletedNodes(seleLs,false)).thenReturn(new ArrayList<IRepositoryNode>());
  RecycleBinRepNode recyBin=mock(RecycleBinRepNode.class);
  PowerMockito.mockStatic(RepositoryNodeHelper.class);
  when(RepositoryNodeHelper.getRecycleBinRepNode()).thenReturn(recyBin);
  when(RepositoryNodeHelper.findAllChildrenNodes(seleLs)).thenReturn(seleLs);
  when(recyBin.getChildren()).thenReturn(seleLs);
  dqEmptyAction_mock.run();
}

Fixed version (ground truth):
/** 
 * Test method for   {@link org.talend.dataprofiler.core.ui.action.actions.DQEmptyRecycleBinAction#run()}. there is not any dependcy for each node in recycle bin
 * @throws Exception
 */
@Test public void testRun_1() throws Exception {
  PowerMockito.doNothing().when(dqEmptyAction_mock,"String_Node_Str");
  IRepositoryNode node1=mock(IRepositoryNode.class);
  IRepositoryNode node2=mock(IRepositoryNode.class);
  IRepositoryObject object1=mock(IRepositoryObject.class);
  when(node1.getObject()).thenReturn(object1);
  when(node2.getObject()).thenReturn(object1);
  Property prop=mock(Property.class);
  when(object1.getProperty()).thenReturn(prop);
  Set<IRepositoryNode> seleLs=new HashSet<IRepositoryNode>();
  ISelection selecetion=new StructuredSelection(seleLs);
  PowerMockito.doReturn(selecetion).when(dqEmptyAction_mock).getSelection();
  seleLs.add(node2);
  seleLs.add(node1);
  stub(method(MessageDialog.class,"String_Node_Str")).toReturn(true);
  PowerMockito.mockStatic(ProxyRepositoryFactory.class);
  ProxyRepositoryFactory factory=mock(ProxyRepositoryFactory.class);
  when(ProxyRepositoryFactory.getInstance()).thenReturn(factory);
  stub(method(DQDeleteHelper.class,"String_Node_Str"));
  PowerMockito.mockStatic(DQDeleteHelper.class);
  when(DQDeleteHelper.getCanNotDeletedNodes(seleLs,false)).thenReturn(new ArrayList<IRepositoryNode>());
  RecycleBinRepNode recyBin=mock(RecycleBinRepNode.class);
  PowerMockito.mockStatic(RepositoryNodeHelper.class);
  when(RepositoryNodeHelper.getRecycleBinRepNode()).thenReturn(recyBin);
  when(RepositoryNodeHelper.findAllChildrenNodes(seleLs)).thenReturn(seleLs);
  List<IRepositoryNode> repsList=new ArrayList<IRepositoryNode>();
  repsList.addAll(seleLs);
  when(recyBin.getChildren()).thenReturn(repsList);
  dqEmptyAction_mock.run();
}