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
|
|---|---|---|---|---|---|
4c6fb1d8e7ef2f37faea5d2137f6e96567c3a2af
|
diff --git a/graphics/dotplot.py b/graphics/dotplot.py
index <HASH>..<HASH> 100755
--- a/graphics/dotplot.py
+++ b/graphics/dotplot.py
@@ -31,7 +31,7 @@ from jcvi.compara.synteny import AnchorFile, batch_scan, check_beds
from jcvi.utils.cbook import seqid_parse, thousands
from jcvi.apps.base import OptionParser
from jcvi.graphics.base import plt, Rectangle, cm, set_human_axis, savefig, \
- draw_cmap, TextHandler
+ draw_cmap, TextHandler, latex
class Palette (dict):
@@ -197,14 +197,14 @@ def dotplot(anchorfile, qbed, sbed, fig, root, ax, vmin=0, vmax=1,
for label, pos, fontsize in xchr_labels:
pos = .1 + pos * .8 / xsize
if fontsize >= minfont:
- root.text(pos, .91, label, size=fontsize,
+ root.text(pos, .91, latex(label), size=fontsize,
ha="center", va="bottom", rotation=45, color="grey")
# remember y labels are inverted
for label, pos, fontsize in ychr_labels:
pos = .9 - pos * .8 / ysize
if fontsize >= minfont:
- root.text(.91, pos, label, size=fontsize,
+ root.text(.91, pos, latex(label), size=fontsize,
va="center", color="grey")
# create a diagonal to separate mirror image for self comparison
|
make sure the labels don't crash the dotplot PDF
|
tanghaibao_jcvi
|
train
|
py
|
acf378c5f92fd11eb270edd2e05cdc9f9c55d96f
|
diff --git a/media/boom/js/boom.page.js b/media/boom/js/boom.page.js
index <HASH>..<HASH> 100755
--- a/media/boom/js/boom.page.js
+++ b/media/boom/js/boom.page.js
@@ -569,6 +569,13 @@ $.extend($.boom.page, {
$this
.attr( 'tabindex', '0' )
.unbind('click mouseenter mouseleave')
+ .on( 'keydown', function( event ){
+ switch( event.which ) {
+ case 13:
+ $this.click();
+ break;
+ }
+ })
.one( 'click', function(event){
//event.target = this;
|
open the chunk editor when enter is pressed
|
boomcms_boom-core
|
train
|
js
|
01b6d0be4156f7cdd77a2fc1cfdc69340dab4bc5
|
diff --git a/backend/__8bit.py b/backend/__8bit.py
index <HASH>..<HASH> 100644
--- a/backend/__8bit.py
+++ b/backend/__8bit.py
@@ -165,6 +165,9 @@ def _add8(ins):
output.append('push af')
return output
+ if op2[0] == '_': # stack optimization
+ op1, op2 = op2, op1
+
output = _8bit_oper(op1, op2)
output.append('add a, h')
output.append('push af')
|
Optimization: ADD8
Optimized, so it rearranges the stack when the 2nd
operand is an identifier.
|
boriel_zxbasic
|
train
|
py
|
0dd39c6233522b042984c1d42c42da473270905f
|
diff --git a/lib/health_graph/models/user.rb b/lib/health_graph/models/user.rb
index <HASH>..<HASH> 100644
--- a/lib/health_graph/models/user.rb
+++ b/lib/health_graph/models/user.rb
@@ -23,7 +23,7 @@ module HealthGraph
HealthGraph::SleepFeed.new self.access_token, self.body["sleep"]
end
- def fitness_activities params
+ def fitness_activities params = {}
HealthGraph::FitnessActivitiesFeed.new self.access_token, self.body["fitness_activities"], params
end
|
default params on fitness_activities fetch
|
kennyma_health_graph
|
train
|
rb
|
39097ecc2d3ef79de8216cbe64e5af230282bcc3
|
diff --git a/lib/graphql/client.rb b/lib/graphql/client.rb
index <HASH>..<HASH> 100644
--- a/lib/graphql/client.rb
+++ b/lib/graphql/client.rb
@@ -48,8 +48,6 @@ module GraphQL
case schema
when GraphQL::Schema
schema
- when GraphQL::Query::Result
- load_schema(schema.to_h)
when Hash
GraphQL::Schema::Loader.load(schema)
when String
@@ -59,7 +57,13 @@ module GraphQL
load_schema(JSON.parse(schema))
end
else
- load_schema(dump_schema(schema)) if schema.respond_to?(:execute)
+ if schema.respond_to?(:execute)
+ load_schema(dump_schema(schema))
+ elsif schema.respond_to?(:to_h)
+ load_schema(schema.to_h)
+ else
+ nil
+ end
end
end
|
Avoid constant reference to support old graphql versions
|
github_graphql-client
|
train
|
rb
|
e01dc8e3f07bf19540364b5fc1ab8304ebd46388
|
diff --git a/providers/providers_manager.go b/providers/providers_manager.go
index <HASH>..<HASH> 100644
--- a/providers/providers_manager.go
+++ b/providers/providers_manager.go
@@ -102,17 +102,17 @@ type getProv struct {
// NewProviderManager constructor
func NewProviderManager(ctx context.Context, local peer.ID, dstore ds.Batching, opts ...Option) (*ProviderManager, error) {
- var options options
- if err := options.apply(append([]Option{defaults}, opts...)...); err != nil {
+ var cfg options
+ if err := cfg.apply(append([]Option{defaults}, opts...)...); err != nil {
return nil, err
}
pm := new(ProviderManager)
pm.getprovs = make(chan *getProv)
pm.newprovs = make(chan *addProv)
pm.dstore = autobatch.NewAutoBatching(dstore, batchBufferSize)
- pm.cache = options.cache
+ pm.cache = cfg.cache
pm.proc = goprocessctx.WithContext(ctx)
- pm.cleanupInterval = options.cleanupInterval
+ pm.cleanupInterval = cfg.cleanupInterval
pm.proc.Go(pm.run)
return pm, nil
}
|
refactor: rename to cfg
|
libp2p_go-libp2p-kad-dht
|
train
|
go
|
54f439b0e69b15a7b9601b6ca7f74e9409f4991d
|
diff --git a/test/asserts.js b/test/asserts.js
index <HASH>..<HASH> 100644
--- a/test/asserts.js
+++ b/test/asserts.js
@@ -6,7 +6,7 @@ var _ = require('lodash-node')
var asserts = {
assertTrue: function (value, message) {
- if (!value) {
+ if (value !== true) {
throw new AssertionError(message, {}, asserts.assertTrue);
}
},
@@ -17,7 +17,7 @@ var asserts = {
}
},
assertFalse: function (value, message) {
- if (value) {
+ if (value !== false) {
throw new AssertionError(message, {}, asserts.assertFalse);
}
},
|
Primitive asserts test more specific
|
rluba_hamjest
|
train
|
js
|
c400f82148ae2f780523adef2cba188283a15977
|
diff --git a/lib/i18n/tasks/scanners/ruby_ast_scanner.rb b/lib/i18n/tasks/scanners/ruby_ast_scanner.rb
index <HASH>..<HASH> 100644
--- a/lib/i18n/tasks/scanners/ruby_ast_scanner.rb
+++ b/lib/i18n/tasks/scanners/ruby_ast_scanner.rb
@@ -40,7 +40,7 @@ module I18n::Tasks::Scanners
@parser.parse(make_buffer(path, comment.text.sub(MAGIC_COMMENT_PREFIX, '').split(/\s+(?=t)/).join('; ')))
) do |send_node, _method_name|
# method_name is not available at this stage
- send_node_to_key_occurrence(send_node, nil, location: associated_node || comment)
+ send_node_to_key_occurrence(send_node, nil, location: associated_node || comment.location)
end
end
rescue Exception => e
|
AST Scanner: fix magic comment location reporting
|
glebm_i18n-tasks
|
train
|
rb
|
71315ee0e0b93d2f63bacf381e4a96100391d930
|
diff --git a/tests/QueryWhereTests.php b/tests/QueryWhereTests.php
index <HASH>..<HASH> 100644
--- a/tests/QueryWhereTests.php
+++ b/tests/QueryWhereTests.php
@@ -83,7 +83,8 @@ class QueryWhereTests extends PHPUnit_Framework_TestCase
public function testOrWhere()
{
$this->query->where('name', 'John')
- ->orWhere('name', 'Steve');
+ ->orWhere('name', 'Steve')
+ ->orWhere(array('name' => 'Jack', 'surname' => 'Johnes'));
$expected = array(
'$or' => array(
@@ -96,6 +97,16 @@ class QueryWhereTests extends PHPUnit_Framework_TestCase
'$and' => array(
array('name' => 'Steve'),
)
+ ),
+ array(
+ '$and' => array(
+ array('name' => 'Jack'),
+ )
+ ),
+ array(
+ '$and' => array(
+ array('surname' => 'Johnes'),
+ )
)
)
);
|
Added some tests for where clauses supplied as arrays
|
thephpleague_monga
|
train
|
php
|
a624250cd2371bddf6abdd66196e53c76855f55f
|
diff --git a/lib/mongodb/gridfs/gridstore.js b/lib/mongodb/gridfs/gridstore.js
index <HASH>..<HASH> 100644
--- a/lib/mongodb/gridfs/gridstore.js
+++ b/lib/mongodb/gridfs/gridstore.js
@@ -112,7 +112,7 @@ GridStore.prototype.write = function(string, close, callback) {
var previousChunkNumber = self.currentChunk.chunkNumber;
var leftOverDataSize = self.chunkSize - self.currentChunk.position;
var previousChunkData = string.substr(0, leftOverDataSize);
- var leftOverData = string.substr(leftOverData, (string.length - leftOverDataSize));
+ var leftOverData = string.substr(leftOverDataSize, (string.length - leftOverDataSize));
// Let's finish the current chunk and then call write again for the remaining data
self.currentChunk.write(previousChunkData, function(err, chunk) {
chunk.save(function(err, result) {
|
Fixed bug with multiple writes of the first chunk
|
mongodb_node-mongodb-native
|
train
|
js
|
bbba8601b988d5212f1a03e52b7a93881d7ee635
|
diff --git a/test/test_reader.py b/test/test_reader.py
index <HASH>..<HASH> 100644
--- a/test/test_reader.py
+++ b/test/test_reader.py
@@ -99,3 +99,26 @@ def test_type(tmp_path):
lines = list(reader.FortranReader(filename, docmark="!"))
assert lines == expected
+
+
+def test_unknown_include(tmp_path):
+ """Check that `include "file.h"` ignores unknown files"""
+
+ data = """\
+ program test
+ include "file.h"
+ end program test
+ """
+
+ expected = [
+ "program test",
+ 'include "file.h"',
+ "end program test",
+ ]
+
+ filename = tmp_path / "test.f90"
+ with open(filename, "w") as f:
+ f.write(data)
+
+ lines = list(reader.FortranReader(filename, docmark="!"))
+ assert lines == expected
|
Add unit test for ignoring unknown files in `include`
|
Fortran-FOSS-Programmers_ford
|
train
|
py
|
67f2f7257765763089f5bc4a2ef51060f1bb6d49
|
diff --git a/pyiso.py b/pyiso.py
index <HASH>..<HASH> 100644
--- a/pyiso.py
+++ b/pyiso.py
@@ -1629,9 +1629,6 @@ class PyIso(object):
if not self.initialized:
raise Exception("This object is not yet initialized; call either open() or new() to create an ISO")
- if self.pvd is None:
- raise Exception("This object does not have a Primary Volume Descriptor yet")
-
if not overwrite and os.path.exists(outpath):
raise Exception("Output file already exists")
|
Remove a redundant check from write()
|
clalancette_pycdlib
|
train
|
py
|
95614bca6edd05f6b32a357d2f7b3f20aeef9e2f
|
diff --git a/master/buildbot/scripts/base.py b/master/buildbot/scripts/base.py
index <HASH>..<HASH> 100644
--- a/master/buildbot/scripts/base.py
+++ b/master/buildbot/scripts/base.py
@@ -229,7 +229,7 @@ class SubcommandOptions(usage.Options):
raise
break
- for k in localDict.keys():
+ for k in list(localDict.keys()): # pylint: disable=consider-iterating-dictionary
if k.startswith("__"):
del localDict[k]
return localDict
|
pylint: disable warning
|
buildbot_buildbot
|
train
|
py
|
97afa9c5e9fb940e887506e5e86930365bfb629d
|
diff --git a/beta/beta.js b/beta/beta.js
index <HASH>..<HASH> 100644
--- a/beta/beta.js
+++ b/beta/beta.js
@@ -1,3 +1,7 @@
+/**
+ * Documentation is not available as this is only in beta and it may change at any time.
+ */
+
var irc = require('twitch-irc');
var client = new irc.client({
|
Added header to the beta example.
|
twitch-irc_twitch-irc
|
train
|
js
|
b4e996519b48b3e6469167e92020f13314b5472e
|
diff --git a/graylog2-server/src/main/java/org/graylog/plugins/views/search/engine/QueryEngine.java b/graylog2-server/src/main/java/org/graylog/plugins/views/search/engine/QueryEngine.java
index <HASH>..<HASH> 100644
--- a/graylog2-server/src/main/java/org/graylog/plugins/views/search/engine/QueryEngine.java
+++ b/graylog2-server/src/main/java/org/graylog/plugins/views/search/engine/QueryEngine.java
@@ -102,7 +102,7 @@ public class QueryEngine {
} else {
error = new QueryError(query, cause);
}
- LOG.error("Running query {} failed: {}", query.id(), cause);
+ LOG.debug("Running query {} failed: {}", query.id(), cause);
searchJob.addError(error);
return QueryResult.failedQueryWithError(query, error);
}
|
Degrading query errors to `debug` instead of `error`.
These can be related to invalid queries posted against the API, so they
are not a general indicator of server malfunctioning.
|
Graylog2_graylog2-server
|
train
|
java
|
4586d60c69033f74cbde49c961bd9519f200a369
|
diff --git a/lib/moodlelib.php b/lib/moodlelib.php
index <HASH>..<HASH> 100644
--- a/lib/moodlelib.php
+++ b/lib/moodlelib.php
@@ -86,7 +86,10 @@ function reload_user_preferences() {
foreach ($preferences as $preference) {
$USER->preference[$preference->name] = $preference->value;
}
- }
+ } else {
+ //return empty preference array to hold new values
+ $USER->preference = array();
+ }
}
function set_user_preference($name, $value, $user=NULL) {
@@ -388,7 +391,7 @@ function require_login($courseid=0, $autologinguest=true) {
// check whether the user should be changing password
reload_user_preferences();
- if ($USER->preference['auth_forcepasswordchange']){
+ if (isset($USER->preference['auth_forcepasswordchange'])){
if (is_internal_auth() || $CFG->{'auth_'.$USER->auth.'_stdchangepassword'}){
redirect("$CFG->wwwroot/login/change_password.php");
} elseif($CFG->changepassword) {
|
To fix problems with auth_forcepasswordchange
|
moodle_moodle
|
train
|
php
|
623f9d8b0fcac04eaf85cb2c59dd86b9eb459dc4
|
diff --git a/elasticsearch-dsl/test/integration/search_aggregations_test.rb b/elasticsearch-dsl/test/integration/search_aggregations_test.rb
index <HASH>..<HASH> 100644
--- a/elasticsearch-dsl/test/integration/search_aggregations_test.rb
+++ b/elasticsearch-dsl/test/integration/search_aggregations_test.rb
@@ -186,10 +186,10 @@ module Elasticsearch
response = @client.search index: 'test', body: search {
aggregation :clicks_for_one do
scripted_metric do
- init_script "params._agg.transactions = []"
- map_script "if (doc['tags'].value.contains('one')) { params._agg.transactions.add(doc['clicks'].value) }"
- combine_script "double sum = 0; for (t in params._agg.transactions) { sum += t } return sum"
- reduce_script "double sum = 0; for (a in params._aggs) { sum += a } return sum"
+ init_script "state._agg.transactions = []"
+ map_script "if (doc['tags'].value.contains('one')) { state._agg.transactions.add(doc['clicks'].value) }"
+ combine_script "double sum = 0; for (t in state._agg.transactions) { sum += t } return sum"
+ reduce_script "double sum = 0; for (a in state._aggs) { sum += a } return sum"
end
end
}.to_hash
|
[DSL] Update agg scripted metric test for deprecation in ES issue #<I>
|
elastic_elasticsearch-ruby
|
train
|
rb
|
ff8f6bdcc2ead54920c96c44722f83bb836afad6
|
diff --git a/settings/cache.settings.php b/settings/cache.settings.php
index <HASH>..<HASH> 100644
--- a/settings/cache.settings.php
+++ b/settings/cache.settings.php
@@ -5,10 +5,6 @@
* Contains caching configuration.
*/
-if ($is_ah_env) {
- switch ($ah_env) {
- case 'prod':
- $config['system.logging']['error_level'] = 'hide';
- break;
- }
+if ($is_prod_env || $is_stage_env) {
+ $config['system.logging']['error_level'] = 'hide';
}
|
Make caching configuration hosting provider agnostic. (#<I>)
|
acquia_blt
|
train
|
php
|
47a34471bd16fa31b811946aed1bafdc002d7581
|
diff --git a/speech-to-text/v1.js b/speech-to-text/v1.js
index <HASH>..<HASH> 100644
--- a/speech-to-text/v1.js
+++ b/speech-to-text/v1.js
@@ -455,7 +455,7 @@ SpeechToTextV1.prototype.createCustomization = function(params, callback) {
```
*
* @param {Object} params The parameters
- * @param {String} [params.language] optional filter. Currently only en-US is supported.
+ * @param {String} [params.language] optional filter.
* @param {Function} callback
*/
SpeechToTextV1.prototype.getCustomizations = function(params, callback) {
diff --git a/text-to-speech/v1.js b/text-to-speech/v1.js
index <HASH>..<HASH> 100644
--- a/text-to-speech/v1.js
+++ b/text-to-speech/v1.js
@@ -146,7 +146,7 @@ TextToSpeechV1.prototype.pronunciation = function(params, callback) {
*
* @param {Object} params
* @param {String} params.name
- * @param {String} [params.language=en-US] - Currently only en-US is supported
+ * @param {String} [params.language=en-US]
* @param {String} [params.description]
* @param {Function} callback
*/
|
removing outdated en-us only comments
|
watson-developer-cloud_node-sdk
|
train
|
js,js
|
4c3ca7b7f6ad09672830cd6c4a63ad56d9073947
|
diff --git a/src/Services/QueuedJobService.php b/src/Services/QueuedJobService.php
index <HASH>..<HASH> 100644
--- a/src/Services/QueuedJobService.php
+++ b/src/Services/QueuedJobService.php
@@ -713,7 +713,7 @@ class QueuedJobService
*/
protected function markStarted()
{
- if ($this->startedAt) {
+ if (!$this->startedAt) {
$this->startedAt = DBDatetime::now()->Format('U');
}
}
|
Fix markStarted not calculating timeout correctly
|
symbiote_silverstripe-queuedjobs
|
train
|
php
|
ccb6dd31a8ca92bbda9a2be1417b18c729b43904
|
diff --git a/src/ORM/Association.php b/src/ORM/Association.php
index <HASH>..<HASH> 100644
--- a/src/ORM/Association.php
+++ b/src/ORM/Association.php
@@ -21,7 +21,6 @@ use Cake\Datasource\ResultSetDecorator;
use Cake\ORM\Locator\LocatorAwareTrait;
use Cake\ORM\Query;
use Cake\ORM\Table;
-use Cake\ORM\TableRegistry;
use Cake\Utility\Inflector;
use InvalidArgumentException;
use RuntimeException;
|
Remove unnessesary TableRegistry use statement.
|
cakephp_cakephp
|
train
|
php
|
59144eef21ba873a058c3b046f3068b8029671a7
|
diff --git a/src/terra/Command/Environment/EnvironmentProxyEnable.php b/src/terra/Command/Environment/EnvironmentProxyEnable.php
index <HASH>..<HASH> 100644
--- a/src/terra/Command/Environment/EnvironmentProxyEnable.php
+++ b/src/terra/Command/Environment/EnvironmentProxyEnable.php
@@ -20,7 +20,7 @@ class EnvironmentProxyEnable extends Command
protected function execute(InputInterface $input, OutputInterface $output)
{
$output->writeln('Hello Terra!');
- $cmd = 'docker run -d -p 80:80 -v /var/run/docker.sock:/tmp/docker.sock:ro jwilder/nginx-proxy';
+ $cmd = 'docker run -d -p 80:80 -v /var/run/docker.sock:/tmp/docker.sock:ro --security-opt label:disable jwilder/nginx-proxy';
$process = new Process($cmd);
$process->setTimeout(null);
|
Fixing URL proxy being blocked when using SELinux by adding a label to skip security.
|
terra-ops_terra-cli
|
train
|
php
|
ed8f10d7c8bc717852b968dfffc7b849317f90c1
|
diff --git a/presto-main/src/main/java/com/facebook/presto/sql/planner/LiteralInterpreter.java b/presto-main/src/main/java/com/facebook/presto/sql/planner/LiteralInterpreter.java
index <HASH>..<HASH> 100644
--- a/presto-main/src/main/java/com/facebook/presto/sql/planner/LiteralInterpreter.java
+++ b/presto-main/src/main/java/com/facebook/presto/sql/planner/LiteralInterpreter.java
@@ -103,10 +103,10 @@ public final class LiteralInterpreter
if (value.isNaN()) {
return new FunctionCall(new QualifiedName("nan"), ImmutableList.<Expression>of());
}
- else if (value == Double.NEGATIVE_INFINITY) {
+ else if (value.equals(Double.NEGATIVE_INFINITY)) {
return new NegativeExpression(new FunctionCall(new QualifiedName("infinity"), ImmutableList.<Expression>of()));
}
- else if (value == Double.POSITIVE_INFINITY) {
+ else if (value.equals(Double.POSITIVE_INFINITY)) {
return new FunctionCall(new QualifiedName("infinity"), ImmutableList.<Expression>of());
}
else {
|
Use equals instead of == for Doubles in LiteralInterpreter
|
prestodb_presto
|
train
|
java
|
ce2e9407e7461ccd19c6dac114d556d24eda52c1
|
diff --git a/src/DefaultNode.php b/src/DefaultNode.php
index <HASH>..<HASH> 100644
--- a/src/DefaultNode.php
+++ b/src/DefaultNode.php
@@ -7,6 +7,7 @@ use NoTee\Exceptions\PathOutdatedException;
class DefaultNode implements Fertile, Node
{
+ public static $validateAttributeNames = true;
protected $tagName;
protected $attributes;
@@ -94,7 +95,7 @@ class DefaultNode implements Fertile, Node
private static function validateAttribute($key, $value)
{
- if(!static::isValidAttributeName($key)){
+ if(static::$validateAttributeNames && !static::isValidAttributeName($key)){
throw new \InvalidArgumentException("invalid attribute name $key");
}
if(in_array($key, static::$urlAttributes)) {
|
added switch for attribute name check for performance reasons
|
mschop_NoTeePHP
|
train
|
php
|
587fa3a3ee580eb4d7b111db9c937fc0d7445d9d
|
diff --git a/client/lib/abtest/active-tests.js b/client/lib/abtest/active-tests.js
index <HASH>..<HASH> 100644
--- a/client/lib/abtest/active-tests.js
+++ b/client/lib/abtest/active-tests.js
@@ -99,10 +99,10 @@ export default {
allowExistingUsers: true,
},
verticalSuggestedThemes: {
- datestamp: '20191011',
+ datestamp: '20191029',
variations: {
- control: 100,
- test: 0,
+ control: 90,
+ test: 10,
},
defaultVariation: 'control',
allowExistingUsers: true,
|
Enable vertical-suggested themes ab test (#<I>)
|
Automattic_wp-calypso
|
train
|
js
|
0fa01eae44e7abe44a1937b39fa593e64679bce0
|
diff --git a/src/main/java/org/mockito/internal/exceptions/Reporter.java b/src/main/java/org/mockito/internal/exceptions/Reporter.java
index <HASH>..<HASH> 100644
--- a/src/main/java/org/mockito/internal/exceptions/Reporter.java
+++ b/src/main/java/org/mockito/internal/exceptions/Reporter.java
@@ -870,8 +870,8 @@ public class Reporter {
"Typically, stubbing argument mismatch indicates user mistake when writing tests.",
"In order to streamline debugging tests Mockito fails early in this scenario.",
"However, there are legit scenarios when this exception generates false negative signal:",
- " - stubbing the same method multiple times using 'given' or 'when' syntax",
- " Please use willReturn/doReturn API for stubbing",
+ " - stubbing the same method multiple times using 'given().will()' or 'when().then()' API",
+ " Please usew 'will().given()' or 'doReturn().when()' API for stubbing",
" - stubbed method is intentionally invoked with different arguments by code under test",
" Please use 'default' or 'silent' JUnit Rule.",
"For more information see javadoc for PotentialStubbingProblem class."));
|
Updated the exception message for clarity.
|
mockito_mockito
|
train
|
java
|
ad319568d86aec96e80465173a46752788fee4d2
|
diff --git a/Service/EncryptionService.php b/Service/EncryptionService.php
index <HASH>..<HASH> 100644
--- a/Service/EncryptionService.php
+++ b/Service/EncryptionService.php
@@ -399,10 +399,12 @@ class EncryptionService
if ($keyData) {
$encryptedContent = $fileEntity->getContent();
- $encType = CryptographyProviderInterface::FILE_ENCRYPTION;
- $decryptedContent = $this->cryptographyProvider->decrypt($encryptedContent, $keyData, $encType);
+ if ($encryptedContent) {
+ $encType = CryptographyProviderInterface::FILE_ENCRYPTION;
+ $decryptedContent = $this->cryptographyProvider->decrypt($encryptedContent, $keyData, $encType);
- $fileEntity->setContent($decryptedContent);
+ $fileEntity->setContent($decryptedContent);
+ }
}
}
|
Check for the existence of the file before decrypting it
|
jagilpe_encryption-bundle
|
train
|
php
|
a24176567b2dd05f3649887e49cf3bb20d1f5353
|
diff --git a/gulpfile.js b/gulpfile.js
index <HASH>..<HASH> 100644
--- a/gulpfile.js
+++ b/gulpfile.js
@@ -83,9 +83,11 @@ gulp.task('serve', 'starts a local webserver (--port specifies bound port)',
const server = gls.static(paths.dist.dir, port);
server.start();
gulp.watch([paths.dist.html], function(file) {
- /* eslint-disable */
- server.notify.apply(server, [file]);
- /* eslint-enable */
+ setTimeout(function() {
+ /* eslint-disable */
+ server.notify.apply(server, [file]);
+ /* eslint-enable */
+ }, 500);
});
});
|
Fix live-reload (#<I>)
Delay live reload for <I>ms after a file is changed to
make sure that all changes have been written to the file.
Fixes #<I>
|
ampproject_amp-by-example
|
train
|
js
|
8c457a396c1cb1ffec4a11994de513511c553cda
|
diff --git a/tasks/test.js b/tasks/test.js
index <HASH>..<HASH> 100644
--- a/tasks/test.js
+++ b/tasks/test.js
@@ -56,7 +56,7 @@ module.exports = function(grunt) {
cmd: node, args: ['test/e2e/angular-scenario/server.js']
}, function() {});
}
-
+
grunt.log.writeln('Running ' + cmd + args.join(' '));
var child;
if (process.platform === 'win32') {
@@ -94,7 +94,8 @@ module.exports = function(grunt) {
// CLIENT unit tests
else if (this.target === 'client') {
- exec(which('testacular'), ['start', this.data, '--single-run', '--no-auto-watch', '--reporters=dots',
+ var cmd = path.join(__dirname, '..', 'bin', 'testacular');
+ exec(cmd, ['start', this.data, '--single-run', '--no-auto-watch', '--reporters=dots',
'--browsers=' + BROWSERS], 'Client unit tests failed.');
}
});
|
[fix] Depend only on itself not a global install of testacular for client tests.
This closes #<I>.
|
karma-runner_karma
|
train
|
js
|
35b2ab90eebdf54f951844964297e8e680ba5521
|
diff --git a/libkbfs/bcache.go b/libkbfs/bcache.go
index <HASH>..<HASH> 100644
--- a/libkbfs/bcache.go
+++ b/libkbfs/bcache.go
@@ -243,6 +243,11 @@ func (b *BlockCacheStandard) makeRoomForSize(size uint64, lifetime BlockCacheLif
func (b *BlockCacheStandard) PutWithPrefetch(
ptr BlockPointer, tlf tlf.ID, block Block, lifetime BlockCacheLifetime,
prefetchStatus PrefetchStatus) (err error) {
+ // We first check if the block shouldn't be cached, since CommonBlocks can
+ // take this path.
+ if lifetime == NoCacheEntry {
+ return nil
+ }
// Just in case we tried to cache a block type that shouldn't be cached,
// return an error. This is an insurance check. That said, this got rid of
// a flake in TestSBSConflicts, so we should still look for the underlying
@@ -259,9 +264,6 @@ func (b *BlockCacheStandard) PutWithPrefetch(
var wasInCache bool
switch lifetime {
- case NoCacheEntry:
- return nil
-
case TransientEntry:
// If it's the right type of block, store the hash -> ID mapping.
if fBlock, isFileBlock := block.(*FileBlock); b.ids != nil &&
|
bcache: Check for NoCacheEntry lifetime before checking for block types.
|
keybase_client
|
train
|
go
|
f2896193d42ab93e48f5a87e3a92e341b9f47506
|
diff --git a/etc/eslint/rules/index.js b/etc/eslint/rules/index.js
index <HASH>..<HASH> 100644
--- a/etc/eslint/rules/index.js
+++ b/etc/eslint/rules/index.js
@@ -20,7 +20,8 @@ var rules = merge(
require( './variables.js' ),
require( './nodejs.js' ),
require( './style.js' ),
- require( './es2015.js' )
+ require( './es2015.js' ),
+ require( './stdlib.js')
);
|
Add stdlib rule configurations to index file
|
stdlib-js_stdlib
|
train
|
js
|
d2a059b70ca9ccf1151159a1127735d6dc98bc4c
|
diff --git a/Services/TimetableManager.php b/Services/TimetableManager.php
index <HASH>..<HASH> 100644
--- a/Services/TimetableManager.php
+++ b/Services/TimetableManager.php
@@ -32,10 +32,11 @@ class TimetableManager
private function initAdditionalData($externalRouteId, $externalCoverageId)
{
$data = $this->navitia->getRouteData($externalRouteId, $externalCoverageId);
+ $embedded_type = $data->direction->embedded_type;
$lineConfig = $this->timetable->getLineConfig();
$this->lineManager->initTwigPath($lineConfig);
- $this->timetable->setTitle($data->direction->stop_point->name);
+ $this->timetable->setTitle($data->direction->$embedded_type->name);
}
/*
|
Request for direction title in layouts updated. (now we use embedded_type)
|
CanalTP_MttBundle
|
train
|
php
|
93739d6201f9500552f41a655c3fc1c3ad0aa6c7
|
diff --git a/src/Framework/BaseWebApplication.php b/src/Framework/BaseWebApplication.php
index <HASH>..<HASH> 100644
--- a/src/Framework/BaseWebApplication.php
+++ b/src/Framework/BaseWebApplication.php
@@ -54,7 +54,7 @@ abstract class BaseWebApplication extends BaseConsoleApplication implements Fram
$this->debugBar['time']->stopMeasure('setup');
}
- private $debugBar;
+ protected $debugBar;
public function configureDebugBar()
{
@@ -176,7 +176,7 @@ abstract class BaseWebApplication extends BaseConsoleApplication implements Fram
$this->configureSpaceAndPermissionRoutes();
}
- private function configureSpaceAndPermissionRoutes()
+ protected function configureSpaceAndPermissionRoutes()
{
if (isset($this['spaceRepository'])) {
$loader = new YamlFileLoader(new FileLocator([__DIR__.'/..']));
@@ -188,7 +188,7 @@ abstract class BaseWebApplication extends BaseConsoleApplication implements Fram
}
}
- private function configureTemplateEngine()
+ protected function configureTemplateEngine()
{
$this['twig.loader.filesystem']->addPath(
$this->getThemePath(true),
|
Make BaseWebApplication methods protected vs private
|
Radvance_Radvance
|
train
|
php
|
1734eee07f4fbe9110432762acd320a861412baa
|
diff --git a/src/main/java/org/getopentest/base/TestActor.java b/src/main/java/org/getopentest/base/TestActor.java
index <HASH>..<HASH> 100644
--- a/src/main/java/org/getopentest/base/TestActor.java
+++ b/src/main/java/org/getopentest/base/TestActor.java
@@ -1354,6 +1354,8 @@ public class TestActor extends Observable implements ITestActor {
description = actionDef.action.trim();
} else if (actionDef.script != null) {
description = ScriptAction.class.getName();
+ } else if (actionDef.macro != null) {
+ description = actionDef.macro.trim();
} else {
description = "(No description provided)";
}
@@ -1951,7 +1953,7 @@ public class TestActor extends Observable implements ITestActor {
boolean scriptWasAlreadyIncluded = includedScripts.stream()
.parallel().anyMatch(normalizedPartialPath::equalsIgnoreCase);
-
+
if (scriptWasAlreadyIncluded) {
Logger.trace(String.format(
"Skipping inclusion of script file \"%s\" since it was already "
|
fix(TestActor): provide proper description for macros in test results
|
mcdcorp_opentest
|
train
|
java
|
8ca003e27281f5320a814e41473b16efd78b1837
|
diff --git a/src/angular-leaflet-directive.js b/src/angular-leaflet-directive.js
index <HASH>..<HASH> 100644
--- a/src/angular-leaflet-directive.js
+++ b/src/angular-leaflet-directive.js
@@ -67,6 +67,8 @@ leafletDirective.directive("leaflet", ["$http", "$log", "$parse", function ($htt
setupMarkers();
setupPaths();
+ // use of leafletDirectiveSetMap event is not encouraged. only use
+ // it when there is no easy way to bind data to the directive
$scope.$on('leafletDirectiveSetMap', function(event, message) {
var meth = message.shift();
map[meth].apply(map, message);
|
add comment in source for setmap event
|
tombatossals_angular-leaflet-directive
|
train
|
js
|
f7994685833ee521838639b4ba4b77fa290133b7
|
diff --git a/lib/commands/general.js b/lib/commands/general.js
index <HASH>..<HASH> 100644
--- a/lib/commands/general.js
+++ b/lib/commands/general.js
@@ -178,7 +178,12 @@ commands.keys = async function (keys) {
await this.setValue(keys, el.ELEMENT);
};
-commands.setUrl = iosCommands.general.setUrl;
+commands.setUrl = async function (url) {
+ if (!this.isWebContext()) {
+ return await this.proxyCommand('/url', 'POST', {url});
+ }
+ return await iosCommands.general.setUrl.call(this, url);
+};
export { commands };
export default commands;
|
Fix url opening on real devices (#<I>)
* Fix url opening on real devices
* Fix method call
|
appium_appium-xcuitest-driver
|
train
|
js
|
3a5c84ef5b4d73343e7a9a5e615271bdb842c090
|
diff --git a/lib/barby/barcode/code_25.rb b/lib/barby/barcode/code_25.rb
index <HASH>..<HASH> 100644
--- a/lib/barby/barcode/code_25.rb
+++ b/lib/barby/barcode/code_25.rb
@@ -97,6 +97,10 @@ module Barby
end
end
+ def encoding_for_bars_without_end_space(*a)
+ encoding_for_bars(*a).gsub(/0+$/, '')
+ end
+
#Mod10
def checksum
@@ -149,8 +153,7 @@ module Barby
end
def stop_encoding
- #Removes trailing space generated by encoding_for_bars
- encoding_for_bars(STOP_ENCODING).gsub(/0+$/, '')
+ encoding_for_bars_without_end_space(STOP_ENCODING)
end
diff --git a/lib/barby/barcode/code_25_iata.rb b/lib/barby/barcode/code_25_iata.rb
index <HASH>..<HASH> 100644
--- a/lib/barby/barcode/code_25_iata.rb
+++ b/lib/barby/barcode/code_25_iata.rb
@@ -15,7 +15,7 @@ module Barby
end
def stop_encoding
- encoding_for_bars(STOP_ENCODING)
+ encoding_for_bars_without_end_space(STOP_ENCODING)
end
end
|
Fix stop_encoding for IATA 2 of 5
|
toretore_barby
|
train
|
rb,rb
|
ea717c104aa0249ddf6042072f310618c76c4be1
|
diff --git a/query.go b/query.go
index <HASH>..<HASH> 100644
--- a/query.go
+++ b/query.go
@@ -83,8 +83,8 @@ type Selector struct {
//
// By Options
//
-// The BySearch (default) option enables querying for elements with a CSS or
-// XPath selector, wrapping DOM.performSearch.
+// The BySearch (default) option enables querying for elements by plain text,
+// CSS selector or XPath query, wrapping DOM.performSearch.
//
// The ByID option enables querying for a single element with the matching CSS
// ID, wrapping DOM.querySelector. ByID is similar to calling
@@ -304,7 +304,7 @@ func ByID(s *Selector) {
}
// BySearch is an element query option to select elements by the DOM.performSearch
-// command. Works with both CSS and XPath queries.
+// command. It matches nodes by plain text, CSS selector or XPath query.
func BySearch(s *Selector) {
ByFunc(func(ctx context.Context, n *cdp.Node) ([]cdp.NodeID, error) {
id, count, err := dom.PerformSearch(s.selAsString()).Do(ctx)
|
Document that BySearch matches by plain text too
|
chromedp_chromedp
|
train
|
go
|
d98108019735edc667fa4b000ec8efca2ce0eb93
|
diff --git a/lib/rack/app/params.rb b/lib/rack/app/params.rb
index <HASH>..<HASH> 100644
--- a/lib/rack/app/params.rb
+++ b/lib/rack/app/params.rb
@@ -49,13 +49,9 @@ class Rack::App::Params
::Rack::Utils.parse_nested_query(query_string).merge!(params_that_presented_multiple_times)
end
- ARRAY_FORM = /^\w+\[\]$/
- HASH_FORM = /^\w+(\[\w+\])+$/
def params_that_presented_multiple_times
cgi_params = CGI.parse(query_string)
- cgi_params.reject! { |_k, v| v.length == 1 }
- cgi_params.reject! { |k, _v| k =~ ARRAY_FORM }
- cgi_params.reject! { |k, _v| k =~ HASH_FORM }
+ cgi_params.reject! { |k, v| v.length == 1 && k !~ /^\w+$/ }
cgi_params.reduce({}) do |result, (key, value)|
result[key] = formatted_value(key, value)
result
|
refactor: use explicit use case search instead of define everything that can't be for legacy array form based query string parsing support
|
rack-app_rack-app
|
train
|
rb
|
1156558d6ed9f746e8a668f46e7ffa22e049a1ea
|
diff --git a/system/core/Controller.php b/system/core/Controller.php
index <HASH>..<HASH> 100644
--- a/system/core/Controller.php
+++ b/system/core/Controller.php
@@ -1261,7 +1261,7 @@ abstract class Controller
}
/**
- * Controls access to retricted areas
+ * Controls access to restricted areas
*/
protected function controlAccessRestrictedArea()
{
@@ -1325,7 +1325,7 @@ abstract class Controller
}
/**
- * Restrict access to only superadmin (UID 1)
+ * Restrict access to only super-admin (UID 1)
*/
protected function controlAccessSuperAdmin()
{
@@ -1590,7 +1590,8 @@ abstract class Controller
'head' => 'layout/head',
'body' => 'layout/body',
'layout' => 'layout/layout',
- 'region_content' => 'layout/region_content'
+ 'region_content' => 'layout/region_content',
+ 'region_bottom' => 'layout/region_bottom'
);
}
|
Add missed template for buttom region
|
gplcart_gplcart
|
train
|
php
|
08456789744ae90fadbfcc94112dd4754bfc855c
|
diff --git a/lib/Subscription.php b/lib/Subscription.php
index <HASH>..<HASH> 100644
--- a/lib/Subscription.php
+++ b/lib/Subscription.php
@@ -54,11 +54,13 @@ class Subscription extends ApiResource
*
* @link https://stripe.com/docs/api#subscription_object-status
*/
- const STATUS_ACTIVE = 'active';
- const STATUS_CANCELED = 'canceled';
- const STATUS_PAST_DUE = 'past_due';
- const STATUS_TRIALING = 'trialing';
- const STATUS_UNPAID = 'unpaid';
+ const STATUS_ACTIVE = 'active';
+ const STATUS_CANCELED = 'canceled';
+ const STATUS_PAST_DUE = 'past_due';
+ const STATUS_TRIALING = 'trialing';
+ const STATUS_UNPAID = 'unpaid';
+ const STATUS_INCOMPLETE = 'incomplete';
+ const STATUS_INCOMPLETE_EXPIRED = 'incomplete_expired';
public static function getSavedNestedResources()
{
|
Added subscription status constants for "incomplete" and "incomplete_expired".
|
stripe_stripe-php
|
train
|
php
|
bcad3e1e770aa4c437c4d7d0dcee71f2faa232c7
|
diff --git a/src/App.php b/src/App.php
index <HASH>..<HASH> 100644
--- a/src/App.php
+++ b/src/App.php
@@ -16,7 +16,7 @@ class App
// @var array|false Location where to load JS/CSS files
public $cdn = [
- 'atk' => 'https://cdn.rawgit.com/atk4/ui/1.4.0/public',
+ 'atk' => 'https://cdn.rawgit.com/atk4/ui/1.4.1/public',
'jquery' => 'https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1',
'serialize-object' => 'https://cdnjs.cloudflare.com/ajax/libs/jquery-serialize-object/2.5.0',
'semantic-ui' => 'https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.2.10',
@@ -24,7 +24,7 @@ class App
];
// @var string Version of Agile UI
- public $version = '1.4.0';
+ public $version = '1.4.1';
// @var string Name of application
public $title = 'Agile UI - Untitled Application';
|
Updated CDN and $version in App.php to <I>
|
atk4_ui
|
train
|
php
|
9c0b6bb903da8e72184c7ebf8e63df58709323f5
|
diff --git a/test/test_rake_thread_pool.rb b/test/test_rake_thread_pool.rb
index <HASH>..<HASH> 100644
--- a/test/test_rake_thread_pool.rb
+++ b/test/test_rake_thread_pool.rb
@@ -1,6 +1,5 @@
require File.expand_path('../helper', __FILE__)
require 'rake/thread_pool'
-require 'test/unit/assertions'
class TestRakeTestThreadPool < Rake::TestCase
include Rake
|
Remove bogus require
test/unit/assertions was never used by this file
|
ruby_rake
|
train
|
rb
|
1b8ec7e9ddf1fd16b999d1664a2b9d64a0dda710
|
diff --git a/test/marc_extractor_test.rb b/test/marc_extractor_test.rb
index <HASH>..<HASH> 100644
--- a/test/marc_extractor_test.rb
+++ b/test/marc_extractor_test.rb
@@ -328,6 +328,19 @@ describe "Traject::MarcExtractor" do
values = extractor.extract(@record)
assert_equal ["27", "2710"], values
end
+
+ it "associates indicators properly with repeated tags" do
+ @record = MARC::Record.new
+ @record.append MARC::DataField.new("100", '1', ' ', ['a', '100a first indicator 1'], ['b', 'should not include 100|1|b'])
+ @record.append MARC::DataField.new("100", '2', ' ', ['b', '100b first indicator 2'], ['a', 'should not include 100|2|a'])
+
+ extractor = Traject::MarcExtractor.new("100|1*|a:100|2*|b")
+
+ values = extractor.extract(@record)
+
+ assert_equal ['100a first indicator 1', '100b first indicator 2'], values
+ end
+
end
|
MarcExtractor, test indicators on repeated tags in spec
|
traject_traject
|
train
|
rb
|
ed78ba891d990c5e51e3143e47debf133df2e290
|
diff --git a/textx/commands/console.py b/textx/commands/console.py
index <HASH>..<HASH> 100644
--- a/textx/commands/console.py
+++ b/textx/commands/console.py
@@ -21,10 +21,12 @@ def textx():
self.print_help()
sys.exit(2)
- parser = MyParser(description="textX checker and visualizer")
- parser.add_argument('cmd', help="Command - 'check' or 'visualize'")
- parser.add_argument('metamodel', help="Meta-model file name")
- parser.add_argument('model', help="Model file name", nargs="?")
+ parser = MyParser(description='textX checker and visualizer')
+ parser.add_argument('cmd', help='Command - "check" or "visualize"')
+ parser.add_argument('metamodel', help='Meta-model file name')
+ parser.add_argument('model', help='Model file name', nargs='?')
+ parser.add_argument('-ci', help='case-insensitive parsing',
+ action='store_true')
args = parser.parse_args()
@@ -34,7 +36,7 @@ def textx():
sys.exit(1)
try:
- metamodel = metamodel_from_file(args.metamodel)
+ metamodel = metamodel_from_file(args.metamodel, ignore_case=args.ci)
print("Meta-model OK.")
except TextXError as e:
print("Error in meta-model file.")
|
Case-insensitive option switch added to textx command.
|
textX_textX
|
train
|
py
|
378e72f7fb71bc55337cb7e80a3a143f0966b570
|
diff --git a/index.js b/index.js
index <HASH>..<HASH> 100644
--- a/index.js
+++ b/index.js
@@ -93,7 +93,7 @@ function startPlaylist(playlist, amount, callback) {
osascript(stringify(lib.play.method).replace(/{{playlist}}/, playlist), function (err) {
var result;
if (err === null) {
- result = callback(logSymbols.success + ' Playing ' + amount + ' song(s) ♪♬');
+ result = callback(logSymbols.success + ' Playing ' + amount + ' song' + ( amount > 1 ? 's' : '') + ' ♪♬');
} else {
result = callback(logSymbols.error + ' ' + chalk.red(err));
}
|
Implemented plural of `song`
Closes #8
|
mischah_itunes-remote
|
train
|
js
|
cda836c7f973311ee63749582958ce8152c30a23
|
diff --git a/js/angular/components/iconic/iconic.js b/js/angular/components/iconic/iconic.js
index <HASH>..<HASH> 100644
--- a/js/angular/components/iconic/iconic.js
+++ b/js/angular/components/iconic/iconic.js
@@ -26,6 +26,9 @@
function zfIconic(iconic) {
var directive = {
restrict: 'A',
+ scope: {
+ dynSrc: '=?'
+ },
link: link
};
@@ -33,7 +36,12 @@
function link(scope, element, attrs, controller) {
var ico = iconic.getAccess();
- attrs.$set('data-src', attrs.src);
+ if(scope.dynSrc) {
+ attrs.$set('data-src', scope.dynSrc);
+ } else {
+ // To support expressions on data-src
+ attrs.$set('data-src', attrs.src);
+ }
ico.inject(element[0]);
}
}
|
Added back dynSrc option
|
zurb_foundation-apps
|
train
|
js
|
0e0d72e9eede23343fc66dfbf6c6a814f6c536b1
|
diff --git a/test_parameters/test_unit/__init__.py b/test_parameters/test_unit/__init__.py
index <HASH>..<HASH> 100644
--- a/test_parameters/test_unit/__init__.py
+++ b/test_parameters/test_unit/__init__.py
@@ -1,3 +1,5 @@
+# -*- coding: utf-8 -*-
+#
# Copyright (C) 2013 by Alex Brandt <alunduil@alunduil.com>
#
# parameters is freely distributable under the terms of an MIT-style license.
|
Add UTF-8 coding to unit test file.
Python2 deosn't default to UTF-8 so we need to explicitly declare it.
|
alunduil_crumbs
|
train
|
py
|
de2ff0bcd1581d1a5f2e33867650ce573a528393
|
diff --git a/guake/main.py b/guake/main.py
index <HASH>..<HASH> 100644
--- a/guake/main.py
+++ b/guake/main.py
@@ -42,7 +42,11 @@ from optparse import OptionParser
log = logging.getLogger(__name__)
# Force use X11 backend under wayland before any import of GDK through dependencies
+# This could fix weird problems under Wayland
+# But if user set GUAKE_ENABLE_WAYLAND=1, then force use Wayland backend
os.environ["GDK_BACKEND"] = "x11"
+if os.environ["GUAKE_ENABLE_WAYLAND"] == 1:
+ os.environ["GDK_BACKEND"] = "wayland"
from guake.globals import NAME
from guake.globals import bindtextdomain
diff --git a/guake/terminal.py b/guake/terminal.py
index <HASH>..<HASH> 100644
--- a/guake/terminal.py
+++ b/guake/terminal.py
@@ -121,6 +121,8 @@ class GuakeTerminal(Vte.Terminal):
self.setup_drag_and_drop()
+ # GDK_BACKEND is ingnored
+ # Set GUAKE_ENABLE_WAYLAND=1 to use Wayland backend
self.ENVV_EXCLUDE_LIST = ["GDK_BACKEND"]
self.envv = [f"{i}={os.environ[i]}" for i in os.environ if i not in self.ENVV_EXCLUDE_LIST]
self.envv.append(f"GUAKE_TAB_UUID={self.uuid}")
|
Add `GUAKE_ENABLE_WAYLAND` environment variable
|
Guake_guake
|
train
|
py,py
|
5f9f946c2dd60a697c4cc6cc9a305a0ab2b45f02
|
diff --git a/clean_file_locks.py b/clean_file_locks.py
index <HASH>..<HASH> 100755
--- a/clean_file_locks.py
+++ b/clean_file_locks.py
@@ -26,7 +26,7 @@ import logging
import optparse
from nova import flags
-from nova import log
+from nova.openstack.common import log
from nova import utils
|
Switch to common logging.
I only just moved logging from nova to common, so behavior should remain the same.
Change-Id: I1d<I>ca<I>f9d<I>bb<I>d<I>be2f9a<I>fb
|
openstack_hacking
|
train
|
py
|
3f862fab1a6cccedd331fc6161ac5c5438829d6e
|
diff --git a/lib/virtualfs/version.rb b/lib/virtualfs/version.rb
index <HASH>..<HASH> 100644
--- a/lib/virtualfs/version.rb
+++ b/lib/virtualfs/version.rb
@@ -1,3 +1,3 @@
module VirtualFS
- VERSION = "0.0.2"
+ VERSION = "0.1.0"
end
|
Bumped version to <I>.
|
evoL_virtualfs
|
train
|
rb
|
d65ecd6f62212d34d93f957c20e4918042501358
|
diff --git a/src/plugin/handler.js b/src/plugin/handler.js
index <HASH>..<HASH> 100644
--- a/src/plugin/handler.js
+++ b/src/plugin/handler.js
@@ -54,13 +54,8 @@ Handler.prototype.configure = function(options) {
};
-Handler.prototype.canExecute = function(data) {
- return this.matchers.canExecute(data);
-};
-
-
Handler.prototype.run = function(data, cancel) {
- if (!this.canExecute(data)) {
+ if (!this.matchers.canExecute(data)) {
return Promise.resolve(data);
}
diff --git a/src/plugin/plugin.js b/src/plugin/plugin.js
index <HASH>..<HASH> 100644
--- a/src/plugin/plugin.js
+++ b/src/plugin/plugin.js
@@ -102,9 +102,6 @@ Plugin.prototype.run = function(serviceName, data) {
.map(function(id) {
return plugin.context.getHandler(id);
})
- .filter(function(handler) {
- return handler.canExecute(data);
- })
.reduce(function(current, handler) {
return current
.then(canRun)
|
removed "handler.canExecute" to deferred that logic to be processed in the "handler.run" method
|
MiguelCastillo_bit-loader
|
train
|
js,js
|
883921c7607da1a805b223ffeff6950f97192315
|
diff --git a/test/types/yumrepo.rb b/test/types/yumrepo.rb
index <HASH>..<HASH> 100644
--- a/test/types/yumrepo.rb
+++ b/test/types/yumrepo.rb
@@ -63,6 +63,21 @@ class TestYumRepo < Test::Unit::TestCase
assert_equal(CREATE_EXP, text)
end
+ # Delete mirrorlist by setting it to :absent and enable baseurl
+ def test_absent
+ copy_datafiles
+ baseurl = 'http://example.com/'
+ devel = make_repo("development",
+ { :mirrorlist => 'absent',
+ :baseurl => baseurl })
+ devel.retrieve
+ assert_apply(devel)
+ inifile = Puppet.type(:yumrepo).read()
+ sec = inifile["development"]
+ assert_nil(sec["mirrorlist"])
+ assert_equal(baseurl, sec["baseurl"])
+ end
+
def make_repo(name, hash={})
hash[:name] = name
Puppet.type(:yumrepo).create(hash)
|
Test that setting a state to 'absent' really deletes it from the config
git-svn-id: <URL>
|
puppetlabs_puppet
|
train
|
rb
|
bac05e63d81531adefefc9bafef29334b118d888
|
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -5,7 +5,7 @@ from setuptools import setup, find_packages
setup(
name = 'parsec',
- version = '3.9',
+ version = '3.10',
description = 'parser combinator.',
long_description = 'A universal Python parser combinator library inspired by Parsec library of Haskell.',
author = 'He Tao',
|
Upgrade version to <I>.
|
sighingnow_parsec.py
|
train
|
py
|
f0cf4ed8ff57ae40a5b3f8d098af707a8c797d2d
|
diff --git a/system/src/Grav/Framework/Form/Interfaces/FormInterface.php b/system/src/Grav/Framework/Form/Interfaces/FormInterface.php
index <HASH>..<HASH> 100644
--- a/system/src/Grav/Framework/Form/Interfaces/FormInterface.php
+++ b/system/src/Grav/Framework/Form/Interfaces/FormInterface.php
@@ -18,7 +18,7 @@ use Psr\Http\Message\UploadedFileInterface;
* Interface FormInterface
* @package Grav\Framework\Form
*/
-interface FormInterface
+interface FormInterface extends \Serializable
{
/**
* Get HTML id="..." attribute.
|
Regression: Fix serialize issues with forms
|
getgrav_grav
|
train
|
php
|
ac4a082d6a35fa62861299275a55d13bac632153
|
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -23,6 +23,7 @@ setup(
version=version,
description="Python bindings for the docker credentials store API",
url='https://github.com/shin-/docker-pycreds/',
+ license='Apache License 2.0',
packages=[
'dockerpycreds',
],
|
Update setup.py
add missing license to setup.py
|
shin-_dockerpy-creds
|
train
|
py
|
2a2375f787d70ff094a5ef42bfc5e9720fc719c0
|
diff --git a/session.go b/session.go
index <HASH>..<HASH> 100644
--- a/session.go
+++ b/session.go
@@ -775,6 +775,7 @@ func (s *session) scheduleSending() {
func (s *session) tryQueueingUndecryptablePacket(p *receivedPacket) {
if s.handshakeComplete {
+ utils.Debugf("Received undecryptable packet from %s after the handshake: %#v, %d bytes data", p.remoteAddr.String(), p.publicHeader, len(p.data))
return
}
if len(s.undecryptablePackets)+1 > protocol.MaxUndecryptablePackets {
diff --git a/session_test.go b/session_test.go
index <HASH>..<HASH> 100644
--- a/session_test.go
+++ b/session_test.go
@@ -1290,7 +1290,11 @@ var _ = Describe("Session", func() {
hdr := &PublicHeader{
PacketNumber: protocol.PacketNumber(i + 1),
}
- sess.handlePacket(&receivedPacket{publicHeader: hdr, data: []byte("foobar")})
+ sess.handlePacket(&receivedPacket{
+ publicHeader: hdr,
+ remoteAddr: &net.UDPAddr{IP: net.IPv4(127, 0, 0, 1), Port: 1234},
+ data: []byte("foobar"),
+ })
}
}
|
log undecrytable packets after the handshake
|
lucas-clemente_quic-go
|
train
|
go,go
|
1e4abe1340034efa3feac25ef6584bc3f975a0f6
|
diff --git a/db/migrate/20150605151945_create_pd_regime_bags.rb b/db/migrate/20150605151945_create_pd_regime_bags.rb
index <HASH>..<HASH> 100644
--- a/db/migrate/20150605151945_create_pd_regime_bags.rb
+++ b/db/migrate/20150605151945_create_pd_regime_bags.rb
@@ -2,8 +2,8 @@ class CreatePDRegimeBags < ActiveRecord::Migration
def change
create_table :pd_regime_bags do |t|
t.integer :pd_regime_id
- t.integer :bag_type_id
- t.integer :volume
+ t.integer :bag_type_id, null: false
+ t.integer :volume, null: false
t.integer :per_week
t.boolean :monday
t.boolean :tuesday
|
Added null: false to pd_regime_bags migration required fields.
|
airslie_renalware-core
|
train
|
rb
|
627476edc4d5336f92b484cd10d45a818b317698
|
diff --git a/lib/aerospike/query/filter.rb b/lib/aerospike/query/filter.rb
index <HASH>..<HASH> 100644
--- a/lib/aerospike/query/filter.rb
+++ b/lib/aerospike/query/filter.rb
@@ -53,6 +53,14 @@ module Aerospike
offset
end
+ #
+ # Show the filter as String. This is util to show filters in logs.
+ #
+ def to_s
+ return "#{@name} = #{@begin}" if @begin == @end
+ "#{@name} = #{@begin} - #{@end}"
+ end
+
private
def initialize(bin_name, begin_value, end_value)
|
Added to_s method to filters to display it in a log
|
aerospike_aerospike-client-ruby
|
train
|
rb
|
0e8b4e1170c7da6c83949cd6d495c288c3af1089
|
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
@@ -336,7 +336,7 @@ module ActionDispatch
end
path = request_encoder.append_format_to location.path
path = location.query ? "#{path}?#{location.query}" : path
- elsif !as.nil?
+ elsif as
location = URI.parse(path)
path = request_encoder.append_format_to location.path
path = location.query ? "#{path}?#{location.query}" : path
|
Simplify `as` passed check.
`if !var.nil?` is the same as just `if var`
|
rails_rails
|
train
|
rb
|
027297292a25957ed4ec06e3bfa743e678164b87
|
diff --git a/lib/chef/application/apply.rb b/lib/chef/application/apply.rb
index <HASH>..<HASH> 100644
--- a/lib/chef/application/apply.rb
+++ b/lib/chef/application/apply.rb
@@ -21,6 +21,7 @@ require_relative "../../chef"
require_relative "../application"
require_relative "../client"
require_relative "../config"
+require_relative "../config_fetcher"
require_relative "../log"
require "fileutils" unless defined?(FileUtils)
require "tempfile" unless defined?(Tempfile)
|
Fixed broken chef-apply with -j
that causes a `NameError: uninitialized constant Chef::ConfigFetcher`.
|
chef_chef
|
train
|
rb
|
c78d71d2219d6236d889695865331c41a95ac122
|
diff --git a/packages/neos-ui-ckeditor5-bindings/src/ckEditorApi.js b/packages/neos-ui-ckeditor5-bindings/src/ckEditorApi.js
index <HASH>..<HASH> 100644
--- a/packages/neos-ui-ckeditor5-bindings/src/ckEditorApi.js
+++ b/packages/neos-ui-ckeditor5-bindings/src/ckEditorApi.js
@@ -3,6 +3,11 @@ import DecoupledEditor from '@ckeditor/ckeditor5-editor-decoupled/src/decouplede
// We remove opening and closing span tags that are produced by the inlineMode plugin
const cleanupContentBeforeCommit = content => {
+ // TODO: remove when this is fixed: https://github.com/ckeditor/ckeditor5/issues/401
+ if (content.match(/<([a-z][a-z0-9]*)\b[^>]*> <\/\1>/)) {
+ return '';
+ }
+
if (content.match(/^<span>/) && content.match(/<\/span>$/)) {
return content
.replace(/^<span>/, '')
|
BUGFIX: prevent on empty content from CKE5
|
neos_neos-ui
|
train
|
js
|
9c1dd0594a74e6ae7e81fd0dc49757e2699aa832
|
diff --git a/lib/dpl/provider/modulus.rb b/lib/dpl/provider/modulus.rb
index <HASH>..<HASH> 100644
--- a/lib/dpl/provider/modulus.rb
+++ b/lib/dpl/provider/modulus.rb
@@ -16,7 +16,7 @@ module DPL
end
def push_app
- context.shell "MODULUS_TOKEN=#{option(:api_key)} modulus deploy -p #{option(:project_name)}"
+ context.shell "env MODULUS_TOKEN=#{option(:api_key)} modulus deploy -p #{option(:project_name)}"
end
end
end
diff --git a/spec/provider/modulus_spec.rb b/spec/provider/modulus_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/provider/modulus_spec.rb
+++ b/spec/provider/modulus_spec.rb
@@ -22,7 +22,7 @@ describe DPL::Provider::Modulus do
describe "#push_app" do
it 'should include the api key and project name specified' do
- expect(provider.context).to receive(:shell).with("MODULUS_TOKEN=test-token modulus deploy -p test-project")
+ expect(provider.context).to receive(:shell).with("env MODULUS_TOKEN=test-token modulus deploy -p test-project")
provider.push_app
end
end
|
Fixes #<I> Modulus deploys failing without error
The command was not setting the ENV variable for MODULUS_TOKEN and was
failing with an exit status of <I>.
|
travis-ci_dpl
|
train
|
rb,rb
|
1dcedc53348f4d0d3e08a7affe275d01e70d4410
|
diff --git a/lib/rack/test.rb b/lib/rack/test.rb
index <HASH>..<HASH> 100644
--- a/lib/rack/test.rb
+++ b/lib/rack/test.rb
@@ -27,6 +27,8 @@ module Rack
end
def request(uri, env = {})
+ env["REQUEST_METHOD"] ||= "GET"
+
@last_request = Rack::Request.new(env)
@last_response = Rack::Response.new(@app.call(env))
diff --git a/spec/test_spec.rb b/spec/test_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/test_spec.rb
+++ b/spec/test_spec.rb
@@ -14,8 +14,9 @@ describe Rack::Test::Session do
end
describe "#request" do
- it "requests the URI" do
+ it "requests the URI using GET by default" do
@session.request "/"
+ request.should be_get
response.should be_ok
end
|
Make #request use GET by default
|
rack-test_rack-test
|
train
|
rb,rb
|
cc32fe60649e4b6469b5c7cbb24716fb789e1f38
|
diff --git a/test/test_messaging.py b/test/test_messaging.py
index <HASH>..<HASH> 100644
--- a/test/test_messaging.py
+++ b/test/test_messaging.py
@@ -5,6 +5,7 @@ from kombu import Exchange, Queue
from mock import patch, Mock
from nameko.dependencies import DependencyFactory
+from nameko.exceptions import ContainerBeingKilled
from nameko.messaging import (
PublishProvider, ConsumeProvider, HeaderEncoder, HeaderDecoder)
from nameko.containers import (
@@ -101,6 +102,14 @@ def test_consume_provider(empty_config):
assert not queue_consumer.ack_message.called
queue_consumer.requeue_message.assert_called_once_with(message)
+ # test requeueing on ContainerBeingKilled (even without requeue_on_error)
+ queue_consumer.reset_mock()
+ consume_provider.requeue_on_error = False
+ spawn_worker.side_effect = ContainerBeingKilled()
+ consume_provider.handle_message("body", message)
+ assert not queue_consumer.ack_message.called
+ queue_consumer.requeue_message.assert_called_once_with(message)
+
@pytest.mark.usefixtures("predictable_call_ids")
def test_publish_to_exchange(empty_config, maybe_declare, patch_publisher):
|
test for requeue on ContainerBeingKilled
|
nameko_nameko
|
train
|
py
|
3434c7da6d73a0930eff321f7477795e0cd2a615
|
diff --git a/broker.go b/broker.go
index <HASH>..<HASH> 100644
--- a/broker.go
+++ b/broker.go
@@ -9,8 +9,8 @@ type ServiceCreationRequest struct {
SpaceGUID string `json:"space_guid"`
}
-// ServiceCreationResponce describes Cloud Foundry service provisioning response
-type ServiceCreationResponce struct {
+// ServiceCreationResponse describes Cloud Foundry service provisioning response
+type ServiceCreationResponse struct {
DashboardURL string `json:"dashboard_url"`
}
diff --git a/provider.go b/provider.go
index <HASH>..<HASH> 100644
--- a/provider.go
+++ b/provider.go
@@ -7,7 +7,7 @@ type ServiceProvider interface {
GetCatalog() (*Catalog, *ServiceProviderError)
// CreateService creates a service instance for specific plan
- CreateService(r *ServiceCreationRequest) (*ServiceCreationResponce, *ServiceProviderError)
+ CreateService(r *ServiceCreationRequest) (*ServiceCreationResponse, *ServiceProviderError)
// DeleteService deletes previously created service instance
DeleteService(instanceID string) *ServiceProviderError
|
fix Responce -> Response spelling
|
cloudfoundry-community_types-cf
|
train
|
go,go
|
94caeeab12dea219f7b69cd9e97a15bba0a757e7
|
diff --git a/examples/export-map.js b/examples/export-map.js
index <HASH>..<HASH> 100644
--- a/examples/export-map.js
+++ b/examples/export-map.js
@@ -64,13 +64,6 @@ document.getElementById('export-png').addEventListener('click', function () {
const opacity =
canvas.parentNode.style.opacity || canvas.style.opacity;
mapContext.globalAlpha = opacity === '' ? 1 : Number(opacity);
-
- const backgroundColor = canvas.parentNode.style.backgroundColor;
- if (backgroundColor) {
- mapContext.fillStyle = backgroundColor;
- mapContext.fillRect(0, 0, canvas.width, canvas.height);
- }
-
let matrix;
const transform = canvas.style.transform;
if (transform) {
@@ -94,11 +87,17 @@ document.getElementById('export-png').addEventListener('click', function () {
mapContext,
matrix
);
+ const backgroundColor = canvas.parentNode.style.backgroundColor;
+ if (backgroundColor) {
+ mapContext.fillStyle = backgroundColor;
+ mapContext.fillRect(0, 0, canvas.width, canvas.height);
+ }
mapContext.drawImage(canvas, 0, 0);
}
}
);
mapContext.globalAlpha = 1;
+ mapContext.setTransform(1, 0, 0, 1, 0, 0);
const link = document.getElementById('image-download');
link.href = mapCanvas.toDataURL();
link.click();
|
Set background after applying transform
Reset transform in addition to globalAlpha
|
openlayers_openlayers
|
train
|
js
|
eac45c4a4c745cce296872e869e9d6fe2c25ec51
|
diff --git a/lib/milia/control.rb b/lib/milia/control.rb
index <HASH>..<HASH> 100644
--- a/lib/milia/control.rb
+++ b/lib/milia/control.rb
@@ -26,7 +26,7 @@ module Milia
old_id = ( Thread.current[:tenant_id].nil? ? '%' : Thread.current[:tenant_id] )
new_id = ( tid.nil? ? '%' : tid.to_s )
Thread.current[:tenant_id] = tid
- logger.debug("MILIA >>>>> [change tenant] new: #{new_id}\told:#{old_id}") unless logger.nil?
+ logger.debug("MILIA >>>>> [change tenant] new: #{new_id}\told: #{old_id}") unless logger.nil?
end
# ------------------------------------------------------------------------------
|
improved logging/traces - 4
|
jekuno_milia
|
train
|
rb
|
9a7bf996a7a01ab0e75ffc30920b14a471ceb52d
|
diff --git a/python/setup.py b/python/setup.py
index <HASH>..<HASH> 100755
--- a/python/setup.py
+++ b/python/setup.py
@@ -58,7 +58,7 @@ def read_release_version():
MAJOR, MINOR, PATCH = read_release_version()
-IS_RELEASED = True
+IS_RELEASED = False
VERSION = '%d.%d.%d' % (MAJOR, MINOR, PATCH)
|
Unset IS_RELEASED
|
swift-nav_libsbp
|
train
|
py
|
129d26aac4e26f3cf47c877468fff6d9e1bd64f4
|
diff --git a/mod/assign/locallib.php b/mod/assign/locallib.php
index <HASH>..<HASH> 100644
--- a/mod/assign/locallib.php
+++ b/mod/assign/locallib.php
@@ -5493,6 +5493,7 @@ class assign {
$adminconfig = $this->get_admin_config();
$gradebookplugin = $adminconfig->feedback_plugin_for_gradebook;
+ $gradebookplugin = str_replace('assignfeedback_', '', $gradebookplugin);
$grades = $DB->get_records('assign_grades', array('assignment'=>$this->get_instance()->id));
$plugin = $this->get_feedback_plugin_by_type($gradebookplugin);
|
MDL-<I> assign: Workflow & blind marking do not always show feedback
Before this patch if an assignment has workflow and blind marking enabled if a teacher
sets a submission to have its grades released to students before they reveal student
identities the feedback they have given is not displayed to the student.
The patch causes the reveal_identities() method to pass the correct value to the
get_feedback_plugin_by_type() function in the assign class.
|
moodle_moodle
|
train
|
php
|
698635e71d6f50fe28c72c700619456a015dee94
|
diff --git a/src/Services/User.php b/src/Services/User.php
index <HASH>..<HASH> 100644
--- a/src/Services/User.php
+++ b/src/Services/User.php
@@ -97,14 +97,6 @@ class User extends BaseRestService
/**
* {@inheritdoc}
*/
- public function getResources($only_handlers = false)
- {
- return ($only_handlers) ? static::$resources : array_values(static::$resources);
- }
-
- /**
- * {@inheritdoc}
- */
public function getAccessList()
{
$list = parent::getAccessList();
|
Separating resources from resource handlers.
|
dreamfactorysoftware_df-user
|
train
|
php
|
af11bd5006a0070f2bfcdfac50fb1dcc13f1bbca
|
diff --git a/openquake/calculators/hazard/disagg/core.py b/openquake/calculators/hazard/disagg/core.py
index <HASH>..<HASH> 100644
--- a/openquake/calculators/hazard/disagg/core.py
+++ b/openquake/calculators/hazard/disagg/core.py
@@ -92,7 +92,7 @@ def compute_disagg(job_id, sites, lt_rlz_id):
for more info).
:param int job_id:
- pass
+ ID of the currently running :class:`openquake.db.models.OqJob`
:param list sites:
`list` of :class:`nhlib.site.Site` objects, which indicate the
locations (and associated soil parameters) for which we need to compute
|
calcs/hazard/disagg/core:
Fixed a stupid comment.
|
gem_oq-engine
|
train
|
py
|
9ca98b54a407b80f61a900696902a4aa95cfc267
|
diff --git a/activerecord/lib/active_record/base.rb b/activerecord/lib/active_record/base.rb
index <HASH>..<HASH> 100644
--- a/activerecord/lib/active_record/base.rb
+++ b/activerecord/lib/active_record/base.rb
@@ -233,6 +233,15 @@ module ActiveRecord #:nodoc:
# the companies table with type = "Firm". You can then fetch this row again using
# <tt>Company.where(name: '37signals').first</tt> and it will return a Firm object.
#
+ # Be aware that because the type column is an attribute on the record every new
+ # subclass will instantly be marked as dirty and the type column will be included
+ # in the list of changed attributes on the record. This is different from non
+ # STI classes:
+ #
+ # Company.new.changed? # => false
+ # Firm.new.changed? # => true
+ # Firm.new.changes # => {"type"=>["","Firm"]}
+ #
# If you don't have a type column defined in your table, single-table inheritance won't
# be triggered. In that case, it'll work just like normal subclasses with no special magic
# for differentiating between them or reloading the right type with find.
|
Update documentation on STI change handling
Documenting a potential source of confusion about how STI classes handle changes.
|
rails_rails
|
train
|
rb
|
def85acdd8e8f5fe92b89705605d5387665d1f04
|
diff --git a/ghost/admin/mobile-interactions.js b/ghost/admin/mobile-interactions.js
index <HASH>..<HASH> 100644
--- a/ghost/admin/mobile-interactions.js
+++ b/ghost/admin/mobile-interactions.js
@@ -1,6 +1,6 @@
// # Ghost Mobile Interactions
-/*global window, document, $ */
+/*global window, document, $, FastClick */
(function () {
"use strict";
|
Added FastClick to assumed globals for tests
|
TryGhost_Ghost
|
train
|
js
|
662384d607429a82abc409b4a475a71b52c6b486
|
diff --git a/accounts/models.py b/accounts/models.py
index <HASH>..<HASH> 100644
--- a/accounts/models.py
+++ b/accounts/models.py
@@ -6,7 +6,18 @@ from django.utils.translation import ugettext_lazy as _
from accounts.managers import AccountManager
-class Account(models.Model):
+class AccountsBase(models.Model):
+ """
+ Just a little helper
+ """
+ created = models.DateTimeField(auto_now_add=True)
+ modified = models.DateTimeField(auto_now=True)
+
+ class Meta:
+ abstract = True
+
+
+class Account(AccountsBase):
"""
This is the umbrella object under which all account users fall.
@@ -42,7 +53,7 @@ class Account(models.Model):
return True if self.objects.users.filter(user=user) else False
-class AccountUser(models.Model):
+class AccountUser(AccountsBase):
"""
This relates a User object to the account group. It is possible for a User
to be a member of multiple accounts, so this class relates the AccountUser
@@ -87,8 +98,7 @@ class AccountUser(models.Model):
return u"%s %s" % (self.user.first_name, self.user.last_name)
-
-class AccountOwner(models.Model):
+class AccountOwner(AccountsBase):
"""
Each account must have one and only one account owner.
"""
@@ -111,4 +121,3 @@ class AccountOwner(models.Model):
raise AccountMismatch
else:
super(AccountOwner, self).save(*args, **kwargs)
-
|
Use a baseform with created/modified tracking
|
bennylope_django-organizations
|
train
|
py
|
851a82f09ff27cb93e3620e62c6b2e1bb69be8de
|
diff --git a/src/Deployer/Recipe/Magento2Recipe.php b/src/Deployer/Recipe/Magento2Recipe.php
index <HASH>..<HASH> 100644
--- a/src/Deployer/Recipe/Magento2Recipe.php
+++ b/src/Deployer/Recipe/Magento2Recipe.php
@@ -21,6 +21,10 @@ class Magento2Recipe
{
public static function configuration()
{
+ $appDir = '';
+
+ \Deployer\set('app_dir', $appDir);
+
$sharedFiles = [
'app/etc/env.php',
];
|
[TASK] set app_dir to empty in Magento2Recipe
|
netz98_n98-deployer
|
train
|
php
|
7973054aaf9baf8834515cdd0ea0522b10fe7193
|
diff --git a/src/Utils/Formatter.php b/src/Utils/Formatter.php
index <HASH>..<HASH> 100644
--- a/src/Utils/Formatter.php
+++ b/src/Utils/Formatter.php
@@ -340,6 +340,10 @@ class Formatter
$curr = $list->tokens[$list->idx];
if ($curr->type === Token::TYPE_WHITESPACE) {
+ // Keep linebreaks after comments
+ if (strpos($curr->token, "\n") !== false && $prev !== null && $prev->type === Token::TYPE_COMMENT) {
+ $lineEnded = true;
+ }
// Whitespaces are skipped because the formatter adds its own.
continue;
}
|
Keep linebreaks after comments
Concatenating line terminated comments will change the query.
|
phpmyadmin_sql-parser
|
train
|
php
|
d87acc2d1bd11255e7b883fb561a45fb82ccd6d8
|
diff --git a/cmd/tendermint/commands/root.go b/cmd/tendermint/commands/root.go
index <HASH>..<HASH> 100644
--- a/cmd/tendermint/commands/root.go
+++ b/cmd/tendermint/commands/root.go
@@ -38,6 +38,9 @@ var RootCmd = &cobra.Command{
Use: "tendermint",
Short: "Tendermint Core (BFT Consensus) in Go",
PersistentPreRunE: func(cmd *cobra.Command, args []string) (err error) {
+ if cmd.Name() == versionCmd.Name() {
+ return nil
+ }
config, err = ParseConfig()
if err != nil {
return err
|
cmd: don't load config for version command. closes #<I>
|
tendermint_tendermint
|
train
|
go
|
8ae73e374dfaf30e01375aa9abac0e7e75bd8351
|
diff --git a/app/controllers/mr_video/mr_video_controller.rb b/app/controllers/mr_video/mr_video_controller.rb
index <HASH>..<HASH> 100644
--- a/app/controllers/mr_video/mr_video_controller.rb
+++ b/app/controllers/mr_video/mr_video_controller.rb
@@ -1,6 +1,6 @@
module MrVideo
- class MrVideoController < ApplicationController
+ class MrVideoController < ActionController::Base
layout 'mr_video'
|
Changed ApplicationController to ActionController::Base
|
quidproquo_mr_video
|
train
|
rb
|
40e3ce118ec8896c352bc593e87be5015194069a
|
diff --git a/cli.js b/cli.js
index <HASH>..<HASH> 100755
--- a/cli.js
+++ b/cli.js
@@ -52,10 +52,16 @@ function runFastify (opts) {
return module.exports.stop(e)
}
- if (file.length !== 3) {
+ console.log(file.constructor.name)
+
+ if (file.length !== 3 && file.constructor.name === 'Function') {
return module.exports.stop(new Error('Plugin function should contain 3 arguments. Refer to ' +
'documentation for more information.'))
}
+ if (file.length !== 2 && file.constructor.name === 'AsyncFunction') {
+ return module.exports.stop(new Error('Async/Await plugin function should contain 2 arguments.' +
+ 'Refer to documentation for more information.'))
+ }
const options = {
logger: {
|
Rewrote the arity check upon the plugin signature to support async/await plugins
|
fastify_fastify-cli
|
train
|
js
|
361d663d7d99b02186c3b47bf144f55c7080198f
|
diff --git a/sos/policies/__init__.py b/sos/policies/__init__.py
index <HASH>..<HASH> 100644
--- a/sos/policies/__init__.py
+++ b/sos/policies/__init__.py
@@ -55,7 +55,6 @@ class PackageManager(object):
"""
query_command = None
- timeout = 30
chroot = None
def __init__(self, query_command=None, chroot=None):
@@ -99,7 +98,7 @@ class PackageManager(object):
if self.query_command:
cmd = self.query_command
pkg_list = shell_out(
- cmd, timeout=self.timeout, chroot=self.chroot
+ cmd, timeout=0, chroot=self.chroot
).splitlines()
for pkg in pkg_list:
|
[policies] get package list without a timeout
Package list shall never timeout, otherwise pkgs gets empty, causing
KeyError later on.
Resolves: #<I>
|
sosreport_sos
|
train
|
py
|
8da8e7a5f2dc582d36a7f87a4da1a7d5c6300688
|
diff --git a/lib/client.js b/lib/client.js
index <HASH>..<HASH> 100644
--- a/lib/client.js
+++ b/lib/client.js
@@ -36,7 +36,7 @@ var Client = function (options) {
this.exceptionsAreCritical = 'exceptionsAreCritical' in options ? !!options.exceptionsAreCritical : true;
this.dsn = {
protocol: 'https', // Opbeat currently only supports HTTPS. Future options might include HTTP and UDP
- host: 'opbeat.com',
+ host: options.server || 'opbeat.com',
path: '/api/v1/organizations/' + this.organization_id + '/apps/' + this.app_id + '/errors/'
};
|
Allow override of remote Opbeat host.
Useful for testing against other environments (e.g. staging etc)
|
opbeat_opbeat-node
|
train
|
js
|
ba826a40b92a03e26d03b497a0cc01ab24c886a0
|
diff --git a/guava/src/com/google/common/net/MediaType.java b/guava/src/com/google/common/net/MediaType.java
index <HASH>..<HASH> 100644
--- a/guava/src/com/google/common/net/MediaType.java
+++ b/guava/src/com/google/common/net/MediaType.java
@@ -182,6 +182,7 @@ public final class MediaType {
public static final MediaType BZIP2 = createConstant(APPLICATION_TYPE, "x-bzip2");
public static final MediaType FORM_DATA = createConstant(APPLICATION_TYPE,
"x-www-form-urlencoded");
+ public static final MediaType APPLICATION_BINARY = createConstant(APPLICATION_TYPE, "binary");
public static final MediaType GZIP = createConstant(APPLICATION_TYPE, "x-gzip");
/**
* <a href="http://www.rfc-editor.org/rfc/rfc4329.txt">RFC 4329</a> declares this to be the
@@ -278,6 +279,7 @@ public final class MediaType {
.put(ATOM_UTF_8, ATOM_UTF_8)
.put(BZIP2, BZIP2)
.put(FORM_DATA, FORM_DATA)
+ .put(APPLICATION_BINARY, APPLICATION_BINARY)
.put(GZIP, GZIP)
.put(JAVASCRIPT_UTF_8, JAVASCRIPT_UTF_8)
.put(JSON_UTF_8, JSON_UTF_8)
|
Add "application/binary" media type.
-------------
Created by MOE: <URL>
|
google_guava
|
train
|
java
|
76b8516ab8461f32615a8403ec1f39a763101be7
|
diff --git a/resize2.js b/resize2.js
index <HASH>..<HASH> 100644
--- a/resize2.js
+++ b/resize2.js
@@ -37,8 +37,8 @@ module.exports = {
for (let j = 0; j < wDst; j++) {
var posDst = (i * wDst + j) * 4;
- var iSrc = Math.round(i * hSrc / hDst);
- var jSrc = Math.round(j * wSrc / wDst);
+ var iSrc = Math.floor(i * hSrc / hDst);
+ var jSrc = Math.floor(j * wSrc / wDst);
var posSrc = (iSrc * wSrc + jSrc) * 4;
bufDst[posDst++] = bufSrc[posSrc++];
|
Fix a small rounding error in Nearest Neighbor algorithm
|
oliver-moran_jimp
|
train
|
js
|
0b7e32de0ce6da4cbc4b140cecb29fe315d73f05
|
diff --git a/app/js/directives/form.js b/app/js/directives/form.js
index <HASH>..<HASH> 100644
--- a/app/js/directives/form.js
+++ b/app/js/directives/form.js
@@ -174,7 +174,7 @@ formsAngular
if (angular.isArray(fieldInfo.options)) {
angular.forEach(fieldInfo.options, function (optValue) {
if(_.isObject(optValue)){
- value += '<option value="'+optValue.val+'">' + optValue.lable + '</option>';
+ value += '<option value="'+optValue.val || optValue.id+'">' + optValue.lable || optValue.text + '</option>';
}else{
value += '<option>' + optValue + '</option>';
}
|
select supports object with val and lable
|
forms-angular_forms-angular
|
train
|
js
|
62941a17cc94a88e80d5703a09e153b4841a24eb
|
diff --git a/src/DataTables/AbstractDataTable.php b/src/DataTables/AbstractDataTable.php
index <HASH>..<HASH> 100644
--- a/src/DataTables/AbstractDataTable.php
+++ b/src/DataTables/AbstractDataTable.php
@@ -67,8 +67,8 @@ abstract class AbstractDataTable extends DataTable
*/
public function __construct()
{
- $this->options = array_merge(config('cortex.foundation.datatables.options'), (array) $this->options);
- $this->buttons = array_merge(config('cortex.foundation.datatables.buttons'), (array) $this->buttons);
+ $this->options = array_merge(config('cortex.foundation.datatables.options'), (array) $this->options);
+ $this->buttons = array_merge(config('cortex.foundation.datatables.buttons'), (array) $this->buttons);
}
/**
|
Apply fixes from StyleCI (#<I>)
|
rinvex_cortex-foundation
|
train
|
php
|
0a840897945a725db2d5c0d09878e1472191a1f8
|
diff --git a/app/assets/javascripts/streamrules.js b/app/assets/javascripts/streamrules.js
index <HASH>..<HASH> 100644
--- a/app/assets/javascripts/streamrules.js
+++ b/app/assets/javascripts/streamrules.js
@@ -13,11 +13,9 @@ $(document).ready(function() {
if ($(this).attr("id") == "sr-type") {
if (parseInt(value) == 5) {
$("#sr-value", modalBody).hide();
- $("#sr-value", modalBody).val("placeholder");
$("#sr-label-value", modalBody).hide();
$("#sr-result-value", modalBody).hide();
} else {
- $("#sr-value", modalBody).val("");
$("#sr-value", modalBody).show();
$("#sr-label-value", modalBody).show();
$("#sr-result-value", modalBody).show();
|
Fixing special handling of presence type in the model instead of darn JS
Fixes #<I>
Conflicts:
app/models/StreamRule.java
|
Graylog2_graylog2-server
|
train
|
js
|
f9e9a8f3d6cc6d7833400f3251408c5c9ca13127
|
diff --git a/library/src/main/java/com/doctoror/particlesdrawable/renderer/GlSceneRenderer.java b/library/src/main/java/com/doctoror/particlesdrawable/renderer/GlSceneRenderer.java
index <HASH>..<HASH> 100644
--- a/library/src/main/java/com/doctoror/particlesdrawable/renderer/GlSceneRenderer.java
+++ b/library/src/main/java/com/doctoror/particlesdrawable/renderer/GlSceneRenderer.java
@@ -204,7 +204,6 @@ public final class GlSceneRenderer implements SceneRenderer {
@Override
public void drawScene(
@NonNull final ParticlesScene scene) {
- gl.glPointSize(scene.getMaxDotRadius() * 2f);
gl.glLineWidth(scene.getLineThickness());
initBuffers(scene.getParticlesCount());
|
Do not set glPointSize
|
Doctoror_ParticlesDrawable
|
train
|
java
|
e1d4d5eb6d7238eef00e274e9ce193134300a54a
|
diff --git a/phy/cluster/manual/gui_component.py b/phy/cluster/manual/gui_component.py
index <HASH>..<HASH> 100644
--- a/phy/cluster/manual/gui_component.py
+++ b/phy/cluster/manual/gui_component.py
@@ -398,7 +398,6 @@ class ManualClustering(object):
# Add the cluster views.
gui.add_view(self.cluster_view, name='ClusterView')
- gui.add_view(self.similarity_view, name='SimilarityView')
# Add the quality column in the cluster view.
cs = gui.request('cluster_store')
@@ -411,6 +410,7 @@ class ManualClustering(object):
self.set_default_sort(quality)
if similarity:
self.set_similarity_func(cs.get(similarity))
+ gui.add_view(self.similarity_view, name='SimilarityView')
# Update the cluster views and selection when a cluster event occurs.
self.gui.connect_(self.on_cluster)
|
Remove similarity view if there is no similarity function
|
kwikteam_phy
|
train
|
py
|
489498e32745abac62a2c1579dab27ffe7820b5c
|
diff --git a/lib/deterministic/result.rb b/lib/deterministic/result.rb
index <HASH>..<HASH> 100644
--- a/lib/deterministic/result.rb
+++ b/lib/deterministic/result.rb
@@ -90,8 +90,8 @@ module Deterministic
def +(other)
raise Deterministic::Monad::NotMonadError, "Expected #{other.inspect} to be an Result" unless other.is_a? Result
match {
- success -> (_) { other.success? } { |s| Result::Success.new(s + other.value)}
- failure -> (_) { other.failure? } { |f| Result::Failure.new(f + other.value)}
+ success ->(_) { other.success? } { |s| Result::Success.new(s + other.value)}
+ failure ->(_) { other.failure? } { |f| Result::Failure.new(f + other.value)}
success { other } # implied other.failure?
failure { self } # implied other.success?
}
|
Remove space in lambda expression revert support for ruby <I>
|
pzol_deterministic
|
train
|
rb
|
1bcae2f53339fd13165e0ec9d4cd7d25f37924dc
|
diff --git a/johnny/cache.py b/johnny/cache.py
index <HASH>..<HASH> 100644
--- a/johnny/cache.py
+++ b/johnny/cache.py
@@ -19,6 +19,14 @@ import localstore
import signals
from transaction import TransactionManager
+try:
+ any
+except NameError:
+ def any(iterable):
+ for i in iterable:
+ if i: return True
+ return False
+
local = localstore.LocalStore()
blacklist = getattr(settings, 'MAN_IN_BLACKLIST',
getattr(settings, 'JOHNNY_TABLE_BLACKLIST', []))
diff --git a/johnny/tests/cache.py b/johnny/tests/cache.py
index <HASH>..<HASH> 100644
--- a/johnny/tests/cache.py
+++ b/johnny/tests/cache.py
@@ -8,6 +8,14 @@ from django.db import connection
from johnny import middleware
import base
+try:
+ any
+except NameError:
+ def any(iterable):
+ for i in iterable:
+ if i: return True
+ return False
+
# put tests in here to be included in the testing suite
__all__ = ['MultiDbTest', 'SingleModelTest', 'MultiModelTest', 'TransactionSupportTest', 'BlackListTest']
|
#<I> fix python<I> compatibility by providing an implementation of <I> builtin 'any'
|
jmoiron_johnny-cache
|
train
|
py,py
|
279a58e5023753b83406a6f8eeda05878ae7688f
|
diff --git a/txn.go b/txn.go
index <HASH>..<HASH> 100644
--- a/txn.go
+++ b/txn.go
@@ -70,11 +70,12 @@ func (txn *Txn) writableIndex(table, index string) *iradix.Txn {
raw, _ := txn.rootTxn.Get(path)
indexTxn := raw.(*iradix.Tree).Txn()
- // If we are the primary DB, enable mutation notification
+ // If we are the primary DB, enable mutation tracking.
// Snapshots should not notify, otherwise we will trigger watches
// on the primary DB when the writes will not be visible.
if txn.db.primary {
- indexTxn.NotifyMutate(true)
+ indexTxn.TrackMutate(true)
+ txn.Defer(indexTxn.Notify)
}
// Keep this open for the duration of the txn
|
Defer notification of mutate until after transaction is complete
|
hashicorp_go-memdb
|
train
|
go
|
3748e1a02ecbb6e8ece20eb6f591dc4c74476f87
|
diff --git a/pkg/network/node/networkpolicy.go b/pkg/network/node/networkpolicy.go
index <HASH>..<HASH> 100644
--- a/pkg/network/node/networkpolicy.go
+++ b/pkg/network/node/networkpolicy.go
@@ -186,7 +186,15 @@ func (np *networkPolicyPlugin) DeleteNetNamespace(netns *networkapi.NetNamespace
np.lock.Lock()
defer np.lock.Unlock()
- delete(np.namespaces, netns.NetID)
+ if npns, exists := np.namespaces[netns.NetID]; exists {
+ if npns.inUse {
+ npns.inUse = false
+ // We call syncNamespaceFlows() not syncNamespace() because it
+ // needs to happen before we forget about the namespace.
+ np.syncNamespaceFlows(npns)
+ }
+ delete(np.namespaces, netns.NetID)
+ }
}
func (np *networkPolicyPlugin) GetVNID(namespace string) (uint32, error) {
|
Clean up NetworkPolicies on NetNamespace deletion
|
openshift_origin
|
train
|
go
|
67f7889078c85df2597795e2491873dd4d6395fd
|
diff --git a/lib/model/generic_folder.rb b/lib/model/generic_folder.rb
index <HASH>..<HASH> 100644
--- a/lib/model/generic_folder.rb
+++ b/lib/model/generic_folder.rb
@@ -70,7 +70,7 @@ module Viewpoint
resp = (Viewpoint::EWS::EWS.instance).ews.find_folder( [normalize_id(root)], traversal, {:base_shape => shape} )
else
restr = {:restriction =>
- {:is_equal_to => {:field_uRI => {:field_uRI=>'folder:FolderClass'},:field_uRI_or_constant=>{:constant => {:value => folder_type}}}}
+ {:is_equal_to => [{:field_uRI => {:field_uRI=>'folder:FolderClass'}}, {:field_uRI_or_constant=>{:constant => {:value => folder_type}}}]}
}
resp = (Viewpoint::EWS::EWS.instance).ews.find_folder( [normalize_id(root)], traversal, {:base_shape => shape}, restr)
end
|
issue <I>. GenericFolder.find_folders fix for Ruby <I>.x Hash ordering.
|
WinRb_Viewpoint
|
train
|
rb
|
f06b785b798c6e70c28415cc9fa07db197ac6264
|
diff --git a/classes/PHPTAL/Dom/PHP5DOMDocumentBuilder.php b/classes/PHPTAL/Dom/PHP5DOMDocumentBuilder.php
index <HASH>..<HASH> 100644
--- a/classes/PHPTAL/Dom/PHP5DOMDocumentBuilder.php
+++ b/classes/PHPTAL/Dom/PHP5DOMDocumentBuilder.php
@@ -224,7 +224,8 @@ class PHPTAL_Dom_PHP5DOMDocumentBuilder extends PHPTAL_Dom_DocumentBuilder
private function getQName(DOMElement $element)
{
- if ($element->prefix !== '') return $element->prefix.':'.$element->localName;
+ // PHP bug: DOMElement's namespace unexpectedly changed to 'default' from '' after appending to some namespaced parent. (5.3 only?)
+ if ($element->prefix !== '' && $element->prefix !== 'default') { return $element->prefix.':'.$element->localName; }
return $element->localName;
}
|
Avoiding PHP-DomElement's problem:
DOMElement's namespace unexpectedly changed to 'default' from '' after appending to some namespaced parent. (<I> only?)
|
phptal_PHPTAL
|
train
|
php
|
245262d99720f129da9149336871c1d1e7b580c4
|
diff --git a/parsedmarc/__init__.py b/parsedmarc/__init__.py
index <HASH>..<HASH> 100644
--- a/parsedmarc/__init__.py
+++ b/parsedmarc/__init__.py
@@ -792,8 +792,12 @@ def parse_forensic_report(feedback_report, sample, sample_headers_only,
else:
parsed_sample["reply_to"] = []
- parsed_sample["to"] = list(map(lambda x: convert_address(x),
- parsed_sample["to"]))
+ if "to" in parsed_sample:
+ parsed_sample["to"] = list(map(lambda x: convert_address(x),
+ parsed_sample["to"]))
+ else:
+ parsed_sample["to"] = []
+
if "cc" in parsed_sample:
parsed_sample["cc"] = list(map(lambda x: convert_address(x),
parsed_sample["cc"]))
|
<I> - Allow forensic to header to be missing
|
domainaware_parsedmarc
|
train
|
py
|
298cbabdaa1e9308f398b9af9af32b0c9fd7dce0
|
diff --git a/java/client/src/org/openqa/selenium/Beta.java b/java/client/src/org/openqa/selenium/Beta.java
index <HASH>..<HASH> 100644
--- a/java/client/src/org/openqa/selenium/Beta.java
+++ b/java/client/src/org/openqa/selenium/Beta.java
@@ -33,7 +33,7 @@ import java.lang.annotation.Target;
* IDE. We don't live in the ideal world. We'll find out the hard way whether
* reading docs is the same thing.
*/
-@Retention(RetentionPolicy.CLASS)
+@Retention(RetentionPolicy.RUNTIME)
@Target({
ElementType.ANNOTATION_TYPE,
ElementType.CONSTRUCTOR,
|
AjayKemparaj: Changing the RetentionPolicy so the build is not brohen, dawagner please take alook at this
r<I>
|
SeleniumHQ_selenium
|
train
|
java
|
e023e2dd4013985340471c3251b8a66ae0dc6738
|
diff --git a/cloudmesh/common/variables.py b/cloudmesh/common/variables.py
index <HASH>..<HASH> 100644
--- a/cloudmesh/common/variables.py
+++ b/cloudmesh/common/variables.py
@@ -21,7 +21,8 @@ class Variables(object):
self.data[str(key)] = value
def __delitem__(self, key):
- del self.data[str(key)]
+ if key in self.data:
+ del self.data[str(key)]
def __contains__(self, item):
return str(item) in self.data
|
ignor delete variable if it is not defined
|
cloudmesh_cloudmesh-common
|
train
|
py
|
e94ae9738c0974b259a84e1d8a3df3bfdcdce529
|
diff --git a/flask_peewee/tests/admin.py b/flask_peewee/tests/admin.py
index <HASH>..<HASH> 100644
--- a/flask_peewee/tests/admin.py
+++ b/flask_peewee/tests/admin.py
@@ -1,3 +1,5 @@
+from __future__ import with_statement
+
import datetime
from flask import request, session, url_for
diff --git a/flask_peewee/tests/auth.py b/flask_peewee/tests/auth.py
index <HASH>..<HASH> 100644
--- a/flask_peewee/tests/auth.py
+++ b/flask_peewee/tests/auth.py
@@ -1,3 +1,5 @@
+from __future__ import with_statement
+
import datetime
from flask import request, session, url_for, get_flashed_messages
diff --git a/flask_peewee/tests/rest.py b/flask_peewee/tests/rest.py
index <HASH>..<HASH> 100644
--- a/flask_peewee/tests/rest.py
+++ b/flask_peewee/tests/rest.py
@@ -1,3 +1,5 @@
+from __future__ import with_statement
+
try:
import simplejson as json
except ImportError:
|
Python <I> fixes for the test suite, which uses with statements
|
coleifer_flask-peewee
|
train
|
py,py,py
|
78efa24409cdb6537b667bcc47277cba3800cf23
|
diff --git a/lib/active_fulfillment.rb b/lib/active_fulfillment.rb
index <HASH>..<HASH> 100644
--- a/lib/active_fulfillment.rb
+++ b/lib/active_fulfillment.rb
@@ -36,7 +36,6 @@ end
require 'builder'
require 'cgi'
require 'net/https'
-require 'rexml/document'
require 'nokogiri'
require 'active_utils'
diff --git a/test/test_helper.rb b/test/test_helper.rb
index <HASH>..<HASH> 100644
--- a/test/test_helper.rb
+++ b/test/test_helper.rb
@@ -5,6 +5,7 @@ require 'active_fulfillment'
require 'minitest/autorun'
require 'mocha/setup'
require 'timecop'
+require 'rexml/document'
require 'logger'
ActiveFulfillment::Service.logger = Logger.new(nil)
|
Remove REXML Require from Runtime
|
Shopify_active_fulfillment
|
train
|
rb,rb
|
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.