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
|
|---|---|---|---|---|---|
26288ca75275ded6ac65c0d1707062e77ab36c98
|
diff --git a/code/site/components/com_default/templates/helpers/date.php b/code/site/components/com_default/templates/helpers/date.php
index <HASH>..<HASH> 100644
--- a/code/site/components/com_default/templates/helpers/date.php
+++ b/code/site/components/com_default/templates/helpers/date.php
@@ -49,7 +49,7 @@ class ComDefaultTemplateHelperDate extends KTemplateHelperDate
{
$config = new KConfig($config);
$config->append(array(
- 'gmt_offset' => KFactory::get('lib.joomla.config')->getValue('config.offset') * 3600
+ 'gmt_offset' => 0
));
return parent::humanize($config);
|
Set gmt_offset config option to 0 by default
|
joomlatools_joomlatools-framework
|
train
|
php
|
21d072244b867140bf51b2cc882dae684c70084d
|
diff --git a/inotify/adapters.py b/inotify/adapters.py
index <HASH>..<HASH> 100644
--- a/inotify/adapters.py
+++ b/inotify/adapters.py
@@ -261,7 +261,7 @@ class InotifyTrees(BaseTree):
self.__load_trees(paths)
def __load_trees(self, paths):
- _LOGGER.debug("Adding initial watches on trees: [%s]", ",".join(paths))
+ _LOGGER.debug("Adding initial watches on trees: [%s]", ",".join(map(str, paths)))
q = paths
while q:
|
resolves #<I>, list of binary paths can't be logged with existing call
|
dsoprea_PyInotify
|
train
|
py
|
a1e87080cfd44be04b71329c484da7ac3e9398b8
|
diff --git a/src/metapensiero/signal/utils.py b/src/metapensiero/signal/utils.py
index <HASH>..<HASH> 100644
--- a/src/metapensiero/signal/utils.py
+++ b/src/metapensiero/signal/utils.py
@@ -50,6 +50,7 @@ class MultipleResults(Awaitable):
res = await coro
self._results[ix] = res
self.results = tuple(self._results)
+ del self._results
self.done = True
return self.results
|
Remove _results when they aren't needed anymore
|
metapensiero_metapensiero.signal
|
train
|
py
|
3b2f557fc1ba505def6e8555bd1706efc7f417fd
|
diff --git a/openquake/engine/tools/make_html_report.py b/openquake/engine/tools/make_html_report.py
index <HASH>..<HASH> 100644
--- a/openquake/engine/tools/make_html_report.py
+++ b/openquake/engine/tools/make_html_report.py
@@ -186,10 +186,9 @@ def make_report(isodate='today'):
txt = view_fullreport('fullreport', ds)
report = html_parts(txt)
except Exception as exc:
- raise
report = dict(
html_title='Could not generate report: %s' % cgi.escape(
- unicode(exc), quote=True),
+ exc, quote=True),
fragment='')
page = report['html_title']
|
Removed a debugging raise
Former-commit-id: ea0c5f<I>a3b<I>f7e<I>a4e<I>f<I>
|
gem_oq-engine
|
train
|
py
|
2990f156c265d04916977b7205a46b3332364d37
|
diff --git a/lib/rails-env/version.rb b/lib/rails-env/version.rb
index <HASH>..<HASH> 100644
--- a/lib/rails-env/version.rb
+++ b/lib/rails-env/version.rb
@@ -1,5 +1,5 @@
# frozen_string_literal: true
module RailsEnv
- VERSION = "2.0.1"
+ VERSION = "2.0.2"
end
|
Bump up version (<I>).
|
fnando_rails-env
|
train
|
rb
|
b1305810c910a1f9354fff6dfb6397f60df8b2bb
|
diff --git a/lib/celluloid/zmq/sockets.rb b/lib/celluloid/zmq/sockets.rb
index <HASH>..<HASH> 100644
--- a/lib/celluloid/zmq/sockets.rb
+++ b/lib/celluloid/zmq/sockets.rb
@@ -1,13 +1,12 @@
module Celluloid
module ZMQ
- attr_reader :linger
-
class Socket
# Create a new socket
def initialize(type)
@socket = Celluloid::ZMQ.context.socket ::ZMQ.const_get(type.to_s.upcase)
@linger = 0
end
+ attr_reader :linger
# Connect to the given 0MQ address
# Address should be in the form: tcp://1.2.3.4:5678/
|
Move the Socket#linger reader to the right place
|
celluloid_celluloid-zmq
|
train
|
rb
|
412f82061e051eda895a8b661d8411d6d8c64d4e
|
diff --git a/cachalot/utils.py b/cachalot/utils.py
index <HASH>..<HASH> 100644
--- a/cachalot/utils.py
+++ b/cachalot/utils.py
@@ -65,6 +65,7 @@ def check_parameter_types(params):
elif cl is dict:
check_parameter_types(p.items())
else:
+ print(params, [text_type(p) for p in params])
raise UncachableQuery
|
Prints again a debug line to understand why Travis CI is failing… -_-
|
noripyt_django-cachalot
|
train
|
py
|
a8c88aab05d8a6669da8da6c42c042a4b11ec397
|
diff --git a/EventListener/Cloner/CopyUploadablesSubscriber.php b/EventListener/Cloner/CopyUploadablesSubscriber.php
index <HASH>..<HASH> 100644
--- a/EventListener/Cloner/CopyUploadablesSubscriber.php
+++ b/EventListener/Cloner/CopyUploadablesSubscriber.php
@@ -129,6 +129,10 @@ class CopyUploadablesSubscriber implements EventSubscriberInterface
*/
private function generateTmpPathname(): string
{
+ if (!is_dir($this->tmpDir) && !mkdir($this->tmpDir, 0777, true)) {
+ throw new \RuntimeException(sprintf('Unable to create temporary files directory "%s".', $this->tmpDir));
+ }
+
$pathname = @tempnam($this->tmpDir, '');
if (false === $pathname) {
|
Create temporary files directory in copy uploadables event subscriber.
|
DarvinStudio_darvin-utils
|
train
|
php
|
bdc0613579a843a1347ec35b972c46921345c3f5
|
diff --git a/hiyapyco/__init__.py b/hiyapyco/__init__.py
index <HASH>..<HASH> 100644
--- a/hiyapyco/__init__.py
+++ b/hiyapyco/__init__.py
@@ -73,6 +73,7 @@ METHOD_SUBSTITUTE = METHODS['METHOD_SUBSTITUTE']
class HiYaPyCo:
"""Main class"""
+ # pylint: disable=too-many-instance-attributes
def __init__(self, *args, **kwargs):
"""
args: YAMLfile(s)
|
make pylint silently ignore too-many-instance-attributes on main class
|
zerwes_hiyapyco
|
train
|
py
|
4cc1e69460f773f189d0360bd93dca1f38394ed6
|
diff --git a/lib/index.js b/lib/index.js
index <HASH>..<HASH> 100644
--- a/lib/index.js
+++ b/lib/index.js
@@ -1,3 +1,5 @@
+/* jshint unused: false */
+
/**
* RETSr.io rets.js RETS Client
* @module RETS
diff --git a/lib/resolve.js b/lib/resolve.js
index <HASH>..<HASH> 100644
--- a/lib/resolve.js
+++ b/lib/resolve.js
@@ -1,13 +1,15 @@
+/* jshint unused: false */
+
var Resolve = exports;
var debug = require('debug')('rets.js:resolve');
-var URL = require('url');
+var url = require('url');
var util = require('util');
Resolve.endpoint = function(url){
};
Resolve.operation = function(operand){
-}
+};
|
Adding joshing directives to prevent files that are known to be incomplete (stubs) form triggering errors.
We’ll remove these as we progress. For now, it’s ok to have these unused variables.
|
retsr_rets.js
|
train
|
js,js
|
f436749e9b3a31665ed179c7db9cc718bd77cca4
|
diff --git a/spec/functional/resource/git_spec.rb b/spec/functional/resource/git_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/functional/resource/git_spec.rb
+++ b/spec/functional/resource/git_spec.rb
@@ -24,7 +24,11 @@ require 'tmpdir'
describe Chef::Resource::Git do
include Chef::Mixin::ShellOut
let(:file_cache_path) { Dir.mktmpdir }
- let(:deploy_directory) { Dir.mktmpdir }
+ # Some versions of git complains when the deploy directory is
+ # already created. Here we intentionally don't create the deploy
+ # directory beforehand.
+ let(:base_dir_path) { Dir.mktmpdir }
+ let(:deploy_directory) { File.join(base_dir_path, make_tmpname("git_base")) }
let(:node) do
Chef::Node.new.tap do |n|
|
Make git_spec work with older git versions.
|
chef_chef
|
train
|
rb
|
0b2352756ddd93c1e9114e1f259187b93d9f57c5
|
diff --git a/molo/core/templatetags/core_tags.py b/molo/core/templatetags/core_tags.py
index <HASH>..<HASH> 100644
--- a/molo/core/templatetags/core_tags.py
+++ b/molo/core/templatetags/core_tags.py
@@ -170,7 +170,7 @@ def load_descendant_articles_for_section(
@register.assignment_tag(takes_context=True)
-def load_child_articles_for_section(context, section, count=5):
+def load_child_articles_for_section(context, section, count=None):
'''
Returns all child articles
If the `locale_code` in the context is not the main language, it will
@@ -181,6 +181,9 @@ def load_child_articles_for_section(context, section, count=5):
qs = section.articles()
+ print count
+ if not count:
+ count = 1
# Pagination
paginator = Paginator(qs, count)
|
setting count back to default to None for articles
|
praekeltfoundation_molo
|
train
|
py
|
562021bd3e2953750c5282946e54a5260fe2d46f
|
diff --git a/hydpy/core/magictools.py b/hydpy/core/magictools.py
index <HASH>..<HASH> 100644
--- a/hydpy/core/magictools.py
+++ b/hydpy/core/magictools.py
@@ -17,7 +17,6 @@ from hydpy.core import filetools
from hydpy.core import parametertools
from hydpy.core import devicetools
-_warnsimulationstep = True
class Tester(object):
@@ -69,6 +68,8 @@ class Tester(object):
modulename = '.'.join((self.package, name))
module = importlib.import_module(modulename)
warnings.filterwarnings('error', module=modulename)
+ warnings.filterwarnings('ignore',
+ category=ImportWarning)
doctest.testmod(module, extraglobs={'testing': True})
warnings.resetwarnings()
finally:
|
prevent ImportWarnings from becoming exceptions (see the last commits)
|
hydpy-dev_hydpy
|
train
|
py
|
6b5fbda28dc77c4ad56050d7d1e9fdba59af3c4f
|
diff --git a/modules/mapbox/src/deck-utils.js b/modules/mapbox/src/deck-utils.js
index <HASH>..<HASH> 100644
--- a/modules/mapbox/src/deck-utils.js
+++ b/modules/mapbox/src/deck-utils.js
@@ -1,4 +1,5 @@
import {Deck} from '@deck.gl/core';
+import {withParameters} from 'luma.gl';
export function getDeckInstance({map, gl, deck}) {
// Only create one deck instance per context
@@ -165,7 +166,19 @@ function handleMouseEvent(deck, event) {
srcEvent: event.originalEvent
};
}
- callback(event);
+
+ // Work around for https://github.com/mapbox/mapbox-gl-js/issues/7801
+ const {gl} = deck.layerManager.context;
+ withParameters(
+ gl,
+ {
+ depthMask: true,
+ depthTest: true,
+ depthRange: [0, 1],
+ colorMask: [true, true, true, true]
+ },
+ () => callback(event)
+ );
}
// Register deck callbacks for pointer events
|
Fix occasional picking failure in mapbox layer (#<I>)
|
uber_deck.gl
|
train
|
js
|
a69c0676edaaab1acbb91a7a68b161a0394fbaf4
|
diff --git a/resources/views/admin/includes/media-uploader.blade.php b/resources/views/admin/includes/media-uploader.blade.php
index <HASH>..<HASH> 100644
--- a/resources/views/admin/includes/media-uploader.blade.php
+++ b/resources/views/admin/includes/media-uploader.blade.php
@@ -29,7 +29,7 @@
:max-number-of-files="{{ $mediaCollection->getMaxNumberOfFiles() }}"
@endif
@if($mediaCollection->getMaxFileSize())
- :max-file-size-in-mb="{{ round($mediaCollection->getMaxFileSize()/1024/1024) }}"
+ :max-file-size-in-mb="{{ round(($mediaCollection->getMaxFileSize()/1024/1024), 2) }}"
@endif
@if($mediaCollection->getAcceptedFileTypes())
:accepted-file-types="'{{ implode($mediaCollection->getAcceptedFileTypes(), '') }}'"
|
max file size round fix (#<I>)
|
BRACKETS-by-TRIAD_admin-ui
|
train
|
php
|
9f12a22df844bd0bb9e4de3a6b2e04fbc8a3688c
|
diff --git a/doc/ex/preview.rb b/doc/ex/preview.rb
index <HASH>..<HASH> 100755
--- a/doc/ex/preview.rb
+++ b/doc/ex/preview.rb
@@ -3,7 +3,14 @@
require 'RMagick'
img = Magick::Image.read("images/Blonde_with_dog.jpg").first
-preview = img.preview(Magick::SolarizePreview)
+
+begin
+ preview = img.preview(Magick::SolarizePreview)
+rescue NotImplementedError
+ img = Image.read('images/notimplemented.gif').first
+ img.write('preview.jpg')
+ exit
+end
preview.minify.write('preview.jpg')
exit
|
Handle "not supported" exception when built with IM < <I>
|
rmagick_rmagick
|
train
|
rb
|
c93d923a0f44c8a0b75de8c4a3feebf41529eccb
|
diff --git a/spyder/app/tests/test_mainwindow.py b/spyder/app/tests/test_mainwindow.py
index <HASH>..<HASH> 100644
--- a/spyder/app/tests/test_mainwindow.py
+++ b/spyder/app/tests/test_mainwindow.py
@@ -1594,24 +1594,6 @@ def test_troubleshooting_menu_item_and_url(monkeypatch):
@flaky(max_runs=3)
@pytest.mark.slow
-def test_tabfilter_typeerror_full(main_window):
- """Test for #5813 ; event filter handles None indicies when moving tabs."""
- MockEvent = MagicMock()
- MockEvent.return_value.type.return_value = QEvent.MouseMove
- MockEvent.return_value.pos.return_value = 0
- mockEvent_instance = MockEvent()
-
- test_tabbar = main_window.findChildren(QTabBar)[0]
- test_tabfilter = TabFilter(test_tabbar, main_window)
- test_tabfilter.from_index = None
- test_tabfilter.moving = True
-
- assert test_tabfilter.eventFilter(None, mockEvent_instance)
- assert mockEvent_instance.pos.call_count == 1
-
-
-@flaky(max_runs=3)
-@pytest.mark.slow
@pytest.mark.xfail
def test_help_opens_when_show_tutorial_full(main_window, qtbot):
"""Test fix for #6317 : 'Show tutorial' opens the help plugin if closed."""
|
Testing: Remove test that no longer applies
|
spyder-ide_spyder
|
train
|
py
|
0e2a7cc977ca467499d8dc36d7eb404e2c9cd813
|
diff --git a/hot_redis.py b/hot_redis.py
index <HASH>..<HASH> 100644
--- a/hot_redis.py
+++ b/hot_redis.py
@@ -109,7 +109,7 @@ class Bitwise(Base):
__rrshift__ = op_right(operator.rshift)
-class Iterable(Base):
+class Sequential(Base):
__add__ = op_left(operator.add)
__mul__ = op_left(operator.mul)
@@ -145,7 +145,7 @@ class Numeric(Base):
__ipow__ = inplace("number_pow")
-class List(Iterable):
+class List(Sequential):
@property
def value(self):
@@ -423,7 +423,7 @@ class Dict(Base):
return cls({}.fromkeys(*args))
-class String(Iterable):
+class String(Sequential):
@property
def value(self):
|
More accurate name for List/String base class: Iterable -> Sequential
|
stephenmcd_hot-redis
|
train
|
py
|
973e184e106252f1f36272e16948a9e1ac2d2dc1
|
diff --git a/tests/test-timber-term.php b/tests/test-timber-term.php
index <HASH>..<HASH> 100644
--- a/tests/test-timber-term.php
+++ b/tests/test-timber-term.php
@@ -11,7 +11,7 @@
function testGetTermWithObject() {
$term_id = $this->factory->term->create(array('name' => 'Famous Commissioners'));
$term_data = get_term($term_id, 'post_tag');
- $this->assertEquals('WP_Term', get_class($term_data));
+ $this->assertTrue( in_array( get_class($term_data), array('WP_Term', 'stdClass') ) );
$term = new TimberTerm($term_id);
$this->assertEquals('Famous Commissioners', $term->name());
$this->assertEquals('TimberTerm', get_class($term));
|
Fixed test for how WP <I> returns Term objects
|
timber_timber
|
train
|
php
|
407878dc608c5e74f2ac74c8dc308c2800c0b2bb
|
diff --git a/index.js b/index.js
index <HASH>..<HASH> 100644
--- a/index.js
+++ b/index.js
@@ -42,9 +42,7 @@ function rehype2react(options) {
}
}
- var hast = tableCellStyle(node);
-
- return toH(h, hast, settings.prefix);
+ return toH(h, tableCellStyle(node), settings.prefix);
}
/* Wrap `createElement` to pass components in. */
|
style(table): Do it in one line
|
rhysd_rehype-react
|
train
|
js
|
5eca326c3568566f334b31b18f7866af19a989c8
|
diff --git a/codec/src/main/java/io/netty/handler/codec/ByteToMessageDecoder.java b/codec/src/main/java/io/netty/handler/codec/ByteToMessageDecoder.java
index <HASH>..<HASH> 100644
--- a/codec/src/main/java/io/netty/handler/codec/ByteToMessageDecoder.java
+++ b/codec/src/main/java/io/netty/handler/codec/ByteToMessageDecoder.java
@@ -265,8 +265,8 @@ public abstract class ByteToMessageDecoder extends ChannelInboundHandlerAdapter
callDecode(ctx, cumulation, out);
} catch (DecoderException e) {
throw e;
- } catch (Throwable t) {
- throw new DecoderException(t);
+ } catch (Exception e) {
+ throw new DecoderException(e);
} finally {
if (cumulation != null && !cumulation.isReadable()) {
numReads = 0;
@@ -455,7 +455,7 @@ public abstract class ByteToMessageDecoder extends ChannelInboundHandlerAdapter
}
} catch (DecoderException e) {
throw e;
- } catch (Throwable cause) {
+ } catch (Exception cause) {
throw new DecoderException(cause);
}
}
|
Do not treat errors as decoder exception
Motivation: Today when Netty encounters a general error while decoding
it treats this as a decoder exception. However, for fatal causes this
should not be treated as such, instead the fatal error should be carried
up the stack without the callee having to unwind causes.
Modifications: Instead of translating any error to a decoder exception,
we let those unwind out the stack (note that finally blocks still
execute).
Result: Fatal errors will not be treated as innocent decoder exceptions.
|
netty_netty
|
train
|
java
|
bf51c482887a0910e0d2d352f6fca7f01a2edda0
|
diff --git a/src/lang/number.js b/src/lang/number.js
index <HASH>..<HASH> 100644
--- a/src/lang/number.js
+++ b/src/lang/number.js
@@ -74,12 +74,12 @@ Number.prototype.round = function () {
* @alias toHex
* @return {string} converted hexadecimal value
*/
-Number.prototype.toHex = function () {
+Number.prototype.toHex = (function () {
var hexString = "0123456789ABCDEF";
return function () {
return hexString.charAt((this - (this % 16)) >> 4) + hexString.charAt(this % 16);
};
-}();
+})();
/**
* Returns a value indicating the sign of a number<br>
|
Wrap with () to show immediate invocation.
|
melonjs_melonJS
|
train
|
js
|
d3c41137fac4243e02df410fe4fd592d472d31fe
|
diff --git a/Cache/ConfigWarmer.php b/Cache/ConfigWarmer.php
index <HASH>..<HASH> 100644
--- a/Cache/ConfigWarmer.php
+++ b/Cache/ConfigWarmer.php
@@ -29,8 +29,14 @@ class ConfigWarmer implements CacheWarmerInterface
public function warmUp($cacheDir)
{
- // this forces the full processing of the backend configuration
- $this->configManager->getBackendConfig();
+ try {
+ // this forces the full processing of the backend configuration
+ $this->configManager->getBackendConfig();
+ } catch (\PDOException $e) {
+ // this occurs for example when the database doesn't exist yet and the
+ // project is being installed ('composer install' clears the cache at the end)
+ // ignore this error at this point and display an error message later
+ }
}
public function isOptional()
|
Prevent error messages when installing an app and the DB doesn't exist
|
EasyCorp_EasyAdminBundle
|
train
|
php
|
115ab90138e068aedab7d816a26da63102e4be35
|
diff --git a/mock/mock.go b/mock/mock.go
index <HASH>..<HASH> 100644
--- a/mock/mock.go
+++ b/mock/mock.go
@@ -146,7 +146,7 @@ func (c *Call) After(d time.Duration) *Call {
// arg := args.Get(0).(*map[string]interface{})
// arg["foo"] = "bar"
// })
-func (c *Call) Run(fn func(Arguments)) *Call {
+func (c *Call) Run(fn func(args Arguments)) *Call {
c.lock()
defer c.unlock()
c.RunFn = fn
|
Provide argument name `args` in function signature
This mainly serves to make code-completion better in IDEs that automatically create the function signature.
|
stretchr_testify
|
train
|
go
|
2c85552643c9e0407a771e357250bec77eb3f617
|
diff --git a/jsonapi/api.py b/jsonapi/api.py
index <HASH>..<HASH> 100644
--- a/jsonapi/api.py
+++ b/jsonapi/api.py
@@ -278,7 +278,9 @@ class API(object):
duration=time.time() - time_start)
return response
- if resource.Meta.authenticators:
+ if resource.Meta.authenticators and not (
+ request.method == "GET" and
+ resource.Meta.disable_get_authentication):
user = resource.authenticate(request)
if user is None or not user.is_authenticated():
response = HttpResponse("Not Authenticated", status=401)
diff --git a/jsonapi/auth.py b/jsonapi/auth.py
index <HASH>..<HASH> 100644
--- a/jsonapi/auth.py
+++ b/jsonapi/auth.py
@@ -54,6 +54,7 @@ class Authenticator(object):
class Meta:
authenticators = []
+ disable_get_authentication = None
@classmethod
def authenticate(cls, request):
|
allow user to disable get authenticators and maintain access rights on the application level
|
pavlov99_jsonapi
|
train
|
py,py
|
91e69291809977bee5c6031fe27eff376bf356ad
|
diff --git a/src/jquery.continuous-calendar/jquery.continuous-calendar.js b/src/jquery.continuous-calendar/jquery.continuous-calendar.js
index <HASH>..<HASH> 100644
--- a/src/jquery.continuous-calendar/jquery.continuous-calendar.js
+++ b/src/jquery.continuous-calendar/jquery.continuous-calendar.js
@@ -248,7 +248,7 @@
function todayStyle(date) {return date.isToday() ? 'today' : '';}
function initSingleDateCalendarEvents() {
- $('.date', container).live('click', function() {
+ $('.date', container).bind('click', function() {
var dateCell = $(this);
if (dateCell.hasClass('disabled')) return;
$('td.selected', container).removeClass('selected');
|
change live event to bind in order to encapsulate events
|
continuouscalendar_dateutils
|
train
|
js
|
36a39b81a7333c108a10b488417a6006427b1d6b
|
diff --git a/hazelcast/src/test/java/com/hazelcast/nio/tcp/nonblocking/iobalancer/IOBalancerMemoryLeakTest.java b/hazelcast/src/test/java/com/hazelcast/nio/tcp/nonblocking/iobalancer/IOBalancerMemoryLeakTest.java
index <HASH>..<HASH> 100644
--- a/hazelcast/src/test/java/com/hazelcast/nio/tcp/nonblocking/iobalancer/IOBalancerMemoryLeakTest.java
+++ b/hazelcast/src/test/java/com/hazelcast/nio/tcp/nonblocking/iobalancer/IOBalancerMemoryLeakTest.java
@@ -48,6 +48,7 @@ public class IOBalancerMemoryLeakTest extends HazelcastTestSupport {
@Test
public void testMemoryLeak() throws IOException {
Config config = new Config();
+ config.getGroupConfig().setName(randomName());
config.setProperty(GroupProperty.REST_ENABLED, "true");
HazelcastInstance instance = Hazelcast.newHazelcastInstance(config);
HTTPCommunicator communicator = new HTTPCommunicator(instance);
|
randomize group name to make this test prone to unintentional joins from multicast.
|
hazelcast_hazelcast
|
train
|
java
|
32b6a3e1e9cfd0ad681f4bba97dfdb3273fcb021
|
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -8,7 +8,7 @@ def read(fname):
setup(
name="okcupyd",
- version="0.6.2",
+ version="0.6.3",
packages=find_packages(exclude=('tests', '*.db')),
install_requires=['lxml', 'requests >= 2.4.1', 'simplejson',
'sqlalchemy >= 0.9.0', 'ipython >= 2.2.0',
|
version bumpo to <I>
|
IvanMalison_okcupyd
|
train
|
py
|
0d3769d16cdb6c9e2718a8149fe6a70fb74f1fd7
|
diff --git a/lib/keymail/version.rb b/lib/keymail/version.rb
index <HASH>..<HASH> 100644
--- a/lib/keymail/version.rb
+++ b/lib/keymail/version.rb
@@ -1,3 +1,3 @@
module Keymail
- VERSION = "0.0.1"
+ VERSION = "0.1.0"
end
|
Set initial version to <I> in favor of SemVer
|
alcesleo_keymail
|
train
|
rb
|
4491c3703619ece92e5519f73cee358c4a66330f
|
diff --git a/pymatbridge/matlab_magic.py b/pymatbridge/matlab_magic.py
index <HASH>..<HASH> 100644
--- a/pymatbridge/matlab_magic.py
+++ b/pymatbridge/matlab_magic.py
@@ -235,7 +235,7 @@ class MatlabMagics(Magics):
if len(imgf):
# Store the path to the directory so that you can delete it
# later on:
- image = open(imgf, 'rb').read().decode('utf-8')
+ image = open(imgf, 'rb').read()
if ipython_version < 3:
display_data.append(('MatlabMagic.matlab',
{'image/png':image}))
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100755
--- a/setup.py
+++ b/setup.py
@@ -31,7 +31,7 @@ else:
# Get version and release info, which is all stored in pymatbridge/version.py
ver_file = os.path.join('pymatbridge', 'version.py')
-exec(open(ver_file).read().decode('utf-8'))
+exec(open(ver_file).read())
opts = dict(name=NAME,
maintainer=MAINTAINER,
|
BF: No need for these calls to `decode`.
In my hands, these caused crashes on installation and testing on both python 2
and python 3.
|
arokem_python-matlab-bridge
|
train
|
py,py
|
6882cd04e11a9059c5074bb51f847145d7373a09
|
diff --git a/server.js b/server.js
index <HASH>..<HASH> 100644
--- a/server.js
+++ b/server.js
@@ -200,7 +200,11 @@ function cache(f) {
}
var badgeData = getBadgeData('vendor', data);
badgeData.text[1] = 'unresponsive';
- badge(badgeData, makeSend(match[0].split('.').pop(), ask.res, end));
+ var extension;
+ try {
+ extension = match[0].split('.').pop();
+ } catch(e) { extension = 'svg'; }
+ badge(badgeData, makeSend(extension, ask.res, end));
}, 25000);
// Only call vendor servers when last request is older than…
|
Avoid risk of crash with URL extension
Part of #<I>
|
badges_shields
|
train
|
js
|
cbf949ddb5dac44df2c9e2d0a7185862dfc2a7da
|
diff --git a/models.py b/models.py
index <HASH>..<HASH> 100644
--- a/models.py
+++ b/models.py
@@ -11,7 +11,7 @@ from warnings import warn
from abstractions import ModelGibbsSampling, ModelMeanField, ModelEM
from abstractions import Distribution, GibbsSampling, MeanField, Collapsed, MaxLikelihood
from distributions import Categorical, CategoricalAndConcentration
-from internals.labels import Labels, FrozenLabels, CRPLabels
+from internals.labels import Labels, CRPLabels
from pyhsmm.util.stats import getdatasize
|
removed old FrozenLabels ref
|
mattjj_pybasicbayes
|
train
|
py
|
493606e7adaa93823a6aa776452b604b38522b28
|
diff --git a/core/src/test/java/me/prettyprint/hector/api/DynamicCompositeTest.java b/core/src/test/java/me/prettyprint/hector/api/DynamicCompositeTest.java
index <HASH>..<HASH> 100644
--- a/core/src/test/java/me/prettyprint/hector/api/DynamicCompositeTest.java
+++ b/core/src/test/java/me/prettyprint/hector/api/DynamicCompositeTest.java
@@ -7,6 +7,7 @@ import java.math.BigInteger;
import java.nio.ByteBuffer;
import java.util.UUID;
+import me.prettyprint.cassandra.utils.TimeUUIDUtils;
import me.prettyprint.hector.api.beans.DynamicComposite;
import org.apache.cassandra.utils.ByteBufferUtil;
@@ -48,7 +49,8 @@ public class DynamicCompositeTest {
o = c.get(0);
assertTrue(o instanceof Long);
- b = createDynamicCompositeKey("Hello", UUID.randomUUID(), 10, false);
+ b = createDynamicCompositeKey("Hello",
+ TimeUUIDUtils.getUniqueTimeUUIDinMillis(), 10, false);
c = new DynamicComposite();
c.deserialize(b);
o = c.get(0);
|
Unit test for DynamicComposite bean
|
hector-client_hector
|
train
|
java
|
3bc2f434ef677056795db373753c3090eb0892f4
|
diff --git a/brozzler/chrome.py b/brozzler/chrome.py
index <HASH>..<HASH> 100644
--- a/brozzler/chrome.py
+++ b/brozzler/chrome.py
@@ -179,7 +179,7 @@ class Chrome:
extra_chrome_args = os.environ.get('BROZZLER_EXTRA_CHROME_ARGS')
if extra_chrome_args:
- chrome_args.append(extra_chrome_args)
+ chrome_args.extend(extra_chrome_args.split())
if disk_cache_dir:
chrome_args.append('--disk-cache-dir=%s' % disk_cache_dir)
if disk_cache_size:
|
Split extra chrome args on whitespace
This is in case multiple args are used.
|
internetarchive_brozzler
|
train
|
py
|
4f70fc24e5404b1859cdd7bea4eec79cd0878d03
|
diff --git a/build/docs/classes/RedirectMapBuilder.php b/build/docs/classes/RedirectMapBuilder.php
index <HASH>..<HASH> 100644
--- a/build/docs/classes/RedirectMapBuilder.php
+++ b/build/docs/classes/RedirectMapBuilder.php
@@ -65,6 +65,17 @@ class RedirectMapBuilder
// Fall back to api main page if service not found
$redirectEntry []= $reWriteRulePrefix . '(.*)' . $docPathPrefix . 'index.html' . $flags;
+ // Redirect old /AWSSDKforPHP/ paths
+ $reWriteRulePrefix = 'RewriteRule ^/AWSSDKforPHP/';
+ array_unshift($redirectEntry,
+ "RewriteCond %{REQUEST_URI} !^\\/AWSSDKforPHP\\/.*$\n",
+ "RewriteRule \".*\" \"-\" [S={4}]\n",
+ $reWriteRulePrefix . 'latest(.*) /aws-sdk-php/latest/index.html' . $flags,
+ $reWriteRulePrefix . 'v3(.*) /aws-sdk-php/v3/api/index.html' . $flags,
+ $reWriteRulePrefix . 'v2(.*) /aws-sdk-php/v2/api/index.html' . $flags,
+ $reWriteRulePrefix . 'v1(.*) /aws-sdk-php/v1/index.html' . $flags
+ );
+
file_put_contents($this->outputDir, $redirectEntry);
}
|
Redirect old AWSSDKforPHP paths. (#<I>)
|
aws_aws-sdk-php
|
train
|
php
|
46ce484bbd25e13e02901ea8de27f55f3a62e441
|
diff --git a/omego/upgrade.py b/omego/upgrade.py
index <HASH>..<HASH> 100644
--- a/omego/upgrade.py
+++ b/omego/upgrade.py
@@ -93,6 +93,17 @@ class Install(object):
- Modified args object, flag to indicate new/existing/auto install
"""
if cmd == 'install':
+ if args.upgrade:
+ # Current behaviour: install or upgrade
+ if args.initdb or args.upgradedb:
+ raise Stop(10, (
+ 'Deprecated --initdb --upgradedb flags '
+ 'are incompatible with --upgrade'))
+ newinstall = None
+ else:
+ # Current behaviour: Server must not exist
+ newinstall = True
+
if args.managedb:
# Current behaviour
if args.initdb or args.upgradedb:
@@ -105,17 +116,6 @@ class Install(object):
# Deprecated behaviour
pass
- if args.upgrade:
- # Current behaviour: install or upgrade
- if args.initdb or args.upgradedb:
- raise Stop(10, (
- 'Deprecated --initdb --upgradedb flags '
- 'are incompatible with --upgrade'))
- newinstall = None
- else:
- # Current behaviour: Server must not exist
- newinstall = True
-
elif cmd == 'upgrade':
# Deprecated behaviour
log.warn(
|
Fix order of deprecated arg changes
|
ome_omego
|
train
|
py
|
0da8d06907dc826e8f20fd33627c4c43040161c3
|
diff --git a/pyzotero/zotero.py b/pyzotero/zotero.py
index <HASH>..<HASH> 100644
--- a/pyzotero/zotero.py
+++ b/pyzotero/zotero.py
@@ -983,9 +983,9 @@ class Zotero(object):
if 'name' not in item:
raise ze.ParamNotPassed(
"The dict you pass must include a 'name' key")
- # add a blank 'parent' key if it hasn't been passed
+ # add a blank 'parentCollection' key if it hasn't been passed
if not 'parentCollection' in item:
- payload['parentCollection'] = ''
+ item['parentCollection'] = ''
headers = {
'Zotero-Write-Token': token(),
}
|
Fix where the parentCollection key gets added (to the dict, not the enclosing list)
|
urschrei_pyzotero
|
train
|
py
|
187d415235e6d09733f2258b1a714109fb398e51
|
diff --git a/spec/garage_client/request/propagate_request_id_spec.rb b/spec/garage_client/request/propagate_request_id_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/garage_client/request/propagate_request_id_spec.rb
+++ b/spec/garage_client/request/propagate_request_id_spec.rb
@@ -5,8 +5,11 @@ describe GarageClient::Request::PropagateRequestId do
GarageClient::Client.new
end
- before do
+ around do |example|
+ original = Thread.current[:request_id]
Thread.current[:request_id] = 'request_id'
+ example.run
+ Thread.current[:request_id] = original
end
it 'sends request_id via header' do
|
Restore Thread.current value to be an original one
|
cookpad_garage_client
|
train
|
rb
|
c78e4a258b8c2924de0ad90d18d16526c74ee1af
|
diff --git a/test/offline/db_upgrade_from_version_1_unit.js b/test/offline/db_upgrade_from_version_1_unit.js
index <HASH>..<HASH> 100644
--- a/test/offline/db_upgrade_from_version_1_unit.js
+++ b/test/offline/db_upgrade_from_version_1_unit.js
@@ -452,6 +452,12 @@ describe('DBUpgradeFromVersion1', function() {
segments,
newSegment);
});
+ })
+ .then(function() {
+ // Make sure to close the database when we are done or else any
+ // following test that tries to delete this database will hang
+ // when trying to delete it.
+ db.close();
});
});
}
|
Close Database After Upgrade Test
On Safari it seems that deleting a database that was opened in a
previous test causes the delete call to hang. This makes sure
we close the database after each upgrade test.
Change-Id: Ie<I>a<I>bd<I>cef<I>ee<I>f<I>d8a1a<I>
|
google_shaka-player
|
train
|
js
|
b9d86b5bea44db051e9267980a15f9e5b580be70
|
diff --git a/Controller/ProfileController.php b/Controller/ProfileController.php
index <HASH>..<HASH> 100644
--- a/Controller/ProfileController.php
+++ b/Controller/ProfileController.php
@@ -19,12 +19,17 @@ class ProfileController extends Controller
public function updatePhotoAction(Request $request)
{
$form = $this->createForm(new EditUserProfilePhotoType());
- $user = $this->container->get('security.context')->getToken()->getUser();
+ $userOnline = $this->getUser();
+
+ /** @var \Ant\Bundle\ChateaClientBundle\Manager\UserManager $userManager */
+ $userManager = $this->container->get('api_users');
+
+ $user = $userManager->findById($userOnline->getId());
return $this->render('ChateaClientBundle:User:edit_profile_photo.html.twig', array(
'form' => $form->createView(),
'user' => $user,
- 'access_token' => $user->getAccessToken(),
+ 'access_token' => $userOnline->getAccessToken(),
'api_endpoint' => $this->container->getParameter('api_endpoint')
));
}
|
When editing the profile phot we get the whole user
|
antwebes_ChateaClientBundle
|
train
|
php
|
4811ea26b85e150ab827dd82fc86cf558f5c07a0
|
diff --git a/microcosm_postgres/types.py b/microcosm_postgres/types.py
index <HASH>..<HASH> 100644
--- a/microcosm_postgres/types.py
+++ b/microcosm_postgres/types.py
@@ -25,7 +25,7 @@ class EnumType(TypeDecorator):
def process_bind_param(self, value, dialect):
if value is None:
return None
- return str(self.enum_class(value).name)
+ return unicode(self.enum_class(value).name)
def process_result_value(self, value, dialect):
if value is None:
|
Enum columns are unicode; should be inserted as such.
The latest SQLAlchemy just started to produce warnings for any enum columns that used
string values:
SAWarning: Unicode type received non-unicode bind param value '<column>'.
|
globality-corp_microcosm-postgres
|
train
|
py
|
e2c248e953aa7bbc02f339919033b476edcef989
|
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/915_drop_table_graphs.rb b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/915_drop_table_graphs.rb
index <HASH>..<HASH> 100644
--- a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/915_drop_table_graphs.rb
+++ b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/915_drop_table_graphs.rb
@@ -19,7 +19,8 @@
#
#
-# SonarQube 5.1
+# SonarQube 5.2
+# SONAR-6418
#
class DropTableGraphs < ActiveRecord::Migration
|
Fix comment of DB migration <I>
|
SonarSource_sonarqube
|
train
|
rb
|
a7633d24dd3cf01d2bb87d8df79f2cf9f861f6ca
|
diff --git a/UnitPay.php b/UnitPay.php
index <HASH>..<HASH> 100644
--- a/UnitPay.php
+++ b/UnitPay.php
@@ -67,6 +67,16 @@ class UnitPay
}
/**
+ * Return IP address
+ *
+ * @return string
+ */
+ protected function getIp()
+ {
+ return $_SERVER['REMOTE_ADDR'];
+ }
+
+ /**
* Get URL for pay through the form
*
* @param $publicKey
@@ -145,7 +155,7 @@ class UnitPay
*/
public function checkHandlerRequest()
{
- $ip = $_SERVER['REMOTE_ADDR'];
+ $ip = $this->getIp();
if (!isset($_GET['method'])) {
throw new InvalidArgumentException('Method is null');
}
|
Added overrideable getIp method
|
unitpay_php-sdk
|
train
|
php
|
1077e76c52c2343beb416a7782a8715d94615cf6
|
diff --git a/web/static/js/controllers.js b/web/static/js/controllers.js
index <HASH>..<HASH> 100644
--- a/web/static/js/controllers.js
+++ b/web/static/js/controllers.js
@@ -483,8 +483,7 @@ function SubServiceControl($scope, $routeParams, $location, resourcesService, au
$scope.snapshotService = function(service) {
resourcesService.snapshot_service(service.Id, function(label) {
- console.log('Snapshotted service name:%s label:%s', service.Id, label.Detail);
- alert('Snapshotted service:' + service.Name + ' LABEL:' + label.Detail);
+ console.log('Snapshotted service name:%s label:%s', service.Name, label.Detail);
// TODO: add the snapshot label to some partial view in the UI
});
};
|
console log the Name, not the Id; removed useless alert
|
control-center_serviced
|
train
|
js
|
bd167670223964f7bbd89a1242a9aed592ff69e3
|
diff --git a/example_project/settings.py b/example_project/settings.py
index <HASH>..<HASH> 100644
--- a/example_project/settings.py
+++ b/example_project/settings.py
@@ -94,7 +94,10 @@ INSTALLED_APPS = (
)
TEMPLATE_CONTEXT_PROCESSORS = (
+ # for django 1.2 or 1.3
'django.core.context_processors.auth',
+ # for django 1.4 comment above line and uncomment below
+ #'django.contrib.auth.context_processors.auth',
'django.core.context_processors.debug',
'django.core.context_processors.i18n',
'django.core.context_processors.media',
|
Add context processor toggle to support django <I> - <I>
|
justquick_django-activity-stream
|
train
|
py
|
a1b36c2cbc75570c446e2ebb5930a513ab69a142
|
diff --git a/hypervisor/hypervisor.go b/hypervisor/hypervisor.go
index <HASH>..<HASH> 100644
--- a/hypervisor/hypervisor.go
+++ b/hypervisor/hypervisor.go
@@ -44,7 +44,7 @@ func (ctx *VmContext) handlePAEs() {
}
func (ctx *VmContext) watchHyperstart(sendReadyEvent bool) {
- timeout := time.AfterFunc(30*time.Second, func() {
+ timeout := time.AfterFunc(60*time.Second, func() {
if ctx.PauseState == PauseStateUnpaused {
ctx.Log(ERROR, "watch hyperstart timeout")
ctx.Hub <- &InitFailedEvent{Reason: "watch hyperstart timeout"}
@@ -69,7 +69,7 @@ func (ctx *VmContext) watchHyperstart(sendReadyEvent bool) {
sendReadyEvent = false
}
time.Sleep(10 * time.Second)
- timeout.Reset(30 * time.Second)
+ timeout.Reset(60 * time.Second)
}
timeout.Stop()
}
|
watch hyperstart with longer timeouts
Jekins saw launching vm in more than <I> seconds...
|
hyperhq_runv
|
train
|
go
|
0d5fee3585bf1ac8098aa8cf5d6fe7e9282b4743
|
diff --git a/cli/packages/vim/lib/index.js b/cli/packages/vim/lib/index.js
index <HASH>..<HASH> 100644
--- a/cli/packages/vim/lib/index.js
+++ b/cli/packages/vim/lib/index.js
@@ -118,6 +118,8 @@ const render = (colors) => {
exec "hi Error ctermfg=".s:ctermaccent0." ctermbg=".s:ctermshade1
exec "hi Todo guifg=".s:guiaccent0." guibg=".s:guishade1
exec "hi Todo ctermfg=".s:ctermaccent0." ctermbg=".s:ctermshade1
+ exec "hi Function guifg=".s:guiaccent1
+ exec "hi Function ctermfg=".s:ctermaccent1
" GitGutter
|
Add Vim Function group assignment using accent1
|
mjswensen_themer
|
train
|
js
|
14196dffe3fe96a8761f89ba50290e072c753236
|
diff --git a/lib/stagehand.rb b/lib/stagehand.rb
index <HASH>..<HASH> 100644
--- a/lib/stagehand.rb
+++ b/lib/stagehand.rb
@@ -1,8 +1,8 @@
require "stagehand/schema"
-require "stagehand/engine"
require "stagehand/staging"
require "stagehand/production"
require "stagehand/helpers"
+require "stagehand/engine"
module Stagehand
end
diff --git a/lib/stagehand/engine.rb b/lib/stagehand/engine.rb
index <HASH>..<HASH> 100644
--- a/lib/stagehand/engine.rb
+++ b/lib/stagehand/engine.rb
@@ -5,5 +5,10 @@ module Stagehand
config.generators do |g|
g.test_framework :rspec
end
+
+ initializer "stagehand.set_connection_names" do
+ Stagehand::Staging::connection_name = Rails.configuration.x.stagehand.staging_connection_name
+ Stagehand::Production::connection_name = Rails.configuration.x.stagehand.production_connection_name
+ end
end
end
|
Set the database connections from Rails env config
|
culturecode_stagehand
|
train
|
rb,rb
|
7b4d92884b9f340acc3fada0e6db15bb09c87a6d
|
diff --git a/examples/mvvmfx-contacts/src/test/java/de/saxsys/mvvmfx/contacts/ui/contactform/ContactFormViewModelTest.java b/examples/mvvmfx-contacts/src/test/java/de/saxsys/mvvmfx/contacts/ui/contactform/ContactFormViewModelTest.java
index <HASH>..<HASH> 100644
--- a/examples/mvvmfx-contacts/src/test/java/de/saxsys/mvvmfx/contacts/ui/contactform/ContactFormViewModelTest.java
+++ b/examples/mvvmfx-contacts/src/test/java/de/saxsys/mvvmfx/contacts/ui/contactform/ContactFormViewModelTest.java
@@ -13,6 +13,7 @@ import javafx.scene.control.DatePicker;
import javafx.scene.control.TextField;
import org.junit.Before;
+import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -20,6 +21,7 @@ import de.saxsys.javafx.test.JfxRunner;
import de.saxsys.mvvmfx.contacts.util.CentralClock;
+@Ignore("Fix threading problems")
@RunWith(JfxRunner.class)
public class ContactFormViewModelTest {
|
Temporary fix build breaker by ignoring test
|
sialcasa_mvvmFX
|
train
|
java
|
6b87c58f92eec8e22cff18b69268bbf0195249d8
|
diff --git a/lib/Constants.js b/lib/Constants.js
index <HASH>..<HASH> 100644
--- a/lib/Constants.js
+++ b/lib/Constants.js
@@ -1,3 +1,19 @@
+/************************************************************************
+ * Copyright 2010-2011 Worlize Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ ***********************************************************************/
+
/**
* @author justoneplanet
*/
|
Adding Apache License information to new file.
|
theturtle32_WebSocket-Node
|
train
|
js
|
33db68b715fdf4bc956d5c9969d095985affdbb3
|
diff --git a/impl/src/main/java/com/groupon/lex/metrics/config/CollectorBuilderWrapper.java b/impl/src/main/java/com/groupon/lex/metrics/config/CollectorBuilderWrapper.java
index <HASH>..<HASH> 100644
--- a/impl/src/main/java/com/groupon/lex/metrics/config/CollectorBuilderWrapper.java
+++ b/impl/src/main/java/com/groupon/lex/metrics/config/CollectorBuilderWrapper.java
@@ -34,16 +34,22 @@ package com.groupon.lex.metrics.config;
import static com.groupon.lex.metrics.ConfigSupport.collectorConfigString;
import com.groupon.lex.metrics.MetricRegistryInstance;
import com.groupon.lex.metrics.builders.collector.CollectorBuilder;
-import lombok.Value;
+import lombok.Getter;
+import lombok.RequiredArgsConstructor;
/**
* CollectorBuilderWrapper wraps a builder.
*/
-@Value
+@RequiredArgsConstructor
+@Getter
public class CollectorBuilderWrapper implements MonitorStatement {
- /** Collector name. */
+ /**
+ * Collector name.
+ */
private final String name;
- /** Builder implementation. */
+ /**
+ * Builder implementation.
+ */
private final CollectorBuilder builder;
@Override
|
Remove unusused equals and hashcode from CollectorBuilderWrapper.
|
groupon_monsoon
|
train
|
java
|
61a172cf7e8f73b9112d3074b44ae307df06bf16
|
diff --git a/bin/templates/scripts/cordova/lib/prepare.js b/bin/templates/scripts/cordova/lib/prepare.js
index <HASH>..<HASH> 100644
--- a/bin/templates/scripts/cordova/lib/prepare.js
+++ b/bin/templates/scripts/cordova/lib/prepare.js
@@ -223,7 +223,7 @@ function updateProject (platformConfig, locations) {
/* eslint-disable no-tabs */
// Write out the plist file with the same formatting as Xcode does
- var info_contents = plist.build(infoPlist, { indent: ' ', offset: -1 });
+ var info_contents = plist.build(infoPlist, { indent: '\t', offset: -1 });
/* eslint-enable no-tabs */
info_contents = info_contents.replace(/<string>[\s\r\n]*<\/string>/g, '<string></string>');
|
Don't use whitespace as an indent indicator (#<I>)
This is extremely confusing if your editor is not configured to clearly distinguish different sorts of whitespce
|
apache_cordova-ios
|
train
|
js
|
ba06c108e988bed0c50c6f1e8e22cb634aaf5395
|
diff --git a/symphony/lib/toolkit/class.databasestatement.php b/symphony/lib/toolkit/class.databasestatement.php
index <HASH>..<HASH> 100644
--- a/symphony/lib/toolkit/class.databasestatement.php
+++ b/symphony/lib/toolkit/class.databasestatement.php
@@ -282,11 +282,11 @@ class DatabaseStatement
/**
* Creates the ordered SQL parts array.
- * The order in which the part sorted are given by getStatementStructure().
+ * The order in which the parts are sorted is given by getStatementStructure().
*
* @see getStatementStructure()
- * @return string
- * The resulting SQL string
+ * @return array
+ * The sorted SQL parts array
*/
final public function generateOrderedSQLParts()
{
@@ -630,6 +630,9 @@ class DatabaseStatement
*/
final public function splitFunctionArguments($arguments)
{
+ General::ensureType([
+ 'arguments' => ['var' => $arguments, 'type' => 'string'],
+ ]);
$arguments = str_split($arguments);
$current = [];
$args = [];
|
Fix type confusion
1. The return type is an array (not a string)
2. Make sure the argument is a string
|
symphonycms_symphony-2
|
train
|
php
|
d3b329277209d8863507f3b8bf0bad11e73736ef
|
diff --git a/src/serve.js b/src/serve.js
index <HASH>..<HASH> 100644
--- a/src/serve.js
+++ b/src/serve.js
@@ -21,6 +21,7 @@ var cordova_util = require('./util'),
shell = require('shelljs'),
platforms = require('../platforms'),
config_parser = require('./config_parser'),
+ hooker = require('./hooker'),
fs = require('fs'),
util = require('util'),
http = require("http"),
@@ -122,7 +123,14 @@ module.exports = function server(port) {
throw new Error('Current working directory is not a Cordova-based project.');
}
- // Return for testing.
- return launchServer(projectRoot, port);
+ var hooks = new hooker(projectRoot);
+ return hooks.fire('before_serve')
+ .then(function() {
+ // Run a prepare first!
+ return require('../cordova').raw.prepare([]);
+ }).then(function() {
+ launchServer(projectRoot, port);
+ return hooks.fire('after_serve');
+ });
};
|
Update "cordova serve" to work with promises refactoring
|
apache_cordova-cli
|
train
|
js
|
fa35331df27f679ba702e0d10b24a6d8fabd8557
|
diff --git a/tests/test_project.py b/tests/test_project.py
index <HASH>..<HASH> 100644
--- a/tests/test_project.py
+++ b/tests/test_project.py
@@ -36,6 +36,8 @@ class TestProject(unittest.TestCase):
proj2.log_table(tbl_exp)
proj2.build_report('task.rst', 'rst')
+ proj2.build_report('task.md', 'md')
+ proj2.build_report('task.html', 'html')
self.assertEqual(len(tbl_exp.arr), 3)
self.assertEqual(tbl_exp.arr[1][2], 'petrol')
|
test for report generation in html and md includes datatable lists
|
acutesoftware_AIKIF
|
train
|
py
|
432ad769521704fe91f8801cc878842c68e0ad0c
|
diff --git a/server.go b/server.go
index <HASH>..<HASH> 100644
--- a/server.go
+++ b/server.go
@@ -170,11 +170,12 @@ func (ps *peerState) forAllPeers(closure func(sp *serverPeer)) {
// bitcoin peers.
type server struct {
// The following variables must only be used atomically.
+ // Putting the uint64s first makes them 64-bit aligned for 32-bit systems.
+ bytesReceived uint64 // Total bytes received from all peers since start.
+ bytesSent uint64 // Total bytes sent by all peers since start.
started int32
shutdown int32
shutdownSched int32
- bytesReceived uint64 // Total bytes received from all peers since start.
- bytesSent uint64 // Total bytes sent by all peers since start.
listeners []net.Listener
chainParams *chaincfg.Params
|
fix memory allignment for <I>-bit architectures (#<I>)
having 3 int<I>s above the uint<I>s in the struct
will cause misalignment for some <I>-bit architectures.
see <URL>
|
btcsuite_btcd
|
train
|
go
|
155eda788d242bd84e021108054bef0c553173e8
|
diff --git a/src/calendar/index.js b/src/calendar/index.js
index <HASH>..<HASH> 100644
--- a/src/calendar/index.js
+++ b/src/calendar/index.js
@@ -127,7 +127,7 @@ class CalendarClab {
getValue() {
const format = _getFormat(this.options, this.getRomeInstance());
- const formatted = moment(this.valueStr, _getFormat(format)).format();
+ const formatted = moment(this.valueStr, format).format();
return this.valueStr ? formatted : undefined;
}
|
re #<I> - missed a typo in fixing the calendar (#<I>)
|
contactlab_contactlab-ui-components
|
train
|
js
|
cfdcbd9ab22d46c556911496c2d2a80c120c90ea
|
diff --git a/SingularityRunnerBase/src/main/java/com/hubspot/singularity/runner/base/shared/SimpleProcessManager.java b/SingularityRunnerBase/src/main/java/com/hubspot/singularity/runner/base/shared/SimpleProcessManager.java
index <HASH>..<HASH> 100644
--- a/SingularityRunnerBase/src/main/java/com/hubspot/singularity/runner/base/shared/SimpleProcessManager.java
+++ b/SingularityRunnerBase/src/main/java/com/hubspot/singularity/runner/base/shared/SimpleProcessManager.java
@@ -14,6 +14,7 @@ import java.util.Set;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.TimeoutException;
import java.util.stream.Collectors;
+import jdk.internal.joptsimple.internal.Strings;
import org.slf4j.Logger;
public class SimpleProcessManager extends SafeProcessManager {
@@ -136,9 +137,12 @@ public class SimpleProcessManager extends SafeProcessManager {
if (exitCode.isPresent() && !acceptableExitCodes.contains(exitCode.get())) {
throw new ProcessFailedException(
String.format(
- "Got unacceptable exit code %s while running %s",
+ "Got unacceptable exit code %s while running %s. %s",
exitCode,
- processToString
+ processToString,
+ reader.isPresent()
+ ? "Output was " + Strings.join(reader.get().output, "\n")
+ : ""
)
);
}
|
Include output in the exception when the command fails.
|
HubSpot_Singularity
|
train
|
java
|
d732fc88e87e79abc3bd6bc85f5c489eec8ccf7a
|
diff --git a/gen/base/development.js b/gen/base/development.js
index <HASH>..<HASH> 100644
--- a/gen/base/development.js
+++ b/gen/base/development.js
@@ -22,7 +22,7 @@ var config = {
, hostname: null
, port: 4000
, model: {
- defaultAdapter: 'memory'
+ defaultAdapter: 'filesystem'
}
, sessions: {
store: 'memory'
|
Change default adapter for new apps to filesystem
|
mde_ejs
|
train
|
js
|
978893a987edb7dc91d9339f791f47d27acd38a0
|
diff --git a/tangelo/tangelo/ws4py/websocket.py b/tangelo/tangelo/ws4py/websocket.py
index <HASH>..<HASH> 100644
--- a/tangelo/tangelo/ws4py/websocket.py
+++ b/tangelo/tangelo/ws4py/websocket.py
@@ -240,6 +240,9 @@ class WebSocket(object):
if self.terminated or self.sock is None:
raise RuntimeError("Cannot send on a terminated websocket")
+ # This fixes an error in the ws4py package - not yet in the upstream
+ # package.
+ #
# blocking mode, never throw WantWriteError
self.sock.setblocking(1)
|
Added a comment marking the change to upstream ws4py
|
Kitware_tangelo
|
train
|
py
|
95295fca55a5bc5251184f542e54b8f807c661b6
|
diff --git a/lib/redis/connection/memory.rb b/lib/redis/connection/memory.rb
index <HASH>..<HASH> 100644
--- a/lib/redis/connection/memory.rb
+++ b/lib/redis/connection/memory.rb
@@ -346,7 +346,14 @@ class Redis
def lrange(key, startidx, endidx)
data_type_check(key, Array)
- (data[key] && data[key][startidx..endidx]) || []
+ if data[key]
+ # In Ruby when negative start index is out of range Array#slice returns
+ # nil which is not the case for lrange in Redis.
+ startidx = 0 if startidx < 0 && startidx.abs > data[key].size
+ data[key][startidx..endidx] || []
+ else
+ []
+ end
end
def ltrim(key, start, stop)
diff --git a/spec/lists_spec.rb b/spec/lists_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/lists_spec.rb
+++ b/spec/lists_spec.rb
@@ -89,6 +89,7 @@ module FakeRedis
@client.rpush("key1", "v3")
expect(@client.lrange("key1", 1, -1)).to eq(["v2", "v3"])
+ expect(@client.lrange("key1", -999, -1)).to eq(["v1", "v2", "v3"])
end
it "should remove elements from a list" do
|
Fix lrange implementation when negative start index is out of range
|
guilleiguaran_fakeredis
|
train
|
rb,rb
|
17e418f71f9689b0a678dc22372d9420c0297505
|
diff --git a/benchexec/containerexecutor.py b/benchexec/containerexecutor.py
index <HASH>..<HASH> 100644
--- a/benchexec/containerexecutor.py
+++ b/benchexec/containerexecutor.py
@@ -112,6 +112,11 @@ def handle_basic_container_args(options, parser=None):
)
if path in dir_modes:
error_fn(f"Cannot specify multiple directory modes for '{path}'.")
+ if path == "/proc":
+ error_fn(
+ "Cannot specify directory mode for /proc, "
+ "this directory is handled specially."
+ )
dir_modes[path] = mode
for path in options.hidden_dir:
|
Avoid ugly ValueError if directory mode for /proc is given
|
sosy-lab_benchexec
|
train
|
py
|
09343166ac213e5fcbd3eb5b21d44606b56afa62
|
diff --git a/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb b/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb
index <HASH>..<HASH> 100644
--- a/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb
+++ b/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb
@@ -761,7 +761,8 @@ module ActiveRecord
begin
execute "ALTER TABLE #{quoted_table_name} ALTER COLUMN #{quote_column_name(column_name)} TYPE #{type_to_sql(type, options[:limit], options[:precision], options[:scale])}"
- rescue ActiveRecord::StatementInvalid
+ rescue ActiveRecord::StatementInvalid => e
+ raise e if postgresql_version > 80000
# This is PostgreSQL 7.x, so we have to use a more arcane way of doing it.
begin
begin_db_transaction
|
PostgreSQL: fix transaction bug that can occur if you call change_column with invalid parameters
[#<I> state:resolved]
|
rails_rails
|
train
|
rb
|
971d712019b3fe3c8d024cd8a9b57803eaeea31a
|
diff --git a/src/common/processors.js b/src/common/processors.js
index <HASH>..<HASH> 100644
--- a/src/common/processors.js
+++ b/src/common/processors.js
@@ -128,6 +128,9 @@ new sre.Processor(
var descrs = sre.SpeechGeneratorUtil.computeSpeech(xml);
return descrs;
},
+ print: function(descrs) {
+ return JSON.stringify(descrs);
+ },
pprint: function(descrs) {
return JSON.stringify(descrs, null, 2);
}
|
Adds a print method for the description processor.
|
zorkow_speech-rule-engine
|
train
|
js
|
4b64f90e893db498285d87b00a112b38eb2c5d98
|
diff --git a/src/ocLazyLoad.js b/src/ocLazyLoad.js
index <HASH>..<HASH> 100644
--- a/src/ocLazyLoad.js
+++ b/src/ocLazyLoad.js
@@ -288,7 +288,9 @@
if(angular.isArray(module)) {
// Resubmit each entry as a single module
angular.forEach(module, function(m) {
- deferredList.push(self.load(m, params));
+ if (m) {
+ deferredList.push(self.load(m, params));
+ }
});
// Resolve the promise once everything has loaded
|
Small change for #<I> to fix trailing commas in $ocLazyLoad.load([]) arrays.
|
ocombe_ocLazyLoad
|
train
|
js
|
07b97e4717f4e746a24d5a526c397765c9ba0d8e
|
diff --git a/spark.py b/spark.py
index <HASH>..<HASH> 100644
--- a/spark.py
+++ b/spark.py
@@ -25,7 +25,7 @@ def sparkify(series):
if data_range == 0.0:
raise Exception("Cannot normalize when range is zero.")
- return ''.join(
+ return u''.join(
map(
lambda x: spark_chars[int(round((x - minimum) * 7.0 / data_range))],
series
@@ -50,4 +50,4 @@ def guess_series(input_string):
)
if __name__ == "__main__":
- print sparkify(guess_series2(sys.stdin.read()))
+ print sparkify(guess_series(sys.stdin.read()))
|
output should start as a unicode string
|
RedKrieg_pysparklines
|
train
|
py
|
bca765c610d281ce446916ee87206d54f3fb9450
|
diff --git a/src/mailreader-parser.js b/src/mailreader-parser.js
index <HASH>..<HASH> 100644
--- a/src/mailreader-parser.js
+++ b/src/mailreader-parser.js
@@ -99,7 +99,7 @@
bodyPart.content.push(part);
}
- part.signed = node._childNodes[0].raw;
+ part.signedMessage = node._childNodes[0].raw;
part.signature = new TextDecoder('utf-8').decode(node._childNodes[1].content);
// walk the mime tree to find the nested nodes
diff --git a/test/test.js b/test/test.js
index <HASH>..<HASH> 100644
--- a/test/test.js
+++ b/test/test.js
@@ -78,7 +78,7 @@
}]
}, function(err, bodyParts) {
expect(err).to.not.exist;
- expect(bodyParts[0].signed).to.exist;
+ expect(bodyParts[0].signedMessage).to.exist;
expect(bodyParts[0].signature).to.exist;
expect(bodyParts[0].content).to.not.be.empty;
expect(bodyParts[0].raw).to.not.exist;
|
rename signed property to signedMessage
|
tanx_mailreader
|
train
|
js,js
|
84a7b17cb43bed1636e3b714369efe1aa0e6e4dd
|
diff --git a/core/model/Translatable.php b/core/model/Translatable.php
index <HASH>..<HASH> 100755
--- a/core/model/Translatable.php
+++ b/core/model/Translatable.php
@@ -495,6 +495,7 @@ class Translatable extends DataObjectDecorator {
return $record;
}
+ /*
function augmentWrite(&$manipulation) {
if(!Translatable::is_enabled()) return;
@@ -505,7 +506,7 @@ class Translatable extends DataObjectDecorator {
$newManip = array();
foreach($manipulation as $table => $manip) {
if(strpos($table, "_versions") !== false) continue;
- /*
+
foreach($this->fieldBlackList as $blackField) {
if(isset($manip["fields"][$blackField])) {
if($this->isTranslation()) {
@@ -520,10 +521,10 @@ class Translatable extends DataObjectDecorator {
}
}
}
- */
}
DB::manipulate($newManip);
}
+ */
//-----------------------------------------------------------------------------------------------//
|
ENHANCEMENT Disabled Translatab-e>augmentWrite() - was only needed for the blacklist fields implementation which is inactive for the moment
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@<I> <I>b<I>ca-7a2a-<I>-9d3b-<I>d<I>a<I>a9
|
silverstripe_silverstripe-framework
|
train
|
php
|
857ffb21d6341ae3e1551b6f44a5f77e46530d75
|
diff --git a/lib/neography/tasks.rb b/lib/neography/tasks.rb
index <HASH>..<HASH> 100644
--- a/lib/neography/tasks.rb
+++ b/lib/neography/tasks.rb
@@ -7,7 +7,7 @@ require 'net/http'
namespace :neo4j do
desc "Install Neo4j"
task :install, :edition, :version do |t, args|
- args.with_defaults(:edition => "community", :version => "1.9")
+ args.with_defaults(:edition => "community", :version => "1.9.3")
puts "Installing Neo4j-#{args[:edition]}-#{args[:version]}"
if OS::Underlying.windows?
|
upgrading installer to use <I>
|
maxdemarzi_neography
|
train
|
rb
|
ba9c1a249c969447b9a6bfb83f66cf4bc4be1787
|
diff --git a/vault/expiration.go b/vault/expiration.go
index <HASH>..<HASH> 100644
--- a/vault/expiration.go
+++ b/vault/expiration.go
@@ -497,9 +497,12 @@ func (m *ExpirationManager) Restore(errorFunc func()) (retErr error) {
wg.Wait()
m.restoreModeLock.Lock()
- m.restoreLoaded = sync.Map{}
- m.restoreLocks = nil
atomic.StoreInt32(m.restoreMode, 0)
+ m.restoreLoaded.Range(func(k, v interface{}) bool {
+ m.restoreLoaded.Delete(k)
+ return true
+ })
+ m.restoreLocks = nil
m.restoreModeLock.Unlock()
m.logger.Info("lease restore complete")
|
safely clean up loaded map (#<I>)
|
hashicorp_vault
|
train
|
go
|
137b11d56d784c0f68d836a2d92ac1ff32cc7822
|
diff --git a/lxc/storage.go b/lxc/storage.go
index <HASH>..<HASH> 100644
--- a/lxc/storage.go
+++ b/lxc/storage.go
@@ -245,7 +245,7 @@ func (c *storageCmd) run(config *lxd.Config, args []string) error {
if len(args) < 3 {
return errArgs
}
- driver := strings.Join(args[2:3], "")
+ driver := args[2]
return c.doStoragePoolCreate(client, pool, driver, args[3:])
case "delete":
return c.doStoragePoolDelete(client, pool)
|
lxc/storage: simplify
|
lxc_lxd
|
train
|
go
|
b72677924d534ffb94576339ccaed9af985a341f
|
diff --git a/src/clients/ApplicationClient.js b/src/clients/ApplicationClient.js
index <HASH>..<HASH> 100644
--- a/src/clients/ApplicationClient.js
+++ b/src/clients/ApplicationClient.js
@@ -75,6 +75,11 @@ export default class ApplicationClient extends BaseClient {
} else {
this.httpServer = config.org + ".internetofthings.ibmcloud.com";
}
+
+ this.withProxy = false;
+ if(isDefined(config['with-proxy'])) {
+ this.withProxy = config['with-proxy'];
+ }
this.log.info("[ApplicationClient:constructor] ApplicationClient initialized for organization : " + config.org);
}
@@ -340,7 +345,9 @@ export default class ApplicationClient extends BaseClient {
callApi(method, expectedHttpCode, expectJsonContent, paths, body, params){
return new Promise((resolve, reject) => {
// const API_HOST = "https://%s.internetofthings.ibmcloud.com/api/v0002";
- let uri = format("https://%s/api/v0002", this.httpServer);
+ let uri = this.withProxy
+ ? "/api/v0002"
+ : format("https://%s/api/v0002", this.httpServer);
if(Array.isArray(paths)){
for(var i = 0, l = paths.length; i < l; i++){
|
Add "with-proxy" config to allow
While using a proxy with this client could be achieved by settings
http-server: ‘<my server>’, providing an option to call APIs with just
the path is a more natural option.
|
ibm-watson-iot_iot-nodejs
|
train
|
js
|
3ef443d2a635cf6e42cd5120efe4f975939368bc
|
diff --git a/src/iterators/compile.js b/src/iterators/compile.js
index <HASH>..<HASH> 100644
--- a/src/iterators/compile.js
+++ b/src/iterators/compile.js
@@ -524,18 +524,10 @@ export function compileCycle(key, p) {
return promise;
};
- fCtx.race = function () {
- throw new Error(".race can't be used inside a filter");
- };
-
ctx.wait = function (max, promise) {
return waitFactory(waitStore, max, promise);
};
- fCtx.wait = function () {
- throw new Error(".wait can't be used inside a filter");
- };
-
ctx.sleep = function (time, opt_test, opt_interval) {
ctx.yield();
return new Promise(function (resolve, reject) {
|
Removed restrictions from .race and .wait
|
kobezzza_Collection
|
train
|
js
|
b2829f638492f0a00cef8aaccb0f547d442c0a9d
|
diff --git a/www/src/pages/index.js b/www/src/pages/index.js
index <HASH>..<HASH> 100644
--- a/www/src/pages/index.js
+++ b/www/src/pages/index.js
@@ -197,7 +197,7 @@ import NextAuth from 'next-auth'
import Providers from 'next-auth/providers'
const options = {
- site: 'https://example.com'
+ site: 'https://example.com',
providers: [
// OAuth authentication providers
Providers.Apple({
|
added missing comma to homepage example
|
iaincollins_next-auth
|
train
|
js
|
4e29a602f7db457235846588c0d6fb98b5972ec8
|
diff --git a/datacleaner/datacleaner.py b/datacleaner/datacleaner.py
index <HASH>..<HASH> 100644
--- a/datacleaner/datacleaner.py
+++ b/datacleaner/datacleaner.py
@@ -76,7 +76,13 @@ def autoclean(input_dataframe, drop_nans=False, copy=False, encoder=None,
try:
input_dataframe[column].fillna(input_dataframe[column].median(), inplace=True)
except TypeError:
- input_dataframe[column].fillna(input_dataframe[column].mode()[0], inplace=True)
+ most_frequent = input_dataframe[column].mode()
+ if len(most_frequent)>0:
+ input_dataframe[column].fillna(input_dataframe[column].mode()[0], inplace=True)
+ else:
+ input_dataframe[column].fillna(method='bfill', inplace=True)
+ input_dataframe[column].fillna(method='ffill', inplace=True)
+
# Encode all strings with numerical equivalents
if str(input_dataframe[column].values.dtype) == 'object':
|
Fix index out of bounds issue when fillna
|
rhiever_datacleaner
|
train
|
py
|
d1fd1f342e7c6a41334051dff77b2a3e4998010b
|
diff --git a/agent.go b/agent.go
index <HASH>..<HASH> 100644
--- a/agent.go
+++ b/agent.go
@@ -95,11 +95,11 @@ func (p *process) closePostStartFDs() {
}
if p.process.ConsoleSocket != nil {
- p.process.Stderr.(*os.File).Close()
+ p.process.ConsoleSocket.Close()
}
if p.consoleSock != nil {
- p.process.Stderr.(*os.File).Close()
+ p.consoleSock.Close()
}
}
|
agent: Close appropriate file handler
This commit fixes a bug in the code of agent.go file. It closes the
appropriate file handlers after they have been properly tested.
Fixes #<I>
|
kata-containers_agent
|
train
|
go
|
8a991244d5bfe27f97275208c1ac552f0c819a32
|
diff --git a/pkg/services/alerting/notifiers/pagerduty.go b/pkg/services/alerting/notifiers/pagerduty.go
index <HASH>..<HASH> 100644
--- a/pkg/services/alerting/notifiers/pagerduty.go
+++ b/pkg/services/alerting/notifiers/pagerduty.go
@@ -88,7 +88,13 @@ func (pn *PagerdutyNotifier) Notify(evalContext *alerting.EvalContext) error {
pn.log.Info("Notifying Pagerduty", "event_type", eventType)
payloadJSON := simplejson.New()
- payloadJSON.Set("summary", evalContext.Rule.Name+" - "+evalContext.Rule.Message)
+
+ summary := evalContext.Rule.Name + " - " + evalContext.Rule.Message
+ if len(summary) > 1024 {
+ summary = summary[0:1024]
+ }
+ payloadJSON.Set("summary", summary)
+
if hostname, err := os.Hostname(); err == nil {
payloadJSON.Set("source", hostname)
}
|
Alerting: Truncate PagerDuty summary when greater than <I> characters (#<I>)
Requests to PagerDuty fail with an HTTP <I> if the `summary`
attribute contains more than <I> characters, this fixes this.
API spec:
<URL>
|
grafana_grafana
|
train
|
go
|
03037456eb85bf432b7e92f720eb23f024c1a481
|
diff --git a/specs-go/version.go b/specs-go/version.go
index <HASH>..<HASH> 100644
--- a/specs-go/version.go
+++ b/specs-go/version.go
@@ -25,7 +25,7 @@ const (
VersionPatch = 0
// VersionDev indicates development branch. Releases will be empty string.
- VersionDev = "-rc6"
+ VersionDev = "-rc6-dev"
)
// Version is the specification version that the package types support.
|
version: master back to -dev
|
opencontainers_image-spec
|
train
|
go
|
8b6d644022b644fcdde809af7109f7ce014dc9b2
|
diff --git a/src/main/java/com/greatmancode/craftconomy3/account/AccountManager.java b/src/main/java/com/greatmancode/craftconomy3/account/AccountManager.java
index <HASH>..<HASH> 100644
--- a/src/main/java/com/greatmancode/craftconomy3/account/AccountManager.java
+++ b/src/main/java/com/greatmancode/craftconomy3/account/AccountManager.java
@@ -87,6 +87,14 @@ public class AccountManager {
return result;
}
+ @Deprecated
+ public boolean exist(String name) {
+ if (name.startsWith("bank:")) {
+ return exist(name.split("bank:")[1], true);
+ } else {
+ return exist(name, false);
+ }
+ }
/**
* Delete a account from the system
*
|
Add back exist for backward Vault compatibility.
|
greatman_craftconomy3
|
train
|
java
|
12348d78afcda9ba0025c8c94306c11c0e22f606
|
diff --git a/lib/session.js b/lib/session.js
index <HASH>..<HASH> 100644
--- a/lib/session.js
+++ b/lib/session.js
@@ -10,7 +10,7 @@ const Store = require('./store');
const uid = require('uid-safe');
/* istanbul ignore next */
-function defaultErrorHanlder(err, type) {
+function defaultErrorHandler(err, type) {
/* eslint no-param-reassign:0 */
err.name = `${pkg.name} ${type} error`;
throw err;
@@ -33,7 +33,7 @@ module.exports = (opts) => {
debug('options:%j', options);
const key = options.key || 'koa.sid';
const client = options.store || new FileStore();
- const errorHandler = options.errorHandler || defaultErrorHanlder;
+ const errorHandler = options.errorHandler || defaultErrorHandler;
const reconnectTimeout = options.reconnectTimeout || 10 * 1000;
const store = new Store(client, {
ttl: options.ttl,
|
Fix typo in var name
Handler was misspelled
|
vicanso_koa-simple-session
|
train
|
js
|
27e60df92fe080b97219fbe1d759f311abe1b22e
|
diff --git a/end-to-end-tests/src/test/java/fi/jumi/test/RunningTestsTest.java b/end-to-end-tests/src/test/java/fi/jumi/test/RunningTestsTest.java
index <HASH>..<HASH> 100755
--- a/end-to-end-tests/src/test/java/fi/jumi/test/RunningTestsTest.java
+++ b/end-to-end-tests/src/test/java/fi/jumi/test/RunningTestsTest.java
@@ -39,7 +39,6 @@ public class RunningTestsTest {
assertThat("failing tests", launcher.getFailingTests(), is(0));
}
- @Ignore("not implemented")
@Test(timeout = TIMEOUT)
public void suite_with_one_failing_test() throws Exception {
launcher.addToClassPath(TestEnvironment.getSampleClasses());
|
RunningTestsTest: "suite with one failing test" passes
|
luontola_jumi-actors
|
train
|
java
|
7de9399a3df1885a6ce5fe3b37041cd95c05b637
|
diff --git a/arctic/arctic.py b/arctic/arctic.py
index <HASH>..<HASH> 100644
--- a/arctic/arctic.py
+++ b/arctic/arctic.py
@@ -203,7 +203,9 @@ class Arctic(object):
-------
list of Arctic library names
"""
- return self._list_libraries_cached(newer_than_secs) if self.is_caching_enabled() else self._list_libraries()
+ if self._cache and self.is_caching_enabled():
+ return self._list_libraries_cached(newer_than_secs)
+ return self._list_libraries()
@mongo_retry
def _list_libraries(self):
|
Handle uninitialized cache object
|
manahl_arctic
|
train
|
py
|
5fbd20745a42e05edae3a962a901c5ad5ff1fced
|
diff --git a/gwpy/io/cache.py b/gwpy/io/cache.py
index <HASH>..<HASH> 100644
--- a/gwpy/io/cache.py
+++ b/gwpy/io/cache.py
@@ -52,13 +52,13 @@ __author__ = 'Duncan Macleod <duncan.macleod@ligo.org>'
try: # python2.x
FILE_LIKE = (
file, GzipFile,
- tempfile._TemporaryFileWrapper, # pylint: disable=protected-access
+ tempfile._TemporaryFileWrapper, # pylint: disable=protected-access
)
except NameError: # python3.x
from io import IOBase
FILE_LIKE = (
IOBase, GzipFile,
- tempfile._TemporaryFileWrapper, # pylint: disable=protected-access
+ tempfile._TemporaryFileWrapper, # pylint: disable=protected-access
)
|
io.cache: fixed style issue
|
gwpy_gwpy
|
train
|
py
|
096f06a098fb60f1808e94a29f614cbaa91eb84c
|
diff --git a/app/src/Bolt/Nut/ConfigSet.php b/app/src/Bolt/Nut/ConfigSet.php
index <HASH>..<HASH> 100644
--- a/app/src/Bolt/Nut/ConfigSet.php
+++ b/app/src/Bolt/Nut/ConfigSet.php
@@ -12,7 +12,7 @@ class ConfigSet extends BaseCommand
{
$this
->setName('config:set')
- ->setDescription('Set a value from config.yml.')
+ ->setDescription('Set a value in config.yml.')
->addArgument('key', InputArgument::REQUIRED, 'The key you wish to get.')
->addArgument('value', InputArgument::REQUIRED, 'The value you wish to set it to.');
}
diff --git a/app/src/Bolt/Nut/DatabaseCheck.php b/app/src/Bolt/Nut/DatabaseCheck.php
index <HASH>..<HASH> 100644
--- a/app/src/Bolt/Nut/DatabaseCheck.php
+++ b/app/src/Bolt/Nut/DatabaseCheck.php
@@ -11,7 +11,7 @@ class DatabaseCheck extends BaseCommand
{
$this
->setName('database:check')
- ->setDescription('Check the database for missing columns.');
+ ->setDescription('Check the database for missing tables and/or columns.');
}
protected function execute(InputInterface $input, OutputInterface $output)
|
Tweaking descriptions in 'nut' commands.
|
bolt_bolt
|
train
|
php,php
|
95d10f1b10b50c5e43efc538f963ea1e5242b9d1
|
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -19,7 +19,7 @@ def main():
description='Lightweight WSGI application framework, schema-validated JSON APIs, and API documentation.',
long_description=long_description,
long_description_content_type='text/x-rst',
- version='1.1.6',
+ version='1.1.7',
author='Craig A. Hobbs',
author_email='craigahobbs@gmail.com',
keywords='api json framework schema wsgi',
|
chisel <I>
|
craigahobbs_chisel
|
train
|
py
|
d12859ffd8ed6eccc3e5255c3a37ee16fb84eeaa
|
diff --git a/concrete/blocks/autonav/controller.php b/concrete/blocks/autonav/controller.php
index <HASH>..<HASH> 100644
--- a/concrete/blocks/autonav/controller.php
+++ b/concrete/blocks/autonav/controller.php
@@ -162,6 +162,11 @@ class Controller extends BlockController
}
} else {
$c = $this->collection;
+
+ // let's use the ID of the collection passed in $this->collection
+ if ($this->collection instanceof Page) {
+ $this->cID = $this->collection->getCollectionID();
+ }
}
//Create an array of parent cIDs so we can determine the "nav path" of the current page
$inspectC = $c;
|
Use the ID of the collection passed in $this->collection in the autonav block
|
concrete5_concrete5
|
train
|
php
|
e7a56c54ffcd402fc10552fb776289f6b8e9305e
|
diff --git a/classes/phing/system/io/PhingFile.php b/classes/phing/system/io/PhingFile.php
index <HASH>..<HASH> 100644
--- a/classes/phing/system/io/PhingFile.php
+++ b/classes/phing/system/io/PhingFile.php
@@ -420,7 +420,7 @@ class PhingFile {
if ($fs->checkAccess($this) !== true) {
throw new IOException("No read access to ".$this->path);
}
- return @is_dir($this->path);
+ return @is_dir($this->path) && !@is_link($this->path);
}
/**
|
Refs #<I> - symbolic links are not directories
|
phingofficial_phing
|
train
|
php
|
51fc46a3929514957fcb85ecebfe950b69251e05
|
diff --git a/course/rest.php b/course/rest.php
index <HASH>..<HASH> 100644
--- a/course/rest.php
+++ b/course/rest.php
@@ -41,7 +41,7 @@ $sequence = optional_param('sequence', '', PARAM_SEQUENCE);
$visible = optional_param('visible', 0, PARAM_INT);
$pageaction = optional_param('action', '', PARAM_ALPHA); // Used to simulate a DELETE command
-$PAGE->set_url('/course/rest.php', array('courseId'=>$courseId,'class'=>$class));
+$PAGE->set_url('/course/rest.php', array('courseId'=>$courseid,'class'=>$class));
// Authorise the user and verify some incoming data
if (!$course = $DB->get_record('course', array('id'=>$courseid))) {
|
course MDL-<I> Fixed up typo is ajax editing
|
moodle_moodle
|
train
|
php
|
70a373aecac40c2d99db827a3978052ef732524e
|
diff --git a/lib/mobility/backend/active_record/serialized.rb b/lib/mobility/backend/active_record/serialized.rb
index <HASH>..<HASH> 100644
--- a/lib/mobility/backend/active_record/serialized.rb
+++ b/lib/mobility/backend/active_record/serialized.rb
@@ -53,7 +53,7 @@ module Mobility
end
end
EOM
- end if Loaded::ActiveRecord
+ end
end
end
end
|
Remove unneeded Loaded::ActiveRecord
|
shioyama_mobility
|
train
|
rb
|
d62b8ade8ba14b18aa43988c78f53453e5cd28e5
|
diff --git a/abutils/utils/alignment.py b/abutils/utils/alignment.py
index <HASH>..<HASH> 100644
--- a/abutils/utils/alignment.py
+++ b/abutils/utils/alignment.py
@@ -827,8 +827,8 @@ class NWAlignment(BaseAlignment):
def _get_matrix_file(self, match=None, mismatch=None, matrix=None):
matrix_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'matrices')
builtins = ['blosum62', 'match3mismatch2', 'match1mismatch0']
- if self._matrix is not None:
- matrix_name = self._matrix
+ if matrix is not None:
+ matrix_name = matrix
else:
matrix_name = 'match{}mismatch{}'.format(abs(match), abs(mismatch))
if matrix_name.lower() in builtins:
|
fix global_alignment scoring when providing an alignment matrix
|
briney_abutils
|
train
|
py
|
d9f3b63f6b35986df517c35110b3cca612625867
|
diff --git a/star.py b/star.py
index <HASH>..<HASH> 100644
--- a/star.py
+++ b/star.py
@@ -180,6 +180,7 @@ def plot_parameter(logP, parameter, parameter_name, output):
def trig_param_plot(stars, output):
logP = numpy.fromiter((math.log(star.period, 10) for star in stars),
numpy.float)
+ assert False, str(stars)
parameters = numpy.vstack(tuple(
interpolation.ak_bk2Ak_Phik(star.coefficients) for star in stars))
(A0, A1, Phi1, A2, Phi2, A3, Phi3) = numpy.hsplit(parameters[:,:7], 7)
|
Time for more assertion debugging...
|
astroswego_plotypus
|
train
|
py
|
ad2a3964f7ac936342d44d2e18f117394cab8fcb
|
diff --git a/src/Auth/Form/Register.php b/src/Auth/Form/Register.php
index <HASH>..<HASH> 100644
--- a/src/Auth/Form/Register.php
+++ b/src/Auth/Form/Register.php
@@ -46,6 +46,9 @@ class Register extends Form
'options' => array(
'label' => /*@translate*/ 'Email',
),
+ 'attributes' => [
+ 'required' => true
+ ]
)
);
diff --git a/src/Auth/Form/UserInfoFieldset.php b/src/Auth/Form/UserInfoFieldset.php
index <HASH>..<HASH> 100644
--- a/src/Auth/Form/UserInfoFieldset.php
+++ b/src/Auth/Form/UserInfoFieldset.php
@@ -120,8 +120,9 @@ class UserInfoFieldset extends Fieldset implements
],
'attributes' => [
'data-placeholder' => /*@translate*/ 'please select',
- 'data-allowclear' => 'true',
- 'required' => true,
+ 'data-allowclear' => 'false',
+ 'data-searchbox' => -1, // hide the search box
+ 'required' => true, // mark label as required
],
)
);
|
[General] adjust the use of the search form and the hide feature select 2 Elements
|
yawik_auth
|
train
|
php,php
|
01d358004261c7e77130208286454756c1d32b14
|
diff --git a/inferno/callbacks.py b/inferno/callbacks.py
index <HASH>..<HASH> 100644
--- a/inferno/callbacks.py
+++ b/inferno/callbacks.py
@@ -202,7 +202,7 @@ class BestLoss(Callback):
yield key, sign, loss
def on_epoch_end(self, net, **kwargs):
- sl = slice(-1, None), list(self.key_signs)
+ sl = np.s_[-1, list(self.key_signs)]
check_history_slice(net.history, sl)
history = net.history
|
Use np.s_ for consistencey.
|
skorch-dev_skorch
|
train
|
py
|
bdfa5ede6f62409bd1488595904ed664c388d809
|
diff --git a/aeron-system-tests/src/test/java/io/aeron/ChannelEndpointStatusTest.java b/aeron-system-tests/src/test/java/io/aeron/ChannelEndpointStatusTest.java
index <HASH>..<HASH> 100644
--- a/aeron-system-tests/src/test/java/io/aeron/ChannelEndpointStatusTest.java
+++ b/aeron-system-tests/src/test/java/io/aeron/ChannelEndpointStatusTest.java
@@ -80,8 +80,7 @@ public class ChannelEndpointStatusTest
private final ErrorHandler driverErrorHandler =
(ex) ->
{
- if (ex instanceof AeronException &&
- ex.getMessage().startsWith("channel error - Address already in use:"))
+ if (ex instanceof AeronException && ex.getMessage().contains("channel error - Address already in use"))
{
return;
}
|
[Java] Do a contains rather then startWith for error message.
|
real-logic_aeron
|
train
|
java
|
faeefde6147a3d9667d6d0dad651c83907229ba5
|
diff --git a/openquake/calculators/event_based.py b/openquake/calculators/event_based.py
index <HASH>..<HASH> 100644
--- a/openquake/calculators/event_based.py
+++ b/openquake/calculators/event_based.py
@@ -427,8 +427,7 @@ class EventBasedRuptureCalculator(PSHACalculator):
events[name][i] = event[name]
self.eid += 1
i += 1
- if not self.oqparam.ground_motion_fields:
- self.datastore['sescollection/%s' % ebr.serial] = ebr
+ self.datastore['sescollection/%s' % ebr.serial] = ebr
self.datastore.extend('events', events)
def post_execute(self, result):
|
Restored the saving of the sescollection
|
gem_oq-engine
|
train
|
py
|
5708869e288ad22d3194c8c74bacfd3d6c66139d
|
diff --git a/neo/SmartContract/tests/StorageTest.py b/neo/SmartContract/tests/StorageTest.py
index <HASH>..<HASH> 100644
--- a/neo/SmartContract/tests/StorageTest.py
+++ b/neo/SmartContract/tests/StorageTest.py
@@ -1,5 +1,5 @@
-from boa.code.builtins import range, concat
-from boa.blockchain.vm.Neo.Storage import GetContext, Get, Put, Delete
+from boa.builtins import range, concat
+from boa.interop.Neo.Storage import GetContext, Get, Put
def Main(operation, key, value):
|
fix StorageTest smart contract for new compiler
|
CityOfZion_neo-python
|
train
|
py
|
4403348917bd9e27f0656e97ddc63a2346548990
|
diff --git a/gpiozero/boards.py b/gpiozero/boards.py
index <HASH>..<HASH> 100644
--- a/gpiozero/boards.py
+++ b/gpiozero/boards.py
@@ -24,10 +24,8 @@ class TrafficLights(object):
class PiTraffic(TrafficLights):
def __init__(self):
- self.red = LED(9)
- self.amber = LED(10)
- self.green = LED(11)
- self._lights = (self.red, self.amber, self.green)
+ red, amber, green = (9, 10, 11)
+ super(FishDish, self).__init__(red, amber, green)
class FishDish(TrafficLights):
|
Use super over re-implentation for PiTraffic
|
RPi-Distro_python-gpiozero
|
train
|
py
|
22fc715671486b9ce70d2d501db484000ca8f06d
|
diff --git a/tests/sample.py b/tests/sample.py
index <HASH>..<HASH> 100755
--- a/tests/sample.py
+++ b/tests/sample.py
@@ -354,8 +354,9 @@ def main():
sample_crud_consumer_group(client, project, logstore, consumer_group)
time.sleep(10)
- sample_external_store(client, project)
- time.sleep(10)
+ # skip this part of UT cause of the known issue in
+ # sample_external_store(client, project)
+ # time.sleep(10)
# test copy project
try:
@@ -371,4 +372,4 @@ def main():
if __name__ == '__main__':
- main()
+ main()
\ No newline at end of file
|
sample_external_store(client, project)
|
aliyun_aliyun-log-python-sdk
|
train
|
py
|
feebd69d26df453d60427018af086198d800c71a
|
diff --git a/docs/storage/driver/testsuites/testsuites.go b/docs/storage/driver/testsuites/testsuites.go
index <HASH>..<HASH> 100644
--- a/docs/storage/driver/testsuites/testsuites.go
+++ b/docs/storage/driver/testsuites/testsuites.go
@@ -258,6 +258,7 @@ func (suite *DriverSuite) TestWriteReadLargeStreams(c *check.C) {
reader, err := suite.StorageDriver.ReadStream(suite.ctx, filename, 0)
c.Assert(err, check.IsNil)
+ defer reader.Close()
writtenChecksum := sha1.New()
io.Copy(writtenChecksum, reader)
|
Close reader after the test is finished.
|
docker_distribution
|
train
|
go
|
4a1e4667738cd63adadb44e9fdfbe2bdc534ce74
|
diff --git a/ella/ellaadmin/widgets.py b/ella/ellaadmin/widgets.py
index <HASH>..<HASH> 100644
--- a/ella/ellaadmin/widgets.py
+++ b/ella/ellaadmin/widgets.py
@@ -225,11 +225,6 @@ class ListingCustomWidget(forms.SelectMultiple):
cx['choices'] = choices or self.choices
cx['listings'] = list(value[0]) or []
- if len(value):
- # modifying existing object, so value is dict containing Listings and selected category IDs
- # cx['selected'] = Category.objects.filter(pk__in=value['selected_categories']).values('id') or []
- cx['listings'] = list(value[0]['listings']) or []
-
tpl = get_template('admin/widget/listing_custom.html')
return mark_safe(tpl.render(cx))
""" """
|
deleted forgotten line frm ellaadmin (is ellaadmin still in use
somewhere?)
|
ella_ella
|
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.