StringUtils.java

1
// Copyright © 2004-2006 University of Helsinki, Department of Computer Science
2
// Copyright © 2012 various contributors
3
// This software is released under GNU Lesser General Public License 2.1.
4
// The license text is at http://www.gnu.org/licenses/lgpl-2.1.html
5
6
package fi.helsinki.cs.titokone;
7
8
public class StringUtils {
9
10
    /**
11
     * This method converts int values to binary-string. intToBinary(1,2) --> "01"
12
     *
13
     * @param value Int value to be converted.
14
     * @param bits  How many bits can be used .
15
     * @return String representation of a said Int.
16
     */
17
    public static String intToBinary(long value, int bits) {
18
/* if bits too few, i.e. 10,2 then result is "11" */
19
        char[] returnValue = new char[bits];
20 2
        boolean wasNegative = false;
21
22 4
        if (value < 0) {
23 2
            wasNegative = true;
24 3
            ++value;
25 3
            value = (value * -1);
26
        }
27
28
29 5
        for (int i = 0; i < bits; ++i) {
30 2
            returnValue[i] = '0';
31
        }
32
33 8
        for (int i = returnValue.length - 1; i > -1; --i) {
34 8
            if (value >= (int) Math.pow(2.0, i * 1.0)) {
35 6
                returnValue[returnValue.length - 1 - i] = '1';
36 7
                value = value - (int) Math.pow(2.0, i * 1.0);
37
            }
38
        }
39
40 1
        if (wasNegative) {
41 5
            for (int i = 0; i < returnValue.length; ++i) {
42 3
                if (returnValue[i] == '0') {
43 2
                    returnValue[i] = '1';
44
                } else {
45 2
                    returnValue[i] = '0';
46
                }
47
            }
48
        }
49
50 2
        return new String(returnValue);
51
    }
52
53
    /**
54
     * This method converts String that contains a binary to int. binaryToInt("01") --> 1
55
     *
56
     * @param binaryValue  String representing the binary, if other than {0,1} then null.
57
     * @param signIncluded Boolean value telling whether 11 is -1 or 3 i.e. will the leading
58
     *                     one be interpreted as sign-bit.
59
     * @return Int value of a Binary.
60
     */
61
    public static int binaryToInt(String binaryValue, boolean signIncluded) {
62
/*  returns 0 when error! exception perhaps? */
63 2
        boolean isNegative = false;
64 2
        int value = 0;
65
66 1
        if (signIncluded) {
67 6
            if (binaryValue.charAt(0) == '1') {
68 2
                isNegative = true;
69 5
                binaryValue = binaryValue.replace('1', '2');
70 5
                binaryValue = binaryValue.replace('0', '1');
71 5
                binaryValue = binaryValue.replace('2', '0');
72
            }
73
        }
74
75 6
        for (int i = 0; i < binaryValue.length(); ++i) {
76 9
            if (binaryValue.charAt(binaryValue.length() - 1 - i) == '1') {
77 7
                value = value + (int) Math.pow(2.0, i * 1.0);
78
            } else {
79 9
                if (binaryValue.charAt(binaryValue.length() - 1 - i) != '0') {
80 3
                    return 0;
81
                }
82
            }
83
        }
84
85 1
        if (isNegative) {
86 6
            value = (value + 1) * -1;
87
        }
88 1
        return value;
89
    }
90
}

Mutations

20

Substituted 0 with 1 : KILLED -> fi.helsinki.cs.titokone.BinaryInterpreterTest.testGetAddressFrombinary(fi.helsinki.cs.titokone.BinaryInterpreterTest)

Substituted 0 with 1 : KILLED -> fi.helsinki.cs.titokone.BinaryInterpreterTest.testGetAddressFrombinary(fi.helsinki.cs.titokone.BinaryInterpreterTest)

22

changed conditional boundary : KILLED -> fi.helsinki.cs.titokone.BinaryTest.testBinaryToApplication(fi.helsinki.cs.titokone.BinaryTest)

Substituted 0 with 1 : KILLED -> fi.helsinki.cs.titokone.BinaryTest.testBinaryToApplication(fi.helsinki.cs.titokone.BinaryTest)

Substituted 0 with 1 : KILLED -> fi.helsinki.cs.titokone.BinaryTest.testBinaryToApplication(fi.helsinki.cs.titokone.BinaryTest)

negated conditional : KILLED -> fi.helsinki.cs.titokone.BinaryInterpreterTest.testGetAddressFrombinary(fi.helsinki.cs.titokone.BinaryInterpreterTest)

23

Substituted 1 with 0 : NO_COVERAGE

Substituted 1 with 0 : NO_COVERAGE

24

Substituted 1 with 2 : NO_COVERAGE

Substituted 1 with 0.0 : NO_COVERAGE

Replaced long addition with subtraction : NO_COVERAGE

25

Substituted -1 with 0 : NO_COVERAGE

Replaced constant value of -1 with 0 : NO_COVERAGE

Replaced long multiplication with division : NO_COVERAGE

29

Substituted 0 with 1 : KILLED -> fi.helsinki.cs.titokone.BinaryInterpreterTest.testGetAddressFrombinary(fi.helsinki.cs.titokone.BinaryInterpreterTest)

Substituted 0 with 1 : KILLED -> fi.helsinki.cs.titokone.BinaryInterpreterTest.testGetAddressFrombinary(fi.helsinki.cs.titokone.BinaryInterpreterTest)

Changed increment from 1 to -1 : KILLED -> fi.helsinki.cs.titokone.BinaryInterpreterTest.testGetAddressFrombinary(fi.helsinki.cs.titokone.BinaryInterpreterTest)

negated conditional : KILLED -> fi.helsinki.cs.titokone.BinaryInterpreterTest.testGetAddressFrombinary(fi.helsinki.cs.titokone.BinaryInterpreterTest)

changed conditional boundary : KILLED -> fi.helsinki.cs.titokone.BinaryInterpreterTest.testGetAddressFrombinary(fi.helsinki.cs.titokone.BinaryInterpreterTest)

30

Substituted 48 with 49 : KILLED -> fi.helsinki.cs.titokone.BinaryInterpreterTest.testGetAddressFrombinary(fi.helsinki.cs.titokone.BinaryInterpreterTest)

Replaced constant value of 48 with 49 : KILLED -> fi.helsinki.cs.titokone.BinaryInterpreterTest.testGetAddressFrombinary(fi.helsinki.cs.titokone.BinaryInterpreterTest)

33

Replaced integer subtraction with addition : SURVIVED

Substituted -1 with 1 : KILLED -> fi.helsinki.cs.titokone.BinaryInterpreterTest.testGetAddressFrombinary(fi.helsinki.cs.titokone.BinaryInterpreterTest)

changed conditional boundary : KILLED -> fi.helsinki.cs.titokone.BinaryInterpreterTest.testGetAddressFrombinary(fi.helsinki.cs.titokone.BinaryInterpreterTest)

Changed increment from -1 to 1 : TIMED_OUT

Substituted -1 with 0 : KILLED -> fi.helsinki.cs.titokone.BinaryInterpreterTest.testGetAddressFrombinary(fi.helsinki.cs.titokone.BinaryInterpreterTest)

Substituted 1 with 0 : SURVIVED

negated conditional : KILLED -> fi.helsinki.cs.titokone.BinaryInterpreterTest.testGetAddressFrombinary(fi.helsinki.cs.titokone.BinaryInterpreterTest)

Substituted 1 with 0 : SURVIVED

34

removed call to java/lang/Math::pow : KILLED -> fi.helsinki.cs.titokone.BinaryInterpreterTest.testGetAddressFrombinary(fi.helsinki.cs.titokone.BinaryInterpreterTest)

negated conditional : KILLED -> fi.helsinki.cs.titokone.BinaryInterpreterTest.testGetAddressFrombinary(fi.helsinki.cs.titokone.BinaryInterpreterTest)

Substituted 1.0 with 0.0 : KILLED -> fi.helsinki.cs.titokone.BinaryInterpreterTest.testGetAddressFrombinary(fi.helsinki.cs.titokone.BinaryInterpreterTest)

Replaced constant value of 2.0 with 1.0 : KILLED -> fi.helsinki.cs.titokone.BinaryInterpreterTest.testGetAddressFrombinary(fi.helsinki.cs.titokone.BinaryInterpreterTest)

Substituted 2.0 with 1.0 : KILLED -> fi.helsinki.cs.titokone.BinaryInterpreterTest.testGetAddressFrombinary(fi.helsinki.cs.titokone.BinaryInterpreterTest)

changed conditional boundary : KILLED -> fi.helsinki.cs.titokone.BinaryInterpreterTest.testGetAddressFrombinary(fi.helsinki.cs.titokone.BinaryInterpreterTest)

Substituted 1.0 with 2.0 : KILLED -> fi.helsinki.cs.titokone.BinaryInterpreterTest.testGetAddressFrombinary(fi.helsinki.cs.titokone.BinaryInterpreterTest)

Replaced double multiplication with division : SURVIVED

35

Replaced constant value of 49 with 50 : KILLED -> fi.helsinki.cs.titokone.BinaryInterpreterTest.testGetAddressFrombinary(fi.helsinki.cs.titokone.BinaryInterpreterTest)

Substituted 1 with 0 : KILLED -> fi.helsinki.cs.titokone.BinaryInterpreterTest.testGetAddressFrombinary(fi.helsinki.cs.titokone.BinaryInterpreterTest)

Replaced integer subtraction with addition : KILLED -> fi.helsinki.cs.titokone.BinaryInterpreterTest.testGetAddressFrombinary(fi.helsinki.cs.titokone.BinaryInterpreterTest)

Substituted 1 with 0 : KILLED -> fi.helsinki.cs.titokone.BinaryInterpreterTest.testGetAddressFrombinary(fi.helsinki.cs.titokone.BinaryInterpreterTest)

Replaced integer subtraction with addition : KILLED -> fi.helsinki.cs.titokone.BinaryInterpreterTest.testGetAddressFrombinary(fi.helsinki.cs.titokone.BinaryInterpreterTest)

Substituted 49 with 50 : KILLED -> fi.helsinki.cs.titokone.BinaryInterpreterTest.testGetAddressFrombinary(fi.helsinki.cs.titokone.BinaryInterpreterTest)

36

Substituted 2.0 with 1.0 : KILLED -> fi.helsinki.cs.titokone.BinaryInterpreterTest.testGetAddressFrombinary(fi.helsinki.cs.titokone.BinaryInterpreterTest)

Substituted 1.0 with 2.0 : KILLED -> fi.helsinki.cs.titokone.BinaryInterpreterTest.testGetAddressFrombinary(fi.helsinki.cs.titokone.BinaryInterpreterTest)

removed call to java/lang/Math::pow : KILLED -> fi.helsinki.cs.titokone.BinaryInterpreterTest.testGetAddressFrombinary(fi.helsinki.cs.titokone.BinaryInterpreterTest)

Substituted 1.0 with 0.0 : KILLED -> fi.helsinki.cs.titokone.BinaryInterpreterTest.testGetAddressFrombinary(fi.helsinki.cs.titokone.BinaryInterpreterTest)

Replaced long subtraction with addition : KILLED -> fi.helsinki.cs.titokone.BinaryInterpreterTest.testGetAddressFrombinary(fi.helsinki.cs.titokone.BinaryInterpreterTest)

Replaced constant value of 2.0 with 1.0 : KILLED -> fi.helsinki.cs.titokone.BinaryInterpreterTest.testGetAddressFrombinary(fi.helsinki.cs.titokone.BinaryInterpreterTest)

Replaced double multiplication with division : SURVIVED

40

negated conditional : KILLED -> fi.helsinki.cs.titokone.BinaryInterpreterTest.testGetAddressFrombinary(fi.helsinki.cs.titokone.BinaryInterpreterTest)

41

Substituted 0 with 1 : NO_COVERAGE

negated conditional : NO_COVERAGE

changed conditional boundary : NO_COVERAGE

Substituted 0 with 1 : NO_COVERAGE

Changed increment from 1 to -1 : NO_COVERAGE

42

Substituted 48 with 49 : NO_COVERAGE

Replaced constant value of 48 with 49 : NO_COVERAGE

negated conditional : NO_COVERAGE

43

Substituted 49 with 50 : NO_COVERAGE

Replaced constant value of 49 with 50 : NO_COVERAGE

45

Replaced constant value of 48 with 49 : NO_COVERAGE

Substituted 48 with 49 : NO_COVERAGE

50

mutated return of Object value for fi/helsinki/cs/titokone/StringUtils::intToBinary to ( if (x != null) null else throw new RuntimeException ) : KILLED -> fi.helsinki.cs.titokone.BinaryInterpreterTest.testGetAddressFrombinary(fi.helsinki.cs.titokone.BinaryInterpreterTest)

removed call to java/lang/String::<init> : KILLED -> fi.helsinki.cs.titokone.BinaryInterpreterTest.testGetAddressFrombinary(fi.helsinki.cs.titokone.BinaryInterpreterTest)

63

Substituted 0 with 1 : KILLED -> fi.helsinki.cs.titokone.BinaryInterpreterTest.testGetAddressFrombinary(fi.helsinki.cs.titokone.BinaryInterpreterTest)

Substituted 0 with 1 : KILLED -> fi.helsinki.cs.titokone.BinaryInterpreterTest.testGetAddressFrombinary(fi.helsinki.cs.titokone.BinaryInterpreterTest)

64

Substituted 0 with 1 : KILLED -> fi.helsinki.cs.titokone.BinaryInterpreterTest.testGetAddressFrombinary(fi.helsinki.cs.titokone.BinaryInterpreterTest)

Substituted 0 with 1 : KILLED -> fi.helsinki.cs.titokone.BinaryInterpreterTest.testGetAddressFrombinary(fi.helsinki.cs.titokone.BinaryInterpreterTest)

66

negated conditional : KILLED -> fi.helsinki.cs.titokone.BinaryInterpreterTest.testGetAddressFrombinary(fi.helsinki.cs.titokone.BinaryInterpreterTest)

67

Substituted 0 with 1 : KILLED -> fi.helsinki.cs.titokone.BinaryInterpreterTest.testGetAddressFrombinary(fi.helsinki.cs.titokone.BinaryInterpreterTest)

negated conditional : KILLED -> fi.helsinki.cs.titokone.BinaryInterpreterTest.testGetAddressFrombinary(fi.helsinki.cs.titokone.BinaryInterpreterTest)

removed call to java/lang/String::charAt : KILLED -> fi.helsinki.cs.titokone.BinaryInterpreterTest.testGetAddressFrombinary(fi.helsinki.cs.titokone.BinaryInterpreterTest)

Substituted 49 with 50 : KILLED -> fi.helsinki.cs.titokone.BinaryInterpreterTest.testGetAddressFrombinary(fi.helsinki.cs.titokone.BinaryInterpreterTest)

Substituted 0 with 1 : KILLED -> fi.helsinki.cs.titokone.BinaryInterpreterTest.testGetAddressFrombinary(fi.helsinki.cs.titokone.BinaryInterpreterTest)

Replaced constant value of 49 with 50 : KILLED -> fi.helsinki.cs.titokone.BinaryInterpreterTest.testGetAddressFrombinary(fi.helsinki.cs.titokone.BinaryInterpreterTest)

68

Substituted 1 with 0 : KILLED -> fi.helsinki.cs.titokone.BinaryInterpreterTest.testGetAddressFrombinary(fi.helsinki.cs.titokone.BinaryInterpreterTest)

Substituted 1 with 0 : KILLED -> fi.helsinki.cs.titokone.BinaryInterpreterTest.testGetAddressFrombinary(fi.helsinki.cs.titokone.BinaryInterpreterTest)

69

Replaced constant value of 49 with 50 : KILLED -> fi.helsinki.cs.titokone.BinaryInterpreterTest.testGetAddressFrombinary(fi.helsinki.cs.titokone.BinaryInterpreterTest)

Substituted 49 with 50 : KILLED -> fi.helsinki.cs.titokone.BinaryInterpreterTest.testGetAddressFrombinary(fi.helsinki.cs.titokone.BinaryInterpreterTest)

removed call to java/lang/String::replace : KILLED -> fi.helsinki.cs.titokone.BinaryInterpreterTest.testGetAddressFrombinary(fi.helsinki.cs.titokone.BinaryInterpreterTest)

Replaced constant value of 50 with 51 : KILLED -> fi.helsinki.cs.titokone.BinaryInterpreterTest.testGetAddressFrombinary(fi.helsinki.cs.titokone.BinaryInterpreterTest)

Substituted 50 with 51 : KILLED -> fi.helsinki.cs.titokone.BinaryInterpreterTest.testGetAddressFrombinary(fi.helsinki.cs.titokone.BinaryInterpreterTest)

70

removed call to java/lang/String::replace : KILLED -> fi.helsinki.cs.titokone.BinaryInterpreterTest.testGetAddressFrombinary(fi.helsinki.cs.titokone.BinaryInterpreterTest)

Substituted 49 with 50 : KILLED -> fi.helsinki.cs.titokone.BinaryInterpreterTest.testGetAddressFrombinary(fi.helsinki.cs.titokone.BinaryInterpreterTest)

Replaced constant value of 49 with 50 : KILLED -> fi.helsinki.cs.titokone.BinaryInterpreterTest.testGetAddressFrombinary(fi.helsinki.cs.titokone.BinaryInterpreterTest)

Replaced constant value of 48 with 49 : KILLED -> fi.helsinki.cs.titokone.BinaryInterpreterTest.testGetAddressFrombinary(fi.helsinki.cs.titokone.BinaryInterpreterTest)

Substituted 48 with 49 : KILLED -> fi.helsinki.cs.titokone.BinaryInterpreterTest.testGetAddressFrombinary(fi.helsinki.cs.titokone.BinaryInterpreterTest)

71

Substituted 48 with 49 : KILLED -> fi.helsinki.cs.titokone.BinaryInterpreterTest.testGetAddressFrombinary(fi.helsinki.cs.titokone.BinaryInterpreterTest)

Replaced constant value of 50 with 51 : KILLED -> fi.helsinki.cs.titokone.BinaryInterpreterTest.testGetAddressFrombinary(fi.helsinki.cs.titokone.BinaryInterpreterTest)

Substituted 50 with 51 : KILLED -> fi.helsinki.cs.titokone.BinaryInterpreterTest.testGetAddressFrombinary(fi.helsinki.cs.titokone.BinaryInterpreterTest)

Replaced constant value of 48 with 49 : KILLED -> fi.helsinki.cs.titokone.BinaryInterpreterTest.testGetAddressFrombinary(fi.helsinki.cs.titokone.BinaryInterpreterTest)

removed call to java/lang/String::replace : KILLED -> fi.helsinki.cs.titokone.BinaryInterpreterTest.testGetAddressFrombinary(fi.helsinki.cs.titokone.BinaryInterpreterTest)

75

Changed increment from 1 to -1 : KILLED -> fi.helsinki.cs.titokone.BinaryInterpreterTest.testGetAddressFrombinary(fi.helsinki.cs.titokone.BinaryInterpreterTest)

removed call to java/lang/String::length : KILLED -> fi.helsinki.cs.titokone.BinaryInterpreterTest.testGetAddressFrombinary(fi.helsinki.cs.titokone.BinaryInterpreterTest)

Substituted 0 with 1 : KILLED -> fi.helsinki.cs.titokone.BinaryInterpreterTest.testGetAddressFrombinary(fi.helsinki.cs.titokone.BinaryInterpreterTest)

changed conditional boundary : KILLED -> fi.helsinki.cs.titokone.BinaryInterpreterTest.testGetAddressFrombinary(fi.helsinki.cs.titokone.BinaryInterpreterTest)

Substituted 0 with 1 : KILLED -> fi.helsinki.cs.titokone.BinaryInterpreterTest.testGetAddressFrombinary(fi.helsinki.cs.titokone.BinaryInterpreterTest)

negated conditional : KILLED -> fi.helsinki.cs.titokone.BinaryInterpreterTest.testGetAddressFrombinary(fi.helsinki.cs.titokone.BinaryInterpreterTest)

76

removed call to java/lang/String::charAt : KILLED -> fi.helsinki.cs.titokone.BinaryInterpreterTest.testGetAddressFrombinary(fi.helsinki.cs.titokone.BinaryInterpreterTest)

Replaced constant value of 49 with 50 : KILLED -> fi.helsinki.cs.titokone.BinaryInterpreterTest.testGetAddressFrombinary(fi.helsinki.cs.titokone.BinaryInterpreterTest)

removed call to java/lang/String::length : KILLED -> fi.helsinki.cs.titokone.BinaryInterpreterTest.testGetAddressFrombinary(fi.helsinki.cs.titokone.BinaryInterpreterTest)

Substituted 49 with 50 : KILLED -> fi.helsinki.cs.titokone.BinaryInterpreterTest.testGetAddressFrombinary(fi.helsinki.cs.titokone.BinaryInterpreterTest)

Substituted 1 with 0 : KILLED -> fi.helsinki.cs.titokone.BinaryInterpreterTest.testGetAddressFrombinary(fi.helsinki.cs.titokone.BinaryInterpreterTest)

Replaced integer subtraction with addition : KILLED -> fi.helsinki.cs.titokone.BinaryInterpreterTest.testGetAddressFrombinary(fi.helsinki.cs.titokone.BinaryInterpreterTest)

Replaced integer subtraction with addition : KILLED -> fi.helsinki.cs.titokone.BinaryInterpreterTest.testGetAddressFrombinary(fi.helsinki.cs.titokone.BinaryInterpreterTest)

negated conditional : KILLED -> fi.helsinki.cs.titokone.BinaryInterpreterTest.testGetAddressFrombinary(fi.helsinki.cs.titokone.BinaryInterpreterTest)

Substituted 1 with 0 : KILLED -> fi.helsinki.cs.titokone.BinaryInterpreterTest.testGetAddressFrombinary(fi.helsinki.cs.titokone.BinaryInterpreterTest)

77

removed call to java/lang/Math::pow : KILLED -> fi.helsinki.cs.titokone.BinaryInterpreterTest.testGetAddressFrombinary(fi.helsinki.cs.titokone.BinaryInterpreterTest)

Replaced integer addition with subtraction : KILLED -> fi.helsinki.cs.titokone.BinaryInterpreterTest.testGetAddressFrombinary(fi.helsinki.cs.titokone.BinaryInterpreterTest)

Substituted 1.0 with 2.0 : KILLED -> fi.helsinki.cs.titokone.BinaryInterpreterTest.testGetAddressFrombinary(fi.helsinki.cs.titokone.BinaryInterpreterTest)

Substituted 2.0 with 1.0 : KILLED -> fi.helsinki.cs.titokone.BinaryInterpreterTest.testGetAddressFrombinary(fi.helsinki.cs.titokone.BinaryInterpreterTest)

Substituted 1.0 with 0.0 : KILLED -> fi.helsinki.cs.titokone.BinaryInterpreterTest.testGetAddressFrombinary(fi.helsinki.cs.titokone.BinaryInterpreterTest)

Replaced double multiplication with division : SURVIVED

Replaced constant value of 2.0 with 1.0 : KILLED -> fi.helsinki.cs.titokone.BinaryInterpreterTest.testGetAddressFrombinary(fi.helsinki.cs.titokone.BinaryInterpreterTest)

79

Substituted 48 with 49 : KILLED -> fi.helsinki.cs.titokone.BinaryInterpreterTest.testGetAddressFrombinary(fi.helsinki.cs.titokone.BinaryInterpreterTest)

negated conditional : KILLED -> fi.helsinki.cs.titokone.BinaryInterpreterTest.testGetAddressFrombinary(fi.helsinki.cs.titokone.BinaryInterpreterTest)

Substituted 1 with 0 : KILLED -> fi.helsinki.cs.titokone.BinaryInterpreterTest.testGetAddressFrombinary(fi.helsinki.cs.titokone.BinaryInterpreterTest)

removed call to java/lang/String::length : KILLED -> fi.helsinki.cs.titokone.BinaryInterpreterTest.testGetAddressFrombinary(fi.helsinki.cs.titokone.BinaryInterpreterTest)

Replaced constant value of 48 with 49 : KILLED -> fi.helsinki.cs.titokone.BinaryInterpreterTest.testGetAddressFrombinary(fi.helsinki.cs.titokone.BinaryInterpreterTest)

removed call to java/lang/String::charAt : KILLED -> fi.helsinki.cs.titokone.BinaryInterpreterTest.testGetAddressFrombinary(fi.helsinki.cs.titokone.BinaryInterpreterTest)

Substituted 1 with 0 : KILLED -> fi.helsinki.cs.titokone.BinaryInterpreterTest.testGetAddressFrombinary(fi.helsinki.cs.titokone.BinaryInterpreterTest)

Replaced integer subtraction with addition : KILLED -> fi.helsinki.cs.titokone.BinaryInterpreterTest.testGetAddressFrombinary(fi.helsinki.cs.titokone.BinaryInterpreterTest)

Replaced integer subtraction with addition : KILLED -> fi.helsinki.cs.titokone.BinaryInterpreterTest.testGetAddressFrombinary(fi.helsinki.cs.titokone.BinaryInterpreterTest)

80

Substituted 0 with 1 : NO_COVERAGE

replaced return of integer sized value with (x == 0 ? 1 : 0) : NO_COVERAGE

Substituted 0 with 1 : NO_COVERAGE

85

negated conditional : KILLED -> fi.helsinki.cs.titokone.BinaryInterpreterTest.testGetAddressFrombinary(fi.helsinki.cs.titokone.BinaryInterpreterTest)

86

Replaced integer multiplication with division : SURVIVED

Substituted 1 with 0 : KILLED -> fi.helsinki.cs.titokone.BinaryInterpreterTest.testGetAddressFrombinary(fi.helsinki.cs.titokone.BinaryInterpreterTest)

Replaced integer addition with subtraction : KILLED -> fi.helsinki.cs.titokone.BinaryInterpreterTest.testGetAddressFrombinary(fi.helsinki.cs.titokone.BinaryInterpreterTest)

Substituted -1 with 1 : KILLED -> fi.helsinki.cs.titokone.BinaryInterpreterTest.testGetAddressFrombinary(fi.helsinki.cs.titokone.BinaryInterpreterTest)

Substituted 1 with 0 : KILLED -> fi.helsinki.cs.titokone.BinaryInterpreterTest.testGetAddressFrombinary(fi.helsinki.cs.titokone.BinaryInterpreterTest)

Substituted -1 with 0 : KILLED -> fi.helsinki.cs.titokone.BinaryInterpreterTest.testGetAddressFrombinary(fi.helsinki.cs.titokone.BinaryInterpreterTest)

88

replaced return of integer sized value with (x == 0 ? 1 : 0) : KILLED -> fi.helsinki.cs.titokone.BinaryInterpreterTest.testGetAddressFrombinary(fi.helsinki.cs.titokone.BinaryInterpreterTest)

Active mutators

Tests examined


Report generated by PIT 0.27