Increment the given {@code data} array.

@param data the given {@code data} array.
@return the given {@code data} array.
@throws NullPointerException if the {@code data} array is {@code null}.
490083
public static byte[] increment(final byte[] data) {
		for (int i = 0; i < data.length && (data[i] += (byte)1) == 0; ++i);
		return data;
	}
684754
static public byte[] getBytes(StringBuffer data) {
        if (null == data) {
            return null;
        }
        int len = data.length();
        char[] chars = new char[len];
        data.getChars(0, len, chars, 0);
        byte[] bytes = new byte[len];
        for (int i = 0; i < len; i++) {
            bytes[i] = (byte) chars[i];
        }
        return bytes;
    }
235283
public void learn(double[][] data) {
        int p = data[0].length;
        Attribute[] attributes = new Attribute[p];
        for (int i = 0; i < p; i++) {
            attributes[i] = new NumericAttribute("V"+i);
        }
        learn(attributes, data);
    }
367670
double[] findMinMax(double[] data) {

    double min = Double.MAX_VALUE;
    double max = -Double.MAX_VALUE;

    for (double dataPoint : data) {

      if (Double.isNaN(dataPoint)) {
        continue;
      } else {
        if (dataPoint < min) {
          min = dataPoint;
        }
        if (dataPoint > max) {
          max = dataPoint;
        }
      }
    }

    return new double[] {min, max};
  }
1218378
public static Data toHeapData(Data data) {
        if (data == null || data instanceof HeapData) {
            return data;
        }
        return new HeapData(data.toByteArray());
    }
552869
public void newDataReady(DataType data) {
		ArrayList<Runnable> list;
		synchronized (this) {
			if (end) throw new IllegalStateException("method endOfData already called, method newDataReady is not allowed anymore");
			waitingData.addLast(data);
			list = listeners;
			listeners = null;
		}
		if (list != null) {
			for (Runnable listener : list) listener.run();
		}
		// notify after listeners
		synchronized (this) {
			this.notify();
		}
	}
866615
public void appendData(byte[] data) throws IOException, SymmetricKeyException {
        if (data == null)
            return;
        appendData(data, 0, data.length);
    }
819565
@Nullable
  public static int[] getIntArray(@Nullable final JsonArray array) {
    if (null == array) return null;
    return IntStream.range(0, array.size()).map(i -> array.get(i).getAsInt()).toArray();
  }
2776
public synchronized boolean add(SpdData data) {
        if (data == null) {
            return false;
        } else if (members.contains(data)) {
            return false;
        } else {
            return members.add(data);
        }
    }
1214328
private void add(Iterable<?> data) {

    for (Object el : data) {
      try {
        add(SoyData.createFromExistingData(el));

      } catch (SoyDataException sde) {
        sde.prependIndexToDataPath(list.size());
        throw sde;
      }
    }
  }
1052205
public void addRow(final String[] data) {
		if (anyStringContainsNewLine(data)) {
			final String[][] theMatrix = Util.createMatrix(data);
			for (int i = 0; i < theMatrix.length; i++) {
				addRow(theMatrix[i]);
			}
		} else {
			final Row myRow = new Row(this, data);
			rows.add(myRow);
		}

	}
469689
static final Map<String, Object> previousAndCurrentToDelta(List<Map<String, Object>> data) {
        if (data.size() == 2) {
            Map<String, Object> previous = data.get(0);
            Map<String, Object> current = data.get(1);
            return previousAndCurrentToDelta(previous, current);
        } else {
            throw new IllegalArgumentException("Must be list of 2 items");
        }

    }
1060324
public static List<Example<String, String>> exampleArrayToList(String[][] data) {
    List<Example<String, String>> pairs = Lists.newArrayList();
    for (int i = 0; i < data.length; i++) {
      pairs.add(new Example<String, String>(data[i][0], data[i][1]));
    }
    return pairs;
  }
830205
public final void setData(@Nullable Data<?> data) {
        setDatas(data != null ? singleton(data) : Collections.<Data<?>>emptyList());
    }
1007086
@Override
	public void updateComponent(final Object data) {
		MyData myData = (MyData) data;
		name.setText("<B>" + myData.getName() + "</B>");
		count.setText(String.valueOf(myData.getCount()));
	}
735649
public void addData(final Data DATA) {
        sum += DATA.getValue();
        window.add(DATA);
        if (window.size() > numberPeriod) {
            sum -= window.remove().getValue();
        }
    }
1136454
static byte[] append(byte[] data, boolean[] toAppend) {
        byte[] toAppendBytes = new byte[toAppend.length];
        for (int i = 0; i < toAppend.length; i++) {
            toAppendBytes[i] = toAppend[i] ? (byte) 1 : (byte) 0;
        }
        return append(data, toAppendBytes);
    }