Buggy code:
public abstract class ServiceBase { private TropixObjectDao tropixObjectDao ; private UserDao userDao ; private ProviderDao providerDao ; private DaoFactory daoFactory ; private SecurityProvider securityProvider ; private MessageSource messageSource ; private FileTypeResolver fileTypeResolver ; @ Inject public void setFileTypeResolver ( final FileTypeResolver fileTypeResolver ) { } protected FileType getFileType ( final StockFileExtensionI stockFileExtension ) { } @ Inject public void setProviderDao ( final ProviderDao providerDao ) { } @ Inject @ Named ( "serviceLayerMessageSource" ) public void setMessageSource ( final MessageSource messageSource ) { } @ Inject public void setTropixObjectDao ( final TropixObjectDao tropixObjectDao ) { } @ Inject public void setUserDao ( final UserDao userDao ) { } @ Inject public void setSecurityProvider ( final SecurityProvider securityProvider ) { } @ Inject public void setDaoFactory ( final DaoFactory daoFactory ) { } protected void updateObject ( final TropixObject object ) { } private class UpdateParentClosure implements Closure < TropixObject > { private final User owner ; private final Provider provider ; public UpdateParentClosure ( final User owner , final Provider provider ) { } public void apply ( final TropixObject object ) { } } protected void updateObjectWithParent ( final TropixObject object , final String userId , final String parentId ) { } protected void saveNewObject ( final TropixObject object ) { } protected void saveNewObject ( final TropixObject object , @ Nullable final String userId ) { } protected void saveNewObjectWithParent ( final TropixObject object , final String userId , @ Nonnull final String parentId ) { } protected void saveToProvider ( final Provider provider , final TropixObject object ) { } protected void saveNewObjectToDestination ( final TropixObject object , @ Nullable final String userId , @ Nullable final String destinationId ) { if ( destinationId == null ) { saveNewObject ( object , userId ) ; return ; } initAndSaveObject ( object ) ; final TropixObject destination = this . tropixObjectDao . loadTropixObject ( destinationId ) ; String folderId = null ; if ( destination instanceof Folder ) { folderId = destination . getId ( ) ; } else if ( destination instanceof InternalRequest ) { folderId = ( ( InternalRequest ) ( destination ) ) . getDestinationFolder ( ) . getId ( ) ; } if ( folderId != null ) { final String objectId = object . getId ( ) ; tropixObjectDao . addToFolder ( folderId , objectId ) ; tropixObjectDao . addPermissionParent ( objectId , folderId ) ; final User owner = tropixObjectDao . getOwner ( folderId ) ; tropixObjectDao . setOwner ( objectId , owner ) ; <START_BUG> final Provider provider = providerDao . getObjectsProvider ( objectId ) ; <END_BUG> saveToProvider ( provider , object ) ; } if ( destination instanceof Request ) { final Request request = ( ( Request ) ( destination ) ) ; request . getContents ( ) . add ( object ) ; tropixObjectDao . saveOrUpdateTropixObject ( destination ) ; final Provider provider = request . getProvider ( ) ; saveToProvider ( provider , object ) ; } } private void initAndSaveObject ( final TropixObject object ) { } protected < T extends TropixObject > T [ ] filter ( final Iterable < T > objects , final Class < T > clazz , final String userId ) { } protected TropixObject [ ] filter ( final Iterable < TropixObject > objects , final String userId ) { } protected < T extends TropixObject > T filterObject ( final T object , final String userId ) { } protected TropixObjectDao getTropixObjectDao ( ) { } protected UserDao getUserDao ( ) { } protected ProviderDao getProviderDao ( ) { } protected DaoFactory getDaoFactory ( ) { } protected SecurityProvider getSecurityProvider ( ) { } protected MessageSource getMessageSource ( ) { } protected VirtualFolder newVirtualFolder ( final VirtualFolder inputFolder ) { } protected VirtualFolder createNewChildVirtualFolder ( final String parentFolderId , final VirtualFolder inputVirtualFolder ) { } }

Fix:
final Provider provider = providerDao . getObjectsProvider ( folderId ) ;