test_class.declarator: folderName = "test_music_folder"
test_class.modifier: private static final
test_class.original_string: private static final String folderName = "test_music_folder";
test_class.type: String
test_class.var_name: folderName
test_class.declarator: numberOfFiles = 10
test_class.modifier: private static final
test_class.original_string: private static final int numberOfFiles = 10;
test_class.type: int
test_class.var_name: numberOfFiles
test_class.declarator: FILESEPARATOR = File.separator
test_class.modifier: private static final
test_class.original_string: private static final String FILESEPARATOR = File.separator;
test_class.type: String
test_class.var_name: FILESEPARATOR
test_class.file: gazeplay-commons/src/test/java/net/gazeplay/commons/utils/games/ImageDirectoryLocatorTest.java
test_class.identifier: ImageDirectoryLocatorTest
test_case.body: @Test
      void canLocateImagesDirectoryInUnpackedDistDirectory() {
          final File expected = new File("." + FILESEPARATOR, folderName);
          final File result = ImageDirectoryLocator.locateImagesDirectoryInUnpackedDistDirectory(folderName);
          assert (result.equals(expected));
      }
test_case.class_method_signature: ImageDirectoryLocatorTest.canLocateImagesDirectoryInUnpackedDistDirectory()
test_case.full_signature: @Test void canLocateImagesDirectoryInUnpackedDistDirectory()
test_case.identifier: canLocateImagesDirectoryInUnpackedDistDirectory
test_case.invocations: locateImagesDirectoryInUnpackedDistDirectory equals
test_case.modifiers: @Test
test_case.parameters: ()
test_case.return: void
test_case.signature: void canLocateImagesDirectoryInUnpackedDistDirectory()
focal_class.file: gazeplay-commons/src/main/java/net/gazeplay/commons/utils/games/ImageDirectoryLocator.java
focal_class.identifier: ImageDirectoryLocator
focal_class.class_method_signature: ImageDirectoryLocator.locateImagesDirectoryInUnpackedDistDirectory(String parentImagesPackageResourceLocation)
focal_class.full_signature: public static File locateImagesDirectoryInUnpackedDistDirectory(String parentImagesPackageResourceLocation)
focal_class.identifier: locateImagesDirectoryInUnpackedDistDirectory
focal_class.modifiers: public static
focal_class.parameters: (String parentImagesPackageResourceLocation)
focal_class.return: File
focal_class.signature: File locateImagesDirectoryInUnpackedDistDirectory(String parentImagesPackageResourceLocation)
focal_class.class_method_signature: ImageDirectoryLocator.locateImagesDirectoryInExplodedClassPath(String parentImagesPackageResourceLocation)
focal_class.full_signature: public static File locateImagesDirectoryInExplodedClassPath(String parentImagesPackageResourceLocation)
focal_class.identifier: locateImagesDirectoryInExplodedClassPath
focal_class.modifiers: public static
focal_class.parameters: (String parentImagesPackageResourceLocation)
focal_class.return: File
focal_class.signature: File locateImagesDirectoryInExplodedClassPath(String parentImagesPackageResourceLocation)
focal_class.class_method_signature: ImageDirectoryLocator.checkImageDirectory(File imagesDirectory)
focal_class.full_signature: private static boolean checkImageDirectory(File imagesDirectory)
focal_class.identifier: checkImageDirectory
focal_class.modifiers: private static
focal_class.parameters: (File imagesDirectory)
focal_class.return: boolean
focal_class.signature: boolean checkImageDirectory(File imagesDirectory)
focal_method.body: public static File locateImagesDirectoryInUnpackedDistDirectory(String parentImagesPackageResourceLocation) {
          log.info("locateImagesDirectoryInUnpackedDistDirectory : parentImagesPackageResourceLocation = {}",
              parentImagesPackageResourceLocation);
          final File workingDirectory = new File(".");
          log.info("locateImagesDirectoryInUnpackedDistDirectory : workingDirectory = {}",
              workingDirectory.getAbsolutePath());
          final String workingDirectoryName;
          try {
              workingDirectoryName = workingDirectory.getCanonicalFile().getName();
          } catch (IOException e) {
              throw new RuntimeException(e);
          }
          log.info("locateImagesDirectoryInUnpackedDistDirectory : workingDirectoryName = {}", workingDirectoryName);
  
          File imagesDirectory = new File(workingDirectory, parentImagesPackageResourceLocation);
          boolean checked = checkImageDirectory(imagesDirectory);
  
          if (checked) {
              log.info("locateImagesDirectoryInUnpackedDistDirectory : imagesDirectory = {}",
                  imagesDirectory.getAbsolutePath());
              return imagesDirectory;
          } else {
              log.debug("locateImagesDirectoryInUnpackedDistDirectory : could not locate images directory at {}", imagesDirectory.getAbsolutePath());
  
              // Checking this location as a last resort - should only get this far if running the program from Gradle.
              imagesDirectory = new File(workingDirectory,
                  "/gazeplay/src/main/resources/" + parentImagesPackageResourceLocation);
              checked = checkImageDirectory(imagesDirectory);
              if (checked) {
                  log.info("locateImagesDirectoryInUnpackedDistDirectory : imagesDirectory = {}",
                      imagesDirectory.getAbsolutePath());
                  return imagesDirectory;
              }
          }
  
          if (workingDirectoryName.equals("bin")) {
              imagesDirectory = new File(workingDirectory, "../" + parentImagesPackageResourceLocation);
              log.info("locateImagesDirectoryInUnpackedDistDirectory : imagesDirectory = {}",
                  imagesDirectory.getAbsolutePath());
              checked = checkImageDirectory(imagesDirectory);
              if (checked) {
                  return imagesDirectory;
              }
          }
  
          return null;
      }
focal_method.class_method_signature: ImageDirectoryLocator.locateImagesDirectoryInUnpackedDistDirectory(String parentImagesPackageResourceLocation)
focal_method.full_signature: public static File locateImagesDirectoryInUnpackedDistDirectory(String parentImagesPackageResourceLocation)
focal_method.identifier: locateImagesDirectoryInUnpackedDistDirectory
focal_method.invocations: info info getAbsolutePath getName getCanonicalFile info checkImageDirectory info getAbsolutePath debug getAbsolutePath checkImageDirectory info getAbsolutePath equals info getAbsolutePath checkImageDirectory
focal_method.modifiers: public static
focal_method.parameters: (String parentImagesPackageResourceLocation)
focal_method.return: File
focal_method.signature: File locateImagesDirectoryInUnpackedDistDirectory(String parentImagesPackageResourceLocation)