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
|
|---|---|---|---|---|---|
e7ed16284ace4e22b10316e63e9aed23b37aa6d2
|
diff --git a/services/github/auth/admin.js b/services/github/auth/admin.js
index <HASH>..<HASH> 100644
--- a/services/github/auth/admin.js
+++ b/services/github/auth/admin.js
@@ -24,6 +24,7 @@ function setRoutes({ shieldsSecret }, { apiProvider, server }) {
end('Invalid secret.')
}, 10000)
}
+ ask.res.setHeader('Cache-Control', 'private')
end(apiProvider.serializeDebugInfo({ sanitize: false }))
})
}
|
set 'Cache-Control: private' on token auth endpoint (#<I>)
|
badges_shields
|
train
|
js
|
9a8567f6805b6bc4178e363c603f6f7438b3448a
|
diff --git a/src/test/java/javax/time/calendar/format/TestCharLiteralPrinter.java b/src/test/java/javax/time/calendar/format/TestCharLiteralPrinter.java
index <HASH>..<HASH> 100644
--- a/src/test/java/javax/time/calendar/format/TestCharLiteralPrinter.java
+++ b/src/test/java/javax/time/calendar/format/TestCharLiteralPrinter.java
@@ -40,7 +40,7 @@ import org.testng.annotations.Test;
*
* @author Stephen Colebourne
*/
-@Test
+@Test(groups={"implementation"})
public class TestCharLiteralPrinter extends AbstractTestPrinterParser {
//-----------------------------------------------------------------------
|
CharLiteralPrinterParser is package scoped
|
ThreeTen_threetenbp
|
train
|
java
|
7b614ea395d9698d4c33f81405ccf09da4f381ac
|
diff --git a/schema_salad/tests/test_examples.py b/schema_salad/tests/test_examples.py
index <HASH>..<HASH> 100644
--- a/schema_salad/tests/test_examples.py
+++ b/schema_salad/tests/test_examples.py
@@ -332,7 +332,7 @@ class TestSchemas(unittest.TestCase):
print(g.serialize(format="n3"))
def test_mixin(self):
- base_url = schema_salad.ref_resolver.file_uri(os.path.join(os.getcwd(), os.path.normpath("/tests/")))
+ base_url = schema_salad.ref_resolver.file_uri(os.path.join(os.getcwd(), "tests"))
ldr = schema_salad.ref_resolver.Loader({})
ra = ldr.resolve_ref(cmap({"$mixin": get_data("tests/mixin.yml"), "one": "five"}),
base_url=base_url)
|
modified test mixin for correct base path
|
common-workflow-language_schema_salad
|
train
|
py
|
9c10c69b5f3f9622b704c4b751edf4bcdd1646ff
|
diff --git a/lib/easyzpl/label.rb b/lib/easyzpl/label.rb
index <HASH>..<HASH> 100644
--- a/lib/easyzpl/label.rb
+++ b/lib/easyzpl/label.rb
@@ -88,6 +88,13 @@ module Easyzpl
y = 0 unless numeric?(y)
label_data.push('^FO' + x.to_s + ',' + y.to_s + '^B3N,Y,20,N,N^FD' +
bar_code_string + '^FS')
+
+ return unless label_height && label_width
+ pdf.bounding_box [x, Integer(label_height) - y -
+ 50 - 1], width: 100 do
+ barcode = Barby::Code39.new(bar_code_string)
+ barcode.annotate_pdf(pdf)
+ end
end
# Renders the ZPL code as a string
|
Prints barcode into the PDF if generated.
|
mgrigajtis_easyzpl
|
train
|
rb
|
0c5979ec68dda37860b9109c2ad14cee7c3c0df2
|
diff --git a/src/utils/helper.js b/src/utils/helper.js
index <HASH>..<HASH> 100644
--- a/src/utils/helper.js
+++ b/src/utils/helper.js
@@ -273,6 +273,7 @@ export const parseHits = (hits) => {
_id: data._id,
_index: data._index,
_type: data._type,
+ _score: data._score,
highlight: data.highlight || {},
...data._source,
...streamProps,
|
feat: Expose _score in hits (#<I>)
|
appbaseio_reactivecore
|
train
|
js
|
defe8f2d783d207c99f36a8a4f924a18ed97c257
|
diff --git a/Kwf/Assets/Provider/Components.php b/Kwf/Assets/Provider/Components.php
index <HASH>..<HASH> 100644
--- a/Kwf/Assets/Provider/Components.php
+++ b/Kwf/Assets/Provider/Components.php
@@ -99,6 +99,9 @@ class Kwf_Assets_Provider_Components extends Kwf_Assets_Provider_Abstract
{
$ret = array();
$assets = Kwc_Abstract::getSetting($class, $setting);
+ if (!is_array($assets['dep'])) {
+ throw new Kwf_Exception("Invalid dep dependency for '$class'");
+ }
foreach ($assets['dep'] as $i) {
$d = $this->_providerList->findDependency(trim($i));
if (!$d) {
|
add exception if invalid settings are returned
|
koala-framework_koala-framework
|
train
|
php
|
bb86c38ac13a8f785dda9f6188838771ed379045
|
diff --git a/src/main/java/com/zaxxer/hikari/HikariConfig.java b/src/main/java/com/zaxxer/hikari/HikariConfig.java
index <HASH>..<HASH> 100644
--- a/src/main/java/com/zaxxer/hikari/HikariConfig.java
+++ b/src/main/java/com/zaxxer/hikari/HikariConfig.java
@@ -767,6 +767,8 @@ public class HikariConfig implements HikariConfigMXBean
else if (dataSourceClassName != null) {
if (driverClassName != null) {
LOGGER.error("{} - cannot use driverClassName and dataSourceClassName together.", poolName);
+ // NOTE: This exception text is referenced by a Spring Boot FailureAnalyzer, it should not be
+ // changed without first notifying the Spring Boot developers.
throw new IllegalArgumentException("cannot use driverClassName and dataSourceClassName together.");
}
else if (jdbcUrl != null) {
|
Add comment re: issue #<I> to prevent accidental breakage of Spring Boot's FailureAnalyzer.
|
brettwooldridge_HikariCP
|
train
|
java
|
37a623c9da8fd711bf522e444e4772bc185ab340
|
diff --git a/lib/sup/modes/line-cursor-mode.rb b/lib/sup/modes/line-cursor-mode.rb
index <HASH>..<HASH> 100644
--- a/lib/sup/modes/line-cursor-mode.rb
+++ b/lib/sup/modes/line-cursor-mode.rb
@@ -66,6 +66,7 @@ protected
return if @curpos == p
@curpos = p.clamp @cursor_top, lines
buffer.mark_dirty
+ set_status
end
## override search behavior to be cursor-based. this is a stupid
|
Update status on jump on line in line-cursor-mode
The line number isn't updated in the status field when you jump to the
end or beginning, or do page up or down before the next redraw is done.
Updating the status manually in set_cursor_pos.
|
sup-heliotrope_sup
|
train
|
rb
|
c3e274ef29bba74478ef2bbea4952faf957f3cb9
|
diff --git a/lib/test-utils.js b/lib/test-utils.js
index <HASH>..<HASH> 100644
--- a/lib/test-utils.js
+++ b/lib/test-utils.js
@@ -8,13 +8,16 @@ const fileUtils = require('./file-utils');
module.exports = {
defaults() {
+ const opts = {
+ framework: 'react',
+ modules: 'webpack',
+ js: 'js',
+ css: 'css',
+ router: 'router'
+ };
return {
- options: {
- framework: 'react',
- modules: 'webpack',
- js: 'js',
- css: 'css'
- }
+ options: opts,
+ props: opts
};
},
mock(generator) {
|
Add props to this.context (#<I>)
|
FountainJS_fountain-generator
|
train
|
js
|
9b1706898f48aed564ddcd4eadf85ebfe65e6b19
|
diff --git a/lib/determine-basal/determine-basal.js b/lib/determine-basal/determine-basal.js
index <HASH>..<HASH> 100644
--- a/lib/determine-basal/determine-basal.js
+++ b/lib/determine-basal/determine-basal.js
@@ -294,9 +294,9 @@ var determine_basal = function determine_basal(glucose_status, currenttemp, iob_
// stop adding remainingCI after 4h
if (COBpredBGs.length > 4 * 60 / 5) { remainingCI = 0; }
aCOBpredBG = aCOBpredBGs[aCOBpredBGs.length-1] + predBGI + Math.min(0,predDev) + predACI;
- // for UAMpredBGs, predicted carb impact drops at minDeviationSlope/2
- // calculate predicted CI from UAM based on minDeviationSlope/2
- predUCIslope = Math.max(0, uci + ( UAMpredBGs.length*minDeviationSlope/2 ) );
+ // for UAMpredBGs, predicted carb impact drops at minDeviationSlope
+ // calculate predicted CI from UAM based on minDeviationSlope
+ predUCIslope = Math.max(0, uci + ( UAMpredBGs.length*minDeviationSlope ) );
// if minDeviationSlope is too flat, predicted deviation impact drops linearly from
// current deviation down to zero over DIA (data points every 5m)
predUCIdia = Math.max(0, uci * ( 1 - UAMpredBGs.length/Math.max(profile.dia*60/5,1) ) );
|
go back to using minDeviationSlope to decay UAM CI
|
openaps_oref0
|
train
|
js
|
621f140aaf393281f743ca855e98a371a38aed9a
|
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -12,7 +12,7 @@ def read(fname):
setup(
name='unleash',
- version='0.3.4.dev1',
+ version='0.3.5.dev1',
description=('Creates release commits directly in git, unleashes them on '
'PyPI and pushes tags to github.'),
long_description=read('README.rst'),
diff --git a/unleash/__init__.py b/unleash/__init__.py
index <HASH>..<HASH> 100644
--- a/unleash/__init__.py
+++ b/unleash/__init__.py
@@ -1 +1 @@
-__version__ = '0.3.4.dev1'
+__version__ = '0.3.5.dev1'
|
Increased version to <I>.dev1 after release of <I>.
(commit by unleash <I>.dev1)
|
mbr_unleash
|
train
|
py,py
|
3ef31352c219cbf0d4577f0c3e62af94a486f25a
|
diff --git a/lib/dragonfly/s3_data_store.rb b/lib/dragonfly/s3_data_store.rb
index <HASH>..<HASH> 100644
--- a/lib/dragonfly/s3_data_store.rb
+++ b/lib/dragonfly/s3_data_store.rb
@@ -1,6 +1,8 @@
require 'fog'
require 'dragonfly'
+Dragonfly::App.register_datastore(:s3){ Dragonfly::S3DataStore }
+
module Dragonfly
class S3DataStore
diff --git a/spec/s3_data_store_spec.rb b/spec/s3_data_store_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/s3_data_store_spec.rb
+++ b/spec/s3_data_store_spec.rb
@@ -54,6 +54,15 @@ describe Dragonfly::S3DataStore do
let (:content) { Dragonfly::Content.new(app, "eggheads") }
let (:new_content) { Dragonfly::Content.new(app) }
+ describe "registering with a symbol" do
+ it "registers a symbol for configuring" do
+ app.configure do
+ datastore :s3
+ end
+ app.datastore.should be_a(Dragonfly::S3DataStore)
+ end
+ end
+
describe "write" do
it "should use the name from the content if set" do
content.name = 'doobie.doo'
|
register :s3 symbol with Dragonfly::App
|
markevans_dragonfly-s3_data_store
|
train
|
rb,rb
|
04dd66d1448700847650d400d7469d8326dae135
|
diff --git a/lib/heroku/plugin.rb b/lib/heroku/plugin.rb
index <HASH>..<HASH> 100644
--- a/lib/heroku/plugin.rb
+++ b/lib/heroku/plugin.rb
@@ -13,7 +13,7 @@ module Heroku
end
def self.list
- Dir["#{directory}/*"].map do |folder|
+ Dir["#{directory}/*"].sort.map do |folder|
File.basename(folder)
end
end
|
sort the output of Plugin.list so that plugins are always loaded in the same order
|
heroku_legacy-cli
|
train
|
rb
|
e7fb90a2737519c05d1f9091af76a4dd351abc98
|
diff --git a/examples/tesselation.py b/examples/tesselation.py
index <HASH>..<HASH> 100755
--- a/examples/tesselation.py
+++ b/examples/tesselation.py
@@ -13,6 +13,8 @@ def main():
glfw.window_hint(glfw.CONTEXT_VERSION_MAJOR, 4)
glfw.window_hint(glfw.CONTEXT_VERSION_MINOR, 0)
+ glfw.window_hint(glfw.OPENGL_PROFILE, glfw.OPENGL_CORE_PROFILE)
+ glfw.window_hint(glfw.OPENGL_FORWARD_COMPAT, True)
win = glfw.create_window(640, 480, 'bezier', None, None)
if not win:
print('Failed to create glfw window!')
|
Ensure the creating of forward compat core context
backwards compat non-core is default and somthing that will not work on a lot of setups.
|
moderngl_moderngl
|
train
|
py
|
2cef2c28a6f74ee5c0b294d2c3c7d2bad72bd466
|
diff --git a/awesomplete.js b/awesomplete.js
index <HASH>..<HASH> 100644
--- a/awesomplete.js
+++ b/awesomplete.js
@@ -147,6 +147,10 @@ _.prototype = {
},
close: function () {
+ if (!this.opened) {
+ return;
+ }
+
this.ul.setAttribute("hidden", "");
this.index = -1;
diff --git a/test/api/closeSpec.js b/test/api/closeSpec.js
index <HASH>..<HASH> 100644
--- a/test/api/closeSpec.js
+++ b/test/api/closeSpec.js
@@ -26,4 +26,12 @@ describe("awesomplete.close", function () {
expect(handler).toHaveBeenCalled();
});
+
+ it("returns early if already closed", function () {
+ var handler = $.spyOnEvent(this.subject.input, "awesomplete-close");
+ this.subject.close();
+ this.subject.close();
+
+ expect(handler.calls.count()).toBe(1);
+ });
});
|
Return early from close if not open
If the popup is already in a closed state, return early from
`Awesomplete.prototype.close` so as to guarantee that when
`awesomplete-close` events get triggered, the popup *was* actually
closed.
|
LeaVerou_awesomplete
|
train
|
js,js
|
90fabe158e631a4375ea84905dfedebbec27b1fc
|
diff --git a/cmd/minikube/cmd/start_flags.go b/cmd/minikube/cmd/start_flags.go
index <HASH>..<HASH> 100644
--- a/cmd/minikube/cmd/start_flags.go
+++ b/cmd/minikube/cmd/start_flags.go
@@ -575,7 +575,7 @@ func generateNewConfigFromFlags(cmd *cobra.Command, k8sVersion string, rtime str
exit.Message(reason.Usage, "Using rootless driver was required, but the current driver does not seem rootless")
}
}
- out.Styled(style.Notice, "Using {{.driver_name}} driver with the root privilege", out.V{"driver_name": driver.FullName(drvName)})
+ out.Styled(style.Notice, "Using {{.driver_name}} driver with root privileges", out.V{"driver_name": driver.FullName(drvName)})
}
if si.StorageDriver == "btrfs" {
klog.Info("auto-setting LocalStorageCapacityIsolation to false because using btrfs storage driver")
|
fix grammar for common minikube start output
|
kubernetes_minikube
|
train
|
go
|
1e7785b2cdb3517b9094fc98161ac76de845f39f
|
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -24,7 +24,7 @@ install_requires = [
]
mysqlbinlog_requires = [
- "mysql-replication>=0.4.1,<0.5.0",
+ "mysql-replication>=0.5,<0.6.0",
]
# nanomsg is still in beta
|
mysql replication ready to use <I>
|
eleme_meepo
|
train
|
py
|
da13f87e55f349f29582f5ae06b2a78e688f1372
|
diff --git a/reactor-core/src/main/java/reactor/core/publisher/FluxWindowTimeout.java b/reactor-core/src/main/java/reactor/core/publisher/FluxWindowTimeout.java
index <HASH>..<HASH> 100644
--- a/reactor-core/src/main/java/reactor/core/publisher/FluxWindowTimeout.java
+++ b/reactor-core/src/main/java/reactor/core/publisher/FluxWindowTimeout.java
@@ -1008,7 +1008,10 @@ final class FluxWindowTimeout<T> extends InternalFluxOperator<T, Flux<T>> {
}
boolean sendNext(T t) {
- int received = this.received + 1 ;
+ final int received = this.received + 1 ;
+ if (received > this.max) {
+ return false;
+ }
this.received = received;
this.queue.offer(t);
@@ -1399,10 +1402,6 @@ final class FluxWindowTimeout<T> extends InternalFluxOperator<T, Flux<T>> {
}
}
- static boolean isCancelledBySubscriberOrByParent(long state) {
- return (state & CANCELLED_STATE) == CANCELLED_STATE || (state & PARENT_CANCELLED_STATE) == PARENT_CANCELLED_STATE;
- }
-
static boolean isCancelled(long state) {
return (state & CANCELLED_STATE) == CANCELLED_STATE;
}
|
Add windowTimeout sendNext early guard against maxSize overflow (#<I>)
This commit improves the InnerWindow.sendNext method to guard against
attempts at sending more than the window's maxSize elements, earlier in
the codepath.
It also removes an unused method that was left-in during iterations on
the backpressure-aware new implementation from #<I>.
|
reactor_reactor-core
|
train
|
java
|
741bbebe28a1512a6f78cea174e75731de4382fe
|
diff --git a/app/models/alchemy/picture/transformations.rb b/app/models/alchemy/picture/transformations.rb
index <HASH>..<HASH> 100644
--- a/app/models/alchemy/picture/transformations.rb
+++ b/app/models/alchemy/picture/transformations.rb
@@ -75,21 +75,30 @@ module Alchemy
def landscape_format?
image_file.landscape?
end
+
alias_method :landscape?, :landscape_format?
+ deprecate landscape_format?: "Use image_file.landscape? instead", deprecator: Alchemy::Deprecation
+ deprecate landscape?: "Use image_file.landscape? instead", deprecator: Alchemy::Deprecation
# Returns true if picture's width is smaller than it's height
#
def portrait_format?
image_file.portrait?
end
+
alias_method :portrait?, :portrait_format?
+ deprecate portrait_format?: "Use image_file.portrait? instead", deprecator: Alchemy::Deprecation
+ deprecate portrait?: "Use image_file.portrait? instead", deprecator: Alchemy::Deprecation
# Returns true if picture's width and height is equal
#
def square_format?
image_file.aspect_ratio == 1.0
end
+
alias_method :square?, :square_format?
+ deprecate square_format?: "Use image_file.aspect_ratio instead", deprecator: Alchemy::Deprecation
+ deprecate square?: "Use image_file.aspect_ratio instead", deprecator: Alchemy::Deprecation
# Returns true if the class we're included in has a meaningful render_size attribute
#
|
Deprecate image format methods
This deprecates `landscape_format?`, `portrait_format?` and
`square_format` as well as their aliases `landscape?`, `portrait?`
and `square?` in favor of the same methods on the `image_file`
object Dragonfly provides us.
|
AlchemyCMS_alchemy_cms
|
train
|
rb
|
c585b79d1329825dbee35f065a9c938a5fb987bc
|
diff --git a/graylog2-server/src/main/java/org/graylog2/events/ClusterEventPeriodical.java b/graylog2-server/src/main/java/org/graylog2/events/ClusterEventPeriodical.java
index <HASH>..<HASH> 100644
--- a/graylog2-server/src/main/java/org/graylog2/events/ClusterEventPeriodical.java
+++ b/graylog2-server/src/main/java/org/graylog2/events/ClusterEventPeriodical.java
@@ -144,7 +144,12 @@ public class ClusterEventPeriodical extends Periodical {
public void doRun() {
try {
LOG.debug("Opening MongoDB cursor on \"{}\"", COLLECTION_NAME);
+
final DBCursor<ClusterEvent> cursor = eventCursor(nodeId);
+ if(LOG.isTraceEnabled()) {
+ LOG.trace("MongoDB query plan: {}", cursor.explain());
+ }
+
while (cursor.hasNext()) {
ClusterEvent clusterEvent = cursor.next();
LOG.trace("Processing cluster event: {}", clusterEvent);
|
Log MongoDB query plan on TRACE level in ClusterEventPeriodical
|
Graylog2_graylog2-server
|
train
|
java
|
9fc03ef40cfa8abdaef962ffb4b3d64b900326fd
|
diff --git a/src/MakeJsonCommand.php b/src/MakeJsonCommand.php
index <HASH>..<HASH> 100644
--- a/src/MakeJsonCommand.php
+++ b/src/MakeJsonCommand.php
@@ -107,8 +107,7 @@ class MakeJsonCommand extends WP_CLI_Command {
}
}
-
- WP_CLI::success( sprintf( 'Created %d %s.', $result_count, Utils\pluralize( 'file', $result_count) ), 'make-json' );
+ WP_CLI::success( sprintf( 'Created %d %s.', $result_count, Utils\pluralize( 'file', $result_count) ) );
}
/**
|
Remove second arg to WP_CLI::success()
|
wp-cli_i18n-command
|
train
|
php
|
51da1fe2a105f2d76b7d6fba1496e91b3e1b622d
|
diff --git a/src/main/java/org/elasticsearch/plugin/mapper/attachments/tika/LocaleChecker.java b/src/main/java/org/elasticsearch/plugin/mapper/attachments/tika/LocaleChecker.java
index <HASH>..<HASH> 100644
--- a/src/main/java/org/elasticsearch/plugin/mapper/attachments/tika/LocaleChecker.java
+++ b/src/main/java/org/elasticsearch/plugin/mapper/attachments/tika/LocaleChecker.java
@@ -33,7 +33,7 @@ public class LocaleChecker {
public static int JVM_PATCH_MINOR_VERSION = 0;
static {
- StringTokenizer st = new StringTokenizer(Constants.JAVA_VERSION, ".");
+ StringTokenizer st = new StringTokenizer(Constants.JVM_SPEC_VERSION, ".");
JVM_MAJOR_VERSION = parseInt(st.nextToken());
if(st.hasMoreTokens()) {
JVM_MINOR_VERSION = parseInt(st.nextToken());
|
parse java.specification.version not java.version, so that it is robust
|
elastic_elasticsearch-mapper-attachments
|
train
|
java
|
a15b8e4e0b1a239e7d06ad1bbe9fe1e149c24910
|
diff --git a/sorl/thumbnail/engines/pgmagick.py b/sorl/thumbnail/engines/pgmagick.py
index <HASH>..<HASH> 100644
--- a/sorl/thumbnail/engines/pgmagick.py
+++ b/sorl/thumbnail/engines/pgmagick.py
@@ -3,7 +3,7 @@ from ..pgmagick import Image
from sorl.thumbnail.engines.base import EngineBase
try:
- from ..pgmagick._pgmagick import get_blob_datae
+ from ..pgmagick._pgmagick import get_blob_data
except ImportError:
from base64 import b64decode
def get_blob_data(blob):
|
adding simpler way to access blob data, thanks dotsbb. Since its not part of the public pgmagick, provide fallback
|
jazzband_sorl-thumbnail
|
train
|
py
|
9bc874646877accd188ef0ba01c43def26c9a5a0
|
diff --git a/glances/glances.py b/glances/glances.py
index <HASH>..<HASH> 100755
--- a/glances/glances.py
+++ b/glances/glances.py
@@ -44,7 +44,7 @@ import json
import collections
# Somes libs depends of OS
-is_Bsd = sys.platform.endswith('bsd')
+is_Bsd = sys.platform.find('bsd') != -1
is_Linux = sys.platform.startswith('linux')
is_Mac = sys.platform.startswith('darwin')
is_Windows = sys.platform.startswith('win')
|
Correct #Issue #<I>
|
nicolargo_glances
|
train
|
py
|
4e07cb6ab6787e70b214ac0f0442d92ed7482480
|
diff --git a/src/RoboFileBase.php b/src/RoboFileBase.php
index <HASH>..<HASH> 100644
--- a/src/RoboFileBase.php
+++ b/src/RoboFileBase.php
@@ -166,7 +166,7 @@ class RoboFileBase extends AbstractRoboFile
. ($extra['config-import'] ? ' --config-import' : '');
if (!$force && $this->siteInstalledTested) {
- $install = '[[ $(vendor/bin/drush sql-query "SHOW TABLES" | wc --lines) > 10 ]] || ' . $install;
+ $install = '[[ $(vendor/bin/drush sql-query "SHOW TABLES" | wc --lines) -gt 10 ]] || ' . $install;
}
return $this->taskSsh($worker, $auth)
|
#<I> Fixed comparison in bash command to check for siteInstalled
|
digipolisgent_robo-digipolis-drupal8
|
train
|
php
|
f3fa54788e5c13d0a34a916304e9e7a16664f5cc
|
diff --git a/plugins/rcpt_to.qmail_deliverable.js b/plugins/rcpt_to.qmail_deliverable.js
index <HASH>..<HASH> 100644
--- a/plugins/rcpt_to.qmail_deliverable.js
+++ b/plugins/rcpt_to.qmail_deliverable.js
@@ -9,9 +9,16 @@ var options = {
port: 8898,
};
+exports.register = function () {
+ var plugin = this;
+ var load_config = function () {
+ plugin.cfg = plugin.config.get('rcpt_to.qmail_deliverable.ini', load_config);
+ };
+ load_config();
+};
+
exports.hook_mail = function(next, connection, params) {
var plugin = this;
- plugin.cfg = plugin.config.get('rcpt_to.qmail_deliverable.ini');
if (!plugin.cfg.main.check_outbound) { return next(); }
|
qmd: load config at register, with cb
|
haraka_Haraka
|
train
|
js
|
33f8f61ffac193c7ccdeeb65a294925253460e6f
|
diff --git a/packages/onesignal/index.js b/packages/onesignal/index.js
index <HASH>..<HASH> 100755
--- a/packages/onesignal/index.js
+++ b/packages/onesignal/index.js
@@ -33,7 +33,7 @@ function addOneSignal (moduleOptions) {
cdn: true,
GcmSenderId: '482941778795',
importScripts: [
- '/sw.js'
+ '/sw.js?' + Date.now()
],
init: {
allowLocalhostAsSecureOrigin: true,
|
fix(onesignal): add cache query to sw.js
|
nuxt-community_pwa-module
|
train
|
js
|
cd6511db2dcc69d335e4d51a8f2a702f8ca5d487
|
diff --git a/lib/pork/context.rb b/lib/pork/context.rb
index <HASH>..<HASH> 100644
--- a/lib/pork/context.rb
+++ b/lib/pork/context.rb
@@ -1,12 +1,18 @@
+require 'pork/expect'
require 'pork/error'
module Pork
module Context
+ private
def initialize desc
@__pork__desc__ = desc
end
+ def expect *args, &block
+ Expect.new(self.class.stat, *args, &block)
+ end
+
def skip
raise Skip.new("Skipping #{@__pork__desc__}")
end
diff --git a/lib/pork/expect.rb b/lib/pork/expect.rb
index <HASH>..<HASH> 100644
--- a/lib/pork/expect.rb
+++ b/lib/pork/expect.rb
@@ -4,7 +4,7 @@ require 'pork/inspect'
module Pork
class Expect < BasicObject
instance_methods.each{ |m| undef_method(m) unless m =~ /^__|^object_id$/ }
- def initialize stat, object, message=nil, message_lazy=nil, &checker
+ def initialize stat, object=nil, message=nil, message_lazy=nil, &checker
@stat, @object, @negate = stat, object, false
@message, @message_lazy = message, message_lazy
satisfy(&checker) if checker
|
context api should be private and expect api should work
|
godfat_pork
|
train
|
rb,rb
|
911df6829993b8638bc0dd29d01cd62d57173a27
|
diff --git a/db/sql.php b/db/sql.php
index <HASH>..<HASH> 100644
--- a/db/sql.php
+++ b/db/sql.php
@@ -297,6 +297,13 @@ class SQL {
* @param $ttl int|array
**/
function schema($table,$fields=NULL,$ttl=0) {
+ $fw=\Base::instance();
+ $cache=\Cache::instance();
+ if ($fw->get('CACHE') && $ttl &&
+ ($cached=$cache->exists(
+ $hash=$fw->hash($this->dsn.$table).'.schema',$result)) &&
+ $cached[0]+$ttl>microtime(TRUE))
+ return $result;
if (strpos($table,'.'))
list($schema,$table)=explode('.',$table);
// Supported engines
@@ -380,6 +387,9 @@ class SQL {
'pkey'=>$row[$val[6]]==$val[7]
];
}
+ if ($fw->get('CACHE') && $ttl)
+ // Save to cache backend
+ $cache->set($hash,$rows,$ttl);
return $rows;
}
user_error(sprintf(self::E_PKey,$table),E_USER_ERROR);
|
Cache parsed schema for the TTL duration
|
bcosca_fatfree-core
|
train
|
php
|
dd90467c0fd90f8a376e8984b967a538c7b4744d
|
diff --git a/firefly-common/src/main/java/com/fireflysource/common/lifecycle/AbstractLifeCycle.java b/firefly-common/src/main/java/com/fireflysource/common/lifecycle/AbstractLifeCycle.java
index <HASH>..<HASH> 100644
--- a/firefly-common/src/main/java/com/fireflysource/common/lifecycle/AbstractLifeCycle.java
+++ b/firefly-common/src/main/java/com/fireflysource/common/lifecycle/AbstractLifeCycle.java
@@ -28,7 +28,7 @@ public abstract class AbstractLifeCycle implements LifeCycle {
}
}
- protected AtomicBoolean start;
+ protected AtomicBoolean start = new AtomicBoolean(false);
public AbstractLifeCycle() {
stopActions.add(this::stop);
|
[fix]: the start flag is null
|
hypercube1024_firefly
|
train
|
java
|
d257d3054f36b4f3dfaba8b7394a2e8bab0aaf2e
|
diff --git a/src/saml2/client_base.py b/src/saml2/client_base.py
index <HASH>..<HASH> 100644
--- a/src/saml2/client_base.py
+++ b/src/saml2/client_base.py
@@ -371,13 +371,12 @@ class Base(Entity):
except KeyError:
nsprefix = None
- try:
- force_authn = kwargs['force_authn']
- except KeyError:
- force_authn = self.config.getattr('force_authn', 'sp')
- finally:
- if force_authn:
- args['force_authn'] = 'true'
+ force_authn = (
+ kwargs.get("force_authn")
+ or self.config.getattr('force_authn', 'sp')
+ )
+ if str(force_authn).lower() == 'true':
+ args['force_authn'] = 'true'
conf_sp_type = self.config.getattr('sp_type', 'sp')
conf_sp_type_in_md = self.config.getattr('sp_type_in_metadata', 'sp')
|
Set force_authn only when the value is "true"
|
IdentityPython_pysaml2
|
train
|
py
|
e0fe83cbf97ab8da7a4c5ed7aced88be2bcbdab8
|
diff --git a/web-server.js b/web-server.js
index <HASH>..<HASH> 100755
--- a/web-server.js
+++ b/web-server.js
@@ -40,8 +40,12 @@ function HttpServer(handlers) {
HttpServer.prototype.start = function(port) {
this.port = port;
- this.server.listen(port);
- util.puts('Http Server running at http://localhost:' + port + '/');
+ console.log("Starting web server at http://localhost:" + port + "/");
+ this.server.listen(port).on('error', function(err) {
+ if (err.code === "EADDRINUSE") {
+ console.error("\033[31mPort %d is already in use, can't start web server.", port);
+ }
+ });
};
HttpServer.prototype.parseUrl_ = function(urlString) {
|
Bug <I> - Print a friendly error message when port is already in use when web-server.js is run.
Adds a simple 'error' event listener to HttpServer.start. If
error code is "EADDRINUSE", the port is already in use, so prints
a message saying the port is in use, instead of just throwing out
the error.
|
mozilla_treeherder
|
train
|
js
|
d9c8453f49213b856ddb0e7be2913eda3f90e77b
|
diff --git a/kayvee.go b/kayvee.go
index <HASH>..<HASH> 100644
--- a/kayvee.go
+++ b/kayvee.go
@@ -5,12 +5,15 @@ import (
)
// Log Levels:
-const Unknown = "unknown"
-const Critical = "critical"
-const Error = "error"
-const Warning = "warning"
-const Info = "info"
-const Trace = "trace"
+
+type LogLevel string
+
+const Unknown LogLevel = "unknown"
+const Critical LogLevel = "critical"
+const Error LogLevel = "error"
+const Warning LogLevel = "warning"
+const Info LogLevel = "info"
+const Trace LogLevel = "trace"
// Format converts a map to a string of space-delimited key=val pairs
func Format(data map[string]interface{}) string {
@@ -19,7 +22,7 @@ func Format(data map[string]interface{}) string {
}
// FormatLog is similar to Format, but takes additional reserved params to promote logging best-practices
-func FormatLog(source string, level string, title string, data map[string]interface{}) string {
+func FormatLog(source string, level LogLevel, title string, data map[string]interface{}) string {
if data == nil {
data = make(map[string]interface{})
}
|
use LogLevel type for log level constants
|
Clever_kayvee-go
|
train
|
go
|
06f9ae7eb48558d202c7eff1e9a9538ed74b4292
|
diff --git a/src/XML2Array.php b/src/XML2Array.php
index <HASH>..<HASH> 100644
--- a/src/XML2Array.php
+++ b/src/XML2Array.php
@@ -32,7 +32,8 @@ class XML2Array
*
* @param string $inputXml - xml to convert
*
- * @return \DOMDocument
+ * @return array
+ *
* @throws \InvalidArgumentException
*/
public static function createArray($inputXml)
|
fix #1 - Return type of createArray is wrong
|
rafrsr_lib-array2xml
|
train
|
php
|
97d5639bb2c28289e33afadf6c94df4ef757de8a
|
diff --git a/lib/ariane.rb b/lib/ariane.rb
index <HASH>..<HASH> 100644
--- a/lib/ariane.rb
+++ b/lib/ariane.rb
@@ -53,7 +53,7 @@ module Ariane
@session = session
end
- # Internal: Gets the request environment.
+ # Internal: Gets the user session hash
#
# Returns the session object
def session
@@ -140,7 +140,11 @@ module Ariane
#
# Returns the current or default option.
def use_session_stack
- @use_session_stack ||= false
+ if defined? @use_session_stack
+ return @user_session_stack
+ else
+ return false
+ end
end
# Public: Returns session stack setting
|
Removed ||= for boolean value check in @use_session_stack
|
simonc_ariane
|
train
|
rb
|
543b8da8cb0c992451892afa996cbd0b56688a22
|
diff --git a/ssbio/core/protein.py b/ssbio/core/protein.py
index <HASH>..<HASH> 100644
--- a/ssbio/core/protein.py
+++ b/ssbio/core/protein.py
@@ -2111,8 +2111,6 @@ class Protein(Object):
structprop = self.representative_structure
chain_id = self.representative_chain
- chain = structprop.chains.get_by_id(chain_id)
-
log.debug('Using sequence: {}, structure: {}, chain: {}'.format(seqprop.id, structprop.id, chain_id))
# Create a new SeqFeature
@@ -2129,6 +2127,8 @@ class Protein(Object):
all_info['seq_residue'] = str(seq_features.seq)
if structprop:
+ chain = structprop.chains.get_by_id(chain_id)
+
# Get structure properties
mapping_to_structure_resnum = self.map_seqprop_resnums_to_structprop_resnums(resnums=seq_resnum,
seqprop=seqprop,
|
Move chain retrieval in get_residue_annotations to after structure check
|
SBRG_ssbio
|
train
|
py
|
75ccd1852af9b906240b7bebc9d38b8bbdfc0162
|
diff --git a/src/Routing/Route.php b/src/Routing/Route.php
index <HASH>..<HASH> 100644
--- a/src/Routing/Route.php
+++ b/src/Routing/Route.php
@@ -229,7 +229,7 @@ class Route
*/
public function isPartCountSame($url)
{
- return count(explode('/', $url)) === count(explode('/', $this->url));
+ return count(explode('/', rtrim($url, '/'))) === count(explode('/', rtrim($this->url, '/')));
}
/**
|
Removed trailing slashes in URLs in isPartCountSame
The isPartCountSame method made a difference between a URL with and without trailing slash. This occurred on a route like `/something/{parameter}`. `/something/<I>` matched but `/something/<I>/` did not. Now it does.
|
devvoh_parable
|
train
|
php
|
a7409db46ab3630a6c9c4163223b6722a0e49f82
|
diff --git a/mod/data/edit.php b/mod/data/edit.php
index <HASH>..<HASH> 100755
--- a/mod/data/edit.php
+++ b/mod/data/edit.php
@@ -310,7 +310,9 @@ if ($data->addtemplate){
$newtext = '';
}
-echo $newtext;
+$formatoptions = (object)array('noclean'=>true, 'para'=>false, 'filter'=>true);
+echo format_text($newtext, FORMAT_HTML, $formatoptions);
+
echo '<div class="mdl-align"><input type="submit" name="saveandview" value="'.get_string('saveandview','data').'" />';
if ($rid) {
echo ' <input type="submit" name="cancel" value="'.get_string('cancel').'" onclick="javascript:history.go(-1)" />';
|
filters MDL-<I> added filtering for when adding a database activity entry
|
moodle_moodle
|
train
|
php
|
14c9215dd3afa7613c768a71baf40224df5e6aca
|
diff --git a/core/state/statedb.go b/core/state/statedb.go
index <HASH>..<HASH> 100644
--- a/core/state/statedb.go
+++ b/core/state/statedb.go
@@ -517,7 +517,17 @@ func (self *StateDB) GetRefund() uint64 {
// and clears the journal as well as the refunds.
func (s *StateDB) Finalise(deleteEmptyObjects bool) {
for addr := range s.journal.dirties {
- stateObject := s.stateObjects[addr]
+ stateObject, exist := s.stateObjects[addr]
+ if !exist {
+ // ripeMD is 'touched' at block 1714175, in tx 0x1237f737031e40bcde4a8b7e717b2d15e3ecadfe49bb1bbc71ee9deb09c6fcf2
+ // That tx goes out of gas, and although the notion of 'touched' does not exist there, the
+ // touch-event will still be recorded in the journal. Since ripeMD is a special snowflake,
+ // it will persist in the journal even though the journal is reverted. In this special circumstance,
+ // it may exist in `s.journal.dirties` but not in `s.stateObjects`.
+ // Thus, we can safely ignore it here
+ continue
+ }
+
if stateObject.suicided || (deleteEmptyObjects && stateObject.empty()) {
s.deleteStateObject(stateObject)
} else {
|
state: handle nil in journal dirties
|
ethereum_go-ethereum
|
train
|
go
|
d27a8e9866e4d0525309e103befff89a17136218
|
diff --git a/src/filters/BasePSRFilter.php b/src/filters/BasePSRFilter.php
index <HASH>..<HASH> 100644
--- a/src/filters/BasePSRFilter.php
+++ b/src/filters/BasePSRFilter.php
@@ -52,7 +52,7 @@ abstract class BasePSRFilter implements Builder {
$classes =
(new Map($this->source->getAutoloadMap()['class']))->filterWithKey(
function(string $class_name, string $file): bool {
- if (\stripos($class_name, $this->prefix) !== 0) {
+ if ($this->prefix !== '' && \stripos($class_name, $this->prefix) !== 0) {
return false;
}
$expected = static::getExpectedPathWithoutExtension(
|
Supporting PSR-{0,4} autoloading without a prefix
This is what Composer considers the "fallback" syntax.
<URL>
|
hhvm_hhvm-autoload
|
train
|
php
|
8d8d5e11afc91bd7ffd52b767c640dd5bd263ea4
|
diff --git a/astrocats/supernovae/tasks/general_data.py b/astrocats/supernovae/tasks/general_data.py
index <HASH>..<HASH> 100644
--- a/astrocats/supernovae/tasks/general_data.py
+++ b/astrocats/supernovae/tasks/general_data.py
@@ -1,3 +1,4 @@
+# -*- coding: utf-8 -*-
"""General data import tasks.
"""
import os
|
MAINT: added coding for sphinx
|
astrocatalogs_astrocats
|
train
|
py
|
d16dfdaee3dbcc8bdca96f2367ec3e28875f9191
|
diff --git a/lib/models/room-state.js b/lib/models/room-state.js
index <HASH>..<HASH> 100644
--- a/lib/models/room-state.js
+++ b/lib/models/room-state.js
@@ -156,6 +156,7 @@ RoomState.prototype.setStateEvents = function(stateEvents) {
var members = utils.values(self.members);
utils.forEach(members, function(member) {
member.setPowerLevelEvent(event);
+ self.emit("RoomState.members", event, self, member);
});
}
});
|
Also emit a 'RoomState.members' event for m.room.power_levels
|
matrix-org_matrix-js-sdk
|
train
|
js
|
10b44fb1e3ca28e2db1f87bafb6d5835ac3481c6
|
diff --git a/src/Kiczort/PolishValidatorBundle/Validator/Constraints/PeselValidator.php b/src/Kiczort/PolishValidatorBundle/Validator/Constraints/PeselValidator.php
index <HASH>..<HASH> 100644
--- a/src/Kiczort/PolishValidatorBundle/Validator/Constraints/PeselValidator.php
+++ b/src/Kiczort/PolishValidatorBundle/Validator/Constraints/PeselValidator.php
@@ -33,7 +33,7 @@ class PeselValidator extends ValidatorAbstract
*/
public function getValidationOptions(Constraint $constraint)
{
- return array('strict' => (bool)$constraint->strict);
+ return array('strict' => (bool) $constraint->strict);
}
/**
|
Scrutinizer Auto-Fixes
This commit consists of patches automatically generated for this project on <URL>
|
kiczort_polish-validator-bundle
|
train
|
php
|
56c92d888b4fbe9172c78bbb5bdea61945cb41fd
|
diff --git a/scenarios/api.github.com/paginate-issues/test.js b/scenarios/api.github.com/paginate-issues/test.js
index <HASH>..<HASH> 100644
--- a/scenarios/api.github.com/paginate-issues/test.js
+++ b/scenarios/api.github.com/paginate-issues/test.js
@@ -18,7 +18,7 @@ test('paginate issues', async (t) => {
}
await axios.request(Object.assign(options, {
- url: baseUrl
+ url: `${baseUrl}&page=1`
})).catch(mock.explain)
for (let i = 2; i <= 5; i++) {
|
test: pass ?page=1 to first request of paginate issues
|
octokit_fixtures
|
train
|
js
|
5e69c769ff1ce7c56d27edcf17fb9b28cd14980c
|
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -6,6 +6,7 @@ import shutil
import glob
import multiprocessing
from distutils.command.build import build as st_build
+from distutils.util import get_platform
from setuptools import setup
from setuptools.command.develop import develop as st_develop
@@ -122,6 +123,10 @@ cmdclass = {
'sdist': sdist,
}
+if "bdist_wheel" in sys.argv and "--plat-name" not in sys.argv:
+ sys.argv.append("--plat-name")
+ sys.argv.append(get_platform())
+
setup(
cmdclass=cmdclass,
)
|
Re-add platform tag to setup.py
|
angr_pyvex
|
train
|
py
|
e9751fdfc57e191a5b674041cf850d226b4d37cd
|
diff --git a/command/seal_migration_test.go b/command/seal_migration_test.go
index <HASH>..<HASH> 100644
--- a/command/seal_migration_test.go
+++ b/command/seal_migration_test.go
@@ -1,3 +1,5 @@
+// +build !enterprise
+
package command
import (
diff --git a/vault/core.go b/vault/core.go
index <HASH>..<HASH> 100644
--- a/vault/core.go
+++ b/vault/core.go
@@ -1146,8 +1146,6 @@ func (c *Core) sealInitCommon(ctx context.Context, req *logical.Request) (retErr
return retErr
}
- req.SetTokenEntry(te)
-
// Audit-log the request before going any further
auth := &logical.Auth{
ClientToken: req.ClientToken,
diff --git a/vault/request_handling.go b/vault/request_handling.go
index <HASH>..<HASH> 100644
--- a/vault/request_handling.go
+++ b/vault/request_handling.go
@@ -136,6 +136,8 @@ func (c *Core) fetchACLTokenEntryAndEntity(ctx context.Context, req *logical.Req
c.logger.Error("failed to lookup token", "error", err)
return nil, nil, nil, nil, ErrInternalError
}
+ // Set the token entry here since it has not been cached yet
+ req.SetTokenEntry(te)
default:
te = req.TokenEntry()
}
|
Set request token entry within fetchACLTokenEntryAndEntity (#<I>)
|
hashicorp_vault
|
train
|
go,go,go
|
48f06376abe23812e03ee4f5f872872b18e25330
|
diff --git a/src/components/networked.js b/src/components/networked.js
index <HASH>..<HASH> 100644
--- a/src/components/networked.js
+++ b/src/components/networked.js
@@ -3,7 +3,7 @@ var deepEqual = require('fast-deep-equal');
var InterpolationBuffer = require('buffered-interpolation');
var DEG2RAD = THREE.Math.DEG2RAD;
-function defaultNetworkUpdatePredicate() {
+function defaultRequiresUpdate() {
let cachedData = null;
return (newData) => {
@@ -54,13 +54,7 @@ AFRAME.registerComponent('networked', {
this.syncData = {};
this.componentSchemas = NAF.schemas.getComponents(this.data.template);
this.cachedElements = new Array(this.componentSchemas.length);
- this.networkUpdatePredicates = this.componentSchemas.map((componentSchema) => {
- if (componentSchema.requiresNetworkUpdate) {
- return componentSchema.requiresNetworkUpdate();
- }
-
- return defaultNetworkUpdatePredicate();
- });
+ this.networkUpdatePredicates = this.componentSchemas.map(x => x.requiresNetworkUpdate || defaultRequiresUpdate());
// Fill cachedElements array with null elements
this.invalidateCachedElements();
|
Small refactoring to network update predicates
|
networked-aframe_networked-aframe
|
train
|
js
|
9d7ec4b895ec64235ef74332a1007f544819c867
|
diff --git a/multiqc/modules/picard/picard.py b/multiqc/modules/picard/picard.py
index <HASH>..<HASH> 100755
--- a/multiqc/modules/picard/picard.py
+++ b/multiqc/modules/picard/picard.py
@@ -123,7 +123,8 @@ class MultiqcModule(BaseMultiqcModule):
config = {
'title': 'Picard Deduplication Stats',
'ylab': '# Reads',
- 'cpswitch_counts_label': 'Number of Reads'
+ 'cpswitch_counts_label': 'Number of Reads',
+ 'cpswitch_c_active': False
}
return self.plot_bargraph(self.picard_dupMetrics_data, keys, config)
|
Picard MarkDups percent plot by default. Closes #<I>.
|
ewels_MultiQC
|
train
|
py
|
7fb44d1d69e36300f2e6b176615b399895546a9b
|
diff --git a/lib/browser/element.js b/lib/browser/element.js
index <HASH>..<HASH> 100644
--- a/lib/browser/element.js
+++ b/lib/browser/element.js
@@ -93,7 +93,8 @@ exports.assertElement = function assertElement(selector, asserter) {
default:
throw new Error(
- 'Selector .message has 3 hits on the page, assertions require unique elements');
+ 'Selector ' + selector + ' has ' + elements.length +
+ ' hits on the page, assertions require unique elements');
}
});
return element.then(asserter.assert).then(_.constant(element));
|
Properly generate the too many elements error
|
testiumjs_testium-driver-wd
|
train
|
js
|
3d2666d1d2022d7d0f0ad55a11d7171f5d9d7de8
|
diff --git a/core/src/main/java/com/aspectran/core/component/bean/annotation/Transform.java b/core/src/main/java/com/aspectran/core/component/bean/annotation/Transform.java
index <HASH>..<HASH> 100755
--- a/core/src/main/java/com/aspectran/core/component/bean/annotation/Transform.java
+++ b/core/src/main/java/com/aspectran/core/component/bean/annotation/Transform.java
@@ -32,7 +32,7 @@ public @interface Transform {
String contentType() default "";
- String templateId() default "";
+ String template() default "";
String encoding() default "";
|
Renamed annotation element transformId() to transform()
|
aspectran_aspectran
|
train
|
java
|
3a308264ec878229a05e3911396aeda8e95e7072
|
diff --git a/test/test_helper.rb b/test/test_helper.rb
index <HASH>..<HASH> 100644
--- a/test/test_helper.rb
+++ b/test/test_helper.rb
@@ -48,9 +48,3 @@ module Kernel
puts "can't use KeyValue backend because: #{e.message}"
end
end
-
-Object.class_eval do
- def meta_class
- class << self; self; end
- end
-end unless Object.method_defined?(:meta_class)
|
Get rid of unused method on test helper
|
ruby-i18n_i18n
|
train
|
rb
|
741ea75586931b439c7b3c2ba4bb7f75ff80970a
|
diff --git a/chef/lib/chef/knife/bootstrap.rb b/chef/lib/chef/knife/bootstrap.rb
index <HASH>..<HASH> 100644
--- a/chef/lib/chef/knife/bootstrap.rb
+++ b/chef/lib/chef/knife/bootstrap.rb
@@ -120,13 +120,13 @@ class Chef
:boolean => true,
:default => true
- Chef::Config[:knife][:hints] ||= Hash.new
option :hint,
:long => "--hint HINT_NAME[=HINT_FILE]",
:description => "Specify Ohai Hint to be set on the bootstrap target. Use multiple --hint options to specify multiple hints.",
:proc => Proc.new { |h|
- name, path = h.split("=")
- Chef::Config[:knife][:hints][name] = path ? JSON.parse(::File.read(path)) : Hash.new }
+ Chef::Config[:knife][:hints] ||= Hash.new
+ name, path = h.split("=")
+ Chef::Config[:knife][:hints][name] = path ? JSON.parse(::File.read(path)) : Hash.new }
def load_template(template=nil)
# Are we bootstrapping using an already shipped template?
|
Ensure Chef::Config[:knife][:hints] in proc
Unit tests for the hint system can fail if the entire bootstrap class isn't
loaded because the creation of the hints attribute was outside of the block.
|
chef_chef
|
train
|
rb
|
5b68fefd9bdf4a56344e7e01a8999142c7c7f583
|
diff --git a/languagetool-language-modules/de/src/main/java/org/languagetool/tokenizers/de/GermanCompoundTokenizer.java b/languagetool-language-modules/de/src/main/java/org/languagetool/tokenizers/de/GermanCompoundTokenizer.java
index <HASH>..<HASH> 100644
--- a/languagetool-language-modules/de/src/main/java/org/languagetool/tokenizers/de/GermanCompoundTokenizer.java
+++ b/languagetool-language-modules/de/src/main/java/org/languagetool/tokenizers/de/GermanCompoundTokenizer.java
@@ -99,6 +99,8 @@ public class GermanCompoundTokenizer implements Tokenizer {
wordSplitter.addException("Erziehungstrick", asList("Erziehungs", "trick"));
wordSplitter.addException("Erziehungstricks", asList("Erziehungs", "tricks"));
wordSplitter.addException("karamelligen", asList("karamelligen")); // != Karamel+Ligen
+ wordSplitter.addException("Häkelnadel", asList("Häkel", "nadel"));
+ wordSplitter.addException("Häkelnadeln", asList("Häkel", "nadeln"));
wordSplitter.setStrictMode(strictMode);
wordSplitter.setMinimumWordLength(3);
}
|
[de] fix "Häkelnadel" split (#<I>)
|
languagetool-org_languagetool
|
train
|
java
|
f55a8ccd8a021216051d4c59bc46dec3f3849ae0
|
diff --git a/openTSNE/initialization.py b/openTSNE/initialization.py
index <HASH>..<HASH> 100644
--- a/openTSNE/initialization.py
+++ b/openTSNE/initialization.py
@@ -98,7 +98,7 @@ def pca(X, n_components=2, svd_solver="auto", random_state=None, verbose=False):
return np.ascontiguousarray(embedding)
-def spectral(A, n_components=2, tol=1e-4, max_iter=None, verbose=False):
+def spectral(A, n_components=2, tol=1e-4, max_iter=None, random_state=None, verbose=False):
"""Initialize an embedding using the spectral embedding of the KNN graph.
Specifically, we initialize data points by computing the diffusion map on
@@ -119,6 +119,9 @@ def spectral(A, n_components=2, tol=1e-4, max_iter=None, verbose=False):
max_iter: float
See scipy.sparse.linalg.eigsh documentation.
+ random_state: Any
+ Unused, but kept for consistency between initialization schemes.
+
verbose: bool
Returns
|
Reintroduce random_state to spectral init for consistency
|
pavlin-policar_openTSNE
|
train
|
py
|
602453855ea57e9c9ddf04f473a7e18f5ad9a8e5
|
diff --git a/test.js b/test.js
index <HASH>..<HASH> 100644
--- a/test.js
+++ b/test.js
@@ -273,13 +273,19 @@ describe('InfluxDB', function () {
})
describe('#dropDatabase', function () {
- this.timeout(25000)
+ beforeEach(function (done) {
+ client.createDatabase(info.db.name, done)
+ })
it('should delete the database without error', function (done) {
client.dropDatabase(info.db.name, done)
})
- it('should not error if database didn\'t exist', function (done) {
+ it('should error if database didn\'t exist', function (done) {
client.dropDatabase(info.db.name, function (err) {
- done(err)
+ if (err) return done(err)
+ client.dropDatabase(info.db.name, function (err) {
+ assert(err instanceof Error)
+ done()
+ })
})
})
})
|
test: dropping a non-existant database should err
|
node-influx_node-influx
|
train
|
js
|
1e6c85ccb284732169a52072d0fe51a3f565a9f8
|
diff --git a/pydsl/Interaction/Shell.py b/pydsl/Interaction/Shell.py
index <HASH>..<HASH> 100644
--- a/pydsl/Interaction/Shell.py
+++ b/pydsl/Interaction/Shell.py
@@ -111,7 +111,10 @@ class CommandLineToTransformerInteraction:
resultdic[key] = str(resultdic[key])
except UnicodeDecodeError:
resultdic[key] = "Unprintable"
- print(str(resultdic) + "\n")
+ if len(resultdic) == 1:
+ print(str(list(resultdic.values())[0]) + "\n")
+ else:
+ print(str(resultdic) + "\n")
value = self._getInput()
print("Bye Bye")
|
prints only value if the output has length 1
|
nesaro_pydsl
|
train
|
py
|
5b6ca785ea24e45acc5889894081cb3c0d1d60c4
|
diff --git a/plugin.php b/plugin.php
index <HASH>..<HASH> 100755
--- a/plugin.php
+++ b/plugin.php
@@ -83,7 +83,10 @@ if ( ! class_exists( 'WP_REST_Comments_Controller' ) ) {
* WP_REST_Settings_Controller class.
*/
if ( ! class_exists( 'WP_REST_Settings_Controller' ) ) {
- require_once dirname( __FILE__ ) . '/lib/endpoints/class-wp-rest-settings-controller.php';
+ global $wp_version;
+ if ( version_compare( $wp_version, '4.7-alpha', '>=' ) ) {
+ require_once dirname( __FILE__ ) . '/lib/endpoints/class-wp-rest-settings-controller.php';
+ }
}
/**
|
Only include the settings controller on <I>
|
WP-API_WP-API
|
train
|
php
|
274346825e9bb475c1cbbd5b0af8f79cec0bc40b
|
diff --git a/acceptancetests/assess_persistent_storage.py b/acceptancetests/assess_persistent_storage.py
index <HASH>..<HASH> 100755
--- a/acceptancetests/assess_persistent_storage.py
+++ b/acceptancetests/assess_persistent_storage.py
@@ -335,7 +335,7 @@ def assess_charm_removal_single_block_and_filesystem_storage(client):
# storage status change after remove-application takes some time.
# from experiments even 30 seconds is not enough.
wait_for_storage_status_update(
- client, storage_id=single_fs_id, interval=15, timeout=90)
+ client, storage_id=single_fs_id, interval=15, timeout=180)
storage_list = get_storage_list(client)[0]
assert_storage_count(storage_list=storage_list, expected=1)
if single_fs_id in storage_list:
|
Increase the wait time for the storage to be detached in CI test
I haven't been able to directly reproduce the failure locally, but if
I take the wait time right down I can get the test to fail in the same
way. Doubling the wait time should get it to pass more reliably.
|
juju_juju
|
train
|
py
|
38f6d8f043d84e755b380a12f8f6cf5313cee96d
|
diff --git a/config/environments/test.rb b/config/environments/test.rb
index <HASH>..<HASH> 100644
--- a/config/environments/test.rb
+++ b/config/environments/test.rb
@@ -30,6 +30,6 @@ config.action_controller.allow_forgery_protection = false
# ActionMailer::Base.deliveries array.
config.action_mailer.delivery_method = :test
-config.gem "rspec-rails", :version => ">=1.2.6", :lib => false
-config.gem "webrat", :version => ">=0.4.4", :lib => false
-config.gem "cucumber", :version => ">=0.3.9", :lib => false
\ No newline at end of file
+config.gem "rspec-rails", :version => ">=1.2.9", :lib => false
+config.gem "webrat", :version => ">=0.5.3", :lib => false
+config.gem "cucumber", :version => ">=0.4.4", :lib => false
\ No newline at end of file
|
update rspec-rails, webrat, and cucumber dependencies
|
radiant_radiant
|
train
|
rb
|
8dc191a4cd7817653f1349d6b251023f94ba534e
|
diff --git a/spec/support/test_model.rb b/spec/support/test_model.rb
index <HASH>..<HASH> 100644
--- a/spec/support/test_model.rb
+++ b/spec/support/test_model.rb
@@ -48,7 +48,7 @@ module TestModel
end
def method_missing(method_id, *args, &block)
- if attribute_method?(method_id.to_s)
+ if !matched_attribute_method(method_id.to_s).nil?
self.class.define_attribute_methods self.class.model_attributes.keys
send(method_id, *args, &block)
else
|
Update TextModel method_missing with current ActiveModel methods
|
adzap_validates_timeliness
|
train
|
rb
|
fe0ad96ce3da1edc429dc5f764296605c8e0223e
|
diff --git a/lib/moan.js b/lib/moan.js
index <HASH>..<HASH> 100644
--- a/lib/moan.js
+++ b/lib/moan.js
@@ -598,10 +598,10 @@ class Moan extends EventEmitter {
task
.on('completed', (value) => {
- this.emit('completed', value, task.name)
+ this.emit('completed', task.name, value)
})
.on('failed', (error) => {
- this.emit('failed', error, task.name)
+ this.emit('failed', task.name, error)
})
return this
diff --git a/test/moan.spec.js b/test/moan.spec.js
index <HASH>..<HASH> 100644
--- a/test/moan.spec.js
+++ b/test/moan.spec.js
@@ -541,7 +541,14 @@ describe('Moan', () => {
})
describe('#task', () => {
- // TODO: Complete unit tests
+ it('should create and register a task with the name', () => {
+ let dependencies = [ 'fu', 'baz' ]
+ function runnable() {}
+
+ expect(moan.task('foo', dependencies, runnable)).to.be(moan)
+
+ expect(moan.tasks).to.eql([ 'foo' ])
+ })
})
describe('#tasks', () => {
|
added tests to cover moan#task
|
neocotic_moan
|
train
|
js,js
|
f838389da0530201849958444dbbe60977935ad0
|
diff --git a/lib/puppet/status.rb b/lib/puppet/status.rb
index <HASH>..<HASH> 100644
--- a/lib/puppet/status.rb
+++ b/lib/puppet/status.rb
@@ -17,4 +17,12 @@ class Puppet::Status
def self.from_pson( pson )
self.new( pson )
end
+
+ def name
+ "status"
+ end
+
+ def name=(name)
+ # NOOP
+ end
end
diff --git a/spec/unit/status.rb b/spec/unit/status.rb
index <HASH>..<HASH> 100644
--- a/spec/unit/status.rb
+++ b/spec/unit/status.rb
@@ -20,4 +20,12 @@ describe Puppet::Status do
status = Puppet::Status.new( { "is_alive" => false } )
status.status.should == { "is_alive" => false }
end
+
+ it "should have a name" do
+ Puppet::Status.new.name
+ end
+
+ it "should allow a name to be set" do
+ Puppet::Status.new.name = "status"
+ end
end
|
Fix a failing test in #<I>
|
puppetlabs_puppet
|
train
|
rb,rb
|
c17d2b3d87d5da7be52fe0b25caa84719086b44d
|
diff --git a/code/cart/CartForm.php b/code/cart/CartForm.php
index <HASH>..<HASH> 100644
--- a/code/cart/CartForm.php
+++ b/code/cart/CartForm.php
@@ -57,7 +57,7 @@ class CartForm extends Form{
continue;
}
//delete lines
- if(isset($fields['Remove'])){
+ if(isset($fields['Remove']) || (isset($fields['Quantity']) && (int)$fields['Quantity'] <= 0)){
$items->remove($item);
$removecount++;
continue;
@@ -68,7 +68,9 @@ class CartForm extends Form{
}
//update variations
if(isset($fields['ProductVariationID']) && $id = Convert::raw2sql($fields['ProductVariationID'])){
- $item->ProductVariationID = $id;
+ if($item->ProductVariationID != $id){
+ $item->ProductVariationID = $id;
+ }
}
//TODO: make updates through ShoppingCart class
//TODO: combine with items that now match exactly
@@ -78,9 +80,10 @@ class CartForm extends Form{
$updatecount++;
}
}
+
}
if($removecount){
- $messages['remove'] = "Removed ".$updatecount." items.";
+ $messages['remove'] = "Removed ".$removecount." items.";
}
if($updatecount){
$messages['updatecount'] = "Updated ".$updatecount." items.";
|
FIX: allow removing items via CartForm by entering 0 or less for quantity.
FIX: VaraitionField was always causing a ‘change’, even though nothing changed.
|
silvershop_silvershop-core
|
train
|
php
|
ac63a20811ebb35453dc2716cef0b33d60b36018
|
diff --git a/tests/TestCase/Console/Command/Task/TestTaskTest.php b/tests/TestCase/Console/Command/Task/TestTaskTest.php
index <HASH>..<HASH> 100644
--- a/tests/TestCase/Console/Command/Task/TestTaskTest.php
+++ b/tests/TestCase/Console/Command/Task/TestTaskTest.php
@@ -216,6 +216,7 @@ class TestTaskTest extends TestCase {
* @return void
*/
public function testFilePathGenerationModelRepeated() {
+ $this->markTestIncomplete('Not working for some reason');
$this->Task->expects($this->never())->method('err');
$this->Task->expects($this->never())->method('_stop');
|
Skip failing tests.
I'll revisit this when updating the test generator.
|
cakephp_cakephp
|
train
|
php
|
e0ecb7f0289cafe82a9dd6a51470269eecf5a38d
|
diff --git a/bin/codecept.js b/bin/codecept.js
index <HASH>..<HASH> 100755
--- a/bin/codecept.js
+++ b/bin/codecept.js
@@ -24,7 +24,7 @@ program.command('list [path]')
.action(require('../lib/command/list'));
program.command('def [path]')
- .description('List all actions for I.')
+ .description('Generates TypeScript definitions for all I actions.')
.option('-c, --config [file]', 'configuration file to be used')
.action(require('../lib/command/definitions'));
|
Use proper def command description (#<I>)
|
Codeception_CodeceptJS
|
train
|
js
|
91660435482b35b1ff23fef945ba2728fcc8c0df
|
diff --git a/app/scripts/services/tile-proxy.js b/app/scripts/services/tile-proxy.js
index <HASH>..<HASH> 100644
--- a/app/scripts/services/tile-proxy.js
+++ b/app/scripts/services/tile-proxy.js
@@ -17,7 +17,12 @@ import {
const MAX_FETCH_TILES = 20;
+const str = document.currentScript.src
+const pathName = str.substring(0, str.lastIndexOf("/"));
+const workerPath = `${pathName}/worker.js`;
+
const setPixPool = new Pool(1);
+
setPixPool.run(function(params, done) {
try {
const array = new Float32Array(params.data);
@@ -36,7 +41,8 @@ setPixPool.run(function(params, done) {
} catch (err) {
console.log('err:', err);
}
-}, ['http://localhost:8080/worker.js']);
+}, [workerPath]);
+
const fetchTilesPool = new Pool(10);
fetchTilesPool.run(function(params, done) {
@@ -50,7 +56,7 @@ fetchTilesPool.run(function(params, done) {
} catch (err) {
console.log('err:', err);
}
-}, ['http://localhost:8080/worker.js']);
+}, [workerPath]);
import pubSub from './pub-sub';
|
Specify worker as an absolute path
|
higlass_higlass
|
train
|
js
|
1af25c4b1b9c438c4aec5f90162728a54f9e3530
|
diff --git a/aegea/iam.py b/aegea/iam.py
index <HASH>..<HASH> 100644
--- a/aegea/iam.py
+++ b/aegea/iam.py
@@ -6,6 +6,8 @@ from __future__ import absolute_import, division, print_function, unicode_litera
import os, sys, argparse, collections, random, string
+import botocore
+
from . import config, logger
from .ls import register_parser, register_listing_parser
from .util import Timestamp, paginate, hashabledict
@@ -37,7 +39,10 @@ def users(args):
return ">>>" if row.user_id == current_user.user_id else ""
def describe_mfa(cell, row):
- return "Enabled" if list(row.mfa_devices.all()) else "Disabled"
+ try:
+ return "Enabled" if list(row.mfa_devices.all()) else "Disabled"
+ except botocore.exceptions.ClientError:
+ return "Unknown"
users = list(resources.iam.users.all())
for user in users:
user.cur, user.mfa = "", ""
|
Avoid crashing when no access is given to MFA status
|
kislyuk_aegea
|
train
|
py
|
fae858006157d2c32784618aab40a491bc218a2d
|
diff --git a/src/HexBoard.js b/src/HexBoard.js
index <HASH>..<HASH> 100644
--- a/src/HexBoard.js
+++ b/src/HexBoard.js
@@ -59,7 +59,7 @@ module.exports = function HexBoard(canvas, window, backgroundColor) {
board.scene
);
//Set up anti-aliasing (required in babylon.js 3.0+)
- //board.postProcess = new babylon.FxaaPostProcess("fxaa", 1.0, board.camera);
+ board.postProcess = new babylon.FxaaPostProcess("fxaa", 1.0, board.camera);
board.camera.upVector = new babylon.Vector3(0, 0, 1);
board.camera.upperBetaLimit = Math.PI;
|
Anti-aliasing makes the svg images look nicer
|
chad-autry_hex-grid-map-3D
|
train
|
js
|
5ac908bcdcbd429bda63616e5dba26bb81b8f227
|
diff --git a/packages/react/src/components/DatePicker/DatePicker.js b/packages/react/src/components/DatePicker/DatePicker.js
index <HASH>..<HASH> 100644
--- a/packages/react/src/components/DatePicker/DatePicker.js
+++ b/packages/react/src/components/DatePicker/DatePicker.js
@@ -382,7 +382,7 @@ function DatePicker({
// Flatpickr's calendar dialog is not rendered in a landmark causing an
// error with IBM Equal Access Accessibility Checker so we add an aria
// role to the container div.
- calendar.calendarContainer.setAttribute('role', 'region');
+ calendar.calendarContainer.setAttribute('role', 'application');
// IBM EAAC requires an aria-label on a role='region'
calendar.calendarContainer.setAttribute(
'aria-label',
|
fix(Datepicker): change role on calendar container to 'application' (#<I>)
|
carbon-design-system_carbon-components
|
train
|
js
|
e822818111702f82fbf2a55abd814c281ae3b02b
|
diff --git a/fsdb/config.py b/fsdb/config.py
index <HASH>..<HASH> 100644
--- a/fsdb/config.py
+++ b/fsdb/config.py
@@ -2,7 +2,7 @@ import json
from utils import calc_dir_mode
-ACCEPTED_HASH_ALG = ['md5', 'sha', 'sha1', 'sha224', 'sha2', 'sha256', 'sha384', 'sha512']
+ACCEPTED_HASH_ALG = ['md5', 'sha1', 'sha224', 'sha256', 'sha384', 'sha512']
TAG = "fsdb_config"
DEFAULT_FMODE = "0660"
|
removed `sha` and `sha2`
sha and sha2 are no more suported as hash_alg config value
|
ael-code_pyFsdb
|
train
|
py
|
d02fef3413e4be120e287fa0778fbf95e45a6d04
|
diff --git a/src/Bkwld/Decoy/Fields/Listing.php b/src/Bkwld/Decoy/Fields/Listing.php
index <HASH>..<HASH> 100644
--- a/src/Bkwld/Decoy/Fields/Listing.php
+++ b/src/Bkwld/Decoy/Fields/Listing.php
@@ -223,6 +223,9 @@ class Listing extends Field {
*/
public function wrapAndRender() {
+ // Don't set an id
+ $this->setAttribute('id', false);
+
// Because it's a field, Former will add this. But it's not really
// appropriate for a listing
$this->removeClass('form-control');
@@ -240,7 +243,6 @@ class Listing extends Field {
protected function wrapInControlGroup() {
// Add generic stuff
- $this->setAttribute('id', false);
$this->addGroupClass('list-control-group');
// Use the controller description for blockhelp
|
No longer setting an id on listings
|
BKWLD_decoy
|
train
|
php
|
821bdf9f404d9c4093f0832708271962f7fefda6
|
diff --git a/lib/tilelive/batch.js b/lib/tilelive/batch.js
index <HASH>..<HASH> 100644
--- a/lib/tilelive/batch.js
+++ b/lib/tilelive/batch.js
@@ -169,7 +169,7 @@ TileBatch.prototype.renderChunk = function(callback) {
that.mbtiles.insertTiles(tiles, renders, that.options.compress, this);
},
function(err) {
- if (err) return this(err);
+ if (err || !that.options.interactivity) return this(err);
if (that.options.interactivity) {
var group = this.group();
for (var i = 0; i < tiles.length; i++) {
@@ -186,7 +186,7 @@ TileBatch.prototype.renderChunk = function(callback) {
}
},
function(err, renders) {
- if (err) return this(err);
+ if (err || !that.options.interactivity) return this(err);
if (that.options.interactivity) {
that.mbtiles.insertGrids(tiles,
renders,
@@ -195,8 +195,7 @@ TileBatch.prototype.renderChunk = function(callback) {
}
},
function(err) {
- if (err) return this(err);
- callback(null, tiles);
+ callback(err, tiles);
}
);
};
|
Fix Step in renderChunk to ensure completion.
|
mapbox_tilelive
|
train
|
js
|
e6b71982f61e96a1f14697379ba13708a41977ea
|
diff --git a/js/viewport.js b/js/viewport.js
index <HASH>..<HASH> 100644
--- a/js/viewport.js
+++ b/js/viewport.js
@@ -502,14 +502,16 @@ var igv = (function (igv) {
const yScrollDelta = $(this.contentDiv).position().top;
const viewportBBox = this.$viewport.get(0).getBoundingClientRect();
- // input.replace(/\W/g, '')
+
let str = this.trackView.track.name || this.trackView.track.id;
str = str.replace(/\W/g, '');
- // const id = (this.trackView.track.name || this.trackView.track.id).split(' ').join('_').toLowerCase();
- const id = str.toLowerCase();
- // if present, paint axis canvas
- if (typeof this.trackView.track.paintAxis === 'function') {
+ const index = this.browser.genomicStateList.indexOf(this.genomicState);
+ const id = str.toLowerCase() + '_genomic_index_' + index;
+
+ // If present, paint axis canvas. Only in first multi-locus panel
+
+ if (0 === index && typeof this.trackView.track.paintAxis === 'function') {
const w = $(this.trackView.controlCanvas).width();
const h = $(this.trackView.controlCanvas).height();
|
SVG Render. Axis Rendered only for first panel in multi-locus. Git Issue <I>. (#<I>)
|
igvteam_igv.js
|
train
|
js
|
ba1c80226fa1d5c27ccd1598be1b7093c760e28c
|
diff --git a/test/backend/chain_test.rb b/test/backend/chain_test.rb
index <HASH>..<HASH> 100644
--- a/test/backend/chain_test.rb
+++ b/test/backend/chain_test.rb
@@ -78,7 +78,7 @@ class I18nBackendChainTest < I18n::TestCase
"Bah"], I18n.t([:formats, :plural_2, :bah], :default => 'Bah')
end
- test "store_translations options are not dropped while transfering to backend" do
+ test "store_translations options are not dropped while transferring to backend" do
@first.expects(:store_translations).with(:foo, {:bar => :baz}, {:option => 'persists'})
I18n.backend.store_translations :foo, {:bar => :baz}, {:option => 'persists'}
end
|
[TYPO] `transfering` -> `transferring`
|
ruby-i18n_i18n
|
train
|
rb
|
c472d793e7b9f93bd81ed500c6510809236becba
|
diff --git a/cmd.go b/cmd.go
index <HASH>..<HASH> 100644
--- a/cmd.go
+++ b/cmd.go
@@ -691,6 +691,7 @@ func (cmd commandRetr) Execute(conn *Conn, param string) {
path := conn.buildPath(param)
defer func() {
conn.lastFilePos = 0
+ conn.appendData = false
}()
bytes, data, err := conn.driver.GetFile(path, conn.lastFilePos)
if err == nil {
|
Make sure we reset the append flag on RETR (#<I>)
Before this change "REST" followed by "RETR" would leave the append
flag set which means subsequent "STOR" commands append data when they
shouldn't.
|
goftp_server
|
train
|
go
|
c912359268ec0ede609188de31f7dd1b97692f95
|
diff --git a/javascript/dashboard-dialogs.js b/javascript/dashboard-dialogs.js
index <HASH>..<HASH> 100644
--- a/javascript/dashboard-dialogs.js
+++ b/javascript/dashboard-dialogs.js
@@ -67,7 +67,12 @@ window.SS = window.SS || {}
Dialog: { open: dialog, buttons: buttons }
});
- $(document).on('click', "[data-dialog]", function() {
+ $(document).on('click', "[data-dialog]", function(e) {
+
+ if (e.shiftKey) {
+ return false;
+ }
+
var link = $(this);
var dialog = SS.Dialog.open(link.attr("href"), {
|
Prevent opening of dialog if shift key is held down. Allows other functionality to hook if that's the case
|
nyeholt_silverstripe-frontend-dashboards
|
train
|
js
|
de9a5f3a8e24fb948dc2e4ff8c7939bf0a801381
|
diff --git a/src/layouts/CollectionLayout.js b/src/layouts/CollectionLayout.js
index <HASH>..<HASH> 100644
--- a/src/layouts/CollectionLayout.js
+++ b/src/layouts/CollectionLayout.js
@@ -70,6 +70,7 @@ define(function(require, exports, module) {
var getItemSize;
var lineLength;
var lineNodes = [];
+ var hasNext = false;
// Prepare item-size
if (!options.itemSize) {
@@ -122,7 +123,7 @@ define(function(require, exports, module) {
size: lineNode.size,
translate: translate,
// first renderable has scrollLength, others have 0 scrollLength
- scrollLength: (i === 0) ? (lineSize[direction] + gutter[direction] + (endReached ? gutter[direction] : 0)) : 0
+ scrollLength: (i === 0) ? (lineSize[direction] + gutter[direction] + (endReached && (next || (!next && !hasNext)) ? gutter[direction] : 0)) : 0
};
lineOffset += lineNode.size[lineDirection] + gutter[lineDirection] + (justifyOffset * 2);
}
@@ -135,6 +136,7 @@ define(function(require, exports, module) {
// Prepare for next line
lineNodes = [];
+ hasNext = hasNext || next;
return lineSize[direction] + gutter[direction];
}
|
Fixed small glitch in collection-layout
|
IjzerenHein_famous-flex
|
train
|
js
|
5525f4f33bdbd61a72ee173f800125ffa94d901d
|
diff --git a/riak/tests/test_comparison.py b/riak/tests/test_comparison.py
index <HASH>..<HASH> 100644
--- a/riak/tests/test_comparison.py
+++ b/riak/tests/test_comparison.py
@@ -49,6 +49,15 @@ class RiakObjectComparisonTest(unittest.TestCase):
self.assertEqual(hash(a), hash(b), 'same object has different hashes')
self.assertNotEqual(hash(a), hash(c), 'different object has same hash')
+ def test_object_valid_key(self):
+ a = RiakObject(None, 'bucket', 'key')
+ self.assertIsInstance(a, RiakObject, 'valid key name is rejected')
+ try:
+ b = RiakObject(None, 'bucket', '')
+ except ValueError:
+ b = None
+ self.assertIsNone(b, 'empty object key not allowed')
+
class RiakClientComparisonTest(unittest.TestCase, BaseTestCase):
def test_client_eq(self):
|
Issue #<I>: Add unit tests to invalid object key issue
|
basho_riak-python-client
|
train
|
py
|
1149b01f4276794d09a8165306cd1013d61c2f44
|
diff --git a/insights/specs/sos_archive.py b/insights/specs/sos_archive.py
index <HASH>..<HASH> 100644
--- a/insights/specs/sos_archive.py
+++ b/insights/specs/sos_archive.py
@@ -295,6 +295,7 @@ class SosSpecs(Specs):
systemctl_show_all_services = simple_file("sos_commands/systemd/systemctl_show_service_--all")
systemctl_status_all = simple_file("sos_commands/systemd/systemctl_status_--all")
systemd_system_origin_accounting = simple_file("/etc/systemd/system.conf.d/origin-accounting.conf")
+ systemd_analyze_blame = simple_file("sos_commands/systemd/systemd-analyze_blame")
teamdctl_config_dump = glob_file("sos_commands/teamd/teamdctl_*_config_dump")
teamdctl_state_dump = glob_file("sos_commands/teamd/teamdctl_*_state_dump")
testparm_s = simple_file("sos_commands/samba/testparm_s")
|
Updating sos_archive to parse file for GSS rule (#<I>)
adding systemd_analyze_blame = simple_file("insights_commands/systemd-analyze_blame") in sos_archive.py
|
RedHatInsights_insights-core
|
train
|
py
|
1e54aea88b26bc8fd5e89f9afc46a7c048d0db3c
|
diff --git a/example_formatter.py b/example_formatter.py
index <HASH>..<HASH> 100644
--- a/example_formatter.py
+++ b/example_formatter.py
@@ -37,3 +37,6 @@ if __name__ == '__main__':
log.warn('Low on fuel')
log.error('No fuel. Trying to glide.')
log.critical('Glide attempt failed. About to crash.')
+
+ d = {'extra': {'some': '1', 'extras': '2', 'here': '3'}}
+ log.info('Extra records here', extra=d)
|
Updated example_formatter.py to include the extra bits
|
neogenix_jsonklog
|
train
|
py
|
cb12ef24a56ffe6c66a123c4ffa19473633a6843
|
diff --git a/quack.rb b/quack.rb
index <HASH>..<HASH> 100644
--- a/quack.rb
+++ b/quack.rb
@@ -3,16 +3,18 @@ require 'uri'
require 'pry-debugger'
class TinyServer
- attr_reader :server
+ attr_reader :server, :port
attr_accessor :socket, :request_line
DEFAULT_PORT = 4444
def initialize(options = {})
- @server = TCPServer.new('localhost', options[:port] || DEFAULT_PORT)
+ @port = options[:port] || DEFAULT_PORT
+ @server = TCPServer.new('localhost', @port)
end
def start
+ STDERR.puts "Starting server on port #{port}"
loop do
self.socket = server.accept
|
[UPDATE] notify user of port when starting server
|
moserrya_knod
|
train
|
rb
|
859b37a94fce1303bfd2943a49d0bfaba53754b5
|
diff --git a/psqlextra/manager/__init__.py b/psqlextra/manager/__init__.py
index <HASH>..<HASH> 100644
--- a/psqlextra/manager/__init__.py
+++ b/psqlextra/manager/__init__.py
@@ -1,8 +1,8 @@
-from .manager import QuerySet, PostgresManager
+from .manager import PostgresQuerySet, PostgresManager
from .materialized_view import PostgresMaterializedViewManager
__all__ = [
- 'QuerySet',
+ 'PostgresQuerySet',
'PostgresManager',
'PostgresMaterializedViewManager'
]
|
'QuerySet' should be 'PostgresQuerySet'
|
SectorLabs_django-postgres-extra
|
train
|
py
|
8cb5c5f8db15d0aa0315909a700c45029d147605
|
diff --git a/lib/string/roman.rb b/lib/string/roman.rb
index <HASH>..<HASH> 100644
--- a/lib/string/roman.rb
+++ b/lib/string/roman.rb
@@ -1,7 +1,7 @@
module BBLib
- # Converts any integer up to 1000 to a roman numeral string_a
+ # Converts any integer up to 1000 to a roman numeral
def self.to_roman num
return num.to_s if num > 1000
roman = {1000 => 'M', 900 => 'CM', 500 => 'D', 400 => 'CD', 100 => 'C', 90 => 'XC', 50 => 'L',
|
Removed weird extra word in comment.
|
bblack16_bblib-ruby
|
train
|
rb
|
a55957996f3e6ae1b7b98bea477e14da2070733e
|
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -23,6 +23,10 @@ setup(
'Programming Language :: Python',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
+ 'Programming Language :: Python :: 3',
'Topic :: Scientific/Engineering :: Information Analysis',
'Topic :: Scientific/Engineering :: Mathematics'
- ])
+ ],
+ extras_require={
+ 'tests': ['numpy', 'scipy', 'networkx']
+ })
|
Update PyPI classifiers and test requirements
|
yvesalexandre_bandicoot
|
train
|
py
|
2b5b280564cdb59739dfed9dcfad209971a416da
|
diff --git a/pyatv/support/http.py b/pyatv/support/http.py
index <HASH>..<HASH> 100644
--- a/pyatv/support/http.py
+++ b/pyatv/support/http.py
@@ -90,14 +90,21 @@ def parse_message(response: bytes) -> Tuple[Optional[HttpResponse], bytes]:
protocol, version, code, message = match.groups()
resp_headers = CaseInsensitiveDict(_key_value(line) for line in headers[1:] if line)
- content_length = int(resp_headers.get("Content-Length", 0))
+ # TODO: pylint on python 3.6 does not seem to find CaseInsensitiveDict.get, but
+ # other versions seems to work fine. Remove this ignore when python 3.6 is dropped.
+ content_length = int(
+ resp_headers.get("Content-Length", 0) # pylint: disable=no-member
+ )
if len(body or []) < content_length:
return None, response
response_body: Union[str, bytes] = body[0:content_length]
# Assume body is text unless content type is application/octet-stream
- if not resp_headers.get("Content-Type", "").startswith("application"):
+ # TODO: Remove pylint disable when python 3.6 is dropped
+ if not resp_headers.get("Content-Type", "").startswith( # pylint: disable=no-member
+ "application"
+ ):
# We know it's bytes here
response_body = cast(bytes, response_body).decode("utf-8")
|
http: Ignore type mypy cannot find
Relates to #<I>
|
postlund_pyatv
|
train
|
py
|
94b088d98c8ce4191efe54439ba1271d8b62c20a
|
diff --git a/salt/config.py b/salt/config.py
index <HASH>..<HASH> 100644
--- a/salt/config.py
+++ b/salt/config.py
@@ -661,7 +661,7 @@ def get_id():
try:
with salt.utils.fopen('/etc/hostname') as hfl:
name = hfl.read().strip()
- if re.search('\s', name):
+ if re.search(r'\s', name):
log.warning('Whitespace character detected in /etc/hostname. '
'This file should not contain any whitespace.')
else:
|
Use raw string in regex
This quiets pylint, as it complains when a regex contains a backslash
and the string is not a raw string.
|
saltstack_salt
|
train
|
py
|
1eaaa402554ba537467a8ac8ef259a9d9da2d428
|
diff --git a/bin/delete.js b/bin/delete.js
index <HASH>..<HASH> 100755
--- a/bin/delete.js
+++ b/bin/delete.js
@@ -18,6 +18,10 @@ var argv = optimist
demand: true,
alias: 'n'
})
+ .options('headless', {
+ describe: 'Do not prompt',
+ alias: 'l'
+ })
.argv;
if (argv.help) return optimist.showHelp();
diff --git a/index.js b/index.js
index <HASH>..<HASH> 100644
--- a/index.js
+++ b/index.js
@@ -311,7 +311,7 @@ config.deleteStack = function(options, callback) {
return callback(new Error([options.name, status].join(' ')));
}
- confirmAction('Ready to delete the stack ' + options.name + '?', function (confirm) {
+ confirmAction('Ready to delete the stack ' + options.name + '?', options.headless, function (confirm) {
if (!confirm) return callback();
cfn.deleteStack({
StackName: options.name
|
Apply headless option to cfn-delete.
|
mapbox_cfn-config
|
train
|
js,js
|
d9a76abb5b90d15433db90b6ae3f02e7d9057c7f
|
diff --git a/server/src/main/java/com/networknt/server/DefaultConfigLoader.java b/server/src/main/java/com/networknt/server/DefaultConfigLoader.java
index <HASH>..<HASH> 100644
--- a/server/src/main/java/com/networknt/server/DefaultConfigLoader.java
+++ b/server/src/main/java/com/networknt/server/DefaultConfigLoader.java
@@ -221,7 +221,6 @@ public class DefaultConfigLoader implements IConfigLoader{
for (String fileName : serviceFiles.keySet()) {
filePath=Paths.get(targetConfigsDirectory+"/"+fileName);
byte[] ba = decoder.decode(serviceFiles.get(fileName).toString().getBytes());
- if(logger.isDebugEnabled()) logger.debug("filename = " + fileName + " content = " + new String(ba, StandardCharsets.UTF_8));
Files.write(filePath, ba);
}
} catch (IOException e) {
|
fixes #<I> remove a logging statement in the DefaultConfigLoader as the binary file will break the JSON logging (#<I>)
|
networknt_light-4j
|
train
|
java
|
0bb925017eb27acce2644a626042b0230b4a155c
|
diff --git a/lib/rubyonacid/factories/combination.rb b/lib/rubyonacid/factories/combination.rb
index <HASH>..<HASH> 100644
--- a/lib/rubyonacid/factories/combination.rb
+++ b/lib/rubyonacid/factories/combination.rb
@@ -69,6 +69,8 @@ class CombinationFactory < Factory
end
when WRAP
return value % 1.0
+ else
+ raise "invalid constrain mode - must be CONSTRAIN or WRAP"
end
end
|
CombinationFactory now raises exception when invalid constant assigned.
|
jaymcgavren_rubyonacid
|
train
|
rb
|
bb508312d05e9f74bdb3172af1eafed8e517df85
|
diff --git a/dash/test.py b/dash/test.py
index <HASH>..<HASH> 100644
--- a/dash/test.py
+++ b/dash/test.py
@@ -58,8 +58,14 @@ class DashTest(TestCase):
func = getattr(self.client, method)
response = func(url, data, **extra)
+
if isinstance(response, JsonResponse):
- response.json = json.loads(response.content)
+ content = response.content
+ if isinstance(content, six.binary_type):
+ content = content.decode('utf-8')
+
+ response.json = json.loads(content)
+
return response
|
Tweak to test class to support Python 3
|
rapidpro_dash
|
train
|
py
|
f85351aa07123ec10ca8ed94822e63ad334c9124
|
diff --git a/indra/util/aws.py b/indra/util/aws.py
index <HASH>..<HASH> 100644
--- a/indra/util/aws.py
+++ b/indra/util/aws.py
@@ -11,12 +11,13 @@ def kill_all(job_queue, reason='None given'):
# Cancel jobs
for job_id in job_ids:
batch.cancel_job(jobId=job_id, reason=reason)
- for status in ('STARTING', 'RUNNING'):
+ for status in ('STARTING', 'RUNNABLE', 'RUNNING'):
running = batch.list_jobs(jobQueue=job_queue, jobStatus=status)
job_info = running.get('jobSummaryList')
if job_info:
job_ids = [job['jobId'] for job in job_info]
for job_id in job_ids:
+ print('Killing %s' % job_id)
res = batch.terminate_job(jobId=job_id, reason=reason)
|
Kill runnable jobs in kill all
|
sorgerlab_indra
|
train
|
py
|
966e83bbf9df2de9db7c44e239c1263a00afd7d7
|
diff --git a/core/src/main/java/com/orientechnologies/orient/core/sql/executor/DepthFirstTraverseStep.java b/core/src/main/java/com/orientechnologies/orient/core/sql/executor/DepthFirstTraverseStep.java
index <HASH>..<HASH> 100644
--- a/core/src/main/java/com/orientechnologies/orient/core/sql/executor/DepthFirstTraverseStep.java
+++ b/core/src/main/java/com/orientechnologies/orient/core/sql/executor/DepthFirstTraverseStep.java
@@ -128,7 +128,10 @@ public class DepthFirstTraverseStep extends AbstractTraverseStep {
StringBuilder result = new StringBuilder();
result.append(spaces);
result.append("+ DEPTH-FIRST TRAVERSE \n");
+ result.append(spaces);
+ result.append(" " + projections.toString());
if (whileClause != null) {
+ result.append("\n");
result.append(spaces);
result.append("WHILE " + whileClause.toString());
}
|
Fix depth first traverse step pretty print
|
orientechnologies_orientdb
|
train
|
java
|
1d5735c111f4f5a0623b693d1531c3e7a0845a08
|
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -1,7 +1,7 @@
from setuptools import setup, find_packages
import os
-version = '0.3.10'
+version = '0.3.11'
here = os.path.abspath(os.path.dirname(__file__))
try:
README = open(os.path.join(here, 'README.txt')).read()
|
Increase to version <I> due to TG-dev requiring it for ming support
|
TurboGears_tgext.admin
|
train
|
py
|
84dc23116a56339bad61f275086b4af86f4d452a
|
diff --git a/src/server/pfs/cmds/cmds.go b/src/server/pfs/cmds/cmds.go
index <HASH>..<HASH> 100644
--- a/src/server/pfs/cmds/cmds.go
+++ b/src/server/pfs/cmds/cmds.go
@@ -373,7 +373,7 @@ Files can be read from finished commits with get-file.`,
// try parsing the filename as a url, if it is one do a PutFileURL
if url, err := url.Parse(filePath); err == nil && url.Scheme != "" {
if len(args) < 3 {
- return client.PutFileURL(args[0], args[1], url.Path, url.String())
+ return client.PutFileURL(args[0], args[1], strings.TrimPrefix(url.Path, "/"), url.String())
}
return client.PutFileURL(args[0], args[1], args[2], url.String())
}
|
Trim the / prefix for url puts.
|
pachyderm_pachyderm
|
train
|
go
|
e735a3a25c62d6621283fe59c0accad1980152ee
|
diff --git a/build.go b/build.go
index <HASH>..<HASH> 100644
--- a/build.go
+++ b/build.go
@@ -801,8 +801,9 @@ func getBranchSuffix() string {
}
branch = parts[len(parts)-1]
- if branch == "master" {
- // master builds are the default.
+ switch branch {
+ case "master", "release":
+ // these are not special
return ""
}
|
build: Builds from "release" branch are not branch builds
|
syncthing_syncthing
|
train
|
go
|
d974b22ac4877d15348f6747608be799bf5c343a
|
diff --git a/create.go b/create.go
index <HASH>..<HASH> 100644
--- a/create.go
+++ b/create.go
@@ -1,6 +1,7 @@
package main
import (
+ "fmt"
"os"
"github.com/urfave/cli"
@@ -56,12 +57,11 @@ command(s) that get executed on start, edit the args parameter of the spec. See
return err
}
status, err := startContainer(context, CT_ACT_CREATE, nil)
- if err != nil {
- return err
+ if err == nil {
+ // exit with the container's exit status so any external supervisor
+ // is notified of the exit with the correct exit status.
+ os.Exit(status)
}
- // exit with the container's exit status so any external supervisor is
- // notified of the exit with the correct exit status.
- os.Exit(status)
- return nil
+ return fmt.Errorf("runc create failed: %w", err)
},
}
diff --git a/run.go b/run.go
index <HASH>..<HASH> 100644
--- a/run.go
+++ b/run.go
@@ -1,6 +1,7 @@
package main
import (
+ "fmt"
"os"
"github.com/urfave/cli"
@@ -74,6 +75,6 @@ command(s) that get executed on start, edit the args parameter of the spec. See
// notified of the exit with the correct exit status.
os.Exit(status)
}
- return err
+ return fmt.Errorf("runc run failed: %w", err)
},
}
|
create, run: amend final errors
As the error may contain anything, it may not be clear to a user that
the whole (create or run) operation failed. Amend the errors.
Also, change the code flow in create to match that of run, so we don't
have to add the fake "return nil" at the end.
|
opencontainers_runc
|
train
|
go,go
|
0ba33c73c4ee0dedaacf43bfdb50cd008d84a2ac
|
diff --git a/src/jquery.maskMoney.js b/src/jquery.maskMoney.js
index <HASH>..<HASH> 100644
--- a/src/jquery.maskMoney.js
+++ b/src/jquery.maskMoney.js
@@ -493,9 +493,15 @@
newValue = buildIntegerPart(integerPart, negative, settings);
if (settings.precision > 0) {
- decimalPart = onlyNumbers.slice(onlyNumbers.length - settings.precision);
- leadingZeros = new Array((settings.precision + 1) - decimalPart.length).join(0);
- newValue += settings.decimal + leadingZeros + decimalPart;
+ if(!isNaN(value) && value.indexOf('.') > -1){
+ decimalPart = value.substr(value.indexOf('.') + 1);
+ leadingZeros = new Array((settings.precision + 1) - decimalPart.length).join(0);
+ newValue += settings.decimal + decimalPart + leadingZeros;
+ } else {
+ decimalPart = onlyNumbers.slice(onlyNumbers.length - settings.precision);
+ leadingZeros = new Array((settings.precision + 1) - decimalPart.length).join(0);
+ newValue += settings.decimal + leadingZeros + decimalPart;
+ }
}
return setSymbol(newValue, settings);
}
|
New Bug
Bug when dealing with float.
|
plentz_jquery-maskmoney
|
train
|
js
|
029a7bb6e67ab5e1dfab7c5c683a132bdc0b6ead
|
diff --git a/Integration/AbstractEnhancerIntegration.php b/Integration/AbstractEnhancerIntegration.php
index <HASH>..<HASH> 100644
--- a/Integration/AbstractEnhancerIntegration.php
+++ b/Integration/AbstractEnhancerIntegration.php
@@ -317,7 +317,7 @@ abstract class AbstractEnhancerIntegration extends AbstractIntegration
$this->campaign, $this, 'enhanced', $lead
);
$this->dispatcher->dispatch(
- 'mauticplugin.contactledger.context_create',
+ 'mautic.contactledger.context_create',
$event
);
$this->leadModel->saveEntity($lead);
diff --git a/MauticEnhancerEvents.php b/MauticEnhancerEvents.php
index <HASH>..<HASH> 100644
--- a/MauticEnhancerEvents.php
+++ b/MauticEnhancerEvents.php
@@ -15,5 +15,5 @@ final class MauticEnhancerEvents
*
* @var string
*/
- const ENHANCER_COMPLETED = 'mauticplugin.mautic_enhancer.enhancer_complete';
+ const ENHANCER_COMPLETED = 'mautic.mautic_enhancer.enhancer_complete';
}
|
Corrections for Ledger events.
|
TheDMSGroup_mautic-enhancer
|
train
|
php,php
|
febb086f442cb31df6976dac9e9ca5f7ce1e6835
|
diff --git a/lib/graphql.rb b/lib/graphql.rb
index <HASH>..<HASH> 100644
--- a/lib/graphql.rb
+++ b/lib/graphql.rb
@@ -22,7 +22,11 @@ module GraphQL
def self.parse(string, as: nil)
parser = as ? GraphQL::PARSER.send(as) : GraphQL::PARSER
tree = parser.parse(string)
- GraphQL::TRANSFORM.apply(tree)
+ document = GraphQL::TRANSFORM.apply(tree)
+ if !document.is_a?(GraphQL::Language::Nodes::Document)
+ raise("Parse failed! Sorry, somehow we failed to turn this string into a document. Please report this bug!")
+ end
+ document
rescue Parslet::ParseFailed => error
line, col = error.cause.source.line_and_column(error.cause.pos)
raise GraphQL::ParseError.new(error.message, line, col, string)
|
refactor(.parse) check for a transformation failure
|
rmosolgo_graphql-ruby
|
train
|
rb
|
15e21dbd53fc5967c80b4ca5b64db0dce81871bd
|
diff --git a/src/components/line-chart/line-chart.js b/src/components/line-chart/line-chart.js
index <HASH>..<HASH> 100644
--- a/src/components/line-chart/line-chart.js
+++ b/src/components/line-chart/line-chart.js
@@ -334,7 +334,8 @@ define([
})
.attr("dy", ".35em")
.text(function(d) {
- return d.name;
+ var size = d.name.length;
+ return (size < 13) ? d.name : d.name.substring(0,10)+'...'; //only few first letters
});
this.resize();
|
Shorten name in case its too long
|
vizabi_vizabi
|
train
|
js
|
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.