Skip to content

Commit

Permalink
fix typos
Browse files Browse the repository at this point in the history
  • Loading branch information
hanada committed Aug 11, 2023
1 parent 62b3e17 commit caee1c9
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import com.iscas.crashtracker.base.MyConfig;
import com.iscas.crashtracker.client.exception.RelatedVarType;
import com.iscas.crashtracker.utils.FileUtils;
import com.iscas.crashtracker.utils.SootUtils;

import java.io.File;
import java.math.BigDecimal;
Expand All @@ -23,6 +24,7 @@ public void analyze() {

private void analyzeAllFiles() {
String folder = MyConfig.getInstance().getResultFolder() +"statistic" +File.separator;
FileUtils.createFolder(folder);
FileUtils.writeText2File( folder + "VarTypeStatistic.txt", "", false);
FileUtils.writeText2File( folder + "RankingStatistic-Category.txt", "", false);
FileUtils.writeText2File( folder + "RankingStatistic-RVType.txt", "", false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -573,7 +573,7 @@ private void getExceptionCondition(SootMethod sootMethod, Unit unit, ExceptionIn
JIdentityStmt stmt = (JIdentityStmt) predUnit;
if(stmt.getRightOp() instanceof CaughtExceptionRef){
exceptionInfo.addCaughtValues(stmt.getRightOp());
Log.error("1");
// Log.error("1");
//analyze the try-catch block of this exception
List<Unit> caughtUnits = getTryCatchUnits(sootMethod, predUnit);
SootClass caughtType = getCaughtExceptionType(sootMethod, predUnit);
Expand Down Expand Up @@ -646,7 +646,7 @@ private String extendRelatedValues(SootMethod sootMethod, List<Unit> allPreds, E
}else if(identityStmt.getRightOp() instanceof CaughtExceptionRef){
exceptionInfo.addCaughtValues(identityStmt.getRightOp());
//analyze the try-catch block of this exception
Log.error("2");
// Log.error("2");
List<Unit> caughtUnits = getTryCatchUnits(sootMethod, defUnit);
SootClass caughtType = getCaughtExceptionType(sootMethod, defUnit);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
public class BuggyStatisticTest {
@org.junit.Test
public void test() {
MyConfig.getInstance().setResultFolder("..\\results" + File.separator);
MyConfig.getInstance().setResultFolder("..\\LocalizationResults" + File.separator);
BuggyStatistic a = new BuggyStatistic();
a.analyze();
}
Expand Down
4 changes: 2 additions & 2 deletions scripts/runCrashTracker-Apk.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import threading
import time

reRun = True
reRun = False
filterList = list()

def isAPKisAnalyzed(resPath, name):
Expand Down Expand Up @@ -52,7 +52,7 @@ def analyzeApk(apkPath, resPath, sdk, frameworkVersion, strategy):
if apk[-4:] ==".apk":
resFile = outputDir + os.sep + apk[:-4] + os.sep +apk[:-4] + ".json"
if(reRun or not os.path.exists(resFile) or not isAPKisAnalyzed(resPath,apk[:-4])):
command = "java -jar "+jarFile+" -path "+ apkPath +" -name "+apk+" -androidJar "+ sdk +" "+ extraArgs +" -crashInput Files"+ os.sep +"crashInfo.json -exceptionInput ETSResults -client ApkCrashAnalysisClient" +" -outputDir "+outputDir #+ " >> "+logDir+ os.sep +jar[:-4]+".txt"
command = "java -jar "+jarFile+" -path "+ apkPath +" -name "+apk+" -androidJar "+ sdk +" "+ extraArgs +" -crashInput Files"+ os.sep +"crashInfo.json -exceptionInput ETSResults -client ApkCrashAnalysisClient" +" -outputDir "+outputDir + " >> "+logDir+ os.sep +apk[:-4]+".txt"
future1 = pool.submit(executeCmd, command)
pool.shutdown()

Expand Down
4 changes: 2 additions & 2 deletions scripts/runCrashTracker-Jar.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import threading
import time

reRun = True
reRun = False
filterList = list()

def isJarisAnalyzed(resPath, name):
Expand Down Expand Up @@ -52,7 +52,7 @@ def analyzeJar(jarPath, resPath, sdk, frameworkVersion, strategy):
resFile = outputDir + os.sep + jar[:-4] + os.sep +jar[:-4] + ".json"
analyzed = isJarisAnalyzed(resPath,jar[:-4])
if(reRun or not os.path.exists(resFile) or not analyzed ):
command = "java -jar "+jarFile+" -path "+ jarPath +" -name "+jar+" -androidJar "+ sdk +" "+ extraArgs +" -crashInput Files"+ os.sep +"crashInfo.json -exceptionInput ETSResults -client JarCrashAnalysisClient" +" -outputDir "+outputDir #+ " >> "+logDir+ os.sep +jar[:-4]+".txt"
command = "java -jar "+jarFile+" -path "+ jarPath +" -name "+jar+" -androidJar "+ sdk +" "+ extraArgs +" -crashInput Files"+ os.sep +"crashInfo.json -exceptionInput ETSResults -client JarCrashAnalysisClient" +" -outputDir "+outputDir + " >> "+logDir+ os.sep +jar[:-4]+".txt"
print(command + "@@@"+ str(analyzed))
future1 = pool.submit(executeCmd, command)
pool.shutdown()
Expand Down

0 comments on commit caee1c9

Please sign in to comment.