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 |
|---|---|---|---|---|---|
c77281fe2521cdf0f09d2e88955ddd1a3f2d516a | diff --git a/Classes/Core/Functional/FunctionalTestCase.php b/Classes/Core/Functional/FunctionalTestCase.php
index <HASH>..<HASH> 100644
--- a/Classes/Core/Functional/FunctionalTestCase.php
+++ b/Classes/Core/Functional/FunctionalTestCase.php
@@ -987,11 +987,21 @@ abstract class FunctionalTestCase extends BaseTestCase
$uriString = (string)$uri;
$uri = new Uri($uriString);
+ // build minimal serverParams for normalizedparamsAttribute initialzation
+ $serverParams = [
+ 'SCRIPT_NAME' => $_SERVER['SCRIPT_NAME'],
+ 'HTTP_HOST' => $_SERVER['HTTP_HOST'],
+ 'SERVER_NAME' => $_SERVER['SERVER_NAME'],
+ 'HTTPS' => $uri->getScheme() === 'https' ? 'on' : 'off',
+ 'REMOTE_ADDR' => '127.0.0.1',
+ ];
+
$serverRequest = new ServerRequest(
$uri,
$request->getMethod(),
'php://input',
- $request->getHeaders()
+ $request->getHeaders(),
+ $serverParams
);
$requestUrlParts = [];
parse_str($uri->getQuery(), $requestUrlParts); | [BUGFIX] Provide minimal serverParams for Frontend functional subrequest (#<I>)
Provide minimal serverParams array for core <I> compatible frontend
subrequest, so the normalized param attributes are set through
corresponding frontend middleware, which is needed for some
functional tests, ex. PageTypeSuffixDecorator tests. | TYPO3_testing-framework | train | php |
d1d53a583e18c39d4b8e22a30e780830892f8181 | diff --git a/js/core/I18n.js b/js/core/I18n.js
index <HASH>..<HASH> 100644
--- a/js/core/I18n.js
+++ b/js/core/I18n.js
@@ -1,7 +1,7 @@
define(["require", "js/core/Component", "underscore"], function (require, Component, _) {
return Component.inherit("js.core.I18n", {
defaults: {
- path: 'app/locale',
+ path: 'ivo/locale',
locale: null,
suffix: '.json',
translations: {}
@@ -26,9 +26,6 @@ define(["require", "js/core/Component", "underscore"], function (require, Compon
}
var self = this;
-// if(callback){
-// callback();
-// }
require(['json!' + this.$.path + '/' + this.$.locale], function (translations) {
self.set({
translations: translations
@@ -46,7 +43,7 @@ define(["require", "js/core/Component", "underscore"], function (require, Compon
* @param - replacement for %0
* @param - replacement for %1 ...
*/
- translate: function () {
+ t: function () {
var args = Array.prototype.slice.call(arguments);
var key = args.shift(), isPlural; | renamed translate to t | rappid_rAppid.js | train | js |
98dbb59c4ec2540218c8f41be0630a570f2c0c27 | diff --git a/provision/docker/docker.go b/provision/docker/docker.go
index <HASH>..<HASH> 100644
--- a/provision/docker/docker.go
+++ b/provision/docker/docker.go
@@ -93,8 +93,8 @@ func dockerCluster() *cluster.Cluster {
nodes = getDockerServers()
dCluster, _ = cluster.New(nil, clusterStorage, nodes...)
}
- autoHealing, _ := config.GetBool("docker:healing:heal-nodes")
- if autoHealing {
+ autoHealingNodes, _ := config.GetBool("docker:healing:heal-nodes")
+ if autoHealingNodes {
disabledSeconds, _ := config.GetDuration("docker:healing:disabled-time")
if disabledSeconds <= 0 {
disabledSeconds = 30
@@ -115,6 +115,10 @@ func dockerCluster() *cluster.Cluster {
}
dCluster.SetHealer(&healer)
}
+ healNodesTimeout, _ := config.GetDuration("docker:healing:heal-containers-timeout")
+ if healNodesTimeout > 0 {
+ go runContainerHealer(healNodesTimeout)
+ }
activeMonitoring, _ := config.GetDuration("docker:healing:active-monitoring-interval")
if activeMonitoring > 0 {
dCluster.StartActiveMonitoring(activeMonitoring * time.Second) | provision/docker: activate containers healing if config is set | tsuru_tsuru | train | go |
e739557d45c8beb723ffbe61e248275ab9085719 | diff --git a/lib/backup/cli.rb b/lib/backup/cli.rb
index <HASH>..<HASH> 100644
--- a/lib/backup/cli.rb
+++ b/lib/backup/cli.rb
@@ -8,6 +8,10 @@ module Backup
# through a ruby method. This helps with test coverage and
# improves readability.
#
+ # It'll first remove all prefixing slashes ( / ) by using .gsub(/^\s+/, '')
+ # This allows for the EOS blocks to be indented without actually using any
+ # prefixing spaces. This cleans up the implementation code.
+ #
# Every time the Backup::CLI#run method is invoked, it'll invoke
# the Backup::CLI#raise_if_command_not_found method after running the
# requested command on the OS.
@@ -17,6 +21,7 @@ module Backup
# name (e.g. mongodump, pgdump, etc) from a command like "/usr/local/bin/mongodump <options>"
# and pass that in to the Backup::CLI#raise_if_command_not_found
def run(command)
+ command.gsub!(/^\s+/, '')
%x[#{command}]
raise_if_command_not_found!(
command.slice(0, command.index(/\s/)).split('/')[-1] | Added a feature to the CLI module that'll first trim each line of the provided (single, or multi-line command) by removing all prefixing whitespace. | backup_backup | train | rb |
ad01081a9fbe072500204026ee3dabb95c9dd80c | diff --git a/vendor/imports_test.go b/vendor/imports_test.go
index <HASH>..<HASH> 100644
--- a/vendor/imports_test.go
+++ b/vendor/imports_test.go
@@ -135,9 +135,10 @@ func TestParseMetadata(t *testing.T) {
importpath: "gopkg.in/mgo.v2",
vcs: "git",
reporoot: "https://gopkg.in/mgo.v2",
- }, {
- path: "speter.net/go/exp",
- err: fmt.Errorf("go-import metadata not found"),
+// disabled: certificate has expired
+// }, {
+// path: "speter.net/go/exp",
+// err: fmt.Errorf("go-import metadata not found"),
}}
for _, tt := range tests { | fix failing test due to cert timeout | constabulary_gb | train | go |
e3ddfb42a9b80c866f3cd154db018f4e84a39745 | diff --git a/parseany.go b/parseany.go
index <HASH>..<HASH> 100644
--- a/parseany.go
+++ b/parseany.go
@@ -40,11 +40,17 @@ func ParseAny(datestr string) (time.Time, error) {
state := ST_START
+ // General strategy is to read rune by rune through the date looking for
+ // certain hints of what type of date we are dealing with.
+ // Hopefully we only need to read about 5 or 6 bytes before
+ // we figure it out and then attempt a parse
iterRunes:
for i := 0; i < len(datestr); i++ {
- r, _ := utf8.DecodeRuneInString(datestr[i:])
+ r, bytesConsumed := utf8.DecodeRuneInString(datestr[i:])
+ if bytesConsumed > 1 {
+ i += (bytesConsumed - 1)
+ }
- //u.Infof("r=%s st=%d ", string(r), state)
switch state {
case ST_START:
if unicode.IsDigit(r) { | doc some notes, and fix utf multi byte reads | araddon_dateparse | train | go |
5727ba694821a946c9d196e2ae6e581e58bf3a8a | diff --git a/parsl/dataflow/strategy.py b/parsl/dataflow/strategy.py
index <HASH>..<HASH> 100644
--- a/parsl/dataflow/strategy.py
+++ b/parsl/dataflow/strategy.py
@@ -189,8 +189,8 @@ class Strategy(object):
nodes_per_block = executor.provider.nodes_per_block
parallelism = executor.provider.parallelism
- running = sum([1 for x in status if x.state == JobState.RUNNING])
- pending = sum([1 for x in status if x.state == JobState.PENDING])
+ running = sum([1 for x in status.values() if x.state == JobState.RUNNING])
+ pending = sum([1 for x in status.values() if x.state == JobState.PENDING])
active_blocks = running + pending
active_slots = active_blocks * tasks_per_node * nodes_per_block | status is a Dict[Any, JobStatus] as opposed to a List[JobStatus], so we need .values() there. (#<I>) | Parsl_parsl | train | py |
0cd3ed0fb584f75b5af9754286e0939821b56abb | diff --git a/gglsbl/storage.py b/gglsbl/storage.py
index <HASH>..<HASH> 100644
--- a/gglsbl/storage.py
+++ b/gglsbl/storage.py
@@ -89,7 +89,7 @@ class SqliteStorage(StorageBase):
list_name character varying(127) NOT NULL,
downloaded_at timestamp DEFAULT current_timestamp,
expires_at timestamp without time zone NOT NULL,
- PRIMARY KEY (value)
+ PRIMARY KEY (value, list_name)
)"""
) | Adds list_name to primary key
Fixes issue with URLs on multiple lists | afilipovich_gglsbl | train | py |
5afa088f52f15bae960d72d97fc597cabeabde8b | diff --git a/volapi/volapi.py b/volapi/volapi.py
index <HASH>..<HASH> 100644
--- a/volapi/volapi.py
+++ b/volapi/volapi.py
@@ -538,7 +538,10 @@ class Room:
# pylint: disable=too-many-branches
# pylint: disable=too-many-statements
for item in data[1:]:
- data_type = item[0][1][0]
+ try:
+ data_type = item[0][1][0]
+ except IndexError:
+ data_type = None
try:
data = item[0][1][1]
except ValueError: | ¯\_(ツ)_/¯ | volafiled_python-volapi | train | py |
30e4b8706d78e8d1c02706b01b751c3a9c960290 | diff --git a/lib/common/errors.js b/lib/common/errors.js
index <HASH>..<HASH> 100644
--- a/lib/common/errors.js
+++ b/lib/common/errors.js
@@ -10,4 +10,5 @@ exports.MethodError = responseClass.MethodError
exports.NotAcceptableError = responseClass.NotAcceptableError
exports.ConflictError = responseClass.ConflictError
exports.UnsupportedError = responseClass.UnsupportedError
+exports.UnprocessableError = responseClass.UnprocessableError
exports.nativeErrors = responseClass.nativeErrors
diff --git a/lib/common/response_classes.js b/lib/common/response_classes.js
index <HASH>..<HASH> 100644
--- a/lib/common/response_classes.js
+++ b/lib/common/response_classes.js
@@ -19,6 +19,7 @@ exports.MethodError = errorClass('MethodError')
exports.NotAcceptableError = errorClass('NotAcceptableError')
exports.ConflictError = errorClass('ConflictError')
exports.UnsupportedError = errorClass('UnsupportedError')
+exports.UnprocessableError = errorClass('UnprocessableError')
// White-list native error types. The list is gathered from here: | adds UnprocessableError class to allow for correct <I> errors inline with JsonApi Spec as used by Ember Js. [Documentation](<URL>) | fortunejs_fortune | train | js,js |
741cc75733308fe694331defbccaa94e84635d4d | diff --git a/richtextfx/src/main/java/org/fxmisc/richtext/skin/ParagraphText.java b/richtextfx/src/main/java/org/fxmisc/richtext/skin/ParagraphText.java
index <HASH>..<HASH> 100644
--- a/richtextfx/src/main/java/org/fxmisc/richtext/skin/ParagraphText.java
+++ b/richtextfx/src/main/java/org/fxmisc/richtext/skin/ParagraphText.java
@@ -144,10 +144,18 @@ class ParagraphText<S> extends TextFlow {
}
Optional<HitInfo> hit(double x, double y) {
- HitInfo hit = textLayout().getHitInfo((float)x, (float)y);
-
- if(hit.getCharIndex() == paragraph.length()) { // clicked beyond the end of line
- return Optional.empty();
+ TextLayout textLayout = textLayout();
+ HitInfo hit = textLayout.getHitInfo((float)x, (float)y);
+
+ if(hit.getCharIndex() == paragraph.length() - 1) {
+ // might be a hit beyond the end of line, investigate
+ PathElement[] elems = textLayout.getCaretShape(paragraph.length(), true, 0, 0);
+ Path caret = new Path(elems);
+ if(x > caret.getBoundsInLocal().getMinX()) {
+ return Optional.empty();
+ } else {
+ return Optional.of(hit);
+ }
} else {
return Optional.of(hit);
} | Correctly detect hit beyond the end of paragraph's text. | FXMisc_RichTextFX | train | java |
b09ed75b09075d86c184b0a63cce9260f2cee4ca | diff --git a/sos/report/plugins/processor.py b/sos/report/plugins/processor.py
index <HASH>..<HASH> 100644
--- a/sos/report/plugins/processor.py
+++ b/sos/report/plugins/processor.py
@@ -7,6 +7,7 @@
# See the LICENSE file in the source distribution for further information.
from sos.report.plugins import Plugin, IndependentPlugin
+import os
class Processor(Plugin, IndependentPlugin):
@@ -34,7 +35,13 @@ class Processor(Plugin, IndependentPlugin):
self.add_copy_spec([
"/proc/cpuinfo",
"/sys/class/cpuid",
- "/sys/devices/system/cpu"
+ ])
+ # copy /sys/devices/system/cpu/cpuX with separately applied sizelimit
+ # this is required for systems with tens/hundreds of CPUs where the
+ # cumulative directory size exceeds 25MB or even 100MB.
+ cdirs = self.listdir('/sys/devices/system/cpu')
+ self.add_copy_spec([
+ os.path.join('/sys/devices/system/cpu', cdir) for cdir in cdirs
])
self.add_cmd_output([ | [processor] Apply sizelimit to /sys/devices/system/cpu/cpuX
Copy /sys/devices/system/cpu/cpuX with separately applied sizelimit.
This is required for systems with tens/hundreds of CPUs where the
cumulative directory size exceeds <I>MB or even <I>MB.
Resolves: #<I>
Closes: #<I> | sosreport_sos | train | py |
298f7d65ba29a0524ff2a3f8eb4b564ed91ad057 | diff --git a/rightscale/util.py b/rightscale/util.py
index <HASH>..<HASH> 100644
--- a/rightscale/util.py
+++ b/rightscale/util.py
@@ -57,9 +57,15 @@ def find_href(obj, rel):
return l['href']
-def find_by_name(res, name):
+def find_by_name(collection, name):
+ """
+ :param rightscale.ResourceCollection collection: The collection in which to
+ look for :attr:`name`.
+
+ :param str name: The name to look for in collection.
+ """
params = {'filter[]': ['name==%s' % name]}
- found = res.index(params=params)
+ found = collection.index(params=params)
if len(found) > 1:
raise ValueError("Found too many matches for %s" % name)
return found[0] | Document find_by_name so I remember what to do with it. | brantai_python-rightscale | train | py |
42d084327d6920fd73f8e9308f359ee0bce6e44b | diff --git a/config/misc.php b/config/misc.php
index <HASH>..<HASH> 100644
--- a/config/misc.php
+++ b/config/misc.php
@@ -10,6 +10,6 @@
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*/
-define('CMS_CORE_VERSION', '1.2.0');
+define('CMS_CORE_VERSION', '1.3.0');
?>
\ No newline at end of file | This is becoming <I>. | bseries_cms_core | train | php |
865651eee588e4337bfd176e606be117619ccdc5 | diff --git a/src/sos/_version.py b/src/sos/_version.py
index <HASH>..<HASH> 100644
--- a/src/sos/_version.py
+++ b/src/sos/_version.py
@@ -34,7 +34,7 @@ if _py_ver.major == 2 or (_py_ver.major == 3 and (_py_ver.minor, _py_ver.micro)
# version of the SoS language
__sos_version__ = '1.0'
# version of the sos command
-__version__ = '0.9.12.2'
+__version__ = '0.9.12.3'
__py_version__ = '{}.{}.{}'.format(_py_ver.major, _py_ver.minor, _py_ver.micro)
# | Release <I> for lockfile related issues | vatlab_SoS | train | py |
f20a4a37200428917605b5d52aadff9b433d13b1 | diff --git a/test/modules/json/json-render.spec.js b/test/modules/json/json-render.spec.js
index <HASH>..<HASH> 100644
--- a/test/modules/json/json-render.spec.js
+++ b/test/modules/json/json-render.spec.js
@@ -5,6 +5,7 @@ import configuration from './json-configuration-for-deck';
import JSON_DATA from './data/deck-props.json';
test('JSONConverter#render', t => {
+ const {gl} = require('@deck.gl/test-utils');
const jsonConverter = new JSONConverter({configuration});
t.ok(jsonConverter, 'JSONConverter created');
@@ -14,6 +15,7 @@ test('JSONConverter#render', t => {
const jsonDeck = new Deck(
Object.assign(
{
+ gl,
onAfterRender: () => {
t.ok(jsonDeck, 'JSONConverter rendered');
jsonDeck.finalize(); | Tests: use polyfilled gl for JSONConverter tests (#<I>) | uber_deck.gl | train | js |
c3239a4c09f0e97b2a3e3348ce8a9c5c8c72cdd6 | diff --git a/lib/http.js b/lib/http.js
index <HASH>..<HASH> 100644
--- a/lib/http.js
+++ b/lib/http.js
@@ -1,3 +1,7 @@
+var util = require('util');
+var EventEmitter = require('events').EventEmitter;
+
+
var ServerResponse = function() {
var headSent = false;
var bodySent = false;
@@ -38,10 +42,14 @@ var ServerResponse = function() {
};
};
+util.inherits(ServerResponse, EventEmitter);
+
var ServerRequest = function(url) {
this.url = url;
};
+util.inherits(ServerRequest, EventEmitter);
+
// PUBLIC stuff
exports.ServerResponse = ServerResponse; | Make http.ServerResponse and http.ServerRequest event emitters
[changelog] | vojtajina_node-mocks | train | js |
3b0942df3b3fc390ccb94a7fe8be9e0144dd3409 | diff --git a/core/src/main/java/io/keen/client/java/KeenClient.java b/core/src/main/java/io/keen/client/java/KeenClient.java
index <HASH>..<HASH> 100644
--- a/core/src/main/java/io/keen/client/java/KeenClient.java
+++ b/core/src/main/java/io/keen/client/java/KeenClient.java
@@ -1378,8 +1378,10 @@ public class KeenClient {
String path = String.format(Locale.US, "%s/%s/projects/%s/events/%s", getBaseUrl(),
KeenConstants.API_VERSION, project.getProjectId(), rawPath);
return new URL(path);
- } catch (URISyntaxException | MalformedURLException e) {
- KeenLogging.log("Event you sent has invalid URL address", e);
+ } catch (URISyntaxException e) {
+ KeenLogging.log("Event collection name has invalid character to encode", e);
+ } catch (MalformedURLException e) {
+ KeenLogging.log("Url you create is malformed or there is not legal protocol in string you specified", e);
}
return null; | Refactor catch statement to work with android <I> | keenlabs_KeenClient-Java | train | java |
8085a98f642bc32f21230b378a81fa08edebd11b | diff --git a/packages/metascraper/src/get-data.js b/packages/metascraper/src/get-data.js
index <HASH>..<HASH> 100644
--- a/packages/metascraper/src/get-data.js
+++ b/packages/metascraper/src/get-data.js
@@ -11,13 +11,13 @@ const {
const xss = require('xss')
-const getValue = async ({ htmlDom, jsonLd, url, conditions, meta }) => {
+const getValue = async ({ htmlDom, url, conditions, meta }) => {
const lastIndex = conditions.length
let index = 0
let value
while (isEmpty(value) && index < lastIndex) {
- value = await conditions[index++]({ htmlDom, jsonLd, url, meta })
+ value = await conditions[index++]({ htmlDom, url, meta })
}
return value | refactor: removed unreferenced code | microlinkhq_metascraper | train | js |
a2ef950e08362fd623826255e48561c480cee354 | diff --git a/patroni/dcs/kubernetes.py b/patroni/dcs/kubernetes.py
index <HASH>..<HASH> 100644
--- a/patroni/dcs/kubernetes.py
+++ b/patroni/dcs/kubernetes.py
@@ -950,7 +950,8 @@ class Kubernetes(AbstractDCS):
if not self._api.create_namespaced_service(self._namespace, body):
return
except Exception as e:
- if not isinstance(e, k8s_client.rest.ApiException) or e.status != 409: # Service already exists
+ if not isinstance(e, k8s_client.rest.ApiException) or e.status != 409 or e.status != 403:
+ # Service already exists
return logger.exception('create_config_service failed')
self._should_create_config_service = False | Ignore <I>s when trying to create Kubernetes Service (#<I>)
Close #<I> | zalando_patroni | train | py |
608a5a14b53d569b82b0d28d0d9178ed59b283fb | diff --git a/pilight/pilight.py b/pilight/pilight.py
index <HASH>..<HASH> 100644
--- a/pilight/pilight.py
+++ b/pilight/pilight.py
@@ -114,19 +114,17 @@ class Client(threading.Thread):
# f you want to close the connection in a timely fashion,
# call shutdown() before close().
with self._lock: # Receive thread might use the socket
- self._receive_socket.shutdown()
- self._receive_socket.close()
+ self.receive_socket.shutdown(socket.SHUT_RDWR)
+ self.receive_socket.close()
- self._send_socket.shutdown()
- self._send_socket.close()
+ self.send_socket.shutdown(socket.SHUT_RDWR)
+ self.send_socket.close()
def run(self): # Thread for receiving data from pilight
"""Receiver thread function called on Client.start()."""
logging.debug('Pilight receiver thread started')
if not self.callback:
- logging.warning(
- 'No callback function set, stopping readout thread')
- return
+ raise RuntimeError('No callback function set, cancel readout thread')
def handle_messages(messages):
"""Call callback on each receive message.""" | BUG: fix socket close
ENH: throw exception and no error logging | DavidLP_pilight | train | py |
616b2496710fc9227a5cd0f65c05f5ff051f5bf7 | diff --git a/src/jquery.contextMenu.js b/src/jquery.contextMenu.js
index <HASH>..<HASH> 100755
--- a/src/jquery.contextMenu.js
+++ b/src/jquery.contextMenu.js
@@ -800,7 +800,9 @@
// make sure only one item is selected
(opt.$menu ? opt : root).$menu
- .children('.hover').trigger('contextmenu:blur');
+ .children(root.classNames.hover).trigger('contextmenu:blur');
+ // Also check this for all siblings of the LI
+ $this.siblings().trigger('contextmenu:blur');
if ($this.hasClass(root.classNames.disabled) || $this.hasClass(root.classNames.notSelectable)) {
opt.$selected = null; | Double check for siblings with hover state. Fixes #<I> | swisnl_jQuery-contextMenu | train | js |
22993ac9d03703c071986278bdd3cff77b54f1d5 | diff --git a/server.js b/server.js
index <HASH>..<HASH> 100644
--- a/server.js
+++ b/server.js
@@ -9,7 +9,7 @@ const errorHandler = require('errorhandler')
const serveStatic = require('serve-static')
const config = require('./config')
-var app = express()
+const app = express()
app.use(morgan('dev'))
app.use(errorHandler())
@@ -19,11 +19,11 @@ app.use(serveStatic(path.join(__dirname, 'fonts')))
app.use(serveStatic(path.join(__dirname, 'node_modules')))
if (app.get('env') === 'development') {
- var webpack = require('webpack')
- var webpackDevMiddleware = require('webpack-dev-middleware')
- var webpackHotMiddleware = require('webpack-hot-middleware')
- var webpackConfig = require('./webpack.config')
- var compiler = webpack(webpackConfig)
+ const webpack = require('webpack')
+ const webpackDevMiddleware = require('webpack-dev-middleware')
+ const webpackHotMiddleware = require('webpack-hot-middleware')
+ const webpackConfig = require('./webpack.config')
+ const compiler = webpack(webpackConfig)
app.use(webpackDevMiddleware(compiler, {
noInfo: true, | change var to const in server.js | jeffshaver_safe-app | train | js |
efcd8fa7cc70eb0eb3b89391c8a6509461557b33 | diff --git a/lib/absolutely.rb b/lib/absolutely.rb
index <HASH>..<HASH> 100644
--- a/lib/absolutely.rb
+++ b/lib/absolutely.rb
@@ -7,9 +7,9 @@ require_relative 'absolutely/version'
require_relative 'absolutely/uri'
module Absolutely
- class AbsolutelyError < StandardError; end
- class ArgumentError < AbsolutelyError; end
- class InvalidURIError < AbsolutelyError; end
+ class Error < StandardError; end
+ class ArgumentError < Error; end
+ class InvalidURIError < Error; end
# Convert a relative path to an absolute URI.
# | Rename AbsolutelyError to Error | jgarber623_absolutely | train | rb |
d52a8ddfa0e5f875728f333ff55c094b7f209487 | diff --git a/test/unit/PersonalApiTest.php b/test/unit/PersonalApiTest.php
index <HASH>..<HASH> 100644
--- a/test/unit/PersonalApiTest.php
+++ b/test/unit/PersonalApiTest.php
@@ -88,8 +88,33 @@ class PersonalApiTest extends TestCase
$personal->unlockAccount($this->newAccount, '123456', function ($err, $unlocked) {
if ($err !== null) {
- // infura banned us to use unlock account
- return $this->assertTrue($err->getCode() === 405);
+ return $this->fail($err->getMessage());
+ }
+ $this->assertTrue($unlocked);
+ });
+ }
+
+ /**
+ * testUnlockAccountWithDuration
+ *
+ * @return void
+ */
+ public function testUnlockAccountWithDuration()
+ {
+ $personal = $this->personal;
+
+ // create account
+ $personal->newAccount('123456', function ($err, $account) {
+ if ($err !== null) {
+ return $this->fail($e->getMessage());
+ }
+ $this->newAccount = $account;
+ $this->assertTrue(is_string($account));
+ });
+
+ $personal->unlockAccount($this->newAccount, '123456', 100, function ($err, $unlocked) {
+ if ($err !== null) {
+ return $this->fail($err->getMessage());
}
$this->assertTrue($unlocked);
}); | Add test for unlockAccount with duration. | sc0Vu_web3.php | train | php |
cea17ca222d27a038f4cb1e69330ba5cd282ca94 | diff --git a/core/gekkoStream.js b/core/gekkoStream.js
index <HASH>..<HASH> 100644
--- a/core/gekkoStream.js
+++ b/core/gekkoStream.js
@@ -18,8 +18,8 @@ var Gekko = function(plugins) {
.filter(plugin => plugin.processCandle);
Writable.call(this, {objectMode: true});
- this.defferedProducers = this.plugins
- .filter(p => p.broadcastDeferredEmit);
+ this.producers = this.plugins
+ .filter(p => p.meta.emits);
this.finalize = _.bind(this.finalize, this);
}
@@ -39,7 +39,7 @@ if(config.debug) {
const timer = setTimeout(() => {
if(!relayed)
log.error([
- `The plugin "${at}" has not processed a candle for 0.5 seconds.`,
+ `The plugin "${at}" has not processed a candle for 1 second.`,
`This will cause Gekko to slow down or stop working completely.`
].join(' '));
}, 1000);
@@ -70,7 +70,7 @@ if(config.debug) {
Gekko.prototype.flushDefferedEvents = function() {
const broadcasted = _.find(
- this.defferedProducers,
+ this.producers,
producer => producer.broadcastDeferredEmit()
); | only flush events from plugins that actually emit | askmike_gekko | train | js |
bbae489f4abf70584c01516b89911090716ef93e | diff --git a/index.js b/index.js
index <HASH>..<HASH> 100644
--- a/index.js
+++ b/index.js
@@ -435,7 +435,7 @@ function vuCoin(host, port, authenticated, withSignature, intialized){
var clearTextMessage = openpgp.cleartext.readArmored(clearSigned);
var sigRes = openpgp.verifyClearSignedMessage(pubkeys, clearTextMessage);
if (sigRes.signatures && sigRes.signatures.length > 0) {
- verified = sigRes.signatures[0].valid && sigRes.text == content;
+ verified = sigRes.signatures[0].valid;
}
}
catch(ex){
@@ -445,7 +445,9 @@ function vuCoin(host, port, authenticated, withSignature, intialized){
if(verified){
errorCode(res, content, sigMessage, done);
}
- else done("Signature verification failed");
+ else{
+ done("Signature verification failed for URL " + res.request.href);
+ }
}
}
else done("Non signed content."); | Fix: there were still good signatures considered as false | duniter_ucoin-cli | train | js |
44a90609ff88386a65c4eac99f19d091fc5a33cb | diff --git a/nfc/tag/tt3.py b/nfc/tag/tt3.py
index <HASH>..<HASH> 100644
--- a/nfc/tag/tt3.py
+++ b/nfc/tag/tt3.py
@@ -182,7 +182,7 @@ class Type3Tag(object):
self.pmm = target.pmm
self.sys = target.sys
- if self.sys != "\x12\xFC":
+ if self.sys != "\x12\xFC" and self.pmm[0:2] != "\x01\xE0":
idm, pmm = self.poll(0x12FC)
if idm is not None and pmm is not None:
self.sys = bytearray([0x12, 0xFC]) | don't check for <I>FC sytem code when a FeliCa Plug is found - some implementations get confused | nfcpy_nfcpy | train | py |
89878994d618191bba6dafa8e00434819b55db5a | diff --git a/nabu/sdk/builders/nabu/CNabuPHPClassTableBuilder.php b/nabu/sdk/builders/nabu/CNabuPHPClassTableBuilder.php
index <HASH>..<HASH> 100644
--- a/nabu/sdk/builders/nabu/CNabuPHPClassTableBuilder.php
+++ b/nabu/sdk/builders/nabu/CNabuPHPClassTableBuilder.php
@@ -824,7 +824,7 @@ class CNabuPHPClassTableBuilder extends CNabuPHPClassTableAbstractBuilder
$this->addFragment($fragment);
$is_enclosed = $this->is_customer_foreign || $this->is_site_foreign || $this->is_medioteca_foreign ||
- $this->is_commerce_foreign || $this->is_catalog_foreign
+ $this->is_commerce_foreign || $this->is_catalog_foreign || $this->is_messaging_foreign
;
if ($this->is_customer_foreign) { | Add support for self generated Messaging classes | nabu-3_sdk | train | php |
62c6ef9b8bac00ef14cdd69647ad6b197a4b2951 | diff --git a/lib/rabl/partials.rb b/lib/rabl/partials.rb
index <HASH>..<HASH> 100644
--- a/lib/rabl/partials.rb
+++ b/lib/rabl/partials.rb
@@ -7,6 +7,7 @@ module Rabl
# options must have :object
# options can have :view_path, :child_root, :root
def partial(file, options={}, &block)
+ raise ArgumentError, "Must provide an :object option to render a partial" unless options[:object]
object, view_path = options.delete(:object), options.delete(:view_path)
source, location = self.fetch_source(file, :view_path => view_path)
engine_options = options.merge(:source => source, :source_location => location) | [partials] Raise an error when no object is passed to partial | nesquena_rabl | train | rb |
4dbb24dcd45e54cc68590a88eb493821f941843e | diff --git a/src/Commands/InstallerCommand.php b/src/Commands/InstallerCommand.php
index <HASH>..<HASH> 100644
--- a/src/Commands/InstallerCommand.php
+++ b/src/Commands/InstallerCommand.php
@@ -67,8 +67,6 @@ class InstallerCommand extends Command
/**
* Create a new command instance.
- *
- * @return void
*/
public function __construct()
{
diff --git a/src/Commands/SetupCommand.php b/src/Commands/SetupCommand.php
index <HASH>..<HASH> 100644
--- a/src/Commands/SetupCommand.php
+++ b/src/Commands/SetupCommand.php
@@ -36,8 +36,6 @@ class SetupCommand extends InstallerCommand
/**
* Create a new command instance.
- *
- * @return void
*/
public function __construct()
{ | Removed _constructor @return void from commands. | laraflock_dashboard | train | php,php |
e4d04b32a78c9c4496dd559c0d3da7cc9186c76f | diff --git a/indra/databases/context_client.py b/indra/databases/context_client.py
index <HASH>..<HASH> 100644
--- a/indra/databases/context_client.py
+++ b/indra/databases/context_client.py
@@ -1,6 +1,7 @@
from __future__ import absolute_import, print_function, unicode_literals
from builtins import dict, str
from indra.databases import ndex_client
+from indra.databases import cbio_client
# Python 2
try:
basestring
diff --git a/indra/sources/trips/processor.py b/indra/sources/trips/processor.py
index <HASH>..<HASH> 100644
--- a/indra/sources/trips/processor.py
+++ b/indra/sources/trips/processor.py
@@ -1516,6 +1516,8 @@ def _get_db_refs(term):
top_idx = 0
for i, entry in enumerate(entries):
if entry['priority'] < top_entry['priority']:
+ if 'NCIT' in entry['refs'] and 'HGNC' in entry['refs']:
+ continue
top_entry = entry
top_idx = i
for i, entry in enumerate(entries): | Add corner case for grounding prioritization | sorgerlab_indra | train | py,py |
107d13ada9ff6128e09a032ef9e3facde4964cde | diff --git a/test/macaroon-identity/auth.go b/test/macaroon-identity/auth.go
index <HASH>..<HASH> 100644
--- a/test/macaroon-identity/auth.go
+++ b/test/macaroon-identity/auth.go
@@ -66,8 +66,7 @@ func (s *authService) thirdPartyChecker(ctx context.Context, req *http.Request,
return nil, err
}
- tokenString := string(token.Value)
- username, ok := s.userTokens[tokenString]
+ username, ok := s.userTokens[string(token.Value)]
if token.Kind != "form" || !ok {
return nil, fmt.Errorf("invalid token %#v", token)
} | test/macaroon-identity: Remove assignment to tokenString. | lxc_lxd | train | go |
c868d71b0ba122906f9041823ef2442578fa06b9 | diff --git a/ec2/spark_ec2.py b/ec2/spark_ec2.py
index <HASH>..<HASH> 100755
--- a/ec2/spark_ec2.py
+++ b/ec2/spark_ec2.py
@@ -113,6 +113,16 @@ def parse_args():
# Boto config check
# http://boto.cloudhackers.com/en/latest/boto_config_tut.html
home_dir = os.getenv('HOME')
+ if home_dir == None or not os.path.isfile(home_dir + '/.boto'):
+ if not os.path.isfile('/etc/boto.cfg'):
+ if os.getenv('AWS_ACCESS_KEY_ID') == None:
+ print >> stderr, ("ERROR: The environment variable AWS_ACCESS_KEY_ID " +
+ "must be set")
+ sys.exit(1)
+ if os.getenv('AWS_SECRET_ACCESS_KEY') == None:
+ print >> stderr, ("ERROR: The environment variable AWS_SECRET_ACCESS_KEY " +
+ "must be set")
+ sys.exit(1)
return (opts, action, cluster_name) | old version of spark_ec2 | apache_spark | train | py |
5b06db84f7e680bd662261762754f08bcf2728d6 | diff --git a/home/collect/handlers.py b/home/collect/handlers.py
index <HASH>..<HASH> 100644
--- a/home/collect/handlers.py
+++ b/home/collect/handlers.py
@@ -85,7 +85,8 @@ class LoggingHandler(BaseHandler):
def __call__(self, packet):
self.log.warning(
- "Ignoring packet: {0} ({1})".format(packet, self.format_packet(packet.raw)))
+ "Ignoring packet: {0} ({1})".format(
+ packet, self.format_packet(packet.raw)))
class RecordingHandler(BaseHandler):
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -47,7 +47,7 @@ setup(
'psycopg2>=2.5.2',
'python-dateutil>=2.2',
'redis>=2.9.1',
- 'rfxcom>=0.2.1',
+ 'rfxcom>=0.2.2',
'simplejson>=3.3.3',
'SQLAlchemy>=0.9.4',
'uwsgi>=2.0', | Bump rfxcom. | d0ugal_home | train | py,py |
d5f03382253cb901de9758282baa354f76976e2b | diff --git a/robots/models.py b/robots/models.py
index <HASH>..<HASH> 100644
--- a/robots/models.py
+++ b/robots/models.py
@@ -2,7 +2,7 @@ from django.db import models
from django.contrib.sites.models import Site
from django.utils.translation import ugettext_lazy as _
from django.utils.text import get_text_list
-
+from six import u
class Url(models.Model):
"""
@@ -22,7 +22,7 @@ class Url(models.Model):
verbose_name_plural = _('url')
def __unicode__(self):
- return u"%s" % self.pattern
+ return u("%s") % self.pattern
def save(self, *args, **kwargs):
if not self.pattern.startswith('/'):
@@ -80,7 +80,7 @@ class Rule(models.Model):
verbose_name_plural = _('rules')
def __unicode__(self):
- return u"%s" % self.robot
+ return u("%s") % self.robot
def allowed_urls(self):
return get_text_list(list(self.allowed.all()), _('and')) | Replaced string literal `u` prefixes with calls to `six.u()` for compatibility with python <I> | jazzband_django-robots | train | py |
da7536da380fc4371f42fded8bc27fa43359d060 | diff --git a/test/tetest.js b/test/tetest.js
index <HASH>..<HASH> 100644
--- a/test/tetest.js
+++ b/test/tetest.js
@@ -86,5 +86,12 @@ test("print", function() {
equal(transform(r), "Test");
});
+test("singleLineEventSlashEscape", function() {
+ var r = e.eval("\\\n%print(1+1)");
+ equal(r, "\n%print(1+1)");
+ var r = e.eval("\\\\\n%print(1+1)");
+ equal(r, "\\2");
+});
+
}); | Added test about slash escaping of % | nicolas-van_ring.js | train | js |
df81ea182b8d759a80cff146cd3982753e17553c | diff --git a/modules/cms/assets/js/october.cmspage.js b/modules/cms/assets/js/october.cmspage.js
index <HASH>..<HASH> 100644
--- a/modules/cms/assets/js/october.cmspage.js
+++ b/modules/cms/assets/js/october.cmspage.js
@@ -102,7 +102,6 @@
}).always(function() {
$.oc.stripeLoadIndicator.hide()
}).fail(function(jqXHR, textStatus, errorThrown) {
- alert(jqXHR.responseText.length ? jqXHR.responseText : jqXHR.statusText)
$.oc.stripeLoadIndicator.hide()
}) | Remove alert to prevent showing same popup twice (#<I>)
Credit to @Samuell1 | octobercms_october | train | js |
07618f93d902e7c8d7baa0854556dc262d04c477 | diff --git a/php/wp-settings-cli.php b/php/wp-settings-cli.php
index <HASH>..<HASH> 100644
--- a/php/wp-settings-cli.php
+++ b/php/wp-settings-cli.php
@@ -80,11 +80,14 @@ if ( defined( 'WP_INSTALLING' ) && is_multisite() ) {
require_wp_db();
// WP-CLI: Handle db error ourselves, instead of waiting for dead_db()
+global $wpdb;
if ( !empty( $wpdb->error ) )
wp_die( $wpdb->error );
// Set the database table prefix and the format specifiers for database table columns.
+// @codingStandardsIgnoreStart
$GLOBALS['table_prefix'] = $table_prefix;
+// @codingStandardsIgnoreEnd
wp_set_wpdb_vars();
// Start the WordPress object cache, or an external object cache if the drop-in is present.
@@ -298,6 +301,7 @@ require_once( ABSPATH . WPINC . '/locale.php' );
$GLOBALS['wp_locale'] = new WP_Locale();
// Load the functions for the active theme, for both parent and child theme if applicable.
+global $pagenow;
if ( ! defined( 'WP_INSTALLING' ) || 'wp-activate.php' === $pagenow ) {
if ( TEMPLATEPATH !== STYLESHEETPATH && file_exists( STYLESHEETPATH . '/functions.php' ) )
include( STYLESHEETPATH . '/functions.php' ); | fix undefined variable warnings in wp-settings-cli.php | wp-cli_export-command | train | php |
d6a033440849776e80b1a9778d0550a84825fa37 | diff --git a/gdxpy.py b/gdxpy.py
index <HASH>..<HASH> 100644
--- a/gdxpy.py
+++ b/gdxpy.py
@@ -253,8 +253,8 @@ class gdxsymb:
return ret
- def __call__(self,filt=None,idval=None,reset=False):
- return self.get_values(filt=filt,idval=idval,reset=reset)
+ def __call__(self,filt=None,idval=None,reset=False,reshape=RESHAPE_DEFAULT):
+ return self.get_values(filt=filt,idval=idval,reset=reset,reshape=reshape)
class gdxfile:
""" | add reshape to call routine | jackjackk_gdxpy | train | py |
7e3ce5c865c8ea6912a3baecd465f9c78114cb84 | diff --git a/test/publish.js b/test/publish.js
index <HASH>..<HASH> 100644
--- a/test/publish.js
+++ b/test/publish.js
@@ -21,7 +21,6 @@ part('Checking configuration', function () {
process.exit();
}
- return false;
var missingEnv = ['NPM_USERNAME', 'NPM_PASSWORD', 'NPM_EMAIL', 'GH_TOKEN'].filter(function (name) { return !(name in env) });
if (missingEnv.length) {
@@ -29,7 +28,7 @@ part('Checking configuration', function () {
}
});
-if (false) part('Publishing to npm', function (npm) {
+part('Publishing to npm', function (npm) {
npm.load(function () {
console.log(npm.config);
npm.registry.adduser(env.NPM_USERNAME, env.NPM_PASSWORD, env.NPM_EMAIL, function (err) {
@@ -62,7 +61,7 @@ part('Publishing to GitHub', function (fs, rimraf) {
outSourceMap: scriptName + '.map'
});
- fs.writeFileSync('dist/' + scriptName, minified.code);
+ fs.writeFileSync('dist/' + scriptName, minified.code + ['#', '@'].map(function (c) { return '\n//# sourceMappingURL=' + scriptName + '.map' }));
fs.writeFileSync('dist/' + scriptName + '.map', minified.map);
}); | Re-enabled npm publisher, added source map comments to generated code. | jDataView_jDataView | train | js |
0863d4ddce9dfc4d89a5dac5710e023438efea8f | diff --git a/tests/Renderer/RenderDataCollectionTest.php b/tests/Renderer/RenderDataCollectionTest.php
index <HASH>..<HASH> 100644
--- a/tests/Renderer/RenderDataCollectionTest.php
+++ b/tests/Renderer/RenderDataCollectionTest.php
@@ -38,6 +38,14 @@ class RenderCollectionTest extends RenderTestBase {
$this->assertArrayHasKey('sys_pathNames', $collectedData);
}
+ public function testRenderMergesCollectorDataWithEnvironmentData()
+ {
+ $r = $this->getRenderer();
+ $r->addCollector(new DummyCollector());
+ $data = $r->getData();
+ $this->assertArrayHasKey('dummy', $data);
+ }
+
/**
* @expectedException ErrorException
*/ | Data collector data now merged with env data | newup_core | train | php |
99f889f479f83d5dca1ca6d35806058cee9571a1 | diff --git a/src/EditorconfigChecker/Cli/Cli.php b/src/EditorconfigChecker/Cli/Cli.php
index <HASH>..<HASH> 100644
--- a/src/EditorconfigChecker/Cli/Cli.php
+++ b/src/EditorconfigChecker/Cli/Cli.php
@@ -151,11 +151,12 @@ class Cli
$excludedPattern = [$options['e'], $options['exclude']];
}
}
-
- if (is_array($excludedPattern)) {
- $pattern = '/' . implode('|', $excludedPattern) . '/';
- } else {
- $pattern = '/' . $excludedPattern . '/';
+ if (isset($excludedPattern)) {
+ if (is_array($excludedPattern)) {
+ $pattern = '/' . implode('|', $excludedPattern) . '/';
+ } else {
+ $pattern = '/' . $excludedPattern . '/';
+ }
}
return $pattern; | BUGFIX: Fix behavior when no exclude is provided | editorconfig-checker_editorconfig-checker.php | train | php |
bfc986811c5cbcfcc856916a1b09fcbf6551ecf5 | diff --git a/activesupport/test/callbacks_test.rb b/activesupport/test/callbacks_test.rb
index <HASH>..<HASH> 100644
--- a/activesupport/test/callbacks_test.rb
+++ b/activesupport/test/callbacks_test.rb
@@ -149,6 +149,27 @@ module CallbacksTest
end
end
+ class AfterSaveConditionalPerson < Record
+ after_save Proc.new { |r| r.history << [:after_save, :string1] }
+ after_save Proc.new { |r| r.history << [:after_save, :string2] }
+ def save
+ run_callbacks :save
+ end
+ end
+
+ class AfterSaveConditionalPersonCallbackTest < Test::Unit::TestCase
+ def test_after_save_runs_in_the_reverse_order
+ person = AfterSaveConditionalPerson.new
+ person.save
+ assert_equal [
+ [:after_save, :string2],
+ [:after_save, :string1]
+ ], person.history
+ end
+ end
+
+
+
class ConditionalPerson < Record
# proc
before_save Proc.new { |r| r.history << [:before_save, :proc] }, :if => Proc.new { |r| true }
@@ -352,6 +373,8 @@ module CallbacksTest
end
end
+
+
class ResetCallbackTest < Test::Unit::TestCase
def test_save_conditional_person
person = CleanPerson.new | Test for after_create callback order in ActiveSupport [#<I> state:resolved] | rails_rails | train | rb |
ffe863c5439fba49fe078a307397482579990ce6 | diff --git a/src/Symfony/Component/Routing/Route.php b/src/Symfony/Component/Routing/Route.php
index <HASH>..<HASH> 100644
--- a/src/Symfony/Component/Routing/Route.php
+++ b/src/Symfony/Component/Routing/Route.php
@@ -64,7 +64,7 @@ class Route implements \Serializable
/**
* @var string
*/
- private $condition;
+ private $condition = '';
/**
* Constructor.
@@ -84,7 +84,7 @@ class Route implements \Serializable
*
* @api
*/
- public function __construct($path, array $defaults = array(), array $requirements = array(), array $options = array(), $host = '', $schemes = array(), $methods = array(), $condition = null)
+ public function __construct($path, array $defaults = array(), array $requirements = array(), array $options = array(), $host = '', $schemes = array(), $methods = array(), $condition = '')
{
$this->setPath($path);
$this->setDefaults($defaults); | [Routing] correctly initialize condition as string | symfony_symfony | train | php |
11a913651b9b7f535385441df6f68717efd0debc | diff --git a/worker.js b/worker.js
index <HASH>..<HASH> 100644
--- a/worker.js
+++ b/worker.js
@@ -48,9 +48,6 @@ module.exports = function(files, cb) {
amountOfErrors += json.data.errors.length;
}
- else {
- console.log(chalk.green('No issues found.'));
- }
cb();
});
@@ -60,9 +57,13 @@ module.exports = function(files, cb) {
return cb(err);
}
- if (amountOfErrors) {
+ console.log();
+ if (amountOfErrors > 0) {
console.log(chalk[COLORS.warning](amountOfErrors, 'issues found in total.'));
}
+ else {
+ console.log(chalk.green('No issues found.'));
+ }
return cb();
} | Fix: Show No issues found after all files, not after each file | sapegin_proselint | train | js |
342def5bfe9f9dfdc12c37c0fadb5aef58f85a82 | diff --git a/src/Symfony/Bundle/FrameworkBundle/Debug/TraceableEventDispatcher.php b/src/Symfony/Bundle/FrameworkBundle/Debug/TraceableEventDispatcher.php
index <HASH>..<HASH> 100644
--- a/src/Symfony/Bundle/FrameworkBundle/Debug/TraceableEventDispatcher.php
+++ b/src/Symfony/Bundle/FrameworkBundle/Debug/TraceableEventDispatcher.php
@@ -106,11 +106,7 @@ class TraceableEventDispatcher extends ContainerAwareEventDispatcher implements
$this->called[$eventName.'.'.$info['pretty']] = $info;
- $name = isset($info['class'])
- ? substr($info['class'], strrpos($info['class'], '\\') + 1)
- : 'Closure';
-
- $e2 = $this->stopwatch->start($name, 'event_listener');
+ $e2 = $this->stopwatch->start(isset($info['class']) ? substr($info['class'], strrpos($info['class'], '\\') + 1) : $info['type'], 'event_listener');
call_user_func($listener, $event); | [FrameworkBundle] make the code more generic | symfony_symfony | train | php |
fec555816acda680fa7b76e2d13fe5a6076c418f | diff --git a/lib/core/validation/validator.js b/lib/core/validation/validator.js
index <HASH>..<HASH> 100644
--- a/lib/core/validation/validator.js
+++ b/lib/core/validation/validator.js
@@ -92,7 +92,7 @@
var ruleConfig = rules[key];
if(!ruleConfig) {
- $log.error('Failed to get rules key [' + key + ']. Forms must be tagged with a rules set name for validation to work.');
+ $log.warn('Could not resolve the form rules key [' + key + ']. This can happen when the rules key is inside a promise and the key value has not resolved on page load.');
return;
}
diff --git a/lib/ui/validation/field.js b/lib/ui/validation/field.js
index <HASH>..<HASH> 100644
--- a/lib/ui/validation/field.js
+++ b/lib/ui/validation/field.js
@@ -81,8 +81,10 @@
// validate function is called within the context of angular so fn.call and set the context
// to "this"
- self.updateModel.call(self, results);
- self.updateView.call(self);
+ if(results) {
+ self.updateModel.call(self, results);
+ self.updateView.call(self);
+ }
return results;
}; | Fix invalid error messges on page load for form validation
Fix invalid error messges displaying in console when the form validation key has not resolved. This issue can happen when the form validation key is resolved inside a promise. Fixes #<I> | Availity_availity-angular | train | js,js |
ce6b5a9085d5998fdac300b6e1d3e2b10e193119 | diff --git a/Console/PruneCommand.php b/Console/PruneCommand.php
index <HASH>..<HASH> 100644
--- a/Console/PruneCommand.php
+++ b/Console/PruneCommand.php
@@ -87,7 +87,7 @@ class PruneCommand extends Command
return collect($models);
}
- return collect((new Finder)->in(app_path('Models'))->files())
+ return collect((new Finder)->in(app_path('Models'))->files()->name('*.php'))
->map(function ($model) {
$namespace = $this->laravel->getNamespace(); | Only look for files ending with .php in model:prune (#<I>) | illuminate_database | train | php |
a4bc9dc3622f614f801825703218c313036213a5 | diff --git a/context.go b/context.go
index <HASH>..<HASH> 100644
--- a/context.go
+++ b/context.go
@@ -491,4 +491,6 @@ func (dc *Context) Pop() {
dc.strokePath = before.strokePath
dc.fillPath = before.fillPath
dc.start = before.start
+ dc.current = before.current
+ dc.hasCurrent = before.hasCurrent
} | stack should not affect current, hasCurrent | fogleman_gg | train | go |
eed319646ab9b5c548e064f3b2ca320084b9a9cf | diff --git a/webapps/ui/cockpit/client/scripts/directives/time-to-live.js b/webapps/ui/cockpit/client/scripts/directives/time-to-live.js
index <HASH>..<HASH> 100644
--- a/webapps/ui/cockpit/client/scripts/directives/time-to-live.js
+++ b/webapps/ui/cockpit/client/scripts/directives/time-to-live.js
@@ -41,8 +41,14 @@ module.exports = ['camAPI', '$window' , 'Notifications', function(camAPI, $windo
};
function updateValue(timeToLive) {
+ var id = (
+ $scope.definition.id ||
+ $scope.definition.processDefinitionId ||
+ $scope.definition.caseDefinitionId ||
+ $scope.definition.decisionDefinitionId
+ );
return resource.updateHistoryTimeToLive(
- $scope.definition.id,
+ id,
{
historyTimeToLive: timeToLive
} | feat(time-to-live): update time-to-live to handle different keys for definitionId
Related to CAM-<I> | camunda_camunda-bpm-platform | train | js |
e721c821cfa9f7c15756fb7ee06b8be5aa970cbf | diff --git a/lib/feed2email/entry.rb b/lib/feed2email/entry.rb
index <HASH>..<HASH> 100644
--- a/lib/feed2email/entry.rb
+++ b/lib/feed2email/entry.rb
@@ -20,9 +20,7 @@ module Feed2Email
include Configurable
include Loggable
- attr_accessor :data
- attr_accessor :feed_data
- attr_accessor :feed_uri
+ attr_accessor :data, :feed_data, :feed_uri
def process
if missing_data? | Combine attr_accessor calls | agorf_feed2email | train | rb |
2b2a28880bc52068ba28740e320dc17baa762cb9 | diff --git a/go/service/gregor.go b/go/service/gregor.go
index <HASH>..<HASH> 100644
--- a/go/service/gregor.go
+++ b/go/service/gregor.go
@@ -738,6 +738,17 @@ func (g *gregorHandler) notifyFavoritesChanged(ctx context.Context, uid gregor.U
func (g *gregorHandler) auth(ctx context.Context, cli rpc.GenericClient) error {
var token string
var uid keybase1.UID
+
+ // Check to see if we have been shutdown,
+ select {
+ case <-g.shutdownCh:
+ g.Debug("server is dead, not authenticating")
+ return errors.New("server is dead, not authenticating")
+ default:
+ // if we were going to block, then that means we are still alive
+ }
+
+ // Continue on and authenticate
aerr := g.G().LoginState().LocalSession(func(s *libkb.Session) {
token = s.GetToken()
uid = s.GetUID() | make sure we arent dead before auth | keybase_client | train | go |
855498e5e94edcedb4a53fedb49f14979a918d3b | diff --git a/extension-impl/tracer-opentracing/src/main/java/com/alipay/sofa/rpc/tracer/sofatracer/RpcSofaTracer.java b/extension-impl/tracer-opentracing/src/main/java/com/alipay/sofa/rpc/tracer/sofatracer/RpcSofaTracer.java
index <HASH>..<HASH> 100644
--- a/extension-impl/tracer-opentracing/src/main/java/com/alipay/sofa/rpc/tracer/sofatracer/RpcSofaTracer.java
+++ b/extension-impl/tracer-opentracing/src/main/java/com/alipay/sofa/rpc/tracer/sofatracer/RpcSofaTracer.java
@@ -345,8 +345,9 @@ public class RpcSofaTracer extends Tracer {
throwableShow = new SofaRpcException(RpcErrorType.SERVER_UNDECLARED_ERROR, response.getErrorMsg());
} else {
Object ret = response.getAppResponse();
- if (ret instanceof Throwable) {
- throwableShow = (Throwable) ret;
+ //for server throw exception ,but this class can not be found in current
+ if (ret instanceof Throwable ||
+ "true".equals(response.getResponseProp(RemotingConstants.HEAD_RESPONSE_ERROR))) {
errorSourceApp = clientSpan.getTagsWithStr().get(RpcSpanTags.REMOTE_APP);
// 业务异常
resultCode = TracerResultCode.RPC_RESULT_BIZ_FAILED; | Fix tracer class not found exp. (#<I>)
* fix tracer class not found exp | alipay_sofa-rpc | train | java |
a545a53f6e1d03f9b016c8032c05a377a79bfbcc | diff --git a/workflow/cron/operator.go b/workflow/cron/operator.go
index <HASH>..<HASH> 100644
--- a/workflow/cron/operator.go
+++ b/workflow/cron/operator.go
@@ -136,7 +136,7 @@ func (woc *cronWfOperationCtx) persistUpdate() {
}
var reapplyErr error
_, reapplyErr = woc.reapplyUpdate()
- if err != nil {
+ if reapplyErr != nil {
woc.log.WithError(reapplyErr).WithField("original error", err).Error("failed to update CronWorkflow after reapply attempt")
return
} | fix(controller): Check the correct object for Cronworkflow reapply error log (#<I>) | argoproj_argo | train | go |
1fff1d2df9dca466f670ed64f2b35435924e0216 | diff --git a/lib/kudzu/adapter/base/page.rb b/lib/kudzu/adapter/base/page.rb
index <HASH>..<HASH> 100644
--- a/lib/kudzu/adapter/base/page.rb
+++ b/lib/kudzu/adapter/base/page.rb
@@ -4,7 +4,7 @@ module Kudzu
module Page
def last_modified
last_modified = response_header['last-modified']
- Time.parse(last_modified) if last_modified
+ Time.parse(last_modified).localtime if last_modified
rescue
nil
end | Convert last_modified to localtime | kanety_kudzu | train | rb |
d6effb5db6cf1bfc1fe76a31ff344c948850ef93 | diff --git a/lib/epub/ocf/physical_container.rb b/lib/epub/ocf/physical_container.rb
index <HASH>..<HASH> 100644
--- a/lib/epub/ocf/physical_container.rb
+++ b/lib/epub/ocf/physical_container.rb
@@ -7,7 +7,15 @@ module EPUB
class OCF
# @todo: Make thread save
class PhysicalContainer
- class NoEntry < StandardError; end
+ class NoEntry < StandardError
+ class << self
+ def from_error(error)
+ no_entry = new(error.message)
+ no_entry.set_backtrace error.backtrace
+ no_entry
+ end
+ end
+ end
@adapter = ArchiveZip | Define OCF::PhysicalContainer::NoEntry.from_error | KitaitiMakoto_epub-parser | train | rb |
270567eb54aec55dafcfb9cb3a50ee8d468a52e5 | diff --git a/src/TreeWalker.php b/src/TreeWalker.php
index <HASH>..<HASH> 100644
--- a/src/TreeWalker.php
+++ b/src/TreeWalker.php
@@ -249,7 +249,7 @@ class TreeWalker
foreach ($assocarray as $key => $value) {
if (array_key_exists($key, $assocarray)) {
- $path = $currentpath ? $currentpath . "/" . $key : $key;
+ $path = $currentpath !== '' ? $currentpath . "/" . $key : sprintf($key);
if (gettype($assocarray[$key]) == "array" && !empty($assocarray[$key])) {
$this->structPathArray($assocarray[$key], $array, $path); | 0 index Array
If the first object is an array, $path is build with a '0' (integer) index, that does not pass the first '$currentpath == ''' ternal.
Force type comparison (!==) and 'cast' 0 to string (sprintf($key)) | lukascivil_TreeWalker | train | php |
77375dee61e2382b149901eb5d9659b6d0f55d4a | diff --git a/assets/query-monitor.js b/assets/query-monitor.js
index <HASH>..<HASH> 100644
--- a/assets/query-monitor.js
+++ b/assets/query-monitor.js
@@ -167,6 +167,8 @@ jQuery( function($) {
}
}
+ $('#qm-panel-menu').find('a').on('click',link_click);
+
$('#qm').find('.qm-filter').on('change',function(e){
var filter = $(this).attr('data-filter'),
@@ -238,10 +240,7 @@ jQuery( function($) {
target = $(this).data('qm-target');
$('#qm-' + target).find('.qm-filter').not('[data-filter="' + filter + '"]').val('').removeClass('qm-highlight').change();
$('#qm-' + target).find('[data-filter="' + filter + '"]').val(value).addClass('qm-highlight').change();
- $('html, body').scrollTop( $(this).closest('.qm').offset().top );
- $('html, body').animate({
- scrollTop: $('#qm-' + target).offset().top
- }, 500);
+ $('#qm-panel-menu').find('a[href="#qm-' + target + '"]').click();
e.preventDefault();
}); | Handle links in the panel menu and filtering links. | johnbillion_query-monitor | train | js |
2fd70b1ce44d519b7f3f0b9bdac16b20a01c5d14 | diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -8,7 +8,7 @@ with open(path.join(this_directory, 'README.md'), encoding='utf-8') as f:
setup(
name='jupytext',
- version='0.6.5',
+ version='0.7.0',
author='Marc Wouts',
author_email='marc.wouts@gmail.com',
description='Jupyter notebooks as Markdown documents, ' | Version <I> (way before pre release) | mwouts_jupytext | train | py |
9cabd12f1df9f9528901770cbc1387cad012a79b | diff --git a/bhmm/init/gaussian.py b/bhmm/init/gaussian.py
index <HASH>..<HASH> 100644
--- a/bhmm/init/gaussian.py
+++ b/bhmm/init/gaussian.py
@@ -62,15 +62,7 @@ def initial_model_gaussian1d(observations, nstates, reversible=True, verbose=Fal
Nij = np.zeros([nstates, nstates], np.float64)
for o_t in observations:
# length of trajectory
- try:
- T = o_t.shape[0]
- except Exception as e:
- out = ""
- out += str(e) + '\n'
- out += str(o_t) + '\n'
- out += 'observations = \n'
- out += str(observations) + '\n'
- raise Exception(out)
+ T = o_t.shape[0]
# output probability
pobs = output_model.p_obs(o_t)
# normalize | Removed debug code from gaussian initialization. | bhmm_bhmm | train | py |
69a95060212a3489910e13e4440235548bcc29cc | diff --git a/lib/awspec/type/route_table.rb b/lib/awspec/type/route_table.rb
index <HASH>..<HASH> 100644
--- a/lib/awspec/type/route_table.rb
+++ b/lib/awspec/type/route_table.rb
@@ -35,6 +35,10 @@ module Awspec::Type
end
end
+ def route_count
+ resource_via_client.routes.count
+ end
+
private
def target_gateway?(route, gateway_id) | Added function to count routes in a route table.
Tested with `its (:route_count) { should eq <I> }` | k1LoW_awspec | train | rb |
60c54b5c8c94cb4d313fdc36f5b2db7621d5b7b2 | diff --git a/src/sap.m/src/sap/m/ListBase.js b/src/sap.m/src/sap/m/ListBase.js
index <HASH>..<HASH> 100644
--- a/src/sap.m/src/sap/m/ListBase.js
+++ b/src/sap.m/src/sap/m/ListBase.js
@@ -238,8 +238,8 @@ function(
*
* There are also some known limitations with respect to the scrolling behavior. A few are given below:
* <ul>
- * <li>If the control is placed in certain layout containers, for example, the <code>sap.ui.layout.Grid</code> control,
- * the sticky elements of the control are not fixed at the top of the viewport. The control behaves in a similar way when placed within the <code>sap.m.ObjectPage</code> control.</li>
+ * <li>If the control is placed in layout containers that have the <code>overflow: hidden</code> or <code>overflow: auto</code> style definition, this can
+ * prevent the sticky elements of the control from becoming fixed at the top of the viewport.</li>
* <li>If sticky column headers are enabled in the <code>sap.m.Table</code> control, setting focus on the column headers will let the table scroll to the top.</li>
* </ul>
* @since 1.58 | [INTERNAL] ListBase: sticky JSDoc update
As the documentation of the sticky property was obsolete in case of the
ObjectPage, the limitation with respected to the overflow style
definition is made generic.
Change-Id: I<I>fa<I>c<I>ce4ff3fc6c<I>d<I>da<I>c4c | SAP_openui5 | train | js |
f1f6be0b1cd1d2f4e96ab2e12febdb0176c92556 | diff --git a/test/mocha/retry.js b/test/mocha/retry.js
index <HASH>..<HASH> 100644
--- a/test/mocha/retry.js
+++ b/test/mocha/retry.js
@@ -297,9 +297,10 @@ describe('retry', function (){
});
-/*
+
describe('#retryMethod', function (){
+
});
-*/
+
});
\ No newline at end of file | Added retryMethod test to retry.js tests, <I>% coverage incoming. | opensoars_f_ | train | js |
c06f5905e393af07cd6c00df2f243681e46b525f | diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -69,11 +69,12 @@ setup(
# your project is installed. For an analysis of "install_requires" vs pip's
# requirements files see:
# https://packaging.python.org/en/latest/requirements.html
- install_requires=['numpy>=1.9.2',
- 'scipy>=0.15.1',
- 'matplotlib>=1.4.3',
- 'scikit-learn>=0.16.1',
- 'xlrd>=0.9.3',
+ install_requires=['numpy>=1.9.2',
+ 'scipy>=0.15.1',
+ 'matplotlib>=1.4.3',
+ 'palettable>=2.1.1',
+ 'scikit-learn>=0.16.1',
+ 'xlrd>=0.9.3',
'openpyxl==2.0.2'],
# List additional groups of dependencies here (e.g. development | Added palettable to setup.py. | taborlab_FlowCal | train | py |
6c3c7c2ea43bc8fb2c6201b25eb0b7f85bc01f6c | diff --git a/src/main/java/com/github/ansell/restletutils/RestletUtilSesameRealm.java b/src/main/java/com/github/ansell/restletutils/RestletUtilSesameRealm.java
index <HASH>..<HASH> 100644
--- a/src/main/java/com/github/ansell/restletutils/RestletUtilSesameRealm.java
+++ b/src/main/java/com/github/ansell/restletutils/RestletUtilSesameRealm.java
@@ -301,6 +301,7 @@ public class RestletUtilSesameRealm extends Realm
{
conn.rollback();
}
+ throw e;
}
finally
{ | Rethrow exception instead of silently logging it | ansell_restlet-utils | train | java |
f4e7b2895b5ad0a1aedb614c9cbac8e7bce4274d | diff --git a/eventsourcing/infrastructure/event_player.py b/eventsourcing/infrastructure/event_player.py
index <HASH>..<HASH> 100644
--- a/eventsourcing/infrastructure/event_player.py
+++ b/eventsourcing/infrastructure/event_player.py
@@ -33,12 +33,14 @@ class EventPlayer(object):
# Decide since when we need to get the events.
since = snapshot.last_event_id if snapshot else None
- # Get entity's domain events from event store.
+ # Get entity's domain events from the event store.
domain_events = self.event_store.get_entity_events(stored_entity_id, since=since)
- # Get the entity by a left fold of the domain events over the initial state.
+ # Get the entity, left fold the domain events over the initial state.
domain_entity = reduce(self.mutate, domain_events, initial_state)
+ # Todo: Move this onto the domain entity (maybe) and make it know of last snapshot so it.
+ # Todo: Or maybe have a completely indepdendent snapshotting object which listens to events and checks.
# Take a snapshot if too many versions since the initial version for this type.
if domain_entity is not None:
assert isinstance(domain_entity, EventSourcedEntity) | Added todos about moving snapshotting out of the event player. | johnbywater_eventsourcing | train | py |
b39be2b104d11477ba99ea16d349f46a9b2ddb75 | diff --git a/src/main/java/de/slackspace/openkeepass/domain/xml/adapter/BooleanSimpleXmlAdapter.java b/src/main/java/de/slackspace/openkeepass/domain/xml/adapter/BooleanSimpleXmlAdapter.java
index <HASH>..<HASH> 100644
--- a/src/main/java/de/slackspace/openkeepass/domain/xml/adapter/BooleanSimpleXmlAdapter.java
+++ b/src/main/java/de/slackspace/openkeepass/domain/xml/adapter/BooleanSimpleXmlAdapter.java
@@ -5,9 +5,8 @@ import org.simpleframework.xml.transform.Transform;
public class BooleanSimpleXmlAdapter implements Transform<Boolean> {
@Override
- public Boolean read(String arg0) throws Exception {
- // TODO Auto-generated method stub
- return null;
+ public Boolean read(String value) throws Exception {
+ return "true".equalsIgnoreCase(value);
}
@Override | Implemented read method of BooleanAdapter | cternes_openkeepass | train | java |
3e7adec78c9996910d98ff4cfc7e6bea8c6958ee | diff --git a/liquibase-integration-tests/src/test/java/liquibase/test/DatabaseTestContext.java b/liquibase-integration-tests/src/test/java/liquibase/test/DatabaseTestContext.java
index <HASH>..<HASH> 100644
--- a/liquibase-integration-tests/src/test/java/liquibase/test/DatabaseTestContext.java
+++ b/liquibase-integration-tests/src/test/java/liquibase/test/DatabaseTestContext.java
@@ -56,7 +56,7 @@ public class DatabaseTestContext {
private DatabaseConnection openConnection(final String givenUrl,
final String username, final String password) throws Exception {
// Insert the temp dir path
- String url = givenUrl.replace("'***TEMPDIR***", System.getProperty("java.io.tmpdir"));
+ String url = givenUrl.replace("***TEMPDIR***", System.getProperty("java.io.tmpdir"));
if (connectionsAttempted.containsKey(url)) {
JdbcConnection connection = (JdbcConnection) connectionsByUrl.get(url); | Integration tests: Automatically places embedded database in the temp directory | liquibase_liquibase | train | java |
efed85e495142b8f575dad431f0e8b7dcf7652f4 | diff --git a/examples/with-webpack-bundle-analyzer/next.config.js b/examples/with-webpack-bundle-analyzer/next.config.js
index <HASH>..<HASH> 100644
--- a/examples/with-webpack-bundle-analyzer/next.config.js
+++ b/examples/with-webpack-bundle-analyzer/next.config.js
@@ -2,11 +2,11 @@ const { BundleAnalyzerPlugin } = require('webpack-bundle-analyzer')
const { ANALYZE } = process.env
module.exports = {
- webpack: function (config) {
+ webpack: function (config, { isServer }) {
if (ANALYZE) {
config.plugins.push(new BundleAnalyzerPlugin({
analyzerMode: 'server',
- analyzerPort: 8888,
+ analyzerPort: isServer ? 8888 : 8889,
openAnalyzer: true
}))
} | Fix webpack-bundle-analyzer example to work with Next 5 (#<I>) | zeit_next.js | train | js |
99935eb74b310dfd51f6ad86252c81b5bdc200ae | diff --git a/Model/ContentManager.php b/Model/ContentManager.php
index <HASH>..<HASH> 100644
--- a/Model/ContentManager.php
+++ b/Model/ContentManager.php
@@ -279,6 +279,7 @@ class ContentManager implements ContentManagerInterface
//duplicate content
$duplicatedContent = clone $content;
+ $duplicatedContent->setSlug(null);
$duplicatedContent->setValueSet($duplicatedValueset);
if (!is_null($nestedIn)) { | Set slug to null while duplicating | Opifer_Cms | train | php |
14aac1737e72eec3b1f380250cf78830927055d7 | diff --git a/lib/adminlib.php b/lib/adminlib.php
index <HASH>..<HASH> 100644
--- a/lib/adminlib.php
+++ b/lib/adminlib.php
@@ -5853,7 +5853,6 @@ function print_plugin_tables() {
'comments',
'course_list',
'course_summary',
- 'navigation',
'glossary_random',
'html',
'loancalc',
@@ -5861,6 +5860,7 @@ function print_plugin_tables() {
'mentees',
'messages',
'mnet_hosts',
+ 'navigation',
'news_items',
'online_users',
'participants', | navigation MDL-<I> Fixed alphabetical order of blocks | moodle_moodle | train | php |
3a5aec6d8f71302aa11fd757aae1a7ecfd6573b3 | diff --git a/tests/Webfactory/Constraint/IsEventSubscriberTest.php b/tests/Webfactory/Constraint/IsEventSubscriberTest.php
index <HASH>..<HASH> 100644
--- a/tests/Webfactory/Constraint/IsEventSubscriberTest.php
+++ b/tests/Webfactory/Constraint/IsEventSubscriberTest.php
@@ -62,9 +62,19 @@ class IsEventSubscriberTest extends \PHPUnit_Framework_TestCase
}
/**
+ * Ensures that the check fails if the given method reference is not valid.
+ */
+ public function testFailsIfInvalidMethodReferenceIsProvided()
+ {
+ $subscriber = new TestSubscriber(array('event' => array(new \stdClass(), 0)));
+
+ $this->assertRejected($subscriber);
+ }
+
+ /**
* Ensures that the validation detects a not existing event method.
*/
- public function testFailsIfReferenceMethodDoesNotExist()
+ public function testFailsIfReferencedMethodDoesNotExist()
{
$subscriber = new TestSubscriber(array('event' => 'doesNotExist')); | added test (#<I>) | webfactory_symfony-application-tests | train | php |
850be517fa4a0394f7526578579a2466917d0dbb | diff --git a/xurls.go b/xurls.go
index <HASH>..<HASH> 100644
--- a/xurls.go
+++ b/xurls.go
@@ -34,8 +34,8 @@ const (
webURL = hostName + port + path
email = `[a-zA-Z0-9._%\-+]+@` + hostName
- strict = `\b` + scheme + pathCont
- relaxed = strict + `|` + webURL + `|` + email
+ strict = `(\b` + scheme + pathCont + `)`
+ relaxed = `(` + strict + `|` + webURL + `|` + email + `)`
)
var (
@@ -53,7 +53,7 @@ func init() {
// StrictMatchingScheme produces a regexp that matches urls like Strict but
// whose scheme matches the given regular expression.
func StrictMatchingScheme(exp string) (*regexp.Regexp, error) {
- strictMatching := `\b(?i)(` + exp + `)(?-i)` + pathCont
+ strictMatching := `(\b(?i)(` + exp + `)(?-i)` + pathCont + `)`
re, err := regexp.Compile(strictMatching)
if err != nil {
return nil, err | Wrap exposed expressions in parenthesis
This means that they can be reused via Regexp.String() and added to other
regex expressions without breaking. If they are like `a|b|c`, then adding `d`
at the end wouldn't - `a|b|cd` - while `(a|b|c)d` does. | mvdan_xurls | train | go |
22432c3a942acc1a9ee32d5c46245a3173bcbe6a | diff --git a/ampersand-dom.js b/ampersand-dom.js
index <HASH>..<HASH> 100644
--- a/ampersand-dom.js
+++ b/ampersand-dom.js
@@ -4,8 +4,10 @@ var dom = module.exports = {
},
// optimize if we have classList
addClass: function (el, cls) {
+ cls = getString(cls);
+ if (!cls) return;
if (el.classList) {
- el.classList.add(getString(cls));
+ el.classList.add(cls);
} else {
if (!hasClass(el, cls)) {
if (el.classList) { | only add classes if there's a class to add | AmpersandJS_ampersand-dom | train | js |
c4567a1a813c2b357e6c2857c80ac50d0d29c007 | diff --git a/examples/with-graphql-hooks/lib/with-graphql-client.js b/examples/with-graphql-hooks/lib/with-graphql-client.js
index <HASH>..<HASH> 100644
--- a/examples/with-graphql-hooks/lib/with-graphql-client.js
+++ b/examples/with-graphql-hooks/lib/with-graphql-client.js
@@ -7,7 +7,7 @@ export default App => {
return class GraphQLHooks extends React.Component {
static displayName = 'GraphQLHooks(App)'
static async getInitialProps(ctx) {
- const { Component, router } = ctx
+ const { AppTree } = ctx
let appProps = {}
if (App.getInitialProps) {
@@ -22,14 +22,7 @@ export default App => {
try {
// Run all GraphQL queries
graphQLState = await getInitialState({
- App: (
- <App
- {...appProps}
- Component={Component}
- router={router}
- graphQLClient={graphQLClient}
- />
- ),
+ App: <AppTree {...appProps} graphQLClient={graphQLClient} />,
client: graphQLClient,
})
} catch (error) { | Fix TypeError in with-graphql-hooks example (#<I>)
Reported at <URL> | zeit_next.js | train | js |
6149cb122ff6caa3b0f6d9b3da31ec508c0ecb5c | diff --git a/Model/ImportExport/Processor/Export/Node/Tree.php b/Model/ImportExport/Processor/Export/Node/Tree.php
index <HASH>..<HASH> 100644
--- a/Model/ImportExport/Processor/Export/Node/Tree.php
+++ b/Model/ImportExport/Processor/Export/Node/Tree.php
@@ -62,16 +62,16 @@ class Tree
private function reindexTreeNodes(array $nodes): array
{
- $data = [];
+ $tree = [];
foreach ($nodes as $node) {
if (isset($node[ExtendedFields::NODES])) {
$node[ExtendedFields::NODES] = $this->reindexTreeNodes($node[ExtendedFields::NODES]);
}
- $data[] = $node;
+ $tree[] = $node;
}
- return $data;
+ return $tree;
}
} | [<I>] Rename a variable in node export tree processor reindex method | SnowdogApps_magento2-menu | train | php |
e283e6168923ddda2d66a83e63c0e67e4f00e382 | diff --git a/languagetool-language-modules/de/src/test/java/org/languagetool/rules/de/MorfologikGermanyGermanSpellerRuleTest.java b/languagetool-language-modules/de/src/test/java/org/languagetool/rules/de/MorfologikGermanyGermanSpellerRuleTest.java
index <HASH>..<HASH> 100644
--- a/languagetool-language-modules/de/src/test/java/org/languagetool/rules/de/MorfologikGermanyGermanSpellerRuleTest.java
+++ b/languagetool-language-modules/de/src/test/java/org/languagetool/rules/de/MorfologikGermanyGermanSpellerRuleTest.java
@@ -54,7 +54,7 @@ public class MorfologikGermanyGermanSpellerRuleTest {
RuleMatch[] matches = rule.match(lt.getAnalyzedSentence("daß"));
assertEquals(1, matches.length);
- assertEquals("dass", matches[0].getSuggestedReplacements().get(0));
+ assertEquals("das", matches[0].getSuggestedReplacements().get(0)); // "dass" would actually be better...
}
@Test | [de] fix test broken by recent de_DE.info changes | languagetool-org_languagetool | train | java |
62bc6bf3229c0fd5048002b9d160fc446c1f9b90 | diff --git a/eZ/Publish/Core/REST/Server/Output/ValueObjectVisitor/UserSession.php b/eZ/Publish/Core/REST/Server/Output/ValueObjectVisitor/UserSession.php
index <HASH>..<HASH> 100644
--- a/eZ/Publish/Core/REST/Server/Output/ValueObjectVisitor/UserSession.php
+++ b/eZ/Publish/Core/REST/Server/Output/ValueObjectVisitor/UserSession.php
@@ -28,6 +28,7 @@ class UserSession extends ValueObjectVisitor
public function visit( Visitor $visitor, Generator $generator, $data )
{
$visitor->setHeader( 'Content-Type', $generator->getMediaType( 'Session' ) );
+ // @deprecated Since 5.0, this cookie is used for legacy until Static cache support is removed along with this cookie
$visitor->setHeader( 'Set-Cookie', 'is_logged_in=true; path=/' );
//@todo Needs refactoring, disabling certain headers should not be done this way | Added: deprecated comment | ezsystems_ezpublish-kernel | train | php |
a5ea42a407ba960f5a467fa5ab9551639d749922 | diff --git a/djpaypal/models/webhooks.py b/djpaypal/models/webhooks.py
index <HASH>..<HASH> 100644
--- a/djpaypal/models/webhooks.py
+++ b/djpaypal/models/webhooks.py
@@ -92,7 +92,8 @@ class WebhookEventTrigger(models.Model):
try:
obj.valid = obj.verify(PAYPAL_WEBHOOK_ID)
if obj.valid:
- obj.process()
+ # Process the item (do not save it, it'll get saved below)
+ obj.process(save=False)
except Exception as e:
obj.exception = str(e)
obj.traceback = format_exc()
@@ -139,7 +140,10 @@ class WebhookEventTrigger(models.Model):
auth_algo=self.auth_algo,
)
- def process(self):
+ def process(self, save=True):
obj = WebhookEvent.process(self.data)
self.webhook_event = obj
+ self.processed = True
+ if save:
+ self.save()
return obj | Save WebhookEventTrigger on process() by default | HearthSim_dj-paypal | train | py |
1f958dc4439fbe435b1d0381d15860708f1f9745 | diff --git a/constance/__init__.py b/constance/__init__.py
index <HASH>..<HASH> 100644
--- a/constance/__init__.py
+++ b/constance/__init__.py
@@ -1,10 +1,12 @@
from .base import Config
+from django.utils.functional import SimpleLazyObject
__version__ = '1.0a1'
+
try:
from django.apps import AppConfig # noqa
except ImportError:
- config = Config()
+ config = SimpleLazyObject(Config)
else:
default_app_config = 'constance.apps.ConstanceConfig' | Make the config object lazy for old Djangos.
This should prevent import time side effects from instantiating the config object directly there. | jazzband_django-constance | train | py |
cb495315f85ba3e0925aa82b2ad408e74eb77811 | diff --git a/config/deploy.rb b/config/deploy.rb
index <HASH>..<HASH> 100644
--- a/config/deploy.rb
+++ b/config/deploy.rb
@@ -7,7 +7,11 @@ set :ssh_options, { :forward_agent => true }
set :user, "deployer" # The server's user for deploys
set :scm_passphrase, "p@ssw0rd" # The deploy user's password
set :deploy_via, :remote_cache
+set :deploy_to, "/home/deploy"
+set :default_environment, {
+ 'PATH' => "/opt/rbenv/shims/:$PATH"
+}
set :stages, %w(production development)
set :default_stage, "development"
require 'capistrano/ext/multistage' | Add some more config options to make sure we pick up rbenv inside capistrano runs on the remote machine' | ladder_ladder | train | rb |
455e5f09ade861ec35788174386f8635c583e0ee | diff --git a/config/debugbar.php b/config/debugbar.php
index <HASH>..<HASH> 100644
--- a/config/debugbar.php
+++ b/config/debugbar.php
@@ -67,6 +67,9 @@ return [
| you can use this option to disable sending the data through the headers.
|
| Optionally, you can also send ServerTiming headers on ajax requests for the Chrome DevTools.
+ |
+ | Note for your request to be identified as ajax requests they must either send the header
+ | X-Requested-With with the value XMLHttpRequest (most JS libraries send this), or have application/json as a Accept header.
*/
'capture_ajax' => true, | Add expanation of how AJAX requests are identified. (#<I>) | barryvdh_laravel-debugbar | train | php |
2573c7ea61c55b5ddd78292d4abc939b81f961c6 | diff --git a/lib/services/fs.js b/lib/services/fs.js
index <HASH>..<HASH> 100644
--- a/lib/services/fs.js
+++ b/lib/services/fs.js
@@ -161,7 +161,8 @@ var remove = function(args) {
// Rename
var rename = function(args) {
- if (!args.from || !args.to) throw "Need 'from' and 'to'";
+ if (!args.from || (!args.to && !args.name)) throw "Need 'from' and 'to'";
+ if (args.name) args.to = path.join(path.dirname(args.from), args.name);
return Q.all([
workspace.path(args.from),
diff --git a/test/rpc_fs.js b/test/rpc_fs.js
index <HASH>..<HASH> 100644
--- a/test/rpc_fs.js
+++ b/test/rpc_fs.js
@@ -83,10 +83,19 @@ describe('RPC fs', function() {
, done);
});
+ it("can rename a file", function(done) {
+ qdone(
+ rpc.get("fs").rename({
+ from: "test_new2.txt",
+ name: "test_new3.txt"
+ })
+ , done);
+ });
+
it("can remove a file", function(done) {
qdone(
rpc.get("fs").remove({
- path: "test_new2.txt"
+ path: "test_new3.txt"
})
, done);
}); | Add option "name" for fs.rename
Add test for it | CodeboxIDE_codebox | train | js,js |
a8d413f0fa2a4701672d2b673c24693df9455160 | diff --git a/test/fork-listen2-problem.tap.js b/test/fork-listen2-problem.tap.js
index <HASH>..<HASH> 100644
--- a/test/fork-listen2-problem.tap.js
+++ b/test/fork-listen2-problem.tap.js
@@ -3,12 +3,10 @@
var fork = require('child_process').fork;
var test = require('tap').test;
-test("parent listener", function (t) {
- var server = require('net').createServer();
+var server
- this.tearDown(function () {
- server.close();
- });
+test("parent listener", function (t) {
+ server = require('net').createServer();
server.listen(8585, function () {
t.ok(server, "parent listening on port 8585");
@@ -20,11 +18,16 @@ test("parent listener", function (t) {
if (message === 'shutdown') {
t.ok(message, "child handled error properly");
listener.send('shutdown');
- t.end();
}
else {
t.fail("parent got unexpected message " + message);
}
+ t.end();
});
});
});
+
+test("tearDown", function (t) {
+ server.close();
+ t.end();
+}) | test: tearDown went away in tap@1 | othiym23_async-listener | train | js |
5db41a79ddb1deecadf04ba6b695de2524d524db | diff --git a/src/Utilities.php b/src/Utilities.php
index <HASH>..<HASH> 100644
--- a/src/Utilities.php
+++ b/src/Utilities.php
@@ -252,7 +252,7 @@ class Utilities
*
* @return bool
*/
- public static function validateSid($sid)
+ public static function isValidSid($sid)
{
preg_match("/S-1-5-21-\d+-\d+\-\d+\-\d+/", $sid, $matches); | Renamed validateSid utility method to isValidSid | Adldap2_Adldap2 | train | php |
f32458940ef496d61946d4e3d63bc5edd1ae0af7 | diff --git a/test/test_commit.rb b/test/test_commit.rb
index <HASH>..<HASH> 100644
--- a/test/test_commit.rb
+++ b/test/test_commit.rb
@@ -54,6 +54,7 @@ class TestCommit < Test::Unit::TestCase
diffs = Commit.diff(@r, '59ddc32', '13d27d5')
assert_equal 3, diffs.size
+ assert_equal %w(lib/grit/commit.rb test/fixtures/show_empty_commit test/test_commit.rb), diffs.collect { |d| d.a_path }
end
def test_diff_with_files
@@ -62,6 +63,7 @@ class TestCommit < Test::Unit::TestCase
diffs = Commit.diff(@r, '59ddc32', %w(lib))
assert_equal 1, diffs.size
+ assert_equal 'lib/grit/diff.rb', diffs.first.a_path
end
def test_diff_with_two_commits_and_files
@@ -70,6 +72,7 @@ class TestCommit < Test::Unit::TestCase
diffs = Commit.diff(@r, '59ddc32', '13d27d5', %w(lib))
assert_equal 1, diffs.size
+ assert_equal 'lib/grit/commit.rb', diffs.first.a_path
end
# diffs | add to Commit::Diff tests so we know the right filename is parsed | mojombo_grit | train | rb |
47dc40ecfa5cdaa6fa5b1913845c78b6265d53b7 | diff --git a/src/lewis/core/utils.py b/src/lewis/core/utils.py
index <HASH>..<HASH> 100644
--- a/src/lewis/core/utils.py
+++ b/src/lewis/core/utils.py
@@ -67,11 +67,11 @@ def get_submodules(module):
try:
submodules[module_name] = importlib.import_module(
'.{}'.format(module_name), package=module.__name__)
- except ImportError as e:
+ except ImportError as import_error:
# This is necessary in case random directories are in the path or things can
# just not be imported due to other ImportErrors.
get_submodules.log.error("ImportError for {module}: {error}"
- .format(module=module_name, error=e))
+ .format(module=module_name, error=import_error))
return submodules | Changed exception variable to be more descriptive | DMSC-Instrument-Data_lewis | train | py |
ef4664c3aa13318ae143948c6fe41bda9ed473ef | diff --git a/src/widget/draw/draw-widget.js b/src/widget/draw/draw-widget.js
index <HASH>..<HASH> 100644
--- a/src/widget/draw/draw-widget.js
+++ b/src/widget/draw/draw-widget.js
@@ -338,7 +338,10 @@ DrawWidget.prototype._reset = function() {
var that = this;
if ( this.element.value ) {
- dialog.confirm( t( 'filepicker.resetWarning', { item: t( 'drawwidget.' + this.props.type ) } ) )
+ // This discombulated line is to help the i18next parser pick up all 3 keys.
+ var item = this.props.type === 'signature' ?
+ t( 'drawwidget.signature' ) : ( this.props.type === 'drawing' ? t( 'drawwidget.drawing' ) : t( 'drawwidget.annotation' ) );
+ dialog.confirm( t( 'filepicker.resetWarning', { item: item } ) )
.then( function() {
that.pad.clear();
that.cache = null; | fixed: i<I>next parser doesn't pick up a few translation keys for draw widget | enketo_enketo-core | train | js |
08c9d6375a1e9c8d60c72ebd2d0c620a8893f538 | diff --git a/cmd/juju/service/get.go b/cmd/juju/service/get.go
index <HASH>..<HASH> 100644
--- a/cmd/juju/service/get.go
+++ b/cmd/juju/service/get.go
@@ -41,9 +41,12 @@ settings:
type: string
value: optimized
-NOTE: In the example above the descriptions and most other settings were omitted for
-brevity. The "engine" setting was left at its default value ("nginx"), while the
-"tuning" setting was set to "optimized" (the default value is "single").
+NOTE: In the example above the descriptions and most other settings were omitted or
+truncated for brevity. The "engine" setting was left at its default value ("nginx"),
+while the "tuning" setting was set to "optimized" (the default value is "single").
+
+Note that the "default" field indicates whether a configuration setting is at its
+default value. It does not indicate the default value for the setting.
`
func (c *GetCommand) Info() *cmd.Info { | cmd/juju/service: clarify the meaning of the "default" field in the "get" output
Fixes LP #<I>. | juju_juju | train | go |
2430a644d793496c4d3ba1f96e19e9e64d9fb8cb | diff --git a/py/selenium/webdriver/common/action_chains.py b/py/selenium/webdriver/common/action_chains.py
index <HASH>..<HASH> 100644
--- a/py/selenium/webdriver/common/action_chains.py
+++ b/py/selenium/webdriver/common/action_chains.py
@@ -331,12 +331,12 @@ class ActionChains(object):
- on_element: The element to mouse up.
If None, releases on current mouse position.
"""
+ if on_element:
+ self.move_to_element(on_element)
if self._driver.w3c:
self.w3c_actions.pointer_action.release()
self.w3c_actions.key_action.pause()
else:
- if on_element:
- self.move_to_element(on_element)
self._actions.append(lambda: self._driver.execute(Command.MOUSE_UP, {}))
return self | [oy] Fix issue with w3c actions releasing on element (#<I>)
Releasing a held mouse button on an element | SeleniumHQ_selenium | train | py |
1b2e097be2f5b62b7db7dae09f399ace54836e0a | diff --git a/test/res.sendFile.js b/test/res.sendFile.js
index <HASH>..<HASH> 100644
--- a/test/res.sendFile.js
+++ b/test/res.sendFile.js
@@ -747,7 +747,7 @@ describe('res', function(){
})
describe('when cacheControl: false', function () {
- it('shold not send cache-control', function (done) {
+ it('should not send cache-control', function (done) {
var app = express()
app.use(function (req, res) { | tests: fix typo in description
closes #<I> | expressjs_express | train | js |
37e5fe32f03f2afee0cb23799d3cbb3152cef1e5 | diff --git a/src/views/layouts/_nav.haml.php b/src/views/layouts/_nav.haml.php
index <HASH>..<HASH> 100644
--- a/src/views/layouts/_nav.haml.php
+++ b/src/views/layouts/_nav.haml.php
@@ -66,7 +66,7 @@
-if(is_a($auth, 'Bkwld\Decoy\Auth\Sentry') && $auth->can('read', 'admins'))
%li
- -#%a(href=DecoyURL::action('Bkwld\Decoy\Controllers\Admins@index')) Admins
+ %a(href=DecoyURL::action('Bkwld\\Decoy\\Controllers\\Admins@index')) Admins
%li
%a(href=$auth->userUrl()) Your account
%li.divider
@@ -75,12 +75,12 @@
-if($auth->developer())
-$divider = true
%li
- -#%a(href=route('decoy\commands')) Commands
+ %a(href=route('decoy\\commands')) Commands
-if(count(Bkwld\Decoy\Models\Worker::all()))
-$divider = true
%li
- -#%a(href=route('decoy\workers')) Workers
+ %a(href=route('decoy\\workers')) Workers
-if($divider)
%li.divider | Fixing routes that require escaping backslashes | BKWLD_decoy | train | php |
27b82eff040a93e31f958820c62aa084a9cd1cc0 | diff --git a/os_package_registry/package_registry.py b/os_package_registry/package_registry.py
index <HASH>..<HASH> 100644
--- a/os_package_registry/package_registry.py
+++ b/os_package_registry/package_registry.py
@@ -277,7 +277,7 @@ class PackageRegistry(object):
},
'num_countries': {
'cardinality': {
- 'field': 'package.countryCode.keyword',
+ 'field': 'package.countryCode',
},
},
},
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -10,7 +10,7 @@ with open(os.path.join(here, 'README.md'), encoding='utf-8') as f:
setup(
name='os-package-registry',
- version='0.0.20',
+ version='0.0.21',
description=(
'Manage a registry of packages on an ElasticSearch instance'
), | <I> Fix stats endpoint with new index mapping | openspending_os-package-registry | train | py,py |
98a6cf7b8bef8d2e13de62dc231421e113e264d8 | diff --git a/trie/trie.py b/trie/trie.py
index <HASH>..<HASH> 100644
--- a/trie/trie.py
+++ b/trie/trie.py
@@ -616,12 +616,16 @@ class BinaryTrie(object):
return self._hash_and_save(encode_branch_node(new_left_child, new_right_child))
def exists(self, key):
+ validate_is_bytes(key)
+
return self.get(key) != BLANK_NODE
def delete(self, key):
"""
Equals to setting the value to None
"""
+ validate_is_bytes(key)
+
self.root_hash = self._set(self.root_hash, encode_to_bin(key), b'')
#
@@ -634,6 +638,7 @@ class BinaryTrie(object):
@root_node.setter
def root_node(self, node):
validate_is_bin_node(node)
+
self.root_hash = self._hash_and_save(node)
# | patch: add a few more validate_is_bytes check | ethereum_py-trie | train | py |
a607971f5f1f4996ac44cb515251475401876430 | diff --git a/cmd/cammount/cammount.go b/cmd/cammount/cammount.go
index <HASH>..<HASH> 100644
--- a/cmd/cammount/cammount.go
+++ b/cmd/cammount/cammount.go
@@ -147,7 +147,7 @@ func main() {
}
}
- signal.Notify(sigc, syscall.SIGQUIT, syscall.SIGTERM)
+ signal.Notify(sigc, syscall.SIGQUIT, syscall.SIGTERM, syscall.SIGINT)
doneServe := make(chan error, 1)
go func() { | cammount: handle SIGINT, so that we unmount too in that case.
Change-Id: I5e<I>c<I>aab<I>c<I>e<I>a<I>af<I>d3c | perkeep_perkeep | train | go |
5a0d8312fbdf4395784e8033bac0786fa50f6d76 | diff --git a/lib/ronin/ip_address.rb b/lib/ronin/ip_address.rb
index <HASH>..<HASH> 100644
--- a/lib/ronin/ip_address.rb
+++ b/lib/ronin/ip_address.rb
@@ -26,6 +26,7 @@ require 'ronin/os_guess'
require 'ronin/os'
require 'ipaddr'
+require 'resolv'
module Ronin
class IPAddress < Address
@@ -71,6 +72,21 @@ module Ronin
:via => :os
#
+ # Looks up the IP Address of a host name.
+ #
+ # @param [String] host_name
+ # The host name to lookup.
+ #
+ # @return [IPAddress]
+ # The new or previously saved IP Address for the host name.
+ #
+ # @since 0.4.0
+ #
+ def IPAddress.lookup(host_name)
+ IPAddress.first_or_new(:address => Resolv.getaddress(host_name))
+ end
+
+ #
# The MAC Address that was most recently used by the IP Address.
#
# @return [MacAddress] | Added IPAddress.lookup. | ronin-ruby_ronin | train | rb |
bc14b65feab989fc399021e0dcdea907426bf540 | diff --git a/lib/Thulium/Session.php b/lib/Thulium/Session.php
index <HASH>..<HASH> 100644
--- a/lib/Thulium/Session.php
+++ b/lib/Thulium/Session.php
@@ -45,4 +45,16 @@ class Session
return $this;
}
+
+ public function push($value)
+ {
+ $_SESSION[$this->_sessionNamespace][] = $value;
+ return $this;
+ }
+
+ public function delete()
+ {
+ unset($_SESSION[$this->_sessionNamespace]);
+ return $this;
+ }
}
\ No newline at end of file | Session push & delete functions. | letsdrink_ouzo | train | php |
ad97b1c522823412864b0a1a6b789e24cd4b8fd3 | diff --git a/tests/ut/test_algorithm.py b/tests/ut/test_algorithm.py
index <HASH>..<HASH> 100644
--- a/tests/ut/test_algorithm.py
+++ b/tests/ut/test_algorithm.py
@@ -16,7 +16,7 @@ real_sleep = asyncio.sleep
@pytest.fixture
def locked_lock():
- return Lock("resource_name", 1, True)
+ return Lock(None, "resource_name", 1, True)
@pytest.fixture | Adding placeholder for lock_manager in lock_lock() fixture | joanvila_aioredlock | train | py |
50099e4f54910c6ff05f10ee2f3fff4e70b84032 | diff --git a/molecule/driver/openstackdriver.py b/molecule/driver/openstackdriver.py
index <HASH>..<HASH> 100644
--- a/molecule/driver/openstackdriver.py
+++ b/molecule/driver/openstackdriver.py
@@ -320,8 +320,8 @@ class OpenstackDriver(basedriver.BaseDriver):
try:
command = [
'ssh', '-o', 'StrictHostKeyChecking=no', '-o',
- 'UserKnownHostsFile=/dev/null', '-o', 'BatchMode=yes', '-l',
- user, hostip, 'exit'
+ 'UserKnownHostsFile=/dev/null', '-o', 'BatchMode=yes', '-i',
+ sshkey_filename, '-l', user, hostip, 'exit'
]
check_output(command, stderr=STDOUT)
return True | Openstack: Use configured ssh key (#<I>) (#<I>) | ansible_molecule | 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.