patch stringlengths 18 160k | callgraph stringlengths 4 179k | summary stringlengths 4 947 | msg stringlengths 6 3.42k |
|---|---|---|---|
@@ -29,4 +29,9 @@ public class MorePredicates
}
return predicate;
}
+
+ public static Predicate<Boolean> identity()
+ {
+ return value -> value;
+ }
}
| [MorePredicates->[isInstanceOfAny->[or,alwaysFalse]]] | Returns a predicate that returns true if any of the given classes is an instance of any of. | This cannot be static imported together with `java.util.function.Function#identity`. |
@@ -236,6 +236,7 @@ class UnbindCommand(PulpCliCommand):
self.add_option(PulpCliOption('--repo-id', 'repository id', required=True))
self.add_option(PulpCliOption('--distributor-id', 'distributor id', required=True))
+ self.add_option(PulpCliFlag('--force', 'delete the binding immediately and... | [StatusCommand->[__init__->[__init__]],UnbindCommand->[unbind->[unbind],__init__->[__init__]],HistoryCommand->[history->[history],__init__->[__init__]],RegisterCommand->[register->[register],__init__->[__init__]],UnregisterCommand->[unregister->[unregister],__init__->[__init__]],BindCommand->[bind->[bind],__init__->[__... | Initialize the command object. | Needs gettext on the description |
@@ -446,7 +446,13 @@ namespace Dynamo.Graph.Nodes.CustomNodes
}
else
{
- Parameter = new TypedParameter(name, type, defaultValue, null, comment);
+ Error("This input symbol is not currently valid, " +
+ ... | [Output->[SerializeCore->[SerializeCore],DeserializeCore->[DeserializeCore],UpdateValueCore->[UpdateValueCore]],Function->[BuildAst->[BuildAst],SerializeCore->[SerializeCore],DeserializeCore->[DeserializeCore],ResyncWithDefinition->[ValidateDefinition]],Symbol->[SerializeCore->[SerializeCore],DeserializeCore->[Deserial... | Creates a typed parameter that can be used to parameterize a typed parameter. Serialize an identifier node. | Same for the error message, please put it as resource string so we have localization of it |
@@ -689,9 +689,12 @@ class UnitActionScheduleResource(JSONController):
@auth_required(READ)
def GET(self, consumer_id, schedule_id):
- try:
- scheduled_call = list(self.manager.get(consumer_id, self.ACTION))[0]
- except IndexError:
+ scheduled_call = None
+ for call in... | [Profile->[PUT->[update]],UnitActionScheduleCollection->[GET->[update],POST->[update]],BindingSearch->[__init__->[__init__]],Consumer->[GET->[expand_consumers]],Consumers->[GET->[expand_consumers]],ConsumerSearch->[GET->[expand_consumers],POST->[expand_consumers]],Profiles->[POST->[update]],UnitActionScheduleResource->... | Get scheduled unit object. | Blindly returned that first one in the list. Nice ;) |
@@ -317,7 +317,7 @@ class InstallRequirement(object):
assert self._ideal_build_dir
old_location = self._temp_build_dir
self._temp_build_dir = None
- new_location = self.build_location(self._ideal_build_dir)
+ new_location = self.build_location()
if os.path.exists(new_lo... | [parse_editable->[_build_req_from_url,_strip_postfix,_build_editable_options],InstallRequirement->[from_path->[from_path],from_line->[_strip_extras],get_dist->[egg_info_path],install->[prepend_root],_correct_build_location->[build_location],move_wheel_files->[move_wheel_files],run_egg_info->[_correct_build_location],ar... | Move the name of the package from the temporary build directory to the new location. | since you now have the `_ideal_build_dir` stored as `self.req_cache.path` you can completely get rid of `self._ideal_build_dir` (and update the docstrings explaining the `_correct_build_location` dance :) ) |
@@ -90,7 +90,13 @@ public class FnHarness {
public static void main(PipelineOptions options,
Endpoints.ApiServiceDescriptor loggingApiServiceDescriptor,
Endpoints.ApiServiceDescriptor controlApiServiceDescriptor) throws Exception {
- ManagedChannelFactory channelFactory = ManagedChannelFactory.from(... | [FnHarness->[main->[getApiServiceDescriptor,main]]] | Main method that launches the SDK. | <!--new_thread; commit:78267fc34ba5313b9944c29251e345a6dbd04bca; resolved:1--> Weird formatting. Autoformat? |
@@ -70,6 +70,10 @@ class Qt(Package):
description="Build with OpenSSL support.")
variant('freetype', default='spack', description='Freetype2 support',
values=('spack', 'qt', 'none'), multi=False)
+ variant('gold', default=False,
+ description='Use gold linker')
+ variant(... | [Qt->[install->[make],url_for_version->[str,Version,up_to],common_config_args->[append,format,extend,satisfies],build->[make],setup_dependent_build_environment->[set],setup_dependent_package->[join_path,Executable],setup_run_environment->[set],setup_build_environment->[set,format],patch->[repl->[group,get],str,filter_f... | returns a list of all possible packages with a single unique ID. Patches the Qt - related components of the GUI. | I would make this Boolean, either `False` (no xcb support) or `True` (depend on Spack package) |
@@ -814,7 +814,7 @@ module Discourse
digest = Digest::MD5.hexdigest(warning)
redis_key = "deprecate-notice-#{digest}"
- if !Discourse.redis.without_namespace.get(redis_key)
+ if Discourse.redis && !Discourse.redis.without_namespace.get(redis_key)
Rails.logger.warn(warning)
begin
... | [top_menu_items->[filters],route_for->[current_hostname,base_path],deprecate->[warn],reset_active_record_cache_if_needed->[warn],disable_pg_force_readonly_mode->[disable_readonly_mode],after_fork->[after_fork],current_hostname->[current_hostname],warn->[warn],visible_plugins->[plugins,hidden_plugins],find_plugin_css_as... | Deprecate the deprecation notice of a node. | Curious why is this change required? |
@@ -22,13 +22,15 @@ describe SectionsController do
csv_rows = CSV.parse(response_csv)
expect(Student.all.size + 1).to eq(csv_rows.size) # for header
assignments = Assignment.order(:id)
- header = ['Username']
+ header = [I18n.t('grade_entry_forms.username')]
+ header.push... | [round,create,new,let,size,describe,shift,accepted_grouping_for,it,order,to,before,body,current_submission_used,require,has_accepted_grouping_for?,max_mark,parse,blank?,get_as,each,push,short_identifier,context,eq,each_with_index,find_by_user_name] | The action that creates a page with a single object. This action can be used get_latest_result returns true if final_mark is greater than out_of. | Lint/UselessAssignment: Useless assignment to variable - student_number. Did you mean student_name? |
@@ -11,6 +11,9 @@ class WP_Test_Jetpack_Sync_Full extends WP_Test_Jetpack_Sync_Base {
private $full_sync_start_config;
private $synced_user_ids;
+ private $test_posts_count = 20;
+ private $test_comments_count = 11;
+
public function setUp() {
parent::setUp();
$this->full_sync = Jetpack_Sync_Modules::get_... | [WP_Test_Jetpack_Sync_Full->[test_full_sync_status_should_be_not_started_after_reset->[create_dummy_data_and_empty_the_queue],test_full_sync_status_after_start->[create_dummy_data_and_empty_the_queue],test_full_sync_status_with_a_small_queue->[create_dummy_data_and_empty_the_queue],test_full_sync_sends_theme_updates->[... | Set up the object. | Just a nit-pick, but aligning the = with the line below would be a good idea. |
@@ -456,7 +456,7 @@ public class MoveDelegate extends AbstractMoveDelegate {
final CompositeChange clearAlliedAir = new CompositeChange();
for (final Unit carrier : damagedCarriers) {
final CompositeChange change = MustFightBattle.clearTransportedByForAlliedAirOnCarrier(
- Collections.singleto... | [MoveDelegate->[loadState->[loadState],saveState->[saveState],end->[end],start->[start],removeAirThatCantLand->[removeAirThatCantLand],setDelegateBridgeAndPlayer->[setDelegateBridgeAndPlayer]]] | Repair multiple hit point units. This method is called when a unit is repaired. It is called when a unit. | This is how this call appeared at the time #1777 was merged (the `battleSite` parameter was removed in a subsequent PR because it was no longer used after #1777). |
@@ -44,9 +44,7 @@ import org.springframework.util.StringUtils;
*
* @author Artem Bilan
* @author Gary Russell
- *
* @since 5.1
- *
*/
public final class StandardIntegrationFlowContext implements IntegrationFlowContext, BeanFactoryAware {
| [StandardIntegrationFlowContext->[removeDependantBeans->[removeDependantBeans],remove->[remove],StandardIntegrationFlowRegistrationBuilder->[addBean->[addBean],register->[register],setBeanFactory]]] | Package private for testing purposes. This method is called by the ApplicationContext when it is instantiated. | Would you mind, please, to revert all the code style changes? This blank line really has to be here to divide `@author` list from `@since`. Also add you name, please, to this class. |
@@ -5702,6 +5702,7 @@ top:
* Gracefully handle a damaged logical block size as a
* checksum error.
*/
+ ASSERT3U(lsize, <=, spa_maxblocksize);
if (lsize > spa_maxblocksize(spa)) {
rc = SET_ERROR(ECKSUM);
goto out;
| [No CFG could be retrieved] | finds the header of the next block that is not in the cache and sets the header END of function arc_add_header. | Missing function parameter list. Should be: `ASSERT3U(lsize, <=, spa_maxblocksize(spa));` |
@@ -406,7 +406,7 @@ public class <%= entityClass %> implements Serializable {
const fieldTypeBlobContent = fields[idx].fieldTypeBlobContent;
const fieldName = fields[idx].fieldName;
const fieldInJavaBeanMethod = fields[idx].fieldInJavaBeanMethod; _%>
- ", <%... | [No CFG could be retrieved] | XML description of . | use `if (! ['integer', 'long',...].includes(fieldType.toLowerCase()) {` as its much more cleaner to read |
@@ -88,7 +88,7 @@ namespace ILCompiler.DependencyAnalysis.ReadyToRun
if (result != 0)
return result;
- return _methodToken.CompareTo(otherNode._methodToken);
+ return _methodToken.Token.CompareTo(otherNode._methodToken.Token);
}
}
}
| [DelegateCtorSignature->[AppendMangledName->[AppendMangledName]]] | Compares this node with another node. | Is there a guarantee that the same token here will always be accompanied by the same method? To put it yet another way, why can't we use the comparison of the complete MethodAndToken instances? |
@@ -1491,6 +1491,10 @@ public class UserManagerImpl implements UserManager, MultiTenantUserManager {
}
+ private boolean mustCheckPasswordValidity() {
+ return Framework.getProperty(VALIDATE_PASSWORD_PARAM,"false").equals("true");
+ }
+
@Override
public void deleteUser(DocumentModel userMod... | [UserManagerImpl->[handleEvent->[invalidateAllPrincipals,invalidatePrincipal],createPrincipal->[createUser],deletePrincipal->[deleteUser],notifyUserChanged->[notify],getAvailablePrincipals->[searchUsers,makePrincipal],getTopLevelGroups->[getTopLevelGroups],getUsersInGroupAndSubGroups->[getUsersInGroupAndSubGroups,appen... | Updates a user. | We usually use `Boolean.parseBoolean` rather than `equals("true")` |
@@ -485,12 +485,3 @@ export function applyStaticLayout(element) {
}
return layout;
}
-
-
-/**
- * @param {!Element} element
- */
-function applyNoDisplayLayout(element) {
- // TODO(jridgewell, #17475): This should be using the [hidden] attribute.
- setStyle(element, 'display', 'none');
-}
| [No CFG could be retrieved] | Applies the layout of the to the given element. | Theoretically could cause problems but I think it'll be low impact. |
@@ -112,6 +112,7 @@ func init() {
rbacv1helpers.NewRule("get", "list").Groups(kapiGroup).Resources("serviceaccounts").RuleOrDie(),
rbacv1helpers.NewRule("create").Groups(securityGroup, legacySecurityGroup).Resources("podsecuritypolicysubjectreviews").RuleOrDie(),
rbacv1helpers.NewRule("get", "list").Groups(... | [NewClusterBinding,RuleOrDie,BindingOrDie,SAs,NewRule,Fatalf,Groups,HasPrefix,Resources] | Builds and builds are defined in the API spec. requires all the rules to be installed. | does it still need this permission? |
@@ -385,7 +385,6 @@ namespace Js
// Construct HSTRING of timeZoneId passed
IfFailThrowHr(GetWindowsGlobalizationLibrary(scriptContext)->WindowsCreateStringReference(timeZoneId, static_cast<UINT32>(wcslen(timeZoneId)), &timeZoneHeader, &timeZone));
- Assert(timeZone);
// The warning... | [No CFG could be retrieved] | Returns true if the passed in HSTRING is a valid language tag and false if it is Create a time zone on a calendar object. | why not return here? Also in this file many places we were asserting on this HSTRING for being there, could we just remove them? |
@@ -237,6 +237,14 @@ module Engine
end
end
+ def skip_home_token
+ if @home_token_timing == :operate
+ !place_home_token(@current_entity)
+ else
+ true
+ end
+ end
+
def skip_track; end
def skip_token
| [Operating->[place_token->[place_token,name],log_pass->[name],connected_hexes->[connected_hexes],skip_company->[can_buy_companies?],connected_paths->[connected_paths],liquidate->[sell_shares,name],connected_nodes->[connected_nodes],payout_entity->[name],skip_route->[route?],ignore_action?->[can_buy_train?,can_buy_compa... | skips any in the next step if the current node is not a cash or. | return !place_home_token(@current_entity) if @home_token_timeing == operati |
@@ -61,7 +61,8 @@ class TestDistTransformer2x2Sync(TestDistBase):
def test_dist_train(self):
download_files()
- self.check_with_place("dist_transformer.py", delta=1e-5)
+ self.check_with_place(
+ "dist_transformer.py", delta=1e-5, check_error_log=False)
class TestDistTransf... | [TestDistTransformer2x2Sync->[test_dist_train->[download_files]],TestDistTransformer2x2Async->[test_dist_train->[download_files]]] | Test dist train. | This test randomly fails before, please try run this test for multiple times before merging this. |
@@ -1281,6 +1281,10 @@ class BinaryIntOp(RegisterOp):
LEFT_SHIFT = 203 # type: Final
RIGHT_SHIFT = 204 # type: Final
+ # logical
+ NOR = 300 # type: Final
+
+ # since NOR is used to represent unary not, its op_str is not included
op_str = {
ADD: '+',
SUB: '-',
| [Branch->[to_str->[format]],LoadAddress->[to_str->[format]],Goto->[to_str->[format]],LoadGlobal->[to_str->[format]],Box->[to_str->[format]],LoadInt->[to_str->[format]],Call->[to_str->[format]],CallC->[to_str->[format],stolen->[sources]],Assign->[to_str->[format]],Unbox->[to_str->[format]],TupleSet->[to_str->[format]],T... | Visit a global variable. Initialize a new object with a single binary integer. | NOR is somewhat unusual choice here, since it's not directly supported in hardware or C. It would be more standard to implement boolean not using xor, as `value XOR 1` |
@@ -566,7 +566,7 @@
// When we are fully debugged, the EEPROM dump command will get deleted also. But
// right now, it is good to have the extra information. Soon... we prune this.
//
- if (code_seen('J')) g29_eeprom_dump(); // EEPROM Dump
+ if (code_seen('j')) g29_eeprom_dump(); // EEPROM Dump... | [No CFG could be retrieved] | Look at the 3 - point of the mesh and find the 3 - point of the mesh Load the current mesh from the EEPROM and store it in the state. | I don't think we'll be adding lower-case parameter values. GCode is supposed to be case-insensitive. |
@@ -1071,6 +1071,11 @@ func (d *driver) inspectFile(file *pfs.File, filterShard *pfs.Shard, shard uint6
if fileInfo.FileType == pfs.FileType_FILE_TYPE_NONE {
return nil, nil, pfsserver.NewErrFileNotFound(file.Path, file.Commit.Repo.Name, file.Commit.ID)
}
+ // We return NotFound if it's a regular file but its bl... | [FinishCommit->[getBlockClient],AddShard->[getBlockClient],fullRepoProvenance->[fullCommitProvenance],inspectCommit->[commitProvenance],fullCommitProvenance->[fullCommitProvenance],DeleteRepo->[ListRepo,getBlockClient],GetFile->[getBlockClient],addDirs->[lastRef],commitProvenance->[fullCommitProvenance],inspectFile->[i... | inspectFile returns information about a file and its children. This function is called in the client code to filter the file and all its children This function is used to build a list of files that are children of a given commit. | I think the check that the `filterShard` here is none `nil` and that `BlockNumber > 1` is redundant. It doesn't seem it should be possible to have `FILE_TYPE_REGULAR` and no `blockRefs` unless we eliminated some of them due to a `filterShard`. Is that true or is there some way to hit that code? |
@@ -132,14 +132,14 @@ abstract class AbstractEventContext implements BaseEventContext {
@Override
public final void success() {
if (isResponseDone()) {
- if (LOGGER.isDebugEnabled()) {
- LOGGER.debug(this + " empty response was already completed, ignoring.");
+ if (debugLogEnabled) {
+ ... | [AbstractEventContext->[onComplete->[signalConsumerSilently],getResponsePublisher->[isTerminated],onResponse->[signalConsumerSilently],signalConsumerSilently->[error],tryComplete->[tryComplete],forEachChild->[forEachChild],ResponsePublisher->[accept->[success,error,onResponse,isResponseDone],signalPublisherSink->[succe... | This method is called when the response is complete. | is the `.toString` really necessary? wouldn't it be called internally? |
@@ -52,7 +52,7 @@ public class CommandFactoriesTest {
private final KafkaTopicClient topicClient = EasyMock.createNiceMock(KafkaTopicClient.class);
private final CommandFactories commandFactories = new CommandFactories(
topicClient,
- EasyMock.createMock(QueryTerminator.class),
+ EasyMock.createM... | [CommandFactoriesTest->[shouldThowKsqlExceptionIfCommandFactoryNotFound->[DDLStatement,emptyMap,create],shouldCreateCommandForDropStream->[create,of,DropStream,emptyMap,instanceOf,assertThat],shouldFailCreateTableIfTimestampColumnNameIsIncorrect->[TableElement,create,getMessage,of,assertThat,putAll,equalTo,emptyMap,put... | Check if a topic exists in Kafka. | use the interface, i.e., `SchemaRegistryClient` |
@@ -77,14 +77,11 @@ class Jetpack_Debugger {
'HTTP_X_VARNISH',
'REMOTE_ADDR'
) as $header ) {
- if( isset( $_SERVER[$header] ) ) {
- $debug_info .= "\r\n" . esc_html( 'IP HEADER: '.$header . ": " . $_SERVER[$header] );
- } else {
- $debug_info .= "\r\n" . esc_html( 'IP HEADER: '.$header... | [Jetpack_Debugger->[jetpack_debug_display_handler->[get_error_message,get,reindex_ui,exists]]] | This function is a debug display handler that displays the options of the Jetpack. Debug info about the network This test tests the Jetpack connection. This is a hack to work around the bug in Jetpack. | I know it's old code, but correct spacing is `[ $var_with_space ]` |
@@ -609,6 +609,9 @@ public class AvroTypeUtil {
if (rawValue instanceof byte[]) {
return ByteBuffer.wrap((byte[]) rawValue);
}
+ if (rawValue instanceof String) {
+ return ByteBuffer.wrap(((String) rawValue).getBytes(charset));
+ ... | [AvroTypeUtil->[isNullable->[isNullable],buildAvroSchema->[buildAvroSchema,buildAvroField],createSchema->[createSchema,determineDataType],normalizeValue->[normalizeValue,createSchema,convertUnionFieldValue,convertByteArray],isCompatibleDataType->[isCompatibleDataType],determineDataType->[determineDataType],buildAvroFie... | Convert the raw value to an avro object. Determines the best guess for the value. private int maxLength ; Adds the converted value to the sequence of missing values. | I would prefer to avoid ByteBuffer here and instead use just byte[] |
@@ -40,7 +40,7 @@ func (s *Server) CreateServer(ctx context.Context, req *request.CreateServer) (*
return nil, status.Error(codes.InvalidArgument, "must supply server IP address")
}
- server, err := s.service.Storage.StoreServer(ctx, req.Name, req.Description, req.Fqdn, req.IpAddress)
+ server, err := s.service.... | [GetServer->[GetServer],GetServers->[GetServers],DeleteServer->[DeleteServer],GetServerByName->[GetServerByName]] | CreateServer creates a new server. | Nice to see the (Name, Description) => (Id, Name) for cross-service consistency. |
@@ -45,7 +45,12 @@ func newCancelCmd() *cobra.Command {
if len(args) > 0 {
stack = args[0]
}
- s, err := requireStack(stack, false)
+
+ opts := backend.DisplayOptions{
+ Color: cmdutil.GetGlobalColorization(),
+ }
+
+ s, err := requireStack(stack, false, opts)
if err != nil {
return err... | [Backend,Println,ColorizeText,Sprintf,BoolVarP,New,RunFunc,Name,CancelCurrentUpdate,String,MaximumNArgs,PersistentFlags] | newCancelCmd returns a new command that cancels the currently running update if any. Cancel the current update if it has been canceled. | For command that do not support a --color flag, this is the pattern to use. The color picked here will be "Never" if NO_COLOR is set in the environment. Or 'Always' otherwise. In the future we can consider if these command shoudl support --color as well. But i didn't want to have to add that here. |
@@ -157,10 +157,10 @@ public class ApplicationWindow extends Composite
{
globalDisplay_.showMessage(
GlobalDisplay.MSG_INFO,
- "Application Updated",
- "An updated version of RStudio is available. Your browser will " +
- "now be refreshed with the new version. Al... | [ApplicationWindow->[hideWarning->[updateWorkbenchTopBottom],focusToolbar->[isToolbarShowing,focusToolbar],reportStatus->[reportStatus],showWarning->[showWarning],showToolbar->[showToolbar],onResize->[onResize],showLicenseWarning->[showWarning]]] | Show an application update required message if the application is available. | Use single string, not three |
@@ -63,7 +63,7 @@ namespace Content.Server.Flash
foreach (var entity in IoCManager.Resolve<IEntityLookup>().GetEntitiesInRange(comp.Owner.Transform.Coordinates, comp.Range))
{
- FlashEntity(entity, args.User, comp.AoeFlashDuration, comp.SlowTo);
+ Flash(entity.U... | [FlashSystem->[OnUseInHand->[Coordinates,Range,SlowTo,User,GetEntitiesInRange,AoeFlashDuration,UseFlash,FlashEntity],OnMeleeHit->[SlowTo,HitEntities,FlashDuration,User,Handled,UseFlash,FlashEntity],OnExamined->[AddText,AddMarkup,HasUses,GetString,IsInDetailsRange,Uses],OnMeleeInteract->[UseFlash,SlowTo,Entity,FlashDura... | Called when a flash component is used in hand. | Github doesn't let me select the line but this iterator is doing the resolve for IEntityLookup when it's already cached. |
@@ -1,13 +1,14 @@
-class ProfilePin < ApplicationRecord
+class GenericPins < ApplicationRecord #migrate later
belongs_to :pinnable, polymorphic: true
belongs_to :profile, polymorphic: true
validates :profile_id, presence: true
- validates :profile_type, inclusion: { in: %w[User] } # Future could be organiza... | [ProfilePin->[only_five_pins_per_profile->[add,size],pinnable_belongs_to_profile->[add,user_id],validate,belongs_to,validates]] | only five pinned posts per profile. | This won't work, I think you should keep the name for now. You can worry about the model name in a separate PR once the functionality is in. |
@@ -0,0 +1,14 @@
+class DbActivityDecorator < ApplicationDecorator
+ def resource_diff_table
+ new_resource = trackable.class.new(parameters["new"])
+ old_resource = trackable.class.new(parameters["old"])
+ data = {
+ resource: trackable,
+ diffs: diffs,
+ draft_values: new_resource.decorate.to... | [No CFG could be retrieved] | No Summary Found. | Assignment Branch Condition size for resource_diff_table is too high. [18.25/15] |
@@ -45,10 +45,12 @@ namespace Content.Server.Administration.Commands
}
var entityManager = IoCManager.Resolve<IEntityManager>();
- var query = new MultipleTypeEntityQuery(components);
var entityIds = new HashSet<string>();
- foreach (var entity in entityM... | [FindEntitiesWithComponents->[Execute->[TryGetRegistration,ID,Join,GetEntities,Add,Count,WriteLine,Prototype,IoCManager,Type,Length],Mapping]] | Execute the console command. | I guess it's okay for a debug command. I assume you know LINQ is generally to be avoided in games. |
@@ -198,6 +198,12 @@ describes.realWin('amp-video', {
'autoplay': '',
'muted': '',
'loop': '',
+ }).catch(e => {
+ const v = doc.querySelector('amp-video');
+ // preconnectCallback could get called again after this test is done, and
+ // trigger an other "start with https://" erro... | [No CFG could be retrieved] | Load a video with optional optional children. Get a video object from the server and check it s status. | I wish there were a predictable way to do this at a framework level for any and all async errors that might occur. |
@@ -513,8 +513,9 @@ namespace System.Diagnostics
{
get
{
- EnsureState(State.HaveProcessInfo);
- return _processInfo!.ProcessName;
+ EnsureState(State.HaveProcessName);
+ return _processName!;
+ //return _proce... | [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... | Magic properties for the system. - A property that can be used to access the system - wide process - specific object. | ProcessName property can be moved to Windows and Unix partials. It will avoid GetProcessName overhead on Unix, and we will only cache `_processInfo` (to load the info just once) as before. |
@@ -48,7 +48,7 @@ func BenchmarkStreamProcessor(b *testing.B) {
}
//ensure to not hit rate limit as blocking wait would be measured otherwise
rl := rate.NewLimiter(rate.Limit(math.MaxFloat64-1), math.MaxInt32)
- sp := &Processor{MaxEventSize: 300 * 1024}
+ sp := &Processor{MaxEventSize: 300 * 1024, metadataSchema... | [NewLimiter,StopTimer,Error,Limit,New,ReadDir,LoadDataAsBytes,HandleStream,Join,Caller,ReportAllocs,Name,Reset,NewReader,StartTimer,Background,SetBytes,Run,ResetTimer] | BenchmarkStreamProcessor benchmarks a stream of intake - v2 files c - > c - > c - > c - > c - > c - >. | I think this should use one of the provided processors (eg. `stream.BackendProcessor`) instead of creating a new one. |
@@ -740,6 +740,18 @@ public class HostVO implements Host {
this.uuid = uuid;
}
+ public boolean checkHostServiceOfferingTags(ServiceOffering serviceOffering){
+ if (serviceOffering == null) {
+ return false;
+ }
+ if (Strings.isNullOrEmpty(serviceOffering.getHostTag())... | [HostVO->[toString->[toString],isDisabled->[getResourceState],isInMaintenanceStates->[getResourceState],equals->[getId]]] | Sets the uuid of the node. | sorry to keep nagging you, but we have a string utils proxy class in place. It has an isEmpty() that does the same check. if for some reason you need this one anyway , please add it there if the functioonality doesn't suffice. |
@@ -3037,7 +3037,8 @@ p {
* [Everyone Loves a Log!](https://www.youtube.com/watch?v=2C7mNr5WMjA)
*/
public static function log( $code, $data = null ) {
- $log = Jetpack_Options::get_option( 'log', array() );
+ // only grab the latest 200 entries
+ $log = array_slice( Jetpack_Options::get_option( 'log', array... | [Jetpack->[sync_reindex_trigger->[current_user_is_connection_owner],verify_json_api_authorization_request->[add_nonce],admin_notices->[opt_in_jetpack_manage_notice,can_display_jetpack_manage_notice],authenticate_jetpack->[verify_xml_rpc_signature],sync_reindex_status->[current_user_is_connection_owner],admin_page_load-... | Log an internal event. | only keep the last 200. |
@@ -8,6 +8,13 @@ namespace System.Collections.Generic
/// </summary>
internal static partial class EnumerableHelpers
{
+ private static int MaxArrayLength =>
+#if !MS_IO_REDIST
+ Array.MaxLength;
+#else
+ 0X7FFFFFC7;
+#endif
+
/// <summary>Con... | [EnumerableHelpers->[ToArray->[MoveNext,Resize,Current,MaxLength,CopyTo,Count,GetEnumerator,Length,Array]]] | This helper function is used to convert an enumerable to an array of objects. Manages the growth of the array. | Is this still needed after the recent commit? |
@@ -196,7 +196,7 @@ class ForumManager
*/
public static function countUnseenItems()
{
- $r = q(
+ $r = DBA::p(
"SELECT `contact`.`id`, `contact`.`name`, COUNT(*) AS `count` FROM `item`
INNER JOIN `contact` ON `item`.`contact-id` = `contact`.`id`
WHERE `item`.`uid` = %d AND `item`.`visible` AND NO... | [No CFG could be retrieved] | Count unseen items. | Code lisibility: Please rename `$r` to `$contacts_stmt`. |
@@ -397,6 +397,9 @@ class MatrixTransport(Runnable):
self.greenlets = [self._client.sync_thread]
self._client.set_presence_state(UserPresence.ONLINE.value)
+
+ super().start() # start greenlet
+
# (re)start any _RetryQueue which was initialized before start
for retrier in s... | [_RetryQueue->[enqueue->[_expiration_generator,_MessageData],_run->[_check_and_send],enqueue_global->[enqueue],_check_and_send->[message_is_in_queue]],MatrixTransport->[_send_with_retry->[enqueue,_get_retrier],_handle_presence_change->[_spawn,UserPresence],_get_retrier->[start,_RetryQueue],stop->[notify],start->[start]... | Starts a new lease. Start the n - node greenlet. | This is required to that `_global_send_worker` is invoked before we start sending the other messages |
@@ -102,8 +102,6 @@ public class TestDataflowRunner extends PipelineRunner<DataflowPipelineJob> {
job.getJobId(),
expectedNumberOfAssertions);
- assertThat(job, testPipelineOptions.getOnCreateMatcher());
-
Boolean jobSuccess;
Optional<Boolean> allAssertionsPassed;
| [TestDataflowRunner->[run->[run],fromOptions->[TestDataflowRunner],getJobMetrics->[getJobMetrics],ErrorMonitorMessagesHandler->[getErrorMessage->[toString],process->[process]],fromOptionsAndClient->[TestDataflowRunner],CancelOnError->[call->[hasSeenError]]]] | Runs a dataflow job with the given pipeline and runner. | This makes sure test fail-fast if pipeline creation failed. Do we have alternative solutions? |
@@ -980,12 +980,12 @@ class Assignment < Assessment
# Retrieve data for submissions table.
# Uses joins and pluck rather than includes to improve query speed.
- def current_submission_data(current_user)
- if current_user.admin?
+ def current_submission_data(current_role)
+ if current_role.admin?
... | [Assignment->[to_json->[to_json],summary_json->[group_by],get_marks_list->[max_mark],group_by->[group_assignment?],current_submission_data->[group_by],average_annotations->[get_num_marked,get_num_annotations],get_num_marked->[is_criteria_mark?],summary_csv->[max_mark],past_all_collection_dates?->[past_collection_date?]... | Returns array of data for the current submission. Returns a list of tag - result - member - section - result - section - info hashes This method is used to generate a base hash for all missing keys. | Metrics/CyclomaticComplexity: Cyclomatic complexity for current_submission_data is too high. [24/6]<br>Metrics/MethodLength: Method has too many lines. [96/50]<br>Metrics/PerceivedComplexity: Perceived complexity for current_submission_data is too high. [28/7] |
@@ -2306,13 +2306,6 @@ namespace Dynamo.Graph.Nodes
RaisePropertyChanged(nameof(ArgumentLacing));
RaisePropertyChanged(nameof(IsVisible));
RaisePropertyChanged(nameof(DisplayLabels));
- RaisePropertyChanged(nameof(IsSetAsInput));
- RaisePr... | [No CFG could be retrieved] | region Public API Functions The object is used to mark the as modified. | Hi @mmisol Did you test that downstream node can be also reverted back to the previous state? |
@@ -83,7 +83,7 @@ def test_check_update_respect_config(mock_check, result, updater, mocker):
("0.0.2", "0.0.3", True),
("0.0.2", "0.0.1", False),
],
- ids=["uptodate", "behind", "ahead"],
+ ids=["up-to-date", "behind", "ahead"],
)
def test_check_updates(mock_tty, updater, caplog, current,... | [mock_env->[delenv,setenv],test_check_refetches_each_day->[dump,time,object,at_level,assert_called_once,check,patch,open,clear,assert_called],test_check->[check],test_is_enabled->[is_enabled,edit],test_check_updates->[dump,at_level,check,open,clear],test_fetch->[fetch,assert_called_once_with,isfile,exists,open,load],te... | Test for updates. | I'd prefer the previous one, as it is easier to type in the terminal, in case we need to run that particular test. |
@@ -152,6 +152,14 @@ class Model:
}
return ret
+ def get_nodes(self) -> List['Node']:
+ """
+ Traverse through all the nodes.
+ """
+ for graph in self.graphs.values():
+ for node in graph.nodes:
+ yield node
+
def get_nodes_by_label(self... | [Graph->[fork->[fork],_dump->[_dump],_load->[Graph,_load],_copy->[Graph],_fork_to->[Graph]],Edge->[remove->[remove],_load->[Edge,get_node_by_name]],IllegalGraphError->[_debug_dump_graph->[_dump]],TrainingConfig->[_load_with_type->[_load]],DebugTraining->[_load->[DebugTraining]],Node->[remove->[remove],_load->[update_la... | Dumps the graph and all the nodes in the name space. | The return type is `Iterable` in this case. |
@@ -4,11 +4,11 @@ import os
import tempfile
from contextlib import contextmanager
from distutils.dir_util import copy_tree
-
from funcy import retry
+from dvc.exceptions import NoRemoteInExternalRepoError
+from dvc.remote import RemoteConfig
from dvc.config import NoRemoteError
-from dvc.exceptions import Remote... | [_external_repo->[copy_tree,mkdtemp,_clone_repo,close,checkout,Repo,CacheConfig,set_dir],_clone_repo->[clone,close],clean_repos->[list,values,_remove,clear],external_repo->[_external_repo,Repo,RemoteNotSpecifiedInExternalRepoError,NoOutputInExternalRepoError,close],_remove->[remove,os_retry,retry]] | Yields a repository object that can be used to retrieve a single object from the external repository Copy a tree of the objects from a new path to a new path. | Please don't remove this, it separates std from 3rd party imports. And, well, touching unrelated lines is no bueno in general |
@@ -64,6 +64,18 @@ template<typename TypeA, typename TypeB>
return ::testing::AssertionSuccess();
}
+template<typename TypeA, typename TypeB>
+::testing::AssertionResult assert_values_union(
+ const char* a_expr, const char* b_expr,
+ const TypeA& a, const TypeB& b)
+{
+ expect_values_equal_union(a, b);
+ if ... | [set_values->[set_values,set_base_values,amalgam_serializer_test],buffer->[set_values],amalgam_serializer_test->[set_values],assert_values->[expect_values_equal],set_values<AdditionalFieldMutableStruct>->[set_base_values],expect_values_equal->[expect_values_equal_base]] | Checks if the values of a missing missing value are equal to b. | This isn't needed given template specializations are provided for `expect_values_equal`. |
@@ -33,8 +33,9 @@ from tensorflow.python.util import compat
def _create_parser(base_dir):
# create a simple parser that pulls the export_version from the directory.
def parser(path):
- match = re.match("^" + compat.as_str_any(base_dir) + "/(\\d+)$",
- compat.as_str_any(path.path))
+ # M... | [GcTest->[testMixedStrTypes->[_create_parser],testPathsWithParse->[_create_parser]]] | Creates a parser that pulls the export_version from the directory. | This substitution doesn't seem safe on POSIX... what if there is a `\` character in a path? Perhaps you should guard this with an `if os.name == 'nt':` block. |
@@ -192,4 +192,12 @@ module DocAuth
unknown_fail_count
end
end
+
+ def self.general_error(liveness_enabled)
+ liveness_enabled ? Errors::GENERAL_ERROR_LIVENESS : Errors::GENERAL_ERROR_NO_LIVENESS
+ end
+
+ def self.wrapped_general_error(liveness_enabled)
+ { general: [DocAuth.general_error(liven... | [ErrorGenerator->[get_error_messages->[new,dig,to_sym,present?,each],scan_for_unknown_alerts->[call,empty?,blank?,each,push],get_image_metric_errors->[present?,each,to_i],generate_doc_auth_errors->[call,scan_for_unknown_alerts,empty?,first,keys,include?,general_error,transform_values,get_image_metric_errors,get_error_m... | Scans for unknown alerts and returns the count of unknown alerts that can be found. | Might defer to you/others on Ruby-isms around defining static methods on the "upper" module like this. Alternatively, could we keep it as a class method on ErrorGenerator? Still seems reasonable to have "general error" associated with ErrorGenerator, and to be able to call that from the response class. |
@@ -45,7 +45,7 @@ public class StructSerializationModule extends SimpleModule {
final SerializerProvider serializerProvider
) throws IOException {
struct.validate();
- jsonGenerator.writeRaw(
+ jsonGenerator.writeObject(
new String(jsonConverter.fromConnectData("", struct.schem... | [StructSerializationModule->[Serializer->[serialize->[schema,writeRaw,validate,String,fromConnectData]],singletonMap,JsonConverter,Serializer,configure,addSerializer]] | Serialize a single . | Why are we serializing the struct as a json string? |
@@ -201,8 +201,6 @@ public final class TcpSlaveAgentListener extends Thread {
@Override
public void run() {
try {
- LOGGER.log(Level.INFO, "Accepted connection #{0} from {1}", new Object[]{id,s.getRemoteSocketAddress()});
-
DataInputStream in = new DataInpu... | [TcpSlaveAgentListener->[shutdown->[getPort],getAdvertisedPort->[getPort],ConnectionHandler->[respondHello->[getAgentProtocolNames]],getName]] | This method is invoked when a connection is accepted by the client. It checks if the connection. | Note: will no longer print anything for `GET` diagnostic requests, or for malformed requests or those requesting a nonexistent protocol. But probably that is for the best anyway. |
@@ -108,7 +108,7 @@ public interface FlowFile extends Comparable<FlowFile> {
*/
Map<String, String> getAttributes();
- public static class KeyValidator {
+ class KeyValidator {
public static String validateKey(final String key) {
// We used to validate the key by disallowing a... | [KeyValidator->[validateKey->[IllegalArgumentException,isEmpty],isValid->[isEmpty]]] | Validate the key. | Give that this is in the nifi-api I don't believe this change is ok outside of major nifi release boundary (nifi 2.0). The only way this change would be ok is if having this class public and static was unintentional/a bug and that we are sure someone else should not be reasonably using this. Do you think that is the ca... |
@@ -147,7 +147,9 @@ public class FeedFileSourcesBinaryData extends BaseDataChange {
}
return FileSourceDto.encodeSourceData(dataBuilder.build());
} catch (Exception e) {
- throw new IllegalStateException("Invalid FILE_SOURCES.DATA on row with ID " + fileSourceId + ": " + data, e);
+ LoggerF... | [FeedFileSourcesBinaryData->[splitIntegers->[apply->[parseInt],split,transform],toBinary->[addAllDuplication,encodeSourceData,size,parseInt,setItCoveredConditions,addLinesBuilder,setOverallCoveredConditions,setUtCoveredConditions,setItLineHits,parseDateTimeQuietly,setScmAuthor,setLine,setOverallConditions,getTime,setSo... | This method converts the CSV data into binary format. This method is called when a row of data is read from the CSV file. It returns. | no need for `String.format`, SQ Logger supports `{}` arguments. |
@@ -499,3 +499,12 @@ function display_content(App $a, $update = 0) {
return $o;
}
+function displayShowFeed($item_id) {
+ $xml = dfrn::itemFeed($item_id);
+ if ($xml == '') {
+ http_status_exit(500);
+ }
+ header("Content-type: application/atom+xml");
+ echo $xml;
+ killme();
+}
| [display_content->[remove_baseurl]] | Display the content of an application This function is used to display an alternate link if the user is not allowed to access the This function is used to display a user s contact Check if the user has permission to reshare an item. | this function should have a doxygen header ;-) |
@@ -120,6 +120,13 @@ namespace System.Net.Quic.Implementations.MsQuic
{
ThrowIfDisposed();
+ // protect against double starts.
+ if (_started)
+ {
+ return;
+ }
+
+ _started = true;
SetCallbackHandler();
... | [MsQuicListener->[NativeCallbackHandler->[ListenerCallbackHandler],Dispose->[Dispose],Dispose]] | Start the listener. | Why is Start() being called multiple times? Is it a misusage where it would be better to throw? |
@@ -0,0 +1,15 @@
+require 'rails_helper'
+
+describe ApplicationHelper do
+ describe '#tooltip' do
+ it 'creates a div containing aria label with text and image' do
+ tooltip_text = 'foobar'
+
+ html = helper.tooltip(tooltip_text)
+
+ expect(html).to have_css('.hint--top')
+ expect(html).to have... | [No CFG could be retrieved] | No Summary Found. | There is a school of though that says you should avoid using locals like this in test code and just include the string `foobar` in each place. Not sure how strictly we on this project want to conform to this but I test like this approach. |
@@ -93,6 +93,7 @@ public final class KsqlScalarFunction extends KsqlFunction {
);
}
+ @SuppressFBWarnings(value = "EI_EXPOSE_REP")
public Class<? extends Kudf> getKudfClass() {
return kudfClass;
}
| [KsqlScalarFunction->[create->[KsqlScalarFunction]]] | Creates a new built - in KsqlScalarFunction that creates a new instance of Kud. | `Class.forName(kudfClass.getName(), true, kudfClass.getClassLoader());` might work |
@@ -23,9 +23,10 @@ public class InMemoryThrottledSubmissionByIpAddressAndUsernameHandlerInterceptor
final String usernameParameter,
final String a... | [InMemoryThrottledSubmissionByIpAddressAndUsernameHandlerInterceptorAdapter->[constructKey->[getUsernameParameter,getParameter,getRemoteAddr,getClientIpAddress,toLowerCase,isBlank]]] | Construct a key for the cache entry. | Nicely done. Once lombok adds support for InheritedConstructors, all of this noise would too go away. |
@@ -479,7 +479,12 @@ class CollectiveAllReduceExtended(mirrored_strategy.MirroredExtended):
split_batch_by=self._num_replicas_in_sync,
input_context=input_context)
- def _distribute_datasets_from_function(self, dataset_fn, options):
+ def _distribute_datasets_from_function(self, dataset_fn,
+ ... | [CollectiveAllReduceExtended->[_reduce_to->[_get_cross_device_ops],_distribute_datasets_from_function->[_make_input_context,_input_workers_with_options],_input_workers->[_input_workers_with_options],_configure->[_initialize_multi_worker],__init__->[__init__],_make_input_fn_iterator->[_make_input_context],_gather_to_imp... | Distribute a single dataset from a function. | of `tf.distribute.MirroredStrategy` (here and in all other places) |
@@ -14,9 +14,13 @@
package schedule
import (
+ "context"
"math"
"math/rand"
"sync"
+ "time"
+
+ "github.com/tikv/pd/pkg/cache"
"github.com/pingcap/errors"
"github.com/pingcap/kvproto/pkg/metapb"
| [collectAvailableStores->[newFilters],selectPeerToReplace->[get],scatterRegion->[put,reset],selectAvailableLeaderStores->[put,get]] | Creates a new selectedStores object that can be used to manage the given key. put - put a unique id in the store if checkExist is true. | Please remove this line |
@@ -11,16 +11,14 @@ class StripeActiveCardsController < ApplicationController
Rails.logger.info("Stripe Add New Card Success - #{current_user.username}")
flash[:settings_notice] = "Your billing information has been updated"
else
- DatadogStatsClient.increment("stripe.errors")
+ DatadogStats... | [StripeActiveCardsController->[find_or_create_customer->[update]]] | stripe_active_card creates a new card and sets the default source to the. | I noticed there are no DD `tags` for the `destroy` action |
@@ -37,9 +37,12 @@
configuration.EnableInstallers();
configuration.DisableFeature<TimeoutManager>();
- configuration.Recoverability()
- .Delayed(delayed => delayed.NumberOfRetries(0))
- .Immediate(immediate => immediate.NumberOfRetries(0));
+ ... | [DefaultServer->[GetConfiguration->[configuration,SetDefault,NumberOfRetries,EndpointName,CustomConfigurationSource,TypesToIncludeInScan,EnableInstallers,RegisterComponentsAndInheritanceHierarchy,TryGet,DefineBuilder,UseSerialization,GetTypesScopedByTestClass,ConfigureAwait,AddRange,CreateInstance,Settings,configuratio... | Get the configuration for the given run descriptor. | do we really need this? The default behavior for tests is to disable all retries. If you want retries, you probably have a good idea of what retry config you need and the default values will most likely be the wrong configuration anyway. |
@@ -163,10 +163,10 @@ namespace System.Text.Json
if (converter != null)
{
- Type converterTypeToConvert = converter.TypeToConvert;
+ Type? converterTypeToConvert = converter.TypeToConvert;
- if (!converterTypeToConvert.IsAssignableFrom(typeToCon... | [JsonSerializerOptions->[GetDefaultSimpleConverters->[TypeToConvert,Count,Add,Assert],HasConverter->[GetConverter],GetDefaultConverters->[Count,Add,Assert],JsonConverter->[GetConverter,CreateConverter,ThrowInvalidOperationException_SerializationConverterNotCompatible,TypeToConvert,GetConstructor,TryGetValue,GetAttribut... | Get a converter for a given type. Checks if a type converter can be added. | OK, reasoning through this one, there is no way for `converter.TypeToConvert` to be null here. We can remove this null check and use `!` here. We should go even farther and use `null!` on `JsonConverter` and not make `TypeToConvert` nullable. |
@@ -75,9 +75,9 @@ public abstract class AbstractRulesAttachment extends AbstractConditionsAttachme
m_players = value;
}
- public ArrayList<PlayerID> getPlayers() {
+ public List<PlayerID> getPlayers() {
if (m_players.isEmpty()) {
- return new ArrayList<>(Collections.singletonList((PlayerID) getAtt... | [AbstractRulesAttachment->[getTerritoriesBasedOnStringName->[setTerritoryCount],validate->[validate],getTerritoryListBasedOnInputFromXml->[getTerritoriesBasedOnStringName,setTerritoryCount],getListedTerritories->[setTerritoryCount]]] | Method to set the list of players. | Note that there is a change in runtime behavior here. Previously, the caller, if they wanted to, could call methods like `add()` and `remove()` on the returned list. Now that it's an array-backed list, those operations will fail with an `UnsupportedOperationException`. Since the other branch always returns a fully-muta... |
@@ -26,6 +26,8 @@ class ChatChannelMembershipsController < ApplicationController
def create
membership_params = params[:chat_channel_membership]
@chat_channel = ChatChannel.find(membership_params[:chat_channel_id])
+ raise Pundit::NotAuthorizedError if @chat_channel.private_org_channel? # Not available ... | [ChatChannelMembershipsController->[destroy->[update],respond_to_invitation->[update],send_chat_action_message->[create],update->[update]]] | This method is called when a user adds a new lease to a channel. If the new. | Can we make this part of the existing policy that we authorize on the next line? Seems if we add `!record.private_org_channel?` to `user_can_edit_channel` it would work too? |
@@ -95,7 +95,7 @@ class CmdCompletion(CmdBaseNoRepo):
parser = get_main_parser()
shell = self.args.shell
script = shtab.complete(parser, shell=shell, preamble=PREAMBLE)
- print(script)
+ ui.write(script, force=True)
return 0
| [add_parser->[add_argument,add_parser,set_defaults,append_doc_link],CmdCompletion->[run->[print,complete,get_main_parser]],getLogger] | Run the command line utility. | Note that `force=True` will print completion script even in the `--quiet` mode (which what was already there with `print()`). |
@@ -362,9 +362,11 @@ namespace Microsoft.Xna.Framework
#region Public Methods
+#if IOS || WINDOWS_STOREAPP
+ [Obsolete("This platform's policy does not allow programmatically closing.", true)]
+#endif
public void Exit()
{
- Platform.Exit();
_suppressDraw = true;
... | [Game->[InitializeExistingComponents->[Initialize],OnDeactivated->[AssertNotDisposed],Log->[Log],DoUpdate->[AssertNotDisposed,Update],Components_ComponentAdded->[Initialize],DoDraw->[Draw,EndDraw,AssertNotDisposed,BeginDraw],Exit->[Exit],Platform_ApplicationViewChanged->[AssertNotDisposed],DoInitialize->[AssertNotDispo... | Exit the game with a specific type. | Whoa.... that is wrong. This removes the exit function for all platforms! This line needs to be restored! |
@@ -37,6 +37,7 @@ class CmdDataPull(CmdDataBase):
force=self.args.force,
recursive=self.args.recursive,
run_cache=self.args.run_cache,
+ glob=self.args.glob,
)
self.log_summary(stats)
except (CheckoutError, DvcException... | [CmdDataFetch->[run->[log_summary]],add_parser->[add_parser,shared_parent_parser],CmdDataPush->[run->[log_summary]],CmdDataPull->[run->[log_summary]]] | Run the task. | Looks like we are also missing it in fetch, but that will require some additional modification, so out of scope for this PR. |
@@ -334,9 +334,7 @@ class Server:
t0 = time.time()
self.update_sources(sources)
changed, removed = self.find_changed(sources)
- # TODO: Why create a new FileSystemCache rather than using self.fscache?
- manager.search_paths = compute_search_paths(
- sources, manager.o... | [process_start_options->[process_options,exit],Server->[cmd_hang->[sleep],run_command->[getattr,method],cmd_status->[get_meminfo,update],cmd_check->[str,create_source_list,check],cmd_recheck->[check],update_sources->[add_watched_paths],find_changed->[append,find_changed],check->[flush,fine_grained_increment,initialize_... | Increment a single missing - source by finding changed sources and updating the manager. | @JukkaL This location drew my attention (since there's also `self.fscache`). |
@@ -62,6 +62,13 @@ func resourceAwsSecurityGroupRule() *schema.Resource {
Type: schema.TypeInt,
Required: true,
ForceNew: true,
+ DiffSuppressFunc: func(k, old, new string, d *schema.ResourceData) bool {
+ protocol := protocolForValue(d.Get("protocol").(string))
+ if protocol == "-1" && ol... | [Error->[Sprintf],Unlock,Message,StringInSlice,HasPrefix,Set,NonRetryableError,Code,Atoi,Strings,GetOk,HasChange,Lock,Errorf,SetId,RetryableError,Contains,RevokeSecurityGroupEgress,Sort,UpdateSecurityGroupRuleDescriptionsIngress,ToLower,Id,Int64,AuthorizeSecurityGroupEgress,Get,Split,Printf,AuthorizeSecurityGroupIngres... | The resource schema. Resource constructor for security groups rules. Schema for CIDR - based network addresses. | in the future it'd be good for `protocolForValue` to return a `*string` so we can easily detect this is invalid? |
@@ -108,7 +108,7 @@ class DataInputOperation(RunnerIOOperation):
self.receivers = [
operations.ConsumerSet(
self.counter_factory, self.name_context.step_name, 0,
- next(itervalues(consumers)), self.windowed_coder)]
+ next(iter(consumers.values())), self.windowed_coder)]
... | [BundleProcessor->[process_bundle->[set_output_stream,process_encoded,finish],create_execution_tree->[topological_height->[topological_height],get_operation->[get_operation],is_side_input,get_operation],_fix_output_tags->[fix_only_output_tag->[only_element],fix_only_output_tag]],StateBackedSideInputMap->[__getitem__->[... | Initialize the object with a missing key. | What do you think about having `next(iter(itervalues(consumers)))` here to avoid expansion on Python 2? |
@@ -15,10 +15,14 @@
package kubernetes
import (
+ "bytes"
+ "context"
"errors"
"fmt"
+ "io"
"io/ioutil"
"net/http"
+ "strings"
"time"
"github.com/gardener/gardener/pkg/utils"
| [setupForwardPodPort->[RESTClient,RoundTripperFor,Sprintf,Resource,CoreV1,Post,Name,New,FindFreePort,NewDialer,Namespace,SubResource,URL],ForwardPodPort->[ForwardPorts,setupForwardPodPort],CheckForwardPodPort->[setupForwardPodPort,New,Errorf,After,ForwardPorts],Stream,Close,GetLogs,ReadAll,HandleError] | GetPodLogs retrieves the logs of the given pod with the given options. ForwardPodPort forwards the pod port to the specified local port. | Hm, why is this part of the command "hard-coded" here and not provided by the caller? What if the respective container doesn't have `/bin/sh`? |
@@ -0,0 +1,10 @@
+# -*- encoding : utf-8 -*-
+class SetLongerLengthForTrackThingsTrackQuery < ActiveRecord::Migration
+ def up
+ change_column :track_things, :track_query, :string, :limit => 500
+ end
+
+ def down
+ change_column :track_things, :track_query, :string, :limit => 255
+ end
+end
| [No CFG could be retrieved] | No Summary Found. | Final newline missing. |
@@ -21,6 +21,9 @@ import org.apache.shiro.realm.text.IniRealm;
import org.apache.shiro.subject.Subject;
import org.apache.shiro.util.ThreadContext;
import org.apache.shiro.web.mgt.DefaultWebSecurityManager;
+import org.apache.shiro.mgt.SecurityManager;
+import org.apache.shiro.config.Ini;
+import org.apache.shiro.co... | [SecurityUtils->[getRoles->[hasNext,getName,next,equals,getRealmsList,get,getKey,isAuthenticated,iterator,hasRole,add,getSubject],getRealmsList->[get,getRealms],getPrincipal->[isAuthenticated,getSubject,toString],isValidOrigin->[equals,contains,isEmpty,toLowerCase,getHost]]] | Creates a security object that can be used to access a managed object. Returns the authenticated user if any. | may need to remove import of `Ini`, doesn't seem to be used |
@@ -604,7 +604,7 @@ INCLUDE_PATH;
}
$file .= <<<STATIC_INIT
- \$useStaticLoader = PHP_VERSION_ID >= $staticPhpVersion && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
+ \$useStaticLoader = PHP_VERSION_ID >= $staticPhpVersion ... | [No CFG could be retrieved] | Creates a class loader for the package. Set the namespace and path for the . | you should check for XCache being loaded before checking the php.ini IMO. |
@@ -177,7 +177,7 @@ export function getElement(ampdoc, selector, analyticsEl, selectionMethod) {
// Only tag names are supported currently.
foundEl = closestByTag(analyticsEl, selector);
} else if (selectionMethod == 'scope') {
- foundEl = analyticsEl.parentElement.querySelector(selector);
+ foundEl ... | [No CFG could be retrieved] | Finds an element that matches the given selector. A class to allow tracking of AMP elements in the viewport and for how long it is. | There's the same thing in the `analytics-root`. This code is actually waiting to be killed in preference of that. Can you change there as well? |
@@ -208,8 +208,15 @@ public class ParDoTranslation {
new ParDoLike() {
@Override
public SdkFunctionSpec translateDoFn(SdkComponents newComponents) {
+ Map<String, PCollectionView<?>> sideInputMapping =
+ parDo.getSideInputs().entrySet().stream()
+ ... | [ParDoTranslation->[ParDoTranslator->[translate->[create],create->[ParDoTranslator]],getDoFn->[getDoFn],translateParDo->[translateDoFn->[translateDoFn],isSplittable->[isSplittable],translateParameters->[translateParameters],translateParDo],getParDoPayload->[getParDoPayload,create],fromProto->[getUrn],getSchemaInformati... | Translate parDo. private final int restrictionCoderId = 0 ;. | I believe that this collector is a noop - it will just create the same map as the input (I think this might be a remnant of my code). |
@@ -319,8 +319,14 @@ int ssl_generate_session_id(SSL *s, SSL_SESSION *ss)
}
/* Choose which callback will set the session ID */
- CRYPTO_THREAD_read_lock(s->lock);
- CRYPTO_THREAD_read_lock(s->session_ctx->lock);
+ if (!CRYPTO_THREAD_read_lock(s->lock))
+ return 0;
+ if (!CRYPTO_THREAD_re... | [No CFG could be retrieved] | The next block of code is called from the server. This function is called when the callback failed. It checks if the callback set the session length. | It should probably call SSLfatal() |
@@ -37,6 +37,8 @@ class Hdf5(Package):
list_url = "http://www.hdfgroup.org/ftp/HDF5/releases"
list_depth = 3
+ version('1.10.0', 'bdc935337ee8282579cd6bc4270ad199',
+ url='http://www.hdfgroup.org/ftp/HDF5/releases/hdf5-1.10/hdf5-1.10.0/src/hdf5-1.10.0.tar.gz')
version('1.8.16', 'b8ed9a36a... | [Hdf5->[install->[append,validate,extend,configure,make],url_for_version->[str,Version,up_to],validate->[RuntimeError],variant,depends_on,version]] | Creates a new object from a given package. Check if a sequence number is compatible with the package. | Can you add this url to `url_for_version` instead? |
@@ -347,7 +347,7 @@ def fasterrcnn_resnet50_fpn(pretrained=False, progress=True,
trainable_backbone_layers (int): number of trainable (not frozen) resnet layers starting from final block.
Valid values are between 0 and 5, with 5 meaning all backbone layers are trainable.
"""
- assert train... | [TwoMLPHead->[forward->[fc7,flatten,relu,fc6],__init__->[Linear,super]],FasterRCNN->[__init__->[hasattr,RPNHead,type,num_anchors_per_location,dict,MultiScaleRoIAlign,AnchorGenerator,len,TwoMLPHead,RegionProposalNetwork,super,ValueError,isinstance,FastRCNNPredictor,RoIHeads,GeneralizedRCNNTransform]],fasterrcnn_resnet50... | Construct a Faster R - CNN model with a ResNet - 50 - FPN Train a model with a single non - zero number of boxes and labels. Load the state of the NCBI model if it exists. | I understand why you would want to fix this and I'm not opposed to it in general. But this is out of scope for this PR. If you want to make that change we are happy to accept a follow-up PR after this one is merged. |
@@ -115,9 +115,10 @@ public class InterpreterRestApi {
UpdateInterpreterSettingRequest.class);
interpreterFactory.setPropertyAndRestart(settingId, p.getOption(), p.getProperties());
} catch (InterpreterException e) {
- return new JsonResponse(Status.NOT_FOUND, e.getMessage(), e).build();
+ ... | [InterpreterRestApi->[listSettings->[build,get],updateSetting->[fromJson,getProperties,setPropertyAndRestart,getOption,build,get,info],newSettings->[fromJson,getProperties,getName,putAll,getOption,build,Properties,getGroup,add],restartSetting->[info,build,get,restart],listInterpreter->[build],removeSetting->[info,remov... | Updates an interpreter setting. | can we capture stacktrace here too? |
@@ -865,11 +865,12 @@ def test_post_pfs_feedback(query_paths_args):
with patch.object(requests, "post", return_value=request_mock()) as feedback:
post_pfs_feedback(
+ routing_mode=RoutingMode.PRIVATE,
+ pfs_config=query_paths_args["pfs_config"],
token_network_address=t... | [happy_path_fixture->[create_square_network_topology],test_routing_mocked_pfs_bad_http_code->[create_square_network_topology,get_best_routes_with_iou_request_mocked],test_routing_mocked_pfs_happy_path_with_updated_iou->[assert_checksum_address_in_url,get_best_routes_with_iou_request_mocked],test_query_paths_with_second... | Test post feedback to PFS. | does the case exist that there is a pfs_config AND the RoutingMode is Private? Or the other way around? If so, we might need tests for that too |
@@ -65,7 +65,7 @@ func resourceAwsDlmLifecyclePolicy() *schema.Resource {
"interval": {
Type: schema.TypeInt,
Required: true,
- ValidateFunc: validateIntegerInSlice([]int{
+ ValidateFunc: validation.IntInSlice([]int{
2,
3... | [StringLenBetween,BoolValue,StringInSlice,UpdateLifecyclePolicy,DeleteLifecyclePolicy,Set,Int64Value,HasChange,CreateLifecyclePolicy,Errorf,SetId,MustCompile,Bool,Id,Int64,Get,StringMatch,Printf,StringValue,String,IntBetween,GetLifecyclePolicy] | DLM lifecycle policy description Required if the resource is missing a reserved key. | Minor nit the total amount of Int values for this slice is small enough to have on a single line. Let's inline the values so that it's easier to grok. |
@@ -133,7 +133,7 @@ class DevHub(Base):
_register_link_locator = (
By.CSS_SELECTOR,
- '.DevHub-Navigation-Register > a:nth-child(1)'
+ 'li.show-on-desktop:nth-child(7) > a:nth-child(1)'
)
_sign_in_locator = (
By.CSS_SELECTOR,
| [DevHub->[Header->[click_sign_out->[DevHub,wait_for_page_to_load]],login->[login],upload_addon->[wait_for_page_to_load],AddonsListItem->[edit->[wait_for_page_to_load]]]] | This method is called when the page is loaded. | Why is that necessary? The class `DevHub-Navigation-Register` still exists, these pages haven't changed since forever. |
@@ -1,10 +1,12 @@
import importlib
-from typing import List
+from typing import Dict, List, NewType, Union
from django.utils.translation import pgettext_lazy
from .checks import check_extensions # NOQA: F401
+ConfigurationType = NewType("ConfigurationType", Dict[str, Union[str, bool]])
+
def discover_plugi... | [discover_plugins_modules->[ImportError,import_module,rsplit,append],ConfigurationTypeField->[pgettext_lazy]] | Given a list of plugin paths return a list of modules that are available. | Please correct me If I am wrong. You use it only in the tests, am I right? Shouldn't be declared inside tests in that case? |
@@ -19,7 +19,7 @@ class R(AutotoolsPackage):
url = "https://cloud.r-project.org/src/base/R-3/R-3.4.3.tar.gz"
extendable = True
-
+ version('3.5.3', sha256='2bfa37b7bd709f003d6b8a172ddfb6d03ddd2d672d6096439523039f7a8e678c')
version('3.5.2', sha256='e53d8c3cf20f2b8d7a9c1631b6f6a22874506fb392034758b3bb... | [R->[r_lib_dir->[join_path],copy_makeconf->[join_path,install],etcdir->[join_path],setup_dependent_environment->[join_path,prepend_path,extends,append,set,format,join,traverse],setup_dependent_package->[join_path,Executable,mkdirp],setup_environment->[prepend_path,join_path],configure_args->[join_path,format,extend,app... | Creates an instance of the class. Provides a list of all possible version numbers. | Please preserve the vertical space between the variable setting and the version specifications. |
@@ -49,7 +49,9 @@ public class DefaultHttpListenerConfig extends AbstractAnnotatedObject implement
public static final int DEFAULT_MAX_THREADS = 128;
private final Logger logger = LoggerFactory.getLogger(getClass());
- public static final int DEFAULT_CONNECTION_IDLE_TIMEOUT = 30 * 1000;
+ // The liste... | [DefaultHttpListenerConfig->[addRequestHandler->[addRequestHandler],createWorkManager->[createWorkManager],stop->[stop],start->[createWorkManager,start],toString->[toString],listenerUrl->[getHost,getPort]]] | Creates a new instance of the HttpListenerConfig class. The work manager. | Avoid the method call and simply import the constant (you won't be able to do a static import but that is fine) |
@@ -103,12 +103,14 @@ def run_eval(agent, opt, datatype, max_exs=-1, write_log=False, valid_world=None
print('[ running eval: ' + datatype + ' ]')
if 'stream' in opt['datatype']:
datatype += ':stream'
- opt['datatype'] = datatype
- if opt.get('evaltask'):
- opt['task'] = opt['evaltask']
... | [TrainLoop->[validate->[run_eval,save_best_valid],train->[run_eval,validate,log]],TrainLoop] | run_eval - Run the evaluation on validation and test data. | hmm can we make this optional perhaps in case for models that it doesnt work for? |
@@ -1775,12 +1775,15 @@ class SemanticAnalyzerPass2(NodeVisitor[None], SemanticAnalyzerPluginInterface):
in_dynamic_func=dynamic,
global_scope=global_scope,
warn_bound_tvar=warn_bound_tvar)
+ tp = None # type: ... | [infer_condition_value->[infer_condition_value],make_any_non_explicit->[accept],SemanticAnalyzerPass2->[analyze_comp_for->[analyze_lvalue],build_newtype_typeinfo->[named_type],name_not_defined->[add_fixture_note,lookup_fully_qualified_or_none],check_classvar->[is_self_member_ref],visit_lambda_expr->[analyze_function],b... | Analyzes a type alias. Non - subscripted right hand side creates a ckey for a type. Set the original line and column of the missing alias. | Style nit: we generally use `typ` for variables of type `Type` instead of `tp`. |
@@ -0,0 +1,14 @@
+class DbActivityDecorator < ApplicationDecorator
+ def resource_diff_table
+ new_resource = trackable.class.new(parameters["new"])
+ old_resource = trackable.class.new(parameters["old"])
+ data = {
+ resource: trackable,
+ diffs: diffs,
+ draft_values: new_resource.decorate.to... | [No CFG could be retrieved] | No Summary Found. | Assignment Branch Condition size for resource_diff_table is too high. [18.25/15] |
@@ -32,7 +32,7 @@ import org.apache.beam.sdk.values.KV;
import org.apache.beam.sdk.values.TupleTag;
import org.apache.spark.Accumulator;
import org.apache.spark.api.java.function.FlatMapFunction;
-
+import org.joda.time.Instant;
/**
| [DoFnFunction->[call->[callWithCtxt],ProcCtxt->[clearOutput->[clear],output->[add],getOutputIterator->[iterator]]]] | Implementation of a Java DoFn function that converts a single element type into a Java DoFn This function is called when a window of type Beam has been encountered. | unused. Occurs in `MultiDoFnFunction` as well. |
@@ -2532,7 +2532,7 @@ void ByteCodeGenerator::GetEnclosingNonLambdaScope(FuncInfo *funcInfo, Scope * &
{
envIndex++;
}
- if (((scope == scope->GetFunc()->GetBodyScope() || scope == scope->GetFunc()->GetParamScope()) && !scope->GetFunc()->IsLambda()) || scope->IsGlobalEvalBlockScope... | [No CFG could be retrieved] | Private method for internal scope initialization. This function is called from the JS code generation code generator. It finds the element in the. | Is this an unrelated bug fix or was this broken by the precise closure-capture somehow? |
@@ -85,4 +85,12 @@ function wpseo_killBlockingFiles( nonce ) {
function copy_home_meta() {
jQuery('#og_frontpage_desc').val(jQuery('#meta_description').val());
-}
\ No newline at end of file
+}
+
+/**
+ * When the hash changes, get the base url from the action and then add the current hash
+ */
+jQuery(window).on(... | [No CFG could be retrieved] | Copy the meta description from the home page to the meta description of the page. | Please rename `curUrl` to `currentUrl` for the sake of readability. |
@@ -282,7 +282,14 @@ class Trainer(TrainerBase):
self._pytorch_model = self.model
def rescale_gradients(self) -> Optional[float]:
- return training_util.rescale_gradients(self.model, self._grad_norm)
+ if self._opt_level is not None:
+ if self._grad_norm:
+ # ... | [Trainer->[_validation_loss->[batch_loss],_train_epoch->[rescale_gradients,batch_loss],rescale_gradients->[rescale_gradients],train->[_validation_loss,_train_epoch]]] | Rescale gradients of the model and return the loss. | Another option here is to add a `use_amp` flag to `rescale_gradients`. Oh, except that then also requires passing in the optimizer... Yeah, I think what you have here is good enough. |
@@ -52,6 +52,7 @@ class OffsetRange(object):
return hash((type(self), self.start, self.stop))
def split(self, desired_num_offsets_per_split, min_num_offsets_per_split=1):
+ # type: (...) -> Iterator[OffsetRange]
current_split_start = self.start
max_split_size = max(
desired_num_offsets_p... | [OffsetRange->[split->[OffsetRange],split_at->[OffsetRange]],OffsetRestrictionTracker->[try_split->[split_at]]] | Split this range into smaller ranges. | Input looks like `(int, int)`. Any reason to leave it empty? |
@@ -1856,6 +1856,9 @@ namespace Js
{
if (descriptor->IsAccessor && !(attributes & PropertyLetConstGlobal))
{
+#if DEBUG
+ Var ctor = JavascriptOperators::GetProperty(instance, PropertyIds::constructor, scriptContext);
+#endif
AssertM... | [No CFG could be retrieved] | Adds a shadowed property to the object. | How does this ctor work below if it's defined in `#if DEBUG`? |
@@ -2585,6 +2585,12 @@ type SecurityContextConstraints struct {
SupplementalGroups SupplementalGroupsStrategyOptions
// FSGroup is the strategy that will dictate what fs group is used by the SecurityContext.
FSGroup FSGroupStrategyOptions
+ // ReadOnlyRootFilesystem when set to true will force containers to run w... | [No CFG could be retrieved] | AllowedCapabilities - Defines the capabilities of a single host spec. | Is there a use-case for _preventing_ readonly fs from being used? |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.