patch stringlengths 18 160k | callgraph stringlengths 4 179k | summary stringlengths 4 947 | msg stringlengths 6 3.42k |
|---|---|---|---|
@@ -29,11 +29,13 @@ import java.util.Optional;
public class ConsumerModel {
private final Object proxyObject;
private final String serviceName;
+ private final Class<?> serviceInterfaceClass;
private final Map<Method, ConsumerMethodModel> methodModels = new IdentityHashMap<Method, ConsumerMethodMod... | [ConsumerModel->[getAllMethods->[values],getMethodModel->[findFirst,get,orElse],ConsumerMethodModel,put]] | Creates a new instance of the ConsumerModel class. Returns the consumer method model for the given method. | Is methods and attributes are optional and can be consider my this class only if proxyObject not null? If this is the case then can we have two constructor one with only service and another one with all the parameters? |
@@ -182,8 +182,12 @@ def args_to_notes_dict(notes_list, include_none=True):
key = pieces[0]
value = pieces[1]
+ null_values = (None, '', '""')
- if value in (None, '', '""'):
+ if key in null_values:
+ raise InvalidConfig(_('The key cannot be null'))
+
+ if v... | [convert_boolean_arguments->[InvalidConfig],args_to_notes_dict->[InvalidConfig],convert_file_contents->[InvalidConfig]] | Applies the CLI convention for specifying arbitrary key - value pairs for a resource. | Does this Exception result in the CLI user being notified which setting had a key with a null value? |
@@ -326,6 +326,10 @@ func (c *ppsBuilderClient) UpdateJobState(ctx context.Context, req *pps.UpdateJo
c.tb.requests = append(c.tb.requests, &transaction.TransactionRequest{UpdateJobState: req})
return nil, nil
}
+func (c *ppsBuilderClient) CreatePipeline(ctx context.Context, req *pps.CreatePipelineRequest, opts ..... | [StartTransaction->[StartTransaction],ListTransaction->[ListTransaction],InspectTransaction->[InspectTransaction],ExecuteInTransaction->[StartTransaction,WithTransaction,DeleteTransaction,FinishTransaction],GetAddress->[GetAddress],FinishTransaction->[FinishTransaction],DeleteTransaction->[DeleteTransaction]] | UpdateJobState implements method in interface pps. BuilderClient. | ~No change here, but~ moved it out of the "Boilerplate for making unsupported API requests error" section below. |
@@ -83,7 +83,6 @@ func (c *CmdListTrackers) Run() error {
return err
}
protocols := []rpc2.Protocol{
- NewLogUIProtocol(),
}
if err := RegisterProtocols(protocols); err != nil {
return err
| [ParseArgv->[Args,Bool,UIDFromHex,Errorf],outputJSON->[MarshalIndent,Println],output->[Printf,Fprintf,Flush,Println,outputJSON,headout,proofSummary],headout->[Printf,Fprintf,DefaultTabWriter],proofSummary->[Join],Run->[ListTrackers,Exists,LoadUncheckedUserSummaries,output,ListTrackersByName,ListTrackersSelf],ChooseComm... | Run implements Command. Run. | If empty, then just RegisterProtocols(nil) |
@@ -174,10 +174,11 @@ def _handle_get_page_fail(link, reason, url, meth=None):
meth("Could not fetch URL %s: %s - skipping", link, reason)
-def _get_html_page(link, session=None):
+def _get_html_page(link, session=None, unresponsive_hosts=None):
if session is None:
raise TypeError(
- "... | [PackageFinder->[_sort_locations->[sort_path],_get_index_urls_locations->[mkurl_pypi_url],find_all_candidates->[_sort_locations,_validate_secure_origin,_get_index_urls_locations],_get_pages->[_get_html_page],find_requirement->[find_all_candidates],_link_package_versions->[_log_skipped_link],_package_versions->[_sort_li... | Get the HTML page with a . Return a response object with a timeout if the response is not a 200 response. | I feel the `=None` default is unnecessary. Is there a case `unresponsive_hosts` *should* be `None`? Even if there is, why does it need a default, instead of being passed explicitly? |
@@ -197,10 +197,17 @@ namespace System.Net.Sockets
return sent;
}
+ // The Linux kernel doesn't like it if we pass a null reference for buffer pointers, even if the length is 0.
+ // Replace any null pointer (e.g. from Memory<byte>.Empty) with a valid pointer.
+ private stat... | [SocketPal->[TryCompleteSendTo->[SysWrite,TryCompleteSendTo,SysSend],TryCompleteConnect->[SocketError],TryCompleteSendFile->[SendFile],TryCompleteReceiveFrom->[TryCompleteReceiveFrom,SysReceive,SysRead],TryCompleteReceiveMessageFrom->[SysReceiveMessageFrom],TryCompleteReceive->[SysReceive,SysRead],SendPacketsAsync->[So... | This is a wrapper around SysSend. | buffer.IsEmpty would work, too. That wouldn't mean it was a null ref, but it wouldn't hurt to sub in Array.Empty for an empty span even if it's not null. |
@@ -53,6 +53,9 @@ class _ResolutionFailures(object):
if loc:
msgbuf.append('{}raised from {}'.format(indent, loc))
+ likely_cause = ("This error is usually caused by passing an "
+ "unsupported argument type to the named function.")
+ msgbuf += [_term... | [WeakType->[__hash__->[__hash__]],BaseFunction->[get_call_type_with_literals->[get_impl_key,format,add_error,_ResolutionFailures]],BoundFunction->[get_call_type_with_literals->[get_call_type]],_ResolutionFailures->[format_error->[format],get_loc->[format],format->[format]],Dispatcher->[dispatcher->[_get_object],get_ove... | Return a formatted error message from all the gathered errors. | If `msgbuf` is a `list`, couldn't you just do `msgbuf.append(_termcolor.errmsg(likely_cause))`? This syntax is a bit opaque IMO. |
@@ -63,6 +63,11 @@ class PretrainedTransformerMismatchedIndexer(TokenIndexer):
self._matched_indexer._add_encoding_to_vocabulary_if_needed(vocabulary)
wordpieces, offsets = self._allennlp_tokenizer.intra_word_tokenize([t.text for t in tokens])
+
+ # For tokens that don't correspond to any wor... | [PretrainedTransformerMismatchedIndexer->[as_padded_tensor_dict->[as_padded_tensor_dict],count_vocab_items->[count_vocab_items],get_empty_token_list->[get_empty_token_list]]] | Returns a list of indices for the given tokens. | I don't love that we have to re-create this list. What if `intra_word_tokenize` could take a default value to use when a token doesn't result in any word pieces? By default this is `None`, but in this case we'd use `(-1, -1)`. Or `intra_word_tokenize` could return a tuple of iterators instead of lists. This might add a... |
@@ -95,9 +95,9 @@ func (helper *broadcasterHelper) start() {
}
func (helper *broadcasterHelper) startWithLatestHeadInDb(head *models.Head) {
+ helper.lb.SetLatestHeadFromStorage(head)
err := helper.lb.Start()
require.NoError(helper.t, err)
- helper.lb.SetLatestHeadFromStorage(head)
}
func (helper *broadcast... | [startWithLatestHeadInDb->[Start,NoError,SetLatestHeadFromStorage],unsubscribeAll->[Sleep],start->[startWithLatestHeadInDb],registerWithTopics->[Register],logOnBlockNumWithTopics->[RawNewRoundLogWithTopics],register->[registerWithTopics],MarkConsumed->[NewORM,MarkBroadcastConsumed,RawLog],logsOnBlocks->[LatestBlockHash... | startWithLatestHeadInDb starts the latest head in the database. | Is it possible to pass in the head when we instantiate the log broadcaster? |
@@ -426,7 +426,9 @@ export function AccordionContent({
<Comp
{...rest}
ref={ref}
- className={`${className} ${classes.sectionChild} ${classes.content}`}
+ className={`${className} ${classes.sectionChild} ${classes.content} ${
+ !expanded && useDisplayLocking ? classes.contentHiddenMa... | [No CFG could be retrieved] | Displays a with the given attributes. | If the display locking feature is enabled and the browser supports the necessary CSS property. Then add the CSS classes needed for display locking feature. |
@@ -67,6 +67,15 @@ interface FormOverlayListViewBuilderInterface extends ViewBuilderInterface
public function disableSelection(): self;
+ public function enableColumnOptions(): self;
+
+ public function disableColumnOptions(): self;
+
+ /**
+ * @param array<string, array<string, mixed>> $adapterOp... | [No CFG could be retrieved] | This method is used to disable the selection of the router attributes. | would add the `enableFiltering` and `disableFiltering` here too |
@@ -142,6 +142,12 @@ def runTests(tests):
result = not TextTestRunner(verbosity=verbosity, buffer=True).run(tests[level]).wasSuccessful()
sys.exit(result)
+def DeleteFileIfExisting(file_name):
+ if os.path.isfile(file_name):
+ os.remove(file_name)
+ else:
+ pass
+
KratosSuites... | [TestLoader->[loadTestsFromTestCases->[append,loadTestsFromTestCase]],Usage->[print],ReleaseStdout->[dup2],ReleaseStderr->[dup2],CaptureStderr->[flush,dup2,close,open,dup],CaptureStdout->[flush,dup2,close,open,dup],TestCase->[failUnlessEqualWithTolerance->[failureException]],runTests->[TextTestRunner,int,print,Usage,te... | Run tests on a single . | You don't need the else in this case. |
@@ -375,7 +375,7 @@ public class JDBCInterpreter extends Interpreter {
if (user == null) {
connection = getConnectionFromPool(url, user, propertyKey, properties);
} else {
- if ("hive".equalsIgnoreCase(propertyKey)) {
+ if (url.trim().indexOf("jdbc:hive... | [JDBCInterpreter->[setUserProperty->[setUserProperty,getJDBCConfiguration,getUsernamePassword,existAccountInBaseProperty,closeDBPool,getEntityName],completion->[getPropertyKey],getUsernamePassword->[getUsernamePassword],initStatementMap->[initStatementMap],executeSql->[isDDLCommand,getResults,splitSqlQueries,getConnect... | Get a connection from the pool. This method is called when an error occurs in doAs. It will try to find a. | should it do startsWith instead? |
@@ -307,6 +307,14 @@ public final class CentralAuthenticationServiceImpl implements CentralAuthentica
final Authentication authentication = this.authenticationManager.authenticate(credentials);
+ // Ensure the authentication satisfies security policy
+ final ContextualAuthenticationPolicy<Ser... | [CentralAuthenticationServiceImpl->[grantServiceTicket->[grantServiceTicket]]] | Create a ticket granting ticket with the given service ticket id and credentials. | Might be a silly question, but why don't you rely on the `getAuthenticationSatisfiedByPolicy` method here ? |
@@ -17,7 +17,7 @@ var packageArchMap = map[string]string{
"windows-binary-32": "windows-x86.zip",
"windows-binary-64": "windows-x86_64.zip",
"darwin-binary-32": "darwin-x86.tar.gz",
- "darwin-binary-64": "darwin-x86.tar.gz",
+ "darwin-binary-64": "darwin-x86_64.tar.gz",
}
// GetArtifactName constructs a pa... | [Sprintf,Join,New] | GetArtifactPath returns the full path to a downloaded artifact for a specific version of a given. | Do we really still have darwin 32 bits? |
@@ -20,6 +20,10 @@ namespace Microsoft.Extensions.Logging
private readonly string _format;
private readonly List<string> _valueNames = new List<string>();
+ // NOTE: If this assembly ever builds for netcoreapp, the below code should change to:
+ // - Be annotated as [SkipLocalsInit] to... | [LogValuesFormatter->[FormatArgument->[Select,Join],Format->[FormatArgument,Format,InvariantCulture,Length,Array],GetValue->[Count,nameof],FindIndexOfAny->[IndexOfAny],GetValues->[Count,Length],Add,Append,nameof,FindIndexOfAny,Substring,ToString,InvariantCulture,Length,FindBraceIndex]] | Creates a formatter that formats and formats objects based on a specified format string. region System. Collections. Method. | Doesn't it cross compile? |
@@ -315,8 +315,9 @@ public class KsqlEngineMetrics implements Closeable {
// legacy
configureGaugeForState(
metrics,
- ksqlServiceId + metricGroupName + "-" + name,
+ ksqlServiceId + metricGroupName + "-" + name,
metricGroupName,
+ Collections.emptyMap(),
state... | [KsqlEngineMetrics->[configureNumActiveQueriesForGivenState->[configureGaugeForState],createSensor->[configureMetric,createSensor]]] | Configures the number of active queries for a given state. | Wouldn't be better to catch this error early in the `KsqlContext`? I feel we should pass the tags to the `KsqlEngineMetrics` already parsed into a Map. Also, it makes sense to have one place where the `KsqlConfig.KSQL_CUSTOM_METRICS_TAGS` is used instead of having 1 in KsqlContext to get the tags, and another in the me... |
@@ -1221,14 +1221,14 @@ export class Resources {
request.newHeight = newHeight;
request.newWidth = newWidth;
request.force = force || request.force;
- request.callback = opt_callback;
+ request.resolveCb = opt_resolveCb;
} else {
this.requestsChangeSize_.push(/** {!ChangeSizeR... | [No CFG could be retrieved] | Schedules a new size change for the specified resource. Internal method to schedule elements in the layout. | i don't see a need for renaming here? - was this a request from someone? callback is a callback- - the purpose (resolving a promise) does not really matter (Here and all the other places) |
@@ -53,7 +53,7 @@ import org.joda.time.Instant;
* and for running tests that need state.
*/
@Experimental(Kind.STATE)
-public class InMemoryStateInternals<K> implements StateInternals<K> {
+public class InMemoryStateInternals<K> implements StateInternals {
public static <K> InMemoryStateInternals<K> forKey(K ... | [InMemoryStateInternals->[InMemoryStateBinder->[bindCombiningValueWithContext->[bindCombiningValue]],isEmptyForTesting->[isCleared],InMemorySet->[contains->[contains],addIfAbsent->[contains,add],remove->[remove],add->[add],isEmpty->[read->[isEmpty]],isCleared->[isEmpty]],InMemoryWatermarkHold->[toString->[toString]],In... | Returns an immutable instance of InMemoryStateInternals for the given key. | Noting that I am not removing all type variables from implementing `StateInternals` as this commit is already large enough, and they actually do expose the key with this type (it is not needed and should likely be removed, but doesn't have to happen now). |
@@ -38,6 +38,11 @@ public final class DateTimes
return new DateTime(instant, ISOChronology.getInstanceUTC());
}
+ public static DateTime of(String instant, DateTimeFormatter formatter)
+ {
+ return formatter.withChronology(ISOChronology.getInstanceUTC()).parseDateTime(instant);
+ }
+
public static Da... | [DateTimes->[nowUtc->[getInstanceUTC,now],max->[compareTo],of->[getInstanceUTC,DateTime],min->[compareTo],utc->[getInstanceUTC,DateTime],utc]] | Returns a new DateTime object with the specified time in UTC. | Enforcement to use this method could make it easy to repeatedly create some extra garbage, at times. What about adding a wrapper class like "UtcDateTimeFormatter", which is a very simple wrapper of `DateTimeFormatter` with a single `parse()` method, that just accepts `DateTimeFormatter` and calls `this.formatter = form... |
@@ -50,7 +50,7 @@ type CliOptions struct {
proto string
}
-const productName = "vSphere Integrated Containers"
+const productName = "vSphere Integrated Containers 0.3"
var vchConfig metadata.VirtualContainerHostConfigSpec
| [Trap,Certificate,Close,Subjects,Info,Exit,NewRouter,Init,New,IsNil,Errorf,InitRouter,Wait,Bool,Debugf,PrintDefaults,Accept,GuestInfoSource,Fatalf,Fprintf,NewCertPool,Println,Sprintf,Decode,Uint,String,Parse,AppendCertsFromPEM,Fatal] | Component of the vSphere Integrated Container daemon main is the main entry point for the vic - set command. It is the entry. | Let's create a version file or a build tag for this and either read or inject into at compile time |
@@ -3176,7 +3176,7 @@ def extract_label_time_course(stcs, labels, src, mode='auto',
@verbose
def stc_near_sensors(evoked, trans, subject, distance=0.01, mode='sum',
- project=True, subjects_dir=None, verbose=None):
+ project=True, subjects_dir=None, src=None, verbose=None):
... | [SourceEstimate->[estimate_snr->[copy,sum],save->[_write_stc,_write_w],center_of_mass->[_center_of_mass,sum]],_make_stc->[guess_src_type->[_get_src_type],guess_src_type],spatial_dist_adjacency->[spatio_temporal_dist_adjacency],_BaseMixedSourceEstimate->[_n_surf_vert->[sum]],_BaseSourceEstimate->[__imul__->[_verify_sour... | Create a STC from a given ECoG sensor data. Find a single or multi - residue residue in the system. Estimate missing missing node in the network. | ECoG and sEEG |
@@ -217,6 +217,10 @@ class LocalFileSystem(FileSystem):
def _rename_file(source, destination):
"""Rename a single file object"""
try:
+ parent = os.path.dirname(destination)
+ if not os.path.exists(parent):
+ os.makedirs(parent)
+
os.rename(source, destination)
... | [LocalFileSystem->[_list->[join],copy->[_copy_path],join->[join],create->[_path_open],split->[split],exists->[exists],delete->[_delete_path],checksum->[exists],rename->[_rename_file->[rename],_rename_file],open->[_path_open]]] | Rename the files at the source list to the destination list. | Could have used `os.renames` instead |
@@ -30,9 +30,9 @@ module Flow
FormResponse.new(success: true, errors: {})
end
- def failure(message)
+ def failure(message, extra_errors = {})
flow_session[:error_message] = message
- FormResponse.new(success: false, errors: { message: message })
+ FormResponse.new(success: false, e... | [BaseStep->[redirect_to->[redirect_to],permit->[permit]]] | This method is called when the user submit a and the user has submitted a . | Nit, but what about calling this `extra` instead of `extra_errors`? |
@@ -211,10 +211,10 @@ describe ServiceProvider do
describe '#block_encryption' do
context 'when no value is specified in YAML' do
- it 'returns "none"' do
+ it 'returns "aes256-cbc"' do
service_provider = ServiceProvider.new('http://test.host')
- expect(service_provider.block_encry... | [it_behaves_like,to,include,context,new,root,describe,before,shared_examples,eq,read,it,require,and_return] | returns a description of the object It returns a hex digest and returns a hardcoded value. | should we maybe just change this to `returns ServiceProvider::DEFAULT_ENCRYPTION` to make it more evergreen? |
@@ -60,11 +60,10 @@ namespace System.Net.Http.Functional.Tests
var request = new HttpRequestMessage(HttpMethod.Post, uri) { Content = content, Version = UseVersion };
request.Headers.ExpectContinue = true;
- var sw = Stopwatch.StartNew();
+ ... | [HttpClientHandler_Http11_Cancellation_Test->[Task->[Task]]] | Expect 100 - continue waits expected period of time before sending content. | You might want to have a small amount of leeway here in checking that elapsed >= delay, just in case of timing weirdness -- looks like the test previously had 0.5s of leeway? If it's reliable as is, then maybe no leeway is necessary. |
@@ -227,6 +227,7 @@ public class KsqlRestApplication extends Application<KsqlRestConfig> implements
BrokerCompatibilityCheck.create(ksqlConfig.getKsqlStreamConfigProps(), topicClient)) {
compatibilityCheck.checkCompatibility();
}
+ final String kafkaClusterId = adminClient.describeCluster()... | [KsqlRestApplication->[getStaticResources->[getStaticResources],buildApplication->[KsqlRestApplication],displayWelcomeMessage->[displayWelcomeMessage],stop->[stop],start->[start]]] | This method creates a KsqlRestApplication object. This method creates a new application based on the given configuration. | When was this API added in the admin client? would it change our version compatibility matrix? |
@@ -263,10 +263,10 @@ func TestAccAWSAcmCertificate_root_TrailingPeriod(t *testing.T) {
Config: testAccAcmCertificateConfig(domain, acm.ValidationMethodDns),
Check: resource.ComposeTestCheckFunc(
testAccMatchResourceAttrRegionalARN(resourceName, "arn", "acm", regexp.MustCompile(`certificate/.+`)),
- ... | [ParallelTest,ListCertificatesPages,DescribeCertificate,RandString,TestCheckTypeSetElemNestedAttrs,Quote,Append,RootModule,ErrorOrNil,ComposeTestCheckFunc,Errorf,Skip,MustCompile,TestMatchResourceAttr,TestCheckTypeSetElemAttr,DeleteCertificate,RandomWithPrefix,AddTestSweepers,TestCheckResourceAttrPair,Printf,StringValu... | TestAccAWSAcmCertificate_root_TrailingPeriod tests the ACM certificate root trailing testAccAwsAcmCertificateTest tests the AWS ACM certificate. | The `TestAccAWSAcmCertificate_root_TrailingPeriod` testing can now be `ExpectError` to match the API's expectations. |
@@ -83,6 +83,14 @@ public class HoodieStorageConfig extends HoodieConfig {
.withDocumentation("Lower values increase the size of metadata tracked within HFile, but can offer potentially "
+ "faster lookup times.");
+ public static final ConfigProperty<String> HFILE_COMPARATOR_CLASS_NAME = ConfigPro... | [HoodieStorageConfig->[Builder->[HoodieStorageConfig]]] | This method is used to set the size of the memory buffer in bytes for writing. Hhoodie. parquetcompression. ratio. | I am not sure we need to expose a user config here. All HFile usages are more internal. |
@@ -19,9 +19,6 @@ namespace Content.Server.GameObjects
/// <inheritdoc />
public override string Name => "Destructible";
- /// <inheritdoc />
- public override uint? NetID => ContentNetIDs.DESTRUCTIBLE;
-
/// <summary>
/// Damage threshold calculated from the values
... | [DestructibleComponent->[ExposeData->[ExposeData]]] | DamageThreshold is a damage threshold that can be used to delete an entity Delete the entity from the database. | Ideally this would probably be a list of prototypes, not just one single prototype. but for now I guess it doesn't matter. |
@@ -352,7 +352,7 @@ class AmpVideo extends AMP.BaseElement {
}
throw reason;
})
- .then(() => this.onVideoLoaded_());
+ .then(() => (this.isManagedByPool_() ? null : this.onVideoLoaded_()));
// Resolve layoutCallback right away if the video won't preload.
if (this.element.... | [No CFG could be retrieved] | Catches the events and handles the elements that are not visible. check if the element has a fallback available for bare src. | We shouldn't trigger onVideoLoaded if it's managed by the pool because the pool will send this event by itself on `resetOnDomChange` |
@@ -370,13 +370,12 @@ class State(object): # pylint: disable=too-many-instance-attributes
assert path_info.scheme == "local"
assert checksum is not None
- path = fspath_py35(path_info)
- assert os.path.exists(path)
+ assert os.path.exists(fspath_py35(path_info))
actu... | [State->[_vacuum->[_execute],load->[_prepare_db],get_state_record_for_inode->[_execute,_fetchall,_to_sqlite],_prepare_db->[_execute,_fetchall,StateVersionTooNewError],remove_unused_links->[_from_sqlite,_execute],_update_state_for_path_changed->[_execute,_to_sqlite],__init__->[get],_update_state_record_timestamp_for_ino... | Save a specific node checksum for the specified path_info. | The empty line above this looks superfluous now. A matter of taste for sure. |
@@ -154,8 +154,9 @@ func rlpHash(x interface{}) (h common.Hash) {
// Body is a simple (mutable, non-safe) data container for storing and moving
// a block's data contents (transactions and uncles) together.
type Body struct {
- Transactions []*Transaction
- Uncles []*Header
+ Transactions []*Transaction
+ ... | [MarshalText->[MarshalText],SetLastCommitSig->[Logger],Hash->[Hash],Uint64->[Uint64],Sort->[Sort],NumberU64->[Uint64],Transaction->[Hash],Logger->[Logger,Hash],AddShardState->[Hash]] | GetShardState returns a sub - logger with the state of the header. SetLastCommitSig sets the last block s commit group signature. | Are we actually using Uncles field in our protocol/consensus? Or is it that we can't remove this for backward compatibility? |
@@ -118,9 +118,6 @@ class FileMixin:
class SingleStageFile(FileMixin):
from dvc.schema import COMPILED_SINGLE_STAGE_SCHEMA as SCHEMA
- def __init__(self, repo, path):
- super().__init__(repo, path)
-
@property
def stage(self):
data, raw = self._load()
| [check_dvc_filename->[is_valid_filename],Lockfile->[load->[exists,validate,LockfileCorruptedError],remove_stage->[exists,validate],dump->[exists]],SingleStageFile->[stages->[_load],remove_stage->[remove],stage->[_load],dump->[relpath,check_dvc_filename]],is_dvc_file->[is_valid_filename],FileMixin->[exists->[exists],rel... | Initialize a sequence of sequence numbers. | Did nothing more than the parent. |
@@ -81,7 +81,7 @@ class GraphInvalidationTest(unittest.TestCase):
# Invalidate the '3rdparty/python' DirectoryListing, the `3rdparty` DirectoryListing,
# and then the root DirectoryListing by "touching" files/dirs.
- for filename in ('3rdparty/python/BUILD', '3rdparty/python', 'non_existing_file'):... | [GraphInvalidationTest->[test_invalidate_fsnode->[open_scheduler],open_scheduler->[_make_setup_args],test_target_macro_override->[open_scheduler],test_invalidate_fsnode_incremental->[open_scheduler],test_sources_ordering->[open_scheduler]]] | This test ensures that fsnode invalidation is incremental. | any particular reason for this change? does the literal `non_existing_file` path cause issues with the new impl or something? |
@@ -1,12 +1,16 @@
import asyncio
import logging
import time
-from functools import wraps
+from functools import partial, wraps
from freqtrade.exceptions import DDosProtection, RetryableOrderError, TemporaryError
+from freqtrade.mixins import LoggingMixin
logger = logging.getLogger(__name__)
+logging_mixin = ... | [retrier->[decorator->[wrapper->[calculate_backoff,wrapper]],decorator],retrier_async->[wrapper->[calculate_backoff,wrapper]]] | Creates a new object. Decorator to retry a function asynchronously. | the only thing that slightly still concerns me is this section here. it's creating a singleton (actually 3) - which can potentially cause problems (especially to tests). While currently, i don't think it's creating actual problems to tests - it might cause random test failures depending on the randomness used in the te... |
@@ -63,7 +63,13 @@ func resourceGoogleFolderCreate(d *schema.ResourceData, meta interface{}) error
return fmt.Errorf("Error creating folder '%s' in '%s': %s", displayName, parent, err)
}
- err = resourceManagerV2Beta1OperationWait(config.clientResourceManager, op, "creating folder")
+ opV1 := make(map[string]int... | [Move,Patch,Create,Sprintf,Do,SetPartial,Partial,Unmarshal,HasChange,Id,Delete,Errorf,Parent,SetId,Get,HasPrefix,Set] | The name and lifecycle_state fields of the resource data are the same as the name and resourceGoogleFolderRead returns the id of the folder in the client s list of folders. | @rambleraptor You can't use a `map` in convert, you have to pass a struct. If you really need a map you have to use `map[string]*json.RawMessage`. I'm not sure what you are trying to do here, but Convert effectively 'casts' one struct into another by marshaling it in and out of json. Putting an operation in one side wo... |
@@ -171,8 +171,9 @@ def build(sources: List[BuildSource],
lib_path.insert(0, alt_lib_path)
reports = Reports(data_dir, options.report_dirs)
-
source_set = BuildSourceSet(sources)
+ errors = Errors(options.show_error_context, options.show_column_numbers)
+ plugin = load_custom_plugins(DefaultP... | [find_modules_recursive->[BuildSource,find_module,find_modules_recursive],process_graph->[trace,log],BuildManager->[all_imported_modules_in_file->[correct_rel_imp,import_priority],get_stat->[maybe_swap_for_shadow_path],report_file->[is_source]],State->[parse_file->[parse_file,read_with_python_encoding,wrap_context,all_... | Builds a single missing - block node from a list of sources. Construct a build result object that represents a single object that can be built by the build manager. | Hm, I wonder if load_custom_plugins() shouldn't also be responsible for constructing the DefaultPlugin instance. And maybe the latter would also want to have access to the options and errors? Makes for a more universal plugin API. |
@@ -300,6 +300,16 @@ function _elgg_admin_init() {
elgg_register_admin_menu_item('administer', 'add', 'users', 40);
// configure
+ // upgrades
+ elgg_register_menu_item('page', array(
+ 'name' => 'upgrades',
+ 'href' => 'admin/upgrades',
+ 'text' => elgg_echo('admin:upgrades'),
+ 'context' => 'admin',
+ 'pri... | [_elgg_admin_markdown_page_handler->[getAvailableTextFiles,getName],_elgg_add_admin_widgets->[getGUID,move],_elgg_robots_page_handler->[getPrivateSetting],elgg_delete_admin_notice->[delete],_elgg_admin_sort_page_menu->[setChildren,getName,getChildren],_elgg_admin_maintenance_handler->[getPrivateSetting],_elgg_admin_plu... | Initialize the administration elgg_register_menu_item registers menu items register menu items register administration menu items. | Wouldn't the `administer` section be more logical? |
@@ -126,6 +126,13 @@ def test_fiat_convert_get_price(mocker):
assert fiat_convert._pairs[0]._expiration is not expiration
+def test_fiat_convert_same_currencies(mocker):
+ patch_coinmarketcap(mocker)
+ fiat_convert = CryptoToFiatConverter()
+
+ assert fiat_convert.get_price(crypto_symbol='USD', fiat_s... | [test_fiat_init_network_exception->[CryptoToFiatConverter,len,multiple,MagicMock,_load_cryptomap],test_fiat_convert_without_network->[CryptoToFiatConverter,_find_price],test_fiat_convert_add_pair->[CryptoToFiatConverter,_add_pair,len],test_fiat_convert_find_price->[_find_price,CryptoToFiatConverter,get_price,patch,rais... | Test load of the cryptomap. | would a test for EUR / USD make sense too? (currently not sure what that would return as coinmarketcap does not support that ... but that would make a test even more interresting...) |
@@ -69,6 +69,18 @@ dss_self_rank(void)
return (d_rank_t)mock_self_rank;
}
+struct dss_module_info *mock_dmi = NULL;
+static uint32_t mock_xs_id = 1;
+struct dss_module_info *
+get_module_info(void)
+{
+ D_ALLOC(mock_dmi, sizeof(struct dss_module_info));
+
+ mock_dmi->dmi_xs_id = mock_xs_id;
+
+ return mock_dmi;
... | [int->[mock_recvmsg_setup,mock_close_setup,mock_socket_setup,mock_sendmsg_setup,mock_connect_setup],void->[srv__bio_error_req__free_unpacked,srv__bio_error_req__unpack,ds_notify_bio_error,verify_notify_ras_min_viable,srv__notify_ready_req__free_unpacked,verify_notify_bio_error,assert_non_null,uuid_compare,assert_string... | This is a mock self rank implementation. It is used by the DSS protocol to test. | Not able to mock dss_get_module_info() directly? |
@@ -26,6 +26,10 @@ export default gql`
phoneVerified
emailVerified
websiteVerified
+ kakaoVerified
+ githubVerified
+ linkedinVerified
+ wechatVerified
}
}
}
| [from,export,default,import,gql] | Tenant - specific information. | perhaps we should have a single field 'verified' with a parameter for type? |
@@ -98,9 +98,14 @@ public class BeamJoinRel extends Join implements BeamRelNode {
throws Exception {
BeamRelNode leftRelNode = BeamSqlRelUtils.getBeamRelInput(left);
BeamRecordSqlType leftRowType = CalciteUtils.toBeamRowType(left.getRowType());
- PCollection<BeamRecord> leftRows = leftRelNode.buildB... | [BeamJoinRel->[copy->[BeamJoinRel],buildBeamPipeline->[buildBeamPipeline]]] | buildBeamPipeline - Build pipeline for beam relation. This method is called when a join is to be performed on the right side of the join Checks if the left - side of an OUTER JOIN must be Unbounded table. | if left side is seekable and right side is not seekable, can we also do a lookup join? |
@@ -101,10 +101,6 @@ public interface BigQueryServices extends Serializable {
@Nullable
Table getTable(TableReference tableRef) throws InterruptedException, IOException;
- @Nullable
- Table getTable(TableReference tableRef, List<String> selectedFields)
- throws InterruptedException, IOException... | [No CFG could be retrieved] | Get a table. | Is this removing a public API? |
@@ -46,5 +46,9 @@ class Raja(CMakePackage):
options.extend([
'-DENABLE_CUDA=On',
'-DCUDA_TOOLKIT_ROOT_DIR=%s' % (spec['cuda'].prefix)])
+ if 'cuda_arch' in spec.variants:
+ cuda_value = spec.variants['cuda_arch'].value
+ cuda_arch =... | [Raja->[cmake_args->[append,format,extend],variant,depends_on,version]] | Return a list of CMake command line options for the object. | This condition will always evaluate to true, since the variant is present for all `CudaPackage`s. |
@@ -1159,7 +1159,7 @@ public abstract class AbstractByteBuf extends ByteBuf {
}
}
- private static boolean isInvalid(int index, int length, int capacity) {
+ static boolean isInvalid(int index, int length, int capacity) {
return (index | length | (index + length) | (capacity - (index + le... | [AbstractByteBuf->[getUnsignedInt->[getInt],getBytes->[writableBytes,getBytes,writerIndex],slice->[readableBytes,slice],writeByte->[ensureWritable0,_setByte],writeInt->[ensureWritable0,_setInt],equals->[equals],resetReaderIndex->[readerIndex],checkDstIndex->[checkIndex],writeZero->[ensureWritable,_setLong,_setByte,_set... | Checks if the dstIndex is valid for the given parameters. | Would it make sense to move this to a util class (e.g. ByteBufUtil)? |
@@ -995,6 +995,9 @@ class Dispatcher(serialize.ReduceMixin, _MemoMixin, _DispatcherBase):
cres = tuple(self.overloads.values())[0]
return types.FunctionType(cres.signature)
+ def get_compiled(self):
+ return self
+
class LiftedCode(serialize.ReduceMixin, _MemoMixin, _DispatcherB... | [_DispatcherBase->[inspect_disasm_cfg->[inspect_disasm_cfg],get_call_template->[fold_argument_types,compile],inspect_cfg->[inspect_cfg],__init__->[OmittedArg,_CompilingCounter,__init__],inspect_llvm->[inspect_llvm],_compile_for_args->[error_rewrite,_compilation_chain_init_hook,_compile_for_args,compile],inspect_asm->[i... | Return unique function type of dispatcher when possible otherwise . | Why is this needed? I'd guess there are additional plans to make this different in other dispatchers. |
@@ -32,8 +32,10 @@
#include "vos_layout.h"
#include "vos_internal.h"
-/* Dummy offset for an aborted DTX address. */
+/* Dummy offset for aborted DTX address. */
#define DTX_UMOFF_ABORTED 1
+/* Dummy offset for committed DTX address. */
+#define DTX_UMOFF_COMMITTED 2
/* 128 KB per SCM blob */
#define DTX_BLOB_... | [No CFG could be retrieved] | Adds a single to a transaction. -DER_INPROGRESS - DTX_INPROGRESS - DTX_INPROGRESS -. | (style) line over 80 characters |
@@ -176,10 +176,3 @@ func main() {
return nil
})
}
-func toPulumiStringArray(arr []string) pulumi.StringArray {
- var pulumiArr pulumi.StringArray
- for _, v := range arr {
- pulumiArr = append(pulumiArr, pulumi.String(v))
- }
- return pulumiArr
-}
| [NewLoadBalancer,NewSecurityGroup,NewTargetGroup,Int,NewCluster,Marshal,Export,DependsOn,Run,Bool,ID,NewService,NewRole,LookupVpc,String,NewListener,NewRolePolicyAttachment,GetSubnetIds,NewTaskDefinition] | toPulumiStringArray - toPulumiStringArray - toPulumiStringArray -. | This conversion is no longer necessary? |
@@ -74,7 +74,17 @@ namespace Microsoft.Win32.SafeHandles
base.Dispose(disposing);
}
- protected override bool ReleaseHandle() => true; // Nothing to clean up. We unlinked immediately after creating the backing store.
+ protected override bool ReleaseHandle() {
+ Debug.A... | [SafeMemoryMappedFileHandle->[Dispose->[Dispose]]] | Dispose the base object and any associated resources. | This assert isn't valid. The ctor could throw before reaching the SetHandle call, in which case the handle will still have a value of 0, which is considered invalid. |
@@ -221,6 +221,12 @@ func CreateConfigToOCISpec(config *CreateConfig) (*spec.Spec, error) { //nolint
}
}
+ if config.Systemd && (strings.HasSuffix(config.Command[0], "init") ||
+ strings.HasSuffix(config.Command[0], "systemd")) {
+ if err := setupSystemd(config, &g); err != nil {
+ return nil, errors.Wrap(er... | [GetVolumesFrom,IsRootless,SetLinuxResourcesCPURealtimePeriod,RemoveHostname,SetLinuxResourcesMemoryReservation,IsContainer,AddLinuxSysctl,AddLinuxGIDMapping,Hostname,SetLinuxResourcesPidsLimit,SetLinuxResourcesCPUCpus,Wrap,GetVolumeMounts,SetLinuxRootPropagation,SetLinuxResourcesMemorySwap,SetLinuxResourcesCPUPeriod,S... | Get the host - specific from the config. returns an error if the spec cannot find a unique identifier. | could we use `path.Base` here instead of `strings.HasSuffix`? |
@@ -338,4 +338,15 @@ public class DefaultHttpListenerConfig extends AbstractAnnotatedObject implement
{
this.connectionIdleTimeout = connectionIdleTimeout;
}
+
+ @Override
+ public String toString() {
+ StringBuilder buf = new StringBuilder();
+ buf.append("DefaultHttpListener... | [DefaultHttpListenerConfig->[addRequestHandler->[addRequestHandler],createWorkManager->[createWorkManager],stop->[stop],start->[createWorkManager,start],listenerUrl->[getHost,getPort]]] | This method sets the connection idle timeout. | use `getClass().getSimpleName()` instead of hardcoding the class name |
@@ -336,6 +336,7 @@ public class OMFileCreateRequest extends OMKeyRequest {
switch (result) {
case SUCCESS:
+ omMetrics.incNumKeys(numMissingParents);
LOG.debug("File created. Volume:{}, Bucket:{}, Key:{}", volumeName,
bucketName, keyName);
break;
| [OMFileCreateRequest->[checkAllParentsExist->[OMException,getKeyName,directParentExists],preExecute->[shouldUseRatis,checkNotNull,getType,addAllKeyLocations,removeEnd,getCreateFileRequest,setClientID,getBlockTokenSecretManager,allocateBlock,getOMNodeId,getPreallocateBlocksMax,setDataSize,getKeyName,getScmBlockSize,getD... | This method is used to validate and update cache. Writes a key to a file or directory. This method checks if a file or directory key can be created. This method is called when a file creation is successful. | We need to add incNumCreateFileFails for the failure case below? |
@@ -405,6 +405,8 @@ module.exports = class mexc extends Exchange {
'info': currency,
'name': name,
'active': currencyActive,
+ 'deposit': undefined,
+ 'withdraw': undefined,
'fee': currencyFee,
'precision'... | [No CFG could be retrieved] | fetchMarketsByType - fetch market by type Fetch Markets with default type. | Please, add the same logic for currency-wide `deposit` and `withdraw` flags, derived from networks, as you did in the other exchanges. |
@@ -71,4 +71,17 @@ class Mkl(IntelInstaller):
spack_env.set('MKLROOT', self.prefix)
def setup_environment(self, spack_env, env):
+ # Remove paths that were guessed but are incorrect for this package.
+ env.remove_path('LIBRARY_PATH',
+ join_path(self.prefix, 'lib'))
... | [Mkl->[blas_libs->[join_path,find_libraries,format],install->[install,symlink,listdir,join],setup_environment->[set],setup_dependent_environment->[set],variant,getcwd,version,provides]] | Set up the environment variables for the MKLROOT. | AFAIK Spack does not use `LD_LIBRARY_PATH` or alike anywhere, everything is RPATH'ed, why do you need all those changes? |
@@ -107,3 +107,13 @@ class IvySubsystem(Subsystem):
return self.get_options().repository_cache_dir
else:
return self.get_options().cache_dir
+
+
+class IvyUrlGenerator(BinaryToolUrlGenerator):
+
+ def __init__(self, template_urls):
+ super(IvyUrlGenerator, self).__init__()
+ self._template_url... | [IvySubsystem->[extra_jvm_options->[http_proxy,https_proxy]]] | Return the cache directory for the repository. | Ditto on Py3 style `super()`. I will add both these changes to the type checking PR I have up. |
@@ -190,7 +190,7 @@ class HyperoptTuner(Tuner):
HyperoptTuner is a tuner which using hyperopt algorithm.
"""
- def __init__(self, algorithm_name, optimize_mode = 'minimize'):
+ def __init__(self, algorithm_name, optimize_mode='minimize', parallel_optimize=True, constant_liar='min'):
"""
... | [_split_index->[_split_index],json2vals->[json2vals],HyperoptTuner->[get_suggestion->[json2parameter],import_data->[_add_index,receive_trial_result],generate_parameters->[_split_index],update_search_space->[_choose_tuner,json2space],__init__->[OptimizeMode],receive_trial_result->[json2vals]],_add_index->[_add_index],js... | Initialize the object with the specified algorithm name. | can you give me a comparison between this PR and the current method in our example? |
@@ -200,7 +200,10 @@ class LegacyGraphSession(datatype(['scheduler_session', 'build_file_aliases', 'g
use_colors=options_bootstrapper.bootstrap_options.for_global_scope().colors
)
for goal in goals:
- goal_product = self.goal_map[goal]
+ try:
+ goal_product = self.goal_map[goal]
+ ... | [EngineInitializer->[_make_goal_map_from_rules->[GoalMappingError],setup_legacy_graph_extended->[_make_goal_map_from_rules,_legacy_symbol_table,LegacyGraphScheduler]],_make_target_adaptor->[_compute_default_sources_globs],LegacyGraphScheduler->[new_session->[new_session]],_apply_default_sources_globs->[_compute_default... | Runs sequentially and interactively by requesting their implicit Goal products. | This is a completely orthogonal change which should be in a separate PR, where singleton goals (in our monorepo, for example, we have `scalafix` registered as its own goal), and that's accidentally considered an "ambiguous goal" for the purposes of v2 console_rule resolution. This is relatively easy to repro, and is pr... |
@@ -485,7 +485,7 @@ func (c *Create) Flags() []cli.Flag {
cli.BoolFlag{
Name: "force, f",
- Usage: "Force the install, removing existing if present",
+ Usage: "Ignore error messages and proceed",
Destination: &c.Force,
},
cli.DurationFlag{
| [Run->[logArguments,processParams],logArguments->[SetFields],UnmarshalText] | Flags returns the flags that are used to create a VCS This file contains the logic to configure the back volume store. Displays flags related to a port group NetworkIP - list of network interfaces that can be used to create a new network VCH resource pool flags A CLI interface to configure a virtual container This func... | I would also keep the clarification that it will install over an existing deployment in the error message |
@@ -203,6 +203,13 @@ public abstract class ProgressiveRendering {
}
}
+ /**
+ * @return whether the computation has finished.
+ */
+ public boolean isFinished() {
+ return (status < 0 || status >= 1);
+ }
+
/**
* Actually do the work.
* <p>The security context wi... | [ProgressiveRendering->[news->[data,log,JSONObject,currentTimeMillis,release,put],start->[run->[schedule,getContext,Runnable,timeout,setCurrentRequest,log,currentTimeMillis,compute,setContext],getTable,getNextToken,IllegalStateException,executorService,Runnable,findAncestor,log,submit],executorService->[get],createMock... | Sets the current request in the thread local. | If this is test-only, it should be restricted |
@@ -15,6 +15,7 @@ import {
import { parseJWTFromURLParams } from '../../react/features/base/jwt';
import JitsiMeetJS, { JitsiRecordingConstants } from '../../react/features/base/lib-jitsi-meet';
import { pinParticipant, getParticipantById } from '../../react/features/base/participants';
+import { openChat } from '..... | [No CFG could be retrieved] | Package - level module that imports all the commands that are available on the system. Replies the commands that are used to run the given command. | can you import this from /actions? |
@@ -57,6 +57,7 @@ public class LargeColumnSupportedComplexColumnSerializer implements GenericColum
this.columnSize = columnSize;
}
+ @PublicApi
public static LargeColumnSupportedComplexColumnSerializer create(
IOPeon ioPeon,
String filenameBase,
| [LargeColumnSupportedComplexColumnSerializer->[createWithColumnSize->[LargeColumnSupportedComplexColumnSerializer],writeToChannel->[writeToChannel],create->[LargeColumnSupportedComplexColumnSerializer],getSerializedSize->[getSerializedSize],close->[close],open->[open]]] | Create a new instance of the large column serializer. | Why it needs to be public API? |
@@ -1200,7 +1200,7 @@ export class ResourcesImpl {
for (let i = 0; i < this.resources_.length; i++) {
const r = this.resources_[i];
const requested = r.isMeasureRequested();
- if (r.hasOwner() && !requested) {
+ if ((r.hasOwner() && !requested) || r.element.V1()) {
cont... | [No CFG could be retrieved] | Phase 1 - Builds and relayouts as needed. Measure a resource. | I thought were were killing the resources-intersect experiment? |
@@ -294,8 +294,6 @@ describe('amp-ad-3p-impl', () => {
const newIntersection = ad3p.getIntersectionElementLayoutBox();
expect(newIntersection).not.to.deep.equal(intersection);
expect(newIntersection.top).to.equal(intersection.top + 100);
- expect(newIntersection.width).to.equal(300);
-... | [No CFG could be retrieved] | This method checks that the intersection element layout box is in the same area as the layout box. | why is this gone? |
@@ -11,15 +11,6 @@
declare(strict_types=1);
-/*
- * This file is part of the API Platform project.
- *
- * (c) Kévin Dunglas <dunglas@gmail.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
namespace ApiPlatform\Core\Gr... | [canAccess->[isGranted,getGraphqlAttribute]] | Checks if a user has access to a specific object. | move this message over `declare(strict_types=1);` |
@@ -304,6 +304,9 @@ class UserAddressManager:
def _validate_userid_signature(user: User) -> Optional[Address]:
return validate_userid_signature(user)
+ def recover_userids(self, address_to_userids: defaultdict) -> None:
+ self._address_to_userids = address_to_userids
+
@property
def ... | [make_client->[sort_servers_closest],UserAddressManager->[_presence_listener->[is_address_known,refresh_address_presence,get_userid_presence,UserPresence,add_userid_for_address],_fetch_user_presence->[UserPresence],populate_userids_for_address->[add_userids_for_address,get_userids_for_address],refresh_address_presence-... | Validate a userid signature. | This should have a docstring. |
@@ -18,7 +18,8 @@ from allennlp.data.instance import Instance
from allennlp.data.tokenizers import Tokenizer, WordTokenizer
from allennlp.data.token_indexers import TokenIndexer, SingleIdTokenIndexer
from allennlp.data.fields import TextField, KnowledgeGraphField, LabelField, ListField
-from allennlp.data.dataset_re... | [WikitablesDatasetReader->[from_params->[WikitablesDatasetReader,from_params]]] | Deserialize a single - id token from a table. This is the directory that contains all thousands of thousands of thousands of thousands. | This should be `from allennlp.data.sempare.knowledge_graphs import TableKnowledgeGraph`, and the next line should be `from allennlp.data.semparse.worlds import WikitablesWorld`. That is, the module `__init__.py` should import the main class from each module, and then you don't need to repeat the class name in the impor... |
@@ -163,6 +163,8 @@ type Config struct {
Dashboard DashboardConfig `toml:"dashboard" json:"dashboard"`
ReplicationMode ReplicationModeConfig `toml:"replication-mode" json:"replication-mode"`
+
+ DisableServiceMiddleware bool
}
// NewConfig creates a new config.
| [MigrateDeprecatedFlags->[migrateConfigurationMap],Parse->[Parse],IsDefined->[IsDefined],migrateConfigurationFromFile->[IsDefined],Adjust->[CheckUndecoded,Parse,IsDefined,Validate,Adjust,Child],parseDeprecatedFlag->[IsDefined],adjustLog->[IsDefined],adjust->[Child,Validate,adjust,IsDefined],Parse] | NewConfig creates a new configuration object for the given object. Configuration variables for the cluster. | Once upon a time, PM said we should not use configurations starts with `Disable` but only use that starts with `Enable`. |
@@ -246,12 +246,12 @@ class Command(object):
return UNKNOWN_ERROR
finally:
# Check if we're using the latest version of pip available
- if (not options.disable_pip_version_check and not
- getattr(options, "no_index", False)):
+ if not options.d... | [Command->[main->[_build_session,parse_args],parse_args->[parse_args]]] | Entry point for pip - internal. This function is called by the command line interface to handle the nagios - related command Checks if a node in the system has a reserved lease. | I hate this. Why put the function name (`getattr`) on a separate line from the arguments? Strong -1 on this particular rule. |
@@ -38,7 +38,7 @@ public:
{ "delete", SEC_CONSOLE, true, &HandleCharacterDeletedDeleteCommand, "" },
{ "list", SEC_ADMINISTRATOR, true, &HandleCharacterDeletedListCommand, "" },
{ "restore", SEC_ADMINISTRATOR, true, &HandleCharacterDelet... | [character_commandscript->[bool->[HandleCharacterDeletedListHelper,getIntConfig,uint32,size,GetPreparedStatement,setUInt16,SendSysMessage,playerLink,setString,HasLowerSecurity,extractPlayerNameFromLink,atoi,PlayerDumpWriter,Fetch,SetAtLoginFlag,GetPlayerAccountIdByGUID,strtok,LookupEntry,GetSession,GetDeletedCharacterI... | Get the commands that can be handled by the system. | Please fix the spacing for the last "" }, |
@@ -464,8 +464,13 @@ namespace DynamoCoreWpfTests
// Ignoring the ExtensionWorkspaceData property as this is added after the re-save,
// this will cause a difference between jobject1 and jobject2 if it is not ignored.
// Same thing goes for the Linting property...
+ // ... | [SerializationTests->[GetLibrariesToPreload->[GetLibrariesToPreload]],JSONSerializationTests->[SerializationTest->[DoWorkspaceOpenAndCompareView],AllTypesSerialize->[DoWorkspaceOpenAndCompareView],GetLibrariesToPreload->[GetLibrariesToPreload],DoWorkspaceOpenAndCompareView->[DoWorkspaceOpen],ConvertCurrentWorkspaceView... | This test tests if the JSON file is the same before and after save with dummy nodes. object1 jobject2 is not yet available in the JavacObject. | hmm can we add JsonIgnore on `ViewModelBase`? |
@@ -1,3 +1,5 @@
+import mock
+
from ..... import base
from pulp.common import dateutils
from pulp.devel import mock_plugins
| [RepoGroupPublishManagerTests->[clean->[super,get_collection],test_publish_with_plugin_failure_report->[list,assertEqual,len,get_collection,publish,PublishReport],test_publish_with_plugin_no_report->[list,assertEqual,len,get_collection,publish],test_publish->[assertTrue,list,assertEqual,len,isinstance,get_collection,pu... | Tests the pulp server for the publish - group and publish - dist functionality. This method checks that the specified repository group is a repository group and that it has the correct. | blank line below this for pep8 |
@@ -131,8 +131,8 @@ class SearchFilter extends AbstractFilter
$values = array_map([$this, 'getFilterValueFromUrl'], $values);
$queryBuilder
- ->join(sprintf('o.%s', $property), $property)
- ->andWhere(sprintf('%1$s.id IN (:%1$s)', $property))
+ ... | [SearchFilter->[getDescription->[isCollectionValuedAssociation,getFieldNames,getClassMetadata,getTypeOfField,getAssociationNames,isPropertyEnabled],apply->[setParameter,isCollectionValuedAssociation,getFieldNames,isSingleValuedAssociation,getClassMetadata,getCurrentRequest,extractProperties,getFilterValueFromUrl,isProp... | Applies the filter to the query builder. - set parameter not found. | api_ can be directly in the sprintf pattern here (easier to read) |
@@ -1,7 +1,9 @@
<% flash.to_hash.slice(*ApplicationController::FLASH_KEYS).each do |type, message| %>
<% if message.present? %>
- <div class='alert <%= "alert-#{type}" %>' role='alert'>
- <%= safe_join([message.html_safe]) %>
- </div>
+ <%= render 'shared/alert', {
+ type: type,
+ message: s... | [No CFG could be retrieved] | Renders flash messages into alert elements. | the safe_join on a manually HTML-safe'd string is confusing to me....? Do we store `<p>` tag or something inside our messages? |
@@ -631,6 +631,7 @@ namespace Microsoft.VisualBasic
public static int Len(short Expression) { throw null; }
public static int Len(int Expression) { throw null; }
public static int Len(long Expression) { throw null; }
+ [System.Diagnostics.CodeAnalysis.RequiresUnreferencedCodeAttribute(... | [OptionTextAttribute->[Never,Class],ProjectData->[Never],NewLateBinding->[LateCallInvokeDefault->[Never],FallbackIndexSet->[Never],LateGetInvokeDefault->[Never],FallbackIndexSetComplex->[Never],FallbackInvokeDefault1->[Never],FallbackInvokeDefault2->[Never],FallbackSet->[Never],FallbackSetComplex->[Never],FallbackCall-... | Gets the length of a constant array. | Similar to above - it isn't the object, but the object's type. #Resolved |
@@ -630,6 +630,13 @@ func (node *Node) InitConsensusWithValidators() (err error) {
shardState, err := committee.WithStakingEnabled.Compute(
epoch, node.Consensus.ChainReader,
)
+ if err != nil {
+ utils.Logger().Err(err).
+ Uint64("blockNum", blockNum).
+ Uint32("shardID", shardID).
+ Uint64("epoch", epoc... | [AddPendingTransaction->[tryBroadcast,addPendingTransactions],StartServer->[startRxPipeline],ShutDown->[Blockchain,Beaconchain],InitConsensusWithValidators->[Blockchain],countNumTransactionsInBlockchain->[Blockchain],AddPendingReceipts->[Blockchain],addPendingStakingTransactions->[Blockchain],AddPendingStakingTransacti... | InitConsensusWithValidators initializes the consensus with validators This function is called when a node is not able to be used. It is called by. | no return on error? |
@@ -562,13 +562,10 @@
}
const { encoding } = options;
- const buffer = Buffer.alloc(info.size);
- const fd = archive.getFd();
- if (!(fd >= 0)) throw createError(AsarError.NOT_FOUND, { asarPath, filePath });
logASARAccess(asarPath, filePath, info.offset);
- fs.readSync(fd, b... | [No CFG could be retrieved] | Reads a file or directory from the Asar archive. Reads the file system entries for the given file. | The `Buffer.from` copies data from the argument, can the method return `Buffer` directly to save the extra copy? |
@@ -60,7 +60,7 @@ public class ItCoverageSensorTest {
@Test
public void testNoExecutionIfNoCoverageFile() {
- DefaultInputFile inputFile = new DefaultInputFile("foo", "src/foo.xoo").setLanguage("xoo");
+ InputFile inputFile = new TestInputFileBuilder("foo", "src/foo.xoo").setLanguage("xoo").build();
... | [ItCoverageSensorTest->[testLineHitNoConditions->[write,isEqualTo,add,File,setLines,execute],prepare->[create,newFolder,ItCoverageSensor],testLineHitAndConditions->[write,isEqualTo,add,File,setLines,execute],testNoExecutionIfNoCoverageFile->[add,setLanguage,execute],testDescriptor->[DefaultSensorDescriptor,describe],Te... | Test no execution if no coverage file. | What about having a static DefaultInputFile.newBuilder("foo", "src/foo.xoo") |
@@ -192,6 +192,12 @@ func (f *File) sync(ctx context.Context) error {
// Fsync implements the fs.NodeFsyncer interface for File.
func (f *File) Fsync(ctx context.Context, req *fuse.FsyncRequest) (err error) {
+ ctx, maybeUnmounting, cancel := wrapCtxWithShorterTimeoutForUnmount(f.folder.fs.log, ctx, int(req.Pid))
+... | [sync->[destroy],Fsync->[sync],Write->[destroy,Write],Attr->[getAndDestroyIfMatches,fillAttrWithMode],Setattr->[destroy,attr],Read->[Read],attr->[fillAttrWithMode],Forget->[destroy]] | Fsync implements the fs. NodeFsyncer interface for File. | You can use `true` directly here like in `Statfs`, because of the `if` check. |
@@ -367,6 +367,7 @@ public final class InvokeHTTP extends AbstractProcessor {
+ "on the normal truststore hostname verifier. Only valid with SSL (HTTPS) connections.")
.addValidator(StandardValidators.NON_EMPTY_VALIDATOR)
.required(false)
+ .expressionLanguageSu... | [InvokeHTTP->[convertAttributesFromHeaders->[csv],OverrideHostnameVerifier->[verify->[verify]]]] | This property is used to enable the response flow file and the response headers. | I'm not very comfortable with this field supporting EL either. Do you have a specific use case that requires it? |
@@ -1749,6 +1749,14 @@ crt_hdlr_iv_sync_aux(void *arg)
D_GOTO(exit, rc = -DER_NONEXIST);
}
+ /* Check group version match */
+ grp_ver = ivns_internal->cii_grp_priv->gp_membs_ver;
+ if (grp_ver != input->ivs_grp_ver) {
+ D_ERROR("Group (%s) version mismatch. Local: %d Remote :%d\n",
+ ivns_id.ii_group_name, ... | [No CFG could be retrieved] | This function is called to get the object from the server. This is the main entry point for CRT_CO_BULK_NULL. | i dont think this check is needed as we dont compute parent and/or children in this function |
@@ -21,7 +21,8 @@ verify = SpackCommand('verify')
install = SpackCommand('install')
-@pytest.mark.skipif(sys.platform == 'win32', reason="Error on Win")
+@pytest.mark.skipif(str(spack.platforms.host()) == 'windows',
+ reason="Install hangs on windows")
def test_single_file_verify_cmd(tmpdir):
... | [test_single_file_verify_cmd->[dump,all,verify,write,append,print,stat,create_manifest_entry,pop,len,str,sorted,utime,join,open,mkdirp,load],test_single_spec_verify_cmd->[install,verify,write,dag_hash,len,Spec,join,open,load],SpackCommand,skipif] | Test the command interface to verify a single file. | Is the reason "Install hangs on windows" accurate or a copy + paste error? Similar for other tests in this file |
@@ -121,10 +121,12 @@ class MediaStreamController extends Controller
fclose($handle);
});
+ $pathInfo = pathinfo($fileName);
+
// Prepare headers
$disposition = $response->headers->makeDisposition(
$dispositionType,
- basename($fileName)
+ ... | [MediaStreamController->[getImageAction->[getPathInfo,returnImage,createNotFoundException,getMediaProperties,getCode],downloadAction->[getCode,getMessage,getFileResponse,get,createNotFoundException,getFileVersion,getId,increaseDownloadCounter],getStorage->[get],getFileResponse->[getName,getMimeType,makeDisposition,set,... | Get a streamed response for a file version. | Just an idea, why don't we use the `PathCleanup` service here? Would probably provide better URLs. |
@@ -108,6 +108,11 @@ class PageCreate(ModelMutation):
if attributes:
AttributeAssignmentMixin.save(instance, attributes)
+ @classmethod
+ def save(cls, info, instance, cleaned_input):
+ super(PageCreate, cls).save(info, instance, cleaned_input)
+ info.context.plugins.page_cre... | [PageCreate->[Arguments->[PageCreateInput],clean_input->[clean_attributes]],PageTypeUpdate->[Arguments->[PageTypeUpdateInput],clean_input->[validate_attributes,check_for_duplicates]],PageUpdate->[Arguments->[PageInput]],PageTypeCreate->[Arguments->[PageTypeCreateInput],clean_input->[validate_attributes]]] | Save the missing attributes to the database. | I think `super().save(info, instance, cleaned_input)` is enough. |
@@ -76,7 +76,7 @@ public class ByteBufferWriter<T> implements Closeable
private String makeFilename(String suffix)
{
- return String.format("%s.%s", filenameBase, suffix);
+ return StringUtils.safeFormat("%s.%s", filenameBase, suffix);
}
@Override
| [ByteBufferWriter->[writeToChannel->[getInput],close->[close],write->[write],combineStreams->[apply->[getInput->[makeFilename]]]]] | Creates a filename for a . | Probably should crash if bad format string |
@@ -517,7 +517,7 @@ RSpec.describe SessionController do
end
end
- describe '#sso_login' do
+ describe "#sso_login" do
before do
@sso_url = "http://example.com/discourse_sso"
@sso_secret = "shjkfdhsfkjh"
| [post_login->[email,post],get_sso->[new,hex,sso_secret,nonce,register_nonce],sso_for_ip_specs->[email,get_sso,username,name,external_id],email,let,methods,block,it,parse_query,contain_exactly,to,current_user,avatar_sizes,username,get_sso,track_log_messages,it_behaves_like,change,logout,discourse_connect_allows_all_retu... | Checks that user has a security key and totp enabled. doesnt allow logging in if the 2fa params are garbled. | Let us avoid all these cosmetic changes as it pollutes the commit history. |
@@ -7,7 +7,7 @@ module Engine
class Base
include Helper::Type
- attr_accessor :index, :tile
+ attr_accessor :index, :tile, :lanes
def id
"#{tile.id}-#{index}"
| [Base->[hex->[hex],inspect->[name],id->[id],include,class,attr_accessor,num,edge?],require_relative] | Returns the sequence id for this node. | i don't think lanes should be in base unless every single part has a lane |
@@ -234,7 +234,7 @@ function locate_wp_config() {
if ( file_exists( ABSPATH . 'wp-config.php' ) ) {
$path = ABSPATH . 'wp-config.php';
- } elseif ( file_exists( ABSPATH . '../wp-config.php' ) && ! file_exists( ABSPATH . '/../wp-settings.php' ) ) {
+ } elseif ( file_exists( dirname( ABSPATH ) . '../wp-config.... | [iterator_map->[add_transform],describe_callable->[getStartLine,getFileName],http_request->[getType,getMessage,getData],mustache_render->[render],format_items->[display_items]] | Locates the WordPress configuration file. | `dirname()` replaces the `..` subpath that traverses to the parent folder, so you need to remove this bit from `wp-config.php` file. |
@@ -0,0 +1,17 @@
+class UserProgramsQuery
+ def initialize(user)
+ @user = user
+ end
+
+ # チェックインしていないエピソードと紐づく番組情報を返す
+ def unchecked
+ works = @user.works.wanna_watch_and_watching
+ channel_works = @user.channel_works.where(work: works)
+
+ conditions = channel_works.map do |cw|
+ "(work_id = #{... | [No CFG could be retrieved] | No Summary Found. | Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping. |
@@ -117,7 +117,8 @@ public class WebSocketServerHandler extends SimpleChannelInboundHandler<Object>
} else if (frame instanceof PingWebSocketFrame) {
ctx.writeAndFlush(new PongWebSocketFrame(frame.content().retain()));
return false;
- } else if (!(frame instanceof TextWebSocketFrame) && ... | [WebSocketServerHandler->[BinaryWebSocketEncoder->[write->[write]]]] | Handles a single WebSocket frame. | small change! zero test on a core hot path functionality!!! Really dangerous to merge this man! Can you provide tests for this? or some background on why a test is not needed? (would this be covered by existing tests? which I don't believe it's the case). |
@@ -2572,6 +2572,7 @@ func TestPFS(suite *testing.T) {
require.Equal(t, BCommit, commitInfos[1].Commit)
require.Equal(t, CCommit, commitInfos[2].Commit)
require.Equal(t, DCommit, commitInfos[3].Commit)
+ <-done
})
// A
| [makeTarStream->[WithWriter,WriteFile],Read->[Sleep,Read],ModifyFile,GetFileURL,NewRealEnv,SubscribeCommit,HasPrefix,CreateRepo,Done,Put,Itoa,New,UTC,NotNil,Len,CloseAndRecv,Bytes,StartCommit,makeTarStream,GetFile,LoadInt64,DiffFileAll,WithTagPutFile,NewTestClient,IsMonkeyError,WithContext,Parallel,NoError,BlockCommits... | GetFile - get file and check if it is valid GetFile - get file from a commit. | This seems like it is going to hang in CI without timing out. Maybe use a select with a context. |
@@ -131,6 +131,8 @@ type templateData struct {
State map[string](ServiceAliasConfig)
// the service lookup
ServiceUnits map[string]ServiceUnit
+ // number of service endpoints
+ ServiceEndpoints map[string]int
// full path and file name to the default certificate
DefaultCertificate string
// full path and f... | [HasRoute->[routeKey],DeleteServiceUnit->[findMatchingServiceUnit],AddRoute->[createServiceAliasConfig,createServiceUnitInternal,routeKey,findMatchingServiceUnit],numberOfEndpoints->[findMatchingServiceUnit],AddEndpoints->[findMatchingServiceUnit],FindServiceUnit->[findMatchingServiceUnit],removeRouteInternal->[routeKe... | newTemplateRouter creates a new template router based on the given configuration items. Returns an certManager. | Don't you already have this from the service state? |
@@ -0,0 +1 @@
+#include "rev1.h"
| [No CFG could be retrieved] | No Summary Found. | this file should match the folder name rev1_rgb.c |
@@ -43,6 +43,7 @@ class GCC(NativeTool):
lib64_tuples = platform.resolve_for_enum_variant({
'darwin': [],
'linux': [('lib64',)],
+ 'none': [],
})
return self._filemap(lib64_tuples + [
('lib',),
| [GCC->[c_compiler->[_common_lib_dirs],_common_lib_dirs->[_filemap],_common_include_dirs->[_filemap],path_entries->[_filemap],cpp_compiler->[_common_lib_dirs],_cpp_include_dirs->[_filemap]],get_gplusplus->[cpp_compiler],get_gcc->[c_compiler]] | Return a list of common lib directories. | Hm... this is strange. When would this end up being used? It's possible that having a better name than "none" ("cross-platform"? "unknown"?) would help, but in general, I don't understand the semantics of having a separate set of "cross platform" args. |
@@ -1471,7 +1471,9 @@ class PortableContact
$tags = [];
foreach ($data['tags'] as $tag) {
$tag = mb_strtolower($tag);
- $tags[$tag] = $tag;
+ if (count($tag) < 100) {
+ $tags[$tag] = $tag;
+ }
}
foreach ($tags as $tag) {
| [PortableContact->[lastUpdated->[query,getMessage,registerNamespace,loadXML,item],detectServerType->[query,loadHTML],load->[get_curl_code,getMessage],discoverServer->[getMessage]]] | Discover the relay data for a given server. Diaspora - Diaspora. | Please use `mb_strlen()` next time instead. |
@@ -215,6 +215,12 @@ public class MultimediaEditFieldActivity extends AnkiActivity
menu.findItem(R.id.multimedia_edit_field_to_audio).setVisible(mField.getType() != EFieldType.AUDIO_RECORDING);
menu.findItem(R.id.multimedia_edit_field_to_audio_clip).setVisible(mField.getType() != EFieldType.AUDIO_CLIP... | [MultimediaEditFieldActivity->[onRequestPermissionsResult->[recreateEditingUIUsingCachedRequest],toImageField->[recreateEditingUi],toAudioClipField->[recreateEditingUi],toAudioRecordingField->[recreateEditingUi],onActivityResult->[onActivityResult],ChangeUIRequest->[init->[ChangeUIRequest],uiChange->[ChangeUIRequest],f... | Override to show the menu items if the menu item is selected. item - > null. | it seems like we are not actually doing anything with this member variable. Could the CheckCameraPermission object just have a static method that verifies the permission? I'd name it differently as well :-), `CameraPermissionCheck.hasPermission(Context)` seems like it would work |
@@ -51,8 +51,13 @@ class ScopeInfo:
self._subsystem_cls_attr("deprecated_options_scope_removal_version"),
)
+ @property
+ def scope_aliases(self) -> Tuple[str, ...]:
+ """BuiltinGoal subsystems may define aliases."""
+ return cast(Tuple[str, ...], self._subsystem_cls_attr("al... | [normalize_scope->[lower],ScopeInfo->[description->[getattr,cast],deprecated_scope->[cast,_subsystem_cls_attr],_subsystem_cls_attr->[getattr],deprecated_scope_removal_version->[cast,_subsystem_cls_attr]],dataclass] | Deprecated scope removal version. | Not all subsystem classes have the `aliases` attribute, and since we always return a default any way, it felt safe to provide that default already to `getattr`. |
@@ -89,9 +89,12 @@ const AddressItem = ({ item, balanceUnit, onPress }) => {
const styles = StyleSheet.create({
address: {
- fontWeight: '600',
+ fontWeight: 'bold',
marginHorizontal: 40,
},
+ list: {
+ flex: 6,
+ },
index: {
fontSize: 15,
},
| [No CFG could be retrieved] | Displays a list of all AddressItem objects that are part of the . | 6? How does that behave on large screens? |
@@ -58,11 +58,11 @@ type MetricSet struct {
// New create a new instance of the MetricSet
func New(base mb.BaseMetricSet) (mb.MetricSet, error) {
cfgwarn.Beta("The php_fpm pool metricset is beta")
-
http, err := helper.NewHTTP(base)
if err != nil {
return nil, err
}
+
return &MetricSet{
base,
http,... | [Fetch->[FetchContent,Apply,Errorf,Unmarshal],Build,DefaultMetricSet,Beta,MustAddMetricSet,NewHTTP,WithHostParser] | This function is used to create a new instance of the metricset. It is used to. | :heart: thanks for changing this too, it may require to change also its tests. |
@@ -0,0 +1,7 @@
+require 'faker'
+
+FactoryGirl.define do
+ factory :section do
+ name { Faker::Lorem.word }
+ end
+end
\ No newline at end of file
| [No CFG could be retrieved] | No Summary Found. | Use 2 (not 1) spaces for indentation.<br>Tab detected. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.