Skip to content

Commit 85d7c06

Browse files
committed
First approach to solve MO20 compilation errors
1 parent 8fad91c commit 85d7c06

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

src/uniandes/tsdl/mutapk/operators/data/general/NullBackEndServiceReturn.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
import org.antlr.runtime.tree.CommonTree;
88

99
import uniandes.tsdl.antlr.smaliParser;
10+
import uniandes.tsdl.mutapk.helper.ASTHelper;
1011
import uniandes.tsdl.mutapk.helper.FileHelper;
1112
import uniandes.tsdl.mutapk.helper.Helper;
1213
import uniandes.tsdl.mutapk.helper.HexadecimalGenerator;
@@ -60,9 +61,10 @@ private void performMutationVariable(CommonTree tree, MutationLocation location,
6061
private void performMutationParam(CommonTree tree, MutationLocation location, List<String> newLines, List<String> lines) {
6162
// TODO Auto-generated method stub
6263

63-
CommonTree brother = (CommonTree) tree.getParent().getChild(tree.getChildIndex()+1);
64+
CommonTree brother = ASTHelper.getFirstBrotherNamedOfType(smaliParser.I_STATEMENT_FORMAT11x, "move-result-object", tree);
6465
String varName = brother.getChild(1).toString();
6566

67+
6668
for(int i=0; i < brother.getLine(); i++){
6769
newLines.add(lines.get(i));
6870
}

test/operators.properties

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,7 @@
22
# 15 = BluetoothAdapterAlwaysEnabled
33
# 31 = InvalidIDFindView
44
# 2 = DifferentActivityIntentDefinition
5-
4 = InvalidKeyIntentPutExtra
5+
#4 = InvalidKeyIntentPutExtra
6+
#17 = InvalidURI
7+
#28 = InvalidColor
8+
20 = NullBackEndServiceReturn

0 commit comments

Comments
 (0)