patch stringlengths 18 160k | callgraph stringlengths 4 179k | summary stringlengths 4 947 | msg stringlengths 6 3.42k |
|---|---|---|---|
@@ -223,7 +223,7 @@ public final class DecimalCasts
public static Slice bigintToLongDecimal(long value, long precision, long scale, BigInteger tenToScale)
{
try {
- Slice decimal = multiply(unscaledDecimal(value), unscaledDecimal(tenToScale));
+ Slice decimal = multiply(unscaled... | [DecimalCasts->[realToLongDecimal->[realToLongDecimal],doubleToLongDecimal->[doubleToLongDecimal],shortDecimalToReal->[shortDecimalToReal],longDecimalToDouble->[longDecimalToDouble],longDecimalToReal->[longDecimalToReal],doubleToShortDecimal->[doubleToShortDecimal],realToShortDecimal->[realToShortDecimal]]] | Converts a BIGINT to DECIMAL. | why not `multiply(tenToScale, value)`? |
@@ -19,13 +19,14 @@
*/
package org.sonar.api.component;
-import org.sonar.api.server.ServerSide;
-
import javax.annotation.CheckForNull;
+import org.sonar.api.server.ServerSide;
/**
* @since 3.6
+ * @deprecated since 5.6
*/
+@Deprecated
@ServerSide
public interface RubyComponentService {
| [No CFG could be retrieved] | Find a component by its key. | contrary to what I told you before, I think this class should not be deprecated. We encourage people to smoothly replace Ruby on Rails by JS but in the current state RoR is not deprecated yet. |
@@ -64,11 +64,11 @@ class TimestampCombinerImpl(with_metaclass(ABCMeta, object)):
@abstractmethod
def assign_output_time(self, window, input_timestamp):
- pass
+ raise NotImplementedError
@abstractmethod
def combine(self, output_timestamp, other_output_timestamp):
- pass
+ raise NotImplement... | [TimestampCombinerImpl->[merge->[combine_all],combine_all->[combine]],DependsOnlyOnWindow->[merge->[assign_output_time]]] | Assign output_time to the window. | what would be the "else" after this change, and what would it imply when this happens? Shall we at least log something when fall into that situation? |
@@ -420,8 +420,10 @@ final class ClassConfigPropertiesUtil {
createWriteValue(methodCreator, configObject, field, setter, useFieldAccess, setterValue);
}
- configPropertyBuildItemCandidates
- .add(new ConfigPropertyBuildItemCandidate(field.name(), fullConfigName, fieldType)... | [ClassConfigPropertiesUtil->[populateConfigObject->[populateConfigObject]]] | Populates the typename property with the missing value. | Hmmm, and we are sure that nothing that `ConfigPropertyBuildItemCandidate` triggers will ever be needed by primitives? |
@@ -176,7 +176,7 @@ static void ctr64_inc(unsigned char *counter)
# define HWAES_xts_decrypt aes_p8_xts_decrypt
#endif
-#if !defined(OPENSSL_NO_ASM) && ( \
+#if defined(OPENSSL_CPUID_OBJ) && ( \
((defined(__i386) || defined(__i386__) || \
... | [No CFG could be retrieved] | Set the IV for the next call to the AES - CBC or AES - BCRYPT decrypts the incoming data using AES - XTS. | OPENSSL_CPUID_OBJ seems to come from configdata.pm (for libcrypto and provider.fips). Does that mean it is always set? |
@@ -11,9 +11,10 @@ class Librsb(AutotoolsPackage):
library for the Recursive Sparse Blocks format"""
homepage = "http://librsb.sourceforge.net/"
- url = "http://download.sourceforge.net/librsb/librsb-1.2.0.9.tar.gz"
+ url = "http://download.sourceforge.net/librsb/librsb-1.2.0.10.tar.gz"
... | [Librsb->[configure_args->[format],conflicts,depends_on,version]] | Configure the arguments for the object. | Generally it's OK not to tweak the URL when providing a new version, since spack just parses the URL as a "template" rather than using it directly. |
@@ -210,6 +210,17 @@ def message_about_scripts_not_on_PATH(scripts):
else:
msg_lines.append(last_line_fmt.format("these directories"))
+ # Add a note if any directory starts with ~
+ warn_for_tilde = any([
+ i[0] == "~" for i in os.environ.get("PATH", "").split(os.pathsep) if i
+ ])
+ ... | [_raise_for_invalid_entrypoint->[MissingCallableSuffix],install_unpacked_wheel->[record_installed->[normpath],clobber->[record_installed],open_for_csv,root_is_purelib,message_about_scripts_not_on_PATH,sorted_outrows,clobber,get_entrypoints,PipScriptMaker,get_csv_rows_for_installed],Wheel->[get_formatted_file_tags->[for... | Determines if any scripts are not on PATH and format a warning. Returns a formatted multiline message of the last n - tuples in the CSV file. | You can drop the list: ``` warn_for_tilde = any( i[0] == "~" for i in os.environ.get("PATH", "").split(os.pathsep) if i ) |
@@ -92,4 +92,11 @@ public abstract class ManagementLink implements ExtensionPoint, Action {
public static ExtensionList<ManagementLink> all() {
return Jenkins.getInstance().getExtensionList(ManagementLink.class);
}
+
+ /**
+ * @return permission required for user to access this management link... | [ManagementLink->[all->[getExtensionList],createList]] | Get all management links. | Missing `@since`. (Elsewhere as well.) |
@@ -647,7 +647,7 @@ export class AmpLightboxViewer extends AMP.BaseElement {
// TODO (cathyxz): make this generalizable to more than just images
enter_(sourceImage) {
const anim = new Animation(this.element);
- const dur = 500;
+ let dur = 1000;
let transLayer = null;
return this.vsync_.measu... | [No CFG could be retrieved] | Opens the internal carousel slide and updates the description box and updates image viewer if the element is Adds a clone of the image that is not part of the image viewer. | `dur` is too abbreviated. I'd just call it `duration` if that's what it represents. |
@@ -199,6 +199,7 @@ class MultiDomainBasicAuth(AuthBase):
# Add our new username and password to the request
req = HTTPBasicAuth(username or "", password or "")(resp.request)
+ req.register_hook("response", self.handle_401_again)
# Send our new request
new_resp = resp.conn... | [PipSession->[__init__->[MultiDomainBasicAuth,SafeFileCache,InsecureHTTPAdapter,LocalFSAdapter,user_agent]],_download_url->[resp_read,written_chunks],PipXmlrpcTransport->[__init__->[__init__]],_download_http_url->[_download_url,get],is_vcs_url->[_get_used_vcs_backend],unpack_http_url->[_copy_file],unpack_file_url->[is_... | Handle a 401 response from the server. | Minor naming nit: we're not actually handling the 401, and definitely not doing so "again". Maybe `warn_on_401`? |
@@ -50,6 +50,16 @@ type CircuitBreaker struct {
Expression string `json:"expression,omitempty"`
}
+// Buffering holds request/response buffering configuration/
+type Buffering struct {
+ Enabled bool `json:"enabled"`
+ MaxRequestBodyBytes int64 `json:"maxRequestBodyBytes,omitempty"`
+ MemRequestBo... | [CreateTLSConfig->[NewCertPool,Stat,ReadFile,Warnf,X509KeyPair,Errorf,AppendCertsFromPEM,LoadX509KeyPair],MarshalText->[String],String->[Sprintf],MatchConstraintWithAtLeastOneTag->[Glob],Set->[FieldsFunc,Split,Errorf,ParseFloat],EqualFold,Contains,New,ToLower,TrimSpace,Errorf,SplitN] | type is a struct that represents a specific configuration of a system. rate limiting configuration for a given frontend. | Can you delete the field `enabled`? Usually, in Trfik, defining an attribute in a structure allows activating the feature. |
@@ -200,7 +200,7 @@ function format_event_diaspora($ev) {
$ev['start'] , $bd_format)))
. '](' . App::get_baseurl() . '/localtime/?f=&time=' . urlencode(datetime_convert('UTC','UTC',$ev['start'])) . ")\n";
- if(! $ev['nofinish'])
+ if (! $ev['nofinish'])
$o .= t('Finishes:') . ' ' . '['
. (($ev['adjust'... | [bb2diaspora->[save_timestamp]] | Format an event in Diaspora format. | Standards: Please add braces to this condition. |
@@ -296,7 +296,7 @@ func (o *optimism2Estimator) refreshPrice() (t *time.Timer) {
return
}
-func (o *optimism2Estimator) OnNewLongestChain(_ context.Context, _ eth.Head) {}
+func (o *optimism2Estimator) OnNewLongestChain(ctx context.Context, head *eth.Head) {}
func (*optimism2Estimator) GetDynamicFee(_ uint64) ... | [GetLegacyGas->[New,IfStarted,Debugw,getGasPrice,calcGas],calcGas->[Errorw,EncodeTxGasLimit,New,Debugw,NewInt,String,IsInt64,Int64,getGasPrices],UnmarshalJSON->[Combine,ToInt,GetBytes,UnmarshalText],BumpDynamicFee->[New],BumpLegacyGas->[New],Start->[StartOnce,run],Close->[StopOnce],getGasPrice->[RUnlock,RLock],run->[St... | refreshPrice refreshes the gas price for all consensus transactions. | Does your editor automatically fill these for you? |
@@ -25,6 +25,7 @@ namespace Content.Server.GameObjects.Components.Items.Storage
[RegisterComponent]
public class StorageCounterComponent : Component, ISerializationHooks
{
+ // TODO Convert to EntityWhitelist
[DataField("countTag")]
private string? _countTag;
| [StorageCounterComponent->[HandleMessage->[HandleMessage]]] | Component that counts a single item in a storage. count - count - tag - container - contained - entities. | probably wont do this in this PR but leaving it here since it would make sense for StorageCounter to have an EntityWhitelist and not just do it based on tags |
@@ -16,6 +16,16 @@
package io.confluent.ksql.function.udf.json;
+import static com.fasterxml.jackson.core.JsonFactory.Feature.CANONICALIZE_FIELD_NAMES;
+import static com.fasterxml.jackson.core.JsonToken.END_ARRAY;
+import static com.fasterxml.jackson.core.JsonToken.START_ARRAY;
+import static com.fasterxml.jackso... | [ArrayContainsKudf->[jsonStringArrayContains->[matches]]] | Reads a single object from a KSQL - formatted object. This class returns an array of objects that contain the given key. | In case you're wondering, this changes are inline with 'GoogleStyle', which we're all supposed to be using, but probably aren't. (More to come on this). |
@@ -204,6 +204,8 @@ public class FnHarness {
LoadingCache<String, BeamFnApi.ProcessBundleDescriptor> processBundleDescriptors =
CacheBuilder.newBuilder()
+ .maximumSize(1000)
+ .expireAfterAccess(10, TimeUnit.MINUTES)
.build(
new CacheLoade... | [FnHarness->[main->[getApiServiceDescriptor,main]]] | Main entry point for the BeamFn API. This method is called by the SDK to handle a single instruction request. | Is this too large of a time interval? I'm assuming the SDK would ideally not wait ~10 min before starting the bundle, right? |
@@ -59,7 +59,7 @@ public class DbInputMetadataResolver extends BaseDbMetadataResolver implements I
List<InputQueryParam> inputParams = queryTemplate.getInputParams();
// No metadata when no input parameters
if (inputParams.size() == 0) {
- return typeBuilder.nullType().build();
+ return typeBui... | [DbInputMetadataResolver->[getInputMetadata->[size,getName,build,getStatement,getInputMetadataUsingStatementMetadata,getTypeLoader,getStaticInputMetadata,getInputParams,add,getTypeBuilder,parseQuery],getStatement->[prepareStatement,getMessage,orElseThrow,MetadataResolvingException,getSqlText],getInputMetadataUsingState... | Get input metadata. | for me this is NullType, because we should communicate that they can ignore the parameter (ie, leave it null). For me a parameter with "no type" (void) is not a valid metadata description. |
@@ -583,10 +583,10 @@ function notification_from_array(array $notification)
// So, we cannot have different subjects for notifications of the same thread.
// Before this we have the name of the replier on the subject rendering
// different subjects for messages on the same thread.
- if ($notification['type'] == P... | [notification->[t,withLang,get],notification_from_array->[t,withLang,get],notification_store_and_send->[getHeaders,setHeader,send,build,insert,newNotifyMail,getHostname,get,update,withItemLink,withPhoto]] | This function takes an array of notifications and returns a notification object. This function is used to create a notification for a user Notification - shared. | as already mentioned --> use `DI::notificationFactory()` instead |
@@ -178,6 +178,11 @@ public class Drools implements RulesEngine
{
return name;
}
+
+ private boolean isEqualityAssertBehavior ()
+ {
+ return getBoolean(equalityAssertBehavior);
+ }
}
| [Drools->[retractFact->[fireAllRules,warn,getFactHandle,retract,getSession],createSession->[getMessage,isStateless,getResourceAsStream,newInputStreamResource,IOException,toString,getKnowledgePackages,newKnowledgeBuilderConfiguration,hasErrors,fireAllRules,WorkingMemorySLF4JLogger,getResource,newStatefulKnowledgeSession... | Returns the name of the . | Rename method to match the system property change |
@@ -476,11 +476,13 @@ def dot(x, y, name=None):
import paddle.fluid as fluid
import numpy as np
- with fluid.dygraph.guard():
- x = fluid.dygraph.to_variable(np.random.uniform(0.1, 1, [10]).astype(np.float32))
- y = fluid.dygraph.to_variable(np.random.uniform(1, 3, [... | [cross->[cross],bmm->[bmm],matmul->[__check_input,matmul],norm->[frobenius_norm,vector_norm],histogram->[histogram]] | This operator calculates the inner product between two 1 - D Tensors. Missing node - count value. | no need to import fluid |
@@ -37,10 +37,12 @@ static OSSL_FUNC_deserializer_export_object_fn der2rsa_export_object;
struct der2rsa_ctx_st {
PROV_CTX *provctx;
+ int type;
+
struct pkcs8_encrypt_ctx_st sc;
};
-static void *der2rsa_newctx(void *provctx)
+static void *der2rsa_newctx_int(void *provctx)
{
struct der2rsa_ctx_... | [const->[OSSL_PARAM_utf8_string,OSSL_PARAM_octet_string],void->[OPENSSL_free,OPENSSL_zalloc,EVP_CIPHER_free,OPENSSL_clear_free],int->[ossl_prov_read_der,OSSL_PARAM_construct_utf8_string,OSSL_PARAM_construct_octet_string,EVP_CIPHER_free,EVP_PKEY_free,data_cb,OPENSSL_clear_free,EVP_PKEY_get1_RSA,PROV_LIBRARY_CONTEXT_OF,d... | Allocate a new der2rsa_ctx_st object if it is NULL. | I would have passed the type in here also.. but this is ok. |
@@ -34,7 +34,7 @@ import org.openjdk.jmh.runner.options.OptionsBuilder;
public abstract class AbstractBenchmarkAssertionTestCase extends AbstractMuleTestCase {
private static final String ENABLE_PERFORMANCE_TESTS_SYSTEM_PROPERTY = "enablePerformanceTests";
- private static final String NORM_ALLOCATION_RESULT_KEY... | [AbstractBenchmarkAssertionTestCase->[runAndAssertBenchmark->[runAndAssertBenchmark]]] | Returns the number of seconds that the test timeout should be used. | you removed the dot now... |
@@ -127,6 +127,14 @@ public class GitFlowGraphMonitor extends GitMonitoringService {
*/
@Override
void processGitConfigChanges() throws GitAPIException, IOException {
+ if (flowTemplateCatalog.isPresent() && (flowTemplateCatalog.get() instanceof ObservingFSFlowEdgeTemplateCatalog)) {
+ ObservingFSFlow... | [GitFlowGraphMonitor->[loadNodeFileWithOverrides->[getNodeConfigWithOverrides],addFlowEdge->[addFlowEdge],loadEdgeFileWithOverrides->[getEdgeConfigWithOverrides],addDataNode->[addDataNode]]] | Processes git changes in the order of the changes in the git repository. | shouldn't resetting this boolean variable be inside a lock? |
@@ -52,5 +52,6 @@ public interface IOddsCalculator {
void addOddsCalculatorListener(final OddsCalculatorListener listener);
+ // TODO: this method appears to never used.
void removeOddsCalculatorListener(final OddsCalculatorListener listener);
}
| [No CFG could be retrieved] | Add or remove OddsCalculatorListener. | Remove it then? |
@@ -81,12 +81,12 @@ namespace Dynamo.Wpf.ViewModels
/// notifications as those notifications are raised when the value is set on the
/// model.
/// </summary>
- public class RunSettingsViewModel : NotificationObject
+ public class RunSettingsViewModel : ViewModelBase
{
#region private... | [RunTypeItem->[RaisePropertyChanged,RunTypeToolTipManually,RunTypeToolTipPeriodicallyEnabled,Periodic,RunTypeToolTipPeriodicallyDisabled,Empty,Automatic,GetString,Manual,ToString,RunTypeToolTipAutomatically],RunSettingsViewModel->[CancelRun->[ExecuteCommand],ToggleRunTypeEnabled->[Enabled,RunType,First],Model_PropertyC... | NotificationObject for the given . PUBLIC CONSTRUCTORS This class represents a single object that represents a single object that represents a. | this is an API break. |
@@ -645,7 +645,7 @@ _%>
<span className="d-none d-md-inline" ><Translate contentKey="entity.action.back">Back</Translate></span>
</Button>
- <Button color="primary" id="save-entity" type="submit" disabled={isInvalid || updating}>
+ <Button color="pri... | [No CFG could be retrieved] | Renders a hidden input that allows to select a single entity and a multiple of its other entities Props for all other entity actions. | why is the invalid check removed? the idea was you cannot submit a form if it doesnt pass validation |
@@ -41,8 +41,11 @@ module GobiertoPeople
[name]
end
- def people
- self.class.filter_department_people(site.people, id).distinct
+ def people(params = {})
+ self.class.filter_department_people(
+ params.slice(:from_date, :to_date)
+ .merge(people_relation: site.people, ... | [Department->[people->[distinct],filter_department_people->[where],short_name->[gsub,locale],freeze,include,belongs_to,scope,validates,has_many,order],require_dependency] | Returns an array of attributes that can be used to generate a slug. | Align .reorder with .select on line 97. |
@@ -80,6 +80,7 @@ public class HoodieCreateHandle<T extends HoodieRecordPayload> extends HoodieIOH
String partitionPath, String fileId, Iterator<HoodieRecord<T>> recordIterator) {
this(config, commitTime, hoodieTable, partitionPath, fileId);
this.recordIterator = recordIterator;
+ this.useWriterSche... | [HoodieCreateHandle->[close->[close],write->[write],canWrite->[canWrite]]] | Checks if the given record can be written. | why do we have this flag? |
@@ -45,7 +45,6 @@ public class NewGameChooser extends JDialog {
setupListeners();
setWidgetActivation();
updateInfoPanel();
- refreshGameList();
}
private void createComponents() {
| [NewGameChooser->[refreshGameList->[getSelected,getNewGameChooserModel,selectGame],chooseGame->[NewGameChooser],setupListeners->[updateInfoPanel],selectAndReturn->[getSelected]]] | Creates the components of the GUI. | Note that on line 53, in the create components method, we have: `gameListModel = getNewGameChooserModel();` and in refreshGAmeList, we have: `gameListModel = getNewGameChooserModel();` These are both blocking calls that load all available maps, doubling the map load time. |
@@ -103,9 +103,7 @@ public abstract class AbstractAi extends AbstractBasePlayer implements ITripleAP
}
@Override
- public boolean confirmMoveHariKari() {
- return false;
- }
+ public void confirmMoveHariKari() {}
@Override
public Territory whereShouldRocketsAttack(
| [AbstractAi->[whatShouldBomberBomb->[getMatches,next,isEmpty,unitCanProduceUnitsAndCanBeDamaged],selectKamikazeSuicideAttacks->[getValue,size,getInt,getResourcesCopy,shuffle,put,getPlayerId,min,getKey,getHitPoints,next,entrySet,removeKey,getOrDefault,get,random,add,getSuicideAttackResources,keySet],pause->[sleep,getVal... | Checks if a given is a valid one. | Here the issue becomes very clear. From a readers perspective this looked like the Ai was denying HariKari in general. However if you think about it confirmation of some sort only makes sense for human players, the Ai is not going to be like "ok, right I didn't notice I would lose those units". So move this method to a... |
@@ -783,7 +783,7 @@ export function isAmpElement(element) {
/**
* Return a promise that resolve when an AMP element upgrade from HTMLElement
* to CustomElement
- * @param {!Element} element
+ * @param {?} element
* @return {!Promise<!AmpElement>}
*/
export function whenUpgradedToCustomElement(element) {
| [No CFG could be retrieved] | Determines if the given element is an AMP element. Replace for Element. requestFullscreen method. | Why does this change? |
@@ -83,10 +83,14 @@ class ConfigFileLoader
*/
private $staticDir;
- public function __construct(string $basePath)
+ public function __construct(string $basePath, array $server)
{
- $this->baseDir = $basePath;
- $this->configDir = $this->baseDir . DIRECTORY_SEPARATOR . self::CONFIG_DIR;
+ $this->baseDir = ... | [ConfigFileLoader->[loadCoreConfig->[getConfigFiles,loadINIConfigFile,loadConfigFile,load],loadStaticConfig->[loadConfigFile,loadINIConfigFile],loadEnvConfig->[loadConfigFile],setupCache->[loadCoreConfig,loadStaticConfig,get,loadLegacyConfig,loadEnvConfig,set,load],loadAddonConfig->[loadConfigFile]]] | This method is called by the constructor of the class. | I feel like we should only provide the config dir, and pull the path determination logic out of this particular class |
@@ -2903,8 +2903,11 @@ int ssl3_get_cert_verify(SSL *s)
* If key is GOST and n is exactly 64, it is bare signature without
* length field
*/
- if (n == 64 && pkey->type == NID_id_GostR3410_2001) {
- len = 64;
+ if (n == 64 && (pkey->type == NID_id_GostR3410_2001 ||
+ pk... | [No CFG could be retrieved] | The function that gets the n - th certificate from the server. check_peer_sigalg - check if peer signature algorithm is supported. | Please check this workaround is actually needed for GOST12 |
@@ -34,6 +34,8 @@ namespace Dynamo.Nodes
public ConnectorPinView()
{
+ Resources.MergedDictionaries.Add(SharedDictionaryManager.DynamoConvertersDictionary);
+
InitializeComponent();
ViewModel = null;
| [ConnectorPinView->[PrepareZIndex->[NodeStartZIndex,parent,ZIndex],OnPinViewLoaded->[DataContext],OnPinMouseDown->[RightShift,Remove,AddUnique,IsSelected,IsKeyDown,ClearSelection,Model,LeftShift],OnPreviewMouseLeftButtonDown->[BringToFront],BringToFront->[MaxValue,ZIndex,PrepareZIndex,StaticZIndex],OnPinViewMouseLeave-... | Creates a connector - based view that can be used to provide a single node in a workspace This method is called to prepare the ZIndex for the content. | Hi @SHKnudsen Can you remind me what is this for? I thought at some point we conclude this does not work? Or maybe I misunderstood |
@@ -371,6 +371,16 @@ func (d *Distributor) Collect(ch chan<- prometheus.Metric) {
ch <- d.receivedSamples
d.sendDuration.Collect(ch)
d.cfg.Ring.Collect(ch)
+ d.ingesterAppends.Collect(ch)
+ d.ingesterAppendFailures.Collect(ch)
+ d.ingesterQueries.Collect(ch)
+ d.ingesterQueryFailures.Collect(ch)
+
+ ch <- prometh... | [sendSamples->[getClientFor,Append],Collect->[Collect],Describe->[Describe],Query->[Query,getClientFor],LabelValuesForLabelName->[getClientFor,LabelValuesForLabelName]] | Collect implements the Collector interface. | This metric might strengthen the argument of moving the heartbeat timeout into the ring completely. We have the total ingesters metric in the ring, but the one about alive ones in the distributor, bleh. Just something to keep in mind though, fine for now. |
@@ -135,11 +135,16 @@ class Jetpack_Sync_Actions {
return $rpc->getResponse();
}
+ static function get_user_ids_for_initial_sync() {
+ global $wpdb;
+ return $wpdb->get_col( "SELECT user_id FROM $wpdb->usermeta WHERE meta_key = '{$wpdb->base_prefix}user_level' AND meta_value > 0" );
+ }
+
static function sch... | [Jetpack_Sync_Actions->[do_full_sync->[start],send_db_checksum->[do_sync,send_checksum],send_data->[get_jetpack_error,query,getResponse],do_cron_sync->[do_sync,get_next_sync_time]]] | This function is used to send data to the server. | I think we need to do set a limit here and chunk process it in batches. Like we currently do for users full sync. |
@@ -15,7 +15,12 @@ module Idv
session_uuid = flow_session[:document_capture_session_uuid]
document_capture_session = DocumentCaptureSession.find_by(uuid: session_uuid)
return { plain: 'Unauthorized', status: :unauthorized } unless document_capture_session
+ return { plain: 'Cancelled', status:... | [CaptureDocStatusController->[document_capture_session_poll_render_result->[load_doc_auth_async_result,load_result,success?,blank?,find_by],show->[render],before_action,respond_to]] | document_capture_session_poll_render_result returns the next document_. | One thing I notice is that after the user cancels, this response will cause the page's form to submit, leaving them at the `link_sent` step with the error notice. But since we're not considering cancellation on the step itself, we'll continue to poll, causing the page to reload over and over until the user presumably c... |
@@ -172,11 +172,7 @@ func (storage *Storage) UpdateAddressStorage(batch ethdb.Batch, addr string, exp
if data, err := storage.db.Get([]byte(key)); err == nil {
err = rlp.DecodeBytes(data, &address)
if err == nil {
- if explorerTransaction.Type == Received {
- address.Balance.Add(address.Balance, tx.Value()... | [Init->[RemoveAll,Msg,Error,NewLDBDatabase,Err,Logger],UpdateAddress->[UpdateAddressStorage],Dump->[Write,Itoa,Msg,Error,Warn,EncodeToBytes,NewBatch,Uint64,Transactions,UpdateAddress,UpdateTXStorage,To,Info,Err,Logger,GetLogger,Put],DumpCommittee->[NewBatch,Write,EncodeToBytes,Put],UpdateAddressStorage->[Value,Msg,Erro... | UpdateAddressStorage updates the given batch with the given address and transaction. | why only add value now? |
@@ -37,7 +37,8 @@ public class AlertCondition {
public enum Type {
MESSAGE_COUNT,
- FIELD_VALUE
+ FIELD_VALUE,
+ FIELD_STRING_VALUE
}
private final String id;
| [AlertCondition->[buildBacklogDescription->[append,toString,StringBuilder],buildFieldValueDescription->[longValue,equals,append,StringBuilder,get,format,toString,doubleValue],getDescription->[longValue,RuntimeException,buildBacklogDescription,buildFieldValueDescription,append,get,toString,buildMessageCountDescription,S... | Creates an alert condition object from a summary response of an alert condition. Creates a new object from the given ACS System. | Should be `FIELD_CONTENT_VALUE` to be consistent with the actual name of the condition. |
@@ -32,6 +32,10 @@ def _cpp_info_to_dict(cpp_info):
doc["configs"] = configs_data
continue
+ if it == "_rootpath":
+ doc["rootpath"] = value
+ continue
+
if it.startswith("_") or not value:
continue
| [ActionRecorder->[recipe_fetched_from_cache->[_add_recipe_action,Action],recipe_downloaded->[_add_recipe_action,Action],package_fetched_from_cache->[Action,_add_package_action],recipe_install_error->[_add_recipe_action,Action],package_built->[Action,_add_package_action],package_downloaded->[Action,_add_package_action],... | Convert CPP info to a dictionary. | This hack is because the json of the action recorder now receives the "rootpath" and I made it private to control the propagation of the rootpath to the components when it is changed (in the setter), So I needed to "hack" it to not break. |
@@ -44,9 +44,14 @@ var _ = g.Describe("[sig-network][Feature:Router]", func() {
g.It("should set Forwarded headers appropriately", func() {
o.Expect(infra).NotTo(o.BeNil())
- if !(infra.Status.PlatformStatus.Type == configv1.AWSPlatformType ||
- infra.Status.PlatformStatus.Type == configv1.AzurePlatformTy... | [CurrentGinkgoTestDescription,By,WaitForRouterServiceIP,CoreV1,Expect,HaveOccurred,FixturePath,Delete,It,AdminConfigClient,Args,Poll,AdminKubeClient,GetPodLogs,Errorf,Skip,WaitForRouterInternalIP,Logf,KubeFramework,ConfigV1,BeNil,NewDeleteOptions,Execute,NewCLI,Failf,BeforeEach,Get,NotTo,Infrastructures,Pods,RunHostCmd... | Describe registers a function to run on the router AdminKubeClient implements OpenShift cli. | Isn't the logging line below still a nil deref? |
@@ -1134,15 +1134,8 @@ func (s *HybridConversationSource) notifyReactionUpdates(ctx context.Context, ui
func (s *HybridConversationSource) notifyEphemeralPurge(ctx context.Context, uid gregor1.UID, convID chat1.ConversationID, explodedMsgs []chat1.MessageUnboxed) {
s.Debug(ctx, "notifyEphemeralPurge: exploded: %d", ... | [PushUnboxed->[isContinuousPush,Acquire,Release],resolveHoles->[GetMessages],ReleaseConversationLock->[Release],Release->[key],Pull->[resolveHoles,Release,identifyTLF,Acquire,postProcessThread],GetMessagesWithRemotes->[Error,identifyTLF,Acquire,Release],GetMessages->[Error,identifyTLF,Acquire,Release],Error->[hasRealRe... | notifyEphemeralPurge notifies the chat engine that an ephemeral purge has been received. | Don't need `go` here. |
@@ -39,7 +39,8 @@ public class VertxHttpHotReplacementSetup implements HotReplacementSetup {
routingContext.next();
return;
}
- routingContext.vertx().executeBlocking(new Handler<Promise<Boolean>>() {
+ ConnectionBase connectionBase = (ConnectionBase) routingContext.requ... | [VertxHttpHotReplacementSetup->[handleHotReplacementRequest->[handle->[handle]]]] | This method is called when a hot replacement request is received. It will attempt to scan for. | This change shouldn't be needed anymore. |
@@ -42,10 +42,11 @@ public class HL7v2MessageCoder extends CustomCoder<HL7v2Message> {
private static final NullableCoder<String> STRING_CODER = NullableCoder.of(StringUtf8Coder.of());
private static final NullableCoder<Map<String, String>> MAP_CODER =
NullableCoder.of(MapCoder.of(STRING_CODER, STRING_CODE... | [HL7v2MessageCoder->[decode->[decode],of->[HL7v2MessageCoder],encode->[encode],of]] | Encode a HL7v2 message into the given output stream. | Changing the encoding breaks pipeline update on Dataflow for streaming pipelines. |
@@ -411,9 +411,14 @@ public class JdbcIO {
@Override
public void validate(PCollection<T> input) {
- checkNotNull(getDataSourceConfiguration(), "dataSourceConfiguration");
- checkNotNull(getStatement(), "statement");
- checkNotNull(getPreparedStatementSetter(), "preparedStatementSetter");
+ ... | [JdbcIO->[Read->[withStatementPrepator->[build],ReadFn->[setup->[getConnection],processElement->[setParameters,mapRow,getStatementPreparator]],withRowMapper->[build],withCoder->[build],validate->[getQuery,getRowMapper,getCoder,getDataSourceConfiguration],withQuery->[build],populateDisplayData->[getQuery,populateDisplay... | Checks if the current configuration is not a sequence of tokens. | What about these others? They should also be extended the same way right? |
@@ -172,7 +172,7 @@ class Arguments(object):
@staticmethod
def hyperopt_options(parser: argparse.ArgumentParser) -> None:
"""
- Parses given arguments for Hyperopt scripts.
+ Parses given arguments foér Hyperopt scripts.
"""
parser.add_argument(
'-e', '--e... | [Arguments->[_build_subcommands->[optimizer_shared_options,backtesting_options,hyperopt_options],get_parsed_arg->[_load_args],parse_args->[parse_args]]] | Parses given arguments for hyperopt scripts. | shouldn't it be `for` |
@@ -163,14 +163,8 @@ public enum ClientSetting implements GameSetting {
* </p>
*/
public static void initialize() {
- setPreferences(Preferences.userNodeForPackage(ClientSetting.class));
- }
-
- @VisibleForTesting
- static void setPreferences(final Preferences preferences) {
- checkNotNull(preferenc... | [saveAndFlush->[save,flush],resetAndFlush->[saveAndFlush],flush->[flush]] | Initialize the preferences. | this method was moved lower |
@@ -1109,8 +1109,8 @@ type blockWriter struct {
mu sync.Mutex
}
-func (s *objBlockAPIServer) newBlockWriter(block *pfsclient.Block) (*blockWriter, error) {
- w, err := s.objClient.Writer(s.blockPath(block))
+func (s *objBlockAPIServer) newBlockWriter(ctx context.Context, block *pfsclient.Block) (*blockWriter,... | [splitKey->[getGeneration],readObjectIndex->[isNotFoundErr,readProto,setObjectIndex],GetTag->[GetObject],objectInfoGetter->[isNotFoundErr,readProto],Write->[Write],blockPath->[blockDir],InspectTag->[InspectObject],compact->[isNotFoundErr],indexPath->[indexDir],Read->[Read,Write],DeleteObjects->[InspectObject,isNotFound... | newBlockWriter creates a new blockWriter. | So it looks like all the changes in this file are moving around the ctx parameter. Are these actual semantic changes or are they refactors? |
@@ -21,6 +21,7 @@ use Sulu\Bundle\AdminBundle\Admin\View\ViewProviderInterface;
*/
abstract class Admin implements ViewProviderInterface, NavigationProviderInterface
{
+ const SULU_ADMIN_SECURITY_SYSTEM = 'Sulu';
const SETTINGS_NAVIGATION_ITEM = 'sulu_admin.settings';
public static function getPriori... | [Admin->[getSecurityContextsWithPlaceholder->[getSecurityContexts]]] | Returns the priority of a . | hope this is okay for you - i would like to use a constant that describes the meaning of the value in the `Admin` classes. also, the way i understand security systems, we should use a dedicated security system for admin related roles unfortunately we cannot change the name to something like `Sulu Admin` because we ne... |
@@ -223,7 +223,7 @@ autocast_flaky_numerics = (
# The tests for the following quantized models are flaky possibly due to inconsistent
# rounding errors in different platforms. For this reason the input/output consistency
# tests under test_quantized_classification_model will be skipped for the following models.
-qua... | [test_detection_model->[check_out->[_get_expected_file,_assert_expected],_check_jit_scriptable,check_out,_check_input_backprop],test_googlenet_eval->[_check_jit_scriptable,_check_input_backprop],test_quantized_classification_model->[_check_jit_scriptable,_assert_expected,_check_fx_compatible],test_fasterrcnn_switch_dev... | Check if the module s results are compatible with the expected model. prop - computes the model s gradient. | Maybe add a `# FIXME` with a ref to the issue for resnet? |
@@ -167,6 +167,10 @@ public class CompactionCompleteFileOperationAction implements CompactionComplete
compactionState.setProp(DUPLICATE_COUNT_TOTAL + Long.toString(executionCount),
compactionState.getProp(DUPLICATE_COUNT_TOTAL, "null"));
}
+ if(state.getPropAsBoolean(ConfigurationKeys.... | [CompactionCompleteFileOperationAction->[getName->[getName]]] | This method is called when the compaction of a job has completed. This method is used to determine the number of records that are involved in the MR execution This method is called when a new file is written to the destination directory. | please consider using auto-formatting to clean the spaces between preserved keywords |
@@ -105,6 +105,16 @@ export class AmpStoryPanningMedia extends AMP.BaseElement {
StateProperty.PANNING_MEDIA_STATE,
(panningMediaState) => this.onPanningMediaStateChange_(panningMediaState)
);
+ // Mutation observer for distance attribute
+ const config = {attributes: true, attributeFilter: ['d... | [No CFG could be retrieved] | This method is called when the AMP layout is complete. It is called when the A Replies the promise for updating the transform of the element if it is part of the group. | Why is this not triggered with the `CURRENT_PAGE_ID` state? |
@@ -85,14 +85,14 @@ class IEModel:
print("Reading IR...")
self.net = ie_core.read_network(model_xml, model_bin)
self.net.batch_size = batch_size
- assert len(self.net.inputs.keys()) == 1, "One input is expected"
+ assert len(self.net.input_info.keys()) == 1, "One input is expect... | [preprocess_frame->[center_crop,adaptive_resize],ActionRecognitionSequential->[infer->[infer]],DummyDecoder->[async_infer->[_average],infer->[_average]],IEModel->[infer->[infer]]] | Initialize the object with the specified parameters. | While you're at it, could you also replace `len(self.net.input_info.keys())` with `len(self.net.input_info)`? |
@@ -358,7 +358,6 @@ public class CreatePortForwardingRuleCmd extends BaseAsyncCreateCmd implements P
setEntityId(result.getId());
setEntityUuid(result.getUuid());
} catch (NetworkRuleConflictException ex) {
- s_logger.info("Network rule conflict: ", ex);
s_logg... | [CreatePortForwardingRuleCmd->[getAccountId->[getAccountId],getVpcId->[getVpcId],create->[getId,getOpenFirewall,getUuid,getVmSecondaryIp],getNetworkId->[getIpAddressId],getIp->[getIp],execute->[getCommandName,getOpenFirewall],getDomainId->[getDomainId],getEntityOwnerId->[getId]]] | This method creates a new port forwarding rule. | What about using ` throw new ServerApiException(ApiErrorCode.NETWORK_RULE_CONFLICT_ERROR, ex);` instead of what we have here? |
@@ -857,9 +857,10 @@ static int32_t dt_control_gpx_apply_job_run(dt_job_t *job)
if(!res) continue;
/* only update image location if time is within gpx tack range */
- if(dt_gpx_get_location(gpx, ×tamp, &lon, &lat))
+ if(dt_gpx_get_location(gpx, ×tamp, &lon, &lat, &ele))
{
dt_imag... | [dt_control_move_images->[gtk_window_set_title,dt_ui_main_window,dt_control_generic_images_job_create,dt_conf_get_bool,dt_control_add_job,dt_collection_get_selected_count,gtk_dialog_run,GTK_WINDOW,gtk_message_dialog_new,gtk_file_chooser_set_select_multiple,gtk_file_chooser_dialog_new,GTK_FILE_CHOOSER,ngettext,dt_contro... | check if any of the specified images are in the job s image cache and if so return check if there is a lock on the image cache and if so update the location of the. | maybe use one function for all 3 values to avoid one locking step? Not sure if it's worth it. |
@@ -1866,7 +1866,7 @@ private static String getNonArrayClassPackageName(Class<?> clz) {
String name = clz.getName();
int index = name.lastIndexOf('.');
if (index >= 0) {
- return name.substring(0, index);
+ return name.substring(0, index).intern();
}
return ""; //$NON-NLS-1$
}
| [Class->[isAnnotation->[getModifiersImpl,isArray],getTypeName->[getName,isArray,getComponentType,toString],forNameAccessCheck->[run->[checkMemberAccess]],getSignature->[getName],getSuperclass->[getSuperclass],getResourceAsStream->[getClassLoaderImpl,getResourceAsStream,getModule],getNonArrayClassPackageName->[getName],... | Get the package name of the given class. | The substring call here will create a new String (all be it short lived) which will then be passed to the interning logic. In Java 8 the backing array will be shared between the substring and the new String, but in Java 9 and later the substring will have to copy the backing array as well as create the new String objec... |
@@ -478,9 +478,9 @@ describes.sandboxed('amp-ad-network-adsense-impl', {}, () => {
'^https://googleads\\.g\\.doubleclick\\.net/pagead/ads' +
'\\?client=ca-adsense&format=[0-9]+x[0-9]+&w=[0-9]+&h=[0-9]+' +
'&adk=[0-9]+&raru=1&bc=1&pv=1&vis=1&wgl=1' +
- '(&asnt=[0-9]+-[0-9]+)?(&d... | [No CFG could be retrieved] | 9. 2. 2. 4 - - - - - - - - - - - - - - - - - -. | You can remove this line entirely. This is only here because of a copy/paste error, I imagine. |
@@ -208,7 +208,8 @@ public class DagManager extends AbstractIdleService {
}
this.defaultQuota = ConfigUtils.getInt(config, USER_JOB_QUOTA_KEY, DEFAULT_USER_JOB_QUOTA);
-
+ TimeUnit jobStartTimeunit = TimeUnit.valueOf(ConfigUtils.getString(config, JOB_START_SLA_UNITS, ConfigurationKeys.FALLBACK_GOBBLIN_JO... | [DagManager->[DagManagerThread->[killJobIfOrphaned->[cancelDagNode],slaKillIfNeeded->[cancelDagNode],onFlowSuccess->[toString],cleanUp->[toString,hasRunningJobs,deleteJobState],onJobFinish->[submitNext],decrementQuotaUsageForUsers->[decrementQuotaUsage],initialize->[toString],getRunningJobsCounter->[toString],onFlowFai... | Initializes the DagQueue. create dag state store. | minor (oversight?): since snake_case is `TIME_UNIT`, camelCase should be `TimeUnit` (that is how you spelled it below) |
@@ -281,3 +281,7 @@ class JvmTarget(Target, Jarable):
@property
def services(self):
return self._services
+
+ @property
+ def is_thrift(self):
+ return False
| [JvmTarget->[resources->[isinstance],get_jar_dependencies->[collect_jar_deps->[isinstance,update],OrderedSet,walk],exports->[TargetDefinitionException,parse,append,get_target,format],subsystems->[super],has_resources->[len],traversable_dependency_specs->[global_plugin_dependency_specs,super],platform->[global_instance]... | Returns the list of services in the cluster. | I really don't like the `is_thrift` solution... it was deprecated for a reason, and should stay that way. And moreover, `JvmTarget` should not have awareness of other target types. |
@@ -92,8 +92,7 @@ export let WebKeyframesDef;
* iterationStart: (number|undefined),
* easing: (string|undefined),
* direction: (!WebAnimationTimingDirection|undefined),
- * fill: (!WebAnimationTimingFill|undefined),
- * ticker: (string|undefined)
+ * fill: (!WebAnimationTimingFill|undefined)
* }}
... | [No CFG could be retrieved] | Provides a mixer for the module. Create an object with the name of the condition that can be applied to a target element or. | nit: add trailing comma |
@@ -86,7 +86,7 @@ public class TrashAction implements StreamProcessorTopology {
@Override
protected void compute(CoreSession session, List<String> ids, Map<String, Serializable> properties) {
- Boolean trashValue = (Boolean) properties.get(PARAM_NAME);
+ boolean trashValue = (b... | [TrashAction->[TrashComputation->[fireEvent->[fireEvent]]]] | Compute the missing proxy. | In a case where `properties.get(PARAM_NAME)` returns null the code will fail at line `90` and before this cleaning it failed on `if (trashValue)`. I think in a cleanup / format we not want to change the behaviour -> just keep the wrapper type. |
@@ -183,6 +183,7 @@ func (f *FailOverConnectionMode) publish(
}
if f.maxAttempts > 0 && fails == f.maxAttempts {
// max number of attempts reached
+ messagesDropped.Add(1)
break
}
| [PublishEvent->[PublishEvent],Close->[Close],publish->[connect],PublishEvents->[PublishEvents]] | publish sends events to the connection. | can be moved to line 193. Having this close to SignalFailed (plus put in another method) better clarifies these to belonging together. |
@@ -599,7 +599,7 @@ except ImportError:
assert_is_not = _assert_is_not
-def _sparse_block_diag(mats, format=None, dtype=None):
+def _sparse_block_diag(mats, fmt=None, dtype=None):
"""An implementation of scipy.sparse.block_diag since old versions of
scipy don't have it. Forms a sparse matrix by stack... | [savemat->[savemat],gzip_open->[__exit__->[__exit__],__enter__->[__enter__],__init__->[__init__]],_nanmean->[_divide_by_count,_replace_nan]] | Implementation of scipy. sparse. block_diag since old versions of scipy don t have it. | is this the signature of scipy? as this function is a backward compat fix. |
@@ -30,7 +30,8 @@ func (r *JSON) decodeJSON(text []byte) ([]byte, common.MapStr) {
err := unmarshal(text, &jsonFields)
if err != nil || jsonFields == nil {
if !r.cfg.IgnoreDecodingError {
- logp.Err("Error decoding JSON: %v", err)
+
+ logp.Err("Error decoding JSON: %v. Raw data: %s", err, string(text))
}
... | [Next->[AddFields,Next,decodeJSON],decodeJSON->[Sprintf,Err],Time,NewReader,Decode,TransformNumbers,WriteJSONKeys,NewDecoder,UseNumber] | decodeJSON decodes the given text into a slice of bytes and a common. MapStr. | Maybe we shouldn't put this raw message into the error logs. I'm worried about sensitive information being leaked inside of the Filebeat logs. |
@@ -185,8 +185,16 @@ class CI_Migration {
public function version($target_version)
{
// Note: We use strings, so that timestamp versions work on 32-bit systems
- $current_version = $this->_get_version();
- $target_version = (string) $target_version;
+ $current_version = $this->_get_version();
+
+ if ($th... | [CI_Migration->[latest->[version],current->[version]]] | Run migrations in a specific target version Migrates a missing migration method from one version to another. | ... now you have tabs here. And you still have them on lines 189, 192 |
@@ -1137,6 +1137,14 @@ public class VolumeApiServiceImpl extends ManagerBase implements VolumeApiServic
UserVmVO userVm = _userVmDao.findById(volume.getInstanceId());
StoragePoolVO storagePool = _storagePoolDao.findById(volume.getPoolId());
boolean isManaged = storagePool.isManaged();
+
+ ... | [VolumeApiServiceImpl->[handleVmWorkJob->[handleVmWorkJob],orchestrateExtractVolume->[orchestrateExtractVolume],attachVolumeToVmThroughJobQueue->[VmJobVolumeOutcome],createVolumeFromSnapshot->[createVolumeFromSnapshot],migrateVolumeThroughJobQueue->[VmJobVolumeOutcome],detachVolumeFromVmThroughJobQueue->[VmJobVolumeOut... | orchestrateResizeVolume - orchestrates resize of a volume. Resizes the volume. get resize volume result. | Are you using this variable? |
@@ -223,8 +223,8 @@
alt = YoastSEO.app.scoreFormatter.getSEOScoreText( cssClass );
$( '.yst-traffic-light' )
- .attr( 'class', 'yst-traffic-light ' + cssClass )
- .attr( 'alt', alt );
+ .attr( 'class', 'yst-traffic-light ' + cssClass )
+ .attr( 'alt', alt );
};
/**
| [No CFG could be retrieved] | Adds the input change cut and paste event to tinyMCE. Updates the keyword tab with new content. | Why not: `.addClass( cssClass )` |
@@ -1,3 +1,5 @@
+using System.Linq;
+
using Dynamo.Applications;
#region
| [DynamoRevit->[OnApplicationViewActivated->[HandleRevitViewActivated],RevitDynamoModel->[GetRevitContext,Start,Location,Load,GetDirectoryName,Application,GetFullPath],OnApplicationDocumentClosed->[HandleApplicationDocumentClosed],GetRevitContext->[VersionName,Replace],OnApplicationDocumentClosing->[HandleApplicationDoc... | region Private methods DynamoRevit is the base class for DynamoRevit. It is the main. | It doesn't really matter, but you should probably fix this before merging. |
@@ -62,7 +62,16 @@ export function onDocumentFormSubmit_(e) {
user.assert(target, 'form target attribute is required: %s', form);
user.assert(target == '_blank' || target == '_top',
'form target=%s is invalid can only be _blank or _top: %s', target, form);
- const shouldValidate = !form.hasAttribute('nova... | [No CFG could be retrieved] | Check if the is valid. | When would it not be marked? |
@@ -110,6 +110,8 @@ class CollectionInput(graphene.InputObjectType):
description = graphene.String(description='Description of the collection.')
background_image = Upload(description='Background image file.')
seo = SeoInput(description='Search engine optimization fields.')
+ published_date = graphene.... | [ProductVariantUpdate->[Arguments->[ProductVariantInput]],VariantImageUnassign->[mutate->[VariantImageUnassign]],CollectionAddProducts->[mutate->[CollectionAddProducts]],CollectionCreate->[save->[save],Arguments->[CollectionCreateInput]],CategoryUpdate->[save->[save],Arguments->[CategoryInput]],ProductTypeUpdate->[Argu... | Creates a new category and saves it to the database. Save a object. | Shouldn't this be of the type `Date`? |
@@ -74,7 +74,8 @@ def _process_voucher_data_for_order(checkout_info: "CheckoutInfo") -> dict:
if voucher.usage_limit:
increase_voucher_usage(voucher)
if voucher.apply_once_per_customer:
- add_voucher_usage_by_customer(voucher, checkout_info.get_customer_email())
+ customer_email = cast(... | [_create_lines_for_order->[_create_line_for_order],complete_checkout->[_prepare_checkout,_create_order,_process_payment,_get_order_data],_prepare_order_data->[_process_voucher_data_for_order,_process_user_data_for_order,_create_lines_for_order,_process_shipping_data_for_order,_validate_gift_cards],_get_order_data->[_pr... | Fetch voucher data from checkout. nexus_checkout_data and return voucher data. | What if this checkout is anonymous and we add a promo code with `voucher.apply_once_per_customer=True` to this checkout? |
@@ -705,7 +705,12 @@ class RaidenAPI: # pragma: no unittest
# set_total_deposit calls approve
# token.approve(netcontract_address, addendum)
- channel_proxy.set_total_deposit(total_deposit=total_deposit, block_identifier=blockhash)
+ try:
+ channel_proxy.set_total_deposit(
... | [transfer_tasks_view->[flatten_transfer,get_transfer_from_task],RaidenAPI->[get_raiden_events_payment_history_with_timestamps->[event_filter_for_payments],get_pending_transfers->[transfer_tasks_view,get_channel],start_health_check_for->[start_health_check_for],get_raiden_events_payment_history->[get_raiden_events_payme... | Sets the total deposit in the channel with the given partner_address and the given total Returns a token network proxy channel proxy and deposit limit for the given token network. This method is called when a new token is deposited. | Could you change this to something like `Deposit failed: {e}`? I think `already done` and `no longer open` are not the only reasons the deposit may fail. |
@@ -1129,7 +1129,7 @@ class S3FetchStrategy(URLFetchStrategy):
parsed_url = url_util.parse(self.url)
if parsed_url.scheme != 's3':
- raise ValueError(
+ raise FetchError(
'S3FetchStrategy can only fetch from s3:// urls.')
tty.msg("Fetching %s" % self... | [SvnFetchStrategy->[_remove_untracked_files->[svn],fetch->[svn],reset->[svn,_remove_untracked_files],get_source_id->[svn]],for_package_version->[_from_merged_attrs,check_pkg_attributes,_extrapolate,_check_version_attributes,BundleFetchStrategy],from_list_url->[URLFetchStrategy],_extrapolate->[URLFetchStrategy],S3FetchS... | Fetches a from the given URL. | (question) Was this causing problems before? I would assume `fetch_strategy.from_url_scheme` would only return an `S3FetchStrategy` if this check would pass. In other words, it would be unexpected to run into this error; or am I wrong about that? |
@@ -492,6 +492,16 @@ app.get(['/examples/*', '/test/manual/*'], function(req, res, next) {
});
});
+// "fake" a4a creative.
+app.get('/extensions/amp-ad-network-fake-impl/0.1/data/fake_amp.json.html', function(req, res) {
+ var filePath = '/extensions/amp-ad-network-fake-impl/0.1/data/fake_amp.json';
+ fs.readF... | [No CFG could be retrieved] | AJAX - based AMP - API Get the file name of a node - js . | nit: you can remove this line, and do `res.send(metadata.creative)` |
@@ -138,6 +138,13 @@ public class J9NLS implements NLSConstants {
Vector defaultNLSFiles = (Vector) localeHashtable.get(DEFAULT_LOCALE);
StringBuffer buffer = new StringBuffer();
+ // Create the output directory if it doesnt exist
+ File outputDir = new File(workingDirectory + fileSeparator + "nls");
+ if (!... | [J9NLS->[generatePropertiesFiles->[dp],generateHeaderFile->[dp],compareOrder->[dp],HeaderBuffer->[appendMsg->[append,getAscii],equals->[toString,equals],append->[append],writeHeader->[append,getAscii],toString->[toString]],toHexString->[toString,append],failure->[failure,summarize],main->[J9NLS],differentFromCopyOnDisk... | Generate the properties files for the given locale. This method is called from the main method of the class. This method is used to generate a header file from a palm file and a header file endregion region region. | Does the nls directory always exist with the old usage of the tool? |
@@ -1471,8 +1471,12 @@ define([
executeCommand(skyAtmosphereCommand, scene, context, passState);
}
+ if (defined(sunComputeCommand)) {
+ sunComputeCommand.execute(scene.computeEngine);
+ }
+
if (sunVisible) {
- sunCommand.execute(context, passState);
... | [No CFG could be retrieved] | Find the framebuffer that should be drawn on the current view. Execute commands in the scene back to front in the frustum in the front to back order. | Why not only do this if `sunVisible` is true? |
@@ -129,7 +129,7 @@ public class CodeGenRunner {
String functionName = node.getName().getSuffix();
KsqlFunction ksqlFunction = functionRegistry.getFunction(functionName);
parameterMap.put(
- node.getName().getSuffix(),
+ node.getName().getSuffix() + "_" + functionCounter++,
... | [CodeGenRunner->[buildCodeGenFromParseTree->[getParameterInfo]]] | Visit a FunctionCall node. Find the function and add it to the parameter map. | It's important that the name generated by this Visitor match the name generated by SqlToJavaVisitor, which feels brittle to me. I think a better way of doing this might be to move building the parameter map into SqlToJavaVisitor so that it returns code and a spec of the expected parameters. What do you think? |
@@ -683,6 +683,7 @@ func convertVLabsKubernetesConfig(vlabs *vlabs.KubernetesConfig, api *Kubernetes
api.DNSServiceIP = vlabs.DNSServiceIP
api.ServiceCIDR = vlabs.ServiceCidr
api.NetworkPlugin = vlabs.NetworkPlugin
+ api.NetworkMode = vlabs.NetworkMode //TODO: why no networkPolicy?
api.ContainerRuntime = vlabs.... | [GetDefaultKubernetesVersion,NormalizeAzureRegion,GetSubnet,IsKubernetes,GetSupportedKubernetesVersion,GetSubnetIPv6,ValidateOrchestratorProfile,HasWindows,RationalizeReleaseAndVersion,IsDCOS] | convertVLabsKubernetesConfig converts a VLabs object into a Kubernetes object. This is a wrapper for the methods that are defined in the class description. | See the `setVlabsKubernetesDefaults` func that deals w/ back-compat validation. In fact given the order of func invocations in `convertVLabsOrchestratorProfile` adding a simple vlabs NetworkPolicy --> unversioned NetworkPolicy assignment wouldn't break anything, as the `setVlabsKubernetesDefaults` will overwrite them. ... |
@@ -27,3 +27,15 @@ AUGEAS_LENS_DIR = pkg_resources.resource_filename(
REWRITE_HTTPS_ARGS = [
"^", "https://%{SERVER_NAME}%{REQUEST_URI}", "[L,QSA,R=permanent]"]
"""Apache rewrite rule arguments used for redirections to https vhost"""
+
+
+HSTS_ARGS = ["always", "set", "Strict-Transport-Security",
+ "\"max-age... | [dict,resource_filename] | Apache rewrite rule arguments used for redirections to https vhost. | Is there any reason for this level of detail to be inside the plugins themselves? In the long run my thought for the "right" way to do HSTS enablement in interactive mode would be to start it off with a very short TTL, and gradually increase it if the admin has left the header in place. But freedom to implement that ki... |
@@ -166,8 +166,13 @@ public class UnclosedResourcesCheck extends SECheck {
}
private static boolean isWithinTryHeader(Tree syntaxNode) {
- final Tree parent = syntaxNode.parent();
- if (parent.is(Tree.Kind.VARIABLE)) {
+ Tree parent = syntaxNode;
+ while ((parent = parent.parent()) != null) {
+ ... | [UnclosedResourcesCheck->[reportIssue->[reportIssue],PreStatementVisitor->[closeResource->[wrappedValue],visitMethodInvocation->[WrappedValueFactory,name],visitNewClass->[WrappedValueFactory,isCloseable,isOpeningResource]],isOpeningResource->[needsClosing],WrappedValueFactory->[createSymbolicValue->[ResourceWrapperSymb... | Checks if a node is within a try header. | Please don't do assignement and comparison within the same expression. You can also avoid the break by testing nullness and kind in while condition and doing the assignement in the body of the while. |
@@ -218,7 +218,7 @@ public class MetricsContainerStepMapTest {
ArrayList<MonitoringInfo> actual = new ArrayList<MonitoringInfo>();
for (MonitoringInfo mi : testObject.getMonitoringInfos()) {
- actual.add(SimpleMonitoringInfoBuilder.clearTimestamp(mi));
+ actual.add(SimpleMonitoringInfoBuilder.init... | [MetricsContainerStepMapTest->[assertIterableSize->[assertThat,iterableWithSize],testDistributionCommittedUnsupportedInAttemptedAccumulatedMetricResults->[expect,build,expectMessage,asAttemptedOnlyMetricResults,update,queryMetrics,MetricsContainerStepMap,assertDistribution],testCounterCommittedUnsupportedInAttemptedAcc... | This method checks that the updateAll method is invoked for all elements in the base metric container This method checks that the metrics are in the same order as the ones in the metricResults Assert that all the counters distribution and gauge are available. | would you please rename this to "copyAndClearTimestamp" |
@@ -121,3 +121,4 @@ def emails_with_users_and_watches(subject,
locale = default_locale
yield _make_mail(locale, user, watch)
+
| [emails_with_users_and_watches->[_make_mail->[render_email],_make_mail],render_email->[_render]] | Generates emails for a list of users and watchers. | Please remove this extra newline |
@@ -87,6 +87,8 @@ class FunctionCallProvider
{
List<Expression> symbolReferences = toSymbolReferences(args, aliases);
if (isWindowFunction) {
+ verify(!distinct, "window does not support distinct");
+ verify(orderBy.isEmpty(), "window does not support order by");
... | [FunctionCallProvider->[toString->[toString],ExpectedWindowFunctionCall->[equals->[equals]]]] | Gets the expected value. | Why check distinct here? And why not other attributes? |
@@ -253,6 +253,12 @@ public class BeamBigQuerySqlDialect extends BigQuerySqlDialect {
writer.endFunCall(trimFrame);
}
+ private void unparseDateTimeLiteralWrapperFunction(
+ SqlWriter writer, SqlCall call, int leftPrec, int rightPrec) {
+ writer.literal("DATETIME");
+ writer.literal(call.operand(0... | [BeamBigQuerySqlDialect->[getCastSpec->[getCastSpec],unparseFunctionsUsingInterval->[unparseCall],unparseDateTimeLiteral->[unparseDateTimeLiteral],unparseCall->[unparseCall],BeamBigQuerySqlDialect]] | Unparse trim. | I would recommend using `replace` (replace `TIMESTAMP` with `DATETIME`) here instead of `substring`. I think that's more readable. |
@@ -12,11 +12,11 @@ if (!is_array($user_guid)) {
$user_guid = array($user_guid);
}
$group_guid = get_input('group_guid');
+$group = get_entity($group_guid);
if (sizeof($user_guid)) {
foreach ($user_guid as $u_id) {
$user = get_entity($u_id);
- $group = get_entity($group_guid);
if ($user && $group && (... | [getGUID,canEdit] | Invite users to join a group. | You can move the group checks outside, too. |
@@ -452,6 +452,18 @@ export function addPurifyHooks(purifier, diffing) {
});
allowedAttributesChanges.length = 0;
+ // Remove input type file if applicable. The purifier will actually
+ // not remove this attribute because of a Safari bug where removing it
+ // will result in not being able to add ... | [No CFG could be retrieved] | Updates the attribute value of a node and updates the on attribute if necessary. Stricter policy for unescaped templates e. g. triple mustache. | I don't quite follow. Let's chat when you have a minute? |
@@ -232,11 +232,11 @@ void Logger::log(LogLevel lev, const std::string &text)
const std::string thread_name = getThreadName();
const std::string label = getLevelLabel(lev);
+ const std::string timestamp = getTimestamp();
std::ostringstream os(std::ios_base::binary);
- os << getTimestamp() << ": " << label << "[... | [push_back->[push_back],open->[open],flush->[logRaw,log]] | This is a private method for debugging purposes. | This is a good design choice. We needed the formatting done at a later point in time since some future log outputs might have its own way of associating timestamps or severity levels. |
@@ -251,6 +251,14 @@ func (a *apiServer) getWorkerOptions(pipelineName string, pipelineVersion uint64
Name: client.PPSSpecCommitEnv,
Value: specCommitID,
})
+ workerEnv = append(workerEnv, v1.EnvVar{
+ Name: client.PProfPortEnv,
+ Value: fmt.Sprintf("%d", a.pprofPort),
+ })
+ workerEnv = append(workerEnv, v1... | [workerPodSpec->[getPachClient,GetBackendSecretVolumeAndMount,Background,Unmarshal,PullPolicy,GetSecretEnvVars,GetState,MustParse,AddRegistry],createWorkerRc->[Itoa,Create,workerPodSpec,CoreV1,ReplicationControllers,Services,FromInt],getWorkerOptions->[PipelineRcName,PrettyVersion]] | getWorkerOptions returns a workerOptions object for the given pipeline name and version. Pass along the namespace workerEnv volumes and volumesMount This function returns a workerOptions object that can be used to create a worker object. | Very minor nit, but it's probably better to use `strconv` for this, if for no other reason than to save an import. |
@@ -17,16 +17,9 @@
package monitoring
-import (
- "sync"
-)
+import "sync"
-var namespaces = struct {
- sync.Mutex
- m map[string]*Namespace
-}{
- m: make(map[string]*Namespace),
-}
+var namespaces = NewNamespaces()
// Namespace contains the name of the namespace and it's registry
type Namespace struct {
| [Lock,Unlock] | GetNamespace returns the namespace with the given name. | @jsoriano This code change as I also already had it change in this PR. Let me now if my implementation also looks good to you. |
@@ -50,7 +50,7 @@ setup(
license="Apache",
packages=find_packages(exclude=["*.tests", "*.tests.*", "tests.*", "tests"]),
install_requires=[
- "torch>1.3.1,<=1.5.0",
+ "torch>1.3.1,<1.5.1",
"jsonnet>=0.10.0 ; sys.platform != 'win32'",
"overrides==2.8.0",
"nltk",
| [find_packages,setup,intersection,read,exec,open] | Create a conditional requirement. The entry point for the n - grams - test. | What about `<1.6.0`? PyTorch "patch" version changes shouldn't be breaking. But maybe you think it's better to have them CI-tested anyway? |
@@ -78,9 +78,12 @@ public class ErrorMessageExceptionTypeRouter extends AbstractMappingMessageRoute
@ManagedOperation
public void setChannelMapping(String key, String channelName) {
super.setChannelMapping(key, channelName);
- Map<String, Class<?>> newClassNameMappings = new ConcurrentHashMap<>(this.classNameMa... | [ErrorMessageExceptionTypeRouter->[setChannelMapping->[setChannelMapping,resolveClassFromName],onInit->[onInit,populateClassNameMapping],replaceChannelMappings->[populateClassNameMapping,replaceChannelMappings],removeChannelMapping->[removeChannelMapping],setChannelMappings->[setChannelMappings]]] | This method is used to set the channel mapping. | Why do we really need to check here for `AC` ? The `initialized` flag should be enough: we don't go to load classes until `onInit()` if otherwise. Why should one worry about class loading if its not a bean yet ? |
@@ -700,11 +700,11 @@ def export_trials_data(args):
trial_records = []
for record in content:
if not isinstance(record['value'], (float, int)):
- formated_record = {**record['parameter'], **record['value'], **{'id': record['id']}}
+ ... | [check_rest->[get_config_filename],get_config->[get_config_filename],parse_ids->[update_experiment],set_monitor->[update_experiment,get_experiment_status,show_experiment_info],webui_url->[get_config_filename,get_config],update_experiment->[update_experiment,get_experiment_status,get_experiment_time],check_experiment_id... | export trial data to a file. | maybe we should use `json_tricks` instead of `json` in this file? |
@@ -31,7 +31,7 @@ namespace Microsoft.Xna.Framework.Input
PrimaryWindow.MouseState.X = x;
PrimaryWindow.MouseState.Y = y;
- var pt = Window.PointToScreen(new System.Drawing.Point(x, y));
+ var pt = _window.PointToScreen(new System.Drawing.Point(x, y));
... | [Mouse->[MouseState->[MouseState],PlatformSetPosition->[SetCursorPos]]] | PlatformSetPosition - Set cursor position. | Because `_window` is a static variable, this would cause problems with creating multiple instances of `Game`. Tho old code did already have problems with creating multiple instances of `Game` so this could be ignored... |
@@ -112,8 +112,8 @@ public class PrintPublisher implements Flow.Publisher<Collection<String>> {
return null;
}
- final Collection<Supplier<String>> formatted = formatter.format(records);
- final Collection<Supplier<String>> limited = new LimitIntervalCollection<>(
+ final Coll... | [PrintPublisher->[PrintSubscription->[close->[close],poll->[poll]],LimitIntervalCollection->[iterator->[next->[next],hasNext->[hasNext],iterator]]]] | Polls for a sequence of strings. | This is that sets the batch size? So if it is not set then it is `(Integer.MAX_VALUE) - numWritten` where `numWritten` is what has been processed up to this point? |
@@ -3,9 +3,9 @@
// See the LICENSE file in the project root for more information.
using System.Diagnostics;
-#if !NETSTANDARD2_0
+using System.Runtime.CompilerServices;
+
using Internal.Runtime.CompilerServices;
-#endif
namespace System
{
| [SpanHelpers->[IndexOf->[IndexOf],IndexOfAny->[IndexOf],LastIndexOfAny->[LastIndexOf],LastIndexOf->[LastIndexOf]]] | region Private methods This method is used to create a list of objects from a list of objects. | Interested about this: what can cause non-bitwise equatable when the size is less than pointer? |
@@ -151,7 +151,7 @@ class GroupsController < ApplicationController
unless next_file.nil?
@data[:filelink] = download_assignment_groups_path(
select_file_id: next_grouping.current_submission_used.submission_files.find_by(filename: 'COVER.pdf').id,
- show_in_browser: true )
+ show_in_br... | [GroupsController->[remove_member->[remove_member]]] | This action assigns a to the user. Renders a single node ID. | Layout/MultilineMethodCallBraceLayout: Closing method call brace must be on the line after the last argument when opening brace is on a separate line from the first argument. |
@@ -123,7 +123,7 @@ final class Futures {
recipient.cancel(false);
} else {
Throwable cause = completed.cause();
- tryFailure(recipient, cause, logger);
+ recipient.tryFailure(cause);
}
}
| [Futures->[FlatMapper->[operationComplete->[propagateCancel,passThrough,propagateUncommonCompletion]],PassThrough->[operationComplete->[propagateUncommonCompletion]],Mapper->[operationComplete->[propagateUncommonCompletion]]]] | Propagates an uncaught completion to the given promise. | I did change this as the logger should not be used for this case IMHO. |
@@ -144,7 +144,7 @@ public class IntentHandler extends Activity {
reloadIntent.addCategory(Intent.CATEGORY_LAUNCHER);
reloadIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);
startActivityIfNeeded(reloadIntent, 0);
- AnkiActivity.finishActivityWithFade(th... | [IntentHandler->[onCreate->[onCreate],handleFileImport->[handleFileImport],getLaunchType->[isValidViewIntent]]] | Launch DeckPicker if there is no other task. | Silly question: don't we still want a `finish()` here? |
@@ -911,7 +911,7 @@ func (d *Dispatcher) CheckDockerAPI(conf *config.VirtualContainerHostConfigSpec,
}
// ensureApplianceInitializes checks if the appliance component processes are launched correctly
-func (d *Dispatcher) ensureApplianceInitializes(conf *config.VirtualContainerHostConfigSpec) error {
+func (d *Disp... | [createAppliance->[createApplianceSpec],createApplianceSpec->[addIDEController,addNetworkDevices,addParaVirtualSCSIController],ensureApplianceInitializes->[waitForKey,applianceConfiguration],deleteVM->[getName],reconfigureApplianceSpec->[encodeConfig,configIso,configLogging],checkExistence->[isVCH]] | ensureApplianceInitializes ensures that the appliance is initialized and that all necessary components are created This function is used to inspect the VCH and report the status of all interfaces and components. | Apologies Emma, but there are typos in the name `InsureApplicaneInit`. We should either revert to `EnsureApplianceInitializes` or change it to `EnsureApplianceInit`, which is closer to @vburenin's suggestion. |
@@ -54,6 +54,7 @@ type TemplateRouter struct {
}
func (o *TemplateRouter) Bind(flag *pflag.FlagSet) {
+ flag.StringVar(&o.RouterName, "name", util.Env("ROUTER_SERVICE_NAME", "public"), "The name the router will identify itself with in the route status")
flag.StringVar(&o.WorkingDir, "working-dir", "/var/lib/conta... | [Validate->[New],Run->[NewUniqueHost,NewFactory,Create,RouteSelectionFunc,StartReaper,NewTemplatePlugin,Run,Clients],Complete->[Complete,Env,Errorf,Atoi],Bind->[StringVar,Warningf,Duration,Env,DurationVar,ParseDuration],AddCommand,Flags,GetFlagString,Sprintf,Validate,NewVersionCommand,NewConfig,CheckErr,Run,Complete,Bi... | Bind binds the options to the template router. | this is giving two different defaults to the `ROUTER_SERVICE_NAME` env var (see `Complete()`). I guess that's not going to cause any harm but it's a little confusing. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.