Program: 172171
Project: 172171
Buggy source:
@Override protected void setUp() throws Exception {
  applicationContext=ApplicationContextHelper.getApplicationContext();
  repositoryHelper=(Repository)this.applicationContext.getBean("String_Node_Str");
  ApplicationContextFactory fileServers=(ApplicationContextFactory)this.applicationContext.getBean("String_Node_Str");
  cifsHelper=(CifsHelper)this.applicationContext.getBean("String_Node_Str");
  driver=(ContentDiskDriver)this.applicationContext.getBean("String_Node_Str");
  mlAwareNodeService=(NodeService)this.applicationContext.getBean("String_Node_Str");
  nodeService=(NodeService)applicationContext.getBean("String_Node_Str");
  transactionService=(TransactionService)applicationContext.getBean("String_Node_Str");
  contentService=(ContentService)applicationContext.getBean("String_Node_Str");
  ruleService=(RuleService)applicationContext.getBean("String_Node_Str");
  actionService=(ActionService)this.applicationContext.getBean("String_Node_Str");
  assertNotNull("String_Node_Str",driver);
  assertNotNull("String_Node_Str",repositoryHelper);
  assertNotNull("String_Node_Str",mlAwareNodeService);
  assertNotNull("String_Node_Str",nodeService);
  assertNotNull("String_Node_Str",transactionService);
  assertNotNull("String_Node_Str",contentService);
  assertNotNull("String_Node_Str",ruleService);
  assertNotNull("String_Node_Str",actionService);
  AuthenticationUtil.setRunAsUserSystem();
  RetryingTransactionCallback<Void> removeRootCB=new RetryingTransactionCallback<Void>(){
    @Override public Void execute() throws Throwable {
      NodeRef companyHome=repositoryHelper.getCompanyHome();
      NodeRef rootNode=nodeService.getChildByName(companyHome,ContentModel.ASSOC_CONTAINS,TEST_ROOT_PATH);
      if (rootNode != null) {
        logger.debug("String_Node_Str");
        nodeService.deleteNode(rootNode);
      }
      return null;
    }
  }
;
  final RetryingTransactionHelper tran=transactionService.getRetryingTransactionHelper();
  tran.doInTransaction(removeRootCB,false,true);
}

Fixed version (ground truth):
@Override protected void setUp() throws Exception {
  applicationContext=ApplicationContextHelper.getApplicationContext();
  repositoryHelper=(Repository)this.applicationContext.getBean("String_Node_Str");
  ApplicationContextFactory fileServers=(ApplicationContextFactory)this.applicationContext.getBean("String_Node_Str");
  cifsHelper=(CifsHelper)fileServers.getApplicationContext().getBean("String_Node_Str");
  driver=(ContentDiskDriver)fileServers.getApplicationContext().getBean("String_Node_Str");
  mlAwareNodeService=(NodeService)this.applicationContext.getBean("String_Node_Str");
  nodeService=(NodeService)applicationContext.getBean("String_Node_Str");
  transactionService=(TransactionService)applicationContext.getBean("String_Node_Str");
  contentService=(ContentService)applicationContext.getBean("String_Node_Str");
  ruleService=(RuleService)applicationContext.getBean("String_Node_Str");
  actionService=(ActionService)this.applicationContext.getBean("String_Node_Str");
  assertNotNull("String_Node_Str",driver);
  assertNotNull("String_Node_Str",repositoryHelper);
  assertNotNull("String_Node_Str",mlAwareNodeService);
  assertNotNull("String_Node_Str",nodeService);
  assertNotNull("String_Node_Str",transactionService);
  assertNotNull("String_Node_Str",contentService);
  assertNotNull("String_Node_Str",ruleService);
  assertNotNull("String_Node_Str",actionService);
  AuthenticationUtil.setRunAsUserSystem();
  RetryingTransactionCallback<Void> removeRootCB=new RetryingTransactionCallback<Void>(){
    @Override public Void execute() throws Throwable {
      NodeRef companyHome=repositoryHelper.getCompanyHome();
      NodeRef rootNode=nodeService.getChildByName(companyHome,ContentModel.ASSOC_CONTAINS,TEST_ROOT_PATH);
      if (rootNode != null) {
        logger.debug("String_Node_Str");
        nodeService.deleteNode(rootNode);
      }
      return null;
    }
  }
;
  final RetryingTransactionHelper tran=transactionService.getRetryingTransactionHelper();
  tran.doInTransaction(removeRootCB,false,true);
}