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 |
|---|---|---|---|---|---|
6cef2f12591f5384f92457aa8cc49e153348d07b | diff --git a/paramiko/auth_transport.py b/paramiko/auth_transport.py
index <HASH>..<HASH> 100644
--- a/paramiko/auth_transport.py
+++ b/paramiko/auth_transport.py
@@ -55,7 +55,6 @@ class Transport (BaseTransport):
# for server mode:
self.auth_username = None
self.auth_fail_count = 0
- self.auth_complete = 0
def __repr__(self):
out = '<paramiko.Transport at %s' % hex(id(self))
@@ -242,7 +241,7 @@ class Transport (BaseTransport):
m.add_boolean(0)
self._send_message(m)
return
- if self.auth_complete:
+ if self.authenticated:
# ignore
return
username = m.get_string()
@@ -308,7 +307,7 @@ class Transport (BaseTransport):
if result == AUTH_SUCCESSFUL:
self._log(DEBUG, 'Auth granted.')
m.add_byte(chr(MSG_USERAUTH_SUCCESS))
- self.auth_complete = 1
+ self.authenticated = True
else:
self._log(DEBUG, 'Auth rejected.')
m.add_byte(chr(MSG_USERAUTH_FAILURE)) | [project @ Arch-1:<EMAIL><I>-public%secsh--dev--<I>--patch-<I>]
remove redundant 'auth_complete' member
remove the redundant 'auth_complete' field and just use 'authenticated' for
both client and server mode. this makes the repr() string look correct in
server mode instead of always claiming that the transport is un-auth'd. | bitprophet_ssh | train | py |
9cdf3fe2299453c246b17798416d9a49640977d6 | diff --git a/test/jats/test.js b/test/jats/test.js
index <HASH>..<HASH> 100644
--- a/test/jats/test.js
+++ b/test/jats/test.js
@@ -29,6 +29,7 @@ test = test.withExtension('attributesConversion', function(fixtureXML, type) {
});
var exporter = t.fixture.createExporter();
var newEl = exporter.convertNode(caption);
+ t.ok(newEl.is(el.tagName), 'Exported element should be ' + el.tagName);
var exportedAttr = newEl.getAttributes();
forEach(attr, function(val, key) {
t.equal(exportedAttr[key], val, "Attribute '"+key+"' should have been exported."); | Check for correct element type in atribute test. | substance_texture | train | js |
63db66b1c43ea978e63e1c469999e75b3a5ef7fc | diff --git a/api/internal/testutil/server.go b/api/internal/testutil/server.go
index <HASH>..<HASH> 100644
--- a/api/internal/testutil/server.go
+++ b/api/internal/testutil/server.go
@@ -97,10 +97,16 @@ type ServerConfigCallback func(c *TestServerConfig)
// with all of the listen ports incremented by one.
func defaultServerConfig(t testing.T) *TestServerConfig {
ports := freeport.GetT(t, 3)
+
+ logLevel := "DEBUG"
+ if envLogLevel := os.Getenv("NOMAD_TEST_LOG_LEVEL"); envLogLevel != "" {
+ logLevel = envLogLevel
+ }
+
return &TestServerConfig{
NodeName: fmt.Sprintf("node-%d", ports[0]),
DisableCheckpoint: true,
- LogLevel: "DEBUG",
+ LogLevel: logLevel,
Ports: &PortsConfig{
HTTP: ports[0],
RPC: ports[1], | tests: allow API test server to respect NOMAD_TEST_LOG_LEVEL (#<I>) | hashicorp_nomad | train | go |
bfc4615442a0328fab758a2a20d92e6614ce4acd | diff --git a/sprd/entity/DesignConfiguration.js b/sprd/entity/DesignConfiguration.js
index <HASH>..<HASH> 100644
--- a/sprd/entity/DesignConfiguration.js
+++ b/sprd/entity/DesignConfiguration.js
@@ -290,12 +290,17 @@ define(['sprd/entity/DesignConfigurationBase', 'sprd/entity/Size', 'sprd/util/Un
compose: function() {
var ret = this.callBase();
- var mask = this.get('mask');
- if (mask) {
+ var afterEffect = this.get('afterEffect');
+ var originalDesign = this.get('originalDesign');
+
+ if (afterEffect && originalDesign) {
ret.properties = ret.properties || {};
- ret.properties.maskId = mask.$.id;
- ret.properties.originalDesignId = this.get('originalDesign.id');
- ret.properties.maskProperties = mask.getProperties();
+ ret.properties.afterEffect = afterEffect.compose();
+
+ ret.properties.afterEffect.originalDesign = {
+ id: originalDesign.get('wtfMbsId'),
+ href: "/" + originalDesign.get("id")
+ };
}
return ret; | [DEV-<I>] Mask properties persisted to API | spreadshirt_rAppid.js-sprd | train | js |
c9ac52c84dec334a9a840d6996d61e686fc40fc9 | diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -24,7 +24,7 @@ setup(name='ledger-autosync',
},
install_requires=[
"ofxclient",
- "ofxparse>=0.14",
+ "ofxparse>=0.15",
"BeautifulSoup4"
],
setup_requires=['nose>=1.0', | Upgrade to ofxparse <I> | egh_ledger-autosync | train | py |
22a69e532234e490c8db4fb9ab3ca6caada573c1 | diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -5,7 +5,7 @@ version = '14.5.0'
install_requires = (
- 'djangorestframework>=3.1.0,<3.3',
+ 'djangorestframework>=3.4.0,<3.5',
'incuna_mail>=2.0.0,<4.0.0',
'incuna-pigeon>=0.1.0,<1.0.0',
) | Updated Django rest framework minimum version to be compatible with Django <I> | incuna_django-user-management | train | py |
5abf264a4a2292adaa7e5fef5f6857e98f45fcbf | diff --git a/alot/buffers.py b/alot/buffers.py
index <HASH>..<HASH> 100644
--- a/alot/buffers.py
+++ b/alot/buffers.py
@@ -376,6 +376,9 @@ class ThreadBuffer(Buffer):
self.message_count = self.thread.get_total_messages()
def render(self, size, focus=False):
+ if self.message_count == 0:
+ return self.body.render(size, focus)
+
if settings.get('auto_remove_unread'):
logging.debug('Tbuffer: auto remove unread tag from msg?')
msg = self.get_selected_message() | fix #<I>
This prevents the threadbuffer to look up a nonexistent focussed message
if the thread is empty (e.g. after removal of the last msg). | pazz_alot | train | py |
4c68108186a435380c12de12562d223690decaf8 | diff --git a/gnupg/_parsers.py b/gnupg/_parsers.py
index <HASH>..<HASH> 100644
--- a/gnupg/_parsers.py
+++ b/gnupg/_parsers.py
@@ -912,8 +912,10 @@ class KeySigningResult(object):
elif key in ("BAD_PASSPHRASE", "MISSING_PASSPHRASE", "KEY_NOT_FOUND"):
self.status = "%s: %s" % (key.replace("_", " ").lower(), value)
else:
+ self.status = 'failed'
raise ValueError("Key signing, unknown status message: %r ::%s" % (key, value))
+
class GenKey(object):
"""Handle status messages for key generation. | [feat] allowing extension of expired keys | isislovecruft_python-gnupg | train | py |
adb9438466e2a1dfb26d7ac3f96af5f1920adc26 | diff --git a/lib/Model/actions/Creator.js b/lib/Model/actions/Creator.js
index <HASH>..<HASH> 100644
--- a/lib/Model/actions/Creator.js
+++ b/lib/Model/actions/Creator.js
@@ -93,7 +93,7 @@ class Creator {
}
} // for ...
- if (this.model.modifiedByField && whereParts.length > 0) {
+ if (this.model.modifiedByField && updateColumns.length > 0 && whereParts.length > 0) {
updateColumns.push(this.model.modifiedByField)
parsedDoc.keyAndAttributeValues.push(this.model.currentUserFn())
updatePlaceholders.push('$' + (parsedDoc.keyAndAttributeValues.length)) | fix: If there are no update columns, don't add the modifiedByField | wmfs_pg-model | train | js |
c792cdf1ccca8ca9e21bca4f257715196f6ec468 | diff --git a/src/host.js b/src/host.js
index <HASH>..<HASH> 100644
--- a/src/host.js
+++ b/src/host.js
@@ -1,12 +1,10 @@
-const { now: { alias } } = require('../package.json')
-
const port = process.env.PORT || 3000
-const host = process.env.NOW ? `http://${alias}.now.sh` : `http://127.0.0.1:${port}`
+const host = process.env.API_URL
+const allowedCORSHosts = [process.env.CLIENT_URL]
-const allowedCORSHosts = [
- `http://localhost:${port}`,
- `https://localhost:${port}`
-].concat((process.env.CORS_HOSTS || '').split(','))
+if (process.env.CORS_HOSTS) {
+ allowedCORSHosts.push(process.env.CORS_HOSTS.split(','))
+}
exports.allowedCORSHosts = allowedCORSHosts
exports.host = host | fix: remove hardcoded urls, now logic | redthreadsnet_open-budget-api | train | js |
84a21d7b3ae473b894ee1a074a953f13c85d7243 | diff --git a/furious/extras/appengine/ndb_persistence.py b/furious/extras/appengine/ndb_persistence.py
index <HASH>..<HASH> 100644
--- a/furious/extras/appengine/ndb_persistence.py
+++ b/furious/extras/appengine/ndb_persistence.py
@@ -17,6 +17,7 @@
persistence operations backed by the App Engine ndb library.
"""
+import logging
from google.appengine.ext import ndb | Add missing logging import to ndb_persistence | Workiva_furious | train | py |
380c78b74205b70c1547562974813526a0e9518e | diff --git a/tests/Core/CoreTest.php b/tests/Core/CoreTest.php
index <HASH>..<HASH> 100644
--- a/tests/Core/CoreTest.php
+++ b/tests/Core/CoreTest.php
@@ -301,6 +301,20 @@ class CoreTest extends TestCase
$this->makeCore()->log('emergency', 'testing', 'context');
}
+ /**
+ * @test
+ */
+ function it_logs_exceptions_with_level_error()
+ {
+ $exception = new \Exception('test');
+
+ $loggerMock = $this->makeLoggerMock('error', $exception, []);
+ $this->app->instance(Component::LOG, $loggerMock);
+
+ $this->makeCore()->log($exception);
+ }
+
+
// ------------------------------------------------------------------------------
// Routing
// ------------------------------------------------------------------------------ | Added core test for logging exceptions | czim_laravel-cms-core | train | php |
d836bad45534549b50b31cf5f5690f3f1c3e13df | diff --git a/spec/instance_spec.rb b/spec/instance_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/instance_spec.rb
+++ b/spec/instance_spec.rb
@@ -20,6 +20,15 @@ describe StripeMock::Instance do
expect(res[:name]).to eq('String Plan')
end
+ it "exits gracefully on an unrecognized handler url" do
+ dummy_params = {
+ "id" => "str_12345",
+ "name" => "PLAN"
+ }
+
+ expect { res, api_key = StripeMock.instance.mock_request('post', '/v1/unrecongnized_method', 'api_key', dummy_params) }.to_not raise_error
+ end
+
it "can toggle debug" do
StripeMock.toggle_debug(true)
expect(StripeMock.instance.debug).to eq(true) | test to ensure that exceptions are not thrown on an unrecognized handler url. | rebelidealist_stripe-ruby-mock | train | rb |
3df0441594f448cf9e737fe3d2946f2aa5ebcc6e | diff --git a/colorable_windows.go b/colorable_windows.go
index <HASH>..<HASH> 100644
--- a/colorable_windows.go
+++ b/colorable_windows.go
@@ -519,6 +519,7 @@ func toConsoleColor(rgb int) (c consoleColor) {
if b >= a {
c.blue = true
}
+ // non-intensed white is lighter than intensed black, so swap those.
if c.red && c.green && c.blue {
c.red, c.green, c.blue = false, false, false
c.intensity = true
@@ -538,6 +539,7 @@ func toConsoleColor(rgb int) (c consoleColor) {
c.blue = true
}
c.intensity = true
+ // intensed black is darker than non-intensed white, so swap those.
if !c.red && !c.green && !c.blue {
c.red, c.green, c.blue = true, true, true
c.intensity = false | comment for intensed black and non-intensed white | mattn_go-colorable | train | go |
5052d19b61ff802f99e68e6c53e3e1b95341cead | diff --git a/lib/json_spec/helpers.rb b/lib/json_spec/helpers.rb
index <HASH>..<HASH> 100644
--- a/lib/json_spec/helpers.rb
+++ b/lib/json_spec/helpers.rb
@@ -5,10 +5,10 @@ module JsonSpec
extend self
def parse_json(json, path = nil)
- ruby = MultiJson.load(%([#{json}])).first
+ ruby = multi_json_load("[#{json}]").first
value_at_json_path(ruby, path)
rescue MultiJson::DecodeError
- MultiJson.load(json)
+ multi_json_load(json)
end
def normalize_json(json, path = nil)
@@ -31,6 +31,10 @@ module JsonSpec
end
private
+ def multi_json_load(json)
+ MultiJson.respond_to?(:load) ? MultiJson.load(json) : MultiJson.decode(json)
+ end
+
def value_at_json_path(ruby, path)
return ruby unless path | Feature-detect MultiJson in order to avoid deprecation warnings for versions < <I> | collectiveidea_json_spec | train | rb |
532d3eab820b4ffa3eb00c81f650c1c4686c871d | diff --git a/examples/share-window.js b/examples/share-window.js
index <HASH>..<HASH> 100644
--- a/examples/share-window.js
+++ b/examples/share-window.js
@@ -26,6 +26,9 @@ function shareScreen() {
target: document.getElementById('main')
});
});
+
+ // you better select something quick or this will be cancelled!!!
+ setTimeout(screenshare.cancel, 5e3);
}
// detect whether the screenshare plugin is available and matches | Include code the cancels the request after 5s | rtc-io_rtc-screenshare | train | js |
861ade7f0aa65529d08c80032b02b6f52ec67ecc | diff --git a/bcbio/variation/vardict.py b/bcbio/variation/vardict.py
index <HASH>..<HASH> 100644
--- a/bcbio/variation/vardict.py
+++ b/bcbio/variation/vardict.py
@@ -95,10 +95,7 @@ def _run_vardict_caller(align_bams, items, ref_file, assoc_files,
vcfutils.merge_variant_files(orig_files=sample_vcf_names,
out_file=tx_out_file, ref_file=ref_file,
config=config, region=bamprep.region_to_gatk(region))
- ann_file = annotation.annotate_nongatk_vcf(out_file, align_bams,
- assoc_files.get("dbsnp"),
- ref_file, config)
- return ann_file
+ return out_file
def _run_vardict_paired(align_bams, items, ref_file, assoc_files,
region=None, out_file=None):
@@ -143,7 +140,4 @@ def _run_vardict_paired(align_bams, items, ref_file, assoc_files,
bam.index(paired.tumor_bam, config)
bam.index(paired.normal_bam, config)
do.run(cmd.format(**locals()), "Genotyping with VarDict: Inference", {})
- ann_file = annotation.annotate_nongatk_vcf(out_file, align_bams,
- assoc_files.get("dbsnp"), ref_file,
- config)
- return ann_file
+ return out_file | Avoid annotating VarDict calls with GATK due to intermittent issues with large files. | bcbio_bcbio-nextgen | train | py |
921b5e5ef63da049179d51a8db84fafd5640a41e | diff --git a/lib/components/viewers/styled.js b/lib/components/viewers/styled.js
index <HASH>..<HASH> 100644
--- a/lib/components/viewers/styled.js
+++ b/lib/components/viewers/styled.js
@@ -75,14 +75,14 @@ export const Stop = styled.a`
&::after {
content: '';
display: block;
- height: 13pt; /* set position in line-height agnostic way */
+ height: 12pt; /* set position in line-height agnostic way */
width: 10px;
background: ${(props) => props.routeColor};
position: relative;
left: -30px;
/* this is 2px into the blob (to make it look attached) + 30px so that each
stop's bar connects the previous bar with the current one */
- top: -30pt; /* adjust position in a way that is agnostic to line-height */
+ top: -28pt; /* adjust position in a way that is agnostic to line-height */
}
/* hide the first line between blobs */ | refactor(route-details-viewer): another attempt of tmo-agnostic styling | opentripplanner_otp-react-redux | train | js |
c295f9ff057b56c7ffcbb31fd02905858fcb7cd1 | diff --git a/admin/repository.php b/admin/repository.php
index <HASH>..<HASH> 100644
--- a/admin/repository.php
+++ b/admin/repository.php
@@ -50,7 +50,7 @@ if (!empty($edit) || !empty($new)) {
}
$CFG->pagepath = 'admin/managerepository/' . $plugin;
// display the edit form for this instance
- $mform = new repository_admin_form('', array('plugin' => $plugin, 'instance' => $repositorytype));
+ $mform = new repository_type_form('', array('plugin' => $plugin, 'instance' => $repositorytype));
$fromform = $mform->get_data();
//detect if we create a new type without config (in this case if don't want to display a setting page during creation)
diff --git a/repository/lib.php b/repository/lib.php
index <HASH>..<HASH> 100644
--- a/repository/lib.php
+++ b/repository/lib.php
@@ -1306,7 +1306,7 @@ final class repository_instance_form extends moodleform {
/**
* Display a form with the general option fields of a type
*/
-final class repository_admin_form extends moodleform {
+final class repository_type_form extends moodleform {
protected $instance;
protected $plugin; | MDL-<I>: refactor repository_admin_form into repository_type_form | moodle_moodle | train | php,php |
f4eb419ab973753040f3415769804aa15e7d1743 | diff --git a/src/App.php b/src/App.php
index <HASH>..<HASH> 100644
--- a/src/App.php
+++ b/src/App.php
@@ -168,7 +168,12 @@ class App
} else {
list($obj) = func_get_args();
+ if (!is_object($obj)) {
+ throw new Exception(['Incorrect use of App::add']);
+ }
+
$obj->app = $this;
+ return $obj;
}
} | cleanup $app->add(), although i think perhaps we should remove this?? | atk4_ui | train | php |
c74f0e1289b31ee1fbca102668649fa1fabae941 | diff --git a/test/common/storage/base-test.js b/test/common/storage/base-test.js
index <HASH>..<HASH> 100644
--- a/test/common/storage/base-test.js
+++ b/test/common/storage/base-test.js
@@ -244,7 +244,9 @@ JSON.parse(fs.readFileSync(__dirname + '/../../configs/providers.json'))
if (process.env.NOCK) {
if (provider === 'joyent') {
+ return;
} else if (provider === 'rackspace') {
+ return;
} else if (provider === 'amazon') {
nock('https://pkgcloud-test-container.' + client.serversUrl)
.put('/')
@@ -277,7 +279,7 @@ JSON.parse(fs.readFileSync(__dirname + '/../../configs/providers.json'))
}
vows
- .describe('pkgcloud/common/compute/flavor [' + provider + ']')
+ .describe('pkgcloud/common/storage [' + provider + ']')
.addBatch(batchOne(clients[provider], provider, nock))
.addBatch(batchTwo(clients[provider], provider, nock))
.addBatch(batchThree(clients[provider], provider, nock)) | [fix] No mocks available for Rackspace storage tests | pkgcloud_pkgcloud | train | js |
ac5ce076c126ee5a95847bc1134e53e2ea457fe1 | diff --git a/future/disable_obsolete_builtins.py b/future/disable_obsolete_builtins.py
index <HASH>..<HASH> 100644
--- a/future/disable_obsolete_builtins.py
+++ b/future/disable_obsolete_builtins.py
@@ -33,7 +33,7 @@ from __future__ import division, absolute_import, print_function
import inspect
-from . import six
+import six
OBSOLETE_BUILTINS = ['apply', 'cmp', 'coerce', 'execfile', 'file', 'long',
'raw_input', 'reduce', 'reload', 'unicode', 'xrange',
diff --git a/future/str_is_unicode.py b/future/str_is_unicode.py
index <HASH>..<HASH> 100644
--- a/future/str_is_unicode.py
+++ b/future/str_is_unicode.py
@@ -34,7 +34,8 @@ from __future__ import unicode_literals
import inspect
-from . import six
+import six
+
if not six.PY3:
caller = inspect.currentframe().f_back | Remove assumption that `six` lives in the future package | PythonCharmers_python-future | train | py,py |
37a5f516bbcac73f5e29ddae3adcde4d108e476e | diff --git a/__init__.py b/__init__.py
index <HASH>..<HASH> 100644
--- a/__init__.py
+++ b/__init__.py
@@ -11,16 +11,18 @@ from sources.MGI import MGI
from sources.IMPC import IMPC
from sources.Panther import Panther
from sources.NCBIGene import NCBIGene
+from sources.UCSCBands import UCSCBands
source_to_class_map={
# 'hpoa' : HPOAnnotations, # ~3 min
# 'zfin' : ZFIN,
# 'omim' : OMIM, #full file takes ~15 min, due to required throttling
# 'biogrid' : BioGrid, #interactions file takes <10 minutes
- 'mgi' : MGI,
+# 'mgi' : MGI,
# 'impc' : IMPC,
# 'panther' : Panther, #this takes a very long time, ~1hr to map 7 species-worth of associations
-# 'ncbigene' : NCBIGene #takes about 4 minutes to process 2 species
+# 'ncbigene' : NCBIGene, #takes about 4 minutes to process 2 species
+ 'bands' : UCSCBands
}
#load configuration parameters
@@ -33,8 +35,8 @@ for source in source_to_class_map.keys():
print()
print("*******",source,"*******")
mysource = source_to_class_map[source]()
- #mysource.fetch()
- mysource.parse(100)
+ mysource.fetch()
+ mysource.parse()
mysource.write(format='turtle')
#status = mysource.verify()
# if status is not True: | added UCSC as potential source to init | monarch-initiative_dipper | train | py |
3fc4a069fb5151276888c4b3d147681737711b52 | diff --git a/scserver.js b/scserver.js
index <HASH>..<HASH> 100644
--- a/scserver.js
+++ b/scserver.js
@@ -563,11 +563,11 @@ SCServer.prototype._handleSocketConnection = function (wsSocket, upgradeReq) {
socket: scSocket
}, function (err, statusCode) {
if (err) {
- var handshakeError = scErrors.dehydrateError(err);
var clientSocketErrorStatus = {
code: statusCode
};
respond(err, clientSocketErrorStatus);
+ scSocket.disconnect(statusCode);
return;
}
self._processAuthToken(scSocket, signedAuthToken, function (err, isBadToken) { | Removed unused code. Disconnect socket as soon as SC middleware blocks with error | SocketCluster_socketcluster-server | train | js |
88bab6c4c87e924fabae656481021437d9370045 | diff --git a/issue.go b/issue.go
index <HASH>..<HASH> 100644
--- a/issue.go
+++ b/issue.go
@@ -521,9 +521,9 @@ func (s *IssueService) DownloadAttachment(attachmentID string) (*Response, error
return resp, nil
}
-// PostAttachment uploads r (io.Reader) as an attachment to a given attachmentID
-func (s *IssueService) PostAttachment(attachmentID string, r io.Reader, attachmentName string) (*[]Attachment, *Response, error) {
- apiEndpoint := fmt.Sprintf("rest/api/2/issue/%s/attachments", attachmentID)
+// PostAttachment uploads r (io.Reader) as an attachment to a given issueID
+func (s *IssueService) PostAttachment(issueID string, r io.Reader, attachmentName string) (*[]Attachment, *Response, error) {
+ apiEndpoint := fmt.Sprintf("rest/api/2/issue/%s/attachments", issueID)
b := new(bytes.Buffer)
writer := multipart.NewWriter(b) | refactor: rename PostAttachment arg to `issueID` | andygrunwald_go-jira | train | go |
c74e46d7beb0815b0027fd6b0365698ed73e562c | diff --git a/tests/Database/Ddd/EntityToStringTest.php b/tests/Database/Ddd/EntityToStringTest.php
index <HASH>..<HASH> 100644
--- a/tests/Database/Ddd/EntityToStringTest.php
+++ b/tests/Database/Ddd/EntityToStringTest.php
@@ -31,20 +31,6 @@ class EntityToStringTest extends TestCase
);
}
- public function testJsonEncodeWithCustomOptions(): void
- {
- $entity = $this->makeEntity();
-
- $data = <<<'eot'
- {"name":"\u5b9e\u4f53\u540d\u5b57","description":"goods name","address":"\u56db\u5ddd\u6210\u90fd","foo_bar":"foo","hello":"hello world"}
- eot;
-
- $this->assertSame(
- $data,
- $entity->__toString(0),
- );
- }
-
public function testWithWhite(): void
{
$entity = $this->makeEntity(); | tests(ddd): Remove bad tests | hunzhiwange_framework | train | php |
1c9a5a9b36273d4287dff5de92acb7d39259310c | diff --git a/molo/commenting/tests/test_views.py b/molo/commenting/tests/test_views.py
index <HASH>..<HASH> 100644
--- a/molo/commenting/tests/test_views.py
+++ b/molo/commenting/tests/test_views.py
@@ -619,7 +619,7 @@ class ViewNotificationsRepliesOnCommentsTest(TestCase, MoloTestCaseMixin):
# Unread notifications
response = self.client.get(
reverse('molo.commenting:reply_list'))
- self.assertTrue(response[
+ self.assertTrue(response, [
'You have 1 unread reply',
'You have 2 unread replies'
]) | removing error results in AttributeError: 'tuple' object has no attribute 'lower' | praekeltfoundation_molo.commenting | train | py |
337776c571896a0be5af8663e075a938dbe8838e | diff --git a/src/Validator.php b/src/Validator.php
index <HASH>..<HASH> 100644
--- a/src/Validator.php
+++ b/src/Validator.php
@@ -8,12 +8,28 @@ namespace KsUtils;
abstract class Validator
{
/**
+ * Error message when value is not valid
+ * @var string
+ */
+ protected $errorMessage;
+
+ /**
* Returns error message
+ * @param mixed $wrongValue Value not passed validation
+ * @return string Error message
*/
- abstract public function getErrorMessage($errValue);
+ public function getError($wrongValue)
+ {
+ return sprintf(
+ $this->errorMessage,
+ $wrongValue
+ );
+ }
/**
- * Checks a value
+ * Checks a value
+ * @param string $value String to check
+ * @return boolean True if value is valid and False otherwise
*/
abstract public function check($value);
} | Changes in \KsUtils\Validator class:
* Added $errorMessage variable
* getError() method changed from abstract to concrete
* Apidoc added | KonstantinFilin_ksutils | train | php |
e0a5c357d38182c34ee44788c58bffeff93c54e6 | diff --git a/AegeanTools/cluster.py b/AegeanTools/cluster.py
index <HASH>..<HASH> 100644
--- a/AegeanTools/cluster.py
+++ b/AegeanTools/cluster.py
@@ -72,10 +72,10 @@ def pairwise_ellpitical_binary(sources, eps, far=None):
if far is None:
far = max(a.a/3600 for a in sources)
l = len(sources)
- distances = np.ones((l, l), dtype=bool)
+ distances = np.zeros((l, l), dtype=bool)
for i in range(l):
- for j in range(i,l):
- if j<i:
+ for j in range(i, l):
+ if j < i:
continue
if i == j:
distances[i, j] = False | fix bug in pairwise_epplitical_binary that causes distant sources to be associated | PaulHancock_Aegean | train | py |
1e14ac1a9bea734d7c90aa8454ddbbe374d88736 | diff --git a/cellbase-lib/src/test/java/org/opencb/cellbase/lib/impl/core/VariantAnnotationCalculatorTest.java b/cellbase-lib/src/test/java/org/opencb/cellbase/lib/impl/core/VariantAnnotationCalculatorTest.java
index <HASH>..<HASH> 100644
--- a/cellbase-lib/src/test/java/org/opencb/cellbase/lib/impl/core/VariantAnnotationCalculatorTest.java
+++ b/cellbase-lib/src/test/java/org/opencb/cellbase/lib/impl/core/VariantAnnotationCalculatorTest.java
@@ -22,6 +22,7 @@ import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.ObjectReader;
import org.hamcrest.CoreMatchers;
import org.junit.jupiter.api.BeforeAll;
+import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.TestInstance;
import org.opencb.biodata.models.variant.Variant;
@@ -891,6 +892,7 @@ public class VariantAnnotationCalculatorTest extends GenericMongoDBAdaptorTest {
}
@Test
+ @Disabled
public void testDGVAnnotation() throws Exception {
QueryOptions queryOptions = new QueryOptions("useCache", false);
queryOptions.put("include", "variation"); | disable structural variant test, we aren't loading those anymore | opencb_cellbase | train | java |
d2c5771f0a6befdcf285014a4121db1cdc287b13 | diff --git a/src/Compiler/Tags/Helpers/MethodNodeHelper.php b/src/Compiler/Tags/Helpers/MethodNodeHelper.php
index <HASH>..<HASH> 100644
--- a/src/Compiler/Tags/Helpers/MethodNodeHelper.php
+++ b/src/Compiler/Tags/Helpers/MethodNodeHelper.php
@@ -9,6 +9,7 @@
namespace Minty\Compiler\Tags\Helpers;
+use Minty\Compiler\Node;
use Minty\Compiler\Nodes\FunctionNode;
use Minty\Compiler\Nodes\IdentifierNode;
use Minty\Compiler\Nodes\TagNode;
@@ -26,7 +27,7 @@ class MethodNodeHelper
return $functionNode;
}
- public function createRenderBlockNode(Tag $tag, $templateName)
+ public function createRenderBlockNode(Tag $tag, $templateName, Node $contextNode = null)
{
$node = new TagNode($tag);
$node->addChild(
@@ -35,7 +36,7 @@ class MethodNodeHelper
'renderBlock',
array(
new IdentifierNode($templateName),
- new TempVariableNode('context')
+ $contextNode ? : new TempVariableNode('context')
)
),
'expression' | This is needed for display tag to work. | bugadani_Minty | train | php |
46d9e8db8e916d63fc5e8310f8f12439023e98ad | diff --git a/examples/webpack/example-builder.js b/examples/webpack/example-builder.js
index <HASH>..<HASH> 100644
--- a/examples/webpack/example-builder.js
+++ b/examples/webpack/example-builder.js
@@ -307,7 +307,10 @@ export default class ExampleBuilder {
/import Worker from 'worker-loader![^\n]*\n/g,
''
);
- jsSource = jsSource.replace('new Worker()', "new Worker('./worker.js')");
+ jsSource = jsSource.replace(
+ 'new Worker()',
+ "new Worker('./worker.js', {type: 'module'})"
+ );
data.js = {
tag: `<script src="${this.common}.js"></script> | Fix codesandbox edit for offscreen-canvas example | openlayers_openlayers | train | js |
08d68870736437b54b792a5f7857e18c5300ebcc | diff --git a/application/briefkasten/dropbox.py b/application/briefkasten/dropbox.py
index <HASH>..<HASH> 100644
--- a/application/briefkasten/dropbox.py
+++ b/application/briefkasten/dropbox.py
@@ -267,7 +267,7 @@ class Dropbox(object):
fs_backup_pgp = join(fs_target_dir, '%s.zip.pgp' % self.drop_id)
fs_source = dict(
dirty=self.fs_dirty_attachments,
- clean=self.fs_attachment_container
+ clean=self.fs_cleansed_attachments
)
with ZipFile(fs_backup, 'w', ZIP_STORED) as backup:
if exists(join(self.fs_path, 'message')): | bugfix: feed it a list of files, not the directory | ZeitOnline_briefkasten | train | py |
9f0e71a3cc9d1085585b39e7a5d19791ca3601e8 | diff --git a/lib/yoti/activity_details.rb b/lib/yoti/activity_details.rb
index <HASH>..<HASH> 100644
--- a/lib/yoti/activity_details.rb
+++ b/lib/yoti/activity_details.rb
@@ -154,7 +154,7 @@ module Yoti
#
# Converts protobuf attribute into Attribute
#
- # @param [Yoti::rotobuf::Attrpubapi::Attribute] attribute
+ # @param [Yoti::Protobuf::Attrpubapi::Attribute] attribute
#
# @return [Attribute, nil]
# | SDK-<I>: Correct type in method doc | getyoti_yoti-ruby-sdk | train | rb |
940f67bb7b9a9d2d6ff2e40f541735d6ca65bc28 | diff --git a/tests/test_hunter.py b/tests/test_hunter.py
index <HASH>..<HASH> 100644
--- a/tests/test_hunter.py
+++ b/tests/test_hunter.py
@@ -35,12 +35,13 @@ from hunter import VarsPrinter
pytest_plugins = 'pytester',
-@pytest.yield_fixture(autouse=True, scope="function")
-def auto_stop():
- try:
- yield
- finally:
- stop()
+# from hunter import stop
+# @pytest.yield_fixture(autouse=True, scope="function")
+# def auto_stop():
+# try:
+# yield
+# finally:
+# stop()
def _get_func_spec(func):
@@ -318,9 +319,12 @@ def test_tracing_vars(LineMatcher):
def test_trace_merge():
- trace(function="a")
- trace(function="b")
- assert trace(function="c")._handler == When(Q(function="c"), CodePrinter)
+ with trace(function="a"):
+ with trace(function="b"):
+ with trace(function="c"):
+ assert sys.gettrace()._handler == When(Q(function="c"), CodePrinter)
+ assert sys.gettrace()._handler == When(Q(function="b"), CodePrinter)
+ assert sys.gettrace()._handler == When(Q(function="a"), CodePrinter)
def test_trace_api_expansion(): | Make each test cleanup it's tracer. | ionelmc_python-hunter | train | py |
62d4216874da11df63a328dc1588d8445eb8a7c3 | diff --git a/iktomi/utils/system.py b/iktomi/utils/system.py
index <HASH>..<HASH> 100644
--- a/iktomi/utils/system.py
+++ b/iktomi/utils/system.py
@@ -57,11 +57,8 @@ def doublefork(pidfile, logfile, cwd, umask):
sys.exit('fork #2 failed: (%d) %s\n' % (e.errno, e.strerror))
si = open('/dev/null')
so = open(logfile, 'a+', 0)
- sys.stdin.close()
os.dup2(si.fileno(), 0)
- sys.stdout.close()
os.dup2(so.fileno(), 1)
- sys.stderr.close()
os.dup2(so.fileno(), 2)
sys.stdin = si
sys.stdout = sys.stderr = so | Don't close file objects: descriptors are changed and objects might be already in use (e.g. by logging) | SmartTeleMax_iktomi | train | py |
d4d15583b76c63ce304ad9e261422e6583a5d058 | diff --git a/src/sortable.js b/src/sortable.js
index <HASH>..<HASH> 100644
--- a/src/sortable.js
+++ b/src/sortable.js
@@ -448,8 +448,17 @@ angular.module('ui.sortable', [])
$log.info('ui.sortable: ngModel not provided!', element);
}
- // Create sortable
- element.sortable(opts);
+ var created = false;
+ scope.$watch('uiSortable.disabled', function()
+ {
+ if(!created && !scope.uiSortable.disabled)
+ {
+ created = true;
+
+ // Create sortable
+ element.sortable(opts);
+ }
+ });
}
};
} | now, ui sortable only starts if the disabled option is not set. once the disabled option is removed, ui sortable will launch. | angular-ui_ui-sortable | train | js |
3921796b26b15abccfba0556f05962fbb617870e | diff --git a/src/bucket.js b/src/bucket.js
index <HASH>..<HASH> 100644
--- a/src/bucket.js
+++ b/src/bucket.js
@@ -383,8 +383,8 @@ Bucket.prototype.combine = function(sources, destination, options, callback) {
/**
* @typedef {array} CreateChannelResponse
- * @property {object} 0 The full API response.
- * @property {Channel} 1 The new {@link Channel}.
+ * @property {Channel} 0 The new {@link Channel}.
+ * @property {object} 1 The full API response.
*/
/**
* @callback CreateChannelCallback | Fix JSDoc (#<I>) | googleapis_nodejs-storage | train | js |
11554ff3c5f78dad39f044d0169238f47edaf0b7 | diff --git a/tests/cases/CreateAssetTest.php b/tests/cases/CreateAssetTest.php
index <HASH>..<HASH> 100644
--- a/tests/cases/CreateAssetTest.php
+++ b/tests/cases/CreateAssetTest.php
@@ -211,4 +211,20 @@ class CreateAssetTest extends WpmvcAyucoTestCase
$this->assertPregMatchContents('/\@import(|\s)\\\'parts\/header\\\'\;/', $masterfile);
$this->assertPregMatchContents('/\@import(|\s)\\\'parts\/footer\\\'\;/', $masterfile);
}
+ /**
+ * Tests sass gitignore update.
+ * @group assets
+ * @group scss
+ */
+ public function testScssGitignore()
+ {
+ // Prepare
+ $filename = FRAMEWORK_PATH.'/environment/.gitignore';
+ // Execute
+ exec('php '.WPMVC_AYUCO.' create scss:theme');
+ // Assert
+ $this->assertFileExists($filename);
+ $this->assertPregMatchContents('/\# SASS COMPILATION/', $filename);
+ unlink($filename);
+ }
} | #<I> Added missing test. | 10quality_wpmvc-commands | train | php |
4f2a3f26b8b0ec1f62e036f0bd9d15d71a628e0c | diff --git a/mamba/formatters.py b/mamba/formatters.py
index <HASH>..<HASH> 100644
--- a/mamba/formatters.py
+++ b/mamba/formatters.py
@@ -12,6 +12,7 @@ class DocumentationFormatter(object):
self.total_seconds = .0
def format(self, item):
+ puts()
puts(colored.white(item.name))
self._format_children(item) | Put a blank line among main suites | nestorsalceda_mamba | train | py |
96994411ae941ce4f2c6aeff55d6f2ac9c21d908 | diff --git a/src/duration.js b/src/duration.js
index <HASH>..<HASH> 100644
--- a/src/duration.js
+++ b/src/duration.js
@@ -616,7 +616,7 @@ export default class Duration {
* Scale this Duration by the specified amount. Return a newly-constructed Duration.
* @param {function} fn - The function to apply to each unit. Arity is 1 or 2: the value of the unit and, optionally, the unit name. Must return a number.
* @example Duration.fromObject({ hours: 1, minutes: 30 }).mapUnits(x => x * 2) //=> { hours: 2, minutes: 60 }
- * @example Duration.fromObject({ hours: 1, minutes: 30 }).mapUnits((x, u) => u === "hour" ? x * 2 : x) //=> { hours: 2, minutes: 30 }
+ * @example Duration.fromObject({ hours: 1, minutes: 30 }).mapUnits((x, u) => u === "hours" ? x * 2 : x) //=> { hours: 2, minutes: 30 }
* @return {Duration}
*/
mapUnits(fn) { | Corrected typo in duration.js (#<I>) | moment_luxon | train | js |
4b7306f9370dad41bace22d8aa093640f377403e | diff --git a/addon/mixins/sortable-item.js b/addon/mixins/sortable-item.js
index <HASH>..<HASH> 100644
--- a/addon/mixins/sortable-item.js
+++ b/addon/mixins/sortable-item.js
@@ -270,7 +270,7 @@ export default Mixin.create({
run.schedule("afterRender", this, "_tellGroup", "deregisterItem", this);
// remove event listeners that may still be attached
- dragActions.forEach(event => window.removeEventListener(event, this._startDragListener));
+ dragActions.forEach(event => window.removeEventListener(event, this._prepareDragListener));
endActions.forEach(event => window.removeEventListener(event, this._cancelStartDragListener));
this.element.removeEventListener(elementClickAction, this._preventClickHandler);
this.set('isDragging', false); | Remove a listener which was added | heroku_ember-sortable | train | js |
247cf55d6d50b74e0a5fb29f3636a2773f22a66d | diff --git a/src/sources/GeoJSON.js b/src/sources/GeoJSON.js
index <HASH>..<HASH> 100644
--- a/src/sources/GeoJSON.js
+++ b/src/sources/GeoJSON.js
@@ -92,7 +92,7 @@ export default class GeoJSON extends Base {
throw new CartoValidationError(`${cvt.INCORRECT_VALUE} 'data' property must be a GeoJSON object.`);
}
- features = this._initializeFeaturePropertiesIn(features);
+ this._initializePropertiesIn(features);
return features;
}
@@ -189,11 +189,10 @@ export default class GeoJSON extends Base {
return new GeoJSON(this._data, { dateColumns: Array.from(this._providedDateColumns) });
}
- _initializeFeaturePropertiesIn (features) {
+ _initializePropertiesIn (features) {
for (let i = 0; i < features.length; i++) {
features[i].properties = features[i].properties || {};
}
- return features;
}
_computeMetadata (viz) { | Rename function and make it a procedure | CartoDB_carto-vl | train | js |
b0531b9c9efb6e936937bd242d4715c6afea2319 | diff --git a/FirebaseRulesAPI.php b/FirebaseRulesAPI.php
index <HASH>..<HASH> 100644
--- a/FirebaseRulesAPI.php
+++ b/FirebaseRulesAPI.php
@@ -19,8 +19,8 @@
* Service definition for FirebaseRulesAPI (v1).
*
* <p>
- * The Firebase Rules API allows developers to create and manage rules that
- * determine when a Firebase Rules-enabled service should permit a request.</p>
+ * Creates and manages rules that determine when a Firebase Rules-enabled
+ * service should permit a request.</p>
*
* <p>
* For more information about this service, see the API | Autogenerated update for firebaserules version v1 (<I>-<I>-<I>) | googleapis_google-api-php-client-services | train | php |
93fd6fafe46c4f0e9a4cc2be24c9d709c7056f23 | diff --git a/spec/factories/project/tools/yardoc.rb b/spec/factories/project/tools/yardoc.rb
index <HASH>..<HASH> 100644
--- a/spec/factories/project/tools/yardoc.rb
+++ b/spec/factories/project/tools/yardoc.rb
@@ -7,6 +7,8 @@ FactoryBot.define do
describe_instance_methods({
options: [0],
'options=': [1],
+ log_level: [0],
+ 'log_level=': [1],
run: [0],
call: [0],
output_dir: [0], | tools/yardoc (spec/factories) methods added | SwagDevOps_kamaze-project | train | rb |
6ba986731d5f9f35fd6a9f63d61cbd8288a9c12c | diff --git a/src/main/java/com/amazon/carbonado/gen/StorableGenerator.java b/src/main/java/com/amazon/carbonado/gen/StorableGenerator.java
index <HASH>..<HASH> 100644
--- a/src/main/java/com/amazon/carbonado/gen/StorableGenerator.java
+++ b/src/main/java/com/amazon/carbonado/gen/StorableGenerator.java
@@ -3294,7 +3294,6 @@ public final class StorableGenerator<S extends Storable> {
// txn = null;
// } else {
// txn = support.getRootRepository().enterTransaction();
- // txn.setForUpdate(true);
// tryStart:
// if (forTry) {
// state = trigger.beforeTryXxx(this);
@@ -3322,11 +3321,6 @@ public final class StorableGenerator<S extends Storable> {
b.invokeInterface(mSupportType, "getRootRepository", repositoryType, null);
b.invokeInterface(repositoryType, ENTER_TRANSACTION_METHOD_NAME, transactionType, null);
b.storeLocal(txnVar);
- // txn.setForUpdate(true);
- b.loadLocal(txnVar);
- b.loadConstant(true);
- b.invokeInterface(transactionType, SET_FOR_UPDATE_METHOD_NAME, null,
- new TypeDesc[] {TypeDesc.BOOLEAN});
Label tryStart = b.createLabel().setLocation(); | Rollback change <I>. Triggers run in a non-for-update transaction again. | Carbonado_Carbonado | train | java |
35f4c4714eccf902eaf8645a6895e22f1415cc18 | diff --git a/src/Awjudd/AssetProcessor/AssetProcessor.php b/src/Awjudd/AssetProcessor/AssetProcessor.php
index <HASH>..<HASH> 100644
--- a/src/Awjudd/AssetProcessor/AssetProcessor.php
+++ b/src/Awjudd/AssetProcessor/AssetProcessor.php
@@ -215,6 +215,9 @@ class AssetProcessor
{
// Otherwise, just read the metadata file
$file_to_process = file_get_contents($metadata);
+
+ // Touch the file, so we know it's active
+ touch($metadata);
}
}
@@ -247,6 +250,11 @@ class AssetProcessor
// Copy the file over
copy($source, $destination);
}
+ else
+ {
+ // If the file did exist, and nothing has changed, just touch it
+ touch($destination);
+ }
// Overwrite the path (only if it is a public URL)
if(Str::contains($destination, public_path())) | Adding in touching of the metadata files so that they don't get accidentally deleted | awjudd_l4-assetprocessor | train | php |
7e42a32664f942348b06651b10f112a351635e23 | diff --git a/lib/acts_as_api/base.rb b/lib/acts_as_api/base.rb
index <HASH>..<HASH> 100644
--- a/lib/acts_as_api/base.rb
+++ b/lib/acts_as_api/base.rb
@@ -64,6 +64,8 @@ module ActsAsApi
def as_api_response(api_template)
api_attributes = self.class.api_accessible_attributes(api_template)
+ raise "acts_as_api template :#{api_template.to_s} was not found for model #{self.class}" if api_attributes.nil?
+
api_output = {}
return api_output if api_attributes.nil?
diff --git a/spec/models/base_spec.rb b/spec/models/base_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/models/base_spec.rb
+++ b/spec/models/base_spec.rb
@@ -67,6 +67,14 @@ describe "acts_as_api", :orm => :active_record do
end
+ describe "trying to render an api template that is not defined" do
+
+ it "should raise an descriptive error" do
+ lambda{ @luke.as_api_response(:does_not_exist) }.should raise_error(RuntimeError)
+ end
+
+ end
+
describe "calling a method in the api template" do
before(:each) do | raise an exception if api template is not found | fabrik42_acts_as_api | train | rb,rb |
70cd099e711c6f62b37c68bfb999cf35a8d699b2 | diff --git a/lib/request.js b/lib/request.js
index <HASH>..<HASH> 100644
--- a/lib/request.js
+++ b/lib/request.js
@@ -12,10 +12,6 @@ function Request(uri, payload) {
}
Request.create = function (uri) {
- if (typeof uri === 'object') {
- return new Request(uri.uri, uri.payload);
- }
-
var args, payload;
if (arguments.length > 1) {
args = [{}].concat([].slice.call(arguments, 1)); | direct invoke if uri is SharedMethod in dispatcher | taoyuan_sira | train | js |
10c7de57478e13f6a11c77bcdf3ac3b0ae78fda7 | diff --git a/cmd/argo/commands/install.go b/cmd/argo/commands/install.go
index <HASH>..<HASH> 100644
--- a/cmd/argo/commands/install.go
+++ b/cmd/argo/commands/install.go
@@ -164,7 +164,7 @@ func createServiceAccount(clientset *kubernetes.Clientset, serviceAccountName st
func createClusterRole(clientset *kubernetes.Clientset, clusterRoleName string, rules []rbacv1.PolicyRule, args InstallFlags) {
clusterRole := rbacv1.ClusterRole{
TypeMeta: metav1.TypeMeta{
- APIVersion: "v1",
+ APIVersion: "rbac.authorization.k8s.io/v1",
Kind: "ClusterRole",
},
ObjectMeta: metav1.ObjectMeta{
@@ -206,7 +206,7 @@ func createClusterRole(clientset *kubernetes.Clientset, clusterRoleName string,
func createClusterRoleBinding(clientset *kubernetes.Clientset, clusterBindingRoleName, serviceAccountName, clusterRoleName string, args InstallFlags) {
roleBinding := rbacv1.ClusterRoleBinding{
TypeMeta: metav1.TypeMeta{
- APIVersion: "rbac.authorization.k8s.io/v1beta1",
+ APIVersion: "rbac.authorization.k8s.io/v1",
Kind: "ClusterRoleBinding",
},
ObjectMeta: metav1.ObjectMeta{ | Fix rbac resource versions in install | argoproj_argo | train | go |
89eafdd8484e59e20b45744ccd1b7e1670bb466c | diff --git a/src/com/google/debugging/sourcemap/SourceMapGeneratorV3.java b/src/com/google/debugging/sourcemap/SourceMapGeneratorV3.java
index <HASH>..<HASH> 100644
--- a/src/com/google/debugging/sourcemap/SourceMapGeneratorV3.java
+++ b/src/com/google/debugging/sourcemap/SourceMapGeneratorV3.java
@@ -137,7 +137,6 @@ public final class SourceMapGeneratorV3 implements SourceMapGenerator {
mappings.clear();
lastMapping = null;
sourceFileMap.clear();
- sourceFileContentMap.clear();
originalNameMap.clear();
lastSourceFile = null;
lastSourceFileIndex = -1; | Do not clear sourceFileContentMap when resetting a SourceMapGeneratorV3.
This map stores the sources content of files that aren't inputs to the compiler, but referenced in input source maps. It should not be cleared between generator calls to produce the source map for a given output. Otherwise, the source map for every output except the first will be potentially incomplete.
PiperOrigin-RevId: <I> | google_closure-compiler | train | java |
cb05a9fc933d0be60976462f7c38cc95ea8749c4 | diff --git a/lib/Less/Version.php b/lib/Less/Version.php
index <HASH>..<HASH> 100644
--- a/lib/Less/Version.php
+++ b/lib/Less/Version.php
@@ -9,7 +9,7 @@
class Less_Version{
const version = '1.7.0.9'; // The current build number of less.php
- const less_version = '1.7.5'; // The less.js version that this build should be compatible with
+ const less_version = '1.7.0'; // The less.js version that this build should be compatible with
const cache_version = '170'; // The parser cache version
} | revert less_version to <I> | oyejorge_less.php | train | php |
b0600915c6741174f2409897574bb3f76fb0afca | diff --git a/lib/api-client/resources/migration.js b/lib/api-client/resources/migration.js
index <HASH>..<HASH> 100644
--- a/lib/api-client/resources/migration.js
+++ b/lib/api-client/resources/migration.js
@@ -48,4 +48,20 @@ Migration.execute = function (params, done) {
});
};
+/**
+ * Execute a migration plan asynchronously
+ * @param {Object} params
+ * @param {String} [params.migrationPlan]
+ * @param {String} [params.processInstanceIds]
+ * @param {Function} done
+ */
+Migration.executeAsync = function (params, done) {
+ var path = this.path + '/executeAsync';
+
+ return this.http.post(path, {
+ data: params,
+ done: done
+ });
+};
+
module.exports = Migration; | feat(api): add migration execute async method
related to CAM-<I> | camunda_camunda-bpm-sdk-js | train | js |
7e12001ce8aec6866caffb3e877009a216cfcdad | diff --git a/clients/python/pycellbase/cbconfig.py b/clients/python/pycellbase/cbconfig.py
index <HASH>..<HASH> 100755
--- a/clients/python/pycellbase/cbconfig.py
+++ b/clients/python/pycellbase/cbconfig.py
@@ -64,7 +64,7 @@ class ConfigClient(object):
if not (host.startswith('http://') or host.startswith('https://')):
host = 'http://' + host
try:
- r = requests.head(host)
+ r = requests.head(host, timeout=1)
if r.status_code == 302: # Found
available_host = host
break | Added timeout to server check, this prevent the checker to freeze waiting the answer. (i.e the server in a VPN and the connection was cut down) | opencb_cellbase | train | py |
a8963063be49e06580e7393ab3d449358a93059e | diff --git a/jre_emul/android/platform/libcore/luni/src/main/java/libcore/io/IoBridge.java b/jre_emul/android/platform/libcore/luni/src/main/java/libcore/io/IoBridge.java
index <HASH>..<HASH> 100644
--- a/jre_emul/android/platform/libcore/luni/src/main/java/libcore/io/IoBridge.java
+++ b/jre_emul/android/platform/libcore/luni/src/main/java/libcore/io/IoBridge.java
@@ -97,7 +97,6 @@ public final class IoBridge {
* Unix practice where you'd read until you got 0 bytes (and any future read would return -1).
*/
public static int read(FileDescriptor fd, byte[] bytes, int byteOffset, int byteCount) throws IOException {
- Arrays.checkOffsetAndCount(bytes.length, byteOffset, byteCount);
if (byteCount == 0) {
return 0;
}
@@ -121,7 +120,6 @@ public final class IoBridge {
* Unix it never just writes as many bytes as happens to be convenient.)
*/
public static void write(FileDescriptor fd, byte[] bytes, int byteOffset, int byteCount) throws IOException {
- Arrays.checkOffsetAndCount(bytes.length, byteOffset, byteCount);
if (byteCount == 0) {
return;
} | removed checkOffSetAndCount check as a result of the update | google_j2objc | train | java |
2920823ad034f021204f890357b7d58d0d83cc4e | diff --git a/tests/CacheChainTest.php b/tests/CacheChainTest.php
index <HASH>..<HASH> 100644
--- a/tests/CacheChainTest.php
+++ b/tests/CacheChainTest.php
@@ -121,8 +121,7 @@ final class CacheChainTest extends \PHPUnit\Framework\TestCase
// -- remove all
- $return = $this->cache->removeAll();
- static::assertTrue($return);
+ $this->cache->removeAll();
// -- remove all - tests
@@ -174,7 +173,7 @@ final class CacheChainTest extends \PHPUnit\Framework\TestCase
static::assertTrue($return);
for ($i = 0; $i <= 4; $i++) {
- $return = $this->cache->getItem('testSetGetCacheWithEndDateTime', 2);
+ $return = $this->cache->getItem('testSetGetCacheWithEndDateTime');
static::assertSame([3, 2, 1], $return);
}
@@ -191,7 +190,7 @@ final class CacheChainTest extends \PHPUnit\Framework\TestCase
protected function setUp()
{
$cacheApc = new Cache(
- new \voku\cache\AdapterApcu(),
+ new \voku\cache\AdapterApc(),
new \voku\cache\SerializerIgbinary(),
false,
true | [+]: try to fix "ChainTest" | voku_simple-cache | train | php |
74aa0002bd46e964653d3a52b74c7e7cf87aea2e | diff --git a/benchexec/result.py b/benchexec/result.py
index <HASH>..<HASH> 100644
--- a/benchexec/result.py
+++ b/benchexec/result.py
@@ -93,6 +93,9 @@ _FILE_RESULTS = {
}
# Score values taken from http://sv-comp.sosy-lab.org/
+# If different scores should be used depending on the checked property,
+# change score_for_task() appropriately
+# (use values 0 to disable scores completely for a given property).
_SCORE_CORRECT_TRUE = 2
_SCORE_CORRECT_FALSE = 1
_SCORE_UNKNOWN = 0
@@ -160,7 +163,6 @@ def score_for_task(filename, properties, category):
"""
Return the possible score of task, depending on whether the result is correct or not.
"""
- #TODO The following code does not support different scores per property
if category != CATEGORY_CORRECT and category != CATEGORY_WRONG:
return 0
correct = (category == CATEGORY_CORRECT) | Improve TODO for changing scores.
This is the last bit of the preparation for property-dependent scores
and for properties that do not have scores at all (fixes #<I>). | sosy-lab_benchexec | train | py |
b866383ec0d1db17b577d44db60edab8ac084eba | diff --git a/pkg/api/api.go b/pkg/api/api.go
index <HASH>..<HASH> 100644
--- a/pkg/api/api.go
+++ b/pkg/api/api.go
@@ -248,9 +248,9 @@ func (hs *HttpServer) registerRoutes() {
dashboardRoute.Post("/import", bind(dtos.ImportDashboardCommand{}), wrap(ImportDashboard))
dashboardRoute.Group("/id/:dashboardId", func(dashIdRoute RouteRegister) {
- dashIdRoute.Get("/id/:dashboardId/versions", wrap(GetDashboardVersions))
- dashIdRoute.Get("/id/:dashboardId/versions/:id", wrap(GetDashboardVersion))
- dashIdRoute.Post("/id/:dashboardId/restore", reqEditorRole, bind(dtos.RestoreDashboardVersionCommand{}), wrap(RestoreDashboardVersion))
+ dashIdRoute.Get("/versions", wrap(GetDashboardVersions))
+ dashIdRoute.Get("/versions/:id", wrap(GetDashboardVersion))
+ dashIdRoute.Post("/restore", reqEditorRole, bind(dtos.RestoreDashboardVersionCommand{}), wrap(RestoreDashboardVersion))
dashIdRoute.Group("/acl", func(aclRoute RouteRegister) {
aclRoute.Get("/", wrap(GetDashboardAclList)) | api: fix for dashboard version history | grafana_grafana | train | go |
9904a3059a0f2348b8e1f5066ecc9f18951d8600 | diff --git a/keys.go b/keys.go
index <HASH>..<HASH> 100644
--- a/keys.go
+++ b/keys.go
@@ -6,11 +6,9 @@ package prompt
var crlf = []byte("\r\n")
const (
- tabKey = '\t'
- backKey = '\u007f'
- returnKey = '\r'
- escKey = '\u001B'
- spaceKey = '\u0020'
+ backKey = '\u007f'
+ escKey = '\u001B'
+ spaceKey = '\u0020'
)
const (
@@ -22,11 +20,11 @@ const (
ctrlF
ctrlG
ctrlH
- _ // Same as tabKey.
+ tabKey
ctrlJ
ctrlK
ctrlL
- _ // Same as returnKey.
+ returnKey
ctrlN
ctrlO
ctrlP | Remove blank identifiers from const declaration.
It has weird behavior with go/doc on Go <I> where it acts as if it's a
public identifier. | Bowery_prompt | train | go |
223e6c89905a4b064e93c2276631c214fa081166 | diff --git a/src/AppBundle/Controller/DefaultController.php b/src/AppBundle/Controller/DefaultController.php
index <HASH>..<HASH> 100644
--- a/src/AppBundle/Controller/DefaultController.php
+++ b/src/AppBundle/Controller/DefaultController.php
@@ -8,7 +8,7 @@ use Symfony\Bundle\FrameworkBundle\Controller\Controller;
class DefaultController extends Controller
{
/**
- * @Route("/", name="homepage")
+ * @Route("/app/example", name="homepage")
*/
public function indexAction()
{ | Issue #<I> Modified default route for AppBundle | symfony_symfony-standard | train | php |
990fe232fb99aa21d45a49bf93c0e236469a1d7d | diff --git a/lib/lit/engine.rb b/lib/lit/engine.rb
index <HASH>..<HASH> 100644
--- a/lib/lit/engine.rb
+++ b/lib/lit/engine.rb
@@ -2,12 +2,6 @@ module Lit
class Engine < ::Rails::Engine
isolate_namespace Lit
- config.after_initialize do
- ActiveSupport.on_load :action_controller do
- puts 'loading Lit::FrontendHelper'.upcase
- #ActionController::Base.send(:helper, Lit::FrontendHelper)
- end
- end
initializer 'lit.assets.precompile' do |app|
app.config.assets.precompile += %w(lit/application.css lit/application.js)
app.config.assets.precompile += %w(lit/lit_frontend.css lit/lit_frontend.js) | Remove comment stating, that Lit::FrontendHelper gets loaded | prograils_lit | train | rb |
2029bf42659f08bfc19bf26509364e2f2ac386e3 | diff --git a/lxd/storage_pools_utils.go b/lxd/storage_pools_utils.go
index <HASH>..<HASH> 100644
--- a/lxd/storage_pools_utils.go
+++ b/lxd/storage_pools_utils.go
@@ -21,7 +21,7 @@ func storagePoolDBCreate(s *state.State, poolName, poolDescription string, drive
// Check that the storage pool does not already exist.
_, err := s.Cluster.GetStoragePoolID(poolName)
if err == nil {
- return -1, fmt.Errorf("The storage pool already exists")
+ return -1, fmt.Errorf("The storage pool already exists: %w", db.ErrAlreadyDefined)
}
// Make sure that we don't pass a nil to the next function.
@@ -42,7 +42,7 @@ func storagePoolDBCreate(s *state.State, poolName, poolDescription string, drive
// Create the database entry for the storage pool.
id, err := dbStoragePoolCreateAndUpdateCache(s, poolName, poolDescription, driver, config)
if err != nil {
- return -1, fmt.Errorf("Error inserting %s into database: %s", poolName, err)
+ return -1, fmt.Errorf("Error inserting %s into database: %w", poolName, err)
}
return id, nil | lxd/storage/pools/utils: Wrap errors in storagePoolDBCreate
To generate correct HTTP response codes. | lxc_lxd | train | go |
05b7b205938ca76688301d5fa2fdd5bb2d2200ed | diff --git a/modules/activiti-osgi/src/main/java/org/activiti/osgi/Extender.java b/modules/activiti-osgi/src/main/java/org/activiti/osgi/Extender.java
index <HASH>..<HASH> 100644
--- a/modules/activiti-osgi/src/main/java/org/activiti/osgi/Extender.java
+++ b/modules/activiti-osgi/src/main/java/org/activiti/osgi/Extender.java
@@ -179,7 +179,7 @@ public class Extender implements BundleTrackerCustomizer, ServiceTrackerCustomiz
throw new IOException("Error opening url: " + url);
}
try {
- builder.addInputStream(url.toExternalForm(), is);
+ builder.addInputStream(getPath(url), is);
} finally {
is.close();
}
@@ -256,4 +256,11 @@ public class Extender implements BundleTrackerCustomizer, ServiceTrackerCustomiz
return getOverrideURLForCachePath(cachePath);
}
+ //remove bundle protocol specific part, so that resource can be accessed by path relative to bundle root
+ private static String getPath(URL url) {
+ String path = url.toExternalForm();
+ return path.replaceAll("bundle://[^/]*/","");
+ }
+
+
} | ACT-<I> - removing bundle specific part from resource name | Activiti_Activiti | train | java |
bf5ca5615fcc03db108c5f2eac9fe6e996ccf14b | diff --git a/lib/tus/server.rb b/lib/tus/server.rb
index <HASH>..<HASH> 100644
--- a/lib/tus/server.rb
+++ b/lib/tus/server.rb
@@ -265,7 +265,11 @@ module Tus
# "Range" header handling logic copied from Rack::File
def handle_range_request!(length)
- ranges = Rack::Utils.get_byte_ranges(request.headers["Range"], length)
+ if Rack.release >= "2.0"
+ ranges = Rack::Utils.get_byte_ranges(request.headers["Range"], length)
+ else
+ ranges = Rack::Utils.byte_ranges(request.env, length)
+ end
if ranges.nil? || ranges.length > 1
# No ranges, or multiple ranges (which we don't support): | Make handling "Range" header work on Rack <= <I>
Rack <I> has changed from `Rack::Utils.byte_ranges` which accepts env
hash to `Rack::Utils.get_byte_ranges` which accepts the "Range" header.
Since we want to support both Rack <I> and <I>, we modify the code to
handle both. | janko_tus-ruby-server | train | rb |
80b8133de6b1d72cab85a947a4008220d4df0135 | diff --git a/src/main/java/com/semanticcms/autogit/servlet/AutoGit.java b/src/main/java/com/semanticcms/autogit/servlet/AutoGit.java
index <HASH>..<HASH> 100644
--- a/src/main/java/com/semanticcms/autogit/servlet/AutoGit.java
+++ b/src/main/java/com/semanticcms/autogit/servlet/AutoGit.java
@@ -22,9 +22,9 @@
*/
package com.semanticcms.autogit.servlet;
+import com.aoindustries.exception.WrappedException;
import com.aoindustries.lang.ProcessResult;
import com.aoindustries.lang.Strings;
-import com.aoindustries.util.WrappedException;
import com.semanticcms.autogit.model.GitStatus;
import com.semanticcms.autogit.model.State;
import com.semanticcms.autogit.model.UncommittedChange; | Moved a few exceptions to the new com.aoindustries.exception package:
NotImplementedException
WrappedException
WrappedExceptions | aoindustries_semanticcms-autogit-servlet | train | java |
8de18a921775d599bb1c2f0ac7f6ae891f641ce4 | diff --git a/test/integration_tests/standalone_tests.rb b/test/integration_tests/standalone_tests.rb
index <HASH>..<HASH> 100644
--- a/test/integration_tests/standalone_tests.rb
+++ b/test/integration_tests/standalone_tests.rb
@@ -184,8 +184,7 @@ describe "Passenger Standalone" do
end
it "starts a server which serves the application" do
- `echo "I'm in:" $(pwd) >&2`
- FileUtils.mkdir_p 'buildout/testlogs'
+ FileUtils.mkdir_p '../buildout/testlogs'
output = capture_output("passenger start --runtime-check-only")
output.should include(AGENT_BINARY_DOWNLOAD_MESSAGE)
output.should include(NGINX_BINARY_INSTALL_MESSAGE)
@@ -212,8 +211,7 @@ describe "Passenger Standalone" do
end
it "starts a server which serves the application" do
- `echo "I'm in:" $(pwd) >&2`
- FileUtils.mkdir_p 'buildout/testlogs'
+ FileUtils.mkdir_p '../buildout/testlogs'
output = capture_output("passenger start --runtime-check-only")
output.should include(AGENT_BINARY_DOWNLOAD_MESSAGE)
output.should include(NGINX_BINARY_INSTALL_MESSAGE) | make ccache log dir at correct path | phusion_passenger | train | rb |
c90c89536ce5f9952346f5159cf80d4d5bed5f0f | diff --git a/state/machine.go b/state/machine.go
index <HASH>..<HASH> 100644
--- a/state/machine.go
+++ b/state/machine.go
@@ -110,7 +110,10 @@ func (m *Machine) globalKey() string {
// MachineTag returns the tag for the
// machine with the given id.
func MachineTag(id string) string {
- return fmt.Sprintf("machine-%s", id)
+ tag := fmt.Sprintf("machine-%s", id)
+ // Containers require "/" to be replaced by "-".
+ tag = strings.Replace(tag, "/", "-", -1)
+ return tag
}
// Tag returns a name identifying the machine that is safe to use
diff --git a/state/machine_test.go b/state/machine_test.go
index <HASH>..<HASH> 100644
--- a/state/machine_test.go
+++ b/state/machine_test.go
@@ -171,6 +171,8 @@ func (s *MachineSuite) TestTag(c *C) {
func (s *MachineSuite) TestMachineTag(c *C) {
c.Assert(state.MachineTag("10"), Equals, "machine-10")
+ // Check a container id.
+ c.Assert(state.MachineTag("10/lxc/1"), Equals, "machine-10-lxc-1")
}
func (s *MachineSuite) TestSetMongoPassword(c *C) { | Ensure machine tag is a valid filename for containers | juju_juju | train | go,go |
3b52e5c49bbafb0d3518d52709f038835468297a | diff --git a/telebot/types.py b/telebot/types.py
index <HASH>..<HASH> 100644
--- a/telebot/types.py
+++ b/telebot/types.py
@@ -548,7 +548,10 @@ class ReplyKeyboardMarkup(JsonSerializable):
i = 1
row = []
for button in args:
- row.append(button.to_dic())
+ if isinstance(button, str):
+ row.append({'text': button})
+ else:
+ row.append(button.to_dic())
if i % self.row_width == 0:
self.keyboard.append(row)
row = []
@@ -566,7 +569,10 @@ class ReplyKeyboardMarkup(JsonSerializable):
"""
btn_array = []
for button in args:
- btn_array.append(button.to_dic())
+ if isinstance(button, str):
+ btn_array.append({'text': button})
+ else:
+ btn_array.append(button.to_dic())
self.keyboard.append(btn_array)
return self | ReplyKeyboardMarkup support string. | eternnoir_pyTelegramBotAPI | train | py |
d9c8c556508393d302279d80124b66f535d3a964 | diff --git a/src/base/DynamicModel.php b/src/base/DynamicModel.php
index <HASH>..<HASH> 100644
--- a/src/base/DynamicModel.php
+++ b/src/base/DynamicModel.php
@@ -7,6 +7,7 @@
namespace yii\base;
+use yii\exceptions\InvalidConfigException;
use yii\validators\Validator;
/** | Fixed missed exception in DynamicModel [skip ci] | yiisoft_yii-core | train | php |
0341254adbea2c289133f9c96eda7899ff3a5c1b | diff --git a/src/main/java/com/neovisionaries/ws/client/WebSocketFactory.java b/src/main/java/com/neovisionaries/ws/client/WebSocketFactory.java
index <HASH>..<HASH> 100644
--- a/src/main/java/com/neovisionaries/ws/client/WebSocketFactory.java
+++ b/src/main/java/com/neovisionaries/ws/client/WebSocketFactory.java
@@ -484,8 +484,8 @@ public class WebSocketFactory
String userInfo = uri.getUserInfo();
String host = uri.getHost();
int port = uri.getPort();
- String path = uri.getPath();
- String query = uri.getQuery();
+ String path = uri.getRawPath();
+ String query = uri.getRawQuery();
return createSocket(scheme, userInfo, host, port, path, query, timeout);
} | Fixed a bug in WebSocketFactory. getRawPath() and getRawQuery() should be used. | TakahikoKawasaki_nv-websocket-client | train | java |
2221e07ef4637ae54d44f5780f6fd0f6d1fde3a5 | diff --git a/assess_model_migration.py b/assess_model_migration.py
index <HASH>..<HASH> 100755
--- a/assess_model_migration.py
+++ b/assess_model_migration.py
@@ -223,15 +223,12 @@ def ensure_migration_including_resources_succeeds(source_client, dest_client):
- Migrate that model to the other environment
- Ensure it's operating as expected
- Add a new unit to the application to ensure the model is functional
- # veebers: this isn't the case yet.
- Migrate the model back to the original environment
- Note: Test for lp:1607457, lp:1641824
- Ensure it's operating as expected
- Add a new unit to the application to ensure the model is functional
"""
- # veebers: ensure_migrating_to_target_and_back_to_source_succeeds covered
- # here.
resource_contents = get_random_string()
test_model, application = deploy_simple_server_to_new_model(
source_client, 'example-model-resource', resource_contents)
@@ -240,8 +237,10 @@ def ensure_migration_including_resources_succeeds(source_client, dest_client):
assert_model_migrated_successfully(
migration_target_client, application, resource_contents)
- # Migrate back and ensure it succeeded.
- # veebers: needed.
+ migrate_back_client = migrate_model_to_controller(
+ migration_target_client, source_client)
+ assert_model_migrated_successfully(
+ migrate_back_client, application, resource_contents)
migration_target_client.remove_service(application)
log.info('SUCCESS: resources migrated') | Add step of migrating back to original controller. | juju_juju | train | py |
a2c1c588a3dc28438573ece2a3a6ceb4b2d818ba | diff --git a/examples/webpack/src/components/Markings.js b/examples/webpack/src/components/Markings.js
index <HASH>..<HASH> 100644
--- a/examples/webpack/src/components/Markings.js
+++ b/examples/webpack/src/components/Markings.js
@@ -1,6 +1,16 @@
import React, { Fragment } from "react";
import { connect } from "react-redux";
import { find, get } from "lodash-es";
+import styled from "styled-components";
+
+const ContainerTop = styled.div`
+ padding-bottom: 6px;
+ border-bottom: 1px solid #eee;
+`;
+
+const ContainerBottom = styled.div`
+ padding-top: 6px;
+`;
function createMarkedText( text, markings ) {
markings.forEach( ( marking ) => {
@@ -21,8 +31,8 @@ function Markings( { results, activeMarker, text } ) {
const markedText = createMarkedText( text, activeMarkings );
return <Fragment>
- <div dangerouslySetInnerHTML={ markedText } />
- <div>{ markedText.__html }</div>
+ <ContainerTop dangerouslySetInnerHTML={ markedText } />
+ <ContainerBottom>{ markedText.__html }</ContainerBottom>
</Fragment>;
} | Add separator between two versions of marked-up text | Yoast_YoastSEO.js | train | js |
8201df51b477400e25af235c5b0548abb6de0a7d | diff --git a/in_c/in_c2midi.py b/in_c/in_c2midi.py
index <HASH>..<HASH> 100755
--- a/in_c/in_c2midi.py
+++ b/in_c/in_c2midi.py
@@ -4,7 +4,7 @@ import sys; sys.path.append("..")
from lilypond.interp import parse
from midi.write_midi import SMF
-from core import MIDI_PITCH, OFFSET_64
+from core import Sequence
patterns = [
@@ -76,20 +76,13 @@ def separate_files():
# make a single MIDI file with all the patterns in a row
-# @@@ the next step in the feature structure work is making this just a
-# @@@ basic concatenation of Sequence objects
def one_file():
- big_pattern = []
- offset = 0
+ seq = Sequence()
for num, pattern in enumerate(patterns):
- for repeat in range(10):
- seq = parse(pattern, offset)
- for ev in seq:
- big_pattern.append(ev)
- offset = ev[OFFSET_64] # remember the last offset so the next pattern can use it
+ seq = seq + parse(pattern) * 10
f = open("in_c_all.mid", "w")
- s = SMF(big_pattern)
+ s = SMF(seq)
s.write(f)
f.close() | In C generator now makes use of concatenation and multiplication support in core | jtauber_sebastian | train | py |
74967251802989b137fb5a21ae0acd263e49e93f | diff --git a/src/Behat/Behat/Formatter/HtmlFormatter.php b/src/Behat/Behat/Formatter/HtmlFormatter.php
index <HASH>..<HASH> 100644
--- a/src/Behat/Behat/Formatter/HtmlFormatter.php
+++ b/src/Behat/Behat/Formatter/HtmlFormatter.php
@@ -419,7 +419,7 @@ class HtmlFormatter extends PrettyFormatter
// Replace "<", ">" with colorized ones
$text = preg_replace('/(<[^>]+>)/', "{+strong class=\"$paramColor\"-}\$1{+/strong-}", $text);
- $text = htmlspecialchars($text, ENT_NOQUOTES | ENT_HTML5);
+ $text = htmlspecialchars($text, ENT_NOQUOTES);
$text = strtr($text, array('{+' => '<', '-}' => '>'));
return $text; | fixed BC for PHP prior <I> | Behat_Behat | train | php |
d61e3c79dc85a5ae86ed00fc9352a5d1d84c0f3f | diff --git a/actionpack/test/dispatch/mapper_test.rb b/actionpack/test/dispatch/mapper_test.rb
index <HASH>..<HASH> 100644
--- a/actionpack/test/dispatch/mapper_test.rb
+++ b/actionpack/test/dispatch/mapper_test.rb
@@ -52,6 +52,17 @@ module ActionDispatch
end
end
+ def test_scoped_formatted
+ fakeset = FakeSet.new
+ mapper = Mapper.new fakeset
+ mapper.scope(format: true) do
+ mapper.get '/foo', :to => 'posts#index', :as => :main
+ end
+ assert_equal({:controller=>"posts", :action=>"index"},
+ fakeset.defaults.first)
+ assert_equal "/foo.:format", fakeset.conditions.first[:path_info]
+ end
+
def test_random_keys
fakeset = FakeSet.new
mapper = Mapper.new fakeset | add a regression test for scoped `format` params
This just ensures that `format` is applied to things inside the scope | rails_rails | train | rb |
c547c9a837bbb618568bedcd9c5253659db006fc | diff --git a/jre_emul/Classes/java/lang/Thread.java b/jre_emul/Classes/java/lang/Thread.java
index <HASH>..<HASH> 100644
--- a/jre_emul/Classes/java/lang/Thread.java
+++ b/jre_emul/Classes/java/lang/Thread.java
@@ -318,9 +318,7 @@ public class Thread implements Runnable {
NSThread *currentThread = [NSThread currentThread];
NSMutableDictionary *currentThreadData = [currentThread threadDictionary];
if (!group) {
- JavaLangThread *currentJavaThread =
- [currentThreadData objectForKey:JavaLangThread_JAVA_THREAD_];
- group = [currentJavaThread getThreadGroup];
+ group = [[JavaLangThread currentThread] getThreadGroup];
}
assert(group != nil);
self->threadGroup_ = RETAIN_(group); | Issue <I>: initialize current thread during class initialization to support GCD use. | google_j2objc | train | java |
4f52e28c041327c65e3ee23baa24f820b34b4bb1 | diff --git a/core/frontend/src/cards/js/audio.js b/core/frontend/src/cards/js/audio.js
index <HASH>..<HASH> 100644
--- a/core/frontend/src/cards/js/audio.js
+++ b/core/frontend/src/cards/js/audio.js
@@ -31,8 +31,6 @@
let raf = null;
let currentPlaybackRateIdx = 1;
- audio.src = audioElementContainer.getAttribute('data-kg-audio-src');
-
const whilePlaying = () => {
seekSlider.value = Math.floor(audio.currentTime);
currentTimeContainer.textContent = calculateTime(seekSlider.value); | Cleaned up frontend audio card player script
refs <URL> | TryGhost_Ghost | train | js |
439a1ddc97f7d29793b70e1c088f14c0ed995ab8 | diff --git a/src/Psalm/Checker/Statements/Block/SwitchChecker.php b/src/Psalm/Checker/Statements/Block/SwitchChecker.php
index <HASH>..<HASH> 100644
--- a/src/Psalm/Checker/Statements/Block/SwitchChecker.php
+++ b/src/Psalm/Checker/Statements/Block/SwitchChecker.php
@@ -101,12 +101,15 @@ class SwitchChecker
$file_checker = $statements_checker->getFileChecker();
if ($type_type instanceof Type\Atomic\GetClassT) {
- ClassLikeChecker::checkFullyQualifiedClassLikeName(
- $file_checker->project_checker,
- $fq_classlike_name,
- new CodeLocation($file_checker, $case->cond),
- $statements_checker->getSuppressedIssues()
- );
+ if (ClassLikeChecker::checkFullyQualifiedClassLikeName(
+ $file_checker->project_checker,
+ $fq_classlike_name,
+ new CodeLocation($file_checker, $case->cond),
+ $statements_checker->getSuppressedIssues()
+ ) === false
+ ) {
+ return false;
+ }
} elseif (!isset(ClassLikeChecker::$GETTYPE_TYPES[$fq_classlike_name])) {
if (IssueBuffer::accepts(
new UnevaluatedCode( | Exit early if a bad class is detected | vimeo_psalm | train | php |
d63d45064f1c743f79187bf5bfe2f9e89fcbf56a | diff --git a/ripe/atlas/sagan/base.py b/ripe/atlas/sagan/base.py
index <HASH>..<HASH> 100644
--- a/ripe/atlas/sagan/base.py
+++ b/ripe/atlas/sagan/base.py
@@ -208,6 +208,9 @@ class Result(ParsingDict):
if "err" in self.raw_data:
self._handle_error(self.raw_data["err"])
+ if "error" in self.raw_data:
+ self._handle_error(self.raw_data["error"])
+
def __repr__(self):
return "Measurement #{measurement}, Probe #{probe}".format(
measurement=self.measurement_id, | handle case where the result contains an error in the "error" field | RIPE-NCC_ripe.atlas.sagan | train | py |
e3a29cdae08ea17b86e2b058b3869e017dba94c3 | diff --git a/publify_core/app/models/text_filter.rb b/publify_core/app/models/text_filter.rb
index <HASH>..<HASH> 100644
--- a/publify_core/app/models/text_filter.rb
+++ b/publify_core/app/models/text_filter.rb
@@ -93,8 +93,6 @@ class TextFilter
smartypants
when "markdown smartypants"
markdown_smartypants
- when "textile"
- textile
when "none"
none
end
@@ -120,12 +118,6 @@ class TextFilter
filters: [:smartypants])
end
- def self.textile
- new(name: "textile",
- description: "Textile",
- markup: "textile")
- end
-
def self.none
new(name: "none",
description: "None", | Remove textile option from TextFilter | publify_publify | train | rb |
a5806dc3b97b610257ecf94444faf4d1af616aca | diff --git a/influx-line-format.go b/influx-line-format.go
index <HASH>..<HASH> 100644
--- a/influx-line-format.go
+++ b/influx-line-format.go
@@ -66,6 +66,18 @@ func (p *InfluxLineFormatProcess) Run(reader Reader, out io.Writer, errCh chan<-
} else {
return time.Unix(0, ns), nil
}
+ } else if p.Format == "s" {
+ if sec, err := strconv.ParseInt(s, 10, 64); err != nil {
+ return time.Unix(0, 0), err
+ } else {
+ return time.Unix(sec, 0), nil
+ }
+ } else if p.Format == "ms" {
+ if ms, err := strconv.ParseInt(s, 10, 64); err != nil {
+ return time.Unix(0, 0), err
+ } else {
+ return time.Unix(0, ms*1000000), nil
+ }
} else {
return time.ParseInLocation(p.Format, stringTs, location)
} | Add support for s and ms formats. | wildducktheories_go-csv | train | go |
b333f3ea04497faef9d2a3d84138be9ba2889a07 | diff --git a/consul/autopilot.go b/consul/autopilot.go
index <HASH>..<HASH> 100644
--- a/consul/autopilot.go
+++ b/consul/autopilot.go
@@ -272,10 +272,9 @@ func (s *Server) updateClusterHealth() error {
if health.Healthy {
healthyCount++
- }
-
- if health.Voter {
- voterCount++
+ if health.Voter {
+ voterCount++
+ }
}
clusterHealth.Servers = append(clusterHealth.Servers, health) | Only count healthy voters for FailureTolerance | hashicorp_consul | train | go |
bb00dad936481b95cb63feecb6d3bb3f62b6bad7 | diff --git a/src/SAML2/Response/Processor.php b/src/SAML2/Response/Processor.php
index <HASH>..<HASH> 100644
--- a/src/SAML2/Response/Processor.php
+++ b/src/SAML2/Response/Processor.php
@@ -83,6 +83,11 @@ class SAML2_Response_Processor
SAML2_Response $response,
SAML2_Configuration_IdentityProvider $identityProviderConfiguration
) {
+ if (!$response->getSignatureKey()) {
+ $this->logger->notice('SAMLResponse with id "%s" has no signature key, not verifying the signature');
+ return;
+ }
+
if (!$this->signatureValidator->hasValidSignature($response, $identityProviderConfiguration)) {
throw new SAML2_Response_Exception_InvalidResponseException();
} | Only attempt to validate the signature if there is a signature present | simplesamlphp_saml2 | train | php |
adae5c8fb7cde2d36f8631a31688f9c6293d5771 | diff --git a/src/example/java/Example.java b/src/example/java/Example.java
index <HASH>..<HASH> 100644
--- a/src/example/java/Example.java
+++ b/src/example/java/Example.java
@@ -56,7 +56,7 @@ public class Example {
private static AliasCompletion aliasCompletion;
public static void main(String[] args) throws IOException {
- LoggerUtil.doLog();
+ LoggerUtil.doLog();
defaultPrompt = createDefaultPrompt();
preProcessors = new ArrayList<>();
@@ -146,8 +146,7 @@ public class Example {
}
else if(line.startsWith("man")) {
connection.write("trying to wait for input:\n");
- Readline inputLine = new Readline();
- inputLine.readline(connection, "write something: ", newLine -> {
+ readline.readline(connection, "write something: ", newLine -> {
connection.write("we got: "+newLine+"\n");
readInput(connection, readline, prompt);
}); | do not create a new readline instance, just reuse the existing one | aeshell_aesh-readline | train | java |
554255cbe9bc72e2122f57b4d9f659f6526ec03a | diff --git a/lib/connect.js b/lib/connect.js
index <HASH>..<HASH> 100644
--- a/lib/connect.js
+++ b/lib/connect.js
@@ -15,8 +15,17 @@ function connect (state, options) {
state.replication = this.sync(options.remote, {
create_target: true,
live: true,
- retry: true,
- since: 'now'
+ retry: true
+ })
+
+ state.replication.on('error', function (error) {
+ state.emitter.emit('error', error)
+ })
+
+ state.replication.on('change', function (change) {
+ for (var i = 0; i < change.change.docs.length; i++) {
+ state.emitter.emit(change.direction, change.change.docs[i])
+ }
})
state.emitter.emit('connect') | fix: emit change & error events on connect | hoodiehq_pouchdb-hoodie-sync | train | js |
a6154a6e9a3e65aed487abaa1bcd62d6575f3a56 | diff --git a/lib/governor/controllers/helpers.rb b/lib/governor/controllers/helpers.rb
index <HASH>..<HASH> 100644
--- a/lib/governor/controllers/helpers.rb
+++ b/lib/governor/controllers/helpers.rb
@@ -40,7 +40,8 @@ module Governor
end
def init_resource
- set_resource model_class.find(params["#{mapping.singular}_id"] || params[:id])
+ model_scope = the_governor.present? ? model_class.unscoped : model_class
+ set_resource model_scope.find(params["#{mapping.singular}_id"] || params[:id])
end
def the_governor | ergh, handle scope on find as well | carpeliam_governor | train | rb |
e1fcb5993b330ee85ff7c2669917d8f5c07e185c | diff --git a/lib/reporters/xunit.js b/lib/reporters/xunit.js
index <HASH>..<HASH> 100644
--- a/lib/reporters/xunit.js
+++ b/lib/reporters/xunit.js
@@ -1,4 +1,3 @@
-var repl = require("repl");
var Base = require('./base');
var sys = require('sys'); | Oops, left repl require in there by accident | mochajs_mocha | train | js |
fc96f83599c9f29a737da5e0fa5732cc8885772d | diff --git a/karma.conf.babel.js b/karma.conf.babel.js
index <HASH>..<HASH> 100644
--- a/karma.conf.babel.js
+++ b/karma.conf.babel.js
@@ -55,10 +55,6 @@ export default (config) => {
},
resolve: {
root: paths.root,
- modulesDirectories: [
- 'node_modules',
- '.'
- ],
alias: {
// When these key names are require()'d, the value will be supplied instead
jquery: paths.testMocks + '/SemanticjQuery-mock.js',
diff --git a/webpack.tests.babel.js b/webpack.tests.babel.js
index <HASH>..<HASH> 100644
--- a/webpack.tests.babel.js
+++ b/webpack.tests.babel.js
@@ -51,10 +51,6 @@ module.exports = {
},
resolve: {
root: paths.root,
- modulesDirectories: [
- 'node_modules',
- '.'
- ],
alias: {
// When these key names are require()'d, the value will be supplied instead
jquery: paths.testMocks + '/SemanticjQuery-mock.js', | cleanup test webpack resolve configs | Semantic-Org_Semantic-UI-React | train | js,js |
eb312db8b5bf978ea53a0fff639c0242b06c7f0b | diff --git a/Resources/config/Algorithms/signature_experimental.php b/Resources/config/Algorithms/signature_experimental.php
index <HASH>..<HASH> 100644
--- a/Resources/config/Algorithms/signature_experimental.php
+++ b/Resources/config/Algorithms/signature_experimental.php
@@ -40,4 +40,8 @@ return function (ContainerConfigurator $container) {
$container->set(Algorithm\HS256_64::class)
->tag('jose.algorithm', ['alias' => 'HS256/64'])
;
+
+ $container->set(Algorithm\ES256K::class)
+ ->tag('jose.algorithm', ['alias' => 'ES256K'])
+ ;
}; | ES<I>K Support added (experimental) | web-token_jwt-bundle | train | php |
ff0caf4238635c4c16b850d6cfa9a254ca7bd19c | diff --git a/axiom/userbase.py b/axiom/userbase.py
index <HASH>..<HASH> 100644
--- a/axiom/userbase.py
+++ b/axiom/userbase.py
@@ -96,9 +96,16 @@ class LoginAccount(Item):
return ifa
def upgradeLoginAccount1To2(oldAccount):
+ password = oldAccount.password
+ if password is not None:
+ try:
+ password = password.decode('ascii')
+ except UnicodeDecodeError:
+ password = None
+
newAccount = oldAccount.upgradeVersion(
'login', 1, 2,
- password=oldAccount.password.decode('ascii'),
+ password=password,
avatars=oldAccount.avatars,
disabled=oldAccount.disabled) | make allowances for unset or strange passwords | twisted_axiom | train | py |
efdbe64bdeca43ed948b0f3ad69ffaa5442dc480 | diff --git a/workshift/models.py b/workshift/models.py
index <HASH>..<HASH> 100644
--- a/workshift/models.py
+++ b/workshift/models.py
@@ -354,7 +354,7 @@ class RegularWorkshift(models.Model):
def __unicode__(self):
return "%s, %s" % (self.title, self.get_day_display)
-class AssignmentEntry(models.Model):
+class ShiftLogEntry(models.Model):
''' Entries for sign-ins, sign-outs, and verification. '''
person = models.ForeignKey(
WorkshiftProfile,
@@ -420,8 +420,8 @@ class WorkshiftInstance(models.Model):
default=False,
help_text="If this shift has been blown.",
)
- assignment_entries = models.ManyToManyField(
- AssignmentEntry,
+ shift_log = models.ManyToManyField(
+ ShiftLogEntry,
null=True,
blank=True,
help_text="The entries for sign ins, sign outs, and verification.",
@@ -466,8 +466,8 @@ class OneTimeWorkshift(models.Model):
default=False,
help_text="If this shift has been blown.",
)
- assignment_entries = models.ManyToManyField(
- AssignmentEntry,
+ shift_log = models.ManyToManyField(
+ ShiftLogEntry,
null=True,
blank=True,
help_text="The entries for sign ins, sign outs, and verification.", | Renamed AssignmentEntry to ShiftLogEntry | knagra_farnsworth | train | py |
735a6156617d62fe95ed20e6d038daa22b98e74b | diff --git a/tests/functional/RemoteWebDriverCreateTest.php b/tests/functional/RemoteWebDriverCreateTest.php
index <HASH>..<HASH> 100644
--- a/tests/functional/RemoteWebDriverCreateTest.php
+++ b/tests/functional/RemoteWebDriverCreateTest.php
@@ -29,7 +29,7 @@ class RemoteWebDriverCreateTest extends WebDriverTestCase
public function testShouldStartBrowserAndCreateInstanceOfRemoteWebDriver()
{
- $this->driver = RemoteWebDriver::create($this->serverUrl, $this->desiredCapabilities, 10000, 13370);
+ $this->driver = RemoteWebDriver::create($this->serverUrl, $this->desiredCapabilities, 30000, 33370);
$this->assertInstanceOf(RemoteWebDriver::class, $this->driver); | Extend connection timeout, because Edge is slow... | facebook_php-webdriver | train | php |
b7bb67d3c2daac2181aee3d787f961a91d6d839f | diff --git a/harness/reflect_test.go b/harness/reflect_test.go
index <HASH>..<HASH> 100644
--- a/harness/reflect_test.go
+++ b/harness/reflect_test.go
@@ -75,7 +75,7 @@ func TestGetValidationKeys(t *testing.T) {
}
for i, decl := range file.Decls {
- lineKeys := getValidationKeys(fset, decl.(*ast.FuncDecl), map[string]string{"rev": REVEL})
+ lineKeys := getValidationKeys(fset, decl.(*ast.FuncDecl), map[string]string{"rev": rev.REVEL_IMPORT_PATH})
for k, v := range expectedValidationKeys[i] {
if lineKeys[k] != v {
t.Errorf("Not found - %d: %v - Actual Map: %v", k, v, lineKeys) | Fix: Last minute variable change fail. | revel_revel | train | go |
1ccda538d236a937442d450def38e633b2127af1 | diff --git a/salt/modules/glusterfs.py b/salt/modules/glusterfs.py
index <HASH>..<HASH> 100644
--- a/salt/modules/glusterfs.py
+++ b/salt/modules/glusterfs.py
@@ -27,7 +27,7 @@ def __virtual__():
'''
if salt.utils.which('gluster'):
return True
- return False
+ return (False, 'glusterfs server is not installed')
def list_peers(): | tell the user why the gluster module does not work
Fixes #<I>. | saltstack_salt | train | py |
28d73c59853c8be9e0b54dbca55aa112bc01593f | diff --git a/nette.ajax.js b/nette.ajax.js
index <HASH>..<HASH> 100644
--- a/nette.ajax.js
+++ b/nette.ajax.js
@@ -326,7 +326,7 @@ if (!!(window.history && history.pushState)) { // check borrowed from Modernizr
if (payload.url) {
this.href = payload.url;
}
- if (!payload.signal && window.history && history.pushState && this.href) {
+ if (!payload.signal && this.href) {
history.pushState({href: this.href}, '', this.href);
}
} | Removed unnecessary code (check already included before extension) | vojtech-dobes_nette.ajax.js | train | js |
8f6b1711b016452a219d644d515dc0243a12b73e | diff --git a/src/test/java/net/spy/memcached/LongClientTest.java b/src/test/java/net/spy/memcached/LongClientTest.java
index <HASH>..<HASH> 100644
--- a/src/test/java/net/spy/memcached/LongClientTest.java
+++ b/src/test/java/net/spy/memcached/LongClientTest.java
@@ -18,6 +18,14 @@ import net.spy.test.SyncThread;
*/
public class LongClientTest extends ClientBaseCase {
+ @Override
+ protected void initClient(ConnectionFactory cf) throws Exception {
+ // TODO Auto-generated method stub
+ super.initClient(cf);
+ // This test gets pretty slow in cobertura
+ client.setGlobalOperationTimeout(15000);
+ }
+
public void testParallelGet() throws Throwable {
// Get a connection with the get optimization disabled.
client.shutdown(); | Give longer timeouts to LongClientTest as it often times out in cobertura. | dustin_java-memcached-client | train | java |
d66a6f71d9fd8bdbb264a6b9a26cc3afeb3f50cb | diff --git a/src/require.js b/src/require.js
index <HASH>..<HASH> 100644
--- a/src/require.js
+++ b/src/require.js
@@ -7,8 +7,8 @@
/*global _gpfArrayForEach*/ // Almost like [].forEach (undefined are also enumerated)
/*global _gpfErrorDeclare*/ // Declare new gpf.Error names
/*global _gpfPathJoin*/ // Join all arguments together and normalize the resulting path
-/*global _gpfRequireLoad*/
-/*global _gpfPromisify*/
+/*global _gpfPromisify*/ // Converts any value into a Promise
+/*global _gpfRequireLoad*/ // Load the resource
/*exported _gpfRequireAllocate*/ // Allocate a new require context with the proper methods
/*#endif*/
@@ -36,6 +36,7 @@ _gpfErrorDeclare("require", {
/**
* @namespace gpf.require
* @description Root namespace for the GPF modularization helpers.
+ * @since 0.2.2
*/
/**
@@ -122,6 +123,7 @@ function _gpfRequireResolve (name) {
*
* @param {String} name Resource name
* @return {Promise<*>} Resource association
+ * @since 0.2.2
*/
function _gpfRequireGet (name) {
var me = this, | Documentation (#<I>) | ArnaudBuchholz_gpf-js | train | js |
e39ed0b22f0f42d388d73a235a56bb6915c0b37a | diff --git a/tasks/sass-import.js b/tasks/sass-import.js
index <HASH>..<HASH> 100644
--- a/tasks/sass-import.js
+++ b/tasks/sass-import.js
@@ -93,7 +93,7 @@ module.exports = function(grunt) {
}
resultFiles.forEach(function (file) {
- file = nodePath.relative(destRoot, file);
+ file = nodePath.relative(destRoot, file).replace(/\\/g, '/');
output += buildOutputLine(file.replace(options.basePath, ''));
});
}); | added replace method to swap out Windows backslashes for Unix forward slashes | eduardoboucas_grunt-sass-import | train | js |
6486bd28a3bbae4b88ef5db446293ac407e8badc | diff --git a/src/withPressedProps.native.js b/src/withPressedProps.native.js
index <HASH>..<HASH> 100644
--- a/src/withPressedProps.native.js
+++ b/src/withPressedProps.native.js
@@ -1,7 +1,7 @@
import React, { Component } from 'react'
import wrapDisplayName from 'recompose/wrapDisplayName'
-export default pressedProps => Target => {
+export default (pressedProps = {}) => Target => {
class WithPressedProps extends Component {
constructor() {
super()
@@ -35,7 +35,7 @@ export default pressedProps => Target => {
{...this.props}
onPressIn={this.onPressIn}
onPressOut={this.onPressOut}
- {...this.state.pressed && pressedProps}
+ {...this.state.pressed ? pressedProps : {}}
/>
)
} | Fix issue in pressedProps | klarna_higher-order-components | train | js |
d3ae2e030c33490407d528a48be7693a119a077b | diff --git a/lib/index.js b/lib/index.js
index <HASH>..<HASH> 100644
--- a/lib/index.js
+++ b/lib/index.js
@@ -21,6 +21,7 @@ var tunnelProxy = require('./tunnel');
var upgradeProxy = require('./upgrade');
var proc = require('./util/process');
var perf = require('./util/perf');
+const loadCert = require('./https/load-cert');
function handleClientError(err, socket) {
if (!socket.writable) {
@@ -117,7 +118,18 @@ function proxy(callback) {
createNormalServer(config.httpPort, http);
createNormalServer(config.httpsPort, https, {
SNICallback: function(servername, callback) {
- return httpsUtil.SNICallback(servername, callback);
+ var curUrl = 'https://' + servername;
+ loadCert({
+ isHttpsServer: true,
+ fullUrl: curUrl,
+ curUrl: curUrl,
+ useSNI: true,
+ headers: {},
+ servername: servername,
+ commonName: httpsUtil.getDomain(servername)
+ }, function() {
+ httpsUtil.SNICallback(servername, callback);
+ });
}
});
if (config.socksPort) { | feat: allow https server to load cert from plugin | avwo_whistle | 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.