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
|
---|---|---|---|---|---|
e6d8cc7c2656b7db7bf6bd7bee52c708b4e44473 | diff --git a/lib/bureaucrat/quickfields.rb b/lib/bureaucrat/quickfields.rb
index <HASH>..<HASH> 100644
--- a/lib/bureaucrat/quickfields.rb
+++ b/lib/bureaucrat/quickfields.rb
@@ -5,6 +5,7 @@ module Quickfields
include Fields
def hide(name)
+ base_fields[name] = base_fields[name].dup
base_fields[name].widget = Widgets::HiddenInput.new
end | Fix: When hidding a field with the helper from quickfields, make a copy of the original so that inheriting forms don't mutate parents | tizoc_bureaucrat | train | rb |
51842c366bfd78d341a480d0f818d67209984a72 | diff --git a/Context/CartNotFoundException.php b/Context/CartNotFoundException.php
index <HASH>..<HASH> 100644
--- a/Context/CartNotFoundException.php
+++ b/Context/CartNotFoundException.php
@@ -19,8 +19,8 @@ class CartNotFoundException extends \RuntimeException
/**
* {@inheritdoc}
*/
- public function __construct(\Exception $previousException = null)
+ public function __construct($message = null, \Exception $previousException = null)
{
- parent::__construct('Sylius was not able to figure out the current cart.', 0, $previousException);
+ parent::__construct($message ?: 'Sylius was not able to figure out the current cart.', 0, $previousException);
}
} | [Cart] Rework the cart not found exception | Sylius_Cart | train | php |
bbffce8ef9eb07d19c224f5361c4af1ce10ee845 | diff --git a/liquibase-core/src/main/java/liquibase/change/core/AddUniqueConstraintChange.java b/liquibase-core/src/main/java/liquibase/change/core/AddUniqueConstraintChange.java
index <HASH>..<HASH> 100644
--- a/liquibase-core/src/main/java/liquibase/change/core/AddUniqueConstraintChange.java
+++ b/liquibase-core/src/main/java/liquibase/change/core/AddUniqueConstraintChange.java
@@ -253,6 +253,7 @@ public class AddUniqueConstraintChange extends AbstractChange {
inverse.setSchemaName(getSchemaName());
inverse.setTableName(getTableName());
inverse.setConstraintName(getConstraintName());
+ inverse.setUniqueColumns(getColumnNames());
return new Change[]{
inverse, | CORE-<I>: Revert Unique Index failed for SQLAnywhere | liquibase_liquibase | train | java |
e81d21fbd3b1842ad0c299e5f1f95a82cb1ab6ee | diff --git a/lib/ims/lti/models/lti_model.rb b/lib/ims/lti/models/lti_model.rb
index <HASH>..<HASH> 100644
--- a/lib/ims/lti/models/lti_model.rb
+++ b/lib/ims/lti/models/lti_model.rb
@@ -177,7 +177,7 @@ module IMS::LTI::Models
end
def self.serialization_options()
- if superclass == Object
+ if name == "IMS::LTI::Models::LTIModel"
@serialization_options || {}
else
superclass.send(:serialization_options).merge(@serialization_options || {})
diff --git a/lib/ims/lti/models/messages/message.rb b/lib/ims/lti/models/messages/message.rb
index <HASH>..<HASH> 100644
--- a/lib/ims/lti/models/messages/message.rb
+++ b/lib/ims/lti/models/messages/message.rb
@@ -49,7 +49,7 @@ module IMS::LTI::Models::Messages
end
def supers_params(instance_variable)
- if superclass == Object
+ if name == "IMS::LTI::Models::Messages::Message"
[]
else
(superclass.instance_variable_get(instance_variable) || []) | superclass.send(:supers_params, instance_variable) | change recursion check from object to the class name | instructure_ims-lti | train | rb,rb |
5b940372d301aa72d3a683c63681f0b53b007e67 | diff --git a/lib/table.js b/lib/table.js
index <HASH>..<HASH> 100644
--- a/lib/table.js
+++ b/lib/table.js
@@ -10,7 +10,7 @@ let defaults = {
headerAnsi: _.identity,
printLine: cli.log,
printRow: function(cells) {
- this.printLine(cells.join(this.colSep));
+ this.printLine(cells.join(this.colSep).trimRight());
},
printHeader: function(cells) {
this.printRow(cells.map(_.ary(this.headerAnsi, 1))); | trim table trailing spaces
This won't visibly change the output but it will remove trailing spaces
at the end of the table output. These spaces throw off `wc` numbers and
require adding trailing spaces to some of the tests. | heroku_heroku-cli-util | train | js |
f935e4043da3470ca007a000a40060b5ac7aab0e | diff --git a/dragnet/model_training.py b/dragnet/model_training.py
index <HASH>..<HASH> 100644
--- a/dragnet/model_training.py
+++ b/dragnet/model_training.py
@@ -31,7 +31,7 @@ def run_score_content_detection(html, gold_standard, content_detector, tokenizer
"""
content = content_detector(html)
content_tokens = tokenizer(content)
- return evaluation_metrics(content_tokens, gold_standard)
+ return evaluation_metrics(content_tokens, gold_standard, bow=False) | Don't use bag of words assumption for token level F1 | dragnet-org_dragnet | train | py |
4cf3b8ac47f109fa83a6f66eb97d6cb0eace0d05 | diff --git a/actionpack/lib/action_dispatch/testing/integration.rb b/actionpack/lib/action_dispatch/testing/integration.rb
index <HASH>..<HASH> 100644
--- a/actionpack/lib/action_dispatch/testing/integration.rb
+++ b/actionpack/lib/action_dispatch/testing/integration.rb
@@ -457,7 +457,6 @@ module ActionDispatch
# Copy the instance variables from the current session instance into the
# test instance.
def copy_session_variables! #:nodoc:
- return unless integration_session
%w(controller response request).each do |var|
instance_variable_set("@#{var}", @integration_session.__send__(var))
end | there is always an integration session, so remove the check | rails_rails | train | rb |
b8980fc6137b53fa4f28665b1d578455e08056c9 | diff --git a/index.js b/index.js
index <HASH>..<HASH> 100644
--- a/index.js
+++ b/index.js
@@ -20,7 +20,7 @@ export default async function (patterns, stategy, ...params) {
action,
url: action[urlSymbol],
method: action[methodSymbol],
- middlewares: action[middlewaresSymbol]
+ middlewares: action[middlewaresSymbol] || []
});
});
});
diff --git a/test/route.js b/test/route.js
index <HASH>..<HASH> 100644
--- a/test/route.js
+++ b/test/route.js
@@ -40,6 +40,10 @@ test('strategy shoud be called for all the routes', async t => {
t.is('deleteUser', result['delete /user/:id'].actionResult);
t.is('unauthorize', result['delete /user/:id'].middlewares[0]());
-
t.is('admin', result['post /user'].middlewares[0]());
+
+ t.same([], result['get /'].middlewares);
+ t.same([], result['get /user'].middlewares);
+ t.same([], result['get /user/:id'].middlewares);
+ t.same([], result['put /user/:id'].middlewares);
}); | fix(middleware): always return array | mastilver_decorator-router | train | js,js |
15671ade5fd38777073a69b35c702badee6915ba | diff --git a/couch-login.js b/couch-login.js
index <HASH>..<HASH> 100644
--- a/couch-login.js
+++ b/couch-login.js
@@ -136,16 +136,7 @@ function deleteAccount (name, cb) {
// flag on it to fake it. Works the same either way
// in couch.
data._deleted = true
- this.put(u + '?rev=' + data._rev, data, thenLogout.bind(this))
- }
-
- function thenLogout (er, res, data) {
- if (er || res.statusCode >= 400) {
- return cb(er, res, data)
- }
-
- // just to be on the safe side, log out as well.
- this.logout(cb)
+ this.put(u + '?rev=' + data._rev, data, cb)
}
} | Don't log out after account deletion
Unnecessary for users, unwanted for admins. | npm_couch-login | train | js |
ac3b2a7c2f08f769b9f2af0d95b13b6874f9b424 | diff --git a/micro/orm/creator/Model.php b/micro/orm/creator/Model.php
index <HASH>..<HASH> 100644
--- a/micro/orm/creator/Model.php
+++ b/micro/orm/creator/Model.php
@@ -62,7 +62,7 @@ class Model {
public function getName() {
if($this->namespace!=="" && $this->namespace!==null)
- $namespace=$this->namespace."\\";
+ $namespace=$this->namespace.'\\';
return $namespace.$this->name;
}
diff --git a/project-files/app/controllers/ControllerBase.php b/project-files/app/controllers/ControllerBase.php
index <HASH>..<HASH> 100644
--- a/project-files/app/controllers/ControllerBase.php
+++ b/project-files/app/controllers/ControllerBase.php
@@ -1,4 +1,5 @@
<?php
+namespace controllers;
use micro\utils\RequestUtils;
use micro\controllers\Controller;
/** | ns controller in tpl | phpMv_ubiquity | train | php,php |
895c9b4669a488001b95665ff1d1abb9c536d8b7 | diff --git a/test/contest.rb b/test/contest.rb
index <HASH>..<HASH> 100644
--- a/test/contest.rb
+++ b/test/contest.rb
@@ -1,9 +1,9 @@
# License
# -------
-#
+#
# Contest is copyright (c) 2009 Damian Janowski and Michel Martens for
# Citrusbyte
-#
+#
# 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
@@ -12,10 +12,10 @@
# copies of the Software, and to permit persons to whom the
# Software is furnished to do so, subject to the following
# conditions:
-#
+#
# The above copyright notice and this permission notice shall be
# included in all copies or substantial portions of the Software.
-#
+#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
# OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
@@ -59,7 +59,7 @@ class Test::Unit::TestCase
def self.context(name, &block)
subclass = Class.new(self)
remove_tests(subclass)
- subclass.class_eval(&block)
+ subclass.class_eval(&block) if block_given?
const_set(context_name(name), subclass)
end
@@ -91,4 +91,4 @@ private
subclass.send(:undef_method, meth.to_sym)
end
end
-end
\ No newline at end of file
+end | Updated to latest contest.rb | norman_friendly_id | train | rb |
00cbf7fbcd103684b7ff10cae895e2b84220c3ed | diff --git a/find_test.go b/find_test.go
index <HASH>..<HASH> 100644
--- a/find_test.go
+++ b/find_test.go
@@ -341,11 +341,6 @@ var tests = []test{
query: bolthold.Where("Category").Eq("food").And(bolthold.Key()).Eq(testData[4].key()),
result: []int{4},
},
- test{
- name: "Test Key in secondary",
- query: bolthold.Where("ID").Eq(int32(0)),
- result: []int{0},
- },
}
func insertTestData(t *testing.T, store *bolthold.Store) { | Removed purposely failing test that was added to check mismatch format | timshannon_bolthold | train | go |
ca20f1f9a1ab138e8a349c0bbf373ba6e89336c6 | diff --git a/ui/common/wicket/src/main/java/org/openengsb/ui/common/wicket/taskbox/WebTaskboxServiceImpl.java b/ui/common/wicket/src/main/java/org/openengsb/ui/common/wicket/taskbox/WebTaskboxServiceImpl.java
index <HASH>..<HASH> 100755
--- a/ui/common/wicket/src/main/java/org/openengsb/ui/common/wicket/taskbox/WebTaskboxServiceImpl.java
+++ b/ui/common/wicket/src/main/java/org/openengsb/ui/common/wicket/taskbox/WebTaskboxServiceImpl.java
@@ -82,7 +82,9 @@ public class WebTaskboxServiceImpl extends TaskboxServiceImpl implements WebTask
@Override
public void registerTaskPanel(String taskType, Class<? extends Panel> panelClass) throws TaskboxException {
try {
- persistence.delete(new PanelRegistryEntry(taskType));
+ if(persistence.query(new PanelRegistryEntry(taskType)).size()>0){
+ persistence.delete(new PanelRegistryEntry(taskType));
+ }
persistence.create(new PanelRegistryEntry(taskType, panelClass));
log.info("Successfully registered " + panelClass.getName() + " for task type " + taskType);
} catch (PersistenceException e) { | Fix error with registerTaskPanel (no longer throws errors when adding a panel that cannot be deleted) | openengsb_openengsb | train | java |
69c9a3da52bb2c57c891f3faaf5762b70dbb6d9d | diff --git a/tests/test_main.py b/tests/test_main.py
index <HASH>..<HASH> 100644
--- a/tests/test_main.py
+++ b/tests/test_main.py
@@ -31,9 +31,8 @@ GITHUB_USER = 'user'
class TestArgParsing(unittest.TestCase):
def test_parse_respect_args(self):
- args = main.parse_respect_args(['oubiga', '[email protected]'])
+ args = main.parse_respect_args(['oubiga'])
self.assertEqual(args['<username>'], 'oubiga')
- self.assertEqual(args['<email>'], '[email protected]')
self.assertIsInstance(args, dict) | Deleted from test_parse_respect_args test about email. | oubiga_respect | train | py |
984c24e5696999b673c800a242391caf2bb825a5 | diff --git a/app/models/foreman_digitalocean/digitalocean.rb b/app/models/foreman_digitalocean/digitalocean.rb
index <HASH>..<HASH> 100644
--- a/app/models/foreman_digitalocean/digitalocean.rb
+++ b/app/models/foreman_digitalocean/digitalocean.rb
@@ -12,8 +12,6 @@ module ForemanDigitalocean
after_create :setup_key_pair
after_destroy :destroy_key_pair
- attr_accessible :region, :api_key
-
def to_label
"#{name} (#{provider_friendly_name})"
end
diff --git a/lib/foreman_digitalocean/engine.rb b/lib/foreman_digitalocean/engine.rb
index <HASH>..<HASH> 100644
--- a/lib/foreman_digitalocean/engine.rb
+++ b/lib/foreman_digitalocean/engine.rb
@@ -18,6 +18,7 @@ module ForemanDigitalocean
Foreman::Plugin.register :foreman_digitalocean do
requires_foreman '>= 1.8'
compute_resource ForemanDigitalocean::Digitalocean
+ parameter_filter ComputeResource, :region, :api_key
end
end | Fixes #<I> - Move to strong_params
This allows this plugin to work with <I>+ | theforeman_foreman-digitalocean | train | rb,rb |
e5bea5f859d4cbb4d65c8ef3b5ee2b6d7eec42f1 | diff --git a/test/helper_methods_test.rb b/test/helper_methods_test.rb
index <HASH>..<HASH> 100644
--- a/test/helper_methods_test.rb
+++ b/test/helper_methods_test.rb
@@ -297,6 +297,12 @@ class HelperMethodsTest < ActionView::TestCase
breadcrumbs(style: :bootstrap)
end
+ test "foundation5 style" do
+ breadcrumb :basic
+ assert_equal %{<ul class="breadcrumb"><li><a href="/">Home</a></li><li class="current">About</li></ol>},
+ breadcrumbs(style: :foundation5)
+ end
+
test "custom container and fragment tags" do
breadcrumb :basic
assert_equal %{<c class="breadcrumbs"><f><a href="/">Home</a></f> › <f class="current">About</f></c>},
@@ -476,4 +482,4 @@ private
path
end
-end
\ No newline at end of file
+end | Added test for foundation5 to helper_methods_test.rb. | lassebunk_gretel | train | rb |
d61c1e930a3531036db51af10dde6a99aeb8d5ea | diff --git a/lib/jekyll/migrators/wordpress.rb b/lib/jekyll/migrators/wordpress.rb
index <HASH>..<HASH> 100644
--- a/lib/jekyll/migrators/wordpress.rb
+++ b/lib/jekyll/migrators/wordpress.rb
@@ -21,9 +21,9 @@ module Jekyll
# post in wp_posts that has post_status = 'publish'.
# This restriction is made because 'draft' posts are not guaranteed to
# have valid dates.
- QUERY = "select post_title, post_name, post_date, post_content, post_excerpt, ID, guid from #{table_prefix}posts where post_status = 'publish' and post_type = 'post'"
+ query = "select post_title, post_name, post_date, post_content, post_excerpt, ID, guid from #{table_prefix}posts where post_status = 'publish' and post_type = 'post'"
- db[QUERY].each do |post|
+ db[query].each do |post|
# Get required fields and construct Jekyll compatible name
title = post[:post_title]
slug = post[:post_name] | Fix compile error by making QUERY lowercase (local instead of const) | jekyll_jekyll | train | rb |
e543c08f134159e2b57425beeebd42464be0ced8 | diff --git a/browsermob-proxy/src/main/java/com/groupon/odo/bmp/BrowserMobProxyHandler.java b/browsermob-proxy/src/main/java/com/groupon/odo/bmp/BrowserMobProxyHandler.java
index <HASH>..<HASH> 100644
--- a/browsermob-proxy/src/main/java/com/groupon/odo/bmp/BrowserMobProxyHandler.java
+++ b/browsermob-proxy/src/main/java/com/groupon/odo/bmp/BrowserMobProxyHandler.java
@@ -289,6 +289,7 @@ public class BrowserMobProxyHandler extends SeleniumProxyHandler {
private static final int HEADER_BUFFER_DEFAULT = 2;
private static final long serialVersionUID = 1L;
+ private final String localIP = "127.0.0.1";
private Server jettyServer;
private int headerBufferMultiplier = HEADER_BUFFER_DEFAULT;
@@ -604,7 +605,7 @@ public class BrowserMobProxyHandler extends SeleniumProxyHandler {
if (urlStr.startsWith("http://")) {
int httpPort = com.groupon.odo.proxylib.Utils.getSystemPort(Constants.SYS_HTTP_PORT);
- urlStr = urlStr.replace(getHostNameFromURL(urlStr), "127.0.0.1:" + httpPort);
+ urlStr = urlStr.replace(getHostNameFromURL(urlStr), localIP + ":" + httpPort);
}
okRequestBuilder = okRequestBuilder.url(urlStr); | Switching to use string for ip | groupon_odo | train | java |
085559bcd2e63b37c23474dc5d8a525ce2642c40 | diff --git a/fabric/runners.py b/fabric/runners.py
index <HASH>..<HASH> 100644
--- a/fabric/runners.py
+++ b/fabric/runners.py
@@ -39,14 +39,13 @@ class Remote(Runner):
while True:
if self.channel.exit_status_ready():
return
- # TODO: try/except KeyboardInterrupt around the sleep - necessary,
- # but also make sure there's no open tickets about doing this
- # better/different. (Also, see remote_interrupt)
# TODO: where to access paramiko (for io_sleep)? here or via
# something in Connection? (basically, how hard should Connection
# encapsulate paramiko things?)
time.sleep(io_sleep)
+ # TODO: implement Runner.send_interrupt (see v1's remote_interrupt)
+
def returncode(self):
return self.channel.recv_exit_status() | Note following recent developments in Invoke re: interrupt signals | fabric_fabric | train | py |
f8712102fa6b6876604c8025984be62a65e08695 | diff --git a/src/java/org/codehaus/groovy/grails/validation/AbstractConstraint.java b/src/java/org/codehaus/groovy/grails/validation/AbstractConstraint.java
index <HASH>..<HASH> 100644
--- a/src/java/org/codehaus/groovy/grails/validation/AbstractConstraint.java
+++ b/src/java/org/codehaus/groovy/grails/validation/AbstractConstraint.java
@@ -189,7 +189,7 @@ public abstract class AbstractConstraint implements Constraint {
private Object getPropertyValue(Errors errors, Object target) {
try {
return errors.getFieldValue( constraintPropertyName );
- } catch (NotReadablePropertyException nre) {
+ } catch (Exception nre) {
int i = constraintPropertyName.lastIndexOf(".");
String propertyName;
if(i > -1) { | fix for GRAILS-<I> "validation doesn't work in AppEngine" | grails_grails-core | train | java |
c6ddb7d57e34cbc4dfb9c4465dc9095ebaddda5d | diff --git a/src/Driver/DrushDriver.php b/src/Driver/DrushDriver.php
index <HASH>..<HASH> 100644
--- a/src/Driver/DrushDriver.php
+++ b/src/Driver/DrushDriver.php
@@ -78,7 +78,7 @@ class DrushDriver {
$output = $this->runCommand($method, $args);
}
catch (ProcessFailedException $e) {
- Container::getLogger()->error($e->getProcess()->getOutput());
+ // Container::getLogger()->error($e->getProcess()->getOutput());
throw new DrushFormatException("Drush command failed: $method", $e->getProcess()->getOutput());
}
diff --git a/src/Report/Format/JSON.php b/src/Report/Format/JSON.php
index <HASH>..<HASH> 100644
--- a/src/Report/Format/JSON.php
+++ b/src/Report/Format/JSON.php
@@ -61,9 +61,9 @@ class JSON extends Format {
$schema['stats'] = [
'critical' => $outcomes,
'high' => $outcomes,
- 'medium' => $outcomes,
+ 'normal' => $outcomes,
'low' => $outcomes,
- 'none' => $outcomes,
+ 'none' => $outcomes
];
foreach ($assessment->getResults() as $response) { | Fixed up a few output issues related to drush 9. | drutiny_drutiny | train | php,php |
27143a814d75a1ef7ced8885b352567eef1e79a3 | diff --git a/taskforce/watch_files.py b/taskforce/watch_files.py
index <HASH>..<HASH> 100755
--- a/taskforce/watch_files.py
+++ b/taskforce/watch_files.py
@@ -175,6 +175,7 @@ class watch(object):
self._poll_pending = {}
def __del__(self):
+ close_fds = True
if self._mode == WF_KQUEUE and self._kq:
# The is actually auto-closed, so this bit is not
# strictly needed.
@@ -183,6 +184,11 @@ class watch(object):
except: pass
self._kq = None
elif self._mode == WF_INOTIFYX:
+ # As we are storing inotify watch-descriptors rather
+ # than file descriptors in fds_open, skip closing them.
+ # They are automatically cleared when _inx_fd is closed
+ #
+ close_fds = False
try: os.close(self._inx_fd)
except: pass
self._inx_fd = None
@@ -194,10 +200,11 @@ class watch(object):
# However, these are not automatically closed, so we
# definitely need the destructor here.
#
- for fd in self.fds_open.keys():
- try: os.close(fd)
- except: pass
- del self.fds_open[fd]
+ if close_fds:
+ for fd in self.fds_open.keys():
+ try: os.close(fd)
+ except: pass
+ del self.fds_open[fd]
def fileno(self):
if self._mode == WF_KQUEUE: | inotifyx mode was closing watch-descriptors as if they were file descriptors in the object destructor | akfullfo_taskforce | train | py |
a44cf0d9ac41731bf93fd90d24943e6b88dfb469 | diff --git a/client.go b/client.go
index <HASH>..<HASH> 100644
--- a/client.go
+++ b/client.go
@@ -148,12 +148,8 @@ func ParseError(r *Response) error {
}
func readMyCert() (string, string, error) {
- homedir := os.Getenv("HOME")
- if homedir == "" {
- return "", "", fmt.Errorf("Failed to find homedir")
- }
- certf := fmt.Sprintf("%s/.config/lxd/%s", homedir, "cert.pem")
- keyf := fmt.Sprintf("%s/.config/lxd/%s", homedir, "key.pem")
+ certf := configPath("cert.pem")
+ keyf := configPath("key.pem")
err := FindOrGenCert(certf, keyf)
diff --git a/config.go b/config.go
index <HASH>..<HASH> 100644
--- a/config.go
+++ b/config.go
@@ -36,9 +36,13 @@ type RemoteConfig struct {
Addr string `yaml:"addr"`
}
+func configPath(file string) string {
+ return os.ExpandEnv(fmt.Sprintf("$HOME/.config/lxc/%s", file))
+}
+
func renderConfigPath(path string) string {
if path == "" {
- path = "$HOME/.lxd/config.yaml"
+ path = configPath("config.yml")
}
return os.ExpandEnv(path) | Use ~/.config/lxc as the config directory everywhere
Closes #<I> | lxc_lxd | train | go,go |
ae5388dd797d9f6a0c07bca07cead78f172ce5b1 | diff --git a/util/git/client.go b/util/git/client.go
index <HASH>..<HASH> 100644
--- a/util/git/client.go
+++ b/util/git/client.go
@@ -9,6 +9,7 @@ import (
"os"
"os/exec"
"path/filepath"
+ "regexp"
"sort"
"strconv"
"strings"
@@ -120,7 +121,8 @@ func WithEventHandlers(handlers EventHandlers) ClientOpts {
}
func NewClient(rawRepoURL string, creds Creds, insecure bool, enableLfs bool, opts ...ClientOpts) (Client, error) {
- root := filepath.Join(os.TempDir(), strings.Replace(NormalizeGitURL(rawRepoURL), "/", "_", -1))
+ r := regexp.MustCompile("(/|:)")
+ root := filepath.Join(os.TempDir(), r.ReplaceAllString(NormalizeGitURL(rawRepoURL), "_"))
if root == os.TempDir() {
return nil, fmt.Errorf("Repository '%s' cannot be initialized, because its root would be system temp at %s", rawRepoURL, root)
} | fix: replace colons in addition to slashes in app tmp directory (#<I>) (#<I>)
closes <URL> | argoproj_argo-cd | train | go |
027695f7753245b904ac74e38089376be9aebb16 | diff --git a/src/symbolparts/textfields.js b/src/symbolparts/textfields.js
index <HASH>..<HASH> 100644
--- a/src/symbolparts/textfields.js
+++ b/src/symbolparts/textfields.js
@@ -6,7 +6,7 @@ module.exports = function textfields() {
var drawArray2 = [];
var bbox = this.properties.baseGeometry.bbox;
var fontColor =
- this.infoColor ||
+ this.properties.infoColor ||
this.colors.iconColor[this.properties.affiliation] ||
this.colors.iconColor["Friend"];
var fontFamily = "Arial"; | Fix issue with infoColor property not being respected
Check this.properties object for infoColor property | spatialillusions_milsymbol | train | js |
d37dbef9fe3cd1ae5789a253dda5c82feefedafd | diff --git a/config/projects/chef.rb b/config/projects/chef.rb
index <HASH>..<HASH> 100644
--- a/config/projects/chef.rb
+++ b/config/projects/chef.rb
@@ -68,14 +68,15 @@ package :rpm do
end
package :pkg do
- identifier "com.getchef.pkg.chef"
+ identifier "com.getchef.pkg.#{name}"
signing_identity "Developer ID Installer: Chef Software, Inc. (EU3VF8YLX2)"
end
compress :dmg
+msi_upgrade_code = "D607A85C-BDFA-4F08-83ED-2ECB4DCD6BC5"
package :msi do
fast_msi true
- upgrade_code "D607A85C-BDFA-4F08-83ED-2ECB4DCD6BC5"
+ upgrade_code msi_upgrade_code
wix_candle_extension 'WixUtilExtension'
signing_identity "F74E1A68005E8A9C465C3D2FF7B41F3988F0EA09", machine_store: true
parameters ChefLogDllPath: windows_safe_path(gem_path("chef-[0-9]*-mingw32/ext/win32-eventlog/chef-log.dll")) | Refactor MSI upgrade code in chef project. | chef_chef | train | rb |
7a96c7251f6f25054f4ebe269e26427fe1ff3823 | diff --git a/src/fkooman/Http/Service.php b/src/fkooman/Http/Service.php
index <HASH>..<HASH> 100644
--- a/src/fkooman/Http/Service.php
+++ b/src/fkooman/Http/Service.php
@@ -61,11 +61,29 @@ class Service
// handle non matching patterns
if (in_array($this->request->getRequestMethod(), $this->supportedMethods)) {
- return new Response(404);
+ $response = new Response(404, "application/json");
+ $response->setContent(
+ json_encode(
+ array(
+ "code" => 404,
+ "error" => "Not Found"
+ )
+ )
+ );
+
+ return $response;
}
- $response = new Response(405);
+ $response = new Response(405, "application/json");
$response->setHeader("Allow", implode(",", $this->supportedMethods));
+ $response->setContent(
+ json_encode(
+ array(
+ "code" => 405,
+ "error" => "Method Not Allowed"
+ )
+ )
+ );
return $response;
} | add response body for <I> and <I> responses and make them JSON | fkooman_php-lib-rest | train | php |
0e3c87deb057f031ca4113ca7a2c6225df75df0b | diff --git a/src/toil/batchSystems/abstractBatchSystem.py b/src/toil/batchSystems/abstractBatchSystem.py
index <HASH>..<HASH> 100644
--- a/src/toil/batchSystems/abstractBatchSystem.py
+++ b/src/toil/batchSystems/abstractBatchSystem.py
@@ -160,10 +160,6 @@ class AbstractBatchSystem(object):
would typically need to copy the variables before enqueuing a job.
If no value is provided it will be looked up from the current environment.
-
- NB: Only the Mesos and single-machine batch systems support passing environment
- variables. On other batch systems, this method has no effect. See
- https://github.com/BD2KGenomics/toil/issues/547.
"""
raise NotImplementedError() | Remove out of date doc comment (connected to #<I>) | DataBiosphere_toil | train | py |
84d3b5a8b58b2cdd76a8a90844c3dcbaaf3a845b | diff --git a/Eloquent/Model.php b/Eloquent/Model.php
index <HASH>..<HASH> 100644
--- a/Eloquent/Model.php
+++ b/Eloquent/Model.php
@@ -922,6 +922,36 @@ abstract class Model implements Arrayable, ArrayAccess, CanBeEscapedWhenCastToSt
}
/**
+ * Increment a column's value by a given amount without raising any events.
+ *
+ * @param string $column
+ * @param float|int $amount
+ * @param array $extra
+ * @return int
+ */
+ protected function incrementQuietly($column, $amount = 1, array $extra = [])
+ {
+ return static::withoutEvents(function () use ($column, $amount, $extra) {
+ return $this->incrementOrDecrement($column, $amount, $extra, 'increment');
+ });
+ }
+
+ /**
+ * Decrement a column's value by a given amount without raising any events.
+ *
+ * @param string $column
+ * @param float|int $amount
+ * @param array $extra
+ * @return int
+ */
+ protected function decrementQuietly($column, $amount = 1, array $extra = [])
+ {
+ return static::withoutEvents(function () use ($column, $amount, $extra) {
+ return $this->incrementOrDecrement($column, $amount, $extra, 'decrement');
+ });
+ }
+
+ /**
* Save the model and all of its relationships.
*
* @return bool | Add incrementQuietly and decrementQuietly database functions to complement saveQuietly (#<I>) | illuminate_database | train | php |
ae0c30d8cb6ae4f4b2170acb8c4021d618406b40 | diff --git a/examples/git/branch.js b/examples/git/branch.js
index <HASH>..<HASH> 100644
--- a/examples/git/branch.js
+++ b/examples/git/branch.js
@@ -5,8 +5,8 @@ module.exports = (argv) => {
const args = require('../..').run(`
usage: git branch [options] [-r | -a] [--merged | --no-merged]
- or: git branch [options] [-l] [-f] <branchname> [<start-point>]
or: git branch [options] [-r] (-d | -D) <branchname>...
+ or: git branch [options] [-l] [-f] <branchname> [<start-point>]
or: git branch [options] (-m | -M) [<oldbranch>] <newbranch>
Generic options:
diff --git a/test-js/test.js b/test-js/test.js
index <HASH>..<HASH> 100644
--- a/test-js/test.js
+++ b/test-js/test.js
@@ -21,7 +21,7 @@ describe('neodoc', () => {
expect(git('branch -u origin master'))
.to.deep.equal({
branch: true
- , '<branchname>': 'master'
+ , '<branchname>': [ 'master' ]
, '-u': 'origin'
, '--set-upstream-to': 'origin'
}); | Fix up git tests
The parser has gotten "more correct", which highlighted an issue with
the git-branch tests, in that really the specification as it stands is
ambiguous.
The problem is, how do you decide between:
```
usage: prog a [b]
or: prog a ...
```
I think part of the solution will be to only substitute [options] for
the 'Generic options' outline in the git-branch help text. | felixSchl_neodoc | train | js,js |
5a80df7b3f82109736167f67d4c92820956b2d17 | diff --git a/pycbc/types/optparse.py b/pycbc/types/optparse.py
index <HASH>..<HASH> 100644
--- a/pycbc/types/optparse.py
+++ b/pycbc/types/optparse.py
@@ -43,7 +43,7 @@ class MultiDetOptionAction(argparse.Action):
def __init__(self,
option_strings,
dest,
- nargs=None,
+ nargs='+',
const=None,
default=None,
type=None, | Fix missing bits from #<I> (#<I>)
* Fix missing bits from #<I>
* Ian's suggestion
* This is now unnecessary | gwastro_pycbc | train | py |
865c0b4bc0a8b126b9196e199091c994cc829b52 | diff --git a/src/pixi/textures/BaseTexture.js b/src/pixi/textures/BaseTexture.js
index <HASH>..<HASH> 100644
--- a/src/pixi/textures/BaseTexture.js
+++ b/src/pixi/textures/BaseTexture.js
@@ -55,7 +55,7 @@ PIXI.BaseTexture = function(source)
if(!source)return;
- if(this.source instanceof Image)
+ if(this.source instanceof Image || this.source instanceof HTMLImageElement)
{
if(this.source.complete)
{ | allow a user to pass an DOM Image elemnt as a base textutrre source
Accept a dom image as param to base texture, fixes #<I> | drkibitz_node-pixi | train | js |
7f38aac9019281034a993e4a66f6bb6ca008ef41 | diff --git a/pixelgl/canvas.go b/pixelgl/canvas.go
index <HASH>..<HASH> 100644
--- a/pixelgl/canvas.go
+++ b/pixelgl/canvas.go
@@ -164,7 +164,9 @@ func (c *Canvas) SetBounds(bounds pixel.Rect) {
c.bounds = bounds
// if this bounds fit into the original bounds, no need to reallocate
- if c.orig.borders.Contains(bounds.Pos) && c.orig.borders.Contains(bounds.Pos+bounds.Size) {
+ borX, borY, borW, borH := intBounds(c.orig.borders)
+ bndX, bndY, bndW, bndH := intBounds(bounds)
+ if borX <= bndX && bndX+bndW <= borX+borW && borY <= bndY && bndY+bndH <= borY+borH {
return
} | minor stability change in Canvas.SetBounds | faiface_pixel | train | go |
5e5a87711f36f9115a0c7912f3a8686ae4c69197 | diff --git a/spec/import_js/configuration_spec.rb b/spec/import_js/configuration_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/import_js/configuration_spec.rb
+++ b/spec/import_js/configuration_spec.rb
@@ -27,8 +27,6 @@ describe ImportJS::Configuration do
end
context 'when the configuration has a `minimum_version`' do
- let(:minimum_version) { '1.2.3' }
- let(:current_version) { '1.2.4' }
let(:configuration) do
{
'minimum_version' => minimum_version,
@@ -40,6 +38,9 @@ describe ImportJS::Configuration do
end
context 'when the current version is newer than minimum version' do
+ let(:minimum_version) { '1.2.3' }
+ let(:current_version) { '1.2.4' }
+
it 'does not raise an error' do
expect { subject }.not_to raise_error
end
@@ -47,6 +48,7 @@ describe ImportJS::Configuration do
context 'when the current version is smaller than minimum version' do
let(:minimum_version) { '1.2.5' }
+ let(:current_version) { '1.2.4' }
it 'raises a helpful error message' do
expect { subject }.to raise_error( | Move minimum and current version into context block
I think that this improves the readability of the spec. | Galooshi_import-js | train | rb |
02ca237a5d753f4797b5d9376dc2066dcd5ef6ca | diff --git a/src/Codeception/Lib/InnerBrowser.php b/src/Codeception/Lib/InnerBrowser.php
index <HASH>..<HASH> 100644
--- a/src/Codeception/Lib/InnerBrowser.php
+++ b/src/Codeception/Lib/InnerBrowser.php
@@ -525,7 +525,7 @@ class InnerBrowser extends Module implements Web
{
$options = $field->filterXPath(sprintf('//option[text()=normalize-space("%s")]', $option));
if ($options->count()) {
- return $options->first()->attr('value');
+ return $options->first()->text();
}
return $option;
} | Fixing matchOption to return the option value in case there is no value attribute | Codeception_base | train | php |
04de0c4b13c4f15be48358eed682bee5e17f0685 | diff --git a/lib/refile/rails/attachment_helper.rb b/lib/refile/rails/attachment_helper.rb
index <HASH>..<HASH> 100644
--- a/lib/refile/rails/attachment_helper.rb
+++ b/lib/refile/rails/attachment_helper.rb
@@ -2,6 +2,7 @@ module Refile
module AttachmentHelper
def attachment_url(record, name, *args, filename: nil, format: nil)
file = record.send(name)
+ return unless file
filename ||= name.to_s | return if file is nil
related to #<I> | refile_refile | train | rb |
13c5322134607d11a58bdfb5b4833d7d41b6ece4 | diff --git a/features/support/widget.rb b/features/support/widget.rb
index <HASH>..<HASH> 100644
--- a/features/support/widget.rb
+++ b/features/support/widget.rb
@@ -4,6 +4,18 @@ $LOAD_PATH.unshift lib_path
require 'dill/cucumber'
module Widget
+ def self.defined_widgets
+ @defined_widgets ||= []
+ end
+
+ def clear_widgets
+ Widget.defined_widgets.each do |e|
+ self.class.send :remove_const, e
+ end
+
+ Widget.defined_widgets.clear
+ end
+
def define_widget(code)
parent = self.class
before_consts = parent.constants.dup
@@ -16,6 +28,8 @@ module Widget
fail "no widget defined" if constants.size == 0
fail "more than one widget defined" if constants.size > 1
+ Widget.defined_widgets << constants.first
+
parent.const_get(constants.first)
end
@@ -30,3 +44,7 @@ module Widget
end
World Widget
+
+After do
+ clear_widgets
+end | [tests] Clean up after a widget test is done. | mojotech_capybara-ui | train | rb |
ffad50cea75a5337145fb312f7d23547d38185ee | diff --git a/newsletter-bundle/src/Resources/contao/classes/Newsletter.php b/newsletter-bundle/src/Resources/contao/classes/Newsletter.php
index <HASH>..<HASH> 100644
--- a/newsletter-bundle/src/Resources/contao/classes/Newsletter.php
+++ b/newsletter-bundle/src/Resources/contao/classes/Newsletter.php
@@ -371,9 +371,11 @@ class Newsletter extends \Backend
$objTemplate->title = $objNewsletter->subject;
$objTemplate->body = \String::parseSimpleTokens($html, $arrRecipient);
$objTemplate->charset = \Config::get('characterSet');
- $objTemplate->css = $css; // Backwards compatibility
$objTemplate->recipient = $arrRecipient['email'];
+ // Deprecated since Contao 4.0, to be removed in Contao 5.0
+ $objTemplate->css = $css;
+
// Parse template
$objEmail->html = $objTemplate->parse();
$objEmail->imageDir = TL_ROOT . '/'; | [Newsletter] Mark deprecated stuff for removal. | contao_contao | train | php |
6658fc315e28bfe4c10964ced0870e56b730b5c7 | diff --git a/vendors/shells/asset_compress.php b/vendors/shells/asset_compress.php
index <HASH>..<HASH> 100644
--- a/vendors/shells/asset_compress.php
+++ b/vendors/shells/asset_compress.php
@@ -108,6 +108,7 @@ class AssetCompressShell extends Shell {
$this->out('Usage: cake asset_compress <command>');
$this->hr();
$this->out("clear - Clears all existing build files.");
+ $this->out("build - Builds compressed files.");
$this->out();
}
}
\ No newline at end of file | Adding a help message about the build tool. | markstory_asset_compress | train | php |
19348ec5380c66d13792906e726184389cf327c7 | diff --git a/src/Listener/UnapproveNewContent.php b/src/Listener/UnapproveNewContent.php
index <HASH>..<HASH> 100644
--- a/src/Listener/UnapproveNewContent.php
+++ b/src/Listener/UnapproveNewContent.php
@@ -10,6 +10,8 @@
namespace Flarum\Approval\Listener;
+use Flarum\Core\Post;
+use Flarum\Event\ConfigureModelDefaultAttributes;
use Flarum\Event\PostWillBeSaved;
use Flarum\Flags\Flag;
use Illuminate\Contracts\Events\Dispatcher;
@@ -21,10 +23,21 @@ class UnapproveNewContent
*/
public function subscribe(Dispatcher $events)
{
+ $events->listen(ConfigureModelDefaultAttributes::class, [$this, 'approveByDefault']);
$events->listen(PostWillBeSaved::class, [$this, 'unapproveNewPosts']);
}
/**
+ * @param ConfigureModelDefaultAttributes $event
+ */
+ public function approveByDefault(ConfigureModelDefaultAttributes $event)
+ {
+ if ($event->isModel(Post::class)) {
+ $event->attributes['is_approved'] = true;
+ }
+ }
+
+ /**
* @param PostWillBeSaved $event
*/
public function unapproveNewPosts(PostWillBeSaved $event) | Give the is_approved attribute a default value on new Post models | flarum_approval | train | php |
543a2f8c84d0639bcf57a86f3573cbc4132c2bc6 | diff --git a/packages/ui-react-utils/src/passthroughProps.js b/packages/ui-react-utils/src/passthroughProps.js
index <HASH>..<HASH> 100644
--- a/packages/ui-react-utils/src/passthroughProps.js
+++ b/packages/ui-react-utils/src/passthroughProps.js
@@ -78,12 +78,15 @@ function passthroughProps(props) {
Object.keys(props)
// style and className need to be explicitly passed through
+ // styles and makeStyle can not pass through
.filter(
(propName) =>
isPropValid(propName) &&
propName !== 'style' &&
propName !== 'className' &&
- propName !== 'children'
+ propName !== 'children' &&
+ propName !== 'styles' &&
+ propName !== 'makeStyles'
)
.forEach((propName) => {
validProps[propName] = props[propName] | fix(ui-react-utils): add styles and makeStyles to passthroughProps exceptions
Components must not pass through the makeStyles and styles props to other components, because these
are generated for each component by the withStyle decorator. | instructure_instructure-ui | train | js |
fb02ca5920aae405048ebab50e09db67d5bf12a2 | diff --git a/webpack.config.js b/webpack.config.js
index <HASH>..<HASH> 100644
--- a/webpack.config.js
+++ b/webpack.config.js
@@ -40,7 +40,10 @@ module.exports = {
exclude: [helpers.root('node_modules')]
}, {
test: /\.ts$/,
- loader: 'awesome-typescript-loader?declaration=false',
+ loader: 'awesome-typescript-loader',
+ options: {
+ declaration: false
+ },
exclude: [/\.e2e\.ts$/]
}]
}, | chore(webpack): fit to webpack v2 best practices
According to [Webpack 2 best practices](<URL>) rather than using the `?options` the more explicit `options` prop should be used.
(Really just a minor thing :wink:) | ngx-translate_core | train | js |
ba207a82f9d27699313bde74aaca05eca2a89bd3 | diff --git a/watch.js b/watch.js
index <HASH>..<HASH> 100644
--- a/watch.js
+++ b/watch.js
@@ -3,7 +3,7 @@ const chokidar = require('chokidar');
const exec = (cmd, args) => {
return () => {
- var child = cp.spawn(cmd, args);
+ var child = cp.spawn(cmd, args, { shell: true });
child.stdout.pipe(process.stdout);
child.stderr.pipe(process.stderr); | Fix launching npm under windows (node 6+) | redom_redom | train | js |
c1399f9bdcd01a0095f586a93a8b662e32ede896 | diff --git a/lib/renderer/init.js b/lib/renderer/init.js
index <HASH>..<HASH> 100644
--- a/lib/renderer/init.js
+++ b/lib/renderer/init.js
@@ -70,7 +70,7 @@ if (window.location.protocol === 'chrome-devtools:') {
require('./override')
// Load webview tag implementation.
- if (process.guestInstanceId == null) {
+ if (nodeIntegration === 'true' && process.guestInstanceId == null) {
require('./web-view/web-view')
require('./web-view/web-view-attributes')
} | Disable webview when nodeIntegration is off | electron_electron | train | js |
07172a88d6f7cc5f0676b83f0eda7933ac6a6d57 | diff --git a/ants/viz/plot.py b/ants/viz/plot.py
index <HASH>..<HASH> 100644
--- a/ants/viz/plot.py
+++ b/ants/viz/plot.py
@@ -254,7 +254,7 @@ def plot_grid(
return mirror_matrix(x.T)
def rotate180_matrix(x):
- return x[::-1, :]
+ return x[::-1, ::-1]
def rotate90_matrix(x):
return mirror_matrix(x).T
@@ -2152,7 +2152,7 @@ def plot(
return mirror_matrix(x.T)
def rotate180_matrix(x):
- return x[::-1, :]
+ return x[::-1, ::-1]
def rotate90_matrix(x):
return x.T | BUG: rotate<I>_matrix ill-defined
found and reported by @Littlehhh | ANTsX_ANTsPy | train | py |
3c3c5b780a84e6af0014187f5753a60d8aa38d72 | diff --git a/CPTP/Module/Rewrite.php b/CPTP/Module/Rewrite.php
index <HASH>..<HASH> 100644
--- a/CPTP/Module/Rewrite.php
+++ b/CPTP/Module/Rewrite.php
@@ -107,18 +107,18 @@ class CPTP_Module_Rewrite extends CPTP_Module {
$post_types = $args["object_type"];
foreach ($post_types as $post_type):
$post_type_obj = get_post_type_object($post_type);
- $slug = $post_type_obj->rewrite['slug'];
-
-
- if(!$slug) {
+ if(!empty($post_type_obj->rewrite['slug'])){
+ $slug = $post_type_obj->rewrite['slug'];
+ }
+ else {
$slug = $post_type;
}
- if(is_string($post_type_obj->has_archive)) {
+ if(!empty($post_type_obj->has_archive) && is_string($post_type_obj->has_archive)) {
$slug = $post_type_obj->has_archive;
};
- if($post_type_obj->rewrite['with_front']) {
+ if(!empty($post_type_obj->rewrite['with_front'])) {
$slug = substr( $wp_rewrite->front, 1 ).$slug;
} | fixed issue with Trying to get property of non-object | torounit_custom-post-type-permalinks | train | php |
56d8edd064b991e4c77268d914edffc8f1ee2abc | diff --git a/src/main/java/com/marklogic/client/impl/PojoRepositoryImpl.java b/src/main/java/com/marklogic/client/impl/PojoRepositoryImpl.java
index <HASH>..<HASH> 100644
--- a/src/main/java/com/marklogic/client/impl/PojoRepositoryImpl.java
+++ b/src/main/java/com/marklogic/client/impl/PojoRepositoryImpl.java
@@ -218,10 +218,6 @@ public class PojoRepositoryImpl<T, ID extends Serializable>
responseHandle.setQueryCriteria(query);
}
docMgr.setResponseFormat(searchBase.getFormat());
- } else {
- // TODO: remove this once REST API only considers Content-type header
- // (not format parameter) for expceted payload format
- docMgr.setResponseFormat(Format.XML);
}
String tid = transaction == null ? null : transaction.getTransactionId(); | fix another piece of #<I>, address TODO on line <I> (actually line <I> now) | marklogic_java-client-api | train | java |
b21247f63763e9c539882ed6604997302bcfdd80 | diff --git a/index.js b/index.js
index <HASH>..<HASH> 100644
--- a/index.js
+++ b/index.js
@@ -26,7 +26,9 @@ var gulpJSHint = function(opt){
gulpJSHint.reporterSimple = function () {
return es.map(function (file, cb) {
file.jshint.results.forEach(function (err) {
- console.log(file.path + ': line ' + err.line + ', col ' + err.character + ', code ' + err.code + ', ' + err.reason);
+ if (err) {
+ console.log(file.path + ': line ' + err.line + ', col ' + err.character + ', code ' + err.code + ', ' + err.reason);
+ }
});
cb(null, file);
}); | Only log the error if there is one | spalger_gulp-jshint | train | js |
7e4a96ede0ced1aec180d9c5124af46d4a841f9e | diff --git a/spec/lib/deep_end_spec.rb b/spec/lib/deep_end_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/lib/deep_end_spec.rb
+++ b/spec/lib/deep_end_spec.rb
@@ -88,6 +88,19 @@ module DeepEnd
@graph.resolved_dependencies.length.should == 0
end
+ it 'should correctly order interdependent objects' do
+ # Add dependencies
+ @graph.add_dependency @dependency_f, [@dependency_e, @dependency_d]
+ @graph.add_dependency @dependency_e, [@dependency_d]
+ @graph.add_dependency @dependency_d
+ # Check order
+ sorted_objects = @graph.resolved_dependencies
+ sorted_objects[0].should == @dependency_d
+ sorted_objects[1].should == @dependency_e
+ sorted_objects[2].should == @dependency_f
+ end
+
+
end
end | Added test for reuse post-rest | stationkeeping_deep_end | train | rb |
f1b1c487629486116ff7c6ea3365431d3e621291 | diff --git a/lib/getFilterInfosAndTargetContentTypeFromQueryString.js b/lib/getFilterInfosAndTargetContentTypeFromQueryString.js
index <HASH>..<HASH> 100644
--- a/lib/getFilterInfosAndTargetContentTypeFromQueryString.js
+++ b/lib/getFilterInfosAndTargetContentTypeFromQueryString.js
@@ -33,7 +33,7 @@ function getMockFileNameForContentType(contentType) {
if (contentType === 'image/vnd.microsoft.icon') {
return '.ico';
}
- return '.' + mime.extensions[contentType];
+ return '.' + mime._extensions[contentType];
}
}
diff --git a/lib/processImage.js b/lib/processImage.js
index <HASH>..<HASH> 100644
--- a/lib/processImage.js
+++ b/lib/processImage.js
@@ -10,9 +10,9 @@ var hijackResponse = require('hijackresponse');
var isImageByExtension = {};
-Object.keys(mime.extensions).forEach(function (contentType) {
+Object.keys(mime._extensions).forEach(function (contentType) {
if (/^image\//.test(contentType)) {
- var extension = mime.extensions[contentType];
+ var extension = mime._extensions[contentType];
isImageByExtension[extension] = true;
}
}); | Adapt to changes in the mime library | papandreou_express-processimage | train | js,js |
746c40b45f5ab2a74394f85cb01033a6aa6878ed | diff --git a/picotui/widgets.py b/picotui/widgets.py
index <HASH>..<HASH> 100644
--- a/picotui/widgets.py
+++ b/picotui/widgets.py
@@ -285,8 +285,9 @@ class WListBox(EditorExt):
self.attr_color(COLOR_BRIGHT_WHITE, COLOR_GREEN)
else:
self.attr_color(COLOR_BLACK, COLOR_GREEN)
- l = self.render_line(l)[:self.width]
- self.wr(l)
+ if i != -1:
+ l = self.render_line(l)[:self.width]
+ self.wr(l)
self.clear_num_pos(self.width - len(l))
if hlite:
self.attr_reset() | widgets: WListBox: Handle show_line("", -1) call to clear empty lines. | pfalcon_picotui | train | py |
bb8c41d1e4da12dc460e65e39e60834f01eccd5d | diff --git a/lib/Cake/tests/Case/Model/Behavior/TranslateBehaviorTest.php b/lib/Cake/tests/Case/Model/Behavior/TranslateBehaviorTest.php
index <HASH>..<HASH> 100644
--- a/lib/Cake/tests/Case/Model/Behavior/TranslateBehaviorTest.php
+++ b/lib/Cake/tests/Case/Model/Behavior/TranslateBehaviorTest.php
@@ -670,7 +670,7 @@ class TranslateBehaviorTest extends CakeTestCase {
));
$TestModel->create();
$this->assertFalse($TestModel->save($data));
- $this->assertEqual($TestModel->validationErrors['title'], 'This field cannot be left blank');
+ $this->assertEqual($TestModel->validationErrors['title'], array('This field cannot be left blank'));
$TestModel->locale = 'eng';
$TestModel->validate['title'] = '/Only this title/'; | Fixing more tests related to changes on model validation | cakephp_cakephp | train | php |
4e6f40fe932b9e5334ce338a7802cd19c17178a3 | diff --git a/microsoftbotframework/msbot.py b/microsoftbotframework/msbot.py
index <HASH>..<HASH> 100644
--- a/microsoftbotframework/msbot.py
+++ b/microsoftbotframework/msbot.py
@@ -3,7 +3,6 @@ from celery.local import PromiseProxy
from .config import Config
import requests
import json
-import jwt
import redis
import datetime | remove jwt from imports | mbrown1508_microsoftbotframework | train | py |
ae15280debbe70f804bd05327c4793c475af7374 | diff --git a/openquake/risk/probabilistic_event_based.py b/openquake/risk/probabilistic_event_based.py
index <HASH>..<HASH> 100644
--- a/openquake/risk/probabilistic_event_based.py
+++ b/openquake/risk/probabilistic_event_based.py
@@ -209,7 +209,7 @@ class AggregateLossCurve(object):
"""Return the losses used to compute the aggregate curve."""
if not self.distribution:
return array([])
- else: # if needed because numpy return a scalar if the list is empty
+ else: # if needed because numpy returns a scalar if the list is empty
return array(self.distribution).sum(axis=0)
def compute(self, num=DEFAULT_NUMBER_OF_SAMPLES): | Updated doc; refactored code
Former-commit-id: d4e<I>d2ad6a<I>bac<I>a<I>f<I>cd<I>cae9e<I> | gem_oq-engine | train | py |
54e774e7bd96148a0ec0c290a1a56f52cd554a46 | diff --git a/rfhub/blueprints/doc/static/doc.js b/rfhub/blueprints/doc/static/doc.js
index <HASH>..<HASH> 100644
--- a/rfhub/blueprints/doc/static/doc.js
+++ b/rfhub/blueprints/doc/static/doc.js
@@ -32,16 +32,15 @@ $(document).ready(function () {
$(window).on('popstate', function (e) {
var state = e.originalEvent.state;
- if (! _.isEmpty(state)) {
- renderKeywords(state.pattern);
- setSearchFieldValue(state.pattern);
- }
+ var pattern = state === null ? '' : state.pattern;
+ renderKeywords(pattern);
+ setSearchFieldValue(pattern);
});
var params = queryString.parse(location.search);
if (! _.isEmpty(params.pattern)) {
- renderKeywords(params.pattern)
- setSearchFieldValue(state.pattern);
+ renderKeywords(params.pattern);
+ setSearchFieldValue(params.pattern);
}
}); | reset state correctly also for starting page
When navigating back to the base url (rfhub/doc), state
object is null in history. Handle this special case correctly. | boakley_robotframework-hub | train | js |
d44e18da99e93498f3b7a9fc9a688392c92862d3 | diff --git a/src/convert.js b/src/convert.js
index <HASH>..<HASH> 100644
--- a/src/convert.js
+++ b/src/convert.js
@@ -238,7 +238,12 @@ function makeEslintFixFn(config) {
messages.push(`Skipping "eslint --fix" on ${path}.js because there was no eslint config file.`);
ruleIds = [];
} else {
- let eslintOutput = JSON.parse(eslintOutputStr);
+ let eslintOutput;
+ try {
+ eslintOutput = JSON.parse(eslintOutputStr);
+ } catch (e) {
+ throw new CLIError(`Error while running eslint:\n${eslintOutputStr}`);
+ }
ruleIds = eslintOutput[0].messages
.map(message => message.ruleId).filter(ruleId => ruleId);
ruleIds = Array.from(new Set(ruleIds)).sort(); | fix: display the full error when eslint fails (#<I>)
Previously, it would always parse the result as JSON, but if it was an error
message, it would just be invalid JSON. | decaffeinate_bulk-decaffeinate | train | js |
46756ad9b739cff79dfa70841f335da03e581b22 | diff --git a/src/ngrest/plugins/CheckboxRelation.php b/src/ngrest/plugins/CheckboxRelation.php
index <HASH>..<HASH> 100644
--- a/src/ngrest/plugins/CheckboxRelation.php
+++ b/src/ngrest/plugins/CheckboxRelation.php
@@ -137,6 +137,11 @@ class CheckboxRelation extends \admin\ngrest\base\Plugin
$event->sender->{$this->name} = $data;
}
+ public function onBeforeListFind($event)
+ {
+ $event->sender->{$this->name} = $this->model->find()->leftJoin($this->refJoinTable, $this->model->tableName().'.id='.$this->refJoinTable.'.'.$this->refJoinPkId)->where([$this->refJoinTable.'.'.$this->refModelPkId => $event->sender->id])->all();
+ }
+
public function onBeforeFind($event)
{
$event->sender->{$this->name} = $this->model->find()->leftJoin($this->refJoinTable, $this->model->tableName().'.id='.$this->refJoinTable.'.'.$this->refJoinPkId)->where([$this->refJoinTable.'.'.$this->refModelPkId => $event->sender->id])->all(); | Checkbox releation collect data on ngrest find. | luyadev_luya-module-admin | train | php |
a7b4f03ee77d792a2e57aeccf96b60ce26307f70 | diff --git a/app/Blueprint/Keepalive/KeepaliveService.php b/app/Blueprint/Keepalive/KeepaliveService.php
index <HASH>..<HASH> 100644
--- a/app/Blueprint/Keepalive/KeepaliveService.php
+++ b/app/Blueprint/Keepalive/KeepaliveService.php
@@ -39,6 +39,8 @@ class KeepaliveService extends Service
$this->copySidekicks($this->targetService);
$this->addSidekick($this->targetService);
+ // copy volumes from so volume-from sidekicks are also added
+ $this->addCopyVolumesFrom($this->targetService);
$this->targetService->resetSidekicks();
$this->copyLabels($this->targetService);
$this->targetService->setNetworkMode( new ShareNetworkMode($this) ); | added copy volumes from to keepalive service | ipunkt_rancherize | train | php |
f8cfb4d9bd01b5b343f8dfadd45c5f5178ac4059 | diff --git a/pylogit/mixed_logit.py b/pylogit/mixed_logit.py
index <HASH>..<HASH> 100755
--- a/pylogit/mixed_logit.py
+++ b/pylogit/mixed_logit.py
@@ -51,9 +51,9 @@ def mnl_utility_transform(sys_utility_array, *args, **kwargs):
Returns
-------
- systematic_utilities : ndarray
- 2D numpy array of systematic utilities. If `sys_utility_array` is
- 2D, then `sys_utility_array` is returned. Else, returns
+ systematic_utilities : 2D ndarray.
+ The input systematic utilities. If `sys_utility_array` is 2D, then
+ `sys_utility_array` is returned. Else, returns
`sys_utility_array[:, None]`.
"""
# Return a 2D array of systematic utility values | Changed documentation of the mnl_utility_transform function. | timothyb0912_pylogit | train | py |
e37fce92ea1aa1ad5f85c6a8ba5fad8c3186353c | diff --git a/halp/directed_hypergraph.py b/halp/directed_hypergraph.py
index <HASH>..<HASH> 100644
--- a/halp/directed_hypergraph.py
+++ b/halp/directed_hypergraph.py
@@ -350,6 +350,15 @@ class DirectedHypergraph(object):
head or tail, that hyperedge is removed.
Note: hyperedges modified this way will have different IDs than before
+
+ Examples:
+ ::
+
+ >>> H = DirectedHypergraph()
+ >>> node_list = ['A', 'B', 'C', 'D']
+ >>> H.add_nodes(node_list)
+ >>> H.add_hyperedge(['A','B'],['C','D'])
+ >>> H.trim_node('A')
"""
fs = self.get_forward_star(node)
@@ -390,7 +399,7 @@ class DirectedHypergraph(object):
self.remove_node(node)
def trim_nodes(self, nodes):
-
+ """Trims multiple nodes from the hypergraph (see trim_node() for details)"""
for node in nodes:
self.trim_node(node) | Added more detailed documentation for trim_node() | Murali-group_halp | train | py |
d0c8b6242cb8d9702e4af81ab487a2924a53281f | diff --git a/spec/srt_spec.rb b/spec/srt_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/srt_spec.rb
+++ b/spec/srt_spec.rb
@@ -91,4 +91,20 @@ END
file.to_s.should == OUTPUT
end
end
+
+ context "This given, technically dubious, spanish language WOTW SRT file" do
+ let(:file) { SRT::File.parse(File.open("./spec/wotw-dubious.srt")) }
+
+ it "should parse" do
+ file.class.should == SRT::File
+ end
+
+ it "should have 1123 lines" do
+ file.lines.size.should == 1123
+ end
+
+ it "should not have errors" do
+ file.errors.should be_empty
+ end
+ end
end
\ No newline at end of file | Dubious file specs, failing so far | cpetersen_srt | train | rb |
925eb1b4d1f1c0683a10546a1aa31618a012eb78 | diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
index <HASH>..<HASH> 100644
--- a/spec/spec_helper.rb
+++ b/spec/spec_helper.rb
@@ -4,35 +4,13 @@ require 'devtools/spec_helper'
require 'morpher'
require 'mutant' # for the node helpers
-# Monkeypatch to mutant .rc3 fixing double diffs error.
-#
-# Also does run all mutations.
+# Monkeypatch to mutant all specs per mutation.
#
# TODO: Use master once it supports configurable implicit coverage.
#
# Morpher predicates are needed to finally make this configurable in mutant.
#
module Mutant
- class Subject
- class Method
- class Instance
- class Memoized
-
- # Return source
- #
- # @return [String]
- #
- # @api private
- #
- def source
- Unparser.unparse(memoizer_node(node))
- end
- memoize :source
-
- end
- end
- end
- end
class Killer
class Rspec | Remove unneded monkeypatch to mutant | mbj_morpher | train | rb |
be537c3371105177d2a7abc16613f4f2e1b71e4c | diff --git a/src/Google/Service/Resource.php b/src/Google/Service/Resource.php
index <HASH>..<HASH> 100644
--- a/src/Google/Service/Resource.php
+++ b/src/Google/Service/Resource.php
@@ -130,7 +130,7 @@ class Google_Service_Resource
$this->stackParameters,
$method['parameters']
);
-
+
foreach ($parameters as $key => $val) {
if ($key != 'postBody' && ! isset($method['parameters'][$key])) {
$this->client->getLogger()->error(
@@ -219,6 +219,10 @@ class Google_Service_Resource
$upload = new Google_Http_MediaFileUpload($this->client, $request, $mimeType, $data);
}
+ if (isset($parameters['alt']) && $parameters['alt']['value'] == 'media') {
+ $expected_class = null;
+ }
+
return $this->client->execute($request, $expected_class);
} | Don't try to convert to model if alt=media present | googleapis_google-api-php-client | train | php |
c0d928f5657191345fa2dfe78b631f57612dc666 | diff --git a/titan-core/src/main/java/com/thinkaurelius/titan/graphdb/database/serialize/kryo/KryoSerializer.java b/titan-core/src/main/java/com/thinkaurelius/titan/graphdb/database/serialize/kryo/KryoSerializer.java
index <HASH>..<HASH> 100644
--- a/titan-core/src/main/java/com/thinkaurelius/titan/graphdb/database/serialize/kryo/KryoSerializer.java
+++ b/titan-core/src/main/java/com/thinkaurelius/titan/graphdb/database/serialize/kryo/KryoSerializer.java
@@ -31,7 +31,6 @@ public class KryoSerializer implements Closeable {
private final List<Class> defaultRegistrations;
private final boolean registerRequired;
- private final Map<Integer,TypeRegistration> registrations;
private final int maxOutputSize;
/**
@@ -86,7 +85,6 @@ public class KryoSerializer implements Closeable {
this.defaultRegistrations = defaultRegistrations;
this.maxOutputSize = maxOutputSize;
this.registerRequired = registrationRequired;
- this.registrations = new HashMap<Integer,TypeRegistration>();
for (Class clazz : defaultRegistrations) {
// Preconditions.checkArgument(isValidClass(clazz),"Class does not have a default constructor: %s",clazz.getName()); | Remove unused field in KryoSerializer
c4c<I>ab3d<I>f5a5a<I>ecc<I>fe<I>b<I> appears to have removed the
last use of KryoSerializer's private 'registrations' field. It's not
used as of this commit.
(cherry picked from commit d<I>cb<I>d<I>f<I>ab<I>f<I>dd6bb<I>) | thinkaurelius_titan | train | java |
b77408d04c7d65659afedb1b0556e83d905b5939 | diff --git a/ryu/lib/ovs/bridge.py b/ryu/lib/ovs/bridge.py
index <HASH>..<HASH> 100644
--- a/ryu/lib/ovs/bridge.py
+++ b/ryu/lib/ovs/bridge.py
@@ -191,6 +191,10 @@ class OVSBridge(object):
self.add_tunnel_port(name, 'gre', remote_ip,
local_ip=local_ip, key=key)
+ def add_vxlan_port(self, name, remote_ip, local_ip=None, key=None):
+ self.add_tunnel_port(name, 'vxlan', remote_ip,
+ local_ip=local_ip, key=key)
+
def del_port(self, port_name):
command = ovs_vsctl.VSCtlCommand('del-port', (self.br_name, port_name))
self.run_command([command]) | ovs/bridge: Add utility method to create VXLAN port | osrg_ryu | train | py |
f9b0f1122151aaec9fd4c470edb0814f2da58c94 | diff --git a/gns3server/main.py b/gns3server/main.py
index <HASH>..<HASH> 100644
--- a/gns3server/main.py
+++ b/gns3server/main.py
@@ -79,6 +79,10 @@ def main():
Entry point for GNS3 server
"""
+ if sys.platform.startswith("win"):
+ # necessary on Windows to freeze the application
+ multiprocessing.freeze_support()
+
try:
tornado.options.parse_command_line()
except (tornado.options.Error, ValueError):
@@ -90,10 +94,6 @@ def main():
print(__version__)
raise SystemExit
- if sys.platform.startswith("win"):
- # necessary on Windows to freeze the application
- multiprocessing.freeze_support()
-
current_year = datetime.date.today().year
print("GNS3 server version {}".format(__version__))
print("Copyright (c) 2007-{} GNS3 Technologies Inc.".format(current_year)) | Multiprocessing freeze support must be before the parsing command line
code. | GNS3_gns3-server | train | py |
1539e5a14e2921e05c50732e3f643bcb5fe7eb5e | diff --git a/src/Lifecycle/DelegatingLifecycle.php b/src/Lifecycle/DelegatingLifecycle.php
index <HASH>..<HASH> 100644
--- a/src/Lifecycle/DelegatingLifecycle.php
+++ b/src/Lifecycle/DelegatingLifecycle.php
@@ -88,7 +88,7 @@ final class DelegatingLifecycle implements MessageLifecycle, \Countable
return count($this->lifecycles);
}
- private function apply(callable $fn) : void
+ private function apply(callable $fn)
{
foreach ($this->lifecycles as $lifecycle) {
$fn($lifecycle);
diff --git a/src/Lifecycle/MappingLifecycle.php b/src/Lifecycle/MappingLifecycle.php
index <HASH>..<HASH> 100644
--- a/src/Lifecycle/MappingLifecycle.php
+++ b/src/Lifecycle/MappingLifecycle.php
@@ -44,7 +44,7 @@ final class MappingLifecycle implements MessageLifecycle
* @param $fallback The message lifecycle to which unmatches messages will be applied
* @throws InvalidArgumentException if $mapping is a bad type
*/
- public function __construct($mapping, ?MessageLifecycle $fallback=null)
+ public function __construct($mapping, MessageLifecycle $fallback=null)
{
if (!is_array($mapping) && !$mapping instanceof \ArrayAccess) {
throw new InvalidArgumentException(sprintf( | Remove Some PHP <I>+ Features
Forgot we're requiring PHP <I> still. | AgencyPMG_Queue | train | php,php |
71922cacabd739cc59dc57b3ebf019628b2c9d08 | diff --git a/lib/ronin/model/has_authors.rb b/lib/ronin/model/has_authors.rb
index <HASH>..<HASH> 100644
--- a/lib/ronin/model/has_authors.rb
+++ b/lib/ronin/model/has_authors.rb
@@ -62,7 +62,9 @@ module Ronin
end
end
- Author.has Author.n, base.relationship_name, :model => base.name
+ Author.belongs_to base.relationship_name,
+ :model => base.name,
+ :required => false
end
# | Fixed the relationship setup by Ronin::Model::HasAuthors.
* Make sure the belongs_to is optional. | ronin-ruby_ronin | train | rb |
b5350e3451b1e16f081453e2b8ff4db717019f06 | diff --git a/test/compose.test.js b/test/compose.test.js
index <HASH>..<HASH> 100644
--- a/test/compose.test.js
+++ b/test/compose.test.js
@@ -33,6 +33,7 @@ var sdps = [
'ssrc.sdp',
'simulcast.sdp',
'st2022-6.sdp',
+ 'st2110-20.sdp',
];
sdps.forEach((name) => { | compose test the new sdp as well | clux_sdp-transform | train | js |
ea08b1bd7abd4a6879e2ce3a767692c7fa057b67 | diff --git a/src/lokijs.js b/src/lokijs.js
index <HASH>..<HASH> 100644
--- a/src/lokijs.js
+++ b/src/lokijs.js
@@ -3842,11 +3842,12 @@
};
}
+ var result = this.constraints.unique[field].get(value);
if (!this.cloneObjects) {
- return this.constraints.unique[field].get(value);
+ return result;
}
else {
- return clone(this.constraints.unique[field].get(value), this.cloneMethod);
+ return clone(result, this.cloneMethod);
}
}; | Minor improvement to the code of by() in Collection | techfort_LokiJS | train | js |
96c05910d287c863a24f86384a63e3a41f530bc1 | diff --git a/src/Codeaken/SshAgent/SshAgent.php b/src/Codeaken/SshAgent/SshAgent.php
index <HASH>..<HASH> 100644
--- a/src/Codeaken/SshAgent/SshAgent.php
+++ b/src/Codeaken/SshAgent/SshAgent.php
@@ -2,6 +2,7 @@
namespace Codeaken\SshAgent;
use Symfony\Component\Process\Process;
+use Codeaken\SshKey\SshKey;
use Codeaken\SshKey\SshPrivateKey;
class SshAgent | Forgot to include SshKey class | codeaken_sshagent | train | php |
0cb3e0cfbe91f83917aefa171caa0b62abc907a7 | diff --git a/lib/pager_duty/connection/version.rb b/lib/pager_duty/connection/version.rb
index <HASH>..<HASH> 100644
--- a/lib/pager_duty/connection/version.rb
+++ b/lib/pager_duty/connection/version.rb
@@ -1,5 +1,5 @@
module PagerDuty
class Connection
- VERSION = "0.1.0"
+ VERSION = "0.2.0"
end
end | Release version <I>
This release includes the contributions from the following pull
requests:
* <URL> | technicalpickles_pager_duty-connection | train | rb |
9ddf09b3a8af7eeac464bff198fdfe539c973ceb | diff --git a/src/WebSocketServer.php b/src/WebSocketServer.php
index <HASH>..<HASH> 100644
--- a/src/WebSocketServer.php
+++ b/src/WebSocketServer.php
@@ -19,6 +19,8 @@ class WebSocketServer extends Server
/**
* Start
+ * @throws \ReflectionException
+ * @throws \Swoft\Bean\Exception\ContainerException
* @throws \Swoft\Server\Exception\ServerException
*/
public function start(): void | update: add some swoole event bind trigger, and some server event bind | swoft-cloud_swoft-websocket-server | train | php |
0f0795fa5d280ec1f676121cfa3ba25aac11f5a7 | diff --git a/galpy/util/bovy_conversion.py b/galpy/util/bovy_conversion.py
index <HASH>..<HASH> 100644
--- a/galpy/util/bovy_conversion.py
+++ b/galpy/util/bovy_conversion.py
@@ -567,11 +567,13 @@ def physical_conversion(quantity,pop=False):
fac= freq_in_Gyr(vo,ro)**2.
if _APY_UNITS:
u= units.Gyr**-2.
+ out= method(*args,**kwargs)
+ if out is None:
+ return out
if _APY_UNITS:
- return units.Quantity(method(*args,**kwargs)*fac,
- unit=u)
+ return units.Quantity(out*fac,unit=u)
else:
- return method(*args,**kwargs)*fac
+ return out*fac
else:
return method(*args,**kwargs)
return wrapped | Just return None rather than physical when the result is None | jobovy_galpy | train | py |
e73f5d810f1b9195d01857763b837f164aeae8bf | diff --git a/public/assets/indexedDB.js b/public/assets/indexedDB.js
index <HASH>..<HASH> 100644
--- a/public/assets/indexedDB.js
+++ b/public/assets/indexedDB.js
@@ -94,7 +94,7 @@ function exeRead(entity, filter, order, reverse, limit, offset) {
if(!SERVICEWORKER)
return data;
- if (parseInt(data.length) >= parseInt(LIMITOFFLINE)) {
+ if (parseInt(data.length) >= parseInt(LIMITOFFLINE) - limit) {
return new Promise(function (resolve, reject) {
//online
$.ajax({ | improve db.exeDelete logic | edineibauer_uebConfig | train | js |
7156a4a77f42c60894e24b6bec734b9468ecf261 | diff --git a/cereslib/_version.py b/cereslib/_version.py
index <HASH>..<HASH> 100644
--- a/cereslib/_version.py
+++ b/cereslib/_version.py
@@ -1,2 +1,2 @@
# Versions compliant with PEP 440 https://www.python.org/dev/peps/pep-0440
-__version__ = "0.1.2"
+__version__ = "0.1.3" | [release] Update version number to <I> | chaoss_grimoirelab-cereslib | train | py |
ee557eda878b412ed1a5780df2c8229b81b58537 | diff --git a/src/app/Classes/MorphableConfigMapper.php b/src/app/Classes/MorphableConfigMapper.php
index <HASH>..<HASH> 100644
--- a/src/app/Classes/MorphableConfigMapper.php
+++ b/src/app/Classes/MorphableConfigMapper.php
@@ -17,13 +17,18 @@ abstract class MorphableConfigMapper
$this->morphable = $this->morphable();
}
- public function model()
+ public function class()
{
return is_array($this->morphable)
? $this->morphable['model']
: $this->morphable;
}
+ public function model($id)
+ {
+ return $this->class()::find($id);
+ }
+
private function morphable()
{
$morphable = config($this->configPrefix.'.'.$this->morphableKey.'.'.$this->type); | renames the `model` method to `class` in the config mapper. adds a `model` method that return this actual model instance | laravel-enso_Helpers | train | php |
9fd5e6bbe605941b707b0e1aa223a5c51c183550 | diff --git a/src/transformers/deepspeed.py b/src/transformers/deepspeed.py
index <HASH>..<HASH> 100644
--- a/src/transformers/deepspeed.py
+++ b/src/transformers/deepspeed.py
@@ -250,7 +250,7 @@ class HfTrainerDeepSpeedConfig(HfDeepSpeedConfig):
self.fill_match("bf16.enabled", (args.bf16 or args.bf16_full_eval), "bf16|bf16_full_eval")
# deepspeed's default mode is fp16 unless there is a config that says differently
- if self.is_true("bfoat16.enabled"):
+ if self.is_true("bf16.enabled"):
self._dtype = torch.bfloat16
elif self.is_false("fp16.enabled"):
self._dtype = torch.float32 | [deepspeed] fix typo, adjust config name (#<I>) | huggingface_pytorch-pretrained-BERT | train | py |
d46169069c5ad21f89e5f153ca04a4b77687c0cb | diff --git a/docs/src/pages/demos/tables/EnhancedTable.js b/docs/src/pages/demos/tables/EnhancedTable.js
index <HASH>..<HASH> 100644
--- a/docs/src/pages/demos/tables/EnhancedTable.js
+++ b/docs/src/pages/demos/tables/EnhancedTable.js
@@ -99,11 +99,11 @@ const toolbarStyles = theme => ({
highlight:
theme.palette.type === 'light'
? {
- color: theme.palette.secondary.dark,
- backgroundColor: lighten(theme.palette.secondary.light, 0.4),
+ color: theme.palette.secondary.main,
+ backgroundColor: lighten(theme.palette.secondary.light, 0.85),
}
: {
- color: lighten(theme.palette.secondary.light, 0.4),
+ color: theme.palette.text.primary,
backgroundColor: theme.palette.secondary.dark,
},
spacer: {
@@ -128,7 +128,9 @@ let EnhancedTableToolbar = props => {
>
<div className={classes.title}>
{numSelected > 0 ? (
- <Typography variant="subheading">{numSelected} selected</Typography>
+ <Typography color="inherit" variant="subheading">
+ {numSelected} selected
+ </Typography>
) : (
<Typography variant="title">Nutrition</Typography>
)} | [docs] EnhancedTable Demo (#<I>)
* [docs] EnhancedTable Demo
The Table Header presented when rows are selected has a few inconsistencies when compared to the example in the Material Design standard:
- Color should match the checkbox color, and should be inherited by the presented Typography
- Background for selection variant of table header should be the <I> value of the secondary color
* [docs] Increase dark contrast | mui-org_material-ui | train | js |
40d422adef56e5385fdce711b52c5bf51b3cf2ac | diff --git a/deployer/db/task/db:export.php b/deployer/db/task/db:export.php
index <HASH>..<HASH> 100644
--- a/deployer/db/task/db:export.php
+++ b/deployer/db/task/db:export.php
@@ -24,7 +24,7 @@ task('db:export', function () {
if (get('db_instance') == get('server')['name']) {
foreach (get('db_databases_merged') as $databaseCode => $databaseConfig) {
$filenameParts = [
- 'dateTime' => date('Y-m-d_H:i:s'),
+ 'dateTime' => date('Y-m-d_H-i-s'),
'server' => 'server=' . $fileUtility->normalizeFilename(get('server')['name']),
'dbcode' => 'dbcode=' . $fileUtility->normalizeFilename($databaseCode),
'dumpcode' => 'dumpcode=' . $fileUtility->normalizeFilename($dumpCode), | [BUGFIX] Replace ":" with "=" in date of dump because Windows compatibility. | sourcebroker_deployer-extended-database | train | php |
02912b6eeb9efcec0646e1185c62b2502ff48cd4 | diff --git a/lib/Cake/Test/Case/Model/CakeSchemaTest.php b/lib/Cake/Test/Case/Model/CakeSchemaTest.php
index <HASH>..<HASH> 100644
--- a/lib/Cake/Test/Case/Model/CakeSchemaTest.php
+++ b/lib/Cake/Test/Case/Model/CakeSchemaTest.php
@@ -691,9 +691,9 @@ class CakeSchemaTest extends CakeTestCase {
* @return void
*/
public function testSchemaReadWithCrossDatabase() {
- $config = new DATABASE_CONFIG();
+ $config = ConnectionManager::enumConnectionObjects();
$this->skipIf(
- !isset($config->test) || !isset($config->test2),
+ !isset($config['test']) || !isset($config['test2']),
'Primary and secondary test databases not configured, skipping cross-database join tests.'
. ' To run these tests, you must define $test and $test2 in your database configuration.'
); | Correctly getting connection configs in CakeSchemaTest | cakephp_cakephp | train | php |
306d572a991e72bfe081c381e4b344e3339128a0 | diff --git a/jumeaux/executor.py b/jumeaux/executor.py
index <HASH>..<HASH> 100644
--- a/jumeaux/executor.py
+++ b/jumeaux/executor.py
@@ -8,7 +8,7 @@ Usage
Usage:
jumeaux init <name>
- jumeaux run <files>... [--config=<yaml>...] [--title=<title>] [--description=<description>] [--tag=<tag>...] [--threads=<threads>]
+ jumeaux [run] <files>... [--config=<yaml>...] [--title=<title>] [--description=<description>] [--tag=<tag>...] [--threads=<threads>]
jumeaux retry [--title=<title>] [--description=<description>] [--tag=<tag>...] [--threads=<threads>] <report>
Options: | :skull: Fix bug that `jumeaux` command is not working (Only `jumeaux run` worked) | tadashi-aikawa_jumeaux | train | py |
4808d77389b3e6e1989797591114c9797b4e21a9 | diff --git a/src/org/mozilla/javascript/Interpreter.java b/src/org/mozilla/javascript/Interpreter.java
index <HASH>..<HASH> 100644
--- a/src/org/mozilla/javascript/Interpreter.java
+++ b/src/org/mozilla/javascript/Interpreter.java
@@ -496,6 +496,12 @@ public class Interpreter extends LabelTable {
*/
Node target = (Node)(node.getProp(Node.TARGET_PROP));
target.putProp(Node.FINALLY_PROP, node);
+ // Bug 115717 is due to adding a GOSUB here before
+ // we insert an ENDTRY. I'm not sure of the best way
+ // to fix this; perhaps we need to maintain a stack
+ // of pending trys and have some knowledge of how
+ // many trys we need to close when we perform a
+ // GOTO or GOSUB.
iCodeTop = addGoto(node, TokenStream.GOSUB, iCodeTop);
}
break; | Added comment about bug <I>. | mozilla_rhino | train | java |
398449b370f2a6e785b338655d31bceb5bc4b245 | diff --git a/xmantissa/webapp.py b/xmantissa/webapp.py
index <HASH>..<HASH> 100644
--- a/xmantissa/webapp.py
+++ b/xmantissa/webapp.py
@@ -206,7 +206,10 @@ class FragmentWrapperMixin:
return ctx.tag[extras]
def render_title(self, ctx, data):
- return ctx.tag[getattr(self.fragment, 'title', self.fragment.__class__.__name__)]
+ title = getattr(self.fragment, 'title', None)
+ if not title:
+ title = 'Divmod'
+ return ctx.tag[title]
def render_content(self, ctx, data):
return ctx.tag[self.fragment] | apply patch from #<I>. sets "Divmod" as default page title. author: moe, reviewer: exarkun. closes #<I> | twisted_mantissa | train | py |
77545b1f83dc181af6ffe95602f30aec3d934605 | diff --git a/Form/SimpleDataSelectorType.php b/Form/SimpleDataSelectorType.php
index <HASH>..<HASH> 100644
--- a/Form/SimpleDataSelectorType.php
+++ b/Form/SimpleDataSelectorType.php
@@ -36,9 +36,12 @@ class SimpleDataSelectorType extends AbstractType
$queryBuilder = function (EntityRepository $repository, $options) {
$qb = $repository->createQueryBuilder('d');
if (isset($options['family_code'])) {
- $qb->andWhere('d.familyCode = :familyCode')
+ $qb->addSelect('v')
+ ->leftJoin('d.values', 'v')
+ ->andWhere('d.familyCode = :familyCode')
->setParameter('familyCode', $options['family_code']);
}
+ $qb->setMaxResults(100);
return $qb;
};
$resolver->setDefaults([ | Fixed max number of results in simple data selector | VincentChalnot_SidusEAVModelBundle | train | php |
5f5f76fa2894c4e5c2070bbf10854cef64ba1117 | diff --git a/test/full_test.py b/test/full_test.py
index <HASH>..<HASH> 100755
--- a/test/full_test.py
+++ b/test/full_test.py
@@ -95,8 +95,8 @@ def run_canonical_tests(mode, checker, protocol, cores, slices):
"cores" : cores,
"slices" : slices,
"duration" : dur,
- "verify-timeout": dur * 5 * ec2 + 540 },
- repeat=2, timeout=dur * 5 * ec2 + 540)
+ "verify-timeout": dur * 5 * ec2 + 740 },
+ repeat=2, timeout=dur * 5 * ec2 + 740)
# Running all tests
def run_all_tests(mode, checker, protocol, cores, slices): | corruption test with the memcache client just takes forever... | rethinkdb_rethinkdb | train | py |
45b6cf6be82c448ac9524386db7e6f42e45206ad | diff --git a/lib/client.js b/lib/client.js
index <HASH>..<HASH> 100644
--- a/lib/client.js
+++ b/lib/client.js
@@ -72,6 +72,8 @@ class Client extends EventEmitter {
if (this.devices.has(sysInfo.deviceId)) {
const plug = this.devices.get(sysInfo.deviceId);
+ plug.host = rinfo.address;
+ plug.port = rinfo.port;
plug.consumption = consumption;
plug.sysInfo = sysInfo;
plug.status = 'online'; | Update host/port on discovery to handle IP changes | plasticrake_tplink-smarthome-api | train | js |
003cceed698ae17dcfb05181eae48b8a5b6d0fde | diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -25,6 +25,11 @@ install_requires = [
"filetype"
]
+# Python 2.x?
+is_py2 = (sys.version_info[0] == 2)
+if is_py2:
+ install_requires.append("future")
+
class UploadCommand(Command):
""" Build and publish this package.
Support setup.py upload. Copied from requests_html. | fix: ImportError for builtins in Python<I> | HttpRunner_HttpRunner | train | py |
583e76a2c4913f3e47ab20dd8091f45600ec8fde | diff --git a/Server/Python/src/dbs/business/DBSDataset.py b/Server/Python/src/dbs/business/DBSDataset.py
index <HASH>..<HASH> 100644
--- a/Server/Python/src/dbs/business/DBSDataset.py
+++ b/Server/Python/src/dbs/business/DBSDataset.py
@@ -3,8 +3,8 @@
This module provides business object class to interact with Dataset.
"""
-__revision__ = "$Id: DBSDataset.py,v 1.20 2010/01/20 22:02:54 afaq Exp $"
-__version__ = "$Revision: 1.20 $"
+__revision__ = "$Id: DBSDataset.py,v 1.21 2010/01/25 20:46:45 afaq Exp $"
+__version__ = "$Revision: 1.21 $"
from WMCore.DAOFactory import DAOFactory
@@ -53,6 +53,7 @@ class DBSDataset:
return self.datasetlist1.execute(dataset,
parent_dataset,
release_version,
+ pset_hash,
app_name,
output_module_label) | fixed a bug, the pset_hash was not being passed to the list1 dao
From: afaq <afaq>
git-svn-id: svn+ssh://svn.cern.ch/reps/CMSDMWM/DBS/trunk@<I> <I>e-<I>-<I>b1-a<I>-d<I>a<I>b | dmwm_DBS | train | py |
4cab19d44cfd85f2bc94a30d05b25caafe0aa808 | diff --git a/lib/resque/worker.rb b/lib/resque/worker.rb
index <HASH>..<HASH> 100644
--- a/lib/resque/worker.rb
+++ b/lib/resque/worker.rb
@@ -183,7 +183,7 @@ module Resque
# Processes a given job in the child.
def perform(job)
begin
- run_hook :after_fork, job unless @cant_fork
+ run_hook :after_fork, job if will_fork?
job.perform
rescue Object => e
log "#{job.inspect} failed: #{e.inspect}"
diff --git a/test/worker_test.rb b/test/worker_test.rb
index <HASH>..<HASH> 100644
--- a/test/worker_test.rb
+++ b/test/worker_test.rb
@@ -409,7 +409,7 @@ context "Resque::Worker" do
end
end
- test "Will call an after_fork hook after forking" do
+ test "Will call an after_fork hook if we're forking" do
Resque.redis.flushall
$AFTER_FORK_CALLED = false
Resque.after_fork = Proc.new { $AFTER_FORK_CALLED = true }
@@ -418,7 +418,7 @@ context "Resque::Worker" do
assert !$AFTER_FORK_CALLED
Resque::Job.create(:jobs, SomeJob, 20, '/tmp')
workerA.work(0)
- assert $AFTER_FORK_CALLED
+ assert $AFTER_FORK_CALLED == workerA.will_fork?
end
test "Will not call an after_fork hook when the worker can't fork" do | Only call after_fork if will_fork? is true
This change provides consistent forking semantics across JRuby running
in both <I> and <I> mode and resolves the current test failure. | resque_resque | train | rb,rb |
82becdff0583269cf352ccd169ff9a9d7cba12f6 | diff --git a/decidim-generators/lib/decidim/generators/app_generator.rb b/decidim-generators/lib/decidim/generators/app_generator.rb
index <HASH>..<HASH> 100644
--- a/decidim-generators/lib/decidim/generators/app_generator.rb
+++ b/decidim-generators/lib/decidim/generators/app_generator.rb
@@ -136,8 +136,6 @@ module Decidim
cache_dir: File.expand_path(File.join("..", "tmp", "cache"), __dir__),
development_mode: env == "development",
load_path_cache: true,
- autoload_paths_cache: true,
- disable_trace: false,
compile_cache_iseq: !ENV["SIMPLECOV"],
compile_cache_yaml: true
) | Remove deprecated Bootsnap warnings (#<I>) | decidim_decidim | train | rb |
aaaed8387544b7d3aadcf061331cb36006833810 | diff --git a/java/server/src/org/openqa/grid/internal/TestSession.java b/java/server/src/org/openqa/grid/internal/TestSession.java
index <HASH>..<HASH> 100644
--- a/java/server/src/org/openqa/grid/internal/TestSession.java
+++ b/java/server/src/org/openqa/grid/internal/TestSession.java
@@ -265,6 +265,7 @@ public class TestSession {
final byte[] bytes = drainInputStream(in);
writeRawBody(response, bytes);
+ contentBeingForwarded = bytes;
} finally {
EntityUtils.consume(responseBody);
}
@@ -276,7 +277,9 @@ public class TestSession {
wrappedResponse.setForwardedContent(contentBeingForwarded);
((CommandListener) slot.getProxy()).afterCommand(this, request, wrappedResponse);
}
+
response.flushBuffer();
+
return res;
} finally {
forwardingRequest = false; | Actually pass the response body to CommandListener implementations, per the interface contract.
Fixes #<I>: TestSession>forward()>contentBeingForwarded always null in CommandListener.afterCommand(). Thanks suayipozmen for the find and the fix. | SeleniumHQ_selenium | train | java |
6993d0d761c5d4b2d8f9879e0fd2722d1f87ebe3 | diff --git a/stripe/__init__.py b/stripe/__init__.py
index <HASH>..<HASH> 100644
--- a/stripe/__init__.py
+++ b/stripe/__init__.py
@@ -233,7 +233,8 @@ class APIRequestor(object):
if meth == 'get':
curl.setopt(pycurl.HTTPGET, 1)
# TODO: maybe be a bit less manual here
- abs_url = '%s?%s' % (abs_url, self.encode(params))
+ if params:
+ abs_url = '%s?%s' % (abs_url, self.encode(params))
elif meth == 'post':
curl.setopt(pycurl.POST, 1)
curl.setopt(pycurl.POSTFIELDS, self.encode(params)) | Only add question mark to get if actually have arguments | stripe_stripe-python | train | py |
eb362ce2d2ce0f709f77a9eb9a55e04d4f68c554 | diff --git a/public/javascripts/role_edit.js b/public/javascripts/role_edit.js
index <HASH>..<HASH> 100644
--- a/public/javascripts/role_edit.js
+++ b/public/javascripts/role_edit.js
@@ -183,15 +183,17 @@ var roleActions = (function($){
getPermissionDetails = function(hash_id){
var id = hash_id.split('_');
- $.ajax({
- type : "GET",
- url : '/roles/' + id + '/resource_type/verbs_and_scopes',
- cache : false,
- dataType: 'json',
- success : function(data){
- roles_breadcrumb[hash_id].permission_details = data;
- }
- });
+ if( !roles_breadcrumb[hash_id].permission_details ){
+ $.ajax({
+ type : "GET",
+ url : '/roles/' + id + '/resource_type/verbs_and_scopes',
+ cache : false,
+ dataType: 'json',
+ success : function(data){
+ roles_breadcrumb[hash_id].permission_details = data;
+ }
+ });
+ }
},
savePermission = function(){
var org_id = current_crumb.split('_')[1], | Role - Adds cacheing of organization verbs_and_tags. | Katello_katello | train | js |
6f396ad775ebbfdfe09ccbf70053445b766a5291 | diff --git a/demo/src/PlaybackDemo.js b/demo/src/PlaybackDemo.js
index <HASH>..<HASH> 100644
--- a/demo/src/PlaybackDemo.js
+++ b/demo/src/PlaybackDemo.js
@@ -75,6 +75,7 @@ class PlaybackDemo extends React.Component {
width={containerWidth}
onPlayNote={playNote}
onStopNote={stopNote}
+ disabled={isLoading}
/>
)}
</DimensionsProvider> | set disabled prop on PlaybackDemo | kevinsqi_react-piano | train | js |
89431d78f9d4f61c9bc0018d2c16ae950c0e4b5b | diff --git a/tests/test_function_manager.py b/tests/test_function_manager.py
index <HASH>..<HASH> 100644
--- a/tests/test_function_manager.py
+++ b/tests/test_function_manager.py
@@ -20,7 +20,7 @@ def test_amd64():
#logging.getLogger('angr.analyses.cfg').setLevel(logging.DEBUG)
fauxware_amd64 = angr.Project(test_location + "/x86_64/fauxware")
- EXPECTED_FUNCTIONS = { 0x400580, 0x400540, 0x400520, 0x4006ed, 0x400664, 0x4007e0, 0x4000070, 0x400880,
+ EXPECTED_FUNCTIONS = { 0x400580, 0x400540, 0x400520, 0x4006ed, 0x400664, 0x4007e0, 0x400880,
0x4005ac, 0x4004e0, 0x400530, 0x400510, 0x400560, 0x400550, 0x4006fd, 0x400570,
0x400640, 0x40071d }
EXPECTED_BLOCKS = { 0x40071D, 0x40073E, 0x400754, 0x40076A, 0x400774, 0x40078A, 0x4007A0, 0x4007B3, 0x4007C7, | Remove __gmon_start__ from expected functions | angr_angr | train | py |
ed1819936c3a01185b43d57d67bee39bbcfbdb3f | diff --git a/src/org/mozilla/javascript/BaseFunction.java b/src/org/mozilla/javascript/BaseFunction.java
index <HASH>..<HASH> 100644
--- a/src/org/mozilla/javascript/BaseFunction.java
+++ b/src/org/mozilla/javascript/BaseFunction.java
@@ -143,7 +143,7 @@ public class BaseFunction extends IdScriptableObject implements Function
break;
case Id_prototype:
attr = (isPrototypePropertyImmune)
- ? READONLY | PERMANENT : PERMANENT;
+ ? (DONTENUM | READONLY | PERMANENT) : (DONTENUM | PERMANENT);
break;
case Id_arguments:
attr = DONTENUM | PERMANENT; | Committing fix for #<I>: Function.prototype shouldn't be enumerable | mozilla_rhino | train | java |
90fe4ef8492e53d634a7c9af964a7f01e4b498c5 | diff --git a/src/Instagram/Hydrator/MediaDetailedHydrator.php b/src/Instagram/Hydrator/MediaDetailedHydrator.php
index <HASH>..<HASH> 100644
--- a/src/Instagram/Hydrator/MediaDetailedHydrator.php
+++ b/src/Instagram/Hydrator/MediaDetailedHydrator.php
@@ -67,8 +67,10 @@ class MediaDetailedHydrator
$media->setThumbnailSrc($thumbnailSrc);
$media->setDisplaySrc($displaySrc);
- $media->setComments($node->comment_count);
- $media->setLikes($node->like_count);
+ if (isset($node->comment_count))
+ $media->setComments($node->comment_count);
+ if (isset($node->like_count))
+ $media->setLikes($node->like_count);
$media->setLink(InstagramHelper::URL_BASE . "p/{$node->code}/");
@@ -212,4 +214,4 @@ class MediaDetailedHydrator
{
return $node->media_type === Media::MEDIA_TYPE_VIDEO;
}
-}
\ No newline at end of file
+} | add check before setting comments and likes
Users can disable comments and likes on their posts. If that happens, $node->comment_count will be null. | pgrimaud_instagram-user-feed | train | php |
785f2c85fa32460816e6e42d18c7822e155779dc | diff --git a/src/components/VBadge/VBadge.js b/src/components/VBadge/VBadge.js
index <HASH>..<HASH> 100644
--- a/src/components/VBadge/VBadge.js
+++ b/src/components/VBadge/VBadge.js
@@ -37,7 +37,7 @@ export default {
},
render (h) {
- const badge = h('span', {
+ const badge = this.$slots.badge ? [h('span', {
staticClass: 'badge__badge',
'class': [this.color],
attrs: this.attrs,
@@ -45,7 +45,7 @@ export default {
name: 'show',
value: this.isActive
}]
- }, this.$slots.badge)
+ }, this.$slots.badge)] : null
return h('span', {
staticClass: 'badge',
@@ -56,7 +56,7 @@ export default {
props: {
name: this.transition
}
- }, [badge])
+ }, badge)
])
}
} | do not display empty badge if there is not badge slot (#<I>) | vuetifyjs_vuetify | train | js |
8b482ddde58de28977df642fb025b5b0eadbf4d8 | diff --git a/apps/full-site-editing/full-site-editing-plugin/starter-page-templates/page-template-modal/components/template-selector-control.js b/apps/full-site-editing/full-site-editing-plugin/starter-page-templates/page-template-modal/components/template-selector-control.js
index <HASH>..<HASH> 100644
--- a/apps/full-site-editing/full-site-editing-plugin/starter-page-templates/page-template-modal/components/template-selector-control.js
+++ b/apps/full-site-editing/full-site-editing-plugin/starter-page-templates/page-template-modal/components/template-selector-control.js
@@ -43,8 +43,8 @@ const TemplateSelectorControl = ( {
className={ classnames( className, 'template-selector-control' ) }
>
<ul className="template-selector-control__options">
- { map( templates, ( { slug, title, preview, previewAlt, value } ) => (
- <li key={ `${ id }-${ value }` } className="template-selector-control__template">
+ { map( templates, ( { slug, title, preview, previewAlt } ) => (
+ <li key={ `${ id }-${ slug }` } className="template-selector-control__template">
<TemplateSelectorItem
id={ id }
value={ slug } | SPT: Use slug in selector key (#<I>)
Fixes an error where ultiple children have the same key because `value` was undefined.
See p<I>-slack-ajax | Automattic_wp-calypso | train | js |
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.