Modified:
websites/production/commons/content/proper/commons-compress/jacoco/org.apache.commons.compress.compressors.bzip2/BZip2CompressorInputStream.java.html
==============================================================================
---
websites/production/commons/content/proper/commons-compress/jacoco/org.apache.commons.compress.compressors.bzip2/BZip2CompressorInputStream.java.html
(original)
+++
websites/production/commons/content/proper/commons-compress/jacoco/org.apache.commons.compress.compressors.bzip2/BZip2CompressorInputStream.java.html
Tue Aug 20 11:56:50 2024
@@ -232,21 +232,13 @@ public class BZip2CompressorInputStream
private int storedBlockCRC, storedCombinedCRC;
private int computedCombinedCRC;
private int su_count;
-
private int su_ch2;
-
private int su_chPrev;
-
private int su_i2;
-
private int su_j2;
-
private int su_rNToGo;
-
private int su_rTPos;
-
private int su_tPos;
-
private char su_z;
/**
@@ -263,8 +255,8 @@ public class BZip2CompressorInputStream
* @throws NullPointerException if {@code in == null}
*/
public BZip2CompressorInputStream(final InputStream in) throws IOException
{
-<span class="fc" id="L266"> this(in, false);</span>
-<span class="fc" id="L267"> }</span>
+<span class="fc" id="L258"> this(in, false);</span>
+<span class="fc" id="L259"> }</span>
/**
* Constructs a new BZip2CompressorInputStream which decompresses bytes
read from the specified stream.
@@ -275,246 +267,239 @@ public class BZip2CompressorInputStream
*
* @throws IOException if {@code in == null}, the stream content is
malformed, or an I/O error occurs.
*/
-<span class="fc" id="L278"> public BZip2CompressorInputStream(final
InputStream in, final boolean decompressConcatenated) throws IOException
{</span>
-<span class="pc bpc" id="L279" title="1 of 2 branches missed.">
this.bin = new BitInputStream(in == System.in ? CloseShieldInputStream.wrap(in)
: in, ByteOrder.BIG_ENDIAN);</span>
-<span class="fc" id="L280"> this.decompressConcatenated =
decompressConcatenated;</span>
-
-<span class="fc" id="L282"> init(true);</span>
-<span class="fc" id="L283"> initBlock();</span>
-<span class="fc" id="L284"> }</span>
+<span class="fc" id="L270"> public BZip2CompressorInputStream(final
InputStream in, final boolean decompressConcatenated) throws IOException
{</span>
+<span class="pc bpc" id="L271" title="1 of 2 branches missed.">
this.bin = new BitInputStream(in == System.in ? CloseShieldInputStream.wrap(in)
: in, ByteOrder.BIG_ENDIAN);</span>
+<span class="fc" id="L272"> this.decompressConcatenated =
decompressConcatenated;</span>
+<span class="fc" id="L273"> init(true);</span>
+<span class="fc" id="L274"> initBlock();</span>
+<span class="fc" id="L275"> }</span>
@Override
public void close() throws IOException {
-<span class="fc" id="L288"> final BitInputStream inShadow =
this.bin;</span>
-<span class="fc bfc" id="L289" title="All 2 branches covered."> if
(inShadow != null) {</span>
+<span class="fc" id="L279"> final BitInputStream inShadow =
this.bin;</span>
+<span class="fc bfc" id="L280" title="All 2 branches covered."> if
(inShadow != null) {</span>
try {
-<span class="fc" id="L291"> inShadow.close();</span>
+<span class="fc" id="L282"> inShadow.close();</span>
} finally {
-<span class="fc" id="L293"> this.data = null;</span>
-<span class="fc" id="L294"> this.bin = null;</span>
+<span class="fc" id="L284"> this.data = null;</span>
+<span class="fc" id="L285"> this.bin = null;</span>
}
}
-<span class="fc" id="L297"> }</span>
+<span class="fc" id="L288"> }</span>
private boolean complete() throws IOException {
-<span class="fc" id="L300"> this.storedCombinedCRC =
bsGetInt(bin);</span>
-<span class="fc" id="L301"> this.currentState = EOF;</span>
-<span class="fc" id="L302"> this.data = null;</span>
-
-<span class="pc bpc" id="L304" title="1 of 2 branches missed."> if
(this.storedCombinedCRC != this.computedCombinedCRC) {</span>
-<span class="nc" id="L305"> throw new IOException("BZip2 CRC
error");</span>
+<span class="fc" id="L291"> this.storedCombinedCRC =
bsGetInt(bin);</span>
+<span class="fc" id="L292"> this.currentState = EOF;</span>
+<span class="fc" id="L293"> this.data = null;</span>
+<span class="pc bpc" id="L294" title="1 of 2 branches missed."> if
(this.storedCombinedCRC != this.computedCombinedCRC) {</span>
+<span class="nc" id="L295"> throw new IOException("BZip2 CRC
error");</span>
}
-
// Look for the next .bz2 stream if decompressing
// concatenated files.
-<span class="fc bfc" id="L310" title="All 4 branches covered."> return
!decompressConcatenated || !init(false);</span>
+<span class="fc bfc" id="L299" title="All 4 branches covered."> return
!decompressConcatenated || !init(false);</span>
}
/**
* Called by recvDecodingTables() exclusively.
*/
private void createHuffmanDecodingTables(final int alphaSize, final int
nGroups) throws IOException {
-<span class="fc" id="L317"> final Data dataShadow = this.data;</span>
-<span class="fc" id="L318"> final char[][] len =
dataShadow.temp_charArray2d;</span>
-<span class="fc" id="L319"> final int[] minLens =
dataShadow.minLens;</span>
-<span class="fc" id="L320"> final int[][] limit =
dataShadow.limit;</span>
-<span class="fc" id="L321"> final int[][] base = dataShadow.base;</span>
-<span class="fc" id="L322"> final int[][] perm = dataShadow.perm;</span>
-
-<span class="fc bfc" id="L324" title="All 2 branches covered."> for
(int t = 0; t < nGroups; t++) {</span>
-<span class="fc" id="L325"> int minLen = 32;</span>
-<span class="fc" id="L326"> int maxLen = 0;</span>
-<span class="fc" id="L327"> final char[] len_t = len[t];</span>
-<span class="fc bfc" id="L328" title="All 2 branches covered."> for
(int i = alphaSize; --i >= 0;) {</span>
-<span class="fc" id="L329"> final char lent = len_t[i];</span>
-<span class="fc bfc" id="L330" title="All 2 branches covered.">
if (lent > maxLen) {</span>
-<span class="fc" id="L331"> maxLen = lent;</span>
- }
-<span class="fc bfc" id="L333" title="All 2 branches covered.">
if (lent < minLen) {</span>
-<span class="fc" id="L334"> minLen = lent;</span>
- }
-<span class="fc" id="L336"> }</span>
-<span class="fc" id="L337"> hbCreateDecodeTables(limit[t], base[t],
perm[t], len[t], minLen, maxLen, alphaSize);</span>
-<span class="fc" id="L338"> minLens[t] = minLen;</span>
+<span class="fc" id="L306"> final Data dataShadow = this.data;</span>
+<span class="fc" id="L307"> final char[][] len =
dataShadow.temp_charArray2d;</span>
+<span class="fc" id="L308"> final int[] minLens =
dataShadow.minLens;</span>
+<span class="fc" id="L309"> final int[][] limit =
dataShadow.limit;</span>
+<span class="fc" id="L310"> final int[][] base = dataShadow.base;</span>
+<span class="fc" id="L311"> final int[][] perm = dataShadow.perm;</span>
+
+<span class="fc bfc" id="L313" title="All 2 branches covered."> for
(int t = 0; t < nGroups; t++) {</span>
+<span class="fc" id="L314"> int minLen = 32;</span>
+<span class="fc" id="L315"> int maxLen = 0;</span>
+<span class="fc" id="L316"> final char[] len_t = len[t];</span>
+<span class="fc bfc" id="L317" title="All 2 branches covered."> for
(int i = alphaSize; --i >= 0;) {</span>
+<span class="fc" id="L318"> final char lent = len_t[i];</span>
+<span class="fc bfc" id="L319" title="All 2 branches covered.">
if (lent > maxLen) {</span>
+<span class="fc" id="L320"> maxLen = lent;</span>
+ }
+<span class="fc bfc" id="L322" title="All 2 branches covered.">
if (lent < minLen) {</span>
+<span class="fc" id="L323"> minLen = lent;</span>
+ }
+<span class="fc" id="L325"> }</span>
+<span class="fc" id="L326"> hbCreateDecodeTables(limit[t], base[t],
perm[t], len[t], minLen, maxLen, alphaSize);</span>
+<span class="fc" id="L327"> minLens[t] = minLen;</span>
}
-<span class="fc" id="L340"> }</span>
+<span class="fc" id="L329"> }</span>
private void endBlock() throws IOException {
-<span class="fc" id="L343"> final int computedBlockCRC =
this.crc.getValue();</span>
-
+<span class="fc" id="L332"> final int computedBlockCRC =
this.crc.getValue();</span>
// A bad CRC is considered a fatal error.
-<span class="pc bpc" id="L346" title="1 of 2 branches missed."> if
(this.storedBlockCRC != computedBlockCRC) {</span>
+<span class="pc bpc" id="L334" title="1 of 2 branches missed."> if
(this.storedBlockCRC != computedBlockCRC) {</span>
// make next blocks readable without error
// (repair feature, not yet documented, not tested)
-<span class="nc" id="L349"> this.computedCombinedCRC =
this.storedCombinedCRC << 1 | this.storedCombinedCRC >>>
31;</span>
-<span class="nc" id="L350"> this.computedCombinedCRC ^=
this.storedBlockCRC;</span>
-
-<span class="nc" id="L352"> throw new IOException("BZip2 CRC
error");</span>
- }
-
-<span class="fc" id="L355"> this.computedCombinedCRC =
this.computedCombinedCRC << 1 | this.computedCombinedCRC >>>
31;</span>
-<span class="fc" id="L356"> this.computedCombinedCRC ^=
computedBlockCRC;</span>
-<span class="fc" id="L357"> }</span>
+<span class="nc" id="L337"> this.computedCombinedCRC =
this.storedCombinedCRC << 1 | this.storedCombinedCRC >>>
31;</span>
+<span class="nc" id="L338"> this.computedCombinedCRC ^=
this.storedBlockCRC;</span>
+<span class="nc" id="L339"> throw new IOException("BZip2 CRC
error");</span>
+ }
+<span class="fc" id="L341"> this.computedCombinedCRC =
this.computedCombinedCRC << 1 | this.computedCombinedCRC >>>
31;</span>
+<span class="fc" id="L342"> this.computedCombinedCRC ^=
computedBlockCRC;</span>
+<span class="fc" id="L343"> }</span>
private void getAndMoveToFrontDecode() throws IOException {
-<span class="fc" id="L360"> final BitInputStream bin = this.bin;</span>
-<span class="fc" id="L361"> this.origPtr = bsR(bin, 24);</span>
-<span class="fc" id="L362"> recvDecodingTables();</span>
-
-<span class="fc" id="L364"> final Data dataShadow = this.data;</span>
-<span class="fc" id="L365"> final byte[] ll8 = dataShadow.ll8;</span>
-<span class="fc" id="L366"> final int[] unzftab =
dataShadow.unzftab;</span>
-<span class="fc" id="L367"> final byte[] selector =
dataShadow.selector;</span>
-<span class="fc" id="L368"> final byte[] seqToUnseq =
dataShadow.seqToUnseq;</span>
-<span class="fc" id="L369"> final char[] yy =
dataShadow.getAndMoveToFrontDecode_yy;</span>
-<span class="fc" id="L370"> final int[] minLens =
dataShadow.minLens;</span>
-<span class="fc" id="L371"> final int[][] limit =
dataShadow.limit;</span>
-<span class="fc" id="L372"> final int[][] base = dataShadow.base;</span>
-<span class="fc" id="L373"> final int[][] perm = dataShadow.perm;</span>
-<span class="fc" id="L374"> final int limitLast = this.blockSize100k *
100000;</span>
+<span class="fc" id="L346"> final BitInputStream bin = this.bin;</span>
+<span class="fc" id="L347"> this.origPtr = bsR(bin, 24);</span>
+<span class="fc" id="L348"> recvDecodingTables();</span>
+<span class="fc" id="L349"> final Data dataShadow = this.data;</span>
+<span class="fc" id="L350"> final byte[] ll8 = dataShadow.ll8;</span>
+<span class="fc" id="L351"> final int[] unzftab =
dataShadow.unzftab;</span>
+<span class="fc" id="L352"> final byte[] selector =
dataShadow.selector;</span>
+<span class="fc" id="L353"> final byte[] seqToUnseq =
dataShadow.seqToUnseq;</span>
+<span class="fc" id="L354"> final char[] yy =
dataShadow.getAndMoveToFrontDecode_yy;</span>
+<span class="fc" id="L355"> final int[] minLens =
dataShadow.minLens;</span>
+<span class="fc" id="L356"> final int[][] limit =
dataShadow.limit;</span>
+<span class="fc" id="L357"> final int[][] base = dataShadow.base;</span>
+<span class="fc" id="L358"> final int[][] perm = dataShadow.perm;</span>
+<span class="fc" id="L359"> final int limitLast = this.blockSize100k *
100000;</span>
/*
* Setting up the unzftab entries here is not strictly necessary, but
it does save having to do it later in a separate pass, and so saves a block's
* worth of cache misses.
*/
-<span class="fc bfc" id="L380" title="All 2 branches covered."> for
(int i = 256; --i >= 0;) {</span>
-<span class="fc" id="L381"> yy[i] = (char) i;</span>
-<span class="fc" id="L382"> unzftab[i] = 0;</span>
- }
-
-<span class="fc" id="L385"> int groupNo = 0;</span>
-<span class="fc" id="L386"> int groupPos = G_SIZE - 1;</span>
-<span class="fc" id="L387"> final int eob = this.nInUse + 1;</span>
-<span class="fc" id="L388"> int nextSym =
getAndMoveToFrontDecode0();</span>
-<span class="fc" id="L389"> int lastShadow = -1;</span>
-<span class="fc" id="L390"> int zt = selector[groupNo] &
0xff;</span>
-<span class="fc" id="L391"> checkBounds(zt, N_GROUPS,
"zt");</span>
-<span class="fc" id="L392"> int[] base_zt = base[zt];</span>
-<span class="fc" id="L393"> int[] limit_zt = limit[zt];</span>
-<span class="fc" id="L394"> int[] perm_zt = perm[zt];</span>
-<span class="fc" id="L395"> int minLens_zt = minLens[zt];</span>
-
-<span class="fc bfc" id="L397" title="All 2 branches covered."> while
(nextSym != eob) {</span>
-<span class="fc bfc" id="L398" title="All 4 branches covered."> if
(nextSym == RUNA || nextSym == RUNB) {</span>
-<span class="fc" id="L399"> int s = -1;</span>
-
-<span class="fc" id="L401"> for (int n = 1; true; n <<=
1) {</span>
-<span class="fc bfc" id="L402" title="All 2 branches covered.">
if (nextSym == RUNA) {</span>
-<span class="fc" id="L403"> s += n;</span>
-<span class="fc bfc" id="L404" title="All 2 branches covered.">
} else if (nextSym == RUNB) {</span>
-<span class="fc" id="L405"> s += n << 1;</span>
+<span class="fc bfc" id="L365" title="All 2 branches covered."> for
(int i = 256; --i >= 0;) {</span>
+<span class="fc" id="L366"> yy[i] = (char) i;</span>
+<span class="fc" id="L367"> unzftab[i] = 0;</span>
+ }
+
+<span class="fc" id="L370"> int groupNo = 0;</span>
+<span class="fc" id="L371"> int groupPos = G_SIZE - 1;</span>
+<span class="fc" id="L372"> final int eob = this.nInUse + 1;</span>
+<span class="fc" id="L373"> int nextSym =
getAndMoveToFrontDecode0();</span>
+<span class="fc" id="L374"> int lastShadow = -1;</span>
+<span class="fc" id="L375"> int zt = selector[groupNo] &
0xff;</span>
+<span class="fc" id="L376"> checkBounds(zt, N_GROUPS,
"zt");</span>
+<span class="fc" id="L377"> int[] base_zt = base[zt];</span>
+<span class="fc" id="L378"> int[] limit_zt = limit[zt];</span>
+<span class="fc" id="L379"> int[] perm_zt = perm[zt];</span>
+<span class="fc" id="L380"> int minLens_zt = minLens[zt];</span>
+
+<span class="fc bfc" id="L382" title="All 2 branches covered."> while
(nextSym != eob) {</span>
+<span class="fc bfc" id="L383" title="All 4 branches covered."> if
(nextSym == RUNA || nextSym == RUNB) {</span>
+<span class="fc" id="L384"> int s = -1;</span>
+
+<span class="fc" id="L386"> for (int n = 1; true; n <<=
1) {</span>
+<span class="fc bfc" id="L387" title="All 2 branches covered.">
if (nextSym == RUNA) {</span>
+<span class="fc" id="L388"> s += n;</span>
+<span class="fc bfc" id="L389" title="All 2 branches covered.">
} else if (nextSym == RUNB) {</span>
+<span class="fc" id="L390"> s += n << 1;</span>
} else {
break;
}
-<span class="fc bfc" id="L410" title="All 2 branches covered.">
if (groupPos == 0) {</span>
-<span class="fc" id="L411"> groupPos = G_SIZE -
1;</span>
-<span class="fc" id="L412"> checkBounds(++groupNo,
MAX_SELECTORS, "groupNo");</span>
-<span class="fc" id="L413"> zt = selector[groupNo]
& 0xff;</span>
-<span class="fc" id="L414"> checkBounds(zt, N_GROUPS,
"zt");</span>
-<span class="fc" id="L415"> base_zt = base[zt];</span>
-<span class="fc" id="L416"> limit_zt = limit[zt];</span>
-<span class="fc" id="L417"> perm_zt = perm[zt];</span>
-<span class="fc" id="L418"> minLens_zt =
minLens[zt];</span>
+<span class="fc bfc" id="L395" title="All 2 branches covered.">
if (groupPos == 0) {</span>
+<span class="fc" id="L396"> groupPos = G_SIZE -
1;</span>
+<span class="fc" id="L397"> checkBounds(++groupNo,
MAX_SELECTORS, "groupNo");</span>
+<span class="fc" id="L398"> zt = selector[groupNo]
& 0xff;</span>
+<span class="fc" id="L399"> checkBounds(zt, N_GROUPS,
"zt");</span>
+<span class="fc" id="L400"> base_zt = base[zt];</span>
+<span class="fc" id="L401"> limit_zt = limit[zt];</span>
+<span class="fc" id="L402"> perm_zt = perm[zt];</span>
+<span class="fc" id="L403"> minLens_zt =
minLens[zt];</span>
} else {
-<span class="fc" id="L420"> groupPos--;</span>
+<span class="fc" id="L405"> groupPos--;</span>
}
-<span class="fc" id="L423"> int zn = minLens_zt;</span>
-<span class="fc" id="L424"> checkBounds(zn, MAX_ALPHA_SIZE,
"zn");</span>
-<span class="fc" id="L425"> int zvec = bsR(bin, zn);</span>
-<span class="fc bfc" id="L426" title="All 2 branches covered.">
while (zvec > limit_zt[zn]) {</span>
-<span class="fc" id="L427"> checkBounds(++zn,
MAX_ALPHA_SIZE, "zn");</span>
-<span class="fc" id="L428"> zvec = zvec << 1 |
bsR(bin, 1);</span>
+<span class="fc" id="L408"> int zn = minLens_zt;</span>
+<span class="fc" id="L409"> checkBounds(zn, MAX_ALPHA_SIZE,
"zn");</span>
+<span class="fc" id="L410"> int zvec = bsR(bin, zn);</span>
+<span class="fc bfc" id="L411" title="All 2 branches covered.">
while (zvec > limit_zt[zn]) {</span>
+<span class="fc" id="L412"> checkBounds(++zn,
MAX_ALPHA_SIZE, "zn");</span>
+<span class="fc" id="L413"> zvec = zvec << 1 |
bsR(bin, 1);</span>
}
-<span class="fc" id="L430"> final int tmp = zvec -
base_zt[zn];</span>
-<span class="fc" id="L431"> checkBounds(tmp,
MAX_ALPHA_SIZE, "zvec");</span>
-<span class="fc" id="L432"> nextSym = perm_zt[tmp];</span>
- }
-<span class="fc" id="L434"> checkBounds(s,
this.data.ll8.length, "s");</span>
-
-<span class="fc" id="L436"> final int yy0 = yy[0];</span>
-<span class="fc" id="L437"> checkBounds(yy0, 256,
"yy");</span>
-<span class="fc" id="L438"> final byte ch =
seqToUnseq[yy0];</span>
-<span class="fc" id="L439"> unzftab[ch & 0xff] += s +
1;</span>
-
-<span class="fc" id="L441"> final int from =
++lastShadow;</span>
-<span class="fc" id="L442"> lastShadow += s;</span>
-<span class="fc" id="L443"> checkBounds(lastShadow,
this.data.ll8.length, "lastShadow");</span>
-<span class="fc" id="L444"> Arrays.fill(ll8, from, lastShadow +
1, ch);</span>
-
-<span class="pc bpc" id="L446" title="1 of 2 branches missed.">
if (lastShadow >= limitLast) {</span>
-<span class="nc" id="L447"> throw new
IOException("Block overrun while expanding RLE in MTF, " + lastShadow
+ " exceeds " + limitLast);</span>
- }
-<span class="fc" id="L449"> } else {</span>
-<span class="pc bpc" id="L450" title="1 of 2 branches missed.">
if (++lastShadow >= limitLast) {</span>
-<span class="nc" id="L451"> throw new
IOException("Block overrun in MTF, " + lastShadow + " exceeds
" + limitLast);</span>
- }
-<span class="fc" id="L453"> checkBounds(nextSym, 256 + 1,
"nextSym");</span>
-
-<span class="fc" id="L455"> final char tmp = yy[nextSym -
1];</span>
-<span class="fc" id="L456"> checkBounds(tmp, 256,
"yy");</span>
-<span class="fc" id="L457"> unzftab[seqToUnseq[tmp] &
0xff]++;</span>
-<span class="fc" id="L458"> ll8[lastShadow] =
seqToUnseq[tmp];</span>
+<span class="fc" id="L415"> final int tmp = zvec -
base_zt[zn];</span>
+<span class="fc" id="L416"> checkBounds(tmp,
MAX_ALPHA_SIZE, "zvec");</span>
+<span class="fc" id="L417"> nextSym = perm_zt[tmp];</span>
+ }
+<span class="fc" id="L419"> checkBounds(s,
this.data.ll8.length, "s");</span>
+
+<span class="fc" id="L421"> final int yy0 = yy[0];</span>
+<span class="fc" id="L422"> checkBounds(yy0, 256,
"yy");</span>
+<span class="fc" id="L423"> final byte ch =
seqToUnseq[yy0];</span>
+<span class="fc" id="L424"> unzftab[ch & 0xff] += s +
1;</span>
+
+<span class="fc" id="L426"> final int from =
++lastShadow;</span>
+<span class="fc" id="L427"> lastShadow += s;</span>
+<span class="fc" id="L428"> checkBounds(lastShadow,
this.data.ll8.length, "lastShadow");</span>
+<span class="fc" id="L429"> Arrays.fill(ll8, from, lastShadow +
1, ch);</span>
+
+<span class="pc bpc" id="L431" title="1 of 2 branches missed.">
if (lastShadow >= limitLast) {</span>
+<span class="nc" id="L432"> throw new
IOException("Block overrun while expanding RLE in MTF, " + lastShadow
+ " exceeds " + limitLast);</span>
+ }
+<span class="fc" id="L434"> } else {</span>
+<span class="pc bpc" id="L435" title="1 of 2 branches missed.">
if (++lastShadow >= limitLast) {</span>
+<span class="nc" id="L436"> throw new
IOException("Block overrun in MTF, " + lastShadow + " exceeds
" + limitLast);</span>
+ }
+<span class="fc" id="L438"> checkBounds(nextSym, 256 + 1,
"nextSym");</span>
+
+<span class="fc" id="L440"> final char tmp = yy[nextSym -
1];</span>
+<span class="fc" id="L441"> checkBounds(tmp, 256,
"yy");</span>
+<span class="fc" id="L442"> unzftab[seqToUnseq[tmp] &
0xff]++;</span>
+<span class="fc" id="L443"> ll8[lastShadow] =
seqToUnseq[tmp];</span>
/*
* This loop is hammered during decompression, hence avoid
native method call overhead of System.arraycopy for very small ranges to copy.
*/
-<span class="fc bfc" id="L463" title="All 2 branches covered.">
if (nextSym <= 16) {</span>
-<span class="fc bfc" id="L464" title="All 2 branches covered.">
for (int j = nextSym - 1; j > 0;) {</span>
-<span class="fc" id="L465"> yy[j] = yy[--j];</span>
+<span class="fc bfc" id="L448" title="All 2 branches covered.">
if (nextSym <= 16) {</span>
+<span class="fc bfc" id="L449" title="All 2 branches covered.">
for (int j = nextSym - 1; j > 0;) {</span>
+<span class="fc" id="L450"> yy[j] = yy[--j];</span>
}
} else {
-<span class="fc" id="L468"> System.arraycopy(yy, 0, yy, 1,
nextSym - 1);</span>
+<span class="fc" id="L453"> System.arraycopy(yy, 0, yy, 1,
nextSym - 1);</span>
}
-<span class="fc" id="L471"> yy[0] = tmp;</span>
+<span class="fc" id="L456"> yy[0] = tmp;</span>
-<span class="fc bfc" id="L473" title="All 2 branches covered.">
if (groupPos == 0) {</span>
-<span class="fc" id="L474"> groupPos = G_SIZE - 1;</span>
-<span class="fc" id="L475"> checkBounds(++groupNo,
MAX_SELECTORS, "groupNo");</span>
-<span class="fc" id="L476"> zt = selector[groupNo] &
0xff;</span>
-<span class="fc" id="L477"> checkBounds(zt, N_GROUPS,
"zt");</span>
-<span class="fc" id="L478"> base_zt = base[zt];</span>
-<span class="fc" id="L479"> limit_zt = limit[zt];</span>
-<span class="fc" id="L480"> perm_zt = perm[zt];</span>
-<span class="fc" id="L481"> minLens_zt = minLens[zt];</span>
+<span class="fc bfc" id="L458" title="All 2 branches covered.">
if (groupPos == 0) {</span>
+<span class="fc" id="L459"> groupPos = G_SIZE - 1;</span>
+<span class="fc" id="L460"> checkBounds(++groupNo,
MAX_SELECTORS, "groupNo");</span>
+<span class="fc" id="L461"> zt = selector[groupNo] &
0xff;</span>
+<span class="fc" id="L462"> checkBounds(zt, N_GROUPS,
"zt");</span>
+<span class="fc" id="L463"> base_zt = base[zt];</span>
+<span class="fc" id="L464"> limit_zt = limit[zt];</span>
+<span class="fc" id="L465"> perm_zt = perm[zt];</span>
+<span class="fc" id="L466"> minLens_zt = minLens[zt];</span>
} else {
-<span class="fc" id="L483"> groupPos--;</span>
+<span class="fc" id="L468"> groupPos--;</span>
}
-<span class="fc" id="L486"> int zn = minLens_zt;</span>
-<span class="fc" id="L487"> checkBounds(zn, MAX_ALPHA_SIZE,
"zn");</span>
-<span class="fc" id="L488"> int zvec = bsR(bin, zn);</span>
-<span class="fc bfc" id="L489" title="All 2 branches covered.">
while (zvec > limit_zt[zn]) {</span>
-<span class="fc" id="L490"> checkBounds(++zn,
MAX_ALPHA_SIZE, "zn");</span>
-<span class="fc" id="L491"> zvec = zvec << 1 |
bsR(bin, 1);</span>
+<span class="fc" id="L471"> int zn = minLens_zt;</span>
+<span class="fc" id="L472"> checkBounds(zn, MAX_ALPHA_SIZE,
"zn");</span>
+<span class="fc" id="L473"> int zvec = bsR(bin, zn);</span>
+<span class="fc bfc" id="L474" title="All 2 branches covered.">
while (zvec > limit_zt[zn]) {</span>
+<span class="fc" id="L475"> checkBounds(++zn,
MAX_ALPHA_SIZE, "zn");</span>
+<span class="fc" id="L476"> zvec = zvec << 1 |
bsR(bin, 1);</span>
}
-<span class="fc" id="L493"> final int idx = zvec -
base_zt[zn];</span>
-<span class="fc" id="L494"> checkBounds(idx, MAX_ALPHA_SIZE,
"zvec");</span>
-<span class="fc" id="L495"> nextSym = perm_zt[idx];</span>
-<span class="fc" id="L496"> }</span>
+<span class="fc" id="L478"> final int idx = zvec -
base_zt[zn];</span>
+<span class="fc" id="L479"> checkBounds(idx, MAX_ALPHA_SIZE,
"zvec");</span>
+<span class="fc" id="L480"> nextSym = perm_zt[idx];</span>
+<span class="fc" id="L481"> }</span>
}
-<span class="fc" id="L499"> this.last = lastShadow;</span>
-<span class="fc" id="L500"> }</span>
+<span class="fc" id="L484"> this.last = lastShadow;</span>
+<span class="fc" id="L485"> }</span>
private int getAndMoveToFrontDecode0() throws IOException {
-<span class="fc" id="L503"> final Data dataShadow = this.data;</span>
-<span class="fc" id="L504"> final int zt = dataShadow.selector[0] &
0xff;</span>
-<span class="fc" id="L505"> checkBounds(zt, N_GROUPS,
"zt");</span>
-<span class="fc" id="L506"> final int[] limit_zt =
dataShadow.limit[zt];</span>
-<span class="fc" id="L507"> int zn = dataShadow.minLens[zt];</span>
-<span class="fc" id="L508"> checkBounds(zn, MAX_ALPHA_SIZE,
"zn");</span>
-<span class="fc" id="L509"> int zvec = bsR(bin, zn);</span>
-<span class="fc bfc" id="L510" title="All 2 branches covered."> while
(zvec > limit_zt[zn]) {</span>
-<span class="fc" id="L511"> checkBounds(++zn, MAX_ALPHA_SIZE,
"zn");</span>
-<span class="fc" id="L512"> zvec = zvec << 1 | bsR(bin,
1);</span>
+<span class="fc" id="L488"> final Data dataShadow = this.data;</span>
+<span class="fc" id="L489"> final int zt = dataShadow.selector[0] &
0xff;</span>
+<span class="fc" id="L490"> checkBounds(zt, N_GROUPS,
"zt");</span>
+<span class="fc" id="L491"> final int[] limit_zt =
dataShadow.limit[zt];</span>
+<span class="fc" id="L492"> int zn = dataShadow.minLens[zt];</span>
+<span class="fc" id="L493"> checkBounds(zn, MAX_ALPHA_SIZE,
"zn");</span>
+<span class="fc" id="L494"> int zvec = bsR(bin, zn);</span>
+<span class="fc bfc" id="L495" title="All 2 branches covered."> while
(zvec > limit_zt[zn]) {</span>
+<span class="fc" id="L496"> checkBounds(++zn, MAX_ALPHA_SIZE,
"zn");</span>
+<span class="fc" id="L497"> zvec = zvec << 1 | bsR(bin,
1);</span>
}
-<span class="fc" id="L514"> final int tmp = zvec -
dataShadow.base[zt][zn];</span>
-<span class="fc" id="L515"> checkBounds(tmp, MAX_ALPHA_SIZE,
"zvec");</span>
+<span class="fc" id="L499"> final int tmp = zvec -
dataShadow.base[zt][zn];</span>
+<span class="fc" id="L500"> checkBounds(tmp, MAX_ALPHA_SIZE,
"zvec");</span>
-<span class="fc" id="L517"> return dataShadow.perm[zt][tmp];</span>
+<span class="fc" id="L502"> return dataShadow.perm[zt][tmp];</span>
}
/**
@@ -522,43 +507,43 @@ public class BZip2CompressorInputStream
*/
@Override
public long getCompressedCount() {
-<span class="fc" id="L525"> return bin.getBytesRead();</span>
+<span class="fc" id="L510"> return bin.getBytesRead();</span>
}
private boolean init(final boolean isFirstStream) throws IOException {
-<span class="pc bpc" id="L529" title="1 of 2 branches missed."> if
(null == bin) {</span>
-<span class="nc" id="L530"> throw new IOException("No
InputStream");</span>
+<span class="pc bpc" id="L514" title="1 of 2 branches missed."> if
(null == bin) {</span>
+<span class="nc" id="L515"> throw new IOException("No
InputStream");</span>
}
-<span class="fc bfc" id="L533" title="All 2 branches covered."> if
(!isFirstStream) {</span>
-<span class="fc" id="L534"> bin.clearBitCache();</span>
+<span class="fc bfc" id="L518" title="All 2 branches covered."> if
(!isFirstStream) {</span>
+<span class="fc" id="L519"> bin.clearBitCache();</span>
}
-<span class="fc" id="L537"> final int magic0 =
readNextByte(this.bin);</span>
-<span class="pc bpc" id="L538" title="1 of 4 branches missed."> if
(magic0 == -1 && !isFirstStream) {</span>
-<span class="fc" id="L539"> return false;</span>
+<span class="fc" id="L522"> final int magic0 =
readNextByte(this.bin);</span>
+<span class="pc bpc" id="L523" title="1 of 4 branches missed."> if
(magic0 == -1 && !isFirstStream) {</span>
+<span class="fc" id="L524"> return false;</span>
}
-<span class="fc" id="L541"> final int magic1 =
readNextByte(this.bin);</span>
-<span class="fc" id="L542"> final int magic2 =
readNextByte(this.bin);</span>
+<span class="fc" id="L526"> final int magic1 =
readNextByte(this.bin);</span>
+<span class="fc" id="L527"> final int magic2 =
readNextByte(this.bin);</span>
-<span class="pc bpc" id="L544" title="2 of 6 branches missed."> if
(magic0 != 'B' || magic1 != 'Z' || magic2 != 'h') {</span>
-<span class="pc bpc" id="L545" title="1 of 2 branches missed.">
throw new IOException(isFirstStream ? "Stream is not in the BZip2
format" : "Garbage after a valid BZip2 stream");</span>
+<span class="pc bpc" id="L529" title="2 of 6 branches missed."> if
(magic0 != 'B' || magic1 != 'Z' || magic2 != 'h') {</span>
+<span class="pc bpc" id="L530" title="1 of 2 branches missed.">
throw new IOException(isFirstStream ? "Stream is not in the BZip2
format" : "Garbage after a valid BZip2 stream");</span>
}
-<span class="fc" id="L548"> final int blockSize =
readNextByte(this.bin);</span>
-<span class="pc bpc" id="L549" title="2 of 4 branches missed."> if
(blockSize < '1' || blockSize > '9') {</span>
-<span class="nc" id="L550"> throw new IOException("BZip2 block
size is invalid");</span>
+<span class="fc" id="L533"> final int blockSize =
readNextByte(this.bin);</span>
+<span class="pc bpc" id="L534" title="2 of 4 branches missed."> if
(blockSize < '1' || blockSize > '9') {</span>
+<span class="nc" id="L535"> throw new IOException("BZip2 block
size is invalid");</span>
}
-<span class="fc" id="L553"> this.blockSize100k = blockSize - '0';</span>
+<span class="fc" id="L538"> this.blockSize100k = blockSize - '0';</span>
-<span class="fc" id="L555"> this.computedCombinedCRC = 0;</span>
+<span class="fc" id="L540"> this.computedCombinedCRC = 0;</span>
-<span class="fc" id="L557"> return true;</span>
+<span class="fc" id="L542"> return true;</span>
}
private void initBlock() throws IOException {
-<span class="fc" id="L561"> final BitInputStream bin = this.bin;</span>
+<span class="fc" id="L546"> final BitInputStream bin = this.bin;</span>
char magic0;
char magic1;
char magic2;
@@ -568,76 +553,76 @@ public class BZip2CompressorInputStream
while (true) {
// Get the block magic bytes.
-<span class="fc" id="L571"> magic0 = bsGetUByte(bin);</span>
-<span class="fc" id="L572"> magic1 = bsGetUByte(bin);</span>
-<span class="fc" id="L573"> magic2 = bsGetUByte(bin);</span>
-<span class="fc" id="L574"> magic3 = bsGetUByte(bin);</span>
-<span class="fc" id="L575"> magic4 = bsGetUByte(bin);</span>
-<span class="fc" id="L576"> magic5 = bsGetUByte(bin);</span>
+<span class="fc" id="L556"> magic0 = bsGetUByte(bin);</span>
+<span class="fc" id="L557"> magic1 = bsGetUByte(bin);</span>
+<span class="fc" id="L558"> magic2 = bsGetUByte(bin);</span>
+<span class="fc" id="L559"> magic3 = bsGetUByte(bin);</span>
+<span class="fc" id="L560"> magic4 = bsGetUByte(bin);</span>
+<span class="fc" id="L561"> magic5 = bsGetUByte(bin);</span>
// If isn't end of stream magic, break out of the loop.
-<span class="pc bpc" id="L579" title="5 of 12 branches missed."> if
(magic0 != 0x17 || magic1 != 0x72 || magic2 != 0x45 || magic3 != 0x38 || magic4
!= 0x50 || magic5 != 0x90) {</span>
-<span class="nc" id="L580"> break;</span>
+<span class="pc bpc" id="L564" title="5 of 12 branches missed."> if
(magic0 != 0x17 || magic1 != 0x72 || magic2 != 0x45 || magic3 != 0x38 || magic4
!= 0x50 || magic5 != 0x90) {</span>
+<span class="nc" id="L565"> break;</span>
}
// End of stream was reached. Check the combined CRC and
// advance to the next .bz2 stream if decoding concatenated
// streams.
-<span class="fc bfc" id="L586" title="All 2 branches covered."> if
(complete()) {</span>
-<span class="fc" id="L587"> return;</span>
+<span class="fc bfc" id="L571" title="All 2 branches covered."> if
(complete()) {</span>
+<span class="fc" id="L572"> return;</span>
}
}
-<span class="pc bpc" id="L591" title="6 of 12 branches missed."> if
(magic0 != 0x31 || // '1'</span>
+<span class="pc bpc" id="L576" title="6 of 12 branches missed."> if
(magic0 != 0x31 || // '1'</span>
magic1 != 0x41 || // ')'
magic2 != 0x59 || // 'Y'
magic3 != 0x26 || // '&'
magic4 != 0x53 || // 'S'
magic5 != 0x59 // 'Y'
) {
-<span class="nc" id="L598"> this.currentState = EOF;</span>
-<span class="nc" id="L599"> throw new IOException("Bad block
header");</span>
+<span class="nc" id="L583"> this.currentState = EOF;</span>
+<span class="nc" id="L584"> throw new IOException("Bad block
header");</span>
}
-<span class="fc" id="L601"> this.storedBlockCRC = bsGetInt(bin);</span>
-<span class="fc bfc" id="L602" title="All 2 branches covered.">
this.blockRandomised = bsR(bin, 1) == 1;</span>
+<span class="fc" id="L586"> this.storedBlockCRC = bsGetInt(bin);</span>
+<span class="fc bfc" id="L587" title="All 2 branches covered.">
this.blockRandomised = bsR(bin, 1) == 1;</span>
/*
* Allocate data here instead in constructor, so we do not allocate it
if the input file is empty.
*/
-<span class="fc bfc" id="L607" title="All 2 branches covered."> if
(this.data == null) {</span>
-<span class="fc" id="L608"> this.data = new
Data(this.blockSize100k);</span>
+<span class="fc bfc" id="L592" title="All 2 branches covered."> if
(this.data == null) {</span>
+<span class="fc" id="L593"> this.data = new
Data(this.blockSize100k);</span>
}
// currBlockNo++;
-<span class="fc" id="L612"> getAndMoveToFrontDecode();</span>
+<span class="fc" id="L597"> getAndMoveToFrontDecode();</span>
-<span class="fc" id="L614"> this.crc.reset();</span>
-<span class="fc" id="L615"> this.currentState =
START_BLOCK_STATE;</span>
-<span class="fc" id="L616"> }</span>
+<span class="fc" id="L599"> this.crc.reset();</span>
+<span class="fc" id="L600"> this.currentState =
START_BLOCK_STATE;</span>
+<span class="fc" id="L601"> }</span>
private void makeMaps() {
-<span class="fc" id="L619"> final boolean[] inUse =
this.data.inUse;</span>
-<span class="fc" id="L620"> final byte[] seqToUnseq =
this.data.seqToUnseq;</span>
+<span class="fc" id="L604"> final boolean[] inUse =
this.data.inUse;</span>
+<span class="fc" id="L605"> final byte[] seqToUnseq =
this.data.seqToUnseq;</span>
-<span class="fc" id="L622"> int nInUseShadow = 0;</span>
+<span class="fc" id="L607"> int nInUseShadow = 0;</span>
-<span class="fc bfc" id="L624" title="All 2 branches covered."> for
(int i = 0; i < 256; i++) {</span>
-<span class="fc bfc" id="L625" title="All 2 branches covered."> if
(inUse[i]) {</span>
-<span class="fc" id="L626"> seqToUnseq[nInUseShadow++] = (byte)
i;</span>
+<span class="fc bfc" id="L609" title="All 2 branches covered."> for
(int i = 0; i < 256; i++) {</span>
+<span class="fc bfc" id="L610" title="All 2 branches covered."> if
(inUse[i]) {</span>
+<span class="fc" id="L611"> seqToUnseq[nInUseShadow++] = (byte)
i;</span>
}
}
-<span class="fc" id="L630"> this.nInUse = nInUseShadow;</span>
-<span class="fc" id="L631"> }</span>
+<span class="fc" id="L615"> this.nInUse = nInUseShadow;</span>
+<span class="fc" id="L616"> }</span>
@Override
public int read() throws IOException {
-<span class="pc bpc" id="L635" title="1 of 2 branches missed."> if
(this.bin != null) {</span>
-<span class="fc" id="L636"> final int r = read0();</span>
-<span class="fc bfc" id="L637" title="All 2 branches covered.">
count(r < 0 ? -1 : 1);</span>
-<span class="fc" id="L638"> return r;</span>
+<span class="pc bpc" id="L620" title="1 of 2 branches missed."> if
(this.bin != null) {</span>
+<span class="fc" id="L621"> final int r = read0();</span>
+<span class="fc bfc" id="L622" title="All 2 branches covered.">
count(r < 0 ? -1 : 1);</span>
+<span class="fc" id="L623"> return r;</span>
}
-<span class="nc" id="L640"> throw new IOException("Stream
closed");</span>
+<span class="nc" id="L625"> throw new IOException("Stream
closed");</span>
}
/*
@@ -647,310 +632,310 @@ public class BZip2CompressorInputStream
*/
@Override
public int read(final byte[] dest, final int offs, final int len) throws
IOException {
-<span class="pc bpc" id="L650" title="1 of 2 branches missed."> if
(offs < 0) {</span>
-<span class="nc" id="L651"> throw new
IndexOutOfBoundsException("offs(" + offs + ") <
0.");</span>
+<span class="pc bpc" id="L635" title="1 of 2 branches missed."> if
(offs < 0) {</span>
+<span class="nc" id="L636"> throw new
IndexOutOfBoundsException("offs(" + offs + ") <
0.");</span>
}
-<span class="pc bpc" id="L653" title="1 of 2 branches missed."> if (len
< 0) {</span>
-<span class="nc" id="L654"> throw new
IndexOutOfBoundsException("len(" + len + ") <
0.");</span>
+<span class="pc bpc" id="L638" title="1 of 2 branches missed."> if (len
< 0) {</span>
+<span class="nc" id="L639"> throw new
IndexOutOfBoundsException("len(" + len + ") <
0.");</span>
}
-<span class="pc bpc" id="L656" title="1 of 2 branches missed."> if
(offs + len > dest.length) {</span>
-<span class="nc" id="L657"> throw new
IndexOutOfBoundsException("offs(" + offs + ") + len(" + len
+ ") > dest.length(" + dest.length + ").");</span>
+<span class="pc bpc" id="L641" title="1 of 2 branches missed."> if
(offs + len > dest.length) {</span>
+<span class="nc" id="L642"> throw new
IndexOutOfBoundsException("offs(" + offs + ") + len(" + len
+ ") > dest.length(" + dest.length + ").");</span>
}
-<span class="pc bpc" id="L659" title="1 of 2 branches missed."> if
(this.bin == null) {</span>
-<span class="nc" id="L660"> throw new IOException("Stream
closed");</span>
+<span class="pc bpc" id="L644" title="1 of 2 branches missed."> if
(this.bin == null) {</span>
+<span class="nc" id="L645"> throw new IOException("Stream
closed");</span>
}
-<span class="fc bfc" id="L662" title="All 2 branches covered."> if (len
== 0) {</span>
-<span class="fc" id="L663"> return 0;</span>
+<span class="fc bfc" id="L647" title="All 2 branches covered."> if (len
== 0) {</span>
+<span class="fc" id="L648"> return 0;</span>
}
-<span class="fc" id="L666"> final int hi = offs + len;</span>
-<span class="fc" id="L667"> int destOffs = offs;</span>
+<span class="fc" id="L651"> final int hi = offs + len;</span>
+<span class="fc" id="L652"> int destOffs = offs;</span>
int b;
-<span class="fc bfc" id="L669" title="All 4 branches covered."> while
(destOffs < hi && (b = read0()) >= 0) {</span>
-<span class="fc" id="L670"> dest[destOffs++] = (byte) b;</span>
-<span class="fc" id="L671"> count(1);</span>
+<span class="fc bfc" id="L654" title="All 4 branches covered."> while
(destOffs < hi && (b = read0()) >= 0) {</span>
+<span class="fc" id="L655"> dest[destOffs++] = (byte) b;</span>
+<span class="fc" id="L656"> count(1);</span>
}
-<span class="fc bfc" id="L674" title="All 2 branches covered."> return
destOffs == offs ? -1 : destOffs - offs;</span>
+<span class="fc bfc" id="L659" title="All 2 branches covered."> return
destOffs == offs ? -1 : destOffs - offs;</span>
}
private int read0() throws IOException {
-<span class="pc bpc" id="L678" title="5 of 9 branches missed."> switch
(currentState) {</span>
+<span class="pc bpc" id="L663" title="5 of 9 branches missed."> switch
(currentState) {</span>
case EOF:
-<span class="fc" id="L680"> return -1;</span>
+<span class="fc" id="L665"> return -1;</span>
case START_BLOCK_STATE:
-<span class="fc" id="L683"> return setupBlock();</span>
+<span class="fc" id="L668"> return setupBlock();</span>
case RAND_PART_A_STATE:
-<span class="nc" id="L686"> throw new
IllegalStateException();</span>
+<span class="nc" id="L671"> throw new
IllegalStateException();</span>
case RAND_PART_B_STATE:
-<span class="nc" id="L689"> return setupRandPartB();</span>
+<span class="nc" id="L674"> return setupRandPartB();</span>
case RAND_PART_C_STATE:
-<span class="nc" id="L692"> return setupRandPartC();</span>
+<span class="nc" id="L677"> return setupRandPartC();</span>
case NO_RAND_PART_A_STATE:
-<span class="nc" id="L695"> throw new
IllegalStateException();</span>
+<span class="nc" id="L680"> throw new
IllegalStateException();</span>
case NO_RAND_PART_B_STATE:
-<span class="fc" id="L698"> return setupNoRandPartB();</span>
+<span class="fc" id="L683"> return setupNoRandPartB();</span>
case NO_RAND_PART_C_STATE:
-<span class="fc" id="L701"> return setupNoRandPartC();</span>
+<span class="fc" id="L686"> return setupNoRandPartC();</span>
default:
-<span class="nc" id="L704"> throw new
IllegalStateException();</span>
+<span class="nc" id="L689"> throw new
IllegalStateException();</span>
}
}
private int readNextByte(final BitInputStream in) throws IOException {
-<span class="fc" id="L709"> final long b = in.readBits(8);</span>
-<span class="fc" id="L710"> return (int) b;</span>
+<span class="fc" id="L694"> final long b = in.readBits(8);</span>
+<span class="fc" id="L695"> return (int) b;</span>
}
private void recvDecodingTables() throws IOException {
-<span class="fc" id="L714"> final BitInputStream bin = this.bin;</span>
-<span class="fc" id="L715"> final Data dataShadow = this.data;</span>
-<span class="fc" id="L716"> final boolean[] inUse =
dataShadow.inUse;</span>
-<span class="fc" id="L717"> final byte[] pos =
dataShadow.recvDecodingTables_pos;</span>
-<span class="fc" id="L718"> final byte[] selector =
dataShadow.selector;</span>
-<span class="fc" id="L719"> final byte[] selectorMtf =
dataShadow.selectorMtf;</span>
+<span class="fc" id="L699"> final BitInputStream bin = this.bin;</span>
+<span class="fc" id="L700"> final Data dataShadow = this.data;</span>
+<span class="fc" id="L701"> final boolean[] inUse =
dataShadow.inUse;</span>
+<span class="fc" id="L702"> final byte[] pos =
dataShadow.recvDecodingTables_pos;</span>
+<span class="fc" id="L703"> final byte[] selector =
dataShadow.selector;</span>
+<span class="fc" id="L704"> final byte[] selectorMtf =
dataShadow.selectorMtf;</span>
-<span class="fc" id="L721"> int inUse16 = 0;</span>
+<span class="fc" id="L706"> int inUse16 = 0;</span>
/* Receive the mapping table */
-<span class="fc bfc" id="L724" title="All 2 branches covered."> for
(int i = 0; i < 16; i++) {</span>
-<span class="fc bfc" id="L725" title="All 2 branches covered."> if
(bsGetBit(bin)) {</span>
-<span class="fc" id="L726"> inUse16 |= 1 << i;</span>
+<span class="fc bfc" id="L709" title="All 2 branches covered."> for
(int i = 0; i < 16; i++) {</span>
+<span class="fc bfc" id="L710" title="All 2 branches covered."> if
(bsGetBit(bin)) {</span>
+<span class="fc" id="L711"> inUse16 |= 1 << i;</span>
}
}
-<span class="fc" id="L730"> Arrays.fill(inUse, false);</span>
-<span class="fc bfc" id="L731" title="All 2 branches covered."> for
(int i = 0; i < 16; i++) {</span>
-<span class="fc bfc" id="L732" title="All 2 branches covered."> if
((inUse16 & 1 << i) != 0) {</span>
-<span class="fc" id="L733"> final int i16 = i << 4;</span>
-<span class="fc bfc" id="L734" title="All 2 branches covered.">
for (int j = 0; j < 16; j++) {</span>
-<span class="fc bfc" id="L735" title="All 2 branches covered.">
if (bsGetBit(bin)) {</span>
-<span class="fc" id="L736"> inUse[i16 + j] =
true;</span>
+<span class="fc" id="L715"> Arrays.fill(inUse, false);</span>
+<span class="fc bfc" id="L716" title="All 2 branches covered."> for
(int i = 0; i < 16; i++) {</span>
+<span class="fc bfc" id="L717" title="All 2 branches covered."> if
((inUse16 & 1 << i) != 0) {</span>
+<span class="fc" id="L718"> final int i16 = i << 4;</span>
+<span class="fc bfc" id="L719" title="All 2 branches covered.">
for (int j = 0; j < 16; j++) {</span>
+<span class="fc bfc" id="L720" title="All 2 branches covered.">
if (bsGetBit(bin)) {</span>
+<span class="fc" id="L721"> inUse[i16 + j] =
true;</span>
}
}
}
}
-<span class="fc" id="L742"> makeMaps();</span>
-<span class="fc" id="L743"> final int alphaSize = this.nInUse +
2;</span>
+<span class="fc" id="L727"> makeMaps();</span>
+<span class="fc" id="L728"> final int alphaSize = this.nInUse +
2;</span>
/* Now the selectors */
-<span class="fc" id="L745"> final int nGroups = bsR(bin, 3);</span>
-<span class="fc" id="L746"> final int selectors = bsR(bin, 15);</span>
-<span class="pc bpc" id="L747" title="1 of 2 branches missed."> if
(selectors < 0) {</span>
-<span class="nc" id="L748"> throw new IOException("Corrupted
input, nSelectors value negative");</span>
+<span class="fc" id="L730"> final int nGroups = bsR(bin, 3);</span>
+<span class="fc" id="L731"> final int selectors = bsR(bin, 15);</span>
+<span class="pc bpc" id="L732" title="1 of 2 branches missed."> if
(selectors < 0) {</span>
+<span class="nc" id="L733"> throw new IOException("Corrupted
input, nSelectors value negative");</span>
}
-<span class="fc" id="L750"> checkBounds(alphaSize, MAX_ALPHA_SIZE + 1,
"alphaSize");</span>
-<span class="fc" id="L751"> checkBounds(nGroups, N_GROUPS + 1,
"nGroups");</span>
+<span class="fc" id="L735"> checkBounds(alphaSize, MAX_ALPHA_SIZE + 1,
"alphaSize");</span>
+<span class="fc" id="L736"> checkBounds(nGroups, N_GROUPS + 1,
"nGroups");</span>
// Don't fail on nSelectors overflowing boundaries but discard the
values in overflow
// See
https://gnu.wildebeest.org/blog/mjw/2019/08/02/bzip2-and-the-cve-that-wasnt/
// and https://sourceware.org/ml/bzip2-devel/2019-q3/msg00007.html
-<span class="fc bfc" id="L757" title="All 2 branches covered."> for
(int i = 0; i < selectors; i++) {</span>
-<span class="fc" id="L758"> int j = 0;</span>
-<span class="fc bfc" id="L759" title="All 2 branches covered.">
while (bsGetBit(bin)) {</span>
-<span class="fc" id="L760"> j++;</span>
+<span class="fc bfc" id="L742" title="All 2 branches covered."> for
(int i = 0; i < selectors; i++) {</span>
+<span class="fc" id="L743"> int j = 0;</span>
+<span class="fc bfc" id="L744" title="All 2 branches covered.">
while (bsGetBit(bin)) {</span>
+<span class="fc" id="L745"> j++;</span>
}
-<span class="fc bfc" id="L762" title="All 2 branches covered."> if
(i < MAX_SELECTORS) {</span>
-<span class="fc" id="L763"> selectorMtf[i] = (byte) j;</span>
+<span class="fc bfc" id="L747" title="All 2 branches covered."> if
(i < MAX_SELECTORS) {</span>
+<span class="fc" id="L748"> selectorMtf[i] = (byte) j;</span>
}
}
-<span class="fc" id="L766"> final int nSelectors = Math.min(selectors,
MAX_SELECTORS);</span>
+<span class="fc" id="L751"> final int nSelectors = Math.min(selectors,
MAX_SELECTORS);</span>
/* Undo the MTF values for the selectors. */
-<span class="fc bfc" id="L769" title="All 2 branches covered."> for
(int v = nGroups; --v >= 0;) {</span>
-<span class="fc" id="L770"> pos[v] = (byte) v;</span>
+<span class="fc bfc" id="L754" title="All 2 branches covered."> for
(int v = nGroups; --v >= 0;) {</span>
+<span class="fc" id="L755"> pos[v] = (byte) v;</span>
}
-<span class="fc bfc" id="L773" title="All 2 branches covered."> for
(int i = 0; i < nSelectors; i++) {</span>
-<span class="fc" id="L774"> int v = selectorMtf[i] &
0xff;</span>
-<span class="fc" id="L775"> checkBounds(v, N_GROUPS,
"selectorMtf");</span>
-<span class="fc" id="L776"> final byte tmp = pos[v];</span>
-<span class="fc bfc" id="L777" title="All 2 branches covered.">
while (v > 0) {</span>
+<span class="fc bfc" id="L758" title="All 2 branches covered."> for
(int i = 0; i < nSelectors; i++) {</span>
+<span class="fc" id="L759"> int v = selectorMtf[i] &
0xff;</span>
+<span class="fc" id="L760"> checkBounds(v, N_GROUPS,
"selectorMtf");</span>
+<span class="fc" id="L761"> final byte tmp = pos[v];</span>
+<span class="fc bfc" id="L762" title="All 2 branches covered.">
while (v > 0) {</span>
// nearly all times v is zero, 4 in most other cases
-<span class="fc" id="L779"> pos[v] = pos[v - 1];</span>
-<span class="fc" id="L780"> v--;</span>
+<span class="fc" id="L764"> pos[v] = pos[v - 1];</span>
+<span class="fc" id="L765"> v--;</span>
}
-<span class="fc" id="L782"> pos[0] = tmp;</span>
-<span class="fc" id="L783"> selector[i] = tmp;</span>
+<span class="fc" id="L767"> pos[0] = tmp;</span>
+<span class="fc" id="L768"> selector[i] = tmp;</span>
}
-<span class="fc" id="L786"> final char[][] len =
dataShadow.temp_charArray2d;</span>
+<span class="fc" id="L771"> final char[][] len =
dataShadow.temp_charArray2d;</span>
/* Now the coding tables */
-<span class="fc bfc" id="L789" title="All 2 branches covered."> for
(int t = 0; t < nGroups; t++) {</span>
-<span class="fc" id="L790"> int curr = bsR(bin, 5);</span>
-<span class="fc" id="L791"> final char[] len_t = len[t];</span>
-<span class="fc bfc" id="L792" title="All 2 branches covered."> for
(int i = 0; i < alphaSize; i++) {</span>
-<span class="fc bfc" id="L793" title="All 2 branches covered.">
while (bsGetBit(bin)) {</span>
-<span class="fc bfc" id="L794" title="All 2 branches covered.">
curr += bsGetBit(bin) ? -1 : 1;</span>
+<span class="fc bfc" id="L774" title="All 2 branches covered."> for
(int t = 0; t < nGroups; t++) {</span>
+<span class="fc" id="L775"> int curr = bsR(bin, 5);</span>
+<span class="fc" id="L776"> final char[] len_t = len[t];</span>
+<span class="fc bfc" id="L777" title="All 2 branches covered."> for
(int i = 0; i < alphaSize; i++) {</span>
+<span class="fc bfc" id="L778" title="All 2 branches covered.">
while (bsGetBit(bin)) {</span>
+<span class="fc bfc" id="L779" title="All 2 branches covered.">
curr += bsGetBit(bin) ? -1 : 1;</span>
}
-<span class="fc" id="L796"> len_t[i] = (char) curr;</span>
+<span class="fc" id="L781"> len_t[i] = (char) curr;</span>
}
}
// finally create the Huffman tables
-<span class="fc" id="L801"> createHuffmanDecodingTables(alphaSize,
nGroups);</span>
-<span class="fc" id="L802"> }</span>
+<span class="fc" id="L786"> createHuffmanDecodingTables(alphaSize,
nGroups);</span>
+<span class="fc" id="L787"> }</span>
private int setupBlock() throws IOException {
-<span class="pc bpc" id="L805" title="1 of 4 branches missed."> if
(currentState == EOF || this.data == null) {</span>
-<span class="fc" id="L806"> return -1;</span>
+<span class="pc bpc" id="L790" title="1 of 4 branches missed."> if
(currentState == EOF || this.data == null) {</span>
+<span class="fc" id="L791"> return -1;</span>
}
-<span class="fc" id="L809"> final int[] cftab = this.data.cftab;</span>
-<span class="fc" id="L810"> final int ttLen = this.last + 1;</span>
-<span class="fc" id="L811"> final int[] tt =
this.data.initTT(ttLen);</span>
-<span class="fc" id="L812"> final byte[] ll8 = this.data.ll8;</span>
-<span class="fc" id="L813"> cftab[0] = 0;</span>
-<span class="fc" id="L814"> System.arraycopy(this.data.unzftab, 0,
cftab, 1, 256);</span>
+<span class="fc" id="L794"> final int[] cftab = this.data.cftab;</span>
+<span class="fc" id="L795"> final int ttLen = this.last + 1;</span>
+<span class="fc" id="L796"> final int[] tt =
this.data.initTT(ttLen);</span>
+<span class="fc" id="L797"> final byte[] ll8 = this.data.ll8;</span>
+<span class="fc" id="L798"> cftab[0] = 0;</span>
+<span class="fc" id="L799"> System.arraycopy(this.data.unzftab, 0,
cftab, 1, 256);</span>
-<span class="fc bfc" id="L816" title="All 2 branches covered."> for
(int i = 1, c = cftab[0]; i <= 256; i++) {</span>
-<span class="fc" id="L817"> c += cftab[i];</span>
-<span class="fc" id="L818"> cftab[i] = c;</span>
+<span class="fc bfc" id="L801" title="All 2 branches covered."> for
(int i = 1, c = cftab[0]; i <= 256; i++) {</span>
+<span class="fc" id="L802"> c += cftab[i];</span>
+<span class="fc" id="L803"> cftab[i] = c;</span>
}
-<span class="fc bfc" id="L821" title="All 2 branches covered."> for
(int i = 0, lastShadow = this.last; i <= lastShadow; i++) {</span>
-<span class="fc" id="L822"> final int tmp = cftab[ll8[i] &
0xff]++;</span>
-<span class="fc" id="L823"> checkBounds(tmp, ttLen, "tt
index");</span>
-<span class="fc" id="L824"> tt[tmp] = i;</span>
+<span class="fc bfc" id="L806" title="All 2 branches covered."> for
(int i = 0, lastShadow = this.last; i <= lastShadow; i++) {</span>
+<span class="fc" id="L807"> final int tmp = cftab[ll8[i] &
0xff]++;</span>
+<span class="fc" id="L808"> checkBounds(tmp, ttLen, "tt
index");</span>
+<span class="fc" id="L809"> tt[tmp] = i;</span>
}
-<span class="pc bpc" id="L827" title="2 of 4 branches missed."> if
(this.origPtr < 0 || this.origPtr >= tt.length) {</span>
-<span class="nc" id="L828"> throw new IOException("Stream
corrupted");</span>
+<span class="pc bpc" id="L812" title="2 of 4 branches missed."> if
(this.origPtr < 0 || this.origPtr >= tt.length) {</span>
+<span class="nc" id="L813"> throw new IOException("Stream
corrupted");</span>
}
-<span class="fc" id="L831"> this.su_tPos = tt[this.origPtr];</span>
-<span class="fc" id="L832"> this.su_count = 0;</span>
-<span class="fc" id="L833"> this.su_i2 = 0;</span>
-<span class="fc" id="L834"> this.su_ch2 = 256; /* not a char and not
EOF */</span>
+<span class="fc" id="L816"> this.su_tPos = tt[this.origPtr];</span>
+<span class="fc" id="L817"> this.su_count = 0;</span>
+<span class="fc" id="L818"> this.su_i2 = 0;</span>
+<span class="fc" id="L819"> this.su_ch2 = 256; /* not a char and not
EOF */</span>
-<span class="pc bpc" id="L836" title="1 of 2 branches missed."> if
(this.blockRandomised) {</span>
-<span class="nc" id="L837"> this.su_rNToGo = 0;</span>
-<span class="nc" id="L838"> this.su_rTPos = 0;</span>
-<span class="nc" id="L839"> return setupRandPartA();</span>
+<span class="pc bpc" id="L821" title="1 of 2 branches missed."> if
(this.blockRandomised) {</span>
+<span class="nc" id="L822"> this.su_rNToGo = 0;</span>
+<span class="nc" id="L823"> this.su_rTPos = 0;</span>
+<span class="nc" id="L824"> return setupRandPartA();</span>
}
-<span class="fc" id="L841"> return setupNoRandPartA();</span>
+<span class="fc" id="L826"> return setupNoRandPartA();</span>
}
private int setupNoRandPartA() throws IOException {
-<span class="fc bfc" id="L845" title="All 2 branches covered."> if
(this.su_i2 <= this.last) {</span>
-<span class="fc" id="L846"> this.su_chPrev = this.su_ch2;</span>
-<span class="fc" id="L847"> final int su_ch2Shadow =
this.data.ll8[this.su_tPos] & 0xff;</span>
-<span class="fc" id="L848"> this.su_ch2 = su_ch2Shadow;</span>
-<span class="fc" id="L849"> checkBounds(this.su_tPos,
this.data.tt.length, "su_tPos");</span>
-<span class="fc" id="L850"> this.su_tPos =
this.data.tt[this.su_tPos];</span>
-<span class="fc" id="L851"> this.su_i2++;</span>
-<span class="fc" id="L852"> this.currentState =
NO_RAND_PART_B_STATE;</span>
-<span class="fc" id="L853"> this.crc.update(su_ch2Shadow);</span>
-<span class="fc" id="L854"> return su_ch2Shadow;</span>
- }
-<span class="fc" id="L856"> this.currentState =
NO_RAND_PART_A_STATE;</span>
-<span class="fc" id="L857"> endBlock();</span>
-<span class="fc" id="L858"> initBlock();</span>
-<span class="fc" id="L859"> return setupBlock();</span>
+<span class="fc bfc" id="L830" title="All 2 branches covered."> if
(this.su_i2 <= this.last) {</span>
+<span class="fc" id="L831"> this.su_chPrev = this.su_ch2;</span>
+<span class="fc" id="L832"> final int su_ch2Shadow =
this.data.ll8[this.su_tPos] & 0xff;</span>
+<span class="fc" id="L833"> this.su_ch2 = su_ch2Shadow;</span>
+<span class="fc" id="L834"> checkBounds(this.su_tPos,
this.data.tt.length, "su_tPos");</span>
+<span class="fc" id="L835"> this.su_tPos =
this.data.tt[this.su_tPos];</span>
+<span class="fc" id="L836"> this.su_i2++;</span>
+<span class="fc" id="L837"> this.currentState =
NO_RAND_PART_B_STATE;</span>
+<span class="fc" id="L838"> this.crc.update(su_ch2Shadow);</span>
+<span class="fc" id="L839"> return su_ch2Shadow;</span>
+ }
+<span class="fc" id="L841"> this.currentState =
NO_RAND_PART_A_STATE;</span>
+<span class="fc" id="L842"> endBlock();</span>
+<span class="fc" id="L843"> initBlock();</span>
+<span class="fc" id="L844"> return setupBlock();</span>
}
private int setupNoRandPartB() throws IOException {
-<span class="fc bfc" id="L863" title="All 2 branches covered."> if
(this.su_ch2 != this.su_chPrev) {</span>
-<span class="fc" id="L864"> this.su_count = 1;</span>
-<span class="fc" id="L865"> return setupNoRandPartA();</span>
- }
-<span class="fc bfc" id="L867" title="All 2 branches covered."> if
(++this.su_count >= 4) {</span>
-<span class="fc" id="L868"> checkBounds(this.su_tPos,
this.data.ll8.length, "su_tPos");</span>
-<span class="fc" id="L869"> this.su_z = (char)
(this.data.ll8[this.su_tPos] & 0xff);</span>
-<span class="fc" id="L870"> this.su_tPos =
this.data.tt[this.su_tPos];</span>
-<span class="fc" id="L871"> this.su_j2 = 0;</span>
-<span class="fc" id="L872"> return setupNoRandPartC();</span>
+<span class="fc bfc" id="L848" title="All 2 branches covered."> if
(this.su_ch2 != this.su_chPrev) {</span>
+<span class="fc" id="L849"> this.su_count = 1;</span>
+<span class="fc" id="L850"> return setupNoRandPartA();</span>
+ }
+<span class="fc bfc" id="L852" title="All 2 branches covered."> if
(++this.su_count >= 4) {</span>
+<span class="fc" id="L853"> checkBounds(this.su_tPos,
this.data.ll8.length, "su_tPos");</span>
+<span class="fc" id="L854"> this.su_z = (char)
(this.data.ll8[this.su_tPos] & 0xff);</span>
+<span class="fc" id="L855"> this.su_tPos =
this.data.tt[this.su_tPos];</span>
+<span class="fc" id="L856"> this.su_j2 = 0;</span>
+<span class="fc" id="L857"> return setupNoRandPartC();</span>
}
-<span class="fc" id="L874"> return setupNoRandPartA();</span>
+<span class="fc" id="L859"> return setupNoRandPartA();</span>
}
private int setupNoRandPartC() throws IOException {
-<span class="fc bfc" id="L878" title="All 2 branches covered."> if
(this.su_j2 < this.su_z) {</span>
-<span class="fc" id="L879"> final int su_ch2Shadow =
this.su_ch2;</span>
-<span class="fc" id="L880"> this.crc.update(su_ch2Shadow);</span>
-<span class="fc" id="L881"> this.su_j2++;</span>
-<span class="fc" id="L882"> this.currentState =
NO_RAND_PART_C_STATE;</span>
-<span class="fc" id="L883"> return su_ch2Shadow;</span>
- }
-<span class="fc" id="L885"> this.su_i2++;</span>
-<span class="fc" id="L886"> this.su_count = 0;</span>
-<span class="fc" id="L887"> return setupNoRandPartA();</span>
+<span class="fc bfc" id="L863" title="All 2 branches covered."> if
(this.su_j2 < this.su_z) {</span>
+<span class="fc" id="L864"> final int su_ch2Shadow =
this.su_ch2;</span>
+<span class="fc" id="L865"> this.crc.update(su_ch2Shadow);</span>
+<span class="fc" id="L866"> this.su_j2++;</span>
+<span class="fc" id="L867"> this.currentState =
NO_RAND_PART_C_STATE;</span>
+<span class="fc" id="L868"> return su_ch2Shadow;</span>
+ }
+<span class="fc" id="L870"> this.su_i2++;</span>
+<span class="fc" id="L871"> this.su_count = 0;</span>
+<span class="fc" id="L872"> return setupNoRandPartA();</span>
}
private int setupRandPartA() throws IOException {
-<span class="nc bnc" id="L891" title="All 2 branches missed."> if
(this.su_i2 <= this.last) {</span>
-<span class="nc" id="L892"> this.su_chPrev = this.su_ch2;</span>
-<span class="nc" id="L893"> int su_ch2Shadow =
this.data.ll8[this.su_tPos] & 0xff;</span>
-<span class="nc" id="L894"> checkBounds(this.su_tPos,
this.data.tt.length, "su_tPos");</span>
-<span class="nc" id="L895"> this.su_tPos =
this.data.tt[this.su_tPos];</span>
-<span class="nc bnc" id="L896" title="All 2 branches missed."> if
(this.su_rNToGo == 0) {</span>
-<span class="nc" id="L897"> this.su_rNToGo =
Rand.rNums(this.su_rTPos) - 1;</span>
-<span class="nc bnc" id="L898" title="All 2 branches missed.">
if (++this.su_rTPos == 512) {</span>
-<span class="nc" id="L899"> this.su_rTPos = 0;</span>
+<span class="nc bnc" id="L876" title="All 2 branches missed."> if
(this.su_i2 <= this.last) {</span>
+<span class="nc" id="L877"> this.su_chPrev = this.su_ch2;</span>
+<span class="nc" id="L878"> int su_ch2Shadow =
this.data.ll8[this.su_tPos] & 0xff;</span>
+<span class="nc" id="L879"> checkBounds(this.su_tPos,
this.data.tt.length, "su_tPos");</span>
+<span class="nc" id="L880"> this.su_tPos =
this.data.tt[this.su_tPos];</span>
+<span class="nc bnc" id="L881" title="All 2 branches missed."> if
(this.su_rNToGo == 0) {</span>
+<span class="nc" id="L882"> this.su_rNToGo =
Rand.rNums(this.su_rTPos) - 1;</span>
+<span class="nc bnc" id="L883" title="All 2 branches missed.">
if (++this.su_rTPos == 512) {</span>
+<span class="nc" id="L884"> this.su_rTPos = 0;</span>
}
} else {
-<span class="nc" id="L902"> this.su_rNToGo--;</span>
+<span class="nc" id="L887"> this.su_rNToGo--;</span>
}
-<span class="nc bnc" id="L904" title="All 2 branches missed.">
this.su_ch2 = su_ch2Shadow ^= this.su_rNToGo == 1 ? 1 : 0;</span>
-<span class="nc" id="L905"> this.su_i2++;</span>
-<span class="nc" id="L906"> this.currentState =
RAND_PART_B_STATE;</span>
-<span class="nc" id="L907"> this.crc.update(su_ch2Shadow);</span>
-<span class="nc" id="L908"> return su_ch2Shadow;</span>
- }
-<span class="nc" id="L910"> endBlock();</span>
-<span class="nc" id="L911"> initBlock();</span>
-<span class="nc" id="L912"> return setupBlock();</span>
+<span class="nc bnc" id="L889" title="All 2 branches missed.">
this.su_ch2 = su_ch2Shadow ^= this.su_rNToGo == 1 ? 1 : 0;</span>
+<span class="nc" id="L890"> this.su_i2++;</span>
+<span class="nc" id="L891"> this.currentState =
RAND_PART_B_STATE;</span>
+<span class="nc" id="L892"> this.crc.update(su_ch2Shadow);</span>
+<span class="nc" id="L893"> return su_ch2Shadow;</span>
+ }
+<span class="nc" id="L895"> endBlock();</span>
+<span class="nc" id="L896"> initBlock();</span>
+<span class="nc" id="L897"> return setupBlock();</span>
}
private int setupRandPartB() throws IOException {
-<span class="nc bnc" id="L916" title="All 2 branches missed."> if
(this.su_ch2 != this.su_chPrev) {</span>
-<span class="nc" id="L917"> this.currentState =
RAND_PART_A_STATE;</span>
-<span class="nc" id="L918"> this.su_count = 1;</span>
-<span class="nc" id="L919"> return setupRandPartA();</span>
- }
-<span class="nc bnc" id="L921" title="All 2 branches missed."> if
(++this.su_count < 4) {</span>
-<span class="nc" id="L922"> this.currentState =
RAND_PART_A_STATE;</span>
-<span class="nc" id="L923"> return setupRandPartA();</span>
- }
-<span class="nc" id="L925"> this.su_z = (char)
(this.data.ll8[this.su_tPos] & 0xff);</span>
-<span class="nc" id="L926"> checkBounds(this.su_tPos,
this.data.tt.length, "su_tPos");</span>
-<span class="nc" id="L927"> this.su_tPos =
this.data.tt[this.su_tPos];</span>
-<span class="nc bnc" id="L928" title="All 2 branches missed."> if
(this.su_rNToGo == 0) {</span>
-<span class="nc" id="L929"> this.su_rNToGo =
Rand.rNums(this.su_rTPos) - 1;</span>
-<span class="nc bnc" id="L930" title="All 2 branches missed."> if
(++this.su_rTPos == 512) {</span>
-<span class="nc" id="L931"> this.su_rTPos = 0;</span>
+<span class="nc bnc" id="L901" title="All 2 branches missed."> if
(this.su_ch2 != this.su_chPrev) {</span>
+<span class="nc" id="L902"> this.currentState =
RAND_PART_A_STATE;</span>
+<span class="nc" id="L903"> this.su_count = 1;</span>
+<span class="nc" id="L904"> return setupRandPartA();</span>
+ }
+<span class="nc bnc" id="L906" title="All 2 branches missed."> if
(++this.su_count < 4) {</span>
+<span class="nc" id="L907"> this.currentState =
RAND_PART_A_STATE;</span>
+<span class="nc" id="L908"> return setupRandPartA();</span>
+ }
+<span class="nc" id="L910"> this.su_z = (char)
(this.data.ll8[this.su_tPos] & 0xff);</span>
+<span class="nc" id="L911"> checkBounds(this.su_tPos,
this.data.tt.length, "su_tPos");</span>
+<span class="nc" id="L912"> this.su_tPos =
this.data.tt[this.su_tPos];</span>
+<span class="nc bnc" id="L913" title="All 2 branches missed."> if
(this.su_rNToGo == 0) {</span>
+<span class="nc" id="L914"> this.su_rNToGo =
Rand.rNums(this.su_rTPos) - 1;</span>
+<span class="nc bnc" id="L915" title="All 2 branches missed."> if
(++this.su_rTPos == 512) {</span>
+<span class="nc" id="L916"> this.su_rTPos = 0;</span>
}
} else {
-<span class="nc" id="L934"> this.su_rNToGo--;</span>
+<span class="nc" id="L919"> this.su_rNToGo--;</span>
}
-<span class="nc" id="L936"> this.su_j2 = 0;</span>
-<span class="nc" id="L937"> this.currentState =
RAND_PART_C_STATE;</span>
-<span class="nc bnc" id="L938" title="All 2 branches missed."> if
(this.su_rNToGo == 1) {</span>
-<span class="nc" id="L939"> this.su_z ^= 1;</span>
+<span class="nc" id="L921"> this.su_j2 = 0;</span>
+<span class="nc" id="L922"> this.currentState =
RAND_PART_C_STATE;</span>
+<span class="nc bnc" id="L923" title="All 2 branches missed."> if
(this.su_rNToGo == 1) {</span>
+<span class="nc" id="L924"> this.su_z ^= 1;</span>
}
-<span class="nc" id="L941"> return setupRandPartC();</span>
+<span class="nc" id="L926"> return setupRandPartC();</span>
}
private int setupRandPartC() throws IOException {
-<span class="nc bnc" id="L945" title="All 2 branches missed."> if
(this.su_j2 < this.su_z) {</span>
-<span class="nc" id="L946"> this.crc.update(this.su_ch2);</span>
-<span class="nc" id="L947"> this.su_j2++;</span>
-<span class="nc" id="L948"> return this.su_ch2;</span>
- }
-<span class="nc" id="L950"> this.currentState =
RAND_PART_A_STATE;</span>
-<span class="nc" id="L951"> this.su_i2++;</span>
-<span class="nc" id="L952"> this.su_count = 0;</span>
-<span class="nc" id="L953"> return setupRandPartA();</span>
+<span class="nc bnc" id="L930" title="All 2 branches missed."> if
(this.su_j2 < this.su_z) {</span>
+<span class="nc" id="L931"> this.crc.update(this.su_ch2);</span>
+<span class="nc" id="L932"> this.su_j2++;</span>
+<span class="nc" id="L933"> return this.su_ch2;</span>
+ }
+<span class="nc" id="L935"> this.currentState =
RAND_PART_A_STATE;</span>
+<span class="nc" id="L936"> this.su_i2++;</span>
+<span class="nc" id="L937"> this.su_count = 0;</span>
+<span class="nc" id="L938"> return setupRandPartA();</span>
}
}
</pre><div class="footer"><span class="right">Created with <a
href="http://www.jacoco.org/jacoco">JaCoCo</a>
0.8.12.202403310830</span></div></body></html>
\ No newline at end of file