patch stringlengths 18 160k | callgraph stringlengths 4 179k | summary stringlengths 4 947 | msg stringlengths 6 3.42k |
|---|---|---|---|
@@ -99,10 +99,9 @@ public interface RayRuntime {
* name specified.
*
* @param name The name of the named actor.
- * @param global Whether the named actor is global.
* @return ActorHandle to the actor.
*/
- <T extends BaseActorHandle> Optional<T> getActor(String name, boolean global);
+ <T extend... | [No CFG could be retrieved] | Get an actor by name. | This method should also have a `namespace` argument? |
@@ -1113,7 +1113,7 @@ public class TestSCMNodeManager {
try (SCMNodeManager nodeManager = createNodeManager(conf)) {
DatanodeDetails[] nodes = new DatanodeDetails[nodeCount];
for (int i = 0; i < nodeCount; i++) {
- DatanodeDetails node = TestUtils.createDatanodeDetails(
+ DatanodeDetail... | [TestSCMNodeManager->[testScmHeartbeat->[createNodeManager,getConf],testScmCanHandleScale->[heartbeatNodeSet,createNodeSet,getConf,createNodeManager,findNodes],testGetNodesByAddress->[createNodeManager,getConf],testHandlingSCMCommandEvent->[createNodeManager,getConf],testScmDetectStaleAndDeadNode->[createNodeManager,ge... | This test method creates a node with a network topology and registers it with the SCM node n g - > n g - > n g - > n g - > n g. | NIT: MockDatanodeDetails can be removed as static import is added. |
@@ -383,10 +383,6 @@ const htmlFixtureGlobs = [
'!examples/metadata-examples/video-json-ld.amp.html',
'!examples/mraid/inabox-mraid.html',
'!examples/multiple-docs.html',
- '!examples/old-boilerplate.amp.html',
- '!examples/ooyalaplayer.amp.html',
- '!examples/playbuzz.amp.html',
- '!examples/powr-player.a... | [No CFG could be retrieved] | This is a list of all the urls that are available to the AMP. Renders the AMP templates. | Removed the file for `old-boilerplate.amp.html` since was not meant to be valid, and the validator has its own test for it now (`feature_tests/old_boilerplate.html`) |
@@ -1,5 +1,5 @@
-<% if articles %>
- <section class="crayons-card crayons-card--secondary text-padding mb-4 print-hidden">
+<% if articles && articles.any? %>
+ <section class="crayons-card crayons-card--secondary text-padding mb-4 print-hidden" id="bottom-content-read-next">
<h2 class="crayons-subtitle-1">Read ... | [No CFG could be retrieved] | Renders a cloud cover with a hidden hidden container. | This is a small logic adjustment that should have always been in place |
@@ -83,8 +83,14 @@ export class AutoAdvance {
this.createDebouncedAdvance_(this.autoAdvanceInterval_);
this.scrollContainer_.addEventListener(
'scroll', () => this.handleScroll_(), true);
- this.scrollContainer_.addEventListener(
- 'touchstart', () => this.handleTouchStart_(), true);
+ l... | [No CFG could be retrieved] | Constructor for the object. This method is called by the autocompletion code when a node is stopped. | nit: to make this less ugly after `prettier`, maybe set the option obj as a one-liner. `{capture: true, passive: true}`. this is a mostly stable API so it's unlikely more params will be added. in any case `prettier` would fix it automatically if it surpasses line length. |
@@ -565,10 +565,14 @@ export class ConsentUI {
classList.add(consentUiClasses.loading);
toggle(dev().assertElement(this.ui_), false);
- const iframePromise = this.promptUISrcPromise_.then((expandedSrc) => {
- this.removeIframe_ = false;
- this.ui_.src = expandedSrc;
- return this.getClient... | [No CFG could be retrieved] | Adds a missing missing element to the placeholder if it s iframe. The iframe element which is shown in the iframe. | is it possible that delaying this expansion has negative effects? |
@@ -307,7 +307,13 @@ func (p *Provider) getPort(task marathon.Task, application marathon.Application)
return strconv.Itoa(port)
}
-func (p *Provider) getWeight(application marathon.Application) string {
+// Extract weight from labels for a given service and a given marathon application
+func (p *Provider) getWeigh... | [getCircuitBreakerExpression->[getLabel],hasMaxConnLabels->[getLabel],getWeight->[getLabel],getBasicAuth->[getLabel],hasLoadBalancerLabels->[getLabel],hasCircuitBreakerLabels->[getLabel],getMaxConnAmount->[getLabel],getHealthCheckPath->[getLabel],getMaxConnExtractorFunc->[getLabel],getDomain->[getLabel],getBackend->[ge... | getPort returns the port for the given task and application. | I think we should write a custom, Marathon-specific `getLabel()` variant that first tries to retrieve the label from the service and, if that doesn't exist, falls back to the application. I didn't check for each and every one, but it looks like the label constants defined in the `types` package always match the service... |
@@ -91,6 +91,10 @@ public abstract class HoodieBackedTableMetadataWriter implements HoodieTableMeta
private static final Logger LOG = LogManager.getLogger(HoodieBackedTableMetadataWriter.class);
+ // Virtual keys support for metadata table
+ private static final String RECORD_KEY_FIELD = "key";
+ private stat... | [HoodieBackedTableMetadataWriter->[bootstrapCommit->[commit],update->[processAndCommit],processAndCommit->[convertMetadata],bootstrapFromFilesystem->[initTableMetadata],close->[close]]] | Abstract class for writing a specific record to a Hudi table. Creates a writer for the table metadata. | can we add a config to HoodieMetadataConfig for this and use that instead of hard coding. |
@@ -113,7 +113,7 @@ class GitBitbucketDriverTest extends TestCase
),
array(
$this->originUrl,
- 'https://api.bitbucket.org/1.0/repositories/user/repo/main-branch',
+ 'https://api.bitbucket.org/2.0/repositories/user/repo?fields=... | [GitBitbucketDriverTest->[testDriver->[getDriver],testGetRootIdentifierWrongScmType->[getDriver]]] | Test driver for missing branch and tag Checks that the given node is a branch and has a specific branch. Checks if a node is a branch and if so checks if it is a branch and if. | you also need to update the corresponding return value |
@@ -350,10 +350,13 @@ def test_list_customer_sources(sandbox_gateway_config):
def test_get_client(gateway_config):
assert _get_client(**gateway_config.connection_params).api_key == "secret"
-
+'''
+FIXME
+The current implementation uses this method to pass the Stripe public key to
+Stripe.js in the template. I ... | [test_authorize_error_response->[authorize,create_payment_information],test_authorize_and_save_customer_id->[authorize,create_payment_information],test_void_error_response->[void,create_payment_information],test_authorize_with_customer_id->[authorize,create_payment_information],stripe_paid_payment->[save],test_confirm_... | Test that Stripe client is available. | You changed the logic of the `get_client_token` so you should change this test to expect a new response |
@@ -555,6 +555,7 @@ function GETPOST($paramname, $check = 'alphanohtml', $method = 0, $filter = null
if (!is_numeric($out)) { $out = ''; }
break;
case 'intcomma':
+ if (is_array($out)) break;
if (preg_match('/[^0-9,-]+/i', $out)) $out = '';
break;
case 'alpha':
| [dolGetCountryCodeFromIp->[getCountryCodeFromIP],complete_head_from_modules->[executeHooks,trans,load],dol_print_error->[transnoentities,loadLangs,trans,lasterror,lastqueryerror,lasterrno,lastquery,load],dol_print_phone->[executeHooks,fetch_clicktodial,trans],dol_print_url->[trans],getCommonSubstitutionArray->[getFullN... | This function is a wrapper for GET and POST methods. It is used by both GET and This code is used to retrieve values from the last search session. This function is used to get the default value of a field from a menu - object This function is used to get the default values of the form This function is used to dump the ... | If you come here with $out that is an array and $check that is 'intcomma', there is a bug into the caller. You must fix the caller to call the GETPOST with param 'array' if param is array and intcomma if value is a string with list of id separated with a , |
@@ -105,7 +105,8 @@ public final class EqualsPredicateTests {
new FakeNestedClass(new FakeClass(-42))));
}
- private static final class FakeNestedClass {
+ @Nested
+ private final class FakeNestedClass {
final FakeClass value;
FakeNestedClass(final FakeClass value) {
| [EqualsPredicateTests->[EquatableObjectWithCustomComparatorTest->[shouldReturnFalseWhenObjectsAreNotEqual->[newEqualsPredicate],shouldReturnTrueWhenObjectsAreEqual->[newEqualsPredicate]],EquatableObjectWithoutCustomComparatorTest->[newEqualsPredicate],NonEquatableCircularReferenceTest->[newEqualsPredicate],NonEquatable... | shouldReturnFalseWhenObjectsAreNotEqual should be false when objects are not equal. | This class does not contain tests, and thus does not need to be annotated with `@Nested`. |
@@ -397,12 +397,14 @@ func printComment(w io.Writer, comment, deprecationMessage, indent string) {
fmt.Fprintf(w, "%s */\n", indent)
}
-func (mod *modContext) genPlainType(w io.Writer, name, comment string, properties []*schema.Property, input, readonly bool, level int) {
+func (mod *modContext) genPlainType(w io.... | [sdkImports->[getRelativePath],typeAst->[resourceType,details,typeAst,objectType],getImportsForResource->[getTypeImports,getTypeImportsForResource],resourceType->[tokenToModName,namingContext],genResourceModule->[resourceFileName],getTypeImportsForResource->[getTypeImports],objectType->[tokenToModName,namingContext],ge... | genPlainType generates the plain type definition for the given properties. | Would it be possible to factor out the `defaults` generation into a separate func? I'm squinting at this and I don't see how the `defaults` computation and code emission does not interact with the previous func much if at all. Also.. `genPlainType` had too many bool parameters before the change, but now after the chang... |
@@ -211,13 +211,15 @@ class TabularData(MutableSequence[Sequence["CellT"]]):
)
match_line: Set = set()
- match = True
+ match_any = True
if how == "all":
- match = False
+ match_any = False
for n_row, row in enumerate(self):
fo... | [diff_table->[append,items,with_value,TabularData,drop,rename,_format_field],show_metrics->[render,metrics_table],TabularData->[dropna->[drop,Column,keys],__setitem__->[_iter_col_row],add_column->[Column,append],append->[append,_iter_col_row],__getattr__->[column],row_from_dict->[with_value,keys,append,add_column],item... | Remove missing values from the DataFrame. | `in` operation is `O(1)` for `Set` but `O(n)` for `List` |
@@ -112,7 +112,7 @@ public final class PendingWriteQueue {
for (PendingWrite write = head; write != null; write = head) {
head = tail = null;
size = 0;
-
+ bytes = 0;
while (write != null) {
PendingWrite next = write.next;
Refe... | [PendingWriteQueue->[PendingWrite->[newObject->[PendingWrite],recycle->[recycle]],recycle->[recycle],removeAndWriteAll->[add],add->[size]]] | Removes all pending writes with a specific cause and fails them. | Should `size=0` occur outside of the loop? And should we also be setting `bytes` here? |
@@ -18,13 +18,13 @@
</div>
<div class="profile-details">
<h1 style="color:<%= HexComparer.new([user_colors(@user)[:bg], user_colors(@user)[:text]]).brightness(0.78) %>">
- <span itemprop="name"><%= @user.name %></span>
+ <span itemprop="name"><%= sanitize @user.name %></span>
<sp... | [No CFG could be retrieved] | Displays a single - user n - node sequence. Renders a . | This can be probably rewritten as `sanitize(@user.summary.presence || "404 bio not found")` without the sample call since there's only one value in the array |
@@ -313,6 +313,7 @@ class USBPrinterOutputDevice(PrinterOutputDevice):
while self._connection_state == ConnectionState.connected and self._serial is not None:
try:
line = self._serial.readline()
+ print(line)
except:
continue
| [USBPrinterOutputDevice->[connect->[connect],cancelPrint->[_sendCommand],_update->[sendCommand,_sendCommand],_sendNextGcodeLine->[_sendCommand],close->[close],updateFirmware->[showFirmwareInterface]]] | Update the hotend temperature and target temperature values. Check if there is a match for a given BED temperature and if so update the printer. | I guess that's a debug print that sneaked along with the commit. |
@@ -61,8 +61,13 @@ public class SingleHelixTask implements Task {
this.jobName, this.jobId));
int exitCode = this.taskProcess.waitFor();
if (exitCode == 0) {
+ logger.info(String
+ .format("Task process finished. job name: %s. job id: %s", this.jobName, this.jobId));
... | [SingleHelixTask->[cancel->[info,destroyForcibly,format],run->[getStackTraceAsString,getMessage,error,TaskResult,waitFor,format,info],launch,getLogger,get,format,info]] | This method is called when a single Helix task is running. | Instead of format, you can use {} like logger.info("Task process finished. job name: {}. job id: {}", this.jobName, this.jobId). This is more efficient since it defers the formatting. Same for the warn and debug messages below. |
@@ -136,6 +136,15 @@ public class CSVUtils {
.defaultValue("UTF-8")
.required(true)
.build();
+ public static final PropertyDescriptor ALLOW_DUPLICATE_HEADER_NAMES = new PropertyDescriptor.Builder()
+ .name("csvutils-allow-duplicate-header-names")
+ .displayName("Allow Duplic... | [CSVUtils->[buildCustomFormat->[getCharUnescaped,getCharUnescapedJava],unescapeJava->[unescapeJava]]] | Creates a PropertyDescriptor that can be used to remove white space from the beginning and end of a. | Maybe this should say what happens if there *are* duplicate headers found too |
@@ -36,6 +36,12 @@ module VerifySPAttributesConcern
user_session[:verify_shared_attributes] = false
end
+ def consent_has_expired?
+ return true unless sp_session_identity
+ last_estimated_consent = sp_session_identity.last_consented_at || sp_session_identity.created_at
+ !last_estimated_consent || ... | [needs_sp_attribute_verification?->[needs_completions_screen?]] | clear verify attributes sessions and find the nack for the user. | Would love some feedback on this specifically: 1. Do we think it's ok to use `created_at` as a proxy for the last time we know for sure somebody consented on the handoff page? - I can think of a case where the `identities` row is created, and then abandoned, and then viewed later, so the timestamp may be older than exp... |
@@ -35,13 +35,13 @@ func markInProgressIfSufficientIncomingConfirmations(run *models.JobRun, taskRun
}
}
-func validateOnMainChain(run *models.JobRun, taskRun *models.TaskRun, txManager store.TxManager) error {
+func validateOnMainChain(run *models.JobRun, taskRun *models.TaskRun, ethClient eth.Client) error {
t... | [Uint32From,Add,ToInt,Unconfirmed,Cmp,GetTxReceipt,Errorf,Sub,SetError,Hex,MinBigs,SetStatus,Int64,ForLogger,SetUint64,Debugw,NewInt,String,Warnw] | markInProgressIfSufficientIncomingConfirmations checks if the given run has sufficient incoming confirmations invalidRequest - Invalid request handler for task run. | Probably should use actual contexts in all places instead of context.TODO |
@@ -129,7 +129,7 @@ function follow_content(App $a)
if ($protocol == Protocol::PHANTOM) {
// Possibly it is a remote item and not an account
- follow_remote_item($url);
+ follow_remote_item($ret['url']);
notice(DI::l10n()->t("The network type couldn't be detected. Contact can't be added."));
$submit = ... | [follow_post->[t,redirect],follow_remote_item->[redirect],follow_content->[t,redirect,get]] | Follow a contact This function is called by the UI when a contact is added to the system. Makes the connection request for friendica contacts easier Show last public posts. | I think that this should be left unchanged, since it could be a link to an item and not a profile link. |
@@ -155,8 +155,7 @@ public class RemoteStore<K, V> implements SegmentedAdvancedLoadWriteStore<K, V>,
if (realValue instanceof byte[]) {
realValue = new WrappedByteArray((byte[]) realValue);
}
- return ctx.getMarshallableEntryFactory().create(key, realValue,
- ... | [RemoteStore->[size->[size],getKey->[getKey],clear->[clear],stop->[stop],publishKeys->[publishKeys],getValue->[getValue],entryPublisher->[publishKeys,entryPublisher],toSeconds->[toSeconds]]] | Load an entry from the remote cache. | Huh, I'm surprised that we don't use `remoteCache.getWithMetadata()` here, but I guess we don't care about direct access to the remote cache. |
@@ -109,13 +109,13 @@ public class OzoneClientConfig {
private String checksumType = ChecksumType.CRC32.name();
@Config(key = "bytes.per.checksum",
- defaultValue = "1MB",
+ defaultValue = "256KB",
type = ConfigType.SIZE,
description = "Checksum will be computed for every bytes per check... | [OzoneClientConfig->[getChecksumType->[valueOf],setChecksumType->[name],validate->[checkArgument,checkState,warn],getLogger,name]] | Creates a new object which can be used to write a single key request. check if the flush size is a multiple of the buffer size and the checksum is not too. | Let's not change the default for now. We can change once we do some tests and analyze performance . |
@@ -14,6 +14,8 @@ import (
)
func TestTeamOpenAutoAddMember(t *testing.T) {
+ require.Equal(t, false, true)
+
tt := newTeamTester(t)
defer tt.cleanup()
| [addTeamMember,kickTeamRekeyd,ChangeTeamSettings,RandString,TeamRequestAccess,waitForTeamChangedGregor,Error,addUser,IsOpen,MemberRole,createTeam,Run,Logf,cleanup,Equal,Name,ToLower,NoError,userVersion,TeamNameFromString,TeamCreateWithSettings,True,NewCmdTeamRemoveMemberRunner,Seqno,NewCmdTeamSettingsRunner,String,TODO... | TestTeamOpenAutoAddMember tests the existence of a user s member. Test the team name. | CI shouldn't be green |
@@ -55,14 +55,14 @@ dave==3.1.4 \\
assert line_by_line(result) == line_by_line(expected)
-_requirements = ["flake8-pantsbuild>=2.0,<3", "flake8-2020>=1.6.0,<1.7.0"]
-
-
@pytest.mark.parametrize(
"requirements,expected",
[
([], "c8e8d0a6d6ec36bee3942091046d81d86e3b83b143b37a7cc714e2d022bf4f8... | [test_invalidation_digest->[FrozenOrderedSet,calculate_invalidation_digest],test_metadata_header_round_trip->[add_header_to_lockfile,InterpreterConstraints,from_lockfile,LockfileMetadata],test_add_header_to_lockfile->[line_by_line->[splitlines,strip],line_by_line,add_header_to_lockfile,InterpreterConstraints,LockfileMe... | Test whether the invalidation digest matches the expected digest. | imo this test has never been particularly useful, since it tests the specific implementation of the hash, and it's not really verifiable that it is right. What matters is that it behaves predictably with semantics that lockfile consumers can rely upon. At this point though, there are useful semantics that we can test. ... |
@@ -195,6 +195,10 @@ public class AvroHdfsTimePartitionedWriter implements DataWriter<GenericRecord>
}
protected void write(GenericRecord record, long recordTimestamp) throws IOException {
+ if (recordTooOld(recordTimestamp)) {
+ return;
+ }
+
Path writerOutputPath = getPathForColumnValue(record... | [AvroHdfsTimePartitionedWriter->[bytesWritten->[bytesWritten],write->[write],cleanup->[cleanup],commit->[commit],getRecordTimestamp->[getRecordTimestamp],close->[close,bytesWritten,recordsWritten],recordsWritten->[recordsWritten]]] | Write the record to HDFS. | We need a metric for how many rows have been dropped. |
@@ -6,7 +6,7 @@ module TwoFactorAuthentication
def show
analytics.track_event(
- Analytics::MULTI_FACTOR_AUTH_ENTER_PERSONAL_KEY_VISIT, analytics_properties
+ Analytics::MULTI_FACTOR_AUTH_ENTER_PERSONAL_KEY_VISIT, context: context
)
@personal_key_form = PersonalKeyForm.new(cu... | [PersonalKeyVerificationController->[generate_new_personal_key->[create],password_reset_profile->[password_reset_profile]]] | finds the national key and displays it in the UI. | I might be missing something, but it looks like we're not recording `multi_factor_auth_method` at all for personal key. |
@@ -4312,9 +4312,12 @@ func TestGarbageCollection(t *testing.T) {
objectsBefore := getAllObjects(t, c)
tagsBefore := getAllTags(t, c)
- // Now delete the output repo and GC
- require.NoError(t, c.DeleteRepo(pipeline, false))
- require.NoError(t, c.GarbageCollect())
+ // Try to GC without stopping the pipeline.
+ ... | [DurationProto,PrintDetailedCommitInfo,Message,NewForConfig,JoinHostPort,SubscribeCommit,RandString,CreateRepo,DeleteCommit,ListDatum,Stop,SetBranch,ReadFile,New,NewPipeline,VisitInput,NotNil,Watch,StartCommit,FormatLabelSelector,Apps,GetFile,DeletePipeline,PrintDetailedJobInfo,ResultChan,NoError,Fatalf,Split,DeleteAll... | Get all objects and tags in a single commit getAllObjects - Gets all objects and tags after the object referenced by the . | Why is this in a backoff? Is it because it takes a bit to actually stop the pipeline? |
@@ -20,6 +20,16 @@ class Theme < ActiveRecord::Base
has_many :color_schemes
belongs_to :remote_theme
+ validate :user_selectable_validation
+
+ scope :parent_themes, ->() {
+ where("id NOT IN (SELECT child_theme_id FROM child_themes)")
+ }
+
+ scope :user_selectable, ->() {
+ where('user_selectable OR... | [Theme->[set_default!->[expire_site_cache!],remove_from_cache!->[remove_from_cache!],set_field->[targets],included_settings->[cached_settings],clear_default!->[expire_site_cache!]]] | Notify about a color change. | `NOT IN` or any variations of `IN` query will be bad for performance once the result set is large. What you can do here is use a `LEFT JOIN child_themes ON themes.id = child_themes_id WHERE themes.id IS NULL` |
@@ -17,11 +17,14 @@ class RMaldiquant(RPackage):
replicated measurements as well as allowing spectra with different
resolutions."""
- homepage = "https://cran.r-project.org/package=MALDIquant"
- url = "https://cran.r-project.org/src/contrib/MALDIquant_1.16.4.tar.gz"
- list_url = "https:/... | [RMaldiquant->[depends_on,version]] | This function returns a list of all measurements that are replicated and allowing spectra with different resolution. | These 2 are suggested dependencies, remove them. |
@@ -133,7 +133,8 @@ export class AmpStoryPlayer {
/** @public */
buildCallback() {
- this.stories_ = toArray(this.element_.querySelectorAll('a'));
+ initLogConstructor();
+ this.stories_ = toArray(this.querySelectorAll('a'));
this.initializeShadowRoot_();
this.initializeIframes_();
| [No CFG could be retrieved] | The main method of the class. Initializes the shadow root. | Shouldn't this be `this.element_` since we reverted the custom element PR? |
@@ -462,6 +462,13 @@ func (c *Create) Flags() []cli.Flag {
Destination: &c.httpProxy,
Hidden: true,
},
+
+ cli.StringFlag{
+ Name: "syslog-address",
+ Value: "",
+ Usage: "Address of the syslog server to send Virtual Container Host logs to. Must be in the format transport://hos... | [Run->[logArguments,processParams],logArguments->[SetFields],UnmarshalText] | Flags returns the flags that are used to create a VCS This file contains the logic to configure the back volume store. Displays flags related to a port group NetworkIP - list of network interfaces that can be used to create a new network. | is the transport duplicated mentioned? |
@@ -137,7 +137,7 @@ function VirtualBackground({ dispatch, t }: Props) {
hideCancelButton = { true }
submitDisabled = { false }
titleKey = { 'virtualBackground.title' }
- width = 'small'>
+ width = '450px'>
{loading ? (
<div clas... | [No CFG could be retrieved] | Displays a virtual background of the given node. Renders a list of images that can be selected or disabled. | How many icons fit in a single row now? |
@@ -54,6 +54,9 @@ module ProtocolImporters
def normalize_list(client_data)
# client_data is HttpParty ApiReponse object
protocols_hash = client_data.parsed_response.with_indifferent_access[:items]
+ unless protocols_hash.present?
+ raise NormalizerError.new(:nil_protoc... | [ProtocolNormalizer->[normalize_protocol->[to_s,nil?,with_indifferent_access,find,to_h,zero?,attachments,join,description,name,description_components,try,map],normalize_list->[with_indifferent_access,join,map]]] | Normalizes the list of items in the response object. | Layout/EmptyLineAfterGuardClause: Add empty line after guard clause. |
@@ -22,7 +22,7 @@ import java.util.Objects;
import java.util.Optional;
@Immutable
-public class LambdaVariable extends Literal {
+public class LambdaVariable extends Expression {
private final String lambdaCharacter;
| [LambdaVariable->[hashCode->[hashCode],equals->[equals]]] | Creates an object which represents a single lambda - based variable. | To make sure I understand - coercion util looks at expressions to fix type issues, so we need this to be an expression to fit with that. Is the scenario if we have something like `transform(arr, x => x + 2.3)` where arr is an array of decimals so x will be coerced as a lambda variable? |
@@ -79,6 +79,17 @@ public class AttributesToJSON extends AbstractProcessor {
.addValidator(StandardValidators.NON_EMPTY_VALIDATOR)
.build();
+
+ public static final PropertyDescriptor ATTRIBUTES_REGEX = new PropertyDescriptor.Builder()
+ .name("attributes-to-json-regex")
+ ... | [AttributesToJSON->[onTrigger->[buildAttributesMapForFlowFile],onScheduled->[buildAtrs]]] | A class that converts Attributes to JSON. | What do you think about supporting Expression Language for this field? You can keep the same validator, although that doesn't allow validation against flow files, just Variable Registry properties and such. You could support regexes from flow file attributes too, but you'd need a new validator and it would recompile ea... |
@@ -101,6 +101,14 @@ public class StorageUtilizationMetricsReporter implements MetricsReporter {
(((double) baseDir.getTotalSpace() - (double) baseDir.getFreeSpace())
/ (double) baseDir.getTotalSpace())
);
+ metricRegistry.addMetric(
+ maxTaskPerNode,
+ (Gauge<BigInteger>) (... | [StorageUtilizationMetricsReporter->[TaskStorageMetric->[remove->[remove],getValue->[add]]]] | Configures the shared metrics for the node level storage usage gauges. | actually getting NPEs from these two, it seems like `configureShared` is called before `configure` to the `metricRegistry` and `numberStatefulTasks` aren't initialized before they're called in the gauges |
@@ -399,7 +399,7 @@ class IncomingMessage < ActiveRecord::Base
(
\s*#{score}\n(?:(?!#{score}\n).)*? # top line
(disclaimer:\n|confidential|received\sthis\semail\sin\serror|virus|intended\s+recipient|monitored\s+centrally|intended\s+(for\... | [IncomingMessage->[message_id->[message_id],get_body_for_html_display->[subject],valid_to_reply_to->[parse_raw_email!],_calculate_valid_to_reply_to->[from_email,mail],_get_attachment_text_internal->[_extract_text],get_main_body_text_folded->[_cache_main_body_text],mail_from->[parse_raw_email!],get_main_body_text_intern... | Removes any unknown section from the given text. This method is used to remove the unknown block of content from the message. This method is called at the beginning of each request. It replaces any missing tag in the. | Line is too long. [125/80] |
@@ -40,7 +40,7 @@
<div class="container mt-3">
<% flash.each do |type, message| %>
- <div class="alert alert-<%= type %>">
+ <div class="alert alert-<%= type == "notice" ? "success" : "danger" %>">
<button class="close" data-dismiss="alert">
<i class="fa fa-times" aria-hidden="tr... | [No CFG could be retrieved] | Renders a single . 1. js bootstrap. min. js. | This makes sure we get the right color here. Not really specific to the issue but the old one wasn't quite right. |
@@ -593,6 +593,14 @@ if ( ! function_exists('_exception_handler'))
}
$_error->log_exception($severity, $message, $filepath, $line);
+
+ // If the error is fatal, the execution of the script should be stopped because
+ // errors can't be recovered from. Halting the script conforms with PHP's
+ // default erro... | [log_message->[write_log],_exception_handler->[log_exception,show_php_error],show_404->[show_404],show_error->[show_error]] | Exception handler for PHP errors. | Could you chaget that to `exit(EXIT_ERROR);` please? Also, a changelog entry should be added. |
@@ -232,8 +232,10 @@ export class <%= entityReactName %> extends React.Component<I<%= entityReactName
}
}
-const mapStateToProps = storeState => ({
- <%=entityInstancePlural %>: storeState.<%= entityInstance %>.entities
+const mapStateToProps = ({ <%= entityInstance %> }) => ({
+ <%=entityInstancePlural %>: <%=... | [No CFG could be retrieved] | The export. | Looks better and doesn't seem to create any problem. |
@@ -248,7 +248,7 @@ namespace Internal.Cryptography.Pal
// Nothing requires that there be fewer keys than certs,
// but it's sort of nonsensical when loading this way.
CertBagAsn[] certBags = ArrayPool<CertBagAsn>.Shared.Rent(10);
- AttributeAsn[][] certBagAttrs = Array... | [UnixPkcs12Reader->[VerifyAndDecrypt->[Decrypt],Dispose->[Dispose],DecryptSafeContents->[Decrypt],Decrypt->[ReturnRentedContentInfos,Dispose,Decrypt]]] | This method is called to decrypt the given password. region Private methods. | Line 688 could potentially assign null to an index in `certBagAttrs` |
@@ -86,6 +86,18 @@ public class ExecuteInfluxDBQuery extends AbstractInfluxDBProcessor {
.expressionLanguageSupported(ExpressionLanguageScope.FLOWFILE_ATTRIBUTES)
.build();
+ public static final PropertyDescriptor INFLUX_DB_QUERY_CHUNK_SIZE = new PropertyDescriptor.Builder()
+ ... | [ExecuteInfluxDBQuery->[close->[close],onScheduled->[onScheduled]]] | This property is used to provide a specific time unit of query results from the InfluxDB DB connection timeout. | If the default query result limit is 10k, what is the likelihood that there is a good reason for this to be above 10k? Even if we go beyond that for chunks, Integer.MAX_VALUE is way past a sane limit. |
@@ -70,3 +70,9 @@ type UnexpectedArgsError string
func (e UnexpectedArgsError) Error() string {
return fmt.Sprintf("Command `%s` doesn't take any non-flag arguments", string(e))
}
+
+type CantRunInStandaloneError struct{}
+
+func (e CantRunInStandaloneError) Error() string {
+ return fmt.Sprintf("Can't run command ... | [Error->[Sprintf]] | Error returns the error message for UnexpectedArgsError. | just return the string without `sprintf`? |
@@ -225,7 +225,7 @@ public final class DimensionHandlerUtils
public static Long convertObjectToLong(Object valObj)
{
if (valObj == null) {
- return 0L;
+ return ZERO_LONG;
}
if (valObj instanceof Long) {
| [DimensionHandlerUtils->[makeStrategy->[getEffectiveCapabilities]]] | Convert object to Long. | This method doesn't match `convertObjectToDouble()` in null handling of the result of getExactLongFromDecimalString(). |
@@ -413,6 +413,11 @@ class Epochs(object):
"""
evoked = Evoked(None)
evoked.info = cp.deepcopy(self.info)
+ if projs is None:
+ evoked.info['projs'] = self.info['projs_all'][0]
+ else:
+ evoked.info['projs'] = projs
+ del evoked.info['projs_all']
... | [Epochs->[_get_data_from_disk->[_get_epoch_from_disk],next->[next,_is_good_epoch,_get_epoch_from_disk],get_data->[_get_data_from_disk]]] | Compute the average of the epochs in the time series. Returns true if the node has evoked a sequence of picks. | this really suggests that projs_all is a convenient variable in the Epochs object but not really an attribute of the measurement info. If you move `projs_all` to a `_projs_all` attribute in Epochs than I can live with it. besides this and my previous remarks I am relatively happy with this PR especially as the tests ar... |
@@ -1155,7 +1155,7 @@ func (c *ChainLink) Store(g *GlobalContext) (didStore bool, err error) {
key := DbKey{Typ: DBLink, Key: c.id.String()}
// Don't write with any aliases
- if err = g.LocalDb.Put(key, []DbKey{}, packed); err != nil {
+ if err = g.LocalDb.Put(key, nil, packed); err != nil {
return false, err
... | [ToEldestKID->[GetKID],verifyPayloadV2->[getPayloadHash,getIgnoreIfUnsupportedFromPayload,getPrevFromPayload,getSeqTypeFromPayload],NeedsSignature->[NeedsSignature,IsStubbed],GetMerkleHashMeta->[IsStubbed],MatchFingerprint->[Eq],unpackPayloadJSON->[HasRevocations],getSigPayload->[getFixedPayload,IsStubbed],HasRevocatio... | Store stores the link in the local database. If the link is already stored it will be. | Is this an optimization you tried that didn't have an effect? |
@@ -205,6 +205,18 @@ public class MessageProcessorsTestCase extends AbstractMuleContextTestCase {
}
}
+ @Test
+ public void processWithChildContextBlockingErrorInChainRegainsParentContext() throws Exception {
+ try {
+ processWithChildContextBlocking(input, createChain(error), Optional.empty());
+ ... | [MessageProcessorsTestCase->[ReactiveProcessorToProcessorAdaptor->[apply->[apply]]]] | Process to apply error in the chain. | Assert the instance of the parent instead o the class |
@@ -258,12 +258,11 @@ def success_renewal(domains):
z_util(interfaces.IDisplay).notification(
"Your existing certificate has been successfully renewed, and the "
"new certificate has been installed.{1}{1}"
- "The new certificate covers the following domains: {0}{1}{1}"
- "You should... | [_choose_names_manually->[_choose_names_manually],validated_directory->[_get_validated],_filter_names->[_sort_names],validated_input->[_get_validated]] | Display a box confirming the renewal of an existing certificate and a new certificate. | This parameter is now being passed to `format` rather than `notification`. |
@@ -50,7 +50,7 @@ if (is_array($oids)) {
$descr = rewrite_entity_descr($descr);
}
- $thisisnotbullshit = true;
+ $thisisnotbullshit = check_entity_sensor($descr, $device);
$type = $entitysensor[$entry['entPhySensorType']];
| [No CFG could be retrieved] | Get the entity sensor information for a single entity. Creates a new entity sensor object from the given entry. | Can you substitute this variable name? Its really not appealing and makes me remember the tyranny of the unspoken one |
@@ -4928,9 +4928,15 @@ public class CalciteQueryTest
ImmutableList.of(
Druids.newTimeseriesQueryBuilder()
.dataSource(CalciteTests.DATASOURCE1)
- .intervals(QSS(Intervals.of("2000/P1M")))
+ .intervals(QSS(Intervals.of("-146136543-09-08T08:23:32.... | [CalciteQueryTest->[testQuery->[testQuery],assertQueryIsUnplannable->[assertQueryIsUnplannable],testUsingSubqueryAsPartOfOrFilter->[assertQueryIsUnplannable],testUsingSubqueryAsFilterForbiddenByConfig->[assertQueryIsUnplannable],assertQueryIsForbidden->[assertQueryIsForbidden]]] | This method is used to test if a lease is found on time extract. | This would be better as `.intervals(QSS(Filtration.eternity()))` |
@@ -44,8 +44,8 @@ type AllocatorImpl struct {
member string
}
-// NewAllocatorImpl creates a new IDAllocator.
-func NewAllocatorImpl(client *clientv3.Client, rootPath string, member string) *AllocatorImpl {
+// NewAllocator creates a new ID Allocator.
+func NewAllocator(client *clientv3.Client, rootPath string, ... | [Generate->[generateLocked,Lock,Unlock],getAllocIDPath->[Join],generateLocked->[Value,Commit,CreateRevision,Wrap,Info,getAllocIDPath,Set,Compare,BytesToUint64,GetValue,WithLabelValues,Join,Uint64ToBytes,GenWithStackByArgs,Uint64,If,FastGenByArgs,NewSlowLogTxn,OpPut,Then],Alloc->[generateLocked,Lock,Unlock]] | Alloc returns the next unique identifier in the allocator. | Need to become private type? |
@@ -498,8 +498,14 @@ func createAgentAvailabilitySetVM(cs *api.ContainerService, profile *api.AgentPo
storageProfile := compute.StorageProfile{}
if profile.IsWindows() {
- imageRef := profile.ImageRef
+ // Priority:
+ // 1. ImageRef in agent pool
+ // 2. Custom image in WindowsProfile. AKS does not use th... | [HasSecrets,GetEnableAHUB,StringPtr,VirtualMachineSizeTypes,GetKubernetesWindowsNodeCustomDataJSONObject,Atoi,GetKubernetesLinuxNodeCustomDataJSONObject,GetAddonByName,BoolPtr,IsStorageAccount,GetMasterCustomDataJSONObject,IsWindows,HasAvailabilityZones,HasImageRef,Bool,TrimSpace,PrivateJumpboxProvision,UserAssignedIDE... | osProfile. AdminUsername is the username of the Windows agent. StorageProfile - A list of the objects in the profile that are required to publish the. | the rule is a bit complicated, why do we need to use both agent pool and windows profile? can we not combine them into one? |
@@ -58,11 +58,11 @@
<% end %>
</span>
- <% if false %>
- <span class="flex items-center p-1 ml-1" title="Data">
+ <% if article.user_subscriptions.any? %>
+ <a href="<%= dashboard_subscriptions_path(source_type: "Article", source_id: article.id) %>" class="flex item... | [No CFG could be retrieved] | Displays a list of all possible reactions of the page. Renders a hidden field with a link to the user s hidden field with a button to un. | This is going to issue a db call every time we call it which is twice, here and below on line 98. We should cache the value and then apply it in each place. OR if we wanted to take our db calls from 3 to 1, we could just do `article.user_subscriptions.size` and then for the booleans check if size is greater than 0 |
@@ -65,6 +65,7 @@ public class ActionButtonStatus {
setupButton(preferences, R.id.action_toggle_whiteboard, "customButtonEnableWhiteboard", SHOW_AS_ACTION_NEVER);
setupButton(preferences, R.id.action_save_whiteboard, "customButtonSaveWhiteboard", SHOW_AS_ACTION_NEVER);
setupButton(preferences... | [ActionButtonStatus->[whiteboardPenColorIsDisabled->[get],saveWhiteboardIsDisabled->[get],selectTtsIsDisabled->[get],setupButton->[getString,put,toString,parseInt],setCustomButtons->[getValue,getControlBlocked,setAlpha,getIcon,getKey,setVisible,setShowAsAction,isControlBlocked,mutate,w,findItem,setEnabled,entrySet],set... | Initializes the buttons and buttons. This method initializes the button preferences. | I mentioned in the previous review: this only sets the default, you want to disable the button if Lookup is disabled. |
@@ -25,7 +25,7 @@ public class LoggingAspect {
@Inject
private Environment env;
- @Pointcut("within(<%=packageName%>.repository..*) || within(<%=packageName%>.service..*)")
+ @Pointcut("within(<%=packageName%>.repository..*) || within(<%=packageName%>.service..*) || within(com.generic.app.web.rest..*)... | [No CFG could be retrieved] | Method that implements logging of exception. This method is invoked from the generated code. It returns the result of the method invocation. | Your package name should be parametrized |
@@ -93,6 +93,8 @@ namespace Content.Server.GameTicking
{
if (_playersInLobby.ContainsKey(session)) _playersInLobby.Remove(session);
+ if (session.ContentData() is { } data) data.DisconnectTime = _gameTiming.RealTime;
+
_chatManager.SendAdmi... | [GameTicker->[ReqWindowAttentionAll->[RaiseNetworkEvent],PlayerStatusChanged->[JoinGame,InGame,OnClientDisconnected,Connected,SpawnPlayer,Connecting,OnClientConnected,PlayerJoinLobby,UserId,Mind,ContentDataUncast,NewStatus,AttachToEntity,WaitPreferencesLoaded,ContentData,ServerEmptyUpdateRestartCheck,Session,ContainsKe... | Called when the player status changes. SpawnPlayer - Spawn a player if it hasn t been loaded yet. | Playtime manager should handle this itself. |
@@ -45,7 +45,7 @@ public class SslHandlerTest {
try {
// Push the second part of the 5-byte handshake message.
- ch.writeInbound(Unpooled.wrappedBuffer(new byte[]{2, 0, 0, 1, 0}));
+ ch.writeInbound(Unpooled.wrappedBuffer(new byte[]{ 2, 0, 0, 1, 0 }));
fail();
... | [SslHandlerTest->[testTruncatedPacket->[EmbeddedChannel,createSSLEngine,getCause,wrappedBuffer,SslHandler,nullValue,is,readInbound,setUseClientMode,assertThat,writeInbound,instanceOf,fail]]] | Pushes the last part of a truncated packet. | @trustin I think this should not be part of the pull-req... |
@@ -92,6 +92,11 @@ class ApacheConfigurator(augeas_configurator.AugeasConfigurator):
"""
description = "Apache Web Server plugin"
+ if os.environ.get("CERTBOT_DOCS") == "1":
+ description += ( # pragma: no cover
+ "(Please note that the default values of the Apache plugin options"
+ ... | [ApacheConfigurator->[perform->[restart,perform],make_addrs_sni_ready->[is_name_vhost,add_name_vhost],prepare->[option,_prepare_options],add_vhost_id->[_find_vhost_id],install_ssl_options_conf->[option],_add_name_vhost_if_necessary->[is_name_vhost,add_name_vhost],cleanup->[restart],make_vhost_ssl->[_create_vhost],_find... | A list of all the components of the Apache configuration. Options for SSL - based SSL - based SSL. | We need a space at the beginning of this string. |
@@ -176,7 +176,7 @@ public class BigtableIOTest {
public void testReadValidationFailsMissingTable() {
BigtableIO.Read read = BigtableIO.read().withBigtableOptions(BIGTABLE_OPTIONS);
- thrown.expect(IllegalArgumentException.class);
+ thrown.expect(NullPointerException.class);
read.expand(null);
... | [BigtableIOTest->[testWriting->[apply],FakeBigtableWriter->[writeRecord->[getTable,verifyTableExists]],filterToRange->[apply->[makeByteKey]],testReadingFailsTableDoesNotExist->[apply],runReadTest->[apply],ByteStringComparator->[compare->[makeByteKey]],FakeBigtableService->[verifyTableExists->[tableExists],getTableRange... | This test fails if the read validation fails for a missing table. | This should really still continue to throw the IllegalArgumentException How do you know the correct exception is being thrown since NPE/IllegalArgument could refer to many incorrect parameters? |
@@ -73,6 +73,12 @@ namespace CoreNodeModels.Input
RegisterAllPorts();
}
+ protected BasicInteractive(string outPortName, string outPortToolTip)
+ {
+ OutPorts.Add(new PortModel(PortType.Output, this, new PortData(outPortName, outPortToolTip)));
+ RegisterAllPo... | [BasicInteractive->[SerializeCore->[SerializeValue,SerializeCore],DeserializeCore->[DeserializeCore]]] | Print the value of a . | what about if this accepts a `portModel` - so it's consistent with other base class constructors. |
@@ -324,6 +324,17 @@ func (c *DeploymentController) makeDeployerPod(deployment *kapi.ReplicationContr
Labels: map[string]string{
deployapi.DeployerPodForDeploymentLabel: deployment.Name,
},
+ // Set the owner reference to current deployment, so in case the deployment fails
+ // and the deployer pod is ... | [nextStatus->[emitDeploymentEvent,IsDeploymentCancelled],handleErr->[AddRateLimited,Infof,Sprintf,NumRequeues,Forget,V,emitDeploymentEvent,HandleError],makeDeployerPod->[makeDeployerContainer,DeployerPodNameForDeployment,DecodeDeploymentConfig,MergeInto],cleanupDeployerPods->[Sprintf,List,Delete,Errorf,IsNotFound,Label... | makeDeployerPod creates a deployer pod from a deployment This function is called by the Deployment. Spec. create method to set the pod object properties. | @kargakis PTAL again, this has to be set to real version (`deployment.APIVersion` is internal so no version...). |
@@ -641,8 +641,8 @@ class TensorCache(MutableMapping[str, Tensor], ABC):
str(filename),
subdir=False,
map_size=map_size,
- max_readers=cpu_count * 2,
- max_spare_txns=cpu_count * 2,
+ max_readers=cpu_count * 4,
+ max_spare_txns=cpu_count... | [_gcs_md5->[_get_gcs_blob],_hf_hub_download->[from_path,_Meta,to_file,FileLock],open_compressed->[cached_path],get_from_cache->[_hf_hub_download,_s3_get,CacheFile,_s3_etag,_Meta,_resource_to_filename,_gcs_md5,FileLock,_http_get,_find_latest_cached,_gcs_get,to_file,_http_etag],_http_get->[_session_with_backoff],cached_p... | Creates a TensorCache object from a given n - b block of data. Load a cache entry from the cache. | Should we have an option to specify the kwargs in `TensorCache`'s init? Or do we want to shield the users from the gory details? |
@@ -186,7 +186,7 @@ void CreatureGroup::MemberAttackStart(Creature* member, Unit* target)
}
}
-void CreatureGroup::FormationReset(bool dismiss)
+void CreatureGroup::FormationReset(bool dismiss, bool initiMotionMaster)
{
if (m_members.size() && m_members.begin()->second->groupAI == 5)
return;
| [MemberAttackStart->[IsValidAttackTarget,end,begin,GetVictim,LOG_DEBUG,GetSpawnId,GetInstanceId,IsAlive,AI],AddCreatureToGroup->[find,AddMember,end,FindMap,LOG_DEBUG,GetInstanceId,GetGUID],RemoveMember->[erase,SetFormation],LeaderMoveTo->[GetSpeedRate,GetMotionMaster,SetHomePosition,GetUnitMovementFlags,fabs,UpdateGrou... | This method is called when a member is attacked. | is initi for initializing? if so I propose using initMotionMaster instead |
@@ -650,8 +650,8 @@ namespace System.Text.RegularExpressions.Generator
var additionalDeclarations = new HashSet<string>();
// Declare some locals.
- string textSpanLocal = "textSpan";
- writer.WriteLine("string runtext = base.runtext!;");
+ string textSpanLoc... | [RegexGenerator->[EmitRegexMethod->[SupportsCodeGeneration],MatchCharacterClass->[UseToLowerInvariant,ToLower],ToLower->[UseToLowerInvariant],ToLowerIfNeeded->[ToLower]]] | EmitGo invokes the Go method that is called by the scanner to emit the code of type This method is used to create a code block that can be used to find the next non The function that emits code for a single node in the tree. | runtextSpan is a local as well, so it's a little strange for this one to be called "localSpan". What if we just call it "slice", since its purpose is to be a subset of runtextSpan? Open to other ideas as well. |
@@ -4,6 +4,7 @@ import (
"reflect"
"strings"
+ pressure "github.com/open-service-mesh/osm/experimental/pkg/apis/policy/v1alpha1"
backpressureClient "github.com/open-service-mesh/osm/experimental/pkg/client/clientset/versioned"
backpressureInformers "github.com/open-service-mesh/osm/experimental/pkg/client/inf... | [GetService->[GetByKey],ListServices->[Msg,Error,List,Err,IsMonitoredNamespace],ListTrafficSplits->[List,IsMonitoredNamespace],ListHTTPTrafficSpecs->[List,IsMonitoredNamespace],run->[Join,Msg,Msgf,WaitForCacheSync,Info,Run],ListServiceAccounts->[List,IsMonitoredNamespace],ListTrafficTargets->[List,IsMonitoredNamespace]... | Imports all of the types of objects that are part of the smi - sdk. NewMeshSpecClient creates a new MeshSpec client for the given OSM object. | rename pressure to backpressure or backpressurePolicy |
@@ -1297,6 +1297,12 @@ public class DeckPicker extends NavigationDrawerActivity implements
}
}
+ public void displayDowngradeFailedNoSpace() {
+ Timber.w("Not enough space to downgrade");
+ showDialogFragment(DeckPickerNoSpaceToDowngradeDialog.newInstance());
+ }
+
+
@VisibleFor... | [DeckPicker->[handleDbError->[showDatabaseErrorDialog],onRequestPermissionsResult->[onRequestPermissionsResult,handleStartup],undo->[undoTaskListener],mediaCheck->[mediaCheckListener],MediaCheckListener->[actualOnPostExecute->[showMediaCheckDialog]],updateDeckList->[updateDeckListListener,updateDeckList],onDestroy->[on... | Shows the startup dialog fragment and dialogs depending on the user s preferences. finds the next version of an application that can be installed or installed. check - checkpoint - upgrade - db - upgrade - preferences - upgrade - db - upgrade - This method is called when the user has changed the version of the applicat... | This isn't actionable for the user, any time I am on a space-constrained device, it really really helps me to know how much space is needed, how much is available and how much remains to be freed for it to succeed. Then I have a goal for freeing space and can free the requirement amount Is it possible to plumb through ... |
@@ -483,14 +483,14 @@ class BinaryInstaller(object):
output = conanfile.output
layout = self._cache.package_layout(pref.ref, conanfile.short_paths)
- package_folder = layout.package(pref)
with layout.package_lock(pref):
if pref not in processed_package_references:
... | [_PackageBuilder->[build_package->[_package,_build,_get_build_folder,_prepare_sources],_get_build_folder->[build_id]],build_id->[build_id],BinaryInstaller->[install->[_build],_propagate_info->[add_env_conaninfo],_download->[_download],_build->[_handle_system_requirements,_download,_raise_missing,_classify],_handle_node... | Handle a node cache. | This is the place of removal of the package folder, instead of inside the ``_build_package()``. This has been changed because the ``set_dirty_context_manager()`` could leave it in an inconsistent state, when removing the package folder, could remove accidentally the .dirty flag. |
@@ -8,7 +8,9 @@ class FollowChecker
end
def cached_follow_check
- RedisRailsCache.fetch("user-#{follower.id}-#{follower.updated_at}/is_following_#{followable_type}_#{followable_id}", expires_in: 20.hours) do
+ return false unless follower
+
+ RedisRailsCache.fetch("user-#{follower.id}-#{follower.update... | [FollowChecker->[cached_follow_check->[fetch,find,updated_at,hours,id,following?],attr_accessor]] | Check if the user is following the followable. | is there a chance for `updated_at` to be nil? |
@@ -178,8 +178,11 @@ class LegendasTvProvider(Provider):
keyword = params.get('title') if params.get('type') == 'movie' else params.get('series')
logger.info('Searching titles using the keyword %s', keyword)
- r = self.session.get('%s/legenda/sugestao/%s' % (self.server_url, keyword), timeout... | [LegendasTvProvider->[search_titles->[matches],list_subtitles->[query],download_subtitle->[extract_subtitle],query->[search_titles,LegendasTvSubtitle,matches]]] | Search for the titles in the legenda sugestao page. Dice um nome de tentae avec nome de tentae de DSC nome and return a list of dicts. Returns the sequence number of the candidates. | This should be `logger.error('Could not search for %s. Error: %r' % (keyword, error))`. |
@@ -44,6 +44,16 @@ public class CountKudaf extends KsqlAggregateFunction<Object, Long> {
return (aggKey, aggOne, aggTwo) -> aggOne + aggTwo;
}
+ @Override
+ public Long subtract(Object currentVal, Long currentAggVal) {
+ return currentAggVal - 1;
+ }
+
+ @Override
+ public boolean implementsSubtract()... | [CountKudaf->[getInstance->[toString,CountKudaf,get],singletonList]] | Get the Merger instance. | should we do this with an interface instead? |
@@ -137,7 +137,8 @@ char *dt_loc_find_install_dir(const char *suffix, const char *searchname)
int dt_loc_init_tmp_dir(const char *tmpdir)
{
- darktable.tmpdir = dt_loc_init_generic(tmpdir, g_get_tmp_dir());
+ darktable.tmpdir = dt_loc_init_generic(tmpdir, NULL, g_get_tmp_dir());
+ dt_check_opendir("darktable.tmp... | [dt_loc_init_plugindir->[dt_loc_init_generic,dt_loc_find_install_dir],dt_loc_init_localedir->[dt_loc_init_generic,dt_loc_find_install_dir],dt_loc_init_tmp_dir->[dt_loc_init_generic],dt_loc_init_user_config_dir->[dt_loc_init_generic],dt_loc_init_user_cache_dir->[dt_loc_init_generic],dt_loc_init_datadir->[dt_loc_init_gen... | dt_loc_init_tmp_dir - Dates loc init. | All errors should be sent to stderr -> fprintf(stderr, ...) And message should not use capital-letter (sorry that's the current convention) and last but not least the messages should be made translatable _(" ... ");. |
@@ -339,8 +339,8 @@ func validateNodeManagerFilters(filters []*common.Filter) error {
switch filter.Key {
case "manager_type":
for _, item := range filter.Values {
- if !isValidManagerType(item) {
- return &errorutils.InvalidError{Msg: fmt.Sprintf("Invalid manager type filter: %s. manager_type must be ... | [GetCredentialFromNodeManager->[GetNodeManager],GetNodeManager] | GetNodeManagers returns a list of node managers that match the given filters. DeleteNodeManagerWithNodes deletes all node managers with the given node id. | we had two functions basically looking at the same thing and i kept getting tripped up on it. figured it's better to just use one! |
@@ -1058,6 +1058,18 @@ public class ParquetIO {
private GenericRecordPassthroughFn() {}
}
+ /** Returns a new Hadoop {@link Configuration} instance with provided flags. */
+ private static SerializableConfiguration makeHadoopConfigurationUsingFlags(
+ Map<String, String> configFlags) {
+ Configurati... | [ParquetIO->[Parse->[from->[from,build],withSplit->[build],expand->[getFilepattern,build]],Read->[expand->[getAvroDataModel,getEncoderSchema,getFilepattern,isSplittable,getProjectionSchema,withAvroDataModel,withProjection],withSplit->[build],populateDisplayData->[populateDisplayData],from->[from,build],withAvroDataMode... | Disallow construction of utility class. | Can we move this method into the SerializableConfiguration class and make it `public static SerializableConfiguration fromMap(Map<String, string> entries) {` |
@@ -57,8 +57,11 @@ class UserSilencer
user_history: @user_history,
post_id: @opts[:post_id],
silenced_till: @user.silenced_till,
- silenced_at: DateTime.now
+ silenced_at: DateTime.now,
+ silence_message_params: silence_message_params
)
+
+ Sys... | [UserSilencer->[unsilence->[unsilence],silence->[silence]]] | Checks if a is present and if so logs it. | Why do you need the splat operator here? |
@@ -16,11 +16,10 @@
# under the License.
from nose.plugins.attrib import attr
-from marvin.cloudstackTestCase import *
-from marvin.cloudstackAPI import *
-from marvin.lib.utils import *
+from marvin.cloudstackTestCase import cloudstackTestCase
+from marvin.lib.utils import cleanup_resources
from marvin.lib.base i... | [TestCARootProvider->[test_issue_certificate_without_csr->[getCaCertificate],test_list_ca_certificate->[getCaCertificate],test_provision_certificate->[checkHostIsUp->[getUpSystemVMHosts],getUpSystemVMHosts],test_issue_certificate_with_csr->[getCaCertificate]]] | Creates a class which is used to setup a specific object. Initialize the object with the API client and database connection. | @Spaceman1984 why do we need changes in this file? |
@@ -223,7 +223,8 @@ abstract class CommonInvoice extends CommonObject
*/
function getLibStatut($mode=0,$alreadypaid=-1)
{
- return $this->LibStatut($this->paye,$this->statut,$mode,$alreadypaid,$this->type);
+ $paiement = $this->getSommePaiement();
+ return $this->LibStatut($this->paye,$this->statut,$mode,$pai... | [CommonInvoice->[getLibStatut->[LibStatut],getListIdAvoirFromInvoice->[fetch_row,query,num_rows],getLibType->[trans],calculate_date_lim_reglement->[free,query,error,num_rows,fetch_object,escape],getSommePaiement->[lasterror,fetch_object,query,free],LibStatut->[trans,load],getIdReplacingInvoice->[fetch_object,query]]] | Get the libstatut object. | Not required. This value must be provided by caller into the second parameter of getLibStatut |
@@ -55,6 +55,8 @@ class SquadReader(DatasetReader):
dataset = dataset_json['data']
logger.info("Reading the dataset")
for article in dataset:
+ #import pdb; pdb.set_trace()
+ self.dijkstra = article['dijkstra']
for paragraph_json in article['paragraphs']... | [SquadReader->[text_to_instance->[debug,append,tokenize,len,make_reading_comprehension_instance,char_span_to_token_span],from_params->[from_params,pop,dict_from_params,cls,assert_empty],__init__->[SingleIdTokenIndexer,super,WordTokenizer],_read->[text_to_instance,cached_path,tokenize,len,zip,question_answer,info,open,l... | Read a file and return a sequence of objects. | Did you mean to leave this in here? |
@@ -51,9 +51,8 @@ class Pindel(MakefilePackage):
#
def edit(self, spec, prefix):
- makefile2 = join_path(self.build_directory, 'Makefile2')
- copyfile(join_path(self.build_directory, 'Makefile'), makefile2)
- myedit = FileFilter(makefile2)
+ install('Makefile', 'Makefile2')
+ ... | [Pindel->[build->[make],install->[install,join_path,mkdirp,copytree],edit->[join_path,FileFilter,copyfile,filter],depends_on,version]] | Edit the Makefile2 and make it if it doesn t exist. | not sure if we really want to use install to copy a file within the build directory |
@@ -19,7 +19,7 @@ Rails.application.configure do
host: Figaro.env.domain_name,
protocol: 'https',
}
- config.action_mailer.asset_host = Figaro.env.mailer_domain_name
+ config.action_mailer.asset_host = Figaro.env.asset_host || Figaro.env.mailer_domain_name
config.action_mailer.raise_delivery_errors = ... | [new,formatter,check_yarn_integrity,default_options,compile,raise_delivery_errors,domain_name,consider_all_requests_local,asset_host,cache_classes,deprecation,dump_schema_after_migration,fallbacks,enabled,delivery_method,email_from,disable_email_sending,eager_load,ignore_actions,default_url_options,present?,serve_stati... | Configures the components of the application. | I don't think this does anything. I didn't see any requests to our servers or Cloudfront when opening up email in QA. |
@@ -355,6 +355,14 @@ func (a *apiServer) putFileObj(objClient obj.Client, request *pfs.PutFileRequest
defer func() {
<-sem
}()
+
+ if strings.HasSuffix(name, "/") {
+ // Amazon S3 supports objs w keys that end in a '/'
+ // PFS needs to treat such a key as a directory.
+ // In this case, ... | [DeleteCommit->[DeleteCommit],ReplayCommit->[ReplayCommit],DeleteRepo->[DeleteRepo],InspectRepo->[InspectRepo],FinishCommit->[FinishCommit],FlushCommit->[FlushCommit],Read->[Read],DeleteFile->[DeleteFile],ForkCommit->[ForkCommit],InspectFile->[InspectFile],putFileObj->[PutFile],GetFile->[GetFile],ListRepo->[ListRepo],C... | putFileObj - put a file object from a remote repository Missing path. | We should probably have some sort of log message about the fact that we're omitting this file. |
@@ -66,11 +66,14 @@ func NewPodEventer(uuid uuid.UUID, cfg *common.Config, client k8s.Interface, pub
logger.Debugf("Initializing a new Kubernetes watcher using node: %v", config.Node)
+ fmt.Println(config.Sharding)
watcher, err := kubernetes.NewWatcher(client, &kubernetes.Pod{}, kubernetes.WatchOptions{
Sync... | [GenerateHints->[GenerateHints],Stop->[Stop],Start->[Start]] | NewPodEventer creates a new eventer that can discover and process pod objects. returns a list of all the node - level objects that are managed by the . | Is this intended? |
@@ -1,4 +1,17 @@
var docs_json = {{ docs_json }};
var render_items = {{ render_items }};
-Bokeh.embed.embed_items(docs_json, render_items{%- if websocket_url -%}, "{{ websocket_url }}" {%- endif -%});
+function do_embed() {
+ Bokeh.embed.embed_items(docs_json, render_items{%- if websocket_url -%}, "{{ websocket_... | [No CFG could be retrieved] | Embeds the docs. json into the bokeh embed. | I think this should be `!==` |
@@ -472,6 +472,11 @@ function getBooleanAttrName(element, name) {
return booleanAttr && BOOLEAN_ELEMENTS[element.nodeName] && booleanAttr;
}
+function getAliasedAttrName(element, name) {
+ var nodeName = element.nodeName;
+ return (nodeName === 'INPUT' || nodeName === 'TEXTAREA') && ALIASED_ATTR[name];
+}
+
fo... | [No CFG could be retrieved] | This is a hack to avoid the JS API bug where the JS API is not available in Remove attribute on element. | I don't know if we still need it for IE9, but there is _nodename helper method to get name in a cross browser happy way |
@@ -1124,6 +1124,10 @@ public class HoodieWriteClient<T extends HoodieRecordPayload> extends AbstractHo
/**
* Deduplicate Hoodie records, using the given deduplication funciton.
+ *
+ * @param records hoodieRecords to deduplicate
+ * @param parallelism parallelism or partitions to be used while reducing/... | [HoodieWriteClient->[doRollbackAndGetStats->[rollback],rollbackInflightCompaction->[rollback],startCommitWithTime->[startCommit],runCompaction->[compact,commitCompaction],rollbackInternal->[doRollbackAndGetStats,startContext,finishRollback],startCommit->[startCommit],rollbackPendingCommits->[rollback],bulkInsert->[bulk... | Deduplicate records that have a key and data that are not in the partitionPath. | typo funciton -> function |
@@ -55,7 +55,9 @@ public class RewindableRotatingFileOutputStream extends RewindableFileOutputStre
File fi = getNumberedFileName(i);
if (fi.exists()) {
File next = getNumberedFileName(i+1);
- next.delete();
+ if (!next.delete()){
+ ... | [RewindableRotatingFileOutputStream->[rewind->[getNumberedFileName,rewind]]] | Move all missing files in the list to the next file in the list. | Why do you think that this behaviour is right? |
@@ -13,7 +13,6 @@ import (
)
func SkipIfRemote() {
- ginkgo.Skip("This function is not enabled for remote podman")
}
func SkipIfRootless() {
| [setDefaultRegistriesConfigEnv->[Setenv,Join],setRegistriesConfigEnv->[Setenv,Join,WriteFile],PodmanAsUser->[PodmanAsUserBase],RestoreArtifact->[Printf,Join,Sprintf,Replace,Podman,Split,Wait],makeOptions->[Sprintf,Split,Getenv,LookupEnv],Podman->[PodmanBase],Skip,Setenv,Geteuid] | Podman is the main method of the podman integration. makeOptions assembles all the podman main options. | Why are you deleting this line? |
@@ -406,7 +406,7 @@ namespace Microsoft.Xna.Framework.Graphics
{ CompareFunction.Greater, DepthFuncMode.Greater },
{ CompareFunction.LessEqual, DepthFuncMode.LEqual },
{ CompareFunction.Less, DepthFuncMode.Less },
- { CompareFunction.NotEqua... | [DepthStencilState->[GraphicsDeviceResetting->[GraphicsDeviceResetting]]] | This method is used to perform a stencil operation on the specified device. Attributes that can be used to determine depth and stencil. | How did this compile at all before? Is `DepthFuncMode.NotEequal` a real enum value? |
@@ -594,8 +594,9 @@ export class VideoDocking {
}
const {element} = video;
- const {intersectionRect} = element.getIntersectionChangeEntry();
- if (!isSizedRect(intersectionRect)) {
+ const clientRect = element.getBoundingClientRect();
+ const intersectionRect = rectIntersection(clientRect, this... | [No CFG could be retrieved] | Gets the video s target when a video should be docked. Checks if the element s scroll adjusted rect is in the DOM and if so updates it. | We don't have a better way to say "is element within viewport"? |
@@ -1241,7 +1241,17 @@ MAX_FILEPATH_LENGTH = 250
ATTACHMENT_HOST = config('ATTACHMENT_HOST', default='mdn.mozillademos.org')
ATTACHMENTS_CACHE_CONTROL_MAX_AGE = config(
'ATTACHMENTS_CACHE_CONTROL_MAX_AGE',
- default=300,
+ default=60 * 5,
+ cast=int
+)
+CODE_SAMPLES_CACHE_CONTROL_MAX_AGE = config(
+ ... | [pipeline_one_scss->[pipeline_scss],_get_locales->[path],enable_candidate_languages,path,_get_locales,pipeline_scss] | Config variables for the n - tuple. The size of the thumbnail in pixels and the image size in pixels. | I know we already have a setting for ``ATTACHMENTS_CACHE_CONTROL_MAX_AGE``, but I'm having a hard time imagining why we'd have different values for these in different environments. Do you have a use case in mind? Otherwise, it seems simpler to have the values in the decorator. |
@@ -256,6 +256,16 @@ public class PlanBuilder
}
public LimitNode limit(long limit, List<Symbol> tiesResolvers, PlanNode source)
+ {
+ return limit(limit, tiesResolvers, false, ImmutableList.of(), source);
+ }
+
+ public LimitNode limit(long limit, boolean partial, List<Symbol> preSortedInput... | [PlanBuilder->[except->[except],join->[join],intersect->[intersect],tableWriter->[tableWriter],values->[values],OutputBuilder->[column->[column]],tableScan->[tableScan],AggregationBuilder->[singleGroupingSet->[singleGroupingSet],addAggregation->[addAggregation]],indexJoin->[indexJoin],rowNumber->[rowNumber],spatialJoin... | Creates a LimitNode. | These can all go in the same line |
@@ -259,6 +259,13 @@ public class BasicOzoneFileSystem extends FileSystem {
private FSDataOutputStream createOutputStream(String key, short replication,
boolean overwrite, boolean recursive) throws IOException {
+ boolean isRatisStreamingEnabled = getConf().getBoolean(
+ OzoneConfigKeys.DFS_CONTAI... | [BasicOzoneFileSystem->[listFiles->[listFiles,incrementCounter],mkdirs->[mkdir,incrementCounter],fixRelativePart->[fixRelativePart],getFileChecksum->[getFileChecksum,incrementCounter],close->[close],rename->[RenameIterator,incrementCounter,rename],getDelegationToken->[getDelegationToken],listStatus->[incrementCounter],... | Create a new output stream for a file. | Let's use a different conf, say OZONE_FS_DATASTREAM_ENABLE. OzoneConfigKeys.DFS_CONTAINER_RATIS_DATASTREAM_ENABLE is for container. |
@@ -1272,6 +1272,8 @@ func bindResource(token string, spec ResourceSpec, types *types) (*Resource, err
return nil, errors.Wrap(err, "failed to bind properties")
}
+ // TODO: Do we need to extend StateInputs to accept either an ObjectType or ResourceType?
+ // This might require a new interface type.
var sta... | [bindProperties->[bindType],bindEnumTypeDetails->[bindType],bindObjectType->[bindObjectTypeDetails],bindType->[String,bindType,bindPrimitiveType],bindEnumType->[bindEnumTypeDetails],bindObjectTypeDetails->[bindProperties],String->[String],bindProperties,bindEnumTypeDetails,bindObjectType,ImportLanguages,bindObjectTypeD... | Bind complex types to the object types. bindProvider binds a resource provider to a resource spec. | Nope, `StateInputs` should just be an `ObjectType`: it's describing the shape of the inputs to the resource's `.get` function. |
@@ -392,6 +392,9 @@ def read_forward_solution(fname, force_fixed=False, surf_ori=False,
surf_ori : bool, optional (default False)
Use surface-based source coordinate system? Note that force_fixed=True
implies surf_ori=True.
+ use_cps : bool
+ Whether to use cortical patch statistics to ... | [_do_forward_solution->[copy,read_forward_solution],compute_depth_prior->[_restrict_gain_matrix],restrict_forward_to_label->[is_fixed_orient],_apply_forward->[is_fixed_orient,_stc_src_sel],apply_forward_raw->[_fill_measurement_info,_apply_forward],apply_forward->[_fill_measurement_info,_apply_forward],_inv_block_diag->... | Read a forward solution from a. k. a. lead field file. Read source - space HEMI tag. transform_surface_to transform the source space to the HEAD or MRI coordinate frame This function takes a source space and transforms it into a forward solution that is a subset of. | I wonder if we should instead deprecated `force_fixed` and `surf_ori` here and tell people to use `convert_forward_solution` afterward. @agramfort is the deduplication worth it? |
@@ -570,8 +570,8 @@ public:
return 0;
SoundBuffer *buf = getFetchBuffer(name);
if(!buf){
- infostream<<"OpenALSoundManager: \""<<name<<"\" not found."
- <<std::endl;
+ infostream << "OpenALSoundManager: \""<<name<<"\" not found."
+ << std::endl;
return -1;
}
int handle = -1;
| [No CFG could be retrieved] | Reads a buffer from a file and plays it if it is a valid sound. Play a sound. | Needs spaces around all `<<` EDIT: Same for L598 |
@@ -181,4 +181,10 @@ public class JobExecutionEngine {
}
}
}
+
+ private void setupMetrics() {
+ execution_successful = metricRegistry.counter(MetricRegistry.name(getClass(), "executions", "successful"));
+ execution_failed = metricRegistry.counter(MetricRegistry.name(getClas... | [JobExecutionEngine->[execute->[execute,cleanup],handleTrigger->[create],executeJob->[execute,create]]] | Execute a job. | If we inline this method and create the metric fields inside the constructor, we could get rid of the `metricRegistry` field. Calling methods inside a constructor can also be tricky because the object might not be completely initialized. If the `setupMetrics()` call would be moved above the `this.metricRegistry = metri... |
@@ -44,6 +44,12 @@ void AddDofsToPython(pybind11::module& m)
.def("Fix", &Dof<double>::FixDof)
.def("Free", &Dof<double>::FreeDof)
.def("IsFixed", &Dof<double>::IsFixed)
+ .def("__lt__", [](Dof<double>& dof1, Dof<double>& dof2){return dof1<dof2; })
+ .def("__gt__", [](Dof<double>& dof1, Dof<double... | [AddDofsToPython->[class_<Dof<double>>,GetSolutionStepValue,Pointer>]] | Add Dof to Python module. Protected protected methods. | this is just to allow sorting dofs in python, a feature i will need for the next step i am planning |
@@ -123,6 +123,13 @@ public class TerminalInterpreter extends KerberosInterpreter {
}
}
setParagraphConfig();
+ Properties properties = getProperties();
+ String strIpMapping = properties.getProperty("zeppelin.terminal.ip.mapping");
+ if (!StringUtils.isEmpty(strIpMapping)) {
+ Gson gson ... | [TerminalInterpreter->[close->[close],open->[open],internalInterpret->[setParagraphConfig]]] | This method is called when the interpreter is invoked. | gson could be a static variable so that we don't need to create it for each call. |
@@ -250,6 +250,7 @@ class SampleDatatable < AjaxDatatablesRails::Base
:sanitize_sql_array,
["position((',' || samples.id || ',') in ?)",
ids.join(',') + ','] )
+
records.where(id: ids).order(order_by_inde... | [SampleDatatable->[searchable_columns->[filter_search_array,push],assigned_cell->[include?],custom_fields_sort_by->[count],data->[assigned_cell,edit_sample_path,nil?,id,created_at,auto_link,custom_field_id,value,full_name,sample_path,color,each,t,name,l,map],sortable_columns->[push],escape_special_chars->[present?,send... | sort records based on the order of the missing records This method is a very elegant solution to sort assigned samples by the number of modules finds a in the database if there are no records in the database return the last found record. | Do we need an empty line here? |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.