AbstractCallableBit.java

1
package com.jsql.model.injection.strategy.blind.callable;
2
3
import java.util.concurrent.Callable;
4
5
/**
6
 * Callable used to read blind/time database information.
7
 */
8
public abstract class AbstractCallableBit<T extends AbstractCallableBit<T>> implements Callable<T> {
9
    
10
    /**
11
     * The URL called.
12
     */
13
    protected String booleanUrl;
14
    
15
    /**
16
     * Character position.
17
     */
18
    protected int currentIndex;
19
    
20
    /**
21
     * Bit searched.
22
     */
23
    protected int currentBit;
24
    protected int idPage = -1;
25
    protected int block = -1;
26
27
    /**
28
     * Default call used for bit test.
29
     */
30
    protected boolean isMultibit = false;
31
    protected boolean isBinary = false;
32
33
    /**
34
     * Character representation of Boolean bits
35
     */
36
    private String charText;
37
    
38
    /**
39
     * Check if a response time means the SQL query is true.
40
     * @return true if the current SQL test is confirmed
41
     */
42
    public abstract boolean isTrue();
43
    
44
    public int getCurrentIndex() {
45 1 1. getCurrentIndex : replaced int return with 0 for com/jsql/model/injection/strategy/blind/callable/AbstractCallableBit::getCurrentIndex → NO_COVERAGE
        return this.currentIndex;
46
    }
47
    
48
    public int getCurrentBit() {
49 1 1. getCurrentBit : replaced int return with 0 for com/jsql/model/injection/strategy/blind/callable/AbstractCallableBit::getCurrentBit → NO_COVERAGE
        return this.currentBit;
50
    }
51
52
    public String getCharText() {
53 1 1. getCharText : replaced return value with "" for com/jsql/model/injection/strategy/blind/callable/AbstractCallableBit::getCharText → NO_COVERAGE
        return this.charText;
54
    }
55
56
    public void setCharText(String charText) {
57
        this.charText = charText;
58
    }
59
60
    public boolean isMultibit() {
61 2 1. isMultibit : replaced boolean return with true for com/jsql/model/injection/strategy/blind/callable/AbstractCallableBit::isMultibit → NO_COVERAGE
2. isMultibit : replaced boolean return with false for com/jsql/model/injection/strategy/blind/callable/AbstractCallableBit::isMultibit → NO_COVERAGE
        return this.isMultibit;
62
    }
63
64
    public boolean isBinary() {
65 2 1. isBinary : replaced boolean return with false for com/jsql/model/injection/strategy/blind/callable/AbstractCallableBit::isBinary → NO_COVERAGE
2. isBinary : replaced boolean return with true for com/jsql/model/injection/strategy/blind/callable/AbstractCallableBit::isBinary → NO_COVERAGE
        return this.isBinary;
66
    }
67
68
    public int getBlock() {
69 1 1. getBlock : replaced int return with 0 for com/jsql/model/injection/strategy/blind/callable/AbstractCallableBit::getBlock → NO_COVERAGE
        return this.block;
70
    }
71
72
    public int getIdPage() {
73 1 1. getIdPage : replaced int return with 0 for com/jsql/model/injection/strategy/blind/callable/AbstractCallableBit::getIdPage → NO_COVERAGE
        return this.idPage;
74
    }
75
}

Mutations

45

1.1
Location : getCurrentIndex
Killed by : none
replaced int return with 0 for com/jsql/model/injection/strategy/blind/callable/AbstractCallableBit::getCurrentIndex → NO_COVERAGE

49

1.1
Location : getCurrentBit
Killed by : none
replaced int return with 0 for com/jsql/model/injection/strategy/blind/callable/AbstractCallableBit::getCurrentBit → NO_COVERAGE

53

1.1
Location : getCharText
Killed by : none
replaced return value with "" for com/jsql/model/injection/strategy/blind/callable/AbstractCallableBit::getCharText → NO_COVERAGE

61

1.1
Location : isMultibit
Killed by : none
replaced boolean return with true for com/jsql/model/injection/strategy/blind/callable/AbstractCallableBit::isMultibit → NO_COVERAGE

2.2
Location : isMultibit
Killed by : none
replaced boolean return with false for com/jsql/model/injection/strategy/blind/callable/AbstractCallableBit::isMultibit → NO_COVERAGE

65

1.1
Location : isBinary
Killed by : none
replaced boolean return with false for com/jsql/model/injection/strategy/blind/callable/AbstractCallableBit::isBinary → NO_COVERAGE

2.2
Location : isBinary
Killed by : none
replaced boolean return with true for com/jsql/model/injection/strategy/blind/callable/AbstractCallableBit::isBinary → NO_COVERAGE

69

1.1
Location : getBlock
Killed by : none
replaced int return with 0 for com/jsql/model/injection/strategy/blind/callable/AbstractCallableBit::getBlock → NO_COVERAGE

73

1.1
Location : getIdPage
Killed by : none
replaced int return with 0 for com/jsql/model/injection/strategy/blind/callable/AbstractCallableBit::getIdPage → NO_COVERAGE

Active mutators

Tests examined


Report generated by PIT 1.19.1