1 | /* | |
2 | * $Id: BarcodeDatamatrix.java 3117 2008-01-31 05:53:22Z xlv $ | |
3 | * | |
4 | * Copyright 2007 by Paulo Soares. | |
5 | * | |
6 | * The contents of this file are subject to the Mozilla Public License Version 1.1 | |
7 | * (the "License"); you may not use this file except in compliance with the License. | |
8 | * You may obtain a copy of the License at http://www.mozilla.org/MPL/ | |
9 | * | |
10 | * Software distributed under the License is distributed on an "AS IS" basis, | |
11 | * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License | |
12 | * for the specific language governing rights and limitations under the License. | |
13 | * | |
14 | * The Original Code is 'iText, a free JAVA-PDF library'. | |
15 | * | |
16 | * The Initial Developer of the Original Code is Bruno Lowagie. Portions created by | |
17 | * the Initial Developer are Copyright (C) 1999, 2000, 2001, 2002 by Bruno Lowagie. | |
18 | * All Rights Reserved. | |
19 | * Co-Developer of the code is Paulo Soares. Portions created by the Co-Developer | |
20 | * are Copyright (C) 2000, 2001, 2002 by Paulo Soares. All Rights Reserved. | |
21 | * | |
22 | * Contributor(s): all the names of the contributors are added in the source code | |
23 | * where applicable. | |
24 | * | |
25 | * Alternatively, the contents of this file may be used under the terms of the | |
26 | * LGPL license (the "GNU LIBRARY GENERAL PUBLIC LICENSE"), in which case the | |
27 | * provisions of LGPL are applicable instead of those above. If you wish to | |
28 | * allow use of your version of this file only under the terms of the LGPL | |
29 | * License and not to allow others to use your version of this file under | |
30 | * the MPL, indicate your decision by deleting the provisions above and | |
31 | * replace them with the notice and other provisions required by the LGPL. | |
32 | * If you do not delete the provisions above, a recipient may use your version | |
33 | * of this file under either the MPL or the GNU LIBRARY GENERAL PUBLIC LICENSE. | |
34 | * | |
35 | * This library is free software; you can redistribute it and/or modify it | |
36 | * under the terms of the MPL as stated above or under the terms of the GNU | |
37 | * Library General Public License as published by the Free Software Foundation; | |
38 | * either version 2 of the License, or any later version. | |
39 | * | |
40 | * This library is distributed in the hope that it will be useful, but WITHOUT | |
41 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS | |
42 | * FOR A PARTICULAR PURPOSE. See the GNU Library general Public License for more | |
43 | * details. | |
44 | * | |
45 | * If you didn't download this code from the following link, you should check if | |
46 | * you aren't using an obsolete version: | |
47 | * http://www.lowagie.com/iText/ | |
48 | */ | |
49 | package com.lowagie.text.pdf; | |
50 | ||
51 | import com.lowagie.text.BadElementException; | |
52 | import com.lowagie.text.Image; | |
53 | import com.lowagie.text.pdf.codec.CCITTG4Encoder; | |
54 | import java.awt.Canvas; | |
55 | import java.awt.Color; | |
56 | import java.awt.image.MemoryImageSource; | |
57 | import java.nio.charset.StandardCharsets; | |
58 | import java.util.Arrays; | |
59 | import java.io.UnsupportedEncodingException; | |
60 | import java.util.Hashtable; | |
61 | ||
62 | /** | |
63 | * A DataMatrix 2D barcode generator. | |
64 | */ | |
65 | public class BarcodeDatamatrix { | |
66 | /** | |
67 | * No error. | |
68 | */ | |
69 | public static final int DM_NO_ERROR = 0; | |
70 | /** | |
71 | * The text is too big for the symbology capabilities. | |
72 | */ | |
73 | public static final int DM_ERROR_TEXT_TOO_BIG = 1; | |
74 | /** | |
75 | * The dimensions given for the symbol are illegal. | |
76 | */ | |
77 | public static final int DM_ERROR_INVALID_SQUARE = 3; | |
78 | /** | |
79 | * An error while parsing an extension. | |
80 | */ | |
81 | public static final int DM_ERROR_EXTENSION = 5; | |
82 | ||
83 | /** | |
84 | * The best encodation will be used. | |
85 | */ | |
86 | public static final int DM_AUTO = 0; | |
87 | /** | |
88 | * ASCII encodation. | |
89 | */ | |
90 | public static final int DM_ASCII = 1; | |
91 | /** | |
92 | * C40 encodation. | |
93 | */ | |
94 | public static final int DM_C40 = 2; | |
95 | /** | |
96 | * TEXT encodation. | |
97 | */ | |
98 | public static final int DM_TEXT = 3; | |
99 | /** | |
100 | * Binary encodation. | |
101 | */ | |
102 | public static final int DM_B256 = 4; | |
103 | /** | |
104 | * X21 encodation. | |
105 | */ | |
106 | public static final int DM_X21 = 5; | |
107 | /** | |
108 | * EDIFACT encodation. | |
109 | */ | |
110 | public static final int DM_EDIFACT = 6; | |
111 | /** | |
112 | * No encodation needed. The bytes provided are already encoded. | |
113 | */ | |
114 | public static final int DM_RAW = 7; | |
115 | ||
116 | /** | |
117 | * Allows extensions to be embedded at the start of the text. | |
118 | */ | |
119 | public static final int DM_EXTENSION = 32; | |
120 | /** | |
121 | * Doesn't generate the image but returns all the other information. | |
122 | */ | |
123 | public static final int DM_TEST = 64; | |
124 | ||
125 | private final static DmParams[] dmSizes = { | |
126 | new DmParams(10, 10, 10, 10, 3, 3, 5), | |
127 | new DmParams(12, 12, 12, 12, 5, 5, 7), | |
128 | new DmParams(8, 18, 8, 18, 5, 5, 7), | |
129 | new DmParams(14, 14, 14, 14, 8, 8, 10), | |
130 | new DmParams(8, 32, 8, 16, 10, 10, 11), | |
131 | new DmParams(16, 16, 16, 16, 12, 12, 12), | |
132 | new DmParams(12, 26, 12, 26, 16, 16, 14), | |
133 | new DmParams(18, 18, 18, 18, 18, 18, 14), | |
134 | new DmParams(20, 20, 20, 20, 22, 22, 18), | |
135 | new DmParams(12, 36, 12, 18, 22, 22, 18), | |
136 | new DmParams(22, 22, 22, 22, 30, 30, 20), | |
137 | new DmParams(16, 36, 16, 18, 32, 32, 24), | |
138 | new DmParams(24, 24, 24, 24, 36, 36, 24), | |
139 | new DmParams(26, 26, 26, 26, 44, 44, 28), | |
140 | new DmParams(16, 48, 16, 24, 49, 49, 28), | |
141 | new DmParams(32, 32, 16, 16, 62, 62, 36), | |
142 | new DmParams(36, 36, 18, 18, 86, 86, 42), | |
143 | new DmParams(40, 40, 20, 20, 114, 114, 48), | |
144 | new DmParams(44, 44, 22, 22, 144, 144, 56), | |
145 | new DmParams(48, 48, 24, 24, 174, 174, 68), | |
146 | new DmParams(52, 52, 26, 26, 204, 102, 42), | |
147 | new DmParams(64, 64, 16, 16, 280, 140, 56), | |
148 | new DmParams(72, 72, 18, 18, 368, 92, 36), | |
149 | new DmParams(80, 80, 20, 20, 456, 114, 48), | |
150 | new DmParams(88, 88, 22, 22, 576, 144, 56), | |
151 | new DmParams(96, 96, 24, 24, 696, 174, 68), | |
152 | new DmParams(104, 104, 26, 26, 816, 136, 56), | |
153 | new DmParams(120, 120, 20, 20, 1050, 175, 68), | |
154 | new DmParams(132, 132, 22, 22, 1304, 163, 62), | |
155 | new DmParams(144, 144, 24, 24, 1558, 156, 62)}; | |
156 | ||
157 | private static final String x12 = "\r*> 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"; | |
158 | private int extOut; | |
159 | private short[] place; | |
160 | private byte[] image; | |
161 | private int height; | |
162 | private int width; | |
163 | private int ws; | |
164 | private int options; | |
165 | | |
166 | /** | |
167 | * Creates an instance of this class. | |
168 | */ | |
169 | public BarcodeDatamatrix() { | |
170 | } | |
171 | ||
172 | private void setBit(int x, int y, int xByte) { | |
173 |
6
1. setBit : Replaced integer multiplication with division → NO_COVERAGE 2. setBit : Replaced integer division with multiplication → NO_COVERAGE 3. setBit : Replaced integer addition with subtraction → NO_COVERAGE 4. setBit : Replaced bitwise AND with OR → NO_COVERAGE 5. setBit : Replaced Shift Right with Shift Left → NO_COVERAGE 6. setBit : Replaced bitwise OR with AND → NO_COVERAGE |
image[y * xByte + x / 8] |= (byte)(128 >> (x & 7)); |
174 | } | |
175 | ||
176 | private void draw(byte[] data, int dataSize, DmParams dm) { | |
177 | int i, j, p, x, y, xs, ys, z; | |
178 |
4
1. draw : Replaced integer multiplication with division → NO_COVERAGE 2. draw : Replaced integer addition with subtraction → NO_COVERAGE 3. draw : Replaced integer addition with subtraction → NO_COVERAGE 4. draw : Replaced integer division with multiplication → NO_COVERAGE |
int xByte = (dm.width + ws * 2 + 7) / 8; |
179 |
1
1. draw : removed call to java/util/Arrays::fill → NO_COVERAGE |
Arrays.fill(image, (byte)0); |
180 | //alignment patterns | |
181 | //dotted horizontal line | |
182 |
4
1. draw : changed conditional boundary → NO_COVERAGE 2. draw : Replaced integer addition with subtraction → NO_COVERAGE 3. draw : Replaced integer addition with subtraction → NO_COVERAGE 4. draw : negated conditional → NO_COVERAGE |
for (i = ws; i < dm.height + ws; i += dm.heightSection) { |
183 |
4
1. draw : changed conditional boundary → NO_COVERAGE 2. draw : Changed increment from 2 to -2 → NO_COVERAGE 3. draw : Replaced integer addition with subtraction → NO_COVERAGE 4. draw : negated conditional → NO_COVERAGE |
for (j = ws; j < dm.width + ws; j += 2) { |
184 |
1
1. draw : removed call to com/lowagie/text/pdf/BarcodeDatamatrix::setBit → NO_COVERAGE |
setBit(j, i, xByte); |
185 | } | |
186 | } | |
187 | //solid horizontal line | |
188 |
6
1. draw : changed conditional boundary → NO_COVERAGE 2. draw : Replaced integer subtraction with addition → NO_COVERAGE 3. draw : Replaced integer addition with subtraction → NO_COVERAGE 4. draw : Replaced integer addition with subtraction → NO_COVERAGE 5. draw : Replaced integer addition with subtraction → NO_COVERAGE 6. draw : negated conditional → NO_COVERAGE |
for (i = dm.heightSection - 1 + ws; i < dm.height + ws; i += dm.heightSection) { |
189 |
4
1. draw : changed conditional boundary → NO_COVERAGE 2. draw : Changed increment from 1 to -1 → NO_COVERAGE 3. draw : Replaced integer addition with subtraction → NO_COVERAGE 4. draw : negated conditional → NO_COVERAGE |
for (j = ws; j < dm.width + ws; ++j) { |
190 |
1
1. draw : removed call to com/lowagie/text/pdf/BarcodeDatamatrix::setBit → NO_COVERAGE |
setBit(j, i, xByte); |
191 | } | |
192 | } | |
193 | //solid vertical line | |
194 |
4
1. draw : changed conditional boundary → NO_COVERAGE 2. draw : Replaced integer addition with subtraction → NO_COVERAGE 3. draw : Replaced integer addition with subtraction → NO_COVERAGE 4. draw : negated conditional → NO_COVERAGE |
for (i = ws; i < dm.width + ws; i += dm.widthSection) { |
195 |
4
1. draw : changed conditional boundary → NO_COVERAGE 2. draw : Changed increment from 1 to -1 → NO_COVERAGE 3. draw : Replaced integer addition with subtraction → NO_COVERAGE 4. draw : negated conditional → NO_COVERAGE |
for (j = ws; j < dm.height + ws; ++j) { |
196 |
1
1. draw : removed call to com/lowagie/text/pdf/BarcodeDatamatrix::setBit → NO_COVERAGE |
setBit(i, j, xByte); |
197 | } | |
198 | } | |
199 | //dotted vertical line | |
200 |
6
1. draw : changed conditional boundary → NO_COVERAGE 2. draw : Replaced integer subtraction with addition → NO_COVERAGE 3. draw : Replaced integer addition with subtraction → NO_COVERAGE 4. draw : Replaced integer addition with subtraction → NO_COVERAGE 5. draw : Replaced integer addition with subtraction → NO_COVERAGE 6. draw : negated conditional → NO_COVERAGE |
for (i = dm.widthSection - 1 + ws; i < dm.width + ws; i += dm.widthSection) { |
201 |
5
1. draw : changed conditional boundary → NO_COVERAGE 2. draw : Changed increment from 2 to -2 → NO_COVERAGE 3. draw : Replaced integer addition with subtraction → NO_COVERAGE 4. draw : Replaced integer addition with subtraction → NO_COVERAGE 5. draw : negated conditional → NO_COVERAGE |
for (j = 1 + ws; j < dm.height + ws; j += 2) { |
202 |
1
1. draw : removed call to com/lowagie/text/pdf/BarcodeDatamatrix::setBit → NO_COVERAGE |
setBit(i, j, xByte); |
203 | } | |
204 | } | |
205 | p = 0; | |
206 |
3
1. draw : changed conditional boundary → NO_COVERAGE 2. draw : Replaced integer addition with subtraction → NO_COVERAGE 3. draw : negated conditional → NO_COVERAGE |
for (ys = 0; ys < dm.height; ys += dm.heightSection) { |
207 |
4
1. draw : changed conditional boundary → NO_COVERAGE 2. draw : Changed increment from 1 to -1 → NO_COVERAGE 3. draw : Replaced integer subtraction with addition → NO_COVERAGE 4. draw : negated conditional → NO_COVERAGE |
for (y = 1; y < dm.heightSection - 1; ++y) { |
208 |
3
1. draw : changed conditional boundary → NO_COVERAGE 2. draw : Replaced integer addition with subtraction → NO_COVERAGE 3. draw : negated conditional → NO_COVERAGE |
for (xs = 0; xs < dm.width; xs += dm.widthSection) { |
209 |
4
1. draw : changed conditional boundary → NO_COVERAGE 2. draw : Changed increment from 1 to -1 → NO_COVERAGE 3. draw : Replaced integer subtraction with addition → NO_COVERAGE 4. draw : negated conditional → NO_COVERAGE |
for (x = 1; x < dm.widthSection - 1; ++x) { |
210 |
1
1. draw : Changed increment from 1 to -1 → NO_COVERAGE |
z = place[p++]; |
211 |
10
1. draw : changed conditional boundary → NO_COVERAGE 2. draw : Replaced integer division with multiplication → NO_COVERAGE 3. draw : Replaced integer subtraction with addition → NO_COVERAGE 4. draw : Replaced bitwise AND with OR → NO_COVERAGE 5. draw : Replaced integer modulus with multiplication → NO_COVERAGE 6. draw : Replaced Shift Right with Shift Left → NO_COVERAGE 7. draw : Replaced bitwise AND with OR → NO_COVERAGE 8. draw : negated conditional → NO_COVERAGE 9. draw : negated conditional → NO_COVERAGE 10. draw : negated conditional → NO_COVERAGE |
if (z == 1 || (z > 1 && ((data[z/8-1] & 0xff) & (128 >> (z%8))) != 0)) |
212 |
5
1. draw : Replaced integer addition with subtraction → NO_COVERAGE 2. draw : Replaced integer addition with subtraction → NO_COVERAGE 3. draw : Replaced integer addition with subtraction → NO_COVERAGE 4. draw : Replaced integer addition with subtraction → NO_COVERAGE 5. draw : removed call to com/lowagie/text/pdf/BarcodeDatamatrix::setBit → NO_COVERAGE |
setBit(x + xs + ws, y + ys + ws, xByte); |
213 | } | |
214 | } | |
215 | } | |
216 | } | |
217 | } | |
218 | ||
219 | private static void makePadding(byte[] data, int position, int count) { | |
220 | //already in ascii mode | |
221 |
2
1. makePadding : changed conditional boundary → NO_COVERAGE 2. makePadding : negated conditional → NO_COVERAGE |
if (count <= 0) |
222 | return; | |
223 |
1
1. makePadding : Changed increment from 1 to -1 → NO_COVERAGE |
data[position++] = (byte)129; |
224 |
3
1. makePadding : changed conditional boundary → NO_COVERAGE 2. makePadding : Changed increment from -1 to 1 → NO_COVERAGE 3. makePadding : negated conditional → NO_COVERAGE |
while (--count > 0) { |
225 |
5
1. makePadding : Replaced integer addition with subtraction → NO_COVERAGE 2. makePadding : Replaced integer multiplication with division → NO_COVERAGE 3. makePadding : Replaced integer modulus with multiplication → NO_COVERAGE 4. makePadding : Replaced integer addition with subtraction → NO_COVERAGE 5. makePadding : Replaced integer addition with subtraction → NO_COVERAGE |
int t = 129 + (((position + 1) * 149) % 253) + 1; |
226 |
2
1. makePadding : changed conditional boundary → NO_COVERAGE 2. makePadding : negated conditional → NO_COVERAGE |
if (t > 254) |
227 |
1
1. makePadding : Changed increment from -254 to 254 → NO_COVERAGE |
t -= 254; |
228 |
1
1. makePadding : Changed increment from 1 to -1 → NO_COVERAGE |
data[position++] = (byte)t; |
229 | } | |
230 | } | |
231 | ||
232 | private static boolean isDigit(int c) { | |
233 |
5
1. isDigit : changed conditional boundary → NO_COVERAGE 2. isDigit : changed conditional boundary → NO_COVERAGE 3. isDigit : negated conditional → NO_COVERAGE 4. isDigit : negated conditional → NO_COVERAGE 5. isDigit : replaced return of integer sized value with (x == 0 ? 1 : 0) → NO_COVERAGE |
return c >= '0' && c <= '9'; |
234 | } | |
235 | | |
236 | private static int asciiEncodation(byte[] text, int textOffset, int textLength, byte[] data, int dataOffset, int dataLength) { | |
237 | int ptrIn, ptrOut, c; | |
238 | ptrIn = textOffset; | |
239 | ptrOut = dataOffset; | |
240 |
1
1. asciiEncodation : Replaced integer addition with subtraction → NO_COVERAGE |
textLength += textOffset; |
241 |
1
1. asciiEncodation : Replaced integer addition with subtraction → NO_COVERAGE |
dataLength += dataOffset; |
242 |
2
1. asciiEncodation : changed conditional boundary → NO_COVERAGE 2. asciiEncodation : negated conditional → NO_COVERAGE |
while (ptrIn < textLength) { |
243 |
2
1. asciiEncodation : changed conditional boundary → NO_COVERAGE 2. asciiEncodation : negated conditional → NO_COVERAGE |
if (ptrOut >= dataLength) |
244 |
1
1. asciiEncodation : replaced return of integer sized value with (x == 0 ? 1 : 0) → NO_COVERAGE |
return -1; |
245 |
2
1. asciiEncodation : Changed increment from 1 to -1 → NO_COVERAGE 2. asciiEncodation : Replaced bitwise AND with OR → NO_COVERAGE |
c = text[ptrIn++] & 0xff; |
246 |
5
1. asciiEncodation : changed conditional boundary → NO_COVERAGE 2. asciiEncodation : Replaced bitwise AND with OR → NO_COVERAGE 3. asciiEncodation : negated conditional → NO_COVERAGE 4. asciiEncodation : negated conditional → NO_COVERAGE 5. asciiEncodation : negated conditional → NO_COVERAGE |
if (isDigit(c) && ptrIn < textLength && isDigit(text[ptrIn] & 0xff)) { |
247 |
8
1. asciiEncodation : Changed increment from 1 to -1 → NO_COVERAGE 2. asciiEncodation : Changed increment from 1 to -1 → NO_COVERAGE 3. asciiEncodation : Replaced integer subtraction with addition → NO_COVERAGE 4. asciiEncodation : Replaced integer multiplication with division → NO_COVERAGE 5. asciiEncodation : Replaced bitwise AND with OR → NO_COVERAGE 6. asciiEncodation : Replaced integer addition with subtraction → NO_COVERAGE 7. asciiEncodation : Replaced integer subtraction with addition → NO_COVERAGE 8. asciiEncodation : Replaced integer addition with subtraction → NO_COVERAGE |
data[ptrOut++] = (byte)((c - '0') * 10 + (text[ptrIn++] & 0xff) - '0' + 130); |
248 | } | |
249 |
2
1. asciiEncodation : changed conditional boundary → NO_COVERAGE 2. asciiEncodation : negated conditional → NO_COVERAGE |
else if (c > 127) { |
250 |
3
1. asciiEncodation : changed conditional boundary → NO_COVERAGE 2. asciiEncodation : Replaced integer addition with subtraction → NO_COVERAGE 3. asciiEncodation : negated conditional → NO_COVERAGE |
if (ptrOut + 1 >= dataLength) |
251 |
1
1. asciiEncodation : replaced return of integer sized value with (x == 0 ? 1 : 0) → NO_COVERAGE |
return -1; |
252 |
1
1. asciiEncodation : Changed increment from 1 to -1 → NO_COVERAGE |
data[ptrOut++] = (byte)235; |
253 |
3
1. asciiEncodation : Changed increment from 1 to -1 → NO_COVERAGE 2. asciiEncodation : Replaced integer subtraction with addition → NO_COVERAGE 3. asciiEncodation : Replaced integer addition with subtraction → NO_COVERAGE |
data[ptrOut++] = (byte)(c - 128 + 1); |
254 | } | |
255 | else { | |
256 |
2
1. asciiEncodation : Changed increment from 1 to -1 → NO_COVERAGE 2. asciiEncodation : Replaced integer addition with subtraction → NO_COVERAGE |
data[ptrOut++] = (byte)(c + 1); |
257 | } | |
258 | } | |
259 |
2
1. asciiEncodation : Replaced integer subtraction with addition → NO_COVERAGE 2. asciiEncodation : replaced return of integer sized value with (x == 0 ? 1 : 0) → NO_COVERAGE |
return ptrOut - dataOffset; |
260 | } | |
261 | ||
262 | private static int b256Encodation(byte[] text, int textOffset, int textLength, byte[] data, int dataOffset, int dataLength) { | |
263 | int k, j, prn, tv, c; | |
264 |
1
1. b256Encodation : negated conditional → NO_COVERAGE |
if (textLength == 0) |
265 |
1
1. b256Encodation : replaced return of integer sized value with (x == 0 ? 1 : 0) → NO_COVERAGE |
return 0; |
266 |
5
1. b256Encodation : changed conditional boundary → NO_COVERAGE 2. b256Encodation : changed conditional boundary → NO_COVERAGE 3. b256Encodation : Replaced integer addition with subtraction → NO_COVERAGE 4. b256Encodation : negated conditional → NO_COVERAGE 5. b256Encodation : negated conditional → NO_COVERAGE |
if (textLength < 250 && textLength + 2 > dataLength) |
267 |
1
1. b256Encodation : replaced return of integer sized value with (x == 0 ? 1 : 0) → NO_COVERAGE |
return -1; |
268 |
5
1. b256Encodation : changed conditional boundary → NO_COVERAGE 2. b256Encodation : changed conditional boundary → NO_COVERAGE 3. b256Encodation : Replaced integer addition with subtraction → NO_COVERAGE 4. b256Encodation : negated conditional → NO_COVERAGE 5. b256Encodation : negated conditional → NO_COVERAGE |
if (textLength >= 250 && textLength + 3 > dataLength) |
269 |
1
1. b256Encodation : replaced return of integer sized value with (x == 0 ? 1 : 0) → NO_COVERAGE |
return -1; |
270 | data[dataOffset] = (byte)231; | |
271 |
2
1. b256Encodation : changed conditional boundary → NO_COVERAGE 2. b256Encodation : negated conditional → NO_COVERAGE |
if (textLength < 250) { |
272 |
1
1. b256Encodation : Replaced integer addition with subtraction → NO_COVERAGE |
data[dataOffset + 1] = (byte)textLength; |
273 | k = 2; | |
274 | } | |
275 | else { | |
276 |
3
1. b256Encodation : Replaced integer addition with subtraction → NO_COVERAGE 2. b256Encodation : Replaced integer division with multiplication → NO_COVERAGE 3. b256Encodation : Replaced integer addition with subtraction → NO_COVERAGE |
data[dataOffset + 1] = (byte)(textLength / 250 + 249); |
277 |
2
1. b256Encodation : Replaced integer addition with subtraction → NO_COVERAGE 2. b256Encodation : Replaced integer modulus with multiplication → NO_COVERAGE |
data[dataOffset + 2] = (byte)(textLength % 250); |
278 | k = 3; | |
279 | } | |
280 |
2
1. b256Encodation : Replaced integer addition with subtraction → NO_COVERAGE 2. b256Encodation : removed call to java/lang/System::arraycopy → NO_COVERAGE |
System.arraycopy(text, textOffset, data, k + dataOffset, textLength); |
281 |
2
1. b256Encodation : Replaced integer addition with subtraction → NO_COVERAGE 2. b256Encodation : Replaced integer addition with subtraction → NO_COVERAGE |
k += textLength + dataOffset; |
282 |
4
1. b256Encodation : changed conditional boundary → NO_COVERAGE 2. b256Encodation : Changed increment from 1 to -1 → NO_COVERAGE 3. b256Encodation : Replaced integer addition with subtraction → NO_COVERAGE 4. b256Encodation : negated conditional → NO_COVERAGE |
for (j = dataOffset + 1; j < k; ++j) { |
283 |
1
1. b256Encodation : Replaced bitwise AND with OR → NO_COVERAGE |
c = data[j] & 0xff; |
284 |
4
1. b256Encodation : Replaced integer addition with subtraction → NO_COVERAGE 2. b256Encodation : Replaced integer multiplication with division → NO_COVERAGE 3. b256Encodation : Replaced integer modulus with multiplication → NO_COVERAGE 4. b256Encodation : Replaced integer addition with subtraction → NO_COVERAGE |
prn = ((149 * (j + 1)) % 255) + 1; |
285 |
1
1. b256Encodation : Replaced integer addition with subtraction → NO_COVERAGE |
tv = c + prn; |
286 |
2
1. b256Encodation : changed conditional boundary → NO_COVERAGE 2. b256Encodation : negated conditional → NO_COVERAGE |
if (tv > 255) |
287 |
1
1. b256Encodation : Changed increment from -256 to 256 → NO_COVERAGE |
tv -= 256; |
288 | data[j] = (byte)tv; | |
289 | ||
290 | } | |
291 |
2
1. b256Encodation : Replaced integer subtraction with addition → NO_COVERAGE 2. b256Encodation : replaced return of integer sized value with (x == 0 ? 1 : 0) → NO_COVERAGE |
return k - dataOffset; |
292 | } | |
293 | ||
294 | private static int X12Encodation(byte[] text, int textOffset, int textLength, byte[] data, int dataOffset, int dataLength) { | |
295 | int ptrIn, ptrOut, count, k, n, ci; | |
296 | byte c; | |
297 |
1
1. X12Encodation : negated conditional → NO_COVERAGE |
if (textLength == 0) |
298 |
1
1. X12Encodation : replaced return of integer sized value with (x == 0 ? 1 : 0) → NO_COVERAGE |
return 0; |
299 | ptrIn = 0; | |
300 | ptrOut = 0; | |
301 | byte[] x = new byte[textLength]; | |
302 | count = 0; | |
303 |
3
1. X12Encodation : changed conditional boundary → NO_COVERAGE 2. X12Encodation : Changed increment from 1 to -1 → NO_COVERAGE 3. X12Encodation : negated conditional → NO_COVERAGE |
for (; ptrIn < textLength; ++ptrIn) { |
304 |
1
1. X12Encodation : Replaced integer addition with subtraction → NO_COVERAGE |
int i = x12.indexOf((char)text[ptrIn + textOffset]); |
305 |
2
1. X12Encodation : changed conditional boundary → NO_COVERAGE 2. X12Encodation : negated conditional → NO_COVERAGE |
if (i >= 0) { |
306 | x[ptrIn] = (byte)i; | |
307 |
1
1. X12Encodation : Changed increment from 1 to -1 → NO_COVERAGE |
++count; |
308 | } | |
309 | else { | |
310 | x[ptrIn] = 100; | |
311 |
2
1. X12Encodation : changed conditional boundary → NO_COVERAGE 2. X12Encodation : negated conditional → NO_COVERAGE |
if (count >= 6) |
312 |
3
1. X12Encodation : Replaced integer division with multiplication → NO_COVERAGE 2. X12Encodation : Replaced integer multiplication with division → NO_COVERAGE 3. X12Encodation : Replaced integer subtraction with addition → NO_COVERAGE |
count -= (count / 3) * 3; |
313 |
3
1. X12Encodation : changed conditional boundary → NO_COVERAGE 2. X12Encodation : Changed increment from 1 to -1 → NO_COVERAGE 3. X12Encodation : negated conditional → NO_COVERAGE |
for (k = 0; k < count; ++k) |
314 |
2
1. X12Encodation : Replaced integer subtraction with addition → NO_COVERAGE 2. X12Encodation : Replaced integer subtraction with addition → NO_COVERAGE |
x[ptrIn - k - 1] = 100; |
315 | count = 0; | |
316 | } | |
317 | } | |
318 |
2
1. X12Encodation : changed conditional boundary → NO_COVERAGE 2. X12Encodation : negated conditional → NO_COVERAGE |
if (count >= 6) |
319 |
3
1. X12Encodation : Replaced integer division with multiplication → NO_COVERAGE 2. X12Encodation : Replaced integer multiplication with division → NO_COVERAGE 3. X12Encodation : Replaced integer subtraction with addition → NO_COVERAGE |
count -= (count / 3) * 3; |
320 |
3
1. X12Encodation : changed conditional boundary → NO_COVERAGE 2. X12Encodation : Changed increment from 1 to -1 → NO_COVERAGE 3. X12Encodation : negated conditional → NO_COVERAGE |
for (k = 0; k < count; ++k) |
321 |
2
1. X12Encodation : Replaced integer subtraction with addition → NO_COVERAGE 2. X12Encodation : Replaced integer subtraction with addition → NO_COVERAGE |
x[ptrIn - k - 1] = 100; |
322 | ptrIn = 0; | |
323 | c = 0; | |
324 |
3
1. X12Encodation : changed conditional boundary → NO_COVERAGE 2. X12Encodation : Changed increment from 1 to -1 → NO_COVERAGE 3. X12Encodation : negated conditional → NO_COVERAGE |
for (; ptrIn < textLength; ++ptrIn) { |
325 | c = x[ptrIn]; | |
326 |
2
1. X12Encodation : changed conditional boundary → NO_COVERAGE 2. X12Encodation : negated conditional → NO_COVERAGE |
if (ptrOut >= dataLength) |
327 | break; | |
328 |
2
1. X12Encodation : changed conditional boundary → NO_COVERAGE 2. X12Encodation : negated conditional → NO_COVERAGE |
if (c < 40) { |
329 |
6
1. X12Encodation : changed conditional boundary → NO_COVERAGE 2. X12Encodation : changed conditional boundary → NO_COVERAGE 3. X12Encodation : Replaced integer subtraction with addition → NO_COVERAGE 4. X12Encodation : negated conditional → NO_COVERAGE 5. X12Encodation : negated conditional → NO_COVERAGE 6. X12Encodation : negated conditional → NO_COVERAGE |
if (ptrIn == 0 || (ptrIn > 0 && x[ptrIn - 1] > 40)) |
330 |
2
1. X12Encodation : Changed increment from 1 to -1 → NO_COVERAGE 2. X12Encodation : Replaced integer addition with subtraction → NO_COVERAGE |
data[dataOffset + ptrOut++] = (byte)238; |
331 |
3
1. X12Encodation : changed conditional boundary → NO_COVERAGE 2. X12Encodation : Replaced integer addition with subtraction → NO_COVERAGE 3. X12Encodation : negated conditional → NO_COVERAGE |
if (ptrOut + 2 > dataLength) |
332 | break; | |
333 |
7
1. X12Encodation : Replaced integer multiplication with division → NO_COVERAGE 2. X12Encodation : Replaced integer addition with subtraction → NO_COVERAGE 3. X12Encodation : Replaced integer multiplication with division → NO_COVERAGE 4. X12Encodation : Replaced integer addition with subtraction → NO_COVERAGE 5. X12Encodation : Replaced integer addition with subtraction → NO_COVERAGE 6. X12Encodation : Replaced integer addition with subtraction → NO_COVERAGE 7. X12Encodation : Replaced integer addition with subtraction → NO_COVERAGE |
n = 1600 * x[ptrIn] + 40 * x[ptrIn + 1] + x[ptrIn + 2] + 1; |
334 |
3
1. X12Encodation : Changed increment from 1 to -1 → NO_COVERAGE 2. X12Encodation : Replaced integer addition with subtraction → NO_COVERAGE 3. X12Encodation : Replaced integer division with multiplication → NO_COVERAGE |
data[dataOffset + ptrOut++] = (byte)(n / 256); |
335 |
2
1. X12Encodation : Changed increment from 1 to -1 → NO_COVERAGE 2. X12Encodation : Replaced integer addition with subtraction → NO_COVERAGE |
data[dataOffset + ptrOut++] = (byte)n; |
336 |
1
1. X12Encodation : Changed increment from 2 to -2 → NO_COVERAGE |
ptrIn += 2; |
337 | } | |
338 | else { | |
339 |
5
1. X12Encodation : changed conditional boundary → NO_COVERAGE 2. X12Encodation : changed conditional boundary → NO_COVERAGE 3. X12Encodation : Replaced integer subtraction with addition → NO_COVERAGE 4. X12Encodation : negated conditional → NO_COVERAGE 5. X12Encodation : negated conditional → NO_COVERAGE |
if (ptrIn > 0 && x[ptrIn - 1] < 40) |
340 |
2
1. X12Encodation : Changed increment from 1 to -1 → NO_COVERAGE 2. X12Encodation : Replaced integer addition with subtraction → NO_COVERAGE |
data[dataOffset + ptrOut++] = (byte)254; |
341 |
2
1. X12Encodation : Replaced integer addition with subtraction → NO_COVERAGE 2. X12Encodation : Replaced bitwise AND with OR → NO_COVERAGE |
ci = text[ptrIn + textOffset] & 0xff; |
342 |
2
1. X12Encodation : changed conditional boundary → NO_COVERAGE 2. X12Encodation : negated conditional → NO_COVERAGE |
if (ci > 127) { |
343 |
2
1. X12Encodation : Changed increment from 1 to -1 → NO_COVERAGE 2. X12Encodation : Replaced integer addition with subtraction → NO_COVERAGE |
data[dataOffset + ptrOut++] = (byte)235; |
344 |
1
1. X12Encodation : Changed increment from -128 to 128 → NO_COVERAGE |
ci -= 128; |
345 | } | |
346 |
2
1. X12Encodation : changed conditional boundary → NO_COVERAGE 2. X12Encodation : negated conditional → NO_COVERAGE |
if (ptrOut >= dataLength) |
347 | break; | |
348 |
3
1. X12Encodation : Changed increment from 1 to -1 → NO_COVERAGE 2. X12Encodation : Replaced integer addition with subtraction → NO_COVERAGE 3. X12Encodation : Replaced integer addition with subtraction → NO_COVERAGE |
data[dataOffset + ptrOut++] = (byte)(ci + 1); |
349 | } | |
350 | } | |
351 | c = 100; | |
352 |
2
1. X12Encodation : changed conditional boundary → NO_COVERAGE 2. X12Encodation : negated conditional → NO_COVERAGE |
if (textLength > 0) |
353 |
1
1. X12Encodation : Replaced integer subtraction with addition → NO_COVERAGE |
c = x[textLength - 1]; |
354 |
5
1. X12Encodation : changed conditional boundary → NO_COVERAGE 2. X12Encodation : changed conditional boundary → NO_COVERAGE 3. X12Encodation : negated conditional → NO_COVERAGE 4. X12Encodation : negated conditional → NO_COVERAGE 5. X12Encodation : negated conditional → NO_COVERAGE |
if (ptrIn != textLength || (c < 40 && ptrOut >= dataLength)) |
355 |
1
1. X12Encodation : replaced return of integer sized value with (x == 0 ? 1 : 0) → NO_COVERAGE |
return -1; |
356 |
2
1. X12Encodation : changed conditional boundary → NO_COVERAGE 2. X12Encodation : negated conditional → NO_COVERAGE |
if (c < 40) |
357 |
2
1. X12Encodation : Changed increment from 1 to -1 → NO_COVERAGE 2. X12Encodation : Replaced integer addition with subtraction → NO_COVERAGE |
data[dataOffset + ptrOut++] = (byte)(254); |
358 |
1
1. X12Encodation : replaced return of integer sized value with (x == 0 ? 1 : 0) → NO_COVERAGE |
return ptrOut; |
359 | } | |
360 | ||
361 | private static int EdifactEncodation(byte[] text, int textOffset, int textLength, byte[] data, int dataOffset, int dataLength) { | |
362 | int ptrIn, ptrOut, edi, pedi, c; | |
363 |
1
1. EdifactEncodation : negated conditional → NO_COVERAGE |
if (textLength == 0) |
364 |
1
1. EdifactEncodation : replaced return of integer sized value with (x == 0 ? 1 : 0) → NO_COVERAGE |
return 0; |
365 | ptrIn = 0; | |
366 | ptrOut = 0; | |
367 | edi = 0; | |
368 | pedi = 18; | |
369 | boolean ascii = true; | |
370 |
3
1. EdifactEncodation : changed conditional boundary → NO_COVERAGE 2. EdifactEncodation : Changed increment from 1 to -1 → NO_COVERAGE 3. EdifactEncodation : negated conditional → NO_COVERAGE |
for (; ptrIn < textLength; ++ptrIn) { |
371 |
2
1. EdifactEncodation : Replaced integer addition with subtraction → NO_COVERAGE 2. EdifactEncodation : Replaced bitwise AND with OR → NO_COVERAGE |
c = text[ptrIn + textOffset] & 0xff; |
372 |
5
1. EdifactEncodation : Replaced bitwise AND with OR → NO_COVERAGE 2. EdifactEncodation : Replaced bitwise AND with OR → NO_COVERAGE 3. EdifactEncodation : negated conditional → NO_COVERAGE 4. EdifactEncodation : negated conditional → NO_COVERAGE 5. EdifactEncodation : negated conditional → NO_COVERAGE |
if (((c & 0xe0) == 0x40 || (c & 0xe0) == 0x20) && c != '_') { |
373 |
1
1. EdifactEncodation : negated conditional → NO_COVERAGE |
if (ascii) { |
374 |
3
1. EdifactEncodation : changed conditional boundary → NO_COVERAGE 2. EdifactEncodation : Replaced integer addition with subtraction → NO_COVERAGE 3. EdifactEncodation : negated conditional → NO_COVERAGE |
if (ptrOut + 1 > dataLength) |
375 | break; | |
376 |
2
1. EdifactEncodation : Changed increment from 1 to -1 → NO_COVERAGE 2. EdifactEncodation : Replaced integer addition with subtraction → NO_COVERAGE |
data[dataOffset + ptrOut++] = (byte)240; |
377 | ascii = false; | |
378 | } | |
379 |
1
1. EdifactEncodation : Replaced bitwise AND with OR → NO_COVERAGE |
c &= 0x3f; |
380 |
2
1. EdifactEncodation : Replaced Shift Left with Shift Right → NO_COVERAGE 2. EdifactEncodation : Replaced bitwise OR with AND → NO_COVERAGE |
edi |= c << pedi; |
381 |
1
1. EdifactEncodation : negated conditional → NO_COVERAGE |
if (pedi == 0) { |
382 |
3
1. EdifactEncodation : changed conditional boundary → NO_COVERAGE 2. EdifactEncodation : Replaced integer addition with subtraction → NO_COVERAGE 3. EdifactEncodation : negated conditional → NO_COVERAGE |
if (ptrOut + 3 > dataLength) |
383 | break; | |
384 |
3
1. EdifactEncodation : Changed increment from 1 to -1 → NO_COVERAGE 2. EdifactEncodation : Replaced integer addition with subtraction → NO_COVERAGE 3. EdifactEncodation : Replaced Shift Right with Shift Left → NO_COVERAGE |
data[dataOffset + ptrOut++] = (byte)(edi >> 16); |
385 |
3
1. EdifactEncodation : Changed increment from 1 to -1 → NO_COVERAGE 2. EdifactEncodation : Replaced integer addition with subtraction → NO_COVERAGE 3. EdifactEncodation : Replaced Shift Right with Shift Left → NO_COVERAGE |
data[dataOffset + ptrOut++] = (byte)(edi >> 8); |
386 |
2
1. EdifactEncodation : Changed increment from 1 to -1 → NO_COVERAGE 2. EdifactEncodation : Replaced integer addition with subtraction → NO_COVERAGE |
data[dataOffset + ptrOut++] = (byte)edi; |
387 | edi = 0; | |
388 | pedi = 18; | |
389 | } | |
390 | else | |
391 |
1
1. EdifactEncodation : Changed increment from -6 to 6 → NO_COVERAGE |
pedi -= 6; |
392 | } | |
393 | else { | |
394 |
1
1. EdifactEncodation : negated conditional → NO_COVERAGE |
if (!ascii) { |
395 |
2
1. EdifactEncodation : Replaced Shift Left with Shift Right → NO_COVERAGE 2. EdifactEncodation : Replaced bitwise OR with AND → NO_COVERAGE |
edi |= ('_' & 0x3f) << pedi; |
396 |
5
1. EdifactEncodation : changed conditional boundary → NO_COVERAGE 2. EdifactEncodation : Replaced integer division with multiplication → NO_COVERAGE 3. EdifactEncodation : Replaced integer subtraction with addition → NO_COVERAGE 4. EdifactEncodation : Replaced integer addition with subtraction → NO_COVERAGE 5. EdifactEncodation : negated conditional → NO_COVERAGE |
if (ptrOut + (3 - pedi / 8) > dataLength) |
397 | break; | |
398 |
3
1. EdifactEncodation : Changed increment from 1 to -1 → NO_COVERAGE 2. EdifactEncodation : Replaced integer addition with subtraction → NO_COVERAGE 3. EdifactEncodation : Replaced Shift Right with Shift Left → NO_COVERAGE |
data[dataOffset + ptrOut++] = (byte)(edi >> 16); |
399 |
2
1. EdifactEncodation : changed conditional boundary → NO_COVERAGE 2. EdifactEncodation : negated conditional → NO_COVERAGE |
if (pedi <= 12) |
400 |
3
1. EdifactEncodation : Changed increment from 1 to -1 → NO_COVERAGE 2. EdifactEncodation : Replaced integer addition with subtraction → NO_COVERAGE 3. EdifactEncodation : Replaced Shift Right with Shift Left → NO_COVERAGE |
data[dataOffset + ptrOut++] = (byte)(edi >> 8); |
401 |
2
1. EdifactEncodation : changed conditional boundary → NO_COVERAGE 2. EdifactEncodation : negated conditional → NO_COVERAGE |
if (pedi <= 6) |
402 |
2
1. EdifactEncodation : Changed increment from 1 to -1 → NO_COVERAGE 2. EdifactEncodation : Replaced integer addition with subtraction → NO_COVERAGE |
data[dataOffset + ptrOut++] = (byte)edi; |
403 | ascii = true; | |
404 | pedi = 18; | |
405 | edi = 0; | |
406 | } | |
407 |
2
1. EdifactEncodation : changed conditional boundary → NO_COVERAGE 2. EdifactEncodation : negated conditional → NO_COVERAGE |
if (c > 127) { |
408 |
2
1. EdifactEncodation : changed conditional boundary → NO_COVERAGE 2. EdifactEncodation : negated conditional → NO_COVERAGE |
if (ptrOut >= dataLength) |
409 | break; | |
410 |
2
1. EdifactEncodation : Changed increment from 1 to -1 → NO_COVERAGE 2. EdifactEncodation : Replaced integer addition with subtraction → NO_COVERAGE |
data[dataOffset + ptrOut++] = (byte)235; |
411 |
1
1. EdifactEncodation : Changed increment from -128 to 128 → NO_COVERAGE |
c -= 128; |
412 | } | |
413 |
2
1. EdifactEncodation : changed conditional boundary → NO_COVERAGE 2. EdifactEncodation : negated conditional → NO_COVERAGE |
if (ptrOut >= dataLength) |
414 | break; | |
415 |
3
1. EdifactEncodation : Changed increment from 1 to -1 → NO_COVERAGE 2. EdifactEncodation : Replaced integer addition with subtraction → NO_COVERAGE 3. EdifactEncodation : Replaced integer addition with subtraction → NO_COVERAGE |
data[dataOffset + ptrOut++] = (byte)(c + 1); |
416 | } | |
417 | } | |
418 |
1
1. EdifactEncodation : negated conditional → NO_COVERAGE |
if (ptrIn != textLength) |
419 |
1
1. EdifactEncodation : replaced return of integer sized value with (x == 0 ? 1 : 0) → NO_COVERAGE |
return -1; |
420 |
1
1. EdifactEncodation : negated conditional → NO_COVERAGE |
if (!ascii) { |
421 |
2
1. EdifactEncodation : Replaced Shift Left with Shift Right → NO_COVERAGE 2. EdifactEncodation : Replaced bitwise OR with AND → NO_COVERAGE |
edi |= ('_' & 0x3f) << pedi; |
422 |
5
1. EdifactEncodation : changed conditional boundary → NO_COVERAGE 2. EdifactEncodation : Replaced integer division with multiplication → NO_COVERAGE 3. EdifactEncodation : Replaced integer subtraction with addition → NO_COVERAGE 4. EdifactEncodation : Replaced integer addition with subtraction → NO_COVERAGE 5. EdifactEncodation : negated conditional → NO_COVERAGE |
if (ptrOut + (3 - pedi / 8) > dataLength) |
423 |
1
1. EdifactEncodation : replaced return of integer sized value with (x == 0 ? 1 : 0) → NO_COVERAGE |
return -1; |
424 |
3
1. EdifactEncodation : Changed increment from 1 to -1 → NO_COVERAGE 2. EdifactEncodation : Replaced integer addition with subtraction → NO_COVERAGE 3. EdifactEncodation : Replaced Shift Right with Shift Left → NO_COVERAGE |
data[dataOffset + ptrOut++] = (byte)(edi >> 16); |
425 |
2
1. EdifactEncodation : changed conditional boundary → NO_COVERAGE 2. EdifactEncodation : negated conditional → NO_COVERAGE |
if (pedi <= 12) |
426 |
3
1. EdifactEncodation : Changed increment from 1 to -1 → NO_COVERAGE 2. EdifactEncodation : Replaced integer addition with subtraction → NO_COVERAGE 3. EdifactEncodation : Replaced Shift Right with Shift Left → NO_COVERAGE |
data[dataOffset + ptrOut++] = (byte)(edi >> 8); |
427 |
2
1. EdifactEncodation : changed conditional boundary → NO_COVERAGE 2. EdifactEncodation : negated conditional → NO_COVERAGE |
if (pedi <= 6) |
428 |
2
1. EdifactEncodation : Changed increment from 1 to -1 → NO_COVERAGE 2. EdifactEncodation : Replaced integer addition with subtraction → NO_COVERAGE |
data[dataOffset + ptrOut++] = (byte)edi; |
429 | } | |
430 |
1
1. EdifactEncodation : replaced return of integer sized value with (x == 0 ? 1 : 0) → NO_COVERAGE |
return ptrOut; |
431 | } | |
432 | ||
433 | private static int C40OrTextEncodation(byte[] text, int textOffset, int textLength, byte[] data, int dataOffset, int dataLength, boolean c40) { | |
434 | int ptrIn, ptrOut, encPtr, last0, last1, i, a, c; | |
435 | String basic, shift2, shift3; | |
436 |
1
1. C40OrTextEncodation : negated conditional → NO_COVERAGE |
if (textLength == 0) |
437 |
1
1. C40OrTextEncodation : replaced return of integer sized value with (x == 0 ? 1 : 0) → NO_COVERAGE |
return 0; |
438 | ptrIn = 0; | |
439 | ptrOut = 0; | |
440 |
1
1. C40OrTextEncodation : negated conditional → NO_COVERAGE |
if (c40) |
441 |
2
1. C40OrTextEncodation : Changed increment from 1 to -1 → NO_COVERAGE 2. C40OrTextEncodation : Replaced integer addition with subtraction → NO_COVERAGE |
data[dataOffset + ptrOut++] = (byte)230; |
442 | else | |
443 |
2
1. C40OrTextEncodation : Changed increment from 1 to -1 → NO_COVERAGE 2. C40OrTextEncodation : Replaced integer addition with subtraction → NO_COVERAGE |
data[dataOffset + ptrOut++] = (byte)239; |
444 | shift2 = "!\"#$%&'()*+,-./:;<=>?@[\\]^_"; | |
445 |
1
1. C40OrTextEncodation : negated conditional → NO_COVERAGE |
if (c40) { |
446 | basic = " 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"; | |
447 | shift3 = "`abcdefghijklmnopqrstuvwxyz{|}~\177"; | |
448 | } | |
449 | else { | |
450 | basic = " 0123456789abcdefghijklmnopqrstuvwxyz"; | |
451 | shift3 = "`ABCDEFGHIJKLMNOPQRSTUVWXYZ{|}~\177"; | |
452 | } | |
453 |
2
1. C40OrTextEncodation : Replaced integer multiplication with division → NO_COVERAGE 2. C40OrTextEncodation : Replaced integer addition with subtraction → NO_COVERAGE |
int[] enc = new int[textLength * 4 + 10]; |
454 | encPtr = 0; | |
455 | last0 = 0; | |
456 | last1 = 0; | |
457 |
2
1. C40OrTextEncodation : changed conditional boundary → NO_COVERAGE 2. C40OrTextEncodation : negated conditional → NO_COVERAGE |
while (ptrIn < textLength) { |
458 |
2
1. C40OrTextEncodation : Replaced integer modulus with multiplication → NO_COVERAGE 2. C40OrTextEncodation : negated conditional → NO_COVERAGE |
if ((encPtr % 3) == 0) { |
459 | last0 = ptrIn; | |
460 | last1 = encPtr; | |
461 | } | |
462 |
3
1. C40OrTextEncodation : Changed increment from 1 to -1 → NO_COVERAGE 2. C40OrTextEncodation : Replaced integer addition with subtraction → NO_COVERAGE 3. C40OrTextEncodation : Replaced bitwise AND with OR → NO_COVERAGE |
c = text[textOffset + ptrIn++] & 0xff; |
463 |
2
1. C40OrTextEncodation : changed conditional boundary → NO_COVERAGE 2. C40OrTextEncodation : negated conditional → NO_COVERAGE |
if (c > 127) { |
464 |
1
1. C40OrTextEncodation : Changed increment from -128 to 128 → NO_COVERAGE |
c -= 128; |
465 |
1
1. C40OrTextEncodation : Changed increment from 1 to -1 → NO_COVERAGE |
enc[encPtr++] = 1; |
466 |
1
1. C40OrTextEncodation : Changed increment from 1 to -1 → NO_COVERAGE |
enc[encPtr++] = 30; |
467 | } | |
468 | int idx = basic.indexOf((char)c); | |
469 |
2
1. C40OrTextEncodation : changed conditional boundary → NO_COVERAGE 2. C40OrTextEncodation : negated conditional → NO_COVERAGE |
if (idx >= 0) { |
470 |
2
1. C40OrTextEncodation : Changed increment from 1 to -1 → NO_COVERAGE 2. C40OrTextEncodation : Replaced integer addition with subtraction → NO_COVERAGE |
enc[encPtr++] = idx + 3; |
471 | } | |
472 |
2
1. C40OrTextEncodation : changed conditional boundary → NO_COVERAGE 2. C40OrTextEncodation : negated conditional → NO_COVERAGE |
else if (c < 32) { |
473 |
1
1. C40OrTextEncodation : Changed increment from 1 to -1 → NO_COVERAGE |
enc[encPtr++] = 0; |
474 |
1
1. C40OrTextEncodation : Changed increment from 1 to -1 → NO_COVERAGE |
enc[encPtr++] = c; |
475 | } | |
476 |
2
1. C40OrTextEncodation : changed conditional boundary → NO_COVERAGE 2. C40OrTextEncodation : negated conditional → NO_COVERAGE |
else if ((idx = shift2.indexOf((char)c)) >= 0) { |
477 |
1
1. C40OrTextEncodation : Changed increment from 1 to -1 → NO_COVERAGE |
enc[encPtr++] = 1; |
478 |
1
1. C40OrTextEncodation : Changed increment from 1 to -1 → NO_COVERAGE |
enc[encPtr++] = idx; |
479 | } | |
480 |
2
1. C40OrTextEncodation : changed conditional boundary → NO_COVERAGE 2. C40OrTextEncodation : negated conditional → NO_COVERAGE |
else if ((idx = shift3.indexOf((char)c)) >= 0) { |
481 |
1
1. C40OrTextEncodation : Changed increment from 1 to -1 → NO_COVERAGE |
enc[encPtr++] = 2; |
482 |
1
1. C40OrTextEncodation : Changed increment from 1 to -1 → NO_COVERAGE |
enc[encPtr++] = idx; |
483 | } | |
484 | } | |
485 |
2
1. C40OrTextEncodation : Replaced integer modulus with multiplication → NO_COVERAGE 2. C40OrTextEncodation : negated conditional → NO_COVERAGE |
if ((encPtr % 3) != 0) { |
486 | ptrIn = last0; | |
487 | encPtr = last1; | |
488 | } | |
489 |
5
1. C40OrTextEncodation : changed conditional boundary → NO_COVERAGE 2. C40OrTextEncodation : Replaced integer division with multiplication → NO_COVERAGE 3. C40OrTextEncodation : Replaced integer multiplication with division → NO_COVERAGE 4. C40OrTextEncodation : Replaced integer subtraction with addition → NO_COVERAGE 5. C40OrTextEncodation : negated conditional → NO_COVERAGE |
if (encPtr / 3 * 2 > dataLength - 2) { |
490 |
1
1. C40OrTextEncodation : replaced return of integer sized value with (x == 0 ? 1 : 0) → NO_COVERAGE |
return -1; |
491 | } | |
492 | i = 0; | |
493 |
3
1. C40OrTextEncodation : changed conditional boundary → NO_COVERAGE 2. C40OrTextEncodation : Changed increment from 3 to -3 → NO_COVERAGE 3. C40OrTextEncodation : negated conditional → NO_COVERAGE |
for (; i < encPtr; i += 3) { |
494 |
7
1. C40OrTextEncodation : Replaced integer multiplication with division → NO_COVERAGE 2. C40OrTextEncodation : Replaced integer addition with subtraction → NO_COVERAGE 3. C40OrTextEncodation : Replaced integer multiplication with division → NO_COVERAGE 4. C40OrTextEncodation : Replaced integer addition with subtraction → NO_COVERAGE 5. C40OrTextEncodation : Replaced integer addition with subtraction → NO_COVERAGE 6. C40OrTextEncodation : Replaced integer addition with subtraction → NO_COVERAGE 7. C40OrTextEncodation : Replaced integer addition with subtraction → NO_COVERAGE |
a = 1600 * enc[i] + 40 * enc[i + 1] + enc[i + 2] + 1; |
495 |
3
1. C40OrTextEncodation : Changed increment from 1 to -1 → NO_COVERAGE 2. C40OrTextEncodation : Replaced integer addition with subtraction → NO_COVERAGE 3. C40OrTextEncodation : Replaced integer division with multiplication → NO_COVERAGE |
data[dataOffset + ptrOut++] = (byte)(a / 256); |
496 |
2
1. C40OrTextEncodation : Changed increment from 1 to -1 → NO_COVERAGE 2. C40OrTextEncodation : Replaced integer addition with subtraction → NO_COVERAGE |
data[dataOffset + ptrOut++] = (byte)a; |
497 | } | |
498 |
1
1. C40OrTextEncodation : Changed increment from 1 to -1 → NO_COVERAGE |
data[ptrOut++] = (byte)254; |
499 |
2
1. C40OrTextEncodation : Replaced integer subtraction with addition → NO_COVERAGE 2. C40OrTextEncodation : Replaced integer subtraction with addition → NO_COVERAGE |
i = asciiEncodation(text, ptrIn, textLength - ptrIn, data, ptrOut, dataLength - ptrOut); |
500 |
2
1. C40OrTextEncodation : changed conditional boundary → NO_COVERAGE 2. C40OrTextEncodation : negated conditional → NO_COVERAGE |
if (i < 0) |
501 |
1
1. C40OrTextEncodation : replaced return of integer sized value with (x == 0 ? 1 : 0) → NO_COVERAGE |
return i; |
502 |
2
1. C40OrTextEncodation : Replaced integer addition with subtraction → NO_COVERAGE 2. C40OrTextEncodation : replaced return of integer sized value with (x == 0 ? 1 : 0) → NO_COVERAGE |
return ptrOut + i; |
503 | } | |
504 | ||
505 | private static int getEncodation(byte[] text, int textOffset, int textSize, byte[] data, int dataOffset, int dataSize, int options, boolean firstMatch) { | |
506 | int e, j, k; | |
507 | int[] e1 = new int[6]; | |
508 |
2
1. getEncodation : changed conditional boundary → NO_COVERAGE 2. getEncodation : negated conditional → NO_COVERAGE |
if (dataSize < 0) |
509 |
1
1. getEncodation : replaced return of integer sized value with (x == 0 ? 1 : 0) → NO_COVERAGE |
return -1; |
510 | e = -1; | |
511 |
1
1. getEncodation : Replaced bitwise AND with OR → NO_COVERAGE |
options &= 7; |
512 |
1
1. getEncodation : negated conditional → NO_COVERAGE |
if (options == 0) { |
513 | e1[0] = asciiEncodation(text, textOffset, textSize, data, dataOffset, dataSize); | |
514 |
3
1. getEncodation : changed conditional boundary → NO_COVERAGE 2. getEncodation : negated conditional → NO_COVERAGE 3. getEncodation : negated conditional → NO_COVERAGE |
if (firstMatch && e1[0] >= 0) |
515 |
1
1. getEncodation : replaced return of integer sized value with (x == 0 ? 1 : 0) → NO_COVERAGE |
return e1[0]; |
516 | e1[1] = C40OrTextEncodation(text, textOffset, textSize, data, dataOffset, dataSize, false); | |
517 |
3
1. getEncodation : changed conditional boundary → NO_COVERAGE 2. getEncodation : negated conditional → NO_COVERAGE 3. getEncodation : negated conditional → NO_COVERAGE |
if (firstMatch && e1[1] >= 0) |
518 |
1
1. getEncodation : replaced return of integer sized value with (x == 0 ? 1 : 0) → NO_COVERAGE |
return e1[1]; |
519 | e1[2] = C40OrTextEncodation(text, textOffset, textSize, data, dataOffset, dataSize, true); | |
520 |
3
1. getEncodation : changed conditional boundary → NO_COVERAGE 2. getEncodation : negated conditional → NO_COVERAGE 3. getEncodation : negated conditional → NO_COVERAGE |
if (firstMatch && e1[2] >= 0) |
521 |
1
1. getEncodation : replaced return of integer sized value with (x == 0 ? 1 : 0) → NO_COVERAGE |
return e1[2]; |
522 | e1[3] = b256Encodation(text, textOffset, textSize, data, dataOffset, dataSize); | |
523 |
3
1. getEncodation : changed conditional boundary → NO_COVERAGE 2. getEncodation : negated conditional → NO_COVERAGE 3. getEncodation : negated conditional → NO_COVERAGE |
if (firstMatch && e1[3] >= 0) |
524 |
1
1. getEncodation : replaced return of integer sized value with (x == 0 ? 1 : 0) → NO_COVERAGE |
return e1[3]; |
525 | e1[4] = X12Encodation(text, textOffset, textSize, data, dataOffset, dataSize); | |
526 |
3
1. getEncodation : changed conditional boundary → NO_COVERAGE 2. getEncodation : negated conditional → NO_COVERAGE 3. getEncodation : negated conditional → NO_COVERAGE |
if (firstMatch && e1[4] >= 0) |
527 |
1
1. getEncodation : replaced return of integer sized value with (x == 0 ? 1 : 0) → NO_COVERAGE |
return e1[4]; |
528 | e1[5] = EdifactEncodation(text, textOffset, textSize, data, dataOffset, dataSize); | |
529 |
3
1. getEncodation : changed conditional boundary → NO_COVERAGE 2. getEncodation : negated conditional → NO_COVERAGE 3. getEncodation : negated conditional → NO_COVERAGE |
if (firstMatch && e1[5] >= 0) |
530 |
1
1. getEncodation : replaced return of integer sized value with (x == 0 ? 1 : 0) → NO_COVERAGE |
return e1[5]; |
531 |
12
1. getEncodation : changed conditional boundary → NO_COVERAGE 2. getEncodation : changed conditional boundary → NO_COVERAGE 3. getEncodation : changed conditional boundary → NO_COVERAGE 4. getEncodation : changed conditional boundary → NO_COVERAGE 5. getEncodation : changed conditional boundary → NO_COVERAGE 6. getEncodation : changed conditional boundary → NO_COVERAGE 7. getEncodation : negated conditional → NO_COVERAGE 8. getEncodation : negated conditional → NO_COVERAGE 9. getEncodation : negated conditional → NO_COVERAGE 10. getEncodation : negated conditional → NO_COVERAGE 11. getEncodation : negated conditional → NO_COVERAGE 12. getEncodation : negated conditional → NO_COVERAGE |
if (e1[0] < 0 && e1[1] < 0 && e1[2] < 0 && e1[3] < 0 && e1[4] < 0 && e1[5] < 0) { |
532 |
1
1. getEncodation : replaced return of integer sized value with (x == 0 ? 1 : 0) → NO_COVERAGE |
return -1; |
533 | } | |
534 | j = 0; | |
535 | e = 99999; | |
536 |
3
1. getEncodation : changed conditional boundary → NO_COVERAGE 2. getEncodation : Changed increment from 1 to -1 → NO_COVERAGE 3. getEncodation : negated conditional → NO_COVERAGE |
for (k = 0; k < 6; ++k) { |
537 |
4
1. getEncodation : changed conditional boundary → NO_COVERAGE 2. getEncodation : changed conditional boundary → NO_COVERAGE 3. getEncodation : negated conditional → NO_COVERAGE 4. getEncodation : negated conditional → NO_COVERAGE |
if (e1[k] >= 0 && e1[k] < e) { |
538 | e = e1[k]; | |
539 | j = k; | |
540 | } | |
541 | } | |
542 |
1
1. getEncodation : negated conditional → NO_COVERAGE |
if (j == 0) |
543 | e = asciiEncodation(text, textOffset, textSize, data, dataOffset, dataSize); | |
544 |
1
1. getEncodation : negated conditional → NO_COVERAGE |
else if (j == 1) |
545 | e = C40OrTextEncodation(text, textOffset, textSize, data, dataOffset, dataSize, false); | |
546 |
1
1. getEncodation : negated conditional → NO_COVERAGE |
else if (j == 2) |
547 | e = C40OrTextEncodation(text, textOffset, textSize, data, dataOffset, dataSize, true); | |
548 |
1
1. getEncodation : negated conditional → NO_COVERAGE |
else if (j == 3) |
549 | e = b256Encodation(text, textOffset, textSize, data, dataOffset, dataSize); | |
550 |
1
1. getEncodation : negated conditional → NO_COVERAGE |
else if (j == 4) |
551 | e = X12Encodation(text, textOffset, textSize, data, dataOffset, dataSize); | |
552 |
1
1. getEncodation : replaced return of integer sized value with (x == 0 ? 1 : 0) → NO_COVERAGE |
return e; |
553 | } | |
554 | switch (options) { | |
555 | case DM_ASCII: | |
556 |
1
1. getEncodation : replaced return of integer sized value with (x == 0 ? 1 : 0) → NO_COVERAGE |
return asciiEncodation(text, textOffset, textSize, data, dataOffset, dataSize); |
557 | case DM_C40: | |
558 |
1
1. getEncodation : replaced return of integer sized value with (x == 0 ? 1 : 0) → NO_COVERAGE |
return C40OrTextEncodation(text, textOffset, textSize, data, dataOffset, dataSize, true); |
559 | case DM_TEXT: | |
560 |
1
1. getEncodation : replaced return of integer sized value with (x == 0 ? 1 : 0) → NO_COVERAGE |
return C40OrTextEncodation(text, textOffset, textSize, data, dataOffset, dataSize, false); |
561 | case DM_B256: | |
562 |
1
1. getEncodation : replaced return of integer sized value with (x == 0 ? 1 : 0) → NO_COVERAGE |
return b256Encodation(text, textOffset, textSize, data, dataOffset, dataSize); |
563 | case DM_X21: | |
564 |
1
1. getEncodation : replaced return of integer sized value with (x == 0 ? 1 : 0) → NO_COVERAGE |
return X12Encodation(text, textOffset, textSize, data, dataOffset, dataSize); |
565 | case DM_EDIFACT: | |
566 |
1
1. getEncodation : replaced return of integer sized value with (x == 0 ? 1 : 0) → NO_COVERAGE |
return EdifactEncodation(text, textOffset, textSize, data, dataOffset, dataSize); |
567 | case DM_RAW: | |
568 |
2
1. getEncodation : changed conditional boundary → NO_COVERAGE 2. getEncodation : negated conditional → NO_COVERAGE |
if (textSize > dataSize) |
569 |
1
1. getEncodation : replaced return of integer sized value with (x == 0 ? 1 : 0) → NO_COVERAGE |
return -1; |
570 |
1
1. getEncodation : removed call to java/lang/System::arraycopy → NO_COVERAGE |
System.arraycopy(text, textOffset, data, dataOffset, textSize); |
571 |
1
1. getEncodation : replaced return of integer sized value with (x == 0 ? 1 : 0) → NO_COVERAGE |
return textSize; |
572 | } | |
573 |
1
1. getEncodation : replaced return of integer sized value with (x == 0 ? 1 : 0) → NO_COVERAGE |
return -1; |
574 | } | |
575 | ||
576 | private static int getNumber(byte[] text, int ptrIn, int n) { | |
577 | int v, j, c; | |
578 | v = 0; | |
579 |
3
1. getNumber : changed conditional boundary → NO_COVERAGE 2. getNumber : Changed increment from 1 to -1 → NO_COVERAGE 3. getNumber : negated conditional → NO_COVERAGE |
for (j = 0; j < n; ++j) { |
580 |
2
1. getNumber : Changed increment from 1 to -1 → NO_COVERAGE 2. getNumber : Replaced bitwise AND with OR → NO_COVERAGE |
c = text[ptrIn++] &0xff; |
581 |
4
1. getNumber : changed conditional boundary → NO_COVERAGE 2. getNumber : changed conditional boundary → NO_COVERAGE 3. getNumber : negated conditional → NO_COVERAGE 4. getNumber : negated conditional → NO_COVERAGE |
if (c < '0' || c > '9') |
582 |
1
1. getNumber : replaced return of integer sized value with (x == 0 ? 1 : 0) → NO_COVERAGE |
return -1; |
583 |
3
1. getNumber : Replaced integer multiplication with division → NO_COVERAGE 2. getNumber : Replaced integer addition with subtraction → NO_COVERAGE 3. getNumber : Replaced integer subtraction with addition → NO_COVERAGE |
v = v * 10 + c - '0'; |
584 | } | |
585 |
1
1. getNumber : replaced return of integer sized value with (x == 0 ? 1 : 0) → NO_COVERAGE |
return v; |
586 | } | |
587 | ||
588 | private int processExtensions(byte[] text, int textOffset, int textSize, byte[] data) { | |
589 | int order, ptrIn, ptrOut, eci, fn, ft, fi, c; | |
590 |
2
1. processExtensions : Replaced bitwise AND with OR → NO_COVERAGE 2. processExtensions : negated conditional → NO_COVERAGE |
if ((options & DM_EXTENSION) == 0) |
591 |
1
1. processExtensions : replaced return of integer sized value with (x == 0 ? 1 : 0) → NO_COVERAGE |
return 0; |
592 | order = 0; | |
593 | ptrIn = 0; | |
594 | ptrOut = 0; | |
595 |
2
1. processExtensions : changed conditional boundary → NO_COVERAGE 2. processExtensions : negated conditional → NO_COVERAGE |
while (ptrIn < textSize) { |
596 |
2
1. processExtensions : changed conditional boundary → NO_COVERAGE 2. processExtensions : negated conditional → NO_COVERAGE |
if (order > 20) |
597 |
1
1. processExtensions : replaced return of integer sized value with (x == 0 ? 1 : 0) → NO_COVERAGE |
return -1; |
598 |
3
1. processExtensions : Changed increment from 1 to -1 → NO_COVERAGE 2. processExtensions : Replaced integer addition with subtraction → NO_COVERAGE 3. processExtensions : Replaced bitwise AND with OR → NO_COVERAGE |
c = text[textOffset + ptrIn++] &0xff; |
599 |
1
1. processExtensions : Changed increment from 1 to -1 → NO_COVERAGE |
++order; |
600 | switch (c) { | |
601 | case '.': | |
602 | extOut = ptrIn; | |
603 |
1
1. processExtensions : replaced return of integer sized value with (x == 0 ? 1 : 0) → NO_COVERAGE |
return ptrOut; |
604 | case 'e': | |
605 |
3
1. processExtensions : changed conditional boundary → NO_COVERAGE 2. processExtensions : Replaced integer addition with subtraction → NO_COVERAGE 3. processExtensions : negated conditional → NO_COVERAGE |
if (ptrIn + 6 > textSize) |
606 |
1
1. processExtensions : replaced return of integer sized value with (x == 0 ? 1 : 0) → NO_COVERAGE |
return -1; |
607 |
1
1. processExtensions : Replaced integer addition with subtraction → NO_COVERAGE |
eci = getNumber(text, textOffset + ptrIn, 6); |
608 |
2
1. processExtensions : changed conditional boundary → NO_COVERAGE 2. processExtensions : negated conditional → NO_COVERAGE |
if (eci < 0) |
609 |
1
1. processExtensions : replaced return of integer sized value with (x == 0 ? 1 : 0) → NO_COVERAGE |
return -1; |
610 |
1
1. processExtensions : Changed increment from 6 to -6 → NO_COVERAGE |
ptrIn += 6; |
611 |
1
1. processExtensions : Changed increment from 1 to -1 → NO_COVERAGE |
data[ptrOut++] = (byte)241; |
612 |
2
1. processExtensions : changed conditional boundary → NO_COVERAGE 2. processExtensions : negated conditional → NO_COVERAGE |
if (eci < 127) |
613 |
2
1. processExtensions : Changed increment from 1 to -1 → NO_COVERAGE 2. processExtensions : Replaced integer addition with subtraction → NO_COVERAGE |
data[ptrOut++] = (byte)(eci + 1); |
614 |
2
1. processExtensions : changed conditional boundary → NO_COVERAGE 2. processExtensions : negated conditional → NO_COVERAGE |
else if (eci < 16383) { |
615 |
4
1. processExtensions : Changed increment from 1 to -1 → NO_COVERAGE 2. processExtensions : Replaced integer subtraction with addition → NO_COVERAGE 3. processExtensions : Replaced integer division with multiplication → NO_COVERAGE 4. processExtensions : Replaced integer addition with subtraction → NO_COVERAGE |
data[ptrOut++] = (byte)((eci - 127) / 254 + 128); |
616 |
4
1. processExtensions : Changed increment from 1 to -1 → NO_COVERAGE 2. processExtensions : Replaced integer subtraction with addition → NO_COVERAGE 3. processExtensions : Replaced integer modulus with multiplication → NO_COVERAGE 4. processExtensions : Replaced integer addition with subtraction → NO_COVERAGE |
data[ptrOut++] = (byte)(((eci - 127) % 254) + 1); |
617 | } | |
618 | else { | |
619 |
4
1. processExtensions : Changed increment from 1 to -1 → NO_COVERAGE 2. processExtensions : Replaced integer subtraction with addition → NO_COVERAGE 3. processExtensions : Replaced integer division with multiplication → NO_COVERAGE 4. processExtensions : Replaced integer addition with subtraction → NO_COVERAGE |
data[ptrOut++] = (byte)((eci - 16383) / 64516 + 192); |
620 |
5
1. processExtensions : Changed increment from 1 to -1 → NO_COVERAGE 2. processExtensions : Replaced integer subtraction with addition → NO_COVERAGE 3. processExtensions : Replaced integer division with multiplication → NO_COVERAGE 4. processExtensions : Replaced integer modulus with multiplication → NO_COVERAGE 5. processExtensions : Replaced integer addition with subtraction → NO_COVERAGE |
data[ptrOut++] = (byte)((((eci - 16383) / 254) % 254) + 1); |
621 |
4
1. processExtensions : Changed increment from 1 to -1 → NO_COVERAGE 2. processExtensions : Replaced integer subtraction with addition → NO_COVERAGE 3. processExtensions : Replaced integer modulus with multiplication → NO_COVERAGE 4. processExtensions : Replaced integer addition with subtraction → NO_COVERAGE |
data[ptrOut++] = (byte)(((eci - 16383) % 254) + 1); |
622 | } | |
623 | break; | |
624 | case 's': | |
625 |
1
1. processExtensions : negated conditional → NO_COVERAGE |
if (order != 1) |
626 |
1
1. processExtensions : replaced return of integer sized value with (x == 0 ? 1 : 0) → NO_COVERAGE |
return -1; |
627 |
3
1. processExtensions : changed conditional boundary → NO_COVERAGE 2. processExtensions : Replaced integer addition with subtraction → NO_COVERAGE 3. processExtensions : negated conditional → NO_COVERAGE |
if (ptrIn + 9 > textSize) |
628 |
1
1. processExtensions : replaced return of integer sized value with (x == 0 ? 1 : 0) → NO_COVERAGE |
return -1; |
629 |
1
1. processExtensions : Replaced integer addition with subtraction → NO_COVERAGE |
fn = getNumber(text, textOffset + ptrIn, 2); |
630 |
4
1. processExtensions : changed conditional boundary → NO_COVERAGE 2. processExtensions : changed conditional boundary → NO_COVERAGE 3. processExtensions : negated conditional → NO_COVERAGE 4. processExtensions : negated conditional → NO_COVERAGE |
if (fn <= 0 || fn > 16) |
631 |
1
1. processExtensions : replaced return of integer sized value with (x == 0 ? 1 : 0) → NO_COVERAGE |
return -1; |
632 |
1
1. processExtensions : Changed increment from 2 to -2 → NO_COVERAGE |
ptrIn += 2; |
633 |
1
1. processExtensions : Replaced integer addition with subtraction → NO_COVERAGE |
ft = getNumber(text, textOffset + ptrIn, 2); |
634 |
4
1. processExtensions : changed conditional boundary → NO_COVERAGE 2. processExtensions : changed conditional boundary → NO_COVERAGE 3. processExtensions : negated conditional → NO_COVERAGE 4. processExtensions : negated conditional → NO_COVERAGE |
if (ft <= 1 || ft > 16) |
635 |
1
1. processExtensions : replaced return of integer sized value with (x == 0 ? 1 : 0) → NO_COVERAGE |
return -1; |
636 |
1
1. processExtensions : Changed increment from 2 to -2 → NO_COVERAGE |
ptrIn += 2; |
637 |
1
1. processExtensions : Replaced integer addition with subtraction → NO_COVERAGE |
fi = getNumber(text, textOffset + ptrIn, 5); |
638 |
4
1. processExtensions : changed conditional boundary → NO_COVERAGE 2. processExtensions : changed conditional boundary → NO_COVERAGE 3. processExtensions : negated conditional → NO_COVERAGE 4. processExtensions : negated conditional → NO_COVERAGE |
if (fi < 0 || fn >= 64516) |
639 |
1
1. processExtensions : replaced return of integer sized value with (x == 0 ? 1 : 0) → NO_COVERAGE |
return -1; |
640 |
1
1. processExtensions : Changed increment from 5 to -5 → NO_COVERAGE |
ptrIn += 5; |
641 |
1
1. processExtensions : Changed increment from 1 to -1 → NO_COVERAGE |
data[ptrOut++] = (byte)(233); |
642 |
5
1. processExtensions : Changed increment from 1 to -1 → NO_COVERAGE 2. processExtensions : Replaced integer subtraction with addition → NO_COVERAGE 3. processExtensions : Replaced Shift Left with Shift Right → NO_COVERAGE 4. processExtensions : Replaced integer subtraction with addition → NO_COVERAGE 5. processExtensions : Replaced bitwise OR with AND → NO_COVERAGE |
data[ptrOut++] = (byte)(((fn - 1) << 4) | (17 - ft)); |
643 |
3
1. processExtensions : Changed increment from 1 to -1 → NO_COVERAGE 2. processExtensions : Replaced integer division with multiplication → NO_COVERAGE 3. processExtensions : Replaced integer addition with subtraction → NO_COVERAGE |
data[ptrOut++] = (byte)(fi / 254 + 1); |
644 |
3
1. processExtensions : Changed increment from 1 to -1 → NO_COVERAGE 2. processExtensions : Replaced integer modulus with multiplication → NO_COVERAGE 3. processExtensions : Replaced integer addition with subtraction → NO_COVERAGE |
data[ptrOut++] = (byte)((fi % 254) + 1); |
645 | break; | |
646 | case 'p': | |
647 |
1
1. processExtensions : negated conditional → NO_COVERAGE |
if (order != 1) |
648 |
1
1. processExtensions : replaced return of integer sized value with (x == 0 ? 1 : 0) → NO_COVERAGE |
return -1; |
649 |
1
1. processExtensions : Changed increment from 1 to -1 → NO_COVERAGE |
data[ptrOut++] = (byte)(234); |
650 | break; | |
651 | case 'm': | |
652 |
1
1. processExtensions : negated conditional → NO_COVERAGE |
if (order != 1) |
653 |
1
1. processExtensions : replaced return of integer sized value with (x == 0 ? 1 : 0) → NO_COVERAGE |
return -1; |
654 |
3
1. processExtensions : changed conditional boundary → NO_COVERAGE 2. processExtensions : Replaced integer addition with subtraction → NO_COVERAGE 3. processExtensions : negated conditional → NO_COVERAGE |
if (ptrIn + 1 > textSize) |
655 |
1
1. processExtensions : replaced return of integer sized value with (x == 0 ? 1 : 0) → NO_COVERAGE |
return -1; |
656 |
3
1. processExtensions : Changed increment from 1 to -1 → NO_COVERAGE 2. processExtensions : Replaced integer addition with subtraction → NO_COVERAGE 3. processExtensions : Replaced bitwise AND with OR → NO_COVERAGE |
c = text[textOffset + ptrIn++] &0xff; |
657 |
2
1. processExtensions : negated conditional → NO_COVERAGE 2. processExtensions : negated conditional → NO_COVERAGE |
if (c != '5' && c != '5') |
658 |
1
1. processExtensions : replaced return of integer sized value with (x == 0 ? 1 : 0) → NO_COVERAGE |
return -1; |
659 |
1
1. processExtensions : Changed increment from 1 to -1 → NO_COVERAGE |
data[ptrOut++] = (byte)(234); |
660 |
2
1. processExtensions : Changed increment from 1 to -1 → NO_COVERAGE 2. processExtensions : negated conditional → NO_COVERAGE |
data[ptrOut++] = (byte)(c == '5' ? 236 : 237); |
661 | break; | |
662 | case 'f': | |
663 |
4
1. processExtensions : negated conditional → NO_COVERAGE 2. processExtensions : negated conditional → NO_COVERAGE 3. processExtensions : negated conditional → NO_COVERAGE 4. processExtensions : negated conditional → NO_COVERAGE |
if (order != 1 && (order != 2 || (text[textOffset] != 's' && text[textOffset] != 'm'))) |
664 |
1
1. processExtensions : replaced return of integer sized value with (x == 0 ? 1 : 0) → NO_COVERAGE |
return -1; |
665 |
1
1. processExtensions : Changed increment from 1 to -1 → NO_COVERAGE |
data[ptrOut++] = (byte)(232); |
666 | } | |
667 | } | |
668 |
1
1. processExtensions : replaced return of integer sized value with (x == 0 ? 1 : 0) → NO_COVERAGE |
return -1; |
669 | } | |
670 | ||
671 | /** | |
672 | * Creates a barcode. The <CODE>String</CODE> is interpreted with the ISO-8859-1 encoding | |
673 | * @param text the text | |
674 | * @return the status of the generation. It can be one of this values: | |
675 | * <p> | |
676 | * <CODE>DM_NO_ERROR</CODE> - no error.<br> | |
677 | * <CODE>DM_ERROR_TEXT_TOO_BIG</CODE> - the text is too big for the symbology capabilities.<br> | |
678 | * <CODE>DM_ERROR_INVALID_SQUARE</CODE> - the dimensions given for the symbol are illegal.<br> | |
679 | * <CODE>DM_ERROR_EXTENSION</CODE> - an error was while parsing an extension. | |
680 | * @throws java.io.UnsupportedEncodingException on error | |
681 | */ | |
682 | public int generate(String text) throws UnsupportedEncodingException { | |
683 | byte[] t = text.getBytes(StandardCharsets.ISO_8859_1); | |
684 |
1
1. generate : replaced return of integer sized value with (x == 0 ? 1 : 0) → NO_COVERAGE |
return generate(t, 0, t.length); |
685 | } | |
686 | | |
687 | /** | |
688 | * Creates a barcode. | |
689 | * @param text the text | |
690 | * @param textOffset the offset to the start of the text | |
691 | * @param textSize the text size | |
692 | * @return the status of the generation. It can be one of this values: | |
693 | * <p> | |
694 | * <CODE>DM_NO_ERROR</CODE> - no error.<br> | |
695 | * <CODE>DM_ERROR_TEXT_TOO_BIG</CODE> - the text is too big for the symbology capabilities.<br> | |
696 | * <CODE>DM_ERROR_INVALID_SQUARE</CODE> - the dimensions given for the symbol are illegal.<br> | |
697 | * <CODE>DM_ERROR_EXTENSION</CODE> - an error was while parsing an extension. | |
698 | */ | |
699 | public int generate(byte[] text, int textOffset, int textSize) { | |
700 | int extCount, e, k, full; | |
701 | DmParams dm, last; | |
702 | byte[] data = new byte[2500]; | |
703 | extOut = 0; | |
704 | extCount = processExtensions(text, textOffset, textSize, data); | |
705 |
2
1. generate : changed conditional boundary → NO_COVERAGE 2. generate : negated conditional → NO_COVERAGE |
if (extCount < 0) { |
706 |
1
1. generate : replaced return of integer sized value with (x == 0 ? 1 : 0) → NO_COVERAGE |
return DM_ERROR_EXTENSION; |
707 | } | |
708 | e = -1; | |
709 |
2
1. generate : negated conditional → NO_COVERAGE 2. generate : negated conditional → NO_COVERAGE |
if (height == 0 || width == 0) { |
710 |
1
1. generate : Replaced integer subtraction with addition → NO_COVERAGE |
last = dmSizes[dmSizes.length - 1]; |
711 |
3
1. generate : Replaced integer addition with subtraction → NO_COVERAGE 2. generate : Replaced integer subtraction with addition → NO_COVERAGE 3. generate : Replaced integer subtraction with addition → NO_COVERAGE |
e = getEncodation(text, textOffset + extOut, textSize - extOut, data, extCount, last.dataSize - extCount, options, false); |
712 |
2
1. generate : changed conditional boundary → NO_COVERAGE 2. generate : negated conditional → NO_COVERAGE |
if (e < 0) { |
713 |
1
1. generate : replaced return of integer sized value with (x == 0 ? 1 : 0) → NO_COVERAGE |
return DM_ERROR_TEXT_TOO_BIG; |
714 | } | |
715 |
1
1. generate : Replaced integer addition with subtraction → NO_COVERAGE |
e += extCount; |
716 |
3
1. generate : changed conditional boundary → NO_COVERAGE 2. generate : Changed increment from 1 to -1 → NO_COVERAGE 3. generate : negated conditional → NO_COVERAGE |
for (k = 0; k < dmSizes.length; ++k) { |
717 |
2
1. generate : changed conditional boundary → NO_COVERAGE 2. generate : negated conditional → NO_COVERAGE |
if (dmSizes[k].dataSize >= e) |
718 | break; | |
719 | } | |
720 | dm = dmSizes[k]; | |
721 | height = dm.height; | |
722 | width = dm.width; | |
723 | } | |
724 | else { | |
725 |
3
1. generate : changed conditional boundary → NO_COVERAGE 2. generate : Changed increment from 1 to -1 → NO_COVERAGE 3. generate : negated conditional → NO_COVERAGE |
for (k = 0; k < dmSizes.length; ++k) { |
726 |
2
1. generate : negated conditional → NO_COVERAGE 2. generate : negated conditional → NO_COVERAGE |
if (height == dmSizes[k].height && width == dmSizes[k].width) |
727 | break; | |
728 | } | |
729 |
1
1. generate : negated conditional → NO_COVERAGE |
if (k == dmSizes.length) { |
730 |
1
1. generate : replaced return of integer sized value with (x == 0 ? 1 : 0) → NO_COVERAGE |
return DM_ERROR_INVALID_SQUARE; |
731 | } | |
732 | dm = dmSizes[k]; | |
733 |
3
1. generate : Replaced integer addition with subtraction → NO_COVERAGE 2. generate : Replaced integer subtraction with addition → NO_COVERAGE 3. generate : Replaced integer subtraction with addition → NO_COVERAGE |
e = getEncodation(text, textOffset + extOut, textSize - extOut, data, extCount, dm.dataSize - extCount, options, true); |
734 |
2
1. generate : changed conditional boundary → NO_COVERAGE 2. generate : negated conditional → NO_COVERAGE |
if (e < 0) { |
735 |
1
1. generate : replaced return of integer sized value with (x == 0 ? 1 : 0) → NO_COVERAGE |
return DM_ERROR_TEXT_TOO_BIG; |
736 | } | |
737 |
1
1. generate : Replaced integer addition with subtraction → NO_COVERAGE |
e += extCount; |
738 | } | |
739 |
2
1. generate : Replaced bitwise AND with OR → NO_COVERAGE 2. generate : negated conditional → NO_COVERAGE |
if ((options & DM_TEST) != 0) { |
740 |
1
1. generate : replaced return of integer sized value with (x == 0 ? 1 : 0) → NO_COVERAGE |
return DM_NO_ERROR; |
741 | } | |
742 |
7
1. generate : Replaced integer multiplication with division → NO_COVERAGE 2. generate : Replaced integer addition with subtraction → NO_COVERAGE 3. generate : Replaced integer addition with subtraction → NO_COVERAGE 4. generate : Replaced integer division with multiplication → NO_COVERAGE 5. generate : Replaced integer multiplication with division → NO_COVERAGE 6. generate : Replaced integer addition with subtraction → NO_COVERAGE 7. generate : Replaced integer multiplication with division → NO_COVERAGE |
image = new byte[(((dm.width + 2 * ws) + 7) / 8) * (dm.height + 2 * ws)]; |
743 |
2
1. generate : Replaced integer subtraction with addition → NO_COVERAGE 2. generate : removed call to com/lowagie/text/pdf/BarcodeDatamatrix::makePadding → NO_COVERAGE |
makePadding(data, e, dm.dataSize - e); |
744 |
6
1. generate : Replaced integer division with multiplication → NO_COVERAGE 2. generate : Replaced integer multiplication with division → NO_COVERAGE 3. generate : Replaced integer subtraction with addition → NO_COVERAGE 4. generate : Replaced integer division with multiplication → NO_COVERAGE 5. generate : Replaced integer multiplication with division → NO_COVERAGE 6. generate : Replaced integer subtraction with addition → NO_COVERAGE |
place = Placement.doPlacement(dm.height - (dm.height / dm.heightSection * 2), dm.width - (dm.width / dm.widthSection * 2)); |
745 |
4
1. generate : Replaced integer addition with subtraction → NO_COVERAGE 2. generate : Replaced integer division with multiplication → NO_COVERAGE 3. generate : Replaced integer multiplication with division → NO_COVERAGE 4. generate : Replaced integer addition with subtraction → NO_COVERAGE |
full = dm.dataSize + ((dm.dataSize + 2) / dm.dataBlock) * dm.errorBlock; |
746 |
1
1. generate : removed call to com/lowagie/text/pdf/BarcodeDatamatrix$ReedSolomon::generateECC → NO_COVERAGE |
ReedSolomon.generateECC(data, dm.dataSize, dm.dataBlock, dm.errorBlock); |
747 |
1
1. generate : removed call to com/lowagie/text/pdf/BarcodeDatamatrix::draw → NO_COVERAGE |
draw(data, full, dm); |
748 |
1
1. generate : replaced return of integer sized value with (x == 0 ? 1 : 0) → NO_COVERAGE |
return DM_NO_ERROR; |
749 | } | |
750 | ||
751 | /** Gets an <CODE>Image</CODE> with the barcode. A successful call to the method <CODE>generate()</CODE> | |
752 | * before calling this method is required. | |
753 | * @return the barcode <CODE>Image</CODE> | |
754 | * @throws BadElementException on error | |
755 | */ | |
756 | public Image createImage() throws BadElementException { | |
757 |
1
1. createImage : negated conditional → NO_COVERAGE |
if (image == null) |
758 |
1
1. createImage : mutated return of Object value for com/lowagie/text/pdf/BarcodeDatamatrix::createImage to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE |
return null; |
759 |
4
1. createImage : Replaced integer multiplication with division → NO_COVERAGE 2. createImage : Replaced integer addition with subtraction → NO_COVERAGE 3. createImage : Replaced integer multiplication with division → NO_COVERAGE 4. createImage : Replaced integer addition with subtraction → NO_COVERAGE |
byte[] g4 = CCITTG4Encoder.compress(image, width + 2 * ws, height + 2 * ws); |
760 |
5
1. createImage : Replaced integer multiplication with division → NO_COVERAGE 2. createImage : Replaced integer addition with subtraction → NO_COVERAGE 3. createImage : Replaced integer multiplication with division → NO_COVERAGE 4. createImage : Replaced integer addition with subtraction → NO_COVERAGE 5. createImage : mutated return of Object value for com/lowagie/text/pdf/BarcodeDatamatrix::createImage to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE |
return Image.getInstance(width + 2 * ws, height + 2 * ws, false, Image.CCITTG4, 0, g4, null); |
761 | } | |
762 | | |
763 | /** | |
764 | * Creates a <CODE>java.awt.Image</CODE>. A successful call to the method <CODE>generate()</CODE> | |
765 | * before calling this method is required. | |
766 | * @param foreground the color of the bars | |
767 | * @param background the color of the background | |
768 | * @return the image | |
769 | */ | |
770 | public java.awt.Image createAwtImage(Color foreground, Color background) { | |
771 |
1
1. createAwtImage : negated conditional → NO_COVERAGE |
if (image == null) |
772 |
1
1. createAwtImage : mutated return of Object value for com/lowagie/text/pdf/BarcodeDatamatrix::createAwtImage to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE |
return null; |
773 | int f = foreground.getRGB(); | |
774 | int g = background.getRGB(); | |
775 | Canvas canvas = new Canvas(); | |
776 | ||
777 |
2
1. createAwtImage : Replaced integer multiplication with division → NO_COVERAGE 2. createAwtImage : Replaced integer addition with subtraction → NO_COVERAGE |
int w = width + 2 * ws; |
778 |
2
1. createAwtImage : Replaced integer multiplication with division → NO_COVERAGE 2. createAwtImage : Replaced integer addition with subtraction → NO_COVERAGE |
int h = height + 2 * ws; |
779 |
1
1. createAwtImage : Replaced integer multiplication with division → NO_COVERAGE |
int[] pix = new int[w * h]; |
780 |
2
1. createAwtImage : Replaced integer addition with subtraction → NO_COVERAGE 2. createAwtImage : Replaced integer division with multiplication → NO_COVERAGE |
int stride = (w + 7) / 8; |
781 | int ptr = 0; | |
782 |
3
1. createAwtImage : changed conditional boundary → NO_COVERAGE 2. createAwtImage : Changed increment from 1 to -1 → NO_COVERAGE 3. createAwtImage : negated conditional → NO_COVERAGE |
for (int k = 0; k < h; ++k) { |
783 |
1
1. createAwtImage : Replaced integer multiplication with division → NO_COVERAGE |
int p = k * stride; |
784 |
3
1. createAwtImage : changed conditional boundary → NO_COVERAGE 2. createAwtImage : Changed increment from 1 to -1 → NO_COVERAGE 3. createAwtImage : negated conditional → NO_COVERAGE |
for (int j = 0; j < w; ++j) { |
785 |
3
1. createAwtImage : Replaced integer division with multiplication → NO_COVERAGE 2. createAwtImage : Replaced integer addition with subtraction → NO_COVERAGE 3. createAwtImage : Replaced bitwise AND with OR → NO_COVERAGE |
int b = image[p + (j / 8)] & 0xff; |
786 |
2
1. createAwtImage : Replaced integer modulus with multiplication → NO_COVERAGE 2. createAwtImage : Replaced Shift Left with Shift Right → NO_COVERAGE |
b <<= j % 8; |
787 |
3
1. createAwtImage : Changed increment from 1 to -1 → NO_COVERAGE 2. createAwtImage : Replaced bitwise AND with OR → NO_COVERAGE 3. createAwtImage : negated conditional → NO_COVERAGE |
pix[ptr++] = (b & 0x80) == 0 ? g : f; |
788 | } | |
789 | } | |
790 | java.awt.Image img = canvas.createImage(new MemoryImageSource(w, h, pix, 0, w)); | |
791 |
1
1. createAwtImage : mutated return of Object value for com/lowagie/text/pdf/BarcodeDatamatrix::createAwtImage to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE |
return img; |
792 | } | |
793 | | |
794 | private static class DmParams { | |
795 | DmParams(int height, int width, int heightSection, int widthSection, int dataSize, int dataBlock, int errorBlock) { | |
796 | this.height = height; | |
797 | this.width = width; | |
798 | this.heightSection = heightSection; | |
799 | this.widthSection = widthSection; | |
800 | this.dataSize = dataSize; | |
801 | this.dataBlock = dataBlock; | |
802 | this.errorBlock = errorBlock; | |
803 | } | |
804 | ||
805 | int height; | |
806 | int width; | |
807 | int heightSection; | |
808 | int widthSection; | |
809 | int dataSize; | |
810 | int dataBlock; | |
811 | int errorBlock; | |
812 | } | |
813 | ||
814 | /** | |
815 | * Gets the generated image. The image is represented as a stream of bytes, each byte representing | |
816 | * 8 pixels, 0 for white and 1 for black, with the high-order bit of each byte first. Each row | |
817 | * is aligned at byte boundaries. The dimensions of the image are defined by height and width | |
818 | * plus 2 * ws. | |
819 | * @return the generated image | |
820 | */ | |
821 | public byte[] getImage() { | |
822 | return image; | |
823 | } | |
824 | ||
825 | /** | |
826 | * Gets the height of the barcode. Will contain the real height used after a successful call | |
827 | * to <CODE>generate()</CODE>. This height doesn't include the whitespace border, if any. | |
828 | * @return the height of the barcode | |
829 | */ | |
830 | public int getHeight() { | |
831 | return height; | |
832 | } | |
833 | ||
834 | /** | |
835 | * Sets the height of the barcode. If the height is zero it will be calculated. This height doesn't include the whitespace border, if any. | |
836 | * <p> | |
837 | * The allowed dimensions are (height, width):<p> | |
838 | * 10, 10<br> | |
839 | * 12, 12<br> | |
840 | * 8, 18<br> | |
841 | * 14, 14<br> | |
842 | * 8, 32<br> | |
843 | * 16, 16<br> | |
844 | * 12, 26<br> | |
845 | * 18, 18<br> | |
846 | * 20, 20<br> | |
847 | * 12, 36<br> | |
848 | * 22, 22<br> | |
849 | * 16, 36<br> | |
850 | * 24, 24<br> | |
851 | * 26, 26<br> | |
852 | * 16, 48<br> | |
853 | * 32, 32<br> | |
854 | * 36, 36<br> | |
855 | * 40, 40<br> | |
856 | * 44, 44<br> | |
857 | * 48, 48<br> | |
858 | * 52, 52<br> | |
859 | * 64, 64<br> | |
860 | * 72, 72<br> | |
861 | * 80, 80<br> | |
862 | * 88, 88<br> | |
863 | * 96, 96<br> | |
864 | * 104, 104<br> | |
865 | * 120, 120<br> | |
866 | * 132, 132<br> | |
867 | * 144, 144<br> | |
868 | * @param height the height of the barcode | |
869 | */ | |
870 | public void setHeight(int height) { | |
871 | this.height = height; | |
872 | } | |
873 | ||
874 | /** | |
875 | * Gets the width of the barcode. Will contain the real width used after a successful call | |
876 | * to <CODE>generate()</CODE>. This width doesn't include the whitespace border, if any. | |
877 | * @return the width of the barcode | |
878 | */ | |
879 | public int getWidth() { | |
880 | return width; | |
881 | } | |
882 | ||
883 | /** | |
884 | * Sets the width of the barcode. If the width is zero it will be calculated. This width doesn't include the whitespace border, if any. | |
885 | * <p> | |
886 | * The allowed dimensions are (height, width):<p> | |
887 | * 10, 10<br> | |
888 | * 12, 12<br> | |
889 | * 8, 18<br> | |
890 | * 14, 14<br> | |
891 | * 8, 32<br> | |
892 | * 16, 16<br> | |
893 | * 12, 26<br> | |
894 | * 18, 18<br> | |
895 | * 20, 20<br> | |
896 | * 12, 36<br> | |
897 | * 22, 22<br> | |
898 | * 16, 36<br> | |
899 | * 24, 24<br> | |
900 | * 26, 26<br> | |
901 | * 16, 48<br> | |
902 | * 32, 32<br> | |
903 | * 36, 36<br> | |
904 | * 40, 40<br> | |
905 | * 44, 44<br> | |
906 | * 48, 48<br> | |
907 | * 52, 52<br> | |
908 | * 64, 64<br> | |
909 | * 72, 72<br> | |
910 | * 80, 80<br> | |
911 | * 88, 88<br> | |
912 | * 96, 96<br> | |
913 | * 104, 104<br> | |
914 | * 120, 120<br> | |
915 | * 132, 132<br> | |
916 | * 144, 144<br> | |
917 | * @param width the width of the barcode | |
918 | */ | |
919 | public void setWidth(int width) { | |
920 | this.width = width; | |
921 | } | |
922 | ||
923 | /** | |
924 | * Gets the whitespace border around the barcode. | |
925 | * @return the whitespace border around the barcode | |
926 | */ | |
927 | public int getWs() { | |
928 | return ws; | |
929 | } | |
930 | ||
931 | /** | |
932 | * Sets the whitespace border around the barcode. | |
933 | * @param ws the whitespace border around the barcode | |
934 | */ | |
935 | public void setWs(int ws) { | |
936 | this.ws = ws; | |
937 | } | |
938 | ||
939 | /** | |
940 | * Gets the barcode options. | |
941 | * @return the barcode options | |
942 | */ | |
943 | public int getOptions() { | |
944 | return options; | |
945 | } | |
946 | ||
947 | /** | |
948 | * Sets the options for the barcode generation. The options can be:<p> | |
949 | * One of:<br> | |
950 | * <CODE>DM_AUTO</CODE> - the best encodation will be used<br> | |
951 | * <CODE>DM_ASCII</CODE> - ASCII encodation<br> | |
952 | * <CODE>DM_C40</CODE> - C40 encodation<br> | |
953 | * <CODE>DM_TEXT</CODE> - TEXT encodation<br> | |
954 | * <CODE>DM_B256</CODE> - binary encodation<br> | |
955 | * <CODE>DM_X21</CODE> - X21 encodation<br> | |
956 | * <CODE>DM_EDIFACT</CODE> - EDIFACT encodation<br> | |
957 | * <CODE>DM_RAW</CODE> - no encodation. The bytes provided are already encoded and will be added directly to the barcode, using padding if needed. It assumes that the encodation state is left at ASCII after the last byte.<br> | |
958 | * <p> | |
959 | * One of:<br> | |
960 | * <CODE>DM_EXTENSION</CODE> - allows extensions to be embedded at the start of the text:<p> | |
961 | * exxxxxx - ECI number xxxxxx<br> | |
962 | * m5 - macro 5<br> | |
963 | * m6 - macro 6<br> | |
964 | * f - FNC1<br> | |
965 | * saabbccccc - Structured Append, aa symbol position (1-16), bb total number of symbols (2-16), ccccc file identification (0-64515)<br> | |
966 | * p - Reader programming<br> | |
967 | * . - extension terminator<p> | |
968 | * Example for a structured append, symbol 2 of 6, with FNC1 and ECI 000005. The actual text is "Hello".<p> | |
969 | * s020600075fe000005.Hello<p> | |
970 | * One of:<br> | |
971 | * <CODE>DM_TEST</CODE> - doesn't generate the image but returns all the other information. | |
972 | * @param options the barcode options | |
973 | */ | |
974 | public void setOptions(int options) { | |
975 | this.options = options; | |
976 | } | |
977 | | |
978 | static class Placement { | |
979 | private int nrow; | |
980 | private int ncol; | |
981 | private short[] array; | |
982 | private static final Hashtable cache = new Hashtable(); | |
983 | ||
984 | private Placement() { | |
985 | } | |
986 | | |
987 | static short[] doPlacement(int nrow, int ncol) { | |
988 |
2
1. doPlacement : Replaced integer multiplication with division → NO_COVERAGE 2. doPlacement : Replaced integer addition with subtraction → NO_COVERAGE |
Integer key = nrow * 1000 + ncol; |
989 | short[] pc = (short[])cache.get(key); | |
990 |
1
1. doPlacement : negated conditional → NO_COVERAGE |
if (pc != null) |
991 |
1
1. doPlacement : mutated return of Object value for com/lowagie/text/pdf/BarcodeDatamatrix$Placement::doPlacement to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE |
return pc; |
992 | Placement p = new Placement(); | |
993 | p.nrow = nrow; | |
994 | p.ncol = ncol; | |
995 |
1
1. doPlacement : Replaced integer multiplication with division → NO_COVERAGE |
p.array = new short[nrow * ncol]; |
996 |
1
1. doPlacement : removed call to com/lowagie/text/pdf/BarcodeDatamatrix$Placement::ecc200 → NO_COVERAGE |
p.ecc200(); |
997 | cache.put(key, p.array); | |
998 |
1
1. doPlacement : mutated return of Object value for com/lowagie/text/pdf/BarcodeDatamatrix$Placement::doPlacement to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE |
return p.array; |
999 | } | |
1000 | ||
1001 | /* "module" places "chr+bit" with appropriate wrapping within array[] */ | |
1002 | private void module(int row, int col, int chr, int bit) { | |
1003 |
7
1. module : changed conditional boundary → NO_COVERAGE 2. module : Replaced integer addition with subtraction → NO_COVERAGE 3. module : Replaced integer addition with subtraction → NO_COVERAGE 4. module : Replaced integer modulus with multiplication → NO_COVERAGE 5. module : Replaced integer subtraction with addition → NO_COVERAGE 6. module : Replaced integer addition with subtraction → NO_COVERAGE 7. module : negated conditional → NO_COVERAGE |
if (row < 0) { row += nrow; col += 4 - ((nrow+4)%8); } |
1004 |
7
1. module : changed conditional boundary → NO_COVERAGE 2. module : Replaced integer addition with subtraction → NO_COVERAGE 3. module : Replaced integer addition with subtraction → NO_COVERAGE 4. module : Replaced integer modulus with multiplication → NO_COVERAGE 5. module : Replaced integer subtraction with addition → NO_COVERAGE 6. module : Replaced integer addition with subtraction → NO_COVERAGE 7. module : negated conditional → NO_COVERAGE |
if (col < 0) { col += ncol; row += 4 - ((ncol+4)%8); } |
1005 |
4
1. module : Replaced integer multiplication with division → NO_COVERAGE 2. module : Replaced integer addition with subtraction → NO_COVERAGE 3. module : Replaced integer multiplication with division → NO_COVERAGE 4. module : Replaced integer addition with subtraction → NO_COVERAGE |
array[row*ncol+col] = (short)(8*chr + bit); |
1006 | } | |
1007 | /* "utah" places the 8 bits of a utah-shaped symbol character in ECC200 */ | |
1008 | private void utah(int row, int col, int chr) { | |
1009 |
3
1. utah : Replaced integer subtraction with addition → NO_COVERAGE 2. utah : Replaced integer subtraction with addition → NO_COVERAGE 3. utah : removed call to com/lowagie/text/pdf/BarcodeDatamatrix$Placement::module → NO_COVERAGE |
module(row-2,col-2,chr,0); |
1010 |
3
1. utah : Replaced integer subtraction with addition → NO_COVERAGE 2. utah : Replaced integer subtraction with addition → NO_COVERAGE 3. utah : removed call to com/lowagie/text/pdf/BarcodeDatamatrix$Placement::module → NO_COVERAGE |
module(row-2,col-1,chr,1); |
1011 |
3
1. utah : Replaced integer subtraction with addition → NO_COVERAGE 2. utah : Replaced integer subtraction with addition → NO_COVERAGE 3. utah : removed call to com/lowagie/text/pdf/BarcodeDatamatrix$Placement::module → NO_COVERAGE |
module(row-1,col-2,chr,2); |
1012 |
3
1. utah : Replaced integer subtraction with addition → NO_COVERAGE 2. utah : Replaced integer subtraction with addition → NO_COVERAGE 3. utah : removed call to com/lowagie/text/pdf/BarcodeDatamatrix$Placement::module → NO_COVERAGE |
module(row-1,col-1,chr,3); |
1013 |
2
1. utah : Replaced integer subtraction with addition → NO_COVERAGE 2. utah : removed call to com/lowagie/text/pdf/BarcodeDatamatrix$Placement::module → NO_COVERAGE |
module(row-1,col,chr,4); |
1014 |
2
1. utah : Replaced integer subtraction with addition → NO_COVERAGE 2. utah : removed call to com/lowagie/text/pdf/BarcodeDatamatrix$Placement::module → NO_COVERAGE |
module(row,col-2,chr,5); |
1015 |
2
1. utah : Replaced integer subtraction with addition → NO_COVERAGE 2. utah : removed call to com/lowagie/text/pdf/BarcodeDatamatrix$Placement::module → NO_COVERAGE |
module(row,col-1,chr,6); |
1016 |
1
1. utah : removed call to com/lowagie/text/pdf/BarcodeDatamatrix$Placement::module → NO_COVERAGE |
module(row,col,chr,7); |
1017 | } | |
1018 | /* "cornerN" places 8 bits of the four special corner cases in ECC200 */ | |
1019 | private void corner1(int chr) { | |
1020 |
2
1. corner1 : Replaced integer subtraction with addition → NO_COVERAGE 2. corner1 : removed call to com/lowagie/text/pdf/BarcodeDatamatrix$Placement::module → NO_COVERAGE |
module(nrow-1,0,chr,0); |
1021 |
2
1. corner1 : Replaced integer subtraction with addition → NO_COVERAGE 2. corner1 : removed call to com/lowagie/text/pdf/BarcodeDatamatrix$Placement::module → NO_COVERAGE |
module(nrow-1,1,chr,1); |
1022 |
2
1. corner1 : Replaced integer subtraction with addition → NO_COVERAGE 2. corner1 : removed call to com/lowagie/text/pdf/BarcodeDatamatrix$Placement::module → NO_COVERAGE |
module(nrow-1,2,chr,2); |
1023 |
2
1. corner1 : Replaced integer subtraction with addition → NO_COVERAGE 2. corner1 : removed call to com/lowagie/text/pdf/BarcodeDatamatrix$Placement::module → NO_COVERAGE |
module(0,ncol-2,chr,3); |
1024 |
2
1. corner1 : Replaced integer subtraction with addition → NO_COVERAGE 2. corner1 : removed call to com/lowagie/text/pdf/BarcodeDatamatrix$Placement::module → NO_COVERAGE |
module(0,ncol-1,chr,4); |
1025 |
2
1. corner1 : Replaced integer subtraction with addition → NO_COVERAGE 2. corner1 : removed call to com/lowagie/text/pdf/BarcodeDatamatrix$Placement::module → NO_COVERAGE |
module(1,ncol-1,chr,5); |
1026 |
2
1. corner1 : Replaced integer subtraction with addition → NO_COVERAGE 2. corner1 : removed call to com/lowagie/text/pdf/BarcodeDatamatrix$Placement::module → NO_COVERAGE |
module(2,ncol-1,chr,6); |
1027 |
2
1. corner1 : Replaced integer subtraction with addition → NO_COVERAGE 2. corner1 : removed call to com/lowagie/text/pdf/BarcodeDatamatrix$Placement::module → NO_COVERAGE |
module(3,ncol-1,chr,7); |
1028 | } | |
1029 | private void corner2(int chr){ | |
1030 |
2
1. corner2 : Replaced integer subtraction with addition → NO_COVERAGE 2. corner2 : removed call to com/lowagie/text/pdf/BarcodeDatamatrix$Placement::module → NO_COVERAGE |
module(nrow-3,0,chr,0); |
1031 |
2
1. corner2 : Replaced integer subtraction with addition → NO_COVERAGE 2. corner2 : removed call to com/lowagie/text/pdf/BarcodeDatamatrix$Placement::module → NO_COVERAGE |
module(nrow-2,0,chr,1); |
1032 |
2
1. corner2 : Replaced integer subtraction with addition → NO_COVERAGE 2. corner2 : removed call to com/lowagie/text/pdf/BarcodeDatamatrix$Placement::module → NO_COVERAGE |
module(nrow-1,0,chr,2); |
1033 |
2
1. corner2 : Replaced integer subtraction with addition → NO_COVERAGE 2. corner2 : removed call to com/lowagie/text/pdf/BarcodeDatamatrix$Placement::module → NO_COVERAGE |
module(0,ncol-4,chr,3); |
1034 |
2
1. corner2 : Replaced integer subtraction with addition → NO_COVERAGE 2. corner2 : removed call to com/lowagie/text/pdf/BarcodeDatamatrix$Placement::module → NO_COVERAGE |
module(0,ncol-3,chr,4); |
1035 |
2
1. corner2 : Replaced integer subtraction with addition → NO_COVERAGE 2. corner2 : removed call to com/lowagie/text/pdf/BarcodeDatamatrix$Placement::module → NO_COVERAGE |
module(0,ncol-2,chr,5); |
1036 |
2
1. corner2 : Replaced integer subtraction with addition → NO_COVERAGE 2. corner2 : removed call to com/lowagie/text/pdf/BarcodeDatamatrix$Placement::module → NO_COVERAGE |
module(0,ncol-1,chr,6); |
1037 |
2
1. corner2 : Replaced integer subtraction with addition → NO_COVERAGE 2. corner2 : removed call to com/lowagie/text/pdf/BarcodeDatamatrix$Placement::module → NO_COVERAGE |
module(1,ncol-1,chr,7); |
1038 | } | |
1039 | private void corner3(int chr){ | |
1040 |
2
1. corner3 : Replaced integer subtraction with addition → NO_COVERAGE 2. corner3 : removed call to com/lowagie/text/pdf/BarcodeDatamatrix$Placement::module → NO_COVERAGE |
module(nrow-3,0,chr,0); |
1041 |
2
1. corner3 : Replaced integer subtraction with addition → NO_COVERAGE 2. corner3 : removed call to com/lowagie/text/pdf/BarcodeDatamatrix$Placement::module → NO_COVERAGE |
module(nrow-2,0,chr,1); |
1042 |
2
1. corner3 : Replaced integer subtraction with addition → NO_COVERAGE 2. corner3 : removed call to com/lowagie/text/pdf/BarcodeDatamatrix$Placement::module → NO_COVERAGE |
module(nrow-1,0,chr,2); |
1043 |
2
1. corner3 : Replaced integer subtraction with addition → NO_COVERAGE 2. corner3 : removed call to com/lowagie/text/pdf/BarcodeDatamatrix$Placement::module → NO_COVERAGE |
module(0,ncol-2,chr,3); |
1044 |
2
1. corner3 : Replaced integer subtraction with addition → NO_COVERAGE 2. corner3 : removed call to com/lowagie/text/pdf/BarcodeDatamatrix$Placement::module → NO_COVERAGE |
module(0,ncol-1,chr,4); |
1045 |
2
1. corner3 : Replaced integer subtraction with addition → NO_COVERAGE 2. corner3 : removed call to com/lowagie/text/pdf/BarcodeDatamatrix$Placement::module → NO_COVERAGE |
module(1,ncol-1,chr,5); |
1046 |
2
1. corner3 : Replaced integer subtraction with addition → NO_COVERAGE 2. corner3 : removed call to com/lowagie/text/pdf/BarcodeDatamatrix$Placement::module → NO_COVERAGE |
module(2,ncol-1,chr,6); |
1047 |
2
1. corner3 : Replaced integer subtraction with addition → NO_COVERAGE 2. corner3 : removed call to com/lowagie/text/pdf/BarcodeDatamatrix$Placement::module → NO_COVERAGE |
module(3,ncol-1,chr,7); |
1048 | } | |
1049 | private void corner4(int chr){ | |
1050 |
2
1. corner4 : Replaced integer subtraction with addition → NO_COVERAGE 2. corner4 : removed call to com/lowagie/text/pdf/BarcodeDatamatrix$Placement::module → NO_COVERAGE |
module(nrow-1,0,chr,0); |
1051 |
3
1. corner4 : Replaced integer subtraction with addition → NO_COVERAGE 2. corner4 : Replaced integer subtraction with addition → NO_COVERAGE 3. corner4 : removed call to com/lowagie/text/pdf/BarcodeDatamatrix$Placement::module → NO_COVERAGE |
module(nrow-1,ncol-1,chr,1); |
1052 |
2
1. corner4 : Replaced integer subtraction with addition → NO_COVERAGE 2. corner4 : removed call to com/lowagie/text/pdf/BarcodeDatamatrix$Placement::module → NO_COVERAGE |
module(0,ncol-3,chr,2); |
1053 |
2
1. corner4 : Replaced integer subtraction with addition → NO_COVERAGE 2. corner4 : removed call to com/lowagie/text/pdf/BarcodeDatamatrix$Placement::module → NO_COVERAGE |
module(0,ncol-2,chr,3); |
1054 |
2
1. corner4 : Replaced integer subtraction with addition → NO_COVERAGE 2. corner4 : removed call to com/lowagie/text/pdf/BarcodeDatamatrix$Placement::module → NO_COVERAGE |
module(0,ncol-1,chr,4); |
1055 |
2
1. corner4 : Replaced integer subtraction with addition → NO_COVERAGE 2. corner4 : removed call to com/lowagie/text/pdf/BarcodeDatamatrix$Placement::module → NO_COVERAGE |
module(1,ncol-3,chr,5); |
1056 |
2
1. corner4 : Replaced integer subtraction with addition → NO_COVERAGE 2. corner4 : removed call to com/lowagie/text/pdf/BarcodeDatamatrix$Placement::module → NO_COVERAGE |
module(1,ncol-2,chr,6); |
1057 |
2
1. corner4 : Replaced integer subtraction with addition → NO_COVERAGE 2. corner4 : removed call to com/lowagie/text/pdf/BarcodeDatamatrix$Placement::module → NO_COVERAGE |
module(1,ncol-1,chr,7); |
1058 | } | |
1059 | /* "ECC200" fills an nrow x ncol array with appropriate values for ECC200 */ | |
1060 | private void ecc200(){ | |
1061 | int row, col, chr; | |
1062 | /* First, fill the array[] with invalid entries */ | |
1063 |
1
1. ecc200 : removed call to java/util/Arrays::fill → NO_COVERAGE |
Arrays.fill(array, (short)0); |
1064 | /* Starting in the correct location for character #1, bit 8,... */ | |
1065 | chr = 1; row = 4; col = 0; | |
1066 | do { | |
1067 | /* repeatedly first check for one of the special corner cases, then... */ | |
1068 |
4
1. ecc200 : Changed increment from 1 to -1 → NO_COVERAGE 2. ecc200 : negated conditional → NO_COVERAGE 3. ecc200 : negated conditional → NO_COVERAGE 4. ecc200 : removed call to com/lowagie/text/pdf/BarcodeDatamatrix$Placement::corner1 → NO_COVERAGE |
if ((row == nrow) && (col == 0)) corner1(chr++); |
1069 |
7
1. ecc200 : Changed increment from 1 to -1 → NO_COVERAGE 2. ecc200 : Replaced integer subtraction with addition → NO_COVERAGE 3. ecc200 : Replaced integer modulus with multiplication → NO_COVERAGE 4. ecc200 : negated conditional → NO_COVERAGE 5. ecc200 : negated conditional → NO_COVERAGE 6. ecc200 : negated conditional → NO_COVERAGE 7. ecc200 : removed call to com/lowagie/text/pdf/BarcodeDatamatrix$Placement::corner2 → NO_COVERAGE |
if ((row == nrow-2) && (col == 0) && (ncol%4 != 0)) corner2(chr++); |
1070 |
7
1. ecc200 : Changed increment from 1 to -1 → NO_COVERAGE 2. ecc200 : Replaced integer subtraction with addition → NO_COVERAGE 3. ecc200 : Replaced integer modulus with multiplication → NO_COVERAGE 4. ecc200 : negated conditional → NO_COVERAGE 5. ecc200 : negated conditional → NO_COVERAGE 6. ecc200 : negated conditional → NO_COVERAGE 7. ecc200 : removed call to com/lowagie/text/pdf/BarcodeDatamatrix$Placement::corner3 → NO_COVERAGE |
if ((row == nrow-2) && (col == 0) && (ncol%8 == 4)) corner3(chr++); |
1071 |
7
1. ecc200 : Changed increment from 1 to -1 → NO_COVERAGE 2. ecc200 : Replaced integer addition with subtraction → NO_COVERAGE 3. ecc200 : Replaced integer modulus with multiplication → NO_COVERAGE 4. ecc200 : negated conditional → NO_COVERAGE 5. ecc200 : negated conditional → NO_COVERAGE 6. ecc200 : negated conditional → NO_COVERAGE 7. ecc200 : removed call to com/lowagie/text/pdf/BarcodeDatamatrix$Placement::corner4 → NO_COVERAGE |
if ((row == nrow+4) && (col == 2) && (ncol%8 == 0)) corner4(chr++); |
1072 | /* sweep upward diagonally, inserting successive characters,... */ | |
1073 | do { | |
1074 |
7
1. ecc200 : changed conditional boundary → NO_COVERAGE 2. ecc200 : changed conditional boundary → NO_COVERAGE 3. ecc200 : Replaced integer multiplication with division → NO_COVERAGE 4. ecc200 : Replaced integer addition with subtraction → NO_COVERAGE 5. ecc200 : negated conditional → NO_COVERAGE 6. ecc200 : negated conditional → NO_COVERAGE 7. ecc200 : negated conditional → NO_COVERAGE |
if ((row < nrow) && (col >= 0) && array[row*ncol+col] == 0) |
1075 |
2
1. ecc200 : Changed increment from 1 to -1 → NO_COVERAGE 2. ecc200 : removed call to com/lowagie/text/pdf/BarcodeDatamatrix$Placement::utah → NO_COVERAGE |
utah(row,col,chr++); |
1076 |
2
1. ecc200 : Changed increment from -2 to 2 → NO_COVERAGE 2. ecc200 : Changed increment from 2 to -2 → NO_COVERAGE |
row -= 2; col += 2; |
1077 |
4
1. ecc200 : changed conditional boundary → NO_COVERAGE 2. ecc200 : changed conditional boundary → NO_COVERAGE 3. ecc200 : negated conditional → NO_COVERAGE 4. ecc200 : negated conditional → NO_COVERAGE |
} while ((row >= 0) && (col < ncol)); |
1078 |
2
1. ecc200 : Changed increment from 1 to -1 → NO_COVERAGE 2. ecc200 : Changed increment from 3 to -3 → NO_COVERAGE |
row += 1; col += 3; |
1079 | /* & then sweep downward diagonally, inserting successive characters,... */ | |
1080 | ||
1081 | do { | |
1082 |
7
1. ecc200 : changed conditional boundary → NO_COVERAGE 2. ecc200 : changed conditional boundary → NO_COVERAGE 3. ecc200 : Replaced integer multiplication with division → NO_COVERAGE 4. ecc200 : Replaced integer addition with subtraction → NO_COVERAGE 5. ecc200 : negated conditional → NO_COVERAGE 6. ecc200 : negated conditional → NO_COVERAGE 7. ecc200 : negated conditional → NO_COVERAGE |
if ((row >= 0) && (col < ncol) && array[row*ncol+col] == 0) |
1083 |
2
1. ecc200 : Changed increment from 1 to -1 → NO_COVERAGE 2. ecc200 : removed call to com/lowagie/text/pdf/BarcodeDatamatrix$Placement::utah → NO_COVERAGE |
utah(row,col,chr++); |
1084 |
2
1. ecc200 : Changed increment from 2 to -2 → NO_COVERAGE 2. ecc200 : Changed increment from -2 to 2 → NO_COVERAGE |
row += 2; col -= 2; |
1085 |
4
1. ecc200 : changed conditional boundary → NO_COVERAGE 2. ecc200 : changed conditional boundary → NO_COVERAGE 3. ecc200 : negated conditional → NO_COVERAGE 4. ecc200 : negated conditional → NO_COVERAGE |
} while ((row < nrow) && (col >= 0)); |
1086 |
2
1. ecc200 : Changed increment from 3 to -3 → NO_COVERAGE 2. ecc200 : Changed increment from 1 to -1 → NO_COVERAGE |
row += 3; col += 1; |
1087 | /* ... until the entire array is scanned */ | |
1088 |
4
1. ecc200 : changed conditional boundary → NO_COVERAGE 2. ecc200 : changed conditional boundary → NO_COVERAGE 3. ecc200 : negated conditional → NO_COVERAGE 4. ecc200 : negated conditional → NO_COVERAGE |
} while ((row < nrow) || (col < ncol)); |
1089 | /* Lastly, if the lower righthand corner is untouched, fill in fixed pattern */ | |
1090 |
3
1. ecc200 : Replaced integer multiplication with division → NO_COVERAGE 2. ecc200 : Replaced integer subtraction with addition → NO_COVERAGE 3. ecc200 : negated conditional → NO_COVERAGE |
if (array[nrow*ncol-1] == 0) { |
1091 |
5
1. ecc200 : Replaced integer multiplication with division → NO_COVERAGE 2. ecc200 : Replaced integer subtraction with addition → NO_COVERAGE 3. ecc200 : Replaced integer multiplication with division → NO_COVERAGE 4. ecc200 : Replaced integer subtraction with addition → NO_COVERAGE 5. ecc200 : Replaced integer subtraction with addition → NO_COVERAGE |
array[nrow*ncol-1] = array[nrow*ncol-ncol-2] = 1; |
1092 | } | |
1093 | } | |
1094 | } | |
1095 | | |
1096 | static class ReedSolomon { | |
1097 | ||
1098 | private static final int[] log = { | |
1099 | 0, 255, 1, 240, 2, 225, 241, 53, 3, 38, 226, 133, 242, 43, 54, 210, | |
1100 | 4, 195, 39, 114, 227, 106, 134, 28, 243, 140, 44, 23, 55, 118, 211, 234, | |
1101 | 5, 219, 196, 96, 40, 222, 115, 103, 228, 78, 107, 125, 135, 8, 29, 162, | |
1102 | 244, 186, 141, 180, 45, 99, 24, 49, 56, 13, 119, 153, 212, 199, 235, 91, | |
1103 | 6, 76, 220, 217, 197, 11, 97, 184, 41, 36, 223, 253, 116, 138, 104, 193, | |
1104 | 229, 86, 79, 171, 108, 165, 126, 145, 136, 34, 9, 74, 30, 32, 163, 84, | |
1105 | 245, 173, 187, 204, 142, 81, 181, 190, 46, 88, 100, 159, 25, 231, 50, 207, | |
1106 | 57, 147, 14, 67, 120, 128, 154, 248, 213, 167, 200, 63, 236, 110, 92, 176, | |
1107 | 7, 161, 77, 124, 221, 102, 218, 95, 198, 90, 12, 152, 98, 48, 185, 179, | |
1108 | 42, 209, 37, 132, 224, 52, 254, 239, 117, 233, 139, 22, 105, 27, 194, 113, | |
1109 | 230, 206, 87, 158, 80, 189, 172, 203, 109, 175, 166, 62, 127, 247, 146, 66, | |
1110 | 137, 192, 35, 252, 10, 183, 75, 216, 31, 83, 33, 73, 164, 144, 85, 170, | |
1111 | 246, 65, 174, 61, 188, 202, 205, 157, 143, 169, 82, 72, 182, 215, 191, 251, | |
1112 | 47, 178, 89, 151, 101, 94, 160, 123, 26, 112, 232, 21, 51, 238, 208, 131, | |
1113 | 58, 69, 148, 18, 15, 16, 68, 17, 121, 149, 129, 19, 155, 59, 249, 70, | |
1114 | 214, 250, 168, 71, 201, 156, 64, 60, 237, 130, 111, 20, 93, 122, 177, 150 | |
1115 | }; | |
1116 | ||
1117 | private static final int[] alog = { | |
1118 | 1, 2, 4, 8, 16, 32, 64, 128, 45, 90, 180, 69, 138, 57, 114, 228, | |
1119 | 229, 231, 227, 235, 251, 219, 155, 27, 54, 108, 216, 157, 23, 46, 92, 184, | |
1120 | 93, 186, 89, 178, 73, 146, 9, 18, 36, 72, 144, 13, 26, 52, 104, 208, | |
1121 | 141, 55, 110, 220, 149, 7, 14, 28, 56, 112, 224, 237, 247, 195, 171, 123, | |
1122 | 246, 193, 175, 115, 230, 225, 239, 243, 203, 187, 91, 182, 65, 130, 41, 82, | |
1123 | 164, 101, 202, 185, 95, 190, 81, 162, 105, 210, 137, 63, 126, 252, 213, 135, | |
1124 | 35, 70, 140, 53, 106, 212, 133, 39, 78, 156, 21, 42, 84, 168, 125, 250, | |
1125 | 217, 159, 19, 38, 76, 152, 29, 58, 116, 232, 253, 215, 131, 43, 86, 172, | |
1126 | 117, 234, 249, 223, 147, 11, 22, 44, 88, 176, 77, 154, 25, 50, 100, 200, | |
1127 | 189, 87, 174, 113, 226, 233, 255, 211, 139, 59, 118, 236, 245, 199, 163, 107, | |
1128 | 214, 129, 47, 94, 188, 85, 170, 121, 242, 201, 191, 83, 166, 97, 194, 169, | |
1129 | 127, 254, 209, 143, 51, 102, 204, 181, 71, 142, 49, 98, 196, 165, 103, 206, | |
1130 | 177, 79, 158, 17, 34, 68, 136, 61, 122, 244, 197, 167, 99, 198, 161, 111, | |
1131 | 222, 145, 15, 30, 60, 120, 240, 205, 183, 67, 134, 33, 66, 132, 37, 74, | |
1132 | 148, 5, 10, 20, 40, 80, 160, 109, 218, 153, 31, 62, 124, 248, 221, 151, | |
1133 | 3, 6, 12, 24, 48, 96, 192, 173, 119, 238, 241, 207, 179, 75, 150, 1 | |
1134 | }; | |
1135 | ||
1136 | private static final int[] poly5 = { | |
1137 | 228, 48, 15, 111, 62 | |
1138 | }; | |
1139 | ||
1140 | private static final int[] poly7 = { | |
1141 | 23, 68, 144, 134, 240, 92, 254 | |
1142 | }; | |
1143 | ||
1144 | private static final int[] poly10 = { | |
1145 | 28, 24, 185, 166, 223, 248, 116, 255, 110, 61 | |
1146 | }; | |
1147 | ||
1148 | private static final int[] poly11 = { | |
1149 | 175, 138, 205, 12, 194, 168, 39, 245, 60, 97, 120 | |
1150 | }; | |
1151 | ||
1152 | private static final int[] poly12 = { | |
1153 | 41, 153, 158, 91, 61, 42, 142, 213, 97, 178, 100, 242 | |
1154 | }; | |
1155 | ||
1156 | private static final int[] poly14 = { | |
1157 | 156, 97, 192, 252, 95, 9, 157, 119, 138, 45, 18, 186, 83, 185 | |
1158 | }; | |
1159 | ||
1160 | private static final int[] poly18 = { | |
1161 | 83, 195, 100, 39, 188, 75, 66, 61, 241, 213, 109, 129, 94, 254, 225, 48, | |
1162 | 90, 188 | |
1163 | }; | |
1164 | ||
1165 | private static final int[] poly20 = { | |
1166 | 15, 195, 244, 9, 233, 71, 168, 2, 188, 160, 153, 145, 253, 79, 108, 82, | |
1167 | 27, 174, 186, 172 | |
1168 | }; | |
1169 | ||
1170 | private static final int[] poly24 = { | |
1171 | 52, 190, 88, 205, 109, 39, 176, 21, 155, 197, 251, 223, 155, 21, 5, 172, | |
1172 | 254, 124, 12, 181, 184, 96, 50, 193 | |
1173 | }; | |
1174 | ||
1175 | private static final int[] poly28 = { | |
1176 | 211, 231, 43, 97, 71, 96, 103, 174, 37, 151, 170, 53, 75, 34, 249, 121, | |
1177 | 17, 138, 110, 213, 141, 136, 120, 151, 233, 168, 93, 255 | |
1178 | }; | |
1179 | ||
1180 | private static final int[] poly36 = { | |
1181 | 245, 127, 242, 218, 130, 250, 162, 181, 102, 120, 84, 179, 220, 251, 80, 182, | |
1182 | 229, 18, 2, 4, 68, 33, 101, 137, 95, 119, 115, 44, 175, 184, 59, 25, | |
1183 | 225, 98, 81, 112 | |
1184 | }; | |
1185 | ||
1186 | private static final int[] poly42 = { | |
1187 | 77, 193, 137, 31, 19, 38, 22, 153, 247, 105, 122, 2, 245, 133, 242, 8, | |
1188 | 175, 95, 100, 9, 167, 105, 214, 111, 57, 121, 21, 1, 253, 57, 54, 101, | |
1189 | 248, 202, 69, 50, 150, 177, 226, 5, 9, 5 | |
1190 | }; | |
1191 | ||
1192 | private static final int[] poly48 = { | |
1193 | 245, 132, 172, 223, 96, 32, 117, 22, 238, 133, 238, 231, 205, 188, 237, 87, | |
1194 | 191, 106, 16, 147, 118, 23, 37, 90, 170, 205, 131, 88, 120, 100, 66, 138, | |
1195 | 186, 240, 82, 44, 176, 87, 187, 147, 160, 175, 69, 213, 92, 253, 225, 19 | |
1196 | }; | |
1197 | ||
1198 | private static final int[] poly56 = { | |
1199 | 175, 9, 223, 238, 12, 17, 220, 208, 100, 29, 175, 170, 230, 192, 215, 235, | |
1200 | 150, 159, 36, 223, 38, 200, 132, 54, 228, 146, 218, 234, 117, 203, 29, 232, | |
1201 | 144, 238, 22, 150, 201, 117, 62, 207, 164, 13, 137, 245, 127, 67, 247, 28, | |
1202 | 155, 43, 203, 107, 233, 53, 143, 46 | |
1203 | }; | |
1204 | ||
1205 | private static final int[] poly62 = { | |
1206 | 242, 93, 169, 50, 144, 210, 39, 118, 202, 188, 201, 189, 143, 108, 196, 37, | |
1207 | 185, 112, 134, 230, 245, 63, 197, 190, 250, 106, 185, 221, 175, 64, 114, 71, | |
1208 | 161, 44, 147, 6, 27, 218, 51, 63, 87, 10, 40, 130, 188, 17, 163, 31, | |
1209 | 176, 170, 4, 107, 232, 7, 94, 166, 224, 124, 86, 47, 11, 204 | |
1210 | }; | |
1211 | ||
1212 | private static final int[] poly68 = { | |
1213 | 220, 228, 173, 89, 251, 149, 159, 56, 89, 33, 147, 244, 154, 36, 73, 127, | |
1214 | 213, 136, 248, 180, 234, 197, 158, 177, 68, 122, 93, 213, 15, 160, 227, 236, | |
1215 | 66, 139, 153, 185, 202, 167, 179, 25, 220, 232, 96, 210, 231, 136, 223, 239, | |
1216 | 181, 241, 59, 52, 172, 25, 49, 232, 211, 189, 64, 54, 108, 153, 132, 63, | |
1217 | 96, 103, 82, 186 | |
1218 | }; | |
1219 | ||
1220 | private static int[] getPoly(int nc) { | |
1221 | switch (nc) { | |
1222 | case 5: | |
1223 |
1
1. getPoly : mutated return of Object value for com/lowagie/text/pdf/BarcodeDatamatrix$ReedSolomon::getPoly to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE |
return poly5; |
1224 | case 7: | |
1225 |
1
1. getPoly : mutated return of Object value for com/lowagie/text/pdf/BarcodeDatamatrix$ReedSolomon::getPoly to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE |
return poly7; |
1226 | case 10: | |
1227 |
1
1. getPoly : mutated return of Object value for com/lowagie/text/pdf/BarcodeDatamatrix$ReedSolomon::getPoly to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE |
return poly10; |
1228 | case 11: | |
1229 |
1
1. getPoly : mutated return of Object value for com/lowagie/text/pdf/BarcodeDatamatrix$ReedSolomon::getPoly to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE |
return poly11; |
1230 | case 12: | |
1231 |
1
1. getPoly : mutated return of Object value for com/lowagie/text/pdf/BarcodeDatamatrix$ReedSolomon::getPoly to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE |
return poly12; |
1232 | case 14: | |
1233 |
1
1. getPoly : mutated return of Object value for com/lowagie/text/pdf/BarcodeDatamatrix$ReedSolomon::getPoly to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE |
return poly14; |
1234 | case 18: | |
1235 |
1
1. getPoly : mutated return of Object value for com/lowagie/text/pdf/BarcodeDatamatrix$ReedSolomon::getPoly to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE |
return poly18; |
1236 | case 20: | |
1237 |
1
1. getPoly : mutated return of Object value for com/lowagie/text/pdf/BarcodeDatamatrix$ReedSolomon::getPoly to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE |
return poly20; |
1238 | case 24: | |
1239 |
1
1. getPoly : mutated return of Object value for com/lowagie/text/pdf/BarcodeDatamatrix$ReedSolomon::getPoly to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE |
return poly24; |
1240 | case 28: | |
1241 |
1
1. getPoly : mutated return of Object value for com/lowagie/text/pdf/BarcodeDatamatrix$ReedSolomon::getPoly to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE |
return poly28; |
1242 | case 36: | |
1243 |
1
1. getPoly : mutated return of Object value for com/lowagie/text/pdf/BarcodeDatamatrix$ReedSolomon::getPoly to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE |
return poly36; |
1244 | case 42: | |
1245 |
1
1. getPoly : mutated return of Object value for com/lowagie/text/pdf/BarcodeDatamatrix$ReedSolomon::getPoly to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE |
return poly42; |
1246 | case 48: | |
1247 |
1
1. getPoly : mutated return of Object value for com/lowagie/text/pdf/BarcodeDatamatrix$ReedSolomon::getPoly to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE |
return poly48; |
1248 | case 56: | |
1249 |
1
1. getPoly : mutated return of Object value for com/lowagie/text/pdf/BarcodeDatamatrix$ReedSolomon::getPoly to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE |
return poly56; |
1250 | case 62: | |
1251 |
1
1. getPoly : mutated return of Object value for com/lowagie/text/pdf/BarcodeDatamatrix$ReedSolomon::getPoly to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE |
return poly62; |
1252 | case 68: | |
1253 |
1
1. getPoly : mutated return of Object value for com/lowagie/text/pdf/BarcodeDatamatrix$ReedSolomon::getPoly to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE |
return poly68; |
1254 | } | |
1255 |
1
1. getPoly : mutated return of Object value for com/lowagie/text/pdf/BarcodeDatamatrix$ReedSolomon::getPoly to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE |
return null; |
1256 | } | |
1257 | ||
1258 | private static void reedSolomonBlock(byte[] wd, int nd, byte[] ncout, int nc, int[] c) { | |
1259 | int i, j, k; | |
1260 | ||
1261 |
3
1. reedSolomonBlock : changed conditional boundary → NO_COVERAGE 2. reedSolomonBlock : Changed increment from 1 to -1 → NO_COVERAGE 3. reedSolomonBlock : negated conditional → NO_COVERAGE |
for (i=0; i<=nc; i++) ncout[i] = 0; |
1262 |
3
1. reedSolomonBlock : changed conditional boundary → NO_COVERAGE 2. reedSolomonBlock : Changed increment from 1 to -1 → NO_COVERAGE 3. reedSolomonBlock : negated conditional → NO_COVERAGE |
for (i=0; i<nd; i++) { |
1263 |
2
1. reedSolomonBlock : Replaced XOR with AND → NO_COVERAGE 2. reedSolomonBlock : Replaced bitwise AND with OR → NO_COVERAGE |
k = (ncout[0] ^ wd[i]) & 0xff; |
1264 |
3
1. reedSolomonBlock : changed conditional boundary → NO_COVERAGE 2. reedSolomonBlock : Changed increment from 1 to -1 → NO_COVERAGE 3. reedSolomonBlock : negated conditional → NO_COVERAGE |
for (j=0; j<nc; j++) { |
1265 |
7
1. reedSolomonBlock : Replaced integer addition with subtraction → NO_COVERAGE 2. reedSolomonBlock : Replaced integer subtraction with addition → NO_COVERAGE 3. reedSolomonBlock : Replaced integer subtraction with addition → NO_COVERAGE 4. reedSolomonBlock : Replaced integer addition with subtraction → NO_COVERAGE 5. reedSolomonBlock : Replaced integer modulus with multiplication → NO_COVERAGE 6. reedSolomonBlock : Replaced XOR with AND → NO_COVERAGE 7. reedSolomonBlock : negated conditional → NO_COVERAGE |
ncout[j] = (byte)(ncout[j+1] ^ (k == 0 ? 0 : (byte)alog[(log[k] + log[c[nc-j-1]]) % (255)])); |
1266 | } | |
1267 | } | |
1268 | } | |
1269 | ||
1270 | static void generateECC(byte[] wd, int nd, int datablock, int nc) { | |
1271 |
2
1. generateECC : Replaced integer addition with subtraction → NO_COVERAGE 2. generateECC : Replaced integer division with multiplication → NO_COVERAGE |
int blocks = (nd + 2) / datablock; |
1272 | int b; | |
1273 | byte[] buf = new byte[256]; | |
1274 | byte[] ecc = new byte[256]; | |
1275 | int[] c = getPoly(nc); | |
1276 |
3
1. generateECC : changed conditional boundary → NO_COVERAGE 2. generateECC : Changed increment from 1 to -1 → NO_COVERAGE 3. generateECC : negated conditional → NO_COVERAGE |
for (b = 0; b < blocks; b++) |
1277 | { | |
1278 | int n, p = 0; | |
1279 |
3
1. generateECC : changed conditional boundary → NO_COVERAGE 2. generateECC : Replaced integer addition with subtraction → NO_COVERAGE 3. generateECC : negated conditional → NO_COVERAGE |
for (n = b; n < nd; n += blocks) |
1280 |
1
1. generateECC : Changed increment from 1 to -1 → NO_COVERAGE |
buf[p++] = wd[n]; |
1281 |
1
1. generateECC : removed call to com/lowagie/text/pdf/BarcodeDatamatrix$ReedSolomon::reedSolomonBlock → NO_COVERAGE |
reedSolomonBlock(buf, p, ecc, nc, c); |
1282 | p = 0; | |
1283 |
4
1. generateECC : changed conditional boundary → NO_COVERAGE 2. generateECC : Replaced integer multiplication with division → NO_COVERAGE 3. generateECC : Replaced integer addition with subtraction → NO_COVERAGE 4. generateECC : negated conditional → NO_COVERAGE |
for (n = b; n < nc * blocks; n += blocks) |
1284 |
2
1. generateECC : Changed increment from 1 to -1 → NO_COVERAGE 2. generateECC : Replaced integer addition with subtraction → NO_COVERAGE |
wd[nd + n] = ecc[p++]; |
1285 | } | |
1286 | } | |
1287 | ||
1288 | } | |
1289 | } | |
Mutations | ||
173 |
1.1 2.2 3.3 4.4 5.5 6.6 |
|
178 |
1.1 2.2 3.3 4.4 |
|
179 |
1.1 |
|
182 |
1.1 2.2 3.3 4.4 |
|
183 |
1.1 2.2 3.3 4.4 |
|
184 |
1.1 |
|
188 |
1.1 2.2 3.3 4.4 5.5 6.6 |
|
189 |
1.1 2.2 3.3 4.4 |
|
190 |
1.1 |
|
194 |
1.1 2.2 3.3 4.4 |
|
195 |
1.1 2.2 3.3 4.4 |
|
196 |
1.1 |
|
200 |
1.1 2.2 3.3 4.4 5.5 6.6 |
|
201 |
1.1 2.2 3.3 4.4 5.5 |
|
202 |
1.1 |
|
206 |
1.1 2.2 3.3 |
|
207 |
1.1 2.2 3.3 4.4 |
|
208 |
1.1 2.2 3.3 |
|
209 |
1.1 2.2 3.3 4.4 |
|
210 |
1.1 |
|
211 |
1.1 2.2 3.3 4.4 5.5 6.6 7.7 8.8 9.9 10.10 |
|
212 |
1.1 2.2 3.3 4.4 5.5 |
|
221 |
1.1 2.2 |
|
223 |
1.1 |
|
224 |
1.1 2.2 3.3 |
|
225 |
1.1 2.2 3.3 4.4 5.5 |
|
226 |
1.1 2.2 |
|
227 |
1.1 |
|
228 |
1.1 |
|
233 |
1.1 2.2 3.3 4.4 5.5 |
|
240 |
1.1 |
|
241 |
1.1 |
|
242 |
1.1 2.2 |
|
243 |
1.1 2.2 |
|
244 |
1.1 |
|
245 |
1.1 2.2 |
|
246 |
1.1 2.2 3.3 4.4 5.5 |
|
247 |
1.1 2.2 3.3 4.4 5.5 6.6 7.7 8.8 |
|
249 |
1.1 2.2 |
|
250 |
1.1 2.2 3.3 |
|
251 |
1.1 |
|
252 |
1.1 |
|
253 |
1.1 2.2 3.3 |
|
256 |
1.1 2.2 |
|
259 |
1.1 2.2 |
|
264 |
1.1 |
|
265 |
1.1 |
|
266 |
1.1 2.2 3.3 4.4 5.5 |
|
267 |
1.1 |
|
268 |
1.1 2.2 3.3 4.4 5.5 |
|
269 |
1.1 |
|
271 |
1.1 2.2 |
|
272 |
1.1 |
|
276 |
1.1 2.2 3.3 |
|
277 |
1.1 2.2 |
|
280 |
1.1 2.2 |
|
281 |
1.1 2.2 |
|
282 |
1.1 2.2 3.3 4.4 |
|
283 |
1.1 |
|
284 |
1.1 2.2 3.3 4.4 |
|
285 |
1.1 |
|
286 |
1.1 2.2 |
|
287 |
1.1 |
|
291 |
1.1 2.2 |
|
297 |
1.1 |
|
298 |
1.1 |
|
303 |
1.1 2.2 3.3 |
|
304 |
1.1 |
|
305 |
1.1 2.2 |
|
307 |
1.1 |
|
311 |
1.1 2.2 |
|
312 |
1.1 2.2 3.3 |
|
313 |
1.1 2.2 3.3 |
|
314 |
1.1 2.2 |
|
318 |
1.1 2.2 |
|
319 |
1.1 2.2 3.3 |
|
320 |
1.1 2.2 3.3 |
|
321 |
1.1 2.2 |
|
324 |
1.1 2.2 3.3 |
|
326 |
1.1 2.2 |
|
328 |
1.1 2.2 |
|
329 |
1.1 2.2 3.3 4.4 5.5 6.6 |
|
330 |
1.1 2.2 |
|
331 |
1.1 2.2 3.3 |
|
333 |
1.1 2.2 3.3 4.4 5.5 6.6 7.7 |
|
334 |
1.1 2.2 3.3 |
|
335 |
1.1 2.2 |
|
336 |
1.1 |
|
339 |
1.1 2.2 3.3 4.4 5.5 |
|
340 |
1.1 2.2 |
|
341 |
1.1 2.2 |
|
342 |
1.1 2.2 |
|
343 |
1.1 2.2 |
|
344 |
1.1 |
|
346 |
1.1 2.2 |
|
348 |
1.1 2.2 3.3 |
|
352 |
1.1 2.2 |
|
353 |
1.1 |
|
354 |
1.1 2.2 3.3 4.4 5.5 |
|
355 |
1.1 |
|
356 |
1.1 2.2 |
|
357 |
1.1 2.2 |
|
358 |
1.1 |
|
363 |
1.1 |
|
364 |
1.1 |
|
370 |
1.1 2.2 3.3 |
|
371 |
1.1 2.2 |
|
372 |
1.1 2.2 3.3 4.4 5.5 |
|
373 |
1.1 |
|
374 |
1.1 2.2 3.3 |
|
376 |
1.1 2.2 |
|
379 |
1.1 |
|
380 |
1.1 2.2 |
|
381 |
1.1 |
|
382 |
1.1 2.2 3.3 |
|
384 |
1.1 2.2 3.3 |
|
385 |
1.1 2.2 3.3 |
|
386 |
1.1 2.2 |
|
391 |
1.1 |
|
394 |
1.1 |
|
395 |
1.1 2.2 |
|
396 |
1.1 2.2 3.3 4.4 5.5 |
|
398 |
1.1 2.2 3.3 |
|
399 |
1.1 2.2 |
|
400 |
1.1 2.2 3.3 |
|
401 |
1.1 2.2 |
|
402 |
1.1 2.2 |
|
407 |
1.1 2.2 |
|
408 |
1.1 2.2 |
|
410 |
1.1 2.2 |
|
411 |
1.1 |
|
413 |
1.1 2.2 |
|
415 |
1.1 2.2 3.3 |
|
418 |
1.1 |
|
419 |
1.1 |
|
420 |
1.1 |
|
421 |
1.1 2.2 |
|
422 |
1.1 2.2 3.3 4.4 5.5 |
|
423 |
1.1 |
|
424 |
1.1 2.2 3.3 |
|
425 |
1.1 2.2 |
|
426 |
1.1 2.2 3.3 |
|
427 |
1.1 2.2 |
|
428 |
1.1 2.2 |
|
430 |
1.1 |
|
436 |
1.1 |
|
437 |
1.1 |
|
440 |
1.1 |
|
441 |
1.1 2.2 |
|
443 |
1.1 2.2 |
|
445 |
1.1 |
|
453 |
1.1 2.2 |
|
457 |
1.1 2.2 |
|
458 |
1.1 2.2 |
|
462 |
1.1 2.2 3.3 |
|
463 |
1.1 2.2 |
|
464 |
1.1 |
|
465 |
1.1 |
|
466 |
1.1 |
|
469 |
1.1 2.2 |
|
470 |
1.1 2.2 |
|
472 |
1.1 2.2 |
|
473 |
1.1 |
|
474 |
1.1 |
|
476 |
1.1 2.2 |
|
477 |
1.1 |
|
478 |
1.1 |
|
480 |
1.1 2.2 |
|
481 |
1.1 |
|
482 |
1.1 |
|
485 |
1.1 2.2 |
|
489 |
1.1 2.2 3.3 4.4 5.5 |
|
490 |
1.1 |
|
493 |
1.1 2.2 3.3 |
|
494 |
1.1 2.2 3.3 4.4 5.5 6.6 7.7 |
|
495 |
1.1 2.2 3.3 |
|
496 |
1.1 2.2 |
|
498 |
1.1 |
|
499 |
1.1 2.2 |
|
500 |
1.1 2.2 |
|
501 |
1.1 |
|
502 |
1.1 2.2 |
|
508 |
1.1 2.2 |
|
509 |
1.1 |
|
511 |
1.1 |
|
512 |
1.1 |
|
514 |
1.1 2.2 3.3 |
|
515 |
1.1 |
|
517 |
1.1 2.2 3.3 |
|
518 |
1.1 |
|
520 |
1.1 2.2 3.3 |
|
521 |
1.1 |
|
523 |
1.1 2.2 3.3 |
|
524 |
1.1 |
|
526 |
1.1 2.2 3.3 |
|
527 |
1.1 |
|
529 |
1.1 2.2 3.3 |
|
530 |
1.1 |
|
531 |
1.1 2.2 3.3 4.4 5.5 6.6 7.7 8.8 9.9 10.10 11.11 12.12 |
|
532 |
1.1 |
|
536 |
1.1 2.2 3.3 |
|
537 |
1.1 2.2 3.3 4.4 |
|
542 |
1.1 |
|
544 |
1.1 |
|
546 |
1.1 |
|
548 |
1.1 |
|
550 |
1.1 |
|
552 |
1.1 |
|
556 |
1.1 |
|
558 |
1.1 |
|
560 |
1.1 |
|
562 |
1.1 |
|
564 |
1.1 |
|
566 |
1.1 |
|
568 |
1.1 2.2 |
|
569 |
1.1 |
|
570 |
1.1 |
|
571 |
1.1 |
|
573 |
1.1 |
|
579 |
1.1 2.2 3.3 |
|
580 |
1.1 2.2 |
|
581 |
1.1 2.2 3.3 4.4 |
|
582 |
1.1 |
|
583 |
1.1 2.2 3.3 |
|
585 |
1.1 |
|
590 |
1.1 2.2 |
|
591 |
1.1 |
|
595 |
1.1 2.2 |
|
596 |
1.1 2.2 |
|
597 |
1.1 |
|
598 |
1.1 2.2 3.3 |
|
599 |
1.1 |
|
603 |
1.1 |
|
605 |
1.1 2.2 3.3 |
|
606 |
1.1 |
|
607 |
1.1 |
|
608 |
1.1 2.2 |
|
609 |
1.1 |
|
610 |
1.1 |
|
611 |
1.1 |
|
612 |
1.1 2.2 |
|
613 |
1.1 2.2 |
|
614 |
1.1 2.2 |
|
615 |
1.1 2.2 3.3 4.4 |
|
616 |
1.1 2.2 3.3 4.4 |
|
619 |
1.1 2.2 3.3 4.4 |
|
620 |
1.1 2.2 3.3 4.4 5.5 |
|
621 |
1.1 2.2 3.3 4.4 |
|
625 |
1.1 |
|
626 |
1.1 |
|
627 |
1.1 2.2 3.3 |
|
628 |
1.1 |
|
629 |
1.1 |
|
630 |
1.1 2.2 3.3 4.4 |
|
631 |
1.1 |
|
632 |
1.1 |
|
633 |
1.1 |
|
634 |
1.1 2.2 3.3 4.4 |
|
635 |
1.1 |
|
636 |
1.1 |
|
637 |
1.1 |
|
638 |
1.1 2.2 3.3 4.4 |
|
639 |
1.1 |
|
640 |
1.1 |
|
641 |
1.1 |
|
642 |
1.1 2.2 3.3 4.4 5.5 |
|
643 |
1.1 2.2 3.3 |
|
644 |
1.1 2.2 3.3 |
|
647 |
1.1 |
|
648 |
1.1 |
|
649 |
1.1 |
|
652 |
1.1 |
|
653 |
1.1 |
|
654 |
1.1 2.2 3.3 |
|
655 |
1.1 |
|
656 |
1.1 2.2 3.3 |
|
657 |
1.1 2.2 |
|
658 |
1.1 |
|
659 |
1.1 |
|
660 |
1.1 2.2 |
|
663 |
1.1 2.2 3.3 4.4 |
|
664 |
1.1 |
|
665 |
1.1 |
|
668 |
1.1 |
|
684 |
1.1 |
|
705 |
1.1 2.2 |
|
706 |
1.1 |
|
709 |
1.1 2.2 |
|
710 |
1.1 |
|
711 |
1.1 2.2 3.3 |
|
712 |
1.1 2.2 |
|
713 |
1.1 |
|
715 |
1.1 |
|
716 |
1.1 2.2 3.3 |
|
717 |
1.1 2.2 |
|
725 |
1.1 2.2 3.3 |
|
726 |
1.1 2.2 |
|
729 |
1.1 |
|
730 |
1.1 |
|
733 |
1.1 2.2 3.3 |
|
734 |
1.1 2.2 |
|
735 |
1.1 |
|
737 |
1.1 |
|
739 |
1.1 2.2 |
|
740 |
1.1 |
|
742 |
1.1 2.2 3.3 4.4 5.5 6.6 7.7 |
|
743 |
1.1 2.2 |
|
744 |
1.1 2.2 3.3 4.4 5.5 6.6 |
|
745 |
1.1 2.2 3.3 4.4 |
|
746 |
1.1 |
|
747 |
1.1 |
|
748 |
1.1 |
|
757 |
1.1 |
|
758 |
1.1 |
|
759 |
1.1 2.2 3.3 4.4 |
|
760 |
1.1 2.2 3.3 4.4 5.5 |
|
771 |
1.1 |
|
772 |
1.1 |
|
777 |
1.1 2.2 |
|
778 |
1.1 2.2 |
|
779 |
1.1 |
|
780 |
1.1 2.2 |
|
782 |
1.1 2.2 3.3 |
|
783 |
1.1 |
|
784 |
1.1 2.2 3.3 |
|
785 |
1.1 2.2 3.3 |
|
786 |
1.1 2.2 |
|
787 |
1.1 2.2 3.3 |
|
791 |
1.1 |
|
988 |
1.1 2.2 |
|
990 |
1.1 |
|
991 |
1.1 |
|
995 |
1.1 |
|
996 |
1.1 |
|
998 |
1.1 |
|
1003 |
1.1 2.2 3.3 4.4 5.5 6.6 7.7 |
|
1004 |
1.1 2.2 3.3 4.4 5.5 6.6 7.7 |
|
1005 |
1.1 2.2 3.3 4.4 |
|
1009 |
1.1 2.2 3.3 |
|
1010 |
1.1 2.2 3.3 |
|
1011 |
1.1 2.2 3.3 |
|
1012 |
1.1 2.2 3.3 |
|
1013 |
1.1 2.2 |
|
1014 |
1.1 2.2 |
|
1015 |
1.1 2.2 |
|
1016 |
1.1 |
|
1020 |
1.1 2.2 |
|
1021 |
1.1 2.2 |
|
1022 |
1.1 2.2 |
|
1023 |
1.1 2.2 |
|
1024 |
1.1 2.2 |
|
1025 |
1.1 2.2 |
|
1026 |
1.1 2.2 |
|
1027 |
1.1 2.2 |
|
1030 |
1.1 2.2 |
|
1031 |
1.1 2.2 |
|
1032 |
1.1 2.2 |
|
1033 |
1.1 2.2 |
|
1034 |
1.1 2.2 |
|
1035 |
1.1 2.2 |
|
1036 |
1.1 2.2 |
|
1037 |
1.1 2.2 |
|
1040 |
1.1 2.2 |
|
1041 |
1.1 2.2 |
|
1042 |
1.1 2.2 |
|
1043 |
1.1 2.2 |
|
1044 |
1.1 2.2 |
|
1045 |
1.1 2.2 |
|
1046 |
1.1 2.2 |
|
1047 |
1.1 2.2 |
|
1050 |
1.1 2.2 |
|
1051 |
1.1 2.2 3.3 |
|
1052 |
1.1 2.2 |
|
1053 |
1.1 2.2 |
|
1054 |
1.1 2.2 |
|
1055 |
1.1 2.2 |
|
1056 |
1.1 2.2 |
|
1057 |
1.1 2.2 |
|
1063 |
1.1 |
|
1068 |
1.1 2.2 3.3 4.4 |
|
1069 |
1.1 2.2 3.3 4.4 5.5 6.6 7.7 |
|
1070 |
1.1 2.2 3.3 4.4 5.5 6.6 7.7 |
|
1071 |
1.1 2.2 3.3 4.4 5.5 6.6 7.7 |
|
1074 |
1.1 2.2 3.3 4.4 5.5 6.6 7.7 |
|
1075 |
1.1 2.2 |
|
1076 |
1.1 2.2 |
|
1077 |
1.1 2.2 3.3 4.4 |
|
1078 |
1.1 2.2 |
|
1082 |
1.1 2.2 3.3 4.4 5.5 6.6 7.7 |
|
1083 |
1.1 2.2 |
|
1084 |
1.1 2.2 |
|
1085 |
1.1 2.2 3.3 4.4 |
|
1086 |
1.1 2.2 |
|
1088 |
1.1 2.2 3.3 4.4 |
|
1090 |
1.1 2.2 3.3 |
|
1091 |
1.1 2.2 3.3 4.4 5.5 |
|
1223 |
1.1 |
|
1225 |
1.1 |
|
1227 |
1.1 |
|
1229 |
1.1 |
|
1231 |
1.1 |
|
1233 |
1.1 |
|
1235 |
1.1 |
|
1237 |
1.1 |
|
1239 |
1.1 |
|
1241 |
1.1 |
|
1243 |
1.1 |
|
1245 |
1.1 |
|
1247 |
1.1 |
|
1249 |
1.1 |
|
1251 |
1.1 |
|
1253 |
1.1 |
|
1255 |
1.1 |
|
1261 |
1.1 2.2 3.3 |
|
1262 |
1.1 2.2 3.3 |
|
1263 |
1.1 2.2 |
|
1264 |
1.1 2.2 3.3 |
|
1265 |
1.1 2.2 3.3 4.4 5.5 6.6 7.7 |
|
1271 |
1.1 2.2 |
|
1276 |
1.1 2.2 3.3 |
|
1279 |
1.1 2.2 3.3 |
|
1280 |
1.1 |
|
1281 |
1.1 |
|
1283 |
1.1 2.2 3.3 4.4 |
|
1284 |
1.1 2.2 |