<commit_before>HOME="/Users/netspider/Documents/workspace_pinpoint"
VERSION="1.0.2-SNAPSHOT"

echo "Remove previous version"
#rm -fr $HOME/pinpoint-testbed/agent-obfuscated
rm -fr $HOME/pinpoint-testbed/agent-org
#mkdir $HOME/pinpoint-testbed/agent-obfuscated
mkdir $HOME/pinpoint-testbed/agent-org
echo "...OK"

echo "Backup original(not obfuscated) profiler"
cp $HOME/pinpoint-testbed/agent/pinpoint-bootstrap-$VERSION.jar $HOME/pinpoint-testbed/agent-org/
cp $HOME/pinpoint-testbed/agent/lib/pinpoint-profiler-$VERSION.jar $HOME/pinpoint-testbed/agent-org/
cp $HOME/pinpoint-testbed/agent/lib/pinpoint-rpc-$VERSION.jar $HOME/pinpoint-testbed/agent-org/
echo "...OK"

echo "Obfuscating"
# osx : rt.jar -> /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Classes/classes.jar
RT_JAR="/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/lib/rt.jar"
proguard.sh -libraryjars $RT_JAR @proguard-$VERSION.conf
echo "...OK"

echo "Replace original bootstrap"
cp $HOME/pinpoint-bootstrap/target/pinpoint-bootstrap-$VERSION-jar-with-dependencies-obfuscated.jar $HOME/pinpoint-testbed/agent/pinpoint-bootstrap-$VERSION.jar
rc=$?
if [[ $rc != 0 ]] ; then
        echo "OBFUSCATION FAILED $rc"
        exit $rc
fi
echo "...OK"

echo "Replace original profiler"
cp $HOME/pinpoint-profiler/target/pinpoint-profiler-$VERSION-obfuscated.jar $HOME/pinpoint-testbed/agent/lib/pinpoint-profiler-$VERSION.jar
rc=$?
if [[ $rc != 0 ]] ; then
        echo "OBFUSCATION FAILED $rc"
        exit $rc
fi
echo "...OK"

echo "Replace original rpc lib"
cp $HOME/pinpoint-rpc/target/pinpoint-rpc-$VERSION-obfuscated.jar $HOME/pinpoint-testbed/agent/lib/pinpoint-rpc-$VERSION.jar
rc=$?
if [[ $rc != 0 ]] ; then
        echo "OBFUSCATION FAILED $rc"
        exit $rc
fi
echo "...OK"

echo ""
echo "Backup agent is ..."
ls -al $HOME/pinpoint-testbed/agent-org

echo ""
echo "Obfuscated agent is ..."
ls -al $HOME/pinpoint-testbed/agent

echo "Everything is OK"<commit_msg>[유치수] [NOBTS] 난독화 후 결과 agent 하위 디렉토리까지 보여주도록 스크립트 수정.<commit_after>HOME="/Users/netspider/Documents/workspace_pinpoint"
VERSION="1.0.2-SNAPSHOT"

echo "Remove previous version"
#rm -fr $HOME/pinpoint-testbed/agent-obfuscated
rm -fr $HOME/pinpoint-testbed/agent-org
#mkdir $HOME/pinpoint-testbed/agent-obfuscated
mkdir $HOME/pinpoint-testbed/agent-org
echo "...OK"

echo "Backup original(not obfuscated) profiler"
cp $HOME/pinpoint-testbed/agent/pinpoint-bootstrap-$VERSION.jar $HOME/pinpoint-testbed/agent-org/
cp $HOME/pinpoint-testbed/agent/lib/pinpoint-profiler-$VERSION.jar $HOME/pinpoint-testbed/agent-org/
cp $HOME/pinpoint-testbed/agent/lib/pinpoint-rpc-$VERSION.jar $HOME/pinpoint-testbed/agent-org/
echo "...OK"

echo "Obfuscating"
# osx : rt.jar -> /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Classes/classes.jar
RT_JAR="/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/lib/rt.jar"
proguard.sh -libraryjars $RT_JAR @proguard-$VERSION.conf
echo "...OK"

echo "Replace original bootstrap"
cp $HOME/pinpoint-bootstrap/target/pinpoint-bootstrap-$VERSION-jar-with-dependencies-obfuscated.jar $HOME/pinpoint-testbed/agent/pinpoint-bootstrap-$VERSION.jar
rc=$?
if [[ $rc != 0 ]] ; then
        echo "OBFUSCATION FAILED $rc"
        exit $rc
fi
echo "...OK"

echo "Replace original profiler"
cp $HOME/pinpoint-profiler/target/pinpoint-profiler-$VERSION-obfuscated.jar $HOME/pinpoint-testbed/agent/lib/pinpoint-profiler-$VERSION.jar
rc=$?
if [[ $rc != 0 ]] ; then
        echo "OBFUSCATION FAILED $rc"
        exit $rc
fi
echo "...OK"

echo "Replace original rpc lib"
cp $HOME/pinpoint-rpc/target/pinpoint-rpc-$VERSION-obfuscated.jar $HOME/pinpoint-testbed/agent/lib/pinpoint-rpc-$VERSION.jar
rc=$?
if [[ $rc != 0 ]] ; then
        echo "OBFUSCATION FAILED $rc"
        exit $rc
fi
echo "...OK"

echo ""
echo "Backup agent is ..."
ls -lR $HOME/pinpoint-testbed/agent-org

echo ""
echo "Obfuscated agent is ..."
ls -lR $HOME/pinpoint-testbed/agent

echo "Everything is OK"
{'fraction_non_alphanumeric': 0.15498991935483872, 'fraction_numerical': 0.006048387096774193, 'mean_word_length': 4.114690721649485, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1488316', 'n_tokens_mistral': 1512, 'n_tokens_neox': 1513, 'n_words': 269}