messages
listlengths
2
2
language
stringclasses
8 values
prompt_type
stringclasses
2 values
lint_errors
int64
0
129
⌀
cyclomatic_complexity
int64
0
32
⌀
license
stringclasses
7 values
commit
stringlengths
40
40
repos
stringlengths
5
116k
new_file
stringlengths
4
220
status
stringclasses
6 values
error
stringlengths
26
74
⌀
is_valid_syntax
bool
2 classes
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = {\n parser: 'babel-eslint',\n rules: {\n // Enforce using all arguments\n // Allow ignoring arguments with underscore prefix\n 'no-unused-vars': [2, { args: 'all', argsIgnorePattern: '^_' }],\n }\n};\n\n```\...
javascript
edit
0
0
mit
3a0074440b7004e0cc4419feab3563886bead28a
timkurvers/eslint-config
base.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst numberOfPlannedTests = 7\ncasper.test.begin('test-xss', numberOfPlannedTests, (test) => {\n casper.start(`http://${testhost}`, function () {\n })\n\n casper.then(function () {\n const curr = this.getCurrentUrl()\n\n const...
javascript
edit
0
1
mit
0a0affff21102f34f89344c36005a52898fc3d16
transloadit/jquery-sdk,transloadit/jquery-sdk,transloadit/jquery-sdk
tests/system/disabled_test-xss.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar config = {\n paths: {\n addressfinder_magento: 'AddressFinder_Widget/js/addressfinder_magento',\n addressfinder: 'https://api.addressfinder.io/assets/v3/core',\n reqwest: 'https://files-abletech-nz.s3.amazonaws.com/address...
javascript
edit
0
0
mit
6aef71a0690998de9fb5f81973bd81f0d303209f
AbleTech/addressfinder-magento,AbleTech/addressfinder-magento,AbleTech/addressfinder-magento,AbleTech/addressfinder-magento
AddressFinder/Widget/view/frontend/requirejs-config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nrequire('modbus-stack');\nrequire('modbus-stack/server').createServer(\n require('stack')(\n // Handle \"Read Coils\" (well, we just call `next()`...)\n functionCode(1, function(req, res, next) {\n console.log(\"Got request ...
javascript
edit
0
3
mit
e66071f326e9f50f5fe7dda0c005e72adb3e0492
vrtsystems/node-modbus-stack,TooTallNate/node-modbus-stack
examples/stackServer.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nfunction updateTimeTags(selector, date) {\n console.log(\"Updating content of <time> tags\");\n var toString = date ? \"toLocaleDateString\" : \"toLocaleString\";\n $(selector).each(function() {\n var datetime = $(this).attr('date...
javascript
edit
0
2
mit
82ce6754ebca166e2014679f1ab724d12c8a9f68
piotr-rusin/yule,piotr-rusin/yule,piotr-rusin/yule,piotr-rusin/yule
src/main/resources/static/js/common.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// @flow\nimport { onWithStore } from '../../sockets';\nexport default onWithStore((store, on) => {\n return on(\n 'epl_dashboard_EPL',\n {\n 'traffic-info': data => {\n console.log(data);\n // dispatch some ac...
javascript
edit
0
1
apache-2.0
ce3fafb5b0c2397173c7294c0864e6166ff47cf6
erlanglab/erlangpl,Baransu/erlangpl,Hajto/erlangpl,erlanglab/erlangpl,erlanglab/erlangpl-ui,Baransu/erlangpl,Baransu/erlangpl,erlanglab/erlangpl-ui,mkacper/erlangpl,mkacper/erlangpl,Hajto/erlangpl,erlanglab/erlangpl,Hajto/erlangpl,mkacper/erlangpl
src/plugins/epl-vizceral/sockets.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\ndragula([$('left1'), $('right1')]);\ndragula([$('left2'), $('right2')], { copy: true });\ndragula([$('left3'), $('right3')]).on('drag', function (el) {\n el.className = el.className.replace(' ex-moved', '');\n}).on('dr...
javascript
edit
0
3
mit
416f19917fe87ca5db142f41a782b912ea34e1ff
rlugojr/dragula,gomflo/dragula,BionicClick/dragula,vkpriyesh/dragula,bevacqua/dragula,boblauer/dragula,ThiagoFerreir4/dragula,janusnic/dragula,InsomniaNoir/dragula,modulexcite/dragula,Collizo4sky/dragula,jaw4ik/dragula,luckylooke/dragula,chandre21cn/dragula,BrandTurner/dragula,kyroskoh/dragula,varblob/dragula,linearza/...
example/example.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict'\n\nfunction reusify (Constructor) {\n var head = new Constructor()\n\n function get () {\n var current = head\n\n if (current.next) {\n head = current.next\n } else {\n head = new Constructor()\n }\n...
javascript
edit
0
2
mit
0e6803c35fb9c477474461e85508e3c65bc0b9cf
mcollina/reusify
reusify.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\ndescribe('Sock object', function() {\n var socket;\n var pong;\n var joinRoom;\n beforeEach(function() {\n });\n\n afterEach(function() {\n });\n\n it('should exist', function() {\n expect(window.Tilt.Sock).toBeDefined();\n ...
javascript
edit
0
1
mit
daabca976a9a5eaa44d6cafffd8542a3d84480cf
tilt-js/tilt.js
tilt-client/spec/sock_spec.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\ndefine([\n 'extensions/views/view'\n],\nfunction (View) {\n var SingleStatView = View.extend({\n\n changeOnSelected: false,\n valueTag: 'strong',\n\n initialize: function () {\n View.prototype.initialize.apply(this, argu...
javascript
edit
0
6
mit
8666a1ca6ece94086f9d3c63576e5f439fa07ab1
gds-attic/limelight,gds-attic/limelight,gds-attic/limelight
app/assets/javascripts/extensions/views/single-stat.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*jshint node:true*/\n/* global require, module */\nvar EmberAddon = require('ember-cli/lib/broccoli/ember-addon');\n\nmodule.exports = function(defaults) {\n var app = new EmberAddon(defaults, {\n dotEnv: {\n clientAllowedKeys...
javascript
edit
0
1
mit
8a56e19d961f712b4eed2048c89a434440bbc7c6
seawatts/ember-elevio,seawatts/ember-elevio
ember-cli-build.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar app = require('express')(),\n server = require('http').Server(app),\n io = require('socket.io')(server),\n cote = require('cote')({multicast: '239.1.11.111'});\n\napp.get('/', function (req, res) {\n res.sendFile(__dirna...
javascript
edit
0
1
mit
4204486d5ef830b9a1286685a78bfca96acbcefd
dashersw/cote-workshop,dashersw/cote-workshop
end-user/server.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst fs = require('fs')\nconst lang = process.argv[2]\nconst promptly = require('promptly')\nif (!lang) {\n const files = fs.readdirSync('dist')\n const langs = files.map(tag => tag.match(/-(.+)\\./)[1])\n console.log(`Please provid...
javascript
edit
0
8
mit
381e9da2a7a702c6276df4369bbdcd65602a4b7d
muan/emojilib
scripts/improve.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*\n * Windows Utilities Unit Tests\n *\n * Copyright 2015 Raising the Floor - International\n *\n * Licensed under the New BSD license. You may not use this file except in\n * compliance with this License.\n *\n * The research leading ...
javascript
edit
0
1
bsd-3-clause
4a443b76887350b94f42fe275b6edb8d2b12e43f
colinbdclark/windows,minogian/windows,minogian/windows,colinbdclark/windows,colinbdclark/windows,gloob/windows,minogian/windows,colinbdclark/windows,gloob/windows,minogian/windows,GPII/windows,gloob/windows,javihernandez/windows,javihernandez/windows,GPII/windows,gloob/windows
gpii/node_modules/registryResolver/test/testRegistryResolver.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar React = require('react');\nvar TestUtils = require('react-addons-test-utils');\nvar expect = require('expect');\n\nvar sdk = require('matrix-react-sdk');\n\nvar test_utils = require('../../test-utils');\nvar peg = require('../../../...
javascript
edit
0
1
apache-2.0
cbcca0bfa102b52da0aeb9b6b3c44198306e52fe
aperezdc/matrix-react-sdk,matrix-org/matrix-react-sdk,aperezdc/matrix-react-sdk,matrix-org/matrix-react-sdk,matrix-org/matrix-react-sdk,matrix-org/matrix-react-sdk,aperezdc/matrix-react-sdk,matrix-org/matrix-react-sdk,matrix-org/matrix-react-sdk,aperezdc/matrix-react-sdk
test/components/structures/MatrixChat-test.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n#!/usr/bin/env node\nvar log = require('./src/log.js'),\n Parent = require('./src/parent.js'),\n ctrl = require('daemonctrl'),\n currentParent = new Parent(),\n config, sender;\n\nfunction onExit(error) {\n currentParent....
javascript
edit
0
2
mit
39eae7908c18377392614e5c6b0620647f61c346
fastest963/gobbler,fastest963/gobbler
run.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*\n * Geddy JavaScript Web development framework\n * Copyright 2112 Matthew Eernisse (<EMAIL>)\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the Licens...
javascript
edit
0
0
apache-2.0
d732fc88e87e79abc3bd6bc85f5c489eec8ccf7a
mde/ejs,jtsay362/solveforall-ejs2,kolonse/ejs,tyduptyler13/ejs,zensh/ejs,cnwhy/ejs,zensh/ejs,insidewarehouse/ejs,rpaterson/ejs,mmis1000/ejs-promise,kolonse/ejs,operatino/ejs,xanxiver/ejs,insidewarehouse/ejs,TimothyGu/ejs-tj,cnwhy/ejs,TimothyGu/ejs-tj
gen/base/development.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport config from '../config/environment';\n\nexport function initialize() {\n window.Alcatraz.rootUrl = config.alcatrazClient.rootUrl;\n}\n\nexport default {\n name: 'alcatraz-client',\n initialize: initialize\n};\n\n```\n\nApply t...
javascript
edit
0
2
mit
123267baf298599bbece15cf4adace7194d11b85
CheckMateIO/ember-cli-alcatraz-client,CheckMateIO/ember-cli-alcatraz-client
app/initializers/alcatraz-client.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar uInteger = require('../../number/integer/u-integer');\n\nmodule.exports = require('../file').create('image', {\n\twidth: uInteger,\n\theight: uInteger\n});\n\n```\n\nApply this change: Fix letter case of Image names...
javascript
edit
0
0
mit
5175620c92a173a179c24b087fcc34e1c2775dd7
medikoo/dbjs
lib/types/object/file/image.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nbeforeEach(function () {\n jasmine.addMatchers({\n // EXAMPLE\n // toBePlaying: function () {\n // return {\n // compare: function (actual, expected) {\n // var player = actual;\n\n // return {\n ...
javascript
edit
0
1
mit
a3fc184d3f4d46a1c4f770837daa48f09c8f61ab
Neilos/species
spec/SpecHelper.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nBrowserPolicy.content.allowOriginForAll('*.googleapis.com');\nBrowserPolicy.content.allowOriginForAll('*.gstatic.com');\nBrowserPolicy.content.allowOriginForAll('*.bootstrapcdn.com');\nBrowserPolicy.content.allowOriginForAll('*.box.com'...
javascript
edit
0
0
mit
605a7ad4f67a778441fde607975cb7668981bc87
kmcroft13/cloud-templates,kmcroft13/box-templates,kmcroft13/box-templates,kmcroft13/cloud-templates
server/config/security.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport { render } from 'react-dom';\nimport { Provider } from 'react-redux';\nimport { createStore } from 'redux';\nimport coordinateCommonsApp from './reducers';\nimport ActivePlaces from './containers/Activ...
javascript
edit
0
0
mit
77fa719f9e1f53e1cdca0384ee1a76cf0b8087c9
brentsowers1/coordinatecommons-frontend,brentsowers1/coordinatecommons-frontend
src/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function registerInputFieldLayout(){\n \n widget.layout.register( 'inputField', createInputField, {\n description: \"TODO!\"\n }, {\n styleClass: 'inputFieldHolder'\n } );\n\n\n function createInputField( def )\n {\n var...
javascript
edit
0
5
mit
8b1c18bc0ebdd2cc02ad507833cec2549e39e361
tony-jacobs/widget.js,tony-jacobs/widget.js
js/layout/inputField.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React, { Component } from 'react';\nimport UserList from './UserList';\nimport LocationBox from './LocationBox';\nimport $ from 'jquery';\n\nmodule.exports = React.createClass({\n getInitialState: function() { \n return {\n ...
javascript
edit
0
2
mit
a578776cb7f242e1cda2c378a6b02850f8ee9c47
niyue/react-github,niyue/react-github
src/FilterableUserList.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Em from 'ember';\n\nconst DURATION = 750;\nconst EASING = 'swing';\nconst OFFSET = 0;\n\nexport default Em.Service.extend({\n\n // ----- Static properties -----\n duration: DURATION,\n easing: EASING,\n offset: OFFSET...
javascript
edit
0
3
mit
e7b103728695bce3282068836a51d0943faac0b6
jasonkriss/ember-scroll-to,ragnarpeterson/ember-scroll-to,jasonkriss/ember-scroll-to,ragnarpeterson/ember-scroll-to
addon/services/scroller.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport api from './api';\nimport Core from './core';\nimport Auth from './auth';\n\nexport default function createAPI(apiRoot) {\n const core = new Core(apiRoot);\n const API = api.bind(null, core);\n\n this.Auth = new Auth(core);\n ...
javascript
edit
0
1
mit
625aec82d97a80043cd1eb4d2eeae5c5eda55af9
rit-sse/api-client
src/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { fetchErrorCatalog } from '../../../services/errors.service.js'\n\n// ------------------------------------\n// Constants\n// ------------------------------------\nconst GET_ENVIRONMENT_SUCCESS = 'GET_ENVIRONMENT_SUCCESS'\n\n// -...
javascript
edit
0
2
apache-2.0
bf7f587a4881a3d2c4e1773e675745617efb70b4
OpenWiseSolutions/openhub-framework,OpenWiseSolutions/openhub-framework,OpenWiseSolutions/openhub-framework,OpenWiseSolutions/openhub-framework
admin-console/src/routes/ErrorsOverview/modules/errorsOverview.module.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar createCache = require('uber-cache');\n\nvar defaultSize = 100;\n\nfunction normalizeOptions(options) {\n options = options || {};\n\n options.size = options.size || defaultSize;\n\n return options;\n}\n\nfunction Cache(options) {...
javascript
edit
0
3
mit
711b70cb769dc0ec58be7c4b0ad0172da76ba00d
droonga/express-droonga,KitaitiMakoto/express-droonga,droonga/express-droonga,KitaitiMakoto/express-droonga
lib/cache/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* @flow */\n\nimport { composeWithConnection } from './composeWithConnection';\n\nexport default composeWithConnection;\n\nexport {\n composeWithConnection\n};\n\n```\n\nApply this change: feat(Cursor): Make methods `cursorToData` and...
javascript
edit
0
0
mit
1abb97ccde157f3fa57ac484e106ac70a3346ea5
nodkz/graphql-compose-connection
src/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// function checkPermissions(bot, message) {\n// return true;\n// }\n\n// function disabledMessage(bot, message) {\n// }\n\n// module.exports = {\n// checkPermissions: checkPermissions,\n// disabledMessage: disabledMessage\n...
javascript
edit
0
0
mit
560baa4e685194345ec1219052a0e8519e3783ab
devacademyla/PiscoBot,devacademyla/PiscoBot
helpers/modules.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar requiredKeys = ['url','type']\n\nclass DataService {\n constructor(config) {\n this.config = this.validate(config)\n this.data = null\n }\n\n validate(config) {\n if (!config) throw new Error('DataServic...
javascript
edit
0
2
mit
1a4c8881845e6120efa6ceb2758d2963bfdedd73
mediasuitenz/mappy,mediasuitenz/mappy
lib/dataService.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nexport default class Api {\n static fetchJKF() {\n return fetch('/jkf')\n .then(response => response.json());\n }\n static storeJKF(jkf) {\n const body = JSON.stringify(jkf, null, ' ');\n\n return new Promise((resolve,...
javascript
edit
0
2
mit
d7a9aa1bd1e461887c5a8c660429a63c26c7bd4e
orangain/kifu-notebook,orangain/kifu-notebook,orangain/kifu-notebook,orangain/kifu-notebook,orangain/kifu-notebook
src/api.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar _ = require('underscore');\n\n/** \n * Represents an ActiveDirectory user account.\n *\n * @private\n * @param {Object} [properties] The properties to assign to the newly created item.\n * @returns {User}\n */\nvar User = function(p...
javascript
edit
0
4
mit
076632cc1edbad14dfe7cd4074704207540acfbf
jsumners/node-activedirectory,kattsushi/node-activedirectory,gheeres/node-activedirectory,tricerat/node-activedirectory,BenPaster/node-activedirectory
lib/models/user.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n#!/usr/bin/env node\n\nimport yargs from 'yargs';\nimport path from 'path';\nimport fs from 'fs';\nimport * as pose from '.';\nimport actions from './actions';\n\nconst opts = yargs\n.usage('$ pose <action> [options]')\n.help('help')\n....
javascript
edit
0
1
mit
ba185d5c54ac560d434f5154ac5c7a198814d01c
seanc/pose
src/cli.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst STARWARS = {\n 'star wars': '/img/search-chewie.gif',\n 'darth vader': '/img/search-darth-vader.gif',\n r2d2: '/img/search-r2d2.gif',\n chewie: '/img/search-chewie.gif',\n 'luke skywalker': '/img/search-luke.gif',\n yoda: '/...
javascript
edit
0
0
mit
1de848bd72d5d6643eaf879e283ffeb1a6c6ac16
Whatthefoxsays/docs,ksigler7/docs,sendgrid/docs,sendgrid/docs,ksigler7/docs,ksigler7/docs,sendgrid/docs,Whatthefoxsays/docs,Whatthefoxsays/docs
src/constants/starWars.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport _ from \"lodash\";\nimport Feed from \"../feed\";\nimport Narou from \"../../sites/narou\";\nimport { translate } from \"../../util/chrome-util\";\n\n/**\n * Feed fetcher of received reviews in Narou\n *\n * @implements FeedFetch...
javascript
edit
0
1
mit
4fcba72b2e56ea326dffe9cf8d60c2ee7d0c3ec2
io-monad/novelous-extension,io-monad/novelous-extension
app/scripts/lib/feeds/fetcher/narou-reviews.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport {createFilter} from 'rollup-pluginutils'\nimport Compiler from './compiler'\nimport objectAssign from 'object-assign'\nimport path from 'path'\n\nexport default function plugin (options = {}) {\n options = objectAssign({}, optio...
javascript
edit
0
3
mit
6dfb6182977a8dcbe83ddb2f04db51474e7c0c2c
znck/rollup-plugin-vue
src/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\nvar fs = require('fs');\nvar path = require('path');\nvar marked = require('marked');\nvar setCase = require('case')\nvar Renderer = require('./JsxRenderer');\n\nmarked.setOptions({\n xhtml: true,\n highlight: function(...
javascript
edit
0
4
mit
94b0729c5308de18b97be404ad3fab556c4a02f8
jquense/markdown-jsx-loader
src/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// Copyright (c) 2017 The Regents of the University of Michigan.\n// All Rights Reserved. Licensed according to the terms of the Revised\n// BSD License. See LICENSE.txt for details.\n\nconst processTree = require(\"../lib/process-tree\...
javascript
edit
0
1
bsd-3-clause
aaaa527940587358546579c5091f152c985f3a03
daaang/awful-mess
spec/process-tree.spec.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function (Flow, FustyFlow, window) {\r\n 'use strict';\r\n\r\n var FustyFlowFactory = function (opts) {\r\n var flow = new Flow(opts);\r\n if (flow.support) {\r\n return flow;\r\n }\r\n return new FustyFlow(opts);\r\...
javascript
edit
0
2
mit
394cf86850a4c76eb2972232fcfd01b84dc1bb30
flowjs/fusty-flow.js
src/fusty-flow-factory.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar https = require(\"https\");\n\nvar options = {\n host: 'www.haloapi.com' ,\n path: '',\n method: 'GET',\n headers: {\"Ocp-Apim-Subscription-Key\": \"\"}\n};\n\nfunction httpWrapper(API_KEY){\n options.headers[\"Ocp-Apim-Subscri...
javascript
edit
0
1
isc
ad166dcec0d145e2669d30fe560732a24cb81bd4
Googlrr/Halo-API-Wrapper-for-Node-JS
src/httpWrapper.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*renders control panel with associated buttons and display*/\nimport React from 'react';\nimport CountDisplay from 'CountDisplay';\nimport StrictButton from 'StrictButton';\nimport OnOffButton from 'OnOffButton';\n\n\nclass Control ext...
javascript
edit
0
1
mit
a6e502951ea567e053ae717ff003520518f8b9ca
crhain/freeCodeCamp-Simon,crhain/freeCodeCamp-Simon
src/Control.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function(){\n 'use strict';\n\n define([\n 'app',\n 'utils/chartHelpers',\n 'utils/duration',\n 'utils/escapeHtml'], function(app, chartHelpers, duration, escapeHtml) {\n app.controller('projectTestDetailsCtrl'...
javascript
edit
0
3
apache-2.0
b421e6ea68c50135a9aacdbee6ada36eb47188e3
dropbox/changes,wfxiang08/changes,bowlofstew/changes,bowlofstew/changes,wfxiang08/changes,dropbox/changes,wfxiang08/changes,bowlofstew/changes,dropbox/changes,wfxiang08/changes,dropbox/changes,bowlofstew/changes
static/js/controllers/projectTestDetails.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport {\n cssStatementHasBlock,\n cssStatementHasEmptyBlock,\n report,\n ruleMessages\n} from \"../../utils\"\n\nexport const ruleName = \"block-no-empty\"\n\nexport const messages = ruleMessages(ruleName, {\n rejected: `Unexpecte...
javascript
edit
0
2
mit
d17684030d04e149bee4b6a77ef0c4f8ec868145
hudochenkov/stylelint,heatwaveo8/stylelint,m-allanson/stylelint,stylelint/stylelint,hudochenkov/stylelint,heatwaveo8/stylelint,stylelint/stylelint,gucong3000/stylelint,gaidarenko/stylelint,gucong3000/stylelint,teryaew/stylelint,hudochenkov/stylelint,MadLittleMods/stylelint,evilebottnawi/stylelint,stylelint/stylelint,ga...
src/rules/block-no-empty/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nfunction(doc) {\n if ('type' in doc && doc.type !== 'Notebook' && doc.type !== 'object') {\n emit([doc.type, doc.name], 1);\n }\n}\n\n```\n\nApply this change: Allow anything to be edited via Types list\n\nBit nuts...but now it can...
javascript
edit
0
1
apache-2.0
f29a28c0e1c505b54f88e825d8147fd4f5015694
BigBlueHat/sprung,BigBlueHat/sprung
_design/sprung/views/by_type/map.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar resolver = require('../resolver');\n\nfunction Translator(domain) {\n this.domain = domain;\n this.initialize();\n}\n\nTranslator.prototype = {\n TYPE_ADD: 'add',\n MAPPED_FIELDS: {\n 'id': '_key'\n },\n\n initialize: funct...
javascript
edit
0
3
mit
13f5b1612014d17d0a74ff7fc94929cb794b4314
groonga/gcs,groonga/gcs
lib/batch/translator.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport compose from './compose'\nimport curry from './curry'\nimport either from './either'\nimport map from './map'\nimport merge from './merge'\nimport partial from './partial'\nimport prop from './prop'\nimport reduce from './reduce'...
javascript
edit
0
0
mit
747b0988f4f0df36bad95a0cea508b6588f9aac1
25th-floor/revalidation,25th-floor/revalidation
src/utils/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Ember from 'ember';\nimport layout from '../templates/components/resize-detector';\n\nconst {\n inject: { service },\n run: { scheduleOnce, bind }\n} = Ember;\n\nexport default Ember.Component.extend({\n layout,\n tagName: ''...
javascript
edit
0
3
mit
896b7e7aead414933c15506e2b9d970d0e492d48
EmberSherpa/ember-element-resize-detector,EmberSherpa/ember-element-resize-detector
addon/components/resize-detector.js
rejected_duplicate
Near-duplicate of sample 76714
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nwindow.onload = function() {\n\n var tabs = function() {\n var args = models.application.arguments;\n var current = document.getElementById(args[0]);\n var sections = document.getElementsByClassName(\"section\");...
javascript
edit
0
1
mit
b415c9f7802daefceae40c85408ff10471414a24
hassy/music_hipster
js/musichipster.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React, { PropTypes } from 'react'\n\nexport default function Counter({\n increment,\n incrementIfOdd,\n decrement,\n counter,\n}) {\n return (\n <section>\n <p className=\"intro\">\n To get started, edit <code...
javascript
edit
0
2
mit
115d9cad45cce70d38142718ecba77cdafaa2fab
jonidelv/generator-create-redux-app,delvallejonatan/generator-create-redux-app,jonidelv/generator-create-redux-app,delvallejonatan/generator-create-redux-app
src/components/Counter.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nexport function ClassDeclaration(node) {\n this.ensure(\"class\");\n this.ensureSpace();\n\n if (node.id) {\n this.print(node.id);\n this.ensureSpace();\n }\n\n if (node.superClass) {\n this.ensure(\"...
javascript
edit
0
4
mit
eb46017200d5bbee2a83a5b1a2ae10a2b2bd657b
Mark-Simulacrum/pretty-generator,Mark-Simulacrum/attractifier
src/generators/classes.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n$(document).ready( function () {\n $(\"button.upvote\").click( function() {\n var commentId = $(\".upvote\").data(\"id\");\n event.preventDefault();\n // alert(\"Hi, I am data id: \" + commentId)\n $.ajax({\n url: '/re...
javascript
edit
0
1
mit
1e2ce0a97266a9a64593d21909edb9c4c1938d29
great-horned-owls-2014/dbc-what-is-this,great-horned-owls-2014/dbc-what-is-this
app/assets/javascripts/responses.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar namespace = require( './../lib' );\n\n// Assign all modules to the GLOBAL namespace:\nvar ns = namespace( GLOBAL );\n\nvar bool = ( typeof ns.erf === 'function' );\nconsole.log( bool );\n// => true\n\nbool = ( ns.er...
javascript
edit
0
0
apache-2.0
d120ae026c9736f5dd34fcb7c280196d297e8fa3
stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib
lib/node_modules/@stdlib/namespace/examples/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst userController = require('../controllers/user');\nconst authenticationMiddleware = require('../middleware/authentication');\nconst express = require('express');\n\nconst router = express.Router();\n\n// GET all users\nrouter.get(\...
javascript
edit
0
0
mit
5b886989cc1f1eed93af5a776f4ce63a62167586
andymeneely/dev-fortress-server
app/routes/user.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nangular\n .module('lnPatterns')\n .directive('lnOGravityForm', lnOGravityForm);\n\n/**\n * TODO:\n * - Expand the list of supported input types (see comments in form parser)\n * - Add in support for confirmation types other than...
javascript
edit
0
3
mit
7a1bfcbf5547ef69e93a5b20aa02fc13dc8639a7
moxie-lean/ng-patternlab,moxie-lean/ng-patternlab
lib/organisms/gravity-form/gravity-form.directive.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\n// To make id smaller we get microseconds count from more recent date\nvar start = Date.UTC(2012, 12, 21, 12, 0, 0, 0) * 1000\n\n// Prefix with number, it reduces chances of collision with variable names\n// (helpful if...
javascript
edit
0
1
mit
4efb9719131ab37f4ef970f2bd265162ed82c7db
medikoo/time-uuid
lib/get-by-time.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nfunction DefaultPartitioner() {\n this.getPartition = function () {\n return 0;\n }\n}\n\nfunction RandomPartitioner() {\n this.getPartition = function (partitions) {\n return partitions[Math.flo...
javascript
edit
0
4
mit
258cc3b5bbfeeafbf5310edfa8253627e15e65ef
uber/kafka-node
lib/partitioner.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * @author Martin Giger\n * @module tank-treads\n * @license MIT\n */\n\nvar HALF_PI = Math.PI / 2;\nvar THREE_HALF_PI = Math.PI + HALF_PI;\n\n/**\n * Calculates the speed of the left and right treads for a tank-like vehicle,\n * b...
javascript
edit
0
6
mit
ce657335cfa9e464e82b2b73dccc55611b357e7f
freaktechnik/gamepad-nodebot
tank-treads.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nDropzone.autoDiscover = false;\n\ndocument.addEventListener(\"turbolinks:load\", function() {\n //Only work at words form page\n if ($('#word_body').length == 0) { return; }\n\n //Dropzone.js\n var de = $(\"#upload-dropzone\");\n ...
javascript
edit
0
3
mit
66d814ef3f47dd4085052bc5fdacd667df1406d8
toyoshi/wikigo,toyoshi/wikigo,toyoshi/wikigo
app/assets/javascripts/attachments.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { Paginator } from '../../utils';\nimport template from './alerts-list.html';\n\nconst stateClass = {\n ok: 'label label-success',\n triggered: 'label label-danger',\n unknown: 'label label-warning',\n};\n\nclass AlertsListCtr...
javascript
edit
0
1
bsd-2-clause
776e52a77cb0f3241a49d1a29eea8e064cbbeff7
getredash/redash,crowdworks/redash,rockwotj/redash,alexanderlz/redash,getredash/redash,EverlyWell/redash,alexanderlz/redash,44px/redash,rockwotj/redash,EverlyWell/redash,alexanderlz/redash,EverlyWell/redash,EverlyWell/redash,alexanderlz/redash,rockwotj/redash,getredash/redash,denisov-vlad/redash,denisov-vlad/redash,den...
client/app/pages/alerts-list/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar historyFallback = require('connect-history-api-fallback');\nvar log = require('connect-logger');\nvar yargs = require('yargs');\nvar sync = require('browser-sync').create();\nvar defaultOpenPath = '';\n\nyargs.option('files', {\n d...
javascript
edit
0
12
mit
1d5c0090dddd216c70b6f42069a557aafa0efa0f
johnpapa/lite-server,cgmartin/lite-server
lib/lite-server.js
rejected_complexity
Cyclomatic complexity too high: 12
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\napp.controller('myCtrl', function($scope, corporations) {\n $scope.apps = corporations.information();\n $scope.selectedFactions = shuffle($scope.apps).slice(0,3)\n $scope.growthFaction = prepareInitialStats($scope.selectedFactions[0]...
javascript
edit
0
2
mit
c916b5ea9b72f9cc67f9d55f98df663c009b0716
tra38/The-Regulator,tra38/The-Regulator
js/controllers.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar gulp = require(\"gulp\");\nvar usemin = require(\"gulp-usemin\");\nvar ngmin = require(\"gulp-ngmin\");\nvar uglify = require(\"gulp-uglify\");\nvar minifyHtml = require(\"gulp-minify-html\");\nvar minifyCss = require(\"gulp-minify-...
javascript
edit
0
1
mit
be00bc6b180624fe4cbb912f4faacf483d148668
materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org
website/gulpfile.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nconst EmberAddon = require('ember-cli/lib/broccoli/ember-addon');\nconst { maybeEmbroider } = require('@embroider/test-setup');\n\nprocess.env.buildTarget = EmberAddon.env();\n\nmodule.exports = function (defaults) {\n ...
javascript
edit
0
1
mit
864b03f3692f35589b0a579c045e55553e0203e4
amk221/ember-cli-select-box,amk221/ember-cli-select-box
ember-cli-build.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nlet fs = require('fs');\nlet objLoc = require('../src/ObjectLocator');\nvar expect = require('chai').expect;\n\ndescribe('Object Locator Tests', () => {\n it('Should be constructed and return the correct order', () => {\n let ...
javascript
edit
0
1
mit
6ba5bf5be8a07abd555f3cb44812a03e4c8f891e
generationtux/cufflink
test/ObjectLocatorTest.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n *\n * Delay jobs to make the page remain responsive during expensive jobs.\n *\n * Usage:\n *\n * require([\"work_queue\"], function(_work_queue) {\n * _.each(ids, function(id) {\n * _work_queue.add(function() {\n * ...
javascript
edit
0
2
mit
5b9d46a6ee28da96f7ea5d3cf501a5df5072b4b7
MichalKononenko/rmc,ccqi/rmc,duaayousif/rmc,sachdevs/rmc,JGulbronson/rmc,ccqi/rmc,shakilkanji/rmc,ccqi/rmc,shakilkanji/rmc,MichalKononenko/rmc,JGulbronson/rmc,duaayousif/rmc,duaayousif/rmc,duaayousif/rmc,sachdevs/rmc,ccqi/rmc,shakilkanji/rmc,JGulbronson/rmc,shakilkanji/rmc,UWFlow/rmc,sachdevs/rmc,UWFlow/rmc,sachdevs/rm...
server/static/js/work_queue.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow\n * @format\n */\n\n'use strict';...
javascript
edit
null
null
bsd-3-clause
c19c6cef3fc64113e8c0795454798a15c5741383
hoangpham95/react-native,hammerandchisel/react-native,javache/react-native,exponentjs/react-native,janicduplessis/react-native,hammerandchisel/react-native,pandiaraj44/react-native,facebook/react-native,arthuralee/react-native,pandiaraj44/react-native,janicduplessis/react-native,hammerandchisel/react-native,exponentjs/...
Libraries/TurboModule/TurboModuleRegistry.js
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar through = require('through');\nmodule.exports = function (file, opts) {\n if (file === require.resolve('../index')) return through();\n if (/\\.json$/.test(file)) return through();\n var data = '';\n\n return through(w...
javascript
edit
0
3
mit
b678416b0bdefa79a82b2c65f43b1ac8e45d09da
royriojas/browsyquire,royriojas/browsyquire
lib/browsyquire-transform.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * Home controller definition\n * @scope Controllers\n */\ndefine(['./module', 'jquery', './home-directives'], function(controllers, $) {\n 'use strict';\n\n controllers.controller('HomeController', ['$scope', 'fireRef',\n ...
javascript
edit
0
2
mit
6a229a0ae6decfe86f8e9827bf86a2973cad3fb7
FlipFlopWeekly/zori,FlipFlopWeekly/zori
source/js/modules/home/home-ctrl.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport request from 'supertest';\nimport test from 'tape';\n\nimport app from '../server';\n\ntest('Should leftpad correctly', t => {\n request(app)\n .get('?str=paddin%27%20oswalt&len=68&ch=@')\n .expect(200)\n ...
javascript
edit
0
2
mit
52ef51b17e12417f9a029ca8eb85d795b5d2c300
melonmanchan/left-pad-services,melonmanchan/left-pad-services,melonmanchan/left-pad-services,melonmanchan/left-pad-services,melonmanchan/left-pad-services,melonmanchan/left-pad-services,melonmanchan/left-pad-services,melonmanchan/left-pad-services
node/test/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar expect = require('chai').expect\n , twilioCaller = require('../../lib/twilio-caller')\n , sinon = require('sinon')\n , mockery = require('mockery');\n\ndescribe('twilio-caller', function () {\n describe('#call',...
javascript
edit
0
1
mit
3a7509b0fd96aca56a50eeed164d064f2ad498b2
TwilioDevEd/warm-transfer-node,TwilioDevEd/warm-transfer-node
spec/lib/twilio-caller.spec.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*global _, Backbone, lumbarLoader */\n(function() {\n lumbarLoader.initEvents = function() {\n // Needs to be defered until we know that backbone has been loaded\n _.extend(lumbarLoader, Backbone.Events);\n };\n if (window.Bac...
javascript
edit
0
5
mit
a10c85d3fbf1fa551dc8ef69a8fa2620bfe40a27
walmartlabs/lumbar-loader,walmartlabs/lumbar-loader
lumbar-loader-events.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* $This file is distributed under the terms of the license in /doc/license.txt$ */\n\n$(document).ready(function(){\n\n // login form is hidden by default; use JavaScript to reveal\n $(\"#loginFormAndLinks\").show();\n \n // ...
javascript
edit
0
1
bsd-3-clause
b2abc1f389e3ec66f9bcb02b03c440cbcf014a9b
vivo-project/Vitro,vivo-project/Vitro,vivo-project/Vitro,vivo-project/Vitro
webapp/web/js/login/loginUtils.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\r\n * Created by nkmathew on 23/06/2016.\r\n */\r\n\r\n$(document).ready(function () {\r\n var source = $(\"#email-list-template\").html();\r\n var template = Handlebars.compile(source);\r\n\r\n var html = template({email...
javascript
edit
0
2
bsd-3-clause
9421b3d70590087cd1547f78c82c82696f0d8867
nkmathew/intern-portal,nkmathew/intern-portal
web/js/intern-portal.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport classNames from 'classnames/dedupe';\nimport React from 'react';\n\nimport TabButtonList from './TabButtonList';\n\nclass Tabs extends React.Component {\n getChildren() {\n const {props} = this;\n\n return React.Children.m...
javascript
edit
0
2
apache-2.0
6841203b21e6e6c72654655a0f4e3955875b1102
dcos/dcos-ui,dcos/dcos-ui,dcos/dcos-ui,dcos/dcos-ui,dcos/dcos-ui
src/js/components/Tabs.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// Sloppy mock for component.install in tests\n\nvar\n utils = require('../lib/utils'),\n fs = require('fs-extra'),\n Emitter = require('events').EventEmitter;\n\nfunction Package (repo, version, options) {\n this.repo = repo...
javascript
edit
0
1
mit
6221461111266222a003bc406772ab674b84d338
web-audio-components/web-audio-components-service
mocks/component.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport path from 'path';\nimport fs from 'fs';\n\nconst getViewBoxDimensions = dir => file => {\n const fileContent = fs.readFileSync(path.join(dir, file), 'utf-8');\n const matches = fileContent.match(/viewBox=\\\"0 0 (\\d+(?:\\.\\d+...
javascript
edit
0
2
mit
fa29e48d270325725f3cf33ce18e8f6971eba080
g8extended/Character-Generator,g8extended/Character-Generator
server/lib/files.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * @title Open - cordova.plugins.bridge.open\n * @overview Open documents with compatible apps.\n * @copyright © 2014 cordova-bridge\n * @license GPLv2\n * @author Carlos Antonio\n * @version 0.1.0\n*/\n\nvar exec = require('cordov...
javascript
edit
0
3
mit
524c24c7320572dd42a5de01fe8378d06dc42b06
battmanz/cordova-open,disusered/cordova-open,flassa/cordova-open,homdna/cordova-open,homdna/cordova-open,homdna/cordova-open,flassa/cordova-open,flassa/cordova-open,disusered/cordova-open,battmanz/cordova-open,disusered/cordova-open,battmanz/cordova-open
www/bridge.open.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst path = require('path');\nmodule.exports = {\n entry: './build/index.js',\n devtool: 'source-map',\n mode: 'production',\n output: {\n path: path.resolve('./build/legacy'),\n filename: 'ol.js',\n library: 'ol',\n li...
javascript
edit
0
0
bsd-2-clause
ce31dfd4a6befbbaf4c3c9022c0a0f6a786da03c
ahocevar/ol3,geekdenz/ol3,geekdenz/openlayers,ahocevar/openlayers,ahocevar/openlayers,openlayers/openlayers,bjornharrtell/ol3,bjornharrtell/ol3,adube/ol3,ahocevar/ol3,stweil/ol3,stweil/openlayers,stweil/ol3,oterral/ol3,geekdenz/ol3,stweil/ol3,ahocevar/openlayers,geekdenz/ol3,stweil/openlayers,openlayers/openlayers,stwe...
config/webpack-config-legacy-build.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * RequireJS configuration\n * @description Pass in options for RequireJS like paths, shims or the baseUrl\n */\nrequire.config({\n\tpaths: {\n\t\t\"mainModule\" : \"Modules/Main\"\n\t},\n\n\t// Append a date on each requested scri...
javascript
edit
0
1
mit
648917160dba88e34137d3200c5e0fa2ffeefc85
t3b/t3b_template,t3b/t3b_template,t3b/t3b_template,t3b/t3b_template,t3b/t3b_template
Resources/Public/Javascripts/Sources/Main.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar path \t\t= require('path');\nvar rootPath \t= path.normalize(__dirname + '/../../');\n\nmodule.exports \t= {\n local: {\n baseUrl: 'http://localhost:3051',\n db: 'mongodb://localhost/rp_local',\n rootPath: ro...
javascript
edit
0
0
mit
79603dcc2407e989bbe9107f4aa3a25da56e70b5
NRGI/rp-org-frontend,NRGI/rp-org-frontend
server/config/config.js
rejected_duplicate
Near-duplicate of sample 71910
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\n// MODULES //\n\nvar Readable = require( 'readable-stream' ).Readable;\n\n\n// STREAM //\n\n/**\n* Readable stream.\n*\n* @private\n* @constructor\n* @returns {Stream} Stream instance\n*/\nfunction Stream() {\n\tif ( !(...
javascript
edit
0
2
apache-2.0
e1c7ee5ce1fc5d5ff35b6e9d574d8553df3ab2fd
stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib
lib/node_modules/@stdlib/utils/read-stdin/test/fixtures/stdin.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy...
javascript
edit
0
2
apache-2.0
17c7482ef6544a66af8fda0f83cd355f36a1f504
stdlib-js/www,stdlib-js/www,stdlib-js/www
src/utils/reset_scroll.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function($) {\n\n /**\n * Downloads data and uses it to dynamically create set of select options.\n * url - URL used to dynamically obtain select options (using $.ajax).\n * formatResult - function that accepts data and...
javascript
edit
0
2
mit
da0999aa8bb1b5b6216cefce631fb84eb6c62640
concord-consortium/rigse,concord-consortium/rigse,concord-consortium/rigse,concord-consortium/rigse,concord-consortium/rigse,concord-consortium/rigse
app/assets/javascripts/jquery_ajax_select.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React, { Component } from 'react';\nimport { Link } from \"react-router-dom\";\n\nimport './Home.css';\n\nclass Home extends Component {\n render() {\n return (\n <div className=\"wrapper\">\n <div className=\"tit...
javascript
edit
0
1
apache-2.0
c944a665387c344672c01645a43cd5fd3c000c78
googleinterns/Pictophone,googleinterns/Pictophone,googleinterns/Pictophone,googleinterns/Pictophone
client/src/Home.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// Copyright © 2014 Intel Corporation. All rights reserved.\n// Use of this source code is governed by an Apache v2\n// license that can be found in the LICENSE-APACHE-V2 file.\n\n/**\n * Console output interface.\n * @constructor\...
javascript
edit
0
1
apache-2.0
9e399377a30851fca7c6458d200fff5e9ce6f91d
shawngao5/crosswalk-app-tools,baleboy/crosswalk-app-tools,crosswalk-project/crosswalk-app-tools,baleboy/crosswalk-app-tools,hgl888/crosswalk-app-tools,pozdnyakov/crosswalk-app-tools,baleboy/crosswalk-app-tools,shawngao5/crosswalk-app-tools,davidmaxwaterman/crosswalk-app-tools,crosswalk-project/crosswalk-app-tools,pozdn...
src/ConsoleIface.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport defaultKeymap from \"./defaultkeymap\"\nimport {Range} from \"./selection\"\nimport {Node, Pos} from \"../model\"\n\nclass Option {\n constructor(defaultValue, update, updateOnInit) {\n this.defaultValue = defaultValue\n t...
javascript
edit
0
6
mit
82696e536e6d293aa366f993267b2878aaf56db1
adrianheine/prosemirror,ezeql/prosemirror,ProseMirror/prosemirror-markdown,jeffplourd/prosemirror,kiejo/prosemirror,garbas/prosemirror,kiejo/prosemirror,yakovenkodenis/prosemirror,jeremiak/prosemirror,salzhrani/prosemirror,tgecho/prosemirror,seanjensengrey/prosemirror,mattberkowitz/prosemirror,supriyantomaftuh/prosemir...
src/edit/options.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport express from 'express';\nimport locations from './routes/locations';\nimport tripLocations from './routes/trip-locations';\nimport distances from './routes/distances';\nimport admin from './routes/admin';\n\nconst router = expres...
javascript
edit
0
1
mit
1889e09c8b2940af18f54ccecfd6fb3aa461462b
sirbrillig/voyageur-js-server
app/routes.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* eslint-disable wrap-iife, func-names, space-before-function-paren, prefer-arrow-callback, vars-on-top, no-var, max-len */\n(function(w) {\n $(function() {\n var toggleContainer = function(container, /* optional */toggleState) {\n...
javascript
edit
0
4
mit
4d40e9cca8a4b597080c3042ab74401f44a58985
LUMC/gitlabhq,LUMC/gitlabhq,LUMC/gitlabhq,LUMC/gitlabhq
app/assets/javascripts/behaviors/toggler_behavior.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function(GOVUK, GDM) {\n\n var $page = $(\"html, body\"),\n delayInSeconds = 8,\n generateScrollTo = function($sections, index) {\n\n return function() {\n\n scrollPage($sections.eq(index).offset().top);\n\n ...
javascript
edit
0
2
mit
89108f628c567e948fb7da7ef4ff8f439d8883ac
alphagov/digitalmarketplace-admin-frontend,alphagov/digitalmarketplace-admin-frontend,alphagov/digitalmarketplace-admin-frontend,alphagov/digitalmarketplace-admin-frontend
app/assets/javascripts/_scroll-through-statistics.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\n// MODULES //\n\nvar walk = require( 'acorn/dist/walk.js' ).full;\nvar contains = require( '@stdlib/assert/contains' );\nvar types = require( './node_types.js' );\n\n\n// MAIN //\n\n/**\n* Flattens an AST.\n*\n* @privat...
javascript
edit
0
3
apache-2.0
75a3be017c1a09492365910e1ed90f324c02462d
stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib
lib/node_modules/@stdlib/_tools/js/program-summary/lib/flatten.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Component from '@ember/component';\nimport { inject as service } from '@ember/service';\nimport layout from '../templates/components/time-input';\n\nexport default Component.extend({\n layout,\n moment: service(),\n tagName: '...
javascript
edit
0
4
mit
02ab98135879759e7521ed4424427e2ef9dfff26
davidbilling/ember-cli-time-input,davidbilling/ember-cli-time-input
addon/components/time-input.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// {{{ Express HTTP server setup\nlet express = require('express');\nlet less = require('less-middleware');\nlet app = express();\n\napp.set('views', __dirname + '/views');\napp.set('view engine', 'ejs');\napp.use(less(__dirname + '/sta...
javascript
edit
0
2
mit
21047b451f4ff2495924a7a288734c9745ad3054
twizmwazin/Pigeon,twizmwazin/Pigeon
app/main.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n;(function($, ns) {\n ns.Comment = chorus.dialogs.Base.extend({\n className : \"comment\",\n title : t(\"comments.new_dialog.title\"),\n persistent : true,\n events: {\n \"submit form\": \"save\...
javascript
edit
0
1
apache-2.0
5c24b23bf171bb105dee86ade380d051a03e717f
hewtest/chorus,atul-alpine/chorus,mpushpav/chorus,jamesblunt/chorus,hewtest/chorus,hewtest/chorus,lukepolo/chorus,mpushpav/chorus,mpushpav/chorus,jamesblunt/chorus,atul-alpine/chorus,jamesblunt/chorus,lukepolo/chorus,jamesblunt/chorus,atul-alpine/chorus,hewtest/chorus,jamesblunt/chorus,prakash-alpine/chorus,atul-alpine...
public/js/dialogs/comment_dialog.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nangular.module('upload', [\n 'utils'\n])\n\n.controller('uploadController', [\n '$scope',\n '$http',\n '$stateParams',\n '$rootScope',\n 'fileTransfer',\n 'webRTC',\n 'packetHandlers',\n 'fileUpload',\n function($scope, $http,...
javascript
edit
0
1
mit
f190db593b0c3d9aef223a9dcdff84c0de7aafdd
MAKE-SITY/MKSTream,SimonDing87/MKSTream,SimonDing87/MKSTream,MAKE-SITY/MKSTream
client/app/components/connecting/uploadController.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// @flow\nimport React from 'react'\nimport Helmet from 'react-helmet'\nimport PropTypes from 'prop-types'\n\nimport Background from '../Background'\nimport Navbar from '../Navbar'\nimport { Container, Row, Column } from '../Grid'\n\nim...
javascript
edit
0
1
mit
fa978499a3c223f64889a19a7c88d4a106a7233c
kbrgl/kbrgl.github.io
src/components/Layout/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\ndefine(function() {\n\n 'use strict';\n \n var DELTAS = new Int8Array([0, -49, -36, -25, -16, -9, -4, -1, 0, 1, 4, 9, 16, 25, 36, 49]);\n\n function open(item) {\n return item.getBytes().then(function(bytes) {\n var samples ...
javascript
edit
0
3
mit
0c11d23b7e305249155f80b62ad2c500f1d6942b
radishengine/drowsy,radishengine/drowsy
mac/resources/open_ASND.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar builder = require('focus').component.builder;\nvar React = require('react');\nvar applicationStore = require('focus').application.builtInStore();\n\nvar cartridgeMixin = {\n getDefaultProps: function getCartridgeDefaultProps(){\n ...
javascript
edit
null
null
mit
1ffbdce11b40dad9ef72ab9ae0b2626edbc3dcdf
sebez/focus-components,get-focus/focus-components,Jerom138/focus-components,Bernardstanislas/focus-components,JRLK/focus-components,Ephrame/focus-components,KleeGroup/focus-components,JRLK/focus-components,Ephrame/focus-components,anisgh/focus-components,JabX/focus-components,anisgh/focus-components,KleeGroup/focus-com...
application/cartridge/index.js
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst SlurmAllocationConfig = {\n order: [\n 'name',\n 'description',\n 'cpu_limit',\n ],\n options: {\n name: {\n type: 'string',\n required: true,\n label: gettext('Allocation name'),\n maxlength: 15...
javascript
edit
0
1
mit
cc29bccc89271f9d863e3230d953d4cde407b0da
opennode/waldur-homeport,opennode/waldur-homeport,opennode/waldur-homeport,opennode/waldur-homeport
app/scripts/components/slurm/slurm-allocation-config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\ndefine([\n 'jquery',\n 'underscore',\n 'backbone',\n 'router',\n 'helpers/app',\n 'helpers/conf',\n 'helpers/usertag',\n 'views/sidebar',\n 'views/user',\n 'views/search',\n 'text!templates/body.html',\n 'bootstrap'\n], func...
javascript
edit
0
2
mit
44654629e8e32c73f196cee321713e9b624e33dd
onur/EksiOkuyucu,onur/EksiOkuyucu,onuraslan/EksiOkuyucu,onuraslan/EksiOkuyucu
app/js/app.js
accepted
null
true