setCompleteRedYellowGreenDefinition(string, ) -> None

        .
968364
def setCompleteRedYellowGreenDefinition(self, tlsID, tls):
        
        length = 1 + 4 + 1 + 4 + \
            len(tls._subID) + 1 + 4 + 1 + 4 + 1 + 4 + 1 + 4  # tls parameter
        itemNo = 1 + 1 + 1 + 1 + 1
        for p in tls._phases:
            length += 1 + 4 + 1 + 4 + 1 + 4 + 1 + 4 + len(p._phaseDef)
            itemNo += 4
        self._connection._beginMessage(
            tc.CMD_SET_TL_VARIABLE, tc.TL_COMPLETE_PROGRAM_RYG, tlsID, length)
        self._connection._string += struct.pack("!Bi",
                                                tc.TYPE_COMPOUND, itemNo)
        # programID
        self._connection._packString(tls._subID)
        # type
        self._connection._string += struct.pack("!Bi", tc.TYPE_INTEGER, 0)
        # subitems
        self._connection._string += struct.pack("!Bi", tc.TYPE_COMPOUND, 0)
        # index
        self._connection._string += struct.pack("!Bi",
                                                tc.TYPE_INTEGER, tls._currentPhaseIndex)
        # phaseNo
        self._connection._string += struct.pack("!Bi",
                                                tc.TYPE_INTEGER, len(tls._phases))
        for p in tls._phases:
            self._connection._string += struct.pack("!BiBiBi", tc.TYPE_INTEGER,
                                                    p._duration, tc.TYPE_INTEGER, p._duration1, tc.TYPE_INTEGER, p._duration2)
            self._connection._packString(p._phaseDef)
        self._connection._sendExact()
408973
private static String discardBeginningHyphen(String string) {
		String noHyphenString = string;
		if (string.startsWith("-")) {
			noHyphenString = string.substring(1); // Oh well, just throw away
													// the awful "-". No one
													// will ever notice...
		}
		return noHyphenString;
	}
477054
public HSlicePredicate<N> setEndOn(N finish) {
    this.finish = finish;
    predicateType = PredicateType.Range;
    return this;
  }
1359699
@Override
    public void setCompletedLTCBoundary(Byte completedLTCBoundary) {
        if (tc.isDebugEnabled())
            Tr.debug(tc, "setCompletedLTCBoundary", new Object[] { completedLTCBoundary });
        _completedLTCBoundary = completedLTCBoundary;
    }
345191
private void addNonEmptyStatement(
      Node n, Context context, boolean allowNonBlockChild) {
    Node nodeToProcess = n;

    if (!allowNonBlockChild && !n.isBlock()) {
      throw new Error("Missing BLOCK child.");
    }

    // Strip unneeded blocks, that is blocks with <2 children unless
    // the CodePrinter specifically wants to keep them.
    if (n.isBlock()) {
      int count = getNonEmptyChildCount(n, 2);
      if (count == 0) {
        if (cc.shouldPreserveExtraBlocks()) {
          cc.beginBlock();
          cc.endBlock(cc.breakAfterBlockFor(n, context == Context.STATEMENT));
        } else {
          cc.endStatement(true);
        }
        return;
      }

      if (count == 1) {
        // Preserve the block only if needed or requested.
        //'let', 'const', etc are not allowed by themselves in "if" and other
        // structures. Also, hack around a IE6/7 browser bug that needs a block around DOs.
        Node firstAndOnlyChild = getFirstNonEmptyChild(n);
        boolean alwaysWrapInBlock = cc.shouldPreserveExtraBlocks();
        if (alwaysWrapInBlock || isBlockDeclOrDo(firstAndOnlyChild)) {
          cc.beginBlock();
          add(firstAndOnlyChild, Context.STATEMENT);
          cc.maybeLineBreak();
          cc.endBlock(cc.breakAfterBlockFor(n, context == Context.STATEMENT));
          return;
        } else {
          // Continue with the only child.
          nodeToProcess = firstAndOnlyChild;
        }
      }
    }

    if (nodeToProcess.isEmpty()) {
      cc.endStatement(true);
    } else {
      add(nodeToProcess, context);
    }
  }
369671
private void setNonEmptyStringParameter(String key, String value){
        if (value == null){
            parameters.remove(key);
        }
        else if (value.length() == 0){
            throw new IllegalArgumentException("Value cannot be empty.");
        }
        else{
            parameters.put(key, value);
        }
    }
592381
def reset(self):
        
        self.expr = []
        self.matcher = None
        self.last_matcher = None
        self.description = None
536572
private void setLastCompleted(long lastCompleted) {
    if (!log.isOpen())
      return;

    this.lastCompleted = Math.max(this.lastCompleted, lastCompleted);

    // Update the log compaction minor index.
    log.compactor().minorIndex(this.lastCompleted);

    completeSnapshot();
  }
333013
def _SetCompleted(self):
    
    with self._lock:
      if self._completed:
        return False
      self._completed = True
      return True
162645
public void setDefinition(PluginDefinition definition) {
        if (this.definition != null) {
            if (this.definition == definition) {
                return;
            }
            
            CWFException.raise("Cannot modify plugin definition.");
        }
        
        this.definition = definition;
        
        // Assign any default property values.
        if (definition != null) {
            for (PropertyInfo propInfo : definition.getProperties()) {
                String dflt = propInfo.getDefault();
                
                if (dflt != null) {
                    try {
                        propInfo.setPropertyValue(this, dflt);
                    } catch (Exception e) {
                        log.error("Error setting default value for property " + propInfo.getName(), e);
                    }
                }
            }
        }
    }
1033105
def setBlockCompleted(pieceIndex, blockOffset, bool, clearRequested = :clear_requested)
      bi = blockIndexFromPieceAndOffset(pieceIndex, blockOffset)
      @requestedBlocks.clear bi if clearRequested == :clear_requested
      if bool
        @completeBlocks.set bi
        if allBlocksInPieceCompleted?(pieceIndex)
          yield pieceIndex if block_given?
          @completePieces.set pieceIndex
        end
      else
        @completeBlocks.clear bi
        @completePieces.clear pieceIndex
      end
    end
611069
void outputComplementDirect(StringBuffer buf) {
      if (!surrogatesDirect && getContainsBmp() == NONE)
        buf.append("[\u0000-\uFFFF]");
      else {
        buf.append("[^");
        inClassOutputDirect(buf);
        buf.append(']');
      }
    }
531147
function _initComplete(err) {
          if( !isResolved ) {
            isResolved = true;
            if( err ) { def.reject(err); }
            else { def.resolve(firebaseObject); }
          }
        }
1102022
public void onCompletion(CmmnActivityExecution execution) {
    ensureTransitionAllowed(execution, ACTIVE, COMPLETED, "complete");
    canComplete(execution, true);
    completing(execution);
  }
792278
function ifDefinedDirective(value) {
  return function(part) {
    if (value === undefined && isAttributePart(part)) {
      return part.setValue(nothingString);
    }
    part.setValue(value);
  };
}
1145404
def _SkipLengthDelimited(buffer, pos, end):
  """"""

  (size, pos) = _DecodeVarint(buffer, pos)
  pos += size
  if pos > end:
    raise _DecodeError('Truncated message.')
  return pos
5450
private void handleCompleter( CountedCompleter cc ) {
    assert cc instanceof H2OCountedCompleter;
    if( _fjtasks == null || !_fjtasks.contains(cc) )
      addCompleter((H2OCountedCompleter)cc);
    _dt.setCompleter(null);
  }