Skip to content

Bug: Incorrectly generate the original file if source file contains right-shift operators #15

Description

@MENG2010

Right-shift (>>) and Unsigned Right-shift (>>>) in the source file are replaced with greater-than sign (>) unexpectedly in original file (the file in "original" folder), so the bitwise operation expression becomes an invalid expression, and therefore the original file is incompatible and no mutants will be generated.

----a very simple example---

public class Demo {
    public int rightShift(int num, int bits) {
        int result = num >> bits;
        return results;
    }

    public int leftShift(int num, int bits) {
        int result = num << bits;
        return results;
    }
}

MuJava cannot generate mutants for this demo, due to an error:
xxxx/original/Demo.java: error: incompatible types: boolean cannot be converted to int
int result = num > bits;
................^

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions