patch stringlengths 18 160k | callgraph stringlengths 4 179k | summary stringlengths 4 947 | msg stringlengths 6 3.42k |
|---|---|---|---|
@@ -0,0 +1,10 @@
+class BaseComponent < ViewComponent::Base
+ class << self
+ def renders_script(script = self.name.underscore)
+ define_method 'render_in' do |view_context, &block|
+ view_context.javascript_packs_tag_once(script)
+ super(view_context, &block)
+ end
+ end
+ end
+end
| [No CFG could be retrieved] | No Summary Found. | WDYT about removing the default script name? I think it would be kinder to our future selves to trace if we saw `app/components/accordion_component.js` in component (or even just `accordion_component.js`) |
@@ -31,7 +31,7 @@ public class TestRubixConfig
assertRecordedDefaults(recordDefaults(RubixConfig.class)
.setBookKeeperServerPort(CacheConfig.DEFAULT_BOOKKEEPER_SERVER_PORT)
.setDataTransferServerPort(CacheConfig.DEFAULT_DATA_TRANSFER_SERVER_PORT)
- .setCacheLoca... | [TestRubixConfig->[testExplicitPropertyMappings->[build,setDataTransferServerPort,assertFullMapping],testDefaults->[setParallelWarmupEnabled,assertRecordedDefaults]]] | Test if missing defaults are set. | This looks strange. The field is `@NotNull`, but we're recording a null. |
@@ -567,6 +567,12 @@ namespace System.Net.Sockets
}
else
{
+ if (SocketsTelemetry.IsEnabled(EventLevel.Warning))
+ {
+ SocketsTelemetry.Log.ConnectCancelled();
+ SocketsTelemetry.Log.Co... | [SocketAsyncEventArgs->[FinishOperationAsyncFailure->[OnCompleted,FinishOperationSyncFailure],ExecutionCallback->[OnCompleted],FinishWrapperConnectSuccess->[SetResults,OnCompleted,Complete],FinishOperationAsyncSuccess->[FinishOperationSyncSuccess,OnCompleted],CancelConnectAsync->[Dispose],FinishOperationSyncSuccess->[S... | CancelConnectAsync - cancels the ConnectAsync if the current operation is in progress and the. | Seems like this should be on the same plan as ConnectFailed, with just one log at the call site. |
@@ -1,15 +1,15 @@
<% if ENV["BUFFER_ACCESS_TOKEN"].blank? %>
- <div class="alert alert-warning" role="alert">
+ <div class="crayons-notice crayons-notice--info mb-6" role="alert">
<p><strong>All references to "Buffering" are legacy and social media functionality is not currently operational.</strong></p>
<... | [No CFG could be retrieved] | Displays a list of all possible nagios that can be used to manage a single user nav - menu for the n - ary menu. | add a `role="alert"` here. I know it was missing in the original, but all the others have it. |
@@ -298,7 +298,7 @@ BOOTSTRAP3 = {
TEST_RUNNER = ''
-ALLOWED_HOSTS = get_list(os.environ.get('ALLOWED_HOSTS', 'localhost'))
+ALLOWED_HOSTS = ['*']
SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https')
| [get_list->[strip,split],get_host->[get_current],bool,literal_eval,parse,append,get_list,dirname,get,getenv,config,join,normpath] | Config for the order payment service. This function is a wrapper around the standard S3 storage. | This looks like local settings. |
@@ -72,7 +72,7 @@ class PythonBuildTest(unittest.TestCase):
client.save({CONANFILE: reuse}, clean_first=True)
client.run("install .")
- self.assertIn("Hello Bar", client.user_io.out)
+ self.assertNotIn("Hello Bar", client.user_io.out) # IMPORTANT!! WTF? Why this test was passing? Why ... | [PythonBuildTest->[errors_test->[TestClient,assertIn,str,join,run,remove,save],pythonpath_env_injection_test->[assertTrue,assertEquals,TestClient,len,temp_folder,assertRaises,run,join,env_dicts,normpath,save,loads,load],basic_install_test->[split,TestClient,assertEqual,str,startswith,run,save],upload_reuse_test->[split... | Test client reuse. | Why should it print "Hello Bar"? |
@@ -37,7 +37,9 @@ public class ContextPayload {
public static ContextPayload from(Context context) {
ContextPayload payload = new ContextPayload();
- tracer().inject(context, payload, SETTER);
+ GlobalOpenTelemetry.getPropagators()
+ .getTextMapPropagator()
+ .inject(context, payload, Cont... | [ContextPayload->[from->[ContextPayload],ExtractAdapter->[get->[get]],read->[ContextPayload]]] | Reads a payload from the given input object. | I think we should add `inject` method to `Instrumenter`. My problem with approach like this is that it is very easy to end up using different instances of `OpenTelemetry` . |
@@ -0,0 +1,4 @@
+<?php
+
+$version = snmp_get($device, 'infoMgmtFirmwareVersion.0', '-OQv', 'NEXANS-BM-MIB');
+$hardware = snmp_get($device, 'infoDescr.0', '-OQv', 'NEXANS-BM-MIB');
| [No CFG could be retrieved] | No Summary Found. | Could you convert these two in to a multi get to save an snmp call please? |
@@ -139,7 +139,7 @@ public class GroupByMergingQueryRunnerV2 implements QueryRunner<Row>
final File temporaryStorageDirectory = new File(
processingTmpDir,
- String.format("druid-groupBy-%s_%s", UUID.randomUUID(), query.getId())
+ StringUtils.safeFormat("druid-groupBy-%s_%s", UUID.randomUU... | [GroupByMergingQueryRunnerV2->[run->[cleanup->[close],make->[close->[close],close],run]]] | run a group by query with a specific context Get a sequence of rows from the mergeBufferPool. This method is called by the executor thread to get the iterator of the next segment. Close all resources. | Probably should crash if bad format string. |
@@ -523,7 +523,7 @@ async def find_binary(request: BinaryPathRequest) -> BinaryPaths:
f"""\
{shebang}
- set -euox pipefail
+ set -uox pipefail
if command -v which > /dev/null; then
command which -a $1 || true
| [BinaryPathRequest->[__init__->[SearchPath]],BashBinary->[SearchPath],remove_platform_information->[FallibleProcessResult],find_bash->[BinaryPathTest,BinaryPathRequest,BashBinary,BinaryNotFoundError],get_bash->[BashBinaryRequest],fallible_to_exec_result_or_raise->[ProcessResult,ProcessExecutionFailure],InteractiveProce... | Find a binary in the system. Get a bunch of dataclasses that match the specified . | I'm slow, which branch fails, and why does it fail - `-e` aside. IIUC `command` is a bash builtin and we guard with `|| true` in both branches... |
@@ -855,7 +855,7 @@ def version_factory(file_kw=None, **kw):
addon_type = getattr(kw.get('addon'), 'type', None)
min_app_version = kw.pop('min_app_version', '4.0.99')
max_app_version = kw.pop('max_app_version', '5.0.99')
- version_str = kw.pop('version', '%.1f' % random.uniform(0, 2))
+ version_str... | [version_factory->[file_factory,license_factory,_get_created],InitializeSessionMixin->[initialize_session->[initialize_session]],PatchMixin->[patch->[patch]],addon_factory->[_get_created],ESTestCaseWithAddons->[setUpTestData->[refresh]],ESTestCase->[setUpClass->[stop_es_mocks],empty_index->[refresh],setUp->[stop_es_moc... | Create a version object and return it. | Technically not required, but wanted more different version numbers (and avoid `0.0`). |
@@ -229,9 +229,10 @@ class Openmpi(AutotoolsPackage):
depends_on('hwloc +cuda', when='+cuda')
depends_on('java', when='+java')
depends_on('sqlite', when='+sqlite3@:1.11')
- depends_on('ucx', when='+ucx')
depends_on('zlib', when='@3.0.0:')
depends_on('valgrind~mpi', when='+memchecker')
+ d... | [Openmpi->[with_or_without_verbs->[_verbs_dir],with_or_without_mxm->[_mxm_dir],_verbs_dir]] | Adds a debug version of the memory checker support to the OpenMPI API. The library that can be used to find the library that is required for OpenMPi. | dependency when clause changed to reflect ucx moving to fabrics list |
@@ -0,0 +1,6 @@
+<?php
+
+$hardware = snmp_get($device, '.1.3.6.1.4.1.3808.1.1.3.1.5.0', '-Ovq');
+$hardware = str_replace('"', '', $hardware);
+$version = snmp_get($device, '.1.3.6.1.4.1.3808.1.1.3.1.3.0', '-Ovq');
+$version = str_replace('"', '', $version);
| [No CFG could be retrieved] | No Summary Found. | Should combine these into a multi get: `snmp_get_multi_oid` might work here. |
@@ -1430,8 +1430,9 @@ function createHttpBackendMock($rootScope, $timeout, $delegate, $browser) {
wasExpected = true;
}
- var i = -1, definition;
- while ((definition = definitions[++i])) {
+ var i = matchLatestDefinition ? definitions.length : -1, definition;
+
+ while ((definition = definiti... | [No CFG could be retrieved] | Check if the request matches the expected request. If it does it will be called. If This is a helper method to handle the case where a new backend definition is received. | This is dangerous stuff due to the subtle difference between prefix and postfix operators. But given that we were doing this already I guess it'll be fine. |
@@ -364,11 +364,15 @@ namespace Microsoft.Xna.Framework.Graphics
public static BlendingFactorSrc GetBlendFactorSrc (this Blend blend)
{
- switch (blend) {
+ switch (blend) {
+ case Blend.BlendFactor:
+ return BlendingFactorSrc.ConstantColor;
case Blend.DestinationAlpha:
re... | [GraphicsExtensions->[LogGLError->[CheckGLError]]] | Returns the name of the BlendingFactorSrc object with the name of the given blend. | Ugh... so `Blend.InverseBlendFactor` was falling thru to the `default` case? Maybe this is a good reason to make the `default` case throw an exception to avoid this sort of mistake in the future? |
@@ -304,6 +304,15 @@ func (c *ClusterUpConfig) Complete(f *osclientcmd.Factory, cmd *cobra.Command, o
c.dockerClient = client
taskPrinter.Success()
+ // Ensure that the OpenShift Docker image is available.
+ // If not present, pull it.
+ // We do this here because the image is used in the next step if running Red... | [determineAdditionalIPs->[OpenShiftHelper],ShouldInitializeData->[Clients],InstallWebConsole->[imageFormat,InstallWebConsole],determineIP->[OpenShiftHelper,DockerHelper],InstallRouter->[InstallRouter,imageFormat,GetDockerClient],CreateProject->[CreateProject],Clients->[Factory],RegisterTemplateServiceBroker->[RegisterT... | Complete is called when the CLI is complete This function checks whether the Docker host has right binaries to use Kubernetes or use a shared This method is called from the openshift start method to determine the primary server IP and additional. | This doesn't appear to be setting value sin the `Options` struct. Move it to the `Run`? |
@@ -399,7 +399,7 @@ class ClientRequest extends Writable {
this._urlLoader.on('redirect', (event, redirectInfo, headers) => {
const { statusCode, newMethod, newUrl } = redirectInfo
if (this._redirectPolicy === 'error') {
- this._die(new Error(`Attempted to redirect, but redirect policy was 'er... | [No CFG could be retrieved] | Listen for events from the URL loader. Redirects to the next URL. | this seems worse IMO |
@@ -309,8 +309,14 @@ namespace cryptonote
if (meta.upgrade_relay_method(tx_relay) || !existing_tx) // synchronize with embargo timer or stem/fluff out-of-order messages
{
+ using clock = std::chrono::system_clock;
+ auto last_relayed_time = std::numeric_limits<decltype(meta.last_re... | [No CFG could be retrieved] | The main entry point for the protocol. add a single key image tx to the block and add it to the blockchain. | Marked this change earlier with poor tabbing (which is now marked as resolved), and re-marking to highlight the somewhat complex rebase since earlier reviews. |
@@ -16,7 +16,7 @@ namespace System.Security.Cryptography
/// </summary>
internal static Interop.BCrypt.ECC_CURVE_ALG_ID_ENUM GetHashAlgorithmId(HashAlgorithmName? name)
{
- if (name.HasValue == false || string.IsNullOrEmpty(name!.Value.Name))
+ if (name is null || string... | [ECCng->[GetHashAlgorithmName->[Name,FindAlgIdOidInfo,AlgId],IsECNamedCurve->[ECDH,ECDsa],GetHashAlgorithmId->[Cryptography_UnknownHashAlgorithm,BCRYPT_NO_CURVE_GENERATION_ALG_ID,Name,IsNullOrEmpty,HasValue,CRYPT_OID_INFO_NAME_KEY,HashAlgorithm,AlgId,FindOidInfo],SpecialNistAlgorithmToCurveName->[ECDHP256,ECDHP521,ECDs... | Get the hash algorithm ID. | Are you sure with this change `HashAlgorithmName` is struct wouldn't be null |
@@ -105,11 +105,14 @@ func NewRunner(cfg RunnerConfig) (*Runner, error) {
Address: cfg.prometheusAddr,
}
if cfg.userID != "" {
- apiCfg.RoundTripper = promhttp.RoundTripperFunc(func(req *http.Request) (*http.Response, error) {
- user.InjectOrgIDIntoHTTPRequest(user.InjectOrgID(context.Background(), cfg.userID... | [timeEpsilonCorrect->[Add],verifyLoop->[Stop],Collect->[Collect],Describe->[Describe],runRandomTest->[Add]] | NewRunner creates a Runner that runs a bunch of test cases periodically checking their value. Register a new test case. | Why the change here? Seems like it's just another wrapper but I don't think anything changed to make it needed? |
@@ -206,6 +206,7 @@ static size_t seed_get_seed(void *vseed, unsigned char **pout,
adin, adin_len) != 0)
return bytes_needed;
OPENSSL_secure_clear_free(p, bytes_needed);
+ *pout = NULL;
return 0;
}
| [No CFG could be retrieved] | This function is a wrapper around the OpenSSL_secure_clear_free function. missing - unused - vctx. | Would it be better to only set `pout` in the case the call to `seed_src_generate` succeeds? |
@@ -28,4 +28,5 @@ type Config struct {
func (c *Config) InitDefaults() {
c.SyncPeriod = 10 * time.Minute
c.CleanupTimeout = 60 * time.Second
+ c.Scope = "cluster"
}
| [No CFG could be retrieved] | InitDefaults initializes the default values for the config. | Good catch! I think this should actually default to `node`? |
@@ -266,12 +266,12 @@ public class HelpDialog {
}
private void sendReport(AnkiActivity activity) {
- if (lastClickStamp == null || currentTimestamp - lastClickStamp > minIntervalMS) {
+ if (lastClickTimeStamp == null || currentTimestamp - lastClickTimeStamp > minIntervalMS) {
... | [HelpDialog->[LinkItem->[createFromParcel->[LinkItem],writeToParcel->[writeToParcel]],ExceptionReportItem->[createFromParcel->[ExceptionReportItem]],createInstance->[createInstance],RateAppItem->[createFromParcel->[RateAppItem]],FunctionItem->[createFromParcel->[FunctionItem],writeToParcel->[writeToParcel]]]] | Send report to the user if the last click time is greater than minIntervalMS. | You're not setting `lastClickTimeStamp` any more - this removes rate limiting on the dialog |
@@ -16,11 +16,11 @@
// Project includes
#include "custom_elements/empirical_spring.hpp"
-#include "includes/define.h"
#include "structural_mechanics_application_variables.h"
#include "cable_net_application_variables.h"
#include "includes/checks.h"
#include "custom_utilities/structural_mechanics_element_utilitie... | [No CFG could be retrieved] | Creates an element from a 3D - based polynomial. - - - - - - - - - - - - - - - - - -. | @KlausBSautter this is one example why CableNet needs to link against Structural |
@@ -562,8 +562,8 @@ def _prepare_mne_browse_epochs(params, projs, n_channels, n_epochs, scalings,
types += [t] * len(inds[-1])
pick_kwargs = dict(meg=False, ref_meg=False, exclude=[])
if order is None:
- order = ['eeg', 'eog', 'ecg', 'emg', 'ref_meg', 'stim', 'resp', 'misc',
- ... | [_plot_onkey->[_plot_traces,_plot_window],_mouse_click->[plot_epochs_image,_pick_bad_epochs,_plot_window],_toggle_labels->[_plot_vert_lines],_epochs_navigation_onclick->[_draw_epochs_axes]] | Helper for setting up the mne_browse_epochs window. Display a series of n_epochs n_channels n_epochs and n_picks Populate vertical scrollbars and horizontal lines for missing block - unknown colors. Add limits to the nanoseconds axis. | cc @choldgraf you will want to work off of a fresh `master` after I merge this because there are more instances of `seeg` in here |
@@ -643,12 +643,7 @@ size_t queuedStatuses() {
return BufferedLogSink::get().dump().size();
}
-size_t queuedSenders() {
- ReadLock lock(kBufferedLogSinkSenders);
- return BufferedLogSink::get().senders.size();
-}
-
-void relayStatusLogs(bool async) {
+void relayStatusLogs() {
if (FLAGS_disable_logging || !Da... | [No CFG could be retrieved] | Get the status of the query log item. This function is called by the auto - log framework to dump all the status logs. | This code is now not properly indented. |
@@ -26,7 +26,9 @@ if (!sendgridFromEmail) {
process.exit(1)
}
-const unlockDate = moment.utc('2020-01-01')
+const unlockDate = process.env.UNLOCK_DATE
+ ? moment.utc(process.env.UNLOCK_DATE)
+ : moment.utc('2020-01-01')
module.exports = {
encryptionSecret,
| [No CFG could be retrieved] | Private functions - exported for testing. | Wonder if it's dangerous to have a default in case we somehow misconfigure EnvKey. Should we rather crash if UNLOCK_DATE is not defined ? |
@@ -58,10 +58,15 @@ class Jetpack_Media_Summary {
foreach ( $extract['shortcode'] as $type => $data ) {
switch ( $type ) {
case 'wpvideo':
- if ( 0 == $return['count']['video'] ) {
+ if ( 0 == $return['count']['video'] ){
+ if ( ! class_exists( 'VideoPress_Video' ) ) {
+ require_on... | [No CFG could be retrieved] | Get a single post This function extracts media from a post. This function is intend to extract the video from the vimeo post. This function is used to generate the secure image for a given embed. This function is used to extract the video from the post. | We need to change this to the mp4 as well, ensuring the scheme is set to https. Same for the following line. |
@@ -141,6 +141,7 @@ namespace System.IO
}
}
+
private void EnsureDataInitialized()
{
if (_dataInitialized == -1)
| [No CFG could be retrieved] | region Public API. | Extra new line? |
@@ -515,8 +515,10 @@ static int dt_gradient_get_points(dt_develop_t *dev, float x, float y, float rot
*points = NULL;
*points_count = 0;
+ dt_pthread_mutex_lock(&dev->preview_pipe_mutex);
const float wd = dev->preview_pipe->iwidth;
const float ht = dev->preview_pipe->iheight;
+ dt_pthread_mutex_unlock(&... | [void->[cairo_rectangle,cairo_set_line_width,g_list_nth_data,cairo_move_to,cairo_line_to,cairo_set_source_rgba,cairo_arc,sin,cairo_stroke,cairo_set_dash,isinf,cairo_fill_preserve,cos,atan2,_gradient_point_transform,cairo_stroke_preserve],int->[g_list_remove,dt_masks_set_edit_mode,g_list_next,dt_dev_distort_backtransfor... | This function calculates the gradient of a point in the image. region ICSB - Montgomery takes in a 2D array of points and distance from the center of the line and. | yeah all that input width access with a mutex seems like overkill to me. it's really just the size of the according MIPF (see develop.c:222 dt_dev_pixelpipe_set_input) and only changes when changing images via exit/enter dr mode or spacebar/filmstrip. about these widths/heights (backbuf same as input) i'm not all that ... |
@@ -129,10 +129,7 @@ public class ReverseBuildTriggerTest {
r.waitUntilNoActivity();
assertEquals(1, downstream.getLastBuild().number);
// Alice can see upstream, so downstream gets built, but the upstream build cannot see downstream:
- perms = new HashMap<Permission,Set<String>>();
- ... | [ReverseBuildTriggerTest->[nullJobInTriggerNotCausesNPE->[configRoundtrip],configRoundtrip->[configRoundtrip]]] | Example of how to run upstream project security. This method is called when a build is not running. It is called when the upstream build This method checks if upstream build is permitted to report on downstream. | `bob` already had it so would suffice to only add the grant for `alice`, but this is fine too. |
@@ -257,11 +257,11 @@ class FreqtradeBot(object):
if avaliable_amount < stake_amount:
raise DependencyException(
'Available balance(%f %s) is lower than stake amount(%f %s)' % (
- avaliable_amount, self.config['stake_currency'],
- stake_amount... | [FreqtradeBot->[execute_buy->[get_target_bid,_get_min_pair_stake_amount],cleanup->[cleanup],process_maybe_execute_buy->[create_trade],create_trade->[_get_trade_stake_amount]]] | Get the stake amount for a trade. Get the percent of reserve for a given node. | isn't `get_balance` returning a float anyway ... )(and `stake_amount` should be float too? |
@@ -2493,6 +2493,7 @@ def reduce_variance(input_tensor, axis=None, keepdims=False, name=None):
@end_compatibility
"""
name = name if name else "reduce_variance"
+ input_tensor = ops.convert_to_tensor(input_tensor)
with ops.name_scope(name):
means = reduce_mean(input_tensor, axis=axis, keepdims=True)
... | [reduce_max->[_ReductionDims],truediv->[_truediv_python3],maybe_promote_tensors->[_promote_or_cast->[cast],_maybe_get_dtype,_promote_or_cast],reduce_sum_with_dims->[_may_reduce_to_scalar],tensor_not_equals->[maybe_promote_tensors,not_equal],tensordot->[_tensordot_axes->[range],_tensordot_reshape->[range,reduce_prod],ma... | Computes the variance of elements across the dimensions of a tensor along the specified dimensions. reduce_variance reduce_mean reduce_variance or reduce_sqrt. | It's probably better to put this line inside the scope of the `with ops.name_scope(name)`. (I.e., move it down one line.) That way, if you're inspecting the graph produced by this op, it will be clear that the conversion was done as part of the reduce_variance op. |
@@ -46,6 +46,9 @@ def assert_url_match(expected_url, url_name, *args, **kwargs):
class TestDjangoPluginsUrls(unittest.TestCase):
+ """
+ Test url matching for plugins urls.
+ """
def test_match_distributor_resource_view(self):
pass
| [TestDjangoRepositoriesUrls->[test_match_repositories_resource_sync->[assert_url_match]],TestDjangoTasksUrls->[test_match_tasks_url->[assert_url_match]]] | Decorator to provide a test method for creating a resource match distributor. | Consider using a single big class for all URLs tests. 1 test per url would be 102 methods on the class. I think having all of those tests in one place is better than spreading them out everywhere. @asmacdo @mhrivnak What do you think? |
@@ -0,0 +1,2 @@
+def template_main():
+ print("Call your main application code here")
| [No CFG could be retrieved] | No Summary Found. | I would be cautious about using the work "application" in a template about SDK |
@@ -1680,6 +1680,7 @@ def plot_source_estimates(stc, subject=None, surface='inflated', hemi='lh',
time_label, times = _handle_time(time_label, time_unit, stc.times)
# convert control points to locations in colormap
+ user_colormap = colormap # save the original colormap
colormap, scale_pts, divergi... | [_plot_mpl_stc->[_handle_time,_limits_to_control_points,_smooth_plot],plot_vector_source_estimates->[_handle_time,_limits_to_control_points,_get_ps_kwargs],plot_source_estimates->[_plot_mpl_stc,_limits_to_control_points,_handle_time],_smooth_plot->[_set_aspect_equal],_sensor_shape->[_make_tris_fan],plot_alignment->[_fi... | Plots a series of source estimates with a single HMM. Displays a curvature window in the Maviscatter figure. Plots a single for all points. Add a single to the system. Missing block element. | I thought that moving this line down *below* the call to `_limits_to_control_points` would fix the colormap-switching behavior, but it didn't (it did the weird positive-only limits for `mne` colormap` behavior). I can live with the current iteration, then |
@@ -503,7 +503,10 @@ class Feed
$items[] = $item;
break;
} elseif (!Item::isValid($item)) {
- Logger::info('Feed is invalid', ['created' => $item['created'], 'uid' => $item['uid'], 'uri' => $item['uri']]);
+ Logger::info('Feed item is invalid', ['created' => $item['created'], 'uid' => $item['uid'], ... | [Feed->[addAuthor->[createElement],atom->[saveXML,set,get,appendChild],addHeader->[t,createElementNS,get,appendChild],getPollInterval->[get],import->[query,getHostname,get,registerNamespace,loadXML,finalUrl,item]]] | Imports an Atom RSS feed into a contact. This function extracts the author - name author - link author - avatar author - name author - This function extracts the first node of the XML document that is an author of the feed. | If this is only used here, please move the method to this file. |
@@ -45,6 +45,13 @@ public class WsParameterBuilder {
.setPossibleValues(getRootQualifiers(context.getResourceTypes()));
}
+ public static WebService.NewParam createRootQualifiersParameter(WebService.NewAction action, QualifierParameterContext context) {
+ return action.createParam(PARAM_QUALIFIERS)
+ ... | [WsParameterBuilder->[QualifierParameterContext->[newQualifierParameterContext->[QualifierParameterContext]],buildAllQualifiersDescription->[getAllQualifiers],buildRootQualifiersDescription->[getRootQualifiers],buildDefaultTemplateQualifiersDescription->[getDefaultTemplateQualifiers]]] | Creates a new parameter that filters the results with the specified root qualifier. | As discussed, it would have been best to refactor WsParameterBuilder.java to use injection for I18n and ResourceTypes resourceTypes instead of using this strange context object. |
@@ -3324,8 +3324,13 @@ class SemanticAnalyzer(NodeVisitor):
message += ' {}'.format(extra)
self.fail(message, ctx)
- def name_already_defined(self, name: str, ctx: Context) -> None:
- self.fail("Name '{}' already defined".format(name), ctx)
+ def name_already_defined(self, name: str... | [SemanticAnalyzer->[analyze_comp_for->[analyze_lvalue],build_newtype_typeinfo->[named_type],refresh_class_def->[refresh_class_def],check_classvar->[is_self_member_ref],visit_lambda_expr->[analyze_function],build_typeddict_typeinfo->[basic_new_typeinfo,str_type,object_type,named_type_or_none],visit_for_stmt->[fail_inval... | Check that a name is not defined. | Can you make this "on line {}" ? |
@@ -126,6 +126,16 @@ class CryptographyClient(KeyVaultClientBase):
"""
return self._key_id.source_id
+ @classmethod
+ def from_jkw(cls, key_id, jwk):
+ # type: (str, dict) -> CryptographyClient
+ """Creates a client that can only perform cryptographic operations locally.
+
+ ... | [CryptographyClient->[unwrap_key->[_initialize,unwrap_key],decrypt->[_initialize,decrypt,_validate_arguments],verify->[_initialize,verify],sign->[_initialize,sign],encrypt->[_initialize,_validate_arguments,encrypt],wrap_key->[_initialize,wrap_key]]] | The full identifier of the client s key. | Since key material is required to create a local-only client, this is theoretically redundant since self._key shouldn't be None. A user _could_ set self._key = None though, so I added this check just in case. It doesn't always make sense to account for the various ways users could interfere with the class though, so ar... |
@@ -1326,8 +1326,9 @@ namespace Microsoft.Xna.Framework.Graphics
/// <param name="startIndex">The index within the index buffer to start drawing from.</param>
/// <param name="primitiveCount">The number of primitives in a single instance.</param>
/// <param name="instanceCount">The number of ... | [GraphicsDevice->[Reset->[PlatformReset,Reset],DrawUserPrimitives->[DrawUserPrimitives],SetVertexBuffers->[Clear],DrawInstancedPrimitives->[DrawInstancedPrimitives],DrawIndexedPrimitives->[DrawIndexedPrimitives],ApplyRenderTargets->[Clear],Dispose->[Clear,Dispose],GetBackBufferData->[GetBackBufferData],SetVertexBuffer-... | Draws an array of instances of the specified primitive type. | This one change the signature of DrawInstancedPrimitives(). It's an API change and will break existing code. The new functionality should be implemented as a new method. |
@@ -95,3 +95,13 @@ def test_commit_pipeline_stage(tmp_dir, dvc, run_copy):
assert dvc.commit(f":{stage.addressing}") == [stage]
assert dvc.commit(f"{PIPELINE_FILE}:{stage.addressing}") == [stage]
assert dvc.commit(PIPELINE_FILE) == [stage]
+
+
+def test_imported_entries_unchanged(tmp_dir, dvc, erepo_dir)... | [test_commit_with_deps->[len,outs,gen,add,run_copy,commit],test_commit_recursive->[status,len,gen,add,commit],test_commit_no_exec->[commit,run,status,gen],test_commit_changed_md5->[gen,add,raises,commit,dump_yaml,load_yaml],test_commit_pipeline_stage->[run_copy,commit,status,gen],test_commit_force->[status,outs,gen,add... | Test that pipeline stage is committed. | Won't it show up on `dvc.status`? |
@@ -290,6 +290,11 @@ public class HoodieWriteConfig extends HoodieConfig {
.defaultValue(ExternalSpillableMap.DiskMapType.BITCASK)
.withDocumentation("Enable usage of either BITCASK or ROCKS_DB as disk map for External Spillable Map");
+ public static final ConfigProperty<Boolean> DISK_MAP_BITCASK_COMP... | [HoodieWriteConfig->[Builder->[setDefaults->[setDefaults],build->[HoodieWriteConfig,validate,setDefaults],HoodieWriteConfig],isClusteringEnabled->[isAsyncClusteringEnabled,inlineClusteringEnabled],inlineTableServices->[isAutoClean,inlineCompactionEnabled,inlineClusteringEnabled],getWriteSchema->[getSchema],getFileListi... | This method is used to set various configuration properties for the Hotie object. Metadata key prefixes. | sorry, may I know why the property name does not have "compression"? I was expecting something like "hoodie.diskmap.bitcask.compression.enabled" |
@@ -46,6 +46,11 @@ class ApplicationController < ActionController::Base # rubocop:disable Metrics/C
private
+ def disable_caching
+ response.headers['Cache-Control'] = 'no-store'
+ response.headers['Pragma'] = 'no-cache'
+ end
+
def redirect_on_timeout
params = request.query_parameters
retur... | [ApplicationController->[confirm_two_factor_authenticated->[user_fully_authenticated?],user_fully_authenticated?->[reauthn?]]] | Redirect to SP if the user has not specified a lease. | Do we also need to set `Expires` header to a value long in the past? |
@@ -2980,7 +2980,7 @@ void Sedp::Writer::send_sample(const ACE_Message_Block& data,
}
DDS::ReturnCode_t
-Sedp::Writer::write_parameter_list(const ParameterList& plist,
+Sedp::SedpWriter::write_parameter_list(const ParameterList& plist,
const RepoId& reader,
... | [No CFG could be retrieved] | This function is called when a control message is received from the DCPS. Reads and writes a single participant message block. | Please fix the indentation here and in the signatures functions below. |
@@ -162,7 +162,7 @@ type Backend interface {
RenameStack(ctx context.Context, stack Stack, newName tokens.QName) (StackReference, error)
// Preview shows what would be updated given the current workspace's contents.
- Preview(ctx context.Context, stack Stack, op UpdateOperation) (engine.ResourceChanges, result.Re... | [GetStackResourceOutputs->[ParseStackReference,NewObjectProperty,PropertyKey,Errorf,Snapshot,NewStringProperty,GetStack],GetStackOutputs->[ParseStackReference,GetRootStackResource,Wrap,Errorf,Snapshot,GetStack],Error->[Sprintf,Replace],New] | ParsePolicyPackReference parses a string like myOrg and mySecurityRules into a PolicyPack. | This code structure is a tad confusing to me. Backend says it's an interface for `pluggable backend implementations of the Pulumi Cloud Service.` but it's not just storage functionality that's in the interface it's the engine functionality? And an implementation of this interface wraps the engine? Interesting. |
@@ -54,6 +54,7 @@ func NewResourceManagerCommand() *cobra.Command {
tokenInvalidatorControllerOpts := &tokeninvalidatorcontroller.ControllerOptions{}
tokenRequestorControllerOpts := &tokenrequestorcontroller.ControllerOptions{}
rootCAControllerOpts := &rootcacontroller.ControllerOptions{}
+ projectedTokenMountOpt... | [Context,AddAllFlags,AddFlags,Apply,Info,Add,Done,New,Start,CompleteAll,Errorf,Wait,ApplyDefaultClusterId,Get,PrintAndExitIfRequested,AddAllToManager,Completed,ApplyClassFilter,Sprintf,WithCancel,ApplyManagerOptions,VisitAll,ApplyClientSet,Flags] | NewResourceManagerCommand creates a new command that runs gardener - resource - manager. CompleteAll completes all flags that are specified in the command line. | include `webhook` to follow the pattern? |
@@ -1597,7 +1597,7 @@ def compute_whitener(noise_cov, info, picks=None, rank=None,
if picks is None:
# If this changes, we will need to change _setup_plot_projector, too:
picks = pick_types(info, meg=True, eeg=True, ref_meg=False,
- exclude='bads')
+ ... | [_undo_scaling_array->[_apply_scaling_array,_invert_scalings],regularize->[copy],_ShrunkCovariance->[score->[get_precision],fit->[fit],get_precision->[get_precision]],compute_whitener->[_get_whitener],_undo_scaling_cov->[_apply_scaling_cov,_invert_scalings],make_ad_hoc_cov->[Covariance],Covariance->[__iadd__->[_check_c... | Compute the whitener of a given noise covariance matrix. Returns the channel names and the missing channels in the noise covariance matrix. | ecog, hbo, hbr? Hopefully now this can just be `_pick_data_channels` or whatever that private function is called |
@@ -24,8 +24,11 @@ describe Jobs::Tl3Promotions do
run_job
end
- it "promotes a qualifying tl2 user who has a group_locked_trust_level" do
- _group_locked_user = Fabricate(:user, trust_level: TrustLevel[2], group_locked_trust_level: TrustLevel[1])
+ it "promotes a qualifying tl2 user who has a group_gran... | [create_leader_user->[returns,to,eq],create_qualifying_stats->[nil?,create_user_stat,update_attributes!],context,to,describe,once,before,tl3_promotion_min_duration,freeze_time,returns,ago,eq,subject,create_qualifying_stats,never,it,require,execute] | adds stats for all tl3 user that qualifies for tl2 user who has a group tl3 user who doesn t qualify for tl3 anymore. | I think we don't need to use an undescore before the variable name here since we're using the variable. |
@@ -216,6 +216,13 @@ class StateChangeLog(object):
for res in self.storage.get_all_state_changes()
]
+ def get_all_state_events(self):
+ """ Returns a list of tuples of event id, state_change_id and events"""
+ return [
+ (res[0], res[1], self.serializer.deserialize(r... | [StateChangeLog->[get_all_state_changes->[get_all_state_changes,deserialize],last_identifier->[last_identifier],__init__->[PickleTransactionSerializer],get_transaction_by_id->[get_transaction_by_id,deserialize],snapshot->[serialize,last_identifier,write_state_snapshot],log->[serialize,write_transaction]]] | Returns a list of tuples of identifiers and state changes. | This interface is using the underlying `get_all_state_events`, this can potentially load too many objects in memory. |
@@ -544,12 +544,14 @@ int SocketConnect(const char *host, const char *port,
bool TryConnect(int sd, unsigned long timeout_ms,
const struct sockaddr *sa, socklen_t sa_len)
{
+ assert(sd != -1);
assert(sa != NULL);
if (sd >= FD_SETSIZE)
{
- Log(LOG_LEVEL_ERR, "Open connection... | [ReceiveTransaction->[sscanf,UnexpectedError,TLSRecv,LogRaw,ProgrammingError,RecvSocketStream,Log],SetReceiveTimeout->[assert,Log,setsockopt],SendTransaction->[memcpy,UnexpectedError,SendSocketStream,TLSSend,strlen,LogRaw,snprintf,Log,assert],SocketConnect->[getnameinfo,GetErrorStr,bind,gai_strerror,Log,cf_closesocket,... | TryConnect attempts to connect to the specified server. If successful it returns true. If successful Check if connection succeeded and return to blocking mode. | @nickanderson these logs will help debugging the FD_SETSIZE issue we've hit on windows. You might want to grab a latest windows build from jenkins after this is merged, and give it to the customer - that is if he still sees the error. |
@@ -1478,6 +1478,11 @@ Full traceback:
return User.objects.filter(pk__in=list(top_creator_ids))
+@receiver(render_done)
+def purge_wiki_url_cache(sender, instance, **kwargs):
+ memcache.delete(u'wiki_url:%s:%s' % (instance.locale, instance.slug))
+
+
class DocumentDeletionLog(models.Model):
"""
... | [Revision->[clean->[_based_on_is_clean],_based_on_is_clean->[current_or_latest_revision],save->[_based_on_is_clean],make_current->[save]],DocumentZone->[save->[delete],__unicode__->[get_absolute_url]],Document->[_get_new_parent->[valid_slug_parent],extract_code_sample->[extract_code_sample,get_rendered],_raise_if_colli... | Returns a list of objects with the fields that have been voted for this document. Model object declaring a content zone root at a given Document provides the attributes inherited by. | Would it make sense to set the cache here instead of just deleting it? This works but I'm just curious. |
@@ -154,7 +154,6 @@ public class ZeppelinServer extends ResourceConfig {
public static void main(String[] args) throws InterruptedException, IOException {
ZeppelinServer.conf = ZeppelinConfiguration.create();
- conf.setProperty("args", args);
jettyWebServer = setupJettyServer(conf);
initMetrics... | [ZeppelinServer->[runNoteOnStart->[shutdown],setupServlet->[getResource->[getResource]],initWebApp->[setupPrometheusContextHandler,setupHealthCheckContextHandler,setupNotebookServer,setupRestApiContextHandler]]] | Main method for ZeppelinServer. This method is called by the framework when it is started. This method is called when zeppelin is started. This method is called when ZeppelinServer is not available. | @zjffdu I think that this line has no effect. Is this correct? |
@@ -261,6 +261,7 @@ func fatal(tb testing.TB, userMsgAndArgs []interface{}, msgFmt string, msgArgs .
tb.Helper()
logMessage(tb, userMsgAndArgs)
_, file, line, ok := runtime.Caller(2)
+ debug.PrintStack()
if ok {
tb.Logf("%s:%d", file, line)
}
| [Index,ShorthandInput,DeepEqual,ValueOf,Compile,Error,MatchString,IsNil,Errorf,Len,After,Type,Logf,Caller,Fatalf,Kind,Elem,String,Interface,Helper] | fatal logs a message and exits with a fatal error. | This seems like a nice change, do you think it makes sense to not log the file and line redundantly below? |
@@ -58,13 +58,15 @@ export function selectParticipant() {
export function selectParticipantInLargeVideo() {
return (dispatch: Dispatch<any>, getState: Function) => {
const state = getState();
- const participantId = _electParticipantInLargeVideo(state);
+ const { participantId, isFakePartic... | [No CFG could be retrieved] | Select a participant in LargeVideo based on a variety of factors. Find the last visible remote video track. | why do we need to pass this around? After selecting the large video participant we can check if that participant is a fake one without having to pass that boolean around. |
@@ -147,7 +147,7 @@ public class RemoteFileOutboundGatewayTests {
public void testMGetWildFullPath() throws Exception {
testMGetWildGuts("testremote/f1", "testremote/f2");
}
-
+
private void testMGetWildGuts(final String path1, final String path2) {
SessionFactory sessionFactory = mock(SessionFactory.class... | [TestPatternFilter->[getFilename->[getFilename]],RemoteFileOutboundGatewayTests->[testLs_f_R->[level3List,level2List,level1List],testMGetEmpty->[read->[write]],testMoveWithExpression->[rename],testLs_1_a_f_dirs_links->[fileList],testRm->[remove],testLs_f_R_dirs->[level3List,level2List,level1List],testMoveWithMkDirs->[m... | This test method creates a mock session with a mget command. This method is used to list the names of the files in the remote server. | Please configure STS to remove trailing white space. Will fix during merge. |
@@ -126,9 +126,8 @@ def test_channel_update_mutation_with_invalid_slug(
content = get_graphql_content(response)
# then
- error = content["data"]["channelUpdate"]["channelErrors"][0]
- assert error["field"] == "slug"
- assert error["code"] == ChannelErrorCode.INVALID.name
+ channel_data = content... | [test_channel_update_mutation_as_app->[refresh_from_db,post_graphql,to_global_id,get_graphql_content],test_channel_update_mutation_with_invalid_slug->[post_graphql,to_global_id,get_graphql_content],test_channel_update_mutation_with_duplicated_slug->[post_graphql,to_global_id,get_graphql_content],test_channel_update_mut... | This function checks if a channel update mutation with invalid slug is valid. | We should rename this test. |
@@ -878,9 +878,12 @@ public class FileWritingMessageHandler extends AbstractReplyProducingMessageHand
private volatile long lastWrite;
+ private volatile long lastFlush;
+
FileState(BufferedWriter writer) {
this.writer = writer;
this.stream = null;
+ this.lastFlush = System.currentTimeMillis();
... | [FileWritingMessageHandler->[FileState->[close->[close]],Flusher->[run->[close]],setTaskScheduler->[setTaskScheduler],evaluateDestinationDirectoryExpression->[validateDestinationDirectory]]] | Method flushIfNeeded. This method returns Long. MAX_VALUE if there are no files to flush. | `lastFlush` is never updated. Am I missing something? Also I wonder if we should update `MessageFlushPredicate.shouldFlush()` for this new `lastFlush` argument as well. |
@@ -976,7 +976,9 @@ class CI_Loader {
if ($subdir == '')
{
$path = strtolower($class).'/'.$class;
- return $this->_ci_load_class($path, $params);
+ // only do this recursive, it's not this functions input.
+ if ($class_param != $path)
+ return $this->_ci_load_class($path, $params);
}
// If we... | [CI_Loader->[dbutil->[database],_ci_load_class->[_ci_load_class],library->[library],dbforge->[database],_ci_autoloader->[model,database,library,add_package_path],model->[model],helpers->[helper],driver->[library]]] | Load a class from the library This function will load the object if it is not already loaded. This function is called from the load function of the class. It is called by the load. | Can you make sure you are using { and } on new lines to follow the existing style of code? |
@@ -50,6 +50,11 @@ type Info struct {
} `json:"version"`
}
+// GetVersion returns a Version object of the Elasticsearch version
+func (info *Info) GetVersion() (*common.Version, error) {
+ return common.NewVersion(info.Version.Number)
+}
+
// NodeInfo struct cotains data about the node.
type NodeInfo struct {
... | [set->[Lock,Unlock,Now],get->[Since,Lock,Unlock],FetchContent,HasKey,Join,MapStr,get,Unmarshal,DeepUpdate,Wrap,String,Parse,Errorf,set,SetURI,GetValue,MakeErrorForMissingField,Put] | Info construct contains the data about the node in the cluster. GetClusterID fetches the cluster id for a given nodeID. | Could we unmarshall directly to `common.Version` so version format is validated when read instead of every time we get it? |
@@ -4,10 +4,12 @@ namespace Content.Server.Roles
{
public class RoleEvent : EntityEventArgs
{
+ public readonly Mind.Mind Mind;
public readonly Role Role;
- public RoleEvent(Role role)
+ public RoleEvent(Mind.Mind mind, Role role)
{
+ Mind = mind;
... | [No CFG could be retrieved] | EntityEventArgs - RoleEvent. | Roles already have access to the mind they are assigned to. |
@@ -81,6 +81,12 @@ class Plugin:
def get_method_hook(self, fullname: str) -> Optional[MethodHook]:
return None
+ def get_attribute_hook(self, fullname: str) -> Optional[AttributeHook]:
+ return None
+
+ def get_type_analyze_hook(self, fullname: str) -> Optional[TypeAnalyzeHook]:
+ re... | [ChainedPlugin->[get_method_hook->[get_method_hook],get_function_hook->[get_function_hook],get_method_signature_hook->[get_method_signature_hook]]] | Get the method hook for the given fullname. | I'm not sure I like the proliferation of different callback types. Even though these can be statically checked, it seems a pain for users to keep them apart. (Plus, how easy is it really for users to type-check their plugins? There are no stubs for mypy.) |
@@ -155,6 +155,12 @@ func (node *Node) Beaconchain() *core.BlockChain {
if err != nil {
utils.Logger().Error().Err(err).Msg("cannot get beaconchain")
}
+ // only available in validator node and shard 1-3
+ isEnablePruneBeaconChain := node.HarmonyConfig != nil && node.HarmonyConfig.General.EnablePruneBeaconChain
... | [AddPendingTransaction->[tryBroadcast,addPendingTransactions],ShutDown->[Blockchain,StopPubSub,Beaconchain],InitConsensusWithValidators->[Blockchain],addPendingTransactions->[Blockchain],StartPubSub->[validateNodeMessage,validateShardBoundMessage],GetAddresses->[populateSelfAddresses],AddPendingReceipts->[Blockchain],a... | Beaconchain returns the beacon chain for the given shard. | If user set prune=true, and the system overwrite user's decision, we may print some message in console to alert user that the prune is not enabled. |
@@ -52,11 +52,13 @@ func NewHarvester(
}
h := &Harvester{
+ Id: uuid.NewV4(), // Unique identifier of each harvester
Path: path,
Config: cfg,
Stat: stat,
SpoolerChan: spooler,
encoding: encoding,
+ done: make(chan struct{}),
}
h.ExcludeLinesRegexp, err = ... | [Start->[Harvest],FindEncoding,Errorf] | NewHarvester creates a new Harvester object. | why is a random harvester ID required? |
@@ -34,12 +34,11 @@ public interface HttpClient {
* <p>
* This is useful when it doesn't matter about the response as you'll perform no action based on the response.
*
- * @param url the url to send the message to
- * @param message the message itself
- * @param async true if you don't wan... | [No CFG could be retrieved] | Send message to end point. | probably should be called message not task |
@@ -173,14 +173,6 @@ public class Config {
excludedClasses = getListSettingFromEnvironment(TRACE_CLASSES_EXCLUDE, null);
- httpServerErrorStatuses =
- getIntegerRangeSettingFromEnvironment(
- HTTP_SERVER_ERROR_STATUSES, DEFAULT_HTTP_SERVER_ERROR_STATUSES);
-
- httpClientErrorStatuses =
... | [Config->[getSettingFromEnvironmentWithLog->[getSettingFromEnvironment],getIntegerRangeSettingFromEnvironment->[getSettingFromEnvironment],getListSettingFromEnvironment->[getSettingFromEnvironment],loadConfigurationFile->[propertyNameToEnvironmentVariableName,propertyNameToSystemPropertyName],get->[Config],getMapSettin... | Gets the configuration of the n - tuple. Sets the maximum number of times the capture should be logged. | `getIntegerRangeSettingFromEnvironment` is now used and can be removed? |
@@ -231,7 +231,9 @@ def download_pair_history(datadir: Optional[Path],
misc.file_dump_json(filename, data)
return True
- except BaseException:
- logger.info('Failed to download the pair: "%s", Interval: %s',
- pair, ticker_interval)
+
+ except Exception:
+ logg... | [load_pair_history->[load_tickerdata_file],download_pair_history->[load_cached_data_for_updating,make_testdata_path],load_tickerdata_file->[trim_tickerlist],load_data->[load_pair_history]] | Download the latest ticker intervals from the exchange for the pair passed in parameters Check if a node id is not found. | I Love the explanation on why you changed BaseException to Exception! Great find btw! |
@@ -111,9 +111,13 @@ func (consensus *Consensus) announce(block *types.Block) {
consensus.block = encodedBlock
consensus.blockHeader = encodedBlockHeader
msgToSend := consensus.constructAnnounceMessage()
+ // TODO Finish using this refactored way
+ // msgToSend := consensus.construct(quorum.Announce)
// save ... | [Start->[announce,Start,handleMessageUpdate,finalizeCommits]] | announce sends an announce message to the validators and broadcasts it to the validators Leader prepareBitmap SetKey failed. | why remove it? |
@@ -39,10 +39,14 @@ def read_selection(name, fname=None, verbose=None):
Parameters
----------
- name : string or list of string
+ name : str or list of str
Name of the selection. If is a list, the selections are combined.
- fname : string
+ fname : str
Filename of the selection... | [read_selection->[list,split,find,sort,info,dirname,extend,len,strip,ValueError,isinstance,join,close,exists,open,iteritems,set]] | Read channel selection from file . Read a file and return a list of unique elements in the file. | I would call it info and only support this how did you come up with this pb? can you fix later in pipeline with a more permissive string comparison? I think we do such things in viz code |
@@ -269,6 +269,14 @@ class TopicQuery
create_list(:private_messages, {}, list)
end
+ def list_private_messages_tag(user)
+ list = private_messages_for(user, :all)
+ tag_id = Tag.where('name ilike ?', @options[:tags][0]).pluck(:id).first
+ list = list.joins("JOIN topic_tags tt ON tt.topic_id = topics... | [TopicQuery->[remove_muted_categories->[get_category_id],list_private_messages_sent->[not_archived],new_results->[new_filter],initialize->[valid_options],create_list->[prioritize_pinned_topics],default_results->[get_category_id,apply_ordering,apply_custom_filters],random_suggested->[remove_muted_categories]]] | Returns a list of private messages for the given user. | This is actually inefficient because it fetches all the `id`s into an array and only picks the first one and throws away the rest. It'll probably be better to just fetch one record from the DB and select the column you want. Maybe use `.select(:id)` if we're concern about forming an entire ActiveRecord object. |
@@ -96,6 +96,7 @@ var staticSuites = []*ginkgo.TestSuite{
Matches: func(name string) bool {
return strings.Contains(name, "[sig-imageregistry]") && !strings.Contains(name, "[Local]")
},
+ TestTimeout: 20 * time.Minute,
},
{
Name: "openshift/image-ecosystem",
| [LongDesc,Contains] | Description is a description of the test that can be run on a build. TestTimeout is a timeout for testing the scalability characteristics of the cluster. | I realised this test is not tagged as [registry] so this wont' take effect. |
@@ -211,8 +211,11 @@ public class SparkExecuteClusteringCommitActionExecutor<T extends HoodieRecordPa
.withBitCaskDiskMapCompressionEnabled(config.getCommonConfig().isBitCaskDiskMapCompressionEnabled())
.build();
+ HoodieTableConfig tableConfig = table.getMetaClient().getTableCo... | [SparkExecuteClusteringCommitActionExecutor->[buildWriteMetadata->[getPartitionToReplacedFileIds]]] | Reads records for a group of records with log messages. Returns an iterator that returns an empty iterable if there are no records in the data file. | we can use `Option<Pair<String, String>>` anywhere both a record key and partition path field needs to be passed. |
@@ -453,7 +453,9 @@ public class SftpFsHelper implements TimestampAwareFileBasedHelper {
public long getFileMTime(String filePath) throws FileBasedHelperException {
try {
ChannelSftp channelSftp = getSftpChannel();
- return channelSftp.lstat(filePath).getMTime();
+ int modificationTime = channe... | [SftpFsHelper->[getFileMTime->[getSftpChannel],DistributedCacheIdentityStrategy->[setIdentity->[setIdentity]],connect->[connect],getFileSize->[getSftpChannel],ls->[ls,getSftpChannel]]] | Get the modified time of a file. | Good catch! Could you put the channelSftp.disconnect() in a try-finally block? |
@@ -48,7 +48,8 @@ $export_page_title = __('View dump (schema) of database');
// exit if no tables in db found
if ($num_tables < 1) {
- PhpMyAdmin\Message::error(__('No tables found in database.'))->display();
+ $message = PhpMyAdmin\Message::error(__('No tables found in database.'));
+ $message->getDisplay... | [getScripts,addFile,addHTML,getHeader,display] | Exports tables of database. This function returns a string with the HTML of the n - th export table. | The getDisplay method just returns the message to display, so this can not work. What was wrong on the previous code? |
@@ -100,7 +100,7 @@ int tb_pipeline_params(struct ipc *ipc, struct pipeline *p,
{
struct ipc_comp_dev *pcm_dev;
struct comp_dev *cd;
- struct sof_ipc_pcm_params params;
+ struct sof_ipc_pcm_params params = {0};
char message[DEBUG_MSG_LEN];
int fs_period;
int period;
| [tb_pipeline_params->[sprintf,pipeline_params,debug_print,fprintf,ipc_get_comp_by_id],tb_pipeline_start->[tb_pipeline_params,pipeline_prepare,pipeline_trigger,printf,fprintf,ipc_get_comp_by_id],tb_pipeline_setup->[pipeline_posn_init,init_system_notify,sys_comp_init,ipc_init,sa_init,debug_print,scheduler_init_edf,fprint... | This function is used to set the parameters for a given pipeline get the pipeline parameters for a given pipeline. | This looks like the initialization of some field(s) is missing below and this is merely hiding the issue. |
@@ -77,8 +77,18 @@ class Transform(dict):
----------
fro : str | int
The starting coordinate frame.
+ Can be 'unknown', 'MEG device', 'isotrak', 'hpi', 'head',
+ 'MRI (surface RAS)', 'MRI voxel', 'MRI slice', 'MRI display',
+ 'CTF MEG device', 'CTF/4D/KIT head', 'RAS (non-zero or... | [_print_coord_trans->[_coord_frame_name],combine_transforms->[_to_const,_coord_frame_name,Transform],Transform->[__init__->[_to_const]],_compute_sph_harm->[_sh_negate,_deg_ord_idx,_get_n_moments,_sh_complex_to_real],_find_vector_rotation->[_skew_symmetric_cross],transform_surface_to->[_ensure_trans,apply_trans],_get_tr... | Convert a coord frame into an integer. Construct a base class for the given ending coordinate frame. | It might be better to make a `Notes` section below and list them once down there |
@@ -21,7 +21,11 @@ module Idv
update_analytics(client_response)
- store_pii(client_response) if client_response.success?
+ if client_response.success?
+ doc_pii_form_response = Idv::DocPiiForm.new(client_response.pii_from_doc).submit
+ form_response = form_response.merge(doc... | [ImageUploadsController->[render_404_if_disabled->[document_capture_step_enabled?],create->[to_h,status,new,render,track_event,store_pii,success?,post_images,read,update_analytics,liveness_checking_enabled?,submit],store_pii->[store_result_from_response],add_costs->[call],image_form->[new,liveness_checking_enabled?],up... | POST a new nag image and return the object. | we need an `analytics.track_event` after this merge, or potentially move the one we have down after this block |
@@ -889,8 +889,12 @@ ds_mgmt_hdlr_tgt_map_update(crt_rpc_t *rpc)
{
struct mgmt_tgt_map_update_in *in = crt_req_get(rpc);
struct mgmt_tgt_map_update_out *out = crt_reply_get(rpc);
+ uint32_t version;
+ int rc;
- if (in->tm_map_version != sys_map_version)
+ rc = crt_group_version(NULL /* grp */, &version);
+... | [No CFG could be retrieved] | - - - - - - - - - - - - - - - - - -. | just to confirm that the MGMT_TGT_MAP_UPDATE bcast is initiated by the MS leader synchronously one-by-one? if possibly with multiple async bcast inflight then seems above case is possible? and what will happen if return it as error by set tm_rc = 1 as below.... |
@@ -20,7 +20,7 @@ package io.syndesis.common.model;
*/
public final class Schema {
// changing this will reset all the DB data.
- public static final int VERSION = 40;
+ public static final int VERSION = 41;
private Schema() {
// quasi utility class
| [No CFG could be retrieved] | This class is used to track the current model schema version. | I don't think this needs changing, not without an `up-41.js` script, otherwise we might have an issue when someone adds `up-41.js` it will not be executed as the schema version is already at 41. |
@@ -316,7 +316,7 @@ def _sl_init_pred(y_pred, X):
return y_pred
-def _sl_score(estimators, X, y):
+def _sl_score(estimators, scoring, X, y):
"""Aux. function to score SearchLight in parallel.
Predict and score each slice of data.
| [_sl_transform->[transform],_gl_transform->[transform],GeneralizationLight->[decision_function->[_transform],score->[_check_Xy],predict_proba->[_transform],_transform->[_check_Xy,_check_method],transform->[_transform],predict->[_transform]],_gl_score->[score],_sl_fit->[fit],SearchLight->[decision_function->[_transform]... | Aux. function to score SearchLight in parallel. Predict and score each slice of data. | scoring is missing in the doc: You can add there the lines I suggested above to explicit what is going on. Formally, I think it's not perfect because that means the functions does very different things depending on the input (i.e. X becomes a y_pred), but I guess it's private so we'll deal with it. |
@@ -71,7 +71,9 @@ func NewGRPCServer(ctx context.Context,
return nil, errors.Wrap(err, "could not initialize v1 server")
}
- v2PolServer, err := v2.NewPostgresPolicyServer(ctx, l, e, migrationsConfig,
+ // TODO (tc) Refactor how singletons are shared between GRPC servers. Should we also
+ // be sharing a single ... | [UnaryServerInterceptor,Storage,UnaryInterceptor,RegisterHealthServer,NewPostgresPolicyServer,Wrap,NewSwitch,NewEntry,ChainUnaryServer,Error,Dial,Validate,New,NewManager,RegisterProjectsServer,DefaultCodeToLevel,WithLevels,NewPostgresProjectsServer,SetLoggerV2,EngineUpdateInterceptor,NewService,NewAuthzServer,Register,... | NewGRPCServer creates a new grpc server for the given auth code. v2ProjectsServer is the first server in the list of v2 authz servers and. | This is what the _rearchitect authz-service_ card is about, too. Suggestions welcome |
@@ -250,6 +250,7 @@ namespace CoreXml.Test.XLinq
public void GetAttributeOrdinal()
{
XmlReader DataReader = ReloadSource();
+ DataReader.Read();
DataReader.GetAttribute(0);
}
| [XNodeReaderFunctionalTests->[XNodeReaderTests->[TCXMLIntegrityBase->[MoveToNextAttribute->[MoveToNextAttribute],MoveToFirstAttribute->[MoveToFirstAttribute],ReadAttributeValue->[ReadAttributeValue],MoveToElement->[MoveToElement],LookupNamespace->[LookupNamespace],Prefix->[Prefix],AttributeCount->[AttributeCount],HasVa... | Get the attribute ordinal. | you should not be changing that I believe, we should check this code carefully as there might be some APIs depending on the fact that we used to return null and we should fix them to behave the same |
@@ -53,6 +53,15 @@ public class PrometheusReportingTask extends AbstractReportingTask {
private PrometheusServer prometheusServer;
+ public static final PropertyDescriptor SSL_CONTEXT = new PropertyDescriptor.Builder()
+ .name("prometheus-reporting-task-ssl-context")
+ .displayName("SS... | [PrometheusReportingTask->[onScheduled->[getValue,error,parseInt,equals,getControllerStatus,asBoolean,getLogger,info,getInstance,createJvmMetrics,InetSocketAddress,PrometheusServer,add,createNifiMetrics,setMetricsCollectors,asControllerService],OnStopped->[stop,getServer],onTrigger->[setReportingContext],onShutDown->[s... | Creates a new reporting task that reports metrics in Prometheus format. This method is used to determine if a system - wide is needed. | Same default-to-TLS note as above. |
@@ -324,7 +324,8 @@ class RepositoriesController < ApplicationController
name: 'title',
params_group: 'repository',
field_to_udpate: 'name',
- path_to_update: team_repository_path(@repository)
+ path_to_update: team_repository_path(@repository),
+ label_after: "<span class=\"reposito... | [RepositoriesController->[create->[new,respond_to,render,repository_path,json,log_activity,assign_attributes,errors,t,save,name],load_vars->[find_by_id],export_repository->[t,redirect_back,log_activity,generate_zip],share_modal->[render_to_string,render,respond_to,json],set_inline_name_editing->[team_repository_path,ca... | set the config for the missing node index page. | Metrics/LineLength: Line is too long. [124/120] |
@@ -46,7 +46,7 @@ import org.junit.runners.JUnit4;
public class FileIOChannelFactoryTest {
@Rule public ExpectedException thrown = ExpectedException.none();
@Rule public TemporaryFolder temporaryFolder = new TemporaryFolder();
- private FileIOChannelFactory factory = new FileIOChannelFactory();
+ private FileI... | [FileIOChannelFactoryTest->[testCreateWithinExistingDirectory->[testCreate],testCreateWithNonExistentSubDirectory->[testCreate],testCreateWithExistingFile->[testCreate]]] | Test create. | Use the PipelineOptions variant. |
@@ -404,8 +404,8 @@ class StorageContainerTest(StorageTestCase):
# Assert
self.assertIsNotNone(acl)
- self.assertEqual(len(acl), 0)
- self.assertIsNone(acl.public_access)
+ self.assertIsNone(acl.get('public_access'))
+ self.assertIsNone(acl.get('deserialized'))
@re... | [StorageContainerTest->[test_set_container_acl_with_signed_identifiers->[_create_container],test_lease_container_acquire_and_release->[_create_container],test_delete_container_with_existing_container_fail_not_exist->[_create_container],test_list_containers_with_public_access->[_create_container],test_list_containers->[... | Get container acl. | Should this be `acl.get('signed_identifiers')`? |
@@ -6,6 +6,14 @@ from torch import nn
from torchvision.ops import roi_align
from torchvision.ops.boxes import box_area
+from typing import Optional, List
+
+
+# TODO: (eellison) T54974082 https://github.com/pytorch/pytorch/issues/26744/pytorch/issues/26744
+def initLevelMapper(k_min, k_max, canonical_scale=224, can... | [MultiScaleRoIAlign->[forward->[setup_scales,convert_to_roi_format],setup_scales->[LevelMapper,infer_scale]]] | The FPN level mapper. output size for the pooled region or list of all the image sizes for the pooled region. | nit: `typing` -> `torch.jit.annotations` |
@@ -63,6 +63,7 @@ namespace Content.Server.Singularity.Components
};
public float MoveAccumulator;
+ public bool Scrung = false;
// This is an interesting little workaround.
// See, two singularities queuing deletion of each other at the same time will annihilate.
| [ServerSingularityComponent->[Shutdown->[Shutdown],Initialize->[Initialize]]] | The base class for the System s System s System s System s System s System s E Play the singularity sound. | need a more descriptive variable name or at least xmldocs |
@@ -142,6 +142,11 @@ RSpec.describe Dependabot::Bundler::UpdateChecker::VersionResolver do
let(:dependency_files) { bundler_project_dependency_files("bundler_specified") }
+ before do
+ stub_request(:get, rubygems_url + "versions/bundler.json").
+ to_return(status: 200, b... | [include_context,new,let,to_not,describe,subject,it,its,to,latest_resolvable_version_details,bundler_project_dependency_files,before,pending,require,include,fixture,gsub,context,eq,to_return,raise_error,and_return] | The following methods are used to check that the Bundler project is installed and that the required version that requires bundler v2. | Does this mean we make an extra API call for every update now? |
@@ -1379,6 +1379,11 @@ func GeneratePackage(tool string, pkg *schema.Package) (map[string][]byte, error
return files, nil
}
+// goPackage returns the suggested package name for the given string.
+func goPackage(name string) string {
+ return strings.Split(name, "-")[0]
+}
+
const utilitiesFile = `
type envParser... | [genResource->[getConstValue,plainType,outputType,getDefaultValue,inputType],genType->[genInputTypes,genOutputTypes,details,genPlainType,tokenToType],plainType->[tokenToType,plainType],genFunction->[genPlainType],outputType->[tokenToType,outputType],getTypeImports->[tokenToPackage,getTypeImports,add],genConfig->[genHea... | genFunction generates code for a function XML Element that represents a sequence number. | should we be defensive here and check to see if there are any items after the split? |
@@ -104,3 +104,9 @@ def parse_payment_action_response(
"transaction_already_processed", False
),
)
+
+
+@contextmanager
+def _catch_duration_time():
+ start = datetime.now()
+ yield lambda: datetime.now() - start
| [parse_list_payment_gateways_response->[to_payment_app_id],from_payment_app_id->[PaymentAppData]] | Parse payment action response. | This function is not "private", since you don't use it in this module, but it is imported in some other place. |
@@ -378,10 +378,11 @@ public class StreamAppenderatorDriver extends BaseAppenderatorDriver
final Collection<String> sequenceNames
)
{
- return Futures.transform(
- publish(publisher, committer, sequenceNames),
- this::registerHandoff
- );
+ return ListenableFutures
+ .transfor... | [StreamAppenderatorDriver->[startJob->[startJob],close->[close],publishAndRegisterHandoff->[publish]]] | Publish a sequence and register handoff if it is not found. | this line break doesn't seem necessary. It is a small thing but I still feel compelled to mention it. |
@@ -38,6 +38,11 @@ public class MultipleEmbeddedActiveMQResourcesTest {
static final String ASSERT_RECEIVED_FORMAT = "Message should have been received from %s";
static final String ASSERT_COUNT_FORMAT = "Unexpected message count in queue %s";
+ static {
+ ThreadLeakCheckRule.addKownThread("MemoryPoolM... | [MultipleEmbeddedActiveMQResourcesTest->[testMultipleServers->[assertNotNull,receiveMessage,format,sendMessage],setUp->[createQueue],around,SimpleString,EmbeddedActiveMQResource]] | package MultipleEmbeddedActiveMQResourcesTest - Tests multiple EmbeddedActiveMQResources. This method sends a message to the server and receives a message to check if the message is. | Isn't there a way to kill these threads? |
@@ -49,14 +49,18 @@ $fields = array (
'null' => $unbound['num.query.type.NULL'],
'wks' => $unbound['num.query.type.WKS'],
'ptr' => $unbound['num.query.type.PTR'],
+ 'hinfo' => $unbound['num.query.type.HINFO'],
'mx' => $unbound['num.query.type.MX'],
'txt' => $unbound['num.query.type.TXT'],
... | [addDataset] | Adds the data of the national - sequence numbers to the list of the possible values of data update. | have you tried to change those keys only to uppercase instead of changing other stuff? keep in mind, as long the data descriptions in RRDs are correct their definitions shouldn't be touched to keep the files and historic data |
@@ -3,8 +3,10 @@ package aws
import (
"fmt"
"log"
+ "time"
"github.com/aws/aws-sdk-go/aws"
+ "github.com/aws/aws-sdk-go/aws/awserr"
"github.com/aws/aws-sdk-go/service/elb"
"github.com/hashicorp/terraform/helper/resource"
"github.com/hashicorp/terraform/helper/schema"
| [Printf,Set,DescribeLoadBalancers,Sprintf,PrefixedUniqueId,String,Errorf,SetId,Get,RegisterInstancesWithLoadBalancer,DeregisterInstancesFromLoadBalancer] | Creates a resource with the specified Check if the ELB has previously been defined for this resource. | This pkg will no longer be needed after switching the error check to use `isAWSErr` |
@@ -80,7 +80,7 @@ class CI_Config {
{
if (isset($_SERVER['HTTP_HOST']))
{
- $base_url = ! empty($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) !== 'off' ? 'https' : 'http';
+ $base_url = (is_https()) ? 'https' : 'http';
$base_url .= '://'. $_SERVER['HTTP_HOST']
. str_replace(basename($_... | [CI_Config->[base_url->[slash_item],system_url->[slash_item],site_url->[item,slash_item],_assign_to_config->[set_item],_uri_string->[item]]] | Initialize the object. | Just my preferrence, but those brackets are not really needed :) |
@@ -500,9 +500,11 @@ namespace Microsoft.VisualBasic
public static void AppActivate(string Title) { }
[System.Runtime.Versioning.SupportedOSPlatformAttribute("windows")]
public static void Beep() { }
+ [System.Diagnostics.CodeAnalysis.RequiresUnreferencedCodeAttribute("The procedure na... | [OptionTextAttribute->[Never,Class],ProjectData->[Never],NewLateBinding->[LateCallInvokeDefault->[Never],FallbackIndexSet->[Never],LateGetInvokeDefault->[Never],FallbackIndexSetComplex->[Never],FallbackInvokeDefault1->[Never],FallbackInvokeDefault2->[Never],FallbackSet->[Never],FallbackSetComplex->[Never],FallbackCall-... | This method is called by the System. Runtime. InteropServices and the System. Runtime. | It's not the procedure name that can't be statically analyzed, right? It is the type of `ObjectRef`. #Resolved |
@@ -708,9 +708,13 @@ class DictionaryAgent(Agent):
text = self.bpe.decode(tokens, vector, delimiter)
elif self.tokenizer == 'bytelevelbpe':
# We add special tokens in the beginning of ParlAI dict but in the
- # end of Hugging Face dict,there is an offset of 4 between them.
... | [find_ngrams->[find_ngrams],DictionaryAgent->[add_cmdline_args->[add_cmdline_args],add_to_dict->[add_token],keys->[keys],load->[add_token,unescape],tokenize->[find_ngrams],__setitem__->[add_token],shutdown->[save],_remove_non_bpe->[bpe_tokenize,add_token],__getitem__->[_index_lookup,_word_lookup],save->[_remove_non_bpe... | Convert a vector of IDs into a string with each token separated by the delimiter. | assuming this is just for clarity? |
@@ -315,12 +315,13 @@ class CheckoutCreate(ModelMutation, I18nMixin):
checkout = models.Checkout(user=user)
else:
checkout = models.Checkout()
-
cleaned_input = cls.clean_input(info, checkout, data.get("input"))
+ checkout.channel = cleaned_input["channel"]
ch... | [CheckoutBillingAddressUpdate->[perform_mutation->[CheckoutBillingAddressUpdate,save]],CheckoutCreate->[process_checkout_lines->[check_lines_quantity],clean_input->[retrieve_billing_address,retrieve_shipping_address,process_checkout_lines],Arguments->[CheckoutCreateInput],perform_mutation->[save,CheckoutCreate,clean_in... | Perform a single mutation of a . | I think this should happen in `clean_input`. We either use the value passed in the input or use the default from `info.context`. |
@@ -1087,7 +1087,8 @@ export class AmpA4A extends AMP.BaseElement {
dev().assert(!!this.element.ownerDocument, 'missing owner document?!');
this.protectedEmitLifecycleEvent_('renderFriendlyStart');
// Create and setup friendly iframe.
- const iframe = /** @type {!HTMLIFrameElement} */(
+ dev().asse... | [AmpA4A->[constructor->[AmpAdUIHandler,AmpAdXOriginIframeHandler,dev,generateSentinel,platformFor,protectFunctionWrapper,now,SAFEFRAME,cryptoFor],renderViaNameAttrOfXOriginIframe_->[NAMEFRAME,utf8Decode,dev,user,getContextMetadata,getDefaultBootstrapBaseUrl,stringify,SAFEFRAME,reject,length],verifyCreativeSignature_->[... | Renders a minified creative. protectedEmitLifecycleEvent_ method called when Friendly iframe is loaded. | You can remove these now given we have an explicit check earlier in layoutCallback |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.