_id
stringlengths
2
7
title
stringclasses
1 value
partition
stringclasses
3 values
text
stringlengths
6
2.61k
language
stringclasses
1 value
meta_information
dict
c24600
train
// RegisteredFor will return all rules that are registered for a // specified ast node.
{ "resource": "" }
c24601
train
// See if the string matches the patterns for the statement.
{ "resource": "" }
c24602
train
// see if we can figure out what it is
{ "resource": "" }
c24603
train
// NewSQLStrConcat looks for cases where we are building SQL strings via concatenation
{ "resource": "" }
c24604
train
// NewSQLStrFormat looks for cases where we're building SQL query strings using format strings
{ "resource": "" }
c24605
train
// ReadFrom implements the io.ReaderFrom interface. This // should be used with io.Reader to load configuration from //file or from string etc.
{ "resource": "" }
c24606
train
// WriteTo implements the io.WriteTo interface. This should // be used to save or print out the configuration information.
{ "resource": "" }
c24607
train
// Get returns the configuration section for the supplied key
{ "resource": "" }
c24608
train
// GetGlobal returns value associated with global configuration option
{ "resource": "" }
c24609
train
// SetGlobal associates a value with a global configuration option
{ "resource": "" }
c24610
train
// IsGlobalEnabled checks if a global option is enabled
{ "resource": "" }
c24611
train
// NewWeakRandCheck detects the use of random number generator that isn't cryptographically secure
{ "resource": "" }
c24612
train
// NewSSHHostKey rule detects the use of insecure ssh HostKeyCallback.
{ "resource": "" }
c24613
train
// NewNoErrorCheck detects if the returned error is unchecked
{ "resource": "" }
c24614
train
// NewUsingBigExp detects issues with modulus == 0 for Bignum
{ "resource": "" }
c24615
train
// Builders returns all the create methods for a given rule list
{ "resource": "" }
c24616
train
// Generate the list of rules to use
{ "resource": "" }
c24617
train
// NewError creates Error object
{ "resource": "" }
c24618
train
// sortErros sorts the golang erros by line
{ "resource": "" }
c24619
train
// NewBadTempFile detects direct writes to predictable path in temporary directory
{ "resource": "" }
c24620
train
// NewImportTracker creates an empty Import tracker instance
{ "resource": "" }
c24621
train
// TrackFile track all the imports used by the supplied file
{ "resource": "" }
c24622
train
// TrackPackages tracks all the imports used by the supplied packages
{ "resource": "" }
c24623
train
// TrackImport tracks imports and handles the 'unsafe' import
{ "resource": "" }
c24624
train
// isJoinFunc checks if there is a filepath.Join or other join function
{ "resource": "" }
c24625
train
// Match inspects AST nodes to determine if the match the methods `os.Open` or `ioutil.ReadFile`
{ "resource": "" }
c24626
train
// NewReadFile detects cases where we read files
{ "resource": "" }
c24627
train
// ResolveVar tries to resolve the first argument of a call expression // The first argument is the url
{ "resource": "" }
c24628
train
// NewSSRFCheck detects cases where HTTP requests are sent
{ "resource": "" }
c24629
train
// TryResolve will attempt, given a subtree starting at some ATS node, to resolve // all values contained within to a known constant. It is used to check for any // unknown values in compound expressions.
{ "resource": "" }
c24630
train
// NewIssue creates a new Issue
{ "resource": "" }
c24631
train
// NewAnalyzer builds a new analyzer.
{ "resource": "" }
c24632
train
// LoadRules instantiates all the rules to be used when analyzing source // packages
{ "resource": "" }
c24633
train
// Process kicks off the analysis process for a given package
{ "resource": "" }
c24634
train
// ParseErrors parses the errors from given package
{ "resource": "" }
c24635
train
// AppendError appends an error to the file errors
{ "resource": "" }
c24636
train
// Visit runs the gosec visitor logic over an AST created by parsing go code. // Rule methods added with AddRule will be invoked as necessary.
{ "resource": "" }
c24637
train
// Report returns the current issues discovered and the metrics about the scan
{ "resource": "" }
c24638
train
// Reset clears state such as context, issues and metrics from the configured analyzer
{ "resource": "" }
c24639
train
// Proxies returns a map with all the proxies and their toxics.
{ "resource": "" }
c24640
train
// Proxy returns a proxy by name.
{ "resource": "" }
c24641
train
// Create a list of proxies using a configuration list. If a proxy already exists, it will be replaced // with the specified configuration. For large amounts of proxies, `config` can be loaded from a file. // Returns a list of the successfully created proxies.
{ "resource": "" }
c24642
train
// Save saves changes to a proxy such as its enabled status or upstream port.
{ "resource": "" }
c24643
train
// Toxics returns a map of all the active toxics and their attributes.
{ "resource": "" }
c24644
train
// ResetState resets the state of all proxies and toxics in Toxiproxy.
{ "resource": "" }
c24645
train
// Start the link with the specified toxics
{ "resource": "" }
c24646
train
// Add a toxic to the end of the chain.
{ "resource": "" }
c24647
train
// Update an existing toxic in the chain.
{ "resource": "" }
c24648
train
// Remove an existing toxic from the chain.
{ "resource": "" }
c24649
train
// Begin running a toxic on this stub, can be interrupted. // Runs a noop toxic randomly depending on toxicity
{ "resource": "" }
c24650
train
// Interrupt the flow of data so that the toxic controlling the stub can be replaced. // Returns true if the stream was successfully interrupted, or false if the stream is closed.
{ "resource": "" }
c24651
train
// All following functions assume the lock is already grabbed
{ "resource": "" }
c24652
train
// server runs the Proxy server, accepting new clients and creating Links to // connect them to upstreams.
{ "resource": "" }
c24653
train
// Starts a proxy, assumes the lock has already been taken
{ "resource": "" }
c24654
train
// Stops a proxy, assumes the lock has already been taken
{ "resource": "" }
c24655
train
// Parse parses a given Go file at srcPath, along any files that share the same // package, into a domain model for generating tests.
{ "resource": "" }
c24656
train
// Returns the Go code below the imports block.
{ "resource": "" }
c24657
train
// Files returns all the Golang files for the given path. Ignores hidden files.
{ "resource": "" }
c24658
train
// LoadCustomTemplates allows to load in custom templates from a specified path.
{ "resource": "" }
c24659
train
// FSByte returns the named file from the embedded assets. If useLocal is // true, the filesystem's contents are instead used.
{ "resource": "" }
c24660
train
// FSMustByte is the same as FSByte, but panics if name is not present.
{ "resource": "" }
c24661
train
// FSString is the string version of FSByte.
{ "resource": "" }
c24662
train
// FSMustString is the string version of FSMustByte.
{ "resource": "" }
c24663
train
// This returns an EventReader which applies the appropriate parser on each // raw v4 event in the stream. If no parser is available for the event, // or if an error occurs during parsing, then the reader will return the // original event along with the error.
{ "resource": "" }
c24664
train
// This makes a io.Writer from a io.Reader and begins reading and writing data // The returned class is not thread safe and public methods must be called from a single thread
{ "resource": "" }
c24665
train
// this is the private Read implementation, to be used with io.Copy // on the read thread
{ "resource": "" }
c24666
train
// This io.Copy's as much data as possible from the wrapped reader // to the corresponding writer output. // When finished it closes the downstream and drains the upstream // writer. Finally it sends any remaining errors to the errChan and // closes that channel
{ "resource": "" }
c24667
train
// This creates a GenericStorage. See GenericStorageOptions for additional // information.
{ "resource": "" }
c24668
train
// Returns a new set which is the union of s1 and s2. s1 and s2 are unmodified.
{ "resource": "" }
c24669
train
// Returns a new set which is the intersect of s1 and s2. s1 and s2 are // unmodified.
{ "resource": "" }
c24670
train
// Returns a new set which is the difference between s1 and s2. s1 and s2 are // unmodified.
{ "resource": "" }
c24671
train
// Common functions between the two implementations, since go // does not allow for any inheritance.
{ "resource": "" }
c24672
train
// This creates a new memcache RawBinaryClient.
{ "resource": "" }
c24673
train
// This creates a new memcache RawBinaryClient for use with np-large cluster.
{ "resource": "" }
c24674
train
// Perform a mutation operation specified by the given code.
{ "resource": "" }
c24675
train
// This returns the leaky bucket's maximum capacity.
{ "resource": "" }
c24676
train
// This sets the leaky bucket's maximum capacity. The value must be // non-negative.
{ "resource": "" }
c24677
train
// This returns the leaky bucket's fill rate.
{ "resource": "" }
c24678
train
// This sets the leaky bucket's fill rate. The value must be non-negative.
{ "resource": "" }
c24679
train
// This returns the current available quota.
{ "resource": "" }
c24680
train
// Only used for testing.
{ "resource": "" }
c24681
train
// Stop the rate limiter.
{ "resource": "" }
c24682
train
// writes, preferably to the userBuffer but then optionally to the remainder
{ "resource": "" }
c24683
train
// removes the user buffer from the splitBufferedWriter // This makes sure that if the user buffer is only somewhat full, no data remains in the remainder // This preserves the remainder buffer, since that will be consumed later
{ "resource": "" }
c24684
train
// installs a user buffer into the splitBufferedWriter, resetting // the remainder and original buffer
{ "resource": "" }
c24685
train
// implements the Read interface by wrapping the Writer with some buffers
{ "resource": "" }
c24686
train
// interrupt the read by closing all resources
{ "resource": "" }
c24687
train
// compressionLevel - one of the compression levels in the gzip package.
{ "resource": "" }
c24688
train
// Non blocking way to try to acquire a shared lock.
{ "resource": "" }
c24689
train
// Non blocking way to try to acquire an exclusive lock.
{ "resource": "" }
c24690
train
// Representation of DateTime columns // This function will panic if name is not valid
{ "resource": "" }
c24691
train
// Representation of any integer column // This function will panic if name is not valid
{ "resource": "" }
c24692
train
// Representation of any double column // This function will panic if name is not valid
{ "resource": "" }
c24693
train
// Representation of TINYINT used as a bool // This function will panic if name is not valid
{ "resource": "" }
c24694
train
// This creates a managed handle wrapper.
{ "resource": "" }
c24695
train
// This creates a StaticShardManager, which returns connections from a static // list of memcache shards.
{ "resource": "" }
c24696
train
// NewLookAheadBuffer returns a new LookAheadBuffer whose raw buffer has EXACTLY // the specified size.
{ "resource": "" }
c24697
train
// NewLookAheadBufferUsing returns a new LookAheadBuffer which uses the // provided buffer as its raw buffer. This allows buffer reuse, which reduces // unnecessary memory allocation.
{ "resource": "" }
c24698
train
// ConsumeAll drops all populated bytes from the look ahead buffer.
{ "resource": "" }
c24699
train
// IsModeEnabled returns true iff sql mode status is set and the mode bit is // set.
{ "resource": "" }