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
0e03870836cbdb597af6b33a61b3bcfd9c7a6d2a
diff --git a/libxml/tree/Element.go b/libxml/tree/Element.go index <HASH>..<HASH> 100644 --- a/libxml/tree/Element.go +++ b/libxml/tree/Element.go @@ -42,7 +42,6 @@ func (node *Element) Clear() { child := node.First() for child != nil { child.Remove() - child.Free() child = node.First() } }
i either fixed a damnable bug or i just caused a memory leak
moovweb_gokogiri
train
go
f9398564cdd964a0c26bcd3d8f1b2654e7999bd2
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -18,7 +18,7 @@ with open('README.rst') as f: try: requirements = [line.rstrip('\n') for line in open(os.path.join('fbchat.egg-info', 'requires.txt'))] -except FileNotFoundError: +except IOError: requirements = [line.rstrip('\n') for line in open('requirements.txt')] version = None
replace FileNotFoundError with IOError so it can work in Py2
carpedm20_fbchat
train
py
67fc22dfedf4a6750ac998a23cdb61ade6267d4a
diff --git a/src/main/java/org/jfrog/hudson/BuildInfoResultAction.java b/src/main/java/org/jfrog/hudson/BuildInfoResultAction.java index <HASH>..<HASH> 100644 --- a/src/main/java/org/jfrog/hudson/BuildInfoResultAction.java +++ b/src/main/java/org/jfrog/hudson/BuildInfoResultAction.java @@ -95,7 +95,7 @@ public class BuildInfoResultAction implements BuildBadgeAction { } private PublishedBuildDetails createBuildInfoIdentifier(String artifactoryUrl, String buildName, String buildNumber, String platformUrl, String startedBuildTimestamp, String project) { - return new PublishedBuildDetails(artifactoryUrl, Util.rawEncode(buildName), Util.rawEncode(buildNumber), platformUrl, startedBuildTimestamp, project); + return new PublishedBuildDetails(artifactoryUrl, buildName, buildNumber, platformUrl, startedBuildTimestamp, project); } private PublishedBuildDetails createBuildInfoIdentifier(String artifactoryUrl, Run build, Build buildInfo, String platformUrl) {
Bugfix - Link to BuildInfo page gets encoding twice (#<I>)
jenkinsci_artifactory-plugin
train
java
61ece05752d03b89d4bb798b9167169fcf3e9d75
diff --git a/spec/features/admin/sign_out_spec.rb b/spec/features/admin/sign_out_spec.rb index <HASH>..<HASH> 100644 --- a/spec/features/admin/sign_out_spec.rb +++ b/spec/features/admin/sign_out_spec.rb @@ -16,7 +16,7 @@ RSpec.feature 'Admin - Sign Out', type: :feature do scenario 'allows a signed in user to logout' do click_link 'Logout' visit spree.admin_login_path - expect(page).to have_text 'Login' + expect(page).to have_button 'Login' expect(page).not_to have_text 'Logout' end end
Fix allows a signed in user to logout spec
spree_spree_auth_devise
train
rb
cd8d29ef1cb80b2841668037bfb416047ba80501
diff --git a/cake/console/console_output.php b/cake/console/console_output.php index <HASH>..<HASH> 100644 --- a/cake/console/console_output.php +++ b/cake/console/console_output.php @@ -104,7 +104,6 @@ class ConsoleOutput { 'underline' => 4, 'blink' => 5, 'reverse' => 7, - 'conceal' => 8 ); /**
Removing conceal, because its a stupid option.
cakephp_cakephp
train
php
792b3148fc2b85edee32f6cee998caed881e0a53
diff --git a/src/Response/AbstractResponse.php b/src/Response/AbstractResponse.php index <HASH>..<HASH> 100644 --- a/src/Response/AbstractResponse.php +++ b/src/Response/AbstractResponse.php @@ -38,14 +38,4 @@ abstract class AbstractResponse * @return string */ abstract public function getOutput(): string; - - /** - * Print the output, generated from the commands added to the response, that will be sent to the browser - * - * @return void - */ - public function printOutput() - { - print $this->getOutput(); - } }
Removed the printOutput() method from the AbstractResponse class.
jaxon-php_jaxon-core
train
php
331aaa0f9e9bd2e30f6653ed43ee5381e1835dd8
diff --git a/spec/models/response_cache_spec.rb b/spec/models/response_cache_spec.rb index <HASH>..<HASH> 100644 --- a/spec/models/response_cache_spec.rb +++ b/spec/models/response_cache_spec.rb @@ -67,7 +67,7 @@ describe ResponseCache do @cache.cache_response(url, response) name = "#{@dir}/test/me.yml" File.exists?(name).should == true - file(name).should == "--- \nexpires: 2007-02-08 17:37:09 Z\nheaders: \n Last-Modified: Tue, 27 Feb 2007 06:13:43 GMT\n" + file(name).should == "--- \nexpires: 2007-02-08 17:37:09 Z\nheaders: \n Last-Modified: Tue, 27 Feb 2007 06:13:43 GMT\n ETag: 040f06fd774092478d450774f5ba30c5da78acc8\n" data_name = "#{@dir}/test/me.data" file(data_name).should == "content" end
Fix expectations of ResponseCache headers.
radiant_radiant
train
rb
ee1fc37910555b5ecdf49558a901c0b0c30b2d1f
diff --git a/controllers/Seo_SitemapController.php b/controllers/Seo_SitemapController.php index <HASH>..<HASH> 100644 --- a/controllers/Seo_SitemapController.php +++ b/controllers/Seo_SitemapController.php @@ -36,7 +36,7 @@ class Seo_SitemapController extends BaseController { $urls = []; - if (array_key_exists('sections', $this->sitemap)) { + if (array_key_exists('sections', $this->sitemap) && !empty($this->sitemap['sections'])) { foreach ($this->sitemap['sections'] as $sectionId => $section) { if ($section['enabled']) @@ -51,7 +51,7 @@ class Seo_SitemapController extends BaseController { $urls = []; - if (array_key_exists('categories', $this->sitemap)) { + if (array_key_exists('categories', $this->sitemap) && !empty($this->sitemap['categories'])) { foreach ($this->sitemap['categories'] as $categoryId => $category) { if ($category['enabled'])
Fixed check empty sections and categories Manually merged #<I> via @bertoost
ethercreative_seo
train
php
bedfd2ecd18df349a2e642ee2779775e87d31f84
diff --git a/lib/queue_classic_plus/worker.rb b/lib/queue_classic_plus/worker.rb index <HASH>..<HASH> 100644 --- a/lib/queue_classic_plus/worker.rb +++ b/lib/queue_classic_plus/worker.rb @@ -61,11 +61,9 @@ module QueueClassicPlus end def failed_job_class - begin - Object.const_get(@failed_job[:method].split('.')[0]) - rescue NameError - nil - end + Object.const_get(@failed_job[:method].split('.')[0]) + rescue NameError + nil end def backoff
RF-<I> Remove superfluous begin keyword
rainforestapp_queue_classic_plus
train
rb
c852afdf6ba1c76b3e4e7bb3b0248b611159010e
diff --git a/greg/greg.py b/greg/greg.py index <HASH>..<HASH> 100755 --- a/greg/greg.py +++ b/greg/greg.py @@ -292,7 +292,7 @@ def check_directory(placeholders): subdnametemplate = feed.retrieve_config( "subdirectory_name", "{podcasttitle}") subdname = substitute_placeholders( - subdnametemplate, placeholders, "normal") + subdnametemplate, placeholders, "safe") placeholders.directory = os.path.join(download_path, subdname) ensure_dir(placeholders.directory) placeholders.fullpath = os.path.join(
fix extraneous qoutes round directory names
manolomartinez_greg
train
py
f9044c74fd97107e645dcca2fbe9799c6641af35
diff --git a/pylink/jlink.py b/pylink/jlink.py index <HASH>..<HASH> 100644 --- a/pylink/jlink.py +++ b/pylink/jlink.py @@ -696,8 +696,8 @@ class JLink(object): # on versions greater than V4.98a. unsecure_hook = self._unsecure_hook if unsecure_hook is not None and hasattr(self._dll, 'JLINK_SetHookUnsecureDialog'): - func = enums.JLinkFunctions.UNSECURE_HOOK_PROTOTYPE(unsecure_hook) - self._dll.JLINK_SetHookUnsecureDialog(func) + self.unsecure_hook = enums.JLinkFunctions.UNSECURE_HOOK_PROTOTYPE(unsecure_hook) + self._dll.JLINK_SetHookUnsecureDialog(self.unsecure_hook) self._open_refcount = 1 return None
Fix unsecure hook problem (#<I>)
square_pylink
train
py
024a0ef6a0764bb9ca8ad17b6f01687fc0b2dfe0
diff --git a/lib/xcodeproj/constants.rb b/lib/xcodeproj/constants.rb index <HASH>..<HASH> 100644 --- a/lib/xcodeproj/constants.rb +++ b/lib/xcodeproj/constants.rb @@ -4,17 +4,17 @@ module Xcodeproj module Constants # @return [String] The last known iOS SDK (stable). # - LAST_KNOWN_IOS_SDK = '9.3' + LAST_KNOWN_IOS_SDK = '10.0' # @return [String] The last known OS X SDK (stable). # - LAST_KNOWN_OSX_SDK = '10.11' + LAST_KNOWN_OSX_SDK = '10.12' # @return [String] The last known tvOS SDK (stable). - LAST_KNOWN_TVOS_SDK = '9.2' + LAST_KNOWN_TVOS_SDK = '10.0' # @return [String] The last known watchOS SDK (stable). - LAST_KNOWN_WATCHOS_SDK = '2.2' + LAST_KNOWN_WATCHOS_SDK = '3.0' # @return [String] The last known archive version to Xcodeproj. #
Update last known OS constants to latest Apple OS releases
CocoaPods_Xcodeproj
train
rb
7376b8e496a31a4e8625d890b1f6b97e6fd71cde
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -2,7 +2,7 @@ from distutils.core import setup setup( name='lament', - version='v0.2', + version='v0.3', author='Nic Roland', author_email='[email protected]', packages=['lament'],
Bumped version to <I>.
nicr9_lament
train
py
4606caa618a2736e91efdc4ead7faedd0372d8f9
diff --git a/main.go b/main.go index <HASH>..<HASH> 100644 --- a/main.go +++ b/main.go @@ -187,7 +187,7 @@ Severity override map (default is "error"): start := time.Now() paths := *pathArg concurrency := make(chan bool, *concurrencyFlag) - issues := make(chan *Issue, 1000) + issues := make(chan *Issue, 100000) wg := &sync.WaitGroup{} for name, description := range lintersFlag { if _, ok := disable[name]; ok { @@ -242,6 +242,7 @@ func executeLinter(issues chan *Issue, name, command, pattern, paths string) { } debug("warning: %s returned %s", command, err) } + for _, line := range bytes.Split(out, []byte("\n")) { groups := re.FindAllSubmatch(line, -1) if groups == nil {
Make issue buffer much larger to avoid deadlock.
alecthomas_gometalinter
train
go
39292170a6237c94b8ef624d962909e43d4c851b
diff --git a/kernel/content/collectedinfo.php b/kernel/content/collectedinfo.php index <HASH>..<HASH> 100644 --- a/kernel/content/collectedinfo.php +++ b/kernel/content/collectedinfo.php @@ -37,12 +37,16 @@ $http = eZHTTPTool::instance(); $tpl = eZTemplate::factory(); -$icMap = array(); -if ( $http->hasSessionVariable( 'InformationCollectionMap' ) ) - $icMap = $http->sessionVariable( 'InformationCollectionMap' ); $icID = false; -if ( isset( $icMap[$object->attribute( 'id' )] ) ) - $icID = $icMap[$object->attribute( 'id' )]; +if ( $http->hasSessionVariable( 'InformationCollectionMap' ) ) { + $icMap = $http->sessionVariable( 'InformationCollectionMap' ); + + if ( isset( $icMap[$object->attribute( 'id' )] ) ) { + $icID = $icMap[$object->attribute( 'id' )]; + } +} +if ( !$icID ) + return $module->handleError( eZError::KERNEL_NOT_AVAILABLE, 'kernel' ); $informationCollectionTemplate = eZInformationCollection::templateForObject( $object ); $attributeHideList = eZInformationCollection::attributeHideList();
Fix EZP-<I>: additional check for display of collected info. (cherry picked from commit 8cceb2cbd<I>b<I>a<I>fc1a7fd<I>)
ezsystems_ezpublish-legacy
train
php
ee9dc4b7a177e858b2d035d680ad2d2b87e1c71b
diff --git a/astromodels/parameter.py b/astromodels/parameter.py index <HASH>..<HASH> 100644 --- a/astromodels/parameter.py +++ b/astromodels/parameter.py @@ -542,9 +542,6 @@ class Parameter(ParameterBase): def _get_prior(self): - if self._prior is None: - raise RuntimeError("There is no defined prior for parameter %s" % self.name) - return self._prior def _set_prior(self, prior):
The _get_prior method cannot raise exceptions if _prior is None, otherwise hasattr(parameter,prior) will give False if the prior is None
threeML_astromodels
train
py
1ea03bee5d018ecb688349b59d00d1c890a1c7a5
diff --git a/js/tapTarget.js b/js/tapTarget.js index <HASH>..<HASH> 100644 --- a/js/tapTarget.js +++ b/js/tapTarget.js @@ -59,6 +59,10 @@ closeTapTarget(); $(document).off('click.tapTarget'); }); + + $(window).off('resize.tapTarget').on('resize.tapTarget', function(e) { + calculateTapTarget(); + }); }, 0); }; @@ -71,6 +75,7 @@ tapTargetWrapper.removeClass('open'); tapTargetOriginEl.off('click.tapTarget') $(document).off('click.tapTarget'); + $(window).off('resize.tapTarget'); }; // Pre calculate
Fixing tap target when rotate the device Issue was found here <URL>
Dogfalo_materialize
train
js
2b48c8e623cde87bab57a736d0ace16a6e60b738
diff --git a/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/jbosscache/JBossCacheIndexInfos.java b/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/jbosscache/JBossCacheIndexInfos.java index <HASH>..<HASH> 100644 --- a/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/jbosscache/JBossCacheIndexInfos.java +++ b/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/jbosscache/JBossCacheIndexInfos.java @@ -108,6 +108,10 @@ public class JBossCacheIndexInfos extends IndexInfos implements IndexerIoModeLis cache.getInvocationContext().getOptionOverrides().setCacheModeLocal(true); cacheRoot.addChild(namesFqn).setResident(true); } + else + { + cache.getNode(namesFqn).setResident(true); + } if (modeHandler.getMode() == IndexerIoMode.READ_ONLY) { // Currently READ_ONLY is set, so new lists should be fired to multiIndex.
EXOJCR-<I>: Manage the case the node already exists in JBossCacheIndexInfos
exoplatform_jcr
train
java
1545e728524d397f29b1f520a373f5d0c2309cdd
diff --git a/holoviews/plotting/plot.py b/holoviews/plotting/plot.py index <HASH>..<HASH> 100644 --- a/holoviews/plotting/plot.py +++ b/holoviews/plotting/plot.py @@ -1217,8 +1217,8 @@ class GenericElementPlot(DimensionedPlot): if k not in plot_opts}) applied_params = dict(params, **plot_opts) - for p in applied_params: - if p in self.param and p in self._deprecations: + for p, pval in applied_params.items(): + if p in self.param and p in self._deprecations and pval is not None: self.param.warning(self._deprecations[p]) super().__init__(keys=keys, dimensions=dimensions, dynamic=dynamic, **applied_params)
Do not warn when setting _index option to None
pyviz_holoviews
train
py
e123ddbd5693ad62bbd750014a7ae6582c9321cf
diff --git a/liquibase-core/src/main/java/liquibase/hub/HubUpdater.java b/liquibase-core/src/main/java/liquibase/hub/HubUpdater.java index <HASH>..<HASH> 100644 --- a/liquibase-core/src/main/java/liquibase/hub/HubUpdater.java +++ b/liquibase-core/src/main/java/liquibase/hub/HubUpdater.java @@ -74,7 +74,7 @@ public class HubUpdater { */ public Operation preUpdateHub(String operationType, String operationCommand, Connection connection) throws LiquibaseException, SQLException { - if (connection == null || connection.getId() == null) { + if (connection == null) { return null; } return this.preUpdateHub(operationType,operationCommand, connection, null, null, null, null);
DAT-<I> Added logic to send DROPALL operation & events to hub
liquibase_liquibase
train
java
53a24df66a3c410a3e4849451e51f834f719a4b2
diff --git a/blockmanager.go b/blockmanager.go index <HASH>..<HASH> 100644 --- a/blockmanager.go +++ b/blockmanager.go @@ -221,11 +221,12 @@ func newBlockManager(s *ChainService) (*blockManager, error) { // Finally, we'll set the filter header tip so any goroutines waiting // on the condition obtain the correct initial state. - _, bm.filterHeaderTip, err = s.RegFilterHeaders.ChainTip() + filterHeaderTipHash, filterHeaderTip, err := s.RegFilterHeaders.ChainTip() if err != nil { return nil, err } - bm.filterHeaderTipHash = header.BlockHash() + bm.filterHeaderTipHash = *filterHeaderTipHash + bm.filterHeaderTip = filterHeaderTip return &bm, nil } @@ -501,8 +502,8 @@ func (b *blockManager) cfHandler() { goodCheckpoints, store, fType, ) - log.Infof("Fully caught up with cfheaders, waiting at " + - "tip for new blocks") + log.Infof("Fully caught up with cfheaders at height "+ + "%v, waiting at tip for new blocks", lastHeight) // Now that we've been fully caught up to the tip of // the current header chain, we'll wait here for a
blockmanager: set filterHeaderTipHash to actual filter hash in Start Previosly the header hash was used, which would be wrong if headers and filter headers were out of sync, leading to weird behavior.
lightninglabs_neutrino
train
go
d31b4f3b0e25647ec6756e24fca7c8f834d8d30a
diff --git a/grunt_tasks/plugin.js b/grunt_tasks/plugin.js index <HASH>..<HASH> 100644 --- a/grunt_tasks/plugin.js +++ b/grunt_tasks/plugin.js @@ -368,17 +368,7 @@ module.exports = function (grunt) { alias: { [`girder_plugins/${plugin}/node`]: pluginNodeDir, [`girder_plugins/${plugin}`]: webClient - }, - modules: [ - path.resolve(process.cwd(), 'node_modules'), - pluginNodeDir - ] - }, - resolveLoader: { - modules: [ - path.resolve(process.cwd(), 'node_modules'), - pluginNodeDir - ] + } } } } diff --git a/grunt_tasks/webpack.config.js b/grunt_tasks/webpack.config.js index <HASH>..<HASH> 100644 --- a/grunt_tasks/webpack.config.js +++ b/grunt_tasks/webpack.config.js @@ -224,6 +224,11 @@ module.exports = { ], symlinks: false }, + resolveLoader: { + modules: [ + paths.node_modules + ] + }, node: { canvas: 'empty', file: 'empty',
Fix order of module resolution for plugins Prior to this change, each plugin was overwriting the module resolution list and hard-coding the girder/node_modules dir as the first element. This order was incorrect; we actually want it to look inside its own node_modules first. After this change, the order that will be searched for both modules and loaders is: 1. Inside the plugin's own `node_modules` dir. 2. Inside girder's `node_modules` dir.
girder_girder
train
js,js
bf13e43239de5c9f1b4923a6d52d816f00a2e315
diff --git a/swiftly/cli/put.py b/swiftly/cli/put.py index <HASH>..<HASH> 100644 --- a/swiftly/cli/put.py +++ b/swiftly/cli/put.py @@ -234,6 +234,8 @@ def cli_put_object(context, path): if size > context.segment_size: new_context = context.copy() new_context.input_ = None + new_context.headers = None + new_context.query = None container = path.split('/', 1)[0] + '_segments' cli_put_container(new_context, container) prefix = container + '/' + path.split('/', 1)[1] @@ -269,7 +271,6 @@ def cli_put_object(context, path): body = json.dumps([ {'path': '/' + p, 'size_bytes': s, 'etag': e} for p, (s, e) in sorted(path2info.iteritems())]) - put_headers['content-type'] = 'application/json' put_headers['content-length'] = str(len(body)) context.query['multipart-manifest'] = 'put' else:
Fixed bugs w "swiftly put" static segments
gholt_swiftly
train
py
f293923ecf64c48da43d39ca3e1d89cad33f6072
diff --git a/src/googleclouddebugger/yaml_data_visibility_config_reader.py b/src/googleclouddebugger/yaml_data_visibility_config_reader.py index <HASH>..<HASH> 100644 --- a/src/googleclouddebugger/yaml_data_visibility_config_reader.py +++ b/src/googleclouddebugger/yaml_data_visibility_config_reader.py @@ -54,7 +54,7 @@ class Config(object): self.whitelist_patterns = whitelist_patterns -def OpenAndRead(relative_path='debugger-config.yaml'): +def OpenAndRead(relative_path='debugger-blacklist.yaml'): """Attempts to find the yaml configuration file, then read it. Args:
Rename debugger-config.yaml -> debugger-blacklist.yaml Prompted by bugbash feedback. ------------- Created by MOE: <URL>
GoogleCloudPlatform_cloud-debug-python
train
py
a318f62ceeb7d5b2dba90a011c53769a3415e01c
diff --git a/lib/ronin/ui/command_line/commands/list.rb b/lib/ronin/ui/command_line/commands/list.rb index <HASH>..<HASH> 100644 --- a/lib/ronin/ui/command_line/commands/list.rb +++ b/lib/ronin/ui/command_line/commands/list.rb @@ -79,6 +79,8 @@ module Ronin puts "Website: #{overlay.website}" end + putc "\n" + unless overlay.extensions.empty? print_array(overlay.extensions, :title => 'Extensions') end
Added an extra putc "\n" for spacing in ronin-list.
ronin-ruby_ronin
train
rb
154022f9038510e87ce5457b489f65fe23cc419a
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -21,7 +21,7 @@ with open('README.md') as f: setup(name='pytorch2keras', - version='0.2.2', + version='0.2.3', description='The deep learning models convertor', long_description=long_description, long_description_content_type='text/markdown',
Update pypi version.
nerox8664_pytorch2keras
train
py
c7ae3ba31fa6b97ba700828207a3f90a5360146a
diff --git a/multio/tests/test_multio.py b/multio/tests/test_multio.py index <HASH>..<HASH> 100644 --- a/multio/tests/test_multio.py +++ b/multio/tests/test_multio.py @@ -6,8 +6,8 @@ import trio from .. import init -class TestCase(object): [email protected]("lib", ["trio", "curio", trio, curio]) +def test_initialize(lib): + init(lib) - @pytest.mark.parametrize("lib", ["trio", "curio", trio, curio]) - def test_initialize(self, lib): init(lib)
[tests] Simplify test structure No need to group tests in classes yet.
theelous3_multio
train
py
6dcbe7fe78c2bfacf7efc1da04cf03fb0704bf28
diff --git a/lib/opFns.js b/lib/opFns.js index <HASH>..<HASH> 100644 --- a/lib/opFns.js +++ b/lib/opFns.js @@ -881,7 +881,6 @@ function subMemUsage (runState, offset, length) { const newMemoryWordCount = Math.ceil((offset + length) / 32) if (newMemoryWordCount <= runState.memoryWordCount) return - runState.memoryWordCount = newMemoryWordCount const words = new BN(newMemoryWordCount) const fee = new BN(fees.memoryGas.v) @@ -893,6 +892,8 @@ function subMemUsage (runState, offset, length) { subGas(runState, cost.sub(runState.highestMemCost)) runState.highestMemCost = cost } + + runState.memoryWordCount = newMemoryWordCount } /**
Update allocated memory word count only if allocation was successful
ethereumjs_ethereumjs-vm
train
js
6d339dab3e627afcdc50779527bafb358099cf2a
diff --git a/cpo-core/src/main/java/org/synchronoss/cpo/meta/CpoMetaDescriptor.java b/cpo-core/src/main/java/org/synchronoss/cpo/meta/CpoMetaDescriptor.java index <HASH>..<HASH> 100644 --- a/cpo-core/src/main/java/org/synchronoss/cpo/meta/CpoMetaDescriptor.java +++ b/cpo-core/src/main/java/org/synchronoss/cpo/meta/CpoMetaDescriptor.java @@ -233,7 +233,7 @@ public class CpoMetaDescriptor extends CpoMetaDescriptorCache implements CpoMeta @Override public <T> CpoClass getMetaClass(T obj) throws CpoException { CpoClass cpoClass = getCpoMetaAdapter().getMetaClass(obj); - if (cpoClass != null && cpoClass.getMetaClass() == null) { + if (cpoClass != null) { cpoClass.loadRunTimeInfo(this); }
fixes #2 Removed the metaClass null check so that it forces it to hti the synchronized block before the loading of runtime info
synchronoss_cpo-api
train
java
537e8f9b13752067f424d4172767efee74a80034
diff --git a/knack/arguments.py b/knack/arguments.py index <HASH>..<HASH> 100644 --- a/knack/arguments.py +++ b/knack/arguments.py @@ -256,7 +256,7 @@ class ArgumentsContext(object): # convert argument dest target = '--{}'.format(argument_dest.replace('_', '-')) elif options_list: - target = sorted(options_list, key=len)[0] + target = sorted(options_list, key=len)[-1] else: # positional argument target = kwargs.get('metavar', '<{}>'.format(argument_dest.upper()))
Use the longest option, not shortest. (#<I>)
Microsoft_knack
train
py
fb4ea3c8d0599a24aaf94fb275d9a346e746e867
diff --git a/raiden/tests/unit/test_udp_transport.py b/raiden/tests/unit/test_udp_transport.py index <HASH>..<HASH> 100644 --- a/raiden/tests/unit/test_udp_transport.py +++ b/raiden/tests/unit/test_udp_transport.py @@ -3,7 +3,7 @@ import random import pytest from gevent import server -from raiden.constants import UINT64_MAX +from raiden.constants import EMPTY_SIGNATURE, UINT64_MAX from raiden.messages import SecretRequest from raiden.network.throttle import TokenBucket from raiden.network.transport.udp import UDPTransport @@ -81,6 +81,7 @@ def test_udp_decode_invalid_message(mock_udp): secrethash=UNIT_SECRETHASH, amount=1, expiration=10, + signature=EMPTY_SIGNATURE, ) data = message.encode() wrong_command_id_data = b"\x99" + data[1:] @@ -95,6 +96,7 @@ def test_udp_decode_invalid_size_message(mock_udp): secrethash=UNIT_SECRETHASH, amount=1, expiration=10, + signature=EMPTY_SIGNATURE, ) data = message.encode() wrong_command_id_data = data[:-1]
Fix signature initialization for UDP in tests
raiden-network_raiden
train
py
1f6fefe37281f7ed2c5a78a5a844c3a0d4aaa12b
diff --git a/lib/rpush/daemon/dispatcher/apns_http2.rb b/lib/rpush/daemon/dispatcher/apns_http2.rb index <HASH>..<HASH> 100644 --- a/lib/rpush/daemon/dispatcher/apns_http2.rb +++ b/lib/rpush/daemon/dispatcher/apns_http2.rb @@ -4,7 +4,7 @@ module Rpush class ApnsHttp2 include Loggable include Reflectable - + URLS = { production: 'https://api.push.apple.com:443', development: 'https://api.development.push.apple.com:443',
Fixing rubocop issue on rpush
rpush_rpush
train
rb
41c9f8598f8ec16d4e76010da74076afb60438b6
diff --git a/ReText/window.py b/ReText/window.py index <HASH>..<HASH> 100644 --- a/ReText/window.py +++ b/ReText/window.py @@ -1257,7 +1257,8 @@ class ReTextWindow(QMainWindow): def aboutDialog(self): QMessageBox.about(self, self.aboutWindowTitle, - '<p><b>'+app_name+' '+app_version+'</b><br>'+self.tr('Simple but powerful editor' + '<p><b>' + (self.tr('ReText %s (using PyMarkups %s)') % (app_version, markups.__version__)) + +'</b></p>' + self.tr('Simple but powerful editor' ' for Markdown and reStructuredText') +'</p><p>'+self.tr('Author: Dmitry Shachnev, 2011').replace('2011', '2011\u2013' '2015') +'<br><a href="http://sourceforge.net/p/retext/">'+self.tr('Website')
Show PyMarkups version in about dialog
retext-project_retext
train
py
b6853be59bd75df1e97c9937cff404ae025d2bae
diff --git a/packages/@vue/cli-plugin-e2e-nightwatch/__tests__/nightwatchPlugin.spec.js b/packages/@vue/cli-plugin-e2e-nightwatch/__tests__/nightwatchPlugin.spec.js index <HASH>..<HASH> 100644 --- a/packages/@vue/cli-plugin-e2e-nightwatch/__tests__/nightwatchPlugin.spec.js +++ b/packages/@vue/cli-plugin-e2e-nightwatch/__tests__/nightwatchPlugin.spec.js @@ -1,4 +1,4 @@ -jest.setTimeout(20000) +jest.setTimeout(30000) const create = require('@vue/cli-test-utils/createTestProject')
chore: bump nightwatch test timeout
vuejs_vue-cli
train
js
81e109c7f57aed98b99406f94084eb0b06965364
diff --git a/gulp/config.js b/gulp/config.js index <HASH>..<HASH> 100644 --- a/gulp/config.js +++ b/gulp/config.js @@ -45,7 +45,7 @@ module.exports = { cssmin: {}, cssstats: { - exit: false + exit: true }, favicons: {
configured cssstats to exit process by default
biotope_biotope-build
train
js
2742f23ad3fb95a3962e13051899820e21c53fe3
diff --git a/src/lib/Supra/Package/Cms/Resources/public/dashboard/applications/applications.js b/src/lib/Supra/Package/Cms/Resources/public/dashboard/applications/applications.js index <HASH>..<HASH> 100644 --- a/src/lib/Supra/Package/Cms/Resources/public/dashboard/applications/applications.js +++ b/src/lib/Supra/Package/Cms/Resources/public/dashboard/applications/applications.js @@ -83,12 +83,13 @@ Supra([ "dashboard.app-list", - "transition", - - Supra.data.get(["site", "portal"]) ? "dashboard.inbox" : null, - Supra.data.get(["site", "portal"]) ? "dashboard.stats" : null - -], function (Y) { + "transition" + ].concat( + Supra.data.get(["site", "portal"]) ? ["dashboard.inbox"] : [] + ).concat( + Supra.data.get(["site", "portal"]) ? ["dashboard.stats"] : [] + ) +, function (Y) { //Invoke strict mode "use strict";
forward patch from kaspars
sitesupra_sitesupra
train
js
41f474aebeb5cc6dc5ed77c2399ed5f72c21bc1f
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -124,7 +124,18 @@ def main(): long_description=LONG_DESCRIPTION, author='Mark Dickinson', author_email='[email protected]', - url='http://www.mpfr.org', + url='http://bitbucket.org/dickinsm/bigfloat', + classifiers=[ + 'Development Status :: 3 - Alpha', + 'License :: OSI Approved :: Academic Free License (AFL)', + 'Programming Language :: Python', + 'Topic :: Scientific/Engineering :: Mathematics', + ], + platforms = [ + 'Linux', + 'OS X', + ], + license = 'Academic Free License (AFL)', packages=[ 'bigfloat', 'bigfloat.test',
Add classifiers, platforms to setup.py. Fix url to point to bitbucket.
mdickinson_bigfloat
train
py
6654260c299ccc1d8f6d9d3f932bad3035033587
diff --git a/styleguide.config.js b/styleguide.config.js index <HASH>..<HASH> 100644 --- a/styleguide.config.js +++ b/styleguide.config.js @@ -4,6 +4,7 @@ const { createConfig } = require('@rollup-umd/documentation'); const config = createConfig({ pagePerSection: true, }); + /** * We generally make the modules aliased for having nice example, but in this case * we use the module itself for the documentation and to prevent multiple version of
fix(release): fixed released version
bootstrap-styled_v4
train
js
e253c9c340131d160284681ad7d1d73bc24f67ea
diff --git a/grapheneapi/aio/websocket.py b/grapheneapi/aio/websocket.py index <HASH>..<HASH> 100644 --- a/grapheneapi/aio/websocket.py +++ b/grapheneapi/aio/websocket.py @@ -20,9 +20,6 @@ class Websocket(Rpc): self._event = asyncio.Event(loop=self.loop) async def connect(self): - if log.getEffectiveLevel() == logging.DEBUG: - logging.getLogger("websockets").setLevel(logging.DEBUG) - ssl = True if self.url[:3] == "wss" else None self.ws = await websockets.connect(self.url, ssl=ssl, loop=self.loop) task = self.loop.create_task(self.parse_messages())
Don't aut-set debug loglevel on websockets logger No sense, it's still needs a handler. Let's allow user to set this logger.
xeroc_python-graphenelib
train
py
a2c4f280c73133a5117672ce6fb11764ef653915
diff --git a/packages/heroku-pg/commands/credentials.js b/packages/heroku-pg/commands/credentials.js index <HASH>..<HASH> 100644 --- a/packages/heroku-pg/commands/credentials.js +++ b/packages/heroku-pg/commands/credentials.js @@ -33,6 +33,7 @@ function * run (context, heroku) { credentials = sortBy(credentials, isDefaultCredential, 'name') attachments = yield heroku.get(`/addons/${addon.name}/addon-attachments`) + cli.warn(`${cli.color.cmd('pg:credentials')} has recently changed. Please use ${cli.color.cmd('pg:credentials:url')} for the previous output.`) cli.table(credentials, { columns: [ {key: 'name', label: 'Credential', format: presentCredential},
Add warning message that this command has changed recently (#<I>)
heroku_cli
train
js
73f1ac923cab7934d8f4996343bc1330ae2c0cbc
diff --git a/controller/src/main/java/org/jboss/as/controller/parsing/ParseUtils.java b/controller/src/main/java/org/jboss/as/controller/parsing/ParseUtils.java index <HASH>..<HASH> 100644 --- a/controller/src/main/java/org/jboss/as/controller/parsing/ParseUtils.java +++ b/controller/src/main/java/org/jboss/as/controller/parsing/ParseUtils.java @@ -438,7 +438,7 @@ public final class ParseUtils { ModelNode value = null; for (int i = 0; i < cnt; i++) { String uri = reader.getAttributeNamespace(i); - if (uri != null&&!"".equals(XMLConstants.NULL_NS_URI)) { + if (uri != null && !uri.equals(XMLConstants.NULL_NS_URI)) { throw unexpectedAttribute(reader, i); } final String localName = reader.getAttributeLocalName(i);
[WFCORE-<I>] Fix check for XMLConstants.NULL_NS_URI
wildfly_wildfly-core
train
java
b06bb099ff8e70ffc6f57a05a755ed4a7b8eaed6
diff --git a/lib/event_sourcery/postgres/schema.rb b/lib/event_sourcery/postgres/schema.rb index <HASH>..<HASH> 100644 --- a/lib/event_sourcery/postgres/schema.rb +++ b/lib/event_sourcery/postgres/schema.rb @@ -97,7 +97,7 @@ loop if _createdAtTimes[index] is not null then createdAt := _createdAtTimes[index]; else - createdAt := now(); + createdAt := now() at time zone 'utc'; end if; insert into #{events_table_name}
Use the same now() as we use in the column default
envato_event_sourcery
train
rb
f7b443c2f014c8329bc98daa17ac572c4ac4c476
diff --git a/webservice/upload.php b/webservice/upload.php index <HASH>..<HASH> 100644 --- a/webservice/upload.php +++ b/webservice/upload.php @@ -66,7 +66,12 @@ if ($fileuploaddisabled) { // check the user can manage his own files (can upload) $context = context_user::instance($USER->id); -require_capability('moodle/user:manageownfiles', $context); + +// Allow allways to upload files to the draft area, no matter if the user can't manage his own files. +// Files required by other webservices (like mod_assign ones) must be uploaded to the draft area. +if ($filearea === 'private') { + require_capability('moodle/user:manageownfiles', $context); +} if ($filearea !== 'private' and $filearea !== 'draft') { // Do not dare to allow more areas here!
MDL-<I> webservices: Allow upload to draft area always
moodle_moodle
train
php
7e271526835420c55dc1e9bcf6cadf7fd1d4a366
diff --git a/tests/api/load/single_load/test_base.py b/tests/api/load/single_load/test_base.py index <HASH>..<HASH> 100644 --- a/tests/api/load/single_load/test_base.py +++ b/tests/api/load/single_load/test_base.py @@ -17,6 +17,11 @@ from tests.base import NULL_CNTNR from .common import BaseTestCase +class MyDict(collections.OrderedDict): + """My original dict class keep key orders.""" + pass + + class TestCase(BaseTestCase): def test_single_load(self): @@ -75,6 +80,12 @@ class TestCase(BaseTestCase): res = TT.single_load(inp, ac_ordered=True) self.assertEqual(res, collections.OrderedDict(exp)) + def test_single_load_with_ac_dict(self): + for inp, exp in self.ies: + res = TT.single_load(inp, ac_dict=MyDict) + self.assertTrue(isinstance(res, MyDict)) + self.assertEqual(res, exp) + class PrimitivesTestCase(BaseTestCase):
enhancement: add a test case for api.single_load with ac_dict option
ssato_python-anyconfig
train
py
5aa675bf750c4200e28516279da0ab4c1d8e58b4
diff --git a/boskos/janitor/janitor.py b/boskos/janitor/janitor.py index <HASH>..<HASH> 100755 --- a/boskos/janitor/janitor.py +++ b/boskos/janitor/janitor.py @@ -53,7 +53,8 @@ DEMOLISH_ORDER = [ Resource('compute', 'routes', None, None, None, False), # logging resources - Resource('logging', 'sinks', None, None, None, False), + # sinks does not have creationTimestamp yet + #Resource('logging', 'sinks', None, None, None, False), ] @@ -267,7 +268,7 @@ if __name__ == '__main__': help='Clean items more than --hours old (added to --days)') PARSER.add_argument( '--filter', - default='NOT tags.items:do-not-delete AND NOT name ~ ^default', + default='name !~ ^default', help='Filter down to these instances') PARSER.add_argument( '--dryrun',
fix janitor --filter so it can run with latest gcloud
kubernetes_test-infra
train
py
2956ca9ec8666bdb44b2da99a38bcae41e36cca7
diff --git a/config/initializers/doorkeeper.rb b/config/initializers/doorkeeper.rb index <HASH>..<HASH> 100644 --- a/config/initializers/doorkeeper.rb +++ b/config/initializers/doorkeeper.rb @@ -2,7 +2,15 @@ Doorkeeper.configure do orm :active_record resource_owner_authenticator do - env[:clearance].try(:current_user) + clearance_session = env[:clearance] # session = Clearance::Session.new(env) + user = clearance_session && clearance_session.current_user + + if user + user + else + session[:return_to] = request.fullpath + redirect_to(sign_in_url) + end end admin_authenticator do
Bring back redirect_to or sign in on oauth flow won't work!
rubygems_rubygems.org
train
rb
3b568dcc1f820981e8bb1363604e617d11eee464
diff --git a/lib/mongo_mapper/plugins/querying.rb b/lib/mongo_mapper/plugins/querying.rb index <HASH>..<HASH> 100644 --- a/lib/mongo_mapper/plugins/querying.rb +++ b/lib/mongo_mapper/plugins/querying.rb @@ -101,7 +101,6 @@ module MongoMapper query = Plucky::Query.new(collection) query.object_ids(object_id_keys) query.update(options) - query[:_type] = to_s if single_collection_inherited? query end diff --git a/lib/mongo_mapper/plugins/sci.rb b/lib/mongo_mapper/plugins/sci.rb index <HASH>..<HASH> 100644 --- a/lib/mongo_mapper/plugins/sci.rb +++ b/lib/mongo_mapper/plugins/sci.rb @@ -12,6 +12,12 @@ module MongoMapper def single_collection_inherited? @single_collection_inherited == true end + + def query(options={}) + super.tap do |query| + query[:_type] = name if single_collection_inherited? + end + end end module InstanceMethods
Moved scoping :_type at query time to Sci plugin. Also, using name instead of to_s as name is used when assignment of _type happens (consistency improvement).
mongomapper_mongomapper
train
rb,rb
2f854430c1490aaaf7e5a9545921a42b8454cf68
diff --git a/proton-c/bindings/python/proton/utils.py b/proton-c/bindings/python/proton/utils.py index <HASH>..<HASH> 100644 --- a/proton-c/bindings/python/proton/utils.py +++ b/proton-c/bindings/python/proton/utils.py @@ -221,7 +221,7 @@ class BlockingConnection(Handler): while self.container.process(): pass def wait(self, condition, timeout=False, msg=None): - """Call do_work until condition() is true""" + """Call process until condition() is true""" if timeout is False: timeout = self.timeout if timeout is None: @@ -329,3 +329,4 @@ class SyncRequestResponse(IncomingMessageHandler): def on_message(self, event): """Called when we receive a message for our receiver.""" self.response = event.message + self.connection.container.yield_() # Wake up the wait() loop to handle the message.
PROTON-<I>: SyncRequestResponse should yield in on_message. This is the replacement fix for the reverted commit: <I>f<I> PROTON-<I>: Reactor should yield before quiescing. Instead of changing the reactor process() logic, we call pn_reactor_yield from on_message in the SyncRequestResponse handler.
apache_qpid-proton
train
py
61b0bd69f3ce757c4ec7a204b477afc8f578182d
diff --git a/packages/ge-scripts/index.js b/packages/ge-scripts/index.js index <HASH>..<HASH> 100644 --- a/packages/ge-scripts/index.js +++ b/packages/ge-scripts/index.js @@ -4,7 +4,7 @@ const spawn = require('cross-spawn'); const messages = require('./messages'); const { set, lensProp, view } = require('ramda'); -const [executor, /* eslint-disable no-unused-vars */ ignoredBin /* eslint-enable */, script, ...args] = process.argv; +const [executor, , script, ...args] = process.argv; function handleSignal(result) { console.log(messages[result.signal](script)); // eslint-disable-line no-console
chore(ge-scripts): use better way to ignore arguments in process.argv array affects: ge-scripts
goldwasserexchange_public
train
js
f3b9d61d8ef032fadf7ebe3c3d32afe41f3bc129
diff --git a/dbusmock/testcase.py b/dbusmock/testcase.py index <HASH>..<HASH> 100644 --- a/dbusmock/testcase.py +++ b/dbusmock/testcase.py @@ -153,10 +153,10 @@ class DBusTestCase(unittest.TestCase): return dbus.SessionBus() @classmethod - def wait_for_bus_object(klass, dest, path, system_bus=False, timeout=50): + def wait_for_bus_object(klass, dest, path, system_bus=False, timeout=600): '''Wait for an object to appear on D-BUS - Raise an exception if object does not appear within 5 seconds. You can + Raise an exception if object does not appear within one minute. You can change the timeout with the "timeout" keyword argument which specifies deciseconds. '''
Fix timeouts for loaded machines and parallel tests With parallel tests or on loaded CI machines, the 5 second default timeout is too low, and tests run into strange failures. Bump the timeout to one minute by default. Fixes #<I>
martinpitt_python-dbusmock
train
py
d17c47c277b847ea97be1ad10c903cb0ecbbc1aa
diff --git a/lib/event.js b/lib/event.js index <HASH>..<HASH> 100644 --- a/lib/event.js +++ b/lib/event.js @@ -21,8 +21,8 @@ export default class Event { * @param {[type]} options [description] * @return {[type]} [description] */ - emit(event, data, options) { - this.service.emit(event, data, Object.assign({ correlationId }, options)); + emit = (path, data, options) => { + this.service.emit(path, data, Object.assign({ correlationId: this.correlationId }, options)); } }; \ No newline at end of file
Ensuring correlationId is passed to event on emit
bmancini55_goodly
train
js
e412bd5467625c1b5de7a4b558ca543d155e5145
diff --git a/manifest.php b/manifest.php index <HASH>..<HASH> 100644 --- a/manifest.php +++ b/manifest.php @@ -37,7 +37,7 @@ return [ 'label' => 'Result visualisation', 'description' => 'TAO Results extension', 'license' => 'GPL-2.0', - 'version' => '7.12.0', + 'version' => '7.13.0', 'author' => 'Open Assessment Technologies, CRP Henri Tudor', // taoItems is only needed for the item model property retrieval 'requires' => [ diff --git a/scripts/update/Updater.php b/scripts/update/Updater.php index <HASH>..<HASH> 100644 --- a/scripts/update/Updater.php +++ b/scripts/update/Updater.php @@ -182,6 +182,6 @@ class Updater extends \common_ext_ExtensionUpdater $this->setVersion('7.5.0'); } - $this->skip('7.5.0', '7.12.0'); + $this->skip('7.5.0', '7.13.0'); } }
TAO-<I>: bumped version to <I>
oat-sa_extension-tao-outcomeui
train
php,php
aeae14b93b97f8c72bd665cf94448650d0799757
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -32,7 +32,7 @@ Copyright (C) 2010-2012 GEM Foundation. import os -from setuptools import setup +from setuptools import setup, find_packages version = '0.4' @@ -66,7 +66,7 @@ setup( description="Natural hazards' Risk Markup Language", long_description=__doc__, platforms=['any'], - packages=['nrml'], + packages=find_packages(exclude=['tests', 'tests.*']), package_data={'nrml': package_data}, requires=['lxml'], # Shows up when running `python setup.py --requires` provides=['nrml (0.4)'],
setup.py: Corrected package definition to discover nested packages and modules.
gem_oq-engine
train
py
1371549bbbb46e437abb029a776ceb8cdc9aa14f
diff --git a/index.js b/index.js index <HASH>..<HASH> 100644 --- a/index.js +++ b/index.js @@ -34,6 +34,8 @@ var MetaInspector = function(url, options){ //some urls are timing out after one minute, hence need to specify a reasoable default timeout this.timeout = this.options.timeout || 20000; //Timeout in ms + + this.strictSSL = this.options.strictSSL === false ? false : true; }; //MetaInspector.prototype = new events.EventEmitter(); @@ -244,7 +246,7 @@ MetaInspector.prototype.fetch = function(){ var _this = this; var totalChunks = 0; - var r = request({uri : this.url, gzip: true, maxRedirects: this.maxRedirects, timeout: this.timeout}, function(error, response, body){ + var r = request({uri : this.url, gzip: true, maxRedirects: this.maxRedirects, timeout: this.timeout, strictSSL: this.strictSSL}, function(error, response, body){ if(!error && response.statusCode === 200){ _this.document = body; _this.parsedDocument = cheerio.load(body);
Added selfSSL option to fix https request rejection
gabceb_node-metainspector
train
js
502c30f3edcbd40bd92608efe2a76570b56344e4
diff --git a/src/DataTable/utils/routeDoubleClick.js b/src/DataTable/utils/routeDoubleClick.js index <HASH>..<HASH> 100644 --- a/src/DataTable/utils/routeDoubleClick.js +++ b/src/DataTable/utils/routeDoubleClick.js @@ -1,7 +1,7 @@ import pluralize from "pluralize"; export default function routeDoubleClick(row, rowIndex, history) { const recordType = row["__typename"]; - const recordId = row["dbId"]; + const recordId = row["dbId"] || row["id"]; const route = "/" + pluralize(recordType) + "/" + recordId; history ? history.push(route)
with new graphql setup ids are on records as id not dbId.
TeselaGen_teselagen-react-components
train
js
04ef8884801c90a0f8a3aaa7b49ba287779fbd12
diff --git a/src/test/java/edu/umd/cs/findbugs/test/service/ClassFileLocator.java b/src/test/java/edu/umd/cs/findbugs/test/service/ClassFileLocator.java index <HASH>..<HASH> 100644 --- a/src/test/java/edu/umd/cs/findbugs/test/service/ClassFileLocator.java +++ b/src/test/java/edu/umd/cs/findbugs/test/service/ClassFileLocator.java @@ -14,7 +14,7 @@ public class ClassFileLocator { String filename = url.toString(); - final String prefix = "file:/"; + final String prefix = "file:"; if(filename.startsWith(prefix)) { filename = filename.substring(prefix.length()); }
Should fix the test on Travis-CI.
find-sec-bugs_find-sec-bugs
train
java
fac47cfa23c6e0573b0baa9b379d7226654c4dbd
diff --git a/lib/classes/PluginManager.js b/lib/classes/PluginManager.js index <HASH>..<HASH> 100644 --- a/lib/classes/PluginManager.js +++ b/lib/classes/PluginManager.js @@ -598,12 +598,15 @@ class PluginManager { await hook(); } - await storeTelemetryLocally(await generateTelemetryPayload(this.serverless)); let deferredBackendNotificationRequest; - if (commandsArray.join(' ') === 'deploy') { - deferredBackendNotificationRequest = sendTelemetry({ - serverlessExecutionSpan: this.serverless.onExitPromise, - }); + + if (!this.serverless.isTelemetryReportedExternally) { + await storeTelemetryLocally(await generateTelemetryPayload(this.serverless)); + if (commandsArray.join(' ') === 'deploy') { + deferredBackendNotificationRequest = sendTelemetry({ + serverlessExecutionSpan: this.serverless.onExitPromise, + }); + } } try {
refactor(Telemetry): Only process in `PluginManager` if flag missing
serverless_serverless
train
js
4021ab16b365cf3d7d3d4df0d4bcd3d17b6bd17d
diff --git a/uaa/src/test/java/org/cloudfoundry/identity/uaa/mock/providers/IdentityProviderEndpointsDocs.java b/uaa/src/test/java/org/cloudfoundry/identity/uaa/mock/providers/IdentityProviderEndpointsDocs.java index <HASH>..<HASH> 100644 --- a/uaa/src/test/java/org/cloudfoundry/identity/uaa/mock/providers/IdentityProviderEndpointsDocs.java +++ b/uaa/src/test/java/org/cloudfoundry/identity/uaa/mock/providers/IdentityProviderEndpointsDocs.java @@ -487,7 +487,7 @@ public class IdentityProviderEndpointsDocs extends InjectedMockContextTest { identityProvider.setName("UAA Provider"); identityProvider.setOriginKey("my-oidc-provider-"+new RandomValueStringGenerator().generate().toLowerCase()); OIDCIdentityProviderDefinition definition = new OIDCIdentityProviderDefinition(); - definition.setDiscoveryUrl(new URL("https://login.identity.cf-app.com/.well-known/openid-configuration")); + definition.setDiscoveryUrl(new URL("https://accounts.google.com/.well-known/openid-configuration")); definition.setSkipSslValidation(true); definition.setRelyingPartyId("uaa"); definition.setRelyingPartySecret("secret");
Use a reliable URL for field example
cloudfoundry_uaa
train
java
fc509e14b24fedde3fa6179b89ab2210a5630788
diff --git a/js/bootstrap-typeahead.js b/js/bootstrap-typeahead.js index <HASH>..<HASH> 100644 --- a/js/bootstrap-typeahead.js +++ b/js/bootstrap-typeahead.js @@ -56,7 +56,7 @@ } , show: function () { - var pos = $.extend({}, this.$element.position(), { + var pos = $.extend({}, this.$element.offset(), { height: this.$element[0].offsetHeight })
revert position -> offset for typeahead position
twbs_bootstrap
train
js
50b8dbed1cd668184edb05de4cdeb0d2f542e35a
diff --git a/egcd/egcd.py b/egcd/egcd.py index <HASH>..<HASH> 100644 --- a/egcd/egcd.py +++ b/egcd/egcd.py @@ -2,9 +2,12 @@ Easy-to-import Python module with a basic, efficient, native implementation of the extended Euclidean algorithm. """ +from __future__ import annotations +from typing import Tuple import doctest -def egcd(b, n): +def egcd(b: int, n: int) -> Tuple[int, int, int]: + # pylint: disable=C0301 """ Given two integers ``(b, n)``, returns ``(gcd(b, n), a, m)`` such that ``a*b + n*m = gcd(b, n)``.
Disable linting rule and add type annotation.
lapets_egcd
train
py
c80a0225528a9b480643daa8339e546cf2a7a20f
diff --git a/lib/runfile/runner.rb b/lib/runfile/runner.rb index <HASH>..<HASH> 100644 --- a/lib/runfile/runner.rb +++ b/lib/runfile/runner.rb @@ -33,8 +33,8 @@ module Runfile File.file? filename or handle_no_runfile argv begin load filename - rescue - abort "Failed loading file '#{filename}'.\nIs it a valid Runfile?" + rescue => e + abort "Runfile error:\n#{e.message}" end @@instance.run *argv end
runner: show friendly error on Runfile syntax error
DannyBen_runfile
train
rb
781b6f06ac1181714284fd069443b6a97cc57671
diff --git a/lib/stevenson.rb b/lib/stevenson.rb index <HASH>..<HASH> 100755 --- a/lib/stevenson.rb +++ b/lib/stevenson.rb @@ -17,6 +17,9 @@ module Stevenson type: :boolean, aliases: '-j', desc: 'Jekyll compiles the output directory' + method_option :subdirectory, + aliases: '-s', + desc: 'The subdirectory to use from the template, if any' method_option :template, aliases: '-t', default: 'hyde', @@ -33,6 +36,9 @@ module Stevenson # If a branch is provided, switch to that branch template.switch_branch options[:branch] + # If a subdirectory is provided, switch to that directory + template.select_subdirectory options[:subdirectory] + # Configure the template configurator = Stevenson::Configurator::YAMLConfigurator.new template.path configurator.configure
Added a Subdirectory Option to the Command
RootsRated_stevenson
train
rb
7460f170be41f311952a5d7b92d5f031d5190053
diff --git a/modules/instance-switcher.php b/modules/instance-switcher.php index <HASH>..<HASH> 100755 --- a/modules/instance-switcher.php +++ b/modules/instance-switcher.php @@ -2,7 +2,6 @@ /* * Plugin name: Instance Switcher * Description: Enable users to switch to any shadow they have available - * Version: 1.0 */ namespace Seravo; @@ -12,6 +11,11 @@ if ( ! class_exists('InstanceSwitcher') ) { public static function load() { + // Check permission + if ( ! current_user_can( InstanceSwitcher::custom_capability() ) ) { + return; + } + // admin ajax action add_action( 'wp_ajax_instance_switcher_change_container', array( 'Seravo\InstanceSwitcher', 'change_wp_container' ) ); add_action( 'wp_ajax_nopriv_instance_switcher_change_container', array( 'Seravo\InstanceSwitcher', 'change_wp_container' ) ); @@ -33,6 +37,13 @@ if ( ! class_exists('InstanceSwitcher') ) { } /** + * Make capability filterable + */ + public static function custom_capability() { + return apply_filters( 'seravo_instance_switcher_capability', 'edit_posts' ); + } + + /** * Load JavaScript and stylesheets for the switcher only if WP Admin bar visible */ public static function assets() {
Show the Instance Switcher visible only to users with edit_posts capability Also make the capability filterable so the logic can be changes just like in Purge Cache. Closes: #<I>
Seravo_seravo-plugin
train
php
8352c68d5ddb08502470fa88dd5073209bf507cd
diff --git a/test/specs/annotation.spec.js b/test/specs/annotation.spec.js index <HASH>..<HASH> 100644 --- a/test/specs/annotation.spec.js +++ b/test/specs/annotation.spec.js @@ -161,8 +161,7 @@ describe('Annotation plugin', function() { } } }); - const state = window['chartjs-plugin-annotation']._getState(chart); - const element = state.elements[0]; + const element = window.getAnnotationElements(chart)[0]; expect(element.options.drawTime).toBe('fallback'); }); @@ -186,8 +185,7 @@ describe('Annotation plugin', function() { } } }); - const state = window['chartjs-plugin-annotation']._getState(chart); - const element = state.elements[0]; + const element = window.getAnnotationElements(chart)[0]; expect(element.options.drawTime).toBe('afterDatasetsDraw'); }); @@ -209,8 +207,7 @@ describe('Annotation plugin', function() { } } }); - const state = window['chartjs-plugin-annotation']._getState(chart); - const element = state.elements[0]; + const element = window.getAnnotationElements(chart)[0]; expect(element.options.drawTime).toBe(chart.options.plugins.annotation.annotations.label.drawTime); }); });
Use getAnnotationElements utility where not used in the test cases (#<I>)
chartjs_chartjs-plugin-annotation
train
js
02e8b01288ef06d83007a7607f084676c4622282
diff --git a/salt/modules/mysql.py b/salt/modules/mysql.py index <HASH>..<HASH> 100644 --- a/salt/modules/mysql.py +++ b/salt/modules/mysql.py @@ -1436,7 +1436,7 @@ def __grant_normalize(grant): # Grants are paste directly in SQL, must filter it exploded_grants = grant.split(",") for chkgrant in exploded_grants: - if not chkgrant.strip().upper() in __grants__: + if chkgrant.strip().upper() not in __grants__: raise Exception('Invalid grant : {0!r}'.format( chkgrant )) @@ -1454,7 +1454,7 @@ def __ssl_option_sanitize(ssl_option): normal_key = key.strip().upper() - if not normal_key in __ssl_options__: + if normal_key not in __ssl_options__: raise Exception('Invalid SSL option : {0!r}'.format( key ))
Fix PEP8 E<I> - test for membership should be "not in"
saltstack_salt
train
py
a99f24615ec1aec1d10d0036f003cdf3363aa92d
diff --git a/OrchidCore/src/main/java/com/eden/orchid/impl/generators/HomepageGenerator.java b/OrchidCore/src/main/java/com/eden/orchid/impl/generators/HomepageGenerator.java index <HASH>..<HASH> 100644 --- a/OrchidCore/src/main/java/com/eden/orchid/impl/generators/HomepageGenerator.java +++ b/OrchidCore/src/main/java/com/eden/orchid/impl/generators/HomepageGenerator.java @@ -47,8 +47,7 @@ public final class HomepageGenerator extends OrchidGenerator { } Homepage page = new Homepage(resource, "frontPage", context.getSite().getSiteInfo().getSiteName()); - page.getReference().setFileName("index"); - page.getReference().setUsePrettyUrl(false); + page.getReference().setFileName(""); return page; }
Makes homepage urls "pretty". Closes #<I>
JavaEden_Orchid
train
java
6ce1b05c47875cd3b452b922bd539d268f5e9eed
diff --git a/rocket/main.py b/rocket/main.py index <HASH>..<HASH> 100644 --- a/rocket/main.py +++ b/rocket/main.py @@ -7,7 +7,6 @@ import os import sys import time -import signal import socket import logging import traceback @@ -83,6 +82,7 @@ class Rocket: # Set up our shutdown signals try: + import signal signal.signal(signal.SIGTERM, self._sigterm) signal.signal(signal.SIGUSR1, self._sighup) except:
Moved signal import to make Rocket compatible with IronPython <I>.
explorigin_Rocket
train
py
94cc48700277e67121e9cb6fbde2835b022cebb9
diff --git a/test/src/test/java/jenkins/tasks/SimpleBuildWrapperTest.java b/test/src/test/java/jenkins/tasks/SimpleBuildWrapperTest.java index <HASH>..<HASH> 100644 --- a/test/src/test/java/jenkins/tasks/SimpleBuildWrapperTest.java +++ b/test/src/test/java/jenkins/tasks/SimpleBuildWrapperTest.java @@ -57,6 +57,7 @@ public class SimpleBuildWrapperTest { } public static class WrapperWithEnvOverride extends SimpleBuildWrapper { @Override public void setUp(Context context, Run<?,?> build, FilePath workspace, Launcher launcher, TaskListener listener, EnvVars initialEnvironment) throws IOException, InterruptedException { + assertNotNull(initialEnvironment.get("PATH")); context.env("PATH+STUFF", workspace.child("bin").getRemote()); } @TestExtension("envOverride") public static class DescriptorImpl extends BuildWrapperDescriptor {
Also verifying that initialEnvironment somehow works.
jenkinsci_jenkins
train
java
3536c09ceaa2d94a43a3a3228b096ba7a61f558d
diff --git a/volume/local/local.go b/volume/local/local.go index <HASH>..<HASH> 100644 --- a/volume/local/local.go +++ b/volume/local/local.go @@ -117,9 +117,11 @@ type Root struct { // List lists all the volumes func (r *Root) List() ([]volume.Volume, error) { var ls []volume.Volume + r.m.Lock() for _, v := range r.volumes { ls = append(ls, v) } + r.m.Unlock() return ls, nil }
volume/local: fix race in List
moby_moby
train
go
4ae8e1c4d1ce2a1396794ebd31730ce9d24610aa
diff --git a/tests/test_config_tree.py b/tests/test_config_tree.py index <HASH>..<HASH> 100644 --- a/tests/test_config_tree.py +++ b/tests/test_config_tree.py @@ -38,3 +38,8 @@ class TestConfigParser(object): config_tree.put('root.level', logging.INFO) assert dict(config_tree)['version'] == 1 logging.config.dictConfig(config_tree) + + def test_config_tree_null(self): + config_tree = ConfigTree() + config_tree.put("a.b.c", None) + assert config_tree.get("a.b.c") is None
Add failing test when getting defined null value
chimpler_pyhocon
train
py
eb4f2b94d86a4423df2df6fdcf9f260083a97ae6
diff --git a/src/pyshark/tshark/tshark_xml.py b/src/pyshark/tshark/tshark_xml.py index <HASH>..<HASH> 100644 --- a/src/pyshark/tshark/tshark_xml.py +++ b/src/pyshark/tshark/tshark_xml.py @@ -23,7 +23,8 @@ def packet_from_xml_packet(xml_pkt, psml_structure=None): :return: Packet object. """ if not isinstance(xml_pkt, lxml.objectify.ObjectifiedElement): - xml_pkt = lxml.objectify.fromstring(xml_pkt) + parser = lxml.objectify.makeparser(huge_tree=True) + xml_pkt = lxml.objectify.fromstring(xml_pkt, parser) if psml_structure: return _packet_from_psml_packet(xml_pkt, psml_structure) return _packet_from_pdml_packet(xml_pkt)
Supporting huge input XML files as per issue #<I>
KimiNewt_pyshark
train
py
fd477b5fff6e9b548b4e136ea986abd4a2ff01c0
diff --git a/lib/capybara/selenium/nodes/chrome_node.rb b/lib/capybara/selenium/nodes/chrome_node.rb index <HASH>..<HASH> 100644 --- a/lib/capybara/selenium/nodes/chrome_node.rb +++ b/lib/capybara/selenium/nodes/chrome_node.rb @@ -26,6 +26,15 @@ class Capybara::Selenium::ChromeNode < Capybara::Selenium::Node html5_drag_to(element) end + def click(*) + super + rescue ::Selenium::WebDriver::Error::WebDriverError => e + # chromedriver 74 (at least on mac) raises the wrong error for this + raise ::Selenium::WebDriver::Error::ElementClickInterceptedError if e.message.match?(/element click intercepted/) + + raise + end + private def file_errors
Workaround issue in chromedriver <I>
teamcapybara_capybara
train
rb
51c998caaf561f1fc0c7934a92ffe505be562dad
diff --git a/lib/plugins/plugin/search/search.test.js b/lib/plugins/plugin/search/search.test.js index <HASH>..<HASH> 100644 --- a/lib/plugins/plugin/search/search.test.js +++ b/lib/plugins/plugin/search/search.test.js @@ -6,6 +6,7 @@ const BbPromise = require('bluebird'); const PluginSearch = require('./search'); const Serverless = require('../../../Serverless'); const CLI = require('../../../classes/CLI'); +const userStats = require('../../../utils/userStats'); chai.use(require('chai-as-promised')); const expect = require('chai').expect; @@ -50,10 +51,12 @@ describe('PluginSearch', () => { beforeEach(() => { searchStub = sinon .stub(pluginSearch, 'search').returns(BbPromise.resolve()); + sinon.stub(userStats, 'track').resolves(); }); afterEach(() => { pluginSearch.search.restore(); + userStats.track.restore(); }); it('should have the sub-command "search"', () => {
Ensure to not issue tracking requests when testing
serverless_serverless
train
js
4db1b44733a1b433be8185cf5cadd304d523f3fb
diff --git a/test/bench.js b/test/bench.js index <HASH>..<HASH> 100644 --- a/test/bench.js +++ b/test/bench.js @@ -73,14 +73,14 @@ exports.compare = { }, 'with test("print"), without req/res': done => { Request( - `http://localhost:${NON_PRINT_PORT_WITHOUTREQ}/test`, + `http://localhost:${PRINT_PORT_WITHOUTREQ}/test`, { method: 'GET' }, () => done() ) }, 'without test("print"), with req/res': done => { Request( - `http://localhost:${PRINT_PORT_WITHREQ}/test`, + `http://localhost:${NON_PRINT_PORT_WITHREQ}/test`, { method: 'GET' }, () => done() )
Oops, make sure title matches the bench
senecajs_seneca-web-adapter-express
train
js
57fbfc23f41441b65cf32ae8903cf33815a165d1
diff --git a/holmesalf/version.py b/holmesalf/version.py index <HASH>..<HASH> 100644 --- a/holmesalf/version.py +++ b/holmesalf/version.py @@ -8,4 +8,4 @@ # http://www.opensource.org/licenses/MIT-license # Copyright (c) 2014 Pablo Aguiar [email protected] -__version__ = '0.1.2' +__version__ = '0.1.3' diff --git a/tests/test_version.py b/tests/test_version.py index <HASH>..<HASH> 100644 --- a/tests/test_version.py +++ b/tests/test_version.py @@ -16,4 +16,4 @@ from tests.base import TestCase class VersionTestCase(TestCase): def test_has_proper_version(self): - expect(__version__).to_equal('0.1.2') + expect(__version__).to_equal('0.1.3')
Draft a new release, <I>
holmes-app_holmes-alf
train
py,py
f48a1346f09991c67bb56b6f4507c69465d59563
diff --git a/quart/local.py b/quart/local.py index <HASH>..<HASH> 100644 --- a/quart/local.py +++ b/quart/local.py @@ -1,7 +1,7 @@ import asyncio import copy from contextvars import ContextVar # noqa # contextvars not understood as stdlib -from typing import Any, Callable, Dict # noqa # contextvars not understood as stdlib +from typing import Any, Callable, Dict, Optional # noqa # contextvars not understood as stdlib class TaskLocal: @@ -74,10 +74,11 @@ class LocalProxy: """Proxy to a task local object.""" __slots__ = ('__dict__', '__local', '__wrapped__') - def __init__(self, local: Callable) -> None: + def __init__(self, local: Callable, name: Optional[str]=None) -> None: # Note as __setattr__ is overidden below, use the object __setattr__ object.__setattr__(self, '__LocalProxy_local', local) object.__setattr__(self, '__wrapped__', local) + object.__setattr__(self, "__name__", name) def _get_current_object(self) -> Any: return object.__getattribute__(self, '__LocalProxy_local')()
Bugfix follow Werkzeug LocalProxy name API Alongside matching the API it also allows ``help(quart.request)`` (or any other local proxied object) to work without raising an error.
pgjones_quart
train
py
ee138deb3142b608d8eac54bc60c535061159b55
diff --git a/lib/rules/tuple.js b/lib/rules/tuple.js index <HASH>..<HASH> 100644 --- a/lib/rules/tuple.js +++ b/lib/rules/tuple.js @@ -5,7 +5,7 @@ module.exports = function ({ schema, messages }, path, context) { const src = []; - if (schema.items === null) { + if (schema.items === undefined || schema.items === null) { throw new Error(`Invalid '${schema.type}' schema. The 'items' field is missing.`); }
Check for undefined items in the tuple rule
icebob_fastest-validator
train
js
11891f02a978b50d0b3aa03a7fab9dec380e0019
diff --git a/cayley_test.go b/cayley_test.go index <HASH>..<HASH> 100644 --- a/cayley_test.go +++ b/cayley_test.go @@ -358,11 +358,6 @@ func runBench(n int, b *testing.B) { b.Skip() } prepare(b) - ses := gremlin.NewSession(ts, cfg.Timeout, true) - _, err := ses.InputParses(benchmarkQueries[n].query) - if err != nil { - b.Fatalf("Failed to parse benchmark gremlin %s: %v", benchmarkQueries[n].message, err) - } b.StopTimer() b.ResetTimer() for i := 0; i < b.N; i++ {
remove lead-in parsing test
cayleygraph_cayley
train
go
1a185f68f42212716b50f979770ea03fd97b5f96
diff --git a/uportal-war/src/main/java/org/jasig/portal/rest/layout/MarketplaceEntry.java b/uportal-war/src/main/java/org/jasig/portal/rest/layout/MarketplaceEntry.java index <HASH>..<HASH> 100644 --- a/uportal-war/src/main/java/org/jasig/portal/rest/layout/MarketplaceEntry.java +++ b/uportal-war/src/main/java/org/jasig/portal/rest/layout/MarketplaceEntry.java @@ -36,6 +36,10 @@ import org.jasig.portal.portlet.om.PortletCategory; import com.fasterxml.jackson.annotation.JsonIgnore; import org.jasig.portal.security.IPerson; +/** + * User-specific representation of a Marketplace portlet definition suitable for JSON serialization + * and for use in view implementations. + */ public class MarketplaceEntry implements Serializable { private Set<String> getPortletCategories(MarketplacePortletDefinition pdef) {
JavaDoc : add type JavaDoc on MarketplaceEntry.
Jasig_uPortal
train
java
4171a0e4a45cf67c66d4064186c2e57cc548e655
diff --git a/sources/scalac/transformer/AddConstructors.java b/sources/scalac/transformer/AddConstructors.java index <HASH>..<HASH> 100644 --- a/sources/scalac/transformer/AddConstructors.java +++ b/sources/scalac/transformer/AddConstructors.java @@ -90,7 +90,7 @@ public class AddConstructors extends Transformer { constrType = Type.PolyType(tparamSyms, constrType); if (!classConstr.isExternal()) - constrType.cloneType(classConstr, constr); + constrType = constrType.cloneType(classConstr, constr); constr.setInfo(constrType); constructors.put(classConstr, constr);
- Fixed so that initalizers have new tparams an... - Fixed so that initalizers have new tparams and new vparams symbols
scala_scala
train
java
c336b36c527fcbf51b4a42a1264ea6b35020583b
diff --git a/benchexec/tools/tbf.py b/benchexec/tools/tbf.py index <HASH>..<HASH> 100644 --- a/benchexec/tools/tbf.py +++ b/benchexec/tools/tbf.py @@ -95,8 +95,12 @@ class Tool(benchexec.tools.template.BaseTool): else: options = options + ["--timelimit", str(rlimits[SOFTTIMELIMIT])] if propertyfile: - logging.warning('Propertyfile given, but tbf ignores property files' - ' and always checks for calls to __VERIFIER_error()') + if 'testcomp' in self.version(executable): + options = options + ["--spec", propertyfile] + + else: + logging.warning('Propertyfile given, but tbf ignores property files' + ' and always checks for calls to __VERIFIER_error()') return super().cmdline(executable, options, tasks, propertyfile, rlimits)
Let newer versions of tbf use given property files This is currently the case for all versions tagged with 'testcomp', so use this to differentiate whether parameter '--spec' is viable.
sosy-lab_benchexec
train
py
3e31d10dd5a6623d64b0f6678163ede07c4f6669
diff --git a/src/Commands/createPackage.php b/src/Commands/createPackage.php index <HASH>..<HASH> 100644 --- a/src/Commands/createPackage.php +++ b/src/Commands/createPackage.php @@ -10,6 +10,17 @@ class createPackage extends baseCommand public function handle() { + // Check if tar exists + exec("tar --version", $output, $status); + + if($status !== 0 ) { + + $this->info('Error: tar executable could not be found. Please install tar utility before you can continue'); + + return; + + } + $themeName = $this->argument('themeName'); if ($themeName == "") { diff --git a/src/Commands/installPackage.php b/src/Commands/installPackage.php index <HASH>..<HASH> 100644 --- a/src/Commands/installPackage.php +++ b/src/Commands/installPackage.php @@ -10,6 +10,17 @@ class installPackage extends baseCommand public function handle() { + // Check if tar exists + exec("tar --version", $output, $status); + + if($status !== 0 ) { + + $this->info('Error: tar executable could not be found. Please install tar utility before you can continue'); + + return; + + } + $package = $this->argument('package'); if (!$package) {
Theme commands: Check if tar is installed before executing commands
igaster_laravel-theme
train
php,php
e7989d37c24c34c85c2dd231969f9ebee409b970
diff --git a/lib/auth.js b/lib/auth.js index <HASH>..<HASH> 100644 --- a/lib/auth.js +++ b/lib/auth.js @@ -175,7 +175,7 @@ function accessToken (authorization) { } function * login (options = {}) { - yield logout() + if (!options.skipLogout) yield logout() try { if (options['sso']) {
add skipLogout option to login (#<I>)
heroku_heroku-cli-util
train
js
083a0a9dfc14456f57c9cfd15b6e09da447ed73d
diff --git a/src/ai/backend/client/cli/run.py b/src/ai/backend/client/cli/run.py index <HASH>..<HASH> 100644 --- a/src/ai/backend/client/cli/run.py +++ b/src/ai/backend/client/cli/run.py @@ -632,10 +632,10 @@ def start(args): sys.exit(1) else: if kernel.created: - print_info('Session ID {0} is already running and ready.' + print_info('Session ID {0} is created and ready.' .format(session_id)) else: - print_info('Session ID {0} is created and ready.' + print_info('Session ID {0} is already running and ready.' .format(session_id))
Ooops... (#<I>)
lablup_backend.ai-client-py
train
py
1fc937d56352f6d6b4116b9b12b972c24a5c244d
diff --git a/lib/authlogic/session/cookies.rb b/lib/authlogic/session/cookies.rb index <HASH>..<HASH> 100644 --- a/lib/authlogic/session/cookies.rb +++ b/lib/authlogic/session/cookies.rb @@ -23,10 +23,10 @@ module Authlogic # session = UserSession.new(:super_high_secret) # session.cookie_key => "super_high_secret_user_credentials" # - # * <tt>Default:</tt> "#{guessed_klass_name.underscore}_credentials" + # * <tt>Default:</tt> "#{klass_name.underscore}_credentials" # * <tt>Accepts:</tt> String def cookie_key(value = nil) - rw_config(:cookie_key, value, "#{guessed_klass_name.underscore}_credentials") + rw_config(:cookie_key, value, "#{klass_name.underscore}_credentials") end alias_method :cookie_key=, :cookie_key
Use klass_name for cookie_key, since it falls back to guessed_klass_name. Otherwise a 'undefined method `underscore' for nil:NilClass' error is thrown when the session authentication class does not follow the {model}Session naming convention.
binarylogic_authlogic
train
rb
f5b87d032d5886d56995c6bd0a7ae7a5db01f7b1
diff --git a/lib/active_record/connection_adapters/percona_adapter.rb b/lib/active_record/connection_adapters/percona_adapter.rb index <HASH>..<HASH> 100644 --- a/lib/active_record/connection_adapters/percona_adapter.rb +++ b/lib/active_record/connection_adapters/percona_adapter.rb @@ -5,10 +5,10 @@ require 'percona_migrator' require 'forwardable' module ActiveRecord - class Base + module ConnectionHandling # Establishes a connection to the database that's used by all Active # Record objects. - def self.percona_connection(config) + def percona_connection(config) mysql2_connection = mysql2_connection(config) config[:username] = 'root' if config[:username].nil?
Move #percona_connection to new ConnectionHandling In Rails 4 there's a new ConnectionHandling module that contains all db connection logic. That module is opened by all connection adapters to add their #<adapter_name>_connection method. Then, this module is extended by ActiveRecord::Base.
redbooth_departure
train
rb
4c4a9b4079461947b3a53123d7c66aba782cb5a3
diff --git a/src/daemon/influxd.go b/src/daemon/influxd.go index <HASH>..<HASH> 100644 --- a/src/daemon/influxd.go +++ b/src/daemon/influxd.go @@ -93,6 +93,17 @@ func main() { } log.Println("Starting Influx Server...") + fmt.Printf(` ++---------------------------------------------+ +| _____ __ _ _____ ____ | +| |_ _| / _| | | __ \| _ \ | +| | | _ __ | |_| |_ ___ _| | | | |_) | | +| | | | '_ \| _| | | | \ \/ / | | | _ < | +| _| |_| | | | | | | |_| |> <| |__| | |_) | | +| |_____|_| |_|_| |_|\__,_/_/\_\_____/|____/ | ++---------------------------------------------+ + +`) os.MkdirAll(config.RaftDir, 0744) os.MkdirAll(config.DataDir, 0744) server, err := server.NewServer(config)
add some ascii art on startup
influxdata_influxdb
train
go
e5434ba0d24cff1cba5939472ebde8eedbc082bc
diff --git a/thali/install/install.js b/thali/install/install.js index <HASH>..<HASH> 100644 --- a/thali/install/install.js +++ b/thali/install/install.js @@ -251,7 +251,7 @@ function fetchAndInstallJxCoreCordovaPlugin(baseDir, jxCoreVersionNumber) { } return new Promise(function(resolve, reject) { - var requestUrl = 'https://github.com/jxcore/jxcore-cordova-release/raw/master/' + jxCoreVersionNumber + '/io.jxcore.node.jx'; + var requestUrl = 'http://jxcordova.cloudapp.net/' + jxCoreVersionNumber + '/io.jxcore.node.jx'; var receivedData = 0; var contentLength = 0; var previousPercentageProgress = 0;
Use the new JXCore Cordova release server. Relates to #<I>.
thaliproject_Thali_CordovaPlugin
train
js
1613f6a502575d86a823a751a54ba39436550a21
diff --git a/block.js b/block.js index <HASH>..<HASH> 100644 --- a/block.js +++ b/block.js @@ -87,6 +87,8 @@ transform.define("lift", function(doc, params) { return result }) +// FIXME allow both searching up and searching down + export function joinPoint(doc, pos) { let joinDepth = -1 for (let i = 0, parent = doc; i < pos.path.length; i++) { @@ -99,6 +101,8 @@ export function joinPoint(doc, pos) { if (joinDepth > -1) return pos.shorten(joinDepth) } +// FIXME pass in an already found join point + transform.define("join", function(doc, params) { let point = joinPoint(doc, params.pos) if (!point) return transform.identity(doc)
Disable autocomplete for dialog forms Animated inputs cause weird effects with the dropdown
ProseMirror_prosemirror-model
train
js
f79bc4b105fdc4f393e2424e4295958b4320d05f
diff --git a/src/Applications/Form/CreateApplication.php b/src/Applications/Form/CreateApplication.php index <HASH>..<HASH> 100644 --- a/src/Applications/Form/CreateApplication.php +++ b/src/Applications/Form/CreateApplication.php @@ -108,11 +108,7 @@ class CreateApplication extends Form implements ServiceLocatorAwareInterface $this->add( $applicationsPrivacy ); - $applicationsPrivacy = $this->forms->get('Core/PolicyCheck'); - $this->add( - $applicationsPrivacy - ); - + $buttons = $this->forms->get('DefaultButtonsFieldset'); $buttons->get('submit')->setLabel( /* @translate */ 'send application'); $this->add($buttons);
[Core] Form PolicyCheck Formelement (#<I>)
yawik_applications
train
php
d73c669fe3a6a63c37f302e7bf33e2c9ec4fc646
diff --git a/lib/jsdom/browser/index.js b/lib/jsdom/browser/index.js index <HASH>..<HASH> 100644 --- a/lib/jsdom/browser/index.js +++ b/lib/jsdom/browser/index.js @@ -41,7 +41,6 @@ exports.windowAugmentation = function(dom, options) { createDefaultElements(window.document); } - window.document.compareDocumentPosition = function() {}; window.document.documentElement.style = {}; window.document.documentElement.hasAttribute = true;
compareDocumentPosition is implemented in level 3
jsdom_jsdom
train
js
e045f63f2b2555c25a161d325141488e24a4b2a0
diff --git a/src/Html.php b/src/Html.php index <HASH>..<HASH> 100644 --- a/src/Html.php +++ b/src/Html.php @@ -308,7 +308,7 @@ class Html } /** - * @param string|null $test + * @param string|null $text * * @return \Spatie\Html\Elements\Button */ @@ -318,6 +318,16 @@ class Html } /** + * @param string|null $text + * + * @return \Spatie\Html\Elements\Button + */ + public function reset($text = null) + { + return $this->button($text, 'reset'); + } + + /** * @param string $number * @param string|null $text *
Button reset added (#<I>)
spatie_laravel-html
train
php
94ef6cc2e75982ac93b55803a43de40e479257a9
diff --git a/suro-server/src/main/java/com/netflix/suro/routing/RoutingMap.java b/suro-server/src/main/java/com/netflix/suro/routing/RoutingMap.java index <HASH>..<HASH> 100644 --- a/suro-server/src/main/java/com/netflix/suro/routing/RoutingMap.java +++ b/suro-server/src/main/java/com/netflix/suro/routing/RoutingMap.java @@ -60,7 +60,7 @@ public class RoutingMap { } public boolean doFilter(MessageContainer message) throws Exception { - return filter != null ? filter.doFilter(message) : true; + return filter == null || filter.doFilter(message); } }
Simplified a conditional statement
Netflix_suro
train
java
8f5cb9ea270a715dd45f2cdd02271789eb7d306d
diff --git a/phpsec/phpsec.pgp.php b/phpsec/phpsec.pgp.php index <HASH>..<HASH> 100644 --- a/phpsec/phpsec.pgp.php +++ b/phpsec/phpsec.pgp.php @@ -14,26 +14,26 @@ */ class phpsecPgp { public static $_gpgPath = '/var/bin/gpg'; - public static $_keyDir = null; + public static function genKeys() { } - public function signKey() { + public static function signKey() { } - public function sign() { + public static function sign() { } - public function encrypt() { + public static function encrypt() { } - public function decrypt() { + public static function decrypt() { }
Functions should (probably) be static.
phpsec_phpSec
train
php
eb86f9e07200b6081a2dd9bd356c8d91dbd36566
diff --git a/client/lib/cart-values/index.js b/client/lib/cart-values/index.js index <HASH>..<HASH> 100644 --- a/client/lib/cart-values/index.js +++ b/client/lib/cart-values/index.js @@ -47,13 +47,15 @@ function preprocessCartForServer( { currency, temporary, extra, - products: products.map( ( { product_id, meta, free_trial, volume, _extra } ) => ( { - product_id, - meta, - free_trial, - volume, - extra: _extra, - } ) ), + products: products.map( + ( { product_id, meta, free_trial, volume, extra: productExtra } ) => ( { + product_id, + meta, + free_trial, + volume, + extra: productExtra, + } ) + ), }, needsUrlCoupon && urlCoupon && {
Shopping Cart: Fix not passing the correct extra for the product Regression introduced in #<I> Destructuring was not done properly and a non-exisiting `_extra` property was used.
Automattic_wp-calypso
train
js
f79a40f3fd112ba30de60dd6b7a3c0e21b5b63f9
diff --git a/src/Module/driver.js b/src/Module/driver.js index <HASH>..<HASH> 100644 --- a/src/Module/driver.js +++ b/src/Module/driver.js @@ -30,7 +30,8 @@ export default class ModuleDriver clickToggle() { const toggle = this.wrapper.find( IconButton ) - .findWhere( node => node.props().iconType === ( 'up' || 'down' ) ); + .findWhere( node => [ 'up', 'down' ] + .includes( node.props().iconType ) ); if ( toggle.length === 0 ) {
Fixed check for iconType in driver #<I>
sociomantic-tsunami_nessie-ui
train
js
2ed15b78708c4d99ebf7623247f153c05e55c986
diff --git a/astrobase/checkplotlist.py b/astrobase/checkplotlist.py index <HASH>..<HASH> 100644 --- a/astrobase/checkplotlist.py +++ b/astrobase/checkplotlist.py @@ -135,7 +135,10 @@ def dict_get(datadict, keylist): def sortkey_worker(task): cpf, key = task cpd = checkplot._read_checkplot_picklefile(cpf) - return dict_get(cpd, key) + try: + return dict_get(cpd, key) + except: + return np.nan def main():
checkplotlist: guard against missing sortkey items
waqasbhatti_astrobase
train
py
344e1bb0ca5305e96ce3509b5349d8b86125a9ff
diff --git a/Doctrine/ODM/PHPCR/DocumentRepository.php b/Doctrine/ODM/PHPCR/DocumentRepository.php index <HASH>..<HASH> 100644 --- a/Doctrine/ODM/PHPCR/DocumentRepository.php +++ b/Doctrine/ODM/PHPCR/DocumentRepository.php @@ -80,9 +80,10 @@ class DocumentRepository extends BaseDocumentRepository implements RepositoryInt foreach ($criteria as $property => $value) { if (!empty($value)) { $queryBuilder - ->andWhere($this->getPropertyName($property).' = :'.$property) - ->setParameter($property, $value) - ; + ->andWhere() + ->eq() + ->field($this->getPropertyName($property)) + ->literal($value); } } }
Use correctly where clause in QueryBuilder
Sylius_SyliusResourceBundle
train
php
63ed7b6e0011b767dd3a65efc3e023b783c40b91
diff --git a/gulpfile.js b/gulpfile.js index <HASH>..<HASH> 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -73,7 +73,7 @@ gulp.task('test.unit', ['test.compile'], function(done) { done(); return; } - return gulp.src(['build/test/**/*.js', '!build/test/**/e2e*.js']).pipe(mocha({timeout: 500})); + return gulp.src(['build/test/**/*.js', '!build/test/**/e2e*.js']).pipe(mocha({timeout: 1000})); }); gulp.task('test.e2e', ['test.compile'], function(done) { @@ -81,7 +81,7 @@ gulp.task('test.e2e', ['test.compile'], function(done) { done(); return; } - return gulp.src(['build/test/**/e2e*.js']).pipe(mocha({timeout: 5000})); + return gulp.src(['build/test/**/e2e*.js']).pipe(mocha({timeout: 10000})); }); gulp.task('test', ['test.unit', 'test.e2e', 'test.check-format']);
chore: increase test timeouts for Travis. ... which apparently runs on rather slow machines.
angular_tsickle
train
js
a9ae54ff78588c4e06726910d6f697b8da355723
diff --git a/vendor/VisualAcceptance.js b/vendor/VisualAcceptance.js index <HASH>..<HASH> 100644 --- a/vendor/VisualAcceptance.js +++ b/vendor/VisualAcceptance.js @@ -20,8 +20,8 @@ function experimentalSvgCapture () { var items = Array.from(document.querySelectorAll('svg')) var promises = items.map(function (svg) { return new Promise(resolve => { - var clientWidth = svg.clientWidth || svg.parentNode.clientWidth - var clientHeight = svg.clientHeight || svg.parentNode.clientHeight + var clientWidth = $(svg).width() || $(svg.parentNode).width() + var clientHeight = $(svg).height() || $(svg.parentNode).height() svg.setAttribute('width', clientWidth) svg.setAttribute('height', clientWidth) var myCanvas = document.createElement('canvas')
Remove padding from canvas for experimental svgs
ciena-blueplanet_ember-cli-visual-acceptance
train
js