patch stringlengths 18 160k | callgraph stringlengths 4 179k | summary stringlengths 4 947 | msg stringlengths 6 3.42k |
|---|---|---|---|
@@ -428,10 +428,8 @@ class MyPkg(ConanFile):
client.save({"conanfile.py": new_recipe})
client.run("create . frodo/stable")
# upload recipe and packages
- error = client.run("upload Hello0/1.2.1@frodo/stable --all --no-overwrite recipe",
- ignore_error=True)
+ ... | [UploadTest->[skip_upload_test->[_client],upload_modified_recipe_test->[_client],upload_login_prompt_disabled_no_user_test->[_client],corrupt_upload_test->[_client],upload_without_sources_test->[_client],query_upload_test->[_client],no_overwrite_argument_collision_test->[_client],upload_login_prompt_disabled_user_not_a... | Test for upload_no_overwrite_recipe. Upload a single package and a recipe. | Here there was a check for an error only `if not client.revisions`, please recheck this test. The `run` command may have to be moved inside the `if` clause with different values for `assert_error`. |
@@ -103,4 +103,8 @@ public class AdapterTest {
assertNull(automationService.getAdaptedValue(ctx, null, Void.class));
}
+ @Test
+ public void souldAdaptContext() throws Exception {
+ assertEquals(ctx, automationService.getAdaptedValue(ctx, null, OperationContext.class));
+ }
}
| [AdapterTest->[initRepo->[OperationContext,save,getDocument,createDocument,setPropertyValue,createDocumentModel,getRef],shouldAdaptArrayStringAsStringList->[assertNotNull,assertTrue,size,getAdaptedValue,contains,assertEquals],souldAdaptNullValue->[getAdaptedValue,assertNull],setup->[OperationContext],shouldAdaptArraySt... | Test if the value of the managed property is null. | sould -> should. |
@@ -184,9 +184,10 @@ return [
],
'/notification' => [
- '[/]' => [Module\Notifications\Notification::class, [R::GET]],
- '/view/{id:\d+}' => [Module\Notifications\Notification::class, [R::GET]],
- '/mark/all' => [Module\Notifications\Notification::class, [R::GET]],
+ '[/]' ... | [No CFG could be retrieved] | List of all modules in the modexp hierarchy. The list of modules that can be loaded. | The `/view/{id:\d+}` and `/action/{id:\d+}` routes can be combined in a single `/(id:\d+}` route that accepts GET and POST. |
@@ -34,10 +34,16 @@ func (c *Container) readFromJournal(ctx context.Context, options *logs.LogOption
var config journal.JournalReaderConfig
if options.Tail < 0 {
config.NumFromTail = 0
+ } else if options.Tail == 0 {
+ config.NumFromTail = math.MaxUint64
} else {
config.NumFromTail = uint64(options.Tail)
... | [Write->[NewLogLine],readFromJournal->[ID,Before,Done,Error,NewLogLine,Now,Close,Errorf,Read,NewJournalReader,Rewind,Since,Add,Follow,Debugf],Unix,Format,Sprintf,Errorf,TrimSpace] | readFromJournal reads a container from the journal. read bytes from the file. | OK, I'll fess up to my ignorance. What does the minus `-` sign do here? |
@@ -140,10 +140,10 @@ export function Youtube({
'*'
);
}
- if (data.event == 'infoDelivery' && playerState != undefined) {
+ if (event == 'infoDelivery' && playerState != undefined) {
dispatchVideoEvent(currentTarget, PlayerStates[playerState.toString()]);
}
- if (data.event ==... | [No CFG could be retrieved] | Creates a video object that can be played by a user. Get embed url for a specific . | Can we pull out some of these string literals into an event enum? |
@@ -182,7 +182,10 @@ public class LogicalPlanner {
return buildOutputNode(currentNode);
}
- public OutputNode buildPullLogicalPlan(final PullPlannerOptions pullPlannerOptions) {
+ public OutputNode buildPullLogicalPlan(
+ final QueryPlannerOptions queryPlannerOptions,
+ final boolean isScalablePus... | [LogicalPlanner->[getSinkTopic->[getWindowInfo],buildJoin->[buildJoin,prepareSourceForJoin],buildAggregateNode->[getTargetSchema],isInnerNode->[isInnerNode],prepareSourceForJoin->[prepareSourceForJoin,buildInternalProjectNode,buildInternalRepartitionNode],RewrittenAggregateAnalysis->[getAggregateFunctions->[getAggregat... | Builds a persistent logical plan. This method creates a node that represents a source or a project node. | looks like we're now sharing this method across push/pull - we should probably rename. Though another issue is that it seems a little odd the way we use the queryPlannerOptions because (1) we're hardcoding the two methods to return true (2) some of the configurations (i.e. `getTableScansEnabled`) don't really make sens... |
@@ -75,8 +75,12 @@ func setupBuildEnv(build *buildapi.Build, pod *kapi.Pod) {
default:
// Do nothing for unknown source types
}
- vars = append(vars, kapi.EnvVar{"OUTPUT_IMAGE", build.Parameters.Output.ImageTag})
- vars = append(vars, kapi.EnvVar{"OUTPUT_REGISTRY", build.Parameters.Output.Registry})
+
+ if regis... | [IsNotExist,Getenv,Join,Stat] | Add environment variables to the container in the pod spec. | Is there anything useful to do if err != nil? |
@@ -437,7 +437,14 @@ func (s *server) configRenderer() (ConfigRenderer, error) {
return "", errors.Wrapf(err, "could not converge %s configuration to TOML", service.Name())
}
- if usesPlatformScaffolding(service) {
+ pkgsMeta := make([]*product.PackageMetadata, 0, len(s.deployment.ExpectedServices))
+ for _... | [DeploySome->[newEventSender,doDeploySome,HasConfiguredDeployment],ServiceVersions->[HasConfiguredDeployment],startConverge->[buildDesiredState],Deploy->[newEventSender,HasConfiguredDeployment],StartNonDataServices->[newEventSender,HasConfiguredDeployment],readAndValidate->[readDeploymentServiceCerts,validateCerts],Rem... | configRenderer returns a function that can be used to render the configuration for a given service. cant be null. | why do we need to gather all the metadatas every time for each service? Can we just grab `services.MetadataForPackage(service.Name())`? Or maybe `services.UsesPlatformScaffolding(service.Name())`? |
@@ -208,7 +208,15 @@ public class RegistryProtocol implements Protocol {
// url to registry
final Registry registry = getRegistry(registryUrl);
- final URL registeredProviderUrl = getUrlToRegistry(providerUrl, registryUrl);
+
+ URL regUrl = getUrlToRegistry(providerUrl, registryUrl);
+... | [RegistryProtocol->[getCacheKey->[getProviderUrl],getServers->[getServers],ProviderConfigurationListener->[overrideUrl->[getConfigedInvokerUrl],notifyOverrides->[doOverrideIfNecessary]],reExport->[export,reExport],export->[registerStatedUrl,register],DestroyableExporter->[unexport->[unexport],getInvoker->[getInvoker]],... | Exports a single object. | I think The `DUBBO_IP_TO_BIND` and `DUBBO_IP_TO_REGISTRY` jvm properties have already covered this scenario. |
@@ -224,7 +224,7 @@ def _maxwell_filter(raw, origin='auto', int_order=8, ext_order=3,
head_pos=None, st_fixed=True, st_only=False,
mag_scale=100.,
skip_by_annotation=('edge', 'bad_acq_skip'),
- reconstruct='in', verbose=None):
+ ... | [_trans_sss_basis->[_sss_basis],find_bad_channels_maxwell->[_maxwell_filter,_get_mf_picks,_get_coil_scale],_get_grad_point_coilsets->[_prep_mf_coils],_regularize_in->[_get_degrees_orders,_regularize_out],_sss_basis_basic->[_get_mag_mask,_concatenate_sph_coils,_sph_harm_norm],_compute_sphere_activation_in->[_sq],_overla... | Filter a sequence of objects based on a maximum well - defined filter. Get a single chunk of data from the network. Missing residue in a Megree - like system. Construct raw file object with missing data. | what's the difference between proc_msg and verbose? |
@@ -120,7 +120,7 @@ namespace Microsoft.Extensions.FileSystemGlobbing.Abstractions
/// <remarks>
/// Equals the value of <seealso cref="System.IO.DirectoryInfo.Parent" />.
/// </remarks>
- public override DirectoryInfoBase ParentDirectory
- => new DirectoryInfoWrapper(_direc... | [DirectoryInfoWrapper->[EnumerateFileSystemInfos->[EnumerateFileSystemInfos]]] | Creates a DirectoryInfoBase that represents the parent directory of the current DirectoryInfo. | I don't think we should be changing behavior here. |
@@ -519,11 +519,16 @@ class Job(object):
class DataflowApplicationClient(object):
+ _HASH_CHUNK_SIZE = 1024 * 8
+ _GCS_CACHE_PREFIX = "artifact_cache"
"""A Dataflow API client used by application code to create and query jobs."""
- def __init__(self, options):
+ def __init__(self, options, root_staging_loca... | [translate_distribution->[to_split_int],translate_value->[to_split_int],_LegacyDataflowStager->[stage_artifact->[_gcs_file_copy]],_get_required_container_version->[_get_container_image_tag],get_runner_harness_container_image->[_get_container_image_tag],Environment->[__init__->[Environment]],get_container_image_from_opt... | Initializes a Dataflow API client object. | Why do we need an additional param? I am not seeing usage of custom `root_staging_location` in the PR and this is an internal module. |
@@ -126,6 +126,6 @@ def test_io_set():
warnings.simplefilter('always')
assert_raises(NotImplementedError, read_epochs_eeglab,
bad_epochs_fname)
- assert_equal(len(w), 3)
+ assert_equal(len(w), 1)
run_tests_if_main()
| [test_io_set->[_TempDir,catch_warnings,assert_raises,filter,savemat,copyfile,join,loadmat,simplefilter,get_data,assert_equal,epochs,read_epochs_eeglab,_test_raw_reader,assert_array_equal,find_events,len,_read_eeglab_events,read_raw_eeglab,write_events,Epochs],simplefilter,run_tests_if_main,data_path,join,requires_versi... | Test import of the EEGLAB. set file. Test if two events have the same number of events and event_ids. read raw file with one event Missing object. | oh wait, I forgot you haven't updated the test yet ... |
@@ -108,6 +108,13 @@ class TestTypeof(ValueTypingTestBase, TestCase):
a4.flags.writeable = False
check(a4, 0, 'C', False, True)
+ # Unsupported dtype
+ a5 = a1.astype(a1.dtype.newbyteorder())
+ with self.assertRaises(ValueError) as raises:
+ typeof(a5)
+ self.a... | [TestTypeof->[test_structured_arrays->[check],test_custom->[Custom],test_array_values->[check]],TestFingerprint->[test_arrays->[add,DistinctChecker],test_ints->[add],test_dtype->[add,DistinctChecker],test_buffers->[add,DistinctChecker],test_tuples->[add,DistinctChecker],test_lists->[add,DistinctChecker],test_sets->[add... | Test array values with nanoseconds. read - only version of from_struct_dtype. | Would `assertRaisesRegex(p)` do the same? |
@@ -69,6 +69,18 @@ public interface RestClient extends Closeable {
*/
RestClientConfiguration getConfiguration();
+ CompletionStage<RestResponse> metrics();
+
+ CompletionStage<RestResponse> metrics(String path);
+
+ CompletionStage<RestResponse> metrics(boolean openMetrics);
+
+ CompletionStage<Rest... | [forConfiguration->[RestClientOkHttp]] | Get the configuration for the client. | Maybe we can move this to a RestMetricsClient interface. Since this module is experimental, no need to worry about backwards-compatibility. i.e. it can be done in 10.1 |
@@ -66,13 +66,10 @@ namespace Microsoft.Extensions.FileSystemGlobbing
/// Gets a hash for the file pattern match.
/// </summary>
/// <returns>Some number</returns>
- public override int GetHashCode()
- {
- var hashCodeCombiner = HashCodeCombiner.Start();
- ... | [FilePatternMatch->[GetHashCode->[OrdinalIgnoreCase,Start,Add],Equals->[OrdinalIgnoreCase,Path,Stem,Equals]]] | Get hashCode of this path and stem. | Do we have good test coverage for edge-cases of Equals/GetHashCode to make sure they agree? Not seeing anything that stands out as buggy here but want to understand how much we should scrutinize. |
@@ -360,7 +360,7 @@ FILE *cf_popen(const char *command, const char *type, bool capture_stderr)
}
}
- CloseChildrenFD();
+ CloseChildrenFDUnsafe();
argv = ArgSplitCommand(command);
| [No CFG could be retrieved] | This function is a wrapper for the standard library s exec function. It is called by the Opens a file descriptor for a child process and sets its uid and gid. | Hmmm the code after this in some error conditions returns NULL instead of doing `_exit()` or `exec()`, so calling this unsafe function could be troublesome. TODO investigate. |
@@ -1005,6 +1005,7 @@ def review(request, addon, channel=None):
form=form,
has_versions_pending_rejection=has_versions_pending_rejection,
is_admin=is_admin,
+ language_dict=dict(settings.LANGUAGES),
latest_not_disabled_version=latest_not_disabled_version,
latest_versi... | [leaderboard->[context],queue_extension->[_queue],queue_recommended->[_queue],performance->[_sum,context],ReviewAddonVersionDraftCommentViewSet->[get_object->[_verify_object_permissions,get_queryset],get_extra_comment_data->[get_version_object],get_serializer_context->[get_extra_comment_data,get_version_object],get_ver... | Show a page of the version of a given add - on. Get all versions related to a specific . Find a version of a specific and return it. A verdict is a verdict if it was locked by a reviewer or auto - A function to get the verdict of a version. | Maybe also needed in `AbuseReportAdmin:addon_card()` and `abuse_reports()` views ? Those re-use (directly or indirectly) the template |
@@ -55,3 +55,10 @@ class AttributeInputType:
]
# list the input types that cannot be assigned to a variant
NON_ASSIGNABLE_TO_VARIANTS = [MULTISELECT]
+
+
+class AttributeType:
+ PRODUCT = "product"
+ PAGE = "page"
+
+ CHOICES = [(PRODUCT, "Product"), (PAGE, "Page")]
| [ProductAvailabilityStatus->[get_display->[NotImplementedError]],VariantAvailabilityStatus->[get_display->[NotImplementedError]]] | list the input types that cannot be assigned to a variant. | Maybe we should name it `PRODUCT_TYPE` instead of `PRODUCT` |
@@ -51,6 +51,7 @@ namespace System.ComponentModel
/// to the corresponding property on the object. If there is no matching
/// property the resource will be ignored.
/// </summary>
+ [RequiresUnreferencedCode("The Type of value cannot be statically discovered.")]
public void A... | [ComponentResourceManager->[ApplyResources->[ApplyResources],FillResources->[FillResources]]] | Apply resources to the given object. | NIT: Share the string of both of these API's attributes? |
@@ -7,5 +7,9 @@ OrderEventsEmailsEnum = graphene.Enum.from_enum(OrderEventsEmails)
class OrderStatusFilter(graphene.Enum):
- READY_TO_FULFILL = 'READY_TO_FULFILL'
- READY_TO_CAPTURE = 'READY_TO_CAPTURE'
+ READY_TO_FULFILL = 'ready_to_fulfill'
+ READY_TO_CAPTURE = 'ready_to_capture'
+ UNFULFILLED = '... | [from_enum] | OrderStatusFilter - Filter for OrderStatus. | Do we want space (` `) here? |
@@ -292,6 +292,14 @@ public class DruidSchema extends AbstractSchema
initializationLatch.await();
}
+ public void initializeViews(PlannerFactory factory) {
+ // HACK: Manually inject dependency. Need to discuss with community on how to break the circular
+ // dependency between DruidSchema and PlannerF... | [DruidSchema->[getFunctionMultimap->[build,put,entrySet,builder],removeSegment->[remove,debug,notifyAll,info,get,getDataSource,isEmpty,add,getIdentifier],buildDruidTable->[TableDataSource,getRowOrder,build,get,DruidTable,values,builder,forEach,getColumnType,putIfAbsent],segmentRemoved->[removeSegment],runSegmentMetadat... | A blocking call to get the table map. | How about breaking the circle by adding a `PlannerFactory` parameter to `ViewManager.getViews()`? |
@@ -158,6 +158,18 @@ public class ConsumeKafkaRecord_2_6 extends AbstractProcessor implements Verifia
.addValidator(StandardValidators.POSITIVE_INTEGER_VALIDATOR)
.build();
+ static final PropertyDescriptor COMMIT_OFFSETS = new Builder()
+ .name("Commit Offsets")
+ .... | [ConsumeKafkaRecord_2_6->[close->[close],verify->[createConsumerPool],onTrigger->[getConsumerPool],getConsumerPool->[close]]] | This static class defines the properties of a Kafka property that can be used to determine the offset missing time period. | I'd rephrase to avoid "we" here. Perhaps, "In the typical use case, this value is set to true..." I think we should also be more direct in tying this to Exactly Once in Stateless. How about: "Specifies whether or not this Processor should commit the offsets to Kafka after receiving messages. This value should be false ... |
@@ -698,6 +698,13 @@ def process_options(args: List[str],
# filename for the config file and know if the user requested all strict options.
dummy = argparse.Namespace()
parser.parse_args(args, dummy)
+
+ if dummy.list_error_codes:
+ import mypy.messages
+ for msg_id in sorted(mypy.messag... | [process_options->[add_invertible_flag->[invert_flag_name],add_invertible_flag,SplitNamespace,infer_python_executable],infer_python_executable->[_python_executable_from_version],AugmentedHelpFormatter->[_fill_text->[_fill_text]],_python_executable_from_version->[PythonExecutableInferenceError]] | Parse command line arguments and return a tuple of build sources and options. Adds a group of arguments and options to a separate namespace object. Adds a group of arguments to the command line that will be run under certain conditions. | `SystemExit` is never used in `build.py` and `main.py`. I think it can cause bad interference with `mypy.api` etc. |
@@ -213,6 +213,17 @@ public class KsqlResource {
|| statement instanceof DropStream
|| statement instanceof DropTable
) {
+ if (statement instanceof AbstractStreamCreateStatement) {
+ AbstractStreamCreateStatement streamCreateStatement = (AbstractStreamCreateStatement)
+ ... | [KsqlResource->[listRegisteredTopics->[getKsqlTopics],distributeStatement->[distributeStatement],registerDdlCommandTasks->[execute],executeDDLCommand->[execute],getStatementExecutionPlan->[getStatementExecutionPlan]]] | Executes a statement which may return a KsqlEntity or throw an exception if the statement is. | nit: it probably makes sense to move this to a separate method called `maybeAddFieldsFromSchemaRegistry` . Would make the intent of this code block much clearer. As it stands, it is not clear that the statement is actually being changed here. |
@@ -175,7 +175,7 @@ public class ServerSessionImpl implements ServerSession, FailureListener {
private final OperationContext context;
// Session's usage should be by definition single threaded, hence it's not needed to use a concurrentHashMap here
- protected final Map<SimpleString, Pair<Object, AtomicLong... | [ServerSessionImpl->[individualAcknowledge->[findConsumer,individualAcknowledge],receiveConsumerCredits->[locateConsumer],setStarted->[setStarted],deleteQueue->[getUsername],expire->[expire,locateConsumer],createConsumer->[getName,getUsername,securityCheck,createConsumer],cancelAndRollback->[afterRollback->[setStarted]... | Creates a new session. | Can this be configurable, 100 is a bit arbitrary especially as prev was unlimited |
@@ -49,7 +49,8 @@ public class CompileTimeZoneData : Task
// for ex: `CST6CDT`, `MST`, etc.
foreach (var entry in new DirectoryInfo (OutputDirectory!).EnumerateFiles())
{
- File.Delete(entry.FullName);
+ if (entry.Name != "zone.tab")
+ File.Delete(entry.F... | [CompileTimeZoneData->[Execute->[CompileTimeZoneDataSource,FilterTimeZoneData,FilterZoneTab]]] | Filter unnecessary timezone data. | Why is this needed? We never copy this file to the `OutputDirectory`, so it shouldn't be there at all, IIUC. |
@@ -87,6 +87,9 @@ export class AmpSlideScroll extends BaseSlides {
/** @private {number} */
this.previousScrollLeft_ = 0;
+
+ /** @private {!Promise<?InstrumentationService>} */
+ this.analyticsPromise_ = analyticsForOrNull(this.win);
}
/** @override */
| [No CFG could be retrieved] | Creates the slides of the container. This method creates the slides and wrapper elements. | Must go into `buildCallback` or its substitute. |
@@ -214,7 +214,9 @@ public abstract class AbstractAWSProcessor<ClientType extends AmazonWebServiceCl
protected ClientConfiguration createConfiguration(final ProcessContext context) {
final ClientConfiguration config = new ClientConfiguration();
config.setMaxConnections(context.getMaxConcurrentTas... | [AbstractAWSProcessor->[onShutdown->[getClient],customValidate->[customValidate],getAvailableRegions->[createAllowableValue],onScheduled->[createConfiguration]]] | Creates a configuration object. get proxy config. | Could be `config.setMaxErrorRetry(getMaxErrorRetry(context));` |
@@ -84,7 +84,10 @@ public class MetricsContainerImpl implements Serializable, MetricsContainer {
private MetricsMap<KV<MetricName, HistogramData.BucketType>, HistogramCell> histograms =
new MetricsMap<>(HistogramCell::new);
- /** Create a new {@link MetricsContainerImpl} associated with the given {@code st... | [MetricsContainerImpl->[equals->[equals],getMonitoringData->[getUpdates],counterUpdateToMonitoringInfo->[counterToMonitoringMetadata],updateDistributions->[getCumulative,update],updateCounters->[getCumulative],update->[updateForLatestInt64Type,updateForSumInt64Type,updateForDistributionInt64Type],reset->[reset],updateF... | This class is used to create a new MetricsContainer instance for the given . Returns a CounterCell that contains all the values of this CounterCell. | Alternatively, require this be non-null, and add a no-arg constructor for the no-step-name (presumably is-process-wide) case? |
@@ -170,7 +170,10 @@ function delivery_run(&$argv, &$argc){
$item['deleted'] = 1;
}
- if ((count($items) == 1) && ($items[0]['uri'] === $items[0]['parent-uri'])) {
+ // When commenting too fast after delivery, a post wasn't recognized as top level post.
+ // The count then showed more than one entry. ... | [delivery_run->[maxload_reached,set_baseurl,get_hostname]] | This function is called when a command is invoked from the delivery process. It will run the This function is used to query the mails and contact list. finds all the items that are not in the list of ancestors This function is used to check if a post is a top level post and if so it This function is used to check if a ... | Standard: Can you please respect the file's overall boolean style (which is && and ||)? I don't mind you using OR and AND in general but I do mind having different styles in the same file/function. |
@@ -322,6 +322,11 @@ class CLI_Command extends WP_CLI_Command {
* [--format=<format>]
* : Accepted values: var_export, json. Default: json.
*
+ * ## EXAMPLES
+ *
+ * $ wp cli param-dump
+ * {"path":{"runtime":"=<path>","file":"<path>","synopsis":"","default":null,"multiple":false,"desc":"Path to the WordPr... | [CLI_Command->[completions->[render],update->[get_update_type_str,run,get_updates],param_dump->[get_spec,to_array],info->[get_packages_dir_path],command_to_array->[get_subcommands,get_shortdesc,get_longdesc,get_synopsis,get_name],check_update->[display_items,get_update_type_str,get_updates]]] | Dump the parameters of a command. | Can we truncate this some? I don't think it's necessary to include the full output. Also, this will need to be indented. |
@@ -2788,6 +2788,16 @@ RtpsUdpDataLink::RtpsWriter::process_acknack(const RTPS::AckNackSubmessage& ackn
return;
}
+ if (reader->expecting_ack_) {
+ reader->expecting_ack_ = false;
+ --link->expected_acks_;
+ link->last_ack_ = MonotonicTimePoint::now();
+ if (link->expected_acks_ == 0) {
+ li... | [No CFG could be retrieved] | - - - - - - - - - - - - - - - - - - Nack the range between the received ack and the effective ack. | This function has a lock for the `RtpsWriter` but not for the link itself (at least not that I can see). Is there a concurrency issue? Aside from that concern, this block of code has a few operations that act on the link so it looks like it could be refactored to be a method on the link object. |
@@ -665,7 +665,9 @@ public class XmlSourceTest {
.withRecordElement("train")
.withRecordClass(Train.class)
.withMinBundleSize(1024);
- PCollection<Train> output = p.apply(Read.from(source).named("ReadFileData"));
+ AvroCoder<Train> intermediateCoder = AvroCoder.of(Train.clas... | [XmlSourceTest->[testReadXMLFilePattern->[generateRandomTrainList,createRandomTrainXML],trainsToStrings->[toString],testReadXMLNoRecordElement->[readEverythingFromReader],testReadXMLSmallDataflow->[Train],testReadXMLNoBundleSize->[trainsToStrings,Train],testReadXMLWithMultiByteChars->[Train],createRandomTrainXML->[trai... | Reads XML large dataset. | please update to the happy `apply` syntax (aka, drop 'named'). |
@@ -147,7 +147,7 @@ func (d *Dispatcher) GetDockerAPICommand(conf *config.VirtualContainerHostConfig
}
dEnv = append(dEnv, "DOCKER_TLS_VERIFY=1")
- info, err := os.Stat(conf.ExecutorConfig.Name)
+ info, err := os.Stat(certpath)
if err == nil && info.IsDir() {
if abs, err := filepath.Abs(info.Name... | [InspectVCH->[Infof,Begin,X509Certificate,Sprintf,PowerState,Warnf,End,IsNil,String,Errorf,IsUnspecifiedIP,ShowVCH,Debugf],ShowVCH->[Infof,GetDockerAPICommand,String,Info,WriteFile],GetDockerAPICommand->[Join,Stat,IsDir,Sprintf,Name,IsNil,Abs]] | GetDockerAPICommand returns the command to run docker - H info. | what happens if user didn't specify certpath, but used custom cert and key files? |
@@ -584,7 +584,7 @@ func (s *HybridInboxSource) Read(ctx context.Context, uid gregor1.UID,
localizerTyp types.ConversationLocalizerTyp, useLocalData bool, maxLocalize *int,
query *chat1.GetInboxLocalQuery, p *chat1.Pagination) (inbox types.Inbox, localizeCb chan types.AsyncInboxResult, err error) {
- defer s.Trac... | [Clear->[Clear,createInbox],Localize->[Localize],TeamTypeChanged->[getConvLocal,handleInboxError,createInbox,TeamTypeChanged],ReadUnverified->[IsOffline,Read,createInbox,fetchRemoteInbox],SetTeamRetention->[SetTeamRetention,getConvsLocal,handleInboxError,createInbox],Stop->[Stop],modConversation->[handleInboxError,crea... | Read reads an inbox from the chat server. This is a helper function to create a new instance of the LocalServer interface. | Topic names could be in here, we cant log this. |
@@ -1007,7 +1007,10 @@ void MarlinUI::update() {
// cause a refresh to occur until all the text has scrolled into view.
if (currentScreen == menu_media && !lcd_status_update_delay--) {
lcd_status_update_delay = 4;
- if (++filename_scroll_pos > filename_scroll_max) {
+ filename_scrol... | [No CFG could be retrieved] | The main entry point for the show_header function. Handle the update of the keypad. | Added small delay when scrolling stops like the same before scrolling starts. |
@@ -15,7 +15,7 @@ public interface CacheTopologyInfo {
/**
* @return The number of configured segments for the cache.
*/
- int getNumSegments();
+ Integer getNumSegments();
/**
* @return Segments owned by each server.
| [No CFG could be retrieved] | Returns the number of segments in the segment map. | `CacheTopologyInfo` is accessible from `RemoteCache.getCacheTopologyInfo()`, so this is going to break backwards compatibility. |
@@ -1421,7 +1421,7 @@ func TestResolveImageStreamRef(t *testing.T) {
Name: imageRepoName + ":" + tagName,
},
expectedSuccess: true,
- expectedDockerRef: latestDockerReference,
+ expectedDockerRef: dockerReference,
},
{
streamRef: kapi.ObjectReference{
| [MockSource,Resource,DeepEqual,Clone,IsZero,MockBuildConfig,MockBuilderSecrets,NewDefaultContext,Error,MockSourceStrategyForImageRepository,ValidateBuild,MatchString,GetInputReference,generateBuildFromConfig,MockBuilderServiceAccount,Errorf,resolveImageStreamReference,Contains,Repeat,Fatalf,Instantiate,NewSimpleClients... | TestResolveImageStreamRef tests the next build name and the next build name. mockDockerRef returns a mock DockerRef. | @bparees this one is weird... you are trying to resolve the "foo:test" to "foo:latestDockerReference", can you or somebody explain the intention of this test? |
@@ -73,6 +73,16 @@ final class ItemResolver
$normalizationContext = $resourceMetadata->getGraphqlAttribute('query', 'normalization_context', [], true);
- return $this->normalizer->normalize($item, ItemNormalizer::FORMAT, $normalizationContext + $baseNormalizationContext);
+ if (null !== $this... | [ItemResolver->[__invoke->[create,normalize,getItemFromIri,fieldsToAttributes,getObjectClass,canAccess,getGraphqlAttribute]]] | Returns a node if it is found in the source and normalized if it is. | Shouldn't we use the `$normalizedObject` here? |
@@ -392,3 +392,10 @@ def device_mapping(cuda_device: int):
else:
return storage
return inner_device_mapping
+
+def ones_like(tensor: torch.Tensor) -> torch.Tensor:
+ """
+ Use clone() + copy_() to make sure that a tensor ends up on the right
+ device at runtime.
+ """
+ return ... | [arrays_to_variables->[arrays_to_variables],last_dim_softmax->[masked_softmax],masked_softmax->[_get_normalized_masked_log_probablities],masked_log_softmax->[_get_normalized_masked_log_probablities]] | A function to get the function that needs to be applied to a GPU - trained model on. | I think it'd be more efficient to just use `.fill_(1)` instead of the `.copy()` here. |
@@ -99,7 +99,13 @@ static int do_create(const char *value, const char *name)
lntmp[p - ln] = 0;
oid = OBJ_nid2obj(nid);
oid->ln = lntmp;
+ goto fin;
}
-
+
+ return 1;
+
+fin:
+ OPENSSL_free(lntmp);
+ oid->ln = NULL;
return 1;
}
| [ASN1_add_oid_module->[CONF_module_add],int->[NCONF_get_section,do_create,sk_CONF_VALUE_num,ASN1err,memcpy,isspace,OBJ_nid2obj,OBJ_create,strrchr,STACK_OF,OPENSSL_malloc,sk_CONF_VALUE_value,CONF_imodule_get_value]] | - - - - - - - - - - - - - - - - - -. | If there is any leak here, it is due to this line of code. The original value could be lost, I hadn't check it exactly. Your change just discards the job of `if (p) {` statement. And so it loses both original and modified long names (ln) . |
@@ -101,6 +101,9 @@ public class ClientOptions
@Option(names = "--password", paramLabel = "<password>", description = "Prompt for password")
public boolean password;
+ @Option(names = "--external-authentication", paramLabel = "<externalAuthentication>", description = "Enable external authentication")
+ ... | [ClientOptions->[ClientExtraCredential->[equals->[equals]],ClientResourceEstimate->[equals->[equals]],ClientSessionProperty->[equals->[equals]]]] | Option that can be used to specify the keystore type. Enable debug information if the sequence is not empty. | commit message: `Add ExternalAuthorizert to cli` -> `Add ExternalAuthorizer to cli` Why `Authorizer`? in code used `Authentication` |
@@ -644,10 +644,13 @@ dtx_leader_wait(struct dtx_leader_handle *dlh)
{
int rc;
- rc = ABT_future_wait(dlh->dlh_future);
- D_ASSERTF(rc == ABT_SUCCESS, "ABT_future_wait failed %d.\n", rc);
+ if (dlh->dlh_future != ABT_FUTURE_NULL) {
+ rc = ABT_future_wait(dlh->dlh_future);
+ D_ASSERTF(rc == ABT_SUCCESS, "ABT_futu... | [No CFG could be retrieved] | END of function DtxLeaderWait Stop the leader thandle. | (style) line over 80 characters |
@@ -279,10 +279,13 @@ def write_trans(fname, trans):
Parameters
----------
fname : str
- The name of the file.
+ The name of the file, which should end in '-trans.fif'.
trans : dict
Trans file data, as returned by read_trans.
"""
+ if not fname[-10:] == '-trans.fif':
+... | [_print_coord_trans->[_coord_frame_name],combine_transforms->[_coord_frame_name],transform_coordinates->[invert_transform],transform_surface_to->[apply_trans,invert_transform]] | Write a - trans. fif file. | FYI you could have used fname.endswith('-trans.fif') |
@@ -0,0 +1,12 @@
+module Moderator
+ module Audit
+ class Subscribe
+ include Singleton
+ AuditConfig = Moderator::Audit::Application.config
+
+ ActiveSupport::Notifications.subscribe(AuditConfig.instrumentation_name) do |*args|
+ Moderator::Audit::Notification.subscribe(*args)
+ end
+ ... | [No CFG could be retrieved] | No Summary Found. | In my opinion ` Moderator::Audit::Notification#subscribe` method name is a bit misleading. It's basically creating a notification, not subscribing, and seeing `subscribe` inside a `subscribe` is not clear, so I would choose another name (like `create` or smth like that). |
@@ -408,6 +408,15 @@ public class SCMClientProtocolServer implements
return scm.getPipelineManager().getPipelines();
}
+ @Override
+ public Pipeline getPipeline(HddsProtos.PipelineID pipelineID)
+ throws IOException {
+ AUDIT.logReadSuccess(
+ buildAuditMessageForSuccess(SCMAction.GET_PIPELIN... | [SCMClientProtocolServer->[stopReplicationManager->[stop],getContainer->[getRpcRemoteUsername,getContainer],allocateContainer->[getRpcRemoteUsername,allocateContainer],closeContainer->[getRpcRemoteUsername],join->[join],stop->[stop],start->[start,getClientRpcAddress],getContainerWithPipeline->[getContainer],activatePip... | List all pipelines in the system. | This might not be appropriate for Audit since it is not client access, we should log it in debug mode IMO. |
@@ -34,6 +34,17 @@ def _instantiate_client(client_class, **kwargs):
return client_class(**kwargs)
+def client_resource(client_class, cloud):
+ """Returns the resource (used to get the right access token) and base URL for the client"""
+ if client_class.__name__ == 'GraphRbacManagementClient':
+ re... | [get_client_from_cli_profile->[_instantiate_client],get_client_from_json_dict->[_instantiate_client],get_client_from_auth_file->[get_client_from_json_dict]] | Returns a client based on the given CLI profile. Gets a client for the resource. | Please make it `_client_resource` |
@@ -34,7 +34,7 @@ func init() {
// newMockGatewayServerWithAuth Is a Slick Wrapper that injects Auth for this particular test suite
func newMockGatewayServerWithAuth(t *testing.T, services ...interface{}) Server {
- mockAuthClient, mockAuthzClient := newAuthorizationMocks(t, "ingest:unified_events", "create")
+ moc... | [ProcessLivenessPing,NewRequest,ProcessChefAction,ProcessComplianceReport,DoAndReturn,Error,ReadFile,New,NewRecorder,Len,NewMockNotifier,Any,Equal,NewController,NewMockComplianceIngesterClient,ProcessChefRun,Send,dataCollectorHandler,NewMockChefIngesterClient,NewReader,Result,EXPECT,ElementsMatch,Run] | Creates a new mock gateway server with mocked clients TestDataCollectorHandlerChefActionMsgOk - Tests the response from the data. | Switch to v2 resource/action. |
@@ -881,7 +881,7 @@ public abstract class AbstractBuild<P extends AbstractProject<P,R>,R extends Abs
e.buildEnvVars(env);
for (EnvironmentContributingAction a : getActions(EnvironmentContributingAction.class))
- a.buildEnvVars(this,env);
+ a.buildEnvVars(this,env,getBui... | [AbstractBuild->[_getUpstreamBuilds->[getUpstreamRelationship],getNextBuild->[getNextBuild],getModuleRoot->[getWorkspace,getModuleRoot],getBuildVariableResolver->[getBuildVariables],getEnvironment->[getWorkspace,getEnvironment],getDownstreamBuilds->[getDownstreamRelationship],AbstractBuildExecution->[performAllBuildSte... | Get environment variables for this task. | AFAICT this loop should just be deleted since it is already being called in the super; otherwise we would be calling each `EnvironmentContributingAction` twice on a single `AbstractBuild`. |
@@ -22,7 +22,7 @@ namespace NServiceBus
public UnicastSendRouterConnector(
string sharedQueue,
string instanceSpecificQueue,
- IUnicastRouter unicastRouter,
+ IUnicastSendRouter unicastRouter,
DistributionPolicy distributionPolicy)
{
... | [UnicastSendRouterConnector->[Task->[MessageType,SpecificInstance,CreateOutgoingLogicalMessageContext,Message,Option,IsNullOrEmpty,ExplicitDestination,RouteToDestination,RouteToSpecificInstance,RouteToAnyInstanceOfThisEndpoint,Extensions,ConfigureAwait,ToString,ToArray,Headers,Queue,MessageIntent,RouteToThisInstance],S... | Creates a connector that routes a message to a specific instance of this endpoint. | I'd rename this and the field to `unicastSendRouter` to match the change to the `UnicastPublishRouterConnector`. |
@@ -362,6 +362,11 @@ func (gce *GCECloud) ScrubDNS(nameservers, searches []string) (nsOut, srchOut []
return nameservers, srchOut
}
+// HasClusterID returns true if the cluster has a clusterID
+func (gce *GCECloud) HasClusterID() bool {
+ return true
+}
+
// GCECloud implements cloudprovider.Interface.
var _ clo... | [GetDisk->[Get,Do],ScrubDNS->[MatchString],CreateDisk->[Do,Insert],Initialize->[watchClusterID],WaitForZoneOp->[waitForZoneOp],DeleteDisk->[Do,Delete],PollImmediate,Token,DefaultTokenSource,Infof,Get,Sprintf,Do,Contains,RegisterCloudProvider,New,List,ComputeTokenSource,Errorf,NewTokenBucketRateLimiter,NewClient,MustCom... | ScrubDNS removes DNS nameservers from the list of nameservers that do not match the. | @rrati isn't GCE cloud using Initialize() to get the cluster id and this should return true only when the clusterID is really available? |
@@ -838,7 +838,11 @@ static void *do_PVK_body_key(const unsigned char **in,
EVP_CIPHER *rc4 = NULL;
#endif
EVP_CIPHER_CTX *cctx = EVP_CIPHER_CTX_new();
-
+ if(cctx == NULL) {
+ ERR_raise(ERR_LIB_PEM, ERR_R_MALLOC_FAILURE);
+ goto err;
+ }
+
if (saltlen) {
#ifndef OPENSSL_NO_... | [No CFG could be retrieved] | Reads an I2B - encoded private key and public key from the specified file - like Derive a PVK key from a given key. | Blank line above here too. |
@@ -135,7 +135,17 @@ int RelayHandler::handle_output(ACE_HANDLE)
int idx = 0;
for (ACE_Message_Block* block = out.second.get(); block && idx < BUFFERS_SIZE; block = block->cont(), ++idx) {
buffers[idx].iov_base = block->rd_ptr();
+#ifdef _MSC_VER
+#pragma warning(push)
+ // iov_len is 32-bit on 64... | [No CFG could be retrieved] | Handle incoming and outgoing ethernet messages. Enqueue message on the network. | Is there something still TODO here? |
@@ -628,9 +628,7 @@ static bool ScheduleRun(EvalContext *ctx, Policy **policy, GenericAgentConfig *c
UpdateLastPolicyUpdateTime(ctx);
DetectEnvironment(ctx);
-
- Log(LOG_LEVEL_INFO, "Re-evaluating augments" );
- LoadAugments(ctx, config);
+ GenericAgentDiscoverContext(ctx, confi... | [No CFG could be retrieved] | Load the next non - negative promise and return true if the next non - negative promise is Check if the agent has a non - empty class and if so update the reference time. | Should we keep a LOG to indicate that config is being re-loaded? |
@@ -462,7 +462,6 @@ public class PutS3Object extends AbstractS3Processor {
public void process(final InputStream rawIn) throws IOException {
try (final InputStream in = new BufferedInputStream(rawIn)) {
final ObjectMetadata objectMetadata = new ObjectMetada... | [PutS3Object->[getLocalState->[getPersistenceFile],getLocalStateIfInS3->[localUploadExistsInS3],removeLocalState->[persistLocalState],MultipartState->[toString->[toString]],ageoffLocalState->[removeLocalState,getPersistenceFile],persistLocalState->[getPersistenceFile],getS3AgeoffListAndAgeoffLocalState->[ageoffLocalSta... | On trigger. This method is called to add additional information to the object metadata. This method is called to add a new object to the bucket. This method will initiate a multipart upload if the current state is not already complete. | `Content-Disposition` was originally set to the filename. The current change is not backward compatible with it because the default is `inline` and the "no value" case also falls back to `inline`. I would suggest to use no default value and to keep the current logic (setting the filename) when the property is not speci... |
@@ -572,8 +572,7 @@ def _get_src_data(src):
return src_data, src_kind
-def _interpolate_data(stc, morph, mri_resolution=True, mri_space=True,
- output='nifti1'):
+def _interpolate_data(stc, morph, mri_resolution, mri_space, output='nifti1'):
"""Interpolate source estimate data to MRI.... | [_apply_morph_data->[_morph_one->[_interpolate_data,_get_zooms_orig],_morph_one],_compute_morph_sdr->[_check_dep],_morph_buffer->[_morph_buffer],_morphed_stc_as_volume->[_check_dep],read_source_morph->[SourceMorph],_interpolate_data->[_check_dep,_get_src_data]] | Interpolate data to MRI. missing - block - related functions Get a NiftiImage object with a object. | Again defaults never mattered because they were passed in each use |
@@ -295,4 +295,4 @@ class CI_Cache_memcached extends CI_Driver {
}
/* End of file Cache_memcached.php */
-/* Location: ./system/libraries/Cache/drivers/Cache_memcached.php */
\ No newline at end of file
+/* Location: ./system/libraries/Cache/drivers/Cache_memcached.php */
| [CI_Cache_memcached->[is_supported->[_setup_memcached],get_metadata->[get],increment->[increment],get->[get],delete->[delete],decrement->[decrement]]] | End of file Cache_memcached. php. | Please remove the empty line here (you have to use a local editor, can't happen through GitHub's). |
@@ -299,6 +299,14 @@ public class DefaultXmlArtifactDeclarationLoader implements XmlArtifactDeclarati
});
}
+ private ParameterGroupModel getParameterGroup(ParameterizedModel model, String groupName) {
+ for (ParameterGroupModel parameterGroupModel : model.getParameterGroupModels()) {
+ ... | [DefaultXmlArtifactDeclarationLoader->[load->[load],getNamespace->[getNamespace],getParameterDeclarerVisitor->[visitObject->[defaultVisit],visitArrayType->[getParameterDeclarerVisitor],defaultVisit->[isCData]],declareRoute->[declareComposableModel],declareComposableModel->[getExtensionModel],createObjectValueFromType->... | Gets a component declaring walker. This method finds a group which contains a transform script. | no point in returning `null`, return the Optional resulting of stream.filter.findFirst |
@@ -106,13 +106,13 @@ function videos_post(&$a) {
$owner_uid = $a->data['user']['uid'];
- if (local_user() != $owner_uid) goaway($a->get_baseurl() . '/videos/' . $a->data['user']['nickname']);
+ if (local_user() != $owner_uid) goaway(App::get_baseurl() . '/videos/' . $a->data['user']['nickname']);
if(($a->arg... | [videos_init->[get_baseurl],videos_content->[set_pager_itemspage,get_baseurl,set_pager_total],videos_post->[get_baseurl]] | POST a video no - op for users who don t have a video. | Standards: Can you please add brackets to this conditional statement? |
@@ -73,7 +73,7 @@ public abstract class AbstractTicketDelegator<T extends Ticket> implements Ticke
}
@Override
- public final long getCreationTime() {
+ public final ZonedDateTime getCreationTime() {
return this.ticket.getCreationTime();
}
| [AbstractTicketDelegator->[getCountOfUses->[getCountOfUses],updateTicket->[updateTicket],equals->[equals],getId->[getId],getCreationTime->[getCreationTime],hashCode->[hashCode],isExpired->[isExpired],getGrantingTicket->[getId,getTicket,getGrantingTicket]]] | Gets the creation time of the block. | Don't think this will work with JPA ticket registries. We'll likely run into either schema or serialization issues. Let's keep this as long. |
@@ -35,15 +35,15 @@ class SamlRequestPresenter
attr_reader :request, :service_provider
def ial2_authn_context?
- Saml::Idp::Constants::IAL2_AUTHN_CONTEXTS.include?(authn_context)
+ (Saml::Idp::Constants::IAL2_AUTHN_CONTEXTS & authn_context).present?
end
def ialmax_authn_context?
- Saml::Idp::Co... | [SamlRequestPresenter->[authn_request_bundle->[requested_attributes]]] | Checks if a node is a missing authentication context or not. | can we pluralize this now too? |
@@ -85,9 +85,14 @@ class CampaignRules {
if (opts.beforeCampaign && opts.duringCampaign) {
throw new Error('beforeCampaign and duringCampaign args are incompatible')
}
- const whereClause = {
- ethAddress: ethAddress.toLowerCase()
- }
+
+ // Load any proxy associated with the wallet addre... | [No CFG could be retrieved] | Get the referral reward value if any defined in the campaign. Helper method to calculate level based on a set of events. | Should we call `toLowerCase()` on proxy addresses as well? |
@@ -1996,7 +1996,7 @@ void sn76477_device::sound_stream_update(sound_stream &stream, stream_sample_t *
*/
*buffer++ = (((voltage_out - OUT_LOW_CLIP_THRESHOLD) / (OUT_CENTER_LEVEL_VOLTAGE - OUT_LOW_CLIP_THRESHOLD)) - 1) * 32767;
- if (LOG_WAV && LOG_WAV_ENABLED_ONLY && !m_enable)
+ if (LOG_WAV && (!LOG_WAV_EN... | [No CFG could be retrieved] | - - - - - - - - - - - - - - - - - - This function calculates the log - values of the two WAV gain logs. | You could write the expression as `(LOG_WAV && (!LOG_WAV_ENABLED_ONLY || !m_enable))` and make it more obvious what it does, but why did you change the condition? Is it out of sync with something else? |
@@ -264,7 +264,7 @@ class Receiver(object):
return self._handler._received_messages.qsize()
return 0
- def receive(self, max_batch_size=None, timeout=None):
+ def receive(self, max_batch_size=None, timeout=None, max_reconnect_retries=None):
"""
Receive events from the Eve... | [Receiver->[receive->[close,reconnect],reconnect->[_reconnect],close->[close],_reconnect->[open],open->[open]]] | Returns the current size of the unprocessed Event queue. Detaches from the receiver and returns the next block ID. | This new parameter only seems to get added to the synchronous receiver and not the async one? |
@@ -342,7 +342,7 @@ static int osquery_ioctl(dev_t dev, u_long cmd, caddr_t data,
switch (cmd) {
case OSQUERY_IOCTL_SUBSCRIPTION:
sub = (osquery_subscription_args_t *)data;
- if ((err = subscribe_to_event(sub->event, sub->subscribe))) {
+ if ((err = subscribe_to_event(sub->event, sub->subscribe... | [No CFG could be retrieved] | This function is used to test the number of events that are being written to the OSQuery Reads the user - specified character device switch structure. | Is there any way to guarantee a size of `data`? Or at least to make sure it's not `== NULL`? |
@@ -0,0 +1,9 @@
+package <%=packageName%>.config;
+
+/**
+ * a simple annotation, to be used for easy exclusion from component scan
+ *
+ * @author David Steiman
+ */
+public @interface ExcludedFromComponentScan {
+}
| [No CFG could be retrieved] | No Summary Found. | I'm not a big fan of this annotation: it should be a standard Spring Boot annotation (need to check if this exists), or we can just exclude classes as usual. And it's only used once here. It could be a good idea (if it doesn't already exists in Spring Boot), but then we would need to use it elsewhere in our code (we ha... |
@@ -50,8 +50,8 @@ func TestInputUsage(t *testing.T) {
func TestGoPackageName(t *testing.T) {
assert.Equal(t, "aws", goPackage("aws"))
- assert.Equal(t, "azure", goPackage("azure-nextgen"))
- assert.Equal(t, "plant", goPackage("plant-provider"))
+ assert.Equal(t, "azurenextgen", goPackage("azure-nextgen"))
+ assert... | [Dir,FindExecutable,PathExists,ImportLanguages,typeString,StringSlice,TestTypeNameCodegen,ReadFile,Logf,Join,Equal,RunCommand,NoError,Base,Split,getInputUsage,ImportSpec,Sprintf,Unmarshal,TestSDKCodegen,NotEmpty,Abs,Run,True] | TestPackage tests that the given type is an input type that accepts FooArray and FooArray GeneratePackage - function to generate package with optional extraFile - function to infer module name from. | Do we know what effect (if any) this change will have on azure-native and aws-native? |
@@ -80,6 +80,7 @@ public final class OMFileRequest {
// Check if this is actual file or a file in the given path
if (dbKeyName.equals(fileNameFromDetails)) {
result = OMDirectoryResult.FILE_EXISTS;
+ parentExists = true;
} else {
result = OMDirectoryResult.FILE_... | [OMFileRequest->[getObjIdRangeFromTxId->[getObjIDFromTxId]]] | Verify that files in the given path exist in the given Ozone key table. Returns missing or inherited result if found. | This should be false as this is a file and not a directory |
@@ -4020,10 +4020,11 @@ zfs_do_send(int argc, char **argv)
sendflags_t flags = { 0 };
int c, err;
nvlist_t *dbgnv = NULL;
- boolean_t extraverbose = B_FALSE;
+ char *redactbook = NULL;
struct option long_options[] = {
{"replicate", no_argument, NULL, 'R'},
+ {"redact-bookmark", required_argument, NULL, R... | [No CFG could be retrieved] | Reads the arguments for the command - line and returns the number of bytes read from Parse command line options and return a handle to the target file. | Why is the long option here `--redact-bookmark` which isn't consistent with the man pages, `zfs -?` output, or test cases. It does seem to work (which surprised me) but shouldn't it simply be changed to "redact"? |
@@ -176,7 +176,11 @@ func (f *Frontend) handle(w http.ResponseWriter, r *http.Request) {
hs[h] = vs
}
w.WriteHeader(resp.StatusCode)
- io.Copy(w, resp.Body)
+
+ if _, err = io.Copy(w, resp.Body); err != nil {
+ server.WriteError(w, err)
+ return
+ }
}
func writeError(w http.ResponseWriter, err error) {
| [Handler->[HandlerFunc,GzipHandler],queueRequest->[StartSpanFromContext,Unlock,ExtractOrgID,Now,Lock,Broadcast,Add],RegisterFlags->[DurationVar,BoolVar,StringVar,IntVar],Close->[Wait,Lock,Unlock],Process->[Context,Send,Broadcast,getNextRequest,Recv,Err,Done],getNextRequest->[Unlock,Add,Finish,Seconds,Observe,Lock,Broad... | handle is the main HTTP handler for the user. | I can't understand how this could could work. It will write the HTTP header but it has already been written above. Am I missing anything @dmitsh? |
@@ -1606,6 +1606,7 @@ define([
}
scene._primitives.update(context, frameState, commandList);
+ scene._groundPrimitives.update(context, frameState, commandList);
}
function callAfterRenderFunctions(frameState) {
| [No CFG could be retrieved] | Executes commands in order by pass. This function is used to avoid the extra copy of the pick depth. | Do you think we should do this before `_primitives.update` so all ground primitives are drawn below all primitives if both were to have `GroundPrimitive`s? |
@@ -15,12 +15,11 @@ class RepositoryColumn < ApplicationRecord
auto_strip_attributes :name, nullify: false
validates :name,
- presence: true,
length: { maximum: Constants::NAME_MAX_LENGTH },
uniqueness: { scope: :repository_id, case_sensitive: true }
- validates :created_by... | [RepositoryColumn->[update_repository_table_states_with_new_column->[update_states_with_new_column,new],importable?->[to_sym,include?],update_repository_table_states_with_removed_column->[update_states_with_removed_column,to_s,new],name_like->[where],accepts_nested_attributes_for,auto_strip_attributes,belongs_to,enum,s... | Properties for the given application record. This method is used to destroy a record in the table. It will update the repository table. | It does not belong to here |
@@ -915,8 +915,6 @@ int load_key_certs_crls(const char *uri, int maybe_stdin,
uidata.prompt_info = uri;
if (uri == NULL) {
- BIO *bio;
-
if (!maybe_stdin) {
BIO_printf(bio_err, "No filename or uri specified for loading");
goto end;
| [No CFG could be retrieved] | Reads the next expected object from the input stream. Reads the file specified by uri and returns the index of the object in the file. | I suppose you could also do BIO_free() immediately after the OSSL_STORE_attach(). |
@@ -185,6 +185,13 @@ func ValidateLDAPQuery(query api.LDAPQuery, fldPath *field.Path) ValidationResul
"timeout must be equal to or greater than zero"))
}
+ if isDNOnly {
+ if len(query.Filter) != 0 {
+ validationResults.AddErrors(field.Invalid(fldPath.Child("filter"), query.Filter, `cannot specify a filter w... | [Invalid,Error,DetermineDerefAliasesBehavior,Append,AddErrors,Sprintf,DetermineLDAPScope,CompileFilter,ParseURL,ResolveStringValue,Child,AddWarnings,ParseDN,NewPath,Required] | Validate the given query object. | This implicitly disallows not specifying a filter, so how is the validation not failing for those missing filters? |
@@ -160,8 +160,9 @@ namespace System.Tests
Assert.True(libyaLocalTime.Equals(expectResult), string.Format("Expected {0} and got {1}", expectResult, libyaLocalTime));
}
- [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsWindows))]
- public static void TestYukun... | [TimeZoneInfoTests->[ConvertTimeFromUtc->[ConvertTimeFromUtc],ConvertTime_DateTime_LocalToSystem->[ConvertTime],VerifyConvertToUtcException->[ConvertTimeToUtc],ConvertTimeFromToUtc_UnixOnly->[ConvertTimeToUtc,ConvertTimeFromUtc,Kind],GetSystemTimeZones->[GetSystemTimeZones],ConvertTimeBySystemTimeZoneIdTests->[ConvertT... | Tests if a time zone with the specified name has a specific time offset in the library. Tests that the TZ data is consistent with the Yukon data. | Why the change from `ConditionalFact`? |
@@ -898,9 +898,9 @@ amp.htmlparser.HtmlParser.INSIDE_TAG_TOKEN_ = new RegExp(
('(?:' +
// Allow attribute names to start with /, avoiding assigning the / in
// close-tag syntax */>.
- '([^\\t\\r\\n /=>][^\\t\\r\\n =>]*|' + // e.g. "href"
- '[^\\t\\r\\n =>]+[^ >]|' + ... | [No CFG could be retrieved] | A regular expression that matches any of the regular expressions that are not part of a tag token RegExp that matches the next token in a tag. | boo. sad lint can't accept this |
@@ -387,7 +387,7 @@ type DeploymentLogOptions struct {
// Follow if true indicates that the deployment log should be streamed until
// the deployment terminates.
Follow bool
- // If true, return previous terminated container logs
+ // If true, return previous deployment logs
Previous bool
// A relative time i... | [No CFG could be retrieved] | Type represents the type of the that is returned. | Is this already wired up? I don't see it where I expected to find it. |
@@ -350,6 +350,17 @@ func (bc *BuildController) createPodSpec(originalBuild *buildapi.Build, ref stri
}
}
+ // set the pushSecret that will be needed by the build to push the image to the registry
+ // at the end of the build.
+ build.Spec.Output.PushSecret = secret
+
+ // ensure the build object the pod sees st... | [createBuildPod->[createPodSpec,resolveOutputDockerImageReference]] | createPodSpec creates a pod spec for the given build. Handle resolving ValueFrom references in build environment variables. | Does this code actually have any effect? If not, I appreciate the belt and braces, but I'm worried that it will confuse more than it will protect. I think it should be removed if possible. |
@@ -284,6 +284,7 @@ public class JParser {
converter.sema = new JSema(astNode.getAST());
converter.compilationUnit = astNode;
converter.tokenManager = new TokenManager(lex(version, unitName, sourceChars), source, new DefaultCodeFormatterOptions(new HashMap<>()));
+ converter.labels = new LinkedList<>(... | [JParser->[convertTypeDeclaration->[addEmptyDeclarationsToList,declaration,firstTokenBefore],convertArguments->[firstTokenAfter],addStatementToList->[declaration,firstTokenAfter],convertModuleDirective->[lastTokenIn,firstTokenIn,convertModuleNames,convertModuleName,firstTokenBefore,firstTokenAfter],createExpression->[n... | Parse a CompilationUnitTree. | All above assignments use data that is not available at field declaration. The new one doesn't, so initialization can be moved to declaration and field can be made `final`. |
@@ -308,6 +308,7 @@ class CurveModel:
new_values = np.random.randn(NUM_OF_INSTANCE, self.effective_model_num) * STEP_SIZE + self.weight_samples
new_values = self.normalize_weight(new_values)
# compute alpha(i, j) = min{1, P(j)Q(j, i)/P(i)Q(i, j)}
+ # pylint: disable=ass... | [CurveModel->[sigma_sq->[f_comb],normal_distribution->[sigma_sq,f_comb],prior->[f_comb],likelihood->[normal_distribution],f_comb->[predict_y],target_distribution->[prior,likelihood],predict->[filter_curve,mcmc_sampling,f_comb,fit_theta],mcmc_sampling->[target_distribution,normalize_weight]]] | Adjust the weight of each function using mcmc sampling. Update weight samples. | Not needed. Use latest pylintrc. |
@@ -242,7 +242,7 @@ export default function initPrimaryCategory( $ ) {
updatePrimaryTermSelectors( taxonomyName );
// The clicked link will be hidden so we need to focus something different.
- checkbox.focus();
+ checkbox.trigger( "focus" );
};
}
| [No CFG could be retrieved] | Register a custom primary term selector filter. YSTSEOPrimaryCategory component that initializes the YSTSEOPrimaryCategory metabox. | 1. Install and activate the `Classic Editor` plugin. 2. Create a new post in the classic editor. 3. Select 2 categories. 4. Click `Make primary`. 3. No `JQMIGRATE: jQuery.fn.focus() event shorthand is deprecated` warning should be thrown. |
@@ -151,5 +151,16 @@ define([
return false;
};
+ /**
+ * Gets a value indicating whether or not the provider includes vertex normals.
+ *
+ * @memberof EllipsoidTerrainProvider
+ *
+ * @returns {Boolean} True if the provider has vertex normals; otherwise, false.
+ */
+ Elli... | [No CFG could be retrieved] | Elevation TerrainProvider. | You don't need `@memberof`. |
@@ -413,11 +413,7 @@ define([
typeof other !== 'undefined' &&
this._show === other._show &&
this._width === other._width &&
- this._outlineWidth === other._outlineWidth &&
- this._horizontalOrigin === other._horizontalOrigin &&
- ... | [No CFG could be retrieved] | Determines if this polyline equals another polyline. | Does this need to consider the material? Do materials have an `equals` function? Who uses `Polyline.equals`? Is it really needed? |
@@ -6,6 +6,17 @@ require 'text_cleaner'
class QualityTitleValidator < ActiveModel::EachValidator
def validate_each(record, attribute, value)
sentinel = TextSentinel.title_sentinel(value)
- record.errors.add(attribute, :is_invalid) unless sentinel.valid?
+
+ if !sentinel.valid?
+ if !sentinel.seems_m... | [QualityTitleValidator->[validate_each->[add,title_sentinel,valid?]],require] | Validates each record attribute to ensure that it is unique for each record. | Do we need `unless sentinel.valid?` when this path is only reached when `if !sentinel.valid?` |
@@ -178,7 +178,7 @@ public class TestCSVRecordReader {
final Record record = reader.nextRecord(false, false);
// When the values are not in the expected format, a String is returned unmodified
- assertEquals("11/30/1983", (String)record.getValue("date"));
+ assertEquals... | [TestCSVRecordReader->[testReadRawWithDifferentFieldName->[getDefaultFields,createReader],testExcelFormat->[createReader],testMultipleRecords->[getDefaultFields,createReader],testExtraWhiteSpace->[getDefaultFields,createReader],testMissingField->[getDefaultFields,createReader],testFieldInSchemaButNotHeader->[getDefault... | testDateNoCoersionUnexpectedFormat - Test if date is in the expected format. | You may want to test with multiple duplicates, id, name, country, id, name, country. Also, I assume case doesn't matter, but that is an assumption. id, name, country, ID, NAME, COUNTRY |
@@ -1081,11 +1081,14 @@ class StorageContainerTest(StorageTestCase):
assert not blob_ref2.blob_tier_inferred
assert blob_ref2.blob_tier_change_time is not None
+ try:
response = container.delete_blobs(
'blob1',
'blob2',
'... | [StorageContainerTest->[test_set_container_acl_with_signed_identifiers->[_create_container],test_lease_container_acquire_and_release->[_create_container],test_list_containers_with_public_access->[_create_container],test_set_container_acl_with_one_signed_identifier->[_create_container],test_list_containers->[_create_con... | Test standard blob tier set tier api batch. | Why are we passing all exceptions here? The test could be failing |
@@ -258,7 +258,7 @@ class Jetpack_Sync_Full {
public function expand_options( $args ) {
if ( $args[0] ) {
- return $this->get_client()->get_all_options();
+ return Jetpack_Sync_Modules::get_module( "options" )->get_all_options();
}
return $args;
| [Jetpack_Sync_Full->[enqueue_all_users->[enqueue_all_ids_as_action],update_queue_progress->[get_status,update_status],update_status->[get_status],update_sent_progress->[get_status],expand_post_ids->[get_client],enqueue_all_comments->[enqueue_all_ids_as_action],expand_users->[get_client]]] | Expand the options to be used by the client. | Does it makes sense to move all this expand methods inside each module? |
@@ -877,7 +877,7 @@ namespace System.Text.Json.SourceGeneration
if (!type.TryGetDeserializationConstructor(useDefaultCtorInAnnotatedStructs, out ConstructorInfo? constructor))
{
classType = ClassType.TypeUnsupportedBySourceGen;
- ... | [JsonSourceGenerator->[Parser->[PropertyIsOverridenAndIgnored->[Type],GetSerializerOptions->[GetJsonSourceGenerationModeEnumVal],PopulateKnownTypes->[PopulateNumberTypes]]]] | Get or add a type generation spec for the given type. Returns the type of the object that can be converted to a class. The generic arguments for the key - value pair are the types of the key - value pair The type is the base class of the type that is used to convert the object into the Returns a type that can be used t... | Out of curiosity, what necessitated the change from reporting the diagnostic directly to storing in a set? Were there duplicates? Probably not in scope for this PR, but in future iterations I would recommend doing the same for emitted member-level diagnostics (in other words, we should try to make the mapping layer pur... |
@@ -254,6 +254,13 @@ public abstract class AbstractDeploymentTestCase extends AbstractMuleTestCase {
new SingleClassCompiler().compile(getResourceFile("/org/foo/LoadsAppResourceCallback.java"));
pluginEcho1TestClassFile =
new SingleClassCompiler().dependingOn(barUtils1_0JarFile).compile(getResour... | [AbstractDeploymentTestCase->[assertApplicationRedeploymentSuccess->[assertRedeploymentSuccess],assertFailedDomainRedeploymentSuccess->[assertFailedArtifactRedeploymentSuccess],addExplodedAppFromBuilder->[addExplodedAppFromBuilder],createPolicyIncludingHelloPluginV2FileBuilder->[createBundleDescriptorLoader],assertDepl... | This method is called before the class is compiled. This method is used to find a file in the classpath that is not a dependency on the. | get the previous value in `before` and reset that here instead of `false`. Maybe use a `@Rule` |
@@ -25,6 +25,10 @@ class SiteConfigurationTest < ActiveSupport::TestCase
assert_equal ["GobiertoDevelopment"], site_configuration.modules
end
+ def test_available_modules?
+ assert site_configuration.available_module?("GobiertoDevelopment")
+ end
+
def test_modules?
assert site_configuration.modu... | [SiteConfigurationTest->[test_available_locales->[assert_equal,available_locales],test_default_locale->[default_locale,assert_equal],test_default_locale?->[assert,default_locale?],test_logo->[assert_equal,logo],page->[gobierto_cms_pages],site_configuration->[new],site->[sites],test_links_markup->[links_markup,assert_eq... | Checks that the modules and logo are not nil. | Prefer single-quoted strings when you don't need string interpolation or special symbols. |
@@ -87,6 +87,17 @@ public final class DefaultFilenamePolicy extends FilenamePolicy {
private final String shardTemplate;
private final String suffix;
+ /*
+ * Checks whether given template contains enough information to form windowed file names
+ */
+ static boolean isWindowedTemplate(String template){
+ ... | [DefaultFilenamePolicy->[unwindowedFilename->[constructName],constructUsingStandardParameters->[DefaultFilenamePolicy]]] | Construct a name from the provided prefix shard template and suffix. This method is used to find all shard numbers in the shard template. | I'm not sure this does what you want - it will be true if the template contains at least one of the parameters, right? |
@@ -4,8 +4,11 @@ module Users
before_action :confirm_two_factor_authenticated, if: :two_factor_enabled?
def new
- analytics.track_event(Analytics::WEBAUTHN_SETUP_VISIT)
+ result = WebauthnVisitForm.new.submit(params)
+ analytics.track_event(Analytics::WEBAUTHN_SETUP_VISIT, result.to_h)
... | [WebauthnSetupController->[two_factor_enabled?->[two_factor_enabled?],url_after_successful_webauthn_setup->[new],confirm->[new]]] | Returns the next non - nil OIDC number. | I'd probably consider putting this in a presenter, but not necessary atm (future refactoring opportunity). |
@@ -3,10 +3,10 @@
class BioEddieAssetsController < ApplicationController
include ActiveStorage::SetCurrent
- before_action :load_vars, except: :create
+ before_action :load_vars, except: %i(create bmt_request)
before_action :load_create_vars, only: :create
- before_action :check_read_permission
+ before_... | [BioEddieAssetsController->[create->[render_to_string,errors,render,create_molecule],load_vars->[step,protocol,my_module,result,find_by],check_read_permission->[can_read_protocol_in_module?,can_read_protocol_in_repository?,experiment,can_read_experiment?],update->[update_molecule,render,medium_preview,metadata,t,id,rai... | Creates a new object. | Prefer `only:`, especially if there are many exceptions (and `only:` is more explicit). |
@@ -19,8 +19,11 @@ def deform_conv2d(
dilation: Tuple[int, int] = (1, 1),
mask: Optional[Tensor] = None,
) -> Tensor:
- """
- Performs Deformable Convolution, described in Deformable Convolutional Networks
+ r"""
+ Performs Deformable Convolution v2, described in
+ `Deformable ConvNets v2: Mo... | [deform_conv2d->[deform_conv2d],DeformConv2d->[forward->[deform_conv2d]]] | Deforms a 2 - D convolution of a . Univariate network conv2d with no extra padding padding dil_h dil_. | Lint is complaining about the training space in this line. |
@@ -273,6 +273,9 @@ class SubmissionsController < ApplicationController
@file_manager_errors = Hash.new
assignment_id = params[:assignment_id]
@assignment = Assignment.find(assignment_id)
+ required_assignments = AssignmentFile.where(
+ assignment_id: @assignment).pluck(:file... | [SubmissionsController->[downloads_subdirectories->[downloads_subdirectories]]] | Updates the files of a . Delete files marked for deletion replace files and add new files if we have a commit and we have a commit we can t do anything else. | Shouldn't this variable be "required_files"? |
@@ -333,6 +333,18 @@ func handleSignInFull(ctx *context.Context, u *models.User, remember bool, obeyR
ctx.Session.Set("uid", u.ID)
ctx.Session.Set("uname", u.Name)
+ // Language setting of the user overwrites the one previously set
+ // If the user does not have a locale set, we save the current one.
+ if len(u.L... | [UpdateUserCols,Auth,RemoteAddr,LinkAccountToUser,IsErrTwoFactorNotEnrolled,GetSuperSecureCookie,QueryUnescape,RedirectToFirst,Delete,CreateUser,GetUser,GetUserByID,Info,Redirect,Set,ProviderCallback,RenderWithErr,Put,GetActiveOAuth2Providers,Activate,GetUserByEmail,HTML,Error,IsErrUserAlreadyExist,VerifyScratchToken,G... | handleSignInFull handles the final part of the sign - in process of the user. SignInOAuth handles the OAuth2 login flow. | You should only update language column but not all the columns. |
@@ -215,6 +215,9 @@ public class NettyHttpClient extends AbstractHttpClient
log.debug("[%s] Resumed reads from channel (chunkNum = %,d).", requestDesc, resumeChunkNum);
}
}
+
+ long backPressureDuration = System.nanoTime() - backPressureSta... | [NettyHttpClient->[getHost->[getHost],getPoolKey->[getHost],go->[channelDisconnected->[exceptionCaught],exceptionCaught->[exceptionCaught]]]] | This method is used to handle a request with a specific . Handles a response message. Private method for handling a response. This method is called when a channel is caught or an exception occurs. This method is called when a channel write request is received. | I think backpressure duration should only be computed like this if we're in the `suspendWatermark >= 0 && resumeWatermark >= suspendWatermark` block above. Two reasons: 1. Access to backPressureStartTimeNs must be synchronized, since it's being accessed from multiple threads and it's not a volatile or atomic. 2. If we ... |
@@ -55,6 +55,7 @@ func (a *adapter) CreateLegacyTokenWithValue(ctx context.Context, value string)
// PurgeProject removes a project from every token it exists in
func (a *adapter) PurgeProject(ctx context.Context, projectID string) error {
+ a.logger.Info("starting project delete for id " + projectID)
_, err := a... | [Reset->[ExecContext],CreateToken->[CreateTokenWithValue,GenerateNewToken],GetTokens->[QueryContext,Error,Warn,Next,Close,Wrap,Scan,Err,Array],PurgeProject->[ExecContext],ResetToV1->[ExecContext],GetTokenIDWithValue->[Scan,QueryRowContext],DeleteToken->[RowsAffected,ExecContext,Array],insertToken->[FromContext,Validate... | PurgeProject removes all tokens associated with a given project from the list of tokens. | Added consistent logging so we can tell what is going on with this multi-service operation. It is infrequent enough and complex enough that `info` level is warranted. |
@@ -188,7 +188,9 @@ def getiter_array(context, builder, sig, args):
iterobj.index = indexptr
iterobj.array = array
- return iterobj._getvalue()
+ res = iterobj._getvalue()
+ out = impl_ret_borrowed(context, builder, sig.return_type, res)
+ return out
def _getitem_array1d(context, builder, a... | [array_reshape->[populate_array,_attempt_nocopy_reshape,make_array],array_shape->[make_array],getitem_arraynd_intp->[populate_array,_getitem_array1d,make_array],_empty_nd_impl->[populate_array,make_array],numpy_arange_2->[arange->[arange]],numpy_empty_nd->[_parse_empty_args,_empty_nd_impl],iternext_numpy_ndindex->[make... | Get an iterator over an array. | Why is it borrowed? Is it the array object which is borrowed? As far as I can see the iterator object itself is new. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.