patch stringlengths 18 160k | callgraph stringlengths 4 179k | summary stringlengths 4 947 | msg stringlengths 6 3.42k |
|---|---|---|---|
@@ -122,8 +122,9 @@ class AmpAccordion extends AMP.BaseElement {
const sessionStr =
this.win./*OK*/sessionStorage.getItem(
dev().assertString(this.sessionId_));
- return /** @type {!Object} */ (
- JSON.parse(dev().assertString(sessionStr)));
+ return sessionStr
+ ... | [No CFG could be retrieved] | private private private private private private private private private private private private private private private private private private Handle accordion header click events. | can you tighten the type here so that it can't return null |
@@ -232,6 +232,13 @@ class EntityGenerator extends BaseBlueprintGenerator {
? ''
: this.entityConfig.microserviceName;
}
+
+ if (this.jhipsterConfig.applications && !this.entityConfig.skipClient) {
+ const remoteConfig = this.jhipsterConfig.applications[this.... | [No CFG could be retrieved] | Creates a public API method that can be used by the getter and setter methods. Reads the entity configuration from a microservice file and stores it in the entity storage. | use of constant? |
@@ -0,0 +1,15 @@
+class AddIndexOnArticlesHotnessScoreCommentsCount < ActiveRecord::Migration[6.1]
+ disable_ddl_transaction!
+
+ def up
+ columns = %i[hotness_score comments_count]
+
+ add_index :articles, columns, algorithm: :concurrently unless index_exists?(:articles, columns)
+ end
+
+ def down
+ colu... | [No CFG could be retrieved] | No Summary Found. | **nitpick (non-blocking):** maybe we move `columns` to a constant and reference it in both `up` and `down`? |
@@ -411,6 +411,8 @@ public class ZeppelinConfiguration extends XMLConfiguration {
ZEPPELIN_INTERPRETER_CONNECT_TIMEOUT("zeppelin.interpreter.connect.timeout", 30000),
ZEPPELIN_ENCODING("zeppelin.encoding", "UTF-8"),
ZEPPELIN_NOTEBOOK_DIR("zeppelin.notebook.dir", "notebook"),
+ ZEPPELIN_NOTEBOOK_S3_BUC... | [ZeppelinConfiguration->[getLong->[getLong,getLongValue],useClientAuth->[getBoolean],getRelativeDir->[getRelativeDir,getString],useSsl->[getBoolean],getInt->[getIntValue,getInt],getServerAddress->[getString],getWebSocketPort->[getServerPort,getInt],getNotebookDir->[getString],isType->[checkType],getTrustStorePassword->... | This function returns a list of all possible Zeppelin libraries. Creates a new note object. | Thanks for reflecting feedback about env variable name. How about have similar prefix for Property name? 'zeppelin.bucket.name' and 'zeppelin.notebook.user' ? |
@@ -42,8 +42,11 @@ class Silo(Package):
description='Builds Silex, a GUI for viewing Silo files')
variant('pic', default=True,
description='Produce position-independent code (for shared libs)')
+ variant('mpi', default=False,
+ description='Compile with MPI Compatibility')
... | [Silo->[install->[append,make,format,configure],flag_handler->[append,spec],variant,depends_on,version,patch]] | Handle flags for the given name. | This needs to default to True unless you want really bad things to happen: #2590 |
@@ -38,6 +38,9 @@ import org.apache.maven.plugins.annotations.Parameter;
import org.apache.maven.plugins.annotations.ResolutionScope;
import org.apache.maven.project.MavenProject;
+/**
+ * This goal helps in configuring Quarkus Maven project with quarkus-maven-plugin, with an example of configuration file
+ */
@Mo... | [ExampleConfigMojo->[openZipFile->[RuntimeException,ZipFile,isReadable,toString,getFile,getAbsolutePath,toPath],execute->[equals,MojoExecutionException,getEntry,getType,StringBuilder,getArtifacts,File,load,error,append,mkdirs,getBytes,entrySet,write,getInputStream,FileOutputStream,Properties,getBasedir,openZipFile]]] | This class is responsible for importing and importing the configuration files. Get artifact from jar and load it into the Properties. | I would go with just a simple `Creates an example configuration file.`. |
@@ -7,9 +7,9 @@
class AdminCensorRuleController < AdminController
- before_filter :set_editor, :only => [:create, :update]
- before_filter :set_censor_rule, :only => [:edit, :update, :destroy]
- before_filter :set_subject_and_censor_rule_and_form_url, :only => [:new, :create]
+ before_action :set_editor, :only... | [AdminCensorRuleController->[destroy->[destroy],set_subject_and_censor_rule_and_form_url->[new]]] | Index a global censor rule if any. | Line is too long. [83/80] |
@@ -163,14 +163,14 @@ class CarInterface(CarInterfaceBase):
ret.lateralTuning.pid.kpV, ret.lateralTuning.pid.kiV = [[0.17], [0.03]]
ret.lateralTuning.pid.kf = 0.00006
- elif candidate == CAR.RAV4_TSS2:
+ elif candidate in [CAR.RAV4_TSS2, CAR.RAV4H_TSS2]:
stop_and_go = True
ret.safety... | [CarInterface->[apply->[update],update->[update]]] | Get the parameters of a toyota candidate. Returns a dictionary of the values of the n - th node in the system. Returns information about the n - th node. Returns information about the n - th tuning parameters. | Huh, why do the mean here? Can't it be an if? |
@@ -241,6 +241,13 @@ run_specified_tests(const char *tests, int rank, int size,
nr_failed += run_daos_rebuild_simple_test(rank, size,
sub_tests, sub_tests_size);
break;
+ case 'b':
+ daos_test_print(rank, "\n\n=================");
+ daos_test_print(rank, "DAOS drain simple tests..");
+ daos_test_p... | [No CFG could be retrieved] | Print out the summary of all the magic numbers of the n - values of a n - The main entry point for the command line interface. | The short option should be abbr. of long option, but seems lots of the short options in this file didn't follow the rule. |
@@ -159,7 +159,7 @@ namespace System.ComponentModel.Composition.Hosting
ThrowIfDisposed();
using (_lock.LockStateForRead())
{
- return _sourceProvider;
+ return _sourceProvider!; // Should be [DisallowNull]
}
... | [CatalogExportProvider->[DisposePart->[Dispose],CatalogPart->[Dispose],DetermineRejection->[EnsureRejection],OnCatalogChanging->[GetExportsFromPartDefinitions],PartQueryStateNode->[AtomicCompositionQueryState->[IsMatchingDefinition]],UpdateRejections->[IsRejected],Dispose->[Dispose],EnsureRunning->[EnsureCanRun]]] | Replies the export provider which provides the provider access to additional objects. Private methods for writing a sequence of missing objects. | I think this property should be annotated as nullable with `[DisallowNull]` as setter throw on null but getter could return null before it set with a non null value. The problem here with `[DisallowNull]` attribute setter `value` not became non null, and warning |
@@ -42,6 +42,12 @@ public interface AllureConstants {
interface ConfigurationComponentLocationStory {
String COMPONENT_LOCATION = "Component location";
+
+ interface LazyConnectionsStory {
+
+ String COMPONENT_LOCATION_STORY = "Component location Story";
+
+ }
}
interface MUni... | [No CFG could be retrieved] | Allure interfaces for all the CPAL features and states of the system. feature. | why do you need this nested story? why not use `COMPONENT_LOCATION`? |
@@ -41,6 +41,15 @@ public class EncodeTest {
assertThat(udf.encode("31202b2031203d2031", "hex", "ascii"), is("1 + 1 = 1"));
assertThat(udf.encode("ce95cebbcebbceacceb4ceb1", "hex", "ascii"), is("������������"));
assertThat(udf.encode("c39c6265726d656e736368", "hex", "ascii"), is("��bermensch"));
+
+ a... | [EncodeTest->[shouldEncodeAsciiToBase64->[encode,assertThat,is],shouldReturnNullOnNullValue->[encode,assertThat,nullValue,is],shouldEncodeBase64ToHex->[encode,assertThat,is],shouldThrowIfUnsupportedEncodingTypes->[encode],shouldEncodeBase64ToAscii->[encode,assertThat,is],shouldEncodeBase64ToUtf8->[encode,assertThat,is]... | Test if the given bytes are encoded in hexadecimal. | What happens if the string is `0x0x`? Or `0X`? Or `X'` without a closing quote? Are there any characters that are not allowed with these formats? |
@@ -78,6 +78,16 @@ if (window.location.protocol === 'chrome-devtools:') {
require('../renderer/inspector')
}
+if (binding.guestInstanceId) {
+ process.guestInstanceId = parseInt(binding.guestInstanceId)
+}
+
+if (!process.guestInstanceId && preloadProcess.argv.indexOf('--webview-tag=true') !== -1) {
+ // don't ... | [No CFG could be retrieved] | The function that will be executed when the script is executed. Load a missing object from the cache. | Can `process .guestInstanceId` be equal to `0` here? |
@@ -307,7 +307,14 @@ public class MVELExpressionLanguage implements ExpressionLanguage, Initialisable
protected VariableResolverFactory createVariableVariableResolverFactory(MuleEvent event)
{
- return new VariableVariableResolverFactory(parserConfiguration, muleContext, event);
+ if (autoReso... | [MVELExpressionLanguage->[validate->[validate],evaluate->[evaluate]]] | create a factory for the variable resolution. | Can use a null implementation instead of returning null? |
@@ -0,0 +1,7 @@
+"""Brainvision module for conversion to FIF"""
+
+# Author: Teon Brooks <teon@nyu.edu>
+#
+# License: BSD (3-clause)
+
+from .brainvision import read_raw_vhdr
| [No CFG could be retrieved] | No Summary Found. | I know I already made you change this... but we should be consistent read_raw_kit -> RawKIT so : read_raw_brainvision -> RawBrainVision wdyt? |
@@ -41,7 +41,7 @@ namespace Dynamo.Tests
AssertNoDummyNodes();
// check all the nodes and connectors are loaded
- Assert.AreEqual(8, CurrentDynamoModel.CurrentWorkspace.Nodes.Count);
+ Assert.AreEqual(8, CurrentDynamoModel.CurrentWorkspace.Nodes.Count());
A... | [PackageValidationTest->[GetLibrariesToPreload->[GetLibrariesToPreload]]] | Tests if the node with the specified name has a value in the DynamoText model. | Goodness - this must have been a nasty refactor! |
@@ -44,7 +44,7 @@ setup(
author_email='azpysdkhelp@microsoft.com',
url='https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/core/azure-core',
classifiers=[
- 'Development Status :: 5 - Production/Stable',
+ 'Development Status :: 4 - Beta',
'Programming Language :: Python... | [find_packages,setup,search,replace,read,format,RuntimeError,join,open] | Creates a new namespace with the given name. Requires the version of the extension. | Need to fix |
@@ -213,10 +213,16 @@ export class Cid {
const scope = getCidStruct.scope;
/** @const {!Location} */
const url = parseUrl(this.ampdoc.win.location.href);
+ let api = null;
if (!isProxyOrigin(url)) {
+ api = this.cidApi_;
+ } else if (this.cacheCidApi_.isSupported()) {
+ api = this.ca... | [Cid->[constructor->[create],getExternalCid_->[setCidCookie,resolve,isProxyOrigin,getOrCreateCookie,cookieName,scope,getBaseCid,getProxySourceOrigin,OPT_OUT,parseUrl,cryptoFor],getOptedInScopes_->[getAttribute,hasAttribute,trim,split,indexOf,user,forEach],optOut->[optOutOfCid],get->[then,timerFor,isOptedOutOfCid,user,c... | Get a CID that can be used to access external entities. | If the scope is not opted in the CID API, then it falls back to using a cookie? Is that correct on the AMP Cache? |
@@ -125,7 +125,7 @@ template_files:
}
am := &MultitenantAlertmanager{
- store: noopAlertStore{},
+ store: prepareFilesystemAlertStore(t),
logger: util_log.Logger,
}
for _, tc := range testCases {
| [Context,InjectOrgID,Equal,Error,NewReader,NewRequest,Result,ReadAll,WithContext,NewRecorder,NoError,Errorf,SetUserConfig,Run] | group_wait - wait for the alertmanager to create a group of alert objects ListAlertConfigs - List all alerts in the store. | Better to use an empty real storage than a mocked one. |
@@ -570,6 +570,14 @@ public class AggregateNodeTest {
mapValues.put(mapper, table);
return table.createProxy();
}
+
+ Stream<FakeKTable> tables() {
+ final Stream<FakeKTable> children = mapValues.values().stream();
+ final Stream<FakeKTable> grandChildren =
+ mapVa... | [AggregateNodeTest->[StreamBuilderMocker->[FakeKStream->[groupByKey->[createProxy],groupBy->[createProxy],stream->[stream],groupStreams->[stream],transformValues->[FakeKStream,createProxy],createProxy->[build],mapValues->[FakeKStream,createProxy],filter->[FakeKStream,createProxy]],FakeKGroupedStream->[tables->[stream],... | Creates a new table for the map values. | what is going on here? |
@@ -244,7 +244,8 @@ int RSA_padding_check_PKCS1_OAEP_mgf1(unsigned char *to, int tlen,
* should be noted that failure is indistinguishable from normal
* operation if |tlen| is fixed by protocol.
*/
- tlen = constant_time_select_int(constant_time_lt(dblen, tlen), dblen, tlen);
+ tlen = constant_t... | [RSA_padding_add_PKCS1_OAEP_mgf1->[EVP_sha1,OPENSSL_cleanse,EVP_Digest,memcpy,memset,RAND_bytes,EVP_MD_size,OPENSSL_malloc,OPENSSL_clear_free,PKCS1_MGF1,RSAerr],RSA_padding_add_PKCS1_OAEP->[RSA_padding_add_PKCS1_OAEP_mgf1],RSA_padding_check_PKCS1_OAEP_mgf1->[constant_time_select_8,EVP_sha1,constant_time_eq,constant_tim... | RSA_padding_check_PKCS1_OAEP_mgf1 - O private helper functions region Private functions missing - key - value pair in the error message. | from[i] in a few lines below looks like undefined behaviour. from -= dblen , to compensate for too large i |
@@ -75,6 +75,8 @@ class PyScipy(PythonPackage):
patch('https://git.sagemath.org/sage.git/plain/build/pkgs/scipy/patches/extern_decls.patch?id=711fe05025795e44b84233e065d240859ccae5bd',
sha256='5433f60831cb554101520a8f8871ac5a32c95f7a971ccd68b69049535b106780', when='@1.2:1.5.3')
+ patch('scipy-clang... | [PyScipy->[build_args->[str,extend,satisfies],setup_build_environment->[mac_ver,set,satisfies],install_test->[working_dir,python],depends_on,version,patch,on_package_attributes,run_after]] | Setup the build environment for the build process. | Does this patch apply to all versions of py-scipy? |
@@ -287,6 +287,11 @@ class PackageReference(namedtuple("PackageReference", "ref id revision")):
def __str__(self):
return "%s:%s" % (self.ref, self.id)
+ def __lt__(self, other):
+ me = self.ref, self.id, self.revision or ""
+ other = other.ref, other.id, other.revision or ""
+ r... | [PackageReference->[loads->[PackageReference,loads],full_str->[full_str],validate->[validate_revision],is_compatible_with->[is_compatible_with],copy_clear_prev->[copy_with_revs],copy_clear_revs->[copy_with_revs],copy_with_revs->[PackageReference,copy_with_rev]],ConanName->[validate_name->[validate_string,invalid_name_m... | Returns a string representation of the object. | ...but I wonder why we need an `lt` operator now... |
@@ -520,7 +520,17 @@ class Harvester extends BaseAligner
reg.name = layer.getChild ("name", wcs).getValue ();
} else if (params.ogctype.substring(0,3).equals("SOS")) {
Namespace gml = Namespace.getNamespace("http://www.opengis.net/gml");
- reg.name = layer.getChild ("name", gml).getValue ();
+ ... | [Harvester->[loadThumbnail->[addContent,setAttribute,setText,getMessage,execOnHarvest,debug,warning,printStackTrace,getMapThumbnail,isDebugEnabled,commit,Set,Element],unsetThumbnail->[getMessage,removeDirectoryOrFile,debug,getDir,warning,isDebugEnabled,File],addOperatesOnUuid->[addContent,setAttribute,setText,getNamesp... | Adds the metadata for a layer to the WxSLayerRegistry. Load the specified layer. This method is used to load the metadata for a specific layer in the WMS 1. This method is called to detect the schema from the metadataUrl file. | Naturally, creating a random layer name does not allow accessing the layer in the layer parsing. |
@@ -30,10 +30,14 @@ class Patchelf(Package):
ELF executables."""
homepage = "https://nixos.org/patchelf.html"
- url = "http://nixos.org/releases/patchelf/patchelf-0.8/patchelf-0.8.tar.gz"
+
+ def url_for_version(self, version):
+ return "http://nixos.org/releases/patchelf/patchelf-%s/pa... | [Patchelf->[install->[make,configure],version]] | Installs a new node. | This `url_for_version` function is unnecessary. `spack fetch patchelf@0.9` works without it. |
@@ -170,10 +170,10 @@ public abstract class BaseTestJdbcResultSet
assertEquals(rs.getObject(column, Time.class), Time.valueOf(LocalTime.of(9, 39, 5)));
assertThatThrownBy(() -> rs.getDate(column))
.isInstanceOf(SQLException.class)
- .hasM... | [BaseTestJdbcResultSet->[serverSupportsVariablePrecisionTimestampWithTimeZone->[getTestedPrestoServerVersion],serverSupportsVariablePrecisionTime->[getTestedPrestoServerVersion],checkRepresentation->[checkRepresentation],serverSupportsVariablePrecisionTimeWithTimeZone->[getTestedPrestoServerVersion],serverSupportsVaria... | Checks if a column is a timestamp type and if it is a valid time literal. Unexpected timestamp type but time with time zone expects column to be a timestamp type but is time with time zone ResultSet object is expected to be a timestamp type but is time with time zone 0. | This PR is about `.getDate`'s exception _message_ and the linked issue is about `.getTimestamp`'s exception _type_. Why the TODO is removed? I guess it was not intentional, please revert. |
@@ -111,4 +111,17 @@ public class TestJdbcClient
new JdbcColumnHandle("COL3", JDBC_DOUBLE, DOUBLE),
new JdbcColumnHandle("COL4", JDBC_REAL, REAL)));
}
+
+ @Test
+ public void testConvertRangeInfoIntoIntoPredicate()
+ {
+ RangeInfo range = new RangeInfo("id", Option... | [TestJdbcClient->[testMetadataWithFloatAndDoubleCol->[assertTrue,JdbcColumnHandle,of,from,isPresent,get,getTableHandle,getColumns,assertEquals,SchemaTableName],testMetadata->[assertTrue,getCatalogName,getTableName,JdbcColumnHandle,of,from,isPresent,createVarcharType,containsAll,getSchemaName,getTableHandle,getTableName... | Checks that the metadata table has a missing column and a missing float column. | convertRangeInfoIntoIntoPredicate, is this a typo with Into twice? |
@@ -286,12 +286,14 @@ class Subversion(VersionControl):
# Subversion doesn't like to check out over an existing
# directory --force fixes this, but was only added in svn 1.5
rmtree(location)
- cmd_args = (['export'] + self.get_remote_call_options() +
- ... | [Subversion->[export->[get_remote_call_options],update->[get_remote_call_options],fetch_new->[get_remote_call_options],switch->[get_remote_call_options],get_remote_call_options->[get_vcs_version],get_vcs_version->[call_vcs_version]]] | Export the svn repository at the given url to the destination location. | nitpick: At this point there's no conflicting style in the rest of the file, so I would format as one line per arg. Likewise below. |
@@ -52,6 +52,7 @@ from apache_beam.transforms import trigger
from apache_beam.transforms.window import GlobalWindows
from apache_beam.utils import proto_utils
+standard_library.install_aliases()
# This module is experimental. No backwards-compatibility guarantees.
| [ProgressRequester->[run->[push]],_WindowGroupingBuffer->[append->[append]],FnApiRunner->[GrpcStateServicer->[State->[blocking_get,blocking_clear,blocking_append]],create_stages->[length_prefix_unknown_coders->[wrap_unknown_coders->[wrap_unknown_coders],wrap_unknown_coders],fix_side_input_pcoll_coders->[side_inputs,len... | Creates a new object. Yields the next from the queue. | Do we want to call this before we do the import of "queue" above? It looks like this only works because of an "accident" in that this module is imported after someone else already called `install_aliases()`. |
@@ -100,7 +100,10 @@ window.open = function(url, frameName, features) {
features = '';
}
options = {};
- ints = ['x', 'y', 'width', 'height', 'min-width', 'max-width', 'min-height', 'max-height', 'zoom-factor'];
+
+ // TODO remove hyphenated options in both of the following arrays for 1.0
+ ints = ['x', '... | [No CFG could be retrieved] | Create a proxy object for the BrowserWindowProxy. name options frameName features features value. | Should `minWidth` and `maxWidth` exist in here too? |
@@ -113,12 +113,6 @@ func (cs *ContainerService) setAPIServerConfig() {
admissionControlKey, admissionControlValues := getDefaultAdmissionControls(cs)
defaultAPIServerConfig[admissionControlKey] = admissionControlValues
- // Enable VolumeSnapshotDataSource feature gate for Azure Disk CSI Driver
- // which is disa... | [setAPIServerConfig->[Itoa,HasAadProfile,GetAPIServerEtcdAPIVersion,HasCosmosEtcd,Sprintf,GetCustomCloudName,GetCosmosEndPointURI,IsKubernetesVersionGe,IsFeatureEnabled,GetTargetEnv,Bool],IsAddonEnabled] | setAPIServerConfig sets up the API server configuration for the container service. Config for the static etcd client Bool returns true if the controller manager should use the default configuration. This function is used to set the default values for the API server config don t work with specific versions to accommodat... | ditto (we're always >= 1.17.0 starting with this PR) |
@@ -1603,7 +1603,7 @@ namespace Dynamo.Graph.Nodes
/// <param name="data"></param>
/// <param name="index"></param>
/// <returns></returns>
- public PortModel AddPort(PortType portType, PortData data, int index)
+ private PortModel AddPort(PortType portType, PortData data, int i... | [NodeModel->[BuildAst->[BuildOutputAst],DeserializeCore->[MarkDownStreamNodesAsModified],ComputeUpstreamOnDownstreamNodes->[ComputeUpstreamCache],RegisterOutputPorts->[OnNodeModified],OnPortConnected->[ValidateConnections,OnConnectorAdded,ConnectOutput,OnNodeModified,ConnectInput],Warning->[Warning],UpdateValueCore->[U... | Adds a port to the model. | API Change: `NodeModel.AddPort(...)` has been removed. Ports can now be added using `NodeModel.InPorts.Add(...)` |
@@ -441,8 +441,7 @@ class GMatrixClient(MatrixClient):
exception_handler: Optional exception handler function which can
be used to handle exceptions in the caller thread.
"""
- assert not self.should_listen and self.sync_worker is None, "Already running"
- self.shoul... | [GMatrixClient->[stop_listener_thread->[node_address_from_userid],create_room->[_mkroom,create_room],_handle_message->[node_address_from_userid],_handle_responses->[_mkroom,node_address_from_userid],set_presence_state->[_send],stop->[stop_listener_thread],__init__->[GMatrixHttpApi],listen_forever->[node_address_from_us... | Start a greenlet to listen for events in the Home Server. | shouldn't we have an assert for the state of the `stop_event`? Because `Runnable`s have the concept of `start` and `stop`, it could happen the even is not properly reset. |
@@ -32,7 +32,9 @@ from pants.util.fileutil import safe_hardlink_or_copy
from pants.util.memo import memoized_method, memoized_property
-_ZINC_COMPILER_VERSION = '0.0.9'
+# TODO: To use this with the nailgun strategy, will need a publish of `rsc_2.12`: this will
+# block landing this.
+_ZINC_COMPILER_VERSION = '0.0... | [Zinc->[compile_compiler_bridge->[_workdir,_relative_to_buildroot,_run_bootstrapper],scala_library->[_scala_library],zinc->[_zinc],_run_bootstrapper->[_compiler_bootstrapper,_relative_to_buildroot],compiler_interface->[_compiler_interface],compiler_bridge->[_compiler_bridge],_compiler_bridge_cache_dir->[_workdir],Facto... | Creates a new task object from a single object. NAME - A function to create a Zinc object. | This can be removed now. |
@@ -186,6 +186,8 @@ router.post('/twitter', (req, res) => {
})
}
+ redisBatch.exec()
+
logger.info(
`Pushed ${followCount} follow events and ${mentionCount} mention events to redis`
)
| [No CFG could be retrieved] | Register the router for the . | nit: does this return any status that we should log in case it fails ? |
@@ -0,0 +1,11 @@
+#!/usr/bin/env python3
+
+# Copyright (c) Facebook, Inc. and its affiliates.
+# This source code is licensed under the MIT license found in the
+# LICENSE file in the root directory of this source tree.
+
+from parlai.utils.testing import AutoTeacherTest
+
+
+class TestDefaultTeacher(AutoTeacherTest):... | [No CFG could be retrieved] | No Summary Found. | change to `glue_cola` (and the class name too) |
@@ -188,12 +188,15 @@ func (mod *modContext) typeString(t schema.Type, input, wrapInput, optional bool
if wrapInput && typ != "any" {
typ = fmt.Sprintf("pulumi.Input<%s>", typ)
}
+ if constValue != nil && typ == "string" {
+ typ = fmt.Sprintf("%q", constValue.(string))
+ }
+ if constValue != nil && typ == "pulu... | [genResource->[getConstValue,genAlias,getDefaultValue,genPlainType,typeString],genTypes->[genType,sdkImports,getImports,genHeader,details],genType->[details,genPlainType],gen->[genResource,genTypes,sdkImports,genFunction,isReservedSourceFileName,getImports,genHeader,add,genConfig],genFunction->[genPlainType],getTypeImp... | typeString returns a string representation of a type. schema. AssetType - > schema. Asset | schema. Asset | schema. AnyType. | I'm not sure if this special case makes sense here, or if this should be handled differently? |
@@ -140,6 +140,7 @@ namespace Js
#if ENABLE_TTD
, TTDHostCallbackFunctor()
, TTDMode(TTD::TTDMode::Invalid)
+ , TTDShouldPerformRecordAction(false), TTDShouldPerformDebugAction(false), TTDShouldPerformRecordOrDebugAction(false)
, ScriptContextLogTag(TTD_INVALID_LOG_PTR_ID)
, ... | [No CFG could be retrieved] | Initialize a new object. Private functions for the non - standard non - standard non - standard functions. | > TTDShouldPerformDebugAction(false), TTDShouldPerformRecordOrDebugAction(false) [](start = 47, length = 78) nit: in different lines to maintain code consistency |
@@ -47,6 +47,7 @@ class User(CountableDjangoObjectType):
PrefetchingConnectionField(
Address, description='List of all user\'s addresses.'),
model_field='addresses')
+ note = graphene.String(description='')
class Meta:
exclude_fields = ['password', 'is_superuser', 'Orde... | [AddressValidationInput->[String],ChoiceValue->[String],AddressInput->[String],User->[resolve_addresses->[all],resolve_permissions->[prefetch_related,get_permissions,format_permissions_for_display],Meta->[get_user_model],PrefetchingConnectionField,List,field],AddressValidationData->[List,String],Address->[resolve_count... | Provides a list of objects with properties that can be used to display a user s address. This function is a utility function that is used to create a list of all possible values for. | We could add the description here, I think a suitable one would be "A note about the customer". |
@@ -64,7 +64,7 @@ def _ensure_port_idle(port: int, message: Optional[str] = None) -> None:
raise RuntimeError(f'Port {port} is not idle {message}')
-def _start_rest_server(config: ExperimentConfig, port: int, debug: bool, experiment_id: str, pipe_path: str) -> Popen:
+def _start_rest_server(config: Experim... | [_init_experiment->[post,to_cluster_metadata,to_rest_json,put],start_experiment->[suppress,_init_experiment,error,validate,connect,_ensure_port_idle,generate_experiment_id,kill,_start_rest_server,_check_rest_server,close,info,Pipe],_ensure_port_idle->[connect_ex,socket,RuntimeError,close],_start_rest_server->[Path,appe... | Start a REST server with a specific port. | The type hint should be `Tuple[int, Popen]` |
@@ -131,3 +131,15 @@ class Opt(dict):
if key in dct:
del dct[key]
return cls(dct)
+
+ def log(self, header="Opt"):
+ from parlai.core.params import print_git_commit
+
+ logging.info(header + ":")
+ for key in sorted(self.keys()):
+ valstr = str(s... | [Opt->[__reduce__->[__getstate__],__deepcopy__->[Opt],load->[load]]] | Load an Opt from disk. | any reason to keep `print_git_commit` in `parlai.core.params`? |
@@ -32,6 +32,7 @@ def _touch(fname):
os.utime(fname, None)
+@override_switch('beta-versions', active=True)
def test_is_beta():
assert not utils.is_beta('1.2')
| [test_get_all_files->[_touch],test_get_all_files_prefix_with_strip_prefix->[_touch],test_atomic_lock_lifetime->[_get_lock],test_get_all_files_prefix->[_touch],TestManifestJSONExtractorStaticTheme->[create_webext_default_versions->[create_appversion],test_apps_contains_wrong_versions->[create_webext_default_versions,par... | Test if the version of the package is beta. Check if the sequence is in beta. | You didn't touch `file.utils` so this should still work, right? |
@@ -157,11 +157,11 @@ namespace NServiceBus
{
if (typeof(IList<>).MakeGenericType(args) == prop.PropertyType)
{
- throw new NotSupportedException("IList<T> is not a supported property type for serialization, use List<T> instead. Type: " +... | [XmlSerializerCache->[InitType->[InitType],GetAllPropertiesForType->[GetAllPropertiesForType]]] | GetAllPropertiesForType returns all properties of a given type. where T and K are not of type System. Object. | I don't think you need to escape `'` with `\'`? |
@@ -618,11 +618,10 @@ public class MovePanel extends AbstractMovePanel {
final boolean isCorrectTerritory =
(firstSelectedTerritory == null) || firstSelectedTerritory.equals(territory);
if (someOwned && isCorrectTerritory) {
- final Collection<List<Unit>> highlight = new ... | [MovePanel->[sortTransportsToLoad->[getUnitOwner],allowSpecificUnitSelection->[getMovableMatch,getTransportsToLoad,sortUnitsToMove],sortTransportsToUnload->[getUnitOwner],getRouteNonForced->[getUnitOwner],getTransportsToLoad->[sortTransportsToLoad,getUnitOwner],setUpSpecific->[setFirstSelectedTerritory],sortUnitsToMove... | mouse enter. | I believe the order of those should be swapped |
@@ -323,6 +323,14 @@ func resourceAwsLambdaEventSourceMappingRead(d *schema.ResourceData, meta interf
return fmt.Errorf("error setting topics: %w", err)
}
+ if eventSourceMappingConfiguration.StartingPosition != nil {
+ d.Set("starting_position", eventSourceMappingConfiguration.StartingPosition)
+ }
+
+ if even... | [EventSourceMappingUpdate,IsNewResource,DeleteEventSourceMapping,StringInSlice,NonRetryableError,Set,GetOkExists,EventSourceMappingConfigurationByID,Format,GetOk,TimedOut,NotFound,HasChange,Errorf,Len,SetId,RetryableError,Bool,IntInSlice,Time,Any,ErrCodeEquals,EventSourceMappingDelete,UpdateEventSourceMapping,EventSour... | Associate the given values with the given lambda event source mapping. Delete an existing lambda object. | This makes change backwards compatible, so TF won't try to recreate event source mappings that currently have `nil` value on state. Maybe it's better to remove the `if` and allow value to get empty string? That would then cause a recreation of the resource. |
@@ -36,6 +36,7 @@ namespace Dynamo.ViewModels
private bool _isOneRowContent;
private readonly Action<string> tagGeometry;
private bool isCollection;
+ private string _outputType;
// Instance variable for the number of items in the list
private int numberOfItems;
| [WatchViewModel->[GetMaximumDepthAndItemNumber->[GetMaximumDepthAndItemNumber]]] | Component of a node in the DynamoDb system. Get the last index of the Path. | this is an old style, lets not use `_` for backing fields in new code. |
@@ -109,6 +109,8 @@ public class SecurityRestApi {
@GET
@Path("userlist/{searchText}")
public Response getUserList(@PathParam("searchText") final String searchText) {
+
+ final int numUsersToFetch = 5;
List<String> usersList = new ArrayList<>();
List<String> rolesList = new ArrayList<>();
try... | [SecurityRestApi->[getUserList->[compare->[matches],hasNext,debug,getName,equals,error,sort,getRealmsList,build,containsIgnoreCase,iterator,put,addAll,isDebugEnabled,add,GetUserList,getUserList,next,getRolesList],ticket->[create,equals,getTicket,JsonResponse,build,getPrincipal,toJson,toString,warn,getRoles,put],Gson,ge... | This method retrieves the users and roles from the realms. This method is used to find the user and role that match the search text. | Can you use this same variable for line no 164 (`if (maxLength == 5) {`) as well. |
@@ -69,7 +69,7 @@ if StrictVersion(_PIP_VERSION) < StrictVersion(REQUIRED_PIP_VERSION):
)
-REQUIRED_CYTHON_VERSION = '0.26.1'
+REQUIRED_CYTHON_VERSION = '0.28.1'
try:
_CYTHON_VERSION = get_distribution('cython').version
if StrictVersion(_CYTHON_VERSION) < StrictVersion(REQUIRED_CYTHON_VERSION):
| [get_version,generate_protos_first,generate_common_urns] | Get the version of the package. Cythonized version of the cythonize function. | <!--new_thread; commit:05e95b6995f0b88a53930c30459c8d81e6692219; resolved:0--> How was this version bump determined? |
@@ -11,13 +11,14 @@ class PyLxml(PythonPackage):
XML and HTML in the Python language."""
homepage = "http://lxml.de/"
- url = "https://pypi.io/packages/source/l/lxml/lxml-2.3.tar.gz"
+ url = "https://pypi.io/packages/source/l/lxml/lxml-4.4.1.tar.gz"
+ version('4.4.1', sha256='c81cb40bff... | [PyLxml->[depends_on,version]] | XML and HTML in the Python language. | Cython is only needed to build from the git repo, not from a release tarball. |
@@ -466,6 +466,8 @@ class RandomTranslation(PreprocessingLayer):
The input is extended by wrapping around to the opposite edge.
- *nearest*: `(a a a a | a b c d | d d d d)`
The input is extended by the nearest pixel.
+ fill_value: a float represents the value to be filled outside the
+ ... | [RandomRotation->[call->[random_rotated_inputs->[get_rotation_matrix,transform],random_zoomed_inputs->[]],__init__->[check_fill_mode_and_interpolation]],RandomTranslation->[__init__->[check_fill_mode_and_interpolation]],RandomZoom->[call->[random_rotated_inputs->[],random_zoomed_inputs->[transform]],__init__->[check_fi... | Output of the nearest nearest pixel of a layer in the image. Creates a 4D 4D tensor with shape. | Put `fill_value` at the end |
@@ -38,7 +38,7 @@ class Superlu(Package):
version('5.2.1', '3a1a9bff20cb06b7d97c46d337504447')
version('4.3', 'b72c6309f25e9660133007b82621ba7c')
- variant('fpic', default=False,
+ variant('fpic', default=True,
description='Build with position independent code')
depends_on('... | [Superlu->[install->[join_path,install,write,working_dir,cmake,spec,which,extend,install_tree,glob,format,mkdir,$,open,make],when,variant,depends_on,version]] | Creates a CMake instance for a given sequence number. Installs a new with the given spec. | You might have to argue why you want to change the default for this package for everyone. |
@@ -386,7 +386,9 @@ public class ClassicPluginStrategy implements PluginStrategy {
// initialize plugin
try {
Plugin plugin = wrapper.getPlugin();
- plugin.setServletContext(pluginManager.context);
+ if (plugin != null) {
+ plug... | [ClassicPluginStrategy->[createPluginWrapper->[loadLinkedManifest,isLinked],updateDependency->[getShortName],load->[getShortName],parseClassPath->[resolve],createClassLoader->[createClassLoader],getImpliedDependencies->[getImpliedDependencies],AntClassLoader2->[defineClassFromData->[defineClassFromData]],createClassJar... | Load a plugin from the given wrapper. | Throw exception if null? I doubt we want to proceed with starting the plugin in such conditions |
@@ -150,7 +150,7 @@ def get_all_certs_attached_to_endpoint_without_autorotate():
"""
return (
Certificate.query.filter(Certificate.endpoints.any())
- .filter(Certificate.rotation == False)
+ .filter(Certificate.rotation == false())
.filter(Certificate.not_after >= arrow.now... | [upload->[create_certificate_roles,get,update],export->[export,get],create_csr->[get],update->[get,update],mint->[get],reissue_certificate->[get,create,get_certificate_primitives],create->[create_certificate_roles,mint,get],get_by_name->[get],create_certificate_roles->[get,get_by_name],import_certificate->[get],render-... | Returns all certificates that are attached to an endpoint but that do not have autorotate. | lint does not like `X == boolean` comparision, which is needed in filter. Thus using `sqlalchemy.sql.expression` |
@@ -813,6 +813,9 @@ module FirstTimeDataGenerator
)
)
+ # create thumbnail
+ experiment.generate_workflow_img
+
# Lastly, create cookie with according ids
# so tutorial steps can be properly positioned
JSON.generate([
| [pluck_random->[first],generate_random_time->[rand,now,size],seed_demo_data->[create,days,find,new,table,week,ago,where,join,first,full_name,name,root,sample_types,generate_module_steps,add_step_asset,t,sample,day,in?,tags,to_s,created_at,generate,weeks,checklist_items,result_text,now,present?,each,generate_random_time... | Seed demo data from a user - private organization. create a random n - node project Creates all the modules that have a specific n - node node that is a part of a create a new user in a module Creates a new module with the given user and module. | Trailing whitespace detected. |
@@ -320,7 +320,11 @@ class GobblinHelixDistributeJobExecutionLauncher implements JobExecutionLauncher
*/
@Override
public boolean cancel(boolean mayInterruptIfRunning) {
- GobblinHelixDistributeJobExecutionLauncher.this.executeCancellation();
+ try {
+ GobblinHelixDistributeJobExecution... | [GobblinHelixDistributeJobExecutionLauncher->[Builder->[build->[GobblinHelixDistributeJobExecutionLauncher]],createJobBuilder->[getPlanningJobId,Builder],DistributeJobMonitor->[cancel->[executeCancellation]],cancel->[cancel],DistributeJobCallable->[call->[getPlanningJobId,submitJobToHelix,createJobBuilder]]]] | Cancel the current job. | Maybe nice to move this exception handling to executeCancellation because other callers may not handle this probably? |
@@ -145,6 +145,9 @@ abstract class VcsDownloader implements DownloaderInterface, ChangeReportInterfa
return ' ' . $line;
}, explode("\n", $logs)));
+ // escape angle brackets for proper output in the console
+ $logs = str_replace('<', '\<', $log... | [VcsDownloader->[remove->[getName,writeError,cleanChanges,getPrettyVersion,removeDirectory],cleanChanges->[getLocalChanges],update->[doUpdate,getMessage,getName,getSourceUrls,getPrettyName,getFullPrettyVersion,isVerbose,writeError,cleanChanges,getPrettyVersion,reapplyChanges,getSourceType,getSourceReference,getCommitLo... | Updates a package in the repository. Checks if there is a rollback in the log and if so logs the error and writes it. | I guess we can/could have this very same problem in all places where `$this->writeError` (or similar) is called with a value which is not contructed by composer but by user input. Therefore I guess we need something in `io` which allows-/disallows-markup or escapes-markup of the message to log/write |
@@ -518,6 +518,7 @@ class FakeWinFixture {
if (this.spec.mockFetch !== false) {
fetchMock./*OK*/restore();
}
+ RequestBank.tearDown();
}
}
| [RealWinFixture->[setup->[installAmpAdStylesPromise,interceptEventListeners,AMP_TEST_IFRAME,attachFetchMock,onerror,onload,name,installRuntimeStylesPromise,testLocation,location,srcdoc,body,document,win,iframe,fakeRegisterElement,defineProperty,allowExternalResources,mockFetch,installCustomElements,resolve,ampCss,doNot... | teardown - restore the mock fetch if mockFetch is enabled. | we'd better wait for tearDown here to avoid race condition between server & client |
@@ -131,7 +131,7 @@ public class PutMongoRecord extends AbstractMongoProcessor {
for (String name : schema.getFieldNames()) {
document.put(name, contentMap.get(name));
}
- inserts.add(document);
+ inserts.add(convertArrays(document));
... | [PutMongoRecord->[onTrigger->[getValue,nextRecord,asControllerService,size,getSchema,info,put,createRecordReader,getFieldNames,withWriteConcern,Document,convertRecordFieldtoObject,transfer,error,asInteger,read,format,insertMany,getWriteConcern,send,getLogger,get,add,commit,getRecordDataType],unmodifiableList,build,unmo... | Trigger a insert operation. if there are no duplicates commit the session. | Why not do the conversion while inserting? |
@@ -166,6 +166,18 @@ class IgnoreErrorsTest(test_base.DatasetTestBase, parameterized.TestCase):
ds = dataset_ops.Dataset.range(10).apply(error_ops.ignore_errors())
self.assertEqual(self.evaluate(ds.cardinality()), dataset_ops.UNKNOWN)
+class IgnoreErrorsCheckpointTest(checkpoint_test_base.CheckpointTestBase... | [IgnoreErrorsTest->[testReadFileIgnoreError->[write_string_to_file]]] | Test cardinality of a dataset. | now that we use multiple inheritance, it would make sense to rename `run_core_tests` to `run_checkpoint_tests` (in a separate PR) |
@@ -229,6 +229,8 @@ public final class SCMHAUtils {
} else {
return RetryPolicy.RetryAction.FAIL;
}
+ } else if (SCMHAUtils.isNonRetriableException(e)) {
+ return RetryPolicy.RetryAction.FAIL;
} else {
if (failovers < maxRetryCount) {
return new RetryPolicy.RetryActio... | [SCMHAUtils->[getSCMNodeIds->[getSCMNodeIds,getScmServiceId],getRetryAction->[isRetriableWithNoFailoverException],isPrimordialSCM->[isSCMHAEnabled,getPrimordialSCM],removeSelfId->[getScmServiceId]]] | This method returns a RetryPolicy. RetryAction based on the given parameters. | Here do we need to do manually failover, as performFailOver is a dummy method. |
@@ -66,12 +66,13 @@ public class BytecodeVisitorsTest {
JavaConfiguration conf = new JavaConfiguration(Charset.forName("UTF-8"));
Project project = mock(Project.class);
ProjectFileSystem pfs = mock(ProjectFileSystem.class);
+ SuppressWarningsFilter swf = mock(SuppressWarningsFilter.class);
File b... | [BytecodeVisitorsTest->[testMethodArgs->[isEqualTo],testTryCatchBlock->[isEqualTo],testFileDependencies->[isEqualTo],testAccessMethodOfAnObject->[isEqualTo],findResource->[files,directories,endsWith],noDependencyFromOneSquidUnitToItself->[isNull],testLdcRelationShips->[isEqualTo],testClassDefinitionWithGenerics->[isEqu... | This method initializes the mock. | Why a mock ? |
@@ -54,6 +54,13 @@ class IntelMpi(IntelInstaller):
libraries, root=self.prefix.lib64, shared=True, recurse=True
)
+ @property
+ def mpi_headers(self):
+ # recurse from self.prefix will find too many things for all the
+ # supported sub-architectures like 'mic'
+ return... | [IntelMpi->[mpi_libs->[find_libraries],install->[install],setup_dependent_package->[join_path,isdir,RuntimeError],setup_dependent_environment->[set],version,provides]] | Find all libraries that are required to run the MPI. | supposedly that's how one overrides `spec['mpi'].headers ` which returns `HeaderList` object which by default looks for `*` headers and is recursive. Looking for `mpi.h` in `include64` looks ok to me. Hopefully `include64` always exists. |
@@ -1,6 +1,7 @@
import logging
from django.conf import settings
+from django.contrib.sites import models as sites
from django.utils.translation import get_language
from django_countries.fields import Country
| [GoogleAnalytics->[process_request->[get_language,get_client_id,report_view,exception]],DiscountMiddleware->[process_request->[prefetch_related,all]],CurrencyMiddleware->[process_request->[get_currency_for_country,hasattr]],CountryMiddleware->[process_request->[get_client_ip,Country,get_country_by_ip]],getLogger] | Adds a middleware to the object that will display the number of products in the system. | Why `import models as sites`? Can't we just explicitly import what we need in this module? From what I see we use only SiteManager here, we can import only that. |
@@ -9,11 +9,11 @@ import os
import os.path
import time
import json
-import ssl
-import urllib.request
-import urllib.error
+from typing import cast
-import certifi
+from sentry_sdk.hub import Hub
+from sentry_sdk.utils import event_from_exception
+from sentry_sdk import configure_scope
from PyQt5.QtCore import ... | [CrashHandler->[_show->[_exit,exec_],_showDetailedReport->[exec_],_messageWidget->[i18nc,setText,QLabel],_closeEarlyCrashDialog->[isChecked,_exit,_sendCrashReport],_exceptionInfoWidget->[format_exception,__contains__,addWidget,join,i18nc,QTextEdit,module,setText,int,dict,QVBoxLayout,logException,setLayout,setTitle,appe... | Create a new object with the given exception type value and traceback. This function is called when an uncaught error occurs. It will log the exception and log. | we should make sure Lipu's PR (add `sentry_sdk`) ends up in the build env. :-) |
@@ -107,11 +107,16 @@ class DataFileReader(object):
# get ready to read
self._block_count = 0
+ # event_position and block_count are to support reading from current position in the future read,
+ # no need to downloading from the beginning of avro file with these two attr.
+ if ... | [DataFileReader->[__next__->[_skip_sync,_read_block_header],_read_block_header->[DataFileException],next->[__next__],__init__->[DataFileException],close->[close]]] | Initializes a new data file reader. | I'd rename this to `object_position` or so. avro shouldn't be aware of CF and `event` is CF terminology. |
@@ -1818,8 +1818,8 @@ def test_pending_transfers_endpoint(raiden_network, token_addresses):
mediator_server = create_api_server(mediator, 8576)
target_server = create_api_server(target, 8577)
- target.raiden.message_handler = target_wait = WaitForMessage()
- mediator.raiden.message_handler = mediator_... | [test_api_open_close_and_settle_channel->[assert_proper_response,get_json_response,api_url_for],test_payload_with_address_invalid_chars->[assert_response_with_error,api_url_for],test_api_open_and_deposit_channel->[assert_proper_response,get_json_response,api_url_for],test_api_channel_status_channel_nonexistant->[assert... | Test that there are pending transfers for a given token. check if the content contains a token and channel. | Was this change always possible before this PR? |
@@ -1043,6 +1043,15 @@ class Runner {
// Load Core, mu-plugins, plugins, themes etc.
if ( Utils\wp_version_compare( '4.6-alpha-37575', '>=' ) ) {
+ if ( $this->cmd_starts_with( array( 'help' ) ) ) {
+ // Hack: define `WP_DEBUG` and `WP_DEBUG_DISPLAY` to get `wpdb::bail()` to `wp_die()`.
+ if ( ! defined... | [Runner->[init_config->[get_project_config_path,get_global_config_path],_run_command->[run_command],run_command->[find_command_to_run],load_wordpress->[check_wp_version,cmd_starts_with,get_wp_config_code],start->[wp_exists,_run_command,do_early_invoke,find_command_to_run,cmd_starts_with,run_alias_group,set_alias,get_wp... | Load WordPress CLI Load WordPress settings and filters. | @gitlost Just to confirm, this is only a problem for WP 4.6 and lower? |
@@ -307,6 +307,10 @@ def data_send(plan, path_plan, CS, CI, CP, VM, state, events, actuators, v_cruis
CC.hudControl.leadVisible = plan.hasLead
CC.hudControl.rightLaneVisible = bool(path_plan.pathPlan.rProb > 0.5)
CC.hudControl.leftLaneVisible = bool(path_plan.pathPlan.lProb > 0.5)
+ if len(list(path_p... | [state_transition->[isEnabled],controlsd_thread->[state_control,state_transition,data_sample,data_send],main->[controlsd_thread],state_control->[isActive,isEnabled],data_send->[isActive,isEnabled],data_sample->[isEnabled],isEnabled->[isActive],main] | Send data to the car and the hud. Audible alert can be found in the system. Return a sequence of objects representing a single unknown node in the system. | Can you wrap the whole expression into one bool? |
@@ -594,7 +594,7 @@ module.exports = class extends Generator {
}
const done = this.async();
const localModule = path.join(process.cwd(), 'node_modules', blueprint);
- if (!fs.existsSync(localModule)) {
+ if (fs.existsSync(localModule)) {
shelljs.exec('yo --generator... | [No CFG could be retrieved] | Check if the blueprint is installed and if it is installed. Check if Node is installed on the system. | not sure about this. I need to test it. The idea was that if there is no module in your local node_modules folder then we check if there is a global one available. I guess the fix should be to call `done` in the else for this if |
@@ -124,6 +124,13 @@ void qbus_device::device_start()
void qbus_device::device_reset()
{
+ device_qbus_card_interface *entry = m_device_list.first();
+
+ while (entry)
+ {
+ entry->device_reset();
+ entry = entry->next();
+ }
}
| [No CFG could be retrieved] | Initialize a QBUS device. delegate to the readwrite handler. | This is going to cause problems. You generally shouldn't be calling `device_reset` directly as it doesn't call `interface_pre_reset`/`interface_post_reset` for mixins, and it doesn't reset child devices automatically. |
@@ -36,7 +36,7 @@ func getClientConfig(path string) (*kclient.Config, error) {
}
if err := kclient.LoadTLSFiles(config); err != nil {
- fmt.Errorf("Unable to load certificate info using credentials from %q: %v", path, err)
+ return nil, fmt.Errorf("Unable to load certificate info using credentials from %q: %v",... | [ClientConfig,ExpandOrDie,Itoa,FormatBool,NewDefaultClientConfig,Sprintf,List,Errorf,Load,LoadTLSFiles] | getClientConfig returns a kube client configuration for the given name. The configuration object for the OpenShift environment. | @smarterclayton @ramr PTAL this change - was reverted from a `glog` I believe, what is the correct usage here? |
@@ -38,11 +38,16 @@ var _ = g.Describe("[Feature:Prometheus][Feature:Builds] Prometheus", func() {
g.Describe("when installed on the cluster", func() {
g.It("should start and expose a secured proxy and verify build metrics", func() {
+ if exutil.IsClusterOperated(oc) {
+ // TODO: prometheus is not scraping ... | [KubeClient,By,WaitForOpenShiftNamespaceImageStreams,Expect,HaveOccurred,FixturePath,Delete,It,WaitForBuildResult,WaitForServiceAccount,Args,AsAdmin,DumpPodLogsStartingWith,KubeConfigPath,To,AdminKubeClient,Errorf,Namespace,StartBuildResult,CreateExecPodOrFail,KubeFramework,NewDeleteOptions,Execute,NewCLI,BuildClient,B... | e2e - e2e returns the id of the first build that is able to authenticate. | Please make sure there is an open bug here. |
@@ -1815,8 +1815,8 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
compileNode = $compileNode[0];
replaceWith(jqCollection, sliceArgs($template), compileNode);
- childTranscludeFn = compilationGenerator(mightHaveMultipleTransclusionError, $template, transcludeFn, t... | [No CFG could be retrieved] | Creates a directive that checks if the given url is matched against the whitelist of allowed urls. Check if the is present in debugInfoEnabled state. If not update debugInfo. | the order of `changeOuterScope` and `terminalPriority` is wrong [I do see that the two order errors cancel each other, but it is better if the order is respected] |
@@ -40,8 +40,6 @@ CLI_FLAG(string,
"",
"TLS/HTTPS endpoint for config retrieval");
-DECLARE_bool(tls_secret_always);
-DECLARE_string(tls_enroll_override);
DECLARE_bool(tls_node_api);
DECLARE_bool(enroll_always);
| [genConfig->[IsString,unescapeUnicode,ok,VLOG,GetString,doc,add,fromString],setUp->[size,Status,clearNodeKey,getNodeKey],DECLARE_string,DECLARE_bool,REGISTER,CLI_FLAG] | OSQuery specific functions Generate the configuration for the node API. | Why are these being removed? Do we know that no one else in the community is using them? |
@@ -182,7 +182,7 @@ def handle_trade(trade: Trade) -> bool:
logger.debug('Handling %s ...', trade)
current_rate = exchange.get_ticker(trade.pair)['bid']
- if should_sell(trade, current_rate, datetime.utcnow()):
+ if should_sell(trade, current_rate, datetime.utcnow()) or get_signal(trade.pair, SignalTy... | [cleanup->[cleanup],init->[init],main->[init],_process->[refresh_whitelist],handle_trade->[execute_sell,should_sell],create_trade->[get_target_bid],main] | Sells the current pair if the threshold is reached and updates the trade record. | `get_signal` returns a bool not an int, you can drop the `== 1`. I think we should rename `should_sell` into `min_roi_reached()` or something like that, because should_sell is too board in this case. |
@@ -265,5 +265,6 @@ function publishExternalAPI(angular) {
$$cookieReader: $$CookieReaderProvider
});
}
- ]);
+ ])
+ .info({ angularVersion: '"NG_VERSION_FULL"' });
}
| [No CFG could be retrieved] | Constructor for the cookieReaderProvider. | Why not call it just `version` (since it's already namespaced by the module name). Especially in other modules (`ngAnimate`, `ngAria`, etc). |
@@ -85,16 +85,15 @@ public abstract class AbstractPutEventProcessor extends AbstractSessionFactoryPr
// Putting these properties here so sub-classes don't have to redefine them, but they are
// not added to the properties by default since not all processors may need them
-
public static final Allowable... | [AbstractPutEventProcessor->[acquireSender->[createSender],FlowFileMessageBatch->[setNumMessages->[isComplete],addSuccessfulRange->[Range],transferRanges->[compare->[getStart,compare],getEnd,getStart,Range],addFailedRange->[Range],completeSession->[transferRanges]]]] | A property that can be used to specify the data size of a connection and a protocol for. | Is this necessary since allowable values are specified and the property is required? |
@@ -543,7 +543,7 @@ public class AMQPSessionCallback implements SessionCallback {
afterIO(new IOCallback() {
@Override
public void done() {
- connection.runLater(() -> {
+ connection.runNow(() -> {
if (delivery.getRemot... | [AMQPSessionCallback->[isWritable->[isWritable],getAddress->[getAddress],close->[close],getMatchingQueue->[getMatchingQueue],newTransaction->[newTransaction],serverSend->[checkAddressAndAutocreateIfPossible],addProducer->[addProducer],createTemporaryQueue->[createTemporaryQueue],check->[check],disconnect->[close],rejec... | inSessionSend - Send a message to the server. | @tabish121 this will also fix your test, as it will avoid using an executor for non durable |
@@ -4658,6 +4658,12 @@ p {
$connection = self::connection();
+ $calypso_env = self::get_calypso_env();
+
+ if ( ! empty( $calypso_env ) ) {
+ $args['calypso_env'] = $calypso_env;
+ }
+
$api_url = $iframe ? $connection->api_url( 'authorize_iframe' ) : $connection->api_url( 'authorize' );
return ad... | [Jetpack->[reset_saved_auth_state->[reset_saved_auth_state],add_remote_request_handlers->[require_jetpack_authentication],admin_page_load->[disconnect],register->[register],translate_role_to_cap->[translate_role_to_cap],__construct->[init],get_locale->[guess_locale_from_lang],authenticate_jetpack->[authenticate_jetpack... | Builds the authorization URL. This function is used to provide a basic authentication request. Add query arg to query object. | tabs > spaces :) other than that this should be good to go. |
@@ -397,6 +397,9 @@ public class DefaultHttpHeaderMapper implements HeaderMapper<HttpHeaders>, BeanF
if (logger.isDebugEnabled()) {
logger.debug(MessageFormat.format("setting headerName=[{0}], value={1}", name, value));
}
+ if (CONTENT_TYPE.equals(name)) {
+ name = MessageHeaders.CONTEN... | [DefaultHttpHeaderMapper->[shouldMapOutboundHeader->[containsElementIgnoreCase],inboundMapper->[setExcludedInboundStandardResponseHeaderNames,setInboundHeaderNames,setOutboundHeaderNames,DefaultHttpHeaderMapper],shouldMapHeader->[containsElementIgnoreCase],outboundMapper->[setExcludedOutboundStandardRequestHeaderNames,... | This method converts the given HTTP headers into a Map of headers. | I think we have no choice but to populate both headers - at least for the 4.0.x backport. |
@@ -139,6 +139,18 @@ public class Message implements Messages {
private ArrayList<Recording> recordings;
+ private static final IdentityHashMap<Class<?>, Integer> classSizes = Maps.newIdentityHashMap();
+ static {
+ classSizes.put(byte.class, 1);
+ classSizes.put(char.class, 2);
+ cl... | [Message->[addFields->[addField],MessageIdFunction->[apply->[getId]],addDoubleFields->[addField],getStreamIds->[getId,getFieldAs],addRequiredField->[addField],addField->[getId,addField],addLongFields->[addField],addStreams->[addStream],toElasticSearchObject->[getId],addStringFields->[addField],toString->[toString],iter... | Creates a new message object. Checks if the required fields are present. | Does this lookup also work for the autoboxed types? (`Long.class`, ...) |
@@ -115,7 +115,7 @@ import com.ichi2.async.TaskListener;
import com.ichi2.async.TaskManager;
import com.ichi2.compat.CompatHelper;
import com.ichi2.libanki.Decks;
-import com.ichi2.libanki.Model;
+import com.ichi2.libanki.SoundOrVideoTag;
import com.ichi2.libanki.sched.AbstractSched;
import com.ichi2.libanki.Card;... | [AbstractFlashcardViewer->[MyWebView->[onOverScrolled->[onOverScrolled],onScrollChanged->[onScrollChanged],onTouchEvent->[onTouchEvent],loadDataWithBaseURL->[loadDataWithBaseURL],findScrollParent->[findScrollParent]],LinkDetectingGestureDetector->[executeTouchCommand->[processCardAction],onWebViewCreated->[executeTouch... | Package private for testability. package for testing. | So strange - what am I missing when I don't see "SoundOrVideoTag" as an object here anywhere, and I am not able to see it when I browse the tts-4 branch on your fork? How did this compile ? I must be missing something obvious |
@@ -629,10 +629,8 @@ angular.module('ngMessages', [], function initAngularHelpers() {
* @scope
*
* @description
- * `ngMessageExp` is a directive with the purpose to show and hide a particular message.
- * For `ngMessageExp` to operate, a parent `ngMessages` directive on a parent DOM element
- * must ... | [No CFG could be retrieved] | Provides a way to show and hide a message key. The ngMessage directive creates a directive that displays the static value of the ngMessage attribute. | Shouldn't this be `directive:ngMessage` or something (instead of `module:ngMessage`)? |
@@ -84,7 +84,7 @@ class Qgis(CMakePackage):
depends_on('proj@4.4.0:')
depends_on('py-psycopg2', type=('build', 'run')) # TODO: is build dependency necessary?
depends_on('py-pyqt4', when='@2')
- depends_on('py-pyqt5@5.3:', when='@3')
+ depends_on('py-pyqt5@5.3: +qsci_api', when='@3')
depends_o... | [Qgis->[cmake_args->[append,format,extend],variant,depends_on,version,patch]] | returns a list of all possible values for a given package dependencies for all of the modules. | In the past, we avoided adding `+qsci_api` since this is not a requirement by QGIS. |
@@ -85,7 +85,8 @@ import org.slf4j.LoggerFactory;
* t -> KV.of(tableName, writeRequest))
* .withRetryConfiguration(
* DynamoDBIO.RetryConfiguration.create(5, Duration.standardMinutes(1)))
- * .withAwsClientsProvider(new BasicDynamoDbProvider(acc... | [DynamoDBIO->[Read->[withAwsClientsProvider->[withAwsClientsProvider,build],ReadFn->[processElement->[getSegmentId]],withScanResultMapperFn->[build],expand->[getAwsClientsProvider,getScanRequestFn,getCoder,setCoder],SplitFn->[processElement->[withSegmentId]],withCoder->[build],withScanRequestFn->[build],withSegmentId->... | Imports a single object from the DynamoDb table. Retrieves a list of all items from the specified table that are not yet in the table. | Can we remove this from the basic example and add an explanation apart similar to this (or the one you gave me in explanation above). `If your stream has duplicated primary keys you might find a ValidationError because AWS does not allow to write the same keys as part of the same batch operation, in this case you might... |
@@ -175,7 +175,7 @@ type appendField struct {
func (f appendField) Apply(b string, m Map) {
v, ok := m[f.Key()]
if ok {
- m[f.Key()] = v + f.JoinString() + b
+ m[f.Key()] = v.(string) + f.JoinString() + b
return
}
m[f.Key()] = b
| [JoinString->[Delimiter,Len],Apply->[JoinString,Key],String->[Sprintf,IsGreedy],HasPrefix,FindAllStringSubmatch,Atoi,EqualFold] | Apply appends the field to the given map. | Also here we should do something safer to avoid panics if `v` is not a string. |
@@ -113,6 +113,7 @@ export class Cid {
* Cached base cid once read from storage to avoid repeated
* reads.
* @private {?Promise<string>}
+ * @restricted
*/
this.baseCid_ = null;
| [Cid->[constructor->[create],getExternalCid_->[setCidCookie,resolve,isProxyOrigin,getOrCreateCookie,cookieName,scope,getBaseCid,getProxySourceOrigin,OPT_OUT,parseUrl,cryptoFor],getOptedInScopes_->[getAttribute,hasAttribute,trim,split,indexOf,user,forEach],optOut->[optOutOfCid],get->[then,timerFor,isOptedOutOfCid,user,c... | A sequence of objects that represent a sequence of cids. | curious what does this `@restricted` annotation do |
@@ -3,15 +3,13 @@
module ModelExporters
class ExperimentExporter < ModelExporter
def initialize(experiment_id)
- @experiment = Experiment.find_by_id(experiment_id)
- raise StandardError, 'Can not load experiment' unless @experiment
-
- @assets_to_copy = []
+ super()
+ @experiment = Exp... | [ExperimentExporter->[step->[table,checklist,to_a,step_assets,step_comments,step_tables,assets,present?,push,map],protocol->[protocol_protocol_keywords,step,map],experiment->[my_module,my_module_groups,map],my_module->[protocol,my_module_repository_rows,user_my_modules,outputs,result,task_comments,my_module_tags,map],e... | Initialize the object. | We don't need to handle error anymore? |
@@ -699,7 +699,11 @@ void ClientInterface::UpdatePlayerList()
for (session_t i : clients) {
RemotePlayer *player = m_env->getPlayer(i);
- if (player == NULL)
+ if (!player)
+ continue;
+
+ PlayerSAO *sao = player->getPlayerSAO();
+ if (sao && sao->isHidden())
continue;
infostream << "* " ... | [markBlockposAsNotSent->[SetBlockNotSent],event->[notifyEvent,UpdatePlayerList],UpdatePlayerList->[getClientIDs],isUserLimitReached->[getClientIDs]] | This is called when a client is connected to a different server. | sorry but SAO has nothing to do with Player list. it's not responsibility of an AO property to update player list |
@@ -73,11 +73,9 @@ namespace System.Windows.Forms
}
/// <summary>
- /// Cache window DpiContext awareness information that helps to create handle with right context at the later time.
+ /// Cache window DpiContext awareness information that helps to create handle with right context at... | [NativeWindow->[AssignHandle->[AddWindowToTable,AssignHandle],WndProc->[DefWndProc],ReleaseHandle->[OnHandleChange,ReleaseHandle],CreateHandle->[CheckReleased]]] | Creates a static object that represents a window. Send a WM_NULL to the window if this is the last window in the window. | Why do we use windows version checks instead of APIHelper in GetThreadDpiAwarenessContext implementation? |
@@ -57,13 +57,16 @@ namespace System.Text.Json.SourceGeneration
/// <summary>
/// Type information for member types in input object graphs.
/// </summary>
- private readonly Dictionary<Type, TypeMetadata> _typeMetadataCache = new();
+ private readonly Diction... | [JsonSourceGenerator->[Parser->[PopulateKnownTypes->[PopulateNumberTypes]]]] | Replies the types of all member types in the object graph. Get the JSON serializable attribute. | This isn't a great coding pattern - setting a static variable here, and reading it in `TypeGenerationSpec`. It makes the code fragile because it always assumes this gets called first. Maybe a better solution would be to store these on properties of `SourceGenerationSpec`, like we do for `BooleanType` and `StringType`, ... |
@@ -333,6 +333,10 @@ void WieldMeshSceneNode::setItem(const ItemStack &item, Client *client)
setExtruded(tsrc->getTextureName(f.tiles[0].layers[0].texture_id),
def.wield_scale, tsrc,
f.tiles[0].layers[0].animation_frame_count);
+ } else if (f.drawtype == NDT_PLANTLIKE_WATER) {
+ setExtruded(tsrc->getTe... | [ISceneNode->[createCube],setExtruded->[create],setItem->[setCube,setExtruded],changeToMesh->[createCube],setCube->[createCube],getExtrudedMesh->[create],getItemMesh->[createCube]] | This method is called from the ItemStackManager when an item is added to a scene. private static final int NDT_NORMAL = 0 ; This method is called from the main thread. It is called from the main thread. | time to start to use a switch case |
@@ -347,9 +347,9 @@ namespace System.Runtime.InteropServices
private void SpaceCheck(byte* ptr, ulong sizeInBytes)
{
- if ((ulong)_numBytes < sizeInBytes)
+ if (_numBytes < sizeInBytes)
NotEnoughRoom();
- if ((ulong)(ptr - (byte*)handle) > ((ulong)_n... | [SafeBuffer->[Write->[DangerousRelease,NotInitialized,Unsafe,SpaceCheck,Memmove,DangerousAddRef],ReleasePointer->[NotInitialized,DangerousRelease],AcquirePointer->[NotInitialized,DangerousAddRef],SizeOf->[Unsafe,RuntimeHelpers,Argument_NeedStructWithNoRefs],WriteArray->[Argument_InvalidOffLen,ArgumentNull_Buffer,nameof... | check if the buffer is too small to hold a block of data. | Change the argument of this method to `nuint` as well? |
@@ -36,6 +36,9 @@ import {
} from './<%= entityFileName %>.reducer';
// tslint:disable-next-line:no-unused-variable
import { APP_DATE_FORMAT, APP_LOCAL_DATE_FORMAT } from 'app/config/constants';
+<%_ if (pagination !== 'no') { _%>
+import { ITEMS_PER_PAGE } from 'app/shared/util/pagination.constants';
+<%_ } _%>
... | [No CFG could be retrieved] | Imports a non - standard object into a standard object. The actual component that exports the state of the last known entity. | use inline template |
@@ -88,3 +88,15 @@ def _is_cloud_event(event):
return all([_ in event for _ in required]) and event['specversion'] == "1.0"
except TypeError:
return False
+
+def _eventgrid_event_options(event):
+ try:
+ exists = 'data' in event
+ data = event['data']
+ except TypeError:
+ ... | [generate_shared_access_signature->[quote,_get_full_topic_hostname,get,_generate_hmac,str,format],_get_topic_hostname_only_fqdn->[startswith,ValueError,endswith,replace],_is_cloud_event->[all],_get_full_topic_hostname->[startswith,ValueError,endswith,format],_generate_hmac->[encode,b64decode,b64encode,new],_get_authent... | Check if the event is a cloud event. | Nit: this name doesn't really describe what this does. Perhaps something like "_raise_on_invalid_eventgrid_event_data_type" but less obsessively verbose :P Also, while I'm making bikesheddy suggestions, the exist checks seem unnecessary? At the very least, exists is assumed to be true after the data = line in either br... |
@@ -43,9 +43,8 @@ class SearchControllerTest extends SuluTestCase
public function setUp(): void
{
- parent::setUp();
- $this->purgeDatabase();
$this->client = $this->createAuthenticatedClient();
+ $this->purgeDatabase();
$this->searchManager = $this->client->getContain... | [SearchControllerTest->[indexProducts->[index],testGetIndexes->[getContent,getResponse,request,assertHttpStatusCode,assertEquals],createUser->[setFirstName,flush,persist,setLocale,setSalt,setLastName,setContact,setPassword,setUsername],testSearch->[getContent,getResponse,request,assertHttpStatusCode,getId,assertEquals]... | Sets up all the necessary objects. | Can we just remove that? |
@@ -297,4 +297,14 @@ export class PlatformStore {
return localPlatform;
}
+
+ reportPlatformFailure_(serviceId) {
+ if (this.failedPlatforms_.indexOf(serviceId) === -1) {
+ this.failedPlatforms_.push(serviceId);
+ }
+
+ if (this.failedPlatforms_.length === this.serviceIds_.length) {
+ user... | [No CFG could be retrieved] | Returns the local platform. | jsdoc with `@param` |
@@ -479,9 +479,6 @@ class Addon(OnChangeMixin, ModelBase):
for preview in previews:
tasks.delete_preview_files.delay(preview)
- # Remove from search index.
- tasks.unindex_addons.delay([id])
-
return True
@classmethod
| [Category->[flush_urls->[get_url_path]],AddonUser->[flush_urls->[flush_urls]],watch_disabled->[Addon],AddonManager->[valid_q->[q],__init__->[__init__]],Addon->[increment_version->[save],__new__->[__new__],update_status->[update_version,logit],create_addon_from_upload_data->[initialize_addon_from_upload],transformer->[a... | Delete a object. Delete a object from the database. NULL - Check if missing missing node - add - on - add - on - add. | Since the code a few lines above just does a `self.update()`, which triggers a reindex, we just need to remove this in order for the deleted add-ons to be properly indexed. In fact before both tasks were triggered, which could lead to unexpected results... |
@@ -57,6 +57,7 @@ import java.util.Objects;
*/
public class TimeseriesQueryEngine
{
+ private final Supplier<QueryConfig> vectorizationConfigSupplier;
private final NonBlockingPool<ByteBuffer> bufferPool;
/**
| [TimeseriesQueryEngine->[process->[getVirtualColumns,getOnlyElement,getFilter,limit,convertToCNFFromQueryContext,SegmentMissingException,getGranularity,getLimit,canVectorize,isDescending,toFilter,processNonVectorized,processVectorized,shouldVectorize,getIntervals,allMatch],processNonVectorized->[singletonList,getVirtua... | Method to import a single - segment timeseries query engine. Returns the sequence of results for the given query. | Same, should be `queryConfigSupplier`. |
@@ -193,7 +193,7 @@ def read_file(filename: str, binary_mode: bool = False) -> Union[bytes, str]:
return content
-def safe_walk(path: str, **kwargs: Any) -> Iterator[Tuple[str, List[str], List[str]]]:
+def safe_walk(path: Union[bytes, str], **kwargs: Any) -> Iterator[Tuple[str, List[str], List[str]]]:
"""Ju... | [relativize_paths->[relativize_path],mergetree->[ExistingDirError,ExistingFileError,safe_mkdir,safe_walk],safe_mkdir_for_all->[safe_mkdir],relative_symlink->[safe_mkdir_for],rm_rf->[safe_delete],absolute_symlink->[safe_mkdir_for],safe_mkdir_for->[safe_mkdir],touch->[safe_open],safe_open->[safe_mkdir_for],safe_concurren... | Like os. walk but ensures that the return values are unicode objects. | This seems to be one of the only places where we represent a file path as `bytes`? |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.