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
|
---|---|---|---|---|---|
28015fde58cc6baaf85138134b8120bf2014a160
|
diff --git a/Tests/Unit/ViewHelpers/ExtensionSelectorViewHelperTest.php b/Tests/Unit/ViewHelpers/ExtensionSelectorViewHelperTest.php
index <HASH>..<HASH> 100644
--- a/Tests/Unit/ViewHelpers/ExtensionSelectorViewHelperTest.php
+++ b/Tests/Unit/ViewHelpers/ExtensionSelectorViewHelperTest.php
@@ -130,8 +130,8 @@ class Tx_Phpunit_Tests_Unit_ViewHelpers_ExtensionSelectorViewHelperTest extends
$this->subject->injectUserSettingService($this->userSettingsService);
$this->subject->render();
- self::assertRegExp(
- '/<option class="alltests" value="uuall"[^>]* selected="selected">/',
+ self::assertContains(
+ '<option class="alltests" value="uuall" selected="selected">',
$this->outputService->getCollectedOutput()
);
}
|
[TASK] Fix Tests/Unit/ViewHelpers/
Fixes tests for Tests/Unit/ViewHelpers
Change-Id: Ide2dc<I>f4af<I>ea<I>e<I>cee<I>bb2
Resolves: #<I>
Releases: master
Reviewed-on: <URL>
|
oliverklee_ext-phpunit
|
train
|
php
|
47ff6316a2a00e8ddd375f7c9a009797b051be43
|
diff --git a/packages/ember-views/lib/views/collection_view.js b/packages/ember-views/lib/views/collection_view.js
index <HASH>..<HASH> 100644
--- a/packages/ember-views/lib/views/collection_view.js
+++ b/packages/ember-views/lib/views/collection_view.js
@@ -110,7 +110,7 @@ var get = Ember.get, set = Ember.set, fmt = Ember.String.fmt;
} else {
viewClass = App.SongView;
}
- this._super(viewClass, attrs);
+ return this._super(viewClass, attrs);
}
});
```
|
Fix missing reuturn in CollectionView docs
`createChildView` has to return the call to `this._super`, otherwise
everything breaks.
|
emberjs_ember.js
|
train
|
js
|
cab6ba4e1bf2abf6a5fb83f2f28e2a8482350bbd
|
diff --git a/activesupport/lib/active_support/core_ext/object/acts_like.rb b/activesupport/lib/active_support/core_ext/object/acts_like.rb
index <HASH>..<HASH> 100644
--- a/activesupport/lib/active_support/core_ext/object/acts_like.rb
+++ b/activesupport/lib/active_support/core_ext/object/acts_like.rb
@@ -1,9 +1,9 @@
class Object
# A duck-type assistant method. For example, Active Support extends Date
- # to define an acts_like_date? method, and extends Time to define
- # acts_like_time?. As a result, we can do "x.acts_like?(:time)" and
- # "x.acts_like?(:date)" to do duck-type-safe comparisons, since classes that
- # we want to act like Time simply need to define an acts_like_time? method.
+ # to define an <tt>acts_like_date?</tt> method, and extends Time to define
+ # <tt>acts_like_time?</tt>. As a result, we can do <tt>x.acts_like?(:time)</tt> and
+ # <tt>x.acts_like?(:date)</tt> to do duck-type-safe comparisons, since classes that
+ # we want to act like Time simply need to define an <tt>acts_like_time?</tt> method.
def acts_like?(duck)
respond_to? :"acts_like_#{duck}?"
end
|
Correct method notation for #acts_like? [ci skip]
|
rails_rails
|
train
|
rb
|
354e2c71ef65fd49a0a31fcfd84d8135811e6ac4
|
diff --git a/src/qinfer/tests/base_test.py b/src/qinfer/tests/base_test.py
index <HASH>..<HASH> 100644
--- a/src/qinfer/tests/base_test.py
+++ b/src/qinfer/tests/base_test.py
@@ -357,10 +357,13 @@ class ConcreteSimulatableTest(with_metaclass(abc.ABCMeta, object)):
mps = self.model.update_timestep(self.modelparams, self.expparams)
assert(mps.shape == (
- self.n_models,
- self.model.n_modelparams,
- self.n_expparams)
- )
+ self.n_models,
+ self.model.n_modelparams,
+ self.n_expparams
+ ))
+ mps = mps.transpose((2,0,1)).reshape(self.n_models * self.n_expparams, -1)
+
+ assert(np.all(self.model.are_models_valid(mps)))
def test_domain_with_none(self):
"""
|
test_update_timestep now asserts that models are valid after timestep update
|
QInfer_python-qinfer
|
train
|
py
|
81810f33fa97d9100fdbf1c55e7fec38a2fb9b10
|
diff --git a/mtools/mlaunch/mlaunch.py b/mtools/mlaunch/mlaunch.py
index <HASH>..<HASH> 100755
--- a/mtools/mlaunch/mlaunch.py
+++ b/mtools/mlaunch/mlaunch.py
@@ -1698,7 +1698,7 @@ class MLaunchTool(BaseCmdLineTool):
if set_name:
con.close()
con = self.client('localhost:%i'%port, replicaSet=set_name, serverSelectionTimeoutMS=10000)
- v = con['admin'].command('isMaster').get('maxWireVersion', 0)
+ v = ismaster.get('maxWireVersion', 0)
if v >= 7:
# Until drivers have implemented SCRAM-SHA-256, use old mechanism.
opts = {'mechanisms': ['SCRAM-SHA-1']}
|
Re-use previous `ismaster` response
|
rueckstiess_mtools
|
train
|
py
|
3cb95d86fe70598aa002e8657f0bf749edf63ecf
|
diff --git a/iphone/src/java/org/openqa/selenium/iphone/IPhoneSimulatorBinary.java b/iphone/src/java/org/openqa/selenium/iphone/IPhoneSimulatorBinary.java
index <HASH>..<HASH> 100644
--- a/iphone/src/java/org/openqa/selenium/iphone/IPhoneSimulatorBinary.java
+++ b/iphone/src/java/org/openqa/selenium/iphone/IPhoneSimulatorBinary.java
@@ -80,6 +80,9 @@ public class IPhoneSimulatorBinary extends SubProcess {
.append(String.format("export DYLD_ROOT_PATH=%s\n", sdkRoot))
.append(String.format("export IPHONE_SIMULATOR_ROOT=%s\n", sdkRoot))
.append(String.format("export CFFIXED_USER_HOME=%s\n", tmp.getAbsolutePath()))
+ // Be a good citizen; make sure we quit when #shutdown() is called.
+ .append("trap \"/usr/bin/killall \\\"iWebDriver\\\" || :;\n")
+ .append(" /usr/bin/killall \\\"iPhone Simulator\\\" || :\" SIGINT SIGTERM\n")
.append(String.format("\"%s\" -RegisterForSystemEvents\n", executable.getAbsolutePath()))
.toString());
writer.close();
|
JasonLeyba: Making sure the IPhoneSimulatorBinary kills iWebDriver when #shutdown() is called.
r<I>
|
SeleniumHQ_selenium
|
train
|
java
|
e9bb4964f2fec1e7c4845ddf44eb7ab746fc18d6
|
diff --git a/Lib/Sakonnin/MailCopy.php b/Lib/Sakonnin/MailCopy.php
index <HASH>..<HASH> 100644
--- a/Lib/Sakonnin/MailCopy.php
+++ b/Lib/Sakonnin/MailCopy.php
@@ -17,7 +17,7 @@ class MailCopy
$message = $options['message'];
$receivers = $message->getReceivers();
- $options['provide_link'] = true;
+ $options['provide_link'] = false;
foreach ($receivers as $receiver) {
if ($email = $this->extractEmailFromReceiver($receiver))
$this->sendMail($message, $email, $options);
|
OK, should probably not do this, but lazyness took me and I have a slight feeling providing the link in a mail should be default off anyway.
|
thomasez_BisonLabSakonninBundle
|
train
|
php
|
b1d7f3e061f6b8462fdfbd7699ae29341fbf0339
|
diff --git a/allure-report/allure-report-data/src/main/java/ru/yandex/qatools/allure/data/utils/XslTransformationUtils.java b/allure-report/allure-report-data/src/main/java/ru/yandex/qatools/allure/data/utils/XslTransformationUtils.java
index <HASH>..<HASH> 100644
--- a/allure-report/allure-report-data/src/main/java/ru/yandex/qatools/allure/data/utils/XslTransformationUtils.java
+++ b/allure-report/allure-report-data/src/main/java/ru/yandex/qatools/allure/data/utils/XslTransformationUtils.java
@@ -12,6 +12,7 @@ import javax.xml.transform.stream.StreamResult;
import javax.xml.transform.stream.StreamSource;
import java.io.InputStream;
import java.io.StringWriter;
+import java.nio.charset.StandardCharsets;
/**
* @author Dmitry Baev [email protected]
@@ -33,7 +34,7 @@ public final class XslTransformationUtils {
public static String applyTransformation(String xml, String xslPath) {
return applyTransformation(
XslTransformationUtils.class.getClassLoader().getResourceAsStream(xslPath),
- IOUtils.toInputStream(xml)
+ IOUtils.toInputStream(xml, StandardCharsets.UTF_8)
);
}
|
#<I>: Read testsuite.xml with utf encoding
|
allure-framework_allure1
|
train
|
java
|
a41fdad8875fbcd01b1498390e2114b93e5cb99e
|
diff --git a/bcbio/variation/validate.py b/bcbio/variation/validate.py
index <HASH>..<HASH> 100644
--- a/bcbio/variation/validate.py
+++ b/bcbio/variation/validate.py
@@ -139,10 +139,10 @@ def summarize_grading(samples):
writer = csv.writer(out_handle)
writer.writerow(["sample", "caller", "variant.type", "category", "value"])
for data in (x[0] for x in samples):
- data["validate"]["grading_summary"] = out_csv
out.append([data])
for variant in data.get("variants", []):
if "validate" in variant:
+ data["validate"]["grading_summary"] = out_csv
with open(variant["validate"]["grading"]) as in_handle:
grade_stats = yaml.load(in_handle)
for sample_stats in grade_stats:
|
Correctly handle projects with validated and non-validated samples
|
bcbio_bcbio-nextgen
|
train
|
py
|
4a6d10b85c57ff53262e19a70d9c7cabcada5618
|
diff --git a/dev/com.ibm.ws.microprofile.rest.client.FT_fat/fat/src/com/ibm/ws/microprofile/rest/client/fat/TimeoutTest.java b/dev/com.ibm.ws.microprofile.rest.client.FT_fat/fat/src/com/ibm/ws/microprofile/rest/client/fat/TimeoutTest.java
index <HASH>..<HASH> 100644
--- a/dev/com.ibm.ws.microprofile.rest.client.FT_fat/fat/src/com/ibm/ws/microprofile/rest/client/fat/TimeoutTest.java
+++ b/dev/com.ibm.ws.microprofile.rest.client.FT_fat/fat/src/com/ibm/ws/microprofile/rest/client/fat/TimeoutTest.java
@@ -56,6 +56,6 @@ public class TimeoutTest extends FATServletClient {
@AfterClass
public static void afterClass() throws Exception {
- server.stopServer();
+ server.stopServer("CWMFT0002W");
}
}
\ No newline at end of file
|
Allow FT warning if app stops before timeout
|
OpenLiberty_open-liberty
|
train
|
java
|
6203e4d97ca77d08996b8da34bb04d85c3055059
|
diff --git a/src/Routing/Router.php b/src/Routing/Router.php
index <HASH>..<HASH> 100755
--- a/src/Routing/Router.php
+++ b/src/Routing/Router.php
@@ -306,7 +306,7 @@ class Router
if ($page) {
$q = $page->getAsArray();
} else {
- if ($is_transparent) {
+ if ($is_transparent || Settings::get('error_404_convert_transparent_get')) {
break;
} else {
$q = NULL;
|
Setting for getting extra GET params instead of <I> status
|
devp-eu_tmcms-core
|
train
|
php
|
f0c62bd7df69610dec38ea485f7dd18c74d95ebc
|
diff --git a/samples/genkeypair_import_cert.py b/samples/genkeypair_import_cert.py
index <HASH>..<HASH> 100644
--- a/samples/genkeypair_import_cert.py
+++ b/samples/genkeypair_import_cert.py
@@ -37,7 +37,7 @@ key_length = 2048 # key-length in bits
# the key_id has to be the same for both objects, it will also be necessary
# when importing the certificate, to ensure it is linked with these keys.
-key_id = '1'
+key_id = '\x01'
public_template = [
(PyKCS11.CKA_CLASS, PyKCS11.CKO_PUBLIC_KEY),
|
key id as hex, to make it easier to pass to openssl via the command line
|
LudovicRousseau_PyKCS11
|
train
|
py
|
2d08f38f5e0cf0618a7ee972f9c73544a5389f77
|
diff --git a/src/AdldapAuthServiceProvider.php b/src/AdldapAuthServiceProvider.php
index <HASH>..<HASH> 100644
--- a/src/AdldapAuthServiceProvider.php
+++ b/src/AdldapAuthServiceProvider.php
@@ -81,10 +81,15 @@ class AdldapAuthServiceProvider extends ServiceProvider
{
$provider = $this->getUserProvider();
- // We need to verify if the provider we've been given is supported.
switch ($provider) {
case DatabaseUserProvider::class:
- return new $provider($hasher, $config['model']);
+ if (array_key_exists('model', $config)) {
+ return new $provider($hasher, $config['model']);
+ }
+
+ throw new InvalidArgumentException(
+ "No model is configured. You must configure a model to use with the [{$provider}]."
+ );
case NoDatabaseUserProvider::class:
return new $provider;
}
|
Added check for the configured user model
|
Adldap2_Adldap2-Laravel
|
train
|
php
|
a36c69d7ba1dfa3aab53764a9ebb11f58b8aba7b
|
diff --git a/lib/services/dell-wsman-obm-service.js b/lib/services/dell-wsman-obm-service.js
index <HASH>..<HASH> 100644
--- a/lib/services/dell-wsman-obm-service.js
+++ b/lib/services/dell-wsman-obm-service.js
@@ -92,9 +92,9 @@ function DellWsmanObmServiceFactory(
address: self.config.host,
userName: self.config.user,
password: encryption.decrypt(self.config.password)
- }
+ };
var uri = dell.services.inventory.summary;
- return wsman.clientRequest(uri, 'POST', data)
+ return wsman.clientRequest(uri, 'POST', data);
})
.then(function(res) {
console.log('Current Power State: ' + res.body.powerState);
|
Update dell-wsman-obm-service.js
|
RackHD_on-tasks
|
train
|
js
|
fc38ac25e4dc80bfa60b921cab03316256518fa8
|
diff --git a/src/main/java/com/couchbase/lite/NativeLibrary.java b/src/main/java/com/couchbase/lite/NativeLibrary.java
index <HASH>..<HASH> 100644
--- a/src/main/java/com/couchbase/lite/NativeLibrary.java
+++ b/src/main/java/com/couchbase/lite/NativeLibrary.java
@@ -100,6 +100,7 @@ final class NativeLibrary {
final String osName = System.getProperty("os.name");
if (osName.contains("Linux")) { path += "/linux"; }
else if (osName.contains("Mac")) { path += "/osx"; }
+ else if (osName.contains("Windows")) { path += "/windows"; }
else { path += "/" + osName; }
// Arch:
|
CBL-<I>: fix: native libray path (#<I>)
* windows native library path corrected. only tested java in windows
|
couchbase_couchbase-lite-java
|
train
|
java
|
98394596611e63f021ceb1d58e006178cd02ee23
|
diff --git a/spec/flipper/ui/actions/feature_spec.rb b/spec/flipper/ui/actions/feature_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/flipper/ui/actions/feature_spec.rb
+++ b/spec/flipper/ui/actions/feature_spec.rb
@@ -87,4 +87,24 @@ RSpec.describe Flipper::UI::Actions::Feature do
expect(last_response.body).to include('Percentage of Actors')
end
end
+
+ describe 'GET /features/:feature with _features in feature name' do
+ before do
+ get '/features/search_features'
+ end
+
+ it 'responds with success' do
+ expect(last_response.status).to be(200)
+ end
+
+ it 'renders template' do
+ expect(last_response.body).to include('search_features')
+ expect(last_response.body).to include('Enable')
+ expect(last_response.body).to include('Disable')
+ expect(last_response.body).to include('Actors')
+ expect(last_response.body).to include('Groups')
+ expect(last_response.body).to include('Percentage of Time')
+ expect(last_response.body).to include('Percentage of Actors')
+ end
+ end
end
|
Add failing spec for feature with name ending in _features
|
jnunemaker_flipper
|
train
|
rb
|
91bc985a835cf66e45b76b9ccd0c92bd908ee9d6
|
diff --git a/js/ServerPersist/MemoryAsync.js b/js/ServerPersist/MemoryAsync.js
index <HASH>..<HASH> 100644
--- a/js/ServerPersist/MemoryAsync.js
+++ b/js/ServerPersist/MemoryAsync.js
@@ -215,7 +215,7 @@ SyncIt_ServerPersist_MemoryAsync.prototype.getQueueitem = function(dataset,fromV
k: this._d[i].k,
b: this._d[i].b,
m: this._d[i].m,
- r: this._d[i].r,
+ r: this._d[i].r ? true : false,
u: this._d[i].u,
o: this._d[i].o,
t: this._d[i].t
|
Fix r property sometimes being left as undefined when calling SyncIt_ServerPersist_MemoryAsync.getQueueitem
|
forbesmyester_SyncIt
|
train
|
js
|
7b26f1d456ad1b6d23bf0c63a848413ad1dbd70e
|
diff --git a/src/Illuminate/Console/Scheduling/ScheduleListCommand.php b/src/Illuminate/Console/Scheduling/ScheduleListCommand.php
index <HASH>..<HASH> 100644
--- a/src/Illuminate/Console/Scheduling/ScheduleListCommand.php
+++ b/src/Illuminate/Console/Scheduling/ScheduleListCommand.php
@@ -113,7 +113,7 @@ class ScheduleListCommand extends Command
));
// Highlight the parameters...
- $command = preg_replace("#(=['\"]?)([^'\"]+)(['\"]?)#", '$1<fg=yellow;options=bold>$2</>$3', $command);
+ $command = preg_replace("#(php artisan [\w\-:]+) (.+)#", '$1 <fg=yellow;options=bold>$2</>', $command);
return [sprintf(
' <fg=yellow>%s</> %s<fg=#6C7280>%s %s%s %s</>',
|
Update ScheduleListCommand.php (#<I>)
Improve coloring output
|
laravel_framework
|
train
|
php
|
a0e8755dc6f038ec4c82d83fdfd03e0c7ce3718f
|
diff --git a/src/render.js b/src/render.js
index <HASH>..<HASH> 100644
--- a/src/render.js
+++ b/src/render.js
@@ -118,9 +118,7 @@ function _render(callback) {
var prevData = extractElementData(element);
if (this.nodeName == 'polygon' && tag == 'polygon') {
var prevPoints = prevData.attributes.points;
- if (prevPoints == null) {
- convertShape = false;
- } else if (!convertEqualSidedPolygons) {
+ if (!convertEqualSidedPolygons) {
var nPrevPoints = prevPoints.split(' ').length;
var points = data.attributes.points;
var nPoints = points.split(' ').length;
|
Removed unused stuff
This particular stuff is not used since if there is alternative data,
there is always previous points as well.
|
magjac_d3-graphviz
|
train
|
js
|
1b5136f66e39131cf8d147416c90630ee1026ebe
|
diff --git a/args4j/src/org/kohsuke/args4j/CmdLineParser.java b/args4j/src/org/kohsuke/args4j/CmdLineParser.java
index <HASH>..<HASH> 100644
--- a/args4j/src/org/kohsuke/args4j/CmdLineParser.java
+++ b/args4j/src/org/kohsuke/args4j/CmdLineParser.java
@@ -108,6 +108,7 @@ public class CmdLineParser {
* if the option bean class is using args4j annotations incorrectly.
*/
public CmdLineParser(Object bean, ParserProperties parserProperties) {
+ this.parserProperties = parserProperties;
// A 'return' in the constructor just skips the rest of the implementation
// and returns the new object directly.
if (bean==null) return;
@@ -123,7 +124,6 @@ public class CmdLineParser {
}
});
}
- setUsageWidth(parserProperties.getUsageWidth());
}
/** This method is similar to {@code Objects.requireNonNull()}.
|
ParserProperties is only place to store the settings (fixed)
|
kohsuke_args4j
|
train
|
java
|
74597dc26dd01615b3e29c188c38258db2de21ff
|
diff --git a/lib/active_record/connection_adapters/cockroachdb_adapter.rb b/lib/active_record/connection_adapters/cockroachdb_adapter.rb
index <HASH>..<HASH> 100644
--- a/lib/active_record/connection_adapters/cockroachdb_adapter.rb
+++ b/lib/active_record/connection_adapters/cockroachdb_adapter.rb
@@ -68,10 +68,6 @@ module ActiveRecord
false
end
- def supports_pg_crypto_uuid?
- false
- end
-
def supports_partial_index?
# See cockroachdb/cockroach#9683
false
|
Remove supports_pg_crypto_uuid?
* This method doesn't exist in Rails, and it's nowhere to be found in the old
rails fork/git submodule.
|
cockroachdb_activerecord-cockroachdb-adapter
|
train
|
rb
|
f0750a455a77b24e1e37e01e37c581756eca8a31
|
diff --git a/src/Mcamara/LaravelLocalization/LanguageNegotiator.php b/src/Mcamara/LaravelLocalization/LanguageNegotiator.php
index <HASH>..<HASH> 100644
--- a/src/Mcamara/LaravelLocalization/LanguageNegotiator.php
+++ b/src/Mcamara/LaravelLocalization/LanguageNegotiator.php
@@ -31,7 +31,6 @@ class LanguageNegotiator {
*/
function __construct( $defaultLocale, $supportedLanguages, Request $request )
{
- dd($request);
$this->defaultLocale = $defaultLocale;
$this->supportedLanguages = $supportedLanguages;
$this->request = $request;
|
fixed phpdoc blocks in LanguageNegotiator
|
mcamara_laravel-localization
|
train
|
php
|
90ffc1eccb716e88a8eba8a45111551346db0076
|
diff --git a/test/test_storage.py b/test/test_storage.py
index <HASH>..<HASH> 100644
--- a/test/test_storage.py
+++ b/test/test_storage.py
@@ -6,8 +6,10 @@ import re
import time
from cloudvolume.storage import Storage
+from cloudvolume import exceptions
from layer_harness import delete_layer, TEST_NUMBER
+
#TODO delete files created by tests
def test_read_write():
urls = [
@@ -138,14 +140,19 @@ def test_compression():
for method in compression_tests:
with Storage(url, n_threads=5) as s:
content = b'some_string'
- s.put_file('info', content, compress=method)
- s.wait()
# remove when GCS enables "br"
if method == "br" and "gs://" in url:
- with pytest.raises(TypeError, match="Brotli unsupported on google cloud storage"):
+ with pytest.raises(
+ exceptions.UnsupportedCompressionType,
+ match="Brotli unsupported on google cloud storage"
+ ):
+ s.put_file('info', content, compress=method)
+ s.wait()
retrieved = s.get_file('info')
else:
+ s.put_file('info', content, compress=method)
+ s.wait()
retrieved = s.get_file('info')
assert content == retrieved
|
fixtest: catch UnsupportedCompressionType instead of TypeError
|
seung-lab_cloud-volume
|
train
|
py
|
92419f94c559706054cdc52f02b7b0bf4702e255
|
diff --git a/test/Stagehand/TestRunner/TestCase.php b/test/Stagehand/TestRunner/TestCase.php
index <HASH>..<HASH> 100644
--- a/test/Stagehand/TestRunner/TestCase.php
+++ b/test/Stagehand/TestRunner/TestCase.php
@@ -106,10 +106,7 @@ abstract class Stagehand_TestRunner_TestCase extends PHPUnit_Framework_TestCase
protected function tearDown()
{
- $directoryScanner = new Stagehand_DirectoryScanner(array($this, 'removeJUnitXMLFile'));
- $directoryScanner->addExclude('^.*');
- $directoryScanner->addInclude('\.xml$');
- $directoryScanner->scan($this->tmpDirectory);
+ unlink($this->config->junitXMLFile);
}
public function removeJUnitXMLFile($element)
|
Changed the way to remove a JUnit XML file for testing.
|
piece_stagehand-testrunner
|
train
|
php
|
5a3df71be146a8c9b687058a5b96188ce48f897e
|
diff --git a/kernel/private/rest/classes/controllers/rest_controller.php b/kernel/private/rest/classes/controllers/rest_controller.php
index <HASH>..<HASH> 100644
--- a/kernel/private/rest/classes/controllers/rest_controller.php
+++ b/kernel/private/rest/classes/controllers/rest_controller.php
@@ -168,7 +168,10 @@ abstract class ezpRestMvcController extends ezcMvcController
$res = parent::createResult();
$resGroups = $this->getResponseGroups();
- $res->variables['requestedResponseGroups'] = $resGroups;
+ if ( !empty( $resGroups ) )
+ {
+ $res->variables['requestedResponseGroups'] = $resGroups;
+ }
if ( $res instanceof ezpRestMvcResult )
{
|
Fixed bug #<I>: rest api: do not add to final result requestedResponseGroups array if it was not asked for
|
ezsystems_ezpublish-legacy
|
train
|
php
|
9fc1279aab5e47b2106dbb648e44896d9a26f341
|
diff --git a/sprd/model/Design.js b/sprd/model/Design.js
index <HASH>..<HASH> 100644
--- a/sprd/model/Design.js
+++ b/sprd/model/Design.js
@@ -154,6 +154,10 @@ define(['sprd/data/SprdModel', 'sprd/model/PrintType', 'sprd/entity/Size', 'sprd
return null;
},
+ isUploaded: function() {
+ return this.$.href.indexOf("u") === 0;
+ },
+
setTranslation: function (translation) {
var locale = translation.get('locale'),
previousTranslation;
|
Stencils only for uploaded designs
|
spreadshirt_rAppid.js-sprd
|
train
|
js
|
ecaa8355f76d9bd9ea12392b557254b743548600
|
diff --git a/packages/manifest/index.js b/packages/manifest/index.js
index <HASH>..<HASH> 100755
--- a/packages/manifest/index.js
+++ b/packages/manifest/index.js
@@ -1,10 +1,18 @@
const hash = require('hash-sum')
+const debug = require('debug')('nuxt:pwa:manifest')
const fixUrl = url => url.replace(/\/\//g, '/').replace(':/', '://')
const isUrl = url => url.indexOf('http') === 0 || url.indexOf('//') === 0
const find = (arr, key, val) => arr.find(obj => val ? obj[key] === val : obj[key])
module.exports = function nuxtManifest (options) {
+ this.nuxt.plugin('build', builder => {
+ debug('Adding manifest')
+ addManifest.call(this, options)
+ })
+}
+
+function addManifest (options) {
// routerBase and publicPath
const routerBase = this.options.router.base
let publicPath = fixUrl(`${routerBase}/${this.options.build.publicPath}`)
|
fix(manifest): run only on build
|
nuxt-community_pwa-module
|
train
|
js
|
8b25ffc57dd7705d4992fa7ef3ed8e700b880dde
|
diff --git a/server/phoxy.php b/server/phoxy.php
index <HASH>..<HASH> 100644
--- a/server/phoxy.php
+++ b/server/phoxy.php
@@ -79,7 +79,7 @@ class phoxy extends api
else
header('Content-Type: application/json; charset=utf-8');
- if (phoxy_conf()["is_ajax_request"])
+ if (!phoxy_conf()["debug_api"] || phoxy_conf()["is_ajax_request"])
echo $prepared;
else if (phoxy_conf()["buffered_output"])
echo "\n<hr><h1>Log</h1>\n{$buffered_output}";
|
Fixing debug log apperance in production mode
|
phoxy_phoxy
|
train
|
php
|
d044467923d859d76a93f4ff9d9da99a66f263e8
|
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -20,5 +20,6 @@ setup(
install_requirements=['pandas'],
keywords=['pandas', 'validator'],
license='MIT License',
- include_package_data=True
+ include_package_data=True,
+ test_suite='pandas_validator',
)
|
Add test suit to setup.py
|
c-data_pandas-validator
|
train
|
py
|
f41445debf3e225bb80a9a7bbbd406956fbf2f23
|
diff --git a/ceph_deploy/cli.py b/ceph_deploy/cli.py
index <HASH>..<HASH> 100644
--- a/ceph_deploy/cli.py
+++ b/ceph_deploy/cli.py
@@ -53,6 +53,10 @@ def get_parser():
help='the current installed version of ceph-deploy',
)
parser.add_argument(
+ '--username',
+ help='the username to connect to the remote host',
+ )
+ parser.add_argument(
'--overwrite-conf',
action='store_true',
help='overwrite an existing conf file on remote host (if present)',
|
add a global option to allow a different username
|
ceph_ceph-deploy
|
train
|
py
|
a52e4d1c8e13294414a33a93e6029500ecad8d81
|
diff --git a/test/plugin/test_out_exec_filter.rb b/test/plugin/test_out_exec_filter.rb
index <HASH>..<HASH> 100644
--- a/test/plugin/test_out_exec_filter.rb
+++ b/test/plugin/test_out_exec_filter.rb
@@ -21,7 +21,7 @@ class ExecFilterOutputTest < Test::Unit::TestCase
]
def create_driver(conf = CONFIG, tag = 'test')
- Fluent::Test::OutputTestDriver.new(Fluent::ExecFilterOutput, tag).configure(conf)
+ Fluent::Test::BufferedOutputTestDriver.new(Fluent::ExecFilterOutput, tag).configure(conf)
end
def sed_unbuffered_support?
@@ -38,6 +38,8 @@ class ExecFilterOutputTest < Test::Unit::TestCase
def test_configure
d = create_driver
+ assert d.instance.instance_eval{ @overrides_format_stream }
+
assert_equal ["time_in","tag","k1"], d.instance.in_keys
assert_equal ["time_out","tag","k2"], d.instance.out_keys
assert_equal "tag", d.instance.out_tag_key
|
fix to use test driver for buffered output
|
fluent_fluentd
|
train
|
rb
|
91d92199fbe04e04a65c34eabe7b3e72121beaf1
|
diff --git a/plugins/humaninput-clapper.js b/plugins/humaninput-clapper.js
index <HASH>..<HASH> 100644
--- a/plugins/humaninput-clapper.js
+++ b/plugins/humaninput-clapper.js
@@ -1,5 +1,5 @@
/**
- * humaninput-speechrec.js - HumanInput Clapper Plugin: Adds support detecting clap events like "the clapper" (classic)
+ * humaninput-clapper.js - HumanInput Clapper Plugin: Adds support detecting clap events like "the clapper" (classic)
* Copyright (c) 2016, Dan McDougall
* @link https://github.com/liftoff/HumanInput
* @license Apache-2.0
|
Clapper Plugin: Fixed an error in the little info comment at the top.
|
liftoff_HumanInput
|
train
|
js
|
0e406c0a17a1774a53198abe959621f17b964cb6
|
diff --git a/lib/millstone.js b/lib/millstone.js
index <HASH>..<HASH> 100644
--- a/lib/millstone.js
+++ b/lib/millstone.js
@@ -724,11 +724,21 @@ function resolve(options, callback) {
// hidden metadata file that will contain headers for the
// original HTTP request. We look at the
// `content-disposition` header to determine the extension.
- fs.readlink(l.Datasource.file, function(err, resolvedPath) {
- if (resolvedPath && isRelative(resolvedPath)) {
- resolvedPath = path.join(path.dirname(l.Datasource.file), resolvedPath);
+ fs.lstat(l.Datasource.file, function(err, stats) {
+ if (err && err.code != 'ENOENT') {
+ next(err);
+ } else {
+ if (!stats.isSymbolicLink()) {
+ readExtension(l.Datasource.file, next);
+ } else {
+ fs.readlink(l.Datasource.file, function(err, resolvedPath) {
+ if (resolvedPath && isRelative(resolvedPath)) {
+ resolvedPath = path.join(path.dirname(l.Datasource.file), resolvedPath);
+ }
+ readExtension(resolvedPath, next);
+ });
+ }
}
- readExtension(resolvedPath, next);
});
}
}, function(err, ext) {
|
detect if a file is a symlink before trying to call readlink - fixes #<I>
|
tilemill-project_millstone
|
train
|
js
|
297e84b5ec7b660f183a23b14bcc57083943d9d9
|
diff --git a/lyricsgenius/api.py b/lyricsgenius/api.py
index <HASH>..<HASH> 100644
--- a/lyricsgenius/api.py
+++ b/lyricsgenius/api.py
@@ -272,7 +272,7 @@ class Genius(API):
response = self.search_genius_web(search_term)
# Use old song search method if search_genius_web fails
- if not response or True:
+ if not response:
if self.verbose:
print("\nsearch_genius_web failed, using old search method.")
return self._search_song_old(title, artist, get_full_info, True)
|
Remove 'or True' from search_song
|
johnwmillr_LyricsGenius
|
train
|
py
|
48df5f73e858cbf2001543b4ca2ce6932d4dbedb
|
diff --git a/lib/rfm_result.rb b/lib/rfm_result.rb
index <HASH>..<HASH> 100644
--- a/lib/rfm_result.rb
+++ b/lib/rfm_result.rb
@@ -86,8 +86,8 @@ module Rfm::Result
@timestamp_format = convertFormatString(datasource.attr('timestamp-format'))
# process count metadata
- @total_count = datasource.attributes['total-count'].to_i
- @foundset_count = root.elements['resultset'].attributes['count'].to_i
+ @total_count = datasource.attr('total-count').to_i
+ @foundset_count = doc.search('resultset').attr('count').to_i
# process field metadata
doc.search('field-definition').each do |field|
|
Minor adjustment for hpricot syntax
|
lardawge_rfm
|
train
|
rb
|
0be771a370e8de8e1c1b02115d5c5664151d5d16
|
diff --git a/php/export/class-wp-export-wxr-formatter.php b/php/export/class-wp-export-wxr-formatter.php
index <HASH>..<HASH> 100644
--- a/php/export/class-wp-export-wxr-formatter.php
+++ b/php/export/class-wp-export-wxr-formatter.php
@@ -166,7 +166,7 @@ COMMENT;
->link( esc_url( apply_filters('the_permalink_rss', get_permalink() ) ) )
->pubDate( mysql2date( 'D, d M Y H:i:s +0000', get_post_time( 'Y-m-d H:i:s', true ), false ) )
->tag( 'dc:creator', get_the_author_meta( 'login' ) )
- ->guid( get_the_guid(), array( 'isPermaLink' => 'false' ) )
+ ->guid( esc_url( get_the_guid() ), array( 'isPermaLink' => 'false' ) )
->description( '' )
->tag( 'content:encoded' )->contains->cdata( $post->post_content )->end
->tag( 'excerpt:encoded' )->contains->cdata( $post->post_excerpt )->end
|
esc_url before outputting GUID to WXR to avoid 'unterminated entity reference' error when GUID contains ampersand
|
wp-cli_export-command
|
train
|
php
|
032ba5a6d3df3f809d174ebff61f56a3ece52d16
|
diff --git a/src/codebird.php b/src/codebird.php
index <HASH>..<HASH> 100644
--- a/src/codebird.php
+++ b/src/codebird.php
@@ -286,8 +286,12 @@ class Codebird
throw new Exception('To get the authenticate URL, the OAuth token must be set.');
}
$url = self::$_endpoint_oauth . 'oauth/authenticate?oauth_token=' . $this->_url($this->_oauth_token);
- if($force_login) $url .= "&force_login=1";
- if($screen_name) $url .= "&screen_name=" . $screen_name;
+ if ($force_login) {
+ $url .= "&force_login=1";
+ }
+ if ($screen_name) {
+ $url .= "&screen_name=" . $screen_name;
+ }
return $url;
}
@@ -302,8 +306,12 @@ class Codebird
throw new Exception('To get the authorize URL, the OAuth token must be set.');
}
$url = self::$_endpoint_oauth . 'oauth/authorize?oauth_token=' . $this->_url($this->_oauth_token);
- if($force_login) $url .= "&force_login=1";
- if($screen_name) $url .= "&screen_name=" . $screen_name;
+ if ($force_login) {
+ $url .= "&force_login=1";
+ }
+ if ($screen_name) {
+ $url .= "&screen_name=" . $screen_name;
+ }
return $url;
}
|
Complying with PEAR standards. #<I>
|
jublo_codebird-php
|
train
|
php
|
abe1c2c8b7400b6789411e87c72637cb09d83852
|
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -4,7 +4,8 @@ from distutils.core import setup, Extension
_segyio = Extension('segyio._segyio',
sources=['python/segyio/_segyio.c', 'src/segyio/segy.c', 'src/spec/segyspec.c'],
- include_dirs=['src'])
+ include_dirs=['src'],
+ extra_compile_args=["-std=c99"])
long_description = """
=======
@@ -50,7 +51,7 @@ written according to specification, but segyio does not mandate this.
"""
setup(name='SegyIO',
- version='1.0.2',
+ version='1.0.3',
description='IO library for SEG-Y files',
long_description=long_description,
author='Statoil ASA',
|
Added c<I> as a compile flag.
|
equinor_segyio
|
train
|
py
|
7ce6f995a818bc03d07d4deb07a2654ec28dcfad
|
diff --git a/lib/virtus.rb b/lib/virtus.rb
index <HASH>..<HASH> 100644
--- a/lib/virtus.rb
+++ b/lib/virtus.rb
@@ -28,6 +28,8 @@ module Virtus
case object
when Class then object.send(:include, ClassInclusions)
when Module then object.extend(ModuleExtensions)
+ else
+ raise ArgumentError, "Object not supported #{object.inspect}"
end
end
private_class_method :included
|
Raise argument error if Virtus is being included into an unsupported object
|
solnic_virtus
|
train
|
rb
|
f8f08320c7c23573168d2c616afce0244286a2b9
|
diff --git a/index.js b/index.js
index <HASH>..<HASH> 100644
--- a/index.js
+++ b/index.js
@@ -45,7 +45,7 @@ function gatherBuildResources(percyClient, buildDir) {
if (path.sep == '\\') {
// Windows support: transform filesystem backslashes into forward-slashes for the URL.
- resourceUrl = resourceUrl.replace('\\', '/');
+ resourceUrl = resourceUrl.replace(/\\/g, '/');
}
for (var i in SKIPPED_ASSETS) {
|
Fix Windows path support. (#<I>)
|
percy_ember-percy
|
train
|
js
|
33e36761d1d26b156fe9a93bddb20cb35f5b8476
|
diff --git a/pingouin/parametric.py b/pingouin/parametric.py
index <HASH>..<HASH> 100644
--- a/pingouin/parametric.py
+++ b/pingouin/parametric.py
@@ -576,6 +576,9 @@ def rm_anova2(dv=None, within=None, subject=None, data=None,
data = _remove_rm_na(dv=dv, subject=subject,
data=data[[a, b, subject, dv]])
+ # Collapse to the mean
+ data = data.groupby([subject, a, b]).mean().reset_index()
+
# Group sizes and grandmean
n_a = data[a].nunique()
n_b = data[b].nunique()
|
Applied automatic collapsing to the mean for rm_anova2
|
raphaelvallat_pingouin
|
train
|
py
|
0d5cd16df42f651f89c6a5bbefb3847a1eef7ab7
|
diff --git a/porcupine/src/main/java/com/airhacks/porcupine/execution/control/Managed.java b/porcupine/src/main/java/com/airhacks/porcupine/execution/control/Managed.java
index <HASH>..<HASH> 100644
--- a/porcupine/src/main/java/com/airhacks/porcupine/execution/control/Managed.java
+++ b/porcupine/src/main/java/com/airhacks/porcupine/execution/control/Managed.java
@@ -11,6 +11,11 @@ import javax.inject.Qualifier;
/**
*
* @author airhacks.com
+ *
+ *
+ * See
+ * <a href="https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/ThreadPoolExecutor.html">ThreadPoolExecutor</a>
+ *
*/
@Qualifier
@Retention(RUNTIME)
@@ -20,11 +25,16 @@ public @interface Managed {
public static final String UNSET = "-";
@Nonbinding
- int corePoolSize() default 2;
+ int corePoolSize() default 4;
@Nonbinding
- int maxPoolSize() default 4;
+ int maxPoolSize() default 10;
+ /**
+ *
+ * @return the keep alive time in seconds.
+ *
+ */
@Nonbinding
int keepAliveTime() default 1;
|
Defaults adjusted, javadoc added
|
AdamBien_porcupine
|
train
|
java
|
078b25162d7f5d84a8b40a7d92e453eed8b435b7
|
diff --git a/src/TemporaryDirectory.php b/src/TemporaryDirectory.php
index <HASH>..<HASH> 100644
--- a/src/TemporaryDirectory.php
+++ b/src/TemporaryDirectory.php
@@ -161,6 +161,8 @@ class TemporaryDirectory
}
}
+ gc_collect_cycles();
+
return rmdir($path);
}
}
|
Force php garbage collection cycle with “gr_collect_cycles”
|
spatie_temporary-directory
|
train
|
php
|
5d05644e3e54a92c4c0a4c384a164617c66d92fe
|
diff --git a/lib/puppet/pops/types/p_object_type.rb b/lib/puppet/pops/types/p_object_type.rb
index <HASH>..<HASH> 100644
--- a/lib/puppet/pops/types/p_object_type.rb
+++ b/lib/puppet/pops/types/p_object_type.rb
@@ -563,6 +563,10 @@ class PObjectType < PMetaType
rp.is_a?(PObjectType) && rp.equality_include_type?
end
+ def self.from_hash(hash)
+ new(hash, nil)
+ end
+
# @api private
def _pcore_init_from_hash(init_hash)
TypeAsserter.assert_instance_of('object initializer', TYPE_OBJECT_I12N, init_hash)
|
(PUP-<I>) Add a #from_hash method to the Object type.
This commit adds the ability to create a Object type (not an instance)
using the Object meta type and an initialization hash. The addition is
needed to facilitate representing Object types as a human readable Data
hash.
|
puppetlabs_puppet
|
train
|
rb
|
604dda4a6cf4950e102d54b41d9f32f959ea6fb1
|
diff --git a/raiden/transfer/channel.py b/raiden/transfer/channel.py
index <HASH>..<HASH> 100644
--- a/raiden/transfer/channel.py
+++ b/raiden/transfer/channel.py
@@ -556,6 +556,10 @@ def valid_lockedtransfer_check(
lock: HashTimeLockState,
) -> MerkletreeOrError:
+ lock_registered_on_chain = (
+ lock.secrethash in channel_state.our_state.secrethashes_to_onchain_unlockedlocks
+ )
+
current_balance_proof = get_current_balanceproof(sender_state)
merkletree = compute_merkletree_with(sender_state.merkletree, lock.lockhash)
@@ -569,7 +573,11 @@ def valid_lockedtransfer_check(
sender_state=sender_state,
)
- if not is_balance_proof_usable:
+ if lock_registered_on_chain:
+ msg = f'Invalid {message_name} message. Secrethash is already registered on chain.'
+ result = (False, msg, None)
+
+ elif not is_balance_proof_usable:
msg = f'Invalid {message_name} message. {invalid_balance_proof_msg}'
result = (False, msg, None)
@@ -1521,7 +1529,7 @@ def register_onchain_secret(
) -> None:
"""This will register the onchain secret and set the lock to the unlocked stated.
- Even though the lock is unlock it is *not* claimed. The capacity will
+ Even though the lock is unlocked it is *not* claimed. The capacity will
increase once the next balance proof is received.
"""
our_state = channel_state.our_state
|
Ignore transfer if lock is already registered onchain
Fix #<I>
|
raiden-network_raiden
|
train
|
py
|
e8d2fd6a7da794d2320dedce2f8abd69c52f4f11
|
diff --git a/objects/timber-term.php b/objects/timber-term.php
index <HASH>..<HASH> 100644
--- a/objects/timber-term.php
+++ b/objects/timber-term.php
@@ -97,7 +97,7 @@
}
function get_path(){
- return $this->get_url();
+ return '/'.$this->get_url();
}
function get_url(){
|
TimberTerm paths now have a proceeding slash
|
timber_timber
|
train
|
php
|
229f647c1e02797fe2512fa33f95e17a0b0cc072
|
diff --git a/pyocd/flash/loader.py b/pyocd/flash/loader.py
index <HASH>..<HASH> 100755
--- a/pyocd/flash/loader.py
+++ b/pyocd/flash/loader.py
@@ -31,6 +31,8 @@ from ..utility.compatibility import FileNotFoundError_
LOG = logging.getLogger(__name__)
+## Sentinel object used to identify an unset chip_erase parameter.
+CHIP_ERASE_SENTINEL = object()
def ranges(i):
"""!
@@ -57,7 +59,7 @@ class FileProgrammer(object):
- Intel Hex (.hex)
- ELF (.elf or .axf)
"""
- def __init__(self, session, progress=None, chip_erase=None, trust_crc=None):
+ def __init__(self, session, progress=None, chip_erase=CHIP_ERASE_SENTINEL, trust_crc=None):
"""! @brief Constructor.
@param self
@@ -344,9 +346,6 @@ class FlashEraser(object):
end_addr = page_addr + 1
return page_addr, end_addr
-## Sentinel object used to identify an unset chip_erase parameter.
-CHIP_ERASE_SENTINEL = object()
-
class FlashLoader(object):
"""! @brief Handles high level programming of raw binary data to flash.
|
Fix default sector erase for FileProgrammer.
- If FileProgrammer was used directly, without setting chip_erase, it
would still default to auto.
|
mbedmicro_pyOCD
|
train
|
py
|
ed5aa2f4d243145d16359125bdb14cc3e7ebe815
|
diff --git a/robolectric-resources/src/main/java/org/robolectric/shadows/Converter.java b/robolectric-resources/src/main/java/org/robolectric/shadows/Converter.java
index <HASH>..<HASH> 100644
--- a/robolectric-resources/src/main/java/org/robolectric/shadows/Converter.java
+++ b/robolectric-resources/src/main/java/org/robolectric/shadows/Converter.java
@@ -90,6 +90,8 @@ public class Converter<T> {
return;
} else if (resName.type.equals("menu")) {
return;
+ } else if (resName.type.equals("raw")) {
+ return;
} else if (DrawableResourceLoader.isStillHandledHere(resName)) {
// wtf. color and drawable references reference are all kinds of stupid.
DrawableNode drawableNode = resourceLoader.getDrawableNode(resName, qualifiers);
|
add support for referencing raw resources in xml layouts
|
robolectric_robolectric
|
train
|
java
|
eb713c0800ad91af425974594e9f047faf50d798
|
diff --git a/wffweb/src/main/java/com/webfirmframework/wffweb/settings/WffConfiguration.java b/wffweb/src/main/java/com/webfirmframework/wffweb/settings/WffConfiguration.java
index <HASH>..<HASH> 100644
--- a/wffweb/src/main/java/com/webfirmframework/wffweb/settings/WffConfiguration.java
+++ b/wffweb/src/main/java/com/webfirmframework/wffweb/settings/WffConfiguration.java
@@ -56,7 +56,8 @@ public class WffConfiguration {
/**
* gives warning message on inappropriate usage of code if it is set to
- * true.
+ * true. NB:- its implementation is not finished yet so it may give unwanted
+ * warning.
*
* @param directionWarningOn
* the directionWarningOn to set
|
Added needful javadoc comment
|
webfirmframework_wff
|
train
|
java
|
cfd85255d6dd714425010fc98cadf3f42f7ce367
|
diff --git a/activesupport/lib/active_support/i18n.rb b/activesupport/lib/active_support/i18n.rb
index <HASH>..<HASH> 100644
--- a/activesupport/lib/active_support/i18n.rb
+++ b/activesupport/lib/active_support/i18n.rb
@@ -1,5 +1,7 @@
begin
require 'active_support/core_ext/hash/deep_merge'
+ require 'active_support/core_ext/hash/except'
+ require 'active_support/core_ext/hash/slice'
require 'i18n'
require 'active_support/lazy_load_hooks'
rescue LoadError => e
|
Supress warning about method redifinition
In i<I>n gem, the following methods are defined.
- `Hash#except`
- `Hash#slice`
But if there are defined already, i<I>n skips these definitions.
So these definition by `active_support` are required before `require 'i<I>n'`.
|
rails_rails
|
train
|
rb
|
c01dbe3d7f0b6c470f3dade349c116585c4eb496
|
diff --git a/dev/com.ibm.ws.session/src/com/ibm/ws/session/store/memory/MemorySession.java b/dev/com.ibm.ws.session/src/com/ibm/ws/session/store/memory/MemorySession.java
index <HASH>..<HASH> 100644
--- a/dev/com.ibm.ws.session/src/com/ibm/ws/session/store/memory/MemorySession.java
+++ b/dev/com.ibm.ws.session/src/com/ibm/ws/session/store/memory/MemorySession.java
@@ -211,9 +211,15 @@ public class MemorySession implements ISession {
}
return;
}
- if (!_isValid) {
- throw new IllegalStateException();
+
+ if (!_isValid)
+ if (com.ibm.ejs.ras.TraceComponent.isAnyTracingEnabled() && LoggingUtil.SESSION_LOGGER_CORE.isLoggable(Level.FINE)) {
+ LoggingUtil.SESSION_LOGGER_CORE.logp(Level.FINE, methodClassName, methodNames[INVALIDATE], "isInProcessOfStopping: " + ((MemoryStore)_store).isInProcessOfStopping());
+ }
+ if (!((MemoryStore)_store).isInProcessOfStopping()) {
+ throw new IllegalStateException();
}
+
invalInProgress = true;
// PM03375: Remove duplicate call to sessionCacheDiscard for persistence case
|
Adding isInProcessOfStopping check for session invalidation
|
OpenLiberty_open-liberty
|
train
|
java
|
753fbcd96605fcbbfb8c6d0d8f5f294423b7a5fe
|
diff --git a/peek_plugin_base/__init__.py b/peek_plugin_base/__init__.py
index <HASH>..<HASH> 100644
--- a/peek_plugin_base/__init__.py
+++ b/peek_plugin_base/__init__.py
@@ -1,4 +1,4 @@
__project__ = 'Synerty Peek'
__copyright__ = '2016, Synerty'
__author__ = 'Synerty'
-__version__ = '0.1.0'
\ No newline at end of file
+__version__ = '0.1.1'
\ No newline at end of file
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -6,7 +6,7 @@ from setuptools import find_packages
pip_package_name = "peek-plugin-base"
py_package_name = "peek_plugin_base"
-package_version = '0.1.0'
+package_version = '0.1.1'
egg_info = "%s.egg-info" % pip_package_name
if os.path.isdir(egg_info):
|
Updated to version <I>
|
Synerty_peek-plugin-base
|
train
|
py,py
|
a7dea6bfa48ea1e8dbe63d2284abbebe8afaf40e
|
diff --git a/lib/steam/sockets/GoldSrcSocket.php b/lib/steam/sockets/GoldSrcSocket.php
index <HASH>..<HASH> 100644
--- a/lib/steam/sockets/GoldSrcSocket.php
+++ b/lib/steam/sockets/GoldSrcSocket.php
@@ -112,7 +112,6 @@ class GoldSrcSocket extends SteamSocket {
}
$this->rconSend("rcon {$this->rconChallenge} $password $command");
- $this->rconSend("rcon {$this->rconChallenge} $password");
if($this->isHLTV) {
try {
$response = $this->getReply()->getResponse();
@@ -129,6 +128,8 @@ class GoldSrcSocket extends SteamSocket {
throw new RCONBanException();
}
+ $this->rconSend("rcon {$this->rconChallenge} $password");
+
do {
$responsePart = $this->getReply()->getResponse();
$response .= $responsePart;
|
Optimize GoldSrc RCON requests
Only send second request if authentication succeeded.
|
koraktor_steam-condenser-php
|
train
|
php
|
d20da1156052170bd94b95d769e51ee377c9ea50
|
diff --git a/Rakefile.rb b/Rakefile.rb
index <HASH>..<HASH> 100644
--- a/Rakefile.rb
+++ b/Rakefile.rb
@@ -2,6 +2,29 @@
namespace 'test' do
require "rake/testtask"
+ require "ansi/code"
+
+ class JSITestTask < Rake::TestTask
+ def initialize(name: , title: , description: nil, pattern: nil, test_files: nil)
+ @title = title
+ super(name) do |t|
+ t.description = description
+ t.pattern = pattern
+ t.test_files = test_files
+ t.verbose = true
+ t.warning = true
+ end
+ end
+
+ # I want a title printed. #ruby isn't the right entry point for this, but there isn't a better one
+ def ruby(*)
+ puts
+ puts "#{ANSI::Code.magenta('𐡷')} #{ANSI::Code.cyan(@title.upcase)} #{ANSI::Code.magenta('𐡸')}"
+ puts
+
+ super
+ end
+ end
Rake::TestTask.new('unit') do |t|
t.libs << "test"
|
Rakefile define JSITestTask < Rake::TestTask
will be used across test invocations
announces test title before running
|
notEthan_jsi
|
train
|
rb
|
c940bdf966eb19e731b7d82d1d57707ac28aac00
|
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -2,12 +2,12 @@ from distutils.core import setup
setup(
name = 'apiary2postman',
packages = ['apiary2postman'], # this must be the same as the name above
- version = '0.4',
+ version = '0.4.1',
description = 'A tool for converting Blueman API markup from Apiary.io to Postman collection/dumps',
author = 'Erik Jonsson Thoren',
author_email = '[email protected]',
url = 'https://github.com/thecopy/apiary2postman', # use the URL to the github repo
- download_url = 'https://github.com/thecopy/apiary2postman/tarball/0.4', # I'll explain this in a second
+ download_url = 'https://github.com/thecopy/apiary2postman/tarball/0.4.1', # I'll explain this in a second
keywords = ['apiary', 'blueman', 'postman'], # arbitrary keywords
classifiers = [],
entry_points={
|
Updated to reflec <I>
|
thecopy_apiary2postman
|
train
|
py
|
18bcb63ae1aa35d54f0b0504985a8d3746139b5e
|
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100755
--- a/setup.py
+++ b/setup.py
@@ -1,9 +1,12 @@
#!/usr/bin/env python
from setuptools import setup, find_packages, Extension
-ghalton_module = Extension("ghalton._ghalton_wrapper", sources=["src/Halton_wrap.cxx", "src/Halton.cpp"])
+ghalton_module = Extension("ghalton._ghalton_wrapper",
+ sources=["src/Halton_wrap.cxx", "src/Halton.cpp"],
+ extra_compile_args=["-stdlib=libc++"],
+ extra_link_args=['-stdlib=libc++'])
-version = "0.6.1"
+version = "0.6.2"
setup (name = "ghalton",
version = version,
|
Adding compiler and linker flags for successfully building on MacOS machines.
|
fmder_ghalton
|
train
|
py
|
b1de7ffae995d9a1192d43bd300bbab262a54c41
|
diff --git a/spyderlib/widgets/sourcecode/syntaxhighlighters.py b/spyderlib/widgets/sourcecode/syntaxhighlighters.py
index <HASH>..<HASH> 100644
--- a/spyderlib/widgets/sourcecode/syntaxhighlighters.py
+++ b/spyderlib/widgets/sourcecode/syntaxhighlighters.py
@@ -49,7 +49,10 @@ def get_color_scheme(name):
name = name.lower()
scheme = {}
for key in COLOR_SCHEME_KEYS:
- scheme[key] = CONF.get('color_schemes', name+'/'+key)
+ try:
+ scheme[key] = CONF.get('color_schemes', name+'/'+key)
+ except:
+ scheme[key] = CONF.get('color_schemes', 'spyder/'+key)
return scheme
|
Fix crash at startup (after merging pull request #<I>)
- Problem was "custom" color scheme didn't have "currentcell" as part of its
options
|
spyder-ide_spyder
|
train
|
py
|
c3c928bcb282b68d609fca00ed44669066be1566
|
diff --git a/urlutils.py b/urlutils.py
index <HASH>..<HASH> 100644
--- a/urlutils.py
+++ b/urlutils.py
@@ -342,7 +342,7 @@ def create_html_mailto(email, subject=None, body=None, cc=None, bcc=None,
return mailto_link
elif email_obfuscation_mode == 3:
# Javascript-based
- return '''<script language="JavaScript"''' \
+ return '''<script language="JavaScript" ''' \
'''type="text/javascript">''' \
'''document.write('%s'.split("").reverse().join(""))''' \
'''</script>''' % \
|
urlutils: fixed HTML mailto links creation
* Fixed creation of 'mailto' links with "obfuscation mode" 3.
|
inveniosoftware-attic_invenio-utils
|
train
|
py
|
bc91e1667f24035905979b9304d064d9b818e5e3
|
diff --git a/discord/member.py b/discord/member.py
index <HASH>..<HASH> 100644
--- a/discord/member.py
+++ b/discord/member.py
@@ -942,7 +942,7 @@ class Member(discord.abc.Messageable, _UserTag):
Raises
-------
TypeError
- The ``until`` parameter was the wrong type of the datetime was not timezone-aware.
+ The ``until`` parameter was the wrong type or the datetime was not timezone-aware.
"""
if until is None:
|
Fix typo in Member.timeout docs
|
Rapptz_discord.py
|
train
|
py
|
d1fcfa43f02c41053c70e6fcd425de50e102e8ef
|
diff --git a/src/server/pachyderm_test.go b/src/server/pachyderm_test.go
index <HASH>..<HASH> 100644
--- a/src/server/pachyderm_test.go
+++ b/src/server/pachyderm_test.go
@@ -3174,8 +3174,8 @@ func TestPipelinePartialResourceRequest(t *testing.T) {
Cmd: []string{"true"},
},
ResourceSpec: &pps.ResourceSpec{
- Cpu: 0.5,
- Gpu: 1,
+ Cpu: 0.5,
+ Memory: "100M",
},
Inputs: []*pps.PipelineInput{{
Repo: &pfs.Repo{dataRepo},
@@ -3192,7 +3192,7 @@ func TestPipelinePartialResourceRequest(t *testing.T) {
Cmd: []string{"true"},
},
ResourceSpec: &pps.ResourceSpec{
- Gpu: 1,
+ Memory: "100M",
},
Inputs: []*pps.PipelineInput{{
Repo: &pfs.Repo{dataRepo},
|
Remove gpu requests since those won't pass on CI.
|
pachyderm_pachyderm
|
train
|
go
|
afdd156dca590bf92861b38abbbb98c8457dea28
|
diff --git a/wagtailmenus/templatetags/menu_tags.py b/wagtailmenus/templatetags/menu_tags.py
index <HASH>..<HASH> 100644
--- a/wagtailmenus/templatetags/menu_tags.py
+++ b/wagtailmenus/templatetags/menu_tags.py
@@ -205,7 +205,7 @@ def flat_menu(
request_path=request.path,
use_specific=menu.use_specific,
original_menu_tag='flat_menu',
- check_for_children=max_levels > 1,
+ check_for_children=menu.max_levels > 1,
allow_repeating_parents=allow_repeating_parents,
apply_active_classes=apply_active_classes,
menu_instance=menu,
|
Fix flat_menus error when max_levels not provided (and is None)
|
rkhleics_wagtailmenus
|
train
|
py
|
173dc13fc0922f87ee0a47ef22b0c44d305e22c5
|
diff --git a/index.js b/index.js
index <HASH>..<HASH> 100644
--- a/index.js
+++ b/index.js
@@ -7,7 +7,7 @@ module.exports = function cleanupPassportSession(req, res, next) {
}
ended = true;
- if (req.session && Object.keys(req.session.passport).length === 0) {
+ if (req.session && req.session.passport && Object.keys(req.session.passport).length === 0) {
delete req.session.passport;
}
_end.call(res, chunk, encoding);
|
Added undefined check for session.passport
|
wesleytodd_express-session-passport-cleanup
|
train
|
js
|
ec6d24dce639808e89ea04201437a7b46f0fcf94
|
diff --git a/web3/providers/ipc.py b/web3/providers/ipc.py
index <HASH>..<HASH> 100644
--- a/web3/providers/ipc.py
+++ b/web3/providers/ipc.py
@@ -46,7 +46,7 @@ class PersistantSocket(object):
if exc_value is not None:
try:
self.sock.close()
- except:
+ except Exception:
pass
self.sock = None
|
flake8 auto-updates are aggravating
|
ethereum_web3.py
|
train
|
py
|
30d549d2c66e117a52fa4aa90c8eec20607511c0
|
diff --git a/index.js b/index.js
index <HASH>..<HASH> 100644
--- a/index.js
+++ b/index.js
@@ -106,7 +106,7 @@ module.exports = function (content) {
};
// Add key only if it exists in config object to avoid fs errors
- if('htmlTemplate' in fontConfig){
+ if ('htmlTemplate' in fontConfig) {
generatorOptions.htmlTemplate = fontConfig.htmlTemplate;
}
|
Fix CI linting issues in @davorpeic's PR
|
jeerbl_webfonts-loader
|
train
|
js
|
a274df85f98b4de5f5e0f34c5d8452e9fd9023c5
|
diff --git a/mod/resource/lib.php b/mod/resource/lib.php
index <HASH>..<HASH> 100644
--- a/mod/resource/lib.php
+++ b/mod/resource/lib.php
@@ -514,6 +514,7 @@ function resource_dndupload_handle($uploadinfo) {
$data->printintro = $config->printintro;
$data->showsize = $config->showsize;
$data->showtype = $config->showtype;
+ $data->filterfiles = $config->filterfiles;
return resource_add_instance($data, null);
}
|
MDL-<I> mod_resource: filter settings weren't coming from defaults
|
moodle_moodle
|
train
|
php
|
82308b7b4ea8961bc46fc4cb8d534fb5a14187d9
|
diff --git a/gtk/gtk_since_3_10.go b/gtk/gtk_since_3_10.go
index <HASH>..<HASH> 100644
--- a/gtk/gtk_since_3_10.go
+++ b/gtk/gtk_since_3_10.go
@@ -325,7 +325,7 @@ func (v *ListBox) GetAdjustment() *Adjustment {
}
// SetAdjustment is a wrapper around gtk_list_box_set_adjustment().
-func (v *ListBox) SetAdjuctment(adjustment *Adjustment) {
+func (v *ListBox) SetAdjustment(adjustment *Adjustment) {
C.gtk_list_box_set_adjustment(v.native(), adjustment.native())
}
|
fixed typo (SetAdjuctment -> SetAdjustment)
|
gotk3_gotk3
|
train
|
go
|
9f58770fe5cc1f9658e51035589dfe1e576c6279
|
diff --git a/src/client/components/MenuIcon/MenuIcon.react.js b/src/client/components/MenuIcon/MenuIcon.react.js
index <HASH>..<HASH> 100644
--- a/src/client/components/MenuIcon/MenuIcon.react.js
+++ b/src/client/components/MenuIcon/MenuIcon.react.js
@@ -104,7 +104,8 @@ class MenuIcon extends Component {
label,
hideDropdownArrow,
onClick, // eslint-disable-line no-unused-vars
- children
+ children,
+ ...restProps
} = this.props;
const { isOpened } = this.state;
@@ -160,6 +161,7 @@ class MenuIcon extends Component {
ref={ref => (this.containerRef = ref)}
className="oc-menu-icon"
onClick={this.handleClick}
+ {...restProps}
>
<TitledButton
className={`
|
#6 Add possibility to pass any props for "MenuIcon" component
|
OpusCapita_react-navigation
|
train
|
js
|
7625c18b2e622609f3bc66a48b0f4efcb025dcda
|
diff --git a/lib/test-server/server.js b/lib/test-server/server.js
index <HASH>..<HASH> 100644
--- a/lib/test-server/server.js
+++ b/lib/test-server/server.js
@@ -182,10 +182,11 @@ var TestServer = function (config, logger) {
this.socketio = socketio.listen(this.server, {
logger : new SocketIOLogger('socketio', this.logger)
});
- this.socketio.set('transports', ['websocket', 'flashsocket', 'htmlfile', 'xhr-polling', 'jsonp-polling']);
this.socketio.set('client store expiration', 0);
this.socketio.enable('browser client minification');
- this.socketio.disable('flash policy server');
+ this.socketio.disable('flash policy server'); // the flash policy server must be disabled before enabling the
+ // flashsocket transport
+ this.socketio.set('transports', ['websocket', 'flashsocket', 'htmlfile', 'xhr-polling', 'jsonp-polling']);
this.socketio.on('connection', socketConnection.bind(this));
this.slaves = []; // array of all slaves
this.availableSlaves = []; // array of available slaves
|
Disabling the flash policy server before enabling the flash transport.
Otherwise, the flash policy port is opened and immediately closed when
starting, which fails in case this port is already used.
|
attester_attester
|
train
|
js
|
5949e5c39d7cc716c0635f434f793e451888bae7
|
diff --git a/src/adafruit_blinka/microcontroller/generic_linux/sysfs_pwmout.py b/src/adafruit_blinka/microcontroller/generic_linux/sysfs_pwmout.py
index <HASH>..<HASH> 100644
--- a/src/adafruit_blinka/microcontroller/generic_linux/sysfs_pwmout.py
+++ b/src/adafruit_blinka/microcontroller/generic_linux/sysfs_pwmout.py
@@ -90,8 +90,8 @@ class PWMOut(object):
except IOError as e:
raise PWMError(e.errno, "Exporting PWM pin: " + e.strerror)
- self._set_enabled(False)
-
+ #self._set_enabled(False) # This line causes a write error when trying to enable
+
# Look up the period, for fast duty cycle updates
self._period = self._get_period()
|
This line causes a write error when setting up the sysfs device.
|
adafruit_Adafruit_Blinka
|
train
|
py
|
a2235a00deef734772f8cabd8b72d5b9dc2ae8d5
|
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -18,7 +18,7 @@ params = {'author': 'Noah Hoffman',
'scripts': scripts,
'url': 'https://github.com/fhcrc/taxtastic',
'version': __version__,
- 'requires': ['Python (>= 2.7)', 'sqlalchemy']}
+ 'requires': ['Python (>= 2.7)', 'sqlalchemy', 'decorator']}
setup(**params)
|
Added dependency on decorator to setup.py
|
fhcrc_taxtastic
|
train
|
py
|
fec3869b9191b99e724d2bd4f420175e587282e9
|
diff --git a/BANE.py b/BANE.py
index <HASH>..<HASH> 100755
--- a/BANE.py
+++ b/BANE.py
@@ -536,7 +536,7 @@ if __name__=="__main__":
else:
filename = args[0]
if not os.path.exists(filename):
- logging.error("{0} does not exist".format(filename))
+ logging.error("File not found: {0} ".format(filename))
sys.exit(1)
if options.out_base is None:
|
clarified error message when file is not found
|
PaulHancock_Aegean
|
train
|
py
|
b8a643927aeea4bdea130d09283ffb31cd185108
|
diff --git a/thymeleaf-spring5/src/main/java/org/thymeleaf/spring5/SpringWebFluxTemplateEngine.java b/thymeleaf-spring5/src/main/java/org/thymeleaf/spring5/SpringWebFluxTemplateEngine.java
index <HASH>..<HASH> 100644
--- a/thymeleaf-spring5/src/main/java/org/thymeleaf/spring5/SpringWebFluxTemplateEngine.java
+++ b/thymeleaf-spring5/src/main/java/org/thymeleaf/spring5/SpringWebFluxTemplateEngine.java
@@ -359,8 +359,9 @@ public class SpringWebFluxTemplateEngine
// initialization of the throttled processor until the last moment, when output generation
// is really requested.
() -> {
- final String outputContentType = sse? "text/event-stream" : "text/html";
- final TemplateSpec templateSpec = new TemplateSpec(templateName, markupSelectors, null, null, outputContentType);
+ final String outputContentType = sse? "text/event-stream" : null;
+ final TemplateSpec templateSpec =
+ new TemplateSpec(templateName, markupSelectors, outputContentType, null);
return new StreamThrottledTemplateProcessor(
processThrottled(templateSpec, wrappedContext), dataDrivenIterator, firstEventID, sse);
},
|
Adapt to thymeleaf/thymeleaf#<I> - Rationalise the way output content type and template mode relate in TemplateSpec
|
thymeleaf_thymeleaf
|
train
|
java
|
e7e8e243a2e7955a95c92c18367158a69e6d7800
|
diff --git a/lib/coffee_script/command_line.rb b/lib/coffee_script/command_line.rb
index <HASH>..<HASH> 100644
--- a/lib/coffee_script/command_line.rb
+++ b/lib/coffee_script/command_line.rb
@@ -105,12 +105,18 @@ Usage:
# Use Narwhal to run an interactive CoffeeScript session.
def launch_repl
exec "narwhal lib/coffee_script/narwhal/js/launcher.js"
+ rescue Errno::ENOENT
+ puts "Error: Narwhal must be installed to use the interactive REPL."
+ exit(1)
end
# Use Narwhal to compile and execute CoffeeScripts.
def run_scripts
sources = @sources.join(' ')
exec "narwhal lib/coffee_script/narwhal/js/launcher.js #{sources}"
+ rescue Errno::ENOENT
+ puts "Error: Narwhal must be installed in order to execute CoffeeScripts."
+ exit(1)
end
# Print the tokens that the lexer generates from a source script.
|
better error warnings on the command line
|
jashkenas_coffeescript
|
train
|
rb
|
06d334e45a4e03f73ebf83bb285b3a4f1283d5f7
|
diff --git a/error_logger_impl.go b/error_logger_impl.go
index <HASH>..<HASH> 100644
--- a/error_logger_impl.go
+++ b/error_logger_impl.go
@@ -34,12 +34,10 @@ func (logger *errorLoggerImpl) Log(location *location, message string) {
args := []interface{}{location.Test, location.FileName, location.Line, message}
if logger.prevTestName != location.Test {
fmt.Fprintf(logger.writer, failOutput, args...)
+ } else if logger.prevTestLine != location.Line {
+ fmt.Fprintf(logger.writer, failOutputWithoutFailLine, args[1:]...)
} else {
- if logger.prevTestLine != location.Line {
- fmt.Fprintf(logger.writer, failOutputWithoutFailLine, args[1:]...)
- } else {
- fmt.Fprintf(logger.writer, failOutputWithoutLineNumber, message)
- }
+ fmt.Fprintf(logger.writer, failOutputWithoutLineNumber, message)
}
logger.prevTestName = location.Test
logger.prevTestLine = location.Line
|
Refactor the error logger A BIT.
|
assertgo_assert
|
train
|
go
|
8db6225704544c8b82a573dd6abcd4220e0a0448
|
diff --git a/tests/PHPUnit/proxy/index.php b/tests/PHPUnit/proxy/index.php
index <HASH>..<HASH> 100644
--- a/tests/PHPUnit/proxy/index.php
+++ b/tests/PHPUnit/proxy/index.php
@@ -8,15 +8,8 @@ use Piwik\Tracker\Cache;
require realpath(dirname(__FILE__)) . "/includes.php";
-// Wrapping the request inside ob_start() calls to ensure that the Test
-// calling us waits for the full request to process before unblocking
-ob_start();
-
Piwik_TestingEnvironment::addHooks();
\Piwik\Profiler::setupProfilerXHProf();
-// Disable index.php dispatch since we do it manually below
-include PIWIK_INCLUDE_PATH . '/index.php';
-
-ob_flush();
\ No newline at end of file
+include PIWIK_INCLUDE_PATH . '/index.php';
\ No newline at end of file
|
Remove ob_start()/ob_flush() calls in proxy index.php.
|
matomo-org_matomo
|
train
|
php
|
889544c1f2b3f995b925f5ad0f5975bb798416e8
|
diff --git a/core/src/main/java/com/orientechnologies/orient/core/cache/OCacheRecord.java b/core/src/main/java/com/orientechnologies/orient/core/cache/OCacheRecord.java
index <HASH>..<HASH> 100644
--- a/core/src/main/java/com/orientechnologies/orient/core/cache/OCacheRecord.java
+++ b/core/src/main/java/com/orientechnologies/orient/core/cache/OCacheRecord.java
@@ -65,6 +65,9 @@ public class OCacheRecord extends OSharedResourceAdaptive {
if (cache.size() < threshold)
return;
+
+ // CLEAR THE CACHE
+ cache.clear();
OLogManager.instance().debug(this, "Low memory: auto reduce the storage cache size from %d to %d", maxSize, threshold);
maxSize = threshold;
|
Now cache frees all the instances in case of low memory.
|
orientechnologies_orientdb
|
train
|
java
|
420772c87fa7047d729a0cd841fa3adbc6ea6df8
|
diff --git a/tonnikala/ir/nodes.py b/tonnikala/ir/nodes.py
index <HASH>..<HASH> 100644
--- a/tonnikala/ir/nodes.py
+++ b/tonnikala/ir/nodes.py
@@ -6,8 +6,10 @@ import re
__docformat__ = "epytext"
try:
+ # noinspection PyUnresolvedReferences
unicode
-except:
+
+except NameError:
unicode = str
@@ -146,7 +148,7 @@ class DynamicAttributes(BaseNode):
self.expression = expression
def __str__(self):
- return str(expression)
+ return str(self.expression)
class ComplexExpression(ContainerNode):
|
fix reference to instance variable, too broad except
|
tetframework_Tonnikala
|
train
|
py
|
330babd54fab68823106322210b465c62b2933cc
|
diff --git a/aws/resource_aws_cognito_user_pool_domain.go b/aws/resource_aws_cognito_user_pool_domain.go
index <HASH>..<HASH> 100644
--- a/aws/resource_aws_cognito_user_pool_domain.go
+++ b/aws/resource_aws_cognito_user_pool_domain.go
@@ -136,7 +136,10 @@ func resourceAwsCognitoUserPoolDomainRead(d *schema.ResourceData, meta interface
desc := domain.DomainDescription
d.Set("domain", d.Id())
- d.Set("certificate_arn", desc.CustomDomainConfig.CertificateArn)
+ d.Set("certificate_arn", "")
+ if desc.CustomDomainConfig != nil {
+ d.Set("certificate_arn", desc.CustomDomainConfig.CertificateArn)
+ }
d.Set("aws_account_id", desc.AWSAccountId)
d.Set("cloudfront_distribution_arn", desc.CloudFrontDistribution)
d.Set("s3_bucket", desc.S3Bucket)
|
ensure CustomDomainConfig is not nil first
|
terraform-providers_terraform-provider-aws
|
train
|
go
|
dcc9e27a5c419edaecab09ce334e6c5432c4cb7c
|
diff --git a/runtime/browser-sprite.js b/runtime/browser-sprite.js
index <HASH>..<HASH> 100644
--- a/runtime/browser-sprite.js
+++ b/runtime/browser-sprite.js
@@ -3,10 +3,27 @@ import domready from 'domready';
const sprite = new BrowserSprite();
+const loadSprite = () => {
+ const svg = sprite.mount(document.body, true);
+
+ // :WORKAROUND:
+ // IE doesn't evaluate <style> tags in SVGs that are dynamically added to the page.
+ // This trick will trigger IE to read and use any existing SVG <style> tags.
+ //
+ // Reference: https://github.com/iconic/SVGInjector/issues/23
+ const ua = window.navigator.userAgent || '';
+ if (ua.indexOf('Trident') > 0 || ua.indexOf('Edge/') > 0) {
+ const styles = svg.querySelectorAll('style');
+ for (let i = 0, l = styles.length; i < l; i += 1) {
+ styles[i].textContent += '';
+ }
+ }
+};
+
if (document.body) {
- sprite.mount(document.body, true);
+ loadSprite();
} else {
- domready(() => sprite.mount(document.body, true));
+ domready(loadSprite);
}
export default sprite;
|
fix(runtime): fix IE/Edge rendering with SVG containing 'style' elements
ISSUES CLOSED: #<I>
|
kisenka_svg-sprite-loader
|
train
|
js
|
ae83b7b5ef28df5f5b3f752435f3b36b078f619a
|
diff --git a/code/controllers/CMSPageHistoryController.php b/code/controllers/CMSPageHistoryController.php
index <HASH>..<HASH> 100644
--- a/code/controllers/CMSPageHistoryController.php
+++ b/code/controllers/CMSPageHistoryController.php
@@ -394,7 +394,7 @@ class CMSPageHistoryController extends CMSMain {
}
if(isset($record)) {
- $form = $this->getEditForm($id, null, null, true);
+ $form = $this->getEditForm($id, null, $fromVersion, $toVersion);
$form->setActions(new FieldList());
$form->addExtraClass('compare');
|
FIX History controller now shows right comparison versions
|
silverstripe_silverstripe-cms
|
train
|
php
|
7c9185f679d7404bc7de9480fb2763f80e4ad05e
|
diff --git a/drivers/windows/windows_test.go b/drivers/windows/windows_test.go
index <HASH>..<HASH> 100644
--- a/drivers/windows/windows_test.go
+++ b/drivers/windows/windows_test.go
@@ -23,7 +23,7 @@ func testNetwork(networkType string, t *testing.T) {
netOption[netlabel.GenericData] = networkOptions
ipdList := []driverapi.IPAMData{
- driverapi.IPAMData{
+ {
Pool: bnw,
Gateway: br,
},
|
Fixing bulid break because of gofmt
|
docker_libnetwork
|
train
|
go
|
e24fdbfcd4f0bfcdbb49bf2fb4ee1bb43b1f06e9
|
diff --git a/src/frontend/org/voltdb/sysprocs/saverestore/SnapshotPredicates.java b/src/frontend/org/voltdb/sysprocs/saverestore/SnapshotPredicates.java
index <HASH>..<HASH> 100644
--- a/src/frontend/org/voltdb/sysprocs/saverestore/SnapshotPredicates.java
+++ b/src/frontend/org/voltdb/sysprocs/saverestore/SnapshotPredicates.java
@@ -91,7 +91,7 @@ public class SnapshotPredicates {
private byte[] serializeEmpty()
{
- assert m_predicates.size() == 0 && m_predicates.get(0) == null;
+ assert m_predicates.size() == 0 || m_predicates.get(0) == null;
ByteBuffer buf = ByteBuffer.allocate(4); // predicate count
|
Fix incorrect assertion in SnapshotPredicates.
|
VoltDB_voltdb
|
train
|
java
|
2056e596f2d4eb6ba936385edacad45d9716ea2e
|
diff --git a/params/version.go b/params/version.go
index <HASH>..<HASH> 100644
--- a/params/version.go
+++ b/params/version.go
@@ -21,10 +21,10 @@ import (
)
const (
- VersionMajor = 1 // Major version component of the current release
- VersionMinor = 10 // Minor version component of the current release
- VersionPatch = 16 // Patch version component of the current release
- VersionMeta = "stable" // Version metadata to append to the version string
+ VersionMajor = 1 // Major version component of the current release
+ VersionMinor = 10 // Minor version component of the current release
+ VersionPatch = 17 // Patch version component of the current release
+ VersionMeta = "unstable" // Version metadata to append to the version string
)
// Version holds the textual version string.
|
params: begin <I> release cycle
|
ethereum_go-ethereum
|
train
|
go
|
9e7e51e3ab5c928aecd2851b62da0fd4be2b34b7
|
diff --git a/src/Models/ElementalArea.php b/src/Models/ElementalArea.php
index <HASH>..<HASH> 100644
--- a/src/Models/ElementalArea.php
+++ b/src/Models/ElementalArea.php
@@ -196,7 +196,7 @@ class ElementalArea extends DataObject
return $this->cacheData['owner_page'];
}
- if ($this->OwnerClassName) {
+ if ($this->OwnerClassName && ClassInfo::exists($this->OwnerClassName)) {
$class = $this->OwnerClassName;
$instance = Injector::inst()->get($class);
if (!ClassInfo::hasMethod($instance, 'getElementalRelations')) {
|
FIX Return null if OwnerClassName doesn't exist
Fixes an issue where elements won't load if they belong to a page type that has been removed.
* Return null if OwnerClassName doesn't exist
* Update src/Models/ElementalArea.php
|
dnadesign_silverstripe-elemental
|
train
|
php
|
31bea67d577fffb432776ad596b3b3acde95e40d
|
diff --git a/lib/pretty_diff/diff.rb b/lib/pretty_diff/diff.rb
index <HASH>..<HASH> 100644
--- a/lib/pretty_diff/diff.rb
+++ b/lib/pretty_diff/diff.rb
@@ -35,7 +35,7 @@ module PrettyDiff
''.tap do |result|
unified_diff.each_line do |l|
result << l
- break if l =~ /^\+\+\+ /
+ break if l =~ /\+\+\+\s*/
end
end
end
|
This magic regex is 2% better than the previous one
|
isabanin_pretty_diff
|
train
|
rb
|
15fa7daaa36b0cc987bc8ec377b47c81aadaa8fc
|
diff --git a/packages/colony-js-client/src/ColonyNetworkClient/index.js b/packages/colony-js-client/src/ColonyNetworkClient/index.js
index <HASH>..<HASH> 100644
--- a/packages/colony-js-client/src/ColonyNetworkClient/index.js
+++ b/packages/colony-js-client/src/ColonyNetworkClient/index.js
@@ -179,7 +179,7 @@ export default class ColonyNetworkClient extends ContractClient {
output: [['address', 'address']],
});
this.createCaller('getColonyCount', {
- output: [['address', 'address']],
+ output: [['count', 'number']],
});
this.createCaller('getColonyVersionResolver', {
input: [['version', 'number']],
|
Bugfix: `getColonyCount` output
|
JoinColony_colonyJS
|
train
|
js
|
66ed617e7afca2f3bd538ffc2754199168a5e3b0
|
diff --git a/tests/codeception/acceptance/200-Frontend/FrontendCest.php b/tests/codeception/acceptance/200-Frontend/FrontendCest.php
index <HASH>..<HASH> 100644
--- a/tests/codeception/acceptance/200-Frontend/FrontendCest.php
+++ b/tests/codeception/acceptance/200-Frontend/FrontendCest.php
@@ -150,7 +150,7 @@ class FrontendCest
$I->amOnPage('/');
$I->seeElement('a', ['href' => '/', 'class' => 'first']);
- $I->seeElement('li', ['class' => 'index-1 first active']);
+ $I->seeElement('li', ['class' => 'index-1 menu-text first active']);
$I->amOnPage('/pages');
$I->seeElement('li', ['class' => 'index-3 active']);
|
[Tests] Update FrontendCest::checkMenusTest for expected class name
|
bolt_bolt
|
train
|
php
|
0de86d105e8cc904e629e73f1522286b4cc37669
|
diff --git a/core/codegen/src/main/java/org/overture/codegen/trans/funcvalues/FunctionValueTransformation.java b/core/codegen/src/main/java/org/overture/codegen/trans/funcvalues/FunctionValueTransformation.java
index <HASH>..<HASH> 100644
--- a/core/codegen/src/main/java/org/overture/codegen/trans/funcvalues/FunctionValueTransformation.java
+++ b/core/codegen/src/main/java/org/overture/codegen/trans/funcvalues/FunctionValueTransformation.java
@@ -73,8 +73,6 @@ public class FunctionValueTransformation extends DepthFirstAnalysisAdaptor
this.templateTypePrefix = templateTypePrefix;
this.evalMethodName = evalMethodName;
this.paramNamePrefix = paramNamePrefix;
-
- this.functionValueAssistant = new FunctionValueAssistant();
}
public FunctionValueAssistant getFunctionValueAssistant()
|
Fix: FunctionValueAssistant was cleared by accident
|
overturetool_overture
|
train
|
java
|
b11cc8e6d633218505a7cfd6ed3a19e4c2a55174
|
diff --git a/alignak_backend_client/client.py b/alignak_backend_client/client.py
index <HASH>..<HASH> 100644
--- a/alignak_backend_client/client.py
+++ b/alignak_backend_client/client.py
@@ -352,6 +352,9 @@ class Backend(object):
headers=headers,
auth=HTTPBasicAuth(self.token, '')
)
+ if response.status_code != 200:
+ return response
+
resp = response.json()
if '_status' in resp:
# Considering an information is returned if a _status field is present ...
|
Catch response code not <I> when posting
|
Alignak-monitoring-contrib_alignak-backend-client
|
train
|
py
|
5817cd69691657371a0d38826d50e0cbb01c957e
|
diff --git a/nfc/dev/pn53x.py b/nfc/dev/pn53x.py
index <HASH>..<HASH> 100644
--- a/nfc/dev/pn53x.py
+++ b/nfc/dev/pn53x.py
@@ -621,8 +621,12 @@ class Device(nfc.dev.Device):
return {'ISO-DEP': True, 'NFC-DEP': True}
def init(transport):
+ if transport.TYPE == "TTY":
+ # send wakeup signal to quit low power battery mode (PN532 1.6)
+ transport.write(bytearray([0x55, 0x55] + 14 * [0x00]))
+
# write ack to perform a soft reset
- # raises IOError(EACCES) if we're second
+ # raises IOError(EACCES) if we're second (on USB)
transport.write(Chipset.ACK)
chipset = Chipset(transport)
diff --git a/nfc/dev/transport.py b/nfc/dev/transport.py
index <HASH>..<HASH> 100644
--- a/nfc/dev/transport.py
+++ b/nfc/dev/transport.py
@@ -33,6 +33,8 @@ import os
import re
class TTY(object):
+ TYPE = "TTY"
+
@classmethod
def find(cls, path):
if not (path.startswith("tty") or path.startswith("com")):
@@ -115,6 +117,8 @@ class TTY(object):
self.tty = None
class USB(object):
+ TYPE = "USB"
+
@classmethod
def find(cls, path):
if not path.startswith("usb"):
|
wakeup sequence needed for PN<I><I> to get the chip out of low battery mode
|
nfcpy_nfcpy
|
train
|
py,py
|
cc6ac6c4ce4267c877981f8887ae7da045331322
|
diff --git a/index.js b/index.js
index <HASH>..<HASH> 100644
--- a/index.js
+++ b/index.js
@@ -32,17 +32,6 @@ function boolAttrResult(part, value, attr) {
: [`${nonAttr}`, ''];
}
-function escapeText(text) {
- const map = {
- '&': '&',
- '<': '<',
- '>': '>',
- '"': '"',
- "'": '''
- };
- return text.replace(/[&<>"']/g, (m) => map[m]);
-}
-
function valueToString(value) {
if (value === null || value === undefined) return '';
if (value.__encoded) return value;
@@ -59,4 +48,15 @@ function valueToString(value) {
return escapeText(value.toString());
}
+function escapeText(text) {
+ const map = {
+ '&': '&',
+ '<': '<',
+ '>': '>',
+ '"': '"',
+ "'": '''
+ };
+ return text.replace(/[&<>"']/g, (m) => map[m]);
+}
+
module.exports = boring;
\ No newline at end of file
|
Reorder function definitions for readability
|
mjstahl_boring
|
train
|
js
|
46b2dc1a73509c2bb3f087b0a1276610ec3e6fec
|
diff --git a/index.js b/index.js
index <HASH>..<HASH> 100644
--- a/index.js
+++ b/index.js
@@ -47,7 +47,7 @@ module.exports = function (options) {
if (!sameBounds) {
if (displayBounds.width < state.displayBounds.width) {
if (state.x > displayBounds.width) {
- state.x = null;
+ state.x = 0;
}
if (state.width > displayBounds.width) {
@@ -57,7 +57,7 @@ module.exports = function (options) {
if (displayBounds.height < state.displayBounds.height) {
if (state.y > displayBounds.height) {
- state.y = null;
+ state.y = 0;
}
if (state.height > displayBounds.height) {
|
set x/y to `0` instead of `null` ...
... if current value is out of current displayBounds.
(`null` crashes `screen.getDisplayMatching()`)
|
mawie81_electron-window-state
|
train
|
js
|
f39671e5f33365c5a6c3e2ffe161555654aedf77
|
diff --git a/lib/yard/templates/helpers/markup/rdoc_markup.rb b/lib/yard/templates/helpers/markup/rdoc_markup.rb
index <HASH>..<HASH> 100644
--- a/lib/yard/templates/helpers/markup/rdoc_markup.rb
+++ b/lib/yard/templates/helpers/markup/rdoc_markup.rb
@@ -10,7 +10,9 @@ module YARD
require 'rdoc/markup/to_html'
class RDocMarkup; MARKUP = RDoc::Markup end
class RDocMarkupToHtml < RDoc::Markup::ToHtml
- if defined? RDoc::VERSION && RDoc::VERSION >= '4.0.0'
+ if defined?(RDoc::VERSION) && RDoc::VERSION >= '4.0.0' &&
+ defined?(RDoc::Options)
+ then
def initialize; super(RDoc::Options.new) end
end
end
|
Ignore RDoc customizations if RDoc::Options is missing
|
lsegal_yard
|
train
|
rb
|
678390d417887e609fecc6282f91daa87ab2b0e4
|
diff --git a/lib/API.php b/lib/API.php
index <HASH>..<HASH> 100644
--- a/lib/API.php
+++ b/lib/API.php
@@ -22,7 +22,7 @@ class API {
private $API_VERSION = '1';
private $API_HEADER_KEY = 'X-SWU-API-KEY';
private $API_HEADER_CLIENT = 'X-SWU-API-CLIENT';
- private $API_CLIENT_VERSION = "2.7.1";
+ private $API_CLIENT_VERSION = "2.7.0";
private $API_CLIENT_STUB = "php-%s";
private $DEBUG = false;
|
Can get logs specified by before/after timestamp
|
sendwithus_sendwithus_php
|
train
|
php
|
f3e997ab70a4866d68007c81f158c138a9e27272
|
diff --git a/packages/experimental/editor/src/blocks.js b/packages/experimental/editor/src/blocks.js
index <HASH>..<HASH> 100644
--- a/packages/experimental/editor/src/blocks.js
+++ b/packages/experimental/editor/src/blocks.js
@@ -41,7 +41,7 @@ export function setupBlocks(editor) {
// </li>
// <li class="c-bolt-action-blocks__item">
// <bolt-action-block bolt-component="">
- // <a href="https://academy.google.com" id="p-ade4ed2a-e1ed-41ff-9c6e-2a062fb2f237" data-google-analytics-et-processed="true" class="c-bolt-action-block"><div class="c-bolt-action-block__item c-bolt-action-block__icon">
+ // <a href="google.com" id="p-ade4ed2a-e1ed-41ff-9c6e-2a062fb2f237" data-google-analytics-et-processed="true" class="c-bolt-action-block"><div class="c-bolt-action-block__item c-bolt-action-block__icon">
// <bolt-icon name="training" size="xlarge" background="none">
// </bolt-icon>
// </div><div class="c-bolt-action-block__item c-bolt-action-block__text">
|
DS-<I>: delete pega.com reference on a blocks
|
bolt-design-system_bolt
|
train
|
js
|
6e8f7b6592325198be333d8eea0408c40c0d64d8
|
diff --git a/pyparsing/__init__.py b/pyparsing/__init__.py
index <HASH>..<HASH> 100644
--- a/pyparsing/__init__.py
+++ b/pyparsing/__init__.py
@@ -106,6 +106,9 @@ __version__ = "{}.{}.{}".format(*__version_info__[:3]) + (
"",
)[__version_info__.release_level == "final"]
__version_time__ = "29 October 2021 05:11 UTC"
+version_info.__str__ = lambda *args: "pyparsing {} - {}".format(
+ __version__, __version_time__
+)
__versionTime__ = __version_time__
__author__ = "Paul McGuire <[email protected]>"
|
Added __str__ method to pyparsing __version_info__, for nicer-looking output
|
pyparsing_pyparsing
|
train
|
py
|
7e25cd5891f84c2fab656c364002290e4b87f934
|
diff --git a/graphdriver/devmapper/deviceset.go b/graphdriver/devmapper/deviceset.go
index <HASH>..<HASH> 100644
--- a/graphdriver/devmapper/deviceset.go
+++ b/graphdriver/devmapper/deviceset.go
@@ -595,7 +595,7 @@ func (devices *DeviceSet) deleteDevice(hash string) error {
devinfo, _ := getInfo(info.Name())
if devinfo != nil && devinfo.Exists != 0 {
- if err := removeDevice(info.Name()); err != nil {
+ if err := devices.removeDeviceAndWait(info.Name()); err != nil {
utils.Debugf("Error removing device: %s\n", err)
return err
}
|
devmapper: Use removeDeviceAndWait in DeviceSet.removeDevice()
This makes sure the device is removed just like in deactivateDevice.
Docker-DCO-<I>-
|
moby_moby
|
train
|
go
|
40a8be4e6d00f14463c2fa33ef2ee814766be471
|
diff --git a/server/src/main/java/io/atomix/copycat/server/request/InstallRequest.java b/server/src/main/java/io/atomix/copycat/server/request/InstallRequest.java
index <HASH>..<HASH> 100644
--- a/server/src/main/java/io/atomix/copycat/server/request/InstallRequest.java
+++ b/server/src/main/java/io/atomix/copycat/server/request/InstallRequest.java
@@ -137,7 +137,7 @@ public class InstallRequest extends AbstractRequest<InstallRequest> {
index = buffer.readLong();
offset = buffer.readInt();
complete = buffer.readBoolean();
- data = serializer.readObject(buffer);
+ data = serializer.<Buffer>readObject(buffer).flip();
}
@Override
|
Ensure buffer is flipped on read in InstallRequest.
|
atomix_copycat
|
train
|
java
|
317417987faeb62018150b7c8fa99e0373c205e0
|
diff --git a/pyghmi/ipmi/private/session.py b/pyghmi/ipmi/private/session.py
index <HASH>..<HASH> 100644
--- a/pyghmi/ipmi/private/session.py
+++ b/pyghmi/ipmi/private/session.py
@@ -104,7 +104,7 @@ def get_ipmi_error(response, suffix=""):
elif code in constants.ipmi_completion_codes:
res = constants.ipmi_completion_codes[code] + suffix
else:
- res = "Unknown code " + code + " encountered"
+ res = "Unknown code 0x%2x encountered" % code
return res
|
Correct concatenation of string and int object
Straightforward change, a mistake was made with a string and an int
was concatenated.
Change-Id: I<I>de0f<I>b<I>e<I>c<I>d<I>acb5dcf6c<I>b<I>
|
openstack_pyghmi
|
train
|
py
|
7c13495a89d3fed9a147d40667f100ed73c27217
|
diff --git a/jsonschema/tests/test_cli.py b/jsonschema/tests/test_cli.py
index <HASH>..<HASH> 100644
--- a/jsonschema/tests/test_cli.py
+++ b/jsonschema/tests/test_cli.py
@@ -771,3 +771,14 @@ class TestCLIIntegration(TestCase):
)
version = version.decode("utf-8").strip()
self.assertEqual(version, __version__)
+
+ def test_no_arguments_shows_usage_notes(self):
+ output = subprocess.check_output(
+ [sys.executable, "-m", "jsonschema"],
+ stderr=subprocess.STDOUT,
+ )
+ output_for_help = subprocess.check_output(
+ [sys.executable, "-m", "jsonschema", "--help"],
+ stderr=subprocess.STDOUT,
+ )
+ self.assertEqual(output, output_for_help)
|
Make sure no args shows help info.
|
Julian_jsonschema
|
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.