patch stringlengths 18 160k | callgraph stringlengths 4 179k | summary stringlengths 4 947 | msg stringlengths 6 3.42k |
|---|---|---|---|
@@ -45,7 +45,7 @@ using System.Runtime.InteropServices;
// to distinguish one build from another. AssemblyFileVersion is specified
// in AssemblyVersionInfo.cs so that it can be easily incremented by the
// automated build process.
-[assembly: AssemblyVersion("1.1.1.1955")]
+[assembly: AssemblyVersion("1.1.1.2275")]... | [Satellite] | Assigns the given type to the assembly. | No need to submit this file. |
@@ -2166,7 +2166,9 @@ func (fbo *folderBranchOps) identifyOnce(
defer fbo.identifyLock.Unlock()
ei := tlfhandle.GetExtendedIdentify(ctx)
- if fbo.identifyDone && !ei.Behavior.AlwaysRunIdentify() {
+ if (fbo.identifyDone && !ei.Behavior.AlwaysRunIdentify()) ||
+ (fbo.identifyDoneWithWarning &&
+ ei.Behavior.War... | [waitForRootBlockFetch->[logIfErr],kickOffPartialMarkAndSweep->[Lock,Unlock,goTracked,doPartialMarkAndSweep],handleTLFBranchChange->[setHeadSuccessorLocked,isUnmergedLocked,id,Lock,handleUnflushedEditNotifications,Unlock,setBranchIDLocked],SetInitialHeadFromServer->[kickOffPartialSyncIfNeeded,kickOffRootBlockFetch,wait... | identifyOnce runs identify on a TLF if it is not already running. | So even if `ei.Behavior.AlwaysRunIdentify()` is true, we could still skip. Though I guess AlwaysRunIdentify and WarningInsteadOfErrorOnBrokenTracks are mutually exclusive. |
@@ -58,14 +58,14 @@ public class IgniteSqlInterpreterTest {
IgniteConfiguration cfg = new IgniteConfiguration();
cfg.setDiscoverySpi(discoSpi);
+ cfg.setPeerClassLoadingEnabled(true);
cfg.setGridName("test");
ignite = Ignition.start(cfg);
Properties props = new Properties();
- pro... | [IgniteSqlInterpreterTest->[testSql->[interpret,type,message,code,assertEquals],testInvalidSql->[interpret,code,assertEquals],tearDown->[close],setUp->[start,setDiscoverySpi,setName,IgniteSqlInterpreter,put,singletonList,setIpFinder,setProperty,setAddresses,createCache,TcpDiscoveryVmIpFinder,Person,setGridName,open,ass... | This method is called before any other setup. | this is set in default-ignite-jdbc.xml right? would test be able to pick up this setting from there? |
@@ -1355,7 +1355,7 @@ func (i *Ingester) getTSDBUsers() []string {
return ids
}
-func (i *Ingester) getOrCreateTSDB(userID string, force bool) (*userTSDB, error) {
+func (i *Ingester) getOrCreateTSDB(userID string, force bool, gl *GlobalLimits) (*userTSDB, error) {
db := i.getTSDB(userID)
if db != nil {
ret... | [v2LabelValues->[Close,Querier],Head->[Head],v2QueryStreamChunks->[ChunkQuerier,Close],Blocks->[Blocks],Close->[Close],getMemorySeriesMetric->[Head],createTSDB->[Compact,Head,updateCachedShippedBlocks,setLastUpdate],PreCreation->[Head],v2LifecyclerFlush->[shipBlocks,compactBlocks],closeAllTSDB->[Close],v2QueryStreamSam... | getTSDBUsers returns a list of users that can be used to create a new TS. | Why do we need to pick it in input, instead of calling `i.getGlobalLimits()`? |
@@ -358,8 +358,10 @@ export function getErrorReportUrl(message, filename, line, col, error,
url += `&args=${encodeURIComponent(JSON.stringify(error.args))}`;
}
- if (!isUserError && !error.ignoreStack) {
- url += `&s=${encodeURIComponent(error.stack || '')}`;
+ if (!isUserError && !error.ignore... | [No CFG could be retrieved] | Generates a URL that can be used to retrieve a single unique identifier. Detects if the current page is non - AMP JS on the * current. | Nit: `error.stack` has already been tested for truthiness. |
@@ -370,6 +370,10 @@ func CreateAgentVMSS(cs *api.ContainerService, profile *api.AgentPoolProfile) Vi
k8sConfig := orchProfile.KubernetesConfig
linuxProfile := cs.Properties.LinuxProfile
+ if k8sConfig != nil && k8sConfig.UseManagedIdentity && k8sConfig.UserAssignedID != "" {
+ dependencies = append(dependencies... | [HasSecrets,IsAKSBillingEnabled,StringPtr,HasCustomNodesDNS,GetKubernetesWindowsNodeCustomDataJSONObject,IsSpotScaleSet,Atoi,IsCustomVNET,VirtualMachinePriorityTypes,GetKubernetesLinuxNodeCustomDataJSONObject,GetAddonByName,FormatBool,BoolPtr,IsNvidiaEnabledSKU,IsAzureStackCloud,IsWindows,GetMasterCustomDataJSONObject,... | returns a list of strings that describe the unique identifier for a resource in the system. A Variable object that represents a sequence of elements in the system. | there is a util method UserAssignedIDEnabled() in pkg/api/types.go, should we reuse that? |
@@ -21,7 +21,7 @@ describe 'New device tracking' do
expect(UserMailer).to have_received(:new_device_sign_in).
with(
user.email_addresses.first,
- device.last_used_at.strftime('%B %-d, %Y %H:%M'),
+ device.last_used_at.in_time_zone('EST').strftime('%B %-d, %Y %H:%M Eastern Ti... | [create,phone,let,to_not,describe,first,it,to,before,with,require,strftime,sign_in_user,receive,context,have_received,not_to,eq,and_call_original,instance_of] | Creates a group of tasks that describe the state of a user s devices. Find new_device_sign_in_user and find new_device_sign_. | We probably want to use US & Canadian eastern time zone instead of the international eastern time zone. |
@@ -1274,6 +1274,11 @@ class PackageBase(with_metaclass(PackageMeta, object)):
**kwargs
)
+ if (kwargs.get('use_cache', False) and
+ self.try_install_from_binary_cache(explicit)):
+ tty.msg('Installed %s from binary cache' % self.name)
+ ... | [PackageBase->[do_install->[build_process->[do_stage,_stage_and_write_lock,do_fake_install,do_patch],remove_prefix,_update_explicit_entry_in_db,do_install,_process_external_package],sanity_check_prefix->[check_paths],do_uninstall->[uninstall_by_spec],build_log_path->[build_log_path],possible_dependencies->[possible_dep... | Installs a package and its dependencies. Continuing from partial install of package. Installs a in the source directory. Add a new package to the system. | Should this mirror the install output more closely? (For example, give the path of the installed binary) |
@@ -63,6 +63,12 @@ public class Errors {
return messages.isEmpty();
}
+ public void checkMessages() {
+ if (!isEmpty()) {
+ throw new BadRequestException(this);
+ }
+ }
+
public boolean check(boolean expression, String l10nKey, Object... l10nParams) {
if (!expression) {
add(Message... | [Errors->[writeJsonAsWarnings->[writeJson],writeJson->[isEmpty,writeJson],add->[add],check->[add],isEmpty->[isEmpty],toString->[toString]]] | check if message is empty. | I do not think it's the responsibility of this class to do that. So please move this method where you use it (in RuleCreator). |
@@ -18,7 +18,7 @@ if ($message->toId == elgg_get_page_owner_guid()) {
if ($user) {
$icon = elgg_view_entity_icon($user, 'small');
$user_link = elgg_view('output/url', [
- 'href' => "messages/compose?send_to=$user->guid",
+ 'href' => "messages/add?send_to=$user->guid",
'text' => $user->name,
'is_trus... | [getGUID,getURL] | Renders a single message Print a message in the message list. | `elgg_generate_url()` should take care of these things. I don't think it makes any difference what actual paths are, so I would just leave it as compose. |
@@ -130,7 +130,10 @@ class CsCmdLine(CsDataBag):
This is slightly difficult to happen, but if it does, destroy the router with the password generated with the
code below and restart the VPC with out the clean up option.
'''
- passwd = "%s-%s" % (self.get_vpccidr, self.get_router_id())
... | [CsCmdLine->[set_master_state->[idata],set_redundant->[idata],is_redundant->[idata],get_guest_gw->[idata],set_guest_gw->[idata],is_master->[is_redundant,idata],get_domain->[idata],set_fault_state->[idata],get_router_id->[idata],get_type->[idata],get_router_password->[get_router_id,idata],get_name->[idata],get_vpccidr->... | Generate a password based on the router id. | - run pep8, fix errors - consider using -- if self.get_type() == "router" or if self.get_type() is "router" - stick to uniform usage to quotes, double quotes for strings here so "router" instead of 'router' |
@@ -13,8 +13,11 @@ module Notifications
end
def call
- user_ids = comment.ancestors.select(:user_id).where(receive_notifications: true).pluck(:user_id).to_set
- user_ids.add(comment.commentable.user_id) if comment.commentable.receive_notifications
+ comment_user_ids = comment.ancest... | [Send->[call->[call,create,to_set,send_push_notifications,user,receive_notifications,comment_data,mobile_comment_notifications,organization_id,name,title,user_id,add,each,username,id,user_data],send_push_notifications->[publish,strip!,size,unescapeHTML],attr_reader,delegate]] | called by comment when comment is not on a comment_list. | I don't think you need both select and pluck here, only `pluck` should be enough |
@@ -658,7 +658,7 @@ class BaseRaw(ProjMixin, ContainsMixin, UpdateChannelsMixin,
return tuple(self._filenames)
@annotations.setter
- def annotations(self, annotations):
+ def annotations(self, annotations, emit_warning=True):
"""Setter for annotations.
This setter checks if the... | [_start_writing_raw->[append],ToDataFrameMixin->[to_data_frame->[_get_check_picks]],_check_update_montage->[append],BaseRaw->[notch_filter->[notch_filter],apply_function->[_check_fun],_preload_data->[_read_segment],crop->[_update_times],get_data->[time_as_index],__setitem__->[_parse_get_set_params],resample->[_update_t... | Sets the annotations of the object. | why adding a param to toggle warning? we use global settings for this usually. |
@@ -127,4 +127,12 @@ public final class WebUtils {
public static String getLoginTicketFromRequest(final RequestContext context) {
return context.getRequestParameters().get("lt");
}
+
+ public static void putLogoutRequests(final RequestContext context, final List<LogoutRequest> requests) {
+ ... | [WebUtils->[getService->[getHttpServletRequest,getService]]] | Gets login ticket from request. | We could have used a constant for `logoutRequests`, but it can be done later... |
@@ -145,7 +145,7 @@ class Profile
*/
public static function load(App $a, $nickname, array $profiledata = [], $show_connect = true)
{
- $user = DBA::selectFirst('user', ['uid'], ['nickname' => $nickname, 'account_removed' => false]);
+ $user = DBA::selectFirst('user', [], ['nickname' => $nickname, 'account_remo... | [Profile->[getThemeUid->[get],searchProfiles->[get],sidebar->[t,get],getBirthdays->[isMobile,getDay,get,set,t],openWebAuthInit->[t,getHostname,getQueryString],getEventsReminderHTML->[t,isMobile,getDay],zrlInit->[getCommand,get,getQueryString,isSuccess,set],load->[get,getQueryString,getCurrentTheme,setCurrentTheme,setCu... | Load user profile data This function is called when a user is logged in and the user s theme is not set. | This can be done via the function `User::getByNickname()`. |
@@ -122,6 +122,10 @@ namespace {
} else if (v8Type == "Number") {
prefix = "static_cast<double>(";
suffix = ")";
+ } else if (v8Type == "String" && (pt == AST_PredefinedType::PT_longlong || pt == AST_PredefinedType::PT_ulonglong)) {
+ prefix = "std::to_string(";
+ suffix = ")... | [gen_typedef->[gen_includes,gen_copyto],gen_union->[gen_includes,gen_copyto],branchGen->[gen_copyto],gen_struct->[gen_field_copyto,gen_includes],gen_field_copyto->[operator->[gen_copyto]],gen_copyto->[builtInSeq,getV8Type,gen_copyto]] | Generate code that copies a value from src to tgt. end of function copyToV8. | Is the check for v8Type here redundant? Isn't it enough to check pt? |
@@ -213,10 +213,10 @@ public class CountText extends AbstractProcessor {
}
AtomicBoolean error = new AtomicBoolean();
- lineCount = 0;
- lineNonEmptyCount = 0;
- wordCount = 0;
- characterCount = 0;
+ final AtomicInteger lineCount = new AtomicInteger(0);
+ f... | [CountText->[onTrigger->[getMessage,DecimalFormat,InputStreamReader,nanoTime,isDebugEnabled,info,put,generateMetricsMessage,putAllAttributes,countWordsInLine,set,valueOf,transfer,debug,error,AtomicBoolean,adjustCounter,readLine,read,format,isInfoEnabled,length,get,BufferedReader],generateMetricsMessage->[append,toStrin... | This method is called when a trigger event is triggered. missing - > null. | Since we've moved these variables from volatile instance variables to local variables inside this onTrigger method, I believe we don't have to use AtomicIntegers, primitive ints should suffice. |
@@ -33,12 +33,14 @@ class ConfigurationTypeField:
STRING = "String"
BOOLEAN = "Boolean"
SECRET = "Secret"
+ SECRET_TEXT = "SecretText"
PASSWORD = "Password"
CHOICES = [
(STRING, "Field is a String"),
(BOOLEAN, "Field is a Boolean"),
(SECRET, "Field is a Secret"),
... | [BasePlugin->[get_payment_gateway->[get_payment_config,get_supported_currencies],get_plugin_configuration->[_update_configuration_structure,_append_config_structure],save_plugin_configuration->[validate_plugin_configuration,_update_config_items],get_payment_gateway_for_checkout->[get_payment_gateway]]] | The base class for storing all methods available for any plugin. Handle received http request. | Maybe `SECRET_MULTILINE` would be a better name? Just wondering, `SECRET` and `SECRET_TEXT` sounds the same to me. |
@@ -1,12 +1,14 @@
+from typing import List, Dict
+from copy import deepcopy
from overrides import overrides
-
+import numpy as np
from allennlp.common.util import JsonDict
from allennlp.data import DatasetReader, Instance
+from allennlp.data.fields import ListField, LabelField
from allennlp.data.tokenizers.word_spl... | [SentenceTaggerPredictor->[predict->[predict_json],_json_to_instance->[text_to_instance,split_words],__init__->[SpacyWordSplitter,super]],register] | A class that can be used to predict a single set of tags. | Just `import numpy`. And fix import grouping. |
@@ -566,6 +566,7 @@ public final class AnkiPackageExporter extends AnkiExporter {
*
* @author Tim
*/
+@SuppressLint("FieldNamingPatternDetector")
class ZipFile {
private final int BUFFER_SIZE = 1024;
private ZipArchiveOutputStream mZos;
| [Exporter->[stripHTML->[stripHTML]],ZipFile->[close->[close],writeEntry->[write]],AnkiPackageExporter->[exportFiltered->[exportInto,_exportMedia],_exportMedia->[_exportMedia]],AnkiExporter->[exportInto->[cardIds]]] | This method is used to prepare the media files. Write an entry to the archive. | I don't see why this is here |
@@ -0,0 +1,11 @@
+class AddPasswordChangeIpToEmailTokens < ActiveRecord::Migration
+ def up
+ add_column :email_tokens, :remote_ip, :inet
+ add_column :email_tokens, :user_agent, :string
+ end
+
+ def down
+ remove_column :email_tokens, :remote_ip
+ remove_column :email_tokens, :user_agent
+ end
+end
| [No CFG could be retrieved] | No Summary Found. | Can the following columns be `null`? :thought_balloon: |
@@ -32,7 +32,7 @@ exports.config = {
beforeLaunch () {
require('ts-node').register({
- project: 'tsconfig.json'
+ project: '<%= TEST_SRC_DIR %>tsconfig.spec.json'
});
},
| [No CFG could be retrieved] | Config for the . | shouldnt it be `<%= TEST_SRC_DIR %>tsconfig.e2e.json'` |
@@ -117,6 +117,7 @@ namespace MS.Internal.Xml.Cache
{
idx = page[idx].GetSibling(out page);
Debug.Assert(idx != 0);
+ Debug.Assert(page != null);
}
pageNode = page;
| [XPathNodeHelper->[GetPreviousContentSibling->[GetParent],GetParent->[GetParent],GetNonDescendant->[GetParent]]] | GetContentChild - if node has content child. | consider changing GetSibling/GetParent if they always return (out) non-null |
@@ -171,7 +171,7 @@ class WP_Test_Jetpack_Sync_Functions extends WP_Test_Jetpack_Sync_Base {
$this->sender->do_sync();
$synced_value = $this->server_replica_storage->get_callable( 'active_modules' );
- $this->assertEquals( array( 'json-api' ), $synced_value );
+ $this->assertEquals( array( 1 => 'json-api' ), ... | [WP_Test_Jetpack_Sync_Functions->[test_get_protocol_normalized_url_stores_max_history->[return_example_com],test_get_protocol_normalized_url_returns_http_when_https_falls_off->[return_https_example_com,return_example_com],test_fixes_fatal_error->[extract_plugins_we_are_testing],test_get_protocol_normalized_url_works_wi... | This test tests if the server is syncing changes to modules right away. Syncs the server configuration with the server replica storage. | The fact that we have to change this test seems to indicate a regression. I might be misunderstanding, but I wouldn't expect for keys to start from `1` in a basic array with numeric keys. |
@@ -94,6 +94,12 @@ export class AmpAdNetworkDoubleclickImpl extends AmpA4A {
getAdUrl() {
// TODO: Check for required and allowed parameters. Probably use
// validateData, from 3p/3p/js, after noving it someplace common.
+ const rtcConfig = tryParseJson(
+ document.getElementById('amp-rtc').inner... | [No CFG could be retrieved] | Provides access to the AMP Analytics element and its url. Checks if the element has a data - multi - size attribute and if so returns the array. | We should expect the config to be either meta tag or a JSON object defined in the head |
@@ -59,7 +59,7 @@ class AppendAnalyticsListener
*/
public function onResponse(FilterResponseEvent $event)
{
- if ($event->getRequest()->getRequestFormat() !== 'html'
+ if (0 !== strpos($event->getResponse()->headers->get('Content-Type'), 'text/html')
|| $this->requestAnalyzer-... | [AppendAnalyticsListener->[onResponse->[getUrlExpression,render,getContent,getPortalInformation,getResponse,setContent,findByUrl,getRequestFormat]]] | Renders the response of a . | the format is not set for example in a image request. but the mimetype of the response is always correct and can be used for this statement. |
@@ -552,6 +552,7 @@ common_op_parse_hdlr(int argc, char *argv[], struct cmd_args_s *ap)
{"user", required_argument, NULL, 'u'},
{"group", required_argument, NULL, 'g'},
{"principal", required_argument, NULL, 'P'},
+ {"include-acl", no_argument, NULL, DAOS_INCLUDE_ACL_OPTION},
{NULL, 0, NULL, 0}
};
... | [int->[cont_set_attr_hdlr,cont_get_acl_hdlr,uuid_generate,cont_del_attr_hdlr,daos_prop_free,ARGS_VERIFY_PATH_NON_CREATE,d_errdesc,daos_str2csumcontprop,cont_op_parse,strcpy,pool_del_attr_hdlr,cont_create_uns_hdlr,cont_destroy_snap_hdlr,daos_rank_list_parse,uuid_parse,daos_obj_id_parse,pool_list_containers_hdlr,strnlen,... | Parse the arguments of a command - line option - set and return the values of the option - - - - - - - - - - - - - - - - - - Parse remaining command - line options and parse them. parse options for the n - node node - node - node - node - node - node - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -... | (style) line over 80 characters |
@@ -220,6 +220,10 @@ def test_stage_strings_representation(tmp_dir, dvc, run_copy):
folder = tmp_dir / "dir"
folder.mkdir()
with folder.chdir():
+ # `Stage` caches `relpath` results, forcing it to reset
+ stage1.path = stage1.path
+ stage2.path = stage2.path
+
rel_path = os.... | [test_no_cmd->[validate],test_stage_strings_representation->[relpath,str,chdir,repr,mkdir,run_copy,dvc_gen],test_stage_remove_pipeline_stage->[remove,run_copy,gen],test_cmd_none->[validate],test_none->[validate],test_parent_repo_collect_stages->[init,chdir,collect,gen,add],TestDefaultWorkingDirectory->[test_ignored_in_... | Test that the stage strings are the same. | Ugly hack, `chdir` is now not supported as we cache the `relpath`. It's fine for CLI use-case, but for API usecases, it sucks. |
@@ -9,8 +9,8 @@ import com.baeldung.apache.beam.intro.WordCount;
public class WordCountUnitTest {
- @Test
- // @Ignore
+// @Test
+ @Ignore
public void givenInputFile_whenWordCountRuns_thenJobFinishWithoutError() {
boolean jobDone = WordCount.wordCount("src/test/resources/wordcount.txt... | [WordCountUnitTest->[givenInputFile_whenWordCountRuns_thenJobFinishWithoutError->[assertTrue,wordCount]]] | This method checks if the job is done and if it does it does it does. | Is there any reason we want to ignore this test? |
@@ -780,6 +780,11 @@ func (g *generator) escapeString(v string) string {
if c == '"' || c == '\\' {
builder.WriteRune('\\')
}
+ if c == '\n' {
+ builder.WriteRune('\\')
+ builder.WriteRune('n')
+ continue
+ }
builder.WriteRune(c)
}
return builder.String()
| [GenFunctionCallExpression->[GenFunctionCallExpression],GenTemplateExpression->[GenLiteralValueExpression],genLiteralValueExpression->[genLiteralValueExpression],GenUnaryOpExpression->[GetPrecedence],GenBinaryOpExpression->[GetPrecedence],literalKey->[GenTemplateExpression,GenLiteralValueExpression],genStringLiteral->[... | escapeString escapes a string with double quotes. | It would be more idiomatic here to use raw string literals (which are escaped with `` ` ``) or to put each string literal on its own line and concatenate them, but what you have is simpler. You might file a follow-up issue to track generating the more idiomatic code. |
@@ -873,12 +873,11 @@ func (t Time) UnixMicroseconds() int64 {
}
func ToTime(t time.Time) Time {
- // the result of calling UnixNano on the zero Time is undefined.
- // https://golang.org/pkg/time/#Time.UnixNano
if t.IsZero() {
return 0
}
- return Time(t.UnixNano() / 1000000)
+
+ return Time(t.Unix()*1000 + ... | [FindDeviceKey->[Equal],IsPublic->[IsPublic],RootID->[ToTeamID,RootAncestorName],KeySummary->[KeySummary],MaxReaderPerTeamKeyGeneration->[MaxReaderPerTeamKey],AddUVWithRole->[IsRestrictedBot],SwapLastPart->[Parent,Append],Append->[String],AssertionValue->[String],GoError->[Error],PrefixMatch->[IsNil],IsTeamOrSubteam->[... | PrefixMatch returns true if s and q are equal or s is a prefix of q. ToMapKey converts a SigID to a SigIDMapKey. | why not use `time.Unix(...)` here too? like on line 911. |
@@ -23,12 +23,12 @@ import java.io.Serializable;
* Each IO in Beam has one table schema, by extending {@link BaseBeamTable}.
*/
public abstract class BaseBeamTable implements BeamSqlTable, Serializable {
- protected BeamSqlRecordType beamSqlRecordType;
- public BaseBeamTable(BeamSqlRecordType beamSqlRecordType) ... | [No CFG could be retrieved] | Get the record type. | @Override public BeamSqlRowType get**Row**Type() { |
@@ -3777,8 +3777,10 @@ class Diaspora {
$message = self::construct_like($r[0], $contact);
$message["author_signature"] = self::signature($contact, $message);
- // We now store the signature more flexible to dynamically support new fields.
- // This will break Diaspora compatibility with Friendica versions pri... | [Diaspora->[receive_status_message->[children],decode_raw->[children,attributes],verify_magic_envelope->[children,attributes],message->[getName],decode->[children,attributes],receive_request_make_friend->[get_hostname],transmit->[get_curl_code,get_curl_headers],valid_posting->[children,getName],dispatch->[getName]]] | Store a like signature for a contact. | Why have you changed the sentence? |
@@ -63,7 +63,8 @@ function load_assets( $attr, $content ) {
$text_color = get_attribute( $attr, 'textColor' );
$primary_color = get_attribute( $attr, 'primaryColor' );
$classes = Blocks::classes( FEATURE_NAME, $attr, array( 'calendly-style-' . $style ) );
- $block_id ... | [No CFG could be retrieved] | Load assets from the page Render deprecated version of Calendly block if needed. JS - ENDCOME - JS. | A minor one. Not sure about this var name since it seems to be kind of ambiguous? Maybe something like `calendly_html_attr_id` or just `calendly_attr_id`? Please feel free to ignore it, too. |
@@ -800,6 +800,17 @@ func (d *Service) tryLogin() {
if err := engine.RunEngine(eng, ctx); err != nil {
d.G().Log.Debug("error running LoginOffline on service startup: %s", err)
d.G().Log.Debug("trying LoginProvisionedDevice")
+
+ // Standalone mode quirk here. We call tryLogin when client is
+ // launched in ... | [GetExclusiveLock->[GetExclusiveLockWithoutAutoUnlock,ReleaseLock],OnLogout->[stopChatModules],OnLogin->[runBackgroundIdentifierWithUID,startChatModules],writeServiceInfo->[ensureRuntimeDir],GetExclusiveLockWithoutAutoUnlock->[ensureRuntimeDir],SimulateGregorCrashForTesting->[HasGregor],Handle->[RegisterProtocols],List... | tryLogin attempts to login on the device. | Let's add a TODO here about getting rid of the KbKeyrings usage flag entirely? |
@@ -202,6 +202,16 @@ public class CompactionTask extends AbstractBatchIndexTask
this.dimensionsSpec = dimensionsSpec == null ? dimensions : dimensionsSpec;
this.metricsSpec = metricsSpec;
this.segmentGranularity = segmentGranularity;
+ if (granularitySpec == null && segmentGranularity != null) {
+ ... | [CompactionTask->[createContextForSubtask->[getPriority],createDimensionsSpec->[getType],Builder->[build->[CompactionTask]],runTask->[isReady]]] | Creates an unique identifier for this task. This method is used to get the index spec for all partitioned partitions. | What happens if both segmentGranularity & granularitySpec are non-null? |
@@ -6637,11 +6637,11 @@ namespace Js
}
// Simple JIT counts down and transitions on overflow
- const uint8 callCount = simpleJitEntryPointInfo->callsCount;
+ const uint32 callCount = simpleJitEntryPointInfo->callsCount;
Assert(simpleJitLimit == 0 ? callCount == 0 : simpleJitLi... | [No CFG could be retrieved] | region FunctionBody Implementation Magic number of calls that can be made by a SimpleJIT. | Is this just a bug fix? |
@@ -191,7 +191,9 @@ class OffsetRangeTracker(iobase.RangeTracker):
class GroupedShuffleRangeTracker(iobase.RangeTracker):
- """A 'RangeTracker' for positions used by'GroupedShuffleReader'.
+ """For internal use only; no backwards-compatibility guarantees.
+
+ A 'RangeTracker' for positions used by'GroupedShuffl... | [UnsplittableRangeTracker->[set_split_points_unclaimed_callback->[set_split_points_unclaimed_callback],position_at_fraction->[position_at_fraction],start_position->[start_position],try_claim->[try_claim],fraction_consumed->[fraction_consumed],stop_position->[stop_position],set_current_position->[set_current_position]],... | A RangeTracker for positions used by GroupedShuffleReader. Sets the _last_group_was_at_a_split_point flag to. | I think we should still have the description of what this class is at line 1. |
@@ -249,7 +249,8 @@ class PythonChroot(object):
context = self._python_repos.get_network_context()
for platform in platforms:
- requirements_cache_dir = os.path.join(self._python_setup.resolver_cache_dir, str(self._interpreter.identity))
+ requirements_cache_dir = os.path.join(self._python_setup.r... | [PythonChroot->[_generate_antlr_requirement->[path,_generate_requirement],_resolve_multi->[get_platforms,resolve],resolve->[add_dep->[InvalidDependencyException]],_dump_requirement->[debug],_dump_library->[copy_to_chroot,debug],pex->[path],debug->[debug],_dump_distribution->[debug],path->[path],_generate_thrift_require... | Multi - platform dependency resolution for PEX files. | would prefer strongly to keep this parameterizable via options throughout. |
@@ -27,6 +27,7 @@ import org.apache.avro.generic.GenericDatumReader;
import org.apache.avro.generic.GenericDatumWriter;
import org.apache.avro.generic.GenericRecord;
import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.fs.FileSystem;
import org.apache.hadoop.security.UserGroupInformation;
import ... | [PutHiveStreaming->[setupHeartBeatTimer->[run->[setupHeartBeatTimer]],makeHiveWriter->[makeHiveWriter]]] | Imports a single - valued object as a System property. Imports a NIFC object. | Minor CheckStyle violation (unused import), I will remove before merging your PR. For the future, you can run "mvn clean install -Pcontrib-check" from the nifi-nar-bundles/nifi-hive-bundle to catch these errors (and any compilation or unit test errors). |
@@ -588,9 +588,6 @@ func (c *MasterConfig) RunAssetServer() {
server.TLSConfig = &tls.Config{
// Change default from SSLv3 to TLSv1.0 (because of POODLE vulnerability)
MinVersion: tls.VersionTLS10,
- // Populate PeerCertificates in requests, but don't reject connections without certificates
- // Thi... | [InstallProtectedAPI->[KubeClient,DeploymentConfigControllerClients,BuildLogClient],RunDeploymentController->[DeployerClientConfig,Run,DeploymentControllerClients],Run->[InstallAPI],RunBuildController->[Run,BuildControllerClients],RunDeploymentConfigChangeController->[Run,DeploymentConfigChangeControllerClients],RunBui... | RunAssetServer starts the asset server Loop until the server is listening and then dials the server. | Don't we need `ClientAuth` to be set to do any sort of validation from the cert pools? |
@@ -39,6 +39,7 @@ public class BaseDataNode implements DataNode {
@Getter
private String id;
@Getter
+ @Setter
private Config rawConfig;
@Getter
private boolean active = true;
| [BaseDataNode->[hasPath,checkArgument,isNullOrEmpty,getBoolean,DataNodeCreationException,getString]] | Creates a base data node which is a child of a node in the network. | We probably do not need a setter, if we do the resolution inside BaseDataNode. |
@@ -0,0 +1,11 @@
+from ...extensions.manager import ExtensionsManager, get_extensions_manager
+from ...product.models import Product
+
+
+def get_product_tax_rate(product: Product, manager: ExtensionsManager = None) -> str:
+ manager = manager or get_extensions_manager()
+ tax_rate = manager.get_tax_code_from_obj... | [No CFG could be retrieved] | No Summary Found. | Shouldn't we use the same logic in the API as well? If this was the case, I think we could have this logic in the manager's `get_tax_code_from_object_meta` method. @korycins what do you think? |
@@ -1786,3 +1786,18 @@ def test_corrupted(tmpdir):
with pytest.warns(RuntimeWarning, match='.*tag directory.*corrupt.*'):
raw_bad = read_raw_fif(bad_fname)
assert_allclose(raw.get_data(), raw_bad.get_data())
+
+
+@testing.requires_testing_data
+def test_expand_user():
+ """Test that we're expandin... | [test_multiple_files->[_compare_combo],test_compensation_raw_mne->[compensate_mne]] | Test that a corrupted file can be read. | You are writing to the user's HOME directory, which we should never do in tests. We only should only write to `tmpdir`. Better to make `expanduser` resolve to a `tmpdir` (for example by setting the HOME env var using `monkeypatch.setenv`?) and mess with that. |
@@ -11,4 +11,17 @@ public class CategoryConfig {
*/
@ConfigItem(defaultValue = "inherit")
String level;
+
+ /**
+ * The names of the handlers to link to this category.
+ */
+ @ConfigItem
+ Optional<List<String>> handlers;
+
+ /**
+ * Specify whether or not this logger should send... | [No CFG could be retrieved] | string level. | The category also needs a `useParentHandlers` property. |
@@ -4357,3 +4357,12 @@ def assertCoefEqual(regCoeff, coeff, coeffClassSet, tol=1e-6):
diff = abs(val1-val2)
print("val1: {0}, val2: {1}, tol: {2}".format(val1, val2, tol))
assert diff < tol, "diff {0} exceeds tolerance {1}.".format(diff, tol)
+
+def equals(x, y, tol=1e-6):
+ if isinstance(... | [extract_comparison_attributes_and_print_multinomial->[compare_two_arrays],generate_and_save_mixed_glm->[remove_negative_response],compare_frames_equal_names->[compare_frames_local_onecolumn_NA_enum,compare_frames_local_onecolumn_NA,compare_frames_local_onecolumn_NA_string],expect_warnings->[locate],random_col_duplicat... | Assert that the coefficients in regCoeff are equal. | `agree` seems not to be the right word here? |
@@ -0,0 +1,16 @@
+package com.baeldung.java14.textblocks;
+
+public class TextBlocks14 {
+public String getIgnoredNewLines() {
+ return """
+ This is a long test which looks to \
+ have a newline but actually does not""";
+}
+
+public String getEscapedSpaces() {
+ return """
+ lin... | [No CFG could be retrieved] | No Summary Found. | Indentation looks off here in this class? |
@@ -11,11 +11,11 @@ $data_root = elgg_get_config('dataroot');
$failed = array();
$existing_bucket_dirs = array();
$cleanup_years = array();
-$users = new ElggBatch('elgg_get_entities', array('type' => 'user', 'limit' => 0), 50);
+$users = new ElggBatch('elgg_get_entities', array('type' => 'user', 'limit' => 0, 'call... | [getGUID] | Package private functions Function to create a matrix of user data based on the last 2 days. | I'd rename these $user_rows and $user_row for clarity if anyone has to work on this again. And similarly `make_matrix_2013022000(stdClass $user_row)`. |
@@ -984,7 +984,6 @@ type NewIssueOptions struct {
Repo *Repository
Issue *Issue
LabelIDs []int64
- AssigneeIDs []int64
Attachments []string // In UUID format.
IsPull bool
}
| [DiffURL->[HTMLURL],ChangeStatus->[changeStatus,loadPullRequest,loadRepo,APIFormat,loadPoster],loadAttributes->[loadPullRequest,loadTotalTimes,loadRepo,loadLabels,loadAttributes,isTimetrackerEnabled,loadPoster,loadComments,loadReactions],ClearLabels->[loadPullRequest,loadRepo,clearLabels],ReplaceLabels->[removeLabel,ad... | GetLastEventTimestamp returns the timestamp of the last event in the issue. Check if the user has already passed to issue. AssigneeIDs if not add it. | Why removed this? |
@@ -419,7 +419,7 @@ namespace System.Windows.Forms
private CalendarRowAccessibleObject GetCalendarRow(int calendarIndex, AccessibleObject parentAccessibleObject, int rowIndex)
{
if ((HasHeaderRow ? rowIndex < -1 : rowIndex < 0) ||
- rowIndex >= RowCount)
+ ... | [MonthCalendar->[MonthCalendarAccessibleObject->[GetPropertyValue->[GetPropertyValue],GetCalendarGridInfoText->[GetCalendarGridInfoText],FragmentNavigate->[FragmentNavigate],IsPatternSupported->[IsPatternSupported],GetCalendarGridInfo->[GetCalendarGridInfo],AccessibleObject->[GetCalendarGridInfo],ElementProviderFromPoi... | Returns a calendar row if it can be found. | Please put as a first check. |
@@ -191,6 +191,9 @@ class MuleExtensionModelDeclarer {
.withExpressionSupport(NOT_SUPPORTED)
.describedAs("Defines the prefix of the object store names. This will only be used for the internally built object store.");
+ validator.withOptionalComponent("privateObjectStore")
+ .describedAs("... | [MuleExtensionModelDeclarer->[declareChoice->[withMaxOccurs,describedAs,withMinOccurs],declareForEach->[describedAs,withChain],declareLogger->[describedAs,load,ofType],declareScheduler->[withSubType,withExpressionSupport,describedAs,addType,ofType,load],declareTry->[withAllowedStereotypes,describedAs,withChain],declare... | Declares the idempotent message validator. This method can be used to process the nested list of message processors asynchronously using a thread pool. | this is wrong. This is a parameter not a component. It is missing type, expression support, dsl model, and element reference. Look at `org.mule.runtime.extension.internal.loader.enricher.OAuthDeclarationEnricher.EnricherDelegate#addOAuthStoreConfigParameter` for inspiration |
@@ -20,8 +20,8 @@ namespace System.Net.Http.Json
private static MediaTypeHeaderValue DefaultMediaType
=> new MediaTypeHeaderValue(JsonMediaType) { CharSet = "utf-8" };
- internal static JsonSerializerOptions DefaultSerializerOptions
- => new JsonSerializerOptions { PropertyName... | [JsonContent->[GetEncoding->[CharSetInvalid,GetEncoding,Substring,Assert,Length],Task->[GetEncoding,None,ContentType,SerializeToStreamAsyncCore,ConfigureAwait,UTF8],GetType,Format,nameof,IsAssignableFrom,ContentType,SerializeWrongType,CamelCase]] | Creates a new object - based content object that can be serialized into JSON. The default implementation of the field that is used to generate the value. | What prevents the caches inside of this instance from growing unbounded? Do we need to place a limit on the size of the cache, making it an LRU cache or something like that? |
@@ -413,6 +413,8 @@ def plot_epochs(epochs, picks=None, scalings=None, n_epochs=20,
title : str | None
The title of the window. If None, epochs name will be displayed.
Defaults to None.
+ events : array shape (n_events, 3)
+ Events to show with vertical bars.
show : bool
S... | [_plot_onkey->[_plot_traces,_plot_window],_mouse_click->[plot_epochs_image,_pick_bad_epochs,_plot_window],_toggle_labels->[_plot_vert_lines],_epochs_navigation_onclick->[_draw_epochs_axes]] | Visualize a series of bad epochs. Plots a single missing key. | None | array, shape (n_events, 3) |
@@ -85,6 +85,8 @@ class Zoltan(Package):
config_cflags.append(self.compiler.pic_flag)
if spec.satisfies('%gcc'):
config_args.append('--with-libs={0}'.format('-lgfortran'))
+ if spec.satisfies('%intel'):
+ config_args.append('--with-libs={0}'.format('-... | [Zoltan->[install->[,join_path,get_config_flag,basename,satisfies,append,working_dir,Executable,sub,config,glob,format,RuntimeError,join,make,get_mpi_libs,move],get_config_flag->[format],get_mpi_libs->[join_path,group,list,basename,r'^,glob,set,add,match],variant,conflicts,depends_on,version]] | Installs a Zoltan configuration. Add Zoltan specific configuration options. This method is called after the build process has completed. | why does this use format at all? Why not directly use `'--with-libs=-lifcore'`? |
@@ -169,8 +169,8 @@ class BlobServiceClient(AsyncStorageAccountHostsMixin, BlobServiceClientBase):
process_storage_error(error)
@distributed_trace_async
- async def get_service_stats(self, timeout=None, **kwargs): # type: ignore
- # type: (Optional[int], **Any) -> Dict[str, Any]
+ async... | [BlobServiceClient->[get_user_delegation_key->[get_user_delegation_key],delete_container->[delete_container],create_container->[create_container]]] | Retrieves statistics related to replication for the Blob service. | **Any should be just Any |
@@ -2727,9 +2727,9 @@ static int do_get_structure(dt_iop_module_t *module, dt_iop_ashift_params_t *p,
g->fitting = 1;
- dt_pthread_mutex_lock(&g->lock);
+ dt_iop_gui_enter_critical_section(module);
float *b = g->buf;
- dt_pthread_mutex_unlock(&g->lock);
+ dt_iop_gui_leave_critical_section(module);
if... | [No CFG could be retrieved] | function to get the structure of the n - th image find out if a block of data is available in the image. | Please excuse my very limited understanding of multi-threading and locking, but isn't a single assignment atomic anyway? What would be the benefit of this very short lock? There are several more instances like this where I wonder if either the lock should be held longer (until the original field is updated or used furt... |
@@ -117,9 +117,8 @@ void LinearPlaneStress::CalculatePK2Stress(
ConstitutiveLaw::Parameters& rValues
)
{
- const Properties& r_material_properties = rValues.GetMaterialProperties();
- const double E = r_material_properties[YOUNG_MODULUS];
- const double NU = r_material_properties[POISSON_RATIO];
+ co... | [CalculateCauchyGreenStrain->[E_tensor,trans,GetDeformationGradientF,F2x2,noalias,F,prod],GetLawFeatures->[push_back,Set],CalculatePK2Stress->[GetMaterialProperties],CalculateElasticMatrix->[GetMaterialProperties,CheckClearElasticMatrix,C]] | Linear Plane Stress. | what about the elements? => what if they use `r_material_properties[YOUNG_MODULUS]`? |
@@ -2058,8 +2058,14 @@ public class DeckPicker extends NavigationDrawerActivity implements
if (getCol().getDecks().selected() != did) {
getCol().clearUndo();
}
- // Select the deck
- getCol().getDecks().select(did);
+ try {
+ // Select the deck
+ ... | [DeckPicker->[handleDbError->[showDatabaseErrorDialog],onRequestPermissionsResult->[onRequestPermissionsResult,handleStartup],undo->[undoTaskListener],mediaCheck->[mediaCheckListener],MediaCheckListener->[actualOnPostExecute->[showMediaCheckDialog]],updateDeckList->[updateDeckListListener,updateDeckList],onDestroy->[on... | Handles a specific deck selection. Checks if the given deck has a card and if so shows a dialog with a dialog with. | do we need to return after showing this? if control returns here it will then try to continue executing here I think, with an invalid collection? |
@@ -25,7 +25,7 @@ import java.util.Comparator;
public class LinearPartitionChunk <T> implements PartitionChunk<T>
{
- Comparator<Integer> comparator = Ordering.<Integer>natural().nullsFirst();
+ private static final Comparator<Integer> comparator = Ordering.<Integer>natural().nullsFirst();
private final int ... | [LinearPartitionChunk->[compareTo->[compare,IllegalArgumentException],equals->[getClass,compareTo],nullsFirst]] | Creates a new chunk with the specified number of objects. | static field should be all-caps. |
@@ -1523,8 +1523,8 @@ void init_presets(dt_lib_module_t *self)
SMG(C_("modulegroup", "base"), "basic");
AM("basecurve");
- AM("clipping");
AM("crop");
+ AM("ashift");
AM("colisa");
AM("colorreconstruct");
AM("demosaic");
| [No CFG could be retrieved] | Initialize the presets list for a given module group. AM - Functions for all module groups. | I would have put "ashift" here (and remove it from it's actual group) as it now handle rotation which belong to the basic group imho (same for other presets) |
@@ -604,6 +604,12 @@ namespace System.Net.Http
}
}
+ if (initialFrame && !maxConcurrentStreamsReceived)
+ {
+ // Set to 'infinite' because MaxConcurrentStreams was not set on the initial SETTINGS frame.
+ _maxCon... | [Http2Connection->[RemoveStream->[CheckForShutdown],WriteHeaders->[WriteLiteralHeaderValue,WriteBytes,WriteIndexedHeader,WriteHeaderCollection],WriteHeaderCollection->[WriteLiteralHeader,WriteLiteralHeaderValue,WriteLiteralHeaderValues,WriteBytes],ThrowProtocolError->[ThrowProtocolError],SendHeadersAsync->[ThrowShutdow... | Process a settings frame. Discard the frame header and send an ack if it is not acked. | Should the call here be to ChangeMaxConcurrentStreams? That is what happens when `SettingId.MaxConcurrentStreams` setting is received. |
@@ -97,7 +97,7 @@ REMOTE_COMMON = {
}
LOCAL_COMMON = {
"type": supported_cache_type,
- Optional("protected", default=False): Bool,
+ Optional("protected", default=False): Bool, # obsoleted
"shared": All(Lower, Choices("group")),
Optional("slow_link_warning", default=True): Bool,
}
| [_lower_keys->[_lower_keys],_merge->[_merge],Config->[load->[validate],_load_paths->[resolve->[RelPath]],edit->[ConfigError,load,load_one,_save_paths],init->[Config],files->[get_dir],validate->[ConfigError]],Choices,ByUrl] | Validate a single value in a list of values. Optional function for locking and locking of cache. | So this one is effectively defunct from now on. Just keeping it in the SCHEMA to not break on older configs. |
@@ -125,7 +125,6 @@ namespace System.Net.Sockets
#endif
public readonly SocketAsyncContext AssociatedContext;
- public AsyncOperation Next = null!; // initialized by helper called from ctor
public SocketError ErrorCode;
public byte[]? SocketAddress;
publ... | [SocketAsyncContext->[BufferListReceiveOperation->[InvokeCallback->[ReturnOperation]],StopAndAbort->[StopAndAbort],BufferMemorySendOperation->[InvokeCallback->[ReturnOperation]],HandleEvents->[Process,ProcessSyncEventOrGetAsyncEvent],OperationQueue->[ProcessAsyncOperation->[Dispose,InvokeCallback],StopAndAbort->[TryCan... | Abstract class for handling async operations. TrySetRunning - Try to set the running flag if it is set. | Isn't this introducing interface calls in some places to access Next? |
@@ -285,11 +285,11 @@ KRATOS_TEST_CASE_IN_SUITE(CustomReduction, KratosCoreFastSuite)
this->max_abs = std::max(this->max_abs,std::abs(function_return_value));
}
void ThreadSafeReduce(CustomReducer& rOther){
- #pragma omp critical
- {
+ ... | [No CFG could be retrieved] | This method is used to reduce the values of the n - th element of the data_ This function checks the values of the n - th element of a list of blocks and reduces. | you cannot create the lock here... a global lock must preexist and you need to acquire it |
@@ -388,6 +388,8 @@ public class BigtableIO {
checkNotNull(optionsBuilder, "optionsBuilder");
// TODO: is there a better way to clone a Builder? Want it to be immune from user changes.
BigtableOptions.Builder clonedBuilder = optionsBuilder.build().toBuilder();
+ clonedBuilder = addBulkOptions(... | [BigtableIO->[BigtableWriter->[checkForFailures->[toString],close->[checkForFailures,close],write->[checkForFailures],open->[getTableId],getSink],BigtableReader->[getFractionConsumed->[getFractionConsumed],getSplitPointsConsumed->[getSplitPointsConsumed],start->[start,createReader],close->[close],advance->[advance],spl... | Creates a new Write with the specified BigtableOptions. | suspect you need the `addRetryOptions` here as well, in some cases. |
@@ -236,6 +236,10 @@ public class FsDatasetStateStore extends FsStateStore<JobState.DatasetState> imp
WritableShimSerialization.addToHadoopConfiguration(deserializeConfig);
try (@SuppressWarnings("deprecation") SequenceFile.Reader reader = new SequenceFile.Reader(this.fs, tablePath,
deserializeConfig... | [FsDatasetStateStore->[getInternal->[sanitizeDatasetStatestoreNameFromDatasetURN],getLatestDatasetState->[get,sanitizeDatasetStatestoreNameFromDatasetURN],getLatestDatasetStatesByUrns->[apply->[call->[get,getAll]]],getAll->[getAll],persistDatasetState->[sanitizeDatasetStatestoreNameFromDatasetURN]]] | Gets all the dataset states in the store. | Maybe instead of doing this check we can use the existing matching classes. We may be able to remove the shims if that works. |
@@ -535,10 +535,10 @@ public class OidcTenantConfig extends OidcCommonConfig {
public Optional<String> cookieDomain = Optional.empty();
/**
- * If this property is set to 'true' then an OIDC UserInfo endpoint will be called
+ * If this property is set to 'true' then an OIDC UserInfo ... | [OidcTenantConfig->[Roles->[fromClaimPathAndSeparator->[Roles]],Token->[fromIssuer->[Token],fromAudience->[Token]]]] | This class is used to log out the session cookies. Returns true if this node is a node in the tree. | Didn't this one lose its `@ConfigItem`? |
@@ -122,9 +122,9 @@ func PreviewThenPrompt(ctx context.Context, kind apitype.UpdateKind, stack Stack
}
// Otherwise, ensure the user wants to proceed.
- err = confirmBeforeUpdating(kind, stack, events, op.Opts)
+ err := confirmBeforeUpdating(kind, stack, events, op.Opts)
close(eventsChannel)
- return changes, e... | [Wrapf,Colorize,Sprintf,IgnoreError,TrimSpace,String,Errorf,Assert,AskOne,WriteString,RenderDiffEvent] | confirmBeforeUpdating is the main function that handles the processing of the n - ary update. clear asks the user to confirm that we aren t updating resources. | new helper i added. If you give it a nil-error, you get a nil-result **not** a result which wraps that nil-error. This should be used if you're not directly inside an `err != nil` check. |
@@ -3,6 +3,7 @@ require 'rails_helper'
describe 'devise/registrations/verify_email.html.slim' do
before do
allow(view).to receive(:email).and_return('foo@bar.com')
+ @register_user_email_form = RegisterUserEmailForm.new
end
it 'has a localized title' do
| [to,describe,have_selector,before,have_link,with,t,it,require,and_return] | Describe the registrations of a user. | is this used anywhere? |
@@ -95,8 +95,13 @@ public class <%= serviceClassName %> <% if (service == 'serviceImpl') { %>implem
* @param query the query of the search
* @return the list of entities
*/<% if (databaseType == 'sql') { %>
- @Transactional(readOnly = true) <% } %>
- public List<<%= instanceType %>> search(Str... | [No CFG could be retrieved] | search for the . | The idea to use templates was to minimize code duplication coz you will do same code when using a repo directly in resources or when using it in a service and hence the viaService if else in the template. Isnt the generated code the same for this method and the resource method if used without a service? If so cant temp... |
@@ -7,7 +7,8 @@ class Asset < ActiveRecord::Base
# Paperclip validation
has_attached_file :file,
- styles: { medium: [Constants::MEDIUM_PIC_FORMAT, :jpg] },
+ styles: { medium: [Constants::MEDIUM_PIC_FORMAT, :jpg],
+ large: [Constants::LARGE_PIC... | [Asset->[destroy->[destroy],extract_asset_text->[is_stored_on_s3?],url->[is_stored_on_s3?,url],post_process_file->[text?],new_empty->[file_empty],presigned_url->[is_stored_on_s3?,presigned_url],open->[is_stored_on_s3?,open]]] | The Asset class The error hash key for the file is the last file in the file. | Sorry for nitpicking - put large before medium (for consistency). |
@@ -48,7 +48,7 @@ urlpatterns = patterns(
name='pages.sunbird'),
url('^sunbird/', lambda r: perma_redirect(reverse('pages.sunbird'))),
- url('^shield-study-1/',
- TemplateView.as_view(template_name='pages/shield_study_1.html'),
+ url('^shield-study-2/',
+ TemplateView.as_view(templat... | [reverse,url,patterns,as_view,perma_redirect] | Get a list of all resources of a specific type. | I presume nothing will continue to link here? |
@@ -246,10 +246,13 @@ public class BlockDeletingService extends BackgroundService {
private final int priority;
private final KeyValueContainerData containerData;
+ private final long blockDeletionLimitPerInterval;
- BlockDeletingTask(ContainerData containerName, int priority) {
+ BlockDeletingTa... | [BlockDeletingService->[BlockDeletingTask->[deleteViaSchema2->[checkDataDir,ContainerBackgroundTaskResult],deleteViaSchema1->[addAll,checkDataDir,ContainerBackgroundTaskResult]],chooseContainerForBlockDeletion->[chooseContainerForBlockDeletion],ContainerBackgroundTaskResult->[addAll->[addAll]]]] | This method is called when a container has not been deleted. | Lets rename to numBlocksToDelete since this field gives us the number of blocks to delete for the specific container. |
@@ -2154,6 +2154,7 @@ uint32_t Stepper::block_phase_isr() {
if ( ENABLED(HAS_L64XX) // Always set direction for L64xx (Also enables the chips)
|| current_block->direction_bits != last_direction_bits
|| TERN(MIXING_EXTRUDER, false, stepper_extruder != last_moved_extruder)
+ || ENABLED(DU... | [No CFG could be retrieved] | Initialize the trapezoid generator from the current block. - - - - - - - - - - - - - - - - - -. | Most likely adding this is slowing down the moves enough to conceal the faster "jitter" moves in-between the direction changes. |
@@ -117,11 +117,10 @@ const (
defaultName = "pd"
defaultDataDir = "default.pd"
- defaultHost = "127.0.0.1"
- defaultPort = uint64(1234)
- defaultClientPort = uint64(2379)
- defaultPeerPort = uint64(2380)
- defaultHTTPPort = ui... | [genEmbedEtcdConfig->[Parse],setBalanceConfig->[adjust],Parse->[Parse],adjust->[adjust]] | Config for all the nodes. String parses the string argument list and stores the result in v. | Why not "127.0.0.1:9090"? |
@@ -242,6 +242,8 @@ public class BlockDataStreamOutput implements ByteBufferStreamOutput {
return ioException.get();
}
+
+
@Override
public void write(ByteBuffer b, int off, int len) throws IOException {
checkOpen();
| [BlockDataStreamOutput->[writeChunkToContainer->[setIoException],handleExecutionException->[getIoException,setIoException],cleanup->[cleanup],validateResponse->[getIoException],checkOpen->[getIoException],watchForCommit->[getIoException],close->[handleFlush],handleFlush->[updateFlushLength,executePutBlock,watchForCommi... | Writes a chunk of data to the underlying stream. | Please remove these added empty lines. Also, please revert other similar whitespace changes. |
@@ -35,9 +35,11 @@ func dummyChunk(now model.Time) Chunk {
func dummyChunkForEncoding(now model.Time, metric labels.Labels, enc encoding.Encoding, samples int) Chunk {
c, _ := encoding.NewForEncoding(enc)
+ chunkStart := now.Add(-time.Hour)
+
for i := 0; i < samples; i++ {
t := time.Duration(i) * 15 * time.Se... | [f,Now,Duration,Encode,LabelsToMetric,Add,StopTimer,Cause,ExternalKey,Time,MergeSampleSets,Equal,NewForEncoding,Sort,NoError,Encoded,Samples,Fingerprint,Sprintf,StartTimer,Decode,Background,Run,ResetTimer] | chunk import imports chunk by name and returns chunk object. TestChunkCodec tests that a Chunk is not nil and that it is not nil. | We pick now in input and then we manipulate it here. It's a bit hidden this manipulation. I would suggest to: 1. Rename the input `now` in `chunkStart` 2. Remove this line `chunkStart := now.Add(-time.Hour)` 3. In the places where you need a different start time, you can just call `dummyChunkForEncoding()` with the cor... |
@@ -60,6 +60,13 @@ public class SCMStorageConfig extends Storage {
}
}
+ public void setSCMHAFlag(boolean flag) {
+ if (!isSCMHAEnabled()) {
+ Preconditions.checkNotNull(flag);
+ getStorageInfo().setProperty(SCM_HA, Boolean.toString(flag));
+ }
+ }
+
/**
* Retrieves the SCM ID from th... | [SCMStorageConfig->[getNodeProperties->[getScmId],checkPrimarySCMIdInitialized->[getPrimaryScmNodeId]]] | This method is used to set the SCM ID. | No need of null check here. |
@@ -696,6 +696,11 @@ $parameters = array();
$reshook = $hookmanager->executeHooks('printFieldListWhere', $parameters); // Note that $action and $object may have been modified by hook
$sql .= $hookmanager->resPrint;
+// Add HAVING from hooks
+$parameters = array();
+$reshook = $hookmanager->executeHooks('printFieldL... | [fetch,selectMassAction,form_multicurrency_rate,getSalesRepresentatives,formconfirm,select_country,fetch_object,selectInputReason,jdate,selectShippingMethod,form_availability,select_all_categories,order,getDocumentsLink,select_conditions_paiements,select_salesrepresentatives,classifyBilled,getNomUrl,rollback,select_dol... | Search for a list of fields that are on a given date range. Get the number of proposals in the system. | Are you sure it works on PGSQL ? |
@@ -321,8 +321,7 @@ func (s *service) Start() error {
}
mgr := mgrs[0]
-
- s.connect(mgr.URI, privkey, mgr.PublicKey, mgr.ID)
+ s.connectFeedManager(mgr, privkey)
return nil
})
| [connect->[SyncNodeInfo,Close],CreateJobProposal->[CreateJobProposal],CountManagers->[CountManagers],Start->[ListManagers],GetManager->[GetManager],ListManagers->[ListManagers],ApproveJobProposal->[ApproveJobProposal,GetJobProposal],UpdateJobProposalSpec->[UpdateJobProposalSpec,GetJobProposal],RejectJobProposal->[GetJo... | Start initializes the service. | same thing here - I think we want the connection attempt to be scoped to the API request via its context |
@@ -2664,7 +2664,7 @@ namespace System.Tests
{
bool expected = !s_isWindows;
- Assert.Equal((expected || TimeZoneInfo.Local.Id.Equals("Utc", StringComparison.OrdinalIgnoreCase)), TimeZoneInfo.Local.HasIanaId);
+ Assert.Equal((expected || PlatformDetection.IsiOS || PlatformD... | [TimeZoneInfoTests->[ConvertTimeFromUtc->[ConvertTimeFromUtc],ConvertTime_DateTime_LocalToSystem->[ConvertTime],VerifyConvertToUtcException->[ConvertTimeToUtc],ConvertTimeFromToUtc_UnixOnly->[ConvertTimeToUtc,ConvertTimeFromUtc,Kind],GetSystemTimeZones->[GetSystemTimeZones],ConvertTimeBySystemTimeZoneIdTests->[ConvertT... | Checks if system time zone has IANA id. | That doesn't make sense to me. I'd assume that `!s_isWindows` is `true` thus `expected == true` and this condition would not need the change. |
@@ -47,7 +47,10 @@ TEST_TABLE_PREFIX = 'pytablesync'
# ------------------------------------------------------------------------------
-class StorageTableTest(TableTestCase):
+class StorageTableTest(AzureTestCase, TableTestCase):
+
+ def __init__(self, *args, **kwargs):
+ super(StorageTableTest, self).__i... | [StorageTableTest->[test_query_tables_with_marker->[_create_table,_delete_all_tables],test_create_table->[_get_table_reference],test_set_table_acl_with_empty_signed_identifier->[_create_table],test_delete_table_with_non_existing_table_fail_not_exist->[_get_table_reference],test_account_sas->[_create_table,_delete_table... | Get table reference. | You don't need this initi since you do nothing with it |
@@ -241,7 +241,7 @@ module Email
def try_to_encode(string, encoding)
encoded = string.encode("UTF-8", encoding)
- encoded.present? && encoded.valid_encoding? ? encoded : nil
+ !encoded.nil? && encoded.valid_encoding? ? encoded : nil
rescue Encoding::InvalidByteSequenceError,
Enc... | [Receiver->[add_other_addresses->[find_or_create_user],embedded_email_raw->[fix_charset],should_invite?->[reply_by_email_address_regex],create_reply->[post_action_for],process_forwarded_email->[parse_from_field,find_or_create_user]]] | Try to encode a string using the given encoding. If the string is not valid UTF -. | `encoded.present?` can crash with "ArgumentError: invalid byte sequence in UTF-8" |
@@ -51,7 +51,7 @@ frappe.views.GanttView = class GanttView extends frappe.views.ListView {
// title
var label;
if (meta.title_field) {
- label = $.format("{0} ({1})", [item[meta.title_field], item.name]);
+ label = $.format("{0} ({1}) - {2}%", [item[meta.title_field], item.name, item.progress]);
}... | [No CFG could be retrieved] | Setup default values for the calendar Displays a single . | If there is no `progress` field? |
@@ -138,6 +138,11 @@ public class DeleteAction implements OrganizationsWsAction {
qProfileFactory.delete(dbSession, profiles);
}
+ private void deleteQualityGates(DbSession dbSession, OrganizationDto organization) {
+ Collection<QualityGateDto> qualityGates = dbClient.qualityGateDao().selectAll(dbSession,... | [DeleteAction->[deleteQualityProfiles->[delete,selectOrderedByOrganizationUuid],deleteGroups->[commit,deleteByOrganization,getUuid],deletePermissions->[commit,deleteByOrganization,getUuid],preventDeletionOfDefaultOrganization->[checkArgument,equals],deleteOrganization->[commitAndIndexByLogins,deleteByOrganizationUuid,g... | Delete all quality profiles for an organization. | Here we should **not** remove the built-in quality gate isn't it ? |
@@ -26,7 +26,8 @@ def test_data():
with warnings.catch_warnings(record=True) as w:
raw = _test_raw_reader(read_raw_cnt, montage=None, input_fname=fname,
eog='auto', misc=['NA1', 'LEFT_EAR'])
- assert_true(all('meas date' in str(ww.message) for ww in w))
+ assert_true(... | [test_data->[all,catch_warnings,assert_equal,assert_true,str,len,_test_raw_reader,pick_types],run_tests_if_main,simplefilter,data_path,join] | Test reading raw cnt files. | does the auto mode work with our test file? in any case we should test setting n_bytes here and even test with the wrong number to see how it breaks. |
@@ -5,14 +5,16 @@ from __future__ import annotations
import logging
from dataclasses import dataclass
+from itertools import chain
from pants.backend.java.compile.javac_binary import JavacBinary
from pants.backend.java.target_types import JavaSources
from pants.core.util_rules.source_files import SourceFiles, ... | [compile_java_source->[CompileJavaSourceRequest,CompiledClassfiles]] | Creates a new object of type C with the given options. Compiles a list of Java source files for a given . | Note to reviewers: it looks like due to branch juggling I failed to remove this in #12283. I can split the removal into its own PR if desired, but it just boils down to this trivial deletion of an unused class |
@@ -64,13 +64,14 @@ class Draco(CMakePackage):
depends_on('superlu-dist@:5.99', when='@:7.6.99+superlu_dist')
conflicts('+cuda', when='@:7.6.99')
+ conflicts('+caliper', when='@:7.7.99')
# Fix python discovery.
patch('d710.patch', when='@7.1.0^python@3:')
patch('d710-python2.patch', when... | [Draco->[url_for_version->[format],check->[working_dir,ctest],cmake_args->[format,extend],depends_on,conflicts,version,patch,variant]] | Returns the url for a specific version of Draco. | Is `smpi.patch` used at all now? should we delete it from the repository? |
@@ -203,10 +203,9 @@ public class BasicOzoneClientAdapterImpl implements OzoneClientAdapter {
public OzoneFSOutputStream createFile(String key, boolean overWrite,
boolean recursive) throws IOException {
incrementCounter(Statistic.OBJECTS_CREATED);
- try {
- OzoneOutputStream ozoneOutputStream = b... | [BasicOzoneClientAdapterImpl->[makeQualified->[makeQualified],IteratorAdapter->[next->[next],hasNext->[hasNext]],createFile->[createFile,incrementCounter],getDelegationToken->[getDelegationToken],listStatus->[listStatus,makeQualified,incrementCounter],listKeys->[listKeys,incrementCounter],getFileStatus->[getFileStatus,... | Creates a new file in the bucket. | This stream is returned to the caller for writing. It cannot be closed in this method. |
@@ -59,6 +59,9 @@ import static io.airlift.testing.Closeables.closeAllRuntimeException;
import static io.prestosql.sql.ParsingUtil.createParsingOptions;
import static io.prestosql.sql.SqlFormatter.formatSql;
import static io.prestosql.transaction.TransactionBuilder.transaction;
+import static java.lang.Character.MAX... | [AbstractTestQueryFramework->[computeActual->[getSession,computeActual],assertQueryFails->[getSession,assertQueryFails],assertTableColumnNames->[computeActual],assertQueryOrdered->[assertQueryOrdered,getSession,assertQuery],assertUpdate->[assertUpdate,getSession,assertQuery],getQueryExplainer->[getNodeCount],assertQuer... | Creates an abstract class that implements the ITestQueryFramework interface. Initialize the H2 and SQL parsers. | can you reuse same closer for multiple methods? Are alrady registered entires cleared after call to `closer.close()`. |
@@ -28,6 +28,13 @@ public interface CounterConfigurationStorage {
*/
void store(String name, CounterConfiguration configuration);
+ /**
+ * Remove a counter configuration
+ *
+ * @param name the counter's name.
+ */
+ void remove(String name);
+
/**
* Validates if the {@link CounterC... | [No CFG could be retrieved] | Store the counter configuration. | We called `removeConfiguration` in the CounterConfigurationManager.java. maybe keep the name here as well? |
@@ -118,7 +118,7 @@ class ControlFlowGraph(object):
else:
return block_desc.find_var_recursive(str(var_name))
- def memory_optimize(self):
+ def memory_optimize(self, level=0):
def check_var_validity(block_desc, x, is_forward):
if str(x) == "@EMPTY@":
... | [get_cfgs->[ControlFlowGraph],memory_optimize->[check_var_validity->[],get_cfgs,memory_optimize],ControlFlowGraph->[_build_graph->[_add_connections],memory_optimize->[check_var_validity->[_has_var,_find_var],_update_graph,_build_graph,_dataflow_analyze,_has_var,check_var_validity,_find_var,_get_diff],_dataflow_analyze-... | Find a variable in the given block. finds missing variable in cache and adds it to pool. | The code style says that a function name should be a verb-subject phrase, like, optimize_memory, instead of memory_optimize. Also, it seems that we cannot optimize the memory; what we could is to optimize the usage of the memory. For this case, does it mean `reuse_memory` and should we rename `level` into `reuse_tensor... |
@@ -27,3 +27,8 @@ def channel_manager_abi():
@pytest.fixture(scope='session')
def netting_channel_abi():
return NETTING_CHANNEL_ABI
+
+
+@pytest.fixture(scope='session')
+def decoder_test_abi():
+ return DECODER_TESTER_ABI
| [fixture] | Returns the ABI of the channel. | also this fixture does not seem to be in use, so maybe just get rid of it :) |
@@ -879,11 +879,15 @@ class ReviewBase(object):
self.set_files(amo.STATUS_DISABLED, self.files,
hide_disabled_file=True)
- # Unset needs_human_review on the latest version - it's the only
- # version we can be certain that the reviewer looked at.
if self.human_r... | [ReviewUnlisted->[process_public->[set_files,sign_files,notify_email,log_action],block_multiple_versions->[set_files,log_action],confirm_multiple_versions->[log_action]],ReviewHelper->[set_data->[set_data]],ReviewerQueueTable->[render_addon_name->[increment_item]],ViewUnlistedAllListTable->[render_authors->[safe_substi... | Process a single node in the sandbox. | This isn't related to this patch, but shouldn't we also reset the `needs_human_review_by_mad` (reviewerflags)? |
@@ -557,6 +557,12 @@ class DoOperation(Operation):
self.execution_context.delayed_applications.append(
(self, delayed_application))
+ def finalize_bundle(self):
+ self.dofn_receiver.finalize()
+
+ def needs_finalization(self):
+ return self.dofn_receiver.bundle_finalizer_param.has_callba... | [SimpleMapTaskExecutor->[execute->[start,finish,create_operation]],ReadOperation->[start->[output]],SingletonConsumerSet->[try_split->[try_split],receive->[update_counters_finish,update_counters_start],current_element_progress->[current_element_progress]],Operation->[start->[setup],reset->[reset],setup->[create],output... | Process an object. | Be sure to clear/reset the callbacks list in start, in case this operation is re-used for another bundle. |
@@ -35,6 +35,10 @@ KeyVaultPreparer = functools.partial(
# without keys/get, a CryptographyClient created with a key ID performs all ops remotely
NO_GET = Permissions(keys=[p.value for p in KeyPermissions if p.value != "get"])
+def suffixed_test_name(testcase_func, param_num, param):
+ suffix = "mhsm" if param.k... | [CryptoClientTests->[test_encrypt_local_from_jwk->[_create_rsa_key,create_key_client,create_crypto_client],test_rsa_verify_local->[_create_rsa_key,create_key_client,create_crypto_client],test_sign_and_verify->[_import_test_key,create_key_client,create_crypto_client],_import_test_key->[_to_bytes,_validate_rsa_key_bundle... | Initialize the object with a default value for match_body and custom_request_matchers. | Nitpickin: you don't need to assign this here; it's assigned in both conditional branches. |
@@ -2593,7 +2593,7 @@ func rulesHash(v interface{}) int {
if v, ok := m["filter"].([]interface{}); ok && len(v) > 0 && v[0] != nil {
buf.WriteString(fmt.Sprintf("%d-", replicationRuleFilterHash(v[0])))
- if v, ok := m["delete_marker_replication_status"]; ok && v.(string) == s3.DeleteMarkerReplicationStatusEnabl... | [PartitionHostname,IgnoreAws,GetBucketReplication,SetURI,GetBucketLogging,HasPrefix,GetBucketLocation,Int64Value,DeleteBucketReplication,New,Len,SetId,S3KeyValueTags,MustCompile,Bool,HasSuffix,GetBucketEncryption,Time,ErrCodeEquals,IgnoreConfig,TimeValue,GetBucketAccelerateConfiguration,GetBucketLifecycleConfiguration,... | rulesHash returns a hashcode for a given object. replicationRuleFilterHash returns the hash of the given key in the given map. | should this stay as `delete_marker_replication_status` to match resource's schema? |
@@ -3077,8 +3077,9 @@ crt_hdlr_iv_update(crt_rpc_t *rpc_req)
* Check here for change in version prior to getting
* next
*/
- grp_ver_current = ivns_internal->cii_grp_priv->
- gp_membs_ver;
+ D_RWLOCK_RDLOCK(&ivns_internal->cii_grp_priv->gp_rwlock);
+ grp_ver_current = ivns_internal->cii_grp... | [No CFG could be retrieved] | Get the next from the group This function is called when the group version of the group is changed. | (style) line over 80 characters |
@@ -464,6 +464,12 @@ const EXPERIMENTS = [
spec: 'https://github.com/ampproject/amphtml/issues/22718',
cleanupIssue: 'https://github.com/ampproject/amphtml/issues/22749',
},
+ {
+ id: 'untrusted-xhr-interception',
+ name: 'allow untrusted xhr interception',
+ spec: 'N/A',
+ cleanupIssue: 'N/A'... | [No CFG could be retrieved] | A list of all possible AMP elements that can be built. Builds one row of the experiments table. | `'Enable "xhrInterceptor" capability for untrusted viewers. For development use only.'` |
@@ -321,9 +321,10 @@ public class SchemaKTable<K> extends SchemaKStream<K> {
public <KRightT> SchemaKTable<K> foreignKeyInnerJoin(
final SchemaKTable<KRightT> schemaKTable,
- final ColumnName leftJoinColumnName,
+ final Optional<ColumnName> leftJoinColumnName,
final Stacker contextStacker,
... | [SchemaKTable->[leftJoin->[getSourceTableStep],foreignKeyLeftJoin->[getSourceTableStep],innerJoin->[getSourceTableStep],foreignKeyInnerJoin->[getSourceTableStep],outerJoin->[getSourceTableStep]]] | foreign key inner join. | nit: move the new param as the third param? Ditto below. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.