Vincent W. Freeh

51 papers A* 1A 20B 6C 1Journal 14Unranked 9
YearRankTypeTitle / Venue / Authors
2018 A conf
ICDCS
Chin-Jung Hsu, Vivek Nair, Vincent W. Freeh, Tim Menzies
2018 conf
IEEE CLOUD
Chin-Jung Hsu, Vivek Nair, Tim Menzies, Vincent W. Freeh
2018 J jnl
CoRR
Chin-Jung Hsu, Vivek Nair, Tim Menzies, Vincent W. Freeh
2018 J jnl
CoRR
Chin-Jung Hsu, Vivek Nair, Tim Menzies, Vincent W. Freeh
2017 J jnl
CoRR
Chin-Jung Hsu, Vivek Nair, Vincent W. Freeh, Tim Menzies
2017 conf
IEEE BigData
Chin-Jung Hsu, Vincent W. Freeh, Flavio Villanustre
2016 B conf
SRDS
Chin-Jung Hsu, Rajesh K. Panta, Moo-Ryong Ra, Vincent W. Freeh
2015 B conf
CLOUD
Kamal KC, Vincent W. Freeh
2015 B conf
CLOUD
Kamal KC, Chin-Jung Hsu, Vincent W. Freeh
2014 conf
BPOE@ASPLOS/VLDB
Kamal KC, Vincent W. Freeh
2011 J jnl
Parallel Comput.
Min Yeol Lim, Vincent W. Freeh, David K. Lowenthal
2011 A conf
AsiaCCS
Tyler K. Bletsch, Xuxian Jiang, Vincent W. Freeh, Zhenkai Liang
2011 A conf
ACSAC
Tyler K. Bletsch, Xuxian Jiang, Vincent W. Freeh
2011 A conf
RAID
Minh Tran, Mark Etheridge, Tyler K. Bletsch, Xuxian Jiang, Vincent W. Freeh, Peng Ning
2011 conf
TRUST
Yajin Zhou, Xinwen Zhang, Xuxian Jiang, Vincent W. Freeh
2009 A conf
ICS
Barry Rountree, David K. Lowenthal, Bronis R. de Supinski, Martin Schulz, Vincent W. Freeh, Tyler K. Bletsch
2009 A conf
ICDCS
Min Yeol Lim, Freeman L. Rawson III, Tyler K. Bletsch, Vincent W. Freeh
2009 A conf
IPDPS
Yaohang Li, Douglas Wardell, Vincent W. Freeh
2008 J jnl
J. Parallel Distributed Comput.
Vincent W. Freeh, Nandini Kappiah, David K. Lowenthal, Tyler K. Bletsch
2007 J jnl
IEEE Trans. Parallel Distributed Syst.
Vincent W. Freeh, David K. Lowenthal, Feng Pan, Nandini Kappiah, Robert Springer, Barry Rountree, Mark E. Femal
2007 A conf
SC
Barry Rountree, David K. Lowenthal, Shelby H. Funk, Vincent W. Freeh, Bronis R. de Supinski, Martin Schulz
2007 A conf
IPDPS
Min Yeol Lim, Vincent W. Freeh
2007 A conf
IPDPS
Vincent W. Freeh, Tyler K. Bletsch, Freeman L. Rawson III
2006 J jnl
ACM Trans. Storage
Sudharshan S. Vazhkudai, Xiaosong Ma, Vincent W. Freeh, Jonathan W. Strickland, Nandan Tammineedi, Tyler A. Simon, Stephen L. Scott
2006 A conf
ICS
Xiaosong Ma, Vincent W. Freeh, Tao Yang, Sudharshan Vazhkudai, Tyler A. Simon, Stephen L. Scott
2006 A conf
SC
Min Yeol Lim, Vincent W. Freeh, David K. Lowenthal
2006 B conf
PPoPP
Robert Springer, David K. Lowenthal, Barry Rountree, Vincent W. Freeh
2006 C conf
CLUSTER
Sudharshan S. Vazhkudai, Douglas Thain, Xiaosong Ma, Vincent W. Freeh
2005 conf
ICAC
Mark E. Femal, Vincent W. Freeh
2005 A conf
IPDPS
Feng Pan, Vincent W. Freeh, Daniel M. Smith
2005 A conf
IPDPS
Vincent W. Freeh, Feng Pan, Nandini Kappiah, David K. Lowenthal, Robert Springer
2005 A conf
SC
Sudharshan Vazhkudai, Xiaosong Ma, Vincent W. Freeh, Jonathan W. Strickland, Nandan Tammineedi, Stephen L. Scott
2005 conf
ICAC
Jonathan W. Strickland, Vincent W. Freeh, Xiaosong Ma, Sudharshan Vazhkudai
2005 A conf
SC
Nandini Kappiah, Vincent W. Freeh, David K. Lowenthal
2005 J jnl
SIGARCH Comput. Archit. News
Barry Rountree, Robert Springer, David K. Lowenthal, Vincent W. Freeh
2005 B conf
PPoPP
Vincent W. Freeh, David K. Lowenthal
2004 conf
PACS
Mark E. Femal, Vincent W. Freeh
2003 conf
AMCIS
Gregory R. Madey, Yongqin Gao, Vincent W. Freeh, Renee Tynan, Chris Hoffman
2003 B conf
ICCCN
Vsevolod Panteleenko, Vincent W. Freeh
2002 A conf
IPDPS
David K. Lowenthal, Vincent W. Freeh, David W. Miller
2002 J jnl
J. Syst. Softw.
H. Richard Kendall, Vincent W. Freeh, Paul W. Schermerhorn, Robert J. Minerick, Peter W. Rijks
2002 J jnl
Softw. Pract. Exp.
H. Richard Kendall, Vincent W. Freeh
2001 conf
USENIX ATC, FREENIX Track
Paul W. Schermerhorn, Robert J. Minerick, Peter W. Rijks, Vincent W. Freeh
2000 J jnl
Parallel Comput.
David K. Lowenthal, Vincent W. Freeh
1999 A conf
SC
Mary W. Hall, Peter M. Kogge, Jefferey G. Koller, Pedro C. Diniz, Jacqueline Chame, Jeff Draper, Jeff LaCoss, John J. Granacki, Jay B. Brockman, Apoorv Srivastava, William C. Athas, Vincent W. Freeh, Jaewook Shin, JoonSeok Park
1999 A conf
International Conference on Supercomputing
Jay B. Brockman, Peter M. Kogge, Thomas L. Sterling, Vincent W. Freeh, Shannon K. Kuntz
1998 J jnl
Concurr. Pract. Exp.
David K. Lowenthal, Vincent W. Freeh, Gregory R. Andrews
1996 J jnl
J. Parallel Distributed Comput.
Vincent W. Freeh
1996 A conf
HPDC
Vincent W. Freeh, Gregory R. Andrews
1996 J jnl
J. Parallel Distributed Comput.
David K. Lowenthal, Vincent W. Freeh, Gregory R. Andrews
1994 A* conf
OSDI
Vincent W. Freeh, David K. Lowenthal, Gregory R. Andrews
tests/unit/test_apk_apktool_wrapper.py
← Index tests/unit/test_apk_apktool_wrapper.py python
"""
Unit tests for apktool wrapper subprocess management and smali directory detection.

All subprocess calls are mocked — no apktool/Java installation required.
"""
import os
import tempfile

import pytest
from unittest.mock import MagicMock, patch

pytestmark = [pytest.mark.unit, pytest.mark.apk, pytest.mark.decompile]


class TestApktoolDisassembler:
    """Tests for ApktoolDisassembler subprocess wrapper."""

    @patch.dict(os.environ, {}, clear=False)
    def test_init_defaults(self):
        os.environ.pop("APKTOOL_PATH", None)
        from redb.extractors.decompiler.apk.apktool_wrapper import ApktoolDisassembler
        a = ApktoolDisassembler()
        assert a.apktool_path == "apktool"
        assert a.timeout == 120

    def test_init_custom(self):
        from redb.extractors.decompiler.apk.apktool_wrapper import ApktoolDisassembler
        a = ApktoolDisassembler(apktool_path="/opt/apktool", timeout=120)
        assert a.apktool_path == "/opt/apktool"
        assert a.timeout == 120

    def test_init_from_env(self):
        from redb.extractors.decompiler.apk.apktool_wrapper import ApktoolDisassembler
        with patch.dict(os.environ, {"APKTOOL_PATH": "/usr/bin/apktool", "APKTOOL_TIMEOUT": "90"}):
            a = ApktoolDisassembler()
            assert a.apktool_path == "/usr/bin/apktool"
            assert a.timeout == 90

    @patch("subprocess.Popen")
    def test_disassemble_success(self, mock_popen):
        from redb.extractors.decompiler.apk.apktool_wrapper import ApktoolDisassembler
        mock_proc = MagicMock()
        mock_proc.communicate.return_value = ("output", "")
        mock_proc.returncode = 0
        mock_popen.return_value = mock_proc

        a = ApktoolDisassembler()
        result = a.disassemble("/test.apk", "/output")
        assert result is True

    @patch("subprocess.Popen")
    def test_disassemble_failure(self, mock_popen):
        from redb.extractors.decompiler.apk.apktool_wrapper import ApktoolDisassembler
        mock_proc = MagicMock()
        mock_proc.communicate.return_value = ("", "error")
        mock_proc.returncode = 1
        mock_popen.return_value = mock_proc

        a = ApktoolDisassembler(log=MagicMock())
        result = a.disassemble("/test.apk", "/output")
        assert result is False

    @patch("subprocess.Popen")
    def test_disassemble_timeout(self, mock_popen):
        from redb.extractors.decompiler.apk.apktool_wrapper import ApktoolDisassembler
        import subprocess
        mock_proc = MagicMock()
        mock_proc.communicate.side_effect = subprocess.TimeoutExpired(cmd="apktool", timeout=10)
        mock_proc.pid = 12345
        mock_popen.return_value = mock_proc

        with patch("os.getpgid", return_value=12345), \
             patch("os.killpg"):
            a = ApktoolDisassembler(timeout=10, log=MagicMock())
            result = a.disassemble("/test.apk", "/output")
            assert result is False

    @patch("subprocess.Popen", side_effect=FileNotFoundError)
    def test_disassemble_not_found(self, mock_popen):
        from redb.extractors.decompiler.apk.apktool_wrapper import ApktoolDisassembler
        a = ApktoolDisassembler(log=MagicMock())
        result = a.disassemble("/test.apk", "/output")
        assert result is False

    @patch("subprocess.Popen")
    def test_disassemble_command_args(self, mock_popen):
        from redb.extractors.decompiler.apk.apktool_wrapper import ApktoolDisassembler
        mock_proc = MagicMock()
        mock_proc.communicate.return_value = ("", "")
        mock_proc.returncode = 0
        mock_popen.return_value = mock_proc

        a = ApktoolDisassembler(apktool_path="/opt/apktool")
        a.disassemble("/test.apk", "/output")

        cmd = mock_popen.call_args[0][0]
        assert cmd[0] == "/opt/apktool"
        assert "d" in cmd
        assert "--no-res" in cmd
        assert "--force" in cmd
        assert "/test.apk" in cmd

    def test_get_smali_directories_single_dex(self):
        from redb.extractors.decompiler.apk.apktool_wrapper import ApktoolDisassembler
        with tempfile.TemporaryDirectory() as tmpdir:
            os.makedirs(os.path.join(tmpdir, "smali"))
            a = ApktoolDisassembler()
            dirs = a.get_smali_directories(tmpdir)
            assert len(dirs) == 1
            assert dirs[0].endswith("smali")

    def test_get_smali_directories_multi_dex(self):
        from redb.extractors.decompiler.apk.apktool_wrapper import ApktoolDisassembler
        with tempfile.TemporaryDirectory() as tmpdir:
            os.makedirs(os.path.join(tmpdir, "smali"))
            os.makedirs(os.path.join(tmpdir, "smali_classes2"))
            os.makedirs(os.path.join(tmpdir, "smali_classes3"))
            # Should not be included
            os.makedirs(os.path.join(tmpdir, "res"))
            os.makedirs(os.path.join(tmpdir, "original"))

            a = ApktoolDisassembler()
            dirs = a.get_smali_directories(tmpdir)
            assert len(dirs) == 3

    def test_get_smali_directories_empty(self):
        from redb.extractors.decompiler.apk.apktool_wrapper import ApktoolDisassembler
        with tempfile.TemporaryDirectory() as tmpdir:
            a = ApktoolDisassembler()
            dirs = a.get_smali_directories(tmpdir)
            assert dirs == []

    def test_get_smali_directories_nonexistent(self):
        from redb.extractors.decompiler.apk.apktool_wrapper import ApktoolDisassembler
        a = ApktoolDisassembler()
        dirs = a.get_smali_directories("/nonexistent/path")
        assert dirs == []