Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
MENG2010 opened this issue Jan 15, 2018 · 0 comments

Comments

@MENG2010
Copy link

MENG2010 commented Jan 15, 2018

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;
................^

@MENG2010 MENG2010 changed the title Bug generating original file if source file contains right-shift operators Bug: Incorrectly generate the original file if source file contains right-shift operators Jan 16, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant