Parse the scheme marker out of the input data and then start the parse
for the next section. If any errors are encountered, then an exception
is thrown.

@param data
@throws IllegalArgumentException
428867
private void parseScheme(byte[] data) {
        // we know the first character is correct, find the colon
        for (int i = 1; i < data.length; i++) {
            if (':' == data[i]) {
                SchemeValues val = SchemeValues.match(data, 0, i);
                if (null == val) {
                    throw new IllegalArgumentException("Invalid scheme inside URL: " + GenericUtils.getEnglishString(data));
                }
                setScheme(val);
                // scheme should be followed by "://"
                if ((i + 2) >= data.length || ('/' != data[i + 1] || '/' != data[i + 2])) {
                    throw new IllegalArgumentException("Invalid net_path: " + GenericUtils.getEnglishString(data));
                }
                parseAuthority(data, i + 3);
                return;
            }
        }
        // no colon found
        throw new IllegalArgumentException("Invalid scheme in URL: " + GenericUtils.getEnglishString(data));
    }
196264
final public void MapData() throws ParseException {
                          /*@bgen(jjtree) MapData */
  AstMapData jjtn000 = new AstMapData(JJTMAPDATA);
  boolean jjtc000 = true;
  jjtree.openNodeScope(jjtn000);
    try {
      jj_consume_token(START_SET_OR_MAP);
      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
      case START_SET_OR_MAP:
      case INTEGER_LITERAL:
      case FLOATING_POINT_LITERAL:
      case STRING_LITERAL:
      case TRUE:
      case FALSE:
      case NULL:
      case LPAREN:
      case LBRACK:
      case NOT0:
      case NOT1:
      case EMPTY:
      case MINUS:
      case IDENTIFIER:
        MapEntry();
        label_18:
        while (true) {
          switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
          case COMMA:
            ;
            break;
          default:
            jj_la1[46] = jj_gen;
            break label_18;
          }
          jj_consume_token(COMMA);
          MapEntry();
        }
        break;
      default:
        jj_la1[47] = jj_gen;
        ;
      }
      jj_consume_token(RBRACE);
    } catch (Throwable jjte000) {
      if (jjtc000) {
        jjtree.clearNodeScope(jjtn000);
        jjtc000 = false;
      } else {
        jjtree.popNode();
      }
      if (jjte000 instanceof RuntimeException) {
        {if (true) throw (RuntimeException)jjte000;}
      }
      if (jjte000 instanceof ParseException) {
        {if (true) throw (ParseException)jjte000;}
      }
      {if (true) throw (Error)jjte000;}
    } finally {
      if (jjtc000) {
        jjtree.closeNodeScope(jjtn000, true);
      }
    }
  }
907044
public void setContent(String data) {

        if (data == null) {
            data = "";
        }

        encodeInfo = "";

        switch (inputDataType) {
            case GS1:
                content = Gs1.verify(data, FNC1_STRING);
                readable = data.replace('[', '(').replace(']', ')');
                break;
            case HIBC:
                content = hibcProcess(data);
                break;
            default:
                content = data;
                break;
        }

        if (content.isEmpty() && !emptyContentAllowed) {
            throw new OkapiException("No input data");
        }

        encode();
        plotSymbol();
        mergeVerticalBlocks();
    }
1252977
public void run(final List<Tuple> data) {
        List<Tuple> dataCopy = new ArrayList<>(data);
        this.labels = data.parallelStream().map(x -> x.label).collect(Collectors.toSet());
        if (shuffleData) {
            Collections.shuffle(dataCopy);
        }

        int chunkSize = data.size() / nfold;

        int reminder = data.size() % chunkSize;

        for (int i = data.size() - 1; i > data.size() - 1 - reminder; i--) {
            LOG.info("Dropping the tail id: " + data.get(i).id);
        }

        for (int i = 0; i < nfold; i++) {
            System.err.println("Cross validation round " + (i + 1) + "/" + nfold);
            List<Tuple> testing = new ArrayList<>(data.subList(i, i + chunkSize));
            List<Tuple> training = new ArrayList<>(data.subList(0, i));
            training.addAll(data.subList(i + chunkSize, data.size()));

            eval(training, testing, i);
        }
    }
901988
public void put(E el, P pseudo, D data)
    {
        if (pseudo == null)
            mainMap.put(el, data);
        else
        {
            HashMap<P, D> map = pseudoMaps.get(el);
            if (map == null)
            {
                map = new HashMap<P, D>();
                pseudoMaps.put(el, map);
            }
            map.put(pseudo, data);
        }
    }
144296
public static void parse(String content, Object data) {
    if (content == null) {
      return;
    }
    try {
      parse(new StringReader(content), data);
    } catch (IOException exception) {
      // I/O exception not expected on a string
      throw Throwables.propagate(exception);
    }
  }
457404
public void setData(final List data) {
		// Bean properties to render
		String[] properties = new String[]{"colour", "shape", "animal"};

		simpleTable.setDataModel(new SimpleBeanListTableDataModel(properties, data));
	}
717674
public void append(final byte[] data, final int start, final int len) {
		final int oldLength = this.bytes.length;
		setCapacity(this.bytes.length + len, true);
		System.arraycopy(data, start, this.bytes, oldLength, len);
	}
448274
public void setData(byte[] data) {
        if (immutable) {
            throw new IllegalStateException(ERR_MSG_IMMUTABLE);
        }
        if (data == null) {
            this.data = null;
        } else {
            setData(data, 0, data.length);
        }
    }
627973
private static Data checkData(final Data data) {
		if (Data.EMPTY.equals(data)) {
			throw new IllegalStateException("Argument 'data' must not be empty.");
		}
		return data;
	}
196684
public void setWrappedData(Object data) {
        if (data == null) {
            inner = null;
            arrayFromInner = null;
            setRowIndex(-1);
        } else {
            inner = (Collection<E>) data;            
            arrayFromInner = (E[]) new Object[inner.size()];
            inner.toArray(arrayFromInner);
            setRowIndex(0);
        }
    }
319364
public void characters(char[] data, int start, int length) {
        if (length >= 0)  {
            String characterData = new String(data, start, length);
            trace("characters:" + characterData);
            if (currentElement == null) {
                warn("Can't append text node to null currentElement");
            } else {
                Text textNode = currentDocument.createTextNode(characterData);
                currentElement.appendChild(textNode);
            }
        } else {
            warn("characters called with negative length");
        }
    }
866449
public void handleData(String data) {
		try {
			sendEvent(new ClickEvent(this.user, getPayload()));
			if (clickHandler != null)
				clickHandler.clicked();
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
750954
public void writeStringUTF8(String data) throws AsnException, IOException {

		this.writeStringUTF8(Tag.CLASS_UNIVERSAL, Tag.STRING_UTF8, data);
	}
533820
protected void buildData(String[] data, boolean validateOnly) {

        if (data == null) {
            return;
        }

        int length = data.length;

        for (int i = 0; i < length; i++) {
            addAddressToList(data[i], validateOnly);
        }

    }
224710
public void put(int[] data) {
    final int l = data.length;
    for(int i = 0; i < l; i++) {
      put(data[i]);
    }
  }
1359989
protected boolean parse(String data) throws Exception {
        if (data == null || data.isEmpty()) {
            return true;
        }

        // ZAP: Replace all "\n" with "\r\n" to parse correctly
        String newData = data.replaceAll("(?<!\r)\n", CRLF);
        // ZAP: always use CRLF to comply with HTTP specification
        // even if the data it's not directly used.
        mLineDelimiter = CRLF;

        String[] split = patternCRLF.split(newData);
        mStartLine = split[0];

        String token = null,
                name = null,
                value = null;
        int pos = 0;

        StringBuilder sb = new StringBuilder(2048);
        for (int i = 1; i < split.length; i++) {
            token = split[i];
            if (token.equals("")) {
                continue;
            }

            if ((pos = token.indexOf(":")) < 0) {
                mMalformedHeader = true;
                return false;
            }
            name = token.substring(0, pos).trim();
            value = token.substring(pos + 1).trim();

            if (name.equalsIgnoreCase(CONTENT_LENGTH)) {
                try {
                    mContentLength = Integer.parseInt(value);
                } catch (NumberFormatException nfe) {
                }
            }

            /*
             if (name.equalsIgnoreCase(PROXY_CONNECTION)) {
             sb.append(name + ": " + _CLOSE + mLineDelimiter);
             } else if (name.equalsIgnoreCase(CONNECTION)) {
             sb.append(name + ": " + _CLOSE + mLineDelimiter);
             } else {
             */
            sb.append(name + ": " + value + mLineDelimiter);
            //}

            addInternalHeaderFields(name, value);
        }

        mMsgHeader = sb.toString();
        return true;
    }