patch stringlengths 18 160k | callgraph stringlengths 4 179k | summary stringlengths 4 947 | msg stringlengths 6 3.42k |
|---|---|---|---|
@@ -461,11 +461,11 @@ namespace ClientDependency.Core.FileRegistration.Providers
{
//sort both the js and css dependencies properly
- var jsDependencies = DependencySorter.SortItems(DependencySorter.FilterDependencies(
- group.Where(x => x.DependencyType... | [BaseFileRegistrationProvider->[Initialize->[Initialize],WriteStaggeredDependencies->[StaggerOnDifferentAttributes],WriteDependencies->[UpdateFilePaths,EnsureNoDuplicates,WriteStaggeredDependencies]]] | This function writes a list of all dependencies with a specific tag and returns the name of the Returns the string representation of the nan nan nan nan nan nan nan nan nan nan nan nan. | This uses the piece above for framework deduplication |
@@ -64,7 +64,15 @@ class SimpleGradient(SaliencyInterpreter):
"""
def forward_hook(module, inputs, output):
- embeddings_list.append(output.squeeze(0).clone().detach())
+ # The assumption here is that the input must in the shape of (1, seq_len, emb_size).
+ # Note th... | [SimpleGradient->[_register_hooks->[forward_hook->[append,squeeze],get_token_offsets->[append,get_token_offsets_from_text_field_inputs],append,register_forward_hook,get_interpretable_text_field_embedder,get_interpretable_layer],saliency_interpret_from_json->[int,_aggregate_token_embeddings,reverse,dict,sum,norm,_regist... | Finds all of the TextFieldEmbedders and registers a forward hook onto them. | Is it doable to handle these edge cases in this PR as well? |
@@ -677,10 +677,10 @@ namespace Microsoft.Xna.Framework
internal void applyChanges(GraphicsDeviceManager manager)
{
Platform.BeginScreenDeviceChange(GraphicsDevice.PresentationParameters.IsFullScreen);
- if (GraphicsDevice.PresentationParameters.IsFullScreen)
- Platform.E... | [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... | This method applies changes that have not been made to the device manager. | Same here, just delete the code that you feel is no longer needed. The diff history will tell us what has changed. |
@@ -0,0 +1,9 @@
+from enum import Enum
+
+
+class InvoiceErrorCode(Enum):
+ REQUIRED = "required"
+ NOT_READY = "not_ready"
+ URL_OR_NUMBER_NOT_SET = "url_or_number_not_set"
+ NOT_FOUND = "not_found"
+ INVALID_STATUS = "invalid_status"
| [No CFG could be retrieved] | No Summary Found. | We should add this enum to `SALEOR_ERROR_CODE_ENUMS` in `saleor.graphql.core.utils`. |
@@ -342,12 +342,6 @@ public class CasOAuthConfiguration {
return new OAuth20AccessTokenAuthenticator(ticketRegistry.getObject());
}
- @ConditionalOnMissingBean(name = "oauthAccessTokenResponseGenerator")
- @Bean
- public OAuth20AccessTokenResponseGenerator oauthAccessTokenResponseGenerator() {
... | [CasOAuthConfiguration->[buildConfigurationContext->[oauthAuthorizationRequestValidators],oauthAccessTokenResponseGenerator->[accessTokenJwtBuilder],defaultOAuthCodeFactory->[oAuthCodeIdGenerator,oAuthCodeExpirationPolicy],oAuth2UserProfileDataCreator->[profileScopeToAttributesFilter],oauthTokenRequestValidators->[oaut... | OAuth2 Authenticator for OAuth2 tokens. | Could you explain why this bean is removed? |
@@ -94,11 +94,11 @@ final class QueryParameterValidateListener
if (\is_array($matches[$rootName])) {
$keyName = array_keys($matches[$rootName])[0];
- $queryParameter = $request->query->get($rootName);
+ $queryParameter = $request->query->get((string) $rootName);
... | [QueryParameterValidateListener->[onKernelRequest->[create,getFilter,getDescription,isMethodSafe,getCollectionOperationAttribute,isRequiredFilterValid,getRequest],isRequiredFilterValid->[get],__construct->[setFilterLocator]]] | Checks if a required filter is valid. | same can't we cast above? |
@@ -25,9 +25,9 @@ type RouteSpec struct {
// Path that the router watches for, to route traffic for to the service. Optional
Path string
- // An object the route points to. Only the Service kind is allowed, and it will
+ // Objects that the route points to. Only the Service kind is allowed, and it will
// be de... | [No CFG could be retrieved] | Imports a single type of route from a given k8s. io object. type is the type of the route that is exposed. | Don't do this - keep the fields the same internally and externally. When we move to ingress this is going to have to merge in, and ingress has no concept of duplicate from. |
@@ -149,13 +149,11 @@ get_linux_hostspec(const char *solaris_hostspec, char **plinux_hostspec)
* to skip the @ in this case
*/
*plinux_hostspec = strdup(solaris_hostspec + 1);
- } else {
+ } else
*plinux_hostspec = strdup(solaris_hostspec);
- }
- if (*plinux_hostspec == NULL) {
+ if (*plinux_hostspec ==... | [int->[fork,strdup,unlink,libzfs_run_process,nfs_enable_share,fprintf,nfs_available,strcat,strlen,malloc,strchr,nfs_disable_share,fcntl,mkstemp,foreach_nfs_shareopt,sprintf,foreach_nfs_host,waitpid,strcmp,foreach_shareopt,FSINFO,close,WEXITSTATUS,free,realloc,get_linux_shareopts,get_linux_hostspec,add_linux_shareopt,ex... | This method is used to get the correct hostspec from the system. | [cstyle] The { } are expected for the `else` block when need by the `if` portion. |
@@ -46,14 +46,6 @@ class TestPostProcess(KratosUnittest.TestCase):
model = KratosMultiphysics.Model()
auxiliary_functions_for_tests.CreateAndRunStageInSelectedNumberOfOpenMPThreads(TestPostProcessClass1, model, parameters_file_name, 1)
- def tearDown(self):
- file_to_remove = os.path.join(... | [TestPostProcessClass1->[Finalize->[str,super,RemoveFoldersWithResults],GetMainPath->[realpath,dirname,join],GetProblemNameWithPath->[DEM_parameters,join]],TestPostProcess->[test_gid_printing_many_results->[dirname,realpath,join,CreateAndRunStageInSelectedNumberOfOpenMPThreads,Model],tearDown->[chdir,DeleteFileIfExisti... | This test method prints many results in a single group. | I would not remove these lines. They are not deleting general folders, but specific files which were created by this specific case |
@@ -206,11 +206,7 @@ describe AlaveteliPro::SubscriptionsController, feature: :pro_pricing do
context 'with coupon code' do
before do
- post :create, 'stripeToken' => token,
- 'stripeTokenType' => 'card',
- 'stripeEmail' => user.email,
- ... | [successful_signup->[email,post],email,create,new,let,be,describe,start,create_test_helper,first,it,create_pro_account,map,to,stripe_customer_id,plan_path,before,prepare_error,post,let!,prepare_card_error,require,signin_path,dirname,stop,shared_examples,enable_actor,generate_card_token,match,id,create_plan,enabled?,cus... | Allows actor to receive a message when a transaction is successful. nova requires namespaced coupon code. | Line is too long. [168/80] |
@@ -112,7 +112,7 @@ public abstract class AbstractAsyncNodeMonitorDescriptor<T> extends AbstractNode
* Controls the time out of monitoring.
*/
protected long getMonitoringTimeOut() {
- return TimeUnit.SECONDS.toMillis(30);
+ return Long.getLong(AbstractAsyncNodeMonitorDescriptor.class.get... | [AbstractAsyncNodeMonitorDescriptor->[monitor->[createCallable]]] | Get the monitoring time out. | I propose to create a static variable. Then users will be able to alter the value from Groovy scripts w/o restart (in emergency cases) |
@@ -15,7 +15,7 @@ RSpec.describe "/admin/tags", type: :request do
Audit::Subscribe.forget listener
end
- describe "PUT /admin/tag/:id" do
+ describe "PUT /admin/content_manager/tags/:id" do
it "creates entry for #update action" do
put admin_tag_path(tag.id), params: { id: tag.id, tag: { short_su... | [sentence,create,listen,let,describe,build_stubbed,where,it,put,admin_tag_path,to,before,let!,require,id,forget,eq,sign_in,after] | adds a description to the admin tag audit logs. | changed the description to the correct path |
@@ -479,7 +479,10 @@ func StartNode(nodeConfig configapi.NodeConfig, components *utilflags.ComponentF
config.EnsureVolumeDir()
config.EnsureDocker(docker.NewHelper())
config.EnsureLocalQuota(nodeConfig) // must be performed after EnsureVolumeDir
- config.RunKubelet()
+ go func() {
+ glog.Fatal(runKubeletIn... | [createNodeConfig->[Validate],Validate->[Validate]] | Build network options. | do we can about gracefully stopping kubelet on SIGTERM? |
@@ -151,7 +151,7 @@ class SBD(Dataset):
)
return Mapper(dp, self._collate_and_decode_sample, fn_kwargs=dict(config=config, decoder=decoder))
- def generate_categories_file(self, root: Union[str, pathlib.Path]) -> None:
+ def _generate_categories(self, root: pathlib.Path) -> Tuple[str, ...]... | [SBD->[_collate_and_decode_sample->[_decode_ann],generate_categories_file->[resources]],SBD] | Create a data pipe from a sequence of missing - missing data. Create a category file if there is no information . | What does ellipsis mean here? |
@@ -55,6 +55,17 @@ class A {
instance5 = 12; // compliant - primitive type
return instance5;
}
+
+ protected static Object instance6 = null;
+ public static Object getInstance6() {
+ if (instance6 != null) {
+ return instance6;
+ }
+
+ A.instance6 = new Object(); // FN - not using identif... | [A->[B->[resetConfiguration->[lock,unlock],ReentrantLock],C->[resetConfiguration2->[tryLock,unlock],ReentrantLock,lock],getInstance2->[Object],getInstance3->[Object],foo->[Object],getInstance->[Object,foo],IllegalStateException,URI]] | Returns the instance of the n - th node. | arguable : I don't see the testcase which will make you require the stack. |
@@ -380,10 +380,12 @@ public class GameSelectorPanel extends JPanel implements Observer {
}
model.load(entry);
});
- setOriginalPropertiesMap(model.getGameData());
- // only for new games, not saved games, we set the default options, and set them only once
- ... | [GameSelectorPanel->[selectGameFile->[setOriginalPropertiesMap,selectGameFile],selectGameOptions->[selectGameOptions],update->[setWidgetActivation,updateGameData]]] | Select a game file. | There's a potential NPE here due to the TOCTOU, similar to what @RoiEXLab fixed in #2997. I'd suggest storing `model.getGameData()` in a local, and using that in the code that follows. |
@@ -332,13 +332,11 @@ export class AmpImg extends BaseElement {
*/
onImgLoadingError_() {
if (this.allowImgLoadFallback_) {
- this.getVsync().mutate(() => {
- this.img_.classList.add('i-amphtml-ghost');
- this.toggleFallback(true);
- // Hide placeholders, as browsers that don't sup... | [No CFG could be retrieved] | Private methods for handling the neccesary data attributes. Adds an AmpImg to the window if it doesn t already exist. | Are we not worrying about vsync anymore? |
@@ -94,7 +94,7 @@ module Users
end
def handle_unsuccessful_password_reset(result)
- if result.errors[:reset_password_token]
+ if result.errors[:reset_password_token].present?
flash[:error] = t('devise.passwords.token_expired')
redirect_to new_user_password_path
return
| [ResetPasswordsController->[update->[new],build_user->[new],edit->[new],create->[new],new->[new]]] | if the user has not received a password reset token redirect to the new user password path otherwise. | Was this related to the Rails upgrade in some way, or just catching a best practice? |
@@ -70,7 +70,7 @@ public class GlobalToolConfiguration extends ManagementLink {
@Override
public Permission getRequiredPermission() {
- return Jenkins.ADMINISTER;
+ return Jenkins.SYSTEM_READ;
}
@POST
| [GlobalToolConfiguration->[configureDescriptor->[configure]]] | This method is called by the user to configure the jenkins. | I have a doubt. The author of a plugin contributing with a global tool configuration might be considered his/her piece of UI is not going to be shown to anyone else but Administers. So s/he didn't need to check the permission because it was already done. Now, everyone with `SYSTEM_READ` could see his/her piece of UI, s... |
@@ -70,4 +70,7 @@ public class BeamBuiltinMethods {
public static final Method DATE_METHOD =
Types.lookupMethod(DateFunctions.class, "date", Integer.class, Integer.class, Integer.class);
+
+ public static final Method LOGICAL_AND =
+ Types.lookupMethod(BoolFunctions.class, "logicalAnd", Boolean.class,... | [BeamBuiltinMethods->[lookupMethod]] | Replies the date method. | This isn't used anywhere, is it? If not, please remove it. |
@@ -805,6 +805,8 @@ class BlobClient(StorageAccountHostsMixin): # pylint: disable=too-many-public-m
The number of parallel connections with which to download.
:keyword str encoding:
Encoding to decode the downloaded bytes. Default is None, i.e. no decoding.
+ :keyword bool dec... | [BlobClient->[create_page_blob->[_create_page_blob_options],get_page_range_diff_for_managed_disk->[_get_page_ranges_options],set_blob_tags->[_set_blob_tags_options],abort_copy->[_abort_copy_options],set_sequence_number->[_set_sequence_number_options],start_copy_from_url->[_start_copy_from_url_options,_encode_source_url... | Downloads a blob from Azure Storage Stream. Downloads a resource if it has not been modified since the specified date. StreamDownloader is a stream downloader that downloads the contents of the file into the local filesystem. | Let's improve the description by mentioning the terms "encoded/zipped files" or something along those lines |
@@ -860,7 +860,8 @@ func GetDesktopNotificationSnippet(conv *chat1.ConversationLocal, currentUsernam
}
mvalid := msg.Valid()
if !mvalid.IsEphemeral() {
- return GetMsgSnippet(msg, *conv, currentUsername)
+ snippet, _ := GetMsgSnippet(msg, *conv, currentUsername)
+ return snippet
}
// If the message is al... | [showLog->[showVerbose],Debug->[showLog],Less->[Less],Trace->[showLog],Debug] | GetDesktopNotificationSnippet - Gets the message snippet for a message in the conversation. Get members info from reader info. | why doesn't this snippet need the separation as well? |
@@ -525,8 +525,8 @@ void demux_prepare_look_up_table(struct comp_dev *dev)
for (k = 0; k < PLATFORM_MAX_CHANNELS; k++) {
if (cd->config.streams[i].mask[j] & BIT(k)) {
/* MUX component has only one sink */
- cd->lookup[i].copy_elem[idx].in_ch = k;
- cd->lookup[i].copy_elem[idx].out_ch = j;
+ c... | [No CFG could be retrieved] | This function prepares the lookup table for the MUX component. function to find the processing function of the given type of buffer. | Does it make more sense to rename j and m as row and column ? |
@@ -426,6 +426,18 @@ func (opts *RegistryOptions) RunCmdRegistry() error {
},
},
})
+ } else if opts.Config.Deployment {
+ objects = append(objects, &extensions.Deployment{
+ ObjectMeta: metav1.ObjectMeta{
+ Name: name,
+ Labels: opts.label,
+ },
+ Spec: extensions.DeploymentSpec{
+ Replic... | [RunCmdRegistry->[ShouldPrint,Object,Fprintf,Flag,ReadFile,Sprintf,AddServices,Run,List,VersionedPrintObject,WithMessage,Errorf,IsNotFound,Services,MustParse,Get,Set,Add],Complete->[DefaultNamespace,ExpandOrDie,LabelsFromSpec,ResourceMapper,ContainerPortsFromString,Core,UsageError,Errorf,ParseInt,Split,Clients],StringV... | RunCmdRegistry runs the docker - registry command Internal function to create a configuration object that can be used to create a container in the registry Parse returns a list of objects that can be used to create a cluster Add objects to the list of objects to create. | Shouldn't the flag conflict with `--daemonset`? |
@@ -329,6 +329,14 @@ namespace DotNetNuke.Entities.Portals
}
}
+ public string DefaultIconLocation
+ {
+ get
+ {
+ return PortalController.GetPortalSetting("DefaultIconLocation", PortalId, "icons/sigma");
+ }
+ }
+
... | [PortalSettings->[GetBreadCrumbsRecursively->[GetBreadCrumbsRecursively],ExecuteScript->[ExecuteScript],GetProviderPath->[GetProviderPath],GetPortalSettings->[ConfigureActiveTab,ConfigureModule],FindDatabaseVersion->[FindDatabaseVersion],UpdateSiteSetting->[UpdatePortalSetting],UpdatePortalSetting->[UpdatePortalSetting... | Gets the Default Admin Container DefaultSkin and DefaultControlPanelMode. Get the name of the node with the default portal skin. | Shouldn't this just be `IconLocation`? I would expect the default to always be sigma, this is the current configured location. |
@@ -144,3 +144,14 @@ func (i *Iterator) Next() (File, error) {
return nil, err
}
}
+
+func hashDataRefs(dataRefs []*chunk.DataRef) ([]byte, error) {
+ h := pachhash.New()
+ for _, dataRef := range dataRefs {
+ _, err := h.Write(dataRef.Hash)
+ if err != nil {
+ return nil, err
+ }
+ }
+ return h.Sum(nil), ni... | [Peek->[Next],Copy,NewWriter,Done,Flush,Clean,Index,NewHeader,Trim,Close,Iterate,NewTestStorage,Delete,Content,WriteHeader,HasSuffix,SizeBytes] | Next returns the next file in the iterator. If there are no more files in the iterator. | This is 32 bytes raw, not hex right? |
@@ -155,13 +155,12 @@ func (d *Uninstall) Run(clic *cli.Context) (err error) {
installerBuild := version.GetBuild()
if vchConfig.Version == nil || !installerBuild.Equal(vchConfig.Version) {
if !d.Data.Force {
- log.Errorf("VCH version %q is different than installer version %s. Specify --force to force delete",... | [Run->[InitDiagnosticLogs,NewDispatcher,GetBuild,Warnf,Reference,Error,Args,ValidateTarget,New,LogErrorIfAny,NewVCHFromComputePath,Errorf,ShortVersion,Equal,Infof,processParams,NewVCHFromID,Err,CollectDiagnosticLogs,GetVCHConfig,WithTimeout,Background,DeleteVCH,NewValidator,String,SetLevel],processParams->[End,HasCrede... | Run removes a VCH Delete a virtual container host. | is the ending `or` a typo? |
@@ -278,7 +278,7 @@ evoked2 = mne.read_evokeds(
##############################################################################
# Compute a contrast:
-contrast = evoked1 - evoked2
+contrast = mne.combine_evoked([evoked1, evoked2], weights=[1, -1])
print(contrast)
#################################################... | [max,savemat,read_inverse_operator,read_epochs,apply_inverse_raw,dict,set_config,tfr_morlet,read_label,epochs,read_raw_fif,set_log_level,plot,print,find_events,data_path,get_config_path,time_as_index,read_evokeds,arange,apply_inverse,Epochs,save,pick_types] | This function plot the induced power and phase - locking values of a single This is a hack to work around the problem of the mne. minimum_norm module. | can you explicit the weighting parameter and add a note eg reuse the blob of text that you deleted from pitfalls.rst? |
@@ -72,10 +72,15 @@ module PaginationHelper
when 'marking_state' then to_include = [{:current_submission_used => :results}]
when 'total_mark' then to_include = [{:current_submission_used => :results}]
when 'grace_credits_used' then to_include = [:grace_period_deductions]
+ when 'criterion' the... | [get_filters->[each],handle_paginate_event->[size,include?,clone,raise,blank?,get_filtered_items],get_filtered_items->[call,reverse!,blank?,sort],require] | get_filtered_items - returns an array of items filtered by the given filter sort_. | Indent `when` as deep as `case`.<br>Use the new Ruby 1.9 hash syntax.<br>Line is too long. [81/80]<br>Space inside { missing.<br>Space inside } missing. |
@@ -1011,7 +1011,7 @@ video::IImage* TextureSource::generateImage(const std::string &name)
std::string last_part_of_name = name.substr(last_separator_pos + 1);
- /*
+ /*
If this name is enclosed in parentheses, generate it
and blit it onto the base image
*/
| [No CFG could be retrieved] | returns NULL if no image is found Creates a new image based on the last part of name. | Could you exclude this file from this commit? |
@@ -490,8 +490,8 @@ class CoordinatorMultipleCallExecutionTests(CoordinatorTests):
self.coordinator.execute_multiple_calls([call_request_2, call_request_1])
- task_1 = self.coordinator._ready_task.call_args_list[0][0][0]
- task_2 = self.coordinator._ready_task.call_args_list[1][0][0]
+ ... | [CoordinatorMultipleCallExecutionTests->[test_execute_multiple_calls_circular_dependencies->[assertTrue,CallRequest,assertRaises],test_execute_multiple_calls->[execute_multiple_calls,assertTrue,CallRequest,len],test_execute_multiple_calls_dependencies->[assertTrue,depends_on,execute_multiple_calls,len,CallRequest],setU... | Test task blocks from dependencies. | Should there be an assertion in here that proves if one is rejected, all are rejected? The unit test fixes look almost entirely related to the renaming of the method and not to account for the new behavior. |
@@ -113,6 +113,7 @@ func dumpRouterHeadersLogs(oc *exutil.CLI, name string) {
func getRoutePayloadExec(ns, execPodName, url, host string) (string, error) {
cmd := fmt.Sprintf(`
set -e
+ rc=0
payload=$( curl -s --header 'Host: %s' %q ) || rc=$?
if [[ "${rc:-0}" -eq 0 ]]; then
printf "${payload}"
| [CurrentGinkgoTestDescription,By,WaitForRouterServiceIP,CoreV1,Expect,HaveOccurred,FixturePath,Delete,It,Args,Poll,AdminKubeClient,GetPodLogs,Errorf,WaitForRouterInternalIP,Logf,CreateExecPodOrFail,KubeFramework,NewDeleteOptions,Execute,NewCLI,Failf,BeforeEach,Get,NotTo,RunHostCmd,Describe,ReadRequest,NewReader,Sprintf... | getRoutePayloadExec executes the command that checks if the HTTP response from the host is a. | I was going to say that initializing `rc` is unnecessary because there is no loop, but it's probably a good idea anyway in case the parent process set `rc`. |
@@ -330,10 +330,11 @@ public class Lz4FrameEncoder extends MessageToByteEncoder<ByteBuf> {
}
@Override
- public void handlerAdded(ChannelHandlerContext ctx) throws Exception {
+ public void handlerAdded(ChannelHandlerContext ctx) {
this.ctx = ctx;
// Ensure we use a heap based ByteBu... | [Lz4FrameEncoder->[close->[operationComplete->[close],run->[close,finishEncode],close,finishEncode],finishEncode->[flushBufferedData],handlerRemoved->[cleanup,handlerRemoved]]] | Called when the channel is added or removed. | is this necessary? |
@@ -278,7 +278,9 @@ public class BeamSqlFnExecutor implements BeamSqlExpressionExecutor {
case "LIKE":
ret = new BeamSqlLikeExpression(subExps);
break;
-
+ case "NOT LIKE":
+ ret = new BeamSqlNotLikeExpression(subExps);
+ break;
// arithmetic operators
... | [BeamSqlFnExecutor->[getBeamSqlExpression->[buildExpression]]] | Get the BeamSqlExpression from a RexNode. converts a node of type unknown to BeamSqlPrimitive This method returns a new object which can be used to create a new node. This function returns an object of type BeamSqlExpression which is a subclass of Beam This method creates a new Expression object based on the String ope... | Can we just pass a flag into `BeamSqlLikeExpression`? |
@@ -175,6 +175,14 @@ def check_unlisted_addons_reviewer(request):
return action_allowed(request, amo.permissions.ADDONS_REVIEW_UNLISTED)
+def check_unlisted_addons_viewer(request):
+ unlisted_perms = [
+ amo.permissions.ADDONS_REVIEW_UNLISTED,
+ amo.permissions.REVIEWER_TOOLS_UNLISTED_VIEW,
+ ... | [check_static_theme_reviewer->[action_allowed],check_collection_ownership->[action_allowed_user],mozilla_signed_extension_submission_allowed->[action_allowed_user],system_addon_submission_allowed->[action_allowed_user],check_unlisted_addons_reviewer->[action_allowed],check_ownership->[check_ownership],check_addons_revi... | Check if the user is a static theme reviewer or a theme reviewer. | While I can see how it makes things easier, I'm not sure I like the idea of having a function named `check_unlisted_addons_viewer` check if you're a viewer... or more than that. It can be confusing, and it's not consistent with the rest (mainly because in current code we don't have a function that checks if you're a vi... |
@@ -15,13 +15,11 @@ import javax.validation.constraints.NotNull;
* @since 4.2.0
*/
@Component("defaultAuthenticationTransactionManager")
-public final class DefaultAuthenticationTransactionManager implements AuthenticationTransactionManager {
+public class DefaultAuthenticationTransactionManager implements Authent... | [DefaultAuthenticationTransactionManager->[handle->[collect,debug,isEmpty,authenticate],getLogger]] | Handle authentication transaction. | Just a note on the unrelated work I'm doing on another - I do the opposite i.e. replacing the use of `@Resource` with `@Autowired @Qualifier` combination to be consistent throughout our config infrastructure |
@@ -314,8 +314,18 @@ func RemoveMember(ctx context.Context, g *libkb.GlobalContext, teamname, usernam
if err != nil {
return err
}
+
+ // if username looks like an email address, then remove an invite
+ // (the loadUserVersionByUsername will fail with an email address)
+ if libkb.CheckEmail.F(username) {
+ retu... | [IsMember,Exists,Leave,GetUID,AssertionParseAndOnly,Members,RootAncestorName,GetProofSet,PostTeamSettings,CWarningf,MakeAssertionContext,NumActiveInvites,ResolveFullExpressionNeedUsername,Delete,NormalizedUsername,Eq,NewHTTPArgs,GetError,Add,GetUsername,C,CDebugf,ChangeMembership,Post,New,MemberRole,GetNormalizedName,d... | MemberRole implements the Teams interface for teams. Leave removes the current user from the cache. | what happens if it's `foo@github`? |
@@ -20,8 +20,8 @@ namespace Microsoft.NET.HostModel.Bundle
public FileSpec(string sourcePath, string bundleRelativePath)
{
- SourcePath = sourcePath;
- BundleRelativePath = bundleRelativePath;
+ SourcePath = NormalizeDirectorySeparator(sourcePath);
+ Bundl... | [FileSpec->[IsValid->[IsNullOrWhiteSpace]]] | Checks if the given sequence number is valid. | Can this be Windows UNC path? If yes, is the normalization going to work well for Windows UNC paths? |
@@ -242,6 +242,7 @@ public class UnboundedSourceWrapperTest {
* <p>This test verifies that watermarks are correctly forwarded.
*/
@Test(timeout = 30_000)
+ @Ignore("https://issues.apache.org/jira/browse/BEAM-9164")
public void testWatermarkEmission() throws Exception {
final int numEleme... | [UnboundedSourceWrapperTest->[ParameterizedUnboundedSourceWrapperTest->[testWatermarkEmission->[run],testRestore->[collect->[collect],run],testValueEmission->[collect->[collect],run]],BasicTest->[testAccumulatorRegistrationOnOperatorClose->[close],testSequentialReadingFromBoundedSource->[run],testSourceDoesNotShutdown-... | This test emission of a watermark of a stream source. This method is called by the status maintainer. It is called by the status m. | This one is apparently only flaky on Flink can we better exclude it manually only for Flink? |
@@ -80,6 +80,8 @@ type Config struct {
RulePath string `yaml:"rule_path"`
// URL of the Alertmanager to send notifications to.
+ // If your are configuring the ruler to send to a Cortex Alertmanager,
+ // ensure this includes any path set in the Alertmanager external URL.
AlertmanagerURL string `yaml:"alertmana... | [Rules->[getLocalRules],Validate->[Validate],getLocalRules->[GetRules],ServeHTTP->[ServeHTTP],RegisterFlags->[RegisterFlags]] | Config is the configuration for the recording rules server. | Nice addition. If you move this to the CLI flag description, than it would be part of the auto-generated config. |
@@ -1619,7 +1619,17 @@ int s_client_main(int argc, char **argv)
#endif
if (!app_passwd(passarg, NULL, &pass, NULL)) {
- BIO_printf(bio_err, "Error getting password\n");
+ BIO_printf(bio_err, "Error getting private key password\n");
+ goto end;
+ }
+
+ if (!app_passwd(proxypassarg, NUL... | [No CFG could be retrieved] | Parse the command line arguments and return the result. Parse command - line options and check for missing values. | Please use eplicit NULL tests. |
@@ -223,13 +223,8 @@ export class IntersectionObserver extends Observable {
if (!this.pendingChanges_.length) {
return;
}
- // Note that we multicast the update to all interested windows.
- postMessageToWindows(
- this.iframe_,
- this.clientWindows_,
- 'intersection',
- ... | [No CFG could be retrieved] | Broadcasts the pending changes to all interested windows. | if this method is no more used externally, can be private? |
@@ -434,6 +434,18 @@ public final class TestUtils {
return report.build();
}
+ /**
+ * Create CRL Status report object.
+ * @return {@link CRLStatusReport}
+ */
+ public static CRLStatusReport createCRLStatusReport(
+ List<Long> pendingCRLIds, long receivedCRLId) {
+ CRLStatusReport.Builder re... | [TestUtils->[getRandomContainerReports->[getRandomContainerReports],getContainerReports->[getContainerReports],allocateContainer->[allocateContainer],createRandomDatanodeAndRegister->[getDatanodeDetails],getScm->[getScm],getListOfRegisteredDatanodeDetails->[createRandomDatanodeAndRegister],createStorageReport->[createS... | Creates a CommandStatusReportsProto. Builder from a list of command status reports. | NIT: can you add the complete @param for the java doc? |
@@ -185,7 +185,7 @@ public class ExchangeOperator
Page deserializedPage = serde.deserialize(page);
operatorContext.recordProcessedInput(deserializedPage.getSizeInBytes(), page.getPositionCount());
- return deserializedPage;
+ return deserializedPage.getLazyWrappedPage();
}
... | [ExchangeOperator->[ExchangeOperatorFactory->[createOperator->[ExchangeOperator]],close->[close],isBlocked->[isBlocked],isFinished->[isFinished]]] | This method retrieves the output of the next sequence of bytes from the exchange client. | this doesn't give any performance advantage. We would want to have lazy deserialization, see: `io.prestosql.execution.buffer.PagesSerde#deserialize` |
@@ -138,8 +138,7 @@ class StatelessCheckbox extends React.Component<PropsT, StatelessStateT> {
type={type}
$ref={inputRef}
{...sharedProps}
- {...events}
- {...getOverrideProps(InputOverride)}
+ {...inputEvents}
/>
{(labelPlacement === 'botto... | [No CFG could be retrieved] | A component that allows to check an element in a group of checkboxes that are not disabled. | Have to keep the overrides part |
@@ -232,10 +232,10 @@ class TopicsController < ApplicationController
fetch_topic_view(options)
render_json_dump(TopicViewPostsSerializer.new(@topic_view,
- scope: guardian,
- root: false,
- include_raw: !!params[:include_raw]
- ))
+ scope: g... | [TopicsController->[destroy->[destroy],recover->[recover],invite->[invite],invite_group->[invite_group],toggle_mute->[toggle_mute],remove_allowed_user->[remove_allowed_user],remove_allowed_group->[remove_allowed_group],move_posts_to_destination->[move_posts],perform_show_response->[excerpt]]] | This action returns a list of posts that have a specific chunk. | for the record I prefer the original format here. One problem with lining up is that if the original line changes in length you have to move all subsequent lines which pollutes the history. This is a bikeshed though. |
@@ -24,6 +24,12 @@ type Process struct {
Ctime time.Time
}
+type ProcStats struct {
+ ProcStats bool
+ Procs []string
+ ProcsMap ProcsMap
+}
+
func GetProcess(pid int, cmdline string) (*Process, error) {
state := sigar.ProcState{}
if err := state.Get(pid); err != nil {
| [Nanoseconds,Join,Warn,Now,FormatStartTime,Errorf,Get,Sub] | GetProcess imports and returns a Process object given a process ID. GetProcMemPercentage returns the percentage of a given process s memory. | Is there a better name for this? It has some stutter. |
@@ -50,6 +50,15 @@ from apache_beam.io.gcp.bigquery_tools import parse_table_schema_from_json
from apache_beam.io.gcp.internal.clients import bigquery
from apache_beam.options.pipeline_options import PipelineOptions
+# Protect against environments where bigquery library is not available.
+# pylint: disable=wrong-im... | [TestRowAsDictJsonCoder->[test_invalid_json_nan->[json_compliance_exception],test_invalid_json_inf->[json_compliance_exception],test_invalid_json_neg_inf->[json_compliance_exception]],TestBigQueryWrapper->[test_wait_for_job_returns_true_when_job_is_done->[make_response]],TestBigQueryReader->[test_read_from_query_unflat... | Test parsing of bigquery table schema from JSON. | (@pabloem is this something we want to do?) |
@@ -103,12 +103,14 @@ int sockaddr_AddrCompare(const void *sa1, const void *sa2)
struct in_addr *addr1 = & ((struct sockaddr_in *) sa1)->sin_addr;
struct in_addr *addr2 = & ((struct sockaddr_in *) sa2)->sin_addr;
result = memcmp(addr1, addr2, sizeof(*addr1));
+ break;
}
case ... | [No CFG could be retrieved] | Returns -1 if sa1 is less than sa2 or 0 if sa1 is less. | @vpodzime Did you look at this? Fix seems correct, but seems like a change in behavior. Further, the fact that it was falling through to `assert(0)` indicates that it's not covered by tests. |
@@ -101,6 +101,11 @@ public class TimeseriesQuery extends BaseQuery<Result<TimeseriesResultValue>>
return postAggregatorSpecs;
}
+ public boolean isSkipEmptyBuckets()
+ {
+ return Boolean.parseBoolean(getContextValue("skipEmptyBuckets", "false"));
+ }
+
public TimeseriesQuery withQuerySegmentSpec(Que... | [TimeseriesQuery->[withDataSource->[TimeseriesQuery],withQuerySegmentSpec->[TimeseriesQuery],withOverriddenContext->[TimeseriesQuery],equals->[equals],hashCode->[hashCode]]] | Returns a TimeseriesQuery with the specified post - aggregators applied to this Times. | why is this only on timeseries query and not other query types? |
@@ -17,7 +17,7 @@ import (
// ToAPIPullRequest assumes following fields have been assigned with valid values:
// Required - Issue
// Optional - Merger
-func ToAPIPullRequest(pr *models.PullRequest) *api.PullRequest {
+func ToAPIPullRequest(pr *models.PullRequest, user *models.User) *api.PullRequest {
var (
base... | [Close,AsTimePtr,GetCommit,RepoPath,Error,OpenRepository,IsWorkInProgress,GetRefsFiltered,LoadHeadRepo,IsErrBranchNotExist,GetGitRefName,LoadBaseRepo,IsErrNotExist,DiffURL,GetBranch,PatchURL,Sprintf,GetRefCommitID,HTMLURL,LoadRepo,String] | ToAPIPullRequest converts a models. Issue to API objects. returns a list of all branch info in the base branch. | Can we rename 'user' to 'doer' to indicate value source |
@@ -121,6 +121,10 @@ class TestQueryFilter(FilterTestsBase):
},
'weight': 4.0
}
+ assert functions[2] == {
+ 'filter': {
+ 'term': {'is_recommended': True}},
+ 'weight': 5.0}
return qs
def test_no_rescore_if_not_sorting_by_re... | [TestQueryFilter->[test_fuzzy_multi_word->[_filter],test_q->[_filter,_test_q],test_no_rescore_if_not_sorting_by_relevance->[_filter,_test_q],test_q_exact->[_filter],test_q_too_long->[_filter],test_no_fuzzy_if_query_too_long->[do_test->[_filter],do_test],test_fuzzy_single_word->[_filter]],TestSortingFilter->[test_sort_d... | Test if a query is a valid sequence of tokens. Queryset of objects that have a rescore field set to True. | Kind of an edge case but I think we need to repeat the other boosts in `functions[1]` as well to ensure we don't boost an add-on that is somehow `is_recommended` but not public ? Not sure if that's possible. |
@@ -6128,6 +6128,7 @@ def lod_reset(x, y=None, target_lod=None):
from :attr:`y`.
target_lod (list|tuple|None): One level LoD which should be considered
as target LoD when :attr:`y` not provided.
+ append (bool): A flag indicating whether... | [ctc_greedy_decoder->[topk],py_func->[PyFuncRegistry],image_resize->[_is_list_or_turple_],sequence_first_step->[sequence_pool],logical_xor->[_logical_op],elementwise_pow->[_elementwise_op],elementwise_min->[_elementwise_op],elementwise_max->[_elementwise_op],logical_not->[_logical_op],conv2d->[_get_default_param_initia... | reset the lood of a 1 - level LoDTensor x to a new one specified Output variable with a 2 - level LoD which should be considered by this layer. Single node of the sequence. | It is confusing that adding `append` for `lod_reset`. In my mind that `lod_reset` is just used to reset the lod info with `target_lod`, but not have other function. |
@@ -577,11 +577,11 @@ class VideoEntry {
analyticsEvent(this, VideoAnalyticsEvents.CUSTOM, prefixedVars);
}
- /** Listens for signals to delegate autoplay to a different module. */
- listenForAutoplayDelegation_() {
+ /** Listens for signals to delegate playback to a different module. */
+ listenForPlayba... | [No CFG could be retrieved] | Listens for signals to delegate autoplay to a different module. Callback for when the video starts playing. | nit: `allowPlayback_` might incorrectly be interpreted as blocking playback somehow. Maybe `managePlayback_` |
@@ -45,6 +45,8 @@ new WPCOM_JSON_API_Site_Settings_Endpoint( array(
'jetpack_relatedposts_show_headline' => '(bool) Show headline in related posts?',
'jetpack_relatedposts_show_thumbnails' => '(bool) Show thumbnails in related posts?',
'jetpack_protect_whitelist' => '(array) List of IP addresses to whitelis... | [WPCOM_JSON_API_Site_Settings_Endpoint->[update_settings->[jetpack_relatedposts_supported],get_settings_response->[get_cast_option_value_or_null,jetpack_relatedposts_supported]]] | Return a string representation of a site. page - > page - > comment - > comment - > comment - > comment - >. | Is this supposed to be part of the `request_format` or just the `response_format`? |
@@ -567,6 +567,9 @@ class Environment(object):
self.clear()
if init_file:
+ # If we are creating the environment from an init file, we don't
+ # need to lock, because there are no Spack operations which alter
+ # the init file.
with fs.open_if_filename(i... | [validate_env_name->[valid_env_name],is_env_dir->[exists],all_environment_names->[exists,_root,valid_env_name],_write_yaml->[validate],deactivate_config_scope->[config_scopes],ViewDescriptor->[from_dict->[ViewDescriptor],regenerate->[view]],root->[validate_env_name,_root],create->[validate_env_name,root,exists],exists-... | Initialize the environment object with a new configuration. | nitpick: *that* alter the init file |
@@ -1429,7 +1429,7 @@ define([
// Only ARRAY_BUFFER here. ELEMENT_ARRAY_BUFFER created below.
ForEach.bufferView(model.gltf, function(bufferView, id) {
- if (bufferView.target === WebGLConstants.ARRAY_BUFFER) {
+ if (bufferView.target === WebGLConstants.ARRAY_BUFFER && !DracoL... | [No CFG could be retrieved] | Parses the buffers and buffer views and creates the buffers. Creates a function that loads a index buffer. | Is the extension check needed? Did you run into a situation where a buffer view was marked as `ARRAY_BUFFER` but shouldn't have been? |
@@ -3,12 +3,13 @@
/**
* Module Name: Comments
* Module Description: Let readers use WordPress.com, Twitter, Facebook, or Google+ accounts to comment
+ * Jumpstart Description: Let readers use WordPress.com, Twitter, Facebook, or Google+ accounts to comment.
* First Introduced: 1.4
* Sort Order: 20
* Requires... | [No CFG could be retrieved] | Comments . | Let's just change these to be "Google" accounts, since that's how they more broadly refer to them these days. |
@@ -110,7 +110,7 @@
// public IBus Bus { get; set; }
-// public void Handle(Response message)
+// public Task Handle(Response message)
// {
// switch (message.EndpointName)
// {
| [No CFG could be retrieved] | This class handles a response message by returning a response object. Handler for the message. | These won't compile when re-enabled. But I consider this not part of this PR. |
@@ -97,17 +97,10 @@ def main(argv=None): # noqa: C901
)
else:
logger.exception("unexpected error")
- ret = 255
- except Exception: # noqa, pylint: disable=broad-except
- logger.exception("unexpected error")
+ logger.info(FOOTER)
ret = 255
... | [main->[exception,is_enabled,setLevel,getattr,info,parse_args,trace,collect_and_send_report,close_pools,format,clean_repos,run,disable_other_loggers,error_link,func,profile],profile->[dump_stats,print_stats,Profile,enable],encode,getLogger] | Run dvc CLI command. Forces a cache miss for a . | Might also consider moving it to `error`, but for now leaving as is. |
@@ -338,6 +338,11 @@ class TestSubsystem(GoalSubsystem):
return cast(bool, self.options.open_coverage)
+@dataclass(frozen=True)
+class TestExtraEnv:
+ env: FrozenDict[str, Optional[str]]
+
+
class Test(Goal):
subsystem_cls = TestSubsystem
| [CoverageReportType->[__new__->[__new__]],run_tests->[Test,materialize],enrich_test_result->[EnrichedTestResult],CoverageReports->[artifacts->[get_artifact],materialize->[materialize]]] | Registers the given options with the command line tool. Get the validation rules for the specified debug_request. | You can alternatively directly subclass `FrozenDict[str, Optional[str]]` and avoid the dataclass. I'm not sure what's better here - generally, I know composition is better than inheritance. But it's also often really nice to use inheritance, hence why we have `Collection` and `DeduplicatedCollection`. |
@@ -263,7 +263,9 @@ public class IncrementalIndexAdapter implements IndexableAdapter
}
for (int i = 0; i < dimValues[dimIndex].length; ++i) {
- dims[dimIndex][i] = dimLookups[dimIndex].idToIndex(dimValues[dimIndex][i]);
+ dims[dimIndex][i] = ... | [IncrementalIndexAdapter->[getMetricType->[getMetricType],BitmapIndexedInts->[size->[size],iterator->[next->[next],hasNext->[hasNext],iterator]],getBitmapIndex->[size,get,getDimLookup],getDimensionNames->[getDimensionNames],getCapabilities->[getCapabilities],getMetadata->[getMetadata],getMetricNames->[getMetricNames],g... | This method returns an iterable of all rows in the index. get the value of the row in the table. | please file an issue for this todo. |
@@ -413,7 +413,9 @@ class RaidenService:
)
chain_id = self.chain.network_id
- for event in self.blockchain_events.poll_blockchain_events():
+ for event in self.blockchain_events.poll_blockchain_events(
+ self.get_block_number(),
+ ):
... | [RaidenService->[_callback_new_block->[handle_state_change],handle_state_change->[get_block_number],leave_all_token_networks->[get_block_number],start->[start],mediate_mediated_transfer->[mediator_init,handle_state_change],sign->[sign],target_mediated_transfer->[target_init,handle_state_change],set_node_network_state->... | Installs the filters and then polls the events to the WAL . | this looks wrong, why are you using `get_block_number`? also, please avoid multiline `for`s |
@@ -1,14 +1,15 @@
-from typing import List, Optional, Union
+from collections import OrderedDict
+from typing import List, Optional, Union, Set
from mypy.nodes import (
ARG_POS, MDEF, Argument, Block, CallExpr, ClassDef, Expression, SYMBOL_FUNCBASE_TYPES,
FuncDef, PassStmt, RefExpr, SymbolTableNode, Var, J... | [_get_decorator_bool_argument->[_get_bool_argument,isinstance],add_method_to_class->[append,fill_typevars,CallableType,set_callable_name,Argument,PassStmt,get_unique_redefinition_name,SymbolTableNode,isinstance,Block,remove,FuncDef,named_type,Var],_get_bool_argument->[parse_bool,format,_get_argument,fail],_get_argument... | Get the value of a specific argument. Walk the CallExpr looking for the index of the object. | Please put `)` on the next line. |
@@ -12,11 +12,9 @@
public class When_extending_sendoptions : NServiceBusAcceptanceTest
{
[Test]
- public void Should_be_able_to_set_context_items_and_retrieve_it_via_a_behavior()
+ public async Task Should_be_able_to_set_context_items_and_retrieve_it_via_a_behavior()
{
- ... | [When_extending_sendoptions->[Should_be_able_to_set_context_items_and_retrieve_it_via_a_behavior->[AreEqual,Run,Secret],SendOptionsExtensions->[TestingSendOptionsExtensionBehavior->[Invoke->[SomeValue,next,TryGet,UpdateMessageInstance]],SendMessageHandler->[Handle->[WasCalled,Secret]],Register]]] | Should_be_able_to_set_context_items_and_retrieve_. | In tests, do we care to set `.ConfigureAwait(false)` as well, or it's less important? |
@@ -275,6 +275,9 @@ public class PostgreSqlInterpreter extends Interpreter {
* For %table response replace Tab and Newline characters from the content.
*/
private String replaceReservedChars(boolean isTableResponseType, String str) {
+ if (str == null) {
+ return EMPTY_COLUMN_VALUE;
+ }
retur... | [PostgreSqlInterpreter->[close->[close],cancel->[cancel],executeSql->[close],interpret->[executeSql]]] | Replace reserved characters in the given string. | should we keep the original value if !isTableResponseType? |
@@ -69,9 +69,15 @@ module View
)
end
- def render_button(text, &block)
+ def render_button(text, style: {}, &block)
props = {
- attrs: { type: :button },
+ attrs: {
+ id: text.gsub(/\s/, '-').downcase,
+ type: :button,
+ },
+ style: {
+ *... | [Form->[render_button->[h],render_input->[h],render_form->[lambda,event,h,downcase],render_content->[raise],params->[to_h],submit->[raise],needs]] | Renders a single missing input with label and optional button. | i feel like these are just unnecessary, but if you really want them you can keep it, it's just extra code and line 60 |
@@ -488,7 +488,7 @@ def get_name(args):
# Try to guess the package name based on the URL
try:
name = parse_name(args.url)
- tty.msg("This looks like a URL for {0}".format(name))
+ tty.msg("This looks like a valid package for {0}".format(name))
except Undetec... | [get_versions->[BuildSystemGuesser],PackageTemplate->[write->[write]],create->[get_repository,write,get_versions,get_url,get_name,get_build_system]] | Get the name of the package based on the supplied arguments. | I don't think we actually know that it's a valid package at this point -- just that the URL was parseable. I kind of like the previous wording better -- any particular reason you want this change? |
@@ -185,6 +185,15 @@ _discover(prober probe, bool detach, health_getter get_health)
* called for each controller after the SPDK NVMe driver has completed
* initializing the controller we chose to attach.
*/
+
+ /* TODO: Move to spdk.go possibly? */
+ /* Enumerate VMD devices and hook them into the SPDK pci s... | [_discover->[init_ret],collect->[init_ret,_collect],_collect->[clean_ret]] | This function is used to probe for a device and return the device health. | (style) trailing whitespace |
@@ -46,8 +46,10 @@ class GraphQLView(View):
def dispatch(self, request, *args, **kwargs):
# Handle options method the GraphQlView restricts it.
if request.method == 'GET':
- return render_to_response('graphql/playground.html')
- if request.method == 'OPTIONS':
+ if se... | [obj_set->[get_key,obj_set,get_shallow_property],GraphQLView->[execute_graphql_request->[get_root_value]]] | Dispatch the request to the appropriate handler. | Shouldn't we throw a `405 - method not allowed`, instead? |
@@ -10,7 +10,7 @@ namespace System.Text.Json
[Serializable]
internal sealed class JsonReaderException : JsonException
{
- public JsonReaderException(string message, long lineNumber, long bytePositionInLine) : base(message, path: null, lineNumber, bytePositionInLine)
+ public JsonReaderExcep... | [No CFG could be retrieved] | Exception thrown when reading from a JSON file. | Is this necessary? Keep `message` as non-nullable? |
@@ -118,7 +118,9 @@ def AssembleTestSuites():
# For very long tests that should not be in nighly and you can use to validate
validationSuite = suites['validation']
validationSuite.addTest(BuoyancyTest('validationEulerian'))
+ validationSuite.addTest(AdjointVMSSensitivity2D('testCylinder'))
valida... | [AssembleTestSuites->[BuoyancyTest,CouetteFlowTest,DarcyChannelTest,FluidAnalysisTest,FluidElementTest,EmbeddedVelocityInletEmulationTest,EmbeddedCouetteImposedTest,AdjointFluidTest,ManufacturedSolutionTest,AdjointVMSSensitivity2D,ConsistentLevelsetNodalGradientTest,NavierStokesWallConditionTest,HDF5IOTest,EmbeddedPist... | AssembleTestSuites - Creates a test suite with the selected tests. Adds tests to the Nightly test suite with the selected tests. Adds tests to the NightSuite object. Load all tests that are not in nighly and return a test suite that contains all. | Hi, would it be problematic if we leave at least this in the nighly suite. The issue in #8017 is about small suite ryt? At the moment we don't have any finite differencing full test in any CI (nighly or PR), I would like to have at least one if possible. :) |
@@ -390,11 +390,14 @@ namespace ILCompiler
private Utf8String GetUnqualifiedMangledMethodName(MethodDesc method)
{
- Utf8String mangledName;
- if (_unqualifiedMangledMethodNames.TryGetValue(method, out mangledName))
- return mangledName;
+ lock (this)
... | [CoreRTNameMangler->[SanitizeNameWithHash->[SanitizeName,GetBytesFromString],Utf8String->[SanitizeName,GetMangledTypeName,DisambiguateName],ComputeMangledTypeName->[NestMangledName,SanitizeName,GetMangledTypeName,DisambiguateName],GetMangledStringName->[SanitizeNameWithHash]]] | Get the mangled method name for a given method. | Same here... if we make _unqualifiedMangledMethodNames a lock-free dictionary, we can avoid locking while looking up. We only need locking while adding new entries |
@@ -1029,7 +1029,7 @@ public abstract class View extends AbstractModelObject implements AccessControll
}
try {
- Jenkins.checkGoodName(value);
+ checkGoodName(value);
value = value.trim(); // why trim *after* checkGoodName? not sure, but ItemGroupMixIn.createTopLev... | [View->[getQueueItems->[filterQueue,getItems],getActions->[getOwnerViewActions],getACL->[getACL],doCheckJobName->[getItem,checkPermission],updateByXml->[save,checkPermission],getAllItems->[getItems,getAllItems],doItemCategories->[getOwnerItemGroup,all,getDescription,checkPermission,getItem,getDisplayName],PropertyList-... | Checks if a job name is in the file system. | Better style to revert and remove the `static` `import`. |
@@ -137,6 +137,12 @@ func (c *ChainConfig) IsCrossTx(epoch *big.Int) bool {
return isForked(crossTxEpoch, epoch)
}
+// IsStaking determines whether it is staking epoch
+func (c *ChainConfig) IsStaking(epoch *big.Int) bool {
+ stkEpoch := new(big.Int).Add(c.StakingEpoch, common.Big1)
+ return isForked(stkEpoch, epo... | [Rules->[IsEIP155,IsCrossLink,IsS3],GasTable->[IsS3]] | IsCrossTx returns true if the passed epoch is a cross - transaction or cross - link. | no need to add 1. see the reasoning for IsCrossTx. |
@@ -336,6 +336,9 @@ func (am *AllocatorManager) updateAllocator(ag *allocatorGroup) {
func (am *AllocatorManager) HandleTSORequest(dcLocation string, count uint32) (pdpb.Timestamp, error) {
am.RLock()
defer am.RUnlock()
+ if len(dcLocation) == 0 {
+ dcLocation = config.GlobalDCLocation
+ }
allocatorGroup, exist... | [AllocatorDaemon->[Done,Stop,NewTicker,updateAllocator,Wait,Add,getAllocatorGroups],getAllocatorGroups->[NoneOf,RUnlock,RLock],SetLocalTSOConfig->[ID,Join,Commit,Warn,Sprint,FastGenByArgs,NewSlowLogTxn,Client,OpPut,String,Then,GenWithStackByCause,getLocalTSOConfigPath,Wrap,Info,Member],campaignAllocatorLeader->[Error,S... | HandleTSORequest generates a timestamp for a given dcLocation. | Why set dcLocation as global instead of throwing error here? |
@@ -2,7 +2,7 @@ package checks;
public class SimpleStringLiteralForSingleLineStringsCheck {
- public void str() { // Noncompliant@+1 [sc=23;endColumn=42]]{{Use simple literal for a single-line string.}}
+ public void str() { // Noncompliant@+1 [[sc=23;endColumn=43]]{{Use simple literal for a single-line string... | [No CFG could be retrieved] | Print a warning if the sequence is not found. | wow, nice finding and undetected issue in precise location testing... worth a ticket to improve the verifier, don't you think? |
@@ -66,11 +66,8 @@ func (wh *webhook) createPatch(pod *corev1.Pod, namespace string, proxyUUID uuid
if err != nil {
return nil, err
}
- patches = append(patches, addContainer(
- pod.Spec.InitContainers,
- []corev1.Container{initContainerSpec},
- initContainersBasePath)...,
- )
+
+ pod.Spec.InitContainers = []... | [createPatch->[IssueCertificate,Msg,Error,FormatBool,Itoa,NewCertCommonNameWithProxyID,Sprintf,createEnvoyBootstrapConfig,Marshal,Msgf,isMetricsEnabled,String,ExpectProxy,Info,Err],Strings,Join,Replace] | createPatch creates a patch that patches the specified pod and returns the JSON representation of the patch This function is used to add containers to the Envoy pod and add labels to the Env. | Can `pod.Labels` be nil? I see a nil check for annotations but not for labels. |
@@ -4,6 +4,8 @@ class MailchimpBot
def initialize(user)
@user = user
@saved_changes = user.saved_changes
+ Gibbon::Request.api_key = SiteConfig.mailchimp_api_key
+ Gibbon::Request.timeout = 15
@gibbon = Gibbon::Request.new
end
| [MailchimpBot->[resubscribe_to_newsletter->[upsert],manage_tag_moderator_list->[upsert],upsert_to_newsletter->[upsert],manage_community_moderator_list->[upsert],target_md5_email->[md5_email]]] | Initialize a new object. | TIL about Gibbon! |
@@ -35,10 +35,9 @@ import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicReference;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
-import static org.junit.A... | [ITJettyWebSocketCommunication->[testClientServerCommunicationRecovery->[isWindowsEnvironment],testClientServerCommunication->[isWindowsEnvironment],assertConnectedEvent->[isSecure],setupClient->[isSecure],assertConsumeBinaryMessage->[isSecure],assertConsumeTextMessage->[isSecure]]] | Imports a single object in the JVM using the Java Server. The main method for the class. | This annotation can be removed this since is an integration test class. |
@@ -99,11 +99,12 @@ public class NuxeoException extends RuntimeException {
* @param info the information
* @since 7.4
*/
- public void addInfo(String info) {
+ public NuxeoException addInfo(String info) {
if (infos == null) {
infos = new LinkedList<>();
}
... | [NuxeoException->[getMessage->[getOriginalMessage]]] | Adds a info to the list of infos. | FYI this is not binary compatible so if this has to be backported as is I'd use a new API (like `withInfo`). Otherwise don't backport this part and just call `addInfo` in a separate statement. |
@@ -26,14 +26,14 @@ class AdminTest < ActiveSupport::TestCase
admin.last_name = 'doe'
admin.first_name = 'john'
- repo_names = Group.all.collect do |group| File.join(markus_config_repository_storage, group.repository_name) end
+ repo_names = Group.all.collect do |group| File.join(get_config_va... | [AdminTest->[new,markus_config_repository_permission_file,first_name,join,should,teardown,repository_name,returns,with,destroy,never,make,context,user_name,last_name,get_class,collect,assert,setup,save],include,dirname,join,require,expand_path] | Check if the object is admin or not config_repository_type is the name of the repository type that should be used for marking. | Prefer {...} over do...end for single-line blocks.<br>Prefer `map` over `collect`.<br>Line is too long. [124/80]<br>Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping. |
@@ -525,6 +525,9 @@ class MatrixTransport(Runnable):
self._stop_event.set()
self._broadcast_event.set()
+ if self._raiden_service:
+ self._web_rtc_manager.stop()
+
for retrier in self._address_to_retrier.values():
if retrier:
retrier.notify()
| [_RetryQueue->[enqueue->[_expiration_generator,_MessageData],_check_and_send->[message_is_in_queue],_run->[_check_and_send],enqueue_unordered->[enqueue]],MatrixTransport->[_broadcast_worker->[_broadcast],_send_with_retry->[enqueue,_get_retrier],force_check_address_reachability->[get_user_ids_for_address],_handle_member... | Stop the greenlet and wait for it to finish. This method is called when the matrix is stopped. | Can `self._raiden_service` ever be `None` here? |
@@ -19,6 +19,7 @@ type MarshalOptions struct {
Label string // an optional label for debugging.
SkipNulls bool // true to skip nulls altogether in the resulting map.
KeepUnknowns bool // true if we are keeping unknown values (otherwise we skip them).
+ RejectUnknowns bool // ... | [IsObject,NewNullProperty,ArrayValue,NewArchiveProperty,Mappable,NewPropertyMapFromMap,BoolValue,DeserializeAsset,IsBool,PropertyKey,IsNull,OutputValue,NewNumberProperty,Strings,NewAssetProperty,Serialize,GetListValue,DeserializeArchive,ComputedValue,StableKeys,Assert,GetStructValue,NumberValue,IsComputed,Wrapf,Infof,F... | requires that all the types of the given object are exported UnknownAssetValue is a sentinel indicating that an asset property s value is not yet known. | Do we still need both settings? (Wasn't clear if we still use `KeepUnknowns` after your change.) |
@@ -108,7 +108,7 @@ public abstract class AbstractRulesAttachment extends AbstractConditionsAttachme
}
@GameProperty(xmlProperty = true, gameProperty = true, adds = false)
- private void setObjectiveValue(final Integer value) {
+ private void setObjectiveValue(final int value) {
m_objectiveValue = value;... | [AbstractRulesAttachment->[getTerritoriesBasedOnStringName->[setTerritoryCount],setTurns->[setRounds],getTerritoryListBasedOnInputFromXml->[getTerritoriesBasedOnStringName,setTerritoryCount],getListedTerritories->[setTerritoryCount]]] | Sets the objective value. | Just noting that switching to primitives will trigger more null analysis warnings if we ever enable a formal static null analysis engine. We eventually need to think about how we're going to handle this because it looks like the contract of `MutableProperty#setValue()` is going to have to allow incoming `null` values d... |
@@ -99,8 +99,9 @@ public class ContainerHealthTask extends ReconScmTask {
processedContainers.clear();
wait(interval);
}
- } catch (Throwable t) {
+ } catch (InterruptedException t) {
LOG.error("Exception in Missing Container task Thread.", t);
+ Thread.currentThread().interru... | [ContainerHealthTask->[processExistingDBRecords->[setCurrentContainer,completeProcessingContainer],ContainerHealthRecords->[generateUnhealthyRecords->[generateUnhealthyRecords]]]] | This method is invoked by the daemon thread. It processes all existing database records and processes all. | don't change the catch statement. use instanceof to look for InterruptedException |
@@ -145,11 +145,6 @@ namespace Microsoft.Extensions.Caching.Memory
{
IsDisposed = true;
- // Ensure the _scope reference is cleared because it can reference other CacheEntry instances.
- // This CacheEntry is going to be put into a MemoryCache, and we don't ... | [CacheEntry->[ExpirationTokensExpired->[SetExpired],DetachTokens->[Dispose],CheckForExpiredTokens->[SetExpired],CheckForExpiredTime->[SetExpired],Dispose->[Dispose]]] | Dispose this cache entry. | Is there any way changing the ordering between popping the "scope" off the stack and calling `_cache.SetEntry` could break anything? Before the scope was removed before calling `_cache.SetEntry`. Now it happens after. |
@@ -1,6 +1,6 @@
<% content_for :title, t('assignments.manage_course_work') %>
-<% if @current_user.admin? %>
+<% if @current_user.admin? || (@current_user.ta? && GraderPermissions.find_by(user_id: @current_user.id).manage_assignments) %>
<% @heading_buttons = [
{ link_text: t('download'),
link_path: '... | [No CFG could be retrieved] | Renders a modal dialog showing the user s assignment. Show a list of grade entries. | use a policy here |
@@ -44,6 +44,8 @@ import org.junit.Rule;
import org.junit.Test;
//TODO: MULE-9702 Remove once the tests are migrated.
+@ArtifactClassLoaderRunnerConfig(plugins = {"org.mule.modules:mule-module-sockets"},
+ providedInclusions = "org.mule.modules:mule-module-sockets")
public class BasicHttpTestCase extends MuleAr... | [BasicHttpTestCase->[extractBaseRequestParts->[getQuery,getCompletePath,getMethod,getHeaderNames,getHeader,hasMoreElements,nextElement,put],TestHandler->[handle->[setHandled,handleRequest]],createServer->[Server,getNumber],handleRequest->[extractBaseRequestParts,writeResponse],receivesRequest->[getValue,getContent,Http... | Imports the given object as an HTTP test case. This method is used to get the configuration file. | Why is needed to define the same artifact both on plugins and providedInclusions fields? |
@@ -240,7 +240,8 @@ func (s *System) UnsubscribeFromEvents(chan interface{}) {
}
func (s *System) AuthenticateToRegistry(ctx context.Context, authConfig *types.AuthConfig) (string, string, error) {
- return "", "", fmt.Errorf("%s does not implement System.AuthenticateToRegistry", ProductName())
+ defer trace.End(tr... | [SystemInfo->[PingPortlayer,Error,Infof,Begin,Format,VCHInfo,Sprintf,Now,End,ContainerCount,NumGoroutine,BytesSize],SystemVersion->[Version,Parse,Format],AuthenticateToRegistry->[Errorf],VolumeStoresList,Sprintf,GetImages,String,ImageCache,WriteString,NewVolumeStoresListParamsWithContext] | AuthenticateToRegistry implements Service. AuthenticateToRegistry. | This is a simple approach, but as @fdawg4l says it pulls in a lot of docker/docker. As best I can tell the docker/docker/registry/... is mainly to abstract between v1 and v2. Given we don't support v2 can we use docker/distribution/registry/client directly? |
@@ -111,7 +111,13 @@ func (e *Transaction) fields() common.MapStr {
func (e *Transaction) Transform(_ context.Context, _ *transform.Config) []beat.Event {
transactionTransformations.Inc()
+ // Transactions are stored in a "traces" data stream along with spans.
+ dataset := datastreams.NormalizeServiceName(e.Metada... | [fields->[MillisAsMicros,MapStr,maybeSetString,Float,set,Fields,fields,maybeSetMapStr],Transform->[TimeAsMicros,DeepUpdate,fields,Fields,Inc,AddID,Set],NewInt,NewRegistry] | Transform returns a slice of beat. Event that represents the transaction. | The assumption that we don't need to differenciate spans from transactions is strong, but what if we are wrong? Isn't cheap and harmless to add an `apm.span` or `apm.transaction` dataset prefix, just in case? |
@@ -559,7 +559,7 @@ def plot_bem(subject=None, subjects_dir=None, orientation='coronal',
# Plot the contours
return _plot_mri_contours(mri_fname, surfaces, src, orientation, slices,
- show, show_indices, show_orientation)[0]
+ show, show_indices, sho... | [plot_ideal_filter->[_get_flim,adjust_axes,_filter_ticks],plot_bem->[_plot_mri_contours],plot_filter->[_get_flim,adjust_axes,_filter_ticks],plot_cov->[_index_info_cov]] | Plot a BEM contours on an atomical slices. Get the next canon - level canon - level canon - level canon - Get the path to the MRI contours and plot the contours of the missing contours. | Did you `git grep _plot_mri_contours` to make sure no other returns need to be changed? IIRC this is shared across BEM plotting and dipole plotting |
@@ -872,7 +872,7 @@ func RegisterRoutes(m *web.Route) {
m.Delete("", repo.DeleteProjectBoard)
m.Post("/default", repo.SetDefaultProjectBoard)
- m.Post("/{index}", repo.MoveIssueAcrossBoards)
+ m.Post("/{issueID}/{sorting}", repo.MoveIssueAcrossBoards)
})
})
}, reqRepoProjectsWri... | [NewCollector,GitHookService,Auth,AssetsHandler,PostOptions,IsProd,Mailer,RequireRepoReader,ServeFile,RepoRef,Delete,Redirect,Set,GetBranchCommit,Put,RequireRepoReaderOr,Handler,RequireRepoWriterOr,Error,Stat,Seconds,Post,NotFound,Captchaer,Route,Methods,AddBindingRules,ServerError,Any,Join,Mount,Toggle,RequireRepoAdmi... | Manage all of the resources in the system. Register the page types. | ~I think `issueIndex` is better. This concept is used everywhere. `issueID` is misleading.~ Sorry, it seems I am wrong. It is really a issue ID indeed, and used by `GetIssueByID`, |
@@ -252,6 +252,7 @@ class RenewableCert(object): # pylint: disable=too-many-instance-attributes
self.privkey = self.configuration["privkey"]
self.chain = self.configuration["chain"]
self.fullchain = self.configuration["fullchain"]
+ self.live_dir = os.path.dirname(self.cert)
... | [RenewableCert->[available_versions->[current_target],next_free_version->[newest_available_version],current_target->[get_link_target],should_autorenew->[ocsp_revoked,latest_common_version,version,autorenewal_is_enabled,add_time_interval],current_version->[current_target],names->[version,current_target],has_pending_depl... | Initializes a RenewableCert object from an existing lineage. Returns the sequence number of the target of a symlink. | We'll have a lot of thinking to do about what this means if we end up reorganizing the cert storage so that the four PEM objects are not necessarily in the same directory (as I believe djb is going to advocate for security/privilege separation reasons). I agree that this construction of `live_dir` is totally correct in... |
@@ -101,4 +101,10 @@ class ZipExport < ActiveRecord::Base
end
end
end
+
+ # generates zip export file for samples
+ def generate_samples_zip(tmp_dir, data, options = {})
+ file = FileUtils.touch("#{tmp_dir}/export.csv").first
+ File.open(file, 'wb') { |f| f.write(data) }
+ end
end
| [ZipExport->[generate_notification->[t,create,zip_exports_download_path],respond_to_missing?->[start_with?],generate_exportable_zip->[path,new,to_i,root,generate_notification,zip_file,fill_content,zip!,join,first,open,mkdir_p],stored_on_s3?->[to_sym],fill_content->[eval],zip!->[delete_if,add,each,open,entries],presigne... | Zip the files into a file. | Unused method argument - options. If it's necessary, use _ or _options as an argument name to indicate that it won't be used. |
@@ -159,6 +159,9 @@ export class Resource {
/** @private {boolean} */
this.isFixed_ = false;
+ /** @private {boolean} */
+ this.isInFirstViewport_ = false;
+
/** @private {!../layout-rect.LayoutRectDef} */
this.layoutBox_ = layoutRectLtwh(-10000, -10000, 0, 0);
| [No CFG could be retrieved] | Constructor for a resource - level object. Replies the resource s ID. | I think this value is too special. Should we just calculate it where it's needed based on the available `iniLayoutBox`? |
@@ -67,4 +67,10 @@ public class ListIndexed<T> implements Indexed<T>
{
return baseList.iterator();
}
+
+ @Override
+ public void inspectRuntimeShape(RuntimeShapeInspector inspector)
+ {
+ inspector.visit("baseList", baseList);
+ }
}
| [ListIndexed->[size->[size],get->[get],iterator->[iterator],indexOf->[indexOf]]] | Returns an iterator of the base list if it is not null. | What about the clazz field? |
@@ -98,8 +98,10 @@ func NewMemcachedClient(cfg MemcachedClientConfig, name string) MemcachedClient
hostname: cfg.Host,
service: cfg.Service,
addresses: strings.Split(cfg.Addresses, ","),
- provider: dns.NewProvider(util.Logger, prometheus.DefaultRegisterer, dns.GolangResolverType),
- quit: make... | [updateLoop->[updateMemcacheServers,Warn,Stop,NewTicker,Log,Done],updateMemcacheServers->[Strings,Addresses,SetServers,Resolve,WithTimeout,Sprintf,Background,LookupSRV,Set],Stop->[Wait],RegisterFlagsWithPrefix->[DurationVar,BoolVar,StringVar,IntVar],updateMemcacheServers,Error,NewGaugeVec,NewProvider,Log,NewFromSelecto... | NewMemcachedClient creates a new instance of the memcached client. updateLoop is a long running routine that periodically updates the cache servers. | This PR made me realise that the Thanos DNS provider intentionally (and correctly) register metrics without prefix. We should also `WrapRegistererWithPrefix()` with the prefix `cortex_`. |
@@ -128,7 +128,7 @@ class TokenNetworkRegistry:
raise RuntimeError('token_to_token_networks failed')
log.info(
- 'add_token sucessful',
+ 'add_token successful',
node=pex(self.node_address),
token_address=pex(token_address),
registry_a... | [TokenNetworkRegistry->[add_token->[get_token_network],settlement_timeout_max->[settlement_timeout_max],settlement_timeout_min->[settlement_timeout_min]]] | Add a token to the token network. | Wow ... you probably just fixed a typo I made. `sucessful` is my signature typo. Hell must have frozen over :P Edit: Damn happens again later in the PR. Edit: Happens A LOT in this PR. Can't be all me :D |
@@ -148,11 +148,11 @@ public class XceiverClientGrpc extends XceiverClientSpi {
DatanodeDetails dn = topologyAwareRead ? this.pipeline.getClosestNode() :
this.pipeline.getFirstNode();
// just make a connection to the picked datanode at the beginning
- connectToDatanode(dn, encodedToken);
+ conn... | [XceiverClientGrpc->[reconnect->[connectToDatanode,isConnected],sendCommandAsync->[sendCommandAsync,onCompleted,onNext],checkOpen->[isConnected],isConnected->[isConnected]]] | Connect to a datanode. Returns the number of bytes required to encode the message. | Checkstyle longer line than 80 characters. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.