TextField.java

1
/*
2
 * Copyright 2003-2005 by Paulo Soares.
3
 *
4
 * The contents of this file are subject to the Mozilla Public License Version 1.1
5
 * (the "License"); you may not use this file except in compliance with the License.
6
 * You may obtain a copy of the License at http://www.mozilla.org/MPL/
7
 *
8
 * Software distributed under the License is distributed on an "AS IS" basis,
9
 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
10
 * for the specific language governing rights and limitations under the License.
11
 *
12
 * The Original Code is 'iText, a free JAVA-PDF library'.
13
 *
14
 * The Initial Developer of the Original Code is Bruno Lowagie. Portions created by
15
 * the Initial Developer are Copyright (C) 1999, 2000, 2001, 2002 by Bruno Lowagie.
16
 * All Rights Reserved.
17
 * Co-Developer of the code is Paulo Soares. Portions created by the Co-Developer
18
 * are Copyright (C) 2000, 2001, 2002 by Paulo Soares. All Rights Reserved.
19
 *
20
 * Contributor(s): all the names of the contributors are added in the source code
21
 * where applicable.
22
 *
23
 * Alternatively, the contents of this file may be used under the terms of the
24
 * LGPL license (the "GNU LIBRARY GENERAL PUBLIC LICENSE"), in which case the
25
 * provisions of LGPL are applicable instead of those above.  If you wish to
26
 * allow use of your version of this file only under the terms of the LGPL
27
 * License and not to allow others to use your version of this file under
28
 * the MPL, indicate your decision by deleting the provisions above and
29
 * replace them with the notice and other provisions required by the LGPL.
30
 * If you do not delete the provisions above, a recipient may use your version
31
 * of this file under either the MPL or the GNU LIBRARY GENERAL PUBLIC LICENSE.
32
 *
33
 * This library is free software; you can redistribute it and/or modify it
34
 * under the terms of the MPL as stated above or under the terms of the GNU
35
 * Library General Public License as published by the Free Software Foundation;
36
 * either version 2 of the License, or any later version.
37
 *
38
 * This library is distributed in the hope that it will be useful, but WITHOUT
39
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
40
 * FOR A PARTICULAR PURPOSE. See the GNU Library general Public License for more
41
 * details.
42
 *
43
 * If you didn't download this code from the following link, you should check if
44
 * you aren't using an obsolete version:
45
 * http://www.lowagie.com/iText/
46
 */
47
48
package com.lowagie.text.pdf;
49
50
import java.awt.Color;
51
import java.io.IOException;
52
import java.util.ArrayList;
53
import java.util.List;
54
55
import com.lowagie.text.Chunk;
56
import com.lowagie.text.DocumentException;
57
import com.lowagie.text.Element;
58
import com.lowagie.text.Font;
59
import com.lowagie.text.Phrase;
60
import com.lowagie.text.Rectangle;
61
62
import javax.annotation.Nullable;
63
64
/**
65
 * Supports text, combo and list fields generating the correct appearances.
66
 * All the option in the Acrobat GUI are supported in an easy to use API.
67
 * @author Paulo Soares (psoares@consiste.pt)
68
 */
69
public class TextField extends BaseField {
70
    
71
    /** Holds value of property defaultText. */
72
    private String defaultText;
73
    
74
    /** Holds value of property choices. */
75
    private String[] choices;
76
    
77
    /** Holds value of property choiceExports. */
78
    private String[] choiceExports;
79
    
80
    /** Holds value of property choiceSelection. */
81
    private ArrayList choiceSelections = new ArrayList();
82
    
83
    private int topFirst;
84
    
85
    private float extraMarginLeft;
86
    private float extraMarginTop;
87
    
88
    /**
89
     * Creates a new <CODE>TextField</CODE>.
90
     * @param writer the document <CODE>PdfWriter</CODE>
91
     * @param box the field location and dimensions
92
     * @param fieldName the field name. If <CODE>null</CODE> only the widget keys
93
     * will be included in the field allowing it to be used as a kid field.
94
     */
95
    public TextField(PdfWriter writer, Rectangle box, String fieldName) {
96
        super(writer, box, fieldName);
97
    }
98
    
99
    private static boolean checkRTL(String text) {
100 2 1. checkRTL : negated conditional → NO_COVERAGE
2. checkRTL : negated conditional → NO_COVERAGE
        if (text == null || text.length() == 0)
101 1 1. checkRTL : replaced return of integer sized value with (x == 0 ? 1 : 0) → NO_COVERAGE
            return false;
102
        char[] cc = text.toCharArray();
103
        for (int c : cc) {
104 4 1. checkRTL : changed conditional boundary → NO_COVERAGE
2. checkRTL : changed conditional boundary → NO_COVERAGE
3. checkRTL : negated conditional → NO_COVERAGE
4. checkRTL : negated conditional → NO_COVERAGE
            if (c >= 0x590 && c < 0x0780)
105 1 1. checkRTL : replaced return of integer sized value with (x == 0 ? 1 : 0) → NO_COVERAGE
                return true;
106
        }
107 1 1. checkRTL : replaced return of integer sized value with (x == 0 ? 1 : 0) → NO_COVERAGE
        return false;
108
    }
109
    
110
    private static void changeFontSize(Phrase p, float size) {
111 1 1. changeFontSize : removed call to com/lowagie/text/Font::setSize → NO_COVERAGE
        for (Object o : p) ((Chunk) o).getFont().setSize(size);
112
    }
113
    
114
    private Phrase composePhrase(String text, BaseFont ufont, Color color, float fontSize) {
115
        Phrase phrase = null;
116 3 1. composePhrase : negated conditional → NO_COVERAGE
2. composePhrase : negated conditional → NO_COVERAGE
3. composePhrase : negated conditional → NO_COVERAGE
        if (extensionFont == null && (substitutionFonts == null || substitutionFonts.isEmpty()))
117
            phrase = new Phrase(new Chunk(text, new Font(ufont, fontSize, 0, color)));
118
        else {
119
            FontSelector fs = new FontSelector();
120 1 1. composePhrase : removed call to com/lowagie/text/pdf/FontSelector::addFont → NO_COVERAGE
            fs.addFont(new Font(ufont, fontSize, 0, color));
121 1 1. composePhrase : negated conditional → NO_COVERAGE
            if (extensionFont != null)
122 1 1. composePhrase : removed call to com/lowagie/text/pdf/FontSelector::addFont → NO_COVERAGE
                fs.addFont(new Font(extensionFont, fontSize, 0, color));
123 1 1. composePhrase : negated conditional → NO_COVERAGE
            if (substitutionFonts != null) {
124
                for (BaseFont substitutionFont : substitutionFonts)
125 1 1. composePhrase : removed call to com/lowagie/text/pdf/FontSelector::addFont → NO_COVERAGE
                    fs.addFont(new Font(substitutionFont, fontSize, 0, color));
126
            }
127
            phrase = fs.process(text);
128
        }
129 1 1. composePhrase : mutated return of Object value for com/lowagie/text/pdf/TextField::composePhrase to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE
        return phrase;
130
    }
131
    
132
    /**
133
     * Removes CRLF from a <code>String</code>.
134
     * 
135
     * @param text
136
     * @return String
137
     * @since    2.1.5
138
     */
139
    public static String removeCRLF(String text) {
140 4 1. removeCRLF : changed conditional boundary → NO_COVERAGE
2. removeCRLF : changed conditional boundary → NO_COVERAGE
3. removeCRLF : negated conditional → NO_COVERAGE
4. removeCRLF : negated conditional → NO_COVERAGE
        if (text.indexOf('\n') >= 0 || text.indexOf('\r') >= 0) {
141
            char[] p = text.toCharArray();
142
            StringBuilder sb = new StringBuilder(p.length);
143 3 1. removeCRLF : changed conditional boundary → NO_COVERAGE
2. removeCRLF : Changed increment from 1 to -1 → NO_COVERAGE
3. removeCRLF : negated conditional → NO_COVERAGE
            for (int k = 0; k < p.length; ++k) {
144
                char c = p[k];
145 1 1. removeCRLF : negated conditional → NO_COVERAGE
                if (c == '\n')
146
                    sb.append(' ');
147 1 1. removeCRLF : negated conditional → NO_COVERAGE
                else if (c == '\r') {
148
                    sb.append(' ');
149 5 1. removeCRLF : changed conditional boundary → NO_COVERAGE
2. removeCRLF : Replaced integer subtraction with addition → NO_COVERAGE
3. removeCRLF : Replaced integer addition with subtraction → NO_COVERAGE
4. removeCRLF : negated conditional → NO_COVERAGE
5. removeCRLF : negated conditional → NO_COVERAGE
                    if (k < p.length - 1 && p[k + 1] == '\n')
150 1 1. removeCRLF : Changed increment from 1 to -1 → NO_COVERAGE
                        ++k;
151
                }
152
                else
153
                    sb.append(c);
154
            }
155 1 1. removeCRLF : mutated return of Object value for com/lowagie/text/pdf/TextField::removeCRLF to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE
            return sb.toString();
156
        }
157 1 1. removeCRLF : mutated return of Object value for com/lowagie/text/pdf/TextField::removeCRLF to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE
        return text;
158
    }
159
    
160
    /**
161
     * Obfuscates a password <code>String</code>.
162
     * Every character is replaced by an asterisk (*).
163
     * 
164
     * @param text 
165
     * @return String
166
     * @since    2.1.5
167
     */
168
    public static String obfuscatePassword(String text) {
169
        char[] pchar = new char[text.length()];
170 2 1. obfuscatePassword : changed conditional boundary → NO_COVERAGE
2. obfuscatePassword : negated conditional → NO_COVERAGE
        for (int i = 0; i < text.length(); i++)
171
            pchar[i] = '*';
172 1 1. obfuscatePassword : mutated return of Object value for com/lowagie/text/pdf/TextField::obfuscatePassword to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE
        return new String(pchar);
173
    }
174
    
175
    /**
176
     * Get the <code>PdfAppearance</code> of a text or combo field
177
     * @throws IOException on error
178
     * @throws DocumentException on error
179
     * @return A <code>PdfAppearance</code>
180
     */
181
    public PdfAppearance getAppearance() throws IOException, DocumentException {
182
        PdfAppearance app = getBorderAppearance();
183 1 1. getAppearance : removed call to com/lowagie/text/pdf/PdfAppearance::beginVariableText → NO_COVERAGE
        app.beginVariableText();
184 2 1. getAppearance : negated conditional → NO_COVERAGE
2. getAppearance : negated conditional → NO_COVERAGE
        if (text == null || text.length() == 0) {
185 1 1. getAppearance : removed call to com/lowagie/text/pdf/PdfAppearance::endVariableText → NO_COVERAGE
            app.endVariableText();
186 1 1. getAppearance : mutated return of Object value for com/lowagie/text/pdf/TextField::getAppearance to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE
            return app;
187
        }
188
        
189 2 1. getAppearance : negated conditional → NO_COVERAGE
2. getAppearance : negated conditional → NO_COVERAGE
        boolean borderExtra = borderStyle == PdfBorderDictionary.STYLE_BEVELED || borderStyle == PdfBorderDictionary.STYLE_INSET;
190 3 1. getAppearance : Replaced float multiplication with division → NO_COVERAGE
2. getAppearance : Replaced float subtraction with addition → NO_COVERAGE
3. getAppearance : Replaced float subtraction with addition → NO_COVERAGE
        float h = box.getHeight() - borderWidth * 2 - extraMarginTop;
191
        float bw2 = borderWidth;
192 1 1. getAppearance : negated conditional → NO_COVERAGE
        if (borderExtra) {
193 2 1. getAppearance : Replaced float multiplication with division → NO_COVERAGE
2. getAppearance : Replaced float subtraction with addition → NO_COVERAGE
            h -= borderWidth * 2;
194 1 1. getAppearance : Replaced float multiplication with division → NO_COVERAGE
            bw2 *= 2;
195
        }
196
        float offsetX = Math.max(bw2, 1);
197
        float offX = Math.min(bw2, offsetX);
198 1 1. getAppearance : removed call to com/lowagie/text/pdf/PdfAppearance::saveState → NO_COVERAGE
        app.saveState();
199 5 1. getAppearance : Replaced float multiplication with division → NO_COVERAGE
2. getAppearance : Replaced float subtraction with addition → NO_COVERAGE
3. getAppearance : Replaced float multiplication with division → NO_COVERAGE
4. getAppearance : Replaced float subtraction with addition → NO_COVERAGE
5. getAppearance : removed call to com/lowagie/text/pdf/PdfAppearance::rectangle → NO_COVERAGE
        app.rectangle(offX, offX, box.getWidth() - 2 * offX, box.getHeight() - 2 * offX);
200 1 1. getAppearance : removed call to com/lowagie/text/pdf/PdfAppearance::clip → NO_COVERAGE
        app.clip();
201 1 1. getAppearance : removed call to com/lowagie/text/pdf/PdfAppearance::newPath → NO_COVERAGE
        app.newPath();
202
        String ptext;
203 2 1. getAppearance : Replaced bitwise AND with OR → NO_COVERAGE
2. getAppearance : negated conditional → NO_COVERAGE
        if ((options & PASSWORD) != 0)
204
            ptext = obfuscatePassword(text);
205 2 1. getAppearance : Replaced bitwise AND with OR → NO_COVERAGE
2. getAppearance : negated conditional → NO_COVERAGE
        else if ((options & MULTILINE) == 0)
206
            ptext = removeCRLF(text);
207
        else
208
            ptext = text; //fixed by Kazuya Ujihara (ujihara.jp)
209
        BaseFont ufont = getRealFont();
210 1 1. getAppearance : negated conditional → NO_COVERAGE
        Color fcolor = (textColor == null) ? GrayColor.GRAYBLACK : textColor;
211 1 1. getAppearance : negated conditional → NO_COVERAGE
        int rtl = checkRTL(ptext) ? PdfWriter.RUN_DIRECTION_LTR : PdfWriter.RUN_DIRECTION_NO_BIDI;
212
        float usize = fontSize;
213
        Phrase phrase = composePhrase(ptext, ufont, fcolor, usize);
214 2 1. getAppearance : Replaced bitwise AND with OR → NO_COVERAGE
2. getAppearance : negated conditional → NO_COVERAGE
        if ((options & MULTILINE) != 0) {
215 3 1. getAppearance : Replaced float multiplication with division → NO_COVERAGE
2. getAppearance : Replaced float subtraction with addition → NO_COVERAGE
3. getAppearance : Replaced float subtraction with addition → NO_COVERAGE
            float width = box.getWidth() - 4 * offsetX - extraMarginLeft;
216 1 1. getAppearance : Replaced float subtraction with addition → NO_COVERAGE
            float factor = ufont.getFontDescriptor(BaseFont.BBOXURY, 1) - ufont.getFontDescriptor(BaseFont.BBOXLLY, 1);
217
            ColumnText ct = new ColumnText(null);
218 1 1. getAppearance : negated conditional → NO_COVERAGE
            if (usize == 0) {
219 1 1. getAppearance : Replaced float division with multiplication → NO_COVERAGE
                usize = h / factor;
220 2 1. getAppearance : changed conditional boundary → NO_COVERAGE
2. getAppearance : negated conditional → NO_COVERAGE
                if (usize > 4) {
221 2 1. getAppearance : changed conditional boundary → NO_COVERAGE
2. getAppearance : negated conditional → NO_COVERAGE
                    if (usize > 12)
222
                        usize = 12;
223 2 1. getAppearance : Replaced float subtraction with addition → NO_COVERAGE
2. getAppearance : Replaced float division with multiplication → NO_COVERAGE
                    float step = Math.max((usize - 4) / 10, 0.2f);
224 2 1. getAppearance : removed negation → NO_COVERAGE
2. getAppearance : removed call to com/lowagie/text/pdf/ColumnText::setSimpleColumn → NO_COVERAGE
                    ct.setSimpleColumn(0, -h, width, 0);
225 1 1. getAppearance : removed call to com/lowagie/text/pdf/ColumnText::setAlignment → NO_COVERAGE
                    ct.setAlignment(alignment);
226 1 1. getAppearance : removed call to com/lowagie/text/pdf/ColumnText::setRunDirection → NO_COVERAGE
                    ct.setRunDirection(rtl);
227 3 1. getAppearance : changed conditional boundary → NO_COVERAGE
2. getAppearance : Replaced float subtraction with addition → NO_COVERAGE
3. getAppearance : negated conditional → NO_COVERAGE
                    for (; usize > 4; usize -= step) {
228 1 1. getAppearance : removed call to com/lowagie/text/pdf/ColumnText::setYLine → NO_COVERAGE
                        ct.setYLine(0);
229 1 1. getAppearance : removed call to com/lowagie/text/pdf/TextField::changeFontSize → NO_COVERAGE
                        changeFontSize(phrase, usize);
230 1 1. getAppearance : removed call to com/lowagie/text/pdf/ColumnText::setText → NO_COVERAGE
                        ct.setText(phrase);
231 2 1. getAppearance : Replaced float multiplication with division → NO_COVERAGE
2. getAppearance : removed call to com/lowagie/text/pdf/ColumnText::setLeading → NO_COVERAGE
                        ct.setLeading(factor * usize);
232
                        int status = ct.go(true);
233 2 1. getAppearance : Replaced bitwise AND with OR → NO_COVERAGE
2. getAppearance : negated conditional → NO_COVERAGE
                        if ((status & ColumnText.NO_MORE_COLUMN) == 0)
234
                            break;
235
                    }
236
                }
237 2 1. getAppearance : changed conditional boundary → NO_COVERAGE
2. getAppearance : negated conditional → NO_COVERAGE
                if (usize < 4)
238
                    usize = 4;
239
            }
240 1 1. getAppearance : removed call to com/lowagie/text/pdf/TextField::changeFontSize → NO_COVERAGE
            changeFontSize(phrase, usize);
241 1 1. getAppearance : removed call to com/lowagie/text/pdf/ColumnText::setCanvas → NO_COVERAGE
            ct.setCanvas(app);
242 1 1. getAppearance : Replaced float multiplication with division → NO_COVERAGE
            float leading = usize * factor;
243 2 1. getAppearance : Replaced float addition with subtraction → NO_COVERAGE
2. getAppearance : Replaced float subtraction with addition → NO_COVERAGE
            float offsetY = offsetX + h - ufont.getFontDescriptor(BaseFont.BBOXURY, usize);
244 6 1. getAppearance : Replaced float multiplication with division → NO_COVERAGE
2. getAppearance : Replaced float addition with subtraction → NO_COVERAGE
3. getAppearance : Replaced float multiplication with division → NO_COVERAGE
4. getAppearance : Replaced float subtraction with addition → NO_COVERAGE
5. getAppearance : Replaced float addition with subtraction → NO_COVERAGE
6. getAppearance : removed call to com/lowagie/text/pdf/ColumnText::setSimpleColumn → NO_COVERAGE
            ct.setSimpleColumn(extraMarginLeft + 2 * offsetX, -20000, box.getWidth() - 2 * offsetX, offsetY + leading);
245 1 1. getAppearance : removed call to com/lowagie/text/pdf/ColumnText::setLeading → NO_COVERAGE
            ct.setLeading(leading);
246 1 1. getAppearance : removed call to com/lowagie/text/pdf/ColumnText::setAlignment → NO_COVERAGE
            ct.setAlignment(alignment);
247 1 1. getAppearance : removed call to com/lowagie/text/pdf/ColumnText::setRunDirection → NO_COVERAGE
            ct.setRunDirection(rtl);
248 1 1. getAppearance : removed call to com/lowagie/text/pdf/ColumnText::setText → NO_COVERAGE
            ct.setText(phrase);
249
            ct.go();
250
        }
251
        else {
252 1 1. getAppearance : negated conditional → NO_COVERAGE
            if (usize == 0) {
253 2 1. getAppearance : Replaced float subtraction with addition → NO_COVERAGE
2. getAppearance : Replaced float division with multiplication → NO_COVERAGE
                float maxCalculatedSize = h / (ufont.getFontDescriptor(BaseFont.BBOXURX, 1) - ufont.getFontDescriptor(BaseFont.BBOXLLY, 1));
254 1 1. getAppearance : removed call to com/lowagie/text/pdf/TextField::changeFontSize → NO_COVERAGE
                changeFontSize(phrase, 1);
255
                float wd = ColumnText.getWidth(phrase, rtl, 0);
256 1 1. getAppearance : negated conditional → NO_COVERAGE
                if (wd == 0)
257
                    usize = maxCalculatedSize;
258
                else
259 4 1. getAppearance : Replaced float subtraction with addition → NO_COVERAGE
2. getAppearance : Replaced float multiplication with division → NO_COVERAGE
3. getAppearance : Replaced float subtraction with addition → NO_COVERAGE
4. getAppearance : Replaced float division with multiplication → NO_COVERAGE
                    usize = Math.min(maxCalculatedSize, (box.getWidth() - extraMarginLeft - 4 * offsetX) / wd);
260 2 1. getAppearance : changed conditional boundary → NO_COVERAGE
2. getAppearance : negated conditional → NO_COVERAGE
                if (usize < 4)
261
                    usize = 4;
262
            }
263 1 1. getAppearance : removed call to com/lowagie/text/pdf/TextField::changeFontSize → NO_COVERAGE
            changeFontSize(phrase, usize);
264 5 1. getAppearance : Replaced float multiplication with division → NO_COVERAGE
2. getAppearance : Replaced float subtraction with addition → NO_COVERAGE
3. getAppearance : Replaced float subtraction with addition → NO_COVERAGE
4. getAppearance : Replaced float division with multiplication → NO_COVERAGE
5. getAppearance : Replaced float addition with subtraction → NO_COVERAGE
            float offsetY = offX + ((box.getHeight() - 2*offX) - ufont.getFontDescriptor(BaseFont.ASCENT, usize)) / 2;
265 2 1. getAppearance : changed conditional boundary → NO_COVERAGE
2. getAppearance : negated conditional → NO_COVERAGE
            if (offsetY < offX)
266
                offsetY = offX;
267 4 1. getAppearance : changed conditional boundary → NO_COVERAGE
2. getAppearance : removed negation → NO_COVERAGE
3. getAppearance : Replaced float subtraction with addition → NO_COVERAGE
4. getAppearance : negated conditional → NO_COVERAGE
            if (offsetY - offX < -ufont.getFontDescriptor(BaseFont.DESCENT, usize)) {
268 2 1. getAppearance : removed negation → NO_COVERAGE
2. getAppearance : Replaced float addition with subtraction → NO_COVERAGE
                float ny = -ufont.getFontDescriptor(BaseFont.DESCENT, usize) + offX;
269 2 1. getAppearance : Replaced float subtraction with addition → NO_COVERAGE
2. getAppearance : Replaced float subtraction with addition → NO_COVERAGE
                float dy = box.getHeight() - offX - ufont.getFontDescriptor(BaseFont.ASCENT, usize);
270
                offsetY = Math.min(ny, Math.max(offsetY, dy));
271
            }
272 4 1. getAppearance : changed conditional boundary → NO_COVERAGE
2. getAppearance : Replaced bitwise AND with OR → NO_COVERAGE
3. getAppearance : negated conditional → NO_COVERAGE
4. getAppearance : negated conditional → NO_COVERAGE
            if ((options & COMB) != 0 && maxCharacterLength > 0) {
273
                int textLen = Math.min(maxCharacterLength, ptext.length());
274
                int position = 0;
275 1 1. getAppearance : negated conditional → NO_COVERAGE
                if (alignment == Element.ALIGN_RIGHT)
276 1 1. getAppearance : Replaced integer subtraction with addition → NO_COVERAGE
                    position = maxCharacterLength - textLen;
277 1 1. getAppearance : negated conditional → NO_COVERAGE
                else if (alignment == Element.ALIGN_CENTER)
278 2 1. getAppearance : Replaced integer subtraction with addition → NO_COVERAGE
2. getAppearance : Replaced integer division with multiplication → NO_COVERAGE
                    position = (maxCharacterLength - textLen) / 2;
279 2 1. getAppearance : Replaced float subtraction with addition → NO_COVERAGE
2. getAppearance : Replaced float division with multiplication → NO_COVERAGE
                float step = (box.getWidth() - extraMarginLeft) / maxCharacterLength;
280 3 1. getAppearance : Replaced float division with multiplication → NO_COVERAGE
2. getAppearance : Replaced float multiplication with division → NO_COVERAGE
3. getAppearance : Replaced float addition with subtraction → NO_COVERAGE
                float start = step / 2 + position * step;
281 1 1. getAppearance : negated conditional → NO_COVERAGE
                if (textColor == null)
282 1 1. getAppearance : removed call to com/lowagie/text/pdf/PdfAppearance::setGrayFill → NO_COVERAGE
                    app.setGrayFill(0);
283
                else
284 1 1. getAppearance : removed call to com/lowagie/text/pdf/PdfAppearance::setColorFill → NO_COVERAGE
                    app.setColorFill(textColor);
285 1 1. getAppearance : removed call to com/lowagie/text/pdf/PdfAppearance::beginText → NO_COVERAGE
                app.beginText();
286
                for (Object o : phrase) {
287
                    Chunk ck = (Chunk) o;
288
                    BaseFont bf = ck.getFont().getBaseFont();
289 1 1. getAppearance : removed call to com/lowagie/text/pdf/PdfAppearance::setFontAndSize → NO_COVERAGE
                    app.setFontAndSize(bf, usize);
290
                    StringBuffer sb = ck.append("");
291 2 1. getAppearance : changed conditional boundary → NO_COVERAGE
2. getAppearance : negated conditional → NO_COVERAGE
                    for (int j = 0; j < sb.length(); ++j) {
292 1 1. getAppearance : Replaced integer addition with subtraction → NO_COVERAGE
                        String c = sb.substring(j, j + 1);
293
                        float wd = bf.getWidthPoint(c, usize);
294 5 1. getAppearance : Replaced float addition with subtraction → NO_COVERAGE
2. getAppearance : Replaced float division with multiplication → NO_COVERAGE
3. getAppearance : Replaced float subtraction with addition → NO_COVERAGE
4. getAppearance : Replaced float subtraction with addition → NO_COVERAGE
5. getAppearance : removed call to com/lowagie/text/pdf/PdfAppearance::setTextMatrix → NO_COVERAGE
                        app.setTextMatrix(extraMarginLeft + start - wd / 2, offsetY - extraMarginTop);
295 1 1. getAppearance : removed call to com/lowagie/text/pdf/PdfAppearance::showText → NO_COVERAGE
                        app.showText(c);
296 1 1. getAppearance : Replaced float addition with subtraction → NO_COVERAGE
                        start += step;
297
                    }
298
                }
299 1 1. getAppearance : removed call to com/lowagie/text/pdf/PdfAppearance::endText → NO_COVERAGE
                app.endText();
300
            }
301
            else {
302
                float x;
303
                switch (alignment) {
304
                case Element.ALIGN_RIGHT:
305 3 1. getAppearance : Replaced float addition with subtraction → NO_COVERAGE
2. getAppearance : Replaced float multiplication with division → NO_COVERAGE
3. getAppearance : Replaced float subtraction with addition → NO_COVERAGE
                    x = extraMarginLeft + box.getWidth() - (2 * offsetX);
306
                    break;
307
                case Element.ALIGN_CENTER:
308 2 1. getAppearance : Replaced float division with multiplication → NO_COVERAGE
2. getAppearance : Replaced float addition with subtraction → NO_COVERAGE
                    x = extraMarginLeft + (box.getWidth() / 2);
309
                    break;
310
                default:
311 2 1. getAppearance : Replaced float multiplication with division → NO_COVERAGE
2. getAppearance : Replaced float addition with subtraction → NO_COVERAGE
                    x = extraMarginLeft + (2 * offsetX);
312
                }
313 2 1. getAppearance : Replaced float subtraction with addition → NO_COVERAGE
2. getAppearance : removed call to com/lowagie/text/pdf/ColumnText::showTextAligned → NO_COVERAGE
                ColumnText.showTextAligned(app, alignment, phrase, x, offsetY - extraMarginTop, 0, rtl, 0);
314
            }
315
        }
316 1 1. getAppearance : removed call to com/lowagie/text/pdf/PdfAppearance::restoreState → NO_COVERAGE
        app.restoreState();
317 1 1. getAppearance : removed call to com/lowagie/text/pdf/PdfAppearance::endVariableText → NO_COVERAGE
        app.endVariableText();
318 1 1. getAppearance : mutated return of Object value for com/lowagie/text/pdf/TextField::getAppearance to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE
        return app;
319
    }
320
321
    /**
322
     * Get the <code>PdfAppearance</code> of a list field
323
     * @throws IOException on error
324
     * @throws DocumentException on error
325
     * @return A <code>PdfAppearance</code>
326
     */
327
    PdfAppearance getListAppearance() throws IOException, DocumentException {
328
        PdfAppearance app = getBorderAppearance();
329 2 1. getListAppearance : negated conditional → NO_COVERAGE
2. getListAppearance : negated conditional → NO_COVERAGE
        if (choices == null || choices.length == 0) {
330 1 1. getListAppearance : mutated return of Object value for com/lowagie/text/pdf/TextField::getListAppearance to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE
            return app;
331
        }
332 1 1. getListAppearance : removed call to com/lowagie/text/pdf/PdfAppearance::beginVariableText → NO_COVERAGE
        app.beginVariableText();
333
        
334
        int topChoice = getTopChoice();
335
336
        BaseFont ufont = getRealFont();
337
        float usize = fontSize;
338 1 1. getListAppearance : negated conditional → NO_COVERAGE
        if (usize == 0)
339
            usize = 12;
340
341 2 1. getListAppearance : negated conditional → NO_COVERAGE
2. getListAppearance : negated conditional → NO_COVERAGE
        boolean borderExtra = borderStyle == PdfBorderDictionary.STYLE_BEVELED || borderStyle == PdfBorderDictionary.STYLE_INSET;
342 2 1. getListAppearance : Replaced float multiplication with division → NO_COVERAGE
2. getListAppearance : Replaced float subtraction with addition → NO_COVERAGE
        float h = box.getHeight() - borderWidth * 2;
343
        float offsetX = borderWidth;
344 1 1. getListAppearance : negated conditional → NO_COVERAGE
        if (borderExtra) {
345 2 1. getListAppearance : Replaced float multiplication with division → NO_COVERAGE
2. getListAppearance : Replaced float subtraction with addition → NO_COVERAGE
            h -= borderWidth * 2;
346 1 1. getListAppearance : Replaced float multiplication with division → NO_COVERAGE
            offsetX *= 2;
347
        }
348
        
349 1 1. getListAppearance : Replaced float subtraction with addition → NO_COVERAGE
        float leading = ufont.getFontDescriptor(BaseFont.BBOXURY, usize) - ufont.getFontDescriptor(BaseFont.BBOXLLY, usize);
350 2 1. getListAppearance : Replaced float division with multiplication → NO_COVERAGE
2. getListAppearance : Replaced integer addition with subtraction → NO_COVERAGE
        int maxFit = (int)(h / leading) + 1;
351
        int first = 0;
352
        int last = 0;
353
        first = topChoice;
354 1 1. getListAppearance : Replaced integer addition with subtraction → NO_COVERAGE
        last = first + maxFit;
355 2 1. getListAppearance : changed conditional boundary → NO_COVERAGE
2. getListAppearance : negated conditional → NO_COVERAGE
        if (last > choices.length)
356
            last = choices.length;
357
        topFirst = first;
358 1 1. getListAppearance : removed call to com/lowagie/text/pdf/PdfAppearance::saveState → NO_COVERAGE
        app.saveState();
359 5 1. getListAppearance : Replaced float multiplication with division → NO_COVERAGE
2. getListAppearance : Replaced float subtraction with addition → NO_COVERAGE
3. getListAppearance : Replaced float multiplication with division → NO_COVERAGE
4. getListAppearance : Replaced float subtraction with addition → NO_COVERAGE
5. getListAppearance : removed call to com/lowagie/text/pdf/PdfAppearance::rectangle → NO_COVERAGE
        app.rectangle(offsetX, offsetX, box.getWidth() - 2 * offsetX, box.getHeight() - 2 * offsetX);
360 1 1. getListAppearance : removed call to com/lowagie/text/pdf/PdfAppearance::clip → NO_COVERAGE
        app.clip();
361 1 1. getListAppearance : removed call to com/lowagie/text/pdf/PdfAppearance::newPath → NO_COVERAGE
        app.newPath();
362 1 1. getListAppearance : negated conditional → NO_COVERAGE
        Color fcolor = (textColor == null) ? GrayColor.GRAYBLACK : textColor;
363
        
364
        
365
        // background boxes for selected value[s]
366 1 1. getListAppearance : removed call to com/lowagie/text/pdf/PdfAppearance::setColorFill → NO_COVERAGE
        app.setColorFill(new Color(10, 36, 106));
367
        for (Object choiceSelection : choiceSelections) {
368
            int curChoice = (Integer) choiceSelection;
369
            // only draw selections within our display range... not strictly necessary with 
370
            // that clipping rect from above, but it certainly doesn't hurt either 
371 4 1. getListAppearance : changed conditional boundary → NO_COVERAGE
2. getListAppearance : changed conditional boundary → NO_COVERAGE
3. getListAppearance : negated conditional → NO_COVERAGE
4. getListAppearance : negated conditional → NO_COVERAGE
            if (curChoice >= first && curChoice <= last) {
372 8 1. getListAppearance : Replaced float addition with subtraction → NO_COVERAGE
2. getListAppearance : Replaced integer subtraction with addition → NO_COVERAGE
3. getListAppearance : Replaced integer addition with subtraction → NO_COVERAGE
4. getListAppearance : Replaced float multiplication with division → NO_COVERAGE
5. getListAppearance : Replaced float subtraction with addition → NO_COVERAGE
6. getListAppearance : Replaced float multiplication with division → NO_COVERAGE
7. getListAppearance : Replaced float subtraction with addition → NO_COVERAGE
8. getListAppearance : removed call to com/lowagie/text/pdf/PdfAppearance::rectangle → NO_COVERAGE
                app.rectangle(offsetX, offsetX + h - (curChoice - first + 1) * leading, box.getWidth() - 2 * offsetX, leading);
373 1 1. getListAppearance : removed call to com/lowagie/text/pdf/PdfAppearance::fill → NO_COVERAGE
                app.fill();
374
            }
375
        }
376 1 1. getListAppearance : Replaced float multiplication with division → NO_COVERAGE
        float xp = offsetX * 2;
377 2 1. getListAppearance : Replaced float addition with subtraction → NO_COVERAGE
2. getListAppearance : Replaced float subtraction with addition → NO_COVERAGE
        float yp = offsetX + h - ufont.getFontDescriptor(BaseFont.BBOXURY, usize);
378 4 1. getListAppearance : changed conditional boundary → NO_COVERAGE
2. getListAppearance : Changed increment from 1 to -1 → NO_COVERAGE
3. getListAppearance : Replaced float subtraction with addition → NO_COVERAGE
4. getListAppearance : negated conditional → NO_COVERAGE
        for (int idx = first; idx < last; ++idx, yp -= leading) {
379
            String ptext = choices[idx];
380 1 1. getListAppearance : negated conditional → NO_COVERAGE
            int rtl = checkRTL(ptext) ? PdfWriter.RUN_DIRECTION_LTR : PdfWriter.RUN_DIRECTION_NO_BIDI;
381
            ptext = removeCRLF(ptext);
382
            // highlight selected values against their (presumably) darker background
383 1 1. getListAppearance : negated conditional → NO_COVERAGE
            Color textCol = (choiceSelections.contains(idx)) ? GrayColor.GRAYWHITE : fcolor;
384
            Phrase phrase = composePhrase(ptext, ufont, textCol, usize);
385 1 1. getListAppearance : removed call to com/lowagie/text/pdf/ColumnText::showTextAligned → NO_COVERAGE
            ColumnText.showTextAligned(app, Element.ALIGN_LEFT, phrase, xp, yp, 0, rtl, 0);
386
        }
387 1 1. getListAppearance : removed call to com/lowagie/text/pdf/PdfAppearance::restoreState → NO_COVERAGE
        app.restoreState();
388 1 1. getListAppearance : removed call to com/lowagie/text/pdf/PdfAppearance::endVariableText → NO_COVERAGE
        app.endVariableText();
389 1 1. getListAppearance : mutated return of Object value for com/lowagie/text/pdf/TextField::getListAppearance to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE
        return app;
390
    }
391
392
    /**
393
     * Gets a new text field.
394
     * @throws IOException on error
395
     * @throws DocumentException on error
396
     * @return a new text field
397
     */    
398
    public PdfFormField getTextField() throws IOException, DocumentException {
399 2 1. getTextField : changed conditional boundary → NO_COVERAGE
2. getTextField : negated conditional → NO_COVERAGE
        if (maxCharacterLength <= 0)
400 1 1. getTextField : Replaced bitwise AND with OR → NO_COVERAGE
            options &= ~COMB;
401 2 1. getTextField : Replaced bitwise AND with OR → NO_COVERAGE
2. getTextField : negated conditional → NO_COVERAGE
        if ((options & COMB) != 0)
402 1 1. getTextField : Replaced bitwise AND with OR → NO_COVERAGE
            options &= ~MULTILINE;
403
        PdfFormField field = PdfFormField.createTextField(writer, false, false, maxCharacterLength);
404 1 1. getTextField : removed call to com/lowagie/text/pdf/PdfFormField::setWidget → NO_COVERAGE
        field.setWidget(box, PdfAnnotation.HIGHLIGHT_INVERT);
405
        switch (alignment) {
406
            case Element.ALIGN_CENTER:
407 1 1. getTextField : removed call to com/lowagie/text/pdf/PdfFormField::setQuadding → NO_COVERAGE
                field.setQuadding(PdfFormField.Q_CENTER);
408
                break;
409
            case Element.ALIGN_RIGHT:
410 1 1. getTextField : removed call to com/lowagie/text/pdf/PdfFormField::setQuadding → NO_COVERAGE
                field.setQuadding(PdfFormField.Q_RIGHT);
411
                break;
412
        }
413 1 1. getTextField : negated conditional → NO_COVERAGE
        if (rotation != 0)
414 1 1. getTextField : removed call to com/lowagie/text/pdf/PdfFormField::setMKRotation → NO_COVERAGE
            field.setMKRotation(rotation);
415 1 1. getTextField : negated conditional → NO_COVERAGE
        if (fieldName != null) {
416 1 1. getTextField : removed call to com/lowagie/text/pdf/PdfFormField::setFieldName → NO_COVERAGE
            field.setFieldName(fieldName);
417 1 1. getTextField : negated conditional → NO_COVERAGE
            if (!"".equals(text))
418 1 1. getTextField : removed call to com/lowagie/text/pdf/PdfFormField::setValueAsString → NO_COVERAGE
                field.setValueAsString(text);
419 1 1. getTextField : negated conditional → NO_COVERAGE
            if (defaultText != null)
420 1 1. getTextField : removed call to com/lowagie/text/pdf/PdfFormField::setDefaultValueAsString → NO_COVERAGE
                field.setDefaultValueAsString(defaultText);
421 2 1. getTextField : Replaced bitwise AND with OR → NO_COVERAGE
2. getTextField : negated conditional → NO_COVERAGE
            if ((options & READ_ONLY) != 0)
422
                field.setFieldFlags(PdfFormField.FF_READ_ONLY);
423 2 1. getTextField : Replaced bitwise AND with OR → NO_COVERAGE
2. getTextField : negated conditional → NO_COVERAGE
            if ((options & REQUIRED) != 0)
424
                field.setFieldFlags(PdfFormField.FF_REQUIRED);
425 2 1. getTextField : Replaced bitwise AND with OR → NO_COVERAGE
2. getTextField : negated conditional → NO_COVERAGE
            if ((options & MULTILINE) != 0)
426
                field.setFieldFlags(PdfFormField.FF_MULTILINE);
427 2 1. getTextField : Replaced bitwise AND with OR → NO_COVERAGE
2. getTextField : negated conditional → NO_COVERAGE
            if ((options & DO_NOT_SCROLL) != 0)
428
                field.setFieldFlags(PdfFormField.FF_DONOTSCROLL);
429 2 1. getTextField : Replaced bitwise AND with OR → NO_COVERAGE
2. getTextField : negated conditional → NO_COVERAGE
            if ((options & PASSWORD) != 0)
430
                field.setFieldFlags(PdfFormField.FF_PASSWORD);
431 2 1. getTextField : Replaced bitwise AND with OR → NO_COVERAGE
2. getTextField : negated conditional → NO_COVERAGE
            if ((options & FILE_SELECTION) != 0)
432
                field.setFieldFlags(PdfFormField.FF_FILESELECT);
433 2 1. getTextField : Replaced bitwise AND with OR → NO_COVERAGE
2. getTextField : negated conditional → NO_COVERAGE
            if ((options & DO_NOT_SPELL_CHECK) != 0)
434
                field.setFieldFlags(PdfFormField.FF_DONOTSPELLCHECK);
435 2 1. getTextField : Replaced bitwise AND with OR → NO_COVERAGE
2. getTextField : negated conditional → NO_COVERAGE
            if ((options & COMB) != 0)
436
                field.setFieldFlags(PdfFormField.FF_COMB);
437
        }
438 1 1. getTextField : removed call to com/lowagie/text/pdf/PdfFormField::setBorderStyle → NO_COVERAGE
        field.setBorderStyle(new PdfBorderDictionary(borderWidth, borderStyle, new PdfDashPattern(3)));
439
        PdfAppearance tp = getAppearance();
440 1 1. getTextField : removed call to com/lowagie/text/pdf/PdfFormField::setAppearance → NO_COVERAGE
        field.setAppearance(PdfAnnotation.APPEARANCE_NORMAL, tp);
441
        PdfAppearance da = (PdfAppearance)tp.getDuplicate();
442 1 1. getTextField : removed call to com/lowagie/text/pdf/PdfAppearance::setFontAndSize → NO_COVERAGE
        da.setFontAndSize(getRealFont(), fontSize);
443 1 1. getTextField : negated conditional → NO_COVERAGE
        if (textColor == null)
444 1 1. getTextField : removed call to com/lowagie/text/pdf/PdfAppearance::setGrayFill → NO_COVERAGE
            da.setGrayFill(0);
445
        else
446 1 1. getTextField : removed call to com/lowagie/text/pdf/PdfAppearance::setColorFill → NO_COVERAGE
            da.setColorFill(textColor);
447 1 1. getTextField : removed call to com/lowagie/text/pdf/PdfFormField::setDefaultAppearanceString → NO_COVERAGE
        field.setDefaultAppearanceString(da);
448 1 1. getTextField : negated conditional → NO_COVERAGE
        if (borderColor != null)
449 1 1. getTextField : removed call to com/lowagie/text/pdf/PdfFormField::setMKBorderColor → NO_COVERAGE
            field.setMKBorderColor(borderColor);
450 1 1. getTextField : negated conditional → NO_COVERAGE
        if (backgroundColor != null)
451 1 1. getTextField : removed call to com/lowagie/text/pdf/PdfFormField::setMKBackgroundColor → NO_COVERAGE
            field.setMKBackgroundColor(backgroundColor);
452
        switch (visibility) {
453
            case HIDDEN:
454 1 1. getTextField : removed call to com/lowagie/text/pdf/PdfFormField::setFlags → NO_COVERAGE
                field.setFlags(PdfAnnotation.FLAGS_PRINT | PdfAnnotation.FLAGS_HIDDEN);
455
                break;
456
            case VISIBLE_BUT_DOES_NOT_PRINT:
457
                break;
458
            case HIDDEN_BUT_PRINTABLE:
459 1 1. getTextField : removed call to com/lowagie/text/pdf/PdfFormField::setFlags → NO_COVERAGE
                field.setFlags(PdfAnnotation.FLAGS_PRINT | PdfAnnotation.FLAGS_NOVIEW);
460
                break;
461
            default:
462 1 1. getTextField : removed call to com/lowagie/text/pdf/PdfFormField::setFlags → NO_COVERAGE
                field.setFlags(PdfAnnotation.FLAGS_PRINT);
463
                break;
464
        }
465 1 1. getTextField : mutated return of Object value for com/lowagie/text/pdf/TextField::getTextField to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE
        return field;
466
    }
467
    
468
    /**
469
     * Gets a new combo field.
470
     * @throws IOException on error
471
     * @throws DocumentException on error
472
     * @return a new combo field
473
     */    
474
    public PdfFormField getComboField() throws IOException, DocumentException {
475 1 1. getComboField : mutated return of Object value for com/lowagie/text/pdf/TextField::getComboField to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE
        return getChoiceField(false);
476
    }
477
    
478
    /**
479
     * Gets a new list field.
480
     * @throws IOException on error
481
     * @throws DocumentException on error
482
     * @return a new list field
483
     */    
484
    public PdfFormField getListField() throws IOException, DocumentException {
485 1 1. getListField : mutated return of Object value for com/lowagie/text/pdf/TextField::getListField to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE
        return getChoiceField(true);
486
    }
487
    
488
    private int getTopChoice() {
489 2 1. getTopChoice : negated conditional → NO_COVERAGE
2. getTopChoice : negated conditional → NO_COVERAGE
        if (choiceSelections == null || choiceSelections.size() ==0) {
490 1 1. getTopChoice : replaced return of integer sized value with (x == 0 ? 1 : 0) → NO_COVERAGE
            return 0;
491
        }
492
        
493
        Integer firstValue = (Integer)choiceSelections.get(0);
494
        
495 1 1. getTopChoice : negated conditional → NO_COVERAGE
        if (firstValue == null) {
496 1 1. getTopChoice : replaced return of integer sized value with (x == 0 ? 1 : 0) → NO_COVERAGE
            return 0;
497
        }
498
        
499
        int topChoice = 0;
500 1 1. getTopChoice : negated conditional → NO_COVERAGE
        if (choices != null) {
501
            topChoice = firstValue;
502
            topChoice = Math.min( topChoice, choices.length );
503
            topChoice = Math.max( 0, topChoice);
504
        } // else topChoice still 0
505 1 1. getTopChoice : replaced return of integer sized value with (x == 0 ? 1 : 0) → NO_COVERAGE
        return topChoice;
506
    }
507
508
    protected PdfFormField getChoiceField(boolean isList) throws IOException, DocumentException {
509 1 1. getChoiceField : Replaced bitwise AND with OR → NO_COVERAGE
        options &= (~MULTILINE) & (~COMB);
510
        String[] uchoices = choices;
511 1 1. getChoiceField : negated conditional → NO_COVERAGE
        if (uchoices == null)
512
            uchoices = new String[0];
513
514
        int topChoice = getTopChoice();
515
516 1 1. getChoiceField : negated conditional → NO_COVERAGE
        if (text == null)
517
            text = ""; //fixed by Kazuya Ujihara (ujihara.jp)
518
519 2 1. getChoiceField : changed conditional boundary → NO_COVERAGE
2. getChoiceField : negated conditional → NO_COVERAGE
        if (topChoice >= 0)
520
            text = uchoices[topChoice];
521
        
522
        PdfFormField field = null;
523
        String[][] mix = null;
524
        
525 1 1. getChoiceField : negated conditional → NO_COVERAGE
        if (choiceExports == null) {
526 1 1. getChoiceField : negated conditional → NO_COVERAGE
            if (isList)
527
                field = PdfFormField.createList(writer, uchoices, topChoice);
528
            else
529 2 1. getChoiceField : Replaced bitwise AND with OR → NO_COVERAGE
2. getChoiceField : negated conditional → NO_COVERAGE
                field = PdfFormField.createCombo(writer, (options & EDIT) != 0, uchoices, topChoice);
530
        }
531
        else {
532
            mix = new String[uchoices.length][2];
533 2 1. getChoiceField : changed conditional boundary → NO_COVERAGE
2. getChoiceField : negated conditional → NO_COVERAGE
            for (int k = 0; k < mix.length; ++k)
534
                mix[k][0] = mix[k][1] = uchoices[k];
535
            int top = Math.min(uchoices.length, choiceExports.length);
536 3 1. getChoiceField : changed conditional boundary → NO_COVERAGE
2. getChoiceField : Changed increment from 1 to -1 → NO_COVERAGE
3. getChoiceField : negated conditional → NO_COVERAGE
            for (int k = 0; k < top; ++k) {
537 1 1. getChoiceField : negated conditional → NO_COVERAGE
                if (choiceExports[k] != null)
538
                    mix[k][0] = choiceExports[k];
539
            }
540 1 1. getChoiceField : negated conditional → NO_COVERAGE
            if (isList)
541
                field = PdfFormField.createList(writer, mix, topChoice);
542
            else
543 2 1. getChoiceField : Replaced bitwise AND with OR → NO_COVERAGE
2. getChoiceField : negated conditional → NO_COVERAGE
                field = PdfFormField.createCombo(writer, (options & EDIT) != 0, mix, topChoice);
544
        }
545 1 1. getChoiceField : removed call to com/lowagie/text/pdf/PdfFormField::setWidget → NO_COVERAGE
        field.setWidget(box, PdfAnnotation.HIGHLIGHT_INVERT);
546 1 1. getChoiceField : negated conditional → NO_COVERAGE
        if (rotation != 0)
547 1 1. getChoiceField : removed call to com/lowagie/text/pdf/PdfFormField::setMKRotation → NO_COVERAGE
            field.setMKRotation(rotation);
548 1 1. getChoiceField : negated conditional → NO_COVERAGE
        if (fieldName != null) {
549 1 1. getChoiceField : removed call to com/lowagie/text/pdf/PdfFormField::setFieldName → NO_COVERAGE
            field.setFieldName(fieldName);
550 2 1. getChoiceField : changed conditional boundary → NO_COVERAGE
2. getChoiceField : negated conditional → NO_COVERAGE
            if (uchoices.length > 0) {
551 1 1. getChoiceField : negated conditional → NO_COVERAGE
                if (mix != null) {
552 2 1. getChoiceField : changed conditional boundary → NO_COVERAGE
2. getChoiceField : negated conditional → NO_COVERAGE
                    if (choiceSelections.size() < 2) {
553 1 1. getChoiceField : removed call to com/lowagie/text/pdf/PdfFormField::setValueAsString → NO_COVERAGE
                        field.setValueAsString(mix[topChoice][0]);
554 1 1. getChoiceField : removed call to com/lowagie/text/pdf/PdfFormField::setDefaultValueAsString → NO_COVERAGE
                        field.setDefaultValueAsString(mix[topChoice][0]);
555
                    } else {
556 1 1. getChoiceField : removed call to com/lowagie/text/pdf/TextField::writeMultipleValues → NO_COVERAGE
                        writeMultipleValues( field, mix);
557
                    }
558
                } else {
559 2 1. getChoiceField : changed conditional boundary → NO_COVERAGE
2. getChoiceField : negated conditional → NO_COVERAGE
                    if (choiceSelections.size() < 2) {
560 1 1. getChoiceField : removed call to com/lowagie/text/pdf/PdfFormField::setValueAsString → NO_COVERAGE
                        field.setValueAsString(text);
561 1 1. getChoiceField : removed call to com/lowagie/text/pdf/PdfFormField::setDefaultValueAsString → NO_COVERAGE
                        field.setDefaultValueAsString(text);
562
                    } else {
563 1 1. getChoiceField : removed call to com/lowagie/text/pdf/TextField::writeMultipleValues → NO_COVERAGE
                        writeMultipleValues( field, null );
564
                    }
565
                }
566
            }
567 2 1. getChoiceField : Replaced bitwise AND with OR → NO_COVERAGE
2. getChoiceField : negated conditional → NO_COVERAGE
            if ((options & READ_ONLY) != 0)
568
                field.setFieldFlags(PdfFormField.FF_READ_ONLY);
569 2 1. getChoiceField : Replaced bitwise AND with OR → NO_COVERAGE
2. getChoiceField : negated conditional → NO_COVERAGE
            if ((options & REQUIRED) != 0)
570
                field.setFieldFlags(PdfFormField.FF_REQUIRED);
571 2 1. getChoiceField : Replaced bitwise AND with OR → NO_COVERAGE
2. getChoiceField : negated conditional → NO_COVERAGE
            if ((options & DO_NOT_SPELL_CHECK) != 0)
572
                field.setFieldFlags(PdfFormField.FF_DONOTSPELLCHECK);
573 2 1. getChoiceField : Replaced bitwise AND with OR → NO_COVERAGE
2. getChoiceField : negated conditional → NO_COVERAGE
            if ((options & MULTISELECT) != 0) {
574
                field.setFieldFlags( PdfFormField.FF_MULTISELECT );
575
            }
576
        }
577 1 1. getChoiceField : removed call to com/lowagie/text/pdf/PdfFormField::setBorderStyle → NO_COVERAGE
        field.setBorderStyle(new PdfBorderDictionary(borderWidth, borderStyle, new PdfDashPattern(3)));
578
        PdfAppearance tp;
579 1 1. getChoiceField : negated conditional → NO_COVERAGE
        if (isList) {
580
            tp = getListAppearance();
581 2 1. getChoiceField : changed conditional boundary → NO_COVERAGE
2. getChoiceField : negated conditional → NO_COVERAGE
            if (topFirst > 0)
582 1 1. getChoiceField : removed call to com/lowagie/text/pdf/PdfFormField::put → NO_COVERAGE
                field.put(PdfName.TI, new PdfNumber(topFirst));
583
        }
584
        else
585
            tp = getAppearance();
586 1 1. getChoiceField : removed call to com/lowagie/text/pdf/PdfFormField::setAppearance → NO_COVERAGE
        field.setAppearance(PdfAnnotation.APPEARANCE_NORMAL, tp);
587
        PdfAppearance da = (PdfAppearance)tp.getDuplicate();
588 1 1. getChoiceField : removed call to com/lowagie/text/pdf/PdfAppearance::setFontAndSize → NO_COVERAGE
        da.setFontAndSize(getRealFont(), fontSize);
589 1 1. getChoiceField : negated conditional → NO_COVERAGE
        if (textColor == null)
590 1 1. getChoiceField : removed call to com/lowagie/text/pdf/PdfAppearance::setGrayFill → NO_COVERAGE
            da.setGrayFill(0);
591
        else
592 1 1. getChoiceField : removed call to com/lowagie/text/pdf/PdfAppearance::setColorFill → NO_COVERAGE
            da.setColorFill(textColor);
593 1 1. getChoiceField : removed call to com/lowagie/text/pdf/PdfFormField::setDefaultAppearanceString → NO_COVERAGE
        field.setDefaultAppearanceString(da);
594 1 1. getChoiceField : negated conditional → NO_COVERAGE
        if (borderColor != null)
595 1 1. getChoiceField : removed call to com/lowagie/text/pdf/PdfFormField::setMKBorderColor → NO_COVERAGE
            field.setMKBorderColor(borderColor);
596 1 1. getChoiceField : negated conditional → NO_COVERAGE
        if (backgroundColor != null)
597 1 1. getChoiceField : removed call to com/lowagie/text/pdf/PdfFormField::setMKBackgroundColor → NO_COVERAGE
            field.setMKBackgroundColor(backgroundColor);
598
        switch (visibility) {
599
            case HIDDEN:
600 1 1. getChoiceField : removed call to com/lowagie/text/pdf/PdfFormField::setFlags → NO_COVERAGE
                field.setFlags(PdfAnnotation.FLAGS_PRINT | PdfAnnotation.FLAGS_HIDDEN);
601
                break;
602
            case VISIBLE_BUT_DOES_NOT_PRINT:
603
                break;
604
            case HIDDEN_BUT_PRINTABLE:
605 1 1. getChoiceField : removed call to com/lowagie/text/pdf/PdfFormField::setFlags → NO_COVERAGE
                field.setFlags(PdfAnnotation.FLAGS_PRINT | PdfAnnotation.FLAGS_NOVIEW);
606
                break;
607
            default:
608 1 1. getChoiceField : removed call to com/lowagie/text/pdf/PdfFormField::setFlags → NO_COVERAGE
                field.setFlags(PdfAnnotation.FLAGS_PRINT);
609
                break;
610
        }
611 1 1. getChoiceField : mutated return of Object value for com/lowagie/text/pdf/TextField::getChoiceField to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE
        return field;
612
    }
613
614
    private void writeMultipleValues(PdfFormField field, String[][] mix) {
615
        PdfArray indexes = new PdfArray();
616
        PdfArray values = new PdfArray();
617
        for (Object choiceSelection : choiceSelections) {
618
            int idx = (Integer) choiceSelection;
619
            indexes.add(new PdfNumber(idx));
620
621 1 1. writeMultipleValues : negated conditional → NO_COVERAGE
            if (mix != null)
622
                values.add(new PdfString(mix[idx][0]));
623 1 1. writeMultipleValues : negated conditional → NO_COVERAGE
            else if (choices != null)
624
                values.add(new PdfString(choices[idx]));
625
        }
626
        
627 1 1. writeMultipleValues : removed call to com/lowagie/text/pdf/PdfFormField::put → NO_COVERAGE
        field.put( PdfName.V, values );
628 1 1. writeMultipleValues : removed call to com/lowagie/text/pdf/PdfFormField::put → NO_COVERAGE
        field.put( PdfName.I, indexes );
629
630
    }
631
    
632
    /**
633
     * Gets the default text.
634
     * @return the default text
635
     */
636
    public String getDefaultText() {
637
        return this.defaultText;
638
    }
639
    
640
    /**
641
     * Sets the default text. It is only meaningful for text fields.
642
     * @param defaultText the default text
643
     */
644
    public void setDefaultText(String defaultText) {
645
        this.defaultText = defaultText;
646
    }
647
    
648
    /**
649
     * Gets the choices to be presented to the user in list/combo fields.
650
     * @return the choices to be presented to the user
651
     */
652
    public String[] getChoices() {
653
        return this.choices;
654
    }
655
    
656
    /**
657
     * Sets the choices to be presented to the user in list/combo fields.
658
     * @param choices the choices to be presented to the user
659
     */
660
    public void setChoices(String[] choices) {
661
        this.choices = choices;
662
    }
663
    
664
    /**
665
     * Gets the export values in list/combo fields.
666
     * @return the export values in list/combo fields
667
     */
668
    public String[] getChoiceExports() {
669
        return this.choiceExports;
670
    }
671
    
672
    /**
673
     * Sets the export values in list/combo fields. If this array
674
     * is <CODE>null</CODE> then the choice values will also be used
675
     * as the export values.
676
     * @param choiceExports the export values in list/combo fields
677
     */
678
    public void setChoiceExports(String[] choiceExports) {
679
        this.choiceExports = choiceExports;
680
    }
681
    
682
    /**
683
     * Gets the zero based index of the selected item.
684
     * @return the zero based index of the selected item
685
     */
686
    public int getChoiceSelection() {
687
        return getTopChoice();
688
    }
689
    
690
    public ArrayList gteChoiceSelections() {
691
        return choiceSelections;
692
    }
693
694
    /**
695
     * Sets the zero based index of the selected item.
696
     * @param choiceSelection the zero based index of the selected item
697
     */
698
    public void setChoiceSelection(int choiceSelection) {
699
        choiceSelections = new ArrayList();
700
        choiceSelections.add(choiceSelection);
701
    }
702
    
703
    /**
704
     * adds another (or a first I suppose) selection to a MULTISELECT list.
705
     * This doesn't do anything unless this.options & MUTLISELECT != 0 
706
     * @param selection new selection
707
     */
708
    public void addChoiceSelection( int selection) {
709 2 1. addChoiceSelection : Replaced bitwise AND with OR → NO_COVERAGE
2. addChoiceSelection : negated conditional → NO_COVERAGE
        if ((this.options & BaseField.MULTISELECT) != 0) {
710
            choiceSelections.add(selection);
711
        }
712
    }
713
    
714
    /**
715
     * replaces the existing selections with the param. If this field isn't a MULTISELECT
716
     * list, all but the first element will be removed.
717
     * @param selections new selections.  If null, it clear()s the underlying ArrayList.
718
     */
719
    public void setChoiceSelections(@Nullable List<Integer> selections ) {
720 1 1. setChoiceSelections : negated conditional → NO_COVERAGE
        if (selections != null) {
721
            choiceSelections = new ArrayList<>( selections );
722 4 1. setChoiceSelections : changed conditional boundary → NO_COVERAGE
2. setChoiceSelections : Replaced bitwise AND with OR → NO_COVERAGE
3. setChoiceSelections : negated conditional → NO_COVERAGE
4. setChoiceSelections : negated conditional → NO_COVERAGE
            if (choiceSelections.size() > 1 && (options & BaseField.MULTISELECT) == 0 ) {
723
                // can't have multiple selections in a single-select field
724 2 1. setChoiceSelections : changed conditional boundary → NO_COVERAGE
2. setChoiceSelections : negated conditional → NO_COVERAGE
                while (choiceSelections.size() > 1) {
725
                    choiceSelections.remove( 1 );
726
                }
727
            }
728
            
729
        } else { 
730 1 1. setChoiceSelections : removed call to java/util/ArrayList::clear → NO_COVERAGE
            choiceSelections.clear();
731
        }
732
    }
733
    
734
    int getTopFirst() {
735
        return topFirst;
736
    }
737
    
738
    /**
739
     * Sets extra margins in text fields to better mimic the Acrobat layout.
740
     * @param extraMarginLeft the extra margin left
741
     * @param extraMarginTop the extra margin top
742
     */    
743
    public void setExtraMargin(float extraMarginLeft, float extraMarginTop) {
744
        this.extraMarginLeft = extraMarginLeft;
745
        this.extraMarginTop = extraMarginTop;
746
    }
747
748
    /**
749
     * Holds value of property substitutionFonts.
750
     */
751
    private List<BaseFont> substitutionFonts;
752
753
    /**
754
     * Gets the list of substitution fonts. The list is composed of <CODE>BaseFont</CODE> and can be <CODE>null</CODE>. The fonts in this list will be used if the original
755
     * font doesn't contain the needed glyphs.
756
     * @return the list
757
     */
758
    public List<BaseFont> getSubstitutionFonts() {
759
        return this.substitutionFonts;
760
    }
761
762
    /**
763
     * Sets a list of substitution fonts. The list is composed of <CODE>BaseFont</CODE> and can also be <CODE>null</CODE>. The fonts in this list will be used if the original
764
     * font doesn't contain the needed glyphs.
765
     * @param substitutionFonts the list
766
     */
767
    public void setSubstitutionFonts(List<BaseFont> substitutionFonts) {
768
        this.substitutionFonts = substitutionFonts;
769
    }
770
771
    /**
772
     * Holds value of property extensionFont.
773
     */
774
    private BaseFont extensionFont;
775
776
    /**
777
     * Gets the extensionFont. This font will be searched before the
778
     * substitution fonts. It may be <code>null</code>.
779
     * @return the extensionFont
780
     */
781
    public BaseFont getExtensionFont() {
782
        return this.extensionFont;
783
    }
784
785
    /**
786
     * Sets the extensionFont. This font will be searched before the
787
     * substitution fonts. It may be <code>null</code>.
788
     * @param extensionFont New value of property extensionFont.
789
     */
790
    public void setExtensionFont(BaseFont extensionFont) {
791
        this.extensionFont = extensionFont;
792
    }
793
}

Mutations

100

1.1
Location : checkRTL
Killed by : none
negated conditional → NO_COVERAGE

2.2
Location : checkRTL
Killed by : none
negated conditional → NO_COVERAGE

101

1.1
Location : checkRTL
Killed by : none
replaced return of integer sized value with (x == 0 ? 1 : 0) → NO_COVERAGE

104

1.1
Location : checkRTL
Killed by : none
changed conditional boundary → NO_COVERAGE

2.2
Location : checkRTL
Killed by : none
changed conditional boundary → NO_COVERAGE

3.3
Location : checkRTL
Killed by : none
negated conditional → NO_COVERAGE

4.4
Location : checkRTL
Killed by : none
negated conditional → NO_COVERAGE

105

1.1
Location : checkRTL
Killed by : none
replaced return of integer sized value with (x == 0 ? 1 : 0) → NO_COVERAGE

107

1.1
Location : checkRTL
Killed by : none
replaced return of integer sized value with (x == 0 ? 1 : 0) → NO_COVERAGE

111

1.1
Location : changeFontSize
Killed by : none
removed call to com/lowagie/text/Font::setSize → NO_COVERAGE

116

1.1
Location : composePhrase
Killed by : none
negated conditional → NO_COVERAGE

2.2
Location : composePhrase
Killed by : none
negated conditional → NO_COVERAGE

3.3
Location : composePhrase
Killed by : none
negated conditional → NO_COVERAGE

120

1.1
Location : composePhrase
Killed by : none
removed call to com/lowagie/text/pdf/FontSelector::addFont → NO_COVERAGE

121

1.1
Location : composePhrase
Killed by : none
negated conditional → NO_COVERAGE

122

1.1
Location : composePhrase
Killed by : none
removed call to com/lowagie/text/pdf/FontSelector::addFont → NO_COVERAGE

123

1.1
Location : composePhrase
Killed by : none
negated conditional → NO_COVERAGE

125

1.1
Location : composePhrase
Killed by : none
removed call to com/lowagie/text/pdf/FontSelector::addFont → NO_COVERAGE

129

1.1
Location : composePhrase
Killed by : none
mutated return of Object value for com/lowagie/text/pdf/TextField::composePhrase to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE

140

1.1
Location : removeCRLF
Killed by : none
changed conditional boundary → NO_COVERAGE

2.2
Location : removeCRLF
Killed by : none
changed conditional boundary → NO_COVERAGE

3.3
Location : removeCRLF
Killed by : none
negated conditional → NO_COVERAGE

4.4
Location : removeCRLF
Killed by : none
negated conditional → NO_COVERAGE

143

1.1
Location : removeCRLF
Killed by : none
changed conditional boundary → NO_COVERAGE

2.2
Location : removeCRLF
Killed by : none
Changed increment from 1 to -1 → NO_COVERAGE

3.3
Location : removeCRLF
Killed by : none
negated conditional → NO_COVERAGE

145

1.1
Location : removeCRLF
Killed by : none
negated conditional → NO_COVERAGE

147

1.1
Location : removeCRLF
Killed by : none
negated conditional → NO_COVERAGE

149

1.1
Location : removeCRLF
Killed by : none
changed conditional boundary → NO_COVERAGE

2.2
Location : removeCRLF
Killed by : none
Replaced integer subtraction with addition → NO_COVERAGE

3.3
Location : removeCRLF
Killed by : none
Replaced integer addition with subtraction → NO_COVERAGE

4.4
Location : removeCRLF
Killed by : none
negated conditional → NO_COVERAGE

5.5
Location : removeCRLF
Killed by : none
negated conditional → NO_COVERAGE

150

1.1
Location : removeCRLF
Killed by : none
Changed increment from 1 to -1 → NO_COVERAGE

155

1.1
Location : removeCRLF
Killed by : none
mutated return of Object value for com/lowagie/text/pdf/TextField::removeCRLF to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE

157

1.1
Location : removeCRLF
Killed by : none
mutated return of Object value for com/lowagie/text/pdf/TextField::removeCRLF to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE

170

1.1
Location : obfuscatePassword
Killed by : none
changed conditional boundary → NO_COVERAGE

2.2
Location : obfuscatePassword
Killed by : none
negated conditional → NO_COVERAGE

172

1.1
Location : obfuscatePassword
Killed by : none
mutated return of Object value for com/lowagie/text/pdf/TextField::obfuscatePassword to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE

183

1.1
Location : getAppearance
Killed by : none
removed call to com/lowagie/text/pdf/PdfAppearance::beginVariableText → NO_COVERAGE

184

1.1
Location : getAppearance
Killed by : none
negated conditional → NO_COVERAGE

2.2
Location : getAppearance
Killed by : none
negated conditional → NO_COVERAGE

185

1.1
Location : getAppearance
Killed by : none
removed call to com/lowagie/text/pdf/PdfAppearance::endVariableText → NO_COVERAGE

186

1.1
Location : getAppearance
Killed by : none
mutated return of Object value for com/lowagie/text/pdf/TextField::getAppearance to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE

189

1.1
Location : getAppearance
Killed by : none
negated conditional → NO_COVERAGE

2.2
Location : getAppearance
Killed by : none
negated conditional → NO_COVERAGE

190

1.1
Location : getAppearance
Killed by : none
Replaced float multiplication with division → NO_COVERAGE

2.2
Location : getAppearance
Killed by : none
Replaced float subtraction with addition → NO_COVERAGE

3.3
Location : getAppearance
Killed by : none
Replaced float subtraction with addition → NO_COVERAGE

192

1.1
Location : getAppearance
Killed by : none
negated conditional → NO_COVERAGE

193

1.1
Location : getAppearance
Killed by : none
Replaced float multiplication with division → NO_COVERAGE

2.2
Location : getAppearance
Killed by : none
Replaced float subtraction with addition → NO_COVERAGE

194

1.1
Location : getAppearance
Killed by : none
Replaced float multiplication with division → NO_COVERAGE

198

1.1
Location : getAppearance
Killed by : none
removed call to com/lowagie/text/pdf/PdfAppearance::saveState → NO_COVERAGE

199

1.1
Location : getAppearance
Killed by : none
Replaced float multiplication with division → NO_COVERAGE

2.2
Location : getAppearance
Killed by : none
Replaced float subtraction with addition → NO_COVERAGE

3.3
Location : getAppearance
Killed by : none
Replaced float multiplication with division → NO_COVERAGE

4.4
Location : getAppearance
Killed by : none
Replaced float subtraction with addition → NO_COVERAGE

5.5
Location : getAppearance
Killed by : none
removed call to com/lowagie/text/pdf/PdfAppearance::rectangle → NO_COVERAGE

200

1.1
Location : getAppearance
Killed by : none
removed call to com/lowagie/text/pdf/PdfAppearance::clip → NO_COVERAGE

201

1.1
Location : getAppearance
Killed by : none
removed call to com/lowagie/text/pdf/PdfAppearance::newPath → NO_COVERAGE

203

1.1
Location : getAppearance
Killed by : none
Replaced bitwise AND with OR → NO_COVERAGE

2.2
Location : getAppearance
Killed by : none
negated conditional → NO_COVERAGE

205

1.1
Location : getAppearance
Killed by : none
Replaced bitwise AND with OR → NO_COVERAGE

2.2
Location : getAppearance
Killed by : none
negated conditional → NO_COVERAGE

210

1.1
Location : getAppearance
Killed by : none
negated conditional → NO_COVERAGE

211

1.1
Location : getAppearance
Killed by : none
negated conditional → NO_COVERAGE

214

1.1
Location : getAppearance
Killed by : none
Replaced bitwise AND with OR → NO_COVERAGE

2.2
Location : getAppearance
Killed by : none
negated conditional → NO_COVERAGE

215

1.1
Location : getAppearance
Killed by : none
Replaced float multiplication with division → NO_COVERAGE

2.2
Location : getAppearance
Killed by : none
Replaced float subtraction with addition → NO_COVERAGE

3.3
Location : getAppearance
Killed by : none
Replaced float subtraction with addition → NO_COVERAGE

216

1.1
Location : getAppearance
Killed by : none
Replaced float subtraction with addition → NO_COVERAGE

218

1.1
Location : getAppearance
Killed by : none
negated conditional → NO_COVERAGE

219

1.1
Location : getAppearance
Killed by : none
Replaced float division with multiplication → NO_COVERAGE

220

1.1
Location : getAppearance
Killed by : none
changed conditional boundary → NO_COVERAGE

2.2
Location : getAppearance
Killed by : none
negated conditional → NO_COVERAGE

221

1.1
Location : getAppearance
Killed by : none
changed conditional boundary → NO_COVERAGE

2.2
Location : getAppearance
Killed by : none
negated conditional → NO_COVERAGE

223

1.1
Location : getAppearance
Killed by : none
Replaced float subtraction with addition → NO_COVERAGE

2.2
Location : getAppearance
Killed by : none
Replaced float division with multiplication → NO_COVERAGE

224

1.1
Location : getAppearance
Killed by : none
removed negation → NO_COVERAGE

2.2
Location : getAppearance
Killed by : none
removed call to com/lowagie/text/pdf/ColumnText::setSimpleColumn → NO_COVERAGE

225

1.1
Location : getAppearance
Killed by : none
removed call to com/lowagie/text/pdf/ColumnText::setAlignment → NO_COVERAGE

226

1.1
Location : getAppearance
Killed by : none
removed call to com/lowagie/text/pdf/ColumnText::setRunDirection → NO_COVERAGE

227

1.1
Location : getAppearance
Killed by : none
changed conditional boundary → NO_COVERAGE

2.2
Location : getAppearance
Killed by : none
Replaced float subtraction with addition → NO_COVERAGE

3.3
Location : getAppearance
Killed by : none
negated conditional → NO_COVERAGE

228

1.1
Location : getAppearance
Killed by : none
removed call to com/lowagie/text/pdf/ColumnText::setYLine → NO_COVERAGE

229

1.1
Location : getAppearance
Killed by : none
removed call to com/lowagie/text/pdf/TextField::changeFontSize → NO_COVERAGE

230

1.1
Location : getAppearance
Killed by : none
removed call to com/lowagie/text/pdf/ColumnText::setText → NO_COVERAGE

231

1.1
Location : getAppearance
Killed by : none
Replaced float multiplication with division → NO_COVERAGE

2.2
Location : getAppearance
Killed by : none
removed call to com/lowagie/text/pdf/ColumnText::setLeading → NO_COVERAGE

233

1.1
Location : getAppearance
Killed by : none
Replaced bitwise AND with OR → NO_COVERAGE

2.2
Location : getAppearance
Killed by : none
negated conditional → NO_COVERAGE

237

1.1
Location : getAppearance
Killed by : none
changed conditional boundary → NO_COVERAGE

2.2
Location : getAppearance
Killed by : none
negated conditional → NO_COVERAGE

240

1.1
Location : getAppearance
Killed by : none
removed call to com/lowagie/text/pdf/TextField::changeFontSize → NO_COVERAGE

241

1.1
Location : getAppearance
Killed by : none
removed call to com/lowagie/text/pdf/ColumnText::setCanvas → NO_COVERAGE

242

1.1
Location : getAppearance
Killed by : none
Replaced float multiplication with division → NO_COVERAGE

243

1.1
Location : getAppearance
Killed by : none
Replaced float addition with subtraction → NO_COVERAGE

2.2
Location : getAppearance
Killed by : none
Replaced float subtraction with addition → NO_COVERAGE

244

1.1
Location : getAppearance
Killed by : none
Replaced float multiplication with division → NO_COVERAGE

2.2
Location : getAppearance
Killed by : none
Replaced float addition with subtraction → NO_COVERAGE

3.3
Location : getAppearance
Killed by : none
Replaced float multiplication with division → NO_COVERAGE

4.4
Location : getAppearance
Killed by : none
Replaced float subtraction with addition → NO_COVERAGE

5.5
Location : getAppearance
Killed by : none
Replaced float addition with subtraction → NO_COVERAGE

6.6
Location : getAppearance
Killed by : none
removed call to com/lowagie/text/pdf/ColumnText::setSimpleColumn → NO_COVERAGE

245

1.1
Location : getAppearance
Killed by : none
removed call to com/lowagie/text/pdf/ColumnText::setLeading → NO_COVERAGE

246

1.1
Location : getAppearance
Killed by : none
removed call to com/lowagie/text/pdf/ColumnText::setAlignment → NO_COVERAGE

247

1.1
Location : getAppearance
Killed by : none
removed call to com/lowagie/text/pdf/ColumnText::setRunDirection → NO_COVERAGE

248

1.1
Location : getAppearance
Killed by : none
removed call to com/lowagie/text/pdf/ColumnText::setText → NO_COVERAGE

252

1.1
Location : getAppearance
Killed by : none
negated conditional → NO_COVERAGE

253

1.1
Location : getAppearance
Killed by : none
Replaced float subtraction with addition → NO_COVERAGE

2.2
Location : getAppearance
Killed by : none
Replaced float division with multiplication → NO_COVERAGE

254

1.1
Location : getAppearance
Killed by : none
removed call to com/lowagie/text/pdf/TextField::changeFontSize → NO_COVERAGE

256

1.1
Location : getAppearance
Killed by : none
negated conditional → NO_COVERAGE

259

1.1
Location : getAppearance
Killed by : none
Replaced float subtraction with addition → NO_COVERAGE

2.2
Location : getAppearance
Killed by : none
Replaced float multiplication with division → NO_COVERAGE

3.3
Location : getAppearance
Killed by : none
Replaced float subtraction with addition → NO_COVERAGE

4.4
Location : getAppearance
Killed by : none
Replaced float division with multiplication → NO_COVERAGE

260

1.1
Location : getAppearance
Killed by : none
changed conditional boundary → NO_COVERAGE

2.2
Location : getAppearance
Killed by : none
negated conditional → NO_COVERAGE

263

1.1
Location : getAppearance
Killed by : none
removed call to com/lowagie/text/pdf/TextField::changeFontSize → NO_COVERAGE

264

1.1
Location : getAppearance
Killed by : none
Replaced float multiplication with division → NO_COVERAGE

2.2
Location : getAppearance
Killed by : none
Replaced float subtraction with addition → NO_COVERAGE

3.3
Location : getAppearance
Killed by : none
Replaced float subtraction with addition → NO_COVERAGE

4.4
Location : getAppearance
Killed by : none
Replaced float division with multiplication → NO_COVERAGE

5.5
Location : getAppearance
Killed by : none
Replaced float addition with subtraction → NO_COVERAGE

265

1.1
Location : getAppearance
Killed by : none
changed conditional boundary → NO_COVERAGE

2.2
Location : getAppearance
Killed by : none
negated conditional → NO_COVERAGE

267

1.1
Location : getAppearance
Killed by : none
changed conditional boundary → NO_COVERAGE

2.2
Location : getAppearance
Killed by : none
removed negation → NO_COVERAGE

3.3
Location : getAppearance
Killed by : none
Replaced float subtraction with addition → NO_COVERAGE

4.4
Location : getAppearance
Killed by : none
negated conditional → NO_COVERAGE

268

1.1
Location : getAppearance
Killed by : none
removed negation → NO_COVERAGE

2.2
Location : getAppearance
Killed by : none
Replaced float addition with subtraction → NO_COVERAGE

269

1.1
Location : getAppearance
Killed by : none
Replaced float subtraction with addition → NO_COVERAGE

2.2
Location : getAppearance
Killed by : none
Replaced float subtraction with addition → NO_COVERAGE

272

1.1
Location : getAppearance
Killed by : none
changed conditional boundary → NO_COVERAGE

2.2
Location : getAppearance
Killed by : none
Replaced bitwise AND with OR → NO_COVERAGE

3.3
Location : getAppearance
Killed by : none
negated conditional → NO_COVERAGE

4.4
Location : getAppearance
Killed by : none
negated conditional → NO_COVERAGE

275

1.1
Location : getAppearance
Killed by : none
negated conditional → NO_COVERAGE

276

1.1
Location : getAppearance
Killed by : none
Replaced integer subtraction with addition → NO_COVERAGE

277

1.1
Location : getAppearance
Killed by : none
negated conditional → NO_COVERAGE

278

1.1
Location : getAppearance
Killed by : none
Replaced integer subtraction with addition → NO_COVERAGE

2.2
Location : getAppearance
Killed by : none
Replaced integer division with multiplication → NO_COVERAGE

279

1.1
Location : getAppearance
Killed by : none
Replaced float subtraction with addition → NO_COVERAGE

2.2
Location : getAppearance
Killed by : none
Replaced float division with multiplication → NO_COVERAGE

280

1.1
Location : getAppearance
Killed by : none
Replaced float division with multiplication → NO_COVERAGE

2.2
Location : getAppearance
Killed by : none
Replaced float multiplication with division → NO_COVERAGE

3.3
Location : getAppearance
Killed by : none
Replaced float addition with subtraction → NO_COVERAGE

281

1.1
Location : getAppearance
Killed by : none
negated conditional → NO_COVERAGE

282

1.1
Location : getAppearance
Killed by : none
removed call to com/lowagie/text/pdf/PdfAppearance::setGrayFill → NO_COVERAGE

284

1.1
Location : getAppearance
Killed by : none
removed call to com/lowagie/text/pdf/PdfAppearance::setColorFill → NO_COVERAGE

285

1.1
Location : getAppearance
Killed by : none
removed call to com/lowagie/text/pdf/PdfAppearance::beginText → NO_COVERAGE

289

1.1
Location : getAppearance
Killed by : none
removed call to com/lowagie/text/pdf/PdfAppearance::setFontAndSize → NO_COVERAGE

291

1.1
Location : getAppearance
Killed by : none
changed conditional boundary → NO_COVERAGE

2.2
Location : getAppearance
Killed by : none
negated conditional → NO_COVERAGE

292

1.1
Location : getAppearance
Killed by : none
Replaced integer addition with subtraction → NO_COVERAGE

294

1.1
Location : getAppearance
Killed by : none
Replaced float addition with subtraction → NO_COVERAGE

2.2
Location : getAppearance
Killed by : none
Replaced float division with multiplication → NO_COVERAGE

3.3
Location : getAppearance
Killed by : none
Replaced float subtraction with addition → NO_COVERAGE

4.4
Location : getAppearance
Killed by : none
Replaced float subtraction with addition → NO_COVERAGE

5.5
Location : getAppearance
Killed by : none
removed call to com/lowagie/text/pdf/PdfAppearance::setTextMatrix → NO_COVERAGE

295

1.1
Location : getAppearance
Killed by : none
removed call to com/lowagie/text/pdf/PdfAppearance::showText → NO_COVERAGE

296

1.1
Location : getAppearance
Killed by : none
Replaced float addition with subtraction → NO_COVERAGE

299

1.1
Location : getAppearance
Killed by : none
removed call to com/lowagie/text/pdf/PdfAppearance::endText → NO_COVERAGE

305

1.1
Location : getAppearance
Killed by : none
Replaced float addition with subtraction → NO_COVERAGE

2.2
Location : getAppearance
Killed by : none
Replaced float multiplication with division → NO_COVERAGE

3.3
Location : getAppearance
Killed by : none
Replaced float subtraction with addition → NO_COVERAGE

308

1.1
Location : getAppearance
Killed by : none
Replaced float division with multiplication → NO_COVERAGE

2.2
Location : getAppearance
Killed by : none
Replaced float addition with subtraction → NO_COVERAGE

311

1.1
Location : getAppearance
Killed by : none
Replaced float multiplication with division → NO_COVERAGE

2.2
Location : getAppearance
Killed by : none
Replaced float addition with subtraction → NO_COVERAGE

313

1.1
Location : getAppearance
Killed by : none
Replaced float subtraction with addition → NO_COVERAGE

2.2
Location : getAppearance
Killed by : none
removed call to com/lowagie/text/pdf/ColumnText::showTextAligned → NO_COVERAGE

316

1.1
Location : getAppearance
Killed by : none
removed call to com/lowagie/text/pdf/PdfAppearance::restoreState → NO_COVERAGE

317

1.1
Location : getAppearance
Killed by : none
removed call to com/lowagie/text/pdf/PdfAppearance::endVariableText → NO_COVERAGE

318

1.1
Location : getAppearance
Killed by : none
mutated return of Object value for com/lowagie/text/pdf/TextField::getAppearance to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE

329

1.1
Location : getListAppearance
Killed by : none
negated conditional → NO_COVERAGE

2.2
Location : getListAppearance
Killed by : none
negated conditional → NO_COVERAGE

330

1.1
Location : getListAppearance
Killed by : none
mutated return of Object value for com/lowagie/text/pdf/TextField::getListAppearance to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE

332

1.1
Location : getListAppearance
Killed by : none
removed call to com/lowagie/text/pdf/PdfAppearance::beginVariableText → NO_COVERAGE

338

1.1
Location : getListAppearance
Killed by : none
negated conditional → NO_COVERAGE

341

1.1
Location : getListAppearance
Killed by : none
negated conditional → NO_COVERAGE

2.2
Location : getListAppearance
Killed by : none
negated conditional → NO_COVERAGE

342

1.1
Location : getListAppearance
Killed by : none
Replaced float multiplication with division → NO_COVERAGE

2.2
Location : getListAppearance
Killed by : none
Replaced float subtraction with addition → NO_COVERAGE

344

1.1
Location : getListAppearance
Killed by : none
negated conditional → NO_COVERAGE

345

1.1
Location : getListAppearance
Killed by : none
Replaced float multiplication with division → NO_COVERAGE

2.2
Location : getListAppearance
Killed by : none
Replaced float subtraction with addition → NO_COVERAGE

346

1.1
Location : getListAppearance
Killed by : none
Replaced float multiplication with division → NO_COVERAGE

349

1.1
Location : getListAppearance
Killed by : none
Replaced float subtraction with addition → NO_COVERAGE

350

1.1
Location : getListAppearance
Killed by : none
Replaced float division with multiplication → NO_COVERAGE

2.2
Location : getListAppearance
Killed by : none
Replaced integer addition with subtraction → NO_COVERAGE

354

1.1
Location : getListAppearance
Killed by : none
Replaced integer addition with subtraction → NO_COVERAGE

355

1.1
Location : getListAppearance
Killed by : none
changed conditional boundary → NO_COVERAGE

2.2
Location : getListAppearance
Killed by : none
negated conditional → NO_COVERAGE

358

1.1
Location : getListAppearance
Killed by : none
removed call to com/lowagie/text/pdf/PdfAppearance::saveState → NO_COVERAGE

359

1.1
Location : getListAppearance
Killed by : none
Replaced float multiplication with division → NO_COVERAGE

2.2
Location : getListAppearance
Killed by : none
Replaced float subtraction with addition → NO_COVERAGE

3.3
Location : getListAppearance
Killed by : none
Replaced float multiplication with division → NO_COVERAGE

4.4
Location : getListAppearance
Killed by : none
Replaced float subtraction with addition → NO_COVERAGE

5.5
Location : getListAppearance
Killed by : none
removed call to com/lowagie/text/pdf/PdfAppearance::rectangle → NO_COVERAGE

360

1.1
Location : getListAppearance
Killed by : none
removed call to com/lowagie/text/pdf/PdfAppearance::clip → NO_COVERAGE

361

1.1
Location : getListAppearance
Killed by : none
removed call to com/lowagie/text/pdf/PdfAppearance::newPath → NO_COVERAGE

362

1.1
Location : getListAppearance
Killed by : none
negated conditional → NO_COVERAGE

366

1.1
Location : getListAppearance
Killed by : none
removed call to com/lowagie/text/pdf/PdfAppearance::setColorFill → NO_COVERAGE

371

1.1
Location : getListAppearance
Killed by : none
changed conditional boundary → NO_COVERAGE

2.2
Location : getListAppearance
Killed by : none
changed conditional boundary → NO_COVERAGE

3.3
Location : getListAppearance
Killed by : none
negated conditional → NO_COVERAGE

4.4
Location : getListAppearance
Killed by : none
negated conditional → NO_COVERAGE

372

1.1
Location : getListAppearance
Killed by : none
Replaced float addition with subtraction → NO_COVERAGE

2.2
Location : getListAppearance
Killed by : none
Replaced integer subtraction with addition → NO_COVERAGE

3.3
Location : getListAppearance
Killed by : none
Replaced integer addition with subtraction → NO_COVERAGE

4.4
Location : getListAppearance
Killed by : none
Replaced float multiplication with division → NO_COVERAGE

5.5
Location : getListAppearance
Killed by : none
Replaced float subtraction with addition → NO_COVERAGE

6.6
Location : getListAppearance
Killed by : none
Replaced float multiplication with division → NO_COVERAGE

7.7
Location : getListAppearance
Killed by : none
Replaced float subtraction with addition → NO_COVERAGE

8.8
Location : getListAppearance
Killed by : none
removed call to com/lowagie/text/pdf/PdfAppearance::rectangle → NO_COVERAGE

373

1.1
Location : getListAppearance
Killed by : none
removed call to com/lowagie/text/pdf/PdfAppearance::fill → NO_COVERAGE

376

1.1
Location : getListAppearance
Killed by : none
Replaced float multiplication with division → NO_COVERAGE

377

1.1
Location : getListAppearance
Killed by : none
Replaced float addition with subtraction → NO_COVERAGE

2.2
Location : getListAppearance
Killed by : none
Replaced float subtraction with addition → NO_COVERAGE

378

1.1
Location : getListAppearance
Killed by : none
changed conditional boundary → NO_COVERAGE

2.2
Location : getListAppearance
Killed by : none
Changed increment from 1 to -1 → NO_COVERAGE

3.3
Location : getListAppearance
Killed by : none
Replaced float subtraction with addition → NO_COVERAGE

4.4
Location : getListAppearance
Killed by : none
negated conditional → NO_COVERAGE

380

1.1
Location : getListAppearance
Killed by : none
negated conditional → NO_COVERAGE

383

1.1
Location : getListAppearance
Killed by : none
negated conditional → NO_COVERAGE

385

1.1
Location : getListAppearance
Killed by : none
removed call to com/lowagie/text/pdf/ColumnText::showTextAligned → NO_COVERAGE

387

1.1
Location : getListAppearance
Killed by : none
removed call to com/lowagie/text/pdf/PdfAppearance::restoreState → NO_COVERAGE

388

1.1
Location : getListAppearance
Killed by : none
removed call to com/lowagie/text/pdf/PdfAppearance::endVariableText → NO_COVERAGE

389

1.1
Location : getListAppearance
Killed by : none
mutated return of Object value for com/lowagie/text/pdf/TextField::getListAppearance to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE

399

1.1
Location : getTextField
Killed by : none
changed conditional boundary → NO_COVERAGE

2.2
Location : getTextField
Killed by : none
negated conditional → NO_COVERAGE

400

1.1
Location : getTextField
Killed by : none
Replaced bitwise AND with OR → NO_COVERAGE

401

1.1
Location : getTextField
Killed by : none
Replaced bitwise AND with OR → NO_COVERAGE

2.2
Location : getTextField
Killed by : none
negated conditional → NO_COVERAGE

402

1.1
Location : getTextField
Killed by : none
Replaced bitwise AND with OR → NO_COVERAGE

404

1.1
Location : getTextField
Killed by : none
removed call to com/lowagie/text/pdf/PdfFormField::setWidget → NO_COVERAGE

407

1.1
Location : getTextField
Killed by : none
removed call to com/lowagie/text/pdf/PdfFormField::setQuadding → NO_COVERAGE

410

1.1
Location : getTextField
Killed by : none
removed call to com/lowagie/text/pdf/PdfFormField::setQuadding → NO_COVERAGE

413

1.1
Location : getTextField
Killed by : none
negated conditional → NO_COVERAGE

414

1.1
Location : getTextField
Killed by : none
removed call to com/lowagie/text/pdf/PdfFormField::setMKRotation → NO_COVERAGE

415

1.1
Location : getTextField
Killed by : none
negated conditional → NO_COVERAGE

416

1.1
Location : getTextField
Killed by : none
removed call to com/lowagie/text/pdf/PdfFormField::setFieldName → NO_COVERAGE

417

1.1
Location : getTextField
Killed by : none
negated conditional → NO_COVERAGE

418

1.1
Location : getTextField
Killed by : none
removed call to com/lowagie/text/pdf/PdfFormField::setValueAsString → NO_COVERAGE

419

1.1
Location : getTextField
Killed by : none
negated conditional → NO_COVERAGE

420

1.1
Location : getTextField
Killed by : none
removed call to com/lowagie/text/pdf/PdfFormField::setDefaultValueAsString → NO_COVERAGE

421

1.1
Location : getTextField
Killed by : none
Replaced bitwise AND with OR → NO_COVERAGE

2.2
Location : getTextField
Killed by : none
negated conditional → NO_COVERAGE

423

1.1
Location : getTextField
Killed by : none
Replaced bitwise AND with OR → NO_COVERAGE

2.2
Location : getTextField
Killed by : none
negated conditional → NO_COVERAGE

425

1.1
Location : getTextField
Killed by : none
Replaced bitwise AND with OR → NO_COVERAGE

2.2
Location : getTextField
Killed by : none
negated conditional → NO_COVERAGE

427

1.1
Location : getTextField
Killed by : none
Replaced bitwise AND with OR → NO_COVERAGE

2.2
Location : getTextField
Killed by : none
negated conditional → NO_COVERAGE

429

1.1
Location : getTextField
Killed by : none
Replaced bitwise AND with OR → NO_COVERAGE

2.2
Location : getTextField
Killed by : none
negated conditional → NO_COVERAGE

431

1.1
Location : getTextField
Killed by : none
Replaced bitwise AND with OR → NO_COVERAGE

2.2
Location : getTextField
Killed by : none
negated conditional → NO_COVERAGE

433

1.1
Location : getTextField
Killed by : none
Replaced bitwise AND with OR → NO_COVERAGE

2.2
Location : getTextField
Killed by : none
negated conditional → NO_COVERAGE

435

1.1
Location : getTextField
Killed by : none
Replaced bitwise AND with OR → NO_COVERAGE

2.2
Location : getTextField
Killed by : none
negated conditional → NO_COVERAGE

438

1.1
Location : getTextField
Killed by : none
removed call to com/lowagie/text/pdf/PdfFormField::setBorderStyle → NO_COVERAGE

440

1.1
Location : getTextField
Killed by : none
removed call to com/lowagie/text/pdf/PdfFormField::setAppearance → NO_COVERAGE

442

1.1
Location : getTextField
Killed by : none
removed call to com/lowagie/text/pdf/PdfAppearance::setFontAndSize → NO_COVERAGE

443

1.1
Location : getTextField
Killed by : none
negated conditional → NO_COVERAGE

444

1.1
Location : getTextField
Killed by : none
removed call to com/lowagie/text/pdf/PdfAppearance::setGrayFill → NO_COVERAGE

446

1.1
Location : getTextField
Killed by : none
removed call to com/lowagie/text/pdf/PdfAppearance::setColorFill → NO_COVERAGE

447

1.1
Location : getTextField
Killed by : none
removed call to com/lowagie/text/pdf/PdfFormField::setDefaultAppearanceString → NO_COVERAGE

448

1.1
Location : getTextField
Killed by : none
negated conditional → NO_COVERAGE

449

1.1
Location : getTextField
Killed by : none
removed call to com/lowagie/text/pdf/PdfFormField::setMKBorderColor → NO_COVERAGE

450

1.1
Location : getTextField
Killed by : none
negated conditional → NO_COVERAGE

451

1.1
Location : getTextField
Killed by : none
removed call to com/lowagie/text/pdf/PdfFormField::setMKBackgroundColor → NO_COVERAGE

454

1.1
Location : getTextField
Killed by : none
removed call to com/lowagie/text/pdf/PdfFormField::setFlags → NO_COVERAGE

459

1.1
Location : getTextField
Killed by : none
removed call to com/lowagie/text/pdf/PdfFormField::setFlags → NO_COVERAGE

462

1.1
Location : getTextField
Killed by : none
removed call to com/lowagie/text/pdf/PdfFormField::setFlags → NO_COVERAGE

465

1.1
Location : getTextField
Killed by : none
mutated return of Object value for com/lowagie/text/pdf/TextField::getTextField to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE

475

1.1
Location : getComboField
Killed by : none
mutated return of Object value for com/lowagie/text/pdf/TextField::getComboField to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE

485

1.1
Location : getListField
Killed by : none
mutated return of Object value for com/lowagie/text/pdf/TextField::getListField to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE

489

1.1
Location : getTopChoice
Killed by : none
negated conditional → NO_COVERAGE

2.2
Location : getTopChoice
Killed by : none
negated conditional → NO_COVERAGE

490

1.1
Location : getTopChoice
Killed by : none
replaced return of integer sized value with (x == 0 ? 1 : 0) → NO_COVERAGE

495

1.1
Location : getTopChoice
Killed by : none
negated conditional → NO_COVERAGE

496

1.1
Location : getTopChoice
Killed by : none
replaced return of integer sized value with (x == 0 ? 1 : 0) → NO_COVERAGE

500

1.1
Location : getTopChoice
Killed by : none
negated conditional → NO_COVERAGE

505

1.1
Location : getTopChoice
Killed by : none
replaced return of integer sized value with (x == 0 ? 1 : 0) → NO_COVERAGE

509

1.1
Location : getChoiceField
Killed by : none
Replaced bitwise AND with OR → NO_COVERAGE

511

1.1
Location : getChoiceField
Killed by : none
negated conditional → NO_COVERAGE

516

1.1
Location : getChoiceField
Killed by : none
negated conditional → NO_COVERAGE

519

1.1
Location : getChoiceField
Killed by : none
changed conditional boundary → NO_COVERAGE

2.2
Location : getChoiceField
Killed by : none
negated conditional → NO_COVERAGE

525

1.1
Location : getChoiceField
Killed by : none
negated conditional → NO_COVERAGE

526

1.1
Location : getChoiceField
Killed by : none
negated conditional → NO_COVERAGE

529

1.1
Location : getChoiceField
Killed by : none
Replaced bitwise AND with OR → NO_COVERAGE

2.2
Location : getChoiceField
Killed by : none
negated conditional → NO_COVERAGE

533

1.1
Location : getChoiceField
Killed by : none
changed conditional boundary → NO_COVERAGE

2.2
Location : getChoiceField
Killed by : none
negated conditional → NO_COVERAGE

536

1.1
Location : getChoiceField
Killed by : none
changed conditional boundary → NO_COVERAGE

2.2
Location : getChoiceField
Killed by : none
Changed increment from 1 to -1 → NO_COVERAGE

3.3
Location : getChoiceField
Killed by : none
negated conditional → NO_COVERAGE

537

1.1
Location : getChoiceField
Killed by : none
negated conditional → NO_COVERAGE

540

1.1
Location : getChoiceField
Killed by : none
negated conditional → NO_COVERAGE

543

1.1
Location : getChoiceField
Killed by : none
Replaced bitwise AND with OR → NO_COVERAGE

2.2
Location : getChoiceField
Killed by : none
negated conditional → NO_COVERAGE

545

1.1
Location : getChoiceField
Killed by : none
removed call to com/lowagie/text/pdf/PdfFormField::setWidget → NO_COVERAGE

546

1.1
Location : getChoiceField
Killed by : none
negated conditional → NO_COVERAGE

547

1.1
Location : getChoiceField
Killed by : none
removed call to com/lowagie/text/pdf/PdfFormField::setMKRotation → NO_COVERAGE

548

1.1
Location : getChoiceField
Killed by : none
negated conditional → NO_COVERAGE

549

1.1
Location : getChoiceField
Killed by : none
removed call to com/lowagie/text/pdf/PdfFormField::setFieldName → NO_COVERAGE

550

1.1
Location : getChoiceField
Killed by : none
changed conditional boundary → NO_COVERAGE

2.2
Location : getChoiceField
Killed by : none
negated conditional → NO_COVERAGE

551

1.1
Location : getChoiceField
Killed by : none
negated conditional → NO_COVERAGE

552

1.1
Location : getChoiceField
Killed by : none
changed conditional boundary → NO_COVERAGE

2.2
Location : getChoiceField
Killed by : none
negated conditional → NO_COVERAGE

553

1.1
Location : getChoiceField
Killed by : none
removed call to com/lowagie/text/pdf/PdfFormField::setValueAsString → NO_COVERAGE

554

1.1
Location : getChoiceField
Killed by : none
removed call to com/lowagie/text/pdf/PdfFormField::setDefaultValueAsString → NO_COVERAGE

556

1.1
Location : getChoiceField
Killed by : none
removed call to com/lowagie/text/pdf/TextField::writeMultipleValues → NO_COVERAGE

559

1.1
Location : getChoiceField
Killed by : none
changed conditional boundary → NO_COVERAGE

2.2
Location : getChoiceField
Killed by : none
negated conditional → NO_COVERAGE

560

1.1
Location : getChoiceField
Killed by : none
removed call to com/lowagie/text/pdf/PdfFormField::setValueAsString → NO_COVERAGE

561

1.1
Location : getChoiceField
Killed by : none
removed call to com/lowagie/text/pdf/PdfFormField::setDefaultValueAsString → NO_COVERAGE

563

1.1
Location : getChoiceField
Killed by : none
removed call to com/lowagie/text/pdf/TextField::writeMultipleValues → NO_COVERAGE

567

1.1
Location : getChoiceField
Killed by : none
Replaced bitwise AND with OR → NO_COVERAGE

2.2
Location : getChoiceField
Killed by : none
negated conditional → NO_COVERAGE

569

1.1
Location : getChoiceField
Killed by : none
Replaced bitwise AND with OR → NO_COVERAGE

2.2
Location : getChoiceField
Killed by : none
negated conditional → NO_COVERAGE

571

1.1
Location : getChoiceField
Killed by : none
Replaced bitwise AND with OR → NO_COVERAGE

2.2
Location : getChoiceField
Killed by : none
negated conditional → NO_COVERAGE

573

1.1
Location : getChoiceField
Killed by : none
Replaced bitwise AND with OR → NO_COVERAGE

2.2
Location : getChoiceField
Killed by : none
negated conditional → NO_COVERAGE

577

1.1
Location : getChoiceField
Killed by : none
removed call to com/lowagie/text/pdf/PdfFormField::setBorderStyle → NO_COVERAGE

579

1.1
Location : getChoiceField
Killed by : none
negated conditional → NO_COVERAGE

581

1.1
Location : getChoiceField
Killed by : none
changed conditional boundary → NO_COVERAGE

2.2
Location : getChoiceField
Killed by : none
negated conditional → NO_COVERAGE

582

1.1
Location : getChoiceField
Killed by : none
removed call to com/lowagie/text/pdf/PdfFormField::put → NO_COVERAGE

586

1.1
Location : getChoiceField
Killed by : none
removed call to com/lowagie/text/pdf/PdfFormField::setAppearance → NO_COVERAGE

588

1.1
Location : getChoiceField
Killed by : none
removed call to com/lowagie/text/pdf/PdfAppearance::setFontAndSize → NO_COVERAGE

589

1.1
Location : getChoiceField
Killed by : none
negated conditional → NO_COVERAGE

590

1.1
Location : getChoiceField
Killed by : none
removed call to com/lowagie/text/pdf/PdfAppearance::setGrayFill → NO_COVERAGE

592

1.1
Location : getChoiceField
Killed by : none
removed call to com/lowagie/text/pdf/PdfAppearance::setColorFill → NO_COVERAGE

593

1.1
Location : getChoiceField
Killed by : none
removed call to com/lowagie/text/pdf/PdfFormField::setDefaultAppearanceString → NO_COVERAGE

594

1.1
Location : getChoiceField
Killed by : none
negated conditional → NO_COVERAGE

595

1.1
Location : getChoiceField
Killed by : none
removed call to com/lowagie/text/pdf/PdfFormField::setMKBorderColor → NO_COVERAGE

596

1.1
Location : getChoiceField
Killed by : none
negated conditional → NO_COVERAGE

597

1.1
Location : getChoiceField
Killed by : none
removed call to com/lowagie/text/pdf/PdfFormField::setMKBackgroundColor → NO_COVERAGE

600

1.1
Location : getChoiceField
Killed by : none
removed call to com/lowagie/text/pdf/PdfFormField::setFlags → NO_COVERAGE

605

1.1
Location : getChoiceField
Killed by : none
removed call to com/lowagie/text/pdf/PdfFormField::setFlags → NO_COVERAGE

608

1.1
Location : getChoiceField
Killed by : none
removed call to com/lowagie/text/pdf/PdfFormField::setFlags → NO_COVERAGE

611

1.1
Location : getChoiceField
Killed by : none
mutated return of Object value for com/lowagie/text/pdf/TextField::getChoiceField to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE

621

1.1
Location : writeMultipleValues
Killed by : none
negated conditional → NO_COVERAGE

623

1.1
Location : writeMultipleValues
Killed by : none
negated conditional → NO_COVERAGE

627

1.1
Location : writeMultipleValues
Killed by : none
removed call to com/lowagie/text/pdf/PdfFormField::put → NO_COVERAGE

628

1.1
Location : writeMultipleValues
Killed by : none
removed call to com/lowagie/text/pdf/PdfFormField::put → NO_COVERAGE

709

1.1
Location : addChoiceSelection
Killed by : none
Replaced bitwise AND with OR → NO_COVERAGE

2.2
Location : addChoiceSelection
Killed by : none
negated conditional → NO_COVERAGE

720

1.1
Location : setChoiceSelections
Killed by : none
negated conditional → NO_COVERAGE

722

1.1
Location : setChoiceSelections
Killed by : none
changed conditional boundary → NO_COVERAGE

2.2
Location : setChoiceSelections
Killed by : none
Replaced bitwise AND with OR → NO_COVERAGE

3.3
Location : setChoiceSelections
Killed by : none
negated conditional → NO_COVERAGE

4.4
Location : setChoiceSelections
Killed by : none
negated conditional → NO_COVERAGE

724

1.1
Location : setChoiceSelections
Killed by : none
changed conditional boundary → NO_COVERAGE

2.2
Location : setChoiceSelections
Killed by : none
negated conditional → NO_COVERAGE

730

1.1
Location : setChoiceSelections
Killed by : none
removed call to java/util/ArrayList::clear → NO_COVERAGE

Active mutators

Tests examined


Report generated by PIT 1.4.2