test_class.declarator: tmpDir
test_class.modifier: private
test_class.original_string: private File tmpDir;
test_class.type: File
test_class.var_name: tmpDir
test_class.file: smart-zeppelin/zeppelin-zengine/src/test/java/org/apache/zeppelin/helium/HeliumLocalRegistryTest.java
test_class.identifier: HeliumLocalRegistryTest
test_case.body: @Test
    public void testGetAllPackage() throws IOException {
      // given
      File r1Path = new File(tmpDir, "r1");
      HeliumLocalRegistry r1 = new HeliumLocalRegistry("r1", r1Path.getAbsolutePath());
      assertEquals(0, r1.getAll().size());
  
      // when
      Gson gson = new Gson();
      HeliumPackage pkg1 = new HeliumPackage(HeliumPackage.Type.APPLICATION,
          "app1",
          "desc1",
          "artifact1",
          "classname1",
          new String[][]{},
          "license",
          "");
      FileUtils.writeStringToFile(new File(r1Path, "pkg1.json"), gson.toJson(pkg1));
  
      // then
      assertEquals(1, r1.getAll().size());
    }
test_case.class_method_signature: HeliumLocalRegistryTest.testGetAllPackage()
test_case.full_signature: @Test public void testGetAllPackage()
test_case.identifier: testGetAllPackage
test_case.invocations: getAbsolutePath assertEquals size getAll writeStringToFile toJson assertEquals size getAll
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testGetAllPackage()
focal_class.declarator: logger = LoggerFactory.getLogger(HeliumLocalRegistry.class)
focal_class.original_string: Logger logger = LoggerFactory.getLogger(HeliumLocalRegistry.class);
focal_class.type: Logger
focal_class.var_name: logger
focal_class.declarator: gson
focal_class.modifier: private final
focal_class.original_string: private final Gson gson;
focal_class.type: Gson
focal_class.var_name: gson
focal_class.file: smart-zeppelin/zeppelin-zengine/src/main/java/org/apache/zeppelin/helium/HeliumLocalRegistry.java
focal_class.identifier: HeliumLocalRegistry
focal_class.class_method_signature: HeliumLocalRegistry.HeliumLocalRegistry(String name, String uri)
focal_class.full_signature: public  HeliumLocalRegistry(String name, String uri)
focal_class.identifier: HeliumLocalRegistry
focal_class.modifiers: public
focal_class.parameters: (String name, String uri)
focal_class.signature:  HeliumLocalRegistry(String name, String uri)
focal_class.class_method_signature: HeliumLocalRegistry.getAll()
focal_class.full_signature: @Override public synchronized List<HeliumPackage> getAll()
focal_class.identifier: getAll
focal_class.modifiers: @Override public synchronized
focal_class.parameters: ()
focal_class.return: List<HeliumPackage>
focal_class.signature: List<HeliumPackage> getAll()
focal_class.class_method_signature: HeliumLocalRegistry.readPackageInfo(File f)
focal_class.full_signature: private HeliumPackage readPackageInfo(File f)
focal_class.identifier: readPackageInfo
focal_class.modifiers: private
focal_class.parameters: (File f)
focal_class.return: HeliumPackage
focal_class.signature: HeliumPackage readPackageInfo(File f)
focal_class.superclass: extends HeliumRegistry
focal_method.body: @Override
    public synchronized List<HeliumPackage> getAll() throws IOException {
      List<HeliumPackage> result = new LinkedList<>();
  
      File file = new File(uri());
      File [] files = file.listFiles();
      if (files == null) {
        return result;
      }
  
      for (File f : files) {
        if (f.getName().startsWith(".")) {
          continue;
        }
  
        HeliumPackage pkgInfo = readPackageInfo(f);
        if (pkgInfo != null) {
          result.add(pkgInfo);
        }
      }
      return result;
    }
focal_method.class_method_signature: HeliumLocalRegistry.getAll()
focal_method.full_signature: @Override public synchronized List<HeliumPackage> getAll()
focal_method.identifier: getAll
focal_method.invocations: uri listFiles startsWith getName readPackageInfo add
focal_method.modifiers: @Override public synchronized
focal_method.parameters: ()
focal_method.return: List<HeliumPackage>
focal_method.signature: List<HeliumPackage> getAll()