Box API SDK is not returning the files consistently

Hi, We have observed that the Box API is not returning the files consistently in multiple runs, however, this issue is occurring rarely.
Sometimes it fetches less files than what is present in the Box without making any changes anywhere.

We are using the following Box SDK.


Sample code:

BoxFolder folders = new BoxFolder(api, userRootFolderId);
    folders.forEach(item-> {      
      if (itemInfo instanceof BoxFile.Info) {
        BoxFile.Info fileInfo = (BoxFile.Info) itemInfo;"Fetched BoxFile {} with id {}.", fileInfo.getName(), fileInfo.getID());       
      } else if (itemInfo instanceof BoxWebLink.Info) {        
      if (boxConfiguration.getCrawlWebLinks()) {          "Fetched Weblink {} with id {}.", item.getName(), item.getID());         
      } else if (itemInfo instanceof BoxFolder.Info) {        "Fetched folder {} with id {}.", itemInfo.getName(), itemInfo.getID());       

Can you please help here?