patch stringlengths 18 160k | callgraph stringlengths 4 179k | summary stringlengths 4 947 | msg stringlengths 6 3.42k |
|---|---|---|---|
@@ -1421,4 +1421,10 @@ public class StandardProcessorNode extends ProcessorNode implements Connectable
callback.postMonitor();
}
}
+
+ @Override
+ protected String getProcessGroupIdentifier() {
+ final ProcessGroup group = getProcessGroup();
+ return group == null ? null :... | [No CFG could be retrieved] | Post monitor callback. | What does returning null here imply? |
@@ -75,7 +75,7 @@ class LanghostMockResourceMonitor(proto.ResourceMonitorServicer):
type_ = request.type
name = request.name
props = rpc.deserialize_properties(request.object)
- deps = request.dependencies
+ deps = list(request.dependencies)
outs = {}
if type_ ... | [LanghostTest->[_create_mock_resource_monitor->[LanghostMockResourceMonitor,MockEngine]]] | Registers a new resource in the language host. | This is more gRPC weirdness - `request.dependencies` returns some object that duck types as a list but is not actually a list, which confuses some test helpers like `assertListEqual` which fail if you don't give them an actual list. |
@@ -102,6 +102,7 @@ Route::group(['middleware' => ['auth', '2fa'], 'guard' => 'auth'], function () {
Route::post('device', 'DeviceController');
Route::post('eventlog', 'EventlogController');
Route::post('fdb-tables', 'FdbTablesController');
+ Route::post('inetCidrRoute'... | [where,name] | Register the routes for the application. Register the controllers for all the application routes. | probably just call the route "routes" |
@@ -697,12 +697,14 @@ func expandGcsData(gcsDatas []interface{}) *storagetransfer.GcsData {
gcsData := gcsDatas[0].(map[string]interface{})
return &storagetransfer.GcsData{
BucketName: gcsData["bucket_name"].(string),
+ Path: gcsData["path"].(string),
}
}
func flattenGcsData(gcsData *storagetransfer... | [StringLenBetween,Patch,NewStorageTransferClient,StringInSlice,Set,GetOk,HasChange,Errorf,SetId,RetryableError,Create,Join,Do,Id,Get,Split,Printf,Sprintf,IntBetween,Retry] | flattenTransferSchedule - expands a list of nested objects into a list of nested objects. AccessKeys returns a slice of access keys for the given resource. | conditionally set this based on whether it exists in the map |
@@ -139,7 +139,11 @@ class CloudHandler(logging.Handler):
def emit(self, record: logging.LogRecord) -> None: # type: ignore
"""Emit a new log"""
# if we shouldn't log to cloud, don't emit
- if not context.config.logging.log_to_cloud:
+ if not context.config.cloud.send_flow_run_logs... | [RedirectToLog->[flush->[flush],__init__->[get_logger]],LogManager->[enqueue->[ensure_started]],CloudHandler->[emit->[enqueue]],_create_logger->[CloudHandler],configure_logging->[_create_logger],create_diagnostic_logger->[_create_logger],configure_extra_loggers->[_create_logger],configure_logging,LogManager,configure_e... | Emit a new log record. | Because you are also relying on this context variable, you are going to miss at least two logs that I can see, and any errors that occur prior to this being set |
@@ -1927,6 +1927,14 @@ class Jetpack_Core_Json_Api_Endpoints {
'validate_callback' => __CLASS__ . '::validate_boolean',
'jp_group' => 'wordads',
),
+ 'wordads_custom_adstxt' => array(
+ 'description' => esc_html__( 'Custom ads.txt entries', 'jetpack' ),
+ 'type' => ... | [Jetpack_Core_Json_Api_Endpoints->[remote_authorize->[remote_authorize],build_connect_url->[build_connect_url],verify_registration->[verify_registration]]] | Returns a list of data that can be updated. Displays a list of all available color scheme options. Protected get - posts - page - group - default value This function returns a list of options that can be used to configure a post. | I think we should also add: >'sanitize_callback' => 'sanitize_textarea_field', Without it, it's possible to save php & script tags in the input. We strip these on output, but it would be good to keep them out of the db to prevent any xss. |
@@ -49,7 +49,7 @@ void tone(uint8_t _pin, unsigned int frequency, unsigned long duration) {
if (frequency == 0) {
noTone(_pin);
} else {
- uint32_t period = (1000000L * system_get_cpu_freq()) / frequency;
+ uint32_t period = microsecondsToClockCycles(1000000UL) / frequency;
uint32_t high = period ... | [noTone->[stopWaveform,digitalWrite],void->[pinMode,microsecondsToClockCycles,startWaveformCycles],tone->[noTone,tone,_startTone,system_get_cpu_freq]] | tone - Tone the pin. | I'm not sure whether this change is ok. The microsecondsToClockCycles() define uses the F_CPU macro, while system_get_cpu_freq() is the SDK api call. I _think_ it is ok because these functions aren't supposed to be called from an ISR. Also, if built for 160MHz, execution will be done at that speed something like 95% of... |
@@ -77,6 +77,11 @@ frappe.slickgrid_tools = {
get_filtered_items: function(dataView) {
var data = [];
for (var i=0, len=dataView.getLength(); i<len; i++) {
+ // not_quoted to remove single quotes at start and end of total labels
+ var not_quoted = dataView.getItem(i).account_name;
+ if(not_quoted... | [No CFG could be retrieved] | finds the header of the header that is not in the header of the header i = 0 ;. | cannot be hard coded for `account_name`. Also please use tabs, the project uses tabs unfortunately, so we have to follow! |
@@ -1472,6 +1472,11 @@ class Flow:
determining if the flow has changed. If this hash is equal to a previous hash,
no new information would be passed to the server on a call to `flow.register()`
+ Note that this will not always detect code changes since the task code is not
+ included i... | [Flow->[_run->[copy,update],reference_tasks->[_default_reference_tasks],chain->[add_edge],downstream_tasks->[edges_from],add_edge->[copy,add_task],register->[register,update],copy->[copy],upstream_tasks->[edges_to],update->[parameters,update,add_task,add_edge,replace],run->[parameters,_run],edges_from->[all_downstream_... | Generate a deterministic hash of the serialized flow. | This pulled out because I was transforming the serialized_flow but switched to transforming the flow copy before serialization. Still useful pulled out for debugging. |
@@ -3,7 +3,8 @@
* @file include/dfrn.php
* @brief The implementation of the dfrn protocol
*
- * https://github.com/friendica/friendica/wiki/Protocol
+ * @see https://github.com/friendica/friendica/wiki/Protocol and
+ * https://github.com/friendica/friendica/blob/master/spec/dfrn2.pdf
*/
require_once("include... | [dfrn->[add_author->[appendChild,createElement],mail->[appendChild,saveXML,createElement],add_header->[setAttribute,createElementNS,appendChild],do_poke->[attributes],relocate->[appendChild,saveXML,createElement],process_relocation->[item],create_activity->[createElement,attributes],fsuggest->[appendChild,saveXML,creat... | Create a DFRN entry string from an array of atom items. Generate an atom feed for a given user. | We could address this link relatively since it is available locally. |
@@ -723,6 +723,7 @@ class BlobClient(StorageAccountHostsMixin): # pylint: disable=too-many-public-m
delete_snapshots = DeleteSnapshotsOptionType(delete_snapshots)
options = {
'timeout': kwargs.pop('timeout', None),
+ 'raise_on_any_failure': kwargs.pop('raise_on_any_failure... | [BlobClient->[create_page_blob->[_create_page_blob_options],abort_copy->[_abort_copy_options],set_sequence_number->[_set_sequence_number_options],start_copy_from_url->[_start_copy_from_url_options,start_copy_from_url],resize_blob->[_resize_blob_options],upload_blob->[_upload_blob_options],upload_pages_from_url->[_uploa... | Generic delete blob options. | This blob_client is missing the `keyword` param docstrings? |
@@ -281,9 +281,12 @@ public final class OzoneManagerRatisServer {
try {
return server.submitClientRequestAsync(raftClientRequest)
.get();
- } catch (Exception ex) {
+ } catch (ExecutionException | IOException ex) {
throw new ServiceException(ex.getMessage(), ex);
+ } catch (Interr... | [OzoneManagerRatisServer->[addOMToRatisRing->[nextCallId],stop->[stop],newOMRatisServer->[OzoneManagerRatisServer],getLastAppliedTermIndex->[getLastAppliedTermIndex],start->[start]]] | Submits a request to the ratis. | need to throw an exception here otherwise the caller of this method will get an NPE. |
@@ -27,7 +27,7 @@ class TableClientBase(StorageAccountHostsMixin):
account URL already has a SAS token, or the connection string already has shared
access key values. The value can be a SAS token string, an account shared access
key.
- :type credential: Union[str,TokenCredential]
+ :typ... | [TableClientBase->[_format_url->[format],__init__->[_format_query_string,parse_query,urlparse,_validate_table_name,super,ValueError,format,rstrip,lower],_validate_signed_identifiers->[ValueError,len],_parameter_filter_substitution->[replace,split,items]]] | Initialize a table client base class. | think you need to remove `TokenCredntial` here too |
@@ -30,16 +30,12 @@ func (i *VCHID) IDFlags() []cli.Flag {
cli.StringFlag{
Name: "id",
Value: "",
- Usage: "The ID of the Virtual Container Host - not supported until vic-machine ls is ready",
+ Usage: "The ID of the Virtual Container Host, e.g. vm-220",
Destination: &i.ID,
... | [ProcessID->[NewExitError,Warnf]] | IDFlags returns a slice of flags that can be used to set the ID of the virtual. | Do we need this anymore? |
@@ -3674,11 +3674,9 @@ describe UsersController do
end
describe "include_post_count_for" do
-
- fab!(:admin) { Fabricate(:admin) }
fab!(:topic) { Fabricate(:topic) }
- before do
+ before_all do
Fabricate(:post, user: user, topic: topic)
Fabricate(:po... | [create_and_like_post->[like,create_post,enable],honeypot_magic->[parsed_body,reverse,get],users_found->[map],stub_secure_session_confirmed->[returns],post_user->[post,merge],create_totp->[post],create_second_factor_security_key->[post,sign_in],email,create,let,discourse_connect_overrides_avatar,user_fields,methods,sco... | This method checks that the user s preferences are valid. It also checks that the user s raises an error when not logged in. | I don't know if this one is worth it. When I see `before_all` I think: potential test leak. |
@@ -68,6 +68,7 @@ class ReadFromAvro(PTransform):
Args:
label: label of the PTransform.
file_pattern: the set of files to be read.
+ coder: a coder to use to decode values (iff the record type is BYTES).
min_bundle_size: the minimum size in bytes, to be considered when
... | [_AvroSource->[read_records->[records,advance_file_past_next_sync_marker,read_block_from_file,read_meta_data_from_file]],_AvroBlock->[records->[_decompress_bytes]]] | Initializes the ReadFromAvro class with the given file pattern and minimum size in bytes. Returns a new instance of the class that will be used to create the class. | If my understanding is correct, this seems to deviate from the normal usage of the coders. We usually use coders so that at runtime we can convert any record returned by source into bytes and vice versa. The coder provide here might not properly do that for non-byte types and this parameter might be confusing for users... |
@@ -120,11 +120,11 @@ class PackageCopierTest(unittest.TestCase):
self.assertFalse(os.path.exists(os.path.join(paths.package(pref), "package.lib")))
def _create_conanfile(self, ref, paths, content="default_content"):
- origin_reg = paths.export(ref)
+ origin_reg = paths.package_layout(ref)... | [MockedBooleanUserIO->[__init__->[__init__]],PackageCopierTest->[test_copy->[MockedBooleanUserIO]]] | Create a conanfile and a package. | `self._cache.export_sources(ref, short_paths=False)` vs `self._cache.package_layout(ref, short_paths=None).export_sources()` |
@@ -14,6 +14,7 @@
* limitations under the License.
*/
+import {AMP_CUSTOM_LINKER_TARGET} from '../../../../src/service/navigation';
import {
Action,
StateProperty,
| [AmpStoryBookend->[renderComponents_->[buildContainer,dev,localizationServiceForOrNull,buildElements,user,appendChild,message],constructor->[getStoreService],initializeListeners_->[BOOKEND_STATE,ESCAPE,RTL_STATE,key,preventDefault,UI_STATE,CAN_SHOW_SHARING_UIS],readBookendVersion_->[user],buildReplayButton_->[buildRepl... | Package that imports a specific object from AMP HTML Authors. Key for components in bookend config. | Services can be loaded asynchronously and should not be bundled in the extension code. It'd just add this service code into the amp-story extension, even though it's already present in the v0 file. You could either have a getter in the navigation service, or just duplicate the constant |
@@ -300,7 +300,16 @@ func (s *Service) GetExplorerAddress(w http.ResponseWriter, r *http.Request) {
}
}
- result = data.Address
+ db := s.storage.GetDB()
+ bytes, err := db.Get([]byte(key))
+ if err != nil {
+ ctxerror.Warn(utils.GetLogger(), err, "cannot read address from db", "id", id)
+ return
+ }
+ if err ... | [ReadBlocksFromDB->[Error,DecodeBytes,GetLogInstance,Get,Exit],GetExplorerAddress->[Header,GetAccountBalance,Warn,WithCallerSkip,GetDB,Get,DecodeBytes,NewEncoder,GetLogInstance,ParseAddr,FormValue,Encode,Set,GetLogger],GetExplorerShard->[Header,GetNodeIDs,Warn,IDB58Encode,NewEncoder,Encode,Set,GetLogger],GetExplorerNod... | GetExplorerAddress returns the address of an explorer. | why different usage here? and line 299? |
@@ -79,11 +79,11 @@ func TestDecode(t *testing.T) {
}
for _, test := range tests {
- esURL, kbURL, err := decodeCloudID(test.cloudID)
+ cid, err := NewCloudID(test.cloudID, "")
assert.NoError(t, err, test.cloudID)
- assert.Equal(t, esURL, test.expectedEsURL, test.cloudID)
- assert.Equal(t, kbURL, test.ex... | [Equal,Error,NewConfigFrom,Unpack,Contains,NoError,Logf] | Returns a list of URLs for the most recent known - to - be - kibana TestDecodeError tests for the presence of a cloud ID in the standard library. llOTYyNTc0Mw == = a helper function to check that the. | Better prefer blackbox testing: `cid.ElasticsearchURL` over checking internals like `cid.esURL`. |
@@ -30,13 +30,17 @@ import org.kohsuke.stapler.export.Exported;
import java.util.Locale;
import hudson.util.VariableResolver;
+import org.kohsuke.accmod.Restricted;
+import org.kohsuke.accmod.restrictions.NoExternalUse;
/**
* {@link ParameterValue} created from {@link StringParameterDefinition}.
*/
public c... | [StringParameterValue->[hashCode->[hashCode],equals->[equals]]] | A class that defines the parameters of a single . Add a name and value to the environment. | This field in `StringParameterValue` seems to be unused |
@@ -114,3 +114,15 @@ class Ruby(AutotoolsPackage):
'rubygems',
'ssl_certs')
install(rubygems_updated_cert_path, rubygems_certs_path)
+
+ rbconfig = '{0}/lib/ruby/{1}.0/x86_64-linux/rbconfig.rb'.format(
+ ... | [Ruby->[url_for_version->[up_to,format],setup_dependent_build_environment->[extends,append,set_path,set,traverse],setup_dependent_package->[join_path,Executable],post_install->[join_path,install,satisfies,up_to,format],configure_args->[append,satisfies],depends_on,resource,version,patch,variant,run_after]] | Installs the necessary certificates after the RubyGems installation. | Is the `x86_64-linux` directory correct for macOS and aarch64? |
@@ -47,6 +47,9 @@ func (l *Limits) RegisterFlags(f *flag.FlagSet) {
f.IntVar(&l.MaxSeriesPerUser, "ingester.max-series-per-user", 5000000, "Maximum number of active series per user.")
f.IntVar(&l.MaxSeriesPerMetric, "ingester.max-series-per-metric", 50000, "Maximum number of active series per metric name.")
+ f.I... | [UnmarshalYAML->[DefaultValues],RegisterFlags->[StringVar,IntVar,DurationVar,Float64Var,BoolVar]] | RegisterFlags registers the flags for the limits. Maximum number of active series per metric. | Text should indicate this is a duration. |
@@ -45,4 +45,8 @@ public final class RedisHeaders {
public static final String MESSAGE_SOURCE = PREFIX + "messageSource";
+ public static final String STREAM_KEY = PREFIX + "streamKey";
+
+ public static final String STREAM_MESSAGE_ID = PREFIX + "streamMessageID";
+
}
| [No CFG could be retrieved] | Returns the name of the message source. | Maybe `streamMessageId`? No `ID`, please. |
@@ -894,7 +894,7 @@ class Defaults {
'promote_users',
'delete_themes',
'export',
- 'edit_comment',
+ 'moderate_comments',
'upload_plugins',
'upload_themes',
);
| [Defaults->[is_multi_network->[is_multi_network]]] | Get the list of capabilities that should be installed. Get the maximum number of seconds for a given setting. | This is now added twice, see line 854 |
@@ -192,7 +192,7 @@ def read_from_datastore(project, user_options, pipeline_options):
num_shards=user_options.num_shards)
# Actually run the pipeline (all operations above are deferred).
- return p.run()
+ return p.run().wait_until_finish()
def run(argv=None):
| [read_from_datastore->[make_ancestor_query],write_to_datastore->[EntityWrapper],run->[read_from_datastore,write_to_datastore],run] | Creates a pipeline that reads entities from Cloud Datastore. Reads entities from the datastore and writes them to the specified file. | Here, we return the result. However, I don't think the result is actually used. Should we remove "return" for consistency? |
@@ -24,8 +24,8 @@ import sys
import six
-from tensorflow.python import _pywrap_utils
from tensorflow.python import pywrap_tensorflow
+from tensorflow.python import _pywrap_utils
from tensorflow.python.eager import context
from tensorflow.python.eager import execute
from tensorflow.python.eager import imperativ... | [_gradient_function->[_MockOp],_MockOp->[get_attr->[make_attr,op_attr_type]],implicit_grad->[grad_fn->[implicit_val_and_grad]],flatten_nested_indexed_slices->[flatten_nested_indexed_slices],GradientTape->[batch_jacobian->[loop_fn->[_pop_tape,_push_tape,gradient],_pop_tape,_push_tape],reset->[_pop_tape,_push_tape],watch... | Code for backpropagation using the tape utilities. This is a hack to avoid loading the t - object from the database. | The linter will likely complain here; disable it |
@@ -835,8 +835,13 @@ class Flow:
flow_state.result = {}
task_states = kwargs.pop("task_states", {})
flow_state.result.update(task_states)
+
+ # set global caches that persist across runs
prefect.context.setdefault("caches", {})
+ # set context for this flow run
+ ... | [Flow->[copy->[copy],upstream_tasks->[edges_to],update->[add_edge,add_task],reference_tasks->[terminal_tasks],chain->[add_edge],edges_to->[all_upstream_edges],set_dependencies->[add_edge,add_task],run->[parameters,_run_on_schedule,run],edges_from->[all_downstream_edges],validate->[reference_tasks],serialize->[validate,... | Run this flow indefinitely on a schedule. Returns a scheduled task state or None if there is no next scheduled task. | Should do `kwargs.setdefault("context", {}).update(flow_run_context)` or something like that here to fix the failing tests. |
@@ -4,12 +4,14 @@ define([
'dojo/on',
'dojo/ready',
'dojo/io-query',
+ 'Scene/SkyBox',
'Widgets/Dojo/CesiumViewerWidget'
], function(
dom,
on,
ready,
ioQuery,
+ SkyBox,
CesiumViewerWidget
) {
"use strict";
| [No CFG could be retrieved] | JS - related functions. | Since SkyBox isn't actually used here, we can probably remove the two changes in this file. |
@@ -336,4 +336,17 @@ export class PinWidget {
return this.fetchPin().then(this.renderPin.bind(this));
}
+
+ /**
+ * Determine the height of the contents to allow resizing after first layout.
+ *
+ * @return {number|null}
+ */
+ height() {
+ return (
+ this.heightOwnerElement_
+ .getBo... | [No CFG could be retrieved] | Fetch the pin and render it. | Does `/* REVIEW */` have any special meaning? |
@@ -85,15 +85,17 @@ func (d *Desc) FindIngestersByState(state IngesterState) []*IngesterDesc {
// Ready is true when all ingesters are active and healthy.
func (d *Desc) Ready(heartbeatTimeout time.Duration) bool {
+ numTokens := len(d.Tokens)
for _, ingester := range d.Ingesters {
if time.Now().Sub(time.Unix(... | [Ready->[Sub,Unix,Now],AddIngester->[Unix,Now,Sort]] | Ready returns true if the descriptor is ready to be sent to the server. | I find this change interesting - why do we want to go ready when we don't have any tokens? |
@@ -327,6 +327,9 @@ public class ChunkOutputWidget extends Composite
{
int contentHeight = root_.getElement().getOffsetHeight() + 19;
height = Math.max(ChunkOutputUi.MIN_CHUNK_HEIGHT, contentHeight);
+
+ // clamp height of widgets
+ height = Math.min(height, 650);
... | [ChunkOutputWidget->[clearCollapsedStyles->[collapsed],completeInterrupt->[showReadyState],hasPlots->[hasPlots],RenderTimer->[cancel->[cancel]],initializeOutput->[attachPresenter,syncHeight],onOutputFinished->[syncHeight],updatePlot->[updatePlot,pendingResize],setPlotPending->[setPlotPending,pendingResize],onResize->[o... | Synchronizes the height of the chunk. | Should use `MAX_CHUNK_HEIGHT`? |
@@ -86,8 +86,7 @@ module GobiertoBudgets
def debt(year = nil)
year ||= @year
- @data[:debt][year] ||= SearchEngine.client.get(index: SearchEngineConfiguration::Data.index,
- type: SearchEngineConfiguration::Data.type_debt, id: [@site.organization_id... | [SiteStats->[total_budget_executed_percentage->[total_budget_executed,total_budget],debt_level->[debt],latest_available->[has_data?],has_available?->[has_data?]]] | Returns the debt sequence for the given year. | Line is too long. [212/180] |
@@ -351,13 +351,15 @@ module Features
click_send_security_code
end
- def register_user(email)
+ def register_user(email = 'test@test.com')
+ allow(FeatureManagement).to receive(:prefill_otp_codes?).and_return(true)
click_link t('sign_up.registrations.create_account')
- submit_form_w... | [sign_in_with_totp_enabled_user->[sign_in_user],sign_in_live_with_2fa->[sign_in_user],sign_in_user->[signin],sign_in_and_2fa_user->[sign_in_with_warden],sign_in_via_branded_page->[fill_in_credentials_and_submit],register_user->[click_confirmation_link_in_email]] | clicks a link to sign up a user with a 2FA code and then submits. | This method and the next are borrowed from #1581 |
@@ -28,7 +28,13 @@ module Engine
let(:hex_h13) { game.hex_by_id('H13') }
let(:hex_i12) { game.hex_by_id('I12') }
- subject { Round::Operating.new([corporation], game: game, round_num: 1) }
+ subject do
+ Round::Operating.new([corporation],
+ game: game,
+ ... | [par_prices,companies,new,let,describe,corporation_by_id,subject,for,first,it,to,before,process_action,set_par,require,cash,hex_by_id,company_by_id,context,player_by_id,owner,eq,raise_error] | 9. 1. 2. 2 find all components of a network that can handle a specific color. | your missing some linebreaks here |
@@ -128,7 +128,7 @@ public class CachingClusteredClient<T> implements QueryRunner<T>
final boolean isBySegment = Boolean.parseBoolean(query.getContextValue("bySegment", "false"));
- ImmutableMap.Builder<String, String> contextBuilder = new ImmutableMap.Builder<String, String>();
+ ImmutableMap.Builder<St... | [CachingClusteredClient->[run->[addSequencesFromServer->[run]]]] | Returns a sequence of segments that can be used to run the given query. Adds a chunk to the list of segments that can be queried. Add a sequence from the server. Add all the sequences from the server. This method is called when a new segment is requested. | separate from these changes, we put a flag intermediate in the context, any idea where is this flag used? |
@@ -0,0 +1,12 @@
+# frozen_string_literal: true
+
+module Canary
+ module Types
+ module InputObjects
+ class LibraryEntryOrder < Canary::Types::InputObjects::Base
+ argument :field, Canary::Types::Enums::LibraryEntryOrderField, required: true
+ argument :direction, Canary::Types::Enums::OrderDir... | [No CFG could be retrieved] | No Summary Found. | Similar blocks of code found in 15 locations. Consider refactoring. |
@@ -679,7 +679,12 @@ while ($i < ($limit ? min($num, $limit) : $num))
}
// Force call prod->load_stats_xxx to choose status to count (otherwise it is loaded by load_stock function)
+ $draftordered = 0;
if (isset($draftchecked)) {
+ if(!empty($usevirtualstock)){
+ $result = $p... | [fetch,create,fetch_object,lasterror,addline,load_stats_commande_fournisseur,get_buyprice,order,getNomUrl,rollback,begin,initHooks,plimit,select_product_fourn_price,executeHooks,loadLangs,escape,getDefaultLang,close,showFilterAndCheckAddButtons,load_stock,free,query,ifsql,trans,num_rows,selectWarehouses,fetch_thirdpart... | This function returns the number of product - related objects. seuil_stock_alertepse - > seuil_stock_. | Into $prod->load_stats_commande_fournisseur we already have the '0' status here. So why getting it a second time before ? |
@@ -269,6 +269,11 @@ class Port extends DeviceRelatedModel
return $this->hasMany(\App\Models\PortsFdb::class, 'port_id', 'port_id');
}
+ public function groups()
+ {
+ return $this->belongsToMany(\App\Models\PortGroup::class, 'port_group_port', 'port_id', 'port_group_id');
+ }
+
pub... | [Port->[scopeIsDown->[where],scopeIsNotDeleted->[where],pseudowires->[hasMany],boot->[delete],nac->[hasMany],adsl->[hasMany],fdbEntries->[hasMany],scopeIsDeleted->[where],ipv6->[hasMany],events->[morphMany],statistics->[hasMany],scopeIsDisabled->[where],canAccess->[hasGlobalRead],macAccounting->[hasMany],ospfNeighbors-... | return all ports fdb entries or ipv4 entries. | you shouldn't even need to add the extra arguments there |
@@ -258,6 +258,14 @@ EOT
);
$input->setOption('stability', $minimumStability);
+ $type = $input->getOption('type') ?: false;
+ $type = $dialog->ask(
+ $output,
+ $dialog->getQuestion('Type', $type),
+ $type
+ );
+ $input->setOption('type',... | [InitCommand->[formatAuthors->[parseAuthorString],interact->[parseAuthorString],findBestVersionForPackage->[getMinimumStability,getPool],determineRequirements->[findPackages],getPool->[getRepos]]] | Interacts with the composer config generator. Prompts user for a and sets the input options. Returns the value of the object if it exists. | The question should be "Package Type". We need to choose a default type between "project" and "library". |
@@ -242,7 +242,7 @@ function poco_check($profile_url, $name, $network, $profile_photo, $about, $loca
if (($network == "") AND ($x[0]["network"] != NETWORK_STATUSNET))
$network = $x[0]["network"];
- if ($updated == "0000-00-00 00:00:00")
+ if ($updated <= NULL_DATE)
$updated = $x[0]["updated"];
$crea... | [poco_last_updated->[item,registerNamespace,query,loadXML],poco_load->[get_curl_code]] | This function is used to check if a contact is on a given profile. This function is used to get all the information from a network. This function is used to probe a user s profile for a specific entry. | Standards: Can you please add braces to this condition? |
@@ -651,6 +651,18 @@ class _Activator(object):
prefix, 'etc', 'conda', 'deactivate.d', '*' + self.script_extension
)), reverse=True))
+ def _get_environment_env_vars(self, prefix):
+ env_vars = {}
+ env_vars_file = join(prefix, 'etc', 'conda', 'env_vars')
+ if exists(env_... | [main->[execute,__init__],_Activator->[reactivate->[_finalize],get_scripts_export_unset_vars->[get_export_unset_vars],deactivate->[_finalize],_prompt_modifier->[_default_env],_replace_prefix_in_path->[_get_path_dirs,_get_starting_path_list,index_of_path],_add_prefix_to_path->[_get_path_dirs,_get_starting_path_list],bui... | Get the list of scripts that should be deactivated. | I think this needs to go in `conda-meta/`. That's the location that's completely off limits to packages. Otherwise any rando package on anaconda.org could overwrite that location. |
@@ -469,6 +469,8 @@ abstract class NotificationsServiceUnitTestCase extends IntegratedUnitTestCase {
$this->assertEquals(1, $before_call_count);
$this->assertEquals(1, $after_call_count);
+
+ _elgg_services()->reset('subscriptions');
}
public function testCanProcessSubscriptionNotificationsQueue() {
| [NotificationsServiceUnitTestCase->[testRegisterMethod->[setupServices],testCanNotifyUserWithoutAnObject->[setupServices],testCanNotifyUser->[getTestObject,setupServices],testProcessQueueThreeEvents->[getTestObject,setupServices],testProcessQueueNoEvents->[setupServices],testValidatesObjectExistenceForDequeuedSubscript... | This test can use hooks before and after subscription notifications queue Test can process subscription notifications queue This method checks if the notification is being sent to the given recipient. | if a test fails the reset isn't executed and you leave behind garbage |
@@ -814,5 +814,9 @@ public interface Log extends BasicLogger {
@LogMessage(level = WARN)
@Message(value = "Unexpected error closing resource", id = 175)
void failedToCloseResource(@Cause Throwable e);
-
+
+ @LogMessage(level = WARN)
+ @Message(value = "Eviction wakeUpInterval configuration is now dep... | [No CFG could be retrieved] | Unexpected error closing resource. | Hmm, perhaps word this differently, since this is specific to the XML configuration? _The 'wakeUpInterval' attribute of the 'eviction' configuration XML element is deprecated. Setting the 'wakeUpInterval' attribute of the 'expiration' configuration XML element to %d instead._ |
@@ -90,7 +90,7 @@ func replicationTestFactory(oc *exutil.CLI, tc testCase) func() {
err = oc.Run("new-app").Args("-f", tc.TemplatePath).Execute()
o.Expect(err).NotTo(o.HaveOccurred())
- err = oc.Run("new-app").Args("-f", helperTemplate, "-p", fmt.Sprintf("DATABASE_SERVICE_NAME=%s", helperName)).Execute()
+ er... | [KubeClient,By,WaitUntilPodIsGone,Resource,SetOutputDir,Expect,SetupHostPathVolumes,HaveOccurred,PersistentVolumes,FixturePath,It,WaitForAnEndpoint,WaitForQueryOutputContains,Args,AsAdmin,To,KubeConfigPath,ReplicationControllers,AdminKubeClient,Namespace,PodName,KubeFramework,Equal,Execute,NewCLI,DumpImageStreams,NotTo... | replicationTestFactory creates a test function that will run the tests for the given testCase. Database creates a table with all the necessary replication helpers. | i don't see a MYSQL_VERSION parameter in the mysql_replica templates? |
@@ -287,6 +287,11 @@ func (ms *MetricSet) getProcessInfos() ([]*ProcessInfo, error) {
for _, pid := range pids {
process, err := sysinfo.Process(pid)
if err != nil {
+ if os.IsNotExist(err) {
+ // Skip - process probably just terminated since our call
+ // to Pids()
+ continue
+ }
return nil, e... | [Close->[Close],reportState->[String],Hash->[String],String,toMapStr] | getProcessInfos returns a list of ProcessInfo objects for all processes in the system Returns a new object that represents the result of a call to the method. | None of the userspace process info gathering logic is atomic so you could get a similar failure when calling `process.Info()`. The errors that you get will differ across operating systems since the underlying collection means is different. Another error handling approach could be to treat `types.ErrNotImplemented` as a... |
@@ -174,11 +174,11 @@ public abstract class AbstractHoodieLogRecordReader {
return this.simpleKeyGenFields.get().getKey();
}
- public void scan() {
+ public synchronized void scan() {
scan(Option.empty());
}
- public void scan(Option<List<String>> keys) {
+ public synchronized void scan(Option<L... | [AbstractHoodieLogRecordReader->[processQueuedBlocksForInstant->[processDataBlock],scan->[scan,getKeyField]]] | Get the key field based on populate meta fields. Checks if a log block with the given instant time is not already in the current log blocks This method is called when a log entry is read from the log file and if the log This method checks if the last read block is a rollback command block or delete block. | Why does scan have to be synchronized? Metadata table can be accessed in read mode by multiple readers right? |
@@ -79,7 +79,13 @@ import static java.util.stream.Collectors.toList;
public class TestingPrestoClient
extends AbstractTestingPrestoClient<MaterializedResult>
{
- private static final DateTimeFormatter timeWithZoneOffsetFormat = DateTimeFormatter.ofPattern("HH:mm:ss[.SSS]XXX");
+ private static final Da... | [TestingPrestoClient->[convertToRowValue->[convertToRowValue],MaterializedResultSession->[build->[build]]]] | Imports a single object from the pre - parameterized type. This class is used to create a new instance of the object that will be used to populate. | Typo in commit message: :"picoseond" |
@@ -648,10 +648,10 @@ namespace System.Windows.Forms
// Corner case -- last character in Text is a new line; need to add blank line to list
if (text.Length > 0 && (text[text.Length - 1] == '\r' || text[text.Length - 1] == '\n'))
{
- list.Add("");
+ ... | [TextBoxBase->[OnFontChanged->[AdjustHeight,OnFontChanged],InitializeDCForWmCtlColor->[InitializeDCForWmCtlColor],ToString->[ToString],OnHandleDestroyed->[OnHandleDestroyed,GetSelectionStartAndLength],OnMouseUp->[OnMouseUp],OnHandleCreated->[AdjustHeight,OnHandleCreated],SetBoundsCore->[SetBoundsCore],WmReflectCommand-... | region > Lines method Replies or sets the maximum number of characters the user can type into the text box control. | @gpetrou , i just put it on hold because `list `is not explicitly disposed here after creating array and returning it. I do not have a suggestion if there is a better way to do that. Will merge if i do not have any other suggestion here. |
@@ -966,6 +966,9 @@ public class StateConsumerImpl implements StateConsumer {
// Keys that we used to own, and need to be removed from the data container AND the cache stores
final ConcurrentHashSet<Object> keysToRemove = new ConcurrentHashSet<>();
+ // This has to be invoked before removing the se... | [StateConsumerImpl->[requestSegments->[findSources],getSegment->[getSegment],onTopologyUpdate->[stopApplyingState],notifyEndOfStateTransferIfNeeded->[hasActiveTransfers,stopApplyingState],onTaskCompletion->[removeTransfer,notifyEndOfStateTransferIfNeeded],requestTransactions->[applyTransactions,findSources],addTransfer... | Removes stale segments from the data container. Ignore shutdown - related errors. | Technically the local node stopped being read owner in the `READ_NEW_WRITE_ALL` phase, and we only remove the segments later, in the `NO_REBALANCE` phase. |
@@ -0,0 +1,13 @@
+import sys
+
+
+if sys.version_info < (3, 8):
+ try:
+ import pickle5 as pickle # noqa: F401
+ from pickle5 import Pickler # noqa: F401
+ except ImportError:
+ import pickle # noqa: F401
+ from pickle import _Pickler as Pickler # noqa: F401
+else:
+ import pick... | [No CFG could be retrieved] | No Summary Found. | Again, manually verified against the 'v1.6.0' version. |
@@ -453,11 +453,11 @@ class BuildGraph(AbstractClass):
continue
if walk.do_work_once(address):
ordered_closure.add(target)
- for addr in self._target_dependencies_by_address[address]:
- if walk.expanded_or_worked(addr):
+ for dep_address in self._target_dependencies_by_address[... | [sort_targets->[topological_sort->[topological_sort],invert_dependencies,topological_sort],BuildGraph->[sorted_targets->[targets],get_derived_from->[get_target],inject_target->[get_target,contains_address],inject_dependency->[dependencies_of],walk_transitive_dependency_graph->[_walk_rec->[expanded_or_worked,_walk_rec,e... | Returns the transitive dependency closure of addresses using BFS. This is a convenience method for accessing the public critical section of the BuildGraph. It is. | I expect that a fair amount of your slowdown is switching from `if not predicate` to always calling the method... unfortunately, the null-object pattern is a bit more expensive in python than elsewhere =( I would rather land this and then do holistic optimization that micro-optimize here too much though. |
@@ -102,6 +102,16 @@ public final class ParameterTypeModelValidator implements ExtensionModelValidato
.map(descriptor -> descriptor.getExtensionParameter().getType())
.ifPresent(type -> {
final String typeName = type.getName();
+
+ Class<?> clazz = type.getD... | [ParameterTypeModelValidator->[validate->[walk,isCompiletime],validateParameterType->[visitObject->[forEach,isMap,addError,checkInvalidFieldAnnotations,getName,accept,Problem,format,add,ifPresent],checkInvalidFieldAnnotations->[addError,getName,getSimpleName,isPresent,Problem,format],visitBoolean->[addError,isPrimitive... | Checks if the parameter is of type unknown. Checks if a type has a field with a name that is not allowed by the given annotations. | How are you sure that type.getDeclaringClass() is not empty() ? |
@@ -23,6 +23,7 @@ import java.util.concurrent.TimeUnit;
/**
* A skeletal {@link Future} implementation which represents a {@link Future} which has been completed already.
*/
+@Deprecated(forRemoval = true)
public abstract class CompleteFuture<V> implements Future<V> {
private final EventExecutor executor;
| [CompleteFuture->[await->[interrupted,InterruptedException],addListener->[executor,notifyListener0,safeExecute,requireNonNull]]] | Creates a new CompletableFuture instance which represents a single object in the future. Await for the result of this method call. | Why not just remove ? |
@@ -347,11 +347,12 @@ class UserAddressManager:
def _maybe_address_reachability_changed(self, address: Address) -> None:
# A Raiden node may have multiple Matrix users, this happens when
# Raiden roams from a Matrix server to another. This loop goes over all
- # these users and uses the "b... | [login->[login_with_token,is_valid_username,first_login],make_client->[sort_servers_closest],UserAddressManager->[_presence_listener->[address_from_userid,is_address_known,_maybe_address_reachability_changed,UserPresence,warm_users,add_userid_for_address],_fetch_user_presence->[UserPresence],populate_userids_for_addres... | If the address reachability state has changed update the state and call the callback. | I just had a discussion with @ulope about the feasability of allowing multiple users of the same address online. This should actually be forbidden per definition because it would imply multiple usage of the same keystore. A raiden node could prevent starting if a user for the same address is found online. |
@@ -171,6 +171,9 @@ def subdispatch_to_paymenttask(node_state, state_change, secrethash):
)
events = sub_iteration.events
+ if sub_iteration and sub_iteration.new_state is None:
+ del node_state.payment_mapping.secrethashes_to_task[secrethash]
+
return Transiti... | [handle_tokenadded->[maybe_add_tokennetwork],handle_receive_transfer_refund->[subdispatch_to_paymenttask],handle_receive_unlock->[subdispatch_to_paymenttask],handle_block->[subdispatch_to_all_lockedtransfers,subdispatch_to_all_channels],subdispatch_mediatortask->[get_token_network],handle_secret_reveal->[subdispatch_to... | This function is called when a sub - task is in the state of a payment task. This function is called when a node transition is complete. | I'm having problems to understand why this is needed. Does `sub_iteration.new_state == None` signal that the payment is finished and we subsequently clean up the task from the `secrethashes_to_task` mapping? Is there more stuff that should be removed in this case? |
@@ -1014,6 +1014,7 @@ class PipelineBasedStreamingInsertTest(_TestCaseWithTempDirCleanUp):
# Set a batch size such that the input elements will be inserted
# in 2 batches.
batch_size=2,
+ triggering_frequency=None,
create_disposition='CREATE_NEVER... | [TestTableRowJsonCoder->[test_invalid_json_nan->[json_compliance_exception],test_invalid_json_inf->[json_compliance_exception],test_row_as_table_row->[value_or_decimal_to_json],test_invalid_json_neg_inf->[json_compliance_exception]],TestReadFromBigQuery->[test_get_destination_uri_empty_runtime_vp->[UserDefinedOptions],... | Test batch size with auto - sharding. This test checks if there are no missing records in the cluster. | can we make sure that users are not forced to define a triggering_frequency for their pipelines unless they're using file loads in streaming? |
@@ -0,0 +1,12 @@
+package net.baeldung.services;
+
+import net.baeldung.transfer.LoginForm;
+import org.springframework.stereotype.Service;
+
+@Service
+public class ExampleService {
+
+ public boolean fakeAuthenticate(LoginForm lf) {
+ return (lf.getUsername().equals(lf.getUsername()) && lf.getPa... | [No CFG could be retrieved] | No Summary Found. | Wouldn't it be easier to simply return true? |
@@ -2076,6 +2076,7 @@ RtpsUdpDataLink::RtpsWriter::add_reader(const ReaderInfo_rch& reader)
reader->max_pvs_sn_ = max_sn_;
}
#endif
+ reader->start_sn_ = max_sn_ + 1;
remote_readers_.insert(ReaderInfoMap::value_type(reader->id_, reader));
preassociation_readers_.insert(reader);
| [No CFG could be retrieved] | Add a message to the list of received messages. - - - - - - - - - - - - - - - - - -. | Initialize start_sn_ in constructor and make const. |
@@ -190,7 +190,7 @@ abstract class PoolArena<T> extends SizeClasses implements PoolArenaMetric {
}
}
- // Method must be called inside synchronized(this) { ... } block
+ // Method must be called inside synchronized(this) { ... } block
private void allocateNormal(PooledByteBuf<T> buf, int reqC... | [PoolArena->[freeChunk->[free],reallocate->[allocate,free],allocateNormal->[allocate],HeapArena->[newUnpooledChunk->[newByteArray],newChunk->[newByteArray]],finalize->[finalize],tcacheAllocateSmall->[allocate],numActiveSmallAllocations->[numSmallDeallocations,numSmallAllocations],allocate->[allocate],toString->[toStrin... | Allocate a normal buffer from the cache. | let's put a proper `assert` with monitor check |
@@ -124,7 +124,8 @@ public class KafkaStreamsTest {
.statusCode(HttpStatus.SC_SERVICE_UNAVAILABLE)
.body("checks[0].name", CoreMatchers.is("Kafka Streams topics health check"))
.body("checks[0].status", CoreMatchers.is("DOWN"))
- .body("checks[0].data.mi... | [KafkaStreamsTest->[testKafkaStreams->[createConsumer],produceCustomers->[createCustomerProducer,createCategoryProducer],poll->[poll]]] | Tests if Kafka Streams is not alive and not ready. | Why is the processed topic expected now? It somehow seems that now also sink topics are awaited? If so, I don't think that'd be adviseable, as they only might be created by running the app itself, causing a dead-lock effectively. |
@@ -119,7 +119,8 @@ type listener struct {
job job.Job
runs sync.Map
shutdownWaitGroup sync.WaitGroup
- mbLogs *utils.Mailbox
+ mbOracleRequests *utils.Mailbox
+ mbOracleCancelRequests *utils.Mailbox
minIncomingConfirmations uint64
re... | [ServicesForSpec->[MinIncomingConfirmations,NewOperator,Errorf,Address,NewMailbox],handleCancelOracleRequest->[Errorw,DefaultQueryCtx,WithContext,String,MarkConsumed,LoadAndDelete],handleOracleRequest->[GormTransaction,DefaultQueryCtx,With,Done,Add,MinimumContractPayment,ToStrings,ValueOrZero,ExecuteRun,Errorw,Link,Inf... | Start registers a listener for the given object. Close complies with job. Service interface. | These should never be nil, would it make more sense to not use a pointer here? |
@@ -151,6 +151,18 @@ export class AmpAdNetworkAdzerkImpl extends AmpA4A {
/** @override */
getAmpAdMetadata(unusedCreative) {
+ if (this.ampCreativeJson_.analytics) {
+ if (!this.creativeMetadata_) {
+ this.creativeMetadata_ = /**@type {?CreativeMetaDataDef}*/ ({});
+ }
+ if (!this.crea... | [No CFG could be retrieved] | A minified version of the creative suitable to be rendered as an amp4ads ad. | should you just load the analytics extension? |
@@ -194,6 +194,7 @@ def initiator_init(
token_network_address: TokenNetworkAddress,
target_address: TargetAddress,
lock_timeout: BlockTimeout = None,
+ routes: List[RouteState] = None,
) -> Tuple[Optional[str], ActionInitInitiator]:
transfer_state = TransferDescriptionWithSecretState(
t... | [SyncTimeout->[should_continue->[time_elapsed]],RaidenService->[_best_effort_synchronize_with_confirmed_head->[_log_sync_progress,SyncTimeout,get_block_number,handle_and_track_state_changes,should_continue,time_elapsed],handle_and_track_state_changes->[add_pending_greenlet],start_mediated_transfer_with_secret->[Payment... | Initiate a new action with a token. | Nitpick: It might make sense to call this and the occurrences below `route_states` to prevent confusion. |
@@ -40,10 +40,12 @@ class Legion(CMakePackage):
variant('mpi', default=True,
description='Build on top of mpi conduit for mpi inoperability')
variant('shared', default=True, description='Build shared libraries')
+ variant('hdf5', default=True, description='Enable HDF5 support')
depends_... | [Legion->[cmake_args->[append],variant,depends_on,version]] | Return a list of CMake command line options for the object. | @tuxfan does this only work with `hdf5~mpi` or would `hdf5` also work? If you're goal is to avoid building an `mpi` implementation to save time, you can specify that on the command line like `spack install legion+hdf5 ^hdf5~mpi`. |
@@ -39,6 +39,8 @@ namespace Dynamo.LintingViewExtension
this.linterViewModel = new LinterViewModel(linterManager, viewLoadedParamsReference);
this.linterView = new LinterView() { DataContext = linterViewModel };
+ linterViewModel.ActiveLinter = linterManager.ActiveLinter;
+
... | [LintingViewExtension->[Closed->[linterMenuItem,IsChecked],MenuItemUnCheckedHandler->[CloseExtensioninInSideBar],MenuItemCheckHandler->[linterView,viewLoadedParamsReference],Dispose->[Unchecked,Checked],Loaded->[linterManager,linterMenuItem,AddExtensionMenuItem,LinterManager,linterViewModel,MenuItemText,Checked,viewLoa... | Initialize the linter view model and linter menu. | we can remove this if we rely on LinterManager direct access for ActiveLinter property |
@@ -345,13 +345,14 @@ export class SubscriptionService {
/**
* Unblock document based on grant state and selected platform
+ * @param {boolean=} doPlatformSelection
* @private
*/
- startAuthorizationFlow_() {
+ startAuthorizationFlow_(doPlatformSelection = true) {
this.platformStore_.getGrantS... | [No CFG could be retrieved] | Provides a singleton dialog instance for the user. Returns a map of subscription tokens and whether the subscription is granted or metering. | Switch to `if () {}` per AMP's styleguide. |
@@ -185,6 +185,9 @@ class TestAnalyze(TextAnalyticsTest):
],
polling_interval=self._interval(),
)
+
+ @pytest.mark.skip("Throws 400 on POST: (InvalidRequest) Job task parameter value bad is not supported for model-version "
+ "parameter for job task type... | [TestAnalyze->[test_bad_credentials->[_interval],test_too_many_documents->[_interval],test_missing_input_records_error->[_interval],test_show_stats_and_model_version_multiple_tasks->[_interval],test_empty_credential_class->[_interval],test_bad_request_on_empty_document->[_interval],test_no_single_input->[_interval],tes... | Test for errors in the batch actions. | need to follow up on this behavior change |
@@ -513,7 +513,10 @@ func (bs *balanceSolver) solve() []*operator.Operator {
}
for i := 0; i < len(ops); i++ {
- bs.sche.addPendingInfluence(ops[i], best.srcStoreID, best.dstStoreID, infls[i], bs.rwTy, bs.opTy)
+ // TODO: multiple operators need to be atomic.
+ if !bs.sche.addPendingInfluence(ops[i], best.srcS... | [filterDstStores->[GetName],solve->[addPendingInfluence,isValid],getRegion->[isRegionAvailable],Schedule->[GetName],addPendingInfluence->[GetName],buildOperators->[isReadyToBuild,GetName],gcRegionPendings->[GetName],allowBalance->[allowBalanceRegion,allowBalanceLeader],balanceHotReadRegions->[GetName],isRegionAvailable... | solve returns the list of operators that can be performed on the current state of the balance solver. | Their region id may not be the same for different ops |
@@ -6074,7 +6074,16 @@ IRBuilder::BuildProfiledCallI(Js::OpCode opcode, uint32 offset, Js::RegSlot retu
newOpcode = opcode;
Js::OpCodeUtil::ConvertNonCallOpToNonProfiled(newOpcode);
Assert(newOpcode == Js::OpCode::NewScObject || newOpcode == Js::OpCode::NewScObjectSpread);
- returnType... | [No CFG could be retrieved] | The function that calls a function with a specific number of arguments. if this function has no time info insert a bail on no profile if it has no time. | Can we just have "returnType = knownReturnType" or "returnType = this->m_func->GetReadOnlyProfileInfo()->GetReturnType(opcode, profileId)" instead of the if-else? |
@@ -30,4 +30,18 @@ public class Hessian2SerializerFactory extends SerializerFactory {
return Thread.currentThread().getContextClassLoader();
}
+ @Override
+ public Deserializer getDeserializer(String type)
+ throws HessianProtocolException {
+ if (type == null || type.equals("") ... | [Hessian2SerializerFactory->[Hessian2SerializerFactory]] | Returns the context class loader. | Here you can use StringUtils#isEmpty this method to replace it |
@@ -22,6 +22,7 @@ import org.apache.nifi.parameter.ParameterLookup;
import org.junit.Assert;
import java.util.HashMap;
+import java.util.LinkedHashMap;
import java.util.Map;
import java.util.Set;
import java.util.function.Consumer;
| [CompositeUserGroupProviderTestBase->[initCompositeUserGroupProvider->[mockProperties]]] | Imports a composite user group provider. region User Identity. | According to the automated build, this import is no longer used and should be removed. |
@@ -31,6 +31,7 @@ namespace System.Diagnostics
private bool _isRemoteMachine;
private string _machineName;
private ProcessInfo? _processInfo;
+ private string? _processName;
private ProcessThreadCollection? _threads;
private ProcessModuleCollection? _modules;
| [Process->[WaitForInputIdle->[WaitForInputIdle],GetProcessesByName->[GetProcessesByName],EnsureState->[ThrowIfExited,EnsureState],WaitForExit->[RaiseOnExited,WaitForExit],Start->[Start,Close],StopWatchingForExit->[Dispose],RaiseOnExited->[OnExited],ToString->[ToString],Close->[Close,Dispose],GetProcesses->[GetProcesses... | Construct a partial class that represents a single process in a system. Constructor for a wait handle. | This can also be moved to Process.Windows.cs. |
@@ -2402,6 +2402,11 @@ var validateCloudWatchEventArchiveName = validation.All(
validation.StringMatch(regexp.MustCompile(`^[\.\-_A-Za-z0-9]+`), ""),
)
+var validateMQBrokerName = validation.All(
+ validation.StringLenBetween(1, 50),
+ validation.StringMatch(regexp.MustCompile(`^[0-9A-Za-z._~-]+$`), ""),
+)
+
var... | [StringLenBetween,StringInSlice,MatchString,GetOk,New,All,StringDoesNotMatch,Errorf,ParseCIDR,ParseInt,MustCompile,HasSuffix,To4,Any,Join,Contains,NormalizeJsonString,ToLower,Get,MatchReader,Query,StringMatch,EqualFold,NewReader,Sprintf,String,Parse,CIDRBlocksEqual,ParseFloat] | ValidateNestedExactlyOneOf validates a single object in the given map. MapMaxItems returns a SchemaValidateFunc that validates a map of items with a maximum number. | When I've tried in the AWS Console, it doesn't accept `~` or `.` |
@@ -62,7 +62,7 @@ struct current_status {
int cur_dkey_num;
int cur_akey_num;
int cur_rank;
- daos_epoch_t cur_eph;
+ int cur_tx;
};
enum rec_types {
| [generate_io_conf_dkey->[generate_io_conf_akey],generate_io_conf_obj->[generate_io_conf_dkey],generate_io_conf_rec->[choose_op],main->[generate_io_conf_obj,print_usage],generate_io_conf_akey->[generate_io_conf_rec]] | The Government s API provides a simple interface to generate the epoch io test. Create a single object from a single object. | (style) please, no space before tabs |
@@ -62,13 +62,7 @@ Spdp::Spdp(DDS::DomainId_t domain, RepoId& guid,
sedp_.init(guid_, *disco, domain_);
{ // Append metatraffic unicast locator
- const ACE_INET_Addr& local_addr = sedp_.local_address();
- OpenDDS::DCPS::Locator_t uc_locator;
- uc_locator.kind = address_to_kind(local_addr);
- uc_loca... | [No CFG could be retrieved] | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -. | Extra local scope { } doesn't appear to be doing anything here. |
@@ -4352,6 +4352,18 @@ def where_v2(condition, x=None, y=None, name=None):
<tf.Tensor: shape=(4,), dtype=int32, numpy=array([100, 100, 100, 100],
dtype=int32)>
+ Note that if any of the input to a tf.where contains 'NaN's, then the gradient will always
+ be 'NaN', regardless whether the input is actually used... | [identity->[identity],reverse_sequence->[reverse_sequence],zeros->[_constant_if_small,fill,reshape],reshape->[reshape],boolean_mask->[concat,_apply_mask_1d,shape,reshape],extract_image_patches->[extract_image_patches],rank_internal->[size,rank],_SliceHelperVar->[_slice_helper],repeat_with_axis->[expand_dims,reshape,con... | This operator handles the where operator for tensor - based models. A tensor which is of the same shape as x and has a shape broadcastable with condition a Tensor with shape num_true dim_size ( condition ). | That's not true. The issue is more like Please note that if the gradient of either branch of the `tf.where` generates a NaN then the gradient of the entire `tf.where` will be NaN. For example, `tf.where(y > 0, tf.sqrt(y), y)` has a NaN gradient if `y` has any negative numbers in it. To avoid the NaN you need to avoid c... |
@@ -478,9 +478,15 @@ class ComposerRepository extends ArrayRepository implements ConfigurableReposito
$results = array();
foreach ($search['results'] as $result) {
// do not show virtual packages in results as they are not directly useful from a composer perspective
- ... | [ComposerRepository->[createPackages->[getRepoName,configurePackageTransportOptions,loadPackages],addPackage->[configurePackageTransportOptions],getPackageNames->[getPackages],initializePartialPackages->[loadRootServerFile],loadIncludes->[loadIncludes],loadRootServerFile->[getPackagesJsonUrl],loadProviderListings->[loa... | Search for a node in the system. | this looks wrong, as you will turn `false` into `true` |
@@ -454,12 +454,12 @@ if(! function_exists('perms2str')) {
*/
function perms2str($p) {
$ret = '';
- if(is_array($p))
+ if (is_array($p))
$tmp = $p;
else
$tmp = explode(',',$p);
- if(is_array($tmp)) {
+ if (is_array($tmp)) {
array_walk($tmp,'sanitise_acl');
$ret = implode('',$tmp);
}
| [dlogger->[save_timestamp],get_intltext_template->[save_timestamp],get_plink->[remove_baseurl],replace_macros->[save_timestamp,replace_macros,template_engine,getMessage],text_highlight->[setRenderer,highlight],load_view_file->[save_timestamp],logger->[save_timestamp],get_markup_template->[save_timestamp,template_engine... | Convert permissions to string. | Could you add the brackets here? |
@@ -31,6 +31,7 @@ namespace DotNetNuke
services.AddTransient(x => PortalController.Instance);
services.AddScoped<IHostSettingsService, HostController>();
services.AddScoped<INavigationManager, NavigationManager>();
+ services.AddTransient<ISerializationManager, ISeriali... | [Startup->[ConfigureServices->[AddTransient,Instance,services]]] | Configure the given services. | We need to update the registration here to resolve `SerializationManager` instead of attempting to resolve an interface which will throw an exception |
@@ -271,10 +271,10 @@ public abstract class TestOzoneRpcClientAbstract {
throws IOException {
String volumeName = UUID.randomUUID().toString();
store.createVolume(volumeName);
- store.getVolume(volumeName).setQuota(
- OzoneQuota.parseQuota("100000000 BYTES"));
+ store.getVolume(volumeName)... | [TestOzoneRpcClientAbstract->[readKey->[readKey],testGetKeyDetails->[readKey],testReadKeyWithCorruptedData->[readKey],testPutKey->[verifyRatisReplication],testNativeAclsForPrefix->[validateDefaultAcls],completeMultipartUpload->[completeMultipartUpload],testPutKeyRatisThreeNodesParallel->[verifyRatisReplication],testPut... | Sets volume quota and deletes volume. | The same as above. We should verify two quota attributes if the `OzoneQuota` has two attributes. |
@@ -17,6 +17,7 @@ from UM.i18n import i18nCatalog
from UM.Version import Version
from cura import ApplicationMetadata
+from cura.CuraVersion import CuraMarketplaceRoot
from cura.CuraApplication import CuraApplication
from cura.Machines.ContainerTree import ContainerTree
from plugins.Toolbox.src.CloudApiModel imp... | [Toolbox->[resetMaterialsQualitiesAndUninstall->[_resetUninstallVariables,closeConfirmResetDialog],_onDownloadFailed->[resetDownload],launch->[_restart],_onDataRequestFinished->[isLoadingComplete],_updateInstalledModels->[_convertPluginMetadata],install->[_updateInstalledModels],uninstall->[_updateInstalledModels],onLi... | Toolbox class for the cura application. This class is used to initialize the object that will be used to update the package_ids. | This import should be surrounded with try.. catch. See other implementations |
@@ -126,6 +126,7 @@ class ConnectionManager: # pragma: no unittest
self.token_address = token_network_state.token_address
self.lock = Semaphore() #: protects self.funds and self.initial_channel_target
+ self._retry_greenlet: Optional[Greenlet] = None
self.api = RaidenAPI(raiden)
... | [ConnectionManager->[_open_channels->[_find_new_partners],connect->[log_open_channels]]] | Initialize a raiden node. Attempts to join the token network. This method is called when a node has no channel to connect to. It is called when. | nit: no other variable is prefixed with `_` |
@@ -375,8 +375,10 @@ func (sc *scaleCmd) run(cmd *cobra.Command, args []string) error {
addValue(parametersJSON, sc.agentPool.Name+"Count", countForTemplate)
+ // The agent pool is set to index 0 for the scale operation, we need to overwrite the template variables that rely on pool index.
if winPoolIndex != -1 ... | [drainNodes->[Wrapf,SafelyDrainNode,Sprintf,Duration,Errorf,HasPrefix],saveAPIModel->[LoadContainerServiceFromFile,SerializeContainerService,Split,SaveFile],validate->[LoadTranslations,NormalizeAzureRegion,Infoln,New,Usage,Wrap],run->[PrettyPrintArmTemplate,drainNodes,Errorln,Values,Now,Front,NormalizeForK8sVMASScaling... | run runs the scale command This function is used to scale down a cluster s agent pool and drain down the virtual machines Errorf returns an error if there is a VMSS not found in the VMSS list countForTemplate += 1 - current count for template - count for template - count for template AvailabilitySets deploy the templat... | FYI for reviewers I verified that this doesn't affect AKS since the `GetAgentVMPrefix` has a special case to handle the `v2` naming: we're just recalling the same function as the template generator here, not hardcoding the name. |
@@ -34,6 +34,9 @@ if MYPY_CHECK_RUNNING:
from .base import Candidate, Requirement
+ C = TypeVar("C")
+ Cache = Dict[Link, C]
+
class Factory(object):
def __init__(
| [Factory->[make_requirement_from_spec->[make_requirement_from_install_req],make_requirement_from_install_req->[_make_candidate_from_link],make_candidate_from_ican->[_make_candidate_from_link,_get_installed_distribution,_make_candidate_from_dist]]] | Initialize a NestedNode object from a given . | This seems unrelated but I'm going to assume it helps prepare for some part of your next PR. I'm not bothered enough to suggest that it be moved to that PR, though. |
@@ -305,6 +305,10 @@ class Badge < ActiveRecord::Base
end
end
+ def for_beginners?
+ id == Welcome || (badge_grouping_id == BadgeGrouping::GettingStarted && id != NewUserOfTheMonth)
+ end
+
protected
def ensure_not_system
| [Badge->[i18n_key->[i18n_name],slug->[display_name],display_name->[display_name],i18n_name->[i18n_name],translation_key->[i18n_key]]] | return the url of the image that we have badges for. | This might bites us in the future if/when we add a new badge in the `GettingStarted` group. I think being explicit would be the best way. Something like ```ruby BEGINNER_BADGE_IDS ||= [ Welcome, Reader, Autobiographer, Editor, WikiEditor, FirstLike, # ... ] def for_beginners? BEGINNER_BADGE_IDS.include?(id) end |
@@ -102,6 +102,16 @@ function ensureSafeFunction(obj, fullExpression) {
}
}
+function ensureSafeAssignContext(obj, fullExpression) {
+ if (obj) {
+ if (obj === (0).constructor || obj === (false).constructor || obj === ''.constructor ||
+ obj === {}.constructor || obj === [].constructor || obj === Funct... | [No CFG could be retrieved] | Creates a new object that can be used to parse a variable number of tokens. Reads a token from the input. | So we only care about built-in constructors? |
@@ -103,6 +103,10 @@ public class ResponseStreamingCompletionHandler
{
doComplete();
}
+ else if (isDone && httpResponsePacket.getRequest().getMethod().equals(HEAD))
+ {
+ doComplete();
+ }
... | [ResponseStreamingCompletionHandler->[failed->[failed],resume->[resume],completed->[sendInputStreamChunk],cancelled->[cancelled],close->[close]]] | Called when the write is complete. | Can we analyse whether we should force an `EmptyHttpEntity` at some other point instead? |
@@ -38,12 +38,12 @@ final class ManifestBasedVersionResolver implements VersionResolver
String version = extensionType.getPackage().getImplementationVersion();
if (version == null)
{
+ if (LOGGER.isDebugEnabled())
+ {
+ LOGGER.debug("Could not resolve vers... | [ManifestBasedVersionResolver->[resolveVersion->[MuleRuntimeException,createStaticMessage,fallback,format,getImplementationVersion,name],fallback->[getValue,getName,Name,replace,substring,openStream,lastIndexOf,toString,format,Manifest,length]]] | Resolves the version of the extension. | the message is constant so no need to check enablement. Simply use LOGGER.debug |
@@ -99,8 +99,7 @@ public class TestCassandraClientConfig
.put("cassandra.load-policy.dc-aware.allow-remote-dc-for-local", "true")
.put("cassandra.load-policy.use-token-aware", "true")
.put("cassandra.load-policy.token-aware.shuffle-replicas", "true")
- .... | [TestCassandraClientConfig->[testExplicitPropertyMappings->[build,createTempFile,setTruststorePassword,assertFullMapping],testDefaults->[setTruststorePassword,assertRecordedDefaults]]] | Test explicit property mappings. This is a utility method to create a cluster - wide configuration that can be used to configure Check if the value is an unknown type. | Need to add ```java .put("cassandra.load-policy.allowed-addresses", "host1,host2") |
@@ -38,3 +38,11 @@ def resolve_shipping_methods(obj, info):
return qs.applicable_shipping_methods(
price=obj.get_subtotal().gross.amount, weight=obj.get_total_weight(),
country_code=obj.shipping_address.country.code)
+
+
+def resolve_order_events(info):
+ # Filter only selected events to be di... | [resolve_orders->[filter_by_query_param,all,confirmed,prefetch_related,has_perm],resolve_order->[get_node_from_global_id,has_perm],resolve_shipping_methods->[get_total_weight,get_subtotal,is_shipping_required,applicable_shipping_methods]] | Return queryset of shipping methods that are applicable to the given object. | Do we want types to be hardcoded here? If yes, then maybe we should rename resolver to something more suggestive, for example `resolve_placed_orders`. |
@@ -350,8 +350,8 @@ class Select extends React.Component<PropsT, SelectStateT> {
case 13: // enter
event.preventDefault();
event.stopPropagation();
- if (!this.state.isOpen) {
- this.setState({isOpen: true});
+ if (this.state.isOpen && !this.props.multi) {
+ this... | [No CFG could be retrieved] | Private methods - Event handler for the UI elements escape clears value. | how is this change related to the bug? |
@@ -115,6 +115,14 @@ void vpaes_cbc_encrypt(const unsigned char *in,
unsigned char *out,
size_t length,
const AES_KEY *key, unsigned char *ivec, int enc);
+# if defined(__x86_64) || defined(__x86_64__) \
+ || defined(_M_AMD64) || defined(_M_X64... | [No CFG could be retrieved] | Set the IV for the next call to the AES - CBC or AES - BCRYPT decrypts the incoming data using AES - XTS. | Not for this PR, but grepping for `__x86_64` in the source tree, I see a lot of variations of this ifdef. Perhaps there's something to be said for having some common architecture ifdefs in some common file? |
@@ -102,7 +102,12 @@ public abstract class ItemGroupMixIn {
// Try to retain the identity of an existing child object if we can.
V item = (V) parent.getItem(subdir.getName());
if (item == null) {
- item = (V) Items.load(parent,subdir);
+ ... | [ItemGroupMixIn->[copy->[add],createProjectFromXML->[copy,add],createProject->[add]]] | Load all child items from the given directory. | This is still not right. You have to `continue;` or else line 115 will have `item == null`, which will either result in `key.call` throwing a `NullPointerException` (if it does not accept null values) or `loadChildren` returning a map with unexpected null values (if the function silently accepts them). |
@@ -170,6 +170,7 @@ func (rp RemovePeer) Influence(opInfluence OpInfluence, region *core.RegionInfo)
from.RegionSize -= region.GetApproximateSize()
from.RegionCount--
+ from.StepCost += RegionWeight
}
// MergeRegion is an OperatorStep that merge two regions.
| [Check->[IsFinish],IsTimeout->[IsFinish],Influence->[IsFinish,Influence],IsFinish->[String],MarshalJSON->[String],String->[IsFinish,String]] | Influence removes the peer from the given region. | I think `RemovePeer` can be lightweight than `AddPeer` too. |
@@ -120,9 +120,15 @@ public class ClientImpl implements Client {
final String sql,
final Map<String, Object> properties
) {
+ if (ConsistencyOffsetVector.isConsistencyVectorEnabled(requestProperties)) {
+ requestProperties.put(
+ KsqlRequestConfig.KSQL_REQUEST_QUERY_PULL_CONSISTENCY_OF... | [ClientImpl->[streamQuery->[streamQuery],makePostRequest->[makePostRequest],equals->[equals],handleObjectResponse->[accept],executeQuery->[executeQuery],handleStreamedResponse->[get],handleSingleEntityResponse->[handleSingleEntityResponse,accept],createHttpClient->[createHttpClient],close->[close],executeStatement->[ex... | Execute a batched query with a sequence of properties. | Are you meaning to check this using `properties` rather than `requestProperties` since it's defined in `KsqlConfig`? |
@@ -626,6 +626,13 @@ class DeleteInvoice(ModelDeleteMutation):
error_type_class = InvoiceError
error_type_field = "invoice_errors"
+ @classmethod
+ def perform_mutation(cls, _root, info, **data):
+ invoice_pk = copy.copy(cls.get_instance(info, **data).pk)
+ response = super().per... | [clean_refund_payment->[clean_payment],OrderVoid->[perform_mutation->[OrderVoid,clean_void_payment,try_payment_action]],RequestInvoice->[perform_mutation->[RequestInvoice]],clean_order_capture->[clean_payment],OrderMarkAsPaid->[perform_mutation->[clean_billing_address,try_payment_action,OrderMarkAsPaid]],SendInvoiceEma... | CreateInvoice creates a new invoice from a given invoice. Get the object that holds the number of the item. | Why we use `copy` here? |
@@ -57,10 +57,11 @@ if ( ! function_exists('create_captcha'))
* @param array $data Data for the CAPTCHA
* @param string $img_path Path to create the image in (deprecated)
* @param string $img_url URL to the CAPTCHA image folder (deprecated)
+ * @param string $img_tag_class Image tag for class (deprecated)
... | [create_captcha->[get_random_bytes]] | This function creates a Captcha object. This function checks if the image is not empty and if so creates a random image. This function is used to try to fetch a random string from the character pool. This function randomizes a word from the pool This function creates the missing color image. | I think you should change the order of $img_tag_class and $font_path paramter to maintain compatibility with the previous signature of the function. |
@@ -149,6 +149,11 @@ class Jetpack_Custom_CSS_Enhancements {
* @return array $fields Modified array to include post_content_filtered.
*/
public static function _wp_post_revision_fields( $fields, $post ) {
+ // None of the fields in $post are required to be passed in this filter.
+ if( ! isset( $post['post_typ... | [Jetpack_Custom_CSS_Enhancements->[sanitize_css_callback->[value],customize_register->[get_control,add_setting,remove_control,get_stylesheet,add_control,settings,add_partial],customize_preview_wp_get_custom_css->[value],sanitize_css->[parse,set_cfg,plain],preview_content_width->[get_setting,post_value],preview_skip_sty... | Get the fields that are needed for a revision. | Needs a space in `if (` |
@@ -84,7 +84,7 @@ def initialize(name=None, seeds=None, max_pool_size=None, replica_set=None):
config.config.has_option('database', 'password'):
username = config.config.get('database', 'username')
password = config.config.get('database', 'password')
- _LOG.info('Da... | [get_collection->[PulpCollectionFailure,PulpCollection],PulpCollection->[__init__->[_retry_decorator]],_retry_decorator->[_decorator->[retry->[PulpCollectionFailure]]]] | Initialize the connection pool and top - level database for pulp. Checks if a is available in the database and if so attempts to authenticate to the database. | While you are in here, can you add a space after password, and bump the second line forward by one space so it lines up? |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.