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\n'use strict';\n\nangular.module('gc.ngHttpGetParamInterceptor', [\n 'gc.utils'\n]).factory('httpGetParamInterceptor', [\n 'utils',\n function httpGetParamInterceptor(utils) {\n return {\n request: function(config) {\n ...
javascript
edit
0
3
mit
cb839f6dd5000d1acfb62332344cf4d36e4df676
gocardless-ng/ng-gc-base-app-service
config/http-get-param-interceptor.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport * as React from \"react\";\nimport {BuildSnapshot} from \"./BuildSnapshot\";\n\n/**\n * Container Component for BuildSnapshots.\n * \n * @param {*} props input property containing an array of build data to be\n * rendered through...
javascript
edit
0
2
apache-2.0
d804e831b659c5ad23b398df1f7d9198026d32d6
googleinterns/step240-2020,googleinterns/step240-2020,googleinterns/step240-2020,googleinterns/step240-2020
src/main/webapp/components/BuildSnapshotContainer.js
rejected_duplicate
Near-duplicate of sample 88051
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react'\nimport {Link} from 'react-router-dom'\n\nfunction setArticleUrl(title) {\n var sanitizedTitle = title.replace(/%/g, \"[percent]\")\n debugger\n return encodeURIComponent(sanitizedTitle)\n}\n\nconst ArticleC...
javascript
edit
0
1
mit
a40f8e8464462e96cf78314098122bef99b2479f
kevinladkins/newsfeed,kevinladkins/newsfeed,kevinladkins/newsfeed
client/src/components/ArticleCard.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\"use strict\";\n\nvar exampleTests = require('../example-tests');\n\nfunction Controls(mochaRunner) {\n this._mochaRunner = mochaRunner;\n}\n\nControls.prototype = {\n connectButtons: function(passingButtonId, failingButtonId, manyBu...
javascript
edit
0
1
mit
08b96b29e385b58fb09e8c5bc197c17492f1c9d4
tddbin/tddbin-frontend,tddbin/tddbin-frontend,tddbin/tddbin-frontend
examples/test-runner/mocha-controls.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React, { useEffect, useState } from 'react';\nimport { OpenfinApiHelpers } from 'stockflux-core';\nimport Components from 'stockflux-components';\nimport './AppShortcuts.css';\n\nexport default () => {\n const [apps, setApps] = ...
javascript
edit
0
2
mit
bb0c2f4f9f7a227820308f0802c062520b0f6a00
owennw/OpenFinD3FC,owennw/OpenFinD3FC,ScottLogic/bitflux-openfin,ScottLogic/StockFlux,ScottLogic/StockFlux,ScottLogic/bitflux-openfin
stockflux-launcher/src/app-shortcuts/AppShortcuts.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*\n * grunt-autoprefixer\n * \n *\n * Copyright (c) 2013 Dmitry Nikitenko\n * Licensed under the MIT license.\n */\n\n'use strict';\n\nmodule.exports = function (grunt) {\n\n var autoprefixer = require('autoprefixer');\n\n grunt....
javascript
edit
0
2
mit
ee12708d43ff22bc9d9c9ea5a36011ee66fdd69a
nqdy666/grunt-autoprefixer,nDmitry/grunt-autoprefixer,yuhualingfeng/grunt-autoprefixer
tasks/autoprefixer.js
rejected_duplicate
Near-duplicate of sample 77284
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport ReactDOM from 'react-dom';\n\nconst ItemTarget = {\n hover(props, monitor, component) {\n const dragIndex = monitor.getItem().index;\n const hoverIndex = props.index;\n\n // Don't replace ite...
javascript
edit
0
6
apache-2.0
0369aa8e1381c1d98f7049268f6275342017b9e0
Sage/carbon,Sage/carbon,Sage/carbon
src/components/with-drag-and-drop/item-target/item-target.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React, { Component } from 'react';\n\nimport { Route, BrowserRouter as Router } from 'react-router-dom';\n\nimport MuiThemeProvider from 'material-ui/styles/MuiThemeProvider';\nimport getMuiTheme from 'material-ui/styles/getMuiTh...
javascript
edit
0
1
mit
a5440e93f7550b2c107ffbf831a616938d90cbe7
mkermani144/wanna,mkermani144/wanna
desktop/reactified/client/src/App.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport CartBlogEditorCtrl from './base/cart-blog-editor.js';\n\nclass CartBlogCreateCtrl extends CartBlogEditorCtrl {\n constructor(...args) {\n super(...args);\n this.logInit('CartBlogCreateCtrl');\n\n this.init();\n }\n\n ...
javascript
edit
0
2
mit
7e019de783a757fdeb5fc5babb05b297defb6b46
agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart
src/client/es6/controller/cart-blog-create.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar baseUrl = process.env.BASE_URI || \"localdocker:4000\";\n\nmodule.exports = {\n approveFeed: function(message, recipient, group) {\n return \"<p>\" + message[\"user\"][\"userName\"] + \" has approved the feed for their \" + mess...
javascript
edit
0
1
bsd-3-clause
e6fd0e7eb621d549d231b9435ed3f7974f368f10
votinginfoproject/Metis,votinginfoproject/Metis,votinginfoproject/Metis
notifications/content.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nlet telegram = require( './telegram.js' );\nlet urlchecker = require( './urlchecker.js' );\nlet github = require( './github.js' );\nlet rss = require( './rss.js' );\nlet dagensmix = require( './dagensmix.js' );\nlet pus...
javascript
edit
0
0
mit
7645de616768d37c3589609d347e1566be48634a
kokarn/KokBot
plugins/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nangular.module('konehuone.competitionInfos')\n\n.controller('CompetitionInfosCtrl', function ($scope, lodash, apiService) {\n var _ = lodash;\n\n // # Variables\n $scope.uiClosed = {\n jj1: true,\n ...
javascript
edit
0
1
mit
d14f4976cba654e91753d4f290c339fd11891c88
miro/konehuone,miro/konehuone
frontend/common/directives/competition-infos/competitionInfos.controller.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nPackage.describe({\n summary: \"Ravelry OAuth flow\",\n name: \"amschrader:ravelry\",\n git: \"<EMAIL>:amschrader/meteor-ravelry.git\",\n version: \"0.1.0\"\n});\n\nPackage.onTest(function(api) {\n api.use('tinytest');\n api.use('...
javascript
edit
0
2
mit
b2e9a173ccf695fceed5a2689e0b7dfce4d5f810
amschrader/meteor-ravelry
package.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n$(\".up-button\").mousedown(function(){\n $.get(\"/movecam/moveUp\");\n}).mouseup(function(){\n $.get(\"/movecam/moveStop\");\n});\n\n$(\".left-button\").mousedown(function(){\n $.get(\"/movecam/moveLeft\");\n}).mouseup(function(){\n...
javascript
edit
0
1
mit
0ff964092fda25483633ce0fd4494b1bdf0858b0
qrila/khvidcontrol,qrila/khvidcontrol
public/js/app.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar assert = require('nanoassert')\nvar randombytes = (function () {\n var QUOTA = 65536 // limit for QuotaExceededException\n var crypto = typeof window !== 'undefined' ? (window.crypto || window.msCrypto) : null\n\n function window...
javascript
edit
0
7
mit
f336097b6a75ac819d934dbc0db0f6901c4ad464
sodium-friends/sodium-javascript
randombytes.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 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
042737ff4aad71ec237b8565e59a1fb988c1b7f3
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/random/base/improved-ziggurat/lib/ratio_array.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*\n* Title module displaying title tag based on current view\n*/\nvar EngineJS_titleManager = {\n content: {},\n titleDefault: \"\",\n titleSuffix: \"\",\n init: function(content, titleDefault, titleSuffix) {\n this.c...
javascript
edit
0
1
mit
446458ad0ea88c40f6b0ebffe083c509a4fddb0c
enginejs/libs
resources/titleManager.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = {\n validateAnchorText: validateAnchorText,\n click: click,\n};\n\n/**\n *\n * @param {WebdriverIO} browser Instance of web driver\n * @param {String} anchorText The anchor text to target by\n */\nfunction click (...
javascript
edit
0
2
mit
56e32f674d211ab1d94afd97660c0c28a82a621f
sudokrew/krewcumber,sudokrew/krewcumber
step_definitions/lib/navigation/link/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * Created by curtis on 3/28/16.\n */\nangular.module('clusterApp', [])\n .controller('MainCtrl', [\n '$scope',\n '$http',\n function($scope, $http) {\n var completed = 0,\n timesTo...
javascript
edit
0
2
mit
2d311ac85665a5edef7a4aab7c8efaac43426201
chocklymon/CS360,chocklymon/CS360,chocklymon/CS360,chocklymon/CS360
lab10/public/js/l10.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nclass GetCharityData {\n\tgetData(){\n\t\tvar CHARITY_DATA = [\n\t\t\t{amount: '41,234', month: 'January', year: '2015', name: 'Charity:Water', description: 'Cool description that was so hard to come up with. Hence I ended up writing so...
javascript
edit
0
2
mit
1890cfca8065635ced6755524d468614dead23f5
multunus/moveit-mobile,multunus/moveit-mobile,multunus/moveit-mobile
src/services/GetCharityData.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Dispatcher from \"dispatchers/Dispatcher\";\nimport BaseStore from \"stores/BaseStore\";\nimport HelpLinkCollection from \"collections/HelpLinkCollection\";\n\nvar HelpLinkStore = BaseStore.extend({\n collection: HelpLinkColle...
javascript
edit
0
4
apache-2.0
9960f49700f7793c93295240481ef1fcb7080a93
CCI-MOC/GUI-Frontend,CCI-MOC/GUI-Frontend,CCI-MOC/GUI-Frontend,CCI-MOC/GUI-Frontend,CCI-MOC/GUI-Frontend
troposphere/static/js/stores/HelpLinkStore.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst session = require('express-session');\nconst RedisStore = require('connect-redis')(session);\nconst redisClient = require('redis').createClient();\n\nmodule.exports.verify = (req, res, next) => {\n if (req.isAuthenticated()) {\n ...
javascript
edit
0
2
mit
74aa179b5e16f5456a7529326820aba1a97bbb1e
FuriousFridges/FuriousFridges,FuriousFridges/FuriousFridges
server/middleware/auth.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar EventEmitter = require('events').EventEmitter;\nvar AbstractTransport = require('./abstract_transport.js');\nvar NetTransport = require('./net_transport.js');\nvar TlsTransport = require('./tls_transport.js');\n\nfu...
javascript
edit
0
5
mit
77cd76c4e97c2cdc895e0fba1f1207f4c6c7623d
noodlefrenzy/node-amqp10
lib/transport/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n//Client-side JS goes here.\n(function () {\n var locale = APP.intl.locale,\n baseUrl = 'http://yui.yahooapis.com/combo?platform/intl/0.1.2/Intl.min.js&platform/intl/0.1.2/locale-data/jsonp/',\n comboUrl = baseUrl + local...
javascript
edit
0
1
bsd-3-clause
d34142022ccee2c72cf99430bba1ad3446061294
okuryu/formatjs-site,ericf/formatjs-site,ericf/formatjs-site
public/js/script.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nexport default ['config', 'Core', function (config, Core) {\n return {\n template: require('components/layout/partials/panel-header.directive.html'),\n transclude: {\n 'extraButtons': '?extraButtons',\n ...
javascript
edit
0
1
mit
53db1031477a5f159feeb90dfb30a51a83093840
hslayers/hslayers-ng,hslayers/hslayers-ng,hslayers/hslayers-ng,hslayers/hslayers-ng
components/layout/layout-panel-header.directive.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * Adds CORS headers to the response\n *\n * ####Example:\n *\n * app.all('/api*', keystone.middleware.cors);\n *\n * @param {app.request} req\n * @param {app.response} res\n * @param {function} next\n * @api public\n */\n\n// ...
javascript
edit
0
7
mit
11ac49efd1ad1906599fb0218428cadc72fff212
concoursbyappointment/keystoneRedux,brianjd/keystone,benkroeger/keystone,frontyard/keystone,michaelerobertsjr/keystone,frontyard/keystone,trentmillar/keystone,Yaska/keystone,andrewlinfoot/keystone,andrewlinfoot/keystone,joerter/keystone,cermati/keystone,snowkeeper/keystone,rafmsou/keystone,trentmillar/keystone,ratecity...
lib/middleware/cors.js
rejected_duplicate
Near-duplicate of sample 89164
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nfunction skipSpace(string) {\n let toRemove = string.match(/^(?:\\s|#.*)*/);\n return string.slice(toRemove[0].length);\n}\n\n```\n\nApply this change: Add chapter 12, exercise 3" }, { "role": "assistant", "content": "...
javascript
edit
0
1
mit
f60c3859905ed939366800d3adf71ec7e1da3a4b
bewuethr/ctci
eloquent_js/chapter12/ch12_ex03.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = function geoip (ip) {\n return (state, emitter) => {\n state.geoip = {\n ip: ip,\n isLoading: false\n }\n\n emitter.on('geoip:fetch', () => {\n if (state.geoip.isLoading) return\n state.geo...
javascript
edit
0
3
apache-2.0
0393c02cf549c8ee3bc09278153208702ec2b25a
CIVIS-project/BRFApp
lib/app/store/geoip.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*\n * Copyright 2015-2016 Red Hat, Inc. and/or its affiliates\n * and other contributors as indicated by the @author tags.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except i...
javascript
edit
0
1
apache-2.0
84e900f20bc6738ca5f71d9346254a5f8322f5eb
hawkular/hawkular-apm-opentracing-javascript
examples/node-browser/tracer-init.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = function () {\n\n this.string('name', {\n required: true,\n minLength: 5\n });\n\n this.string('title', {\n required: true,\n minLength: 5\n });\n\n this.string('content');\n\n this.timestamps();\n\n ...
javascript
edit
0
2
mit
32912d1ef7ede8ffc7722a15fa7eeba0751319a0
pksunkara/bullet
example/app/models/post.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// extensions initialisation\n\nimport {registerComponents} from '../common/module-utils';\nimport {dynamicSections, dynamicSectionsByKind} from \"../dynamic-section/dynamic-section-definitions\";\n\nimport dbChangeInitiativeBrowser fro...
javascript
edit
0
2
apache-2.0
92254b47944a101e37444aa4aea7f2ddb840cf38
davidwatkins73/waltz-dev,kamransaleem/waltz,khartec/waltz,rovats/waltz,rovats/waltz,rovats/waltz,khartec/waltz,kamransaleem/waltz,khartec/waltz,rovats/waltz,davidwatkins73/waltz-dev,kamransaleem/waltz,kamransaleem/waltz,khartec/waltz,davidwatkins73/waltz-dev,davidwatkins73/waltz-dev
waltz-ng/client/extensions/extensions.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar common = require(\"./common\")\n , odbc = require(\"../\")\n , db = new odbc.Database()\n , assert = require(\"assert\")\n , util = require('util')\n , count = 0\n ;\n \nvar sql = (common.dialect == 'sqlite' || common.dialect ...
javascript
edit
0
3
mit
f98cf367c1d9fa9ca2516ab0d2dead2b80f7848a
jbaxter0810/node-odbc,gmahomarf/node-odbc,dfbaskin/node-odbc,bzuillsmith/node-odbc,Papercloud/node-odbc,bustta/node-odbc,gmahomarf/node-odbc,Papercloud/node-odbc,bzuillsmith/node-odbc,wankdanker/node-odbc,wankdanker/node-odbc,jbaxter0810/node-odbc,gmahomarf/node-odbc,dfbaskin/node-odbc,bustta/node-odbc,Papercloud/node-...
test/test-issue-85.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*global BackboneWizard, Backbone*/\n\nBackboneWizard.Routers = BackboneWizard.Routers || {};\n\n(function () {\n 'use strict';\n\n BackboneWizard.Routers.WizardRouter = Backbone.Router.extend({\n routes: {\n '':...
javascript
edit
0
1
mit
8a779ce56482ab429172aa05c49d36d500bfea16
jonkemp/wizard-mvc
public/backbone-marionette/js/router.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar HDO = HDO || {};\n\n(function (H, $) {\n H.representativeSelector = {\n init: function (opts) {\n var districtSelect, representativeSelect, representatives, selectedRepresentatives;\n\n districtSelect = opts.dist...
javascript
edit
0
2
bsd-3-clause
8ca18ff251f2f44b93ebb9050931c542628fc8d1
holderdeord/hdo-site,holderdeord/hdo-site,holderdeord/hdo-site,holderdeord/hdo-site
app/assets/javascripts/representativeSelector.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport isEmpty from 'lodash/isEmpty';\nimport SingleUnitOnMap from './SingleUnitOnMap';\nimport {sortByCondition} from '../helpers';\n\nexport const UnitsOnMap = ({units, selectedUnitId, openUnit}) => {\n le...
javascript
edit
0
3
mit
1649c411366e12bc338b3486b82b0d109f97d6f0
nordsoftware/outdoors-sports-map,nordsoftware/outdoors-sports-map,nordsoftware/outdoors-sports-map
src/modules/unit/components/UnitsOnMap.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\nimport moment from 'moment';\n\nimport { Paginator } from '@/lib/pagination';\nimport template from './outdated-queries.html';\n\nfunction OutdatedQueriesCtrl($scope, $http, $timeout) {\n $scope.autoUpdate = true;\n\n this.queries =...
javascript
edit
0
2
bsd-2-clause
c553b7303421701a87f84d506643e88dafab7798
moritz9/redash,moritz9/redash,moritz9/redash,moritz9/redash
client/app/pages/admin/outdated-queries/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport Accordion from 'react-bootstrap/Accordion';\nimport Card from 'react-bootstrap/Card';\nimport Activity from './activity';\nimport * as activityFns from './activityfns';\nimport * as utils from '../Util...
javascript
edit
0
1
apache-2.0
728693fbf3fbad513fec2d1bee6aeabe4e5caf91
googleinterns/SLURP,googleinterns/SLURP,googleinterns/SLURP
frontend/src/components/ViewActivities/activityday.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar program = require('commander');\nvar pkg = require('../package.json');\n\nprogram\n .version(pkg.version)\n .description('Gitter bot for evaluating expressions')\n .usage('<room-name>')\n .parse(process.argv);\n\nif (!program.ar...
javascript
edit
0
0
mit
764061b8b87ff137633089f17f14e954f995cd8d
ghaiklor/uwcua-vii
bin/cli.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar copy = require('es5-ext/object/copy')\n , map = require('es5-ext/object/map')\n , callable = require('es5-ext/object/valid-callable')\n , validValue = require('es5-ext/object/valid-value')\n\n , b...
javascript
edit
0
3
isc
d6090f49d653d76a65696e3c5fe8417c673c398a
medikoo/d
auto-bind.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar program = require('commander');\n\nprogram\n .description('Generate random documents, numbers, names, address, etc.')\n .version('0.0.1')\n .option('-f, --cpf', 'Select CPF')\n .option('-j, --cnpj', 'Select CNPJ')\n ....
javascript
edit
0
0
mit
d769d4b6df913d6b4e32e1e4b44d4f69d9f926ca
lvendrame/dev-util-cli,lagden/dev-util-cli
bin/cli.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar express = require('express'),\n app = express(),\n kaching = require('kaching');\n\napp.set('views', __dirname);\napp.set('view engine', 'jade');\n\napp.use(express.logger('dev'));\napp.use(express.bodyParser());\napp.use(expr...
javascript
edit
0
1
mit
79e5bd95684823ee41af1d35474cb29a627328d2
gregwym/kaching
example/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n//@flow\n\nexport function baseAdjust(n: number): string {\n return `\n padding-top: calc(${n}em / 16) !important;\n margin-bottom: calc(-${n}em / 16) !important;\n `;\n}\n\n```\n\nApply this change: Edit baseAdjust to ()=...
javascript
edit
null
null
mit
96e2badfc4d6a3bbdabe220cdbb6dd3851a6b6fc
slightly-askew/portfolio-2017,slightly-askew/portfolio-2017
src/global/style/utils.js
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar path = require('path');\nvar fs = require('fs');\n\nglobal.adapter = require('./adapter-a');\n\ndescribe('promises-tests', function () {\n var testsDir = path.join(path.dirname(require.resolve('promises-aplus-tests/lib/programmatic...
javascript
edit
0
0
mit
8102b934e3aa9386d2dd68acb7cb5985c68684b8
nodegit/promise,slang800/promise,then/promise,vigetlabs/promise,taylorhakes/promise,JoshuaWise/jellypromise,implausible/promise,ljharb/promise,npmcomponent/then-promise,astorije/promise,Bacra/promise,cpojer/promise
test/promises-tests.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst Debug = require('debug')('iot-home:server:hue')\n\nvar HueServer = {}\n\nfunction HueRoutes (server, middleware) {\n server.get('/hue/bridges', middleware.findBridge)\n server.get('/hue/lights', middleware.findAllLights)\n serv...
javascript
edit
0
1
mit
9e4798c05b4b8bbb90b448121e606263afe1aced
harlanj/iot-home,theworkflow/iot-home
server/hueRoutes.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar path = require('path');\n\nmodule.exports = {\n entry: path.resolve(__dirname, 'lib', 'client.js'),\n output: {\n filename: 'app.js',\n path: path.resolve(__dirname, 'lib'),\n },\n};\n\n```\n\nApply this chang...
javascript
edit
0
0
bsd-2-clause
ec3d29cdb3231abc1bed89d5fc5a02f29addb392
AndriyShepitsen/react-relay-cbi,denvned/isomorphic-relay-router
examples/todo/webpack.config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nHB.SignInRoute = Ember.Route.extend({\n beforeModel: function() {\n if (this.get('currentUser.isSignedIn')) {\n this.transitionTo('dashboard');\n }\n }\n});\n\n```\n\nApply this change: Reset login form on setupController" ...
javascript
edit
0
2
apache-2.0
d6e9f814bde9c63af95ec9220c768ab477b2dc5a
saintsantos/hummingbird,MiLk/hummingbird,sidaga/hummingbird,jcoady9/hummingbird,sidaga/hummingbird,wlads/hummingbird,jcoady9/hummingbird,erengy/hummingbird,erengy/hummingbird,synthtech/hummingbird,hummingbird-me/hummingbird,vevix/hummingbird,MiLk/hummingbird,Snitzle/hummingbird,saintsantos/hummingbird,paladique/humming...
app/assets/javascripts/routes/sign_in_route.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n$(document).ready(function() {\n init();\n $.ajaxSetup({\n crossDomain: false, // obviates need for sameOrigin test\n beforeSend: function(xhr, settings) {\n if (!csrfSafeMethod(settings.type)) {\n xhr.setRequestHead...
javascript
edit
0
5
mit
9186287a7e1881eb051fada1d782e4118804c2af
initrc/simpy,initrc/simpy
simpyapp/static/sim.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react';\n\nimport BrowserWarning from './BrowserWarning';\nimport { shallowWithIntl } from 'utils/testUtils';\n\ndescribe('pages/browser-warning/BrowserWarning', () => {\n function getWrapper() {\n return shallowW...
javascript
edit
0
1
mit
b5e62cd5dfaef3a3c9266e1ce6581830957c60dd
fastmonkeys/respa-ui
app/pages/browser-warning/BrowserWarning.spec.js
rejected_duplicate
Near-duplicate of sample 76362
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Ember from 'ember';\n\nexport function initialize(instance) {\n const config = instance.container.lookupFactory('config:environment');\n\n // Default to true when not set\n let _includeRouteName = true;\n if (config['ember-bo...
javascript
edit
0
4
mit
b9805279764f6fa4c3a50a4e3b9dbca7a40156c0
AddJam/ember-body-class,AddJam/ember-body-class
addon/instance-initializers/body-class.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst path = require('path');\n\nconst babelOptions = {\n presets: ['es2015', 'stage-0'],\n plugins: ['transform-decorators-legacy', 'transform-runtime']\n};\n\nexports.module = function runModule(modulePath) {\n /* eslint-disable li...
javascript
edit
0
2
mit
5305aea90d10ba8c89422ccae0d75a8b22baa806
vinsonchuong/dist-es6
src/lib/run.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\nvar React = require('react');\nvar Sortable = require('../views/Sortable');\nvar {deepPureRenderMixin} = require('../react-utils');\n\n// We skip the first column to keep 'samples' on the left.\nfunction makeSortable(Comp...
javascript
edit
0
1
apache-2.0
b6d910a90dfec796752c91b21014073f02618b01
ucscXena/ucsc-xena-client,acthp/ucsc-xena-client,ucscXena/ucsc-xena-client,ucscXena/ucsc-xena-client,acthp/ucsc-xena-client,ucscXena/ucsc-xena-client,acthp/ucsc-xena-client,ucscXena/ucsc-xena-client
js/containers/makeSortable.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*jshint node:true*/\nmodule.exports = {\n description: 'install the addon'// ,\n\n // locals: function(options) {\n // // Return custom template variables here.\n // return {\n // foo: options.entity.options.foo\n // };...
javascript
edit
0
1
mit
0813ec552b2bbf3e3b781b0a4ccb81d142a8adb1
jking6884/ember-cli-table-pagination,gte451f/ember-cli-table-pagination,jking6884/ember-cli-table-pagination,gte451f/ember-cli-table-pagination
blueprints/ember-cli-table-pagination/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar Game = require('./game');\nvar GameArtist = require('./artists/gameartist');\nvar EventDispatcher = require('./eventdispatcher');\nvar utils = require('./utils');\nvar EventLogger = require('./eventLogger');\nvar PlaybackDispatcher ...
javascript
edit
0
2
mit
b91aee96a7e3ecb45e1b70e7bb54c1c4e32547a5
akatakritos/Landmine.js
src/exports.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nexport default class Routes {\n type;\n attributes = [];\n hasOnes = [];\n hasManys = [];\n\n constructor(type, model = null) {\n this.type = type;\n this.model = model;\n }\n\n attribute(name) {\n this.attributes.push(n...
javascript
edit
0
2
mit
0098c64ebf6ecddabd6516901b986b86be3e6620
flarum/core,flarum/core,flarum/core
js/src/common/extend/Model.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n//For Heroku Deployment\nvar URI = require('urijs');\nvar config = URI.parse(process.env.DATABASE_URL);\n\nmodule.exports = config;\n// module.exports = {\n// database: 'sonder',\n// user: 'postgres',\n// //password: 'postgres',\n...
javascript
edit
0
0
mit
5408013ea3ade16bd810f418d1e6e6cea992a841
MapReactor/SonderServer,aarontrank/SonderServer,aarontrank/SonderServer,MapReactor/SonderServer
db/config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\nvar Pomodoro = Backbone.Model.extend({\n\n defaults: {\n isStarted: false,\n duration: 25 * 60,\n remainingSeconds: null\n },\n\n initialize: function() {\n this.listenTo(this, 'finished', this.fin...
javascript
edit
0
2
mit
e5a8b77baea9eca2a44fb043dcff28e73177f8a6
namlook/pmdr
src/js/models.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar config = module.exports = require(\"./webpack.config.js\");\nvar webpack = require('webpack');\nvar _ = require('lodash');\n\nconfig = _.merge(config, {\n externals : {\n \"react\" : \"React\"\n }\n});\n\n\nvar StringRe...
javascript
edit
0
0
mit
8767bd64bad5313a86dca9b44c227e1b688a9d81
payalabs/scalajs-react-bridge-example,payalabs/scalajs-react-bridge-example
webpack-prod.config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nrequire.config({\n paths: {\n Ably: '/ably.min'\n }\n});\n\ndefine(['Ably'], function(Ably) {\n var ably = new Ably();\n return ably;\n});\n\n```\n\nApply this change: Allow \"define\" in examples (no...
javascript
edit
0
1
mit
485f1e8443bee8dd5f7116112f98717edbc49a08
vgno/ably
examples/ably.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* eslint no-var: 0, func-names: 0 , no-console: 0 */\n\n/**\n * Development Server\n * - See https://github.com/gaearon/react-transform-boilerplate\n */\n\nvar path = require('path');\nvar express = require('express');\nvar webpack = r...
javascript
edit
0
2
mit
8552314ec2908bd82723ba50d406c48d4a0a6b59
jackp/finance-tracker,jackp/finance-tracker
devServer.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport {\n Link\n} from 'react-router';\nimport './Menu.css';\nimport User from './User';\nimport language from '../language/language';\n\nconst menuLanguage = language.components.menu;\n\nlet Menu = React.c...
javascript
edit
0
2
bsd-3-clause
15cb0b67e0850945fc3c505e902b9984c67e4923
jeromelachaud/Last.fm-Activities-React,jeromelachaud/Last.fm-Activities-React
src/components/Menu.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Ember from 'ember';\n\nfunction range(start, end) {\n return Array(end-start).join(0).split(0).map((val, id) => id + start);\n}\nexport default Ember.Component.extend({\n years: range(new Date().getFullYear(), new Date().getFul...
javascript
edit
0
1
mit
926caeb0c32c3130945b2e5ba0753a989b5f1035
blakepettersson/dashboard.aptible.com,blakepettersson/dashboard.aptible.com,aptible/dashboard.aptible.com,chasballew/dashboard.aptible.com,chasballew/dashboard.aptible.com,aptible/dashboard.aptible.com,aptible/dashboard.aptible.com,blakepettersson/dashboard.aptible.com,chasballew/dashboard.aptible.com
app/components/select-year/component.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport './App.css';\nimport Clock from './Clock.js';\n\nfunction App() {\n return (\n <div className=\"App\">\n <Clock></Clock>\n\n {/*\n If you add a Weatherclock launcher to your home scr...
javascript
edit
0
1
mit
8de3db905a598cc1fea5476eaa8ba7109f0ef6be
walles/weatherclock,walles/weatherclock,walles/weatherclock,walles/weatherclock
src/App.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nMiniPanel = function (game, text, x, y) {\n Phaser.Group.call(this, game);\n\n text = \"TESTING\"\n\n var style = { font: \"25px Arial\", align: \"center\" };\n this.label = game.add.text(x, y, text, style)\n this.label.a...
javascript
edit
0
1
mit
f76fe4e96d4c637c10d11e80a73c280c28113550
Reicher/Lettris,Reicher/Lettris
src/minipanel.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst needleBase = require('./needle-base');\n\nmodule.exports = class extends needleBase {\n addStyle(style, comment, filePath, needle) {\n const styleBlock = this.mergeStyleAndComment(style, comment);\n this.addBlockC...
javascript
edit
0
2
apache-2.0
652d9409708510ddcfdf3c73c92205345ef3710c
gmarziou/generator-jhipster,pascalgrimaud/generator-jhipster,mosoft521/generator-jhipster,wmarques/generator-jhipster,pascalgrimaud/generator-jhipster,mosoft521/generator-jhipster,gmarziou/generator-jhipster,jhipster/generator-jhipster,atomfrede/generator-jhipster,liseri/generator-jhipster,vivekmore/generator-jhipster,...
generators/needle/needle-client-base.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar Immutable = require('immutable');\n\nvar is = Immutable.is.bind(Immutable),\n getKeys = Object.keys.bind(Object);\n\nfunction shallowEqualImmutable(objA, objB) {\n if (is(objA, objB)) {\n return true;\n }\n var keysA = getK...
javascript
edit
0
11
mit
a73841eb0191f1585affb4228e05af6e2e503291
steffenmllr/react-immutable-render-mixin,jurassix/react-immutable-render-mixin
shallowEqualImmutable.js
rejected_complexity
Cyclomatic complexity too high: 11
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport gulp from 'gulp';\nimport plumber from 'gulp-plumber';\nimport filter from 'gulp-filter';\nimport changed from 'gulp-changed';\nimport imagemin from 'gulp-imagemin';\nimport { plumberConfig, imageminConfig } from '../config';\n\n...
javascript
edit
0
1
mit
30d333b4b38cc94b4cfad7d98b113cd949a3d248
Zoxon/gulp-front,Zoxon/gulp-front,bkzhn/gulp-front,bkzhn/gulp-front
gulp/tasks/assets.js
rejected_duplicate
Near-duplicate of sample 96645
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*eslint-disable no-alert, no-console */\nimport gulp from 'gulp';\nimport gulpLoadPlugins from 'gulp-load-plugins';\n\nimport * as paths from './paths';\n\n\nconst $ = gulpLoadPlugins();\n\n\ngulp.task('compile:styles', () => {\n cons...
javascript
edit
0
1
unlicense
f2b9463ee744299caaae1f936003e53ae0e826a6
gsong/es6-jspm-gulp-starter,gsong/es6-jspm-gulp-starter
tasks/style.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = function (babel) {\n var t = babel.types;\n\n return {\n visitor: {\n Function: function (path) {\n var node = path.node;\n if (! node.async) {\n return;\n }\n\n node.async...
javascript
edit
0
3
mit
a7c81ff7bb40623991cbec24777f7f2fae31a2d8
Hansoft/meteor,Hansoft/meteor,Hansoft/meteor,Hansoft/meteor,Hansoft/meteor,Hansoft/meteor,Hansoft/meteor
plugins/async-await.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nexports[\"Buster terminal tests\"] = {\n environment: \"node\",\n tests: [\"test/**/*.js\"]\n};\n\n```\n\nApply this change: Update configuration file according to new API" }, { "role": "assistant", "content": "exports...
javascript
edit
0
0
bsd-3-clause
bbae0e095d80a174275d9d20bd23728f6d9b5f5b
busterjs/ansi-grid,busterjs/ansi-colorizer
test/buster.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n#!/usr/bin/env node\n\nvar _ = require('lodash')\nvar yargs = require('yargs')\n\nvar installer = require('./installer')\nvar pkg = require('../package.json')\n\nvar argv = yargs\n .version(pkg.version)\n .usage(pkg.description + '\\n...
javascript
edit
0
1
mit
e3859a6937aa4848c9940f7e6bbecfa35bd845bc
unindented/electron-installer-windows,unindented/electron-installer-windows
src/cli.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*jshint node:true */\n\"use strict\";\n\nvar fs = require(\"fs\"),\n async = require(\"async\");\n\nmodule.exports = function(grunt) {\n \n var nwDir = grunt.option(\"nwdir\") || \"./bin/node-webkit-v0.5.0-win-ia32/\";\n ...
javascript
edit
0
2
mit
c4cd0f33a0d83d83f32016088ada70bb4401458e
tivac/falco,tivac/falco
Gruntfile.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*jshint camelcase:false */\n\nmodule.exports = function (grunt) {\n // Load all grunt tasks\n require('load-grunt-tasks')(grunt);\n\n // Project configuration.\n grunt.initConfig({\n release: {\n options: {\n bump: t...
javascript
edit
0
1
mit
af64cda5c55b48be439bce1457016248a28d2d82
thanpolas/kansas-metrics
Gruntfile.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nmodule.exports = function(grunt) {\n // Load all tasks\n require('load-grunt-tasks')(grunt);\n\n grunt.initConfig({\n pck: grunt.file.readJSON('package.json'),\n\n clean: {\n all: ['typebase.css']\n },\...
javascript
edit
0
1
mit
ef5f7fef4b715561983945604118bc27bb257d28
devinhunt/typebase.css,devinhunt/typebase.css,aoimedia/typebase.css,Calinou/typebase.css,Calinou/typebase.css,aoimedia/typebase.css
Gruntfile.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = function(karma) {\n const rollupConfig = require(\"./rollup.config\")[0];\n\n karma.set({\n frameworks: [\"mocha\", \"chai\", \"chai-dom\", \"sinon-chai\"],\n\n files: [\n { pattern: \"src/**/!(cli|webpack)...
javascript
edit
0
1
mit
c3fe78a28501479a475de075ebdb707821255e83
kabisa/maji,kabisa/maji,kabisa/maji
karma.conf.js
accepted
null
true
[ { "role": "user", "content": "Write javascript code for the following: Create board in Game constructor" }, { "role": "assistant", "content": "var Game = function(boardString){\n this.board = '';\n if (arguments.length === 1) {\n this.board = boardString;\n } else {\n function random() ...
javascript
new_file
null
null
mit
221efd4c8bc5921d5702032751ac782d13cd0117
suprfrye/galaxy-256,suprfrye/galaxy-256
js/game.js
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * Configuration library\n *\n * On start-up:\n * - load a configuration file\n * - validate the configuration\n * - populate configuration secrets from environment variables\n *\n * On configuration:\n * - register authenticators\...
javascript
edit
0
4
mit
5e167fb98b87c1f21ef6787dda245560fbc786f6
HiFaraz/identity-desk
lib/config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\ndocument.addEventListener('mouseup', function (e) {\n var ws = null;\n var el = e.srcElement;\n\n while (ws == null && el && el.getAttribute) {\n ws = el.getAttribute(\"wicketsource\");\n el = el.parentNode;\n }\n chrome.exte...
javascript
edit
0
4
apache-2.0
ff56d760687283d69a9f82045627f30246dba8ec
cleiter/wicketsource-contextmenu
content.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nlunr.FieldRef = function (docRef, fieldName) {\n this.docRef = docRef\n this.fieldName = fieldName\n this._stringValue = fieldName + lunr.FieldRef.joiner + docRef\n}\n\nlunr.FieldRef.joiner = \"/\"\n\nlunr.FieldRef.fromString = funct...
javascript
edit
0
2
mit
d806a1c4cd904dc9db5dd09932760b797beceac5
olivernn/lunr.js,olivernn/lunr.js,olivernn/lunr.js
lib/field_ref.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function ($) {\n \n // http://davidwalsh.name/ways-css-javascript-interact\n function addCSSRule (sheet, selector, rules, index) {\n if (sheet.insertRule) {\n sheet.insertRule(selector + '{ ' + rules + ' }', index)\n } els...
javascript
edit
0
3
mit
3de90480307a12d0dc1679b93a767b086f8420a2
leemachin/sticky.js,leemachin/sticky.js
jquery.sticky.js
rejected_duplicate
Near-duplicate of sample 86574
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst speeech = require(\"../src/index\");\nconst get = require(\"lodash.get\");\nconst say = require(\"say\");\n\nconst serviceConfig = require(\"../witkeyfile.json\");\n\nconst process = result => {\n const intent = get(result, \"ent...
javascript
edit
0
1
mit
5357686b071fd82a3326576afd7aa61c46862f32
joyarzun/speeech
examples/witExample.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\"use strict\";\n\nconst config = require(\"../../../config.js\");\nconst Client = require(\"node-rest-client\").Client;\nconst client = new Client();\n\nmodule.exports = function (UserSchema) {\n\n UserSchema.methods.sendPushNotifi...
javascript
edit
0
2
apache-2.0
291ada1316f07518a5168578e8d9b0cb97298cc7
amida-tech/orange-api,amida-tech/orange-api,amida-tech/orange-api,amida-tech/orange-api
lib/models/user/pushNotifications.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\ncasper.test.begin('index loads', 1, function suite(test) {\n casper.start('http://localhost:5000', function() {\n test.assertTextExists('MLTSP', 'successfully loaded index page');\n });\n\n casper.run(function() {\n ...
javascript
edit
0
1
bsd-3-clause
285abec25cba485a463e6dfaa30c1844736e899b
bnaul/mltsp,mltsp/mltsp,bnaul/mltsp,mltsp/mltsp,bnaul/mltsp,mltsp/mltsp,acrellin/mltsp,mltsp/mltsp,acrellin/mltsp,acrellin/mltsp,acrellin/mltsp,bnaul/mltsp,acrellin/mltsp,mltsp/mltsp,bnaul/mltsp,acrellin/mltsp,bnaul/mltsp,mltsp/mltsp
mltsp/tests/frontend/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* Slovak translation for the jQuery Timepicker Addon */\n/* Written by David Vallner */\n(function($) {\n\t$.timepicker.regional['sk'] = {\n\t\ttimeOnlyTitle: 'Zvoľte čas',\n\t\ttimeText: 'Čas',\n\t\thourText: 'Hodiny',\n\t\tminuteText...
javascript
edit
0
1
mit
20b0c0845feb6c87d622683b580f6b32552cdba8
ssyang0102/jQuery-Timepicker-Addon,trentrichardson/jQuery-Timepicker-Addon,trentrichardson/jQuery-Timepicker-Addon,pyonnuka/jQuery-Timepicker-Addon,pyonnuka/jQuery-Timepicker-Addon,ssyang0102/jQuery-Timepicker-Addon,gaissa/jQuery-Timepicker-Addon,gaissa/jQuery-Timepicker-Addon,ristovskiv/jQuery-Timepicker-Addon,ristovs...
localization/jquery-ui-timepicker-sk.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst utilities = require('./utilities');\n\nconst limited = (limited) => limited ? ' | limited' : '';\nconst unique = (unique) => unique ? ' | unique' : '';\nconst points = (points) => (typeof points !== 'undefined' ? `${points...
javascript
edit
0
2
mit
4a69ba9da100f91abd49e90a1c810655e3785419
bmds/SlackXWingCardCmd
lib/templates.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\ndescribe('Support module', function () {\n var S = GameOfLife.Support;\n\n describe('For validating canvas', function () {\n it('throws InvalidArgument if given other than a canvas element', function () {\n expect(function () ...
javascript
edit
0
1
mit
eb5e847adf69f0d183f6a13f72eb72ce7a1d2dc9
tkareine/game_of_life,tkareine/game_of_life,tkareine/game_of_life
test/unit/game_of_life.support.spec.js
rejected_duplicate
Near-duplicate of sample 82586
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst sharp = require('sharp')\n\nconst cropDimensions = (width, height, maxSize) => {\n if (width <= maxSize && height <= maxSize) return [width, height]\n const aspectRatio = width / height\n if (width > height) return [maxSize, Ma...
javascript
edit
0
4
mit
d5a2f021fc31a29bc2be216f43b8baf6850a1ee7
pmb0/express-sharp,pmb0/express-sharp,pmb0/express-sharp
lib/transform.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar Cache = require('./cache');\nvar fs = require('fs');\nvar handlers = require('./handlers');\nvar Ute = require('ute');\nvar util = require('./util');\n\nfunction FeedPaper() {\n this.ute = new Ute();\n this.init(...
javascript
edit
0
2
mit
ef980661130b68cfed37d32f29e3ad6069361fb9
cliffano/feedpaper,cliffano/feedpaper,cliffano/feedpaper
lib/feedpaper.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport { Modal } from 'react-bootstrap';\n\n\nexport default class ListSignupFormCreator extends React.Component {\n constructor(props) {\n super(props);\n\n this.state = {\n subscribeKey: this.pr...
javascript
edit
null
null
bsd-3-clause
01f264010f691f9c86fd6c83c3a231064d2b4913
zhakkarn/Mail-for-Good,zhakkarn/Mail-for-Good,karuppiah7890/Mail-for-Good,zhakkarn/Mail-for-Good,karuppiah7890/Mail-for-Good,karuppiah7890/Mail-for-Good
client/components/lists/ListSignupFormCreator.js
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar util = require(\"util\")\n , EventEmitter = require(\"events\").EventEmitter\n\nmodule.exports = (function() {\n var CustomEventEmitter = function(fct) {\n this.fct = fct\n }\n util.inherits(CustomEventEmitter, EventE...
javascript
edit
0
2
mit
3d8bce570b62e02cce5f9826c79984ca95ff2b24
subjectix/sequelize,denim2x/sequelize,Americas/sequelize,meetearnest/sequelize,camhux/sequelize,lebretr/sequelize-oracle,quiddle/sequelize,darwinserrano/sequelize,bangbang93/sequelize,cbauerme/sequelize,PsiXdev/sequelize,p0vidl0/sequelize,kevinawoo/sequelize,gintsgints/sequelize,wKich/sequelize,Ghost141/sequelize,Amgen...
lib/emitters/custom-event-emitter.js
rejected_duplicate
Near-duplicate of sample 72282
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar svgToImg = require('./svgToImg');\nvar svgToPng = require('./svgToPng');\nvar resolveImages = require('./resolveImages');\nvar fetchRemoteImages = require('./fetchRemoteImages');\n\nvar Promise = require('../../utils/promise');\n\n/...
javascript
edit
0
1
apache-2.0
99bbcbebfc35cfca348860c2ea93e0a54ba2c25c
gencer/gitbook,strawluffy/gitbook,tshoper/gitbook,gencer/gitbook,tshoper/gitbook,GitbookIO/gitbook,ryanswanson/gitbook
lib/output/modifiers/inlineAssets.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* eslint-env mocha */\nconst FenwickTree = require('../../src').DataStructures.FenwickTree;\nconst assert = require('assert');\n\ndescribe('Fenwick Tree', () => {\n it('should be empty when initialized', () => {\n const inst = new ...
javascript
edit
0
1
mit
6a04967c6133b67b3525f2383dc9fbc6ba627ab8
ManrajGrover/algorithms-js
test/data-structures/testFenwickTree.js
rejected_duplicate
Near-duplicate of sample 87936
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * Bytes to encode to VT100 control sequence.\n *\n * @param {String} code Control code that you want to encode\n * @returns {Buffer} Returns encoded bytes\n */\nexport const encodeToVT100 = code => `\\u001b${code}`;\n\n```\n\nAppl...
javascript
edit
0
1
mit
1fbef25c78e8677116d2bee0aea2a239b4653de6
kittikjs/cursor,ghaiklor/terminal-canvas,ghaiklor/terminal-canvas
src/util/encodeToVT100.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst config = {\n development: {\n username: 'postgres',\n password: '212213',\n database: 'more-recipes-development',\n host: '127.0.0.1',\n dialect: 'postgres'\n },\n test: {\n username: 'postgres',\n password...
javascript
edit
0
0
mit
a4f7a4cf1b2aaaf0a5bec5d7de43057ef7b80e8f
WillyWunderdog/More-Recipes-Gbenga,WillyWunderdog/More-Recipes-Gbenga
server/config/config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function(){\n angular.module('angularytics').factory('AngularyticsGoogleHandler', function($log) {\n var service = {};\n\n service.trackPageView = function(url) {\n _gaq.push(['_set', 'page', url]);\n ...
javascript
edit
0
1
mit
244cd6cc04e1f092f68654764ed054f5c1a1c77a
mgonto/angularytics,l3r/angul3rytics,mirez/angularytics,suhyunjeon/angularytics
src/googleHandler.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Component from '@glimmer/component';\nimport { tracked } from '@glimmer/tracking';\nimport { keyResponder, onKey } from 'ember-keyboard';\n\n@keyResponder({ activated: true })\nexport default class extends Component {\n @tracked...
javascript
edit
0
1
mit
31ec3d4799621b5464076e0535183c1b5403fec2
null-null-null/ember-keyboard,null-null-null/ember-keyboard
tests/dummy/app/components/trigger-event-widget.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// test for string split\nvar b = \"1,4,7\";\nvar a = b.split(\",\");\n\nresult = a.length==3 && a[0]==1 && a[1]==4 && a[2]==7;\n\n```\n\nApply this change: Test rewritten to get more precise error location." }, { "role": "assis...
javascript
edit
0
0
mit
0cddf22bb68647e638bfaa25e5e3d686ca34617f
GuillermoHernan/AsyncScript,GuillermoHernan/AsyncScript,GuillermoHernan/AsyncScript
tests/test031.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst _ = require('koa-route');\nconst { teams } = require('src/api');\nconst { read } = require('src/middlewares/methods');\n\n\nmodule.exports = [\n _.get('/teams/', read(teams.list, {\n schema: {\n type: 'object',\n pro...
javascript
edit
0
0
bsd-3-clause
615a6b80cf560ab39e912349ff70d783d796c45b
praekelt/numi-api
src/routes/teams.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nconst NorthstarClient = require('@dosomething/northstar-js');\n\n/**\n * Nortstar client service.\n */\nmodule.exports = {\n\n getClient() {\n if (!this.client) {\n this.client = new NorthstarClient({\n ...
javascript
edit
0
4
mit
67c97274f6e1440124625ada17e00e801c9bb9a0
DoSomething/quicksilver-api,DoSomething/quicksilver-api
api/services/NorthstarService.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\nrequire('css/registrations.css');\n\nvar ko = require('knockout');\nvar $ = require('jquery');\n\nvar $osf = require('js/osfHelpers');\nvar RegistrationManager = require('js/registrationUtils').RegistrationManager;\n\nvar...
javascript
edit
0
1
apache-2.0
4f46a23512c590500edde08e3ef7fe15310ead46
zachjanicki/osf.io,caseyrollins/osf.io,abought/osf.io,saradbowman/osf.io,chrisseto/osf.io,wearpants/osf.io,caneruguz/osf.io,mluke93/osf.io,doublebits/osf.io,caneruguz/osf.io,Johnetordoff/osf.io,GageGaskins/osf.io,danielneis/osf.io,SSJohns/osf.io,adlius/osf.io,samchrisinger/osf.io,hmoco/osf.io,mfraezz/osf.io,samanehsan/...
website/static/js/pages/project-registrations-page.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst express = require('express');\nconst db = require('./lib/db');\n\nconst app = express();\nconst port = process.env.PORT || 3000;\n\nprocess.env.PATH = `${process.env.PATH}:./node_modules/.bin`;\n\napp.use('/current', require('./ro...
javascript
edit
0
2
mit
fe48a78bfc5402cca34be93914efd2700c3864d8
andyjack/neo-tracker,andyjack/neo-tracker,andyjack/neo-tracker
app.js
rejected_duplicate
Near-duplicate of sample 71723
true