Manually Seeded Faults for PDFBox 1.1.0

1. Mutation points (a mutation point is the number of the Jimple statement where the change is made) are randomly picked.

Mutation point

Location

#covering test cases

(total 32 tests)

22034

<org.apache.pdfbox.cos.COSString: java.lang.String getString()> - if $r5 != null goto r1 = "ISO-8859-1"

6 (test No. 20,22,23,24,25,29)

13134

<org.apache.jempbox.xmp.XMPSchema: java.lang.String getTextProperty(java.lang.String)> - $z0 = interfaceinvoke $r4.<org.w3c.dom.Element: boolean hasAttribute(java.lang.String)>(r1)

2 (test No. 18,28)

4028

<org.apache.fontbox.cff.CharStringCommand$Key: boolean equals(java.lang.Object)> - if $i3 <= 1 goto $r9 = r0.<org.apache.fontbox.cff.CharStringCommand$Key: int[] keyValues>

1 (test No. 4)

32102

<org.apache.pdfbox.pdfparser.BaseParser: org.apache.pdfbox.cos.COSString parseCOSString()> - i3 = 1

5 (test No. 20,22,23,24,25)

34315

<org.apache.pdfbox.pdfwriter.COSStandardOutputStream: boolean isOnNewLine()> - $z0 = r0.<org.apache.pdfbox.pdfwriter.COSStandardOutputStream: boolean onNewLine>

3 (test No. 20,24,25)

31128

<org.apache.pdfbox.io.RandomAccessFileInputStream: int available()> - $l2 = $l0 - $l1

3 (test No. 20,24,25 affected)

21486

<org.apache.pdfbox.cos.COSName: void <clinit>()> - specialinvoke $r154.<org.apache.pdfbox.cos.COSName: void <init>(java.lang.String)>("Type")

7 (test No. 20,24,25)

(tests 2, 14, 15, 22, 23 also covered but not affected)

2. Changes are seeded manually by using the “five most effective” mutation operators, which are chosen randomly (full seed names are v0-s$sid) to be applied to each seed

Seeded change

(each guaranteed to be a bug, namely a difference-revealing change)

Mutation point

Mutation operator applied

1

pdfbox/src/main/java/org/apache/pdfbox/cos/COSString.java:224

if (this.str != null) -> if (this.str == null)

22034

4 Relational Operator Replace (ROR)

2

jempbox/src/main/java/org/apache/jempbox/xmp/XMPSchema.java:207

schema.hasAttribute(propertyName) ->

!schema.hasAttribute(propertyName)

13134

5 Unary Operator Insertion (UOI)

3

fontbox/src/main/java/org/apache/fontbox/cff/CharStringCommand.java:196

if (keyValues.length > 1 && that.keyValues.length > 1)

->

if (keyValues.length > 1 ||

that.keyValues.length > 1)

4028

3 Logical Operator Replace (LOR)

4

pdfbox/src/main/java/org/apache/pdfbox/pdfparser/BaseParser.java:502

int braces=1 -> int braces=2

32102

1 Absolute Value Insertion (ABS)

5

pdfbox/src/main/java/org/apache/pdfbox/pdfwriter/COSStandardOutputStream.java:80

return onNewLine -> return !onNewLine;

34315

5 Unary Operator Insertion (UOI)

6

pdfbox/src/main/java/org/apache/pdfbox/io/RandomAccessFileInputStream.java:53

return (int)(endPosition - currentPosition) ->

return (int)(endPosition / currentPosition)

31128

2 Arithmetic Operator Replace (AOR)

7

pdfbox/src/main/java/org/apache/pdfbox/cos/COSName.java:650

new COSName(“Type”) -> new COSName(“type”)

21486

1 Absolute Value Insertion (ABS)