hash stringlengths 40 40 | diff stringlengths 131 26.7k | message stringlengths 7 694 | project stringlengths 5 67 | split stringclasses 1 value | diff_languages stringlengths 2 24 |
|---|---|---|---|---|---|
a88c839daabe9f76be462bbfea401ea2517b3cf7 | diff --git a/test/test_notification_warning.py b/test/test_notification_warning.py
index <HASH>..<HASH> 100755
--- a/test/test_notification_warning.py
+++ b/test/test_notification_warning.py
@@ -43,7 +43,7 @@ class TestConfig(ShinkenTest):
self.sched.actions[n.id] = n
self.sched.put_results(n)
#Should have raised something like "Warning : the notification command 'BADCOMMAND' raised an error (exit code=2) : '[Errno 2] No such file or directory'"
- self.assert_(self.log_match(1, 'BADCOMMAND'))
+ self.assert_(self.log_match(1, u'BADCOMMAND'))
if __name__ == '__main__': | Fix: (a try) to get Jenkins happy with this test and all utf8 things. | Alignak-monitoring_alignak | train | py |
8bab926a590c04f27f28b2df6145b566707bfb6b | diff --git a/manager/state/raft/raft.go b/manager/state/raft/raft.go
index <HASH>..<HASH> 100644
--- a/manager/state/raft/raft.go
+++ b/manager/state/raft/raft.go
@@ -999,6 +999,11 @@ func (n *Node) ProcessRaftMessage(ctx context.Context, msg *api.ProcessRaftMessa
defer n.stopMu.RUnlock()
if n.IsMember() {
+ if msg.Message.To != n.Config.ID {
+ n.processRaftMessageLogger(ctx, msg).Errorf("received message intended for raft_id %x", msg.Message.To)
+ return &api.ProcessRaftMessageResponse{}, nil
+ }
+
if err := n.raftNode.Step(ctx, *msg.Message); err != nil {
n.processRaftMessageLogger(ctx, msg).WithError(err).Debug("raft Step failed")
} | raft: Ignore messages intended for a different member
If a node managed to join raft twice, it would receive messages meant
for both the new and old raft members. There was no check verifying that
the recipient of message is correct. Adding this check makes sure that
if this situation were to arise (perhaps because the leader is an older
version that allows Join to be called twice by the same node), extra
messages meant for a different raft member wouldn't be passed through to
Step and possibly cause a panic. | docker_swarmkit | train | go |
82b2e480e8ccd44df8dd5920e7d624a08601b8e2 | diff --git a/state/environ.go b/state/environ.go
index <HASH>..<HASH> 100644
--- a/state/environ.go
+++ b/state/environ.go
@@ -514,3 +514,13 @@ func assertEnvAliveOp(envUUID string) txn.Op {
var isEnvAliveDoc = bson.D{
{"life", bson.D{{"$in", []interface{}{Alive, nil}}}},
}
+
+func checkEnvLife(st *State) error {
+ env, err := st.Environment()
+ if (err == nil && env.Life() != Alive) || errors.IsNotFound(err) {
+ return errors.New("environment is no longer alive")
+ } else if err != nil {
+ return errors.Annotate(err, "unable to read environment")
+ }
+ return nil
+} | state: added checkEnvLife helper
To be used to evaluate if a txn aborted because of the environment
life assertion. | juju_juju | train | go |
35b20d3dfb6e90b911c2d4a88f0b98e3b1442e14 | diff --git a/src/content/treeView.js b/src/content/treeView.js
index <HASH>..<HASH> 100644
--- a/src/content/treeView.js
+++ b/src/content/treeView.js
@@ -174,6 +174,7 @@ objectExtend(TreeView.prototype, {
}
commands.push("pause");
+ commands.push("store");
commands.sort();
Editor.GENERIC_AUTOCOMPLETE.setCandidates(XulUtils.toXPCOMString(this.editor.getAutoCompleteSearchParam("commandAction")), | added store command
r<I> | SeleniumHQ_selenium | train | js |
3cc7f7693ef99eb3ae4903bfa5598ea4cf29b6d4 | diff --git a/tests/test_examples.py b/tests/test_examples.py
index <HASH>..<HASH> 100755
--- a/tests/test_examples.py
+++ b/tests/test_examples.py
@@ -81,6 +81,9 @@ class ExamplesTestCase(testlib.SDKTestCase):
except:
pass
+ def test_build_dir_exists(self):
+ self.assertTrue(os.path.exists("../build"), 'Run setup.py build, then setup.py dist')
+
def test_binding1(self):
result = run("binding1.py")
self.assertEquals(result, 0) | add a test to check for the build directory | splunk_splunk-sdk-python | train | py |
885ed79448636ce18799cadaeb64e930b7b44e64 | diff --git a/lib/podio/models/form.rb b/lib/podio/models/form.rb
index <HASH>..<HASH> 100644
--- a/lib/podio/models/form.rb
+++ b/lib/podio/models/form.rb
@@ -5,6 +5,7 @@ class Podio::Form < ActivePodio::Base
property :domains, :array
property :field_ids, :array
property :attachments, :boolean
+ property :status, :string
alias_method :id, :form_id
delegate_to_hash :settings, :captcha, :text, :theme, :setter => true
@@ -38,5 +39,13 @@ class Podio::Form < ActivePodio::Base
def find(form_id)
member Podio.connection.get("/form/#{form_id}").body
end
+
+ def disable(form_id)
+ Podio.connection.post("/form/#{form_id}/deactivate").body
+ end
+
+ def enable(form_id)
+ Podio.connection.post("/form/#{form_id}/activate").body
+ end
end
end | Added activate/deactivate method to the form model. | podio_podio-rb | train | rb |
140fc5707a621b8ccbaaeea675fbb7d3e3af1c32 | diff --git a/pyvips/__init__.py b/pyvips/__init__.py
index <HASH>..<HASH> 100644
--- a/pyvips/__init__.py
+++ b/pyvips/__init__.py
@@ -88,7 +88,7 @@ if vips_lib.vips_init(sys.argv[0].encode()) != 0:
logger.debug('Inited libvips')
if not API_mode:
- from pyvips import vdecls
+ from .vdecls import cdefs
major = vips_lib.vips_version(0)
minor = vips_lib.vips_version(1)
@@ -100,7 +100,7 @@ if not API_mode:
'api': False,
}
- ffi.cdef(vdecls.cdefs(features))
+ ffi.cdef(cdefs(features))
from .error import *
diff --git a/pyvips/pyvips_build.py b/pyvips/pyvips_build.py
index <HASH>..<HASH> 100644
--- a/pyvips/pyvips_build.py
+++ b/pyvips/pyvips_build.py
@@ -38,7 +38,7 @@ features = {
'api': True,
}
-from pyvips import vdecls
+import vdecls
# handy for debugging
#with open('vips-source.txt','w') as f: | don't try to import vdecls via pyvips
perhaps this will fix Travis | libvips_pyvips | train | py,py |
f747fcd8f8721147f92a7413f81f759ebbae45f3 | diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -27,7 +27,7 @@ setup_params = dict(
'lxml',
'six',
],
- requires='BeautifulSoup',
+ requires=['BeautifulSoup', 'lxml'],
classifiers=[
'Development Status :: 5 - Production/Stable',
'Intended Audience :: Developers', | lxml in both places | yougov_FogBugzPy | train | py |
44edd17771a552b6f360f79b80a5c215db8573e1 | diff --git a/packages/cozy-stack-client/src/AppCollection.js b/packages/cozy-stack-client/src/AppCollection.js
index <HASH>..<HASH> 100644
--- a/packages/cozy-stack-client/src/AppCollection.js
+++ b/packages/cozy-stack-client/src/AppCollection.js
@@ -32,4 +32,24 @@ export default class AppCollection {
next: false
}
}
+
+ async find() {
+ throw new Error('find() method is not yet implemented')
+ }
+
+ async get() {
+ throw new Error('get() method is not yet implemented')
+ }
+
+ async create() {
+ throw new Error('create() method is not available for applications')
+ }
+
+ async update() {
+ throw new Error('update() method is not available for applications')
+ }
+
+ async destroy() {
+ throw new Error('destroy() method is not available for applications')
+ }
} | feat: ⚠️ Throw error for not available appcollection methods | cozy_cozy-client | train | js |
e39d1b801dbc8a59ad7542ab8d2025b0fc514c19 | diff --git a/pgmpy/tests/test_readwrite/test_XMLBeliefNetwork.py b/pgmpy/tests/test_readwrite/test_XMLBeliefNetwork.py
index <HASH>..<HASH> 100644
--- a/pgmpy/tests/test_readwrite/test_XMLBeliefNetwork.py
+++ b/pgmpy/tests/test_readwrite/test_XMLBeliefNetwork.py
@@ -1,10 +1,13 @@
import unittest
from io import StringIO
+
import numpy as np
import numpy.testing as np_test
+
from pgmpy.readwrite import XMLBeliefNetwork
from pgmpy.models import BayesianModel
from pgmpy.factors import TabularCPD
+from pgmpy.extern import six
try:
from lxml import etree
except ImportError:
@@ -17,6 +20,7 @@ except ImportError:
warnings.warn("Failed to import ElementTree from any known place")
+@unittest.skipIf(six.PY2, "Unicode issues with tests")
class TestXBNReader(unittest.TestCase):
def setUp(self):
string = """<ANALYSISNOTEBOOK NAME="Notebook.Cancer Example From Neapolitan" ROOT="Cancer"> | skip tests for python2 | pgmpy_pgmpy | train | py |
88b1ac2cb048fa1875fb705fb97d2df483e1554f | diff --git a/common-core-open/src/main/java/com/bbn/bue/common/InContextOf.java b/common-core-open/src/main/java/com/bbn/bue/common/InContextOf.java
index <HASH>..<HASH> 100644
--- a/common-core-open/src/main/java/com/bbn/bue/common/InContextOf.java
+++ b/common-core-open/src/main/java/com/bbn/bue/common/InContextOf.java
@@ -1,6 +1,7 @@
package com.bbn.bue.common;
import com.google.common.annotations.Beta;
+import com.google.common.base.Function;
import com.google.common.base.Objects;
import static com.google.common.base.Preconditions.checkNotNull;
@@ -52,4 +53,14 @@ public final class InContextOf<T, CtxT> {
return Objects.equal(this.item, other.item)
&& Objects.equal(this.context, other.context);
}
+
+ public static <F, T, C> Function<InContextOf<F, C>, InContextOf<T, C>> passThroughContext(
+ final Function<F, T> f) {
+ return new Function<InContextOf<F, C>, InContextOf<T, C>>() {
+ @Override
+ public InContextOf<T, C> apply(final InContextOf<F, C> input) {
+ return InContextOf.createXInContextOfY(f.apply(input.item()), input.context());
+ }
+ };
+ }
} | Allow passing functions through InContextOfs | BBN-E_bue-common-open | train | java |
91a49bd8d2359d08da44a0c1f80688c2f904c9ec | diff --git a/store.go b/store.go
index <HASH>..<HASH> 100644
--- a/store.go
+++ b/store.go
@@ -1043,12 +1043,15 @@ func (s *store) SetNames(id string, names []string) error {
}
if rlstore.Exists(id) {
+ defer rlstore.Touch()
return rlstore.SetNames(id, deduped)
}
if ristore.Exists(id) {
+ defer ristore.Touch()
return ristore.SetNames(id, deduped)
}
if rcstore.Exists(id) {
+ defer rcstore.Touch()
return rcstore.SetNames(id, deduped)
}
return ErrLayerUnknown | Mark stores as modified by SetNames()
Use the lockfile to mark that a store's contents need to be reloaded by
other consumers whenever we call SetNames() to update a by-name index. | containers_storage | train | go |
9b507589da6c32aa4a162f2858aa93a276958526 | diff --git a/spyderlib/utils/introspection/jedi_plugin.py b/spyderlib/utils/introspection/jedi_plugin.py
index <HASH>..<HASH> 100644
--- a/spyderlib/utils/introspection/jedi_plugin.py
+++ b/spyderlib/utils/introspection/jedi_plugin.py
@@ -91,6 +91,10 @@ class JediPlugin(IntrospectionPlugin):
calltip = getsignaturefromtext(call_def.doc, name)
argspec = calltip[calltip.find('('):]
docstring = call_def.doc[call_def.doc.find(')') + 3:]
+ elif '(' in call_def.doc.splitlines()[0]:
+ calltip = call_def.doc.splitlines()[0]
+ name = call_def.doc.split('(')[0]
+ docstring = call_def.doc[call_def.doc.find(')') + 3:]
else:
calltip = name + '(...)'
argspec = '()'
@@ -110,7 +114,9 @@ class JediPlugin(IntrospectionPlugin):
mod_name)
argspec = argspec.replace(' = ', '=')
calltip = calltip.replace(' = ', '=')
- doc_info = dict(name=call_def.name, argspec=argspec,
+ debug_print(call_def.name)
+
+ doc_info = dict(name=name, argspec=argspec,
note=note, docstring=docstring, calltip=calltip)
return doc_info | Fix handling of improper calldef.name. | spyder-ide_spyder | train | py |
f5109fdc7a7d0507174573caf1a626fba6195e3b | diff --git a/Tank/Plugins/TotalAutostop.py b/Tank/Plugins/TotalAutostop.py
index <HASH>..<HASH> 100644
--- a/Tank/Plugins/TotalAutostop.py
+++ b/Tank/Plugins/TotalAutostop.py
@@ -21,6 +21,8 @@ class TotalAutostopPlugin(AbstractPlugin, AggregateResultListener):
autostop.add_criteria_class(TotalHTTPCodesCriteria)
autostop.add_criteria_class(TotalNetCodesCriteria)
autostop.add_criteria_class(TotalNegativeHTTPCodesCriteria)
+ autostop.add_criteria_class(TotalNegativeNetCodesCriteria)
+ autostop.add_criteria_class(TotalHTTPTrendCriteria)
def prepare_test(self):
pass | bugfix: include criteria to totalautostop plugin | yandex_yandex-tank | train | py |
c90fd4dc888662599a2f13d60eb39849db926abc | diff --git a/lib/renderer/window-setup.js b/lib/renderer/window-setup.js
index <HASH>..<HASH> 100644
--- a/lib/renderer/window-setup.js
+++ b/lib/renderer/window-setup.js
@@ -121,11 +121,11 @@ module.exports = (ipcRenderer, guestInstanceId, openerId, hiddenPage) => {
}
window.alert = function (message, title) {
- ipcRenderer.sendSync('ELECTRON_BROWSER_WINDOW_ALERT', message, title)
+ ipcRenderer.sendSync('ELECTRON_BROWSER_WINDOW_ALERT', `${message}`, `${title}`)
}
window.confirm = function (message, title) {
- return ipcRenderer.sendSync('ELECTRON_BROWSER_WINDOW_CONFIRM', message, title)
+ return ipcRenderer.sendSync('ELECTRON_BROWSER_WINDOW_CONFIRM', `${message}`, `${title}`)
}
// But we do not support prompt(). | Convert message/title to strings in render process | electron_electron | train | js |
934db0263775b004b3fe422845912393a6cf2366 | diff --git a/app/models/glue/pulp/package.rb b/app/models/glue/pulp/package.rb
index <HASH>..<HASH> 100644
--- a/app/models/glue/pulp/package.rb
+++ b/app/models/glue/pulp/package.rb
@@ -45,6 +45,10 @@ module Glue::Pulp::Package
def nvrea
Util::Package::build_nvrea(self.as_json.with_indifferent_access, false)
end
+
+ def as_json(options = nil)
+ super(options).merge id: id
+ end
end
end | <I>: Add missing id to package json
`katello package list` was showing list without package ids.
<URL> | Katello_katello | train | rb |
2d9b7ea9d5ba6cdc345bb21fcbf2bfee69f3fcfd | diff --git a/proxy.go b/proxy.go
index <HASH>..<HASH> 100644
--- a/proxy.go
+++ b/proxy.go
@@ -81,6 +81,7 @@ func (h *Host) session(c caps) (map[string]interface{}, int) {
if err != nil {
return nil, seleniumError
}
+ defer resp.Body.Close()
var reply map[string]interface{}
err = json.NewDecoder(resp.Body).Decode(&reply)
if err != nil { | Closing request body anyway (related to #<I>) | aerokube_ggr | train | go |
fbaab99f791a383bf4ed4c2d0fa29336101baa3a | diff --git a/test-app/app/src/main/assets/internal/ts_helpers.js b/test-app/app/src/main/assets/internal/ts_helpers.js
index <HASH>..<HASH> 100644
--- a/test-app/app/src/main/assets/internal/ts_helpers.js
+++ b/test-app/app/src/main/assets/internal/ts_helpers.js
@@ -119,9 +119,10 @@
}
}
- global.__native = __native;
- global.__extends = __extends;
- global.__decorate = __decorate;
+ Object.defineProperty(global, "__native", { value: __native });
+ Object.defineProperty(global, "__extends", { value: __extends });
+ Object.defineProperty(global, "__decorate", { value: __decorate });
+
global.JavaProxy = JavaProxy;
global.Interfaces = Interfaces;
-})()
\ No newline at end of file
+})() | feat(typescript): Play nice with tslib (#<I>)
AngularApp started adding tslib in the web pack project.
This PR will set the __native, __extends and __decorate on the global using Object.defineProperty,
so the tslib won't be able to overwrite them.
Ideally adding tslib to a project should bring support for async/await etc. | NativeScript_android-runtime | train | js |
6d8fca1a610c3966275f1fe50dd0bee0d798ea3f | diff --git a/lib/double_entry/line.rb b/lib/double_entry/line.rb
index <HASH>..<HASH> 100644
--- a/lib/double_entry/line.rb
+++ b/lib/double_entry/line.rb
@@ -58,7 +58,6 @@ module DoubleEntry
class Line < ActiveRecord::Base
belongs_to :detail, :polymorphic => true
- before_save :do_validations
def amount
self[:amount] && Money.new(self[:amount], currency)
@@ -152,10 +151,6 @@ module DoubleEntry
private
- def do_validations
- check_balance_will_not_be_sent_negative
- end
-
def check_balance_will_not_be_sent_negative
if self.account.positive_only and self.balance < Money.new(0)
raise AccountWouldBeSentNegative.new(account) | fix merge, remove the callback as per master | envato_double_entry | train | rb |
140dee7c684747a0d6aec79135e927cfafc62e50 | diff --git a/lib/MwbExporter/Core/Model/Column.php b/lib/MwbExporter/Core/Model/Column.php
index <HASH>..<HASH> 100644
--- a/lib/MwbExporter/Core/Model/Column.php
+++ b/lib/MwbExporter/Core/Model/Column.php
@@ -33,7 +33,7 @@ abstract class Column extends Base
protected $isUnique = false;
protected $local;
- protected $foreign;
+ protected $foreigns;
public function __construct($data, $parent)
{
@@ -85,7 +85,10 @@ abstract class Column extends Base
public function markAsForeignReference( \MwbExporter\Core\Model\ForeignKey $foreign)
{
- $this->foreign = $foreign;
+ if($this->foreigns == null) {
+ $this->foreigns = array();
+ }
+ $this->foreigns[] = $foreign;
}
public function getColumnName() | The foreign attribute is replaced by a foreigns attribute to store multiple foreignKey for one column. | mysql-workbench-schema-exporter_mysql-workbench-schema-exporter | train | php |
0d383e6e13ee863e5a22f378e34afc5c431d86d4 | diff --git a/quantecon/models/__init__.py b/quantecon/models/__init__.py
index <HASH>..<HASH> 100644
--- a/quantecon/models/__init__.py
+++ b/quantecon/models/__init__.py
@@ -6,8 +6,10 @@ objects imported here will live in the `quantecon.models` namespace
"""
__all__ = ["AssetPrices", "CareerWorkerProblem", "ConsumerProblem",
- "JvWorker", "LucasTree", "SearchProblem", "GrowthModel"]
+ "JvWorker", "LucasTree", "SearchProblem", "GrowthModel",
+ "solow"]
+from . import solow
from .asset_pricing import AssetPrices
from .career import CareerWorkerProblem
from .ifp import ConsumerProblem | Fixed import statements in __init__.py to include solow module. | QuantEcon_QuantEcon.py | train | py |
f6e8cbe47671ab3ab3a3e4633d9567501c5088af | diff --git a/src/raven.js b/src/raven.js
index <HASH>..<HASH> 100644
--- a/src/raven.js
+++ b/src/raven.js
@@ -4,7 +4,7 @@
// If there is no JSON, we no-op the core features of Raven
// since JSON is required to encode the payload
var _Raven = window.Raven,
- hasJSON = !!(isObject(JSON) && JSON.stringify),
+ hasJSON = !!(typeof JSON === 'object' && JSON.stringify),
lastCapturedException,
lastEventId,
globalServer,
diff --git a/template/_footer.js b/template/_footer.js
index <HASH>..<HASH> 100644
--- a/template/_footer.js
+++ b/template/_footer.js
@@ -4,10 +4,10 @@ if (typeof define === 'function' && define.amd) {
define('raven', function(Raven) {
return (window.Raven = Raven);
});
-} else if (isObject(module)) {
+} else if (typeof module === 'object') {
// browserify
module.exports = Raven;
-} else if (isObject(exports)) {
+} else if (typeof exports === 'object') {
// CommonJS
exports = Raven;
} else { | Fix ReferenceErrors since we can't qualify with `window`
btw, this is the worst language. Fixes #<I> | getsentry_sentry-javascript | train | js,js |
a6b5269346875df10e3a406dd9ee0627dad7b36a | diff --git a/world/components.go b/world/components.go
index <HASH>..<HASH> 100644
--- a/world/components.go
+++ b/world/components.go
@@ -190,6 +190,7 @@ func (maker ComponentMaker) BBS(argv ...string) ifrit.Runner {
maker.Artifacts.Executables["bbs"],
append([]string{
"-address", maker.Addresses.BBS,
+ "-auctioneerAddress", "http://" + maker.Addresses.Auctioneer,
"-etcdCluster", maker.EtcdCluster(),
"-etcdCertFile", maker.SSL.ClientCert,
"-etcdKeyFile", maker.SSL.ClientKey, | Pass auctioneer address to BBS
[#<I>] | cloudfoundry_inigo | train | go |
c056a01a805a69cd95a19709e79037e08e4fff66 | diff --git a/satsearch/search.py b/satsearch/search.py
index <HASH>..<HASH> 100644
--- a/satsearch/search.py
+++ b/satsearch/search.py
@@ -95,7 +95,7 @@ class Search(object):
""" Return Items from collection with matching ids """
col = cls.collection(collection)
items = []
- base_url = urljoin(config.API_URL, 'collections/%s/items' % collection)
+ base_url = urljoin(config.API_URL, 'collections/%s/items/' % collection)
for id in ids:
try:
items.append(Item(cls.query(urljoin(base_url, id)))) | Update search.py
Fixed a bug that the joined url did not include 'items' in the path | sat-utils_sat-search | train | py |
e34003004e90545a9289164434c3baa388cd3f6b | diff --git a/mod/scorm/version.php b/mod/scorm/version.php
index <HASH>..<HASH> 100644
--- a/mod/scorm/version.php
+++ b/mod/scorm/version.php
@@ -24,7 +24,7 @@
defined('MOODLE_INTERNAL') || die();
-$module->version = 2014031700; // The current module version (Date: YYYYMMDDXX).
-$module->requires = 2013110500; // Requires this Moodle version.
-$module->component = 'mod_scorm'; // Full name of the plugin (used for diagnostics).
-$module->cron = 300;
+$plugin->version = 2014031700; // The current module version (Date: YYYYMMDDXX).
+$plugin->requires = 2013110500; // Requires this Moodle version.
+$plugin->component = 'mod_scorm'; // Full name of the plugin (used for diagnostics).
+$plugin->cron = 300; | MDL-<I> scorm: revert accidental change of variable module back to plugin | moodle_moodle | train | php |
8a7cb012de24e55c1eed51979860f1e9bbaff9ab | diff --git a/index.js b/index.js
index <HASH>..<HASH> 100644
--- a/index.js
+++ b/index.js
@@ -1,14 +1,16 @@
'use strict';
-/**
- * Module dependences
- */
-
var dateformat = require('dateformat');
+var typeOf = require('kind-of');
+
+module.exports = function(date, format) {
+ if (typeOf(date) !== 'date') {
+ format = date;
+ date = new Date();
+ }
-module.exports = function date(format) {
if (typeof format !== 'string' || format === 'today') {
format = 'mmmm dd, yyyy';
}
- return dateformat(new Date(), format);
-};
\ No newline at end of file
+ return dateformat(date, format);
+}; | support passing an instance of `Date` | helpers_helper-dateformat | train | js |
cfed6916bbcb11169c6a1bdab931a34e6fe33232 | diff --git a/src/frontend/org/voltdb/iv2/SpScheduler.java b/src/frontend/org/voltdb/iv2/SpScheduler.java
index <HASH>..<HASH> 100644
--- a/src/frontend/org/voltdb/iv2/SpScheduler.java
+++ b/src/frontend/org/voltdb/iv2/SpScheduler.java
@@ -1059,6 +1059,14 @@ public class SpScheduler extends Scheduler implements SnapshotCompletionInterest
final CompleteTransactionTask task =
new CompleteTransactionTask(m_mailbox, txn, m_pendingTasks, msg, m_drGateway);
queueOrOfferMPTask(task);
+ } else {
+ // Generate a dummy response message when this site has not seen previous FragmentTaskMessage,
+ // the leader may have started to wait for replicas' response messages.
+ // This can happen in the early phase of site rejoin before replica receiving the snapshot initiation,
+ // it also means this CompleteTransactionMessage message will be dropped because it's after snapshot.
+ final CompleteTransactionResponseMessage resp = new CompleteTransactionResponseMessage(msg);
+ resp.m_sourceHSId = m_mailbox.getHSId();
+ handleCompleteTransactionResponseMessage(resp);
}
} | ENG-<I>: Newly rejoined replica may receive a CompleteTransactionMessage without seeing FragmentTaskMessage from its leader, leading not creating CompleteTransactionTask. The leader may hence start to wait for replica's CompleteTransactionResponseMessage and deadlock the MP transaction in this way. This fix is to generate a dummy CompleteTransactionResponseMessage without going into the site task queue. (#<I>) | VoltDB_voltdb | train | java |
added08c92ecd2476c9f3d58b2442b172b370905 | diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/ConfigurationTest.php b/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/ConfigurationTest.php
index <HASH>..<HASH> 100644
--- a/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/ConfigurationTest.php
+++ b/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/ConfigurationTest.php
@@ -48,6 +48,6 @@ class ConfigurationTest extends \PHPUnit_Framework_TestCase
$config = $processor->process($tree, array($config));
$this->assertFalse(array_key_exists('factory', $config), 'The factory key is silently removed without an exception');
- $this->assertEquals(array(), $config['factories'], 'The factories key is jsut an empty array');
+ $this->assertEquals(array(), $config['factories'], 'The factories key is just an empty array');
}
} | [SecurityBundle] Fixed typo | symfony_symfony | train | php |
f1cc2fe83f401cb4650f585c37702002333f640b | diff --git a/lib/mobility/configuration.rb b/lib/mobility/configuration.rb
index <HASH>..<HASH> 100644
--- a/lib/mobility/configuration.rb
+++ b/lib/mobility/configuration.rb
@@ -5,6 +5,8 @@ Stores shared Mobility configuration referenced by all backends.
=end
class Configuration
+ RESERVED_OPTION_KEYS = %i[backend model_class].freeze
+
# Alias for mobility_accessor (defaults to +translates+)
# @return [Symbol]
attr_accessor :accessor_method
@@ -14,9 +16,18 @@ Stores shared Mobility configuration referenced by all backends.
attr_accessor :query_method
# Default set of options. These will be merged with any backend options
- # when defining translated attributes (with +translates+).
+ # when defining translated attributes (with +translates+). Default options
+ # may not include the keys 'backend' or 'model_class'.
# @return [Hash]
- attr_accessor :default_options
+ attr_reader :default_options
+ def default_options=(options)
+ if (keys = options.keys & RESERVED_OPTION_KEYS).present?
+ raise ReservedOptionKey,
+ "Default options may not contain the following reserved keys: #{keys.join(', ')}"
+ else
+ @default_options = options
+ end
+ end
# Option modules to apply. Defines which module to apply for each option
# key. Order of hash keys/values is important, as this becomes the order in
@@ -70,5 +81,7 @@ Stores shared Mobility configuration referenced by all backends.
locale_accessors: LocaleAccessors
}
end
+
+ class ReservedOptionKey < Exception; end
end
end | Mark some option keys in default options as reserved | shioyama_mobility | train | rb |
9c51a4f7dd2341ab1a430259673d881d18771a28 | diff --git a/addok/config/default.py b/addok/config/default.py
index <HASH>..<HASH> 100644
--- a/addok/config/default.py
+++ b/addok/config/default.py
@@ -77,9 +77,9 @@ RESULTS_FORMATTERS = [
'addok.helpers.formatters.geojson',
]
INDEXERS = [
+ 'addok.helpers.index.housenumbers_indexer',
'addok.helpers.index.fields_indexer',
'addok.helpers.index.filters_indexer',
- 'addok.helpers.index.housenumbers_indexer',
'addok.helpers.index.document_indexer',
]
DEINDEXERS = [ | Move housenumber indexer before field indexer
If it comes later, it will overide the fields boost. | addok_addok | train | py |
842a56dc0c7562130090cb01bdc84346c6925847 | diff --git a/client/python/conductor/conductor.py b/client/python/conductor/conductor.py
index <HASH>..<HASH> 100644
--- a/client/python/conductor/conductor.py
+++ b/client/python/conductor/conductor.py
@@ -47,7 +47,7 @@ class BaseClient(object):
if headers is not None:
theHeader = self.mergeTwoDicts(self.headers, headers)
if body is not None:
- jsonBody = json.dumps(body, ensure_ascii=False)
+ jsonBody = json.dumps(body, ensure_ascii=False).encode('utf8')
resp = requests.post(theUrl, params=queryParams, data=jsonBody, headers=theHeader)
else:
resp = requests.post(theUrl, params=queryParams, headers=theHeader)
@@ -62,7 +62,7 @@ class BaseClient(object):
theHeader = self.mergeTwoDicts(self.headers, headers)
if body is not None:
- jsonBody = json.dumps(body, ensure_ascii=False)
+ jsonBody = json.dumps(body, ensure_ascii=False).encode('utf8')
resp = requests.put(theUrl, params=queryParams, data=jsonBody, headers=theHeader)
else:
resp = requests.put(theUrl, params=queryParams, headers=theHeader) | encode body to utf8 | Netflix_conductor | train | py |
2772cc26f4f3ade45d48f91cebbe01a69833ba38 | diff --git a/nomad/deploymentwatcher/deployment_watcher.go b/nomad/deploymentwatcher/deployment_watcher.go
index <HASH>..<HASH> 100644
--- a/nomad/deploymentwatcher/deployment_watcher.go
+++ b/nomad/deploymentwatcher/deployment_watcher.go
@@ -511,7 +511,10 @@ FAIL:
}
// If permitted, automatically promote this canary deployment
- w.autoPromoteDeployment(updates.allocs)
+ err = w.autoPromoteDeployment(updates.allocs)
+ if err != nil {
+ w.logger.Error("failed to auto promote deployment", "error", err)
+ }
// Create an eval to push the deployment along
if res.createEval || len(res.allowReplacements) != 0 { | log error on autoPromoteDeployment failure | hashicorp_nomad | train | go |
442468c7934fab740124c8a7ddd0fac67b0b5cb6 | diff --git a/src/Router.php b/src/Router.php
index <HASH>..<HASH> 100644
--- a/src/Router.php
+++ b/src/Router.php
@@ -163,17 +163,8 @@ class Router extends Header {
if ($this->home !== null)
return;
$home = dirname($_SERVER['SCRIPT_NAME']);
- // @codeCoverageIgnoreStart
- if ($home === '.')
- # CLI quirks
- $home = '/';
- if ($home[0] != '/')
- # CLI quirks
- $home = '/' . $home;
- // @codeCoverageIgnoreEnd
- if ($home != '/')
- $home = rtrim($home, '/');
- $home = rtrim($home, '/') . '/';
+ $home = !$home || $home[0] != '/'
+ ? '/' : rtrim($home, '/') . '/';
$this->home = $home;
}
@@ -229,11 +220,8 @@ class Router extends Header {
$rpath = parse_url($url)['path'];
# remove home
- if ($rpath != '/') {
+ if ($rpath != '/')
$rpath = substr($rpath, strlen($this->home) - 1);
- if (!$rpath)
- $rpath = '/';
- }
# trim slashes
$rpath = trim($rpath, "/"); | Add default home value to prevent null.
Also remove CLI-specific hack. Let CLI activities do manual home
and host setup. | bfitech_zapcore | train | php |
d9ba4bd6ad97905e2f2db2c03c4f29ca34e96175 | diff --git a/lib/filelib.php b/lib/filelib.php
index <HASH>..<HASH> 100644
--- a/lib/filelib.php
+++ b/lib/filelib.php
@@ -677,7 +677,7 @@ function file_save_draft_area_files($draftitemid, $contextid, $component, $filea
}
// unchanged file or directory - we keep it as is
unset($newhashes[$oldhash]);
- if (!$file->is_directory()) {
+ if (!$oldfile->is_directory()) {
$filecount++;
}
} | MDL-<I> File API: Fixed calculation of the number of current files when merging with the draft area | moodle_moodle | train | php |
cfa59d04d3f16189df4b8e340ec2c5e98046289f | diff --git a/wallet/wsapi/wsapi.go b/wallet/wsapi/wsapi.go
index <HASH>..<HASH> 100644
--- a/wallet/wsapi/wsapi.go
+++ b/wallet/wsapi/wsapi.go
@@ -72,6 +72,8 @@ func handleV2Request(j *factom.JSON2Request) (*factom.JSON2Response, *factom.JSO
resp, jsonError = handleGenerateECAddress(params)
case "generate-factoid-address":
resp, jsonError = handleGenerateFactoidAddress(params)
+ case "import-addresses":
+ resp, jsonError = handleImportAddresses(params)
default:
jsonError = newMethodNotFoundError()
} | added api endpoint for import-addresses | FactomProject_factom | train | go |
88d6cd5368668b0cf203f6363032adc8d166e876 | diff --git a/spec/integration/util/settings.rb b/spec/integration/util/settings.rb
index <HASH>..<HASH> 100755
--- a/spec/integration/util/settings.rb
+++ b/spec/integration/util/settings.rb
@@ -7,9 +7,13 @@ require 'puppet_spec/files'
describe Puppet::Util::Settings do
include PuppetSpec::Files
+ def minimal_default_settings
+ { :noop => {:default => false, :desc => "noop"} }
+ end
+
it "should be able to make needed directories" do
settings = Puppet::Util::Settings.new
- settings.setdefaults :main, :maindir => [tmpfile("main"), "a"]
+ settings.setdefaults :main, minimal_default_settings.update( :maindir => [tmpfile("main"), "a"] )
settings.use(:main)
@@ -18,7 +22,7 @@ describe Puppet::Util::Settings do
it "should make its directories with the corret modes" do
settings = Puppet::Util::Settings.new
- settings.setdefaults :main, :maindir => {:default => tmpfile("main"), :desc => "a", :mode => 0750}
+ settings.setdefaults :main, minimal_default_settings.update( :maindir => {:default => tmpfile("main"), :desc => "a", :mode => 0750} )
settings.use(:main) | Bug #<I> Spec failed due to missing manditory setting in mock
Puppet::Util::Settings#use now requires the :noop setting to exist, and
this test was not providing one in its mocked default structure. | puppetlabs_puppet | train | rb |
c923c7855fa98755cd0e9681246ab3a6693074b9 | diff --git a/eth_abi/grammar.py b/eth_abi/grammar.py
index <HASH>..<HASH> 100644
--- a/eth_abi/grammar.py
+++ b/eth_abi/grammar.py
@@ -405,6 +405,7 @@ TYPE_ALIASES = {
'fixed': 'fixed128x18',
'ufixed': 'ufixed128x18',
'function': 'bytes24',
+ 'byte': 'bytes1',
}
TYPE_ALIAS_RE = re.compile(r'\b({})\b'.format(
diff --git a/tests/test_grammar.py b/tests/test_grammar.py
index <HASH>..<HASH> 100644
--- a/tests/test_grammar.py
+++ b/tests/test_grammar.py
@@ -196,7 +196,7 @@ def test_valid_abi_types(type_str):
'type_str, normalized',
tuple(TYPE_ALIASES.items()) + (
('(int,uint,fixed,ufixed)', '(int256,uint256,fixed128x18,ufixed128x18)'),
- ('(function,function,function)', '(bytes24,bytes24,bytes24)'),
+ ('(function,function,(function,byte))', '(bytes24,bytes24,(bytes24,bytes1))'),
),
)
def test_normalize(type_str, normalized): | Add alias "byte" for "bytes1" | ethereum_eth-abi | train | py,py |
b85703212af2cba44831cf5b135e64d836b637f0 | diff --git a/src/Generators/RouteGenerate.php b/src/Generators/RouteGenerate.php
index <HASH>..<HASH> 100644
--- a/src/Generators/RouteGenerate.php
+++ b/src/Generators/RouteGenerate.php
@@ -19,9 +19,9 @@ class RouteGenerate
*
* @param NamesGenerate
*/
- public function __construct(NamesGenerate $names)
+ public function __construct()
{
- $this->names = $names;
+ $this->names = app()->make('NamesGenerate');
}
/** | refactor RouteGenerate class | amranidev_scaffold-interface | train | php |
a439aa09867a1498c913bdab61a7fab6e8cc648c | diff --git a/lib/nuggets/util/cli.rb b/lib/nuggets/util/cli.rb
index <HASH>..<HASH> 100644
--- a/lib/nuggets/util/cli.rb
+++ b/lib/nuggets/util/cli.rb
@@ -157,11 +157,13 @@ module Util
end
end
- def load_config(file = options[:config] || defaults[:config])
+ def load_config(file = options[:config] || default = defaults[:config])
+ return unless file
+
if ::File.readable?(file)
@config = ::YAML.load_file(file)
- elsif file != defaults[:config]
- quit "No such file: #{file}"
+ else
+ quit "No such file: #{file}" unless default
end
end | lib/nuggets/util/cli.rb (load_config): Complain about missing config file as soon as it's specified, not just when it differs from default. | blackwinter_nuggets | train | rb |
62c7e4df69b34f9b79068bbb12b1c9bcc4e53349 | diff --git a/pkg/api/v1/types.go b/pkg/api/v1/types.go
index <HASH>..<HASH> 100644
--- a/pkg/api/v1/types.go
+++ b/pkg/api/v1/types.go
@@ -2517,9 +2517,9 @@ type PodSpec struct {
// HostAliases is an optional list of hosts and IPs that will be injected into the pod's hosts
// file if specified. This is only valid for non-hostNetwork pods.
// +optional
- // +patchMergeKey=IP
+ // +patchMergeKey=ip
// +patchStrategy=merge
- HostAliases []HostAlias `json:"hostAliases,omitempty" patchStrategy:"merge" patchMergeKey:"IP" protobuf:"bytes,23,rep,name=hostAliases"`
+ HostAliases []HostAlias `json:"hostAliases,omitempty" patchStrategy:"merge" patchMergeKey:"ip" protobuf:"bytes,23,rep,name=hostAliases"`
}
// HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the | fix patchMergyKey to ip instead of IP | kubernetes_kubernetes | train | go |
812ed4af959093fd4dee0edf8348f021e24240fc | diff --git a/mutagen/mp4/__init__.py b/mutagen/mp4/__init__.py
index <HASH>..<HASH> 100644
--- a/mutagen/mp4/__init__.py
+++ b/mutagen/mp4/__init__.py
@@ -311,6 +311,7 @@ class MP4Tags(DictProxy, Tags):
* '\\xa9mvi' -- Movement Index
* 'shwm' -- work/movement
* 'stik' -- Media Kind
+ * 'hdvd' -- HD Video
* 'rtng' -- Content Rating
* 'tves' -- TV Episode
* 'tvsn' -- TV Season
@@ -852,6 +853,7 @@ class MP4Tags(DictProxy, Tags):
b"pcst": (__parse_bool, __render_bool),
b"shwm": (__parse_integer, __render_integer, 1),
b"stik": (__parse_integer, __render_integer, 1),
+ b"hdvd": (__parse_integer, __render_integer, 1),
b"rtng": (__parse_integer, __render_integer, 1),
b"covr": (__parse_cover, __render_cover),
b"purl": (__parse_text, __render_text), | MP4: Add support for iTunes HD Video tag
The atom is named "hdvd", it's an 8 bit integer where:
0 - SD
1 - <I>p
2 - <I>p
iTunes and Apple TV refer to it rather than actual resolution info from
the video stream, so it's a helpful tag to have. | quodlibet_mutagen | train | py |
493203127d9343276fb02e390172d29bd1e795c2 | diff --git a/closure/goog/net/xhrmanager.js b/closure/goog/net/xhrmanager.js
index <HASH>..<HASH> 100644
--- a/closure/goog/net/xhrmanager.js
+++ b/closure/goog/net/xhrmanager.js
@@ -81,6 +81,12 @@ goog.net.XhrManager = function(
goog.isDef(opt_timeoutInterval) ? Math.max(0, opt_timeoutInterval) : 0;
/**
+ * Add credentials to every request.
+ * @private {boolean}
+ */
+ this.withCredentials_ = !!opt_withCredentials;
+
+ /**
* The pool of XhrIo's to use.
* @type {goog.net.XhrIoPool}
* @private
@@ -199,7 +205,9 @@ goog.net.XhrManager.prototype.send = function(
url, goog.bind(this.handleEvent_, this, id), opt_method, opt_content,
opt_headers, opt_callback,
goog.isDef(opt_maxRetries) ? opt_maxRetries : this.maxRetries_,
- opt_responseType, opt_withCredentials);
+ opt_responseType,
+ goog.isDef(opt_withCredentials) ? opt_withCredentials :
+ this.withCredentials_);
this.requests_.set(id, request);
// Setup the callback for the pool. | Added the missing implementation of withCredentials in XhrManager
The behavior is promised in the jsdoc but is not implemented.
RELNOTES: Added the missing implementation of withCredentials in XhrManager
-------------
Created by MOE: <URL> | google_closure-library | train | js |
eb73f80085cd85224b7811886b3b2805c920dbc5 | diff --git a/tools/run_tests/run_tests.py b/tools/run_tests/run_tests.py
index <HASH>..<HASH> 100755
--- a/tools/run_tests/run_tests.py
+++ b/tools/run_tests/run_tests.py
@@ -72,7 +72,7 @@ _FORCE_ENVIRON_FOR_WRAPPERS = {
_POLLING_STRATEGIES = {
- 'linux': ['epoll', 'poll', 'poll-cv']
+ 'linux': ['epollex', 'epoll', 'poll', 'poll-cv']
} | Add epollex polling engine to run_tests.py | grpc_grpc | train | py |
54a898bc31e19809e1a2e955e5261b376367624d | diff --git a/gnsq/reader.py b/gnsq/reader.py
index <HASH>..<HASH> 100644
--- a/gnsq/reader.py
+++ b/gnsq/reader.py
@@ -197,7 +197,7 @@ class Reader(object):
self.on_exception = blinker.Signal()
if message_handler is not None:
- self.on_message.connect(message_handler)
+ self.on_message.connect(message_handler, weak=False)
if max_concurrency < 0:
self.max_concurrency = cpu_count() | Don't store week reference to message_handler. | wtolson_gnsq | train | py |
82676d3340f4daf6dab853fd876aa753730ca431 | diff --git a/src/de/mrapp/android/preference/activity/parser/PreferenceHeaderParser.java b/src/de/mrapp/android/preference/activity/parser/PreferenceHeaderParser.java
index <HASH>..<HASH> 100644
--- a/src/de/mrapp/android/preference/activity/parser/PreferenceHeaderParser.java
+++ b/src/de/mrapp/android/preference/activity/parser/PreferenceHeaderParser.java
@@ -243,8 +243,15 @@ public final class PreferenceHeaderParser {
*/
private static CharSequence parseTitle(final Context context,
final TypedArray typedArray) {
- return parseCharSequence(context, typedArray,
+ CharSequence title = parseCharSequence(context, typedArray,
R.styleable.PreferenceHeader_android_title);
+
+ if (title == null) {
+ throw new RuntimeException(
+ "<header> tag must contain title attribute");
+ }
+
+ return title;
}
/** | A RuntimeException is now thrown, if the title of a preference header is missing. | michael-rapp_AndroidPreferenceActivity | train | java |
915690755684c8ab2656aba3cbdc151ac66e2107 | diff --git a/src/FieldHandlers/RelatedFieldHandler.php b/src/FieldHandlers/RelatedFieldHandler.php
index <HASH>..<HASH> 100644
--- a/src/FieldHandlers/RelatedFieldHandler.php
+++ b/src/FieldHandlers/RelatedFieldHandler.php
@@ -54,9 +54,8 @@ class RelatedFieldHandler extends BaseFieldHandler
$fieldName = $this->_getFieldName($table, $field, $options);
$input = '';
-
+ $input .= '<div class="form-group' . ((bool)$options['fieldDefinitions']['required'] ? ' required' : '') . '">';
$input .= $cakeView->Form->label($field);
-
$input .= '<div class="input-group">';
$input .= '<span class="input-group-addon" title="Auto-complete"><strong>…</strong></span>';
@@ -88,6 +87,7 @@ class RelatedFieldHandler extends BaseFieldHandler
$input .= '</div>';
}
$input .= '</div>';
+ $input .= '</div>';
$input .= $cakeView->Form->input($fieldName, ['type' => 'hidden', 'value' => $data]); | add form-group wrapper and required flag on related fields (task #<I>) | QoboLtd_cakephp-csv-migrations | train | php |
02b2c2a95b6c9e9b089b244280b25c991dd614d0 | diff --git a/lib/profile/index.js b/lib/profile/index.js
index <HASH>..<HASH> 100644
--- a/lib/profile/index.js
+++ b/lib/profile/index.js
@@ -46,6 +46,8 @@ function generate (inputs, opts) {
}
if (typeof(inputs.carbratio) != "undefined") {
profile.carb_ratio = carb_ratios.carbRatioLookup(inputs);
+ } else {
+ console.error("Profile wan't given carb ratio data, cannot calculate carb_ratio");
}
return profile; | Add an error message to console in case carb sensitivity data is missing | openaps_oref0 | train | js |
9a57a0281851b62673fef3e063c3fb7aabde7a1d | diff --git a/tests/test_live.py b/tests/test_live.py
index <HASH>..<HASH> 100644
--- a/tests/test_live.py
+++ b/tests/test_live.py
@@ -24,7 +24,7 @@ class liveTests(unittest.TestCase):
parser=configargparse.getArgumentParser('pynYNAB')
args=parser.parse_known_args()[0]
connection = nYnabConnection(args.email, args.password)
- self.client = nYnabClient(connection, budget_name='My Budget')
+ self.client = nYnabClient(connection, budget_name=args.budgetname)
def setUp(self):
self.reload() | budget name should not default to "My Budget" | rienafairefr_pynYNAB | train | py |
627a1cc1076c5c09f1587e361ec7ed2a752db8d4 | diff --git a/lib/server.js b/lib/server.js
index <HASH>..<HASH> 100644
--- a/lib/server.js
+++ b/lib/server.js
@@ -178,7 +178,14 @@ server.onPhantomPageCreate = function(req, res) {
_this.checkIfPageIsDoneLoading(req, res, req.prerender.status === 'fail');
}, (req.prerender.pageDoneCheckTimeout || _this.options.pageDoneCheckTimeout || PAGE_DONE_CHECK_TIMEOUT));
- req.prerender.page.open(encodeURI(req.prerender.url.replace(/%20/g, ' ')), function(status) {
+ var uri = encodeURI(req.prerender.url.replace(/%20/g, ' '));
+
+ //html5 push state URLs that have an encoded # (%23) need it to stay encoded
+ if(uri.indexOf('#!') === -1) {
+ uri = uri.replace(/#/g, '%23')
+ }
+
+ req.prerender.page.open(uri, function(status) {
req.prerender.status = status;
});
}); | make sure we encode # (%<I>) for html5 push state URLs | prerender_prerender | train | js |
37a05c8e7bda7832660e128ce37cc255caa73376 | diff --git a/src/Provider/Facebook.php b/src/Provider/Facebook.php
index <HASH>..<HASH> 100755
--- a/src/Provider/Facebook.php
+++ b/src/Provider/Facebook.php
@@ -144,7 +144,7 @@ class Facebook extends AbstractProvider
*/
protected function getContentType(ResponseInterface $response)
{
- $type = join(';', (array) $response->getHeader('content-type'));
+ $type = parent::getContentType($response);
// Fix for Facebook's pseudo-JSONP support
if (strpos($type, 'javascript') !== false) { | Add better implementation of content-type fix. Thanks @rtheunissen | thephpleague_oauth2-facebook | train | php |
aff1378e283153622e59923a57cb3b1e5b064a17 | diff --git a/plugins/pretokenise.js b/plugins/pretokenise.js
index <HASH>..<HASH> 100644
--- a/plugins/pretokenise.js
+++ b/plugins/pretokenise.js
@@ -120,7 +120,7 @@
return {
startIdx : tk.start,
endIdx : tk.end,
- str : code.substr(tk.start, tk.end),
+ str : code.substring(tk.start, tk.end),
type : tp
};
}}; | fix issues with hack around acorn parser - eg 'get status' | espruino_EspruinoTools | train | js |
010829f6fb3e0abb20528d62711a488f03d90d3d | diff --git a/code/controllers/CMSPageHistoryController.php b/code/controllers/CMSPageHistoryController.php
index <HASH>..<HASH> 100644
--- a/code/controllers/CMSPageHistoryController.php
+++ b/code/controllers/CMSPageHistoryController.php
@@ -201,7 +201,7 @@ class CMSPageHistoryController extends CMSMain {
),
new CheckboxField(
'CompareMode',
- _t('CMSPageHistoryController.COMPAREMODE', 'Compare mode'),
+ _t('CMSPageHistoryController.COMPAREMODE', 'Compare mode (select two)'),
$compareModeChecked
),
new LiteralField('VersionsHtml', $versionsHtml), | MINOR: added note to select two entries | silverstripe_silverstripe-siteconfig | train | php |
2872f45c17f42be313fb79513862983b63fb001f | diff --git a/xchange-bitmex/src/main/java/org/knowm/xchange/bitmex/BitmexAdapters.java b/xchange-bitmex/src/main/java/org/knowm/xchange/bitmex/BitmexAdapters.java
index <HASH>..<HASH> 100644
--- a/xchange-bitmex/src/main/java/org/knowm/xchange/bitmex/BitmexAdapters.java
+++ b/xchange-bitmex/src/main/java/org/knowm/xchange/bitmex/BitmexAdapters.java
@@ -372,10 +372,10 @@ public class BitmexAdapters {
public static FundingRecord adaptFundingRecord(BitmexWalletTransaction walletTransaction) {
String datePattern = "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'";
-
SimpleDateFormat dateFormat = new SimpleDateFormat(datePattern);
- Date dateFunding = null;
+ dateFormat.setTimeZone(TimeZone.getTimeZone("UTC"));
+ Date dateFunding = null;
if (walletTransaction.getTransactTime() != null) {
try {
dateFunding = dateFormat.parse(walletTransaction.getTransactTime()); | [bitmex] Corrected parsing of FundingRecord timestamp | knowm_XChange | train | java |
9ea6f299c10d62038607ca5ae70194cf4efbf949 | diff --git a/public/assets/js/build-plugins/warnings.js b/public/assets/js/build-plugins/warnings.js
index <HASH>..<HASH> 100644
--- a/public/assets/js/build-plugins/warnings.js
+++ b/public/assets/js/build-plugins/warnings.js
@@ -101,13 +101,12 @@ var warningsPlugin = ActiveBuild.UiPlugin.extend({
var i = 0;
for (var key in self.keys) {
- self.chartData[i].data.push(parseInt(self.data[build][key]));
+
+ self.chartData.datasets[i].data.push(parseInt(self.data[build][key]));
i++;
}
}
- console.log(self.chartData);
-
self.drawChart();
}, | Fix for warnings chart, courtesy of @Henk8 closes #<I> | dancryer_PHPCI | train | js |
f5f8165bf62e8becf31c8f14af26c74504e96467 | diff --git a/lib/rspec/active_model/mocks/mocks.rb b/lib/rspec/active_model/mocks/mocks.rb
index <HASH>..<HASH> 100644
--- a/lib/rspec/active_model/mocks/mocks.rb
+++ b/lib/rspec/active_model/mocks/mocks.rb
@@ -238,7 +238,7 @@ EOM
def stub_model(model_class, stubs={})
model_class.new.tap do |m|
m.extend ActiveModelStubExtensions
- if defined?(ActiveRecord) && model_class < ActiveRecord::Base
+ if defined?(ActiveRecord) && model_class < ActiveRecord::Base && model_class.primary_key
m.extend ActiveRecordStubExtensions
primary_key = model_class.primary_key.to_sym
stubs = {primary_key => next_id}.merge(stubs) | guard against ActiveRecord models with no primary_key (e.g. database view backed models) | rspec_rspec-activemodel-mocks | train | rb |
430ca2289a9914630704f8818aa5787ac7280b54 | diff --git a/app/validators/slug_validator.rb b/app/validators/slug_validator.rb
index <HASH>..<HASH> 100644
--- a/app/validators/slug_validator.rb
+++ b/app/validators/slug_validator.rb
@@ -77,6 +77,11 @@ protected
end
class GovernmentPageValidator < InstanceValidator
+ def url_parts
+ # Some inside govt slugs have a . in them (eg news articles with no english translation)
+ super.map {|part| part.gsub(/\./, '') }
+ end
+
def applicable?
record.respond_to?(:kind) && prefixed_whitehall_format_names.include?(record.kind)
end
diff --git a/test/validators/slug_validator_test.rb b/test/validators/slug_validator_test.rb
index <HASH>..<HASH> 100644
--- a/test/validators/slug_validator_test.rb
+++ b/test/validators/slug_validator_test.rb
@@ -70,6 +70,10 @@ class SlugTest < ActiveSupport::TestCase
assert document_with_slug("government/test/foo", kind: "policy").valid?
assert document_with_slug("government/test/foo/bar", kind: "policy").valid?
end
+
+ should "allow . in slugs" do
+ assert document_with_slug("government/world-location-news/221033.pt", kind: "news_story").valid?
+ end
end
context "Specialist documents" do | Allow . in inside govt slugs.
Some insige govt items (eg world location news items with no english
translation) have a .locale on the end. | alphagov_govuk_content_models | train | rb,rb |
74f6d45a33f8b8e1b1b68e148a591d2e32e462db | diff --git a/test/has_scope_test.rb b/test/has_scope_test.rb
index <HASH>..<HASH> 100644
--- a/test/has_scope_test.rb
+++ b/test/has_scope_test.rb
@@ -50,7 +50,7 @@ class TreesController < ApplicationController
false
end
- if ActionPack::VERSION::MAJOR == 5
+ if ActionPack::VERSION::MAJOR >= 5
def default_render
render body: action_name
end
@@ -334,7 +334,7 @@ class HasScopeTest < ActionController::TestCase
protected
- if ActionPack::VERSION::MAJOR == 5
+ if ActionPack::VERSION::MAJOR >= 5
# TODO: Remove this when we only support Rails 5.
def get(action, params = {})
super action, params: params | Support Rails 6 in our tests
It was checking exclusively for Rails 5 to do the necessary workarounds,
not we just check if it's the major version is higher than 5. | plataformatec_has_scope | train | rb |
0b2fe785b34eb5fd51fd12b3acd3c7e886a4b526 | diff --git a/salt/states/file.py b/salt/states/file.py
index <HASH>..<HASH> 100644
--- a/salt/states/file.py
+++ b/salt/states/file.py
@@ -251,7 +251,7 @@ from salt.exceptions import CommandExecutionError
from salt.utils.serializers import yaml as yaml_serializer
from salt.utils.serializers import json as json_serializer
from six.moves import map
-import six
+import salt.utils.six as six
from six import string_types, integer_types
log = logging.getLogger(__name__) | Replaced import six in file /salt/states/file.py | saltstack_salt | train | py |
678e46dcb7df0ddf7563a7795eefbed263cf627e | diff --git a/metaseq/results_table.py b/metaseq/results_table.py
index <HASH>..<HASH> 100644
--- a/metaseq/results_table.py
+++ b/metaseq/results_table.py
@@ -365,6 +365,8 @@ class ResultsTable(object):
tuple([new_ind] + list(block[1:]))
)
else:
+ if hasattr(ind, 'values'):
+ ind = ind.values
_genes_to_highlight.append(
tuple([ind] + list(block[1:]))
) | support for pandas <I> bug with numpy | daler_metaseq | train | py |
8f9ac1777b24165676721054dc5d111fd7e77a41 | diff --git a/src/SourceLocator/Type/PhpInternalSourceLocator.php b/src/SourceLocator/Type/PhpInternalSourceLocator.php
index <HASH>..<HASH> 100644
--- a/src/SourceLocator/Type/PhpInternalSourceLocator.php
+++ b/src/SourceLocator/Type/PhpInternalSourceLocator.php
@@ -115,10 +115,6 @@ final class PhpInternalSourceLocator extends AbstractSourceLocator
return false;
}
- if ( ! \file_exists($expectedStubName) || ! \is_readable($expectedStubName) || ! \is_file($expectedStubName)) {
- return false;
- }
-
- return true;
+ return \is_file($expectedStubName) && \is_readable($expectedStubName);
}
} | #<I> simplified some minor file lookup operations | Roave_BetterReflection | train | php |
1361114e55f212ce4bfb14ca70887f1a55a02f81 | diff --git a/exp/lmdbscan/scanner_test.go b/exp/lmdbscan/scanner_test.go
index <HASH>..<HASH> 100644
--- a/exp/lmdbscan/scanner_test.go
+++ b/exp/lmdbscan/scanner_test.go
@@ -23,6 +23,12 @@ func TestScanner_err(t *testing.T) {
for scanner.Scan() {
t.Error("loop should not execute")
}
+ if scanner.Set(nil, nil, lmdb.First) {
+ t.Error("Set returned true")
+ }
+ if scanner.SetNext(nil, nil, lmdb.NextNoDup, lmdb.NextDup) {
+ t.Error("SetNext returned true")
+ }
return scanner.Err()
})
if !lmdb.IsErrnoSys(err, syscall.EINVAL) { | lmdbscan: add missing test cases
Adds error handling tests for Scanner.Set* methods. | bmatsuo_lmdb-go | train | go |
48a08a3d4683b7dedab8bd6aecfa21dc16ffb26c | diff --git a/modules/uadetector-core/src/test/java/net/sf/uadetector/datastore/AbstractRefreshableDataStoreTest.java b/modules/uadetector-core/src/test/java/net/sf/uadetector/datastore/AbstractRefreshableDataStoreTest.java
index <HASH>..<HASH> 100644
--- a/modules/uadetector-core/src/test/java/net/sf/uadetector/datastore/AbstractRefreshableDataStoreTest.java
+++ b/modules/uadetector-core/src/test/java/net/sf/uadetector/datastore/AbstractRefreshableDataStoreTest.java
@@ -30,6 +30,12 @@ public class AbstractRefreshableDataStoreTest {
Assert.assertSame(data2, store.getData());
}
+ @Test(expected = IllegalStateException.class)
+ public void setData_withEmptyData() {
+ final TestXmlDataStore store = new TestXmlDataStore();
+ store.setData(Data.EMPTY);
+ }
+
@Test(expected = IllegalArgumentException.class)
public void setUpdateOperation_null() {
final TestXmlDataStore store = new TestXmlDataStore(); | Added test to check that 'setData' does not accept a Data.EMPTY | before_uadetector | train | java |
fc34be2abf5aaf80fbe2bed0467d49602f9e3639 | diff --git a/cltk/tokenize/word.py b/cltk/tokenize/word.py
index <HASH>..<HASH> 100644
--- a/cltk/tokenize/word.py
+++ b/cltk/tokenize/word.py
@@ -6,13 +6,14 @@ import re
from nltk.tokenize.punkt import PunktLanguageVars
from nltk.tokenize.punkt import PunktSentenceTokenizer, PunktParameters
+from cltk.utils.cltk_logger import logger
do_arabic = False
try:
import pyarabic.araby as araby
do_arabic = True
except ImportError:
- print('Arabic not supported. Install `pyarabic` library to tokenize Arabic.')
+ logger.info('Arabic not supported. Install `pyarabic` library to tokenize Arabic.')
pass
__author__ = ['Patrick J. Burns <patrick@diyclassics.org>', 'Kyle P. Johnson <kyle@kyle-p-johnson.com>'] | ch pyarabic printout to log | cltk_cltk | train | py |
f142959d4c67e372b74e09598d3132ba7ba695f4 | diff --git a/js/stex.js b/js/stex.js
index <HASH>..<HASH> 100644
--- a/js/stex.js
+++ b/js/stex.js
@@ -175,6 +175,9 @@ module.exports = class stex extends Exchange {
'maker': 0.002,
},
},
+ 'commonCurrencies': {
+ 'BHD': 'Bithold',
+ },
'options': {
'parseOrderToPrecision': false,
}, | Stex BHD -> Bithold mapping | ccxt_ccxt | train | js |
131021e98e99c1d61b800df2ad6d6ef185dea4b2 | diff --git a/sunspot/lib/sunspot/search/standard_search.rb b/sunspot/lib/sunspot/search/standard_search.rb
index <HASH>..<HASH> 100644
--- a/sunspot/lib/sunspot/search/standard_search.rb
+++ b/sunspot/lib/sunspot/search/standard_search.rb
@@ -70,7 +70,7 @@ module Sunspot
# If no query was given, or all terms are present in the index,
# return Solr's suggested collation.
if terms.length == 0
- collation = solr_spellcheck['suggestions'][-1]
+ collation = solr_spellcheck['collations'][-1]
end
collation | Fix spellcheck_collation.
With the solr 5 update, the collation response format changed. This change matches the update | sunspot_sunspot | train | rb |
c8a207084891421dd7ee9d7514e22543a408b6ee | diff --git a/src/EasyDB.php b/src/EasyDB.php
index <HASH>..<HASH> 100644
--- a/src/EasyDB.php
+++ b/src/EasyDB.php
@@ -43,6 +43,11 @@ class EasyDB
\PDO::ATTR_ERRMODE,
\PDO::ERRMODE_EXCEPTION
);
+
+ if (empty($dbEngine)) {
+ $dbEngine = $this->pdo->getAttribute(\PDO::ATTR_DRIVER_NAME);
+ }
+
$this->dbEngine = $dbEngine;
} | Get engine from connection when none provided
The currently used database engine can be fetched from PDO if it is not
set at runtime.
Fixes #<I> | paragonie_easydb | train | php |
a0c1ad657ddb962273fc278aa0a2ba31f962e543 | diff --git a/pkg/k8s/version/version.go b/pkg/k8s/version/version.go
index <HASH>..<HASH> 100644
--- a/pkg/k8s/version/version.go
+++ b/pkg/k8s/version/version.go
@@ -87,6 +87,10 @@ var (
// discovery was introduced in K8s version 1.21.
isGEThanAPIDiscoveryV1 = versioncheck.MustCompile(">=1.21.0")
+ // Constraint to check support for discovery/v1beta1 types. Support for
+ // v1beta1 discovery was introduced in K8s version 1.17.
+ isGEThanAPIDiscoveryV1Beta1 = versioncheck.MustCompile(">=1.17.0")
+
// isGEThanMinimalVersionConstraint is the minimal version required to run
// Cilium
isGEThanMinimalVersionConstraint = versioncheck.MustCompile(">=" + MinimalVersionConstraint)
@@ -117,6 +121,7 @@ func updateVersion(version semver.Version) {
cached.capabilities.MinimalVersionMet = isGEThanMinimalVersionConstraint(version)
cached.capabilities.APIExtensionsV1CRD = isGEThanAPIExtensionsV1CRD(version)
cached.capabilities.EndpointSliceV1 = isGEThanAPIDiscoveryV1(version)
+ cached.capabilities.EndpointSlice = isGEThanAPIDiscoveryV1Beta1(version)
}
func updateServerGroupsAndResources(apiResourceLists []*metav1.APIResourceList) { | pkg/k8s/version: Set EndpointSlice cap when version >=<I>
updateVersion only set EndpointSliceV1, but not EndpointSlice.
Fix this, so that tests can set the capabilities correctly via Force()
for older k8s versions.
Fixes: 7a<I>f<I> ("k8s: Consolidate check for EndpointSlice support") | cilium_cilium | train | go |
9df92b1e0b2e3e44454669e1b22677c9792d5d5e | diff --git a/src/Autocomplete.js b/src/Autocomplete.js
index <HASH>..<HASH> 100644
--- a/src/Autocomplete.js
+++ b/src/Autocomplete.js
@@ -151,6 +151,18 @@ const Autocomplete = React.createClass({
);
},
+ /**
+ * Focus or blur the autocomplete
+ */
+ focus() {
+ const { input } = this.refs;
+ input.focus();
+ },
+ blur() {
+ const { input } = this.refs;
+ input.blur();
+ },
+
render() {
const { onPaste, size, placeholder } = this.props;
const { value, focused, loading, results } = this.state;
@@ -158,6 +170,7 @@ const Autocomplete = React.createClass({
return (
<div className="Autocomplete">
<Input
+ ref="input"
value={value}
placeholder={placeholder}
size={size}
diff --git a/src/ContextMenu.js b/src/ContextMenu.js
index <HASH>..<HASH> 100644
--- a/src/ContextMenu.js
+++ b/src/ContextMenu.js
@@ -3,6 +3,7 @@ const ReactDOM = require('react-dom');
const classNames = require('classnames');
const Backdrop = require('./Backdrop');
+const Dropdown = require('./Dropdown');
const MENU_RIGHT_SPACING = 300;
const MENU_BOTTOM_SPACING = 160; | Add focus and blur on Autocomplete (#<I>) | GitbookIO_styleguide | train | js,js |
d03efff07b7963149debc436a1e394cfcfac50ba | diff --git a/metrics/endpoint.go b/metrics/endpoint.go
index <HASH>..<HASH> 100644
--- a/metrics/endpoint.go
+++ b/metrics/endpoint.go
@@ -48,6 +48,8 @@ func printCounters(w http.ResponseWriter, r *http.Request) {
// Histograms
hists := getAllHistograms()
for name, dat := range hists {
+ fmt.Fprintf(w, "%shist_%s_count %d\n", prefix, name, *dat.count)
+ fmt.Fprintf(w, "%shist_%s_kept %d\n", prefix, name, *dat.kept)
for i, p := range gatherPercentiles(dat) {
fmt.Fprintf(w, "%shist_%s_pctl_%d %d\n", prefix, name, i*5, p)
}
@@ -88,8 +90,8 @@ func gatherPercentiles(dat *hdat) []uint64 {
pctls[0] = *dat.min
pctls[20] = *dat.max
- for i := uint64(1); i < 20; i++ {
- idx := kept * i / 20
+ for i := 1; i < 20; i++ {
+ idx := len(buf) * i / 20
pctls[i] = buf[idx]
} | Adding count and kept to metrics endpoint for histograms. Fixing small bug when collecting more metrics than the buffer holds. | Netflix_rend | train | go |
e01407ffc16c80ad0a3bea49d07654156d8adc22 | diff --git a/src/googleclouddebugger/capture_collector.py b/src/googleclouddebugger/capture_collector.py
index <HASH>..<HASH> 100644
--- a/src/googleclouddebugger/capture_collector.py
+++ b/src/googleclouddebugger/capture_collector.py
@@ -19,6 +19,7 @@
import copy
import datetime
import inspect
+import itertools
import logging
import os
import re
@@ -566,7 +567,14 @@ class CaptureCollector(object):
return {'value': r}
# Add an additional depth for the object itself
- members = self.CaptureVariablesList(value.__dict__.items(), depth + 2,
+ items = value.__dict__.items()
+ if six.PY3:
+ # Make a list of the iterator in Python 3, to avoid 'dict changed size
+ # during iteration' errors from GC happening in the middle.
+ # Only limits.max_list_items + 1 items are copied, anything past that will
+ # get ignored by CaptureVariablesList().
+ items = list(itertools.islice(items, limits.max_list_items + 1))
+ members = self.CaptureVariablesList(items, depth + 2,
OBJECT_HAS_NO_FIELDS, limits)
v = {'members': members} | Call list() on dict.items() in Python 3 to avoid 'dict changed size during
iteration'.
-------------
Created by MOE: <URL> | GoogleCloudPlatform_cloud-debug-python | train | py |
5c8b7af8a8d16a5a8d2a4a36dce9ee90af29fb61 | diff --git a/index.js b/index.js
index <HASH>..<HASH> 100644
--- a/index.js
+++ b/index.js
@@ -147,7 +147,7 @@ module.exports = function (db, opts, keys) {
})
}
- db.createFeed = function (keys) {
+ db.createFeed = function (keys, opts) {
return createFeed(db, keys, opts)
}
@@ -329,10 +329,12 @@ module.exports = function (db, opts, keys) {
db.getLatest = function (id, cb) {
lastDB.get(id, function (err, v) {
if(err) return cb(err)
+ //callback null there is no latest
clockDB.get([id, toSeq(v)], function (err, hash) {
- if(err) return cb(err)
+ if(err) return cb()
db.get(hash, function (err, msg) {
- cb(err, {key: hash, value: msg})
+ if(err) cb()
+ else cb(null, {key: hash, value: msg})
})
})
})
@@ -569,3 +571,4 @@ module.exports = function (db, opts, keys) {
+ | ignore db errors on getLatest, we expect this when it is a new feed | ssbc_ssb-db | train | js |
dd07fa80a84d2d8947a9e1a4fc051d625781f21c | diff --git a/generators/generator-base.js b/generators/generator-base.js
index <HASH>..<HASH> 100644
--- a/generators/generator-base.js
+++ b/generators/generator-base.js
@@ -2548,6 +2548,7 @@ templates: ${JSON.stringify(existingTemplates, null, 2)}`;
to: blockToCallback,
condition: blockConditionCallback,
transform: blockTransform = [],
+ renameTo: blockRenameTo,
} = block;
assert(typeof block === 'object', `Block must be an object for ${blockSpecPath}`);
assert(Array.isArray(block.templates), `Block templates must be an array for ${blockSpecPath}`);
@@ -2570,7 +2571,12 @@ templates: ${JSON.stringify(existingTemplates, null, 2)}`;
}
if (typeof fileSpec === 'string') {
const sourceFile = path.join(blockPath, fileSpec);
- const destinationFile = this.destinationPath(blockTo, fileSpec);
+ let destinationFile;
+ if (blockRenameTo) {
+ destinationFile = this.destinationPath(blockRenameTo.call(this, context, fileSpec, this));
+ } else {
+ destinationFile = this.destinationPath(blockTo, fileSpec);
+ }
return { sourceFile, destinationFile, noEjs, transform: derivedTransform };
} | add renameTo support to blocks | jhipster_generator-jhipster | train | js |
ded1775f3ae61947cc690f90be4760ff1b1ee131 | diff --git a/asv/commands/run.py b/asv/commands/run.py
index <HASH>..<HASH> 100644
--- a/asv/commands/run.py
+++ b/asv/commands/run.py
@@ -26,7 +26,6 @@ class Run(object):
"run", help="Run a benchmark suite",
description="Run a benchmark suite.")
- # TODO: Range of branches
parser.add_argument(
"--range", "-r", default="master^!",
help="""Range of commits to benchmark. This is passed as
@@ -40,8 +39,8 @@ class Run(object):
reasonable number.""")
parser.add_argument(
"--bench", "-b", type=str, nargs="*",
- help="""Regular expression for benchmark to run. When
- none are provided, all benchmarks are run.""")
+ help="""Regular expression(s) for benchmark to run. When
+ not provided, all benchmarks are run.""")
parser.set_defaults(func=cls.run_from_args)
@@ -85,8 +84,8 @@ class Run(object):
steps = len(commit_hashes) * len(benchmarks) * len(environments)
console.message(
- "Running {0} total benchmarks ({1} commits * {2} benchmarks * {3} environments)".format(
- steps, len(commit_hashes), len(benchmarks), len(environments)), "green")
+ "Running {0} total benchmarks ({1} commits * {2} environments * {3} benchmarks)".format(
+ steps, len(commit_hashes), len(environments), len(benchmarks)), "green")
console.set_nitems(steps)
for env in environments: | Improve "asv run"'s output | airspeed-velocity_asv | train | py |
d9d4b5ee92afd8c576838d2d73135123758aa09e | diff --git a/manifest.php b/manifest.php
index <HASH>..<HASH> 100644
--- a/manifest.php
+++ b/manifest.php
@@ -58,7 +58,7 @@ return array(
'taoQtiTest' => '>=34.2.0',
'taoOutcomeUi' => '>=7.0.0',
'taoEventLog' => '>=2.0.0',
- 'generis' => '>=11.2.0',
+ 'generis' => '>=12.5.0',
),
'managementRole' => 'http://www.tao.lu/Ontologies/TAOProctor.rdf#TestCenterManager',
'acl' => array( | TTD-<I> Added\changed 'generis' version to '>=<I>' in `requires` secition | oat-sa_extension-tao-proctoring | train | php |
469a590a06c3103d2f602d69b2389d1687622029 | diff --git a/tests/TestCase/Network/Email/SmtpTransportTest.php b/tests/TestCase/Network/Email/SmtpTransportTest.php
index <HASH>..<HASH> 100644
--- a/tests/TestCase/Network/Email/SmtpTransportTest.php
+++ b/tests/TestCase/Network/Email/SmtpTransportTest.php
@@ -511,7 +511,7 @@ class SmtpTransportTest extends TestCase {
* @return void
*/
public function testExplicitDisconnectNotConnected() {
- $callback = function($arg) {
+ $callback = function($arg) {
$this->assertNotEquals("QUIT\r\n", $arg);
};
$this->socket->expects($this->any())->method('write')->will($this->returnCallback($callback));
@@ -532,7 +532,7 @@ class SmtpTransportTest extends TestCase {
$email->to('cake@cakephp.org', 'CakePHP');
$email->expects($this->exactly(2))->method('message')->will($this->returnValue(array('First Line')));
- $callback = function($arg) {
+ $callback = function($arg) {
$this->assertNotEquals("QUIT\r\n", $arg);
};
$this->socket->expects($this->any())->method('write')->will($this->returnCallback($callback)); | Fix CS in SmtpTransportTest | cakephp_cakephp | train | php |
3931ff2356b7357a4ed3ea30b6e3b54ac7178028 | diff --git a/addon/metrics-adapters/keen.js b/addon/metrics-adapters/keen.js
index <HASH>..<HASH> 100644
--- a/addon/metrics-adapters/keen.js
+++ b/addon/metrics-adapters/keen.js
@@ -208,6 +208,7 @@ export default BaseAdapter.extend({
name: 'keen:ip_to_geo',
input: {
ip: 'tech.ip',
+ remove_ip_property: true,
},
output: 'geo',
}); | Anonymize the client IP address for keen adapter (#<I>) | CenterForOpenScience_ember-osf | train | js |
db5b376fe745381627cb118bebb40a5ef9a88949 | diff --git a/src/UserPage.php b/src/UserPage.php
index <HASH>..<HASH> 100644
--- a/src/UserPage.php
+++ b/src/UserPage.php
@@ -67,7 +67,7 @@ class UserPage extends Page
$aData = [
'cb_pagetype' => filter_var($this->cb_pagetype, FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_LOW),
'cb_group' => filter_var($this->cb_group, FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_LOW),
- 'cb_pageconfig' => $this->purifier->purify($this->cb_pageconfig),
+ 'cb_pageconfig' => $this->cb_pageconfig,
'cb_subnav' => filter_var($this->cb_subnav, FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_LOW),
'cb_key' => $this->cb_key,
]; | removed inapproptiate use of purifier | HaaseIT_HCSF | train | php |
cf11f2c5e298190147ce8d5277d3b887ff97193c | diff --git a/couch/tests/test_unit.py b/couch/tests/test_unit.py
index <HASH>..<HASH> 100644
--- a/couch/tests/test_unit.py
+++ b/couch/tests/test_unit.py
@@ -38,4 +38,4 @@ def test_config(test_case, extra_config, expected_http_kwargs):
)
http_wargs.update(expected_http_kwargs)
- r.get.assert_called_with('http://localhost:5984/_all_dbs/', **http_wargs)
+ r.get.assert_called_with('http://{}:5984/_all_dbs/'.format(common.HOST), **http_wargs) | Fix tests running on non localhost (#<I>)
Common is refering to the docker host, we need to use it in the results
as well. | DataDog_integrations-core | train | py |
cd1a566091f238eab6e5638fa9946a613e4b24f6 | diff --git a/src/main/java/org/altbeacon/beacon/service/scanner/CycledLeScanner.java b/src/main/java/org/altbeacon/beacon/service/scanner/CycledLeScanner.java
index <HASH>..<HASH> 100644
--- a/src/main/java/org/altbeacon/beacon/service/scanner/CycledLeScanner.java
+++ b/src/main/java/org/altbeacon/beacon/service/scanner/CycledLeScanner.java
@@ -9,7 +9,6 @@ import android.bluetooth.BluetoothManager;
import android.content.Context;
import android.content.Intent;
import android.os.Handler;
-import android.util.Log;
import org.altbeacon.beacon.BeaconManager;
import org.altbeacon.beacon.logging.LogManager;
@@ -319,7 +318,7 @@ public abstract class CycledLeScanner {
// devices.
long milliseconds = Long.MAX_VALUE; // 2.9 million years from now
AlarmManager alarmManager = (AlarmManager) mContext.getSystemService(Context.ALARM_SERVICE);
- alarmManager.set(AlarmManager.RTC_WAKEUP, System.currentTimeMillis() + milliseconds, getWakeUpOperation());
+ alarmManager.set(AlarmManager.RTC_WAKEUP, milliseconds, getWakeUpOperation());
LogManager.d(TAG, "Set a wakeup alarm to go off in %s ms: %s", milliseconds, getWakeUpOperation());
} | -fixing canceling alarm. It reschedule it for max time in the future. It was done with overflow resulting in an instant alarm deploy due to the time in the past. | AltBeacon_android-beacon-library | train | java |
849251ee626e74eeb999e2e3b5a9bacccb41e85e | diff --git a/acceptancetests/jujupy/client.py b/acceptancetests/jujupy/client.py
index <HASH>..<HASH> 100644
--- a/acceptancetests/jujupy/client.py
+++ b/acceptancetests/jujupy/client.py
@@ -1605,8 +1605,7 @@ class ModelClient:
Note: A model is often called an enviroment (Juju 1 legacy).
- This class represents the latest Juju version. Subclasses are used to
- support older versions (see get_client_class).
+ This class represents the latest Juju version.
"""
# The environments.yaml options that are replaced by bootstrap options.
diff --git a/acceptancetests/jujupy/tests/test_client.py b/acceptancetests/jujupy/tests/test_client.py
index <HASH>..<HASH> 100644
--- a/acceptancetests/jujupy/tests/test_client.py
+++ b/acceptancetests/jujupy/tests/test_client.py
@@ -291,7 +291,7 @@ class TestJuju2Backend(TestCase):
soft_deadline=None)
with patch('subprocess.Popen') as mock_popen:
mock_popen.return_value.communicate.return_value = (
- '{"current-model": "model"}', '')
+ b'{"current-model": "model"}', b'')
mock_popen.return_value.returncode = 0
result = backend.get_active_model('/foo/bar')
self.assertEqual(('model'), result) | Clarify testing with py3 | juju_juju | train | py,py |
44e19ff68c8c18a694e940f92215ae13841dfaab | diff --git a/mmcv/ops/cc_attention.py b/mmcv/ops/cc_attention.py
index <HASH>..<HASH> 100644
--- a/mmcv/ops/cc_attention.py
+++ b/mmcv/ops/cc_attention.py
@@ -3,7 +3,7 @@ import torch.nn as nn
import torch.nn.functional as F
from torch.autograd.function import once_differentiable
-from mmcv.cnn import Scale
+from mmcv.cnn import PLUGIN_LAYERS, Scale
from ..utils import ext_loader
ext_module = ext_loader.load_ext(
@@ -66,6 +66,7 @@ ca_weight = CAWeightFunction.apply
ca_map = CAMapFunction.apply
+@PLUGIN_LAYERS.register_module()
class CrissCrossAttention(nn.Module):
"""Criss-Cross Attention Module.""" | [Feature]: Register CrissCrossAttention into plugin layers (#<I>) | open-mmlab_mmcv | train | py |
e147aa3e1b288f5af434c0ad867a59b9d8292d13 | diff --git a/sos/plugins/openvswitch.py b/sos/plugins/openvswitch.py
index <HASH>..<HASH> 100644
--- a/sos/plugins/openvswitch.py
+++ b/sos/plugins/openvswitch.py
@@ -49,7 +49,9 @@ class OpenVSwitch(Plugin):
# List devices and their drivers
"dpdk_nic_bind --status",
# Capture a list of all bond devices
- "ovs-appctl bond/list"
+ "ovs-appctl bond/list",
+ # Capture more details from bond devices
+ "ovs-appctl bond/show"
])
# Gather additional output for each OVS bridge on the host. | [openvswitch] capture additional info from bonds
Provide more details for each bond device. | sosreport_sos | train | py |
ef788ea7c5c9e373f32a06b4c8f0476e44aa2c8e | diff --git a/lib/ronin/database/database.rb b/lib/ronin/database/database.rb
index <HASH>..<HASH> 100644
--- a/lib/ronin/database/database.rb
+++ b/lib/ronin/database/database.rb
@@ -105,6 +105,15 @@ module Ronin
end
#
+ # Returns +true+ if the Database is setup, returns +false+ otherwise.
+ #
+ def Database.setup?
+ repository = DataMapper.repository(Model::REPOSITORY_NAME)
+
+ return repository.class.adapters.has_key?(repository.name)
+ end
+
+ #
# Call the given _block_ then update the Database.
#
def Database.update!(&block) | Added Database.setup?. | ronin-ruby_ronin | train | rb |
2389cf3f9ea7f599faca8729583aa37d08c50883 | diff --git a/lib/platform/github/gh-got-wrapper.js b/lib/platform/github/gh-got-wrapper.js
index <HASH>..<HASH> 100644
--- a/lib/platform/github/gh-got-wrapper.js
+++ b/lib/platform/github/gh-got-wrapper.js
@@ -11,7 +11,7 @@ function sleep(ms) {
async function get(path, opts, retries = 5) {
const method = opts && opts.method ? opts.method : 'get';
- logger.debug({ retries }, `${method.toUpperCase()} ${path}`);
+ logger.debug(`${method.toUpperCase()} ${path} [retries=${retries}]`);
if (method === 'get' && cache[path]) {
logger.debug({ path }, 'Returning cached result');
return cache[path]; | fix: better retries log in github wrapper | renovatebot_renovate | train | js |
5a69b7fcc43923ed0f082ae326088cee821a6012 | diff --git a/style.js b/style.js
index <HASH>..<HASH> 100644
--- a/style.js
+++ b/style.js
@@ -54,12 +54,12 @@ export function same(a, b) {
export function contains(set, style) {
for (let i = 0; i < set.length; i++)
- if (same(set[i], style)) return set[i]
+ if (same(set[i], style)) return true
return false
}
export function containsType(set, type) {
for (let i = 0; i < set.length; i++)
- if (set[i].type == type) return true
+ if (set[i].type == type) return set[i]
return false
} | Add inverses of steps, test them | ProseMirror_prosemirror-model | train | js |
886017f171cf04eb570e649b6e79eeeee2f92273 | diff --git a/bin/sass-shake.js b/bin/sass-shake.js
index <HASH>..<HASH> 100755
--- a/bin/sass-shake.js
+++ b/bin/sass-shake.js
@@ -11,7 +11,7 @@ program
.option('-f, --entryPoints <entryPoints>', 'Sass entry point files', list)
.option('-e, --exclude <exclusions>', 'An array of regexp pattern strings that are matched against files to exclude them from the unused files list', list, [])
.option('-s, --silent', 'Suppress logs')
- .option('-d, --deleteFiles', 'Delete the unused files')
+ .option('-d, --delete', 'Delete the unused files')
.option('-t, --hideTable', 'Hide the unused files table')
.parse(process.argv); | Fixes CLI delete option
The option parameter was being ignored as it was called delete instead of the CLI deleteFiles and it wouldn't work. | sliptype_sass-shake | train | js |
12857127e08802e647c32eb6b137a142a7535ced | diff --git a/src/AdamWathan/Form/FormBuilder.php b/src/AdamWathan/Form/FormBuilder.php
index <HASH>..<HASH> 100644
--- a/src/AdamWathan/Form/FormBuilder.php
+++ b/src/AdamWathan/Form/FormBuilder.php
@@ -132,8 +132,6 @@ class FormBuilder
public function radio($name, $value = null)
{
- $value = is_null($value) ? $name : $value;
-
$radio = new RadioButton($name, $value);
$oldValue = $this->getValueFor($name); | Removing duplicate logic (already in RadioButton's constructor). | adamwathan_form | train | php |
aca1ea688c5c4a82db5411e8cfff61a8e7ed4806 | diff --git a/classes/Backtrace.php b/classes/Backtrace.php
index <HASH>..<HASH> 100644
--- a/classes/Backtrace.php
+++ b/classes/Backtrace.php
@@ -54,8 +54,8 @@ class QM_Backtrace {
protected $calling_line = 0;
protected $calling_file = '';
- public function __construct( array $args = array() ) {
- $this->trace = debug_backtrace( false );
+ public function __construct( array $args = array(), array $trace = null ) {
+ $this->trace = $trace ? $trace : debug_backtrace( false );
$args = array_merge( array(
'ignore_current_filter' => true, | Support passing backtrace to QM_Backtrace | johnbillion_query-monitor | train | php |
30a3f25941c4de83abea600315c220e4c2603793 | diff --git a/test/commands/package-test.js b/test/commands/package-test.js
index <HASH>..<HASH> 100644
--- a/test/commands/package-test.js
+++ b/test/commands/package-test.js
@@ -32,7 +32,8 @@ vows.describe('jitsu/commands/package').addBatch({
},
function setup() {
var tmproot = jitsu.config.get('tmproot'),
- targetPackage = path.join(tmproot, 'tester-example-app-0.0.0-1.tgz');
+ targetPackage = path.join(tmproot, 'tester-example-app-0.0.0-1.tgz'),
+ packageFile = path.join(__dirname, '..', 'fixtures', 'example-app', 'package.json');;
jitsu.argv.noanalyze = true;
jitsu.prompt.override['invite code'] = 'f4387f4';
@@ -41,6 +42,15 @@ vows.describe('jitsu/commands/package').addBatch({
// Change directory to the sample app
//
process.chdir(path.join(__dirname, '..', 'fixtures', 'example-app'));
+
+ var pkg = {
+ name: 'example-app',
+ subdomain: 'example-app',
+ scripts: { start: 'server.js' },
+ version: '0.0.0-1'
+ };
+
+ fs.writeFileSync(packageFile, JSON.stringify(pkg, true, 2))
//
// Attempt to remove any existing tarballs | [test fix] Explicitly reset the package.json before running the package test | nodejitsu_jitsu | train | js |
a9dca21fd631414f1429fd75ee6eb17da0cc0ffa | diff --git a/lib/grit_adapter.rb b/lib/grit_adapter.rb
index <HASH>..<HASH> 100644
--- a/lib/grit_adapter.rb
+++ b/lib/grit_adapter.rb
@@ -77,6 +77,12 @@ module DTK
tree_or_blob && tree_or_blob.kind_of?(::Grit::Blob) && tree_or_blob.data
end
+ def file_content_and_size(path)
+ tree_or_blob = tree/path
+ return nil unless tree_or_blob
+ { :data => tree_or_blob.data, :size => tree_or_blob.size }
+ end
+
def push(remote_branch_ref=nil)
remote_repo,remote_branch = parse_remote_branch_ref(remote_branch_ref)
Git_command__push_mutex.synchronize do | Added support to retrive file size needed for file upload | rich-dtk_dtk-common | train | rb |
b1cb508a5cee12829dd6697820e04bd82b19a4af | diff --git a/bundler.d/development.rb b/bundler.d/development.rb
index <HASH>..<HASH> 100644
--- a/bundler.d/development.rb
+++ b/bundler.d/development.rb
@@ -25,5 +25,5 @@ group :development do
gem 'minitest-rails'
gem 'factory_girl_rails', "~> 1.4.0"
- gem 'rubocop', "~> 0.13.0"
+ gem 'rubocop', "0.13.0"
end | Rubocop: New version breaks everything! | Katello_katello | train | rb |
db88852e98cd63d97ca94a86ba45b90d60224cd0 | diff --git a/geopy/adapters.py b/geopy/adapters.py
index <HASH>..<HASH> 100644
--- a/geopy/adapters.py
+++ b/geopy/adapters.py
@@ -77,10 +77,9 @@ class AdapterHTTPError(IOError):
:param int status_code: HTTP status code.
:param dict headers: HTTP response readers. A mapping object
with lowercased or case-insensitive keys.
- :param str text: HTTP body text.
- .. versionchanged:: 2.2
- Added ``headers``.
+ .. versionadded:: 2.2
+ :param str text: HTTP body text.
"""
self.status_code = status_code
self.headers = headers | docs adapters: versionchanged -> versionadded (#<I>) | geopy_geopy | train | py |
8d188a8f9d99b7056aba97fdcd829f56928cd205 | diff --git a/app/Blueprint/Webserver/WebserverBlueprint.php b/app/Blueprint/Webserver/WebserverBlueprint.php
index <HASH>..<HASH> 100644
--- a/app/Blueprint/Webserver/WebserverBlueprint.php
+++ b/app/Blueprint/Webserver/WebserverBlueprint.php
@@ -266,9 +266,6 @@ class WebserverBlueprint implements Blueprint, TakesDockerAccount {
protected function makeDockerfile(Configuration $config):Dockerfile {
$dockerfile = new Dockerfile();
- $dockerfile->setUser( self::WWW_DATA_USER_ID );
- $dockerfile->setGroup( self::WWW_DATA_GROUP_ID );
-
$dockerfile->setFrom($config->get('docker.base-image'));
$dockerfile->addVolume('/var/www/app');
@@ -278,6 +275,8 @@ class WebserverBlueprint implements Blueprint, TakesDockerAccount {
$dockerfile->copy('.'.$copySuffix, '/var/www/app'.$targetSuffix);
+ $dockerfile->run('chown -R '.self::WWW_DATA_USER_ID.':'.self::WWW_DATA_GROUP_ID.' /var/www/app');
+
$nginxConfig = $config->get('nginx-config');
if (!empty($nginxConfig)) {
$dockerfile->addVolume('/etc/nginx/conf.template.d'); | changed user statement to chown on /var/www/app | ipunkt_rancherize | train | php |
f81a3e47a0be289bda8bad1500622fcc52a5d667 | diff --git a/lib/rest/routes/apps.js b/lib/rest/routes/apps.js
index <HASH>..<HASH> 100644
--- a/lib/rest/routes/apps.js
+++ b/lib/rest/routes/apps.js
@@ -25,7 +25,7 @@ module.exports = function () {
})
.then(app => res.json(app))
.catch(err => {
- if (err.message.indexOf('exists') >= 0) {
+ if (err.message.indexOf('exist') >= 0) {
res.status(409).send(err.message);
} else {
next(err); | Correctly spell error for the returned status code | ExpressGateway_express-gateway | train | js |
ac3776ffbf764bc40bda24e84184146865d0a46d | diff --git a/.gitignore b/.gitignore
index <HASH>..<HASH> 100644
--- a/.gitignore
+++ b/.gitignore
@@ -27,3 +27,4 @@ _testmain.go
*.test
*.prof
+/.idea
diff --git a/mock_test.go b/mock_test.go
index <HASH>..<HASH> 100644
--- a/mock_test.go
+++ b/mock_test.go
@@ -124,3 +124,11 @@ func TestTimerResets(t *testing.T) {
c.AddTime(3 * time.Millisecond)
assertGets(t, tm.Chan(), "expected timer to get after reset when interval is up after restarted")
}
+
+func TestTickerDeadlock(t *testing.T) { // fixes #6
+ c := NewMockClock()
+ tk := c.NewTicker(5 * time.Millisecond)
+ c.AddTime(6 * time.Millisecond)
+ time.Sleep(1 * time.Millisecond)
+ tk.Stop()
+}
diff --git a/ticker.go b/ticker.go
index <HASH>..<HASH> 100644
--- a/ticker.go
+++ b/ticker.go
@@ -27,7 +27,11 @@ func (m *mockTicker) wait() {
case <-m.stop:
return
case <-m.clock.After(delta):
- m.c <- m.clock.Now()
+ select {
+ case m.c <- m.clock.Now():
+ case <-m.stop:
+ return
+ }
}
}
} | fix(ticker): deadlock on Close() | mixer_clock | train | gitignore,go,go |
481d8ba124f9b928e90c1d0f79edc9a453302620 | diff --git a/Form/ValidationTokenParser.php b/Form/ValidationTokenParser.php
index <HASH>..<HASH> 100644
--- a/Form/ValidationTokenParser.php
+++ b/Form/ValidationTokenParser.php
@@ -220,16 +220,10 @@ class ValidationTokenParser implements ValidationParser
}
$file->seek($lineNumber - 1);
- $contents = '<?php ';
+ $contents = '<?php ' . $file->current();
- while ($line = $file->fgets()) {
- $contents .= $line;
-
- if ($lineNumber === $class->getEndLine()) {
- break;
- }
-
- $lineNumber++;
+ while ($lineNumber++ < $class->getEndLine()) {
+ $contents .= $file->fgets();
}
return $contents; | Fix of ValidationTokenParser - stop on the last line of the class file. (#4)
Fix of ValidationTokenParser parsing incorrect lines | vaniocz_vanio-web-bundle | train | php |
2f27a402a9064a93b878456e506b5d5f57f73856 | diff --git a/src/js/components/tooltip.js b/src/js/components/tooltip.js
index <HASH>..<HASH> 100644
--- a/src/js/components/tooltip.js
+++ b/src/js/components/tooltip.js
@@ -13,6 +13,8 @@ function plugin(UIkit) {
attrs: true,
+ args: 'title',
+
mixins: [mixin.container, mixin.togglable, mixin.position],
props: { | add `title` as primary option to tooltip | uikit_uikit | train | js |
f862e952c5d4ac8784336c02c63f4a8b12eec09a | diff --git a/obdalib/obdalib-core/src/main/java/inf/unibz/it/obda/rdbmsgav/domain/RDBMSOBDAMappingAxiom.java b/obdalib/obdalib-core/src/main/java/inf/unibz/it/obda/rdbmsgav/domain/RDBMSOBDAMappingAxiom.java
index <HASH>..<HASH> 100644
--- a/obdalib/obdalib-core/src/main/java/inf/unibz/it/obda/rdbmsgav/domain/RDBMSOBDAMappingAxiom.java
+++ b/obdalib/obdalib-core/src/main/java/inf/unibz/it/obda/rdbmsgav/domain/RDBMSOBDAMappingAxiom.java
@@ -87,4 +87,13 @@ public class RDBMSOBDAMappingAxiom extends AbstractOBDAMappingAxiom {
return clone;
}
+
+ @Override
+ public String toString() {
+ StringBuffer bf = new StringBuffer();
+ bf.append(sourceQuery.toString());
+ bf.append(" ==> ");
+ bf.append(targetQuery.toString());
+ return bf.toString();
+ }
} | Added comments, logging, documentation and TO-DOs to the classes involved in query answering. | ontop_ontop | train | java |
ced51e0db09da4569284a3278e33fd6c0d5d1e29 | diff --git a/qtpylib/futures.py b/qtpylib/futures.py
index <HASH>..<HASH> 100644
--- a/qtpylib/futures.py
+++ b/qtpylib/futures.py
@@ -251,7 +251,10 @@ def get_contract_ticksize(symbol, fallback=0.01, ttl=84600):
# -------------------------------------------
-def make_tuple(symbol, expiry, exchange=None):
+def make_tuple(symbol, expiry=None, exchange=None):
+ if expiry == None:
+ expiry = get_active_contract(symbol)
+
contract = get_ib_futures(symbol, exchange)
if contract is not None:
return (contract['symbol'], "FUT", contract['exchange'], contract['currency'], expiry, 0.0, "") | auto selects most active contract expiry
...when no expiry is provided (CME Group Futures only) | ranaroussi_qtpylib | train | py |
a86470cfe8bc217e009ddf44f284013d2f42a87a | diff --git a/App.php b/App.php
index <HASH>..<HASH> 100644
--- a/App.php
+++ b/App.php
@@ -65,6 +65,10 @@ class App
$editorLink = admin_url('options.php?page=modularity-editor&id=archive-' . $postType->rewrite['slug']);
}
+ if (is_home()) {
+ $editorLink = admin_url('options.php?page=modularity-editor&id=archive-post');
+ }
+
if (is_search()) {
$editorLink = admin_url('options.php?page=modularity-editor&id=search');
} | Fixes adminbar link to home | helsingborg-stad_Modularity | train | php |
Subsets and Splits
Java Commits in Train Set
Queries for all entries where the diff_languages column is 'java', providing a filtered dataset but without deeper analysis.
Java Commits Test Data
Returns a subset of 5000 entries from the dataset where the programming language difference is Java, providing basic filtering for exploration.
Java Commits Sample
Retrieves the first 1,000 records where the 'diff_languages' column is 'java', providing limited insight into the specific data entries.
Java Commits Validation Sample
Retrieves a sample of entries from the validation dataset where the diff languages are Java, providing limited insight into specific Java-related data points.
Java Commits in Validation
This query retrieves a limited sample of entries from the validation dataset where the programming language difference is Java, providing basic filtering with minimal insight.
Java Commits Sample
This query retrieves a sample of 100 records where the 'diff_languages' is 'java', providing basic filtering but limited analytical value.
Java Commits Sample
Retrieves 100 samples where the language difference is Java, providing basic filtering but minimal analytical value.
Java Commits Sample
Retrieves 10 samples where the diff_languages column is 'java', providing basic examples of data entries with this specific language.
Java Commits Validation Sample
Retrieves 1,000 records where the differences in languages are marked as Java, providing a snapshot of that specific subset but limited to raw data.
Java Commits Sample
This query retrieves 1000 random samples from the dataset where the programming language is Java, offering limited insight beyond raw data.