Proposal 0: forwardlen   (12.938)

forward

tmp/src-xz/org/tukaani/xz/lz/LZEncoder.java
     ...

  323:     */
  324:    public int getByte(int forward, int backward) {
  325:        return buf[readPos + forward - backward] & 0xFF;
  326:    }
     ...

niceLen   ([-1, '', ':call:len'])

tmp/src-xz/org/tukaani/xz/lz/BT4.java
     ...

   29:    BT4(int dictSize, int beforeSizeMin, int readAheadMax,
   30:            int niceLen, int matchLenMax, int depthLimit,
   31:            ArrayCache arrayCache) {
   32:        super(dictSize, beforeSizeMin, readAheadMax, niceLen, matchLenMax,
   33:              arrayCache);
     ...

   43:        // space for one-byte matches.
   44:        matches = new Matches(niceLen - 1);
   45:
   46:        this.depthLimit = depthLimit > 0 ? depthLimit : 16 + niceLen / 2;
   47:    }
     ...

tmp/src-xz/org/tukaani/xz/lz/LZEncoder.java
     ...

  121:            int dictSize, int extraSizeBefore, int extraSizeAfter,
  122:            int niceLen, int matchLenMax, int mf, int depthLimit,
  123:            ArrayCache arrayCache) {
     ...

  130:                return new BT4(dictSize, extraSizeBefore, extraSizeAfter,
  131:                               niceLen, matchLenMax, depthLimit, arrayCache);
  132:        }
     ...

tmp/src-xz/org/tukaani/xz/LZMAOutputStream.java
     ...

   67:                options.getMode(),
   68:                dictSize, 0, options.getNiceLen(),
   69:                options.getMatchFinder(), options.getDepthLimit(),
     ...

tmp/src-xz/org/tukaani/xz/lzma/LZMAEncoder.java
     ...

   94:                int dictSize, int extraSizeBefore,
   95:                int niceLen, int mf, int depthLimit,
   96:                ArrayCache arrayCache) {
     ...

  100:                                           dictSize, extraSizeBefore,
  101:                                           niceLen, mf, depthLimit,
  102:                                           arrayCache);
     ...

tmp/src-xz/org/tukaani/xz/lzma/LZMAEncoderFast.java
     ...

   31:                           int dictSize, int extraSizeBefore,
   32:                           int niceLen, int mf, int depthLimit,
   33:                           ArrayCache arrayCache) {
     ...

   37:                                        EXTRA_SIZE_AFTER,
   38:                                        niceLen, MATCH_LEN_MAX,
   39:                                        mf, depthLimit, arrayCache),
     ...

[+] Match

len   ([-1, '', ':ref_var:len'])

tmp/src-xz/org/tukaani/xz/BlockInputStream.java
     ...

  206:
  207:    public int read(byte[] buf, int off, int len) throws IOException {
  208:        if (endReached)
     ...

  210:
  211:        int ret = filterChain.read(buf, off, len);
  212:
     ...

  234:            //     let it read end of payload marker(s).
  235:            if (ret < len || uncompressedSize == uncompressedSizeInHeader) {
  236:                if (filterChain.read() != -1)
     ...

tmp/src-xz/org/tukaani/xz/SeekableXZInputStream.java
     ...

  825:
  826:                int ret = blockDecoder.read(buf, off, len);
  827:
     ...

[+] Match

len   ([-2, ':call:len', '#this:ref_field:lz'])

tmp/src-xz/org/tukaani/xz/lzma/LZMAEncoder.java
     ...

  712:
  713:        int getPrice(int len, int posState) {
  714:            return prices[posState][len - MATCH_LEN_MIN];
  715:        }
     ...

tmp/src-xz/org/tukaani/xz/lzma/LZMAEncoderNormal.java
     ...

  534:            int len2Limit = Math.min(niceLen, avail - len - 1);
  535:            int len2 = lz.getMatchLen(len + 1, dist, len2Limit);
  536:
     ...

[+] Match

Proposal 1: inbuf   (5.189)

in

tmp/src-xz/org/tukaani/xz/delta/DeltaEncoder.java
     ...

   16:
   17:    public void encode(byte[] in, int in_off, int len, byte[] out) {
   18:        for (int i = 0; i < len; ++i) {
   19:            byte tmp = history[(distance + pos) & DISTANCE_MASK];
   20:            history[pos-- & DISTANCE_MASK] = in[in_off + i];
   21:            out[i] = (byte)(in[in_off + i] - tmp);
   22:        }
     ...

buf   ([-1, '', ':ref_field:temp'])

tmp/src-xz/org/tukaani/xz/BlockInputStream.java
     ...

  206:
  207:    public int read(byte[] buf, int off, int len) throws IOException {
  208:        if (endReached)
     ...

  210:
  211:        int ret = filterChain.read(buf, off, len);
  212:
     ...

  214:            if (verifyCheck)
  215:                check.update(buf, off, ret);
  216:
     ...

tmp/src-xz/org/tukaani/xz/SeekableXZInputStream.java
     ...

  762:    public int read() throws IOException {
  763:        return read(tempBuf, 0, 1) == -1 ? -1 : (tempBuf[0] & 0xFF);
  764:    }
     ...

  796:     */
  797:    public int read(byte[] buf, int off, int len) throws IOException {
  798:        if (off < 0 || len < 0 || off + len < 0 || off + len > buf.length)
     ...

  825:
  826:                int ret = blockDecoder.read(buf, off, len);
  827:
     ...

[+] Match

buf   ([-1, '', ':ref_var:buf'])

tmp/src-xz/org/tukaani/xz/BlockInputStream.java
     ...

  206:
  207:    public int read(byte[] buf, int off, int len) throws IOException {
  208:        if (endReached)
     ...

  210:
  211:        int ret = filterChain.read(buf, off, len);
  212:
     ...

  214:            if (verifyCheck)
  215:                check.update(buf, off, ret);
  216:
     ...

tmp/src-xz/XZSeekEncDemo.java
     ...

   52:        while (true) {
   53:            int size = System.in.read(buf, 0, Math.min(buf.length, left));
   54:            if (size == -1)
     ...

[+] Match

buf   ([-1, '', ':ref_field:buf'])

tmp/src-xz/org/tukaani/xz/BlockInputStream.java
     ...

  206:
  207:    public int read(byte[] buf, int off, int len) throws IOException {
  208:        if (endReached)
     ...

  210:
  211:        int ret = filterChain.read(buf, off, len);
  212:
     ...

  214:            if (verifyCheck)
  215:                check.update(buf, off, ret);
  216:
     ...

tmp/src-xz/org/tukaani/xz/SeekableXZInputStream.java
     ...

  762:    public int read() throws IOException {
  763:        return read(tempBuf, 0, 1) == -1 ? -1 : (tempBuf[0] & 0xFF);
  764:    }
     ...

  796:     */
  797:    public int read(byte[] buf, int off, int len) throws IOException {
  798:        if (off < 0 || len < 0 || off + len < 0 || off + len > buf.length)
     ...

  825:
  826:                int ret = blockDecoder.read(buf, off, len);
  827:
     ...

[+] Match

Proposal 2: inbuf   (4.519)

in

tmp/src-xz/org/tukaani/xz/lz/LZEncoder.java
     ...

  196:     */
  197:    public int fillWindow(byte[] in, int off, int len) {
  198:        assert !finishing;
     ...

  208:
  209:        System.arraycopy(in, off, buf, writePos, len);
  210:        writePos += len;
     ...

buf   ([-1, '', ':ref_field:temp'])

tmp/src-xz/org/tukaani/xz/BlockInputStream.java
     ...

  206:
  207:    public int read(byte[] buf, int off, int len) throws IOException {
  208:        if (endReached)
     ...

  210:
  211:        int ret = filterChain.read(buf, off, len);
  212:
     ...

  214:            if (verifyCheck)
  215:                check.update(buf, off, ret);
  216:
     ...

tmp/src-xz/org/tukaani/xz/SeekableXZInputStream.java
     ...

  762:    public int read() throws IOException {
  763:        return read(tempBuf, 0, 1) == -1 ? -1 : (tempBuf[0] & 0xFF);
  764:    }
     ...

  796:     */
  797:    public int read(byte[] buf, int off, int len) throws IOException {
  798:        if (off < 0 || len < 0 || off + len < 0 || off + len > buf.length)
     ...

  825:
  826:                int ret = blockDecoder.read(buf, off, len);
  827:
     ...

[+] Match

buf   ([-1, '', ':ref_var:buf'])

tmp/src-xz/org/tukaani/xz/BlockInputStream.java
     ...

  206:
  207:    public int read(byte[] buf, int off, int len) throws IOException {
  208:        if (endReached)
     ...

  210:
  211:        int ret = filterChain.read(buf, off, len);
  212:
     ...

  214:            if (verifyCheck)
  215:                check.update(buf, off, ret);
  216:
     ...

tmp/src-xz/XZSeekEncDemo.java
     ...

   52:        while (true) {
   53:            int size = System.in.read(buf, 0, Math.min(buf.length, left));
   54:            if (size == -1)
     ...

[+] Match

buf   ([-1, '', ':ref_field:buf'])

tmp/src-xz/org/tukaani/xz/BlockInputStream.java
     ...

  206:
  207:    public int read(byte[] buf, int off, int len) throws IOException {
  208:        if (endReached)
     ...

  210:
  211:        int ret = filterChain.read(buf, off, len);
  212:
     ...

  214:            if (verifyCheck)
  215:                check.update(buf, off, ret);
  216:
     ...

tmp/src-xz/org/tukaani/xz/SeekableXZInputStream.java
     ...

  762:    public int read() throws IOException {
  763:        return read(tempBuf, 0, 1) == -1 ? -1 : (tempBuf[0] & 0xFF);
  764:    }
     ...

  796:     */
  797:    public int read(byte[] buf, int off, int len) throws IOException {
  798:        if (off < 0 || len < 0 || off + len < 0 || off + len > buf.length)
     ...

  825:
  826:                int ret = blockDecoder.read(buf, off, len);
  827:
     ...

[+] Match

Proposal 3: filename   (4.477)

file

tmp/src-xz/org/tukaani/xz/SeekableFileInputStream.java
     ...

   30:     */
   31:    public SeekableFileInputStream(File file) throws FileNotFoundException {
   32:        randomAccessFile = new RandomAccessFile(file, "r");
   33:    }
     ...

name   ([1, '', '#arg0:new:file'])

tmp/src-xz/LZMADecDemo.java
     ...

   22:        byte[] buf = new byte[8192];
   23:        String name = null;
   24:
     ...

   26:            if (args.length == 0) {
   27:                name = "standard input";
   28:
     ...

   39:                for (int i = 0; i < args.length; ++i) {
   40:                    name = args[i];
   41:                    InputStream in = new FileInputStream(name);
   42:
     ...

   64:        } catch (FileNotFoundException e) {
   65:            System.err.println("LZMADecDemo: Cannot open " + name + ": "
   66:                               + e.getMessage());
     ...

   70:            System.err.println("LZMADecDemo: Unexpected end of input on "
   71:                               + name);
   72:            System.exit(1);
     ...

   75:            System.err.println("LZMADecDemo: Error decompressing from "
   76:                               + name + ": " + e.getMessage());
   77:            System.exit(1);
     ...

[+] Match

name   ([1, '', '#arg0:new:access'])

tmp/src-xz/org/tukaani/xz/SeekableFileInputStream.java
     ...

   38:     */
   39:    public SeekableFileInputStream(String name) throws FileNotFoundException {
   40:        randomAccessFile = new RandomAccessFile(name, "r");
   41:    }
     ...

[+] Match

name   ([2, '#arg0:new:file', 'R:op_assign:='])

tmp/src-xz/org/tukaani/xz/SeekableFileInputStream.java
     ...

   38:     */
   39:    public SeekableFileInputStream(String name) throws FileNotFoundException {
   40:        randomAccessFile = new RandomAccessFile(name, "r");
   41:    }
     ...

[+] Match

Proposal 4: indata / in   (3.514)

in

tmp/src-xz/org/tukaani/xz/rangecoder/RangeDecoderFromBuffer.java
     ...

   34:
   35:    public void prepareInputBuffer(DataInputStream in, int len)
   36:            throws IOException {
     ...

   39:
   40:        if (in.readUnsignedByte() != 0x00)
   41:            throw new CorruptedInputException();
   42:
   43:        code = in.readInt();
   44:        range = 0xFFFFFFFF;
     ...

   51:        pos = buf.length - len;
   52:        in.readFully(buf, pos, len);
   53:    }
     ...

inData   ([1, '', '#this:call:fully'])

tmp/src-xz/org/tukaani/xz/SeekableXZInputStream.java
     ...

  452:        this.in = in;
  453:        DataInputStream inData = new DataInputStream(in);
  454:
     ...

  458:            byte[] buf = new byte[XZ.HEADER_MAGIC.length];
  459:            inData.readFully(buf);
  460:            if (!Arrays.equals(buf, XZ.HEADER_MAGIC))
     ...

  479:            in.seek(pos - DecoderUtil.STREAM_HEADER_SIZE);
  480:            inData.readFully(buf);
  481:
     ...

  548:            // Decode the Stream Header.
  549:            inData.readFully(buf);
  550:            StreamFlags streamHeader = DecoderUtil.decodeStreamHeader(buf);
     ...

[+] Match

inData   ([1, '', '#this:call:unsigned'])

tmp/src-xz/org/tukaani/xz/LZMAInputStream.java
     ...

  295:                           ArrayCache arrayCache) throws IOException {
  296:        DataInputStream inData = new DataInputStream(in);
  297:
  298:        // Properties byte (lc, lp, and pb)
  299:        byte propsByte = inData.readByte();
  300:
     ...

  303:        for (int i = 0; i < 4; ++i)
  304:            dictSize |= inData.readUnsignedByte() << (8 * i);
  305:
     ...

  311:        for (int i = 0; i < 8; ++i)
  312:            uncompSize |= (long)inData.readUnsignedByte() << (8 * i);
  313:
     ...

[+] Match

inData   ([-2, ':ref_field:in', ':catchjoin'])

tmp/src-xz/org/tukaani/xz/lz/LZDecoder.java
     ...

  112:
  113:    public void copyUncompressed(DataInputStream inData, int len)
  114:            throws IOException {
  115:        int copySize = Math.min(bufSize - pos, len);
  116:        inData.readFully(buf, pos, copySize);
  117:        pos += copySize;
     ...

tmp/src-xz/org/tukaani/xz/BlockInputStream.java
     ...

  210:
  211:        int ret = filterChain.read(buf, off, len);
  212:
     ...

[+] Match

Proposal 5: retsize   (3.338)

ret

tmp/src-xz/org/tukaani/xz/CountingInputStream.java
     ...

   36:    public int read(byte[] b, int off, int len) throws IOException {
   37:        int ret = in.read(b, off, len);
   38:        if (ret > 0 && size >= 0)
   39:            size += ret;
   40:
   41:        return ret;
   42:    }
     ...

size   ([1, '', 'R:op_assign:+='])

tmp/src-xz/LZMAEncDemo.java
     ...

   50:        int size;
   51:        while ((size = System.in.read(buf)) != -1)
   52:            encoder.write(buf, 0, size);
   53:
     ...

tmp/src-xz/org/tukaani/xz/LZMAOutputStream.java
     ...

  235:
  236:    public void write(byte[] buf, int off, int len) throws IOException {
  237:        if (off < 0 || len < 0 || off + len < 0 || off + len > buf.length)
     ...

  250:
  251:        currentUncompressedSize += len;
  252:
     ...

[+] Match

size   ([-2, ':call:read', '#arg0:ref_var:b'])

tmp/src-xz/org/tukaani/xz/CountingInputStream.java
     ...

   29:        int ret = in.read();
   30:        if (ret != -1 && size >= 0)
   31:            ++size;
   32:
     ...

   36:    public int read(byte[] b, int off, int len) throws IOException {
   37:        int ret = in.read(b, off, len);
   38:        if (ret > 0 && size >= 0)
   39:            size += ret;
   40:
     ...

   44:    public long getSize() {
   45:        return size;
   46:    }
     ...

[+] Match

size   ([-2, ':call:read', '#arg1:ref_var:off'])

tmp/src-xz/org/tukaani/xz/CountingInputStream.java
     ...

   29:        int ret = in.read();
   30:        if (ret != -1 && size >= 0)
   31:            ++size;
   32:
     ...

   36:    public int read(byte[] b, int off, int len) throws IOException {
   37:        int ret = in.read(b, off, len);
   38:        if (ret > 0 && size >= 0)
   39:            size += ret;
   40:
     ...

   44:    public long getSize() {
   45:        return size;
   46:    }
     ...

[+] Match

Proposal 6: is / rep / longmatch   (3.213)

isRep0Long

tmp/src-xz/org/tukaani/xz/lzma/LZMADecoder.java
     ...

  102:        if (rc.decodeBit(isRep0, state.get()) == 0) {
  103:            if (rc.decodeBit(isRep0Long[state.get()], posState) == 0) {
  104:                state.updateShortRep();
     ...

tmp/src-xz/org/tukaani/xz/lzma/LZMAEncoder.java
     ...

  355:            rc.encodeBit(isRep0, state.get(), 0);
  356:            rc.encodeBit(isRep0Long[state.get()], posState, len == 1 ? 0 : 1);
  357:        } else {
     ...

  423:                     + RangeEncoder.getBitPrice(
  424:                       isRep0Long[state.get()][posState], 1);
  425:        } else {
     ...

tmp/src-xz/org/tukaani/xz/lzma/LZMACoder.java
     ...

   78:
   79:        for (int i = 0; i < isRep0Long.length; ++i)
   80:            RangeCoder.initProbs(isRep0Long[i]);
   81:
     ...

isMatch   ([1, '', 'array:ref_array:%[S'])

tmp/src-xz/org/tukaani/xz/lzma/LZMAEncoder.java
     ...

  233:        int posState = (lz.getPos() - readAhead) & posMask;
  234:        rc.encodeBit(isMatch[state.get()], posState, 1);
  235:        rc.encodeBit(isRep, state.get(), 0);
     ...

  269:        skip(1);
  270:        rc.encodeBit(isMatch[state.get()], 0, 0);
  271:        literalEncoder.encodeInit();
     ...

  293:            assert len == 1;
  294:            rc.encodeBit(isMatch[state.get()], posState, 0);
  295:            literalEncoder.encode();
     ...

  297:            // Some type of match
  298:            rc.encodeBit(isMatch[state.get()], posState, 1);
  299:            if (back < REPS) {
     ...

  397:    int getAnyMatchPrice(State state, int posState) {
  398:        return RangeEncoder.getBitPrice(isMatch[state.get()][posState], 1);
  399:    }
     ...

  568:            int price = RangeEncoder.getBitPrice(
  569:                    isMatch[state.get()][pos & posMask], 0);
  570:
     ...

tmp/src-xz/org/tukaani/xz/lzma/LZMACoder.java
     ...

   70:
   71:        for (int i = 0; i < isMatch.length; ++i)
   72:            RangeCoder.initProbs(isMatch[i]);
   73:
     ...

tmp/src-xz/org/tukaani/xz/lzma/LZMADecoder.java
     ...

   54:
   55:            if (rc.decodeBit(isMatch[state.get()], posState) == 0) {
   56:                literalDecoder.decode();
     ...

[+] Match

isMatch   ([3, '#arg0:call:bit', 'L:op_infix:=='])

tmp/src-xz/org/tukaani/xz/lzma/LZMAEncoder.java
     ...

  233:        int posState = (lz.getPos() - readAhead) & posMask;
  234:        rc.encodeBit(isMatch[state.get()], posState, 1);
  235:        rc.encodeBit(isRep, state.get(), 0);
     ...

  269:        skip(1);
  270:        rc.encodeBit(isMatch[state.get()], 0, 0);
  271:        literalEncoder.encodeInit();
     ...

  293:            assert len == 1;
  294:            rc.encodeBit(isMatch[state.get()], posState, 0);
  295:            literalEncoder.encode();
     ...

  297:            // Some type of match
  298:            rc.encodeBit(isMatch[state.get()], posState, 1);
  299:            if (back < REPS) {
     ...

  397:    int getAnyMatchPrice(State state, int posState) {
  398:        return RangeEncoder.getBitPrice(isMatch[state.get()][posState], 1);
  399:    }
     ...

  568:            int price = RangeEncoder.getBitPrice(
  569:                    isMatch[state.get()][pos & posMask], 0);
  570:
     ...

tmp/src-xz/org/tukaani/xz/lzma/LZMACoder.java
     ...

   70:
   71:        for (int i = 0; i < isMatch.length; ++i)
   72:            RangeCoder.initProbs(isMatch[i]);
   73:
     ...

tmp/src-xz/org/tukaani/xz/lzma/LZMADecoder.java
     ...

   54:
   55:            if (rc.decodeBit(isMatch[state.get()], posState) == 0) {
   56:                literalDecoder.decode();
     ...

[+] Match

MATCH_LEN_MIN   ([-1, '', 'obj:ref_field:len'])

tmp/src-xz/org/tukaani/xz/lzma/LZMAEncoderNormal.java
     ...

  123:        int avail = Math.min(lz.getAvail(), MATCH_LEN_MAX);
  124:        if (avail < MATCH_LEN_MIN)
  125:            return 1;
     ...

  131:
  132:            if (repLens[rep] < MATCH_LEN_MIN) {
  133:                repLens[rep] = 0;
     ...

  169:        // to have the byte encoded as a literal.
  170:        if (mainLen < MATCH_LEN_MIN && curByte != matchByte
  171:                && repLens[repBest] < MATCH_LEN_MIN)
  172:            return 1;
     ...

  200:        optEnd = Math.max(mainLen, repLens[repBest]);
  201:        if (optEnd < MATCH_LEN_MIN) {
  202:            assert optEnd == 0 : optEnd;
     ...

  219:        // Initialize the prices for latter opts that will be used below.
  220:        for (int i = optEnd; i >= MATCH_LEN_MIN; --i)
  221:            opts[i].reset();
     ...

  225:            int repLen = repLens[rep];
  226:            if (repLen < MATCH_LEN_MIN)
  227:                continue;
     ...

  235:                    opts[repLen].set1(price, 0, rep);
  236:            } while (--repLen >= MATCH_LEN_MIN);
  237:        }
     ...

  240:        {
  241:            int len = Math.max(repLens[0] + 1, MATCH_LEN_MIN);
  242:            if (len <= mainLen) {
     ...

  290:
  291:            if (avail >= MATCH_LEN_MIN) {
  292:                int startLen = calcLongRepPrices(pos, posState,
     ...

  403:        // try literal + long rep0.
  404:        if (!nextIsByte && matchByte != curByte && avail > MATCH_LEN_MIN) {
  405:            int lenLimit = Math.min(niceLen, avail - 1);
     ...

  407:
  408:            if (len >= MATCH_LEN_MIN) {
  409:                nextState.set(opts[optCur].state);
     ...

  430:                                  int avail, int anyRepPrice) {
  431:        int startLen = MATCH_LEN_MIN;
  432:        int lenLimit = Math.min(avail, niceLen);
     ...

  435:            int len = lz.getMatchLen(opts[optCur].reps[rep], lenLimit);
  436:            if (len < MATCH_LEN_MIN)
  437:                continue;
     ...

  444:
  445:            for (int i = len; i >= MATCH_LEN_MIN; --i) {
  446:                int price = longRepPrice
     ...

  458:
  459:            if (len2 >= MATCH_LEN_MIN) {
  460:                // Rep
  461:                int price = longRepPrice
  462:                            + repLenEncoder.getPrice(len, posState);
  463:                nextState.set(opts[optCur].state);
     ...

  536:
  537:            if (len2 >= MATCH_LEN_MIN) {
  538:                nextState.set(opts[optCur].state);
     ...

tmp/src-xz/org/tukaani/xz/lzma/LZMADecoder.java
     ...

  188:            if (rc.decodeBit(choice, 0) == 0)
  189:                return rc.decodeBitTree(low[posState]) + MATCH_LEN_MIN;
  190:
     ...

  192:                return rc.decodeBitTree(mid[posState])
  193:                       + MATCH_LEN_MIN + LOW_SYMBOLS;
  194:
  195:            return rc.decodeBitTree(high)
  196:                   + MATCH_LEN_MIN + LOW_SYMBOLS + MID_SYMBOLS;
  197:        }
     ...

tmp/src-xz/org/tukaani/xz/lzma/LZMAEncoderFast.java
     ...

   60:        int avail = Math.min(lz.getAvail(), MATCH_LEN_MAX);
   61:        if (avail < MATCH_LEN_MIN)
   62:            return 1;
     ...

   68:            int len = lz.getMatchLen(reps[rep], avail);
   69:            if (len < MATCH_LEN_MIN)
   70:                continue;
     ...

  108:
  109:            if (mainLen == MATCH_LEN_MIN && mainDist >= 0x80)
  110:                mainLen = 1;
     ...

  112:
  113:        if (bestRepLen >= MATCH_LEN_MIN) {
  114:            if (bestRepLen + 1 >= mainLen
     ...

  122:
  123:        if (mainLen < MATCH_LEN_MIN || avail <= MATCH_LEN_MIN)
  124:            return 1;
     ...

  138:                    || (newLen + 1 >= mainLen
  139:                        && mainLen >= MATCH_LEN_MIN + 1
  140:                        && changePair(newDist, mainDist)))
     ...

  143:
  144:        int limit = Math.max(mainLen - 1, MATCH_LEN_MIN);
  145:        for (int rep = 0; rep < REPS; ++rep)
     ...

tmp/src-xz/org/tukaani/xz/lzma/LZMACoder.java
     ...

   54:    static final int getDistState(int len) {
   55:        return len < DIST_STATES + MATCH_LEN_MIN
   56:               ? len - MATCH_LEN_MIN
   57:               : DIST_STATES - 1;
     ...

tmp/src-xz/org/tukaani/xz/lzma/LZMAEncoder.java
     ...

  235:        rc.encodeBit(isRep, state.get(), 0);
  236:        encodeMatch(-1, MATCH_LEN_MIN, posState);
  237:    }
     ...

  676:            // usually needed anyway if niceLen < 18.
  677:            int lenSymbols = Math.max(niceLen - MATCH_LEN_MIN + 1,
  678:                                      LOW_SYMBOLS + MID_SYMBOLS);
     ...

  691:        void encode(int len, int posState) throws IOException {
  692:            len -= MATCH_LEN_MIN;
  693:
     ...

  713:        int getPrice(int len, int posState) {
  714:            return prices[posState][len - MATCH_LEN_MIN];
  715:        }
     ...

[+] Match

Proposal 7: required / for / flushinglen   (2.933)

requiredForFlushing

tmp/src-xz/org/tukaani/xz/lz/LZEncoder.java
     ...

  402:     */
  403:    int movePos(int requiredForFlushing, int requiredForFinishing) {
  404:        assert requiredForFlushing >= requiredForFinishing;
     ...

  408:
  409:        if (avail < requiredForFlushing) {
  410:            if (avail < requiredForFinishing || !finishing) {
     ...

matchLenMax   ([-1, '', ':ref_field:len'])

tmp/src-xz/org/tukaani/xz/lz/BT4.java
     ...

   29:    BT4(int dictSize, int beforeSizeMin, int readAheadMax,
   30:            int niceLen, int matchLenMax, int depthLimit,
   31:            ArrayCache arrayCache) {
   32:        super(dictSize, beforeSizeMin, readAheadMax, niceLen, matchLenMax,
   33:              arrayCache);
     ...

tmp/src-xz/org/tukaani/xz/lz/LZEncoder.java
     ...

  121:            int dictSize, int extraSizeBefore, int extraSizeAfter,
  122:            int niceLen, int matchLenMax, int mf, int depthLimit,
  123:            ArrayCache arrayCache) {
     ...

  130:                return new BT4(dictSize, extraSizeBefore, extraSizeAfter,
  131:                               niceLen, matchLenMax, depthLimit, arrayCache);
  132:        }
     ...

tmp/src-xz/org/tukaani/xz/lzma/LZMAEncoderNormal.java
     ...

   49:                                        EXTRA_SIZE_AFTER,
   50:                                        niceLen, MATCH_LEN_MAX,
   51:                                        mf, depthLimit, arrayCache),
     ...

[+] Match

niceLenLimit   ([-1, '', ':ref_field:nice'])

tmp/src-xz/org/tukaani/xz/lz/BT4.java
     ...

   76:        int matchLenLimit = matchLenMax;
   77:        int niceLenLimit = niceLen;
   78:        int avail = movePos();
     ...

   84:            matchLenLimit = avail;
   85:            if (niceLenLimit > avail)
   86:                niceLenLimit = avail;
   87:        }
     ...

  128:            // the dictionary).
  129:            if (lenBest >= niceLenLimit) {
  130:                skip(niceLenLimit, currentMatch);
  131:                return matches;
     ...

  173:
  174:                    if (len >= niceLenLimit) {
  175:                        tree[ptr1] = tree[pair];
     ...

[+] Match

niceLenLimit   ([-2, ':ref_field:len', 'obj:ref_field:lz'])

tmp/src-xz/org/tukaani/xz/lz/BT4.java
     ...

   76:        int matchLenLimit = matchLenMax;
   77:        int niceLenLimit = niceLen;
   78:        int avail = movePos();
     ...

   84:            matchLenLimit = avail;
   85:            if (niceLenLimit > avail)
   86:                niceLenLimit = avail;
   87:        }
     ...

  128:            // the dictionary).
  129:            if (lenBest >= niceLenLimit) {
  130:                skip(niceLenLimit, currentMatch);
  131:                return matches;
     ...

  173:
  174:                    if (len >= niceLenLimit) {
  175:                        tree[ptr1] = tree[pair];
     ...

tmp/src-xz/org/tukaani/xz/lzma/LZMAEncoder.java
     ...

  386:        ++readAhead;
  387:        Matches matches = lz.getMatches();
  388:        assert lz.verifyMatches(matches);
     ...

[+] Match

Proposal 8: emptybuf   (2.476)

empty

tmp/src-xz/org/tukaani/xz/check/None.java
     ...

   20:    public byte[] finish() {
   21:        byte[] empty = new byte[0];
   22:        return empty;
   23:    }
     ...

buf   ([2, ':return', '#arg0:call:equals'])

tmp/src-xz/org/tukaani/xz/check/CRC32.java
     ...

   25:        long value = state.getValue();
   26:        byte[] buf = { (byte)(value),
   27:                       (byte)(value >>> 8),
   28:                       (byte)(value >>> 16),
   29:                       (byte)(value >>> 24) };
   30:        state.reset();
   31:        return buf;
   32:    }
     ...

tmp/src-xz/org/tukaani/xz/index/IndexHash.java
     ...

   82:                || stored.indexListSize != indexListSize
   83:                || !Arrays.equals(stored.hash.finish(), hash.finish()))
   84:            throw new CorruptedInputException("XZ Index is corrupt");
     ...

[+] Match

buf   ([2, ':return', '#arg1:call:equals'])

tmp/src-xz/org/tukaani/xz/check/CRC32.java
     ...

   25:        long value = state.getValue();
   26:        byte[] buf = { (byte)(value),
   27:                       (byte)(value >>> 8),
   28:                       (byte)(value >>> 16),
   29:                       (byte)(value >>> 24) };
   30:        state.reset();
   31:        return buf;
   32:    }
     ...

tmp/src-xz/org/tukaani/xz/index/IndexHash.java
     ...

   82:                || stored.indexListSize != indexListSize
   83:                || !Arrays.equals(stored.hash.finish(), hash.finish()))
   84:            throw new CorruptedInputException("XZ Index is corrupt");
     ...

[+] Match

buf   ([-1, '', ':valueset:0'])

tmp/src-xz/LZMADecDemo.java
     ...

   21:    public static void main(String[] args) {
   22:        byte[] buf = new byte[8192];
   23:        String name = null;
     ...

   33:                int size;
   34:                while ((size = in.read(buf)) != -1)
   35:                    System.out.write(buf, 0, size);
   36:
     ...

   53:                        int size;
   54:                        while ((size = in.read(buf)) != -1)
   55:                            System.out.write(buf, 0, size);
   56:
     ...

[+] Match

Proposal 9: outbufbuf / filter   (1.824)

outbuf

tmp/src-xz/TestAllocSpeed.java
     ...

   60:                testdata, 0, testdataSize);
   61:        byte[] outbuf = new byte[8192];
   62:
     ...

   65:            XZInputStream in = new XZInputStream(byteStream);
   66:            while (in.read(outbuf) > 0) {}
   67:        }
     ...

buf   ([-1, '', ':valueset:0'])

tmp/src-xz/LZMADecDemo.java
     ...

   21:    public static void main(String[] args) {
   22:        byte[] buf = new byte[8192];
   23:        String name = null;
     ...

   33:                int size;
   34:                while ((size = in.read(buf)) != -1)
   35:                    System.out.write(buf, 0, size);
   36:
     ...

   53:                        int size;
   54:                        while ((size = in.read(buf)) != -1)
   55:                            System.out.write(buf, 0, size);
   56:
     ...

[+] Match

buf   ([1, '', '#arg0:call:read'])

tmp/src-xz/LZMADecDemo.java
     ...

   21:    public static void main(String[] args) {
   22:        byte[] buf = new byte[8192];
   23:        String name = null;
     ...

   33:                int size;
   34:                while ((size = in.read(buf)) != -1)
   35:                    System.out.write(buf, 0, size);
   36:
     ...

   53:                        int size;
   54:                        while ((size = in.read(buf)) != -1)
   55:                            System.out.write(buf, 0, size);
   56:
     ...

[+] Match

buf   ([2, '#arg0:call:read', 'L:op_infix:>'])

tmp/src-xz/XZSeekDecDemo.java
     ...

   47:
   48:        byte[] buf = new byte[8192];
   49:        if (args.length == 1) {
   50:            int size;
   51:            while ((size = in.read(buf)) != -1)
   52:                System.out.write(buf, 0, size);
   53:        } else {
     ...

   60:                while (len > 0) {
   61:                    int size = Math.min(len, buf.length);
   62:                    size = in.read(buf, 0, size);
   63:
     ...

   68:
   69:                    System.out.write(buf, 0, size);
   70:                    len -= size;
     ...

tmp/src-xz/org/tukaani/xz/SingleXZInputStream.java
     ...

  430:
  431:                int ret = blockDecoder.read(buf, off, len);
  432:
  433:                if (ret > 0) {
  434:                    size += ret;
     ...

[+] Match

Proposal 10: backwarduncompressed / size   (1.801)

backward

tmp/src-xz/org/tukaani/xz/lz/LZEncoder.java
     ...

  280:
  281:    public void copyUncompressed(OutputStream out, int backward, int len)
  282:            throws IOException {
  283:        out.write(buf, readPos + 1 - backward, len);
  284:    }
     ...

uncompressedSize   ([-1, '', ':ref_var:uncompressed'])

tmp/src-xz/org/tukaani/xz/LZMA2OutputStream.java
     ...

  126:        if (compressedSize + 2 < uncompressedSize) {
  127:            writeLZMA(uncompressedSize, compressedSize);
  128:        } else {
     ...

  139:
  140:    private void writeLZMA(int uncompressedSize, int compressedSize)
  141:            throws IOException {
     ...

  155:
  156:        control |= (uncompressedSize - 1) >>> 16;
  157:        outData.writeByte(control);
  158:
  159:        outData.writeShort(uncompressedSize - 1);
  160:        outData.writeShort(compressedSize - 1);
     ...

[+] Match

uncompressedSize   ([2, 'R:op_infix:-', '#arg1:call:write'])

tmp/src-xz/org/tukaani/xz/LZMA2OutputStream.java
     ...

  171:
  172:    private void writeUncompressed(int uncompressedSize) throws IOException {
  173:        while (uncompressedSize > 0) {
  174:            int chunkSize = Math.min(uncompressedSize, COMPRESSED_SIZE_MAX);
  175:            outData.writeByte(dictResetNeeded ? 0x01 : 0x02);
  176:            outData.writeShort(chunkSize - 1);
  177:            lz.copyUncompressed(out, uncompressedSize, chunkSize);
  178:            uncompressedSize -= chunkSize;
  179:            dictResetNeeded = false;
     ...

tmp/src-xz/org/tukaani/xz/lz/LZEncoder.java
     ...

  282:            throws IOException {
  283:        out.write(buf, readPos + 1 - backward, len);
  284:    }
     ...

[+] Match

uncompressedSize   ([-3, ':begin', 'init:ref_var:uncompressed'])

tmp/src-xz/org/tukaani/xz/LZMA2OutputStream.java
     ...

  131:            assert uncompressedSize > 0 : uncompressedSize;
  132:            writeUncompressed(uncompressedSize);
  133:        }
     ...

  171:
  172:    private void writeUncompressed(int uncompressedSize) throws IOException {
  173:        while (uncompressedSize > 0) {
  174:            int chunkSize = Math.min(uncompressedSize, COMPRESSED_SIZE_MAX);
  175:            outData.writeByte(dictResetNeeded ? 0x01 : 0x02);
  176:            outData.writeShort(chunkSize - 1);
  177:            lz.copyUncompressed(out, uncompressedSize, chunkSize);
  178:            uncompressedSize -= chunkSize;
  179:            dictResetNeeded = false;
     ...

[+] Match

Proposal 11: full / distancesdist / price   (1.770)

FULL_DISTANCES

tmp/src-xz/org/tukaani/xz/lzma/LZMAEncoder.java
     ...

  451:
  452:        if (dist < FULL_DISTANCES) {
  453:            price += fullDistPrices[distState][dist];
     ...

DIST_MODEL_END   ([-1, '', 'obj:ref_field:lzma'])

tmp/src-xz/org/tukaani/xz/lzma/LZMAEncoder.java
     ...

  331:
  332:            if (distSlot < DIST_MODEL_END) {
  333:                rc.encodeReverseBitTree(
     ...

  473:
  474:            for (int distSlot = DIST_MODEL_END; distSlot < distSlotPricesSize;
  475:                    ++distSlot) {
     ...

  486:        int dist = DIST_MODEL_START;
  487:        for (int distSlot = DIST_MODEL_START; distSlot < DIST_MODEL_END;
  488:                ++distSlot) {
     ...

tmp/src-xz/org/tukaani/xz/lzma/LZMADecoder.java
     ...

   87:
   88:            if (distSlot < DIST_MODEL_END) {
   89:                reps[0] |= rc.decodeReverseBitTree(
     ...

tmp/src-xz/org/tukaani/xz/LZMA2OutputStream.java
     ...

  224:            while (pendingSize > 0) {
  225:                lzma.encodeForLZMA2();
  226:                writeChunk();
     ...

[+] Match

DIST_MODEL_END   ([-2, 'obj:ref_field:lzma', ':call:lzma'])

tmp/src-xz/org/tukaani/xz/lzma/LZMAEncoder.java
     ...

  331:
  332:            if (distSlot < DIST_MODEL_END) {
  333:                rc.encodeReverseBitTree(
     ...

  473:
  474:            for (int distSlot = DIST_MODEL_END; distSlot < distSlotPricesSize;
  475:                    ++distSlot) {
     ...

  486:        int dist = DIST_MODEL_START;
  487:        for (int distSlot = DIST_MODEL_START; distSlot < DIST_MODEL_END;
  488:                ++distSlot) {
     ...

tmp/src-xz/org/tukaani/xz/lzma/LZMADecoder.java
     ...

   87:
   88:            if (distSlot < DIST_MODEL_END) {
   89:                reps[0] |= rc.decodeReverseBitTree(
     ...

tmp/src-xz/LZMAEncDemo.java
     ...

   45:        OutputStream out = new BufferedOutputStream(System.out);
   46:        LZMAOutputStream encoder = new LZMAOutputStream(out, options,
   47:                                                        inputSize);
   48:
     ...

tmp/src-xz/org/tukaani/xz/LZMAOutputStream.java
     ...

  129:            throws IOException {
  130:        this(out, options, inputSize, ArrayCache.getDefaultCache());
  131:    }
     ...

[+] Match

DIST_MODEL_END   ([-2, 'obj:ref_field:lzma', ':call:output'])

tmp/src-xz/org/tukaani/xz/lzma/LZMAEncoder.java
     ...

  331:
  332:            if (distSlot < DIST_MODEL_END) {
  333:                rc.encodeReverseBitTree(
     ...

  473:
  474:            for (int distSlot = DIST_MODEL_END; distSlot < distSlotPricesSize;
  475:                    ++distSlot) {
     ...

  486:        int dist = DIST_MODEL_START;
  487:        for (int distSlot = DIST_MODEL_START; distSlot < DIST_MODEL_END;
  488:                ++distSlot) {
     ...

tmp/src-xz/org/tukaani/xz/lzma/LZMADecoder.java
     ...

   87:
   88:            if (distSlot < DIST_MODEL_END) {
   89:                reps[0] |= rc.decodeReverseBitTree(
     ...

tmp/src-xz/LZMAEncDemo.java
     ...

   45:        OutputStream out = new BufferedOutputStream(System.out);
   46:        LZMAOutputStream encoder = new LZMAOutputStream(out, options,
   47:                                                        inputSize);
   48:
     ...

tmp/src-xz/org/tukaani/xz/LZMAOutputStream.java
     ...

  129:            throws IOException {
  130:        this(out, options, inputSize, ArrayCache.getDefaultCache());
  131:    }
     ...

[+] Match

Proposal 12: top / maskrange   (1.653)

TOP_MASK

tmp/src-xz/org/tukaani/xz/rangecoder/RangeEncoder.java
     ...

  114:
  115:        if ((range & TOP_MASK) == 0) {
  116:            range <<= SHIFT_BITS;
     ...

  189:
  190:            if ((range & TOP_MASK) == 0) {
  191:                range <<= SHIFT_BITS;
     ...

tmp/src-xz/org/tukaani/xz/rangecoder/RangeDecoderFromBuffer.java
     ...

   59:    public void normalize() throws IOException {
   60:        if ((range & TOP_MASK) == 0) {
   61:            try {
     ...

tmp/src-xz/org/tukaani/xz/rangecoder/RangeDecoderFromStream.java
     ...

   35:    public void normalize() throws IOException {
   36:        if ((range & TOP_MASK) == 0) {
   37:            code = (code << SHIFT_BITS) | inData.readUnsignedByte();
     ...

range   ([-1, '', 'obj:ref_field:rc'])

tmp/src-xz/org/tukaani/xz/rangecoder/RangeDecoder.java
     ...

   25:        int prob = probs[index];
   26:        int bound = (range >>> BIT_MODEL_TOTAL_BITS) * prob;
   27:        int bit;
     ...

   30:        if ((code ^ 0x80000000) < (bound ^ 0x80000000)) {
   31:            range = bound;
   32:            probs[index] = (short)(
     ...

   35:        } else {
   36:            range -= bound;
   37:            code -= bound;
     ...

   74:
   75:            range >>>= 1;
   76:            int t = (code - range) >>> 31;
   77:            code -= range & (t - 1);
   78:            result = (result << 1) | (1 - t);
     ...

tmp/src-xz/org/tukaani/xz/rangecoder/RangeDecoderFromStream.java
     ...

   27:        code = inData.readInt();
   28:        range = 0xFFFFFFFF;
   29:    }
     ...

   35:    public void normalize() throws IOException {
   36:        if ((range & TOP_MASK) == 0) {
   37:            code = (code << SHIFT_BITS) | inData.readUnsignedByte();
   38:            range <<= SHIFT_BITS;
   39:        }
     ...

tmp/src-xz/org/tukaani/xz/rangecoder/RangeDecoderFromBuffer.java
     ...

   43:        code = in.readInt();
   44:        range = 0xFFFFFFFF;
   45:
     ...

   59:    public void normalize() throws IOException {
   60:        if ((range & TOP_MASK) == 0) {
   61:            try {
     ...

   64:                code = (code << SHIFT_BITS) | (buf[pos++] & 0xFF);
   65:                range <<= SHIFT_BITS;
   66:            } catch (ArrayIndexOutOfBoundsException e) {
     ...

tmp/src-xz/org/tukaani/xz/lzma/LZMADecoder.java
     ...

   91:            } else {
   92:                reps[0] |= rc.decodeDirectBits(limit - ALIGN_BITS)
   93:                           << ALIGN_BITS;
     ...

[+] Match

range   ([4, 'cond:join', ':ref_field:code'])

tmp/src-xz/org/tukaani/xz/rangecoder/RangeDecoder.java
     ...

   25:        int prob = probs[index];
   26:        int bound = (range >>> BIT_MODEL_TOTAL_BITS) * prob;
   27:        int bit;
     ...

   30:        if ((code ^ 0x80000000) < (bound ^ 0x80000000)) {
   31:            range = bound;
   32:            probs[index] = (short)(
     ...

   35:        } else {
   36:            range -= bound;
   37:            code -= bound;
     ...

   72:        do {
   73:            normalize();
   74:
   75:            range >>>= 1;
   76:            int t = (code - range) >>> 31;
   77:            code -= range & (t - 1);
   78:            result = (result << 1) | (1 - t);
     ...

tmp/src-xz/org/tukaani/xz/rangecoder/RangeDecoderFromStream.java
     ...

   27:        code = inData.readInt();
   28:        range = 0xFFFFFFFF;
   29:    }
     ...

   35:    public void normalize() throws IOException {
   36:        if ((range & TOP_MASK) == 0) {
   37:            code = (code << SHIFT_BITS) | inData.readUnsignedByte();
   38:            range <<= SHIFT_BITS;
   39:        }
     ...

tmp/src-xz/org/tukaani/xz/rangecoder/RangeDecoderFromBuffer.java
     ...

   43:        code = in.readInt();
   44:        range = 0xFFFFFFFF;
   45:
     ...

   59:    public void normalize() throws IOException {
   60:        if ((range & TOP_MASK) == 0) {
   61:            try {
     ...

   64:                code = (code << SHIFT_BITS) | (buf[pos++] & 0xFF);
   65:                range <<= SHIFT_BITS;
   66:            } catch (ArrayIndexOutOfBoundsException e) {
     ...

[+] Match

range   ([4, 'cond:join', 'L:op_assign:>>>='])

tmp/src-xz/org/tukaani/xz/rangecoder/RangeDecoder.java
     ...

   25:        int prob = probs[index];
   26:        int bound = (range >>> BIT_MODEL_TOTAL_BITS) * prob;
   27:        int bit;
     ...

   30:        if ((code ^ 0x80000000) < (bound ^ 0x80000000)) {
   31:            range = bound;
   32:            probs[index] = (short)(
     ...

   35:        } else {
   36:            range -= bound;
   37:            code -= bound;
     ...

   72:        do {
   73:            normalize();
   74:
   75:            range >>>= 1;
   76:            int t = (code - range) >>> 31;
   77:            code -= range & (t - 1);
   78:            result = (result << 1) | (1 - t);
     ...

tmp/src-xz/org/tukaani/xz/rangecoder/RangeDecoderFromStream.java
     ...

   27:        code = inData.readInt();
   28:        range = 0xFFFFFFFF;
   29:    }
     ...

   35:    public void normalize() throws IOException {
   36:        if ((range & TOP_MASK) == 0) {
   37:            code = (code << SHIFT_BITS) | inData.readUnsignedByte();
   38:            range <<= SHIFT_BITS;
   39:        }
     ...

tmp/src-xz/org/tukaani/xz/rangecoder/RangeDecoderFromBuffer.java
     ...

   43:        code = in.readInt();
   44:        range = 0xFFFFFFFF;
   45:
     ...

   59:    public void normalize() throws IOException {
   60:        if ((range & TOP_MASK) == 0) {
   61:            try {
     ...

   64:                code = (code << SHIFT_BITS) | (buf[pos++] & 0xFF);
   65:                range <<= SHIFT_BITS;
   66:            } catch (ArrayIndexOutOfBoundsException e) {
     ...

[+] Match

Proposal 13: bit / model / total / bitsrange   (1.634)

BIT_MODEL_TOTAL_BITS

tmp/src-xz/org/tukaani/xz/rangecoder/RangeDecoder.java
     ...

   25:        int prob = probs[index];
   26:        int bound = (range >>> BIT_MODEL_TOTAL_BITS) * prob;
   27:        int bit;
     ...

tmp/src-xz/org/tukaani/xz/rangecoder/RangeEncoder.java
     ...

  101:        int prob = probs[index];
  102:        int bound = (range >>> BIT_MODEL_TOTAL_BITS) * prob;
  103:
     ...

range   ([3, 'L:op_infix:*', ':assign_var:bound'])

tmp/src-xz/org/tukaani/xz/rangecoder/RangeDecoder.java
     ...

   25:        int prob = probs[index];
   26:        int bound = (range >>> BIT_MODEL_TOTAL_BITS) * prob;
   27:        int bit;
     ...

   30:        if ((code ^ 0x80000000) < (bound ^ 0x80000000)) {
   31:            range = bound;
   32:            probs[index] = (short)(
     ...

   35:        } else {
   36:            range -= bound;
   37:            code -= bound;
     ...

   74:
   75:            range >>>= 1;
   76:            int t = (code - range) >>> 31;
   77:            code -= range & (t - 1);
   78:            result = (result << 1) | (1 - t);
     ...

tmp/src-xz/org/tukaani/xz/rangecoder/RangeDecoderFromStream.java
     ...

   27:        code = inData.readInt();
   28:        range = 0xFFFFFFFF;
   29:    }
     ...

   35:    public void normalize() throws IOException {
   36:        if ((range & TOP_MASK) == 0) {
   37:            code = (code << SHIFT_BITS) | inData.readUnsignedByte();
   38:            range <<= SHIFT_BITS;
   39:        }
     ...

tmp/src-xz/org/tukaani/xz/rangecoder/RangeDecoderFromBuffer.java
     ...

   43:        code = in.readInt();
   44:        range = 0xFFFFFFFF;
   45:
     ...

   59:    public void normalize() throws IOException {
   60:        if ((range & TOP_MASK) == 0) {
   61:            try {
     ...

   64:                code = (code << SHIFT_BITS) | (buf[pos++] & 0xFF);
   65:                range <<= SHIFT_BITS;
   66:            } catch (ArrayIndexOutOfBoundsException e) {
     ...

[+] Match

range   ([3, 'L:op_infix:*', 'R:op_assign:='])

tmp/src-xz/org/tukaani/xz/rangecoder/RangeDecoder.java
     ...

   25:        int prob = probs[index];
   26:        int bound = (range >>> BIT_MODEL_TOTAL_BITS) * prob;
   27:        int bit;
     ...

   30:        if ((code ^ 0x80000000) < (bound ^ 0x80000000)) {
   31:            range = bound;
   32:            probs[index] = (short)(
     ...

   35:        } else {
   36:            range -= bound;
   37:            code -= bound;
     ...

   74:
   75:            range >>>= 1;
   76:            int t = (code - range) >>> 31;
   77:            code -= range & (t - 1);
   78:            result = (result << 1) | (1 - t);
     ...

tmp/src-xz/org/tukaani/xz/rangecoder/RangeDecoderFromStream.java
     ...

   27:        code = inData.readInt();
   28:        range = 0xFFFFFFFF;
   29:    }
     ...

   35:    public void normalize() throws IOException {
   36:        if ((range & TOP_MASK) == 0) {
   37:            code = (code << SHIFT_BITS) | inData.readUnsignedByte();
   38:            range <<= SHIFT_BITS;
   39:        }
     ...

tmp/src-xz/org/tukaani/xz/rangecoder/RangeDecoderFromBuffer.java
     ...

   43:        code = in.readInt();
   44:        range = 0xFFFFFFFF;
   45:
     ...

   59:    public void normalize() throws IOException {
   60:        if ((range & TOP_MASK) == 0) {
   61:            try {
     ...

   64:                code = (code << SHIFT_BITS) | (buf[pos++] & 0xFF);
   65:                range <<= SHIFT_BITS;
   66:            } catch (ArrayIndexOutOfBoundsException e) {
     ...

[+] Match

range   ([3, 'L:op_infix:*', 'R:op_assign:-='])

tmp/src-xz/org/tukaani/xz/rangecoder/RangeDecoder.java
     ...

   25:        int prob = probs[index];
   26:        int bound = (range >>> BIT_MODEL_TOTAL_BITS) * prob;
   27:        int bit;
     ...

   30:        if ((code ^ 0x80000000) < (bound ^ 0x80000000)) {
   31:            range = bound;
   32:            probs[index] = (short)(
     ...

   35:        } else {
   36:            range -= bound;
   37:            code -= bound;
   38:            probs[index] = (short)(prob - (prob >>> MOVE_BITS));
     ...

   74:
   75:            range >>>= 1;
   76:            int t = (code - range) >>> 31;
   77:            code -= range & (t - 1);
   78:            result = (result << 1) | (1 - t);
     ...

tmp/src-xz/org/tukaani/xz/rangecoder/RangeDecoderFromStream.java
     ...

   27:        code = inData.readInt();
   28:        range = 0xFFFFFFFF;
   29:    }
     ...

   35:    public void normalize() throws IOException {
   36:        if ((range & TOP_MASK) == 0) {
   37:            code = (code << SHIFT_BITS) | inData.readUnsignedByte();
   38:            range <<= SHIFT_BITS;
   39:        }
     ...

tmp/src-xz/org/tukaani/xz/rangecoder/RangeDecoderFromBuffer.java
     ...

   43:        code = in.readInt();
   44:        range = 0xFFFFFFFF;
   45:
     ...

   59:    public void normalize() throws IOException {
   60:        if ((range & TOP_MASK) == 0) {
   61:            try {
     ...

   64:                code = (code << SHIFT_BITS) | (buf[pos++] & 0xFF);
   65:                range <<= SHIFT_BITS;
   66:            } catch (ArrayIndexOutOfBoundsException e) {
     ...

[+] Match

Proposal 14: lensize   (1.466)

len

tmp/src-xz/org/tukaani/xz/CountingOutputStream.java
     ...

   36:
   37:    public void write(byte[] b, int off, int len) throws IOException {
   38:        out.write(b, off, len);
   39:        if (size >= 0)
   40:            size += len;
   41:    }
     ...

size   ([1, '', '#arg2:call:write'])

tmp/src-xz/LZMADecDemo.java
     ...

   53:                        int size;
   54:                        while ((size = in.read(buf)) != -1)
   55:                            System.out.write(buf, 0, size);
   56:
     ...

[+] Match

size   ([1, '', 'R:op_assign:+='])

tmp/src-xz/LZMAEncDemo.java
     ...

   50:        int size;
   51:        while ((size = System.in.read(buf)) != -1)
   52:            encoder.write(buf, 0, size);
   53:
     ...

tmp/src-xz/org/tukaani/xz/LZMAOutputStream.java
     ...

  235:
  236:    public void write(byte[] buf, int off, int len) throws IOException {
  237:        if (off < 0 || len < 0 || off + len < 0 || off + len > buf.length)
     ...

  250:
  251:        currentUncompressedSize += len;
  252:
     ...

[+] Match

size   ([2, 'R:op_assign:+=', ':assign_field:size'])

tmp/src-xz/XZEncDemo.java
     ...

   35:        int size;
   36:        while ((size = System.in.read(buf)) != -1)
   37:            out.write(buf, 0, size);
   38:
     ...

tmp/src-xz/org/tukaani/xz/BlockOutputStream.java
     ...

   95:        check.update(buf, off, len);
   96:        uncompressedSize += len;
   97:        validate();
     ...

[+] Match

Proposal 15: prob / initoff   (1.179)

PROB_INIT

tmp/src-xz/org/tukaani/xz/rangecoder/RangeCoder.java
     ...

   23:    public static final void initProbs(short[] probs) {
   24:        Arrays.fill(probs, PROB_INIT);
   25:    }
     ...

off   ([1, '', '#arg1:call:fill'])

tmp/src-xz/org/tukaani/xz/LZMA2OutputStream.java
     ...

   90:
   91:    public void write(byte[] buf, int off, int len) throws IOException {
   92:        if (off < 0 || len < 0 || off + len < 0 || off + len > buf.length)
   93:            throw new IndexOutOfBoundsException();
     ...

  102:            while (len > 0) {
  103:                int used = lz.fillWindow(buf, off, len);
  104:                off += used;
  105:                len -= used;
     ...

[+] Match

Proposal 16: lensize / len   (0.723)

len

tmp/src-xz/org/tukaani/xz/FinishableWrapperOutputStream.java
     ...

   52:     */
   53:    public void write(byte[] buf, int off, int len) throws IOException {
   54:        out.write(buf, off, len);
   55:    }
     ...

size   ([1, '', '#arg2:call:write'])

tmp/src-xz/LZMADecDemo.java
     ...

   53:                        int size;
   54:                        while ((size = in.read(buf)) != -1)
   55:                            System.out.write(buf, 0, size);
   56:
     ...

[+] Match

Proposal 17: inchain / filter   (0.561)

in

tmp/src-xz/org/tukaani/xz/FilterOptions.java
     ...

   89:     */
   90:    public InputStream getInputStream(InputStream in) throws IOException {
   91:        return getInputStream(in, ArrayCache.getDefaultCache());
   92:    }
     ...

filterChain   ([1, '', '#arg0:new:lzma'])

tmp/src-xz/org/tukaani/xz/BlockInputStream.java
     ...

  197:        // Initialize the filter chain.
  198:        filterChain = inCounted;
  199:        for (int i = filters.length - 1; i >= 0; --i)
  200:            filterChain = filters[i].getInputStream(filterChain, arrayCache);
  201:    }
     ...

  210:
  211:        int ret = filterChain.read(buf, off, len);
  212:
     ...

  235:            if (ret < len || uncompressedSize == uncompressedSizeInHeader) {
  236:                if (filterChain.read() != -1)
  237:                    throw new CorruptedInputException();
     ...

  274:    public int available() throws IOException {
  275:        return filterChain.available();
  276:    }
     ...

  284:        try {
  285:            filterChain.close();
  286:        } catch (IOException e) {
     ...

  294:
  295:        filterChain = null;
  296:    }
     ...

tmp/src-xz/org/tukaani/xz/LZMA2Decoder.java
     ...

   31:
   32:    public InputStream getInputStream(InputStream in, ArrayCache arrayCache) {
   33:        return new LZMA2InputStream(in, dictSize, null, arrayCache);
   34:    }
     ...

[+] Match

filterChain   ([2, '#arg0:call:stream', ':return'])

tmp/src-xz/org/tukaani/xz/BlockOutputStream.java
     ...

   37:        outCounted = new CountingOutputStream(out);
   38:        filterChain = outCounted;
   39:        for (int i = filters.length - 1; i >= 0; --i)
   40:            filterChain = filters[i].getOutputStream(filterChain, arrayCache);
   41:
     ...

   93:    public void write(byte[] buf, int off, int len) throws IOException {
   94:        filterChain.write(buf, off, len);
   95:        check.update(buf, off, len);
     ...

  100:    public void flush() throws IOException {
  101:        filterChain.flush();
  102:        validate();
     ...

  106:        // Finish the Compressed Data field.
  107:        filterChain.finish();
  108:        validate();
     ...

tmp/src-xz/org/tukaani/xz/DeltaEncoder.java
     ...

   34:                                                  ArrayCache arrayCache) {
   35:        return options.getOutputStream(out, arrayCache);
   36:    }
     ...

[+] Match

filterChain   ([2, '#arg0:new:stream', ':return'])

tmp/src-xz/org/tukaani/xz/BlockInputStream.java
     ...

  197:        // Initialize the filter chain.
  198:        filterChain = inCounted;
  199:        for (int i = filters.length - 1; i >= 0; --i)
  200:            filterChain = filters[i].getInputStream(filterChain, arrayCache);
  201:    }
     ...

  210:
  211:        int ret = filterChain.read(buf, off, len);
  212:
     ...

  235:            if (ret < len || uncompressedSize == uncompressedSizeInHeader) {
  236:                if (filterChain.read() != -1)
  237:                    throw new CorruptedInputException();
     ...

  274:    public int available() throws IOException {
  275:        return filterChain.available();
  276:    }
     ...

  284:        try {
  285:            filterChain.close();
  286:        } catch (IOException e) {
     ...

  294:
  295:        filterChain = null;
  296:    }
     ...

tmp/src-xz/org/tukaani/xz/BCJDecoder.java
     ...

   59:
   60:        return new SimpleInputStream(in, simpleFilter);
   61:    }
     ...

[+] Match

Proposal 18: inchain / in   (0.417)

in

tmp/src-xz/org/tukaani/xz/DeltaOptions.java
     ...

   86:
   87:    public InputStream getInputStream(InputStream in, ArrayCache arrayCache) {
   88:        return new DeltaInputStream(in, distance);
   89:    }
     ...

filterChain   ([1, '', '#arg0:new:delta'])

tmp/src-xz/org/tukaani/xz/BlockInputStream.java
     ...

  197:        // Initialize the filter chain.
  198:        filterChain = inCounted;
  199:        for (int i = filters.length - 1; i >= 0; --i)
  200:            filterChain = filters[i].getInputStream(filterChain, arrayCache);
  201:    }
     ...

  210:
  211:        int ret = filterChain.read(buf, off, len);
  212:
     ...

  235:            if (ret < len || uncompressedSize == uncompressedSizeInHeader) {
  236:                if (filterChain.read() != -1)
  237:                    throw new CorruptedInputException();
     ...

  274:    public int available() throws IOException {
  275:        return filterChain.available();
  276:    }
     ...

  284:        try {
  285:            filterChain.close();
  286:        } catch (IOException e) {
     ...

  294:
  295:        filterChain = null;
  296:    }
     ...

tmp/src-xz/org/tukaani/xz/DeltaDecoder.java
     ...

   28:
   29:    public InputStream getInputStream(InputStream in, ArrayCache arrayCache) {
   30:        return new DeltaInputStream(in, distance);
   31:    }
     ...

[+] Match

filterChain   ([2, '#arg0:new:stream', ':return'])

tmp/src-xz/org/tukaani/xz/BlockInputStream.java
     ...

  197:        // Initialize the filter chain.
  198:        filterChain = inCounted;
  199:        for (int i = filters.length - 1; i >= 0; --i)
  200:            filterChain = filters[i].getInputStream(filterChain, arrayCache);
  201:    }
     ...

  210:
  211:        int ret = filterChain.read(buf, off, len);
  212:
     ...

  235:            if (ret < len || uncompressedSize == uncompressedSizeInHeader) {
  236:                if (filterChain.read() != -1)
  237:                    throw new CorruptedInputException();
     ...

  274:    public int available() throws IOException {
  275:        return filterChain.available();
  276:    }
     ...

  284:        try {
  285:            filterChain.close();
  286:        } catch (IOException e) {
     ...

  294:
  295:        filterChain = null;
  296:    }
     ...

tmp/src-xz/org/tukaani/xz/BCJDecoder.java
     ...

   59:
   60:        return new SimpleInputStream(in, simpleFilter);
   61:    }
     ...

[+] Match

filterChain   ([1, '', '#arg0:new:stream'])

tmp/src-xz/org/tukaani/xz/BlockInputStream.java
     ...

  197:        // Initialize the filter chain.
  198:        filterChain = inCounted;
  199:        for (int i = filters.length - 1; i >= 0; --i)
  200:            filterChain = filters[i].getInputStream(filterChain, arrayCache);
  201:    }
     ...

  210:
  211:        int ret = filterChain.read(buf, off, len);
  212:
     ...

  235:            if (ret < len || uncompressedSize == uncompressedSizeInHeader) {
  236:                if (filterChain.read() != -1)
  237:                    throw new CorruptedInputException();
     ...

  274:    public int available() throws IOException {
  275:        return filterChain.available();
  276:    }
     ...

  284:        try {
  285:            filterChain.close();
  286:        } catch (IOException e) {
     ...

  294:
  295:        filterChain = null;
  296:    }
     ...

tmp/src-xz/org/tukaani/xz/BCJDecoder.java
     ...

   41:
   42:    public InputStream getInputStream(InputStream in, ArrayCache arrayCache) {
   43:        SimpleFilter simpleFilter = null;
     ...

   59:
   60:        return new SimpleInputStream(in, simpleFilter);
   61:    }
     ...

[+] Match

Proposal 19: close / inputzeros / with / fill   (0.402)

closeInput

tmp/src-xz/org/tukaani/xz/SingleXZInputStream.java
     ...

  519:     */
  520:    public void close(boolean closeInput) throws IOException {
  521:        if (in != null) {
     ...

  527:            try {
  528:                if (closeInput)
  529:                    in.close();
     ...

fillWithZeros   ([-1, '', ':value:false'])

tmp/src-xz/org/tukaani/xz/ArrayCache.java
     ...

  133:     */
  134:    public byte[] getByteArray(int size, boolean fillWithZeros) {
  135:        return new byte[size];
     ...

tmp/src-xz/org/tukaani/xz/ResettableArrayCache.java
     ...

   45:
   46:    public byte[] getByteArray(int size, boolean fillWithZeros) {
   47:        byte[] array = arrayCache.getByteArray(size, fillWithZeros);
   48:
     ...

tmp/src-xz/org/tukaani/xz/rangecoder/RangeDecoderFromBuffer.java
     ...

   26:        // a bigger-than-requested array, we still want to use buf.length.
   27:        buf = arrayCache.getByteArray(inputSizeMax - INIT_SIZE, false);
   28:        pos = buf.length;
     ...

[+] Match

fillWithZeros   ([-1, '', ':value:true'])

tmp/src-xz/org/tukaani/xz/ArrayCache.java
     ...

  160:     */
  161:    public int[] getIntArray(int size, boolean fillWithZeros) {
  162:        return new int[size];
     ...

tmp/src-xz/org/tukaani/xz/ResettableArrayCache.java
     ...

   71:
   72:    public int[] getIntArray(int size, boolean fillWithZeros) {
   73:        int[] array = arrayCache.getIntArray(size, fillWithZeros);
   74:
     ...

tmp/src-xz/org/tukaani/xz/lz/Hash234.java
     ...

   57:        hash4Size = getHash4Size(dictSize);
   58:        hash4Table = arrayCache.getIntArray(hash4Size, true);
   59:        hash4Mask = hash4Size - 1;
     ...

[+] Match