append the index for the probe and append nulls for the build
427687
public void appendNullForBuild(JoinProbe probe)
    {
        // probe side
        appendProbeIndex(probe);

        // build side
        buildPageBuilder.declarePosition();
        for (int i = 0; i < buildOutputChannelCount; i++) {
            buildPageBuilder.getBlockBuilder(i).appendNull();
        }
    }
1295964
void addListenerByProbe(ProbeImpl probe, ProbeListener listener) {
        Set<ProbeListener> listeners = listenersByProbe.get(probe);
        if (listeners == null) {
            listeners = new CopyOnWriteArraySet<ProbeListener>();
            listenersByProbe.putIfAbsent(probe, listeners);
            listeners = listenersByProbe.get(probe);
        }
        listeners.add(listener);
    }
968963
function startForeverWithIndex( index, doneCB ) {
  log( 'Attempting to start ' + index + ' as daemon.');

  var config;
  var appendConfig = function(prop, value) {
    log('Adding to config: ' + prop + ', ' + value);
    if(value !== undefined) {
      config[prop] = value;
    }
  };
  done = doneCB || this.async();
  findProcessWithIndex( index, function(process) {
    // if found, be on our way without failing.
    if( typeof process !== 'undefined' ) {
      warn( index + ' is already running.');
      log( forever.format(true, [process]) );
      done();
    }
    else {
      gruntRef.file.mkdir(logDir);
      // 'forever start -o out.log -e err.log -c node -a -m 3 index.js';
      config = {
        command: commandName,
        append: true,
        max: 3,
        killSignal: killSignal
      };
      appendConfig('errFile', errFile);
      appendConfig('outFile', outFile);
      appendConfig('logFile', logFile);
      forever.startDaemon( index, config );
      log( 'Logs can be found at ' + logDir + '.' );
      done();
    }
  });
}
468424
def append(self, position, array):
        """"""
        if not Gauged.map_append(self.ptr, position, array.ptr):
            raise MemoryError
1154729
function(params, options) {
      var t = this,
          port = t.get('port'),
          server = t.get('server'),
          templates = t.get('templates'),
          siteDbPath = t.get('siteDbPath'),
          parentPath = siteDbPath.indexOf('.') === 0 ? process.cwd() : '';

      // Distribute the site path to probes that need it
      t.set('siteDbPath', Path.join(parentPath, siteDbPath));

      // Initialize probes
      SyncProbe.Config.defaultProbe = 'FileSyncProbe';
      SyncProbe.FileSyncProbe.setRootPath(siteDbPath);

      // Expose the current instance so probes running
      // in this process can communicate with the server
      UI.Server.currentServer = t;

      // Internal (non-model) attributes
      t.apps = {};  // Hash appName -> app data
      t.site = null;   // Site model associated with the server

      // Create a connect server if no custom server was specified
      if (!server) {
        server = new Connect();
        t.set({server: server});
      }

      // Attach server components
      server.use(t.siteRoute.bind(t));
      server.use(Connect['static'](Path.join(__dirname, '/../..')));

      // Create a static server to the monitor distribution
      var monitorDistDir = require.resolve('monitor').replace(/lib[\\\/]index.js/, 'dist');
      t.monitorDist = Connect['static'](monitorDistDir);

      // Initialize the template library
      var gruntModules = GruntConfig.MODULE_DEF;
      gruntModules.templates.sort().forEach(function(template){
        var path = Path.normalize(__dirname + '/../../' + template);
        var id = Path.basename(path, '.html');
        templates.add({id:id, path:path});
      });

      // Build the page parameters from the config file
      var styles = "", scripts="";
      gruntModules.client_css.forEach(function(cssFile) {
        styles += CSS_TEMPLATE({cssFile: cssFile.replace('lib/','/static/')});
      });
      var clientScripts = gruntModules.client_ext.concat(gruntModules.shared_js.concat(gruntModules.client_js));
      clientScripts.forEach(function(file) {
        scripts += JS_TEMPLATE({scriptFile: file.replace('lib/','/static/')});
      });
      _.extend(PAGE_PARAMS, {
        styles: styles, scripts: scripts, version: PACKAGE_JSON.version
      });
    }
890018
def append(self, timestamp, key, value, headers=[]):
        
        if self._closed:
            return None

        offset = self._next_offset
        metadata = self._builder.append(offset, timestamp, key, value, headers)
        # Return of None means there's no space to add a new message
        if metadata is None:
            return None

        self._next_offset += 1
        return metadata
910918
private IndexMetadata buildModernIndex(
      CqlIdentifier keyspaceId, CqlIdentifier tableId, AdminRow row) {
    CqlIdentifier name = CqlIdentifier.fromInternal(row.getString("index_name"));
    IndexKind kind = IndexKind.valueOf(row.getString("kind"));
    Map<String, String> options = row.getMapOfStringToString("options");
    String target = options.get("target");
    return new DefaultIndexMetadata(keyspaceId, tableId, name, kind, target, options);
  }
573911
public void append(int key, int value) {
        if (mSize != 0 && key <= mKeys[mSize - 1]) {
            put(key, value);
            return;
        }

        int pos = mSize;
        if (pos >= mKeys.length) {
            int n = ArrayUtils.idealIntArraySize(pos + 1);

            int[] nkeys = new int[n];
            int[] nvalues = new int[n];

            // Log.e("SparseIntArray", "grow " + mKeys.length + " to " + n);
            System.arraycopy(mKeys, 0, nkeys, 0, mKeys.length);
            System.arraycopy(mValues, 0, nvalues, 0, mValues.length);

            mKeys = nkeys;
            mValues = nvalues;
        }

        mKeys[pos] = key;
        mValues[pos] = value;
        mSize = pos + 1;
    }
774090
protected void appendCopy(RoaringArray sa, int index) {
    extendArray(1);
    this.keys[this.size] = sa.keys[index];
    this.values[this.size] = sa.values[index].clone();
    this.size++;
  }
1301690
private void addMissingBlanks(final int index) {
		final int count = index - this.list.size();
		for (int i = 0; i < count; i++)
			this.list.add(this.blankElement);
	}

	/** Postcondition: this.list.get(this.list.size()-1) != blankElement */
	private void removeTrail() {
		int last = this.list.size() - 1;
		while (last >= 0 && this.list.get(last) == this.blankElement) {
			this.list.remove(last);
			last = this.list.size() - 1;
		}
	}

    /**
     * @return the capacity of the full list
     */
    public int capacity() {
		if (this.capacity < this.list.size())
			this.capacity = this.list.size();

		return this.capacity;
    }
}
570571
@SuppressWarnings("unchecked")
  private void applyIndex(long index) {
    // Apply entries prior to this entry.
    if (reader.hasNext() && reader.getNextIndex() == index) {
      // Read the entry from the log. If the entry is non-null then apply it, otherwise
      // simply update the last applied index and return a null result.
      Indexed<RaftLogEntry> entry = reader.next();
      try {
        if (entry.index() != index) {
          throw new IllegalStateException("inconsistent index applying entry " + index + ": " + entry);
        }
        CompletableFuture future = futures.remove(index);
        apply(entry).whenComplete((r, e) -> {
          raft.setLastApplied(index);
          if (future != null) {
            if (e == null) {
              future.complete(r);
            } else {
              future.completeExceptionally(e);
            }
          }
        });
      } catch (Exception e) {
        logger.error("Failed to apply {}: {}", entry, e);
      }
    } else {
      CompletableFuture future = futures.remove(index);
      if (future != null) {
        logger.error("Cannot apply index " + index);
        future.completeExceptionally(new IndexOutOfBoundsException("Cannot apply index " + index));
      }
    }
  }
669613
protected Set<ProbeListener> getProbeListeners(ProbeImpl probe) {
        Set<ProbeListener> listeners = enabledProbes.get(probe);
        if (listeners == null) {
            listeners = Collections.emptySet();
        }
        return listeners;
    }
986400
public void add(int index, int offset) {
        ensureCapacity();
        _buffer.putInt(index);
        _buffer.putInt(offset);
    }
991479
synchronized void addProbesByListener(ProbeListener listener, Collection<ProbeImpl> probes) {
        Set<ProbeImpl> listenerProbes = probesByListener.get(listener);
        if (listenerProbes == null) {
            listenerProbes = new HashSet<ProbeImpl>();
            probesByListener.put(listener, listenerProbes);
        }
        listenerProbes.addAll(probes);
    }
1024857
protected void appendCopy(RoaringArray sa, int startingIndex, int end) {
    extendArray(end - startingIndex);
    for (int i = startingIndex; i < end; ++i) {
      this.keys[this.size] = sa.keys[i];
      this.values[this.size] = sa.values[i].clone();
      this.size++;
    }
  }
835443
protected void appendPagination(SolrQuery query, @Nullable Long offset, @Nullable Integer rows) {

		if (offset != null && offset.intValue() >= 0) {
			query.setStart(offset.intValue());
		}
		if (rows != null && rows >= 0) {
			query.setRows(rows);
		}
	}
265746
@Override
    public void add(int index, T elem) {
        /* Confirm the validity of the index. */
        if (index < 0 || index >= size())
            throw new IndexOutOfBoundsException("Index " + index + ", size " + size());

        /* Add a dummy element to ensure that everything resizes correctly.
         * There's no reason to repeat the logic.
         */
        add(null);

        /* Next, we need to shuffle down every element that appears after
         * the inserted element.  We'll do this using our own public interface.
         */
        for (int i = size(); i > index; ++i)
            set(i, get(i - 1));

        /* Finally, write the element. */
        set(index, elem);
    }