test_class.file: lang-java/src/test/java/org/eclipse/steady/java/AarAnalyzerTest.java
test_class.identifier: AarAnalyzerTest
test_case.body: @Test
    public void testAarAnalyzer() {
      try {
        final AarAnalyzer aa = new AarAnalyzer();
        aa.analyze(new File("./src/test/resources/cucumber-android-4.3.0.aar"));
        final Set<ConstructId> cids = aa.getConstructIds();
        assertTrue(!cids.isEmpty());
      } catch (FileAnalysisException e) {
        e.printStackTrace();
        assertTrue(false);
      }
    }
test_case.class_method_signature: AarAnalyzerTest.testAarAnalyzer()
test_case.full_signature: @Test public void testAarAnalyzer()
test_case.identifier: testAarAnalyzer
test_case.invocations: analyze getConstructIds assertTrue isEmpty printStackTrace assertTrue
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testAarAnalyzer()
focal_class.declarator: log = org.apache.logging.log4j.LogManager.getLogger()
focal_class.modifier: private static final
focal_class.original_string: private static final Logger log = org.apache.logging.log4j.LogManager.getLogger();
focal_class.type: Logger
focal_class.var_name: log
focal_class.declarator: CLASSES_JAR = "classes.jar"
focal_class.modifier: private static final
focal_class.original_string: private static final String CLASSES_JAR = "classes.jar";
focal_class.type: String
focal_class.var_name: CLASSES_JAR
focal_class.declarator: aarWriter
focal_class.modifier: private
focal_class.original_string: private JarWriter aarWriter;
focal_class.type: JarWriter
focal_class.var_name: aarWriter
focal_class.declarator: tmpDir = null
focal_class.modifier: private
focal_class.original_string: private Path tmpDir = null;
focal_class.type: Path
focal_class.var_name: tmpDir
focal_class.file: lang-java/src/main/java/org/eclipse/steady/java/AarAnalyzer.java
focal_class.identifier: AarAnalyzer
focal_class.class_method_signature: AarAnalyzer.getSupportedFileExtensions()
focal_class.full_signature: @Override public String[] getSupportedFileExtensions()
focal_class.identifier: getSupportedFileExtensions
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: String[]
focal_class.signature: String[] getSupportedFileExtensions()
focal_class.class_method_signature: AarAnalyzer.analyze(final File _file)
focal_class.full_signature: @Override public synchronized void analyze(final File _file)
focal_class.identifier: analyze
focal_class.modifiers: @Override public synchronized
focal_class.parameters: (final File _file)
focal_class.return: void
focal_class.signature: void analyze(final File _file)
focal_class.class_method_signature: AarAnalyzer.getSHA1()
focal_class.full_signature: @Override public synchronized String getSHA1()
focal_class.identifier: getSHA1
focal_class.modifiers: @Override public synchronized
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String getSHA1()
focal_class.class_method_signature: AarAnalyzer.getFileName()
focal_class.full_signature: public String getFileName()
focal_class.identifier: getFileName
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String getFileName()
focal_class.superclass: extends JarAnalyzer
focal_method.body: @Override
    public synchronized void analyze(final File _file) throws FileAnalysisException {
      try {
        // this.aar = new JarFile(_file, false, java.util.zip.ZipFile.OPEN_READ);
        this.aarWriter = new JarWriter(_file.toPath());
        this.url = _file.getAbsolutePath().toString();
  
        try {
          this.tmpDir = java.nio.file.Files.createTempDirectory("aar_analysis_");
        } catch (IOException e) {
          throw new IllegalStateException("Unable to create temp directory", e);
        }
  
        this.aarWriter.extract(this.tmpDir);
  
        // TODO: What if no classes.jar
        final File classes_jar = this.tmpDir.resolve(CLASSES_JAR).toFile();
        if (classes_jar != null && FileUtil.isAccessibleFile(classes_jar.toPath())) {
          JarAnalyzer.insertClasspath(classes_jar.toPath().toAbsolutePath().toString());
          this.jar = new JarFile(classes_jar, false, java.util.zip.ZipFile.OPEN_READ);
          this.jarWriter = new JarWriter(classes_jar.toPath());
        } else {
          log.warn("No " + CLASSES_JAR + " found in [" + _file.toPath().toAbsolutePath() + "]");
        }
      } catch (IllegalStateException e) {
        log.error("IllegalStateException when analyzing file [" + _file + "]: " + e.getMessage());
        throw new FileAnalysisException(
            "Error when analyzing file [" + _file + "]: " + e.getMessage(), e);
      } catch (IOException e) {
        log.error("IOException when analyzing file [" + _file + "]: " + e.getMessage());
        throw new FileAnalysisException(
            "Error when analyzing file [" + _file + "]: " + e.getMessage(), e);
      } catch (Exception e) {
        log.error("Exception when analyzing file [" + _file + "]: " + e.getMessage());
        throw new FileAnalysisException(
            "Error when analyzing file [" + _file + "]: " + e.getMessage(), e);
      }
    }
focal_method.class_method_signature: AarAnalyzer.analyze(final File _file)
focal_method.full_signature: @Override public synchronized void analyze(final File _file)
focal_method.identifier: analyze
focal_method.invocations: toPath toString getAbsolutePath createTempDirectory extract toFile resolve isAccessibleFile toPath insertClasspath toString toAbsolutePath toPath toPath warn toAbsolutePath toPath error getMessage getMessage error getMessage getMessage error getMessage getMessage
focal_method.modifiers: @Override public synchronized
focal_method.parameters: (final File _file)
focal_method.return: void
focal_method.signature: void analyze(final File _file)