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
|
---|---|---|---|---|---|
c2b90074e86f8b03a771e1b1cf19daca3a0a2c70 | diff --git a/TYPO3.Flow/Classes/Locale/Xml/AbstractXmlParser.php b/TYPO3.Flow/Classes/Locale/Xml/AbstractXmlParser.php
index <HASH>..<HASH> 100644
--- a/TYPO3.Flow/Classes/Locale/Xml/AbstractXmlParser.php
+++ b/TYPO3.Flow/Classes/Locale/Xml/AbstractXmlParser.php
@@ -85,7 +85,7 @@ abstract class AbstractXmlParser {
* @throws \F3\FLOW3\Locale\Xml\Exception\InvalidXmlFileException When SimpleXML couldn't load XML file
*/
protected function parseXmlFile($sourceFilename) {
- $rootXmlNode = simplexml_load_file($sourceFilename);
+ $rootXmlNode = @simplexml_load_file($sourceFilename);
if ($rootXmlNode === FALSE) {
throw new \F3\FLOW3\Locale\Xml\Exception\InvalidXmlFileException('The path provided does not point to existing and accessible well-formed XML file.', 1278155987); | [+BUGFIX] FLOW3 (Locale): Fixed warning when bad filename given in AbstractXmlParser. Resolves #<I>.
Original-Commit-Hash: <I>ba<I>d<I>c8aa<I>dc<I>bf<I>a<I>ac<I>c6a<I> | neos_flow-development-collection | train | php |
d82f777ee4e3e89cfab56afb92297a6330dd8199 | diff --git a/lib/hcl/day_entry.rb b/lib/hcl/day_entry.rb
index <HASH>..<HASH> 100644
--- a/lib/hcl/day_entry.rb
+++ b/lib/hcl/day_entry.rb
@@ -23,6 +23,10 @@ module HCl
end
end
+ def notes
+ super || @data[:notes] = ''
+ end
+
# Append a string to the notes for this task.
def append_note new_notes
# If I don't include hours it gets reset.
diff --git a/test/day_entry_test.rb b/test/day_entry_test.rb
index <HASH>..<HASH> 100644
--- a/test/day_entry_test.rb
+++ b/test/day_entry_test.rb
@@ -33,4 +33,17 @@ class DayEntryTest < Test::Unit::TestCase
end
end
+ should "append to an existing note" do
+ entry = HCl::DayEntry.new(:id => '1', :notes => 'yourmom.', :hours => '1.0')
+ HCl::DayEntry.stubs(:post)
+ entry.append_note('hi world')
+ assert_equal 'yourmom. hi world', entry.notes
+ end
+
+ should "append to an undefined note" do
+ entry = HCl::DayEntry.new(:id => '1', :notes => nil, :hours => '1.0')
+ HCl::DayEntry.stubs(:post)
+ entry.append_note('hi world')
+ assert_equal ' hi world', entry.notes
+ end
end | Another attempt at closing #<I>.
This time there are some tests! | zenhob_hcl | train | rb,rb |
311426471a8040ebfaf30ca1c353e7c390243ae5 | diff --git a/lib/jaguar.js b/lib/jaguar.js
index <HASH>..<HASH> 100644
--- a/lib/jaguar.js
+++ b/lib/jaguar.js
@@ -42,9 +42,10 @@ function Jaguar(operation, from, to, files) {
if (operation === 'pack')
check(from, to, files);
else
- check(from, to);
+ check(from, to);
process.nextTick(() => {
+ Emitter.call(this);
this._i = 0;
this._n = 0; | fix(jaguar) inheritance from EventEmitter' | coderaiser_node-jaguar | train | js |
d9f4b75433089e82450a8351a8f69eaadd8cd71f | diff --git a/bcbio/ngsalign/alignprep.py b/bcbio/ngsalign/alignprep.py
index <HASH>..<HASH> 100644
--- a/bcbio/ngsalign/alignprep.py
+++ b/bcbio/ngsalign/alignprep.py
@@ -82,7 +82,9 @@ def _set_align_split_size(data):
if val is None:
if not umi_consensus:
total_size = 0 # Gb
- for fname in data.get("files", []):
+ # Use original files if we might have reduced the size of our prepped files
+ input_files = data.get("files_orig", []) if dd.get_save_diskspace(data) else data.get("files", [])
+ for fname in input_files:
if os.path.exists(fname):
total_size += os.path.getsize(fname) / (1024.0 * 1024.0 * 1024.0)
# Only set if we have files and are bigger than the target size | Handle split re-runs with save_diskspace set
If an analysis with save_diskspace failed after split runs finish
but before merging, re-runs would not pick up expected split sizes.
This fixes to have consistent splitting and merging at all stages. | bcbio_bcbio-nextgen | train | py |
6801e9b270fd0d83b95e1ce17ee3c06f8231aa2b | diff --git a/restclients_core/util/mock.py b/restclients_core/util/mock.py
index <HASH>..<HASH> 100644
--- a/restclients_core/util/mock.py
+++ b/restclients_core/util/mock.py
@@ -174,4 +174,5 @@ def attempt_open_query_permutations(url, orig_file_path, is_header_file):
def _compare_file_name(orig_file_path, directory, filename):
- return len(unquote(orig_file_path)) - len(directory) == len(filename)
+ return (len(unquote(orig_file_path)) - len(unquote(directory)) ==
+ len(filename)) | Added unquote call to file path to avoid mismatch when directory has a url quote | uw-it-aca_uw-restclients-core | train | py |
1bf8d725a91276f2332dd89d8e90feaba8750175 | diff --git a/tests/acceptance/layouts-test.js b/tests/acceptance/layouts-test.js
index <HASH>..<HASH> 100644
--- a/tests/acceptance/layouts-test.js
+++ b/tests/acceptance/layouts-test.js
@@ -18,7 +18,7 @@ test('visiting /layout-test', function(assert) {
let breakpoints = deviceLayout.get('breakpoints');
let bp = {};
breakpoints.forEach(function(point) {
- bp[point.name] = point.begin + 100;
+ bp[point.name] = point.begin + 5;
});
deviceLayout.set('width', bp.huge); | fix(breakpoints-test): breakpoints are now better defined | html-next_flexi-layouts | train | js |
c51ec439abe5d03cfa4bb9c50f8f8588f97fb845 | diff --git a/lib/discordrb/data.rb b/lib/discordrb/data.rb
index <HASH>..<HASH> 100644
--- a/lib/discordrb/data.rb
+++ b/lib/discordrb/data.rb
@@ -1334,7 +1334,9 @@ module Discordrb
# in that channel. For a text channel, it will return all online members that have permission to read it.
# @return [Array<Member>] the users in this channel
def users
- if text?
+ if default_channel?
+ @server.online_members(include_idle: true)
+ elsif text?
@server.online_members(include_idle: true).select { |u| u.can_read_messages? self }
elsif voice?
@server.voice_states.map { |id, voice_state| @server.member(id) if !voice_state.voice_channel.nil? && voice_state.voice_channel.id == @id }.compact | Channel#users - default_channel is always readable | meew0_discordrb | train | rb |
aae1251a9d63f8c0d4b4f87bfaca7c6476da0969 | diff --git a/ariba/clusters.py b/ariba/clusters.py
index <HASH>..<HASH> 100644
--- a/ariba/clusters.py
+++ b/ariba/clusters.py
@@ -246,7 +246,7 @@ class Clusters:
for gene in sorted(self.cluster_to_dir):
counter += 1
if self.verbose:
- print('\nAssembling cluster', counter, 'of', str(len(self.cluster_to_dir)) + ':', gene)
+ print('\nAssembling cluster', counter, 'of', str(len(self.cluster_to_dir)))
new_dir = self.cluster_to_dir[gene]
faidx.write_fa_subset( | Do not output name of cluster (it is confusing) | sanger-pathogens_ariba | train | py |
2b5c2f3ed58e4c3bf9185318a003cbc39dde16e6 | diff --git a/_pytest/python.py b/_pytest/python.py
index <HASH>..<HASH> 100644
--- a/_pytest/python.py
+++ b/_pytest/python.py
@@ -1987,7 +1987,7 @@ class FixtureManager:
# fixture attribute
continue
else:
- assert not name.startswith(self._argprefix)
+ assert not name.startswith(self._argprefix), name
fixturedef = FixtureDef(self, nodeid, name, obj,
marker.scope, marker.params,
yieldctx=marker.yieldctx, | help the user in the rare case this assertion actually fails | vmalloc_dessert | train | py |
486c69ece2c6480534dabd275caecfdb948e1e24 | diff --git a/workalendar/europe.py b/workalendar/europe.py
index <HASH>..<HASH> 100644
--- a/workalendar/europe.py
+++ b/workalendar/europe.py
@@ -117,5 +117,10 @@ class NorthernIrelandCalendar(UnitedKingdomCalendar):
def get_variable_days(self, year):
days = super(NorthernIrelandCalendar, self).get_variable_days(year)
- days.append((date(year, 3, 17), "Saint Patrick's Day"))
+ st_patrick = date(year, 3, 17)
+ days.append((st_patrick, "Saint Patrick's Day"))
+ if st_patrick.weekday() in self.get_weekend_days():
+ days.append((
+ self.find_following_working_day(st_patrick),
+ "Saint Patrick shift"))
return days
diff --git a/workalendar/tests/test_europe.py b/workalendar/tests/test_europe.py
index <HASH>..<HASH> 100644
--- a/workalendar/tests/test_europe.py
+++ b/workalendar/tests/test_europe.py
@@ -112,3 +112,7 @@ class NorthernIrelandCalendarTest(UnitedKingdomCalendarTest):
def test_regional_2013(self):
holidays = self.cal.holidays_set(2013)
self.assertIn(date(2013, 3, 17), holidays) # St Patrick's day
+
+ def test_regional_2012(self):
+ holidays = self.cal.holidays_set(2012)
+ self.assertIn(date(2012, 3, 19), holidays) # St Patrick's day shift | substitute for St. Patrick's day | peopledoc_workalendar | train | py,py |
ba896f579e63390bd9c67e494cdc77bd57b844fe | diff --git a/test/delaunay-test.js b/test/delaunay-test.js
index <HASH>..<HASH> 100644
--- a/test/delaunay-test.js
+++ b/test/delaunay-test.js
@@ -1,6 +1,6 @@
import tape from "@observablehq/tape";
import Delaunay from "../src/delaunay.js";
-import Context from "./context";
+import Context from "./context.js";
tape("Delaunay.from(array)", test => {
let delaunay = Delaunay.from([[0, 0], [1, 0], [0, 1], [1, 1]]);
diff --git a/test/voronoi-test.js b/test/voronoi-test.js
index <HASH>..<HASH> 100644
--- a/test/voronoi-test.js
+++ b/test/voronoi-test.js
@@ -1,6 +1,6 @@
import tape from "@observablehq/tape";
import Delaunay from "../src/delaunay.js";
-import Context from "./context";
+import Context from "./context.js";
tape("voronoi.renderCell(i, context) is a noop for coincident points", test => {
let voronoi = Delaunay.from([[0, 0], [1, 0], [0, 1], [1, 0]]).voronoi([-1, -1, 2, 2]); | Use exact paths in imports. d3/d3#<I> | d3_d3-delaunay | train | js,js |
701b072e1a104bce03df700c5f620d4000ccd573 | diff --git a/test/unit/ajax.js b/test/unit/ajax.js
index <HASH>..<HASH> 100644
--- a/test/unit/ajax.js
+++ b/test/unit/ajax.js
@@ -218,23 +218,21 @@ test("synchronous request with callbacks", function() {
});
test("pass-through request object", function() {
- expect(1);
+ expect(6);
stop(true);
var target = "data/name.html";
var count = 0;
var success = function() {
- // Disabled
- //if(count++ == 5)
+ // Re-enabled because a bug was found in the unit test that probably caused the problem
+ if(++count == 5)
start();
};
- /* Test disabled, too many simultaneous requests
ok( $.get(url(target), success), "get" );
ok( $.post(url(target), success), "post" );
ok( $.getScript(url("data/test.js"), success), "script" );
ok( $.getJSON(url("data/json_obj.js"), success), "json" );
- */
ok( $.ajax({url: url(target), success: success}), "generic" );
}); | There was a disabled test in the ajax test suite which said there were too many simultainous requests. I re-enabled it when I found a bug that might have been the cause of the failure instead and it seems to work fine. We can disable it again if that ends up not being the case. | jquery_jquery | train | js |
26e74c8cc43cd5306237d4048b6fdecf280ea5f7 | diff --git a/docker/client.py b/docker/client.py
index <HASH>..<HASH> 100644
--- a/docker/client.py
+++ b/docker/client.py
@@ -869,7 +869,7 @@ class Client(requests.Session):
res = self._post_json(url, data=start_config)
self._raise_for_status(res)
- def stats(self, container):
+ def stats(self, container, decode=None):
if utils.compare_version('1.17', self._version) < 0:
raise errors.InvalidVersion(
'Stats retrieval is not supported in API < 1.17!')
@@ -877,7 +877,7 @@ class Client(requests.Session):
if isinstance(container, dict):
container = container.get('Id')
url = self._url("/containers/{0}/stats".format(container))
- return self._stream_helper(self._get(url, stream=True))
+ return self._stream_helper(self._get(url, stream=True), decode=decode)
def stop(self, container, timeout=10):
if isinstance(container, dict): | Add decode parameter to be able to the the stats as a dictionary | docker_docker-py | train | py |
359b8b9b8339e45824c2b99093c5abd5655992cc | diff --git a/lib/endpoints/class-wp-rest-posts-controller.php b/lib/endpoints/class-wp-rest-posts-controller.php
index <HASH>..<HASH> 100755
--- a/lib/endpoints/class-wp-rest-posts-controller.php
+++ b/lib/endpoints/class-wp-rest-posts-controller.php
@@ -71,7 +71,7 @@ class WP_REST_Posts_Controller extends WP_REST_Controller {
$post_type = get_post_type_object( $this->post_type );
- if ( ! empty( $request['orderby'] ) && $request['orderby'] === 'relevance' && empty( $request['search'] ) ) {
+ if ( ! empty( $request['orderby'] ) && 'relevance' === $request['orderby'] && empty( $request['search'] ) ) {
return new WP_Error( 'rest_no_search_term_defined', __( 'You need to define a search term in order to use the relevance search.' ), array( 'status' => 400 ) );
} | set string before variable in if-statement | WP-API_WP-API | train | php |
3953a9056fbf829effbc5dced68623398c1f832f | diff --git a/commands/command_push.go b/commands/command_push.go
index <HASH>..<HASH> 100644
--- a/commands/command_push.go
+++ b/commands/command_push.go
@@ -20,7 +20,7 @@ var (
pushAll = false
useStdin = false
- // shares some global vars and functions with commmands_pre_push.go
+ // shares some global vars and functions with command_pre_push.go
)
func uploadsBetweenRefs(left string, right string) *lfs.TransferQueue { | commmands_pre_push.go -> command_pre_push.go. | git-lfs_git-lfs | train | go |
5eecca29349a0fb9411e9d4e389e5f48b9e36728 | diff --git a/src/Patchwork/Controller/FrontController.php b/src/Patchwork/Controller/FrontController.php
index <HASH>..<HASH> 100644
--- a/src/Patchwork/Controller/FrontController.php
+++ b/src/Patchwork/Controller/FrontController.php
@@ -63,7 +63,7 @@ class FrontController implements ControllerProviderInterface
$response->headers->set('Content-Type', 'text/css');
return $response;
}
- );
+ )->assert('file', '.+'); | corrected LESS utility route to accepts subfolders in the path | neemzy_patchwork-core | train | php |
978acb9caf9ad5e645e1e5188a0120f05822cc81 | diff --git a/test/unit/event.js b/test/unit/event.js
index <HASH>..<HASH> 100644
--- a/test/unit/event.js
+++ b/test/unit/event.js
@@ -1095,6 +1095,7 @@ test( "submit event bubbles on copied forms (#11649)", function(){
// Clean up
$wrapperDiv.remove();
$fixture.off( "submit", "form", delegatedSubmit );
+ $testForm.off( "submit", noSubmit );
});
test("trigger(eventObject, [data], [fn])", function() { | Followup #<I>, clean up events in unit test. | jquery_jquery | train | js |
2f0169c3ab267032237fa41ec72317c25f3886bf | diff --git a/raft/doc.go b/raft/doc.go
index <HASH>..<HASH> 100644
--- a/raft/doc.go
+++ b/raft/doc.go
@@ -19,8 +19,16 @@ Usage
The primary object in raft is a Node. You either start a Node from scratch
using raft.StartNode or start a Node from some initial state using raft.RestartNode.
- storage := raft.NewMemoryStorage()
- n := raft.StartNode(0x01, []raft.Peer{{ID: 0x02}, {ID: 0x03}}, 3, 1, storage)
+ storage := raft.NewMemoryStorage()
+ c := &Config{
+ ID: 0x01,
+ ElectionTick: 10,
+ HeartbeatTick: 1,
+ Storage: storage,
+ MaxSizePerMsg: 4096,
+ MaxInflightMsgs: 256,
+ }
+ n := raft.StartNode(c, []raft.Peer{{ID: 0x02}, {ID: 0x03}})
Now that you are holding onto a Node you have a few responsibilities: | raft: fix usage section of doc
We recently added a config struct to start raft. Update
our doc accordingly. | etcd-io_etcd | train | go |
4b883f0bbff7d7fa65307e0e13dcf7b328131e08 | diff --git a/integration/watch_test.go b/integration/watch_test.go
index <HASH>..<HASH> 100644
--- a/integration/watch_test.go
+++ b/integration/watch_test.go
@@ -41,7 +41,7 @@ var _ = Describe("Watch", func() {
startGinkgoWithGopath := func(args ...string) *gexec.Session {
cmd := ginkgoCommand(rootPath, args...)
- cmd.Env = append([]string{"GOPATH=" + rootPath + ":" + os.Getenv("GOPATH")}, os.Environ()...)
+ os.Setenv("GOPATH", rootPath+":"+os.Getenv("GOPATH"))
session, err := gexec.Start(cmd, GinkgoWriter, GinkgoWriter)
Ω(err).ShouldNot(HaveOccurred())
return session | Replace GOPATH in Environment
Previously the test GOPATH was being prepended to the existing OS
environment, which means it would be overwritten if the user had GOPATH
set. Now we replace the value of GOPATH with Setenv so it will take
precedence over any existing value. | onsi_ginkgo | train | go |
0c9524428d1af30098c2310da7e65c80321f549a | diff --git a/src/grooveshark/const.py b/src/grooveshark/const.py
index <HASH>..<HASH> 100644
--- a/src/grooveshark/const.py
+++ b/src/grooveshark/const.py
@@ -29,9 +29,9 @@ NO_COVER_URL = 'http://images.grooveshark.com/static/albums/70_album.png'
# because the ones I extracted out of Grooveshark do not work for some reason
# (I meet SciLor, he tells me that they do some type of encryption but don't
# know more) - thanks.
-CLIENTS = {'htmlshark' : {'version' : '20120312',
- 'token' : 'breakfastBurritos'},
- 'jsqueue' : {'version' : '20120312.02',
- 'token' : 'closeButNoCigar'}}
+CLIENTS = {'htmlshark' : {'version' : '20130520',
+ 'token' : 'nuggetsOfBaller'},
+ 'jsqueue' : {'version' : '20130520',
+ 'token' : 'chickenFingers'}}
# grooveshark country settings
COUNTRY = {'ID': 221, 'CC1': 0, 'CC2': 0, 'CC3': 0, 'CC4': 0, 'DMA': 0, 'IPR': 0} | Update for htmlshark and jsqueue | koehlma_pygrooveshark | train | py |
a57414664814cffe95e76f58a899b8f15ed8a443 | diff --git a/lib/arduino_ci/cpp_library.rb b/lib/arduino_ci/cpp_library.rb
index <HASH>..<HASH> 100644
--- a/lib/arduino_ci/cpp_library.rb
+++ b/lib/arduino_ci/cpp_library.rb
@@ -27,12 +27,17 @@ module ArduinoCI
end
def cpp_files_in(some_dir)
- Find.find(some_dir).select { |path| CPP_EXTENSIONS.include?(File.extname(path)) }
+ real = File.realpath(some_dir)
+ Find.find(real).select { |path| CPP_EXTENSIONS.include?(File.extname(path)) }
end
# CPP files that are part of the project library under test
def cpp_files
- cpp_files_in(@base_dir).reject { |p| p.start_with?(tests_dir + File::SEPARATOR) }
+ real_tests_dir = File.realpath(tests_dir)
+ cpp_files_in(@base_dir).reject do |p|
+ next true if File.dirname(p).include?(tests_dir)
+ next true if File.dirname(p).include?(real_tests_dir)
+ end
end
# CPP files that are part of the arduino mock library we're providing | avoid problems related to finding a symbolic link | ianfixes_arduino_ci | train | rb |
b0eb7ec3d072298a9b00ca8dfb863b1b917bf4f3 | diff --git a/lib/generators/mindapp/install_generator.rb b/lib/generators/mindapp/install_generator.rb
index <HASH>..<HASH> 100644
--- a/lib/generators/mindapp/install_generator.rb
+++ b/lib/generators/mindapp/install_generator.rb
@@ -25,7 +25,7 @@ module Mindapp
gem "rspec"
gem "rspec-rails"
gem "better_errors"
- gem "binding_of_caller"
+ gem "binding_of_caller", :platform => "ruby"
end
end
diff --git a/lib/mindapp/helpers.rb b/lib/mindapp/helpers.rb
index <HASH>..<HASH> 100644
--- a/lib/mindapp/helpers.rb
+++ b/lib/mindapp/helpers.rb
@@ -358,7 +358,7 @@ end
class String
def comment?
- self[0]==35 # check if first char is #
+ self[0]=='#'
end
def to_code
s= self.dup
diff --git a/lib/tasks/mindapp.rake b/lib/tasks/mindapp.rake
index <HASH>..<HASH> 100644
--- a/lib/tasks/mindapp.rake
+++ b/lib/tasks/mindapp.rake
@@ -182,7 +182,8 @@ end
# ----------------------------
class String
def comment?
- self[0]==35 # check if first char is #
+ self[0]=='#'
+ # self[0]==35 # check if first char is #
end
def to_code
s= self.dup | fix binding_of_caller gem on Mac | kul1_mindapp2 | train | rb,rb,rake |
6b03c22af309cb8740a1eaf72d3abce1cc84f501 | diff --git a/pyang/plugins/depend.py b/pyang/plugins/depend.py
index <HASH>..<HASH> 100644
--- a/pyang/plugins/depend.py
+++ b/pyang/plugins/depend.py
@@ -57,7 +57,7 @@ class DependPlugin(plugin.PyangPlugin):
# cannot do this unless everything is ok for our module
modulenames = [m.arg for m in modules]
for (epos, etag, eargs) in ctx.errors:
- if (epos.top.arg in modulenames and
+ if ((epos.top is None or epos.top.arg in modulenames) and
error.is_error(error.err_level(etag))):
raise error.EmitError("%s contains errors" % epos.top.arg)
emit_depend(ctx, modules, fd)
diff --git a/pyang/plugins/uml.py b/pyang/plugins/uml.py
index <HASH>..<HASH> 100644
--- a/pyang/plugins/uml.py
+++ b/pyang/plugins/uml.py
@@ -113,7 +113,7 @@ class UMLPlugin(plugin.PyangPlugin):
def emit(self, ctx, modules, fd):
for (epos, etag, eargs) in ctx.errors:
- if (epos.top.arg in self.mods and
+ if ((epos.top is None or epos.top.arg in self.mods) and
error.is_error(error.err_level(etag))):
self.fatal("%s contains errors" % epos.top.arg) | Don't assume that errors have 'top' attributes | mbj4668_pyang | train | py,py |
bce72759d929e473ab2213723123465e03d14260 | diff --git a/lib/chatrix/room.rb b/lib/chatrix/room.rb
index <HASH>..<HASH> 100644
--- a/lib/chatrix/room.rb
+++ b/lib/chatrix/room.rb
@@ -150,8 +150,7 @@ module Chatrix
# Process state events.
# @param data [Hash] Events to process.
def process_state(data)
- return unless data.key? 'events'
- data['events'].each { |e| process_state_event e }
+ data['events'].each { |e| process_state_event e } if data.key? 'events'
end
# Process timeline events. | Make Room#process_state look cleaner | Sharparam_chatrix | train | rb |
46b4dfc6bf962295551615db89b95f47e02f4bd5 | diff --git a/src/hello.js b/src/hello.js
index <HASH>..<HASH> 100644
--- a/src/hello.js
+++ b/src/hello.js
@@ -895,7 +895,7 @@ hello.utils.extend( hello.utils, {
return window.location;
}
// Chrome and FireFox support new URL() to extract URL objects
- else if( window.URL && URL instanceof Function ){
+ else if( window.URL && URL instanceof Function && URL.length !== 0){
return new URL(path, window.location);
}
else{ | fix bug: illegal constructor in FF v<=<I> | MrSwitch_hello.js | train | js |
665c598bf1a6e1ac6bcc2e5829f334a6af808078 | diff --git a/api/policies/CriteriaPolicy.js b/api/policies/CriteriaPolicy.js
index <HASH>..<HASH> 100644
--- a/api/policies/CriteriaPolicy.js
+++ b/api/policies/CriteriaPolicy.js
@@ -93,7 +93,9 @@ function responsePolicy(criteria, _data, options) {
if (filtered.length) {
if (crit.blacklist && crit.blacklist.length) {
- item = _.omit(item, crit.blacklist);
+ crit.blacklist.forEach(function (term) {
+ delete item[term];
+ });
}
memo.push(item);
return true; | fix how blacklisted keys are filtered from response | trailsjs_sails-permissions | train | js |
1a00a84472b9dfbb83e84d8644aaa15098eb2cc2 | diff --git a/application.go b/application.go
index <HASH>..<HASH> 100644
--- a/application.go
+++ b/application.go
@@ -338,6 +338,10 @@ func (client *Client) ApplicationOK(name string) (bool, error) {
for _, task := range application.Tasks {
if task.HealthCheckResult != nil {
for _, check := range task.HealthCheckResult {
+ //When a task is flapping in Marathon, this is sometimes nil
+ if check == nil {
+ return false, nil
+ }
if !check.Alive {
return false, nil
}
@@ -387,7 +391,7 @@ func (client *Client) WaitOnApplication(name string, timeout time.Duration) erro
err := deadline(timeout, func(stop_channel chan bool) error {
var flick AtomicSwitch
go func() {
- <- stop_channel
+ <-stop_channel
close(stop_channel)
flick.SwitchOn()
}() | added check for nil check in healthcheckresult | gambol99_go-marathon | train | go |
92e98a1feddec2a905d7d4c312835ab24079effe | diff --git a/libs/logger.js b/libs/logger.js
index <HASH>..<HASH> 100644
--- a/libs/logger.js
+++ b/libs/logger.js
@@ -2,7 +2,7 @@ const util = require('util')
util.inspect.defaultOptions.maxArrayLength = null
util.inspect.defaultOptions.colors = true
-const env = process.env.NODE_ENV
+const env = process.env.NODE_ENV || ''
const env2formats = {
'': prodFormat,
production: prodFormat, | fix: logger initialization in production environment | konnectors_libs | train | js |
c5264ce196c2f6d60b9d662a160f8e146c9aa23c | diff --git a/src/css.js b/src/css.js
index <HASH>..<HASH> 100644
--- a/src/css.js
+++ b/src/css.js
@@ -3,7 +3,7 @@
var ralpha = /alpha\([^)]*\)/i,
ropacity = /opacity=([^)]*)/,
rdashAlpha = /-([a-z])/ig,
- rupper = /([A-Z])/g,
+ rupper = /([A-Z]|^ms)/g,
rnumpx = /^-?\d+(?:px)?$/i,
rnum = /^-?\d/, | fix the regular expression that turns camel-case properties to lower-case ones for IE9. Fixes #<I> | jquery_jquery | train | js |
e10bca512bb73fb59d61c99300748fc77ec7e08b | diff --git a/dynamic_dynamodb/dynamic_dynamodb.py b/dynamic_dynamodb/dynamic_dynamodb.py
index <HASH>..<HASH> 100755
--- a/dynamic_dynamodb/dynamic_dynamodb.py
+++ b/dynamic_dynamodb/dynamic_dynamodb.py
@@ -260,7 +260,12 @@ class DynamicDynamoDB:
"""
self._ensure_dynamodb_connection()
table = self._ddb_connection.get_table(self.table_name)
- table.update_throughput(int(read_units, int(write_units)))
+ self.logger.info(
+ 'Updating read provisioning to: {0:d}'.format(read_units))
+ self.logger.info(
+ 'Updating write provisioning to: {0:d}'.format(write_units))
+ if not self.dry_run:
+ table.update_throughput(int(read_units, int(write_units)))
def main(): | Now supporting dry run
And some output fixed | sebdah_dynamic-dynamodb | train | py |
f67e04f478420a28e8084b1df1d21961f3fd1e15 | diff --git a/logback-android/src/test/java/ch/qos/logback/core/rolling/TimeBasedRollingWithArchiveRemoval_Test.java b/logback-android/src/test/java/ch/qos/logback/core/rolling/TimeBasedRollingWithArchiveRemoval_Test.java
index <HASH>..<HASH> 100755
--- a/logback-android/src/test/java/ch/qos/logback/core/rolling/TimeBasedRollingWithArchiveRemoval_Test.java
+++ b/logback-android/src/test/java/ch/qos/logback/core/rolling/TimeBasedRollingWithArchiveRemoval_Test.java
@@ -123,9 +123,9 @@ public class TimeBasedRollingWithArchiveRemoval_Test extends ScaffoldingForRolli
long bytesOutputPerPeriod = 15984;
int sizeInUnitsOfBytesPerPeriod = 2;
- cp.maxHistory(5).simulatedNumberOfPeriods(10).sizeCap(sizeInUnitsOfBytesPerPeriod * bytesOutputPerPeriod);
+ cp.maxHistory(5).simulatedNumberOfPeriods(10).sizeCap(sizeInUnitsOfBytesPerPeriod * bytesOutputPerPeriod+1000);
generateDailyRollover(cp);
- checkFileCount(sizeInUnitsOfBytesPerPeriod);
+ checkFileCount(sizeInUnitsOfBytesPerPeriod+1);
}
@Test | TimeBasedRollingWithArchiveRemoval_Test.checkCleanupForBasicDailyRolloverWit
hSizeCap pass on both Windows and Linux
<URL> | tony19_logback-android | train | java |
c10f375a5eda9e54e7df88eafa6f24cbcfce37b1 | diff --git a/pgstore.go b/pgstore.go
index <HASH>..<HASH> 100644
--- a/pgstore.go
+++ b/pgstore.go
@@ -31,7 +31,8 @@ type Session struct {
ExpiresOn time.Time `db:"expires_on"`
}
-// NewPGStore creates a new PGStore instance and a new database/sql pool
+// NewPGStore creates a new PGStore instance and a new database/sql pool.
+// This will also create in the database the schema needed by pgstore.
func NewPGStore(dbURL string, keyPairs ...[]byte) *PGStore {
db, err := sql.Open("postgres", dbURL)
if err != nil {
@@ -42,7 +43,8 @@ func NewPGStore(dbURL string, keyPairs ...[]byte) *PGStore {
}
// NewPGStoreFromPool creates a new PGStore instance from an existing
-// database/sql pool
+// database/sql pool.
+// This will also create in the database the schema needed by pgstore.
func NewPGStoreFromPool(db *sql.DB, keyPairs ...[]byte) *PGStore {
dbmap := &gorp.DbMap{Db: db, Dialect: gorp.PostgresDialect{}} | Improved docs for #<I> | antonlindstrom_pgstore | train | go |
03b551fdb144b07af6c42373074def962d979da7 | diff --git a/watch.go b/watch.go
index <HASH>..<HASH> 100644
--- a/watch.go
+++ b/watch.go
@@ -8,6 +8,8 @@ import (
"gopkg.in/fsnotify.v1"
)
+const chmodMask fsnotify.Op = ^fsnotify.Op(0) ^ fsnotify.Chmod
+
// watch recursively watches changes in root and reports the filenames to names.
// It sends an error on the done chan.
// As an optimization, any dirs we encounter that meet the ExcludePrefix criteria of all reflexes can be
@@ -28,7 +30,7 @@ func watch(root string, watcher *fsnotify.Watcher, names chan<- string, done cha
continue
}
path := normalize(e.Name, stat.IsDir())
- if e.Op&fsnotify.Chmod > 0 {
+ if e.Op&chmodMask == 0 {
continue
}
names <- path | Only ignore events that are *only* CHMOD
Fixes #<I>. | cespare_reflex | train | go |
ad2cc37e6487f3238ddca9bf017a67247fd85f05 | diff --git a/lib/backup/cli/utility.rb b/lib/backup/cli/utility.rb
index <HASH>..<HASH> 100644
--- a/lib/backup/cli/utility.rb
+++ b/lib/backup/cli/utility.rb
@@ -190,6 +190,7 @@ module Backup
desc 'dependencies', 'Display the list of dependencies for Backup, or install them through Backup.'
method_option :install, :type => :string
method_option :list, :type => :boolean
+ method_option :installed, :type => :string
def dependencies
unless options.any?
puts
@@ -198,6 +199,9 @@ module Backup
puts
puts "To install one of these dependencies (with the correct version), run:\n\n"
puts " backup dependencies --install <name>"
+ puts
+ puts "To check if a dependency is already installed, run:\n\n"
+ puts " backup dependencies --installed <name>"
exit
end
@@ -220,6 +224,10 @@ module Backup
puts "Please wait..\n\n"
puts %x[gem install #{options[:install]} -v '#{Backup::Dependency.all[options[:install]][:version]}']
end
+
+ if options[:installed]
+ puts %x[gem list -i -v '#{Backup::Dependency.all[options[:installed]][:version]}' #{options[:installed]}]
+ end
end
## | added ability to check if a dependency is already installed. | backup_backup | train | rb |
47fedffcda2444976ed3f8635acaa797bdce44b3 | diff --git a/network_interfaces/iface.py b/network_interfaces/iface.py
index <HASH>..<HASH> 100644
--- a/network_interfaces/iface.py
+++ b/network_interfaces/iface.py
@@ -1,6 +1,5 @@
# -*- coding: utf-8 -*-
from .stanza import MultilineStanza
-import ipcalc
from .errors import ValidationError
__author__ = 'vahid'
@@ -49,21 +48,6 @@ class Iface(IfaceBase):
return '%s/%s' % (self.address, self.netmask)
def validate(self, allow_correction=False):
- if self.method == 'static':
-
- if 'netmask' not in self:
- raise ValidationError('The netmask option was not exists in the %s' % self.name)
-
- if allow_correction:
- self.network = str(ipcalc.IP(self.address_netmask).guess_network()).split('/')[0]
- else:
- if 'network' not in self:
- raise ValidationError('The network option was not exists in the %s' % self.name)
-
-
- network = ipcalc.Network('%s/%s' % (self.network, self.netmask))
- if ipcalc.IP(self.address) not in network:
- raise ValidationError('The ip address: %s was not exists in the network: %s' % (self.address, network))
return True | Fixed Error, function not found in ipcalc
Error: AttributeError: 'IP' object has no attribute 'guess_network' | pylover_network-interfaces | train | py |
2ffda8a7a5ea06faf6570c696a93d17ccb375ee1 | diff --git a/douban/douban.py b/douban/douban.py
index <HASH>..<HASH> 100644
--- a/douban/douban.py
+++ b/douban/douban.py
@@ -269,7 +269,7 @@ class Win(cli.Cli):
artist = colored(song['artist'], 'white')
self.SUFFIX_SELECTED = (love + ' ' + title + ' • ' + albumtitle + ' • ' + artist + ' ' + song['public_time']).replace('\\', '')
- cmd = 'mplayer -slave -nolirc -really-quiet -volume {volume} {song_url}'
+ cmd = 'mplayer -slave -nolirc -really-quiet -softvol -volume {volume} {song_url}'
volume = 0 if self.lock_muted else self.volume
cmd = cmd.format(volume=volume, song_url=song['url'])
logger.debug('Starting process: ' + cmd) | Force using soft volume for mplayer | taizilongxu_douban.fm | train | py |
4b8f7ea2c9bb44ac9bdbd440ef778323d5a66d28 | diff --git a/module.js b/module.js
index <HASH>..<HASH> 100644
--- a/module.js
+++ b/module.js
@@ -1,16 +1,15 @@
module.exports = require( 'classes' ).Module.extend({
preRoute: function( UserModel, AccountModel ) {
- UserModel.on( 'preQuery', function( options ) {
- var nestedInclude = {
- model : AccountModel._model
- };
+ UserModel.on('beforeAllFindersOptions', function(findOptions, queryOptions, callback) {
+ findOptions.include = findOptions.include || [];
- if ( typeof options.include === 'undefined' ) {
- options.include = [];
- }
- if ( options.include.indexOf( nestedInclude ) === -1 ) {
- options.include.push( nestedInclude );
+ if (!_.findWhere(findOptions.include, { model: AccountModel._model })) {
+ findOptions.include.push({
+ model : AccountModel._model
+ });
}
+
+ callback(null);
});
}
});
\ No newline at end of file | fix(findOptions): Updated to use the new hooks | CleverStack_clever-accounts | train | js |
8d2d6cb162237a7e93ae5d5378dfaefc7ebd078a | diff --git a/gubernator/gcs_async.py b/gubernator/gcs_async.py
index <HASH>..<HASH> 100644
--- a/gubernator/gcs_async.py
+++ b/gubernator/gcs_async.py
@@ -21,7 +21,7 @@ import google.appengine.ext.ndb as ndb
GCS_API_URL = 'https://storage.googleapis.com'
STORAGE_API_URL = 'https://www.googleapis.com/storage/v1/b'
-
+MAX_SIZE = 30 * 1024 ** 2 # 30MiB
@ndb.tasklet
def get(url):
@@ -36,7 +36,12 @@ def get(url):
if status in (200, 206):
content = result.content
if result.headers.get('content-encoding') == 'gzip':
- content = zlib.decompress(result.content, 15 | 16)
+ dec = zlib.decompressobj(15 | 16)
+ content = dec.decompress(result.content, MAX_SIZE)
+ if dec.unconsumed_tail:
+ logging.warning('only decompressed %d KB, %d KB remain in buffer.',
+ len(content) / 1024,
+ len(dec.unconsumed_tail) / 1024)
raise ndb.Return(content)
logging.error("unable to fetch '%s': status code %d", url, status)
raise ndb.Return(None) | Limit Gubernator GCS fetching to <I>MB (decompressed) to avoid OOMs.
The frontend already discards excess log lines to avoid returning
too-large responses and erroring, so this shouldn't affect normal
operation. | kubernetes_test-infra | train | py |
48b2281244a81877af98f56e42e80a30d5e7ae3d | diff --git a/isochrones/starmodel.py b/isochrones/starmodel.py
index <HASH>..<HASH> 100644
--- a/isochrones/starmodel.py
+++ b/isochrones/starmodel.py
@@ -454,7 +454,9 @@ class StarModel(object):
Adds non-photometry properties to ObservationTree
"""
for k,v in kwargs.items():
- if k=='parallax':
+ if k in self.ic.bands:
+ continue
+ elif k=='parallax':
self.obs.add_parallax(v)
elif k=='AV':
self.obs.add_AV(v) | make sure not to break if band has an _ | timothydmorton_isochrones | train | py |
01658355dae810e91cbab5fd4d0d10bbce0b4a6a | diff --git a/src/Symfony/Component/Console/Application.php b/src/Symfony/Component/Console/Application.php
index <HASH>..<HASH> 100644
--- a/src/Symfony/Component/Console/Application.php
+++ b/src/Symfony/Component/Console/Application.php
@@ -1002,6 +1002,8 @@ class Application
*
* @param string $commandName The Command name
* @param bool $isSingleCommand Set to true if there is only one command in this application
+ *
+ * @return self
*/
public function setDefaultCommand($commandName, $isSingleCommand = false)
{ | [Console] Fix Application::setDefaultCommand() missing return in docblock | symfony_symfony | train | php |
ac03edbcd53628720da20328f024ed43fc23ecf4 | diff --git a/probes/src/main/java/com/hazelcast/simulator/probes/xml/HistogramConverter.java b/probes/src/main/java/com/hazelcast/simulator/probes/xml/HistogramConverter.java
index <HASH>..<HASH> 100644
--- a/probes/src/main/java/com/hazelcast/simulator/probes/xml/HistogramConverter.java
+++ b/probes/src/main/java/com/hazelcast/simulator/probes/xml/HistogramConverter.java
@@ -41,7 +41,7 @@ final class HistogramConverter implements Converter {
byte[] bytes = decodeBase64(encodedHistogram);
return decodeFromCompressedByteBuffer(ByteBuffer.wrap(bytes), 0);
} catch (Exception e) {
- throw new RuntimeException("Could not parse histogram");
+ throw new IllegalArgumentException("Could not parse histogram", e);
}
}
} | Fixed "preserve stack trace" and "avoid throwing raw exception types" issues from SonarQube. | hazelcast_hazelcast-simulator | train | java |
276bddf8e44f34c6f3a7f899ad883f865ef72e4f | diff --git a/options/parser.go b/options/parser.go
index <HASH>..<HASH> 100644
--- a/options/parser.go
+++ b/options/parser.go
@@ -36,14 +36,10 @@ func NewParser(raw []string) (p *Parser, sub string) {
panic("Must use a subcommand")
}
p = &Parser{make(map[string]Flag), make([]string, 0)}
- p.args = append(p.args, raw[0])
- flagsDone := false
+ sub = raw[0]
i := 1
for i < len(raw) {
switch {
- case flagsDone:
- p.args = append(p.args, raw[i])
- i++
case strings.HasPrefix(raw[i], "--"):
pieces := strings.Split(raw[i], "=")
if len(pieces) == 1 {
@@ -61,14 +57,12 @@ func NewParser(raw []string) (p *Parser, sub string) {
}
i++
default:
- flagsDone = true
+ goto END
}
}
- if len(p.args) == 0 {
- return
- }
- sub = p.args[0]
- p.args = p.args[1:]
+END:if i < len(raw) {
+ p.args = append(p.args, raw[i:]...)
+ }
return
} | Take two on fixing arg parsing | DataDrake_cli-ng | train | go |
52c42c647d4fe43f181d4ddf5ce838a64ed28046 | diff --git a/holoviews/element/raster.py b/holoviews/element/raster.py
index <HASH>..<HASH> 100644
--- a/holoviews/element/raster.py
+++ b/holoviews/element/raster.py
@@ -41,6 +41,8 @@ class Raster(Element2D):
super(Raster, self).__init__(data, extents=extents, **params)
+ def __getitem__(self, slices):
+ return self.clone(self.data.__getitem__(slices))
def _coord2matrix(self, coord): | Added __getitem__ to Raster to support array slicing semantics | pyviz_holoviews | train | py |
05a9024cd23ddc1f9b3e7a40b7c97c5ea0c54327 | diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -20,7 +20,7 @@ f.close()
setup(
name='django-cron',
- version='0.2.2',
+ version='0.2.3',
author='Sumit Chachra',
author_email='[email protected]',
url='http://github.com/tivix/django-cron', | Bumping version to <I> | Tivix_django-cron | train | py |
aad59cf147c887c4f709406393e8a242a49bc531 | diff --git a/h2o-algos/src/main/java/hex/tree/SharedTree.java b/h2o-algos/src/main/java/hex/tree/SharedTree.java
index <HASH>..<HASH> 100755
--- a/h2o-algos/src/main/java/hex/tree/SharedTree.java
+++ b/h2o-algos/src/main/java/hex/tree/SharedTree.java
@@ -342,6 +342,10 @@ public abstract class SharedTree<M extends SharedTreeModel<M,P,O>, P extends Sha
_build_tree_one_node = build_tree_one_node;
_improvPerVar = improvPerVar;
_family = family;
+ // Raise the priority, so that if a thread blocks here, we are guaranteed
+ // the task completes (perhaps using a higher-priority thread from the
+ // upper thread pools). This prevents thread deadlock.
+ _priority = nextThrPriority();
}
@Override public void compute2() {
// Fuse 2 conceptual passes into one:
@@ -381,6 +385,8 @@ public abstract class SharedTree<M extends SharedTreeModel<M,P,O>, P extends Sha
_hcs[_k][nl-tmax] = _tree.undecided(nl)._hs;
if (_did_split) _tree._depth++;
}
+ @Override public byte priority() { return _priority; }
+ private final byte _priority;
}
// -------------------------------------------------------------------------- | Raise GBM worker thread priority
to avoid some cases of deadlock with high parallel GBM job counts | h2oai_h2o-3 | train | java |
8d54123b51b8e4f1bf144060b30e5f91a397b3bd | diff --git a/plugins/PluginCertInfo.py b/plugins/PluginCertInfo.py
index <HASH>..<HASH> 100755
--- a/plugins/PluginCertInfo.py
+++ b/plugins/PluginCertInfo.py
@@ -387,6 +387,8 @@ class PluginCertInfo(PluginBase.PluginBase):
def _create_xml_node(key, value=''):
key = key.replace(' ', '').strip() # Remove spaces
key = key.replace('/', '').strip() # Remove slashes (S/MIME Capabilities)
+ key = key.replace('<' , '_')
+ key = key.replace('>' , '_')
# Things that would generate invalid XML
if key[0].isdigit(): # Tags cannot start with a digit | Replace < and > when making xml tag from dict key | nabla-c0d3_sslyze | train | py |
470d31bff3a7af4a7f5964fb0d9cfbd618eedb2e | diff --git a/src/controllers/SketchpadController.php b/src/controllers/SketchpadController.php
index <HASH>..<HASH> 100644
--- a/src/controllers/SketchpadController.php
+++ b/src/controllers/SketchpadController.php
@@ -1,5 +1,6 @@
<?php namespace davestewart\sketchpad\controllers;
+use davestewart\sketchpad\config\SketchpadConfig;
use Illuminate\Http\Request;
use Illuminate\Routing\Controller;
use Illuminate\Support\Facades\Input;
@@ -56,11 +57,12 @@ class SketchpadController extends Controller
return $setup->index();
}
- public function asset($file)
+ public function asset(SketchpadConfig $config, Paths $paths, $file)
{
- // absolute path
- $paths = new Paths();
- $path = $paths->publish("assets/$file");
+ // path
+ $path = strpos($file, 'user/') === 0
+ ? base_path($config->assets . substr($file, 5))
+ : $paths->publish("assets/$file");
// 404
if(!file_exists($path)) | Added functionality to load custom user assets | davestewart_laravel-sketchpad | train | php |
322015e22a80f0330141f2d30463a4a2a6b4e6a7 | diff --git a/gbdxtools/images/meta.py b/gbdxtools/images/meta.py
index <HASH>..<HASH> 100644
--- a/gbdxtools/images/meta.py
+++ b/gbdxtools/images/meta.py
@@ -466,7 +466,8 @@ class PlotMixin(object):
if "blm" in kwargs and not kwargs["blm"]:
return rgb
from gbdxtools.images.tms_image import TmsImage
- tms = TmsImage(zoom=18, bbox=self.bounds, **kwargs)
+ bounds = self._reproject(box(*self.bounds), from_proj=self.proj, to_proj="EPSG:4326").bounds
+ tms = TmsImage(zoom=18, bbox=bounds, **kwargs)
ref = np.rollaxis(tms.read(), 0, 3)
out = np.dstack([histogram_match(rgb[:,:,idx], ref[:,:,idx].astype(np.double)/255.0)
for idx in xrange(rgb.shape[-1])]) | support for reprojecting bounds to <I> | DigitalGlobe_gbdxtools | train | py |
6dab0b28c7e19ddcca8aacaf56763e221c2cdebe | diff --git a/activerecord/lib/active_record/associations.rb b/activerecord/lib/active_record/associations.rb
index <HASH>..<HASH> 100644
--- a/activerecord/lib/active_record/associations.rb
+++ b/activerecord/lib/active_record/associations.rb
@@ -285,7 +285,7 @@ module ActiveRecord
# end
#
# If your model class is <tt>Project</tt>, the module is
- # named <tt>Project::GeneratedFeatureMethods</tt>. The GeneratedFeatureMethods module is
+ # named <tt>Project::GeneratedAssociationMethods</tt>. The GeneratedAssociationMethods module is
# included in the model class immediately after the (anonymous) generated attributes methods
# module, meaning an association will override the methods for an attribute with the same name.
# | change GeneratedFeatureMethods to GeneratedAssociationMethods in docs
the module name was changed in 8e<I>a0ac<I>d2bfd<I>d<I>d<I>e | rails_rails | train | rb |
35a7a49f3c0b10c84068112bc8123e579618f523 | diff --git a/lib/ebay_trading/sax_handler.rb b/lib/ebay_trading/sax_handler.rb
index <HASH>..<HASH> 100644
--- a/lib/ebay_trading/sax_handler.rb
+++ b/lib/ebay_trading/sax_handler.rb
@@ -142,6 +142,7 @@ module EbayTrading
key = key.to_s
key = key.gsub('PayPal', 'Paypal')
key = key.gsub('eBay', 'Ebay')
+ key = key.gsub('EBay', 'Ebay')
key.underscore.to_sym
end
diff --git a/lib/ebay_trading/version.rb b/lib/ebay_trading/version.rb
index <HASH>..<HASH> 100644
--- a/lib/ebay_trading/version.rb
+++ b/lib/ebay_trading/version.rb
@@ -1,3 +1,3 @@
module EbayTrading
- VERSION = '0.8.6'
+ VERSION = '0.8.7'
end | Convert keys beginning with 'EBay' to 'Ebay' to prevent them from being symbolized to e_bay. | altabyte_ebay_trader | train | rb,rb |
93049d6e8f2264fbdb1f8a6c6030b2ce97cd6e59 | diff --git a/hamster/hamster-applet.py b/hamster/hamster-applet.py
index <HASH>..<HASH> 100755
--- a/hamster/hamster-applet.py
+++ b/hamster/hamster-applet.py
@@ -86,7 +86,7 @@ def on_destroy(event):
if config.get_stop_on_shutdown():
from hamster import storage
last_activity = storage.get_last_activity()
- if last_activity['end_time'] == None:
+ if last_activity and last_activity['end_time'] == None:
storage.touch_fact(last_activity)
gtk.main_quit() | Fixed fail on exit when there is no end time on the las activity.
* hamster/hamster-applet.py: Fixed fail on exit when there is no
end time on the las activity.
svn path=/trunk/; revision=<I> | projecthamster_hamster | train | py |
cbed252508e3409da59aee457cd734510626697e | diff --git a/src/widgets/TbForm.php b/src/widgets/TbForm.php
index <HASH>..<HASH> 100644
--- a/src/widgets/TbForm.php
+++ b/src/widgets/TbForm.php
@@ -131,14 +131,15 @@ class TbForm extends CForm
* @param array $config
* @param $parent
* @param array $options
+ * @param CModel $model
* @return mixed
*/
- public static function createForm($config, $parent, $options = array())
+ public static function createForm($config, $parent, $options = array(), $model = null)
{
$class = __CLASS__;
$options['class'] = 'TbActiveForm';
- $form = new $class($config, null, $parent);
+ $form = new $class($config, $model, $parent);
$form->activeForm = $options;
return $form; | Added a "model" parameter to the `TbForm.createForm` method signature for it to be able to pass models to underlying constructor.
re #<I> | clevertech_YiiBooster | train | php |
29d80c401f3af6b1799e09a5d4dd69c1b86979f3 | diff --git a/cacheback/base.py b/cacheback/base.py
index <HASH>..<HASH> 100644
--- a/cacheback/base.py
+++ b/cacheback/base.py
@@ -384,7 +384,8 @@ class Job(object):
# ASYNC HELPER METHODS
# --------------------
- def job_refresh(klass_str, obj_args, obj_kwargs, call_args, call_kwargs):
+ @classmethod
+ def job_refresh(cls, klass_str, obj_args, obj_kwargs, call_args, call_kwargs):
"""
Re-populate cache using the given job class. | Added missing classmethod decorator. | codeinthehole_django-cacheback | train | py |
5e22bfd30fd4b0bb475e7050ef02dbb0d0f12865 | diff --git a/core-bundle/src/Resources/contao/elements/ContentProxy.php b/core-bundle/src/Resources/contao/elements/ContentProxy.php
index <HASH>..<HASH> 100644
--- a/core-bundle/src/Resources/contao/elements/ContentProxy.php
+++ b/core-bundle/src/Resources/contao/elements/ContentProxy.php
@@ -68,7 +68,7 @@ class ContentProxy extends ContentElement
public function __get($strKey)
{
- return $this->reference->attributes['templateProperties'][$strKey];
+ return $this->reference->attributes['templateProperties'][$strKey] ?? null;
}
public function __isset($strKey) | Fix another invalid array access (see #<I>)
Description
-----------
| Q | A
| -----------------| ---
| Fixed issues | Fixes -
| Docs PR or issue | -
Prevents `Warning: Undefined array key "protected"`.
The code in question is called here: <URL> | contao_contao | train | php |
eba4583c1df14e559bf6984b133fd03f7018e2b5 | diff --git a/code/libraries/koowa/libraries/object/array.php b/code/libraries/koowa/libraries/object/array.php
index <HASH>..<HASH> 100644
--- a/code/libraries/koowa/libraries/object/array.php
+++ b/code/libraries/koowa/libraries/object/array.php
@@ -276,7 +276,7 @@ class KObjectArray extends KObject implements IteratorAggregate, ArrayAccess, Se
*/
public function __isset($key)
{
- return $this->has($key) && !is_null($this->_data[$key]);
+ return $this->has($key);
}
/** | Revert KObjectArray::__isset to its status before the refactor | joomlatools_joomlatools-framework | train | php |
7be582e5e94bc04d64f6f2b6375abb91500a768a | diff --git a/spec/dummy/config/routes.rb b/spec/dummy/config/routes.rb
index <HASH>..<HASH> 100644
--- a/spec/dummy/config/routes.rb
+++ b/spec/dummy/config/routes.rb
@@ -1,4 +1,6 @@
Dummy::Application.routes.draw do
+ devise_for :users, :controllers => {:omniauth_callbacks => 'omniauth_callbacks'}
+
# The priority is based upon order of creation:
# first created -> highest priority. | Include devise route in spec/dummy | ging_social_stream | train | rb |
06e2f883036776bf96c81b264ecdc953f907d577 | diff --git a/spec/support/event_subscriber.rb b/spec/support/event_subscriber.rb
index <HASH>..<HASH> 100644
--- a/spec/support/event_subscriber.rb
+++ b/spec/support/event_subscriber.rb
@@ -4,20 +4,27 @@
class EventSubscriber
class << self
+
# The started events.
#
# @since 2.5.0
- attr_reader :started_events
+ def started_events
+ @started_events ||= []
+ end
# The succeeded events.
#
# @since 2.5.0
- attr_reader :succeeded_events
+ def succeeded_events
+ @succeeded_events ||= []
+ end
# The failed events.
#
# @since 2.5.0
- attr_reader :failed_events
+ def failed_events
+ @failed_events ||= []
+ end
# Cache the succeeded event.
#
@@ -25,7 +32,7 @@ class EventSubscriber
#
# @since 2.5.0
def succeeded(event)
- @succeeded_events.push(event)
+ succeeded_events.push(event)
end
# Cache the started event.
@@ -34,7 +41,7 @@ class EventSubscriber
#
# @since 2.5.0
def started(event)
- @started_events.push(event)
+ started_events.push(event)
end
# Cache the failed event.
@@ -43,7 +50,7 @@ class EventSubscriber
#
# @since 2.5.0
def failed(event)
- @failed_events.push(event)
+ failed_events.push(event)
end
# Clear all cached events. | Ensure that EventSubscriber arrays are initialized | mongodb_mongo-ruby-driver | train | rb |
7523ba68b993a8846d5a8b57127694db41d47c8a | diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100755
--- a/setup.py
+++ b/setup.py
@@ -11,12 +11,11 @@ import sys
if 'sdist' in sys.argv or 'develop' in sys.argv:
os.chdir('fluentcms_googlemaps')
try:
- from django.core.management.commands.compilemessages import Command
- Command().execute(stdout=sys.stderr, exclude=(), verbosity=1)
+ from django.core import management
+ management.call_command('compilemessages', stdout=sys.stderr, verbosity=1)
except ImportError:
- # < Django 1.7
- from django.core.management.commands.compilemessages import compile_messages
- compile_messages(sys.stderr)
+ if 'sdist' in sys.argv:
+ raise
finally:
os.chdir('..') | Improve compilemessages in setup.py for Django <I> | django-fluent_fluentcms-googlemaps | train | py |
e4f675ddc590f3d53f82afdefbb6a07b55597653 | diff --git a/features/eolearn/features/interpolation.py b/features/eolearn/features/interpolation.py
index <HASH>..<HASH> 100644
--- a/features/eolearn/features/interpolation.py
+++ b/features/eolearn/features/interpolation.py
@@ -393,6 +393,14 @@ class LinearInterpolation(InterpolationTask):
super().__init__(feature, scipy.interpolate.interp1d, kind='linear', **kwargs)
+class LinearInterpolationNP(InterpolationTask):
+ """
+ Implements `eolearn.features.InterpolationTask` by using numpy `np.interp`
+ """
+ def __init__(self, feature, **kwargs):
+ super().__init__(feature, np.interp, **kwargs)
+
+
class CubicInterpolation(InterpolationTask):
"""
Implements `eolearn.features.InterpolationTask` by using `scipy.interpolate.interp1d(kind='cubic')` | added LinearInterpolationNP(InterpolationTask) | sentinel-hub_eo-learn | train | py |
eb6a43a7989fc4056f80230459f69ddbb4f67c3a | diff --git a/activerecord/test/cases/associations/belongs_to_associations_test.rb b/activerecord/test/cases/associations/belongs_to_associations_test.rb
index <HASH>..<HASH> 100644
--- a/activerecord/test/cases/associations/belongs_to_associations_test.rb
+++ b/activerecord/test/cases/associations/belongs_to_associations_test.rb
@@ -996,15 +996,17 @@ class BelongsToAssociationsTest < ActiveRecord::TestCase
def test_polymorphic_assignment_foreign_key_type_string
comment = Comment.first
- comment.author = Author.first
- comment.resource = Member.first
+ comment.author = authors(:david)
+ comment.resource = members(:groucho)
comment.save
- assert_equal Comment.all.to_a,
- Comment.includes(:author).to_a
+ assert_equal 1, authors(:david).id
+ assert_equal 1, comment.author_id
+ assert_equal authors(:david), Comment.includes(:author).first.author
- assert_equal Comment.all.to_a,
- Comment.includes(:resource).to_a
+ assert_equal 1, members(:groucho).id
+ assert_equal "1", comment.resource_id
+ assert_equal members(:groucho), Comment.includes(:resource).first.resource
end
def test_polymorphic_assignment_foreign_type_field_updating | Fix the test case for #<I> to catch a future regression correctly
I've found the test doesn't catch a future regression since it doesn't
assert the result of the preload.
Also, add extra assertions to assert the difference of the value type. | rails_rails | train | rb |
fd0a3976d96c0c195e2960ec6ba483210fd7fb3c | diff --git a/src/hamster/lib/stuff.py b/src/hamster/lib/stuff.py
index <HASH>..<HASH> 100644
--- a/src/hamster/lib/stuff.py
+++ b/src/hamster/lib/stuff.py
@@ -294,8 +294,8 @@ class Fact(object):
activity, self.description = activity.split(",", 1)
self.description = self.description.strip()
- if "#" in self.description:
- self.description, self.tags = self.description.split("#", 1)
+ if " #" in self.description:
+ self.description, self.tags = self.description.split(" #", 1)
self.tags = [tag.strip(", ") for tag in self.tags.split("#") if tag.strip(", ")]
if activity.find("@") > 0:
@@ -315,8 +315,8 @@ class Fact(object):
tags = [tag.strip() for tag in tags.split(",") if tag.strip()]
# override implicit with explicit
- self.category = category.replace("#", "").replace(",", "") or self.category or None
- self.description = (description or "").replace("#", "") or self.description or None
+ self.category = category.replace(",", "") or self.category or None
+ self.description = (description or "").replace(" #", " ") or self.description or None
self.tags = tags or self.tags or []
self.start_time = start_time or self.start_time or None
self.end_time = end_time or self.end_time or None | be more careful on sanitizing - strip out only hashes that are preceded by a whitespace, don't strip out hashes out of categories. should fix Bug <I> | projecthamster_hamster | train | py |
13129fb36964d8dd05785cb84090ab3843ee6108 | diff --git a/src/Error/BaseErrorHandler.php b/src/Error/BaseErrorHandler.php
index <HASH>..<HASH> 100644
--- a/src/Error/BaseErrorHandler.php
+++ b/src/Error/BaseErrorHandler.php
@@ -122,7 +122,7 @@ class BaseErrorHandler
'description' => $description,
'file' => $file,
'line' => $line,
- 'error' => 'Fatal Error',
+ 'context' => null,
);
$this->logErrorData($data);
@@ -153,7 +153,7 @@ class BaseErrorHandler
'description' => $exception->getMessage(),
'file' => $exception->getFile(),
'line' => $exception->getLine(),
- 'error' => 'Exception',
+ 'context' => null,
);
$this->displayExceptionData($data);
diff --git a/src/Error/ErrorLogger.php b/src/Error/ErrorLogger.php
index <HASH>..<HASH> 100644
--- a/src/Error/ErrorLogger.php
+++ b/src/Error/ErrorLogger.php
@@ -14,7 +14,7 @@ class ErrorLogger
{
$this->logMessage(sprintf(
'%s (%s): %s in [%s, line %s]',
- $error['error'],
+ $error['type'],
$error['code'],
$error['description'],
$error['file'], | correctly removed error and replaced it with type | strata-mvc_strata | train | php,php |
f8be40321c698f4ff9c6a4e29b661b90939b4367 | diff --git a/DependencyInjection/Configuration.php b/DependencyInjection/Configuration.php
index <HASH>..<HASH> 100644
--- a/DependencyInjection/Configuration.php
+++ b/DependencyInjection/Configuration.php
@@ -18,7 +18,7 @@ class Configuration implements ConfigurationInterface
public function getConfigTreeBuilder()
{
$treeBuilder = new TreeBuilder();
-// $rootNode = $treeBuilder->root('spraed_pdf_generator');
+ $treeBuilder->root('spraed_pdf_generator');
// Here you should define the parameters that are allowed to
// configure your bundle. See the documentation linked above for | uncommented root node in configuration | stedekay_SpraedPDFGeneratorBundle | train | php |
9cf6c4c01e8ac9dd7f3a20c7bc367644e099042e | diff --git a/src/Charcoal/Admin/Ui/DashboardTrait.php b/src/Charcoal/Admin/Ui/DashboardTrait.php
index <HASH>..<HASH> 100644
--- a/src/Charcoal/Admin/Ui/DashboardTrait.php
+++ b/src/Charcoal/Admin/Ui/DashboardTrait.php
@@ -119,10 +119,16 @@ trait DashboardTrait
*/
public function createWidget(array $data = null)
{
- $widget_type = isset($data['type']) ? $data['type'] : null;
+ if(isset($data['controller'])) {
+ $widgetType = $data['controller'];
+ } elseif (isset($data['type'])) {
+ $widgetType = $data['type'];
+ } else {
+ $widgetType = null;
+ }
- $this->logger->debug('Creating a new widget: '.$data['type'], $data);
- $widget = $this->widgetFactory()->create($widget_type, [
+ $this->logger->debug('Creating a new widget: '.$widgetType, $data);
+ $widget = $this->widgetFactory()->create($widgetType, [
'logger'=>$this->logger
]);
if ($data !== null) { | Allow widgets to have a custom controller.
It is now possible to specify a controler different than the template ("type") with the "controller" key:
```
{
"widgets": {
"mywidget":{
"type":"charcoal/admin/widget/foo-bar",
"controller":"charcoal/admin/widget/project/custom-foo"
}
}
}
``` | locomotivemtl_charcoal-admin | train | php |
ce04467d998ddeabdf989bc9193cb85ed8120382 | diff --git a/nightwatch.js b/nightwatch.js
index <HASH>..<HASH> 100644
--- a/nightwatch.js
+++ b/nightwatch.js
@@ -21,21 +21,21 @@ const launch_url = process.env.NOW_URL || 'https://boltdesignsystem.com';
console.log({ launch_url });
if (process.env.TRAVIS) {
- setCheckRun({
- name: 'Nightwatch',
- status: 'in_progress',
- output: {
- title: 'Nightwatch running...',
- summary: `
- - Url used: ${process.env.NOW_URL}
- `.trim(),
- // details: '',
- },
- })
- .then(results => {
- console.log(`Check run started for Nightwatch: ${results.html_url}`);
- })
- .catch(console.log.bind(console));
+ // setCheckRun({
+ // name: 'Nightwatch',
+ // status: 'in_progress',
+ // output: {
+ // title: 'Nightwatch running...',
+ // summary: `
+ // - Url used: ${process.env.NOW_URL}
+ // `.trim(),
+ // // details: '',
+ // },
+ // })
+ // .then(results => {
+ // console.log(`Check run started for Nightwatch: ${results.html_url}`);
+ // })
+ // .catch(console.log.bind(console));
}
module.exports = { | chore: removing initial Nightwatch in_progress call | bolt-design-system_bolt | train | js |
86b466710e62fdb696048d3c73d97c76e7308a8a | diff --git a/lib/lattes_api/client.rb b/lib/lattes_api/client.rb
index <HASH>..<HASH> 100644
--- a/lib/lattes_api/client.rb
+++ b/lib/lattes_api/client.rb
@@ -22,7 +22,7 @@ module LattesApi
zip_file = File.open("#{path}#{id_cnpq}.zip", 'wb')
zip_file.write(decoded)
zip_file.close
- id_cnpq
+
end
private | Refactore added getCurriculoCompactado | nsi-iff_lattes_api | train | rb |
fc65ff69f900850c8ad25996f99a37a8033d12bf | diff --git a/lib/xrds.js b/lib/xrds.js
index <HASH>..<HASH> 100644
--- a/lib/xrds.js
+++ b/lib/xrds.js
@@ -28,7 +28,7 @@
exports.parse = function(data)
{
- data = data.replace(/\n/g, '');
+ data = data.replace(/\r|\n/g, '');
services = [];
var serviceMatches = data.match(/<Service\s*(priority="\d+")?\s*?>(.*?)<\/Service>/g); | Delete carriage return characters before parsing XRDS | havard_node-openid | train | js |
ae1765fd7472080242973c5ded03ad116cdefa35 | diff --git a/liquibase-core/src/main/java/liquibase/database/core/DB2Database.java b/liquibase-core/src/main/java/liquibase/database/core/DB2Database.java
index <HASH>..<HASH> 100644
--- a/liquibase-core/src/main/java/liquibase/database/core/DB2Database.java
+++ b/liquibase-core/src/main/java/liquibase/database/core/DB2Database.java
@@ -262,9 +262,10 @@ public class DB2Database extends AbstractJdbcDatabase {
if (databaseConnection != null && databaseConnection instanceof JdbcConnection) {
try {
String databaseProductVersion = databaseConnection.getDatabaseProductVersion();
+ String databaseProductName = databaseConnection.getDatabaseProductName();
if (databaseProductVersion.startsWith("SQL")) {
this.dataServerType = DataServerType.DB2LUW;
- } else if (databaseProductVersion.startsWith("QSQ")) {
+ } else if (databaseProductVersion.startsWith("QSQ") || databaseProductName.startsWith("DB2 UDB for AS/400")) {
this.dataServerType = DataServerType.DB2I;
} else if (databaseProductVersion.startsWith("DSN")) {
this.dataServerType = DataServerType.DB2Z; | CORE-<I> Detection of DB2/AS<I> improved | liquibase_liquibase | train | java |
0ac9f1ae2f86e7a974450c6c38d0126cff440a23 | diff --git a/Tests/Unit/ViewHelpers/Format/UrlencodeViewHelperTest.php b/Tests/Unit/ViewHelpers/Format/UrlencodeViewHelperTest.php
index <HASH>..<HASH> 100644
--- a/Tests/Unit/ViewHelpers/Format/UrlencodeViewHelperTest.php
+++ b/Tests/Unit/ViewHelpers/Format/UrlencodeViewHelperTest.php
@@ -29,7 +29,7 @@ class UrlencodeViewHelperTest extends ViewHelperBaseTestcase
public function setUp()
{
parent::setUp();
- $this->viewHelper = $this->getMockBuilder('TYPO3\Fluid\ViewHelpers\Format\UrlEncodeViewHelper')->setMethods(array('renderChildren'))->getMock();
+ $this->viewHelper = $this->getMockBuilder('TYPO3\Fluid\ViewHelpers\Format\UrlencodeViewHelper')->setMethods(array('renderChildren'))->getMock();
$this->injectDependenciesIntoViewHelper($this->viewHelper);
$this->viewHelper->initializeArguments();
} | BUGFIX: Fix wrong classname in UrlencodeViewHelperTest | neos_fluid | train | php |
850785b94dcff4b8aaef5dbb7392c7783c01d3c4 | diff --git a/bigtable/google/cloud/bigtable/table.py b/bigtable/google/cloud/bigtable/table.py
index <HASH>..<HASH> 100644
--- a/bigtable/google/cloud/bigtable/table.py
+++ b/bigtable/google/cloud/bigtable/table.py
@@ -403,7 +403,7 @@ class Table(object):
considered inclusive. The default is False (exclusive).
:type row_set: :class:`row_set.RowSet`
- :param filter_: (Optional) The row set containing multiple row keys and
+ :param row_set: (Optional) The row set containing multiple row keys and
row_ranges.
:type retry: :class:`~google.api_core.retry.Retry`
@@ -459,7 +459,7 @@ class Table(object):
each row.
:type row_set: :class:`row_set.RowSet`
- :param filter_: (Optional) The row set containing multiple row keys and
+ :param row_set: (Optional) The row set containing multiple row keys and
row_ranges.
:rtype: :class:`.PartialRowData`
@@ -884,7 +884,7 @@ def _create_row_request(
:param app_profile_id: (Optional) The unique name of the AppProfile.
:type row_set: :class:`row_set.RowSet`
- :param filter_: (Optional) The row set containing multiple row keys and
+ :param row_set: (Optional) The row set containing multiple row keys and
row_ranges.
:rtype: :class:`data_messages_v2_pb2.ReadRowsRequest` | Fix typos in Table docstrings. (#<I>) | googleapis_google-cloud-python | train | py |
b3162b4e7ab440cf9aaf53cb43a099c2178cd6e5 | diff --git a/lib/haml_lint/tree/haml_comment_node.rb b/lib/haml_lint/tree/haml_comment_node.rb
index <HASH>..<HASH> 100644
--- a/lib/haml_lint/tree/haml_comment_node.rb
+++ b/lib/haml_lint/tree/haml_comment_node.rb
@@ -10,14 +10,14 @@ module HamlLint::Tree
if next_node = successor
next_node.line - 1
else
- @parser.lines.count - 1
+ @parser.lines.count
end
content = first_line_source.gsub(/\s*-#/, '')
(line...last_possible_line).each do |line_number|
# We strip all leading whitespace since the HAML parser won't allow
# uneven amount of whitespace between subsequent comment lines
- line_content = @parser.lines[line_number].gsub(/\s*/, '')
+ line_content = @parser.lines[line_number].gsub(/^\s*/, '')
content += "\n#{line_content}"
end | Fix HamlCommentNode#text
There were a couple more bugs with this implementation when extracting
text from comments at the end of a HAML document or containing spaces.
Change-Id: Ie<I>c<I>da4d<I>a<I>d<I>a5cd<I>e<I>b3bfc
Reviewed-on: <URL> | sds_haml-lint | train | rb |
fb7c7326bfb6443c679ccd71ffd7744237f30679 | diff --git a/lib/amazon_flex_pay.rb b/lib/amazon_flex_pay.rb
index <HASH>..<HASH> 100644
--- a/lib/amazon_flex_pay.rb
+++ b/lib/amazon_flex_pay.rb
@@ -7,6 +7,7 @@ require 'rest_client'
require 'multi_xml'
require 'active_support' # camelcase, underscore
require 'active_support/inflector'
+require 'active_support/notifications'
require 'amazon_flex_pay/signing'
require 'amazon_flex_pay/model' | add require for activesupport notifications, just to be explicit | kickstarter_amazon_flex_pay | train | rb |
20efbd5efc06fd51316f8c75f9ca994dc4664152 | diff --git a/src/Entities/Transaction.php b/src/Entities/Transaction.php
index <HASH>..<HASH> 100644
--- a/src/Entities/Transaction.php
+++ b/src/Entities/Transaction.php
@@ -691,4 +691,20 @@ final class Transaction extends Entity
{
return $this->getAttribute('arn');
}
+
+ /**
+ * @return string
+ */
+ public function getDisputeTime()
+ {
+ return $this->getAttribute('disputeTime');
+ }
+
+ /**
+ * @return string
+ */
+ public function getDisputeStatus()
+ {
+ return $this->getAttribute('disputeStatus');
+ }
} | Add disputeTime to Transaction (#<I>)
* Add disputeTime to Transaction
* Add disputeStatus to Transaction | Rebilly_rebilly-php | train | php |
1ab9f586d8572086751997c5ee6acd0bf388b1e7 | diff --git a/lib/did_you_mean.rb b/lib/did_you_mean.rb
index <HASH>..<HASH> 100644
--- a/lib/did_you_mean.rb
+++ b/lib/did_you_mean.rb
@@ -85,16 +85,16 @@ require 'did_you_mean/tree_spell_checker'
module DidYouMean
# Map of error types and spell checker objects.
SPELL_CHECKERS = Hash.new(NullChecker)
- SPELL_CHECKERS["NoMethodError"] = MethodNameChecker
# Adds +DidYouMean+ functionality to an error using a given spell checker
def self.correct_error(error_class, spell_checker)
SPELL_CHECKERS[error_class.name] = spell_checker
- error_class.prepend(Correctable)
+ error_class.prepend(Correctable) unless error_class < Correctable
end
correct_error NameError, NameErrorCheckers
correct_error KeyError, KeyErrorChecker
+ correct_error NoMethodError, MethodNameChecker
# Returns the currenctly set formatter. By default, it is set to +DidYouMean::Formatter+.
def self.formatter | Check if Correctable is necessary to prepend | yuki24_did_you_mean | train | rb |
93087c0159139181c2171e56c8c1f3788f65d7fc | diff --git a/demos/src/SlidingPagesWithArrows.js b/demos/src/SlidingPagesWithArrows.js
index <HASH>..<HASH> 100644
--- a/demos/src/SlidingPagesWithArrows.js
+++ b/demos/src/SlidingPagesWithArrows.js
@@ -13,8 +13,13 @@ class SlidingPagesWithArrows extends Base {
get defaultState() {
// Show arrow buttons if device has a fine-grained pointer (e.g., mouse).
+ // Firefox doesn't support the pointer:fine media query, so we look for the
+ // absence of pointer:coarse. Firefox doesn't support that either, but as of
+ // Aug 2018, Firefox mobile usage is not significant. On desktop, at least,
+ // Firefox will show the arrows.
+ const finePointer = !window.matchMedia('(pointer:coarse)').matches;
return Object.assign({}, super.defaultState, {
- showArrowButtons: window.matchMedia('(pointer:fine)').matches
+ showArrowButtons: finePointer
});
}
@@ -27,6 +32,5 @@ class SlidingPagesWithArrows extends Base {
}
-
customElements.define('sliding-pages-with-arrows', SlidingPagesWithArrows);
export default SlidingPagesWithArrows; | Invert our logic for detecting a fine-grained pointer for purposes of deciding whether to show arrow buttons by default. | elix_elix | train | js |
f8c597f7e0c3545d4cfe42021aed6be24529cf21 | diff --git a/lib/util/hbHelpers.js b/lib/util/hbHelpers.js
index <HASH>..<HASH> 100644
--- a/lib/util/hbHelpers.js
+++ b/lib/util/hbHelpers.js
@@ -115,7 +115,7 @@ module.exports.registerHelpers = function registerHelpers() {
});
hb.registerHelper('getPlural', function(value) {
- if (value > 1) {
+ if (value !== 1) {
return 's';
}
return ''; | Fix {{getPlural}}
'Got 0 error' is incorrect; in English every number except 1
requires plural agreement. | sitespeedio_sitespeed.io | train | js |
bbb1da0ab1f2f9bd779fa44775e84166bb357fd3 | diff --git a/bin/samba.js b/bin/samba.js
index <HASH>..<HASH> 100755
--- a/bin/samba.js
+++ b/bin/samba.js
@@ -1,6 +1,12 @@
#!/usr/bin/env node
require('babel-register')({
+ ignore: function(filename) {
+ const folder = dirname(__dirname);
+ if (!filename.startsWith(folder) && filename.indexOf('node_modules/')) return false;
+
+ return !filename.startsWith(`${folder}/src`) && !filename.startsWith(`${folder}/samba`);
+ },
presets: [
`${__dirname}/../node_modules/babel-preset-flow`,
`${__dirname}/../node_modules/babel-preset-env`, | Do not ignore samba/src/ and samba/samba files | pedsmoreira_battlecry | train | js |
ac93af6d061dd3fe408a71a028764afa9990e061 | diff --git a/public/js/specberus.js b/public/js/specberus.js
index <HASH>..<HASH> 100644
--- a/public/js/specberus.js
+++ b/public/js/specberus.js
@@ -381,7 +381,7 @@ jQuery.extend({
$(document).ready(function() {
$.getJSON('data/profiles.json', function(data) {
- $profile.append($('<option value="auto">Auto-detect</option>'));
+ $profile.append($('<option value="auto" selected="selected">Auto-detect</option>'));
$.each(data.tracks, function(foo, track) {
optgroup = $('<optgroup label="' + track.name + '"></optgroup>');
$.each(track.profiles, function(bar, profile) { | Fix issue of auto not selected in Chrom*) | w3c_specberus | train | js |
aa1c9b79176ae3e735c04757f25a22eb8413948a | diff --git a/gulptasks/gulpfile.js b/gulptasks/gulpfile.js
index <HASH>..<HASH> 100644
--- a/gulptasks/gulpfile.js
+++ b/gulptasks/gulpfile.js
@@ -380,8 +380,6 @@ npmCopyTask("text-plugin", "requirejs-text/text.js", "requirejs");
npmCopyTask("requirejs/require.js", "requirejs");
-npmCopyTask("optional-plugin", "requirejs-optional/optional.js", "requirejs");
-
npmCopyTask("corejs-typeahead",
"corejs-typeahead/dist/{bloodhound,typeahead.jquery}.min.js"); | build: requirejs-optional was removed a long time ago. | mangalam-research_wed | train | js |
33b61c52ce59f566ccb6e6927c09c49387bad0f0 | diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -19,7 +19,7 @@ def get_readme():
setup(
name="docx2html",
- version="0.0.5",
+ version="0.0.6",
description="docx (OOXML) to html converter",
author="Jason Ward",
author_email="[email protected]", | bumped to <I> | PolicyStat_docx2html | train | py |
84f0febb0cf5c275a3d605d75be33b69fdd3fde7 | diff --git a/lib/roo/excelx.rb b/lib/roo/excelx.rb
index <HASH>..<HASH> 100644
--- a/lib/roo/excelx.rb
+++ b/lib/roo/excelx.rb
@@ -98,10 +98,10 @@ class Roo::Excelx < Roo::Base
@styles_doc = load_xml(File.join(tmpdir, 'roo_styles.xml'))
read_styles(@styles_doc)
end
- @sheet_doc = @sheet_files.map do |item|
+ @sheet_doc = @sheet_files.compact.map do |item|
load_xml(item)
end
- @comments_doc = @comments_files.map do |item|
+ @comments_doc = @comments_files.compact.map do |item|
load_xml(item)
end
end | Fixes bug with missing sheetN.xml files in XLSX
Workaround is to omit nil values from the array which was inserted into
via numeric indices. | roo-rb_roo | train | rb |
a7e986fc569f4fd3081489157134dd9d981800b2 | diff --git a/wikidataintegrator/wdi_core.py b/wikidataintegrator/wdi_core.py
index <HASH>..<HASH> 100755
--- a/wikidataintegrator/wdi_core.py
+++ b/wikidataintegrator/wdi_core.py
@@ -200,13 +200,14 @@ class WDItemEngine(object):
self.data = []
def init_fastrun(self):
- for c in self.fast_run_store:
+ for c in WDItemEngine.fast_run_store:
if c.base_filter == self.fast_run_base_filter:
self.fast_run_container = c
if not self.fast_run_container:
self.fast_run_container = FastRunContainer(base_filter=self.fast_run_base_filter,
base_data_type=WDBaseDataType, engine=WDItemEngine)
+ WDItemEngine.fast_run_store.append(self.fast_run_container)
self.require_write = self.fast_run_container.check_data(self.data, append_props=self.append_value,
cqid=self.wd_item_id) | minor change in fastrun behaviour, for multithreading | SuLab_WikidataIntegrator | train | py |
5a65d0b6969f3a82776bb85526ae70335126d68f | diff --git a/lib/organization_gem_dependencies/cli.rb b/lib/organization_gem_dependencies/cli.rb
index <HASH>..<HASH> 100644
--- a/lib/organization_gem_dependencies/cli.rb
+++ b/lib/organization_gem_dependencies/cli.rb
@@ -3,8 +3,10 @@
require 'base64'
require 'io/console'
require 'json'
-require 'octokit'
require 'optparse'
+
+require 'octokit'
+
require 'organization_gem_dependencies/version_ranges_intersection'
module OrganizationGemDependencies | Clean up require statements
Follow the python import recommendations,
which are system packages first,
then third party,
then local separated by a newline. | appfolio_organization_gem_dependencies | train | rb |
aa10ac1ec3010aa471fe7570cdcf2dc52e9c6ecd | diff --git a/ribbon-transport/src/test/java/com/netflix/client/netty/udp/HelloUdpServerExternalResource.java b/ribbon-transport/src/test/java/com/netflix/client/netty/udp/HelloUdpServerExternalResource.java
index <HASH>..<HASH> 100644
--- a/ribbon-transport/src/test/java/com/netflix/client/netty/udp/HelloUdpServerExternalResource.java
+++ b/ribbon-transport/src/test/java/com/netflix/client/netty/udp/HelloUdpServerExternalResource.java
@@ -27,12 +27,14 @@ public class HelloUdpServerExternalResource extends ExternalResource {
this.timeout = timeout;
}
- protected void before() throws Throwable {
- int port = choosePort();
- server = new HelloUdpServer(port, timeout).createServer();
- }
-
public void start() {
+ int port;
+ try {
+ port = choosePort();
+ } catch (SocketException e) {
+ throw new RuntimeException("Error choosing point", e);
+ }
+ server = new HelloUdpServer(port, timeout).createServer();
server.start();
} | Move server config from before() to start() | Netflix_ribbon | train | java |
2c1b1901850d4c2f91f4e2d68fe81ff43d8872c5 | diff --git a/core/LibMail.php b/core/LibMail.php
index <HASH>..<HASH> 100644
--- a/core/LibMail.php
+++ b/core/LibMail.php
@@ -57,7 +57,7 @@ class LibMail
}
/**
- * @return null
+ * @return null|string[]
*/
public function getAllowEmailList()
{
@@ -65,7 +65,7 @@ class LibMail
}
/**
- * @param null $allowEmailList
+ * @param null|string[] $allowEmailList
*/
public function setAllowEmailList($allowEmailList)
{
@@ -331,4 +331,4 @@ class LibMail
}
return false;
}
-}
\ No newline at end of file
+} | Refine PHPDoc in LibMail | sinri_enoch | train | php |
564dc0a2316ca9a0c20667149b3fbccc0b52daf4 | diff --git a/git_repo/services/service.py b/git_repo/services/service.py
index <HASH>..<HASH> 100644
--- a/git_repo/services/service.py
+++ b/git_repo/services/service.py
@@ -318,14 +318,14 @@ class RepositoryService:
'''
raise NotImplementedError
- def gist_fetch(self, gist):
+ def gist_fetch(self, gist): #pragma: no cover
'''Fetches a published gist
Meant to be implemented by subclasses
'''
raise NotImplementedError
- def gist_clone(self, gist):
+ def gist_clone(self, gist): #pragma: no cover
'''Clones a gist
Meant to be implemented by subclasses
@@ -333,14 +333,14 @@ class RepositoryService:
raise NotImplementedError
- def gist_create(self, gist_path, secret=False):
+ def gist_create(self, gist_path, secret=False): #pragma: no cover
'''Pushes a new gist
Meant to be implemented by subclasses
'''
raise NotImplementedError
- def gist_delete(self, gist_path, secret=False):
+ def gist_delete(self, gist_path, secret=False): #pragma: no cover
'''Deletes a new gist
Meant to be implemented by subclasses | Excluding gist virtual methods from coverage | guyzmo_git-repo | train | py |
186674e808c36f82a9e9d7eacd792f26d3befa89 | diff --git a/lib/cache.js b/lib/cache.js
index <HASH>..<HASH> 100644
--- a/lib/cache.js
+++ b/lib/cache.js
@@ -7,7 +7,6 @@ var cacheSize = 0;
function setLimit(limit) {
if (limit == cacheSize) return;
- delete lru;
cacheSize = limit;
if (limit > 0) lru = new LRUCache({ "maxSize": limit });
else lru = null; | Fix for strict mode
Couldn't delete local variable in strict mode. | GitbookIO_rousseau | train | js |
4ea76dbe8cec96bb37f2773512ab9173b0c3c011 | diff --git a/widget/floatWin.js b/widget/floatWin.js
index <HASH>..<HASH> 100644
--- a/widget/floatWin.js
+++ b/widget/floatWin.js
@@ -103,11 +103,14 @@ sb.widget.floatWin.prototype = {
this.win.makeDraggable();
if(this.closeButton){
- this.addIcon(new sb.element({
+ this.closeButton = this.addIcon(new sb.element({
tag : 'img',
src : sb.base+'_media/close.png',
- onclick : function(){
- self.close();
+ title : 'Click to close',
+ events : {
+ click : function(e){
+ self.close(e);
+ }
}
}));
}
@@ -144,9 +147,9 @@ sb.widget.floatWin.prototype = {
this.content.innerHTML ='';
},
- close : function(){
- this.onClose();
- this.win.hide();
+ close : function(e){
+ this.onClose(e);
+ this.win.hide(e);
},
show : function(){ | allowing title on close button
this.CloseButton is set to closeButton after creation | surebert_surebert-framework | train | js |
a6955675f3f0a6de3027f2436c16cba62e2c2d77 | diff --git a/spec/main-spec.js b/spec/main-spec.js
index <HASH>..<HASH> 100644
--- a/spec/main-spec.js
+++ b/spec/main-spec.js
@@ -1,12 +1,19 @@
/* @flow */
/* eslint-disable global-require */
-import Path from 'path'
+import fs from 'fs'
+import path from 'path'
import { it, wait } from 'jasmine-fix'
describe('Main Module', function() {
+ // Atom sets the path to a random one, so when we install using APM, tests fail.
+ // We add the real one to make the tests work.
+ atom.packages.packageDirPaths.push(
+ path.join(process.env.ATOM_HOME || path.join(fs.getHomeDirectory(), '.atom'), 'packages'),
+ )
+
function uninstallPackage(name) {
- return atom.packages.uninstallDirectory(Path.join(atom.packages.getPackageDirPaths().pop(), name))
+ return atom.packages.uninstallDirectory(path.join(atom.packages.getPackageDirPaths().pop(), name))
}
function getPackage(name) {
// eslint-disable-next-line import/no-dynamic-require | :bug: Fix specs to work with newer versions of Atom | steelbrain_package-deps | train | js |
7e604ae05ad908bb89d77847ed3ffb51c057e513 | diff --git a/visidata/settings.py b/visidata/settings.py
index <HASH>..<HASH> 100644
--- a/visidata/settings.py
+++ b/visidata/settings.py
@@ -196,7 +196,7 @@ class OptionsObject:
def __getitem__(self, k): # options[k]
opt = self._get(k, obj=self._obj)
if not opt:
- vd.error('no option "%s"' % k)
+ raise ValueError('no option "%s"' % k)
return opt.value
def __setitem__(self, k, v): # options[k] = v | [settings] now raise Exception when requested option dne
- vd.error writes to status, even within try/except blocks. This makes
it hard to efficiently check for the existence of an option which might
not exist (see disp_x_fmt in _types.py).
- instead, support the standard behaviour for a __getitem__ which is to raise ValueError | saulpw_visidata | train | py |
0b2b5960be62589f29350a07b58b6404d92f0e5a | diff --git a/api/discovery/validation.go b/api/discovery/validation.go
index <HASH>..<HASH> 100644
--- a/api/discovery/validation.go
+++ b/api/discovery/validation.go
@@ -13,7 +13,7 @@ func (m *Announcement) Validate() error {
switch m.ServiceName {
case "router", "broker", "handler":
default:
- return errors.NewErrInvalidArgument("ServiceName", "expected one of router, broker, handler but was " + m.ServiceName)
+ return errors.NewErrInvalidArgument("ServiceName", "expected one of router, broker, handler but was "+m.ServiceName)
}
return nil
} | Make validation return informative error instead of true/false
Fix go fmt errors. Enabled on commit now.
Closes #<I> | TheThingsNetwork_ttn | train | go |
cc760f717f1d4fe7da9304bfee54a4d2ddefcbeb | diff --git a/plugins/org.eclipse.xtext.junit4/src/org/eclipse/xtext/junit4/ui/util/JavaProjectSetupUtil.java b/plugins/org.eclipse.xtext.junit4/src/org/eclipse/xtext/junit4/ui/util/JavaProjectSetupUtil.java
index <HASH>..<HASH> 100644
--- a/plugins/org.eclipse.xtext.junit4/src/org/eclipse/xtext/junit4/ui/util/JavaProjectSetupUtil.java
+++ b/plugins/org.eclipse.xtext.junit4/src/org/eclipse/xtext/junit4/ui/util/JavaProjectSetupUtil.java
@@ -305,8 +305,10 @@ public class JavaProjectSetupUtil {
}
}
-
private static boolean isJava7Default = false;
+ public static boolean isJava7Default(){
+ return isJava7Default;
+ }
public static void makeJava7Default() {
if (!isJava7Default) { | [tests] Fixed failing test with Java7 on server or Java6 locally | eclipse_xtext-core | train | java |
d553643e93870bd2adec5a841b9796633b074f88 | diff --git a/core/src/elements/ons-card.js b/core/src/elements/ons-card.js
index <HASH>..<HASH> 100644
--- a/core/src/elements/ons-card.js
+++ b/core/src/elements/ons-card.js
@@ -15,6 +15,7 @@ limitations under the License.
*/
+import util from '../ons/util';
import autoStyle from '../ons/autostyle';
import ModifierUtil from '../ons/internal/modifier-util';
import BaseElement from './base/base-element';
diff --git a/core/src/elements/ons-list.js b/core/src/elements/ons-list.js
index <HASH>..<HASH> 100644
--- a/core/src/elements/ons-list.js
+++ b/core/src/elements/ons-list.js
@@ -15,6 +15,7 @@ limitations under the License.
*/
+import util from '../ons/util';
import autoStyle from '../ons/autostyle';
import ModifierUtil from '../ons/internal/modifier-util';
import BaseElement from './base/base-element'; | fix(ons-card, ons-list): Add missing imports. | OnsenUI_OnsenUI | train | js,js |
93f79b1401a810343e9c6819556e3992fca73197 | diff --git a/lib/spout/version.rb b/lib/spout/version.rb
index <HASH>..<HASH> 100644
--- a/lib/spout/version.rb
+++ b/lib/spout/version.rb
@@ -3,7 +3,7 @@ module Spout
MAJOR = 0
MINOR = 3
TINY = 0
- BUILD = "pre" # nil, "pre", "rc", "rc2"
+ BUILD = "rc" # nil, "pre", "rc", "rc2"
STRING = [MAJOR, MINOR, TINY, BUILD].compact.join('.')
end | Version bump to <I>.rc | nsrr_spout | train | rb |
d187e7b27af8ead56fb96fa7d579f6988ea1a007 | diff --git a/vivarium/interpolation.py b/vivarium/interpolation.py
index <HASH>..<HASH> 100644
--- a/vivarium/interpolation.py
+++ b/vivarium/interpolation.py
@@ -1,12 +1,13 @@
-import pandas as pd
+import warnings
+import pandas as pd
from scipy import interpolate
class Interpolation:
def __init__(self, data, categorical_parameters, continuous_parameters, func=None, order=1):
self._data = data
self.key_columns = categorical_parameters
- self.parameter_columns = continuous_parameters
+ self.parameter_columns = validate_parameters(data, continuous_parameters, order)
self.func = func
if len(self.parameter_columns) not in [1, 2]:
@@ -95,3 +96,19 @@ class Interpolation:
def __repr__(self):
return "Interpolation()"
+
+
+def validate_parameters(data, continuous_parameters, order):
+ if data.empty:
+ return continuous_parameters
+
+ out = []
+ for p in continuous_parameters:
+ if len(data[p].unique()) > order:
+ out.append(p)
+ else:
+ warnings.warn(f"You requested an order {order} interpolation over the parameter {p}, "
+ f"however there are only {len(data[p].unique())} unique values for {p}"
+ f"which is insufficient to support the requested interpolation order."
+ f"The parameter will be dropped from the interpolation.")
+ return out | Handling an edge case in interpolations where a continuous parameter column is passed in but the data does not have a sufficient number of parameter values to support the requested interpolation order | ihmeuw_vivarium | train | py |
04add0f8173a9a48592dc1552d1346b9ed68cb78 | diff --git a/lib/jsduck/merger.rb b/lib/jsduck/merger.rb
index <HASH>..<HASH> 100644
--- a/lib/jsduck/merger.rb
+++ b/lib/jsduck/merger.rb
@@ -257,7 +257,8 @@ module JsDuck
elsif code[:type] == :assignment && code[:right] && code[:right][:type] == :ext_extend
code[:right][:extend].join(".")
elsif code[:type] == :ext_define
- code[:extend]
+ # Classes defined with Ext.define will automatically inherit from Ext.Base
+ code[:extend] || "Ext.Base"
end
end
diff --git a/spec/aggregator_classes_spec.rb b/spec/aggregator_classes_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/aggregator_classes_spec.rb
+++ b/spec/aggregator_classes_spec.rb
@@ -238,6 +238,19 @@ describe JsDuck::Aggregator do
it_should_behave_like "Ext.define"
end
+ describe "Ext.define() without extend" do
+ before do
+ @doc = parse(<<-EOS)[0]
+ /** */
+ Ext.define('MyClass', {
+ });
+ EOS
+ end
+ it "automatically extends from Ext.Base" do
+ @doc[:extends].should == "Ext.Base"
+ end
+ end
+
describe "class with cfgs" do
before do
@doc = parse(<<-EOS)[0] | Use of Ext.define now implies extending Ext.Base.
When using Ext.define and not having {extend: "SomeClass"} or
@extend SomeClass, then automatically assuming that we're extending
Ext.Base. | senchalabs_jsduck | train | rb,rb |
6c3ce3beef951796fe906541f99359f7d73363c5 | diff --git a/test/markup_test.rb b/test/markup_test.rb
index <HASH>..<HASH> 100644
--- a/test/markup_test.rb
+++ b/test/markup_test.rb
@@ -12,8 +12,8 @@ class MarkupTest < Test::Unit::TestCase
source = File.read(readme)
expected_file = "#{readme}.html"
- expected = File.read(expected_file)
- actual = GitHub::Markup.render(readme, File.read(readme))
+ expected = File.read(expected_file).rstrip
+ actual = GitHub::Markup.render(readme, File.read(readme)).rstrip
if source != expected
assert(source != actual, "#{markup} did not render anything") | rstrip results to avoid errors dealing with newlines at the end of a file | github_markup | train | rb |
67bbd895baf2fc231cc0a57c335c2f7ce0a29c23 | diff --git a/pyiso.py b/pyiso.py
index <HASH>..<HASH> 100644
--- a/pyiso.py
+++ b/pyiso.py
@@ -2841,8 +2841,6 @@ class PyIso(object):
current_extent += -(-child.data_length // self.pvd.log_block_size)
# After we have reshuffled the extents we need to update the ptr
# records.
- # FIXME: we can optimize this by setting the ptr dirrecord at the time
- # we assign the extent.
for ptr in self.pvd.path_table_records:
ptr.update_extent_location_from_dirrecord() | Remove a wrong FIXME. | clalancette_pycdlib | train | py |
941132c040cafe56f9bcacb56066ace8b622bc62 | diff --git a/tests/ansible/lib/modules/custom_python_new_style_missing_interpreter.py b/tests/ansible/lib/modules/custom_python_new_style_missing_interpreter.py
index <HASH>..<HASH> 100644
--- a/tests/ansible/lib/modules/custom_python_new_style_missing_interpreter.py
+++ b/tests/ansible/lib/modules/custom_python_new_style_missing_interpreter.py
@@ -3,7 +3,8 @@
import sys
# As of Ansible 2.10, Ansible changed new-style detection: # https://github.com/ansible/ansible/pull/61196/files#diff-5675e463b6ce1fbe274e5e7453f83cd71e61091ea211513c93e7c0b4d527d637L828-R980
-# import ansible.module_utils.basic
+# NOTE: this doesn't work for vanilla Ansible anymore
+# from ansible.module_utils.
def usage(): | revert missing interpreter change, it breaks with Mitogen and without Mitogen, something else might be causing new-style detection to not work | dw_mitogen | train | py |
ee8c93a9a60a6174d5f5a95a8fe29f69b430b5fa | diff --git a/pythainlp/tokenize/crfcut.py b/pythainlp/tokenize/crfcut.py
index <HASH>..<HASH> 100644
--- a/pythainlp/tokenize/crfcut.py
+++ b/pythainlp/tokenize/crfcut.py
@@ -192,6 +192,7 @@ def segment(text: str) -> List[str]:
toks = word_tokenize(text)
feat = extract_features(toks)
labs = _tagger.tag(feat)
+ labs[-1] = 'E' #make sure it cuts the last sentence
sentences = []
sentence = "" | fix crfcut last segment not included if not predicted as end-of-sentence | PyThaiNLP_pythainlp | 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.