patch
stringlengths
17
31.2k
y
int64
1
1
oldf
stringlengths
0
2.21M
idx
int64
1
1
id
int64
4.29k
68.4k
msg
stringlengths
8
843
proj
stringclasses
212 values
lang
stringclasses
9 values
@@ -38,13 +38,15 @@ var PATH_SEPARATOR = process.platform === 'win32' ? ';' : ':'; exports.rmDir = function(path) { return new promise.Promise(function(fulfill, reject) { var numAttempts = 0; + var maxAttempts = 5; + var attemptTimeout = 250; attemptRm(); function attemptRm() { numAttemp...
1
// Copyright 2013 Selenium committers // Copyright 2013 Software Freedom Conservancy // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 /...
1
11,567
Don't penalize everyone with 250ms delay b/c some machines have problems.
SeleniumHQ-selenium
java
@@ -130,7 +130,11 @@ public final class UserUtils { // Match! // reparse the config file log.info("Modification detected, reloading config file " + filename); - configFileMap.get(filename).parseConfigFile(); + try { + configFileMap.get(filename)....
1
package azkaban.user; import com.google.common.base.Preconditions; import com.google.common.collect.HashMultimap; import com.google.common.collect.Multimap; import com.sun.nio.file.SensitivityWatchEventModifier; import java.io.File; import java.io.IOException; import java.nio.file.FileSystems; import java.nio.file.Pat...
1
18,037
This try-catch should be here so that watcher thread doesn't just exit in case of an exception. This change alone would probably be enough to fix the error as well, assuming that there's another `ENTRY_MODIFY` event when the file write is finalized. But of course not a perfect fix because it doesn't protect against pos...
azkaban-azkaban
java
@@ -417,6 +417,9 @@ func (s *Server) sendInternalMsg(sub, rply string, si *ServerInfo, msg interface // Locked version of checking if events system running. Also checks server. func (s *Server) eventsRunning() bool { + if s == nil { + return false + } s.mu.Lock() er := s.running && s.eventsEnabled() s.mu.Unl...
1
// Copyright 2018-2020 The NATS Authors // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to ...
1
12,377
Weird that we have to check for `s == nil` here.. I would instead have fixed the call stack to find out when this gets invoked with a nil server.
nats-io-nats-server
go
@@ -228,7 +228,7 @@ export default Controller.extend({ if (erroredEmails.length > 0) { invitationsString = erroredEmails.length > 1 ? ' invitations: ' : ' invitation: '; message = `Failed to send ${erroredEmails.length} ${invitationsString}`; - message += erroredEmails.join...
1
/* eslint-disable ghost/ember/alias-model-in-controller */ import Controller, {inject as controller} from '@ember/controller'; import DS from 'ember-data'; import RSVP from 'rsvp'; import validator from 'npm:validator'; import {alias} from '@ember/object/computed'; import {computed} from '@ember/object'; import {A as e...
1
9,077
The `import` statement for `Ember` is missing in this file.
TryGhost-Admin
js
@@ -90,7 +90,7 @@ export function diff(dom, parentDom, newVNode, oldVNode, context, isSvg, excessD let s = c._nextState || c.state; if (newType.getDerivedStateFromProps!=null) { oldState = assign({}, c.state); - if (s===c.state) s = assign({}, s); + if (s===c.state) s = c._nextState = assign({}, s); ...
1
import { EMPTY_OBJ, EMPTY_ARR } from '../constants'; import { Component, enqueueRender } from '../component'; import { coerceToVNode, Fragment } from '../create-element'; import { diffChildren } from './children'; import { diffProps } from './props'; import { assign, removeNode } from '../util'; import options from '.....
1
12,771
Awesome :tada: I'd love to have a test case for this so that we don't regress on this feature in any future refactorings :+1:
preactjs-preact
js
@@ -28,7 +28,7 @@ class SeriesDateTimeTest(ReusedSQLTestCase, SQLTestUtils): @property def pdf1(self): - date1 = pd.Series(pd.date_range('2012-1-1 12:00:00', periods=3, freq='M')) + date1 = pd.Series(pd.date_range('2012-1-1 12:45:31', periods=3, freq='M')) date2 = pd.Series(pd.date_ra...
1
# # Copyright (C) 2019 Databricks, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to i...
1
10,173
For testing some of the rounding functions
databricks-koalas
py
@@ -56,6 +56,10 @@ class CurrencyDataFixture extends AbstractReferenceFixture * @see \Shopsys\FrameworkBundle\Migrations\Version20180603135342 */ $currencyCzk = $this->currencyFacade->getById(1); + $currencyData = $this->currencyDataFactory->createFromCurrency($currencyCzk); + ...
1
<?php declare(strict_types=1); namespace Shopsys\ShopBundle\DataFixtures\Demo; use Doctrine\Common\Persistence\ObjectManager; use Shopsys\FrameworkBundle\Component\DataFixture\AbstractReferenceFixture; use Shopsys\FrameworkBundle\Component\Domain\Domain; use Shopsys\FrameworkBundle\Model\Pricing\Currency\Currency; u...
1
19,743
This should be present in UPGRADE notes. Also on currently running projects you should suggest users to update these settings.
shopsys-shopsys
php
@@ -1053,10 +1053,9 @@ func (bdl *backpressureDiskLimiter) reserveBytes( if count < 0 { return count, nil } - // We calculate the total free bytes by adding the reported free bytes and - // the non-`tracker` used bytes. - tracker.updateFree(freeBytes + bdl.overallByteTracker.used - - tracker.usedResources()) + ...
1
// Copyright 2017 Keybase Inc. All rights reserved. // Use of this source code is governed by a BSD // license that can be found in the LICENSE file. package libkbfs import ( "fmt" "math" "sync" "time" "github.com/keybase/client/go/logger" "github.com/keybase/client/go/protocol/keybase1" "github.com/keybase/k...
1
20,508
Are you sure you want to do this? This will affect the working set block cache too, such that it'll now be tracking global free space. It throws off the fraction calculation.
keybase-kbfs
go
@@ -44,6 +44,7 @@ bool CompoundReaderListener::hasReaderAttached(){ return false; } ReaderListener* CompoundReaderListener::getAttachedListener(){ + std::lock_guard<std::mutex> lock(attached_listener_mutex); if(attached_listener != nullptr) return attached_listener; return nullptr;
1
// Copyright 2016 Proyectos y Sistemas de Mantenimiento SL (eProsima). // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless re...
1
12,774
Why would the read access need to be mutexed? The caller might still get a wrong answer since the value might change immediately after the mutex is unlocked before the caller receives the value.
eProsima-Fast-DDS
cpp
@@ -631,6 +631,16 @@ class TabbedBrowser(tabwidget.TabWidget): if config.val.tabs.tabs_are_windows: self.window().setWindowIcon(icon) + @pyqtSlot(usertypes.KeyMode) + def on_mode_entered(self, mode): + """Save input mode when tabs.mode_on_change = restore.""" + input_modes = ...
1
# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et: # Copyright 2014-2018 Florian Bruhin (The Compiler) <mail@qutebrowser.org> # # This file is part of qutebrowser. # # qutebrowser is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free S...
1
20,732
This fits on one line without the parentheses :wink:
qutebrowser-qutebrowser
py
@@ -64,7 +64,7 @@ public class TestCloudRecovery extends SolrCloudTestCase { @Before public void beforeTest() throws Exception { - configureCluster(2) + configureCluster(4) .addConfig("config", TEST_PATH().resolve("configsets").resolve("cloud-minimal").resolve("conf")) .configure();
1
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
1
29,215
Looks like `TestCloudRecovery` changes are unrelated?
apache-lucene-solr
java
@@ -10,16 +10,14 @@ declare(strict_types = 1); namespace Ergonode\Attribute\Persistence\Dbal\Projector\Attribute; use Doctrine\DBAL\Connection; +use Doctrine\DBAL\DBALException; use Ergonode\Attribute\Domain\Event\Attribute\AttributeHintChangedEvent; use Ergonode\Core\Domain\Entity\AbstractId; -use Ergonode\Event...
1
<?php /** * Copyright © Bold Brand Commerce Sp. z o.o. All rights reserved. * See LICENSE.txt for license details. */ declare(strict_types = 1); namespace Ergonode\Attribute\Persistence\Dbal\Projector\Attribute; use Doctrine\DBAL\Connection; use Ergonode\Attribute\Domain\Event\Attribute\AttributeHintChangedEvent...
1
8,461
Try to separate it to different methods. Invoke is huge :)
ergonode-backend
php
@@ -16,7 +16,7 @@ </thead> <tbody> <% scope.each do |plan| %> - <tr> + <tr id="<%= dom_id(plan) %>"> <td> <%= link_to "#{plan.title.length > 60 ? "#{plan.title[0..59]} ..." : plan.title}", plan_path(p...
1
<div class="table-responsive"> <table class="table table-hover" id="my-plans"> <thead> <tr> <th scope="col"><%= _('Project Title') %>&nbsp;<%= paginable_sort_link('plans.title') %></th> <th scope="col"><%= _('Template') %>&nbsp;<%= paginable_sort_link('tem...
1
18,073
Looks like another spot that would benefit from `truncate`
DMPRoadmap-roadmap
rb
@@ -272,7 +272,7 @@ static mrb_value build_constants(mrb_state *mrb, const char *server_name, size_t mrb_ary_set(mrb, ary, i, lit); } for (; i != H2O_MAX_TOKENS * 2; ++i) { - const h2o_token_t *token = h2o__tokens + i - H2O_MAX_TOKENS; + const h2o_token_t *token = h2...
1
/* * Copyright (c) 2014-2016 DeNA Co., Ltd., Kazuho Oku, Ryosuke Matsumoto, * Masayoshi Takahashi * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to * deal in the Software without restr...
1
14,045
This change is not related to what this PR wanted to fix, but undefined behavior sanitizer warns without this parenthesis because `h2o__tokens + i` overflows.
h2o-h2o
c
@@ -223,7 +223,7 @@ class DocstringParameterChecker(BaseChecker): # skip functions that match the 'no-docstring-rgx' config option no_docstring_rgx = get_global_option(self, "no-docstring-rgx") - if no_docstring_rgx and re.match(no_docstring_rgx, node.name): + if no_docstring_rgx.patte...
1
# Copyright (c) 2014-2015 Bruno Daniel <bruno.daniel@blue-yonder.com> # Copyright (c) 2015-2020 Claudiu Popa <pcmanticore@gmail.com> # Copyright (c) 2016-2019 Ashley Whetter <ashley@awhetter.co.uk> # Copyright (c) 2016 Glenn Matthews <glenn@e-dad.net> # Copyright (c) 2016 Glenn Matthews <glmatthe@cisco.com> # Copyright...
1
16,314
This is actually incorrect and should be the other way around. Going to fix this tomorrow. If `no_docstring_rgx == re.compile("")` no function should be checked, since every function matches the pattern. If `no_docstring_rgx == re.compile("^$")` all functions should be checked.
PyCQA-pylint
py
@@ -95,7 +95,7 @@ def get_spotify_oauth(): """ client_id = current_app.config['SPOTIFY_CLIENT_ID'] client_secret = current_app.config['SPOTIFY_CLIENT_SECRET'] - scope = 'user-read-recently-played' + scope = 'user-read-recently-played user-read-currently-playing' redirect_url = current_app.conf...
1
import pytz from flask import current_app import spotipy.oauth2 from listenbrainz.db import spotify as db_spotify import datetime SPOTIFY_API_RETRIES = 5 class Spotify: def __init__(self, user_id, musicbrainz_id, musicbrainz_row_id, user_token, token_expires, refresh_token, last_updated, active...
1
15,147
Should this be in a config file?
metabrainz-listenbrainz-server
py
@@ -3,13 +3,15 @@ const { eachAsync, executeLegacyOperation, makeInterruptibleAsyncInterval, - BufferPool + BufferPool, + shuffle } = require('../../src/utils'); const { expect } = require('chai'); const sinon = require('sinon'); +const { MongoRuntimeError } = require('../../src/error'); -describe('uti...
1
'use strict'; const { eachAsync, executeLegacyOperation, makeInterruptibleAsyncInterval, BufferPool } = require('../../src/utils'); const { expect } = require('chai'); const sinon = require('sinon'); describe('utils', function () { context('eachAsync', function () { it('should callback with an error', fu...
1
21,411
purely preference, but have you considered using parentheses to indicate that a method is being tested? e.g., `describe('eachAsync()')`
mongodb-node-mongodb-native
js
@@ -449,9 +449,10 @@ ResultCode RocksEngine::createCheckpoint(const std::string& name) { auto checkpointPath = folly::stringPrintf("%s/checkpoints/%s/data", dataPath_.c_str(), name.c_str()); LOG(INFO) << "Target checkpoint path : " << checkpointPath; - if (fs:...
1
/* Copyright (c) 2018 vesoft inc. All rights reserved. * * This source code is licensed under Apache 2.0 License, * attached with Common Clause Condition 1.0, found in the LICENSES directory. */ #include "base/Base.h" #include "kvstore/RocksEngine.h" #include <folly/String.h> #include "fs/FileUtils.h" #include "kv...
1
29,932
Why not return success?
vesoft-inc-nebula
cpp
@@ -3,12 +3,19 @@ namespace Psalm\Report; use Psalm\Config; use Psalm\Internal\Analyzer\DataFlowNodeData; +use Psalm\Internal\Analyzer\IssueData; use Psalm\Report; +use function get_cfg_var; +use function ini_get; +use function strtr; use function substr; class ConsoleReport extends Report { + /** @var s...
1
<?php namespace Psalm\Report; use Psalm\Config; use Psalm\Internal\Analyzer\DataFlowNodeData; use Psalm\Report; use function substr; class ConsoleReport extends Report { public function create(): string { $output = ''; foreach ($this->issues_data as $issue_data) { $output .= $this...
1
11,608
Please use snake_case for properties to keep it consistent with the rest of the codebase.
vimeo-psalm
php
@@ -304,7 +304,9 @@ func New(ctx context.Context, signer beecrypto.Signer, networkID uint64, overlay } s.metrics.HandledStreamCount.Inc() - s.logger.Infof("successfully connected to peer (inbound) %s", i.BzzAddress.ShortString()) + s.logger.Debugf("successfully connected to peer (inbound) %s", i.BzzAddress.Sh...
1
// Copyright 2020 The Swarm Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package libp2p import ( "context" "crypto/ecdsa" "errors" "fmt" "net" "sync" "time" "github.com/ethersphere/bee/pkg/addressbook" "github.com/ether...
1
13,648
i don't understand why we need this change. what information is this providing when running in less than Debug loglevel? I prefer to revert this
ethersphere-bee
go
@@ -170,6 +170,9 @@ public class ExecutionFlowDaoTest { final List<ExecutableFlow> flows = this.executionFlowDao .fetchRecentlyFinishedFlows(RECENTLY_FINISHED_LIFETIME); assertThat(flows.size()).isEqualTo(0); + + //Restore the clock + DateTimeUtils.setCurrentMillisOffset(0); } @Test
1
/* * Copyright 2017 LinkedIn Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to i...
1
16,066
Oh, so this test leaks DateTimeUtils offset? It would be safer to place the reset in an `@After` method to not cause side effects even if the test case fails.
azkaban-azkaban
java
@@ -28,14 +28,6 @@ import { Grid, Cell, Row } from '../../../../../material-components'; import Pagination from './Pagination'; export default function Footer( { tab, footerText } ) { - if ( ! footerText ) { - return ( - <div className="googlesitekit-idea-hub__footer"> - <Pagination tab={ tab } /> - </div> ...
1
/** * Footer component * * Site Kit by Google, Copyright 2021 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unl...
1
40,919
Kind of a nit-pick, but is there no way to solve this while still not rendering an empty div if `footerText` is empty? We could still use the `Row` to maintain the same layout but then only render the `Cell` for the pagination - I think it's possible to use specific classes to horizontally offset?
google-site-kit-wp
js
@@ -23,12 +23,14 @@ import java.util.Objects; public class DomainChangeMessage { // Represent the changed object type - enum ObjectType { + public enum ObjectType { DOMAIN, - ROLE, + ROLE, + GROUP, POLICY, - SERVICE, - ENTITY + SERVICE, ...
1
/* * * * Copyright The Athenz Authors * * * * Licensed under the Apache License, Version 2.0 (the "License"); * * you may not use this file except in compliance with the License. * * You may obtain a copy of the License at * * * * http://www.apache.org/licenses/LICENSE-2.0 * * * * Unless required...
1
6,045
Template is also not an object type so I don't expect to notify on templates. Instead when applying templates, we'll be updating roles/policies/services/groups.
AthenZ-athenz
java
@@ -93,7 +93,8 @@ class iloc(Accessor): rows, cols = index if rows is Ellipsis: rows = slice(None) - data = dataset.interface.iloc(dataset.dataset, (rows, cols)) + + data = dataset.interface.iloc(dataset, (rows, cols)) kdims = dataset.kdims vdims = dataset....
1
from __future__ import absolute_import import warnings import param import numpy as np from .. import util from ..element import Element from ..ndmapping import NdMapping def get_array_types(): array_types = (np.ndarray,) da = dask_array_module() if da is not None: array_types += (da.Array,) ...
1
23,238
Had to fix this to get my tests passing (should have been a new PR sorry).
holoviz-holoviews
py
@@ -91,6 +91,11 @@ type VaultIssuer struct { Server string `json:"server"` // Vault URL path to the certificate role Path string `json:"path"` + // Base64 encoded CA bundle to validate Vault server certificate. Only used + // if the Server URL is using HTTPS protocol. This parameter is ignored for + // plain HTTP...
1
/* Copyright 2018 The Jetstack cert-manager contributors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed...
1
13,914
Small nit, and sorry for not spotting sooner.. this should have `omitempty` on it, else when marshalling nil values into json, it will be `caBundle: null` which trips up some JSON parsers
jetstack-cert-manager
go
@@ -1030,6 +1030,9 @@ class GenericLayoutPlot(GenericCompositePlot): displays the elements in a cartesian grid in scanline order. """ + transpose = param.Boolean(default=False, doc=""" + Whether to transpose the layout when plotting""") + def __init__(self, layout, **params): if not ...
1
""" Public API for all plots supported by HoloViews, regardless of plotting package or backend. Every plotting classes must be a subclass of this Plot baseclass. """ from itertools import groupby, product from collections import Counter, defaultdict import numpy as np import param from ..core import OrderedDict from...
1
16,400
Would be good to say the normal behavior is scanline order (left to right, top to bottom) and that transposing makes it work top to bottom and left to right.
holoviz-holoviews
py
@@ -326,6 +326,17 @@ Photos folder" option in your google drive settings. You can then copy or move the photos locally and use the date the image was taken (created) set as the modification date.`, Advanced: true, + }, { + Name: "use_shared_date", + Default: false, + Help: `Use date file was shared inst...
1
// Package drive interfaces with the Google Drive object storage system package drive // FIXME need to deal with some corner cases // * multiple files with the same name // * files can be in multiple directories // * can have directory loops // * files with / in name import ( "bytes" "context" "crypto/tls" "fmt" ...
1
9,952
Perhaps note here that `--drive-use-created-date` takes precedence if both set?
rclone-rclone
go
@@ -128,7 +128,7 @@ class DynamicRoIHead(StandardRoIHead): bbox_results.update(loss_bbox=loss_bbox) return bbox_results - def update_hyperparameters(self): + def update_hyperparameters(self, eps=1e-15): """Update hyperparameters like IoU thresholds for assigner and beta for S...
1
import numpy as np import torch from mmdet.core import bbox2roi from mmdet.models.losses import SmoothL1Loss from ..builder import HEADS from .standard_roi_head import StandardRoIHead @HEADS.register_module() class DynamicRoIHead(StandardRoIHead): """RoI head for `Dynamic R-CNN <https://arxiv.org/abs/2004.06002>...
1
22,059
Use EPS=1e-15 as that in atss_head or FCOS head.
open-mmlab-mmdetection
py
@@ -40,7 +40,7 @@ func TestBlobSaver(t *testing.T) { tmb, ctx := tomb.WithContext(ctx) saver := &saveFail{ - idx: repository.NewIndex(), + idx: repository.NewMasterIndex(), } b := NewBlobSaver(ctx, tmb, saver, uint(runtime.NumCPU()))
1
package archiver import ( "context" "fmt" "runtime" "sync/atomic" "testing" "github.com/restic/restic/internal/errors" "github.com/restic/restic/internal/repository" "github.com/restic/restic/internal/restic" tomb "gopkg.in/tomb.v2" ) var errTest = errors.New("test error") type saveFail struct { idx re...
1
13,063
Is there a need to replace the Index with a MasterIndex?
restic-restic
go
@@ -389,6 +389,7 @@ func TestExecCommandAgent(t *testing.T) { verifyExecCmdAgentExpectedMounts(t, ctx, client, testTaskId, cid, testContainerName, testExecCmdHostBinDir) pidA := verifyMockExecCommandAgentIsRunning(t, client, cid) + verifyExecAgentRunningStateChange(t, taskEngine) seelog.Infof("Verified mock Exe...
1
// +build linux,sudo // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"). You may // not use this file except in compliance with the License. A copy of the // License is located at // // http://aws.amazon.com/apache2.0/ // // or in t...
1
25,476
are we adding stop state change in a different PR?
aws-amazon-ecs-agent
go
@@ -23,9 +23,9 @@ class PlansController < ApplicationController # Get all of the available funders and non-funder orgs @funders = Org.funder .joins(:templates) - .where(templates: { published: true }).uniq.sort(&:name) + .where(templates: { published: true ...
1
# frozen_string_literal: true class PlansController < ApplicationController include ConditionalUserMailer helper PaginableHelper helper SettingsTemplateHelper after_action :verify_authorized, except: [:overview] def index authorize Plan @plans = Plan.active(current_user).page(1) @organisationa...
1
18,061
How much difference is there between sort and sort_by ?
DMPRoadmap-roadmap
rb
@@ -231,6 +231,7 @@ STATIC int opae_plugin_mgr_initialize_all(void) int res; opae_api_adapter_table *aptr; int errors = 0; + int count = 0; for (aptr = adapter_list; aptr; aptr = aptr->next) {
1
// Copyright(c) 2018, Intel Corporation // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are met: // // * Redistributions of source code must retain the above copyright notice, // this list of conditions and the ...
1
18,522
count doesn't seem to be used. Let's remove it.
OPAE-opae-sdk
c
@@ -18,7 +18,11 @@ module Mongoid # # @since 4.0.0 def cache_table - Thread.current["[mongoid]:query_cache"] ||= {} + if defined?(Mongo::QueryCache) + Mongo::QueryCache.cache_table + else + Thread.current["[mongoid]:query_cache"] ||= {} + end end...
1
# frozen_string_literal: true # encoding: utf-8 module Mongoid # A cache of database queries on a per-request basis. # # @since 4.0.0 module QueryCache class << self # Get the cached queries. # # @example Get the cached queries from the current thread. # QueryCache.cache_table ...
1
12,756
Mongo is a hard dependency for Mongoid. Why do we need an if-statement to if it's defined? We should always use Mongo::QueryCache
mongodb-mongoid
rb
@@ -0,0 +1,6 @@ +class AddFunderAndOrgToPlans < ActiveRecord::Migration + def change + add_reference :plans, :org, foreign_key: true + add_column :plans, :funder_id, :integer, index: true + end +end
1
1
18,842
Does this point out at a ROR funder id? If so, could we get rid of the `funder_name` field on the plan and just use the `name` of the funder with id `funder_id`?
DMPRoadmap-roadmap
rb
@@ -3,8 +3,12 @@ var assert = require('assert'); var fs = require('fs'); var flatbuffers = require('../js/flatbuffers').flatbuffers; +global.flatbuffers = flatbuffers; + var MyGame = require(process.argv[2]).MyGame; +var isTsTest = process.env.FB_TS_TEST ? true : false; + function main() { // First, let's...
1
// Run this using JavaScriptTest.sh var assert = require('assert'); var fs = require('fs'); var flatbuffers = require('../js/flatbuffers').flatbuffers; var MyGame = require(process.argv[2]).MyGame; function main() { // First, let's test reading a FlatBuffer generated by C++ code: // This file was generated from ...
1
17,890
Use !! to cast to bool, rather than the ternary bool antipattern.
google-flatbuffers
java
@@ -145,7 +145,7 @@ func (cmd CmdSnapshots) Execute(args []string) error { tab.Rows = append(tab.Rows, []interface{}{sn.ID()[:plen/2], sn.Time.Format(TimeFormat), sn.Hostname, sn.Paths[0]}) if len(sn.Paths) > 1 { - for _, path := range sn.Paths { + for _, path := range sn.Paths[1:] { tab.Rows = append(...
1
package main import ( "fmt" "io" "os" "sort" "strings" "time" "github.com/restic/restic" "github.com/restic/restic/backend" ) const ( minute = 60 hour = 60 * minute day = 24 * hour week = 7 * day ) type Table struct { Header string Rows [][]interface{} RowFormat string } func NewTable() Ta...
1
6,635
why is it in the list twice to begin with?
restic-restic
go
@@ -890,6 +890,10 @@ void Player::sendPing() return; } + if (pzLocked) { + return; + } + if (!g_creatureEvents->playerLogout(this)) { return; }
1
/** * The Forgotten Server - a free and open-source MMORPG server emulator * Copyright (C) 2019 Mark Samman <mark.samman@gmail.com> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either...
1
19,657
This way you will **never** be kicked while monsters are around you.
otland-forgottenserver
cpp
@@ -22,6 +22,7 @@ import static org.junit.Assert.assertEquals; import org.junit.Before; import org.junit.Test; +import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import java.util.Arrays;
1
// Licensed to the Software Freedom Conservancy (SFC) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The SFC licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you m...
1
19,390
Can you please revert changes to files in the `thoughtworks` package? This is legacy code and we will eventually phase out RC.
SeleniumHQ-selenium
py
@@ -110,5 +110,5 @@ export default function ModulesList( { moduleSlugs } ) { } ModulesList.propTypes = { - moduleSlug: PropTypes.arrayOf( PropTypes.string ).isRequired, + moduleSlugs: PropTypes.arrayOf( PropTypes.string ).isRequired, };
1
/** * ModulesList component. * * Site Kit by Google, Copyright 2021 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * ...
1
41,234
This just fixes an unrelated prop type error, correct?
google-site-kit-wp
js
@@ -1022,7 +1022,7 @@ func (fbo *folderBlockOps) updateWithDirtyEntriesLocked(ctx context.Context, } // Remove cached removals from the copy. - for k := range dirCacheEntry.adds { + for k := range dirCacheEntry.dels { _, ok := dblock.Children[k] if !ok { continue
1
// Copyright 2016 Keybase Inc. All rights reserved. // Use of this source code is governed by a BSD // license that can be found in the LICENSE file. package libkbfs import ( "errors" "fmt" "path/filepath" "time" "github.com/keybase/client/go/logger" "github.com/keybase/client/go/protocol/keybase1" "github.co...
1
16,524
This was a bug in KBFS-2071 -- oops.
keybase-kbfs
go
@@ -82,9 +82,18 @@ type PaymentChannel struct { // payer and payee upon initialization or extension AgreedEol *types.BlockHeight `json:"agreed_eol"` + // Conditions are the set of conditions for redeeming or closing the payment + // channel + Conditions *types.Predicate `json:"conditions"` + // Eol is the actua...
1
package paymentbroker import ( "context" "github.com/ipfs/go-cid" "github.com/ipfs/go-hamt-ipld" cbor "github.com/ipfs/go-ipld-cbor" "github.com/filecoin-project/go-filecoin/abi" "github.com/filecoin-project/go-filecoin/actor" "github.com/filecoin-project/go-filecoin/address" "github.com/filecoin-project/go-...
1
18,892
// Condition is a condition for ... Condition
filecoin-project-venus
go
@@ -207,6 +207,16 @@ describe "National Capital Region proposals" do expect(current_path).to eq("/proposals/#{work_order.proposal.id}") end + it "does not resave unchanged requests" do + visit "/ncr/work_orders/#{work_order.id}/edit" + click_on 'Submit for approval' + visit "/ncr/work_o...
1
describe "National Capital Region proposals" do it "requires sign-in" do visit '/ncr/work_orders/new' expect(current_path).to eq('/') expect(page).to have_content("You need to sign in") end context "when signed in as the requester" do let(:requester) { FactoryGirl.create(:user) } before do ...
1
13,319
Might be good to test that no emails were sent out, either. You should be able to use `deliveries` for this
18F-C2
rb
@@ -80,7 +80,7 @@ public class Connection implements Closeable { serialized.put("sessionId", sessionId); } - LOG.info(JSON.toJson(serialized.build())); + LOG.finest(JSON.toJson(serialized.build())); socket.sendText(JSON.toJson(serialized.build())); if (!command.getSendsResponse() ) {
1
// Licensed to the Software Freedom Conservancy (SFC) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The SFC licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you m...
1
17,119
Right now this is experimental and deeply flaky. We left this at `info` to make debugging user reports a lot easier.
SeleniumHQ-selenium
java
@@ -17,6 +17,11 @@ namespace UpdateVendors //------------------------------------------------------------------------------ "; + private static readonly List<string> FilesToSkip = new List<string>() + { + @"\Serilog\Events\LogEventLevel.cs", + }; + private static readonly st...
1
using System; using System.Collections.Generic; using System.IO; using System.IO.Compression; using System.Linq; using System.Net; using System.Text; using System.Text.RegularExpressions; namespace UpdateVendors { public class Program { private const string AutoGeneratedMessage = @"//------------------...
1
16,507
Is this new list being consumed yet?
DataDog-dd-trace-dotnet
.cs
@@ -18,18 +18,14 @@ import ( "bytes" "encoding/json" "io" - weakrand "math/rand" "net" "net/http" "strconv" - "time" "github.com/caddyserver/caddy/v2" ) func init() { - weakrand.Seed(time.Now().UnixNano()) - caddy.RegisterModule(tlsPlaceholderWrapper{}) }
1
// Copyright 2015 Matthew Holt and The Caddy Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicab...
1
15,725
moved to `errors.go` which is the only places `math/rand` is used in this package
caddyserver-caddy
go
@@ -3,8 +3,8 @@ namespace Shopsys\FrameworkBundle\Component\Error; use AppKernel; -use Shopsys\Environment; use Shopsys\FrameworkBundle\Component\Domain\Domain; +use Shopsys\FrameworkBundle\Component\Environment\EnvironmentType; use Shopsys\FrameworkBundle\Component\Router\DomainRouterFactory; use Symfony\Compon...
1
<?php namespace Shopsys\FrameworkBundle\Component\Error; use AppKernel; use Shopsys\Environment; use Shopsys\FrameworkBundle\Component\Domain\Domain; use Shopsys\FrameworkBundle\Component\Router\DomainRouterFactory; use Symfony\Component\Filesystem\Filesystem; use Symfony\Component\HttpFoundation\Request; use Symfony...
1
9,620
This use is wrong, corrent is: `Shopsys\FrameworkBundle\Component\Environment` It is the same in classes below
shopsys-shopsys
php
@@ -203,6 +203,9 @@ public class RegistrationRequest { if (pendingConfiguration.port != null) { pendingRequest.configuration.port = pendingConfiguration.port; } + if (pendingConfiguration.remoteHost != null) { + pendingRequest.configuration.remoteHost = pendingConfiguration.remoteHost; + } ...
1
// Licensed to the Software Freedom Conservancy (SFC) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The SFC licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you m...
1
15,979
This is not really needed, the line added in `GridNodeConfiguration.java` is what really fixes the `remoteHost` regression.
SeleniumHQ-selenium
rb
@@ -323,11 +323,6 @@ func updateContainerMetadata(metadata *dockerapi.DockerContainerMetadata, contai container.SetLabels(metadata.Labels) } - // Update Volume - if metadata.Volumes != nil { - task.UpdateMountPoints(container, metadata.Volumes) - } - // Set Exitcode if it's not set if metadata.ExitCode != n...
1
// Copyright 2014-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"). You may // not use this file except in compliance with the License. A copy of the // License is located at // // http://aws.amazon.com/apache2.0/ // // or in the "license...
1
20,115
For my understanding, why was this removed?
aws-amazon-ecs-agent
go
@@ -36,14 +36,13 @@ namespace Nethermind.Runner protected override (CommandLineApplication, Func<IConfigProvider>, Func<string>) BuildCommandLineApp() { string pluginsDirectory = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "plugins"); - Console.WriteLine($"Loading plugi...
1
// Copyright (c) 2018 Demerzel Solutions Limited // This file is part of the Nethermind library. // // The Nethermind library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of ...
1
23,064
the whole idea was to display information on the plugin directory in case it was missing - need to add if...else... and display the plugin dir if it is configured (non empty) but cannot be found
NethermindEth-nethermind
.cs
@@ -154,6 +154,11 @@ public class LoginActivity extends BaseActivity implements CustomTabActivityHelp loginView.requestFocus(); return; } + if (TextUtils.isEmpty(password)) { + Toast.makeText(this, getString(R.string.error_field_required), Toast.LENGTH_SHORT).show();...
1
package openfoodfacts.github.scrachx.openfood.views; import android.app.Activity; import android.content.Context; import android.content.Intent; import android.content.SharedPreferences; import android.content.pm.ActivityInfo; import android.hardware.Sensor; import android.hardware.SensorManager; import android.net.Ur...
1
67,089
Can you please set this as an error on the password view, rather than a toast, just to make sure that it is kept consistent. Check out a couple of lines below.
openfoodfacts-openfoodfacts-androidapp
java
@@ -114,7 +114,7 @@ func consumerConnectFlow(t *testing.T, tequilapi *tequilapi_client.Client, consu }) assert.NoError(t, err) - connectionStatus, err = tequilapi.Connect(consumerID, proposal.ProviderID, endpoints.ConnectOptions{true}) + connectionStatus, err = tequilapi.Connect(consumerID, proposal.ProviderID, "...
1
/* * Copyright (C) 2017 The "MysteriumNetwork/node" Authors. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * ...
1
12,600
Shouldn't we pass here a proposal too?
mysteriumnetwork-node
go
@@ -85,5 +85,11 @@ def test_dupe_solid_repo_definition(): }, ) - with pytest.raises(DagsterInvalidDefinitionError): + with pytest.raises(DagsterInvalidDefinitionError) as exc_info: repo.get_all_pipelines() + + assert str(exc_info.value) == ( + 'You have defined two solids named ...
1
from collections import defaultdict import pytest from dagster import ( DagsterInvalidDefinitionError, PipelineDefinition, RepositoryDefinition, SolidDefinition, lambda_solid, ) def create_single_node_pipeline(name, called): called[name] = called[name] + 1 return PipelineDefinition( ...
1
13,195
im not a huge fan of exact text match in these tests, not sure what a good solution is that solves the same problem
dagster-io-dagster
py
@@ -182,6 +182,13 @@ func (s *server) setupRouting() { })), ) + handle("/stamps/topup/{id}/{amount}", web.ChainHandlers( + s.gatewayModeForbidEndpointHandler, + web.FinalHandler(jsonhttp.MethodHandler{ + "PATCH": http.HandlerFunc(s.postageTopUpHandler), + })), + ) + handle("/stewardship/{address}", jsonht...
1
// Copyright 2020 The Swarm Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package api import ( "fmt" "net/http" "strings" "github.com/gorilla/handlers" "github.com/gorilla/mux" "github.com/sirupsen/logrus" "resenje.org/web...
1
15,282
this should _not_ be in the api. all postage APIs have moved to the debugAPI
ethersphere-bee
go
@@ -51,9 +51,13 @@ def _path_hash(path, transform, kwargs): return digest_string(srcinfo) def _is_internal_node(node): - # at least one of an internal nodes children are dicts - # some (group args) may not be dicts - return any(isinstance(x, dict) for x in itervalues(node)) + return not _is_leaf_nod...
1
""" parse build file, serialize package """ from collections import defaultdict, Iterable import importlib import json from types import ModuleType import os import re from pandas.errors import ParserError from six import iteritems, itervalues import yaml from tqdm import tqdm from .const import DEFAULT_BUILDFILE, P...
1
15,492
Including both functions seems like overkill for this PR since only _is_internal_node is ever used. Keep them if you think they'll both be used in the future, but if not, the code will be easier to read if you collapse the logic into a single function.
quiltdata-quilt
py
@@ -41,7 +41,7 @@ func GenerateTestCertificate(path string, certFileName string, keyFileName strin SerialNumber: big.NewInt(1234), Subject: pkix.Name{ Country: []string{"test"}, - Organization: []string{"testor"}, + Organization: []string{"tester"}, }, DNSNames: []string{"localhost"...
1
/* Copyright 2018 The KubeEdge Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, sof...
1
23,303
It seems that the two words mean the same thing.
kubeedge-kubeedge
go
@@ -271,13 +271,13 @@ void RaftPart::start(std::vector<HostAddr>&& peers, bool asLearner) { lastLogId_ = wal_->lastLogId(); lastLogTerm_ = wal_->lastLogTerm(); + term_ = proposedTerm_ = lastLogTerm_; // Set the quorum number quorum_ = (peers.size() + 1) / 2; auto logIdAndTerm = lastCom...
1
/* Copyright (c) 2018 vesoft inc. All rights reserved. * * This source code is licensed under Apache 2.0 License, * attached with Common Clause Condition 1.0, found in the LICENSES directory. */ #include "base/Base.h" #include "kvstore/raftex/RaftPart.h" #include <folly/io/async/EventBaseManager.h> #include <folly...
1
28,204
Do we need to set lastLogTerm_ to committedLogTerm when `lastLogId_ < committedLogId_`, on line 286
vesoft-inc-nebula
cpp
@@ -160,7 +160,8 @@ public class TestAllDictionaries extends LuceneTestCase { try { Dictionary dic = loadDictionary(aff); totalMemory.addAndGet(RamUsageTester.sizeOf(dic)); - totalWords.addAndGet(RamUsageTester.sizeOf(dic.words)); + totalWords.addAndGet( + ...
1
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
1
40,567
About ~7% memory usage increase on average, at most 512KB
apache-lucene-solr
java
@@ -32,6 +32,11 @@ type Response struct { type ResponseWriter interface { io.Writer + // Options for the request/response that this ResponseWriter is attached to. + Options() Options + // TODO(abg) Options should not be attached to the ResponseWriter. Instead + // they should be part of the Handle interface. + /...
1
// Copyright (c) 2016 Uber Technologies, Inc. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge...
1
10,212
Was this too big of a pain to do now?
yarpc-yarpc-go
go
@@ -41,10 +41,10 @@ static train_result call_daal_kernel(const context_cpu& ctx, const int64_t component_count = desc.get_component_count(); auto arr_data = row_accessor<const Float>{ data }.pull(); - array<Float> arr_eigvec{ column_count * component_count }; - array<Float> arr_eigval{ 1 * component_c...
1
/******************************************************************************* * Copyright 2020 Intel Corporation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.o...
1
22,609
Why need to spend time for initializing of array? when will we rewrite the contents anyway? This can take a lot of time in some algorithms. Especially if the filling is in sequential mode.
oneapi-src-oneDAL
cpp
@@ -0,0 +1,5 @@ +class AddResourcesToWorkshops < ActiveRecord::Migration + def change + add_column :workshops, :resources, :text, null: false, default: '' + end +end
1
1
6,835
Can this be `null:false, default: ''` to avoid the nil vs blank issue?
thoughtbot-upcase
rb
@@ -0,0 +1,19 @@ +# frozen_string_literal: true + +test_name "Set root/Administrator password to a known value" do + extend Beaker::HostPrebuiltSteps + + hosts.each do |host| + case host['platform'] + when /windows/ + on host, "passwd #{ENV['WINRM_USER']}", stdin: ENV['WINRM_PASSWORD'] + when /osx/ + ...
1
1
8,508
Had to add this to get macOS to work.
puppetlabs-bolt
rb
@@ -0,0 +1,13 @@ +package azkaban.container; + +import org.junit.Rule; +import org.junit.rules.TemporaryFolder; + + +public class FlowContainerTestBase { + + @Rule + public TemporaryFolder temporaryFolder = new TemporaryFolder(); + + +}
1
1
21,098
What is the usage of this class?
azkaban-azkaban
java
@@ -144,7 +144,7 @@ public class DataFilesTable extends BaseMetadataTable { @Override public CloseableIterable<StructLike> rows() { return CloseableIterable.transform( - ManifestFiles.read(manifest, io).project(schema), + ManifestFiles.read(manifest, io, null, null).project(schema), ...
1
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you ...
1
37,970
Could we keep the original signatures as well, so we do not have to rewrite the method calls everywhere and add `null, null`? I think this could greatly reduce the changes needed in this patch
apache-iceberg
java
@@ -706,6 +706,7 @@ func (tds *TrieDbState) updateTrieRoots(forward bool) ([]common.Hash, error) { if len(v) > 0 { //fmt.Printf("Update storage trie addrHash %x, keyHash %x: %x\n", addrHash, keyHash, v) if forward { + _ = ClearTombstonesForNewStorage(tds.db, cKey) tds.t.Update(cKey, v) ...
1
// Copyright 2019 The go-ethereum Authors // This file is part of the go-ethereum library. // // The go-ethereum library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License...
1
21,452
Ideally this error should not be swallowed (can do in the next PR)
ledgerwatch-erigon
go
@@ -212,9 +212,10 @@ def config(): global _registry_url _registry_url = None -def _update_auth(team, refresh_token): +def _update_auth(team, refresh_token, timeout=None): response = requests.post("%s/api/token" % get_registry_url(team), data=dict( - refresh_token=refresh_token + refresh_t...
1
# -*- coding: utf-8 -*- """ Command line parsing and command dispatch """ from __future__ import print_function from builtins import input # pylint:disable=W0622 from collections import namedtuple from datetime import datetime from functools import partial import gzip import hashlib import json import os import p...
1
16,268
Wait a minute... You're passing it as a POST parameter. There's no way that can work.
quiltdata-quilt
py
@@ -259,6 +259,7 @@ func (w *Workflow) cleanup() { w.LogWorkflowInfo("Error returned from cleanup hook: %s", err) } } + w.LogWorkflowInfo("Workflow %q finished clean up.", w.Name) } func (w *Workflow) genName(n string) string {
1
// Copyright 2017 Google Inc. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by appl...
1
8,933
minor: to be consistent with other logs, either use "cleaning up" (preferred) or "cleanup".
GoogleCloudPlatform-compute-image-tools
go
@@ -23,6 +23,7 @@ PG_ASYNC_LISTEN_COMMIT = False # Redis REDIS_HOST = "redis" REDIS_PORT = 6379 +REDIS_NAMESPACE = "listenbrainz" # Influx DB (main listen store) INFLUX_HOST = "influx"
1
DEBUG = False # set to False in production mode SECRET_KEY = "CHANGE_ME" # DATABASES # Primary database SQLALCHEMY_DATABASE_URI = "postgresql://listenbrainz:listenbrainz@db:5432/listenbrainz" MESSYBRAINZ_SQLALCHEMY_DATABASE_URI = "postgresql://messybrainz:messybrainz@db:5432/messybrainz" POSTGRES_ADMIN_URI="postgr...
1
14,713
Adding the config changes to the consul config template `consul_config.py.ctmpl` would be helpful too.
metabrainz-listenbrainz-server
py
@@ -56,7 +56,7 @@ import org.hibernate.validator.constraints.NotEmpty; public class Dataverse extends DvObjectContainer { public enum DataverseType { - RESEARCHERS, RESEARCH_PROJECTS, JOURNALS, ORGANIZATIONS_INSTITUTIONS, TEACHING_COURSES, UNCATEGORIZED + RESEARCHERS, RESEARCH_PROJECTS, JOURNALS, ...
1
package edu.harvard.iq.dataverse; import edu.harvard.iq.dataverse.authorization.DataverseRole; import edu.harvard.iq.dataverse.search.savedsearch.SavedSearch; import java.util.ArrayList; import java.util.Iterator; import java.util.List; import java.util.Objects; import java.util.Set; import javax.persistence.CascadeTy...
1
35,004
While we're at it should we add Department? See Dataverse Category: Add Department #2829
IQSS-dataverse
java
@@ -43,7 +43,12 @@ module Selenium def text @bridge.getAlertText end + + def authenticate(username, password) + @bridge.setAuthentication username: username, password: password + accept + end end # Alert end # WebDriver -end # Selenium +end # Selenium
1
# encoding: utf-8 # # Licensed to the Software Freedom Conservancy (SFC) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The SFC licenses this file # to you under the Apache License, Version 2.0 (the # "Li...
1
13,040
Files should have an extra line at the end of them.
SeleniumHQ-selenium
py
@@ -22,13 +22,14 @@ function detachedClone(vnode) { if (vnode) { vnode = assign({}, vnode); vnode._component = null; + vnode._original = vnode; vnode._children = vnode._children && vnode._children.map(detachedClone); } return vnode; } // having custom inheritance instead of a class here saves a lot ...
1
import { Component, createElement, options } from 'preact'; import { assign } from './util'; const oldCatchError = options._catchError; options._catchError = function(error, newVNode, oldVNode) { if (error.then) { /** @type {import('./internal').Component} */ let component; let vnode = newVNode; for (; (vnod...
1
15,372
TODO: check whether this is needed or not
preactjs-preact
js
@@ -48,8 +48,12 @@ type Config struct { Aliases map[string]string `yaml:"aliases"` } -// ReadConfig represents the current config read from local -var ReadConfig Config +var ( + // ReadConfig represents the current config read from local + ReadConfig Config + // IsInsecure represents the connect option of grpc di...
1
// Copyright (c) 2019 IoTeX // This is an alpha (internal) release and is not suitable for production. This source code is provided 'as is' and no // warranties are given as to title or non-infringement, merchantability or fitness for purpose and, to the extent // permitted by law, all liability for your use of the cod...
1
17,367
`ReadConfig` is a global variable (from `gochecknoglobals`)
iotexproject-iotex-core
go
@@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. // +//go:build !cgo // +build !cgo package ptrace
1
// Copyright 2021 Chaos Mesh Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to...
1
26,519
This is duplicated with `+build !cgo`?
chaos-mesh-chaos-mesh
go
@@ -34,7 +34,7 @@ module Selenium driver.manage.timeouts.implicit_wait = 6 driver.find_element(id: 'adder').click - driver.find_element(id: 'box0') + expect { driver.find_element(id: 'box0') }.not_to raise_error(WebDriver::Error::NoSuchElementError) end it '...
1
# frozen_string_literal: true # Licensed to the Software Freedom Conservancy (SFC) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The SFC licenses this file # to you under the Apache License, Version 2.0...
1
16,703
This should just be `.not_to raise_error` otherwise it potentially hides errors
SeleniumHQ-selenium
py
@@ -164,13 +164,17 @@ class DataFrame(_Frame): else: self._metadata = metadata - def _reduce_for_stat_function(self, sfun): + def _reduce_for_stat_function(self, sfun, numeric_only=False): """ Applies sfun to each column and returns a pd.Series where the number of rows eq...
1
# # Copyright (C) 2019 Databricks, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to i...
1
9,880
Line 175 needs to be indented so that it's under `sfun`.
databricks-koalas
py
@@ -21,12 +21,16 @@ namespace Nethermind.Blockchain.Filters.Topics { public class AnyTopic : TopicExpression { - public static readonly AnyTopic Instance = new(); + public static readonly AnyTopic Instance = new(); + + private AnyTopic() { } public override bool Accep...
1
// Copyright (c) 2021 Demerzel Solutions Limited // This file is part of the Nethermind library. // // The Nethermind library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of ...
1
26,214
It looks strange a bit. What is the reason?
NethermindEth-nethermind
.cs
@@ -9,13 +9,17 @@ import java.nio.file.Path; import java.nio.file.PathMatcher; import java.util.Optional; -import static com.github.javaparser.StaticJavaParser.parse; +import static com.github.javaparser.StaticJavaParser.parse;import org.apache.log4j.Logger; + /** * A strategy for discovering the structure of ...
1
package com.github.javaparser.utils; import com.github.javaparser.ParseProblemException; import com.github.javaparser.ast.CompilationUnit; import java.io.FileNotFoundException; import java.nio.file.FileSystems; import java.nio.file.Path; import java.nio.file.PathMatcher; import java.util.Optional; import static com....
1
13,482
Is this one of those `LexicalPreservingPrinter` issues?
javaparser-javaparser
java
@@ -61,6 +61,12 @@ func prettify(v reflect.Value, indent int, buf *bytes.Buffer) { buf.WriteString("\n" + strings.Repeat(" ", indent) + "}") case reflect.Slice: + strtype := v.Type().String() + if strtype == "[]uint8" { + buf.WriteString("<binary>") + break + } + nl, id, id2 := "", "", "" if v.Len...
1
package awsutil import ( "bytes" "fmt" "io" "reflect" "strings" ) // Prettify returns the string representation of a value. func Prettify(i interface{}) string { var buf bytes.Buffer prettify(reflect.ValueOf(i), 0, &buf) return buf.String() } // prettify will recursively walk value v to build a textual // re...
1
8,412
Can we also add the length of the slice here? Some like `<binary> len %d`
aws-aws-sdk-go
go
@@ -7,6 +7,8 @@ package block import ( + "github.com/iotexproject/iotex-core/pkg/log" + "go.uber.org/zap" "google.golang.org/protobuf/proto" "github.com/iotexproject/iotex-proto/golang/iotextypes"
1
// Copyright (c) 2020 IoTeX Foundation // This is an alpha (internal) release and is not suitable for production. This source code is provided 'as is' and no // warranties are given as to title or non-infringement, merchantability or fitness for purpose and, to the extent // permitted by law, all liability for your use...
1
23,495
move this line together to after line 16, group internal packages together
iotexproject-iotex-core
go
@@ -0,0 +1,12 @@ +class CreateFeedbacks < ActiveRecord::Migration + def change + create_table :feedbacks do |t| + t.integer :rating + t.integer :more_info + t.string :uuid + t.string :project_name + + t.timestamps null: false + end + end +end
1
1
8,391
How about using a reference(project_id) instead of project name
blackducksoftware-ohloh-ui
rb
@@ -133,12 +133,14 @@ var ( Explorer: Explorer{ Enabled: false, IsTest: false, + UseRDS: false, Port: 14004, TpsWindow: 10, MaxTransferPayloadBytes: 1024, }, Indexer: Indexer{ Enabled: false, + NodeAddr: "", }...
1
// Copyright (c) 2018 IoTeX // This is an alpha (internal) release and is not suitable for production. This source code is provided 'as is' and no // warranties are given as to title or non-infringement, merchantability or fitness for purpose and, to the extent // permitted by law, all liability for your use of the cod...
1
12,754
File is not `gofmt`-ed with `-s`
iotexproject-iotex-core
go
@@ -235,6 +235,10 @@ public class FileDownloadServiceBean implements java.io.Serializable { dataFile = guestbookResponse.getDataFile(); } } + //For tools to get the dataset and datasetversion ids, we need a full DataFile object (not a findCheapAndEasy() copy) + if(da...
1
package edu.harvard.iq.dataverse; import edu.harvard.iq.dataverse.authorization.AuthenticationServiceBean; import edu.harvard.iq.dataverse.authorization.Permission; import edu.harvard.iq.dataverse.authorization.users.ApiToken; import edu.harvard.iq.dataverse.authorization.users.AuthenticatedUser; import edu.harvard.iq...
1
39,240
@qqmyers this looks fine but have you seen any performance issue here? If so, we could right some helper method like doesExternalToolNeedDataset(externalTool). But if there's trivial performance impact, not worth it.
IQSS-dataverse
java
@@ -37,6 +37,8 @@ #define STATICBOXVERTICALSPACER 10 #define DAYOFWEEKBORDERSIZE 10 +bool usingLocalPrefs; + /////////////////////////////////////////////////////////////////////////// // NOTE: On MS Windows with wxWidgets 3.0, controls inside a wxStaticBox
1
// This file is part of BOINC. // http://boinc.berkeley.edu // Copyright (C) 2015 University of California // // BOINC is free software; you can redistribute it and/or modify it // under the terms of the GNU Lesser General Public License // as published by the Free Software Foundation, // either version 3 of the Licens...
1
11,203
Make this a member variable instead (move to header inside `class` and rename to `m_bUsingLocalPrefs`).
BOINC-boinc
php
@@ -110,7 +110,7 @@ describe('Transactions (spec)', function() { afterEach(() => cleanupAfterSuite(testContext)); testSuite.tests.forEach(testData => { - const maybeSkipIt = testData.skipReason ? it.skip : it; + const maybeSkipIt = testData.skipReason || testSuite.name === 'pin-mon...
1
'use strict'; const Promise = require('bluebird'); const path = require('path'); const fs = require('fs'); const chai = require('chai'); const expect = chai.expect; const EJSON = require('mongodb-extjson'); // mlaunch init --replicaset --arbiter --name rs --hostname localhost --port 31000 --setParameter enableTestCo...
1
15,129
Generally I'd say we should factor this out into something more extensible (check an array of potentially skipped tests, for examples), but since we're likely to remove this soon for scheduled work I think this is fine. What do you think @daprahamian?
mongodb-node-mongodb-native
js
@@ -18,7 +18,7 @@ THE SOFTWARE. */ /* HIT_START - * BUILD: %t %s ../../test_common.cpp NVCC_OPTIONS -std=c++11 + * BUILD: %t %s ../../test_common.cpp NVCC_OPTIONS -std=c++11 EXCLUDE_HIP_PLATFORM clang * TEST: %t * HIT_END */
1
/* Copyright (c) 2015-Present Advanced Micro Devices, Inc. All rights reserved. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, ...
1
8,574
Why are we skipping these tests? they should be passing in HIP-Clang.
ROCm-Developer-Tools-HIP
cpp
@@ -279,9 +279,14 @@ class RandString(RandField): def __mul__(self, n): return self._fix()*n -class RandBin(RandString): +class RandBin(RandString, object): def __init__(self, size=None): - RandString.__init__(self, size, "".join(map(chr, range(256)))) + super(RandBin, self).__init__(...
1
## This file is part of Scapy ## See http://www.secdev.org/projects/scapy for more informations ## Copyright (C) Philippe Biondi <phil@secdev.org> ## This program is published under a GPLv2 license """ Fields that hold random numbers. """ from __future__ import absolute_import import random,time,math from scapy.base_...
1
11,984
I think a "string" in Scapy's spirit (if such a thing exists) is actually a `bytes` object in Python 3 (see `Str*Field`s). So maybe `RandString._fix()` should return a `bytes` object. What do you think?
secdev-scapy
py
@@ -12,6 +12,8 @@ const path = require('path') const fs = require('fs') +const jsdom = require("jsdom"); +const { JSDOM } = jsdom; const srcDir = path.resolve(path.join(__dirname, '..', 'src'))
1
/* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this file, * You can obtain one at http://mozilla.org/MPL/2.0/. */ /** * This file manages the following: * - Lists of files needed to be translated (Which is all top level GRD a...
1
6,239
This can be combined to 1 line, just tested, seems to work.
brave-brave-browser
js
@@ -1404,6 +1404,16 @@ public class BesuCommand implements DefaultCommandValues, Runnable { throw new IllegalStateException( "GoQuorum compatibility mode (enabled) can only be used if genesis file has 'isQuorum' flag set to true."); } + genesisConfigOptions + .getChainId() + ...
1
/* * Copyright ConsenSys AG. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing...
1
23,984
what needs to happen if it is not present?
hyperledger-besu
java
@@ -88,6 +88,11 @@ func (e *deployExecutor) Execute(sig executor.StopSignal) model.StageStatus { return model.StageStatus_STAGE_FAILURE } + chartRepoName := e.deployCfg.Input.HelmChart.Repository + if chartRepoName != "" { + e.deployCfg.Input.HelmChart.Insecure = ds.DeploymentConfig.PipedSpec.IsInsecureChartRep...
1
// Copyright 2020 The PipeCD Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agree...
1
16,630
`DeploymentConfig` is only for deployment configuration not Piped configuration so `ds.DeploymentConfig.PipedSpec` is always nil. Instead of that, you can have Piped config with `e.PipedConfig` because it is placing inside `executor.Input`.
pipe-cd-pipe
go
@@ -1,6 +1,12 @@ # Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. # SPDX - License - Identifier: Apache - 2.0 +# Purpose +# This code example demonstrates how to set the access control list (ACL) on an +# object in an Amazon Simple Storage Solution (Amazon S3) bucket for the given owner. + +# sn...
1
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. # SPDX - License - Identifier: Apache - 2.0 require 'aws-sdk-s3' # Sets the access control list (ACL) on an object in an Amazon S3 # bucket for the given owner. # # Prerequisites: # # - An Amazon S3 bucket. # - An object in the bucket. ...
1
20,551
Simple Storage **Service**
awsdocs-aws-doc-sdk-examples
rb
@@ -35,8 +35,13 @@ namespace OpenTelemetry.Instrumentation.AspNet }); /// <summary> - /// Gets or sets a hook to exclude calls based on domain or other per-request criterion. + /// Gets or sets a Filter function to filter instrumentation for requests on a per request basis. + //...
1
// <copyright file="AspNetInstrumentationOptions.cs" company="OpenTelemetry Authors"> // Copyright The OpenTelemetry Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // htt...
1
16,710
This line doesn't seem to be right?
open-telemetry-opentelemetry-dotnet
.cs
@@ -271,6 +271,7 @@ func (c *CVCController) createVolumeOperation(cvc *apis.CStorVolumeClaim) (*apis // update the cstorvolume reference, phase as "Bound" and desired // capacity cvc.Spec.CStorVolumeRef = volumeRef + cvc.Spec.Policy = volumePolicy.Spec cvc.Status.Phase = apis.CStorVolumeClaimPhaseBound cvc.St...
1
/* Copyright 2019 The OpenEBS Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, soft...
1
17,966
this need to be moved up after getting policy..
openebs-maya
go
@@ -1363,7 +1363,7 @@ data: # GCP Specific - name: GCPInvalidProjectID searchRegexStrings: - - "platform\.gcp\.project.* invalid project ID" + - "platform.gcp.project.* invalid project ID" installFailingReason: GCPInvalidProjectID installFailingMessage: Invalid GCP project ID ...
1
// Code generated for package assets by go-bindata DO NOT EDIT. (@generated) // sources: // config/hiveadmission/apiservice.yaml // config/hiveadmission/clusterdeployment-webhook.yaml // config/hiveadmission/clusterimageset-webhook.yaml // config/hiveadmission/clusterprovision-webhook.yaml // config/hiveadmission/deplo...
1
15,911
I'm curious - is there a way to test these?
openshift-hive
go
@@ -59,10 +59,10 @@ public class MetadataTableUtils { } public static Table createMetadataTableInstance(TableOperations originTableOps, + String catalogName, TableIdentifier originTableIdentifier, ...
1
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you ...
1
25,823
This was broken before as the name of the metadata table started with its type, not catalog.
apache-iceberg
java
@@ -173,6 +173,7 @@ func (di *Dependencies) Bootstrap(nodeOptions node.Options) error { nats_discovery.Bootstrap() log.Infof("Starting Mysterium Node (%s)", metadata.VersionAsString()) + log.Infof("Build information (%s)", metadata.BuildAsString()) if err := nodeOptions.Directories.Check(); err != nil { re...
1
/* * Copyright (C) 2018 The "MysteriumNetwork/node" Authors. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * ...
1
14,327
Maybe remake `VersionAsString()` function, so that that we would have build info in all places
mysteriumnetwork-node
go
@@ -249,6 +249,17 @@ TSSLSocket::~TSSLSocket() { close(); } +bool TSSLSocket::hasPendingDataToRead() { + if (!isOpen()) { + return false; + } + initializeHandshake(); + if (!checkHandshake()) + throw TSSLException("SSL_peek: Handshake is not completed"); + // data may be available in SSL buffers (note:...
1
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you ma...
1
14,086
This should probably say something other than SSL_peek?
apache-thrift
c
@@ -1,7 +1,7 @@ /** - * Search Console module initialization. + * Search console module initialization. * - * Site Kit by Google, Copyright 2019 Google LLC + * Site Kit by Google, Copyright 2020 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in...
1
/** * Search Console module initialization. * * Site Kit by Google, Copyright 2019 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/...
1
28,630
Nitpicking, but this should be capitalized since it's a product name :)
google-site-kit-wp
js
@@ -94,6 +94,16 @@ type TransactionMisc struct { from atomic.Value } +type RawTransactions [][]byte + +func (t RawTransactions) Len() int { + return len(t) +} + +func (t RawTransactions) EncodeIndex(i int, w *bytes.Buffer) { + w.Write(t[i]) +} + func (tm TransactionMisc) Time() time.Time { return tm.time }
1
// Copyright 2014 The go-ethereum Authors // This file is part of the go-ethereum library. // // The go-ethereum library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License...
1
22,816
Why do we need RawTransactions?
ledgerwatch-erigon
go
@@ -37,6 +37,7 @@ import ( "github.com/iotexproject/iotex-core/pkg/log" "github.com/iotexproject/iotex-core/protogen/iotexapi" "github.com/iotexproject/iotex-core/protogen/iotextypes" + "github.com/iotexproject/iotex-core/pkg/util/byteutil" ) var (
1
// Copyright (c) 2019 IoTeX // This is an alpha (internal) release and is not suitable for production. This source code is provided 'as is' and no // warranties are given as to title or non-infringement, merchantability or fitness for purpose and, to the extent // permitted by law, all liability for your use of the cod...
1
15,771
File is not `gofmt`-ed with `-s` (from `gofmt`)
iotexproject-iotex-core
go
@@ -632,7 +632,14 @@ public class NSClientService extends Service { if (sgv.getMills() > latestDateInReceivedData) latestDateInReceivedData = sgv.getMills(); } - Broadcas...
1
package info.nightscout.androidaps.plugins.NSClientInternal.services; import android.app.Service; import android.content.Context; import android.content.Intent; import android.os.Binder; import android.os.Handler; import android.os.HandlerThread; import android.os.IBinder; import android.os.PowerManager; import com.c...
1
29,688
should not be this lessThan15MinAgo ?
MilosKozak-AndroidAPS
java
@@ -1192,6 +1192,13 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Internal.Http return RequestLineStatus.Done; } + catch (DecodingException) + { + RejectRequest(RequestRejectionReason.NonAsciiOrNullCharactersInRequestLine, + Log....
1
// Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Linq; using System.Net; using System.Runtime.Com...
1
11,252
Would it work if we changed the return type of 'RejectRequest*' methods to Exception and instead did `throw RejectRequest(...` ?
aspnet-KestrelHttpServer
.cs