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
|
|---|---|---|---|---|---|
ce21dad568c90874569d981cc7e09cdb71a00b89
|
diff --git a/lib/dbf/column/base.rb b/lib/dbf/column/base.rb
index <HASH>..<HASH> 100644
--- a/lib/dbf/column/base.rb
+++ b/lib/dbf/column/base.rb
@@ -39,19 +39,6 @@ module DBF
meth ? send(meth, value) : encode_string(value, true)
end
- def type_cast_methods
- {
- 'N' => :unpack_number,
- 'I' => :unpack_unsigned_long,
- 'F' => :unpack_float,
- 'Y' => :unpack_currency,
- 'D' => :decode_date,
- 'T' => :decode_datetime,
- 'L' => :boolean,
- 'M' => :decode_memo
- }
- end
-
# Returns true if the column is a memo
#
# @return [Boolean]
@@ -86,6 +73,19 @@ module DBF
private
+ def type_cast_methods # nodoc
+ {
+ 'N' => :unpack_number,
+ 'I' => :unpack_unsigned_long,
+ 'F' => :unpack_float,
+ 'Y' => :unpack_currency,
+ 'D' => :decode_date,
+ 'T' => :decode_datetime,
+ 'L' => :boolean,
+ 'M' => :decode_memo
+ }
+ end
+
def decode_date(value) # nodoc
value.gsub!(' ', '0')
value !~ /\S/ ? nil : Date.parse(value)
|
make type_cast_methods private
|
infused_dbf
|
train
|
rb
|
416817dd565d4500bae02d4cb77fb28d8a968619
|
diff --git a/lib/celerity/elements/table_row.rb b/lib/celerity/elements/table_row.rb
index <HASH>..<HASH> 100644
--- a/lib/celerity/elements/table_row.rb
+++ b/lib/celerity/elements/table_row.rb
@@ -9,6 +9,7 @@ module Celerity
def locate
super
@cells = @object.getCells if @object
+ @object
end
#
@@ -45,4 +46,4 @@ module Celerity
end
end # TableRow
-end # Celerity
\ No newline at end of file
+end # Celerity
|
Make TableRow.locate conform with Element.locate.
|
jarib_celerity
|
train
|
rb
|
6958baf114596d1b14210fbbda151e17550f3014
|
diff --git a/index.js b/index.js
index <HASH>..<HASH> 100644
--- a/index.js
+++ b/index.js
@@ -1,7 +1,8 @@
'use strict';
var childProcess = require('child_process');
-var execFileSync = childProcess.execFileSync;
var lcid = require('lcid');
+
+var execFileSync = childProcess.execFileSync;
var defaultOpts = {spawn: true};
var cache;
|
fix XO lint issue
|
sindresorhus_os-locale
|
train
|
js
|
8211136646cfb12b4abac7e2ee718cdeca8a6877
|
diff --git a/response.go b/response.go
index <HASH>..<HASH> 100644
--- a/response.go
+++ b/response.go
@@ -41,7 +41,6 @@ type GetInstanceResponse struct {
type UpdateResponse struct {
DashboardURL string `json:"dashboard_url,omitempty"`
OperationData string `json:"operation,omitempty"`
- DashboardURL string `json:"dashboard_url,omitempty"`
}
type DeprovisionResponse struct {
diff --git a/service_broker.go b/service_broker.go
index <HASH>..<HASH> 100644
--- a/service_broker.go
+++ b/service_broker.go
@@ -119,7 +119,6 @@ type UpdateServiceSpec struct {
IsAsync bool
DashboardURL string
OperationData string
- DashboardURL string
}
type DeprovisionServiceSpec struct {
|
Remove duplicated DashboardURL from struct definition
[#<I>]
|
pivotal-cf_brokerapi
|
train
|
go,go
|
c1608bcdb488277c065f5194e9bb756582475d96
|
diff --git a/version/version.go b/version/version.go
index <HASH>..<HASH> 100644
--- a/version/version.go
+++ b/version/version.go
@@ -25,7 +25,7 @@ import (
)
var (
- Version = "2.0.4+git"
+ Version = "2.1.0-alpha.0"
)
// WalVersion is an enum for versions of etcd logs.
|
*: bump to <I>-alpha<I>
|
etcd-io_etcd
|
train
|
go
|
4a6cd149b744e0a17e89bfc2ae3da9ce617033a4
|
diff --git a/viewer.js b/viewer.js
index <HASH>..<HASH> 100644
--- a/viewer.js
+++ b/viewer.js
@@ -127,7 +127,7 @@
// draw target
if(this.target !== null){
- this._drawTarget();
+ this._drawTarget(this.context);
}
};
@@ -145,9 +145,8 @@
this.dirty = true;
};
- ImageViewer.prototype._drawTarget = function(){
- var ctx = this.context;
-
+ ImageViewer.prototype._drawTarget = function(ctx){
+ // preserve context
ctx.save();
var shapeScale = 1.5
@@ -178,6 +177,7 @@
ctx.arc(0, 0, 10, 0, 2 * Math.PI, false);
ctx.stroke();
+ // restore context
ctx.restore();
};
|
changed context from local variable to parameter like in the other draw functions
|
pfirpfel_image-viewer
|
train
|
js
|
cf6d468b6f6d47fbbdaee13cac2788101006ed7e
|
diff --git a/resource/resourceadapters/opener.go b/resource/resourceadapters/opener.go
index <HASH>..<HASH> 100644
--- a/resource/resourceadapters/opener.go
+++ b/resource/resourceadapters/opener.go
@@ -15,6 +15,9 @@ import (
// NewResourceOpener returns a new resource.Opener for the given unit.
//
+// The caller owns the State provided. It is the caller's
+// responsibility to close it.
+//
// TODO(mjs): This is the entry point for a whole lot of untested shim
// code in this package. At some point this should be sorted out.
func NewResourceOpener(st *corestate.State, unitName string) (opener resource.Opener, err error) {
|
resource/resourceadapters: Clarify State ownership
|
juju_juju
|
train
|
go
|
2737a5fe9bd63360d280036a3fc95304c4746373
|
diff --git a/src/python/atomistica/io.py b/src/python/atomistica/io.py
index <HASH>..<HASH> 100644
--- a/src/python/atomistica/io.py
+++ b/src/python/atomistica/io.py
@@ -80,7 +80,9 @@ def write(fn, a, **kwargs):
if ext[0] == '.out' or ext[0] == '.dat':
return write_atoms(fn, a)
elif ext[0] == '.lammps':
- return write_lammps_data(fn, a, **kwargs)
+ return write_lammps_data(fn, a, velocities=True, **kwargs)
+ elif ext[0] == '.nc':
+ return NetCDFTrajectory(fn, 'w').write(a)
else:
return ase.io.write(fn, a, **kwargs)
|
Added NetCDF support to write function of atomistica.io.
|
Atomistica_atomistica
|
train
|
py
|
ad899035e80186ff17d5d82abc6a3d2840a27ca8
|
diff --git a/lxd/storage/drivers/driver_dir.go b/lxd/storage/drivers/driver_dir.go
index <HASH>..<HASH> 100644
--- a/lxd/storage/drivers/driver_dir.go
+++ b/lxd/storage/drivers/driver_dir.go
@@ -28,14 +28,15 @@ type dir struct {
// Info returns info about the driver and its environment.
func (d *dir) Info() Info {
return Info{
- Name: "dir",
- Version: "1",
- OptimizedImages: false,
- PreservesInodes: false,
- Remote: false,
- VolumeTypes: []VolumeType{VolumeTypeCustom, VolumeTypeImage, VolumeTypeContainer, VolumeTypeVM},
- BlockBacking: false,
- RunningQuotaResize: true,
+ Name: "dir",
+ Version: "1",
+ OptimizedImages: false,
+ PreservesInodes: false,
+ Remote: false,
+ VolumeTypes: []VolumeType{VolumeTypeCustom, VolumeTypeImage, VolumeTypeContainer, VolumeTypeVM},
+ BlockBacking: false,
+ RunningQuotaResize: true,
+ RunningSnapshotFreeze: true,
}
}
|
lxd/storage/drivers/driver/dir: Defines dir driver needs freeze during snapshot
|
lxc_lxd
|
train
|
go
|
ae6104fabf7c7eb335f9921b24e348c07ac726db
|
diff --git a/leveldb/db/batch.go b/leveldb/db/batch.go
index <HASH>..<HASH> 100644
--- a/leveldb/db/batch.go
+++ b/leveldb/db/batch.go
@@ -18,6 +18,7 @@ import (
"encoding/binary"
"io"
"leveldb"
+ "leveldb/memdb"
)
var (
@@ -53,6 +54,14 @@ func (b *Batch) Delete(key []byte) {
b.kvSize += len(key)
}
+func (b *Batch) Reset() {
+ b.rec = b.rec[:0]
+ b.sequence = 0
+ b.kvSize = 0
+ b.ch = nil
+ b.sync = false
+}
+
func (b *Batch) init(sync bool) chan error {
ch := make(chan error)
b.ch = nil
@@ -173,6 +182,13 @@ func (b *Batch) replay(to batchReplay) {
}
}
+func (b *Batch) memReplay(to *memdb.DB) {
+ for i, rec := range b.rec {
+ ikey := newIKey(rec.key, b.sequence+uint64(i), rec.t)
+ to.Put(ikey, rec.value)
+ }
+}
+
func decodeBatchHeader(b []byte, seq *uint64, n *uint32) (err error) {
if len(b) < 12 {
return errBatchTooShort
|
fb: batch: introduce *Batch.Reset() and *Batch.memReplay() methods
|
syndtr_goleveldb
|
train
|
go
|
ddac2cca1952975e05af7349c6b972514f63b062
|
diff --git a/test/feedforward_test.py b/test/feedforward_test.py
index <HASH>..<HASH> 100644
--- a/test/feedforward_test.py
+++ b/test/feedforward_test.py
@@ -82,9 +82,8 @@ class TestWeightedClassifier(TestClassifier):
def test_score_onelayer(self):
net = self._build(13)
- z = net.score(self.images,
- self.labels,
- np.random.randint(0, 2, size=self.labels.shape))
+ z = net.score(
+ self.images, self.labels, 0.5 * np.ones(self.labels.shape, 'f'))
assert 0 < z < 1
|
Make weights for test deterministic.
|
lmjohns3_theanets
|
train
|
py
|
8cd427410af0f4c064cb01993b208f8f5a21e1dc
|
diff --git a/src/Query/Builder.php b/src/Query/Builder.php
index <HASH>..<HASH> 100644
--- a/src/Query/Builder.php
+++ b/src/Query/Builder.php
@@ -171,7 +171,7 @@ class Builder extends \Illuminate\Database\Query\Builder
{
$name = $this->connection->getName();
- return md5($name.$this->toSql().serialize($this->getBindings()));
+ return hash('sha256', $name.$this->toSql().serialize($this->getBindings()));
}
/**
|
Switch to sha<I> for the cache key
|
dwightwatson_rememberable
|
train
|
php
|
bbbc5444a407daddedf42d7b7f17d2b248552435
|
diff --git a/luigi/interface.py b/luigi/interface.py
index <HASH>..<HASH> 100644
--- a/luigi/interface.py
+++ b/luigi/interface.py
@@ -27,6 +27,7 @@ import re
import argparse
import sys
import os
+import tempfile
from task import Register
@@ -79,7 +80,7 @@ class EnvironmentParamsContainer(task.Task):
is_global=True, default=False,
description='Ignore if similar process is already running')
lock_pid_dir = parameter.Parameter(
- is_global=True, default='/var/tmp/luigi',
+ is_global=True, default=os.path.join(tempfile.gettempdir(), 'luigi'),
description='Directory to store the pid file')
workers = parameter.IntParameter(
is_global=True, default=1,
|
Set default temp directory in a Windows friendly way.
Using tempfile.gettempdir() makes sure that a proper temporary
directory will be picked up with respect to os and even env
variables like TMPDIR, TEMP, TMP etc.
Fix #<I>
|
spotify_luigi
|
train
|
py
|
db157766a02fd472473c79022c7c6c300cb2ee4f
|
diff --git a/salt/pillar/nodegroups.py b/salt/pillar/nodegroups.py
index <HASH>..<HASH> 100644
--- a/salt/pillar/nodegroups.py
+++ b/salt/pillar/nodegroups.py
@@ -1,8 +1,5 @@
-#!/usr/bin/env python
# -*- coding: utf-8 -*-
-
'''
-=================
Nodegroups Pillar
=================
|
Remove overline from section title
This causes a warning on newer Sphinx releases
|
saltstack_salt
|
train
|
py
|
cccd12c3c99ea27806f3070967810cd62744d61d
|
diff --git a/Gruntfile.js b/Gruntfile.js
index <HASH>..<HASH> 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -45,7 +45,10 @@ module.exports = function (grunt) {
}
},
files: {
- 'dist/fuelux.js': ['src/*.js', '!src/all.js']
+ // manually concatenate JS files (due to dependency management)
+ 'dist/fuelux.js': ['src/util.js', 'src/checkbox.js', 'src/combobox.js', 'src/datagrid.js', 'src/datepicker.js', 'src/pillbox.js',
+ 'src/radio.js', 'src/search.js', 'src/select.js', 'src/spinner.js', 'src/tree.js', 'src/wizard.js',
+ 'src/intelligent-dropdown.js', 'src/scheduler.js', '!src/all.js']
}
}
},
|
Manually ordered concatenated JS files in build process due to dependencies
|
ExactTarget_fuelux
|
train
|
js
|
57093fb812e1884c9dd744adbdf0ed6b0cb99ae2
|
diff --git a/src/TwigBridge/TwigServiceProvider.php b/src/TwigBridge/TwigServiceProvider.php
index <HASH>..<HASH> 100644
--- a/src/TwigBridge/TwigServiceProvider.php
+++ b/src/TwigBridge/TwigServiceProvider.php
@@ -10,7 +10,7 @@ use Twig_Lexer;
class TwigServiceProvider extends ViewServiceProvider
{
- const VERSION = '0.0.1';
+ const VERSION = '0.0.2';
/**
* Register the service provider.
|
Bumped TwigBridge version number
|
rcrowe_TwigBridge
|
train
|
php
|
7dbc79c8dd0bfdb2367ce1eb01b2ead822f3aca7
|
diff --git a/aws/auth.go b/aws/auth.go
index <HASH>..<HASH> 100644
--- a/aws/auth.go
+++ b/aws/auth.go
@@ -191,7 +191,9 @@ type iamProvider struct {
var metadataCredentialsEndpoint = "http://169.254.169.254/latest/meta-data/iam/security-credentials/"
-var client = http.Client{
+// IAMClient is the HTTP client used to query the metadata endpoint for IAM
+// credentials.
+var IAMClient = http.Client{
Timeout: 1 * time.Second,
}
@@ -210,7 +212,7 @@ func (p *iamProvider) Credentials() (*Credentials, error) {
Token string
}
- resp, err := client.Get(metadataCredentialsEndpoint)
+ resp, err := IAMClient.Get(metadataCredentialsEndpoint)
if err != nil {
return nil, errors.Annotate(err, "listing IAM credentials")
}
@@ -226,7 +228,7 @@ func (p *iamProvider) Credentials() (*Credentials, error) {
return nil, errors.Annotate(s.Err(), "listing IAM credentials")
}
- resp, err = client.Get(metadataCredentialsEndpoint + s.Text())
+ resp, err = IAMClient.Get(metadataCredentialsEndpoint + s.Text())
if err != nil {
return nil, errors.Annotatef(err, "getting %s IAM credentials", s.Text())
}
|
Expose IAM cred client.
Closes #<I>.
|
aws_aws-sdk-go
|
train
|
go
|
272958958f3221aadf18c3ce51b86dc07fb3ec5a
|
diff --git a/ooxml/importer.py b/ooxml/importer.py
index <HASH>..<HASH> 100644
--- a/ooxml/importer.py
+++ b/ooxml/importer.py
@@ -193,7 +193,11 @@ def get_chapters(doc):
export_chapters.append(_serialize_chapter(doc.elements[:chapters[0]['index']-1]))
for n in range(len(chapters)-1):
- _html = _serialize_chapter(doc.elements[chapters[n]['index']:chapters[n+1]['index']-1])
+ if chapters[n]['index'] == chapters[n+1]['index']-1:
+ _html = _serialize_chapter([doc.elements[chapters[n]['index']]])
+ else:
+ _html = _serialize_chapter(doc.elements[chapters[n]['index']:chapters[n+1]['index']-1])
+
export_chapters.append(_html)
export_chapters.append(_serialize_chapter(doc.elements[chapters[-1]['index']:]))
|
BK-<I> Slicing elements according to header position fails
|
booktype_python-ooxml
|
train
|
py
|
76420e43b1147388824eea468d0f97bc61e74ee1
|
diff --git a/rsapi/auth.go b/rsapi/auth.go
index <HASH>..<HASH> 100644
--- a/rsapi/auth.go
+++ b/rsapi/auth.go
@@ -362,7 +362,7 @@ func (a *ssAuthenticator) SetHost(host string) {
a.host = host
return
}
- elems[len(elems)-2] = strings.Replace(elems[len(elems)-2], "us", "selfservice", 1)
+ elems[len(elems)-2] = "selfservice"
ssLoginHostPrefix := strings.Join(elems, "-")
a.host = strings.Join(append([]string{ssLoginHostPrefix}, urlElems[1:]...), ".")
}
|
Fix SS host substitution for SS minimoo hosts
Not all endpoints use the 'us-3.rightscale.com' style host -- some
minimoos in particular use ss2-moo-<I>.test.rightscale.com. This commit
removes the assumption that there will be a 'us' substring in the login
host. Fixes #<I>.
|
rightscale_rsc
|
train
|
go
|
3bda39ffeb6e6ac16f254b645a2605f71a3253a9
|
diff --git a/pandas/core/base.py b/pandas/core/base.py
index <HASH>..<HASH> 100644
--- a/pandas/core/base.py
+++ b/pandas/core/base.py
@@ -753,7 +753,7 @@ class IndexOpsMixin:
dtype : str or numpy.dtype, optional
The dtype to pass to :meth:`numpy.asarray`.
copy : bool, default False
- Whether to ensure that the returned value is a not a view on
+ Whether to ensure that the returned value is not a view on
another array. Note that ``copy=False`` does not *ensure* that
``to_numpy()`` is no-copy. Rather, ``copy=True`` ensure that
a copy is made, even if not strictly necessary.
diff --git a/pandas/core/frame.py b/pandas/core/frame.py
index <HASH>..<HASH> 100644
--- a/pandas/core/frame.py
+++ b/pandas/core/frame.py
@@ -1301,7 +1301,7 @@ class DataFrame(NDFrame):
dtype : str or numpy.dtype, optional
The dtype to pass to :meth:`numpy.asarray`.
copy : bool, default False
- Whether to ensure that the returned value is a not a view on
+ Whether to ensure that the returned value is not a view on
another array. Note that ``copy=False`` does not *ensure* that
``to_numpy()`` is no-copy. Rather, ``copy=True`` ensure that
a copy is made, even if not strictly necessary.
|
DOC/CLN: Fix to_numpy docstrings (#<I>)
|
pandas-dev_pandas
|
train
|
py,py
|
b8198c4adfff90b267123abfe6827da43afcaac2
|
diff --git a/pyjfuzz/core/pjf_mutators.py b/pyjfuzz/core/pjf_mutators.py
index <HASH>..<HASH> 100644
--- a/pyjfuzz/core/pjf_mutators.py
+++ b/pyjfuzz/core/pjf_mutators.py
@@ -96,6 +96,7 @@ class PJFMutators(object):
bool: self.boolean_mutator,
int: self.int_mutator,
float: self.float_mutator,
+ long: self.int_mutator,
type(None): self.null_mutator,
}
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -57,6 +57,7 @@ requires=['bottle', 'GitPython']
if sys.version_info < (2, 7):
# support for python 2.6
requires.append('argparse')
+ requires.append('unittest2')
setup(
name="PyJFuzz",
|
fixed python <I> type and import issues
|
mseclab_PyJFuzz
|
train
|
py,py
|
476ca936d4bc1a74f21d0aa772c00b040f7cd834
|
diff --git a/peyotl/phylesystem/git_workflows.py b/peyotl/phylesystem/git_workflows.py
index <HASH>..<HASH> 100644
--- a/peyotl/phylesystem/git_workflows.py
+++ b/peyotl/phylesystem/git_workflows.py
@@ -40,7 +40,7 @@ def acquire_lock_raise(git_action, fail_msg=''):
_LOG.debug(msg)
raise GitWorkflowError(msg)
-def validate_and_convert_nexson(nexson, output_version, allow_invalid):
+def validate_and_convert_nexson(nexson, output_version, allow_invalid, **kwargs):
'''Runs the nexson validator and returns a converted 4 object:
nexson, annotation, validation_log, nexson_adaptor
@@ -52,7 +52,7 @@ def validate_and_convert_nexson(nexson, output_version, allow_invalid):
try:
if TRACE_FILES:
_write_to_next_free('input', nexson)
- annotation, validation_log, nexson_adaptor = ot_validate(nexson)
+ annotation, validation_log, nexson_adaptor = ot_validate(nexson, **kwargs)
if TRACE_FILES:
_write_to_next_free('annotation', annotation)
except:
|
adding kwargs for max_num_tree arg
|
OpenTreeOfLife_peyotl
|
train
|
py
|
76b4856198674ec4e2d0365b88493f54fa7c7342
|
diff --git a/tests/test_analytics.py b/tests/test_analytics.py
index <HASH>..<HASH> 100644
--- a/tests/test_analytics.py
+++ b/tests/test_analytics.py
@@ -77,7 +77,7 @@ class CookiePolicyTestCase(SimpleTestCase):
@modify_settings(
MIDDLEWARE={
- 'append': 'tests.utils.AcceptCookiePolicyMiddleware',
+ 'append': 'tests.utils.TestAcceptingCookiePolicyMiddleware',
},
)
def test_setting_cookie_policy(self):
diff --git a/tests/utils.py b/tests/utils.py
index <HASH>..<HASH> 100644
--- a/tests/utils.py
+++ b/tests/utils.py
@@ -16,7 +16,11 @@ class SimpleTestCase(DjangoSimpleTestCase):
return self.client.get(reverse('dummy'), **extra)
-class AcceptCookiePolicyMiddleware(MiddlewareMixin):
+class TestAcceptingCookiePolicyMiddleware(MiddlewareMixin):
+ """
+ Used in tests that mimic a user clicking accept on a cookie prompt
+ """
+
def process_response(self, request, response):
AnalyticsPolicy(request).set_cookie_policy(response, True)
return response
|
Rename a middleware class to make it clear that it's only for testing purposes
|
ministryofjustice_money-to-prisoners-common
|
train
|
py,py
|
601cfc380f7d925828633dcca0762feb8bcd85d3
|
diff --git a/client/js/shout.js b/client/js/shout.js
index <HASH>..<HASH> 100644
--- a/client/js/shout.js
+++ b/client/js/shout.js
@@ -374,7 +374,7 @@ $(function() {
});
chan.css({
transition: "none",
- opacity: .4
+ opacity: 0.4
});
return false;
});
|
Don't use bare fractions
|
erming_shout
|
train
|
js
|
3b464d90588606df56334245bccf5b12ff3d6c94
|
diff --git a/opentrons/instruments/pipette.py b/opentrons/instruments/pipette.py
index <HASH>..<HASH> 100644
--- a/opentrons/instruments/pipette.py
+++ b/opentrons/instruments/pipette.py
@@ -297,15 +297,11 @@ class Pipette(Instrument):
self.current_tip_home_well = location
- # TODO: actual plunge depth for picking up a tip
- # varies based on the tip
- # right now it's accounted for via plunge depth
- tip_plunge = 6
+ tip_plunge = 10
- # Dip into tip and pull it up
for _ in range(3):
- self.robot.move_head(z=-tip_plunge, mode='relative')
self.robot.move_head(z=tip_plunge, mode='relative')
+ self.robot.move_head(z=-tip_plunge, mode='relative')
description = "Picking up tip from {0}".format(
(humanize_location(location) if location else '<In Place>')
|
modified pick_up_tip to assume .bottom() is the point of contact
|
Opentrons_opentrons
|
train
|
py
|
4a946fca24b44eb806e0b9781a1c22c35828149e
|
diff --git a/lib/coverage.js b/lib/coverage.js
index <HASH>..<HASH> 100644
--- a/lib/coverage.js
+++ b/lib/coverage.js
@@ -37,7 +37,7 @@ function jscoverageFromIstanbulCoverage(coverage) {
jscov[filename]['source'] = fs.readFileSync(file).toString().split('\n');
for (var line = 0; line < jscov[filename]['source'].length; ++line) {
- jscov[filename][line] = 0;
+ jscov[filename][line] = null;
}
for (var sid in coverage[file].s) {
|
Clean up coverage display for HTML reporter
Pro:
- HTML view of code coverage shows only lines that Istanbul actually
instruments.
Con:
- This change alters the figures reported. A <I>-line file with many
comments, for example, may appear as though it only has <I> lines.
|
cloudkick_whiskey
|
train
|
js
|
e1f85256ad025852eacec20f510184b085184469
|
diff --git a/examples/test_ffi_struct.rb b/examples/test_ffi_struct.rb
index <HASH>..<HASH> 100644
--- a/examples/test_ffi_struct.rb
+++ b/examples/test_ffi_struct.rb
@@ -2,28 +2,18 @@ require 'ffi'
require 'forwardable'
module Blub
- class Struct < FFI::Struct
- class << self
- def find_type(type, mod = nil)
- if type.respond_to?(:ffi_structure)
- super type.ffi_structure, mod
- else
- super type, mod
- end
- end
- end
- end
-
class Foo
extend Forwardable
def_delegators :@struct, :[], :to_ptr
- class Struct < Blub::Struct
+ class Struct < FFI::Struct
layout :a, :int, :b, :int
end
def initialize(ptr=nil)
- @struct = self.ffi_structure.new(ptr)
+ @struct = ptr.nil? ?
+ self.ffi_structure.new :
+ self.ffi_structure.new(ptr)
end
def ffi_structure
@@ -38,8 +28,8 @@ module Blub
end
class Bar < Foo
- class Struct < Blub::Struct
- layout :p, Foo, :c, :int
+ class Struct < FFI::Struct
+ layout :p, Foo.ffi_structure, :c, :int
end
end
end
|
Stop overriding find_type.
This is not compatible with ffi's master, nor with jruby's ffi. Probably
also not with rubinius' ffi, once that works with nested structs again.
|
mvz_gir_ffi
|
train
|
rb
|
a2330b7a902c0055ada973e0f830ed1fbb4951a3
|
diff --git a/src/Symfony/Component/Workflow/Workflow.php b/src/Symfony/Component/Workflow/Workflow.php
index <HASH>..<HASH> 100644
--- a/src/Symfony/Component/Workflow/Workflow.php
+++ b/src/Symfony/Component/Workflow/Workflow.php
@@ -22,7 +22,7 @@ use Symfony\Component\Workflow\Exception\LogicException;
use Symfony\Component\Workflow\Exception\NotEnabledTransitionException;
use Symfony\Component\Workflow\Exception\UndefinedTransitionException;
use Symfony\Component\Workflow\MarkingStore\MarkingStoreInterface;
-use Symfony\Component\Workflow\MarkingStore\MultipleStateMarkingStore;
+use Symfony\Component\Workflow\MarkingStore\MethodMarkingStore;
use Symfony\Component\Workflow\Metadata\MetadataStoreInterface;
use Symfony\Contracts\EventDispatcher\EventDispatcherInterface;
@@ -41,7 +41,7 @@ class Workflow implements WorkflowInterface
public function __construct(Definition $definition, MarkingStoreInterface $markingStore = null, EventDispatcherInterface $dispatcher = null, string $name = 'unnamed')
{
$this->definition = $definition;
- $this->markingStore = $markingStore ?: new MultipleStateMarkingStore();
+ $this->markingStore = $markingStore ?: new MethodMarkingStore();
$this->dispatcher = $dispatcher;
$this->name = $name;
}
|
[Workflow] Fixed default marking store value of Workflow
|
symfony_symfony
|
train
|
php
|
f5f94a84dd685a1c39a2302c000e666d19ab2768
|
diff --git a/src/Pool.php b/src/Pool.php
index <HASH>..<HASH> 100644
--- a/src/Pool.php
+++ b/src/Pool.php
@@ -471,7 +471,12 @@ class Pool implements PoolInterface, ProducerInterface, ContainerAccessInterface
$return_by_value = $type;
}
- return $this->connection->advancedExecute($sql, $arguments, ConnectionInterface::LOAD_ALL_ROWS, $return_by, $return_by_value, [&$this->connection, &$this, &$this->log]);
+ if ($this->hasContainer()) {
+ return $this->connection->advancedExecute($sql, $arguments, ConnectionInterface::LOAD_ALL_ROWS, $return_by, $return_by_value, [&$this->connection, &$this, &$this->log], $this->getContainer());
+ } else {
+ return $this->connection->advancedExecute($sql, $arguments, ConnectionInterface::LOAD_ALL_ROWS, $return_by, $return_by_value, [&$this->connection, &$this, &$this->log]);
+ }
+
} else {
throw new InvalidArgumentException("Type '$type' is not registered");
}
|
Set container to result instance when doing advanced execute
|
activecollab_databaseobject
|
train
|
php
|
9cdc2db61f4a81f8161bd22a9e8eabd079e48214
|
diff --git a/polyaxon_client/client.py b/polyaxon_client/client.py
index <HASH>..<HASH> 100644
--- a/polyaxon_client/client.py
+++ b/polyaxon_client/client.py
@@ -29,7 +29,7 @@ class PolyaxonClient(object):
port=None,
http_port=None,
ws_port=None,
- use_https=False,
+ use_https=None,
verify_ssl=None,
is_managed=None,
authentication_type=None,
|
Fix issue detecting correct https config
|
polyaxon_polyaxon
|
train
|
py
|
15ad7b7ab09093e2cc1ca501a97379858e26fecb
|
diff --git a/core/server/proxy/src/main/java/alluxio/proxy/s3/S3RestServiceHandler.java b/core/server/proxy/src/main/java/alluxio/proxy/s3/S3RestServiceHandler.java
index <HASH>..<HASH> 100644
--- a/core/server/proxy/src/main/java/alluxio/proxy/s3/S3RestServiceHandler.java
+++ b/core/server/proxy/src/main/java/alluxio/proxy/s3/S3RestServiceHandler.java
@@ -359,7 +359,7 @@ public final class S3RestServiceHandler {
if (objectPath.endsWith(AlluxioURI.SEPARATOR)) {
// Need to create a folder
try {
- mFileSystem.createDirectory(new AlluxioURI(objectPath));
+ fs.createDirectory(new AlluxioURI(objectPath));
} catch (IOException | AlluxioException e) {
throw toObjectS3Exception(e, objectPath);
}
|
Fix wrong owner when creating directory object in S3 API
pr-link: Alluxio/alluxio#<I>
change-id: cid-e<I>ba7db<I>c<I>c<I>e<I>
|
Alluxio_alluxio
|
train
|
java
|
7e967e795484ec9939778fa03fa18f0fe95457bf
|
diff --git a/shell/expand.go b/shell/expand.go
index <HASH>..<HASH> 100644
--- a/shell/expand.go
+++ b/shell/expand.go
@@ -15,6 +15,8 @@ import (
// ${#var}, but also to arithmetic expansions like $((var + 3)), and
// command substitutions like $(echo foo).
//
+// If env is nil, the current environment variables are used.
+//
// Any side effects or modifications to the system are forbidden when
// interpreting the program. This is enforced via whitelists when
// executing programs and opening paths.
|
shell: clarify that Expand(s, nil) is a valid use
|
mvdan_sh
|
train
|
go
|
b4e008131881012b6be196bf481999ce7b7a6b72
|
diff --git a/examples/example_run_manager/example_run_manager.py b/examples/example_run_manager/example_run_manager.py
index <HASH>..<HASH> 100644
--- a/examples/example_run_manager/example_run_manager.py
+++ b/examples/example_run_manager/example_run_manager.py
@@ -52,9 +52,9 @@ if __name__ == "__main__":
for delay in range(14, 50, 16):
join = runmngr.run_run(ExtTriggerScan, run_conf={"trigger_delay": delay, "no_data_timeout": 60}, use_thread=True) # use thread
print 'Status:', join(timeout=5) # join has a timeout, return None if run has not yet finished
- runmngr.abort_current_run() # stopping/aborting run from outside (same effect has Ctrl-C)
+ runmngr.abort_current_run("Calling abort_current_run(). This scan was aborted by intention") # stopping/aborting run from outside (same effect has Ctrl-C)
if join() != run_status.finished: # status OK?
- print 'ERROR!'
+ print 'ERROR! This error was made by intention!'
break # jump out
#
# The configuration.yaml can be extended to change the default run parameters for each scan:
|
MAINT: adding some comment to avoid confusion
|
SiLab-Bonn_pyBAR
|
train
|
py
|
4a839c63337263452df9b83d52f73bc982110680
|
diff --git a/angular-file-upload.js b/angular-file-upload.js
index <HASH>..<HASH> 100644
--- a/angular-file-upload.js
+++ b/angular-file-upload.js
@@ -1,7 +1,7 @@
/**!
* AngularJS file upload directive and http post
* @author Danial <danial.farid@gmail.com>
- * @version 0.1.3
+ * @version 0.1.4
*/
var angularFileUpload = angular.module('angularFileUpload', []);
|
Update angular-file-upload.js
Updated the version number
|
danialfarid_ng-file-upload
|
train
|
js
|
054c066b74bf3face1a7a3a50068478bd7140e95
|
diff --git a/src/components/tabs/js/tabDirective.js b/src/components/tabs/js/tabDirective.js
index <HASH>..<HASH> 100644
--- a/src/components/tabs/js/tabDirective.js
+++ b/src/components/tabs/js/tabDirective.js
@@ -67,12 +67,11 @@ function MdTab () {
label = angular.element('<md-tab-label></md-tab-label>');
if (attr.label) label.text(attr.label);
else label.append(element.contents());
- }
-
- if (body.length == 0) {
- var contents = element.contents().detach();
- body = angular.element('<md-tab-body></md-tab-body>');
- body.append(contents);
+ if (body.length == 0) {
+ var contents = element.contents().detach();
+ body = angular.element('<md-tab-body></md-tab-body>');
+ body.append(contents);
+ }
}
element.append(label);
|
fix(tabs): adds proper detection for bodyless tabs
Closes #<I>
|
angular_material
|
train
|
js
|
3b56fb2c510f2ccdd4bba2fbce91869a481aef0d
|
diff --git a/src/Panda/Contracts/Bootstrap/BootLoader.php b/src/Panda/Contracts/Bootstrap/BootLoader.php
index <HASH>..<HASH> 100644
--- a/src/Panda/Contracts/Bootstrap/BootLoader.php
+++ b/src/Panda/Contracts/Bootstrap/BootLoader.php
@@ -24,5 +24,5 @@ interface BootLoader
*
* @param Request $request
*/
- public function boot($request);
+ public function boot($request = null);
}
|
[Contracts] Set request to be nullable in BootLoader::boot()
This setting allows mocking and testing without mocking a request
|
PandaPlatform_framework
|
train
|
php
|
5a3c04bb92e21bd221a75c4ae13a71f7d4716b44
|
diff --git a/unsafe/src/main/java/org/apache/spark/unsafe/map/BytesToBytesMap.java b/unsafe/src/main/java/org/apache/spark/unsafe/map/BytesToBytesMap.java
index <HASH>..<HASH> 100644
--- a/unsafe/src/main/java/org/apache/spark/unsafe/map/BytesToBytesMap.java
+++ b/unsafe/src/main/java/org/apache/spark/unsafe/map/BytesToBytesMap.java
@@ -429,7 +429,6 @@ public final class BytesToBytesMap {
long valueBaseOffset,
int valueLengthBytes) {
assert (!isDefined) : "Can only set value once for a key";
- isDefined = true;
assert (keyLengthBytes % 8 == 0);
assert (valueLengthBytes % 8 == 0);
if (size == MAX_CAPACITY) {
|
[SPARK-<I>] isDefined should not marked too early in putNewKey
JIRA: <URL>
|
apache_spark
|
train
|
java
|
6ad53c33d8fb4fa2f8adeef3d756875e4832f8a4
|
diff --git a/src/css.js b/src/css.js
index <HASH>..<HASH> 100644
--- a/src/css.js
+++ b/src/css.js
@@ -15,7 +15,7 @@ var ralpha = /alpha\([^)]*\)/i,
// order is important!
cssExpand = jQuery.cssExpand,
- cssPrefixes = [ "O", "Webkit", "Moz", "ms" ],
+ cssPrefixes = [ "Webkit", "O", "Moz", "ms" ],
curCSS;
|
Opera announced they will start supporting the -webkit- prefix for a selected set of css properties. Let's put the inspection of -webkit- prefix properties as the last one in case this propagates to the style object and/or other browsers (the cssPrefixes array is inspected from right to left).
|
jquery_jquery
|
train
|
js
|
a7970cedf57df834655bac37b73030222eb8927a
|
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -31,6 +31,6 @@ if len(argv) > 1 and argv[1] != "sdist":
# PyPI doesn't like raw html
with open("README.rst", encoding="UTF-8") as f:
readme = re.sub(r"\.\. \|.+\| raw:: html(?:\s{4}.+)+\n\n", "", f.read())
- readme = re.sub(r"\|header\|", "|logo|\n######\n\n|description|\n\n|scheme| |mtproto|", readme)
+ readme = re.sub(r"\|header\|", "|logo|\n\n|description|\n\n|scheme| |mtproto|", readme)
setup(long_description=readme)
|
Fix logo not showing up on PyPI website
|
pyrogram_pyrogram
|
train
|
py
|
9b73392d91d508b14767d9822ab4d8cd180dae75
|
diff --git a/lib/core/manager.rb b/lib/core/manager.rb
index <HASH>..<HASH> 100644
--- a/lib/core/manager.rb
+++ b/lib/core/manager.rb
@@ -138,6 +138,8 @@ class Manager
:event => :regex, # Utility
:template => :json, # Utility
:translator => :json # Utility
+
+ yield(myself) if block_given?
load_plugins(true)
logger.info("Finished initializing Nucleon plugin system at #{Time.now}")
|
Allowing for dynamic definition of namsapaces and types after core in the plugin manager reload method.
|
coralnexus_nucleon
|
train
|
rb
|
c7daa8666aa49c0c3cfa040c56cab20998d43823
|
diff --git a/contribs/gmf/src/directives/search.js b/contribs/gmf/src/directives/search.js
index <HASH>..<HASH> 100644
--- a/contribs/gmf/src/directives/search.js
+++ b/contribs/gmf/src/directives/search.js
@@ -566,6 +566,7 @@ gmf.SearchController.prototype.createAndInitBloodhound_ = function(config,
gmf.SearchController.prototype.getBloodhoudRemoteOptions_ = function() {
var gettextCatalog = this.gettextCatalog_;
return {
+ rateLimitWait: 50,
prepare: function(query, settings) {
var url = settings.url;
var lang = gettextCatalog.currentLanguage;
diff --git a/src/services/creategeojsonbloodhound.js b/src/services/creategeojsonbloodhound.js
index <HASH>..<HASH> 100644
--- a/src/services/creategeojsonbloodhound.js
+++ b/src/services/creategeojsonbloodhound.js
@@ -63,7 +63,6 @@ ngeo.createGeoJSONBloodhound = function(url, opt_filter, opt_featureProjection,
var bloodhoundOptions = /** @type {BloodhoundOptions} */ ({
remote: {
url: url,
- rateLimitWait: 50,
prepare: function(query, settings) {
settings.url = settings.url.replace('%QUERY', query);
return settings;
|
Move the rateLimitWait option from ngeo to gmf
|
camptocamp_ngeo
|
train
|
js,js
|
80d9630c58987f29f5d143bced2fd93e3926353f
|
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100755
--- a/setup.py
+++ b/setup.py
@@ -38,7 +38,7 @@ with open('requirements.txt') as f:
setup(
name='rip',
- version='0.0.92',
+ version='0.0.93',
description='A python framework for writing restful APIs.',
long_description=readme + '\n\n' + history,
author='Aplopio developers',
|
Bump up version to <I>
|
Aplopio_django_rip
|
train
|
py
|
27f6ffd83d15365a726b7e0266d4fff77c3ad57a
|
diff --git a/command/agent/consul/syncer.go b/command/agent/consul/syncer.go
index <HASH>..<HASH> 100644
--- a/command/agent/consul/syncer.go
+++ b/command/agent/consul/syncer.go
@@ -319,9 +319,14 @@ func (c *Syncer) Shutdown() error {
cr.Stop()
}
- // De-register all the services from consul
- for _, service := range c.trackedServices {
+ // De-register all the services from Consul
+ services, err := c.queryAgentServices()
+ if err != nil {
+ mErr.Errors = append(mErr.Errors, err)
+ }
+ for _, service := range services {
if err := c.client.Agent().ServiceDeregister(service.ID); err != nil {
+ c.logger.Printf("[WARN] consul.syncer: failed to deregister service ID %q: %v", service.ID, err)
mErr.Errors = append(mErr.Errors, err)
}
}
@@ -807,7 +812,7 @@ func (c *Syncer) filterConsulChecks(consulChecks map[string]*consul.AgentCheck)
return localChecks
}
-// consulPresent indicates whether the consul agent is responding
+// consulPresent indicates whether the Consul Agent is responding
func (c *Syncer) consulPresent() bool {
_, err := c.client.Agent().Self()
return err == nil
|
On Syncer Shutdown, remove all services that match a Syncer's prefix.
|
hashicorp_nomad
|
train
|
go
|
72bfc435adaf2902fbd44d6cb421ab51717bf5f3
|
diff --git a/builtin/providers/google/image.go b/builtin/providers/google/image.go
index <HASH>..<HASH> 100644
--- a/builtin/providers/google/image.go
+++ b/builtin/providers/google/image.go
@@ -49,7 +49,7 @@ func resolveImageFamilyExists(c *Config, project, name string) (bool, error) {
func sanityTestRegexMatches(expected int, got []string, regexType, name string) error {
if len(got)-1 != expected { // subtract one, index zero is the entire matched expression
- return fmt.Errorf("Expected %d %s regex matches, got %d for %s", 2, regexType, len(got)-1, name)
+ return fmt.Errorf("Expected %d %s regex matches, got %d for %s", expected, regexType, len(got)-1, name)
}
return nil
}
|
Update typo.
We never updated the error to use the expectation, not hardcode it to 2.
|
hashicorp_terraform
|
train
|
go
|
6bcb4a1e4f193559c9f07b92716c4ce1ebb9a73e
|
diff --git a/test/index.js b/test/index.js
index <HASH>..<HASH> 100644
--- a/test/index.js
+++ b/test/index.js
@@ -6,6 +6,7 @@ var format = require('../lib');
var testDate = new Date(Date.UTC(2012, 11, 14, 13, 6, 43, 152));
var testArray = [ 'abc', 1, true, null, testDate ];
+var testIdentArray = [ 'abc', 'AbC', 1, true, testDate ];
var testObject = { a: 1, b: 2 };
describe('format(fmt, ...)', function() {
@@ -80,6 +81,7 @@ describe('format.ident(val)', function() {
format.ident(-15).should.equal('"-15"');
format.ident(45.13).should.equal('"45.13"');
format.ident(-45.13).should.equal('"-45.13"');
+ format.ident(testIdentArray).should.equal('abc,"AbC","1","t","2012-12-14 13:06:43.152+00"');
format.ident(testDate).should.equal('"2012-12-14 13:06:43.152+00"');
});
@@ -101,15 +103,6 @@ describe('format.ident(val)', function() {
}
});
- it('should throw when array', function (done) {
- try {
- format.ident([]);
- } catch (err) {
- assert(err.message === 'SQL identifier cannot be an array');
- done();
- }
- });
-
it('should throw when object', function (done) {
try {
format.ident({});
|
Update tests to match support for identifier arrays.
|
datalanche_node-pg-format
|
train
|
js
|
4b7c358a6ca0a8ce1942c5740fe3a2650863c47b
|
diff --git a/boards.js b/boards.js
index <HASH>..<HASH> 100644
--- a/boards.js
+++ b/boards.js
@@ -5,7 +5,7 @@ var boards = {
pageSize: 128,
numPages: 256,
timeout: 400,
- productId: ['0x0043', '0x7523'],
+ productId: ['0x0043', '0x7523','0x0001'],
protocol: 'stk500v1'
},
'micro': {
|
Added new ProductID in "uno" for Freduino UNO compatibility
|
noopkat_avrgirl-arduino
|
train
|
js
|
e641d4ab82010a260e186dcc4237cb693fd49653
|
diff --git a/cors.go b/cors.go
index <HASH>..<HASH> 100644
--- a/cors.go
+++ b/cors.go
@@ -13,6 +13,7 @@ type Config struct {
AllowAllOrigins bool
// AllowedOrigins is a list of origins a cross-domain request can be executed from.
+ // If the special "*" value is present in the list, all origins will be allowed.
// Default value is []
AllowOrigins []string
|
undo comments, cross support for wildcard origin
|
gin-contrib_cors
|
train
|
go
|
11fb38ed5ab349501f61c93a2c31b92acbf14532
|
diff --git a/src/wtf/db/eventiterator.js b/src/wtf/db/eventiterator.js
index <HASH>..<HASH> 100644
--- a/src/wtf/db/eventiterator.js
+++ b/src/wtf/db/eventiterator.js
@@ -13,6 +13,7 @@
goog.provide('wtf.db.EventIterator');
+goog.require('goog.asserts');
goog.require('wtf.data.EventFlag');
goog.require('wtf.db.EventStruct');
goog.require('wtf.db.Unit');
@@ -563,6 +564,11 @@ wtf.db.EventIterator.prototype.buildArgumentString_ = function(
var first = true;
var argVars = type.getArguments();
var argData = this.getArguments();
+ // TODO(benvanik): sometimes arguments may not exist. Issue #410.
+ goog.asserts.assert(argData);
+ if (!argData) {
+ return;
+ }
for (var n = 0; n < argVars.length; n++) {
var argVar = argVars[n];
appendArgument(first, argVar.name, argData[argVar.name]);
|
Asserting and handling better a broken case of event data.
Issue #<I> filed to track it.
|
google_tracing-framework
|
train
|
js
|
bfb17c8022e6fa986bdebdd392ad00af1d467bd3
|
diff --git a/docs/conf.py b/docs/conf.py
index <HASH>..<HASH> 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -99,7 +99,7 @@ master_doc = 'index'
# General information about the project.
project = 'MetPy'
# noinspection PyShadowingBuiltins
-copyright = (f'{cur_date:%Y}-2020, MetPy Developers. '
+copyright = (f'2008\u2013{cur_date:%Y}, MetPy Developers. '
'Development supported by National Science Foundation grants '
'AGS-1344155, OAC-1740315, and AGS-1901712')
|
DOC: Fix copyright range (Fixes #<I>)
Somehow we replace the origination year instead of the final year in
2e3f<I>. Also use the right Unicode character for the range.
|
Unidata_MetPy
|
train
|
py
|
4640b7e264ca1417cb02e787e6263db9aa3dfcb7
|
diff --git a/test/e2e/dns.go b/test/e2e/dns.go
index <HASH>..<HASH> 100644
--- a/test/e2e/dns.go
+++ b/test/e2e/dns.go
@@ -321,10 +321,10 @@ var _ = framework.KubeDescribe("DNS", func() {
"kubernetes.default",
"kubernetes.default.svc",
"kubernetes.default.svc.cluster.local",
- "google.com",
}
// Added due to #8512. This is critical for GCE and GKE deployments.
if framework.ProviderIs("gce", "gke") {
+ namesToResolve = append(namesToResolve, "google.com")
namesToResolve = append(namesToResolve, "metadata")
}
hostFQDN := fmt.Sprintf("%s.%s.%s.svc.cluster.local", dnsTestPodHostName, dnsTestServiceName, f.Namespace.Name)
|
Add google.com to e2e test only under gce/gke
We should limit the lookup/resolve for google.com when
provider is gce or gke. We should be able to run the
test in environments where this is not allowed or not
available.
|
kubernetes_kubernetes
|
train
|
go
|
d45c0299aedd693f7066def82624b2c2c1b91e42
|
diff --git a/tests/Support/SupportClassLoaderTest.php b/tests/Support/SupportClassLoaderTest.php
index <HASH>..<HASH> 100644
--- a/tests/Support/SupportClassLoaderTest.php
+++ b/tests/Support/SupportClassLoaderTest.php
@@ -27,12 +27,11 @@ class SupportClassLoaderTest extends PHPUnit_Framework_TestCase {
$php53Class = 'Foo\Bar\Php53';
$php52Class = 'Foo_Bar_Php52';
+ // We're not actually registering an autoloader now
+ // but rather testing our methods work as expected.
ClassLoader::addDirectories(__DIR__.'/stubs/psr');
- ClassLoader::load($php53Class);
- ClassLoader::load($php52Class);
-
- $this->assertTrue(class_exists($php53Class));
- $this->assertTrue(class_exists($php52Class));
+ $this->assertTrue(ClassLoader::load($php53Class));
+ $this->assertTrue(ClassLoader::load($php52Class));
}
}
|
Tweaking the autoloader test to not actually autoload but test the load() method works as expected.
|
laravel_framework
|
train
|
php
|
f4d852d6d93bb0f46e9db895d4858093610a69f5
|
diff --git a/imagemounter/__init__.py b/imagemounter/__init__.py
index <HASH>..<HASH> 100644
--- a/imagemounter/__init__.py
+++ b/imagemounter/__init__.py
@@ -6,7 +6,7 @@ __version__ = '1.5.1'
BLOCK_SIZE = 512
VOLUME_SYSTEM_TYPES = ('detect', 'dos', 'bsd', 'sun', 'mac', 'gpt', 'dbfiller')
-FILE_SYSTEM_TYPES = ('ext', 'ufs', 'ntfs', 'luks', 'lvm', 'unknown')
+FILE_SYSTEM_TYPES = ('ext', 'ufs', 'ntfs', 'luks', 'lvm', 'xfs', 'unknown')
import sys
import os
|
Update __init__.py
Adder xfs to known file systems
|
ralphje_imagemounter
|
train
|
py
|
d42ca5d5bc2f67e503ddb61e44ff1c461c589b58
|
diff --git a/hs_restclient/__init__.py b/hs_restclient/__init__.py
index <HASH>..<HASH> 100644
--- a/hs_restclient/__init__.py
+++ b/hs_restclient/__init__.py
@@ -122,6 +122,8 @@ class HydroShare(object):
self.url_base = self._URL_PROTO_WITHOUT_PORT.format(scheme=self.scheme,
hostname=self.hostname)
+ self.resource_types = self.getResourceTypes()
+
def getResourceList(self, creator=None, owner=None, user=None, group=None, from_date=None, to_date=None,
types=None):
"""
@@ -331,7 +333,7 @@ class HydroShare(object):
def getResourceTypes(self):
""" Get the list of resource types supported by the HydroShare server
- :return: A list of strings representing the HydroShare resource types
+ :return: A set of strings representing the HydroShare resource types
:raise HydroShareHTTPException to signal an HTTP error
"""
@@ -342,7 +344,7 @@ class HydroShare(object):
raise HydroShareHTTPException((url, r.status_code))
resource_types = r.json()
- return [t['resource_type'] for t in resource_types['results']]
+ return set([t['resource_type'] for t in resource_types['results']])
# def createResource(self, title, resource_file=None,):
|
getResourceTypes() now returns a set rather than a list
getResourceTypes() is now called by the HydroShare constructor
|
hydroshare_hs_restclient
|
train
|
py
|
568fce11905b919ba2bc9bb68296b7aee92dab6f
|
diff --git a/lib/charlotte.js b/lib/charlotte.js
index <HASH>..<HASH> 100755
--- a/lib/charlotte.js
+++ b/lib/charlotte.js
@@ -2200,7 +2200,7 @@
_.each([browser.onBack, tab.onBack, onBack], function(onBack) {
if (onBack && onBack.callback) {
onBackCallbackSeries.push(function(next) {
- onBack.callback(options, next);
+ onBack.callback.call(lastPage, options, next);
});
}
});
|
set page as `this` when calling onBack callbacks
|
danieldkim_charlotte
|
train
|
js
|
c902126cfbf6214cc244f90faaff344cd609f867
|
diff --git a/jspdf.js b/jspdf.js
index <HASH>..<HASH> 100644
--- a/jspdf.js
+++ b/jspdf.js
@@ -1688,18 +1688,6 @@ function jsPDF(/** String */ orientation, /** String */ unit, /** String */ form
return buildDocument();
case 'save':
- // If Safari - fallback to Data URL, sorry there's no way to feature detect this
- // @TODO: Refactor this
- $.browser.chrome = $.browser.webkit && !!window.chrome;
- $.browser.safari = $.browser.webkit && !window.chrome;
-
- // Open in new window if webkit, until the BlobBuilder is fixed
- // Seems to have been removed in Chrome 24
- if ($.browser.webkit) {
- return API.output('dataurlnewwindow');
- }
-
- var bb = new BlobBuilder;
var data = buildDocument();
// Need to add the file to BlobBuilder as a Uint8Array
@@ -1710,9 +1698,8 @@ function jsPDF(/** String */ orientation, /** String */ unit, /** String */ form
array[i] = data.charCodeAt(i);
}
- bb.append(array);
+ var blob = new Blob(array, {type: "application/pdf"});
- var blob = bb.getBlob('application/pdf');
saveAs(blob, options);
break;
case 'datauristring':
|
Replaced call to BlobBuilder with call to Blob [File API]
|
MrRio_jsPDF
|
train
|
js
|
89ee9f42e389bcab5abb34899c5461028b87dc8a
|
diff --git a/lib/parser.js b/lib/parser.js
index <HASH>..<HASH> 100644
--- a/lib/parser.js
+++ b/lib/parser.js
@@ -135,6 +135,9 @@ Parser.prototype = {
this.context(parser);
var ast = parser.parse();
this.context();
+ // hoist mixins
+ for (var name in this.mixins)
+ ast.unshift(this.mixins[name]);
return ast;
}
|
Make mixins available if defined in the same file as `extends`
|
pugjs_then-pug
|
train
|
js
|
1df7f7e6d1e809362b16aba8893675ef81b1b9ab
|
diff --git a/network.go b/network.go
index <HASH>..<HASH> 100644
--- a/network.go
+++ b/network.go
@@ -1181,7 +1181,8 @@ func (n *network) createEndpoint(name string, options ...EndpointOption) (Endpoi
ep.locator = n.getController().clusterHostID()
ep.network, err = ep.getNetworkFromStore()
if err != nil {
- return nil, fmt.Errorf("failed to get network during CreateEndpoint: %v", err)
+ logrus.Errorf("failed to get network during CreateEndpoint: %v", err)
+ return nil, err
}
n = ep.network
diff --git a/store.go b/store.go
index <HASH>..<HASH> 100644
--- a/store.go
+++ b/store.go
@@ -85,7 +85,7 @@ func (c *controller) getNetworkFromStore(nid string) (*network, error) {
return n, nil
}
}
- return nil, fmt.Errorf("network %s not found", nid)
+ return nil, ErrNoSuchNetwork(nid)
}
func (c *controller) getNetworksForScope(scope string) ([]*network, error) {
|
Fix 'failed to get network during CreateEndpoint'
Fix 'failed to get network during CreateEndpoint' during container starting.
Change the error type to `libnetwork.ErrNoSuchNetwork`, so `Start()` in `daemon/cluster/executor/container/controller.go` will recreate the network.
|
docker_libnetwork
|
train
|
go,go
|
145602038fa711ebfda981fdd0d33ecf946d0408
|
diff --git a/index.js b/index.js
index <HASH>..<HASH> 100644
--- a/index.js
+++ b/index.js
@@ -155,6 +155,7 @@ icescrum.getAllStories = function(params, callback) {
};
var req = http.request(options, function(result) {
+ var responseParts = [];
result.setEncoding('utf8');
result.on('data', function (chunk) {
if (chunk.substr(2,5) == "error") {
@@ -162,10 +163,14 @@ icescrum.getAllStories = function(params, callback) {
return(this);
}
else {
- callback(false, chunk);
- return(this);
+ responseParts.push(chunk);
}
});
+
+ result.on("end", function(){
+ callback(false, responseParts.join(""));
+ return(this);
+ });
});
req.end();
|
The get all stories API returns the result in multiple chunks, the
wrapper returns it (now) as a whole.
|
fpap_node-icescrum
|
train
|
js
|
d328cfb2c36162ab535a2447102ffc9167d6efac
|
diff --git a/setup-jottacloudclient.py b/setup-jottacloudclient.py
index <HASH>..<HASH> 100644
--- a/setup-jottacloudclient.py
+++ b/setup-jottacloudclient.py
@@ -53,7 +53,8 @@ setup(name='jottacloudclient',
],
# see https://pythonhosted.org/setuptools/setuptools.html#declaring-extras-optional-features-with-their-own-dependencies
extras_require = {
- 'FUSE': ['fusepy',],
+ 'FUSE': ['fusepy', 'fastcache',],
'monitor': ['watchdog',],
+ 'scanner': ['xattr',],
},
)
|
Adding dependencies to fast cache and xattr
.. for faster and smarter code
|
havardgulldahl_jottalib
|
train
|
py
|
3b4710d8989230203e27a6dbf8bba21152e50707
|
diff --git a/tests/unit/src/RunnerTest.php b/tests/unit/src/RunnerTest.php
index <HASH>..<HASH> 100644
--- a/tests/unit/src/RunnerTest.php
+++ b/tests/unit/src/RunnerTest.php
@@ -150,8 +150,9 @@ class RunnerTest extends PHPUnit_Framework_TestCase {
}
public function testErrorsSilencedWhenErrorReportingOff() {
- echo phpversion();
- $this->markTestSkipped();
+ if(strpos(phpversion(), 'hhvm')) {
+ $this->markTestSkipped();
+ }
$er = ini_get('display_errors');
ini_set('display_errors', 0);
|
Skipping a test for HHVM.
|
thephpleague_booboo
|
train
|
php
|
821f87f8969d75ac358768d17e84b3b91ff487cb
|
diff --git a/Model/TaskServer.php b/Model/TaskServer.php
index <HASH>..<HASH> 100644
--- a/Model/TaskServer.php
+++ b/Model/TaskServer.php
@@ -159,6 +159,9 @@ class TaskServer extends TaskModel {
return;
}
$statistics = array_values(array_filter(preg_split('/\s+/', `ps -o '%mem,%cpu,stat' --ppid {$task['process_id']} --no-headers`)));
+ if (!$statistics) {
+ $statistics = array_values(array_filter(preg_split('/\s+/', `ps -o '%mem,%cpu,stat' --pid {$task['process_id']} --no-headers`)));
+ }
$this->Statistics->create();
return (bool)$this->Statistics->save(array(
'task_id' => $task['id'],
|
Fix getting statistics caused different execution handler on different OS #<I>
|
imsamurai_cakephp-task-plugin
|
train
|
php
|
4c3fdedcc4e574d19f4ac3e04ff01d99044a5e1f
|
diff --git a/lib/grunt/tasks/release.js b/lib/grunt/tasks/release.js
index <HASH>..<HASH> 100644
--- a/lib/grunt/tasks/release.js
+++ b/lib/grunt/tasks/release.js
@@ -23,7 +23,7 @@ var path = require("path"),
// remove redundancies in css filenames
fs.renameSync(path.join(paths.dist, "lib/fine-uploader.css"), path.join(paths.dist, "lib/legacy.css"))
fs.renameSync(path.join(paths.dist, "lib/fine-uploader-gallery.css"), path.join(paths.dist, "lib/gallery.css"))
- fs.renameSync(path.join(paths.dist, "lib/fine-uploader-new.css"), path.join(paths.dist, "lib/new.css"))
+ fs.renameSync(path.join(paths.dist, "lib/fine-uploader-new.css"), path.join(paths.dist, "lib/rows.css"))
// copy over the CommonJS index files
fsSync.copy(path.join(paths.commonJs), path.join(paths.dist, "lib"));
|
feat(build): better name for modern row-layout stylesheet
Only used in new lib directory.
#<I>
|
FineUploader_fine-uploader
|
train
|
js
|
40394beff570e6fb77936af3d1aa6f48fd9588b2
|
diff --git a/remodel/connection.py b/remodel/connection.py
index <HASH>..<HASH> 100644
--- a/remodel/connection.py
+++ b/remodel/connection.py
@@ -10,16 +10,26 @@ from .utils import Counter
class Connection(object):
- def __init__(self, db='test', host='localhost', port=28015, auth_key=''):
+ def __init__(self, db='test', host='localhost', port=28015, auth_key='',
+ user='admin', password=''):
self.db = db
self.host = host
self.port = port
self.auth_key = auth_key
+ self.user = user
+ self.password = password
self._conn = None
def connect(self):
- self._conn = r.connect(host=self.host, port=self.port,
- auth_key=self.auth_key, db=self.db)
+ if rethinkdb.__version__ >= '2.3.0':
+ password = self.password if self.password != '' else self.auth_key
+ self._conn = rethinkdb.connect(host=self.host, port=self.port,
+ user=self.user, password=password,
+ db=self.db)
+ else:
+ auth_key = self.auth_key if self.auth_key != '' else self.password
+ self._conn = rethinkdb.connect(host=self.host, port=self.port,
+ auth_key=auth_key, db=self.db)
def close(self):
if self._conn:
|
Support for RethinkDB <I>'s new user model
|
linkyndy_remodel
|
train
|
py
|
d58b897ef3a965726915aa764047a3f1a7ed3554
|
diff --git a/lib/frontend/rest-adaptor.js b/lib/frontend/rest-adaptor.js
index <HASH>..<HASH> 100644
--- a/lib/frontend/rest-adaptor.js
+++ b/lib/frontend/rest-adaptor.js
@@ -1,3 +1,5 @@
+var debug = require('../debug');
+
var model = require('../model');
var defaultCommands = require('./default-commands/rest');
@@ -11,6 +13,8 @@ function createHandler(params) {
throw new Error('no filter for the backend: ' + commandName);
return (function(request, response) {
+ debug('rest-adapter.createHandler.handle');
+
var result = definition.toBackend(commandName, request);
var messageType = result[0];
var body = result[1];
@@ -20,10 +24,13 @@ function createHandler(params) {
messageType,
body,
function(error, envelope) {
+ debug('rest-adapter.createHandler.handle.response');
if (error) {
+ debug('rest-adapter.createHandler.handle.response.error:', error);
var body = envelope && envelope.body || null;
response.jsonp(body, error);
} else {
+ debug('rest-adapter.createHandler.handle.response.success');
var body = envelope.body;
if (definition.toClient) {
var result = definition.toClient(commandName, body);
|
rest-adaptor: add debug logs
|
droonga_express-droonga
|
train
|
js
|
5df10dad976ef392c2f2b992f58713274164d5ef
|
diff --git a/ghost/admin/controllers/modals/leave-editor.js b/ghost/admin/controllers/modals/leave-editor.js
index <HASH>..<HASH> 100644
--- a/ghost/admin/controllers/modals/leave-editor.js
+++ b/ghost/admin/controllers/modals/leave-editor.js
@@ -50,7 +50,7 @@ var LeaveEditorController = Ember.Controller.extend({
buttonClass: 'button-delete'
},
reject: {
- text: 'Cancel',
+ text: 'Stay',
buttonClass: 'button'
}
}
|
Change text on leave modal cancel button
issue #<I>
|
TryGhost_Ghost
|
train
|
js
|
441fd184e2e39e35f609bec7d6badd6ca5797eea
|
diff --git a/src/api/center.js b/src/api/center.js
index <HASH>..<HASH> 100644
--- a/src/api/center.js
+++ b/src/api/center.js
@@ -1,8 +1,8 @@
const toArray = require('../core/utils/toArray')
-/**
+/** NOTE: this is not functional YET !!
* centers the given object(s) on the given axis
- * @param {[Object]} object(s) the shapes to center
+ * @param {Object|Array} object(s) the shapes to center
* @param {Object} options
*/
const center = (objects, options) => {
diff --git a/src/core/utils/canonicalize.js b/src/core/utils/canonicalize.js
index <HASH>..<HASH> 100644
--- a/src/core/utils/canonicalize.js
+++ b/src/core/utils/canonicalize.js
@@ -7,7 +7,7 @@ const {fromSides} = require('../CAGFactories')
/**
* Returns a cannoicalized version of the input csg/cag : ie every very close
* points get deduplicated
- * @returns {CSG CAG}
+ * @returns {CSG|CAG}
* @example
* let rawInput = someCSGORCAGMakingFunction()
* let canonicalized= canonicalize(rawInput)
|
fix(docstring): fixed a few bad docstrings which prevented docs from being generated (#<I>)
|
jscad_csg.js
|
train
|
js,js
|
a54c99bb0146033fd25ff3dff3cdbcdb3b5edaaf
|
diff --git a/filer/server/urls.py b/filer/server/urls.py
index <HASH>..<HASH> 100644
--- a/filer/server/urls.py
+++ b/filer/server/urls.py
@@ -1,5 +1,5 @@
#-*- coding: utf-8 -*-
-from django.conf.urls import patterns, url, include
+from django.conf.urls.defaults import patterns, url, include
from filer import settings as filer_settings
urlpatterns = patterns('filer.server.views',
|
fix url import to work in django<<I>
|
divio_django-filer
|
train
|
py
|
e6614f0b9014f68df4e804615faccfc2d2614caf
|
diff --git a/src/values/PrimitiveValue.js b/src/values/PrimitiveValue.js
index <HASH>..<HASH> 100644
--- a/src/values/PrimitiveValue.js
+++ b/src/values/PrimitiveValue.js
@@ -27,11 +27,11 @@ class PrimitiveValue extends Value {
return out;
}
- *get(what, realm) {
- return yield * this.derivePrototype(realm).get(what, realm);
+ *get(name, realm) {
+ return yield * this.derivePrototype(realm).get(name, realm, this);
}
- *set(what, to, realm) {
+ *set(name, to, realm) {
//Can't set primative properties.
}
@@ -89,13 +89,6 @@ class PrimitiveValue extends Value {
*unaryMinus() { return this.fromNative(-this.native); }
*not() { return this.fromNative(!this.native); }
-
-
- *get(name, realm) {
- let pt = this.derivePrototype(realm);
- return yield * pt.get(name, realm, this);
- }
-
*observableProperties(realm) {
yield * this.derivePrototype(realm).observableProperties(realm);
}
@@ -132,5 +125,3 @@ class PrimitiveValue extends Value {
module.exports = PrimitiveValue;
StringValue = require('./StringValue');
-
-
|
PrimitiveValue: remove duplicated `get` method
|
codecombat_esper.js
|
train
|
js
|
672863494394aa7af897c64e0ff63ccfc5f88d9a
|
diff --git a/lib/chef/provider/package/aix.rb b/lib/chef/provider/package/aix.rb
index <HASH>..<HASH> 100644
--- a/lib/chef/provider/package/aix.rb
+++ b/lib/chef/provider/package/aix.rb
@@ -60,6 +60,7 @@ class Chef
@new_resource.version(fields[2])
end
end
+ raise Chef::Exceptions::Package, "package source #{@new_resource.source} does not provide package #{@new_resource.package_name}" unless @new_resource.version
end
end
|
Raise exception if a package provided by 'source' doesn't actually provide
that package
|
chef_chef
|
train
|
rb
|
0ab11ff23168b7aeb656d9a5d117153303f1ae44
|
diff --git a/tests/HtmlHeadingNormalizerTest.php b/tests/HtmlHeadingNormalizerTest.php
index <HASH>..<HASH> 100644
--- a/tests/HtmlHeadingNormalizerTest.php
+++ b/tests/HtmlHeadingNormalizerTest.php
@@ -128,6 +128,7 @@ class HtmlHeadingNormalizerTest extends \PHPUnit_Framework_TestCase
public function minSimpleHtmlStringsDataProvider()
{
return array(
+ array('<p>foo</p>', 1, '<p>foo</p>'),
array('<h1>foo</h1>', 1, '<h1>foo</h1>'),
array('<h2>foo</h2>', 1, '<h1>foo</h1>'),
array('<h3>foo</h3>', 1, '<h1>foo</h1>'),
|
Added test case where no headings exists in HTML.
|
vikpe_php-html-heading-normalizer
|
train
|
php
|
c7a440ec80611d2bb7c679dee7d246af37a1f112
|
diff --git a/src/algoliasearch.helper.js b/src/algoliasearch.helper.js
index <HASH>..<HASH> 100644
--- a/src/algoliasearch.helper.js
+++ b/src/algoliasearch.helper.js
@@ -1268,7 +1268,7 @@ AlgoliaSearchHelper.prototype.getClient = function() {
* is `SearchParameters -> SearchParameters`.
*
* This method returns a new DerivedHelper which is an EventEmitter
- * that fires the same `search`, `results` and `error` events. Those
+ * that fires the same `search`, `result` and `error` events. Those
* events, however, will receive data specific to this DerivedHelper
* and the SearchParameters that is returned by the call of the
* parameter function.
|
doc(derivation): Fix typo (fix #<I>)
DerivedHelper fires `result` event, not `results`.
|
algolia_algoliasearch-helper-js
|
train
|
js
|
29088fae2f9d9d9a6120df7d48d0568623a3071a
|
diff --git a/src/Update/Updates.php b/src/Update/Updates.php
index <HASH>..<HASH> 100644
--- a/src/Update/Updates.php
+++ b/src/Update/Updates.php
@@ -480,6 +480,7 @@ class Updates {
unset($files[$key]);
}
}
+ $this->updater->getFileSystem()->chmod('docroot/sites/default', 0755);
$this->updater->getFileSystem()->chmod($files, 0777);
$this->updater->deleteFile($files);
$this->updater->getFileSystem()->mirror('drush/site-aliases', 'drush/sites');
|
Fixes #<I>: File permission error during upgrade to <I>-beta2. (#<I>)
|
acquia_blt
|
train
|
php
|
27c94ddb76c19de5d454fffcfbea5e6bf52c30ca
|
diff --git a/cobald_tests/controller/test_switch.py b/cobald_tests/controller/test_switch.py
index <HASH>..<HASH> 100644
--- a/cobald_tests/controller/test_switch.py
+++ b/cobald_tests/controller/test_switch.py
@@ -6,7 +6,7 @@ from cobald.controller.linear import LinearController
from cobald.controller.switch import DemandSwitch
-class TestLinearController(object):
+class TestSwitchController(object):
def test_select(self):
pool = MockPool()
switch_controller = DemandSwitch(pool, LinearController(pool, rate=1), 5, LinearController(pool, rate=2))
|
renamted test from TestLinearController to TestSwitchController
|
MatterMiners_cobald
|
train
|
py
|
0cc8a9321387b29ee6b265dc154aa24351187b9e
|
diff --git a/cobe/scoring.py b/cobe/scoring.py
index <HASH>..<HASH> 100644
--- a/cobe/scoring.py
+++ b/cobe/scoring.py
@@ -70,11 +70,23 @@ class CobeScorer(Scorer):
info += -math.log(p, 2)
- n_edges = len(reply.edges)
- if n_edges > 8:
- info /= math.sqrt(n_edges - 1)
- elif n_edges >= 16:
- info /= n_edges
+ # Approximate the number of cobe 1.2 contexts in this reply, so the
+ # scorer will have similar results.
+
+ # First, we have (graph.order - 1) extra edges on either end of the
+ # reply, since cobe 2.0 learns from (_END_TOKEN, _END_TOKEN, ...).
+ n_words = len(reply.edges) - (reply.graph.order - 1) * 2
+
+ # Add back one word for each space between edges, since cobe 1.2
+ # treated those as separate parts of a context.
+ for edge in reply.edges:
+ if edge.has_space:
+ n_words += 1
+
+ if n_words > 8:
+ info /= math.sqrt(n_words - 1)
+ elif n_words >= 16:
+ info /= n_words
return self.finish(self.normalize(info))
|
Tweak CobeScorer to behave more like cobe <I>
Use a context count that is more similar to the old count,
by taking spacing and extra <I> edges into account.
|
pteichman_cobe
|
train
|
py
|
e73bafa9651aca45347804ebfa7709ca78d0d475
|
diff --git a/clearly/client.py b/clearly/client.py
index <HASH>..<HASH> 100644
--- a/clearly/client.py
+++ b/clearly/client.py
@@ -197,7 +197,7 @@ class ClearlyClient:
pass
@set_user_friendly_errors
- def stats(self) -> None:
+ def metrics(self) -> None:
"""List some metrics about the capturing system itself, which of course
reflects the actual celery pool being monitored.
|
rene\ame stats to metrics
|
rsalmei_clearly
|
train
|
py
|
6d14b9d65cfc6a82132986cd53311ab72b0d793a
|
diff --git a/src/index.js b/src/index.js
index <HASH>..<HASH> 100644
--- a/src/index.js
+++ b/src/index.js
@@ -37,16 +37,18 @@ function createFunctions(Reflux, PromiseFactory) {
}
if (canHandlePromise) {
- var removeSuccess = me.completed.listen(function(argsArr) {
+ var removeSuccess = me.completed.listen(function () {
+ var args = Array.prototype.slice.call(arguments);
removeSuccess();
removeFailed();
- resolve(argsArr);
+ resolve(args.length > 1 ? args : args[0]);
});
- var removeFailed = me.failed.listen(function(argsArr) {
+ var removeFailed = me.failed.listen(function () {
+ var args = Array.prototype.slice.call(arguments);
removeSuccess();
removeFailed();
- reject(argsArr);
+ reject(args.length > 1 ? args : args[0]);
});
}
|
Support multiple arguments (as array) in Promise's
|
reflux_reflux-promise
|
train
|
js
|
6254c53a4a11446d5d06170340a3d78036bf49bd
|
diff --git a/routing/router_test.go b/routing/router_test.go
index <HASH>..<HASH> 100644
--- a/routing/router_test.go
+++ b/routing/router_test.go
@@ -2,6 +2,7 @@ package routing
import (
"bytes"
+ "errors"
"fmt"
"image/color"
"math"
@@ -2978,13 +2979,14 @@ func TestRouterPaymentStateMachine(t *testing.T) {
// On startup, the router should fetch all pending payments
// from the ControlTower, so assert that here.
- didFetch := make(chan struct{})
+ errCh := make(chan error)
go func() {
+ close(errCh)
select {
case <-control.fetchInFlight:
- close(didFetch)
+ return
case <-time.After(1 * time.Second):
- t.Fatalf("router did not fetch in flight " +
+ errCh <- errors.New("router did not fetch in flight " +
"payments")
}
}()
@@ -2994,7 +2996,10 @@ func TestRouterPaymentStateMachine(t *testing.T) {
}
select {
- case <-didFetch:
+ case err := <-errCh:
+ if err != nil {
+ t.Fatalf("error in anonymous goroutine: %s", err)
+ }
case <-time.After(1 * time.Second):
t.Fatalf("did not fetch in flight payments at startup")
}
|
routing: fix use of T.Fatal() in test goroutine
|
lightningnetwork_lnd
|
train
|
go
|
c03d78a28da1e8e7f4eb6981968d0bf7e0824dae
|
diff --git a/undertow/src/main/java/org/wildfly/extension/undertow/ListenerService.java b/undertow/src/main/java/org/wildfly/extension/undertow/ListenerService.java
index <HASH>..<HASH> 100644
--- a/undertow/src/main/java/org/wildfly/extension/undertow/ListenerService.java
+++ b/undertow/src/main/java/org/wildfly/extension/undertow/ListenerService.java
@@ -38,6 +38,7 @@ import org.jboss.msc.service.StartContext;
import org.jboss.msc.service.StartException;
import org.jboss.msc.service.StopContext;
import org.jboss.msc.value.InjectedValue;
+import org.xnio.ByteBufferSlicePool;
import org.xnio.ChannelListener;
import org.xnio.ChannelListeners;
import org.xnio.OptionMap;
@@ -101,6 +102,11 @@ public abstract class ListenerService<T> implements Service<T> {
}
protected int getBufferSize() {
+ //not sure if this is best possible solution
+ if (bufferPool.getValue() instanceof ByteBufferSlicePool){
+ ByteBufferSlicePool pool =(ByteBufferSlicePool)bufferPool.getValue();
+ return pool.getBufferSize();
+ }
return 8192;
}
|
Use buffersize that is configured/calculated for buffer pool
|
wildfly_wildfly
|
train
|
java
|
f62e26bae024bba713f19d8ca35103cd08e8d8cf
|
diff --git a/lib/aims/geometry.rb b/lib/aims/geometry.rb
index <HASH>..<HASH> 100644
--- a/lib/aims/geometry.rb
+++ b/lib/aims/geometry.rb
@@ -402,9 +402,9 @@ module Aims
nz_sign = (0 < nz) ? 1 : -1
new_atoms = []
- nx.abs.times do |i|
- ny.abs.times do |j|
- nz.abs.times do |k|
+ nx.to_i.abs.times do |i|
+ ny.to_i.abs.times do |j|
+ nz.to_i.abs.times do |k|
new_atoms << self.displace(nx_sign*i*v1[0] + ny_sign*j*v2[0] + nz_sign*k*v3[0],
nx_sign*i*v1[1] + ny_sign*j*v2[1] + nz_sign*k*v3[1],
nx_sign*i*v1[2] + ny_sign*j*v2[2] + nz_sign*k*v3[2]).atoms
|
Fixed bug when repeat is not an integer
|
jns_Aims
|
train
|
rb
|
2e9750c37516a2e7694b7c8896298fded2b71c34
|
diff --git a/lib/sugarcrm/associations/association_cache.rb b/lib/sugarcrm/associations/association_cache.rb
index <HASH>..<HASH> 100644
--- a/lib/sugarcrm/associations/association_cache.rb
+++ b/lib/sugarcrm/associations/association_cache.rb
@@ -19,8 +19,10 @@ module SugarCRM; module AssociationCache
# Updates an association cache entry if it's been initialized
def update_association_cache_for(association, target)
+ return unless association_cached? association
+ return if @association_cache[association].collection.include? target
# only add to the cache if the relationship has been queried
- @association_cache[association] << target if association_cached? association
+ @association_cache[association] << target
end
# Resets the association cache
diff --git a/lib/sugarcrm/associations/association_collection.rb b/lib/sugarcrm/associations/association_collection.rb
index <HASH>..<HASH> 100644
--- a/lib/sugarcrm/associations/association_collection.rb
+++ b/lib/sugarcrm/associations/association_collection.rb
@@ -2,6 +2,8 @@ module SugarCRM
# A class for handling association collections. Basically just an extension of Array
# doesn't actually load the records from Sugar until you invoke one of the public methods
class AssociationCollection
+
+ attr_reader :collection
# creates a new instance of an AssociationCollection
# Owner is the parent object, and association is the target
|
don't update association collection if relationship already exists
associating a contact to an account twice shouldn't increase account.contacts.size each time
|
chicks_sugarcrm
|
train
|
rb,rb
|
6595297b2b733f22ee75ccdbc95f5638c5dc5484
|
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -103,7 +103,7 @@ http://api.mongodb.org/python/current/installation.html#osx
kwargs = {}
-version = "4.5.1"
+version = "5.0.dev1"
with open('README.rst') as f:
kwargs['long_description'] = f.read()
diff --git a/tornado/__init__.py b/tornado/__init__.py
index <HASH>..<HASH> 100644
--- a/tornado/__init__.py
+++ b/tornado/__init__.py
@@ -25,5 +25,5 @@ from __future__ import absolute_import, division, print_function
# is zero for an official release, positive for a development branch,
# or negative for a release candidate or beta (after the base version
# number has been incremented)
-version = "4.5.1"
-version_info = (4, 5, 1, 0)
+version = "5.0.dev1"
+version_info = (5, 0, 0, -100)
|
Bump master version to <I>.dev1
|
tornadoweb_tornado
|
train
|
py,py
|
bc3c02aec6f254d8155352c8362513515279d402
|
diff --git a/lib/nydp/pair.rb b/lib/nydp/pair.rb
index <HASH>..<HASH> 100644
--- a/lib/nydp/pair.rb
+++ b/lib/nydp/pair.rb
@@ -161,13 +161,7 @@ class Nydp::Pair
end
def to_s
- if (car == nil)
- "nil"
- elsif car.is_a?(String)
- car.inspect
- elsif car.is_a?(Nydp::Fn)
- car.to_s
- elsif (car == :quote)
+ if (car == :quote)
if Nydp::NIL.is? cdr.cdr
"'#{cdr.car.to_s}"
else
@@ -202,6 +196,16 @@ class Nydp::Pair
end
end
+ def to_s_car
+ if (car == nil)
+ "nil"
+ elsif car.is_a?(String)
+ car.inspect
+ else
+ car.to_s
+ end
+ end
+
def to_s_rest
cdr_s = if cdr.is_a?(self.class)
cdr.to_s_rest
@@ -211,7 +215,7 @@ class Nydp::Pair
". #{cdr.to_s}"
end
- [car.to_s, cdr_s].compact.join " "
+ [to_s_car, cdr_s].compact.join " "
end
def inspect_rest
|
pair: fix #to_s after making nicer broke it. It's still nicer though.
|
conanite_nydp
|
train
|
rb
|
2085166396cce491463a3a9dab9d60b3463f2f2c
|
diff --git a/fetcher/nvd/json/nvd.go b/fetcher/nvd/json/nvd.go
index <HASH>..<HASH> 100644
--- a/fetcher/nvd/json/nvd.go
+++ b/fetcher/nvd/json/nvd.go
@@ -3,6 +3,7 @@ package json
import (
"encoding/json"
"fmt"
+ "sort"
"strings"
"time"
@@ -31,6 +32,10 @@ func FetchConvert(metas []models.FeedMeta) (cves []models.CveDetail, err error)
fmt.Errorf("Failed to fetch. err: %s", err)
}
+ // The redis-put-process overwrite without referring the last modified date.
+ // Sort so that recent-feed is the last element.
+ sort.Slice(results, func(i, j int) bool { return results[i].URL < results[j].URL })
+
errs := []error{}
for _, res := range results {
var nvd, nvdIncludeRejectedCve NvdJSON
|
fix(fetch-nvd): prevent overwriting with old cve-details on redis (#<I>)
|
kotakanbe_go-cve-dictionary
|
train
|
go
|
32091b265f6012138a736974be1750635dc5de63
|
diff --git a/cherrypy/_cpcompat_subprocess.py b/cherrypy/_cpcompat_subprocess.py
index <HASH>..<HASH> 100644
--- a/cherrypy/_cpcompat_subprocess.py
+++ b/cherrypy/_cpcompat_subprocess.py
@@ -883,7 +883,7 @@ class Popen(object):
startupinfo.dwFlags |= _subprocess.STARTF_USESHOWWINDOW
startupinfo.wShowWindow = _subprocess.SW_HIDE
comspec = os.environ.get("COMSPEC", "cmd.exe")
- args = '{} /c "{}"'.format(comspec, args)
+ args = '{0} /c "{1}"'.format(comspec, args)
if (_subprocess.GetVersion() >= 0x80000000 or
os.path.basename(comspec).lower() == "command.com"):
# Win9x, or using command.com on NT. We need to
@@ -1029,7 +1029,7 @@ class Popen(object):
elif sig == signal.CTRL_BREAK_EVENT:
os.kill(self.pid, signal.CTRL_BREAK_EVENT)
else:
- raise ValueError("Unsupported signal: {}".format(sig))
+ raise ValueError("Unsupported signal: {0}".format(sig))
def terminate(self):
"""Terminates the process
|
Python <I> str.format does not support unindexed parameters
The code using Python <I>+ only code was used on Windows only.
--HG--
branch : subprocess-py<I>-win<I>-fix
|
cherrypy_cheroot
|
train
|
py
|
ab797d1b6590a1921373dd85f040fc01a3221de8
|
diff --git a/pkg/controller/service/servicecontroller.go b/pkg/controller/service/servicecontroller.go
index <HASH>..<HASH> 100644
--- a/pkg/controller/service/servicecontroller.go
+++ b/pkg/controller/service/servicecontroller.go
@@ -498,6 +498,11 @@ func (s *ServiceController) needsUpdate(oldService *api.Service, newService *api
if !reflect.DeepEqual(oldService.Annotations, newService.Annotations) {
return true
}
+ if oldService.UID != newService.UID {
+ s.eventRecorder.Eventf(newService, api.EventTypeNormal, "UID", "%v -> %v",
+ oldService.UID, newService.UID)
+ return true
+ }
return false
}
|
A load balancer should be updated if a service's UID has changed.
The load balancer's name is determined by the service's UID. If the
service's UID has changed (presumably due to a delete and recreate),
then we need to recreate the load balancer as well to avoid eventually
leaking the old one.
|
kubernetes_kubernetes
|
train
|
go
|
b151faaba7594dba139fb399f03ba57cc3412c9e
|
diff --git a/lib/Alchemy/Phrasea/Filesystem/FilesystemService.php b/lib/Alchemy/Phrasea/Filesystem/FilesystemService.php
index <HASH>..<HASH> 100644
--- a/lib/Alchemy/Phrasea/Filesystem/FilesystemService.php
+++ b/lib/Alchemy/Phrasea/Filesystem/FilesystemService.php
@@ -45,7 +45,7 @@ class FilesystemService
$pathout = sprintf('%s%s%05d', $repository_path, $comp, $n++);
} while (is_dir($pathout) && iterator_count(new \DirectoryIterator($pathout)) > 100);
- $this->filesystem->mkdir($pathout, 0750);
+ $this->filesystem->mkdir($pathout, 0770);
return $pathout . DIRECTORY_SEPARATOR;
}
|
Change right mask to asset dir PHRAS-<I>
Change right mask to asset dir PHRAS-<I>
|
alchemy-fr_Phraseanet
|
train
|
php
|
fb495a45e980345a94d7656d73e92d6fe51b6a86
|
diff --git a/pysat/_instrument.py b/pysat/_instrument.py
index <HASH>..<HASH> 100644
--- a/pysat/_instrument.py
+++ b/pysat/_instrument.py
@@ -1074,7 +1074,7 @@ class Instrument(object):
output_str += 'Cleaning Level: ' + self.clean_level + '\n'
output_str += 'Data Padding: ' + self.pad.__repr__() + '\n'
output_str += 'Keyword Arguments Passed to load(): '
- output_str += self.kwargs.__repr__() + '\n'
+ output_str += self.kwargs.__str__() + '\n'
output_str += self.custom.__repr__()
# Print out the orbit settings
|
TST: use str instead of repr in str
Use dictionary str representation.
|
rstoneback_pysat
|
train
|
py
|
b86a9f80a35d109f6f6d60f7b5138004a23864a3
|
diff --git a/src/EvalFile_Command.php b/src/EvalFile_Command.php
index <HASH>..<HASH> 100644
--- a/src/EvalFile_Command.php
+++ b/src/EvalFile_Command.php
@@ -57,15 +57,16 @@ class EvalFile_Command extends WP_CLI_Command {
WP_CLI::get_runner()->load_wordpress();
}
- self::execute_eval( $file );
+ self::execute_eval( $file, $args );
}
/**
* Evaluate a provided file.
*
* @param string $file Filepath to execute, or - for STDIN.
+ * @param mixed $args One or more arguments to pass to the file.
*/
- private static function execute_eval( $file ) {
+ private static function execute_eval( $file, $args ) {
if ( '-' === $file ) {
eval( '?>' . file_get_contents( 'php://stdin' ) );
} else {
|
Do not strip $args, as it is needed
|
wp-cli_eval-command
|
train
|
php
|
41f1f897ca7d0b966609c0b39b8fb9596a2327a5
|
diff --git a/neural/afni.py b/neural/afni.py
index <HASH>..<HASH> 100644
--- a/neural/afni.py
+++ b/neural/afni.py
@@ -86,7 +86,7 @@ def dset_info(dset):
for d in details_regex:
m = re.findall(details_regex[d],raw_info)
if len(m):
- setattr(info,d,m[0].group(1))
+ setattr(info,d,m[0])
return info
|
align_epi_anat seems to be deleting more than it should...
|
azraq27_neural
|
train
|
py
|
c6d12d5e1d51bf9559a67ea9f6b8211d212590d6
|
diff --git a/modeldict/base.py b/modeldict/base.py
index <HASH>..<HASH> 100644
--- a/modeldict/base.py
+++ b/modeldict/base.py
@@ -5,8 +5,9 @@ import base64
class PersistedDict(object):
"""
Dictionary that calls out to its persistant data store when items are
- created or deleted. Caches data in process for a set time period before
- refreshing from the persistant data store.
+ created or deleted. Syncs with data fron the data store before every read,
+ unless ``autosync=False`` is passed, which causes the dict to only sync
+ data from the data store on writes and when ``sync()`` is called.
"""
def __init__(self, autosync=True):
|
Change docstring for class to actually make sense.
|
disqus_durabledict
|
train
|
py
|
a3faea133632dba075e090a5d8a888718043a1f1
|
diff --git a/src/LaravelAnalyticsServiceProvider.php b/src/LaravelAnalyticsServiceProvider.php
index <HASH>..<HASH> 100644
--- a/src/LaravelAnalyticsServiceProvider.php
+++ b/src/LaravelAnalyticsServiceProvider.php
@@ -75,6 +75,8 @@ class LaravelAnalyticsServiceProvider extends ServiceProvider
'use_objects' => true,
]
);
+
+ $client->setClassConfig('Google_Cache_File', 'directory', storage_path('app/google_cache'));
$client->setAccessType('offline');
|
Set the google cache path to the Laravel storage dir
Keeps temporary files inside the storage directory. Useful for servers with open_basedir restrictions.
|
spatie_laravel-analytics
|
train
|
php
|
d3c2bd33e1f88cb225ccf521763ad79b7162bace
|
diff --git a/server/Top.rb b/server/Top.rb
index <HASH>..<HASH> 100755
--- a/server/Top.rb
+++ b/server/Top.rb
@@ -25,7 +25,6 @@ require 'Measure.rb'
require 'Actuator.rb'
require 'Publish.rb'
require 'globals.rb'
-require 'sql.rb'
# List of library include
require 'yaml'
@@ -122,6 +121,7 @@ class Top
}
if @config['database']
+ require 'sql.rb'
$database = Database.new(@config)
# store config if not done before
|
Include sql.rb only if database is present in config
|
openplacos_openplacos
|
train
|
rb
|
7e6b87db076bbeba7733613ca928293b50af5da2
|
diff --git a/src/android/LocationManager.java b/src/android/LocationManager.java
index <HASH>..<HASH> 100644
--- a/src/android/LocationManager.java
+++ b/src/android/LocationManager.java
@@ -1267,7 +1267,9 @@ public class LocationManager extends CordovaPlugin implements BeaconConsumer {
private void _handleExceptionOfCommand(CallbackContext callbackContext, Exception exception) {
Log.e(TAG, "Uncaught exception: " + exception.getMessage());
- Log.e(TAG, "Stack trace: " + exception.getStackTrace());
+ final StackTraceElement[] stackTrace = exception.getStackTrace();
+ final String stackTraceElementsAsString = Arrays.toString(stackTrace);
+ Log.e(TAG, "Stack trace: " + stackTraceElementsAsString);
// When calling without a callback from the client side the command can be null.
if (callbackContext == null) {
|
Android - Fixed IDE (Android Studio) warning where toString() was implicitly called on an array (the stack trace elements of exceptions').
|
petermetz_cordova-plugin-ibeacon
|
train
|
java
|
e03553b5b2c0e5d52e7d0c6771347313153091ca
|
diff --git a/graylog2-server/src/main/java/org/graylog2/database/PersistedServiceImpl.java b/graylog2-server/src/main/java/org/graylog2/database/PersistedServiceImpl.java
index <HASH>..<HASH> 100644
--- a/graylog2-server/src/main/java/org/graylog2/database/PersistedServiceImpl.java
+++ b/graylog2-server/src/main/java/org/graylog2/database/PersistedServiceImpl.java
@@ -287,6 +287,7 @@ public class PersistedServiceImpl implements PersistedService {
// Work on embedded Maps, too.
if (x.getValue() instanceof Map) {
+ x.setValue(Maps.newHashMap((Map<String, Object>) x.getValue()));
fieldTransformations((Map<String, Object>) x.getValue());
continue;
}
|
Ensure we use a mutable map to persist data
|
Graylog2_graylog2-server
|
train
|
java
|
127e7ca40bb319a3685bcd58e74e9096c9f8fbf5
|
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -8,7 +8,7 @@ CHANGES = open(os.path.join(here, 'HISTORY.rst')).read()
requires = [
'pyramid',
- 'skosprovider>=0.2.0dev'
+ 'skosprovider>=0.2.0a1'
]
tests_requires = [
@@ -26,7 +26,7 @@ setup(
long_description=README + '\n\n' + CHANGES,
classifiers=[
'Intended Audience :: Developers',
- 'Development Status :: 4 - Beta',
+ 'Development Status :: 3 - Alpha',
'License :: OSI Approved :: MIT License',
'Programming Language :: Python',
'Programming Language :: Python :: 2.6',
@@ -48,6 +48,6 @@ setup(
},
test_suite='nose.collector',
dependency_links = [
- 'https://github.com/koenedaele/skosprovider/tarball/zerotwo#egg=skosprovider-0.2.0',
+ 'https://github.com/koenedaele/skosprovider/tarball/zerotwo#egg=skosprovider-0.2.0a1',
]
)
|
Mark as version <I>a1
|
koenedaele_pyramid_skosprovider
|
train
|
py
|
49024f1bef6a632c59287f5f0e65626e96061d96
|
diff --git a/tornado/test/twisted_test.py b/tornado/test/twisted_test.py
index <HASH>..<HASH> 100644
--- a/tornado/test/twisted_test.py
+++ b/tornado/test/twisted_test.py
@@ -24,6 +24,7 @@ import shutil
import signal
import tempfile
import threading
+import warnings
try:
import fcntl
@@ -444,7 +445,11 @@ class CompatibilityTests(unittest.TestCase):
# a Protocol.
client = Agent(self.reactor)
response = yield client.request('GET', url)
- body[0] = yield readBody(response)
+ with warnings.catch_warnings():
+ # readBody has a buggy DeprecationWarning in Twisted 15.0:
+ # https://twistedmatrix.com/trac/changeset/43379
+ warnings.simplefilter('ignore', category=DeprecationWarning)
+ body[0] = yield readBody(response)
self.stop_loop()
self.io_loop.add_callback(f)
runner()
|
Fix a DeprecationWarning in twisted_test with Twisted <I>.
|
tornadoweb_tornado
|
train
|
py
|
a5633393c990a216d645b48c4f04afe471d15169
|
diff --git a/salt/config.py b/salt/config.py
index <HASH>..<HASH> 100644
--- a/salt/config.py
+++ b/salt/config.py
@@ -1722,9 +1722,10 @@ def get_id(root_dir=None, minion_id=False, cache=True):
with salt.utils.fopen('/etc/hosts') as hfl:
for line in hfl:
names = line.split()
- if not names:
+ try:
+ ip_ = names.pop(0)
+ except IndexError:
continue
- ip_ = names.pop(0)
if ip_.startswith('127.'):
for name in names:
if name != 'localhost':
|
More concise fix for empty /etc/hosts line check
|
saltstack_salt
|
train
|
py
|
b68808e8da9861ba4a82a473d0b6a6c83301e340
|
diff --git a/clarent/certificate.py b/clarent/certificate.py
index <HASH>..<HASH> 100644
--- a/clarent/certificate.py
+++ b/clarent/certificate.py
@@ -104,7 +104,9 @@ class SecureCiphersContextFactory(object):
# Since we can multiplex everything over a single connection, this
# doesn't really matter as much. Also, GCM is not as preferred,
# because GHASH is apparently very hard to implement without leaking
-# timing information.
+# timing information. It's still available, so that clients who know
+# that theirs is good (i.e. they have a hardware implementation) can
+# still get it.
ciphersuites = ":".join((
# Fast, PFS, secure. Yay!
"ECDHE-RSA-AES128-SHA", "ECDHE-ECDSA-AES128-SHA",
|
Clarify ciphersuite choices
|
crypto101_clarent
|
train
|
py
|
d03149ce16fc8842bdb1a5568c07c6ffa59bf761
|
diff --git a/manifest.php b/manifest.php
index <HASH>..<HASH> 100755
--- a/manifest.php
+++ b/manifest.php
@@ -36,7 +36,7 @@ return array(
'taoLti' => '>=3.2.2',
'taoLtiBasicOutcome' => '>=2.6',
'taoResultServer' => '>=4.2.0',
- 'taoDelivery' => '>=7.0.0'
+ 'taoDelivery' => '>=7.5.1'
),
'models' => array(
'http://www.tao.lu/Ontologies/TAOLTI.rdf',
|
Require correct taoDelivery version
|
oat-sa_extension-tao-ltideliveryprovider
|
train
|
php
|
d3ef1708b406cd06aae58912c8616de409e5bac6
|
diff --git a/tickets/views.py b/tickets/views.py
index <HASH>..<HASH> 100644
--- a/tickets/views.py
+++ b/tickets/views.py
@@ -50,4 +50,5 @@ class TicketCreateView(CreateView):
ticket.creator = self.request.user
ticket.save()
self.success_url = reverse('tickets:detail', args=[ticket.id])
+ messages.success(self.request, 'Ticket created.')
return super(TicketCreateView, self).form_valid(form)
|
add ticket created success message to ticket create view
|
byteweaver_django-tickets
|
train
|
py
|
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.