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\nvar replace = require( \"../src/str-replace\" );\n\nmodule.exports = {\n replace_all: function( assert ) {\n var actual = replace\n .all( \"/\" )\n .from( \"/home/dir\" )\n .to( \"\\\\\" );\n var expected = \"\\\\h...
javascript
edit
0
1
mit
5d4e76d2dbc0627557f1503f07447193be012048
FagnerMartinsBrack/str-replace
test/replace.js
rejected_duplicate
Near-duplicate of sample 71396
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst {Action, api} = require('actionhero');\nconst templates = require('../lib/dal/templates');\n\n\nmodule.exports.allTemplatesPublic = class TopViewedPublishedDatasetsAction extends Action {\n constructor() {\n super();\n ...
javascript
edit
0
1
mit
84e66aa7011d7b3ebcc8e4d204f9115a2151bafd
materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org
backend/servers/mcapid/actions/templates-actions.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * Start browserSync server\n */\n'use strict';\n\nconst gulp = require('gulp'),\n fs = require('fs');\n\nmodule.exports = function(options) {\n\n return () => {\n // If index.html exist - open it, else show folder\n ...
javascript
edit
0
2
mit
df9030a2c64a1534490932caafe76dcb003de585
justcoded/web-starter-kit,justcoded/web-starter-kit,vodnycheck/justcoded,vodnycheck/justcoded,KirillPd/web-starter-kit,KirillPd/web-starter-kit
tasks/browser-sync-server.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nmodule.exports = () => ({\n 'title': 'Service Resource Definition',\n 'description': 'Defines the resources, units, metering, aggregation and rating formulas used to meter a particular service',\n 'type': 'obje...
javascript
edit
0
1
apache-2.0
d55f36869efc38178fd52bbbf228206040b8d98d
sasrin/cf-abacus,sasrin/cf-abacus,sasrin/cf-abacus
lib/metering/schemas/src/service-definition.js
rejected_duplicate
Near-duplicate of sample 77410
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst _pick = require('lodash').pick;\n\nconst CORDOVA_OPTS = [\n 'release',\n 'debug',\n 'emulator',\n 'device',\n 'buildConfig'\n];\n\nconst IOS_OPTS = [\n 'codeSignIdentity',\n 'provisioningProfile',\n 'codesignReso...
javascript
edit
0
3
mit
148073bcabd51f4473d78a83ffc606565c32ff15
isleofcode/corber,isleofcode/corber
lib/targets/cordova/utils/parse-build-flags.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// ------------------------------ Dynamic Icons ------------------------------ //\n\n/**\n * Take an icon name (such as \"open\") and return the HTML code to display the icon\n * @param {string} iconName - the name of the icon\n * @para...
javascript
edit
0
2
mit
af713c11ed1744aa53e7a68c1f61591b66e625a2
maxtor3569/Telescope,maxtor3569/Telescope,maxtor3569/Telescope
packages/telescope-lib/lib/icons.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst LOAD = 'hackclub/clubs/LOAD'\nconst LOAD_SUCCESS = 'hackclub/clubs/LOAD_SUCCESS'\nconst LOAD_FAIL = 'hackclub/clubs/LOAD_FAIL'\n\nconst initialState = {\n loaded: false\n}\n\nexport default function reducer(state=initialState, ac...
javascript
edit
0
5
mit
de8c845d3eaf3a7722278b0843cc83d470f17715
hackclub/api,hackclub/api,hackclub/api
web/src/redux/modules/clubs.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\ndefine(function (require, exports, module) {\n \"use strict\";\n\n var ExtensionUtils = brackets.getModule(\"utils/ExtensionUtils\");\n\n ExtensionUtils.addEmbeddedStyleSheet(\"* { font-size: 22px !important; line-height: 25px ...
javascript
edit
0
1
mit
dc87771b99d31927c9e288e9c8f5a78f1a386adb
1beb/ui-too-small,paulwellnerbou/ui-too-small
main.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* @flow */\nimport type { AggregatedReaction, RealmEmojiState, RealmEmojiType } from '../../types';\nimport emojiMap from '../../emoji/emojiMap';\nimport template from './template';\n\nconst getRealmEmojiHtml = (realmEmoji: RealmEmojiT...
javascript
edit
null
null
apache-2.0
eb111efe859d7c48088e066aab4f435db170ac86
vishwesh3/zulip-mobile,vishwesh3/zulip-mobile,vishwesh3/zulip-mobile,vishwesh3/zulip-mobile
src/webview/html/messageReactionAsHtml.js
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// Dependencies ---------------------------------------------------------------\n// ----------------------------------------------------------------------------\nvar fs = require('fs'),\n path = require('path');\n\n\n// Binary Includ...
javascript
edit
0
3
mit
f03eb3d59d77748a8e44173460eadfbc1b91a0d6
BonsaiDen/gbasm
lib/data/Binary.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n!(function( global ) {\n \n var Opera = function() {};\n\n Opera.prototype.REVISION = '1';\n\n Opera.prototype.version = function() {\n return this.REVISION;\n };\n\n Opera.prototype.buildNumber = function() {\n return this....
javascript
edit
null
null
mit
bc825f0453590733feb405dfe1c7e8c4c2276f4b
operasoftware/operaextensions.js,operasoftware/operaextensions.js,operasoftware/operaextensions.js
src/Header.js
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```javascript\nlinks = document.links;\nfor(var i = 0; i < links.length; ++i) {\n href = links[i].href;\n if(href) {\n if(href.match(/http:\\/\\/vkontakte\\.ru\\/away\\.php\\?to=/)) {\n links[i].href = unescape(href.substr(32));\n }\n ...
javascript
edit
0
4
mit
5a4ecc1dcfd8a00861f31ad926965788a0d067ef
cypok/vk_away_links
main.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nfunction lg(s) { console.log(s); }\n\nvar\n\telBody = document.body,\n\telVideo = document.querySelector( \"video\" )\n;\n\nelBody.ondragover = function() {\n\tlg(\"body:ondragover\");\n\treturn false;\n};\n\nelBody.ondrop = function( e...
javascript
edit
0
4
mit
7dda8fe55cb3c05340d05cd2837e84023e7f509f
FilePlayer/fileplayer.github.io,FilePlayer/fileplayer.github.io,FilePlayer/fileplayer.github.io
main.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar default_opacity = 0.2;\nvar animate_time = 0;\nvar default_animate_time = 1000;\nvar num_images = 152;\n\nfunction fix_resolutions() {\n var img = $('#imgloader').get(0);\n var img_ratio = img.naturalWidth / img.naturalHeight;\n ...
javascript
edit
0
2
cc0-1.0
8a9c6334cb468f6e2356575233cabe247c31ab08
gareins/gareins.github.io,gareins/gareins.github.io,gareins/gareins.github.io
static/script.js
rejected_duplicate
Near-duplicate of sample 74039
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar http = require('http');\nvar gpio = require('pi-gpio');\nvar currentState = false;\n\nvar actuator = function(outputValue) {\n console.log('Switching relay: '+outputValue);\n currentState = outputValue;\n gpio.open(11, \"output\"...
javascript
edit
0
3
bsd-3-clause
29d91d171aa10a9859b9ece4589285245a67c1d5
rbasoalto/pi-alarm
pi-alarm.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// @flow\n\nexport type UpdateType = {\n\tauthors: string[],\n\tcategories: string[],\n\tcontent: string,\n\tdatePublished: ?string,\n\texcerpt: string,\n\tfeaturedImage: ?string,\n\tlink: ?string,\n\ttitle: string,\n}\n\n```\n\nApply t...
javascript
edit
null
null
mit
0d96b9c0fb0d2211c2bcf2f2c145a262781ccb9e
carls-app/carls,carls-app/carls,carls-app/carls,carls-app/carls,carls-app/carls,carls-app/carls,carls-app/carls
source/views/covid/types.js
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\ndefine(\n[\n 'chai',\n 'sinon',\n 'fixtures',\n 'argumenta/widgets/Proposition',\n 'argumenta/widgets/Base'\n],\nfunction(chai, undefined, fixtures, Proposition, Base) {\n\n var assert = chai.assert;\n\n describe(...
javascript
edit
0
1
mit
743bc142aa4c8cd11f16ebda2a1b153114af4b92
argumenta/argumenta-widgets,argumenta/argumenta-widgets
test/unit/PropositionTest.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = {\r\n port: 3000,\r\n canvas: {\r\n apiUrl: 'https://kth.instructure.com/api/v1'\r\n },\r\n logging: {\r\n log: {\r\n level: 'info',\r\n src: false\r\n },\r\n stdout: {\r\n enabled: true\r...
javascript
edit
0
0
mit
84781e527ba9fffd28126b0fe77ed38123244aa9
KTH/lms-sync,KTH/lms-sync
config/prodSettings.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\"use strict\";\nvar BaobabControllers; //globals\n\nBaobabControllers\n.controller('AppCtrl', ['$scope', '$me', '$inbox', '$auth', '$location', '$cookieStore', '$sce', function($scope, $me, $inbox, $auth, $location, $cookieStore, $sce)...
javascript
edit
0
2
mit
283cedfd8187496f2c4aeb0d2c55f002442af00d
Eagles2F/inbox-scaffold-html5,PriviPK/privipk-webapp,nylas/inbox-scaffold-html5,PriviPK/privipk-webapp,Eagles2F/inbox-scaffold-html5,PriviPK/privipk-webapp,Eagles2F/inbox-scaffold-html5,nylas/inbox-scaffold-html5,nylas/inbox-scaffold-html5,PriviPK/privipk-webapp
public/js/app.controller.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nfunction initType(a,b,c,d,e,f){}//IGNORE\nfunction String$(x){}//IGNORE\nfunction ArraySequence(x){}//IGNORE\nvar exports;//IGNORE\n\nfunction Callable(wat) {\n return wat;\n}\ninitType(Callable, 'ceylon.language::Callable');\nexport...
javascript
edit
0
2
apache-2.0
d30236af0c6482a5806a80214cc3ed4c89aa95d0
ceylon/ceylon.language,unratito/ceylon.language,jvasileff/ceylon.language,jvasileff/ceylon.language,lucaswerkmeister/ceylon.language,ceylon/ceylon.language,unratito/ceylon.language,lucaswerkmeister/ceylon.language
runtime-js/callable.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * Grunt-Contrib-Uglify\n * @description Minify files with UglifyJS.\n * @docs https://github.com/gruntjs/grunt-contrib-uglify\n */\n\nvar config = require(\"../Config\");\n\nmodule.exports = {\n\tjs: {\n\t\toptions: {\n\t\t\tbanne...
javascript
edit
0
0
mit
ece9ec6a2c40f309d37fb6c35b6661ec82f3977b
t3b/t3b_template,t3b/t3b_template,t3b/t3b_template,t3b/t3b_template,t3b/t3b_template
Build/Grunt-Options/uglify.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function(app) {\n 'use strict';\n\n var jCore = require('jcore');\n var helper = app.helper || require('../helper.js');\n var dom = app.dom || require('../dom.js');\n var Button = app.Button || require('./button.js');\n var Sideb...
javascript
edit
0
7
mit
e751590242eda7acbcac5a2ba5d35efabbcf5d39
ionstage/modular,ionstage/modular
js/components/content-header.js
rejected_duplicate
Near-duplicate of sample 89166
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\ndefine(['codemirror', 'matchbrackets', 'continuecomment', 'javascripthint', 'javascriptmode'], function() {\n function initEditor($e) {\n return CodeMirror($e.get(0), {\n value: \"function effect(cube) {\\n cube(...
javascript
edit
0
1
mit
e5c2e7d1feb465495e3f706f5dc5f2ba0f65d587
elovalo/webide,elovalo/webide,elovalo/webide,elovalo/webide,elovalo/webide
public/js/editor.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport fetch from 'isomorphic-fetch'\n\nexport const REQUEST_BUS_STOPS = 'REQUEST_BUS_STOPS'\nexport const RECEIVE_BUS_STOPS = 'RECEIVE_BUS_STOPS'\n\nfunction requestBusStops(meters, coors) {\n return {\n type: REQUEST_POSTS\n }\n}...
javascript
edit
null
null
apache-2.0
892ee0f1c7e5b73ecaa6a2bb0f1815ba751d750e
swcraftersclm/katangapp-frontend,swcraftersclm/katangapp-frontend,swcraftersclm/katangapp-frontend
src/actions/actions.js
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// @require: OpenLayers/Tile.js\n/**\n* @class\n*/\nOpenLayers.Tile.Image = Class.create();\nOpenLayers.Tile.Image.prototype = \n Object.extend( new OpenLayers.Tile(), {\n \n /** @type DOMElement img */\n img:null,\n\n /** ...
javascript
edit
0
2
bsd-2-clause
a4d0badaeb2a754163d24412a77855f019aa5bb1
bogdanvaduva/ol3,gingerik/ol3,kkuunnddaannkk/ol3,dracic/openlayers,epointal/ol3,stweil/ol3,sbrunner/openlayers,ahocevar/ol3,alvinlindstam/ol3,owenmead/openlayers,tschaub/openlayers-raster,xiaoqqchen/ol3,adube/ol3,kjelderg/ol3,planetlabs/ol3,pvalsecc/openlayers,landonb/ol3,planetlabs/ol3,t27/ol3,adh1365/openlayers,kartv...
lib/OpenLayers/Tile/Image.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * Based on: https://github.com/iriscouch/manage_couchdb/\n * License: Apache License 2.0\n **/\nfunction(newDoc, oldDoc, userCtx, secObj) {\n var ddoc = this;\n\n secObj.admins = secObj.admins || {};\n secObj.admins.names = sec...
javascript
edit
0
13
apache-2.0
34f55889d63aff827bd1d2660dd48fa9c1b344b0
BigBlueHat/BlueInk,BigBlueHat/BlueInk
_design/perms/validate_doc_update.js
rejected_complexity
Cyclomatic complexity too high: 13
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst hyperglue = require('hyperglue')\nconst html = require('fs').readFileSync(__dirname + '/index.html')\n\nmodule.exports = function(movie) {\n\treturn hyperglue(html, {\n\t\t'.name': movie.name,\n\t\t'.desc': movie.desc,\n\t\t'...
javascript
edit
0
1
mit
a86b3efd5feca4fac036358c943b6a3b9edee317
CoderPuppy/movie-voting.js,CoderPuppy/movie-voting.js,CoderPuppy/movie-voting.js
pages/_movie/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar model = require('../models/index');\n\n/* Returns a list of artists with the given genre (in the query string) */\nexports.getArtistsByGenre = function(req, res) {\n return res.status(200).send('Success');\n}\n\n/* Gets all of the ...
javascript
edit
0
3
mit
34a103d769433851031d8327d9f38721883304cd
kurtbradd/facebook-music-recommender,kurtbradd/facebook-music-recommender,kurtbradd/facebook-music-recommender,kurtbradd/facebook-music-recommender
controllers/genre-controller.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { isNil } from 'substance'\n\nexport default function addTestAPI (tape) {\n const Test = tape.Test\n\n Test.prototype.nil =\n Test.prototype.isNil = function (value, msg, extra) {\n this._assert(isNil(value), {\n messa...
javascript
edit
0
2
mit
04bf179c82a2c422817419097330962429b06452
substance/test,substance/test
src/addTestAPI.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport('helma.webapp', 'webapp');\nimport('model');\n\nvar handleRequest = webapp.handleRequest;\n\n// the main action is invoked for http://localhost:8080/\n// this also shows simple skin rendering\nfunction index_action(req, res) {\n ...
javascript
edit
0
3
apache-2.0
cbf4b01cf2c850a66858145ce6e2c8093f271d9c
oberhamsi/ringojs,Transcordia/ringojs,oberhamsi/ringojs,ashwinrayaprolu1984/ringojs,Transcordia/ringojs,ashwinrayaprolu1984/ringojs,ashwinrayaprolu1984/ringojs,ringo/ringojs,ringo/ringojs,ringo/ringojs,ringo/ringojs,Transcordia/ringojs,ashwinrayaprolu1984/ringojs,oberhamsi/ringojs,Transcordia/ringojs
apps/storage/main.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*\n * Copyright (c) 2012-2014 André Bargull\n * Alle Rechte vorbehalten / All Rights Reserved. Use is subject to license terms.\n *\n * <https://github.com/anba/es6draft>\n */\n\nconst {\n assertSame\n} = Assert;\n\n// Invalid direct...
javascript
edit
0
1
mit
48d4ceedb5a1b66d98e3e7a2b07a0e4b11eaf84a
anba/es6draft,anba/es6draft,jugglinmike/es6draft,jugglinmike/es6draft,jugglinmike/es6draft,anba/es6draft,jugglinmike/es6draft
src/test/scripts/suite/objects/Realm/direct_eval_fallback_tailcall.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\nconst path = require('path');\nconst os = require('os');\n\nexports.toNumber = function(x) { return (x = Number(x)) >= 0 ? x : false; };\nexports.getSocketPath = function(channel)\n{\n let pipePath = path.resolve(os.tm...
javascript
edit
0
3
mit
fa808c07f2d7471c27e618387cd67f613f185f7f
arloliu/fastmq
src/common.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport {\n visit,\n remote,\n saveAndProcessPage,\n copyPage,\n} from '../action_creators'\nimport { urlToPageKey } from './url'\n\nexport function mapStateToProps(\n state = { pages: {}, breezy: {} },\n ownProps\n) {\n let pageK...
javascript
edit
0
2
mit
56a7d8befffa48399981c626e9ebdfd2e38e1842
jho406/Breezy,jho406/Breezy,jho406/Breezy
breezy/lib/utils/react.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nnavigator.geolocation.getCurrentPosition(function(position) {\n makeMap({lat: position.coords.latitude, lng: position.coords.longitude}); \n}, function(err) {\n console.error(err);\n});\nvar map;\nvar marker;\nvar destinationMarker;\...
javascript
edit
0
1
mit
78406ddbeb90a85c664827c0b990b4864db3617a
boisterousSplash/Bolt,thomasRhoffmann/Bolt,thomasRhoffmann/Bolt,elliotaplant/Bolt,boisterousSplash/Bolt,elliotaplant/Bolt,gm758/Bolt,gm758/Bolt
client/map-scripts/map.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\napp.controller('NavController', ['$http', '$firebaseAuth', '$mdDialog', 'AuthFactory', function($http, $firebaseAuth, $mdDialog, AuthFactory) {\n console.log('NavController running');\n var auth = $firebaseAuth();\n var self = this;\...
javascript
edit
0
1
mit
86f23dc53d53d2f8dafe61b4ae5e783128a89a7c
STEMentor/STEMentor,STEMentor/STEMentor
server/public/scripts/controllers/nav.controller.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function() {\n var grid, projectItems;\n\n // setup grid\n {\n grid = $('.project-grid');\n grid.isotope({\n itemSelector: '.project-item',\n\n percentPosition: true,\n masonry: {\n columnWidth: '.project...
javascript
edit
0
1
mit
41013729856be966ca0768521cf9556b89476bd0
foolmoron/foolmoron.github.io,foolmoron/foolmoron.github.io
static/js/project-grid.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\nangular.module('arethusa.core').service('notifier', function () {\n var self = this;\n this.messages = [];\n\n function Message(type, message, description) {\n this.type = type;\n this.message = message;\n thi...
javascript
edit
0
2
mit
aa624267087de9a87889cdf6ee49517fc04e4a24
fbaumgardt/arethusa,Masoumeh/arethusa,alpheios-project/arethusa,fbaumgardt/arethusa,fbaumgardt/arethusa,latin-language-toolkit/arethusa,PonteIneptique/arethusa,PonteIneptique/arethusa,alpheios-project/arethusa,latin-language-toolkit/arethusa,alpheios-project/arethusa,Masoumeh/arethusa
app/js/arethusa.core/notifier.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * @module client/main\n */\n'use strict';\n\nrequire('./app');\nrequire('angular');\n\n/**\n * Each 'index' generated via grunt process dynamically includes all browserify common-js modules\n * in js bundle\n */\nrequire('./contro...
javascript
edit
0
1
mit
65de37dc582aa3e62fdd5979de7644604a0d3701
Runnable/hyperion,Runnable/hyperion
client/main.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nwalk(document.body);\n\nvar rpl = \"butt\";\nfunction loadRpl() {\n var rpl = localStorage[\"rpl\"];\n return rpl;\n}\n\nfunction walk(node) \n{\n\t// I stole this function from here:\n\t// http://is.gd/mwZp7E\n\t\n\tvar child, next;\...
javascript
edit
0
6
apache-2.0
e97d29c2f6e454c019890182ccceb3eee81c0fd0
morrowc/new_chrome_extensions,morrowc/new_chrome_extensions
Trump-To-Butt/content_script.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport {createAction} from 'redux-actions';\nimport axios from 'axios';\n\nexport const FETCH_APP_REQUEST = 'FETCH_APP_REQUEST';\nexport const FETCH_APP_SUCCESS = 'FETCH_APP_SUCCESS';\nexport const FETCH_APP_FAILURE = 'FETCH_APP_FAILURE...
javascript
edit
0
2
mit
7930ee4bcbc56a4b048263fdba84df4729eb2ef7
rapid7/acs,rapid7/acs,rapid7/acs
client/src/actions/app.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { declare } from \"@babel/helper-plugin-utils\";\nimport transformTypeScript from \"@babel/plugin-transform-typescript\";\n\nexport default declare(\n (api, { jsxPragma, allExtensions = false, isTSX = false }) => {\n api.asse...
javascript
edit
0
6
mit
06e5c46c8df784ab8f6e7713ada68bbb011dbb68
jridgewell/babel,babel/babel,kaicataldo/babel,chicoxyzzy/babel,hulkish/babel,kaicataldo/babel,hulkish/babel,existentialism/babel,existentialism/babel,hulkish/babel,existentialism/babel,hzoo/babel,chicoxyzzy/babel,babel/babel,kaicataldo/babel,vadzim/babel,jridgewell/babel,babel/babel,hzoo/babel,jridgewell/babel,chicoxyz...
packages/babel-preset-typescript/src/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Component from '@glimmer/component';\nimport { action } from '@ember/object';\n\nexport default class FormButtonComponent extends Component {\n @action\n handleClick() {\n if (!this.args.isActing && this.args.onClick) {\n ...
javascript
edit
0
4
mit
05e3c77e5b236ee6d500d3ed8839c03642afd770
Foodee/ember-foxy-forms,Foodee/ember-foxy-forms
addon/components/form-button.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// Copyright (C) 2006 Google Inc.\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 of the License at\n//\n// ht...
javascript
edit
0
0
apache-2.0
451813a77b10040e9bf82e31f55aa5e16041795a
ProjectSoft-STUDIONIONS/prettify,ProjectSoft-STUDIONIONS/prettify
src/lang-proto.js
rejected_duplicate
Near-duplicate of sample 95584
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* eslint-disable import/no-unresolved */\n\nimport React from 'react';\nimport ReactDOM from 'react-dom';\n\n// Styling\nimport { FlexParent, FlexChild } from 'react-foundation-components/lib/flex';\nimport './splash.css';\nimport './l...
javascript
edit
0
1
mit
bbc0cdab50790d20eb95a46ecb011dd252bf56a1
aCandidMind/inemaa_event-tool,aCandidMind/inemaa_event-tool
src/splash.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nfunction setup() {\n // put setup code here\n}\n\nfunction draw() {\n // put drawing code here\n}\n\n```\n\nApply this change: Create basic Boid class with properties" }, { "role": "assistant", "content": "function setup()...
javascript
edit
0
1
mit
47f7a0d3f72afe9613f40e7e51bc27aca80dcb5a
dkgramming/rgw,dkgramming/rgw
src/sketch.js
rejected_duplicate
Near-duplicate of sample 92822
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport debugModule from \"debug\";\nconst debug = debugModule(\"debugger:store:common\");\nconst reduxDebug = debugModule(\"debugger:redux\");\n\nimport { compose, createStore, applyMiddleware } from \"redux\";\nimport createSagaMiddlew...
javascript
edit
0
2
mit
6066a0425b671275a3f7d3c3d8947867b75fa353
ConsenSys/truffle
packages/truffle-debugger/lib/store/common.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport needle from 'needle';\nimport { SiteConf, getDate } from 'base';\n\nexport const postsApiHandler = (req, res) => {\n needle('get', SiteConf.PostsApi)\n .then(resp => {\n const data = resp.body;\n const filter = req...
javascript
edit
0
6
mit
19bdc9e0926d33a96f38d5bb590d05b7ec251fee
pmagaz/pablomagaz.com,pmagaz/pablomagaz.com
server/api/posts.js
rejected_duplicate
Near-duplicate of sample 79369
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 { browserHistory, Router } from 'react-router';\nimport { syncHistoryWithStore } from 'react-router-redux';\nimport { confi...
javascript
edit
0
1
isc
c2558193e7ddb2b5e41e3cd46106f00ffd132827
codefordenver/Circular,codefordenver/Circular,codefordenver/Circular
client/src/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\n\n// Support for Node 0.10\n// See https://github.com/webpack/css-loader/issues/144\nrequire('es6-promise').polyfill();\n\nvar chil...
javascript
edit
0
0
bsd-3-clause
cd8389361ea42539f728782b8037ee642e070d0b
eskirk/jupyterlab,charnpreetsingh185/jupyterlab,eskirk/jupyterlab,jupyter/jupyterlab,eskirk/jupyterlab,charnpreetsingh185/jupyterlab,jupyter/jupyterlab,jupyter/jupyterlab,eskirk/jupyterlab,jupyter/jupyterlab,jupyter/jupyterlab,charnpreetsingh185/jupyterlab,charnpreetsingh185/jupyterlab,charnpreetsingh185/jupyterlab,esk...
jupyterlab/webpack.config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from \"react\";\nimport DayPicker, {DateUtils} from \"react-day-picker\";\nimport \"./MeetingDaysField.scss\";\n\nclass MeetingDaysField extends React.Component {\n static propTypes = {\n days: React.PropTypes.array.isR...
javascript
edit
0
2
apache-2.0
b69c8e1e20396431556c3a00b9a39ff309dfacf2
megawebmaster/zrob-spotkanie,megawebmaster/zrob-spotkanie,megawebmaster/zrob-spotkanie
src/components/MeetingDaysField/MeetingDaysField.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { ApolloProvider } from \"@apollo/client\"\nimport API from \"api\"\nimport \"bootstrap/dist/css/bootstrap.css\"\nimport { jumpToTop } from \"components/Page\"\nimport \"locale-compare-polyfill\"\nimport App from \"pages/App\"\ni...
javascript
edit
0
1
mit
ef45c0ebafb288a72365a4ea091266b80cc61af9
NCI-Agency/anet,NCI-Agency/anet,NCI-Agency/anet,NCI-Agency/anet,NCI-Agency/anet
client/src/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n//jQuery all client side\n$(document).ready(function(){\n\t$('#txt').bind('keypress', function(e) {\n\t\tif(e.keyCode==13){\n\t\t\tconsole.log('test');\n\t\t\t$.getJSON('/check_code', {\n\t\t text : $('textarea#txt').val()\n\t\t ...
javascript
edit
0
2
bsd-3-clause
2b5a66edcc329cab388fd269f4b452a5bc127823
ethanchewy/PythonBuddy,ethanchewy/OnlinePythonLinterSyntaxChecker,ethanchewy/PythonBuddy,ethanchewy/OnlinePythonLinterSyntaxChecker,ethanchewy/PythonBuddy
main/static/js/javascript.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nmodule.exports = function(driver, connectorSpec) {\n\tconnectorSpec.shouldBehaveLikeMusicSite(driver, {\n\t\turl: 'http://hypem.com/artist/Violet+Days+x+Win+and+Woo',\n\t\tplayButtonSelector: '.tools .playdiv'\n\t});\n}...
javascript
edit
0
1
mit
3048a7d2f00dc9897181eee1f650157c8dd49da1
alexesprit/web-scrobbler,carpet-berlin/web-scrobbler,alexesprit/web-scrobbler,fakelbst/Chrome-Last.fm-Scrobbler,david-sabata/web-scrobbler,inverse/web-scrobbler,galeksandrp/web-scrobbler,carpet-berlin/web-scrobbler,david-sabata/web-scrobbler,galeksandrp/web-scrobbler,inverse/web-scrobbler,fakelbst/Chrome-Last.fm-Scrobb...
tests/connectors/hypem.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React, { PropTypes } from 'react';\nimport { FormattedTime } from 'react-intl';\nimport { epochToDate } from '../_utils/DateUtils';\nimport { M } from '../_common';\n\nconst PurchaseConfirmation = ({ receipt }) => (\n\t<div>\n\t\...
javascript
edit
0
1
mit
2c69c82222a6ba070b1c78a68f5ee10682bd3dc6
binary-com/binary-next-gen,qingweibinary/binary-next-gen,nazaninreihani/binary-next-gen,nuruddeensalihu/binary-next-gen,nazaninreihani/binary-next-gen,nuruddeensalihu/binary-next-gen,qingweibinary/binary-next-gen,nuruddeensalihu/binary-next-gen,qingweibinary/binary-next-gen,binary-com/binary-next-gen,nazaninreihani/bin...
src/_common/PurchaseConfirmation.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* global SW:true */ \n\n$(document).ready(function(){\n 'use strict';\n console.log( 'Doing SW things!' );\n var card = new SW.Card();\n var helpdesk = card.services('helpdesk');\n helpdesk\n .request('tickets')\n .then( fu...
javascript
edit
0
2
mit
860a082bb1b024d1e76f081957b08dd215a72147
chrisbodhi/ticket-graph,chrisbodhi/ticket-graph
app/scripts/getTickets.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst {i18n, React} = Serverboards\nimport Details from '../containers/details'\n\nclass DetailsTab extends React.Component{\n constructor(props){\n super(props)\n\n this.state={\n tab: \"details\"\n }\n }\n render(){\n...
javascript
edit
0
2
apache-2.0
00d812479fe791c7b0921d72ae0eb108c35486a4
serverboards/serverboards,serverboards/serverboards,serverboards/serverboards,serverboards/serverboards,serverboards/serverboards
plugins/core-cloud/src/components/detailstab.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar Promise = require(\"bluebird\");\n\nmodule.exports = (response, body) => {\n var outResponse = {\n statusCode: response.statusCode,\n headers: response.headers,\n body: body\n };\n\n if (response.statusCode != 200) {\n ...
javascript
edit
0
5
apache-2.0
beb4d3bd70c8443c545d40955c51152f7b3ac89c
smartsheet-platform/smartsheet-javascript-sdk
lib/utils/responseHandler.js
rejected_duplicate
Near-duplicate of sample 92037
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport classNames from 'classnames';\nimport React, { PropTypes } from 'react';\n\nconst HeaderView = ({\n items,\n githubLink,\n onLabelClick\n}) => (<div className=\"github-embed-nav\">\n {items.map(({ shown, label }, inde...
javascript
edit
0
1
mit
6c2775aad92b709958389b3144b48ca1f0d47f80
finom/github-embed,finom/gh-embed,finom/gh-embed
src/components/Header/HeaderView.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * Project: masterroot24.github.io\n */\n\n$(document).ready(function () {\n\n /* Add the current year to the footer */\n function getYear() {\n var d = new Date();\n var n = d.getFullYear();\n return n.t...
javascript
edit
0
1
mit
adc12791f253b68dfc4438f8550f9064fc1591c0
MasterRoot24/masterroot24.github.io,MasterRoot24/masterroot24.github.io,MasterRoot24/masterroot24.github.io
assets/js/main.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport { storiesOf } from '@storybook/react';\nimport { text, select } from '@storybook/addon-knobs';\nimport OptionsHelper from '../../utils/helpers/options-helper';\nimport notes from './notes.md';\nimport ...
javascript
edit
0
3
apache-2.0
f8f865e7678c1cd52518300dd4d0d5a801d582bc
Sage/carbon,Sage/carbon,Sage/carbon
src/components/help/help.stories.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport formatDistance from './_lib/formatDistance/index'\nimport formatLong from './_lib/formatLong/index'\nimport formatRelative from './_lib/formatRelative/index'\nimport localize from './_lib/localize/index'\nimport match from './_li...
javascript
edit
0
0
mit
e27995027a8ae5bfa5c68de32b49e11cd9b6f4c9
date-fns/date-fns,date-fns/date-fns,date-fns/date-fns
src/locale/sq/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar chai = require('chai');\nvar sinonChai = require('sinon-chai');\nvar sdk = require('flowxo-sdk');\n\nchai.use(sinonChai);\nchai.use(sdk.Chai);\n\nchai.should();\nchai.config.includeStack = true;\n\nglobal.expect = chai.expect;\nglob...
javascript
edit
0
0
mit
47d5f23fee02cfe7b7e28b9824c0694767078d1a
flowxo/generator-flowxo
app/templates/_helpers.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* @flow */\nimport React, { PureComponent } from 'react';\nimport { Text } from 'react-native';\nimport { FormattedMessage } from 'react-intl';\n\nimport type { LocalizableText, Style } from '../types';\n\ntype Props = {\n text: Local...
javascript
edit
null
null
apache-2.0
fbb8f67f838f8fe820d6446fca2d702b172b1472
vishwesh3/zulip-mobile,vishwesh3/zulip-mobile,vishwesh3/zulip-mobile,vishwesh3/zulip-mobile
src/common/Label.js
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport {BaseModel} from 'nxus-storage'\n\nexport default BaseModel.extend({\n attributes: {\n role: {\n model: 'users-role'\n },\n object: {\n model: 'subclass-must-define'\n },\n user: {\n model: 'users-u...
javascript
edit
0
3
mit
9d269914032336e81f7b2a3f15d202454902c238
nxus/users,nxus/users
src/objectRoleModel.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*\n * Author: Pierre-Henry Soria <<EMAIL>>\n * Copyright: (c) 2015-2019, Pierre-Henry Soria. All Rights Reserved.\n * License: GNU General Public License; See PH7.LICENSE.txt and PH7.COPYRIGHT.txt in the root directory...
javascript
edit
0
1
mit
5ebe08b0eb943506efbc19b65c6a376d7120927e
pH7Software/pH7-Social-Dating-CMS,pH7Software/pH7-Social-Dating-CMS,pH7Software/pH7-Social-Dating-CMS,pH7Software/pH7-Social-Dating-CMS
templates/system/modules/ph7cms-helper/themes/base/js/suggestionbox.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport co from 'co';\nimport test from 'blue-tape';\nimport agent from 'promisify-supertest';\n\nimport createApplication from '../src';\n\nconst setup = () => {\n return agent(createApplication());\n};\n\ntest('GET /', (sub) => {\n s...
javascript
edit
0
1
isc
a1d4ca54e5d0abe038a2dbac863ae873a51f9a1d
francisbrito/let-go-hold-on-api
test/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport DS from \"ember-data\";\nimport Ember from 'ember';\n\nvar singularize = Ember.String.singularize;\nvar camelize = Ember.String.camelize;\n\nexport default DS.RESTSerializer.extend({\n\n normalize: function(type, hash, prop) {\n...
javascript
edit
0
4
mit
73684b6489078ce2a725fc591c31249ef8c4019b
endpoints/ember-data-endpoints,endpoints/ember-data-endpoints
addon/serializer.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar banner = $(\"#homepage-banner\");\n\nvar imageNames = ['bot', 'soccer', 'teamCrop', 'working'];\nvar imageIndex = Math.floor((Math.random() * imageNames.length));\nvar imageUrl = \"assets/images/homepage-banners/\" + imageNames[imag...
javascript
edit
0
0
apache-2.0
6f0ca2ef87703112bde5c19c8f9c208fcda71c0c
kev-chien/website,kev-chien/website,pioneers/website,kev-chien/website,kev-chien/website,pioneers/website,kev-chien/website,pioneers/website,pioneers/website,pioneers/website
assets/javascripts/banner.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\"use strict\";\n\nvar arrays = require(\"../../utils/arrays\"),\n GrammarError = require(\"../../grammar-error\"),\n asts = require(\"../asts\"),\n visitor = require(\"../visitor\");\n\n/*\n * Reports left r...
javascript
edit
0
2
mit
cdeecf750f8a3f781459ed817815a537392993c1
mcanthony/pegjs,pegjs/pegjs,mcanthony/pegjs,Mingun/pegjs,pegjs/pegjs,Mingun/pegjs,Sciumo/pegjs,Sciumo/pegjs
lib/compiler/passes/report-left-recursion.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 log_tree = require(\"../lib/log_tree\");\n\n...
javascript
edit
0
1
bsd-3-clause
aaaa90ab362a868affe922331e2344bdf5fd6655
daaang/awful-mess
spec/log_tree.spec.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nconst ContentNode = function (context) {\n\n const self = this;\n const api = require('../api');\n const config = require('../config');\n\n this.uuid = context.content.uuid;\n this.document = context.content;\n\n ...
javascript
edit
0
3
mit
fc3b88fa553627e3ef697a9058e474092a3b8de1
ScalaInc/exp-js-sdk,ScalaInc/exp-js-sdk
src/models/ContentNode.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport {\n applyMiddleware,\n combineReducers,\n createStore,\n} from 'redux';\nimport thunk from 'redux-thunk';\nimport enhancer from './storeEnhancer';\nimport { composeWithDevTools } from 'redux-devtools-extension';\n\nexport defa...
javascript
edit
0
2
mit
37905608230e85a0c6c38a9f1b5cdb0efcdf9cbe
traveloka/soya-next
src/redux/configureStore.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\n/**\n * @ngdoc directive\n * @name angular-uploadcare.directive:UploadCare\n * @description Provides a directive for the Uploadcare widget.\n * # UploadCare\n */\nangular.module('ng-uploadcare', [])\n .directive('uploa...
javascript
edit
0
2
mit
c048f4651723366e7b163c8335567feedc2362a9
uploadcare/angular-uploadcare
angular-uploadcare.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar assertionsModifier = require('../src/modifiers/assertions');\nvar testsModifier = require('../src/modifiers/tests');\nvar assert = require('assert');\nvar fs = require('fs');\nvar noOfData = 2;\n\nvar oneToTenArray = [];\nfor(var i ...
javascript
edit
0
2
mit
ded9826dfdfadf6e8250838fd75b1312d54c5e95
apsdehal/qunit-migrate
tests/main.js
rejected_duplicate
Near-duplicate of sample 88498
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport FormControlsAbstractSelectComponent from './abstract-select';\nimport { action } from '@ember/object';\nimport { arg } from 'ember-arg-types';\nimport { string, bool } from 'prop-types';\nimport { get } from '@ember/object';\nimp...
javascript
edit
0
2
mit
cee78b01d6e25bfea716aedc3312308992c18159
Foodee/ember-foxy-forms,Foodee/ember-foxy-forms
addon/components/form-controls/ff-checkbox-select.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport {\n parse,\n visit,\n visitWithTypeInfo,\n TypeInfo\n} from 'graphql';\n\nexport default function parseQueryDocument(queryDocument, schema) {\n const typeInfo = new TypeInfo(schema);\n\n const ast = parse(queryDocument);\n\...
javascript
edit
0
4
mit
75fd5af85c4c4bea520215f356f1db894632479e
itajaja/apollo-codegen,KieranLafferty/apollo-codegen,KieranLafferty/apollo-codegen
src/parseQueryDocument.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nexport default {\n\tfetch(url) {\n\t\treturn fetch(url, {\n\t\t\theaders: {\n\t\t\t\taccept: \"application/json\",\n\t\t\t\tauthorization: \"Basic \" + btoa(\"nick:Nicholson\")\n\t\t\t}\n\t\t}).then(response => response.json())\n\t\t ....
javascript
edit
0
1
mit
ebaef33953a98ed01d2c95a2171f7439ea5619f5
NCI-Agency/anet,NCI-Agency/anet,NCI-Agency/anet,NCI-Agency/anet,NCI-Agency/anet
client/src/api.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar CURRENT_USER = {}\n\nvar CHAT_CHANNEL = \"global\";\nlocation.search.slice(1).split(\"&\").forEach(function(item){\n var param = item.split(\"=\")[0];\n if (param == \"name\" || param == \"uid\") {\n CURRENT_USER[param]...
javascript
edit
0
4
bsd-3-clause
f3827910de0ed576b570eddbf00f3d17d0941510
EteRNAgame/HTML-Chat,EteRNAgame/HTML-Chat
src/js/define-user.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport ButtonView from './button_view'\nimport React from 'react'\nimport classnames from 'classnames'\nimport styles from '../../assets/stylesheets/styles.scss'\n\nexport default class GameOverView extends React.PureComponent {\n rend...
javascript
edit
0
1
mit
3c3cefeeb0c72aa96d7f1166dbbd9f6e05244e11
nullobject/hexgrid,nullobject/hexgrid
src/views/game_over_view.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport strings from \"../locales/locales\";\n\n/**\n * Returns localized strings based on 'locale' setting\n */\nexport function localizeStrings(state, props) {\n var lang = state.settings.locale || \"en\";\n strings.setLanguage(lang)...
javascript
edit
0
3
mit
8f702040721a8700ddb5983a403159c65adda078
atomicjolt/OpenAssessmentsClient,atomicjolt/open_assessments,atomicjolt/open_assessments,atomicjolt/OpenAssessmentsClient,atomicjolt/open_assessments,atomicjolt/OpenAssessmentsClient
client/js/selectors/localize.js
accepted
null
true
[ { "role": "user", "content": "Write javascript code for the following: Add start function and random math function" }, { "role": "assistant", "content": "\n$( document ).ready(function() {\n console.log( \"document loaded\" );\n\nstartgame();\n//addactiveclass();\n});\n\n\n\nfunction startgam...
javascript
new_file
0
5
mit
4fb1a33e37424a24ee869027202b1d06baaedc67
onnia/mobile-programming,onnia/mobile-programming
custom.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nPackage.describe({\n summary: 'JS simulation of MongoDB ObjectIDs',\n version: '1.0.7',\n documentation: null\n});\n\nPackage.onUse(function (api) {\n api.export('MongoID');\n api.use(['ejson', 'id-map', 'random', 'ecmascript']);\n...
javascript
edit
0
1
mit
d3291bfe020c627aa1e12310d3fe4b97a8efd82b
Hansoft/meteor,Hansoft/meteor,Hansoft/meteor,Hansoft/meteor,Hansoft/meteor,Hansoft/meteor,Hansoft/meteor
packages/mongo-id/package.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar RippleAddress = require('../models/ripple_address');\n\nfunction respondToValidationErrors(req, res) {\n\tvar errors = req.validationErrors();\n\tif (errors) {\n\t\tres.end({ error: util.inspect(errors) }, 400)\n\t\treturn;\n\t}\n}\...
javascript
edit
0
3
isc
801a245e1469c44218b437a97de9a80968ebbc7d
Parkjeahwan/awegeeks,crazyquark/gatewayd,xdv/gatewayd,xdv/gatewayd,crazyquark/gatewayd,whotooktwarden/gatewayd,whotooktwarden/gatewayd,zealord/gatewayd,Parkjeahwan/awegeeks,zealord/gatewayd
app/controllers/ripple_addresses.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar Game = Game || {};\n\n\nGame.SnakeGame = function(width, height, options) {\n 'use strict';\n this.width = width;\n this.height = height;\n this.blockWidth = options.blockWidth || 20;\n this.blockHeight = options.blockHeight ||...
javascript
edit
0
3
mit
48b2cddee063bb224bb0a4776cadcd3406215d2c
msanatan/snake,msanatan/snake,msanatan/snake
javascripts/Snake.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// @flow\nimport Box from './box'\nimport React from 'react'\nimport {FlatButton} from 'material-ui'\n\nimport type {Props} from './clickable-box'\n\nconst ClickableBox = (props: Props & {children: any}) => {\n const {style, children, ...
javascript
edit
null
null
bsd-3-clause
426f3b91fe86b49ed99a05c2cb2454d27525cf91
keybase/client,keybase/client,keybase/client,keybase/client,keybase/client,keybase/client,keybase/client,keybase/client,keybase/client,keybase/client,keybase/client,keybase/client
shared/common-adapters/clickable-box.desktop.js
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\"use strict\";\n\ndefine([\"create-react-class\", \"prop-types\", \"react-dom-factories\"],\n function(createReactClass, PropTypes, DOM)\n {\n var AgentLabel = createReactClass(\n {\n render: function()\n ...
javascript
edit
0
1
mit
95da12f4189b25596356fe3ca8f4a55ac2620e4b
jmthompson2015/lotr-card-game,jmthompson2015/lotr-card-game,jmthompson2015/lotr-card-game
src/view/js/AgentLabel.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst DocumentedItem = require('./item');\n\nclass DocumentedVarType extends DocumentedItem {\n\tregisterMetaInfo(data) {\n\t\tthis.directData = data;\n\t}\n\n\tserialize() {\n\t\tconst names = [];\n\t\tfor(const name of this.directData...
javascript
edit
0
2
apache-2.0
f83f93d6d542e2462584925c92834987aabac7c7
hydrabolt/discord.js-docgen
src/types/var-type.js
rejected_duplicate
Near-duplicate of sample 74165
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use babel'\n\nimport Path from 'path'\nimport Less from 'less'\n\nexport const minifier = false\nexport const compiler = true\nexport function process(contents, {relativePath, absolutePath}, {state, config}) {\n state.ext = 'css'\n r...
javascript
edit
0
1
mit
7aea51cee9014e9eede486e6f2e3a04071567033
steelbrain/ucompiler-plugin-less
src/main.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * Module dependencies.\n */\n\nvar Promise = require('bluebird');\nvar yaml = require('js-yaml');\nvar _ = require('lodash');\nvar path = require('path');\nvar logger = require('winston');\nvar fs = Promise.promi...
javascript
edit
0
5
mit
5a4751a80b0ce6c3cb07d1bbf9000973372b59e3
frctl/fractal,frctl/fractal
src/data.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport { Query } from 'react-apollo';\n\nimport newChannelGroupsQuery from 'react/components/NewChannelForm/components/NewChannelGroups/queries/newChannelGr...
javascript
edit
0
3
mit
925881dfa403f5146f9931dbe05de28570b6eaf8
aredotna/ervell,aredotna/ervell,aredotna/ervell,aredotna/ervell,aredotna/ervell
react/components/NewChannelForm/components/NewChannelGroups/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\nvar test = require('tap').test\nvar util = require('util')\nvar fs = require('fs')\n\n// mock fs.statSync to return signed uids/gids\nvar realStatSync = fs.statSync\nfs.statSync = function(path) {\n var stats = realStatS...
javascript
edit
0
2
isc
7311ee26993a32186100c205b8802f0cc8e54420
isaacs/node-graceful-fs,isaacs/node-graceful-fs
test/stats-uid-gid.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst userAgent = navigator.userAgent.toLowerCase()\nconst event = userAgent.match(/(iphone|ipod|ipad)/) ? 'touchstart' : 'click'\n\nconst directive = {\n instances: []\n}\n\ndirective.onEvent = function (event) {\n directive.instance...
javascript
edit
0
4
mit
aae1d0f4ce73117b3c397c5daa17bbf27719d09a
ndelvalle/v-click-outside,ndelvalle/v-click-outside
lib/v-click-outside.js
rejected_duplicate
Near-duplicate of sample 72022
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\ndefaultConf = {\n height: 100,\n width: 300,\n fingerprintLength: 4\n};\n\ndescribe(\"The constructor is supposed a proper Captcha object\", function() {\n it('Constructor Captcha exists', function(){\n expect(Captcha...
javascript
edit
0
1
mit
e11a8ae165b0c62fafb32af22df76ba915a051b9
sonjahohlfeld/Captcha-Generator,sonjahohlfeld/Captcha-Generator
test/spec/test_captcha.js
rejected_duplicate
Near-duplicate of sample 77043
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\ndescribe('Testing the first D3.js function drawKaryo', function() {\n var c;\n\n beforeEach(function() {\n c = drawKaryo();\n c.render();\n });\n\n afterEach(function() {\n d3.selectAll('svg').remove();\n });\n\n describe...
javascript
edit
0
1
mit
d89c3227dcb83729b3fae5ef7cb9ac016ee09b11
BioInf-Wuerzburg/AliTV,BioInf-Wuerzburg/AliTV,BioInf-Wuerzburg/AliTV,BioInf-Wuerzburg/AliTV,BioInf-Wuerzburg/AliTV,AliTVTeam/AliTV,AliTVTeam/AliTV,BioInf-Wuerzburg/AliTV
wgaPipeline_jasmine/spec/testing_svgElements.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport tabsWithCards from \"./tabs-with-cards.js\";\nimport bookmarkButtons from \"./bookmark-buttons.js\";\nimport lazyLoadImages from \"./lazy-load-images.js\";\n\ndocument.addEventListener(\"DOMContentLoaded\", () => {\n tabsWithCar...
javascript
edit
0
1
mit
a6aa6727180609029fc49f9643ea8c3ab25ab8a2
participedia/api,participedia/api,participedia/api,participedia/api
public/js/collection-view.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar numRows = 4\nvar numCols = 4\n\nvar matrix = [\n [false, false, false, false],\n [false, false, false, false],\n [false, false, false, false],\n [false, false, false, false]\n]\n\nfunction getLightId(row, col) {\n ret...
javascript
edit
0
2
unlicense
23266bca70a1afdf71a0be046551f93729cc1350
mikegagnon/lights-out,mikegagnon/lights-out
challenge02/lights-out.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n#!/usr/bin/env node\n\":\" //# why? http://sambal.org/?p=1014 ; exec /usr/bin/env node --harmony \"$0\" \"$@\"\n\n'use strict';\n\nvar packageJson = require('./package.json'),\n adventure = require('adventure');\n\nvar shop = adventu...
javascript
edit
0
1
isc
609908f1181b416f8004c186e1b4a883fd5a9115
aijiekj/scope-chains-closures,Dannnno/scope-chains-closures,jesstelford/scope-chains-closures,SomeoneWeird/scope-chains-closures,martinheidegger/scope-chains-closures,guofoo/scope-chains-closures
runner.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar _ = require('lodash'),\n express = require('express'),\n STATIC_CACHE_AGE = 365 * 24 * 60 * 60 * 1000; // 1 year;\n\nmodule.exports = function configureServer(config, app) {\n var app = app || express();\n\n function serveIn...
javascript
edit
0
4
bsd-2-clause
6cafef547e895c6aabdad386ca5a156b2fe9f2b6
imgix/web-tools
tools/servers/server.spa.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function() {\n 'use strict';\n\n var oldLog = console.log;\n console.log = function (message) {\n var body = document.querySelector(\"body\");\n var p = document.createElement(\"p\");\n p.textContent = (me...
javascript
edit
0
4
mit
64bac9ea46d69de0506eae079c778c0f67263a21
razvan-tache/js-training-tremend,razvan-tache/js-training-tremend
Playground/scripts/core.js
rejected_duplicate
Near-duplicate of sample 87708
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\ndefine(['jquery'], function($){\n \"use strict\";\n\n /**\n * Initializer\n * @param url\n */\n function init(url) {\n $('#connector_data_mapping_dynamic_datafield_datafield_button').click(function () {\n ...
javascript
edit
0
4
mit
231ce91831171e845293b5a230a5bb7bdbbbe46a
adeelq/dotmailer-magento2-extension,adeelq/dotmailer-magento2-extension,cdiacon/dotmailer-magento2-extension,dotmailer/dotmailer-magento2-extension,cdiacon/dotmailer-magento2-extension,dotmailer/dotmailer-magento2-extension,cdiacon/dotmailer-magento2-extension,adeelq/dotmailer-magento2-extension,dotmailer/dotmailer-mag...
view/adminhtml/web/js/dataFields.js
accepted
null
true