Evaluate revoked output.
@param {edb.Input} input
556995
function(input) {
		var matches = this._matches;
		var watches = this._watches;
		var best = edb.InputPlugin._bestmatch(input.type, watches, true);
		if (best) {
			var oldinput = matches.filter(function(input) {
				return input.type === best;
			})[0];
			var index = matches.indexOf(oldinput);
			matches.splice(index, 1);
			this.done = this._done();
			if (!this.done) {
				input.revoked = true;
				this._updatehandlers(input);
			}
		}
	}
1370193
function(input) {
        var state = this.state;
        var eventType = input.eventType;

        var isRecognized = state & (STATE_BEGAN | STATE_CHANGED);
        var isValid = this.attrTest(input);

        // on cancel input and we've recognized before, return STATE_CANCELLED
        if (isRecognized && (eventType & INPUT_CANCEL || !isValid)) {
            return state | STATE_CANCELLED;
        } else if (isRecognized || isValid) {
            if (eventType & INPUT_END) {
                return state | STATE_ENDED;
            } else if (!(state & STATE_BEGAN)) {
                return STATE_BEGAN;
            }
            return state | STATE_CHANGED;
        }
        return STATE_FAILED;
    }
1246302
private void MungeInput() {
        int srci = 0;
        int dsti = 0;
        byte b;
        boolean  inMarkup = false;
        int      openTags = 0;
        int      badTags  = 0;
        
        //
        //  html / xml markup stripping.
        //     quick and dirty, not 100% accurate, but hopefully good enough, statistically.
        //     discard everything within < brackets >
        //     Count how many total '<' and illegal (nested) '<' occur, so we can make some
        //     guess as to whether the input was actually marked up at all.
        if (fStripTags) {
            for (srci = 0; srci < fRawLength && dsti < fInputBytes.length; srci++) {
                b = fRawInput[srci];
                if (b == (byte)'<') {
                    if (inMarkup) {
                        badTags++;
                    }
                    inMarkup = true;
                    openTags++;
                }
                
                if (! inMarkup) {
                    fInputBytes[dsti++] = b;
                }
                
                if (b == (byte)'>') {
                    inMarkup = false;
                }        
            }
            
            fInputLen = dsti;
        }
        
        //
        //  If it looks like this input wasn't marked up, or if it looks like it's
        //    essentially nothing but markup abandon the markup stripping.
        //    Detection will have to work on the unstripped input.
        //
        if (openTags<5 || openTags/5 < badTags || 
                (fInputLen < 100 && fRawLength>600)) {
            int limit = fRawLength;
            
            if (limit > kBufSize) {
                limit = kBufSize;
            }
            
            for (srci=0; srci<limit; srci++) {
                fInputBytes[srci] = fRawInput[srci];
            }
            fInputLen = srci;
        }
        
        //
        // Tally up the byte occurence statistics.
        //   These are available for use by the various detectors.
        //
        Arrays.fill(fByteStats, (short)0);
        for (srci=0; srci<fInputLen; srci++) {
            int val = fInputBytes[srci] & 0x00ff;
            fByteStats[val]++;
        }
        
        fC1Bytes = false;
        for (int i = 0x80; i <= 0x9F; i += 1) {
            if (fByteStats[i] != 0) {
                fC1Bytes = true;
                break;
            }
        }
     }
1234405
function standardizeInput(input) {
  if ([undefined, null].indexOf(input) !== -1) {
    input = null;
  }
  else if (_.isNaN(input)) {
    input = null;
  }
  else if (_.isString(input)) {
    input = input.trim();

    // Written empty values
    if (["unspecified", "unknown", "none", "null", "empty", ""].indexOf(input.toLowerCase()) !== -1) {
      input = null;
    }
  }

  return input;
}
1198867
function detectUserInput () {
	let validatePath = program.input;

	if (typeof validatePath !== 'string') {
		validatePath = process.cwd();
	} else {
		if (!(/^(http(s)?:)?\/\//i.test(validatePath))) {
			if (/^\//.test(validatePath)) {
				validatePath = path.resolve(validatePath);
			}
		}
	}
	return validatePath;
}
400241
function purify(input) {
    var result = [], indent = null, codeBlock = false;
    
    // We can have two types of lines:
    // - those beginning with *
    // - and those without it
    input.split("\n").forEach(function(line) {
        // chomp !
        line = line.replace(/(\n|\r)+$/, '');

        if (!codeBlock && /^\s*\*\s*```/.test(line))
          codeBlock = true;
        else if (codeBlock && /^\s*\*\s*```/.test(line))
          codeBlock = false;

        var m;
        if ( ( m = line.match(/^\s*\*\s?(.*)$/)) ) {
            // When comment contains *-lines, switch indent-trimming off
            indent = 0;
            
            if (codeBlock)
              result.push(m[1]);
            else
              result.push(m[1].replace(/^\s+/,""));
        }
        else if (/^\s*$/.test(line)) {
            // pass-through empty lines
            result.push(line);
        }
        else if (indent === undefined && (m = line.match(/^(\s*)(.*?$)/) ) ) {
            // When indent not measured, measure it and remember
            indent = m[1];
            result.push(m[2]);
        }
        else {
            // Trim away indent if available
            //result.push(line.replace(new RegExp("^\s{0," + indent + "}"), ""));
            result.push(line.replace(/^\s+/,""));
        }
    });

    return result.join("\n");
}
896857
function encodeInputs(inputs, add_address_to_previous_output_index) {
    //Initialize buffer and offset
    let offset = 0;
    var buffer = Buffer.allocUnsafe(100000);
    //Write number of inputs
    offset += bufferutils.writeVarInt(buffer, inputs.length, offset);

    inputs.forEach((input, index) => {
        //Write reversed hash
        offset += Buffer.from(input.previous_output.hash, 'hex').reverse().copy(buffer, offset);
        //Index
        offset = buffer.writeUInt32LE(input.previous_output.index, offset);
        if (add_address_to_previous_output_index !== undefined) {
            if (index == add_address_to_previous_output_index) {
                let lockregex = /^\[\ ([a-f0-9]+)\ \]\ numequalverify dup\ hash160\ \[ [a-f0-9]+\ \]\ equalverify\ checksig$/gi;
                if (input.previous_output.script && input.previous_output.script.match(lockregex)) {
                    let locktime = lockregex.exec(input.previous_output.script.match(lockregex)[0])[1];
                    offset = writeScriptLockedPayToPubKeyHash(input.previous_output.address, locktime, buffer, offset);
                } else {
                    if (Script.hasAttenuationModel(input.previous_output.script)) {
                        let params = Script.getAttenuationParams(input.previous_output.script);
                        offset = writeAttenuationScript(params.model, (params.hash !== '0000000000000000000000000000000000000000000000000000000000000000') ? params.hash : undefined, (params.index >= 0) ? params.index : undefined, input.previous_output.address, buffer, offset);
                    } else {
                        if (Script.isP2SH(input.previous_output.script)) {
                            let script_buffer = Buffer.from(input.redeem, 'hex');
                            offset += bufferutils.writeVarInt(buffer, script_buffer.length, offset);
                            offset += script_buffer.copy(buffer, offset);
                        } else {
                            if (input.previous_output.script) {
                                let script_buffer = Script.fromASM(input.previous_output.script).toBuffer()
                                offset += bufferutils.writeVarInt(buffer, script_buffer.length, offset);
                                offset += script_buffer.copy(buffer, offset);
                            } else {
                                offset = writeScriptPayToPubKeyHash(input.previous_output.address, buffer, offset);
                            }
                        }
                    }
                }
            } else {
                offset = buffer.writeUInt8(0, offset);
            }
        } else {
            //input script
            let script_buffer = encodeInputScript(input.script);
            offset += bufferutils.writeVarInt(buffer, script_buffer.length, offset);
            offset += script_buffer.copy(buffer, offset);
        }

        offset = buffer.writeUInt32LE(input.sequence, offset);
    });
    return buffer.slice(0, offset);
}
357315
def eval_input input
    [loop_eval(input), nil]
  rescue SystemExit
    throw(:rib_exit, input)
  rescue Exception => e
    [nil, e]
  ensure
    config[:line] += 1
  end
213106
def clean(inputline, strip=True, rem_indents=True, encoding_errors="replace"):
    """"""
    stdout_encoding = get_encoding(sys.stdout)
    inputline = str(inputline)
    if rem_indents:
        inputline = inputline.replace(openindent, "").replace(closeindent, "")
    if strip:
        inputline = inputline.strip()
    return inputline.encode(stdout_encoding, encoding_errors).decode(stdout_encoding)
1225501
void clearInput() throws IOException {
        if (commPort.bytesAvailable() > 0) {
            int len = commPort.bytesAvailable();
            byte buf[] = new byte[len];
            readBytes(buf, len);
            if (logger.isDebugEnabled()) {
                logger.debug("Clear input: {}", ModbusUtil.toHex(buf, 0, len));
            }
        }
    }
233781
function parseInput(input) {
  var match = re.exec(input);

  if (match !== null) {
    var _match = _slicedToArray(match, 6),
        pre_keyword = _match[1],
        operator_keyword = _match[2],
        value = _match[3],
        unit = _match[4],
        post_keyword = _match[5];

    if (pre_keyword && post_keyword || pre_keyword && operator_keyword || post_keyword && operator_keyword) {
      return null;
    }

    return {
      value: sanitizeValue({
        value: value,
        operator_keyword: operator_keyword,
        post_keyword: post_keyword
      }),
      unit: unit
    };
  }

  return null;
}
1080166
function onRemove( error ) {
		if ( error ) {
			debug( 'Error encountered while attempting to delete a temporary input file %s: %s', inFile, error.message );
			return done( error );
		}
		debug( 'Successfully deleted temporary input file: %s', inFile );
		if ( dest === void 0 ) {
			debug( 'Reading temporary output file: %s', outFile );
			return readFile( outFile, {'encoding':'utf8'}, onFile );
		}
		done();
	}
273664
def detokenize(self, inputs, delim=' '):
        
        detok = delim.join([self.idx2tok[idx] for idx in inputs])
        detok = detok.replace(self.separator + ' ', '')
        detok = detok.replace(self.separator, '')

        detok = detok.replace(config.BOS_TOKEN, '')
        detok = detok.replace(config.EOS_TOKEN, '')
        detok = detok.replace(config.PAD_TOKEN, '')
        detok = detok.strip()
        return detok
17806
def ask_input(self, prompt):
        """"""
        self._vim.command('call inputsave()')
        self._vim.command('let user_input = input("{} ")'.format(prompt))
        self._vim.command('call inputrestore()')
        response = self._vim.eval('user_input')
        self._vim.command('unlet user_input')
        return response
69435
public static String stripMaliciousHeaderChars(String input) 
    {
        for (char c : MALICIOUS_HEADER_CHARS) {
            input = StringUtils.remove(input, c);
        }
        return input;
    }
778109
function(input) {

			if (!isFullId && baseCharSet.set == DEFAULT_BASESET)
			{
				input = Utils.getObjectIdTime(input);
			}

			var bitStream = BitStream(String(input), baseCharSet);

			var result = '';
			while (!bitStream.isEOF())
			{
				var value = bitStream.getBits(encodingCharSet.bits);
				var nextChar = encodingCharSet.encode(value);
				if (isInverse)
				{
					result = nextChar + result;
				}
				else
				{
					result += nextChar;
				}
			}

			return result;
		}
481191
function checkOutput(input, output) {
  let reg = new RegExp('\\$1');
  if (reg.test(output)) {
    if (Array.isArray(input)) {
      const outputMin = input.map(file => {
        return utils.setFileNameMin(file, output);
      });
      return { output: outputMin };
    } else {
      return { output: utils.setFileNameMin(input, output) };
    }
  }
}