Skip to content

Commit 360efd6

Browse files
committed
Fix InvalidIDFindView error
1 parent 106b19e commit 360efd6

File tree

56 files changed

+8
-2
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+8
-2
lines changed

src/uniandes/tsdl/mutapk/helper/APKToolWrapper.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
import java.io.IOException;
55
import java.io.InputStream;
66
import uniandes.tsdl.mutapk.helper.Helper;
7+
8+
import java.nio.file.Files;
79
import java.nio.file.Paths;
810

911
public class APKToolWrapper {
@@ -37,7 +39,11 @@ public static void buildAPK(String path, String extraPath, String appName, int m
3739
Process ps = Runtime.getRuntime().exec(new String[]{"java","-jar",Paths.get(decodedPath,extraPath,"apktool.jar").toAbsolutePath().toString(),"b",Paths.get(decodedPath,path,"src").toAbsolutePath().toString(),"-o",Paths.get(decodedPath,path,appName).toAbsolutePath().toString(),"-f"});
3840
System.out.println("Building mutant "+mutantIndex+"...");
3941
ps.waitFor();
40-
System.out.println("The "+mutantIndex+" mutant APK has been generated.");
42+
if(Files.exists(Paths.get(decodedPath,path,appName).toAbsolutePath())) {
43+
System.out.println("SUCCESS: The "+mutantIndex+" mutant APK has been generated.");
44+
} else {
45+
System.out.println("ERROR: The "+mutantIndex+" mutant APK has not been generated.");
46+
}
4147
// InputStream es = ps.getErrorStream();
4248
// byte e[] = new byte[es.available()];
4349
// es.read(e,0,e.length);

src/uniandes/tsdl/mutapk/operators/gui/android/InvalidIDFindView.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public boolean performMutation(MutationLocation location, BufferedWriter writer,
3333

3434
//Apply mutation
3535
newLines.add("");
36-
newLines.add(" const/16 "+constVarName+", 0x"+HexadecimalGenerator.generateRandomHexa());
36+
newLines.add(" const "+constVarName+", 0x"+HexadecimalGenerator.generateRandomHexa());
3737
newLines.add("");
3838

3939
for(int i=uncle.getLine(); i < lines.size() ; i++){
186 KB
Binary file not shown.
1.66 MB
Binary file not shown.
80.3 KB
Binary file not shown.
97.3 KB
Binary file not shown.
1.13 MB
Binary file not shown.
890 KB
Binary file not shown.
45.7 KB
Binary file not shown.
52.2 KB
Binary file not shown.

0 commit comments

Comments
 (0)