Skip to content

Commit fd8213e

Browse files
committed
First approach to solve MO4 compilation errors
1 parent 683d4ad commit fd8213e

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

src/uniandes/tsdl/mutapk/operators/activity/InvalidKeyIntentPutExtra.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
import org.antlr.runtime.tree.CommonTree;
99

10+
import uniandes.tsdl.antlr.smaliParser;
1011
import uniandes.tsdl.mutapk.helper.FileHelper;
1112
import uniandes.tsdl.mutapk.helper.Helper;
1213
import uniandes.tsdl.mutapk.helper.StringGenerator;
@@ -20,7 +21,6 @@ public boolean performMutation(MutationLocation location, BufferedWriter writer,
2021

2122
ASTMutationLocation mLocation = (ASTMutationLocation) location;
2223
CommonTree parent = (CommonTree) mLocation.getTree().getParent();
23-
// System.out.println(parent.toStringTree());
2424
List<CommonTree> hijos = (List<CommonTree>)parent.getChildren();
2525
String extraKeyVar = hijos.get(1).getChild(1).toString();
2626
CommonTree method = (CommonTree) parent.getParent();
@@ -29,11 +29,12 @@ public boolean performMutation(MutationLocation location, BufferedWriter writer,
2929
boolean finished = false;
3030
for (int i = putExtraPos; i >-1 && !finished; i--) {
3131
CommonTree temp = (CommonTree) method.getChild(i);
32-
if(temp.getType()==140 && temp.getChild(1).toString().equals(extraKeyVar)) {
32+
if(temp.getType()==smaliParser.I_STATEMENT_FORMAT21c_STRING && temp.getChild(1).toString().equals(extraKeyVar)) {
3333
extraKeyValPos = temp.getLine();
3434
finished = true;
3535
}
3636
}
37+
3738
String newKey = StringGenerator.generateRandomString();
3839

3940
List<String> newLines = new ArrayList<String>();

test/MutAPK-0.0.1.jar

-135 Bytes
Binary file not shown.

test/operators.properties

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# 30 = BuggyGUIListener
22
# 15 = BluetoothAdapterAlwaysEnabled
33
# 31 = InvalidIDFindView
4-
2 = DifferentActivityIntentDefinition
4+
# 2 = DifferentActivityIntentDefinition
5+
4 = InvalidKeyIntentPutExtra

0 commit comments

Comments
 (0)