Skip to content

Commit 7d9c3be

Browse files
committed
Partial Solution for MO27 compilation errors
1 parent 17a73f4 commit 7d9c3be

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public boolean performMutation(MutationLocation location, BufferedWriter writer,
2424
CommonTree cast = ASTHelper.getFirstBrotherNamedOfType(smaliParser.I_STATEMENT_FORMAT21c_TYPE, "check-cast", parent);
2525
String varName = "";
2626
int position = -1;
27-
if(cast!=null) {
27+
if(cast!=null && (cast.getLine()-parent.getLine()<5)) {
2828
varName = cast.getChild(1).toString();
2929
position = cast.getLine();
3030
} else {
@@ -53,7 +53,7 @@ public boolean performMutation(MutationLocation location, BufferedWriter writer,
5353

5454
FileHelper.writeLines(location.getFilePath(), newLines);
5555
Helper.mutationSuccess(mutantIndex);
56-
Helper.writeBasicLogInfo(mutantIndex, location.getFilePath(), location.getType().getName(), new int[] {mLocation.getLine(), cast.getLine()}, writer);
56+
Helper.writeBasicLogInfo(mutantIndex, location.getFilePath(), location.getType().getName(), new int[] {mLocation.getLine(), position}, writer);
5757
writer.write(" For mutant "+mutantIndex+" the element retrieved at line "+location.getStartLine()+" has been set to null");
5858
writer.newLine();
5959
writer.flush();

0 commit comments

Comments
 (0)