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\nthis.mmooc=this.mmooc||{};\n\n\nthis.mmooc.courseList = function() {\n return {\n listCourses: function(parentId) {\n mmooc.api.getEnrolledCourses(function(courses) {\n var html = mmooc.util.renderTem...
javascript
edit
0
2
mit
7c01fd5c5e3c174d7d5f3eee599603d3295c27e8
matematikk-mooc/frontend,matematikk-mooc/frontend
src/js/modules/courselist.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst path = require(\"path\");\nconst rootDir = path.normalize(path.join(__dirname, \"..\"));\nconst tester = path.join(rootDir, \"node_modules\", \"vscode\", \"bin\", \"test\");\nconst cp = require(\"child_process\");\nlet tests = pro...
javascript
edit
0
3
mit
fb3fbe1df40744ac42dfb79ad6117dce48322fc7
kimushu/rubic-vscode,kimushu/rubic-vscode,kimushu/rubic-vscode,kimushu/rubic-vscode
tools/run-test.js
rejected_duplicate
Near-duplicate of sample 99274
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst { copyFileSync, existsSync } = require('fs')\nconst { join } = require('path')\n\nconst IS_LINUX = !['win32', 'darwin'].includes(process.platform)\n\nconst baseDir = ({\n 'darwin': '/usr/local/lib',\n 'win32': 'C:\\\\Windows\\\\...
javascript
edit
0
0
mit
74463bb0f1dc606ce8856db350ea88a6cf7840c4
Kylart/KawAnime,Kylart/KawAnime,Kylart/KawAnime
scripts/externals/mpv/libs.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport MapboxGl from 'mapbox-gl'\n\n// Load mapbox-gl-rtl-text using object urls without needing http://localhost for AJAX.\nconst data = require(\"raw-loader?mimetype=text/javascript!@mapbox/mapbox-gl-rtl-text/mapbox-gl-rtl-text.js\");...
javascript
edit
0
0
mit
92b970377d8089486a929a06ba0085fe60aaca5f
maputnik/editor,maputnik/editor
src/libs/mapbox-rtl.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport {curry, values} from 'ladda-fp';\nimport {createCache} from './cache';\nimport {decorateCreate} from './operations/create';\nimport {decorateRead} from './operations/read';\nimport {decorateUpdate} from './operations/update';\nim...
javascript
edit
0
2
mit
2209db752bea8f0989134b1bb5a107f52d2282b4
petercrona/ladda,petercrona/ladda,ladda-js/ladda
src/plugins/cache/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// The port for communicating back to the extension.\nvar benchmarkExtensionPort = chrome.extension.connect();\n\n// The url is what this page is known to the benchmark as.\n// The benchmark uses this id to differentiate the benchmark's...
javascript
edit
0
3
bsd-3-clause
e079f6bc95496920f7c70cd95adf734203430f47
wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser
chrome/common/extensions/docs/examples/extensions/benchmark/script.js
rejected_duplicate
Near-duplicate of sample 81651
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst electron = require('electron');\nconst BrowserWindow = electron.BrowserWindow;\nconst ipcMain = electron.ipcMain;\n\nmodule.exports = { createAuthWindow: function(mainWindow, loginCallback) {\n var loginWindow = new BrowserWindow...
javascript
edit
0
2
mit
497be86d19253138425577534f68acd76143b275
bobar/tdfb,bobar/tdfb,bobar/tdfb,bobar/tdfb
authWindow.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\n/**\n * For a sorted input, counting the number of unique values\n * is possible in constant time and constant memory. This is\n * a simple implementation of the algorithm.\n *\n * Values are compared with `===`, so obj...
javascript
edit
0
4
isc
e8c149607f9266b348fa519addf05f8f311f19f5
simple-statistics/simple-statistics,GerHobbelt/simple-statistics,simple-statistics/simple-statistics,llimllib/simple-statistics,simple-statistics/simple-statistics,tmcw/simple-statistics
src/sorted_unique_count.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\nvar falsey = {\n 0: true,\n false: true,\n no: true,\n nope: true\n}\n\nvar bloob = process.env.MZ_BLUEBIRD\nif (typeof Promise === 'undefined' || (bloob && !falsey[bloob])) {\n // use bluebird\n var promisify\n try {\n prom...
javascript
edit
0
4
mit
5e27c30b83bf462f152b3839646f3ffc17b2f62e
normalize/mz,aminuga/mz,petkaantonov/mz
_promisify.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nconst WebApp = require('./services/WebApp');\nconst app = new WebApp();\n\napp\n .configure({\n files: [\n __dirname + '/config/application.js'\n ]\n })\n .bootstrap()\n .launch();\n\nmodule.exports = app...
javascript
edit
0
0
mit
70ce9cfe4a0192ad766eac75f6fd51d32cd43024
release-notes/release-notes-hub,release-notes/release-notes-hub
server.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar validate = exports;\n\nvar validator = require('validator');\n\nvalidate.name = function(input) {\n /**\n * TODO: Change js validation for json schema\n */\n var error = 'Please provide your full name';\n ret...
javascript
edit
0
2
bsd-3-clause
47d9342ea808373ba8cd410e39a1e1d5f7e088b5
luizbranco/torus-cli,manifoldco/torus-cli,luizbranco/torus-cli,manifoldco/torus-cli,luizbranco/torus-cli,manifoldco/torus-cli
cli/lib/validate.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nSequelize = require('sequelize')\ndbConfig = require('../database.json')['staging']\npg = require('pg').native;\n\nvar db;\n\nif (process.env.POSTGRES_URL) {\n var match = process.env.POSTGRES_URL.match(/postgres:\\/\\/([^:]+):([^@]+)@...
javascript
edit
0
0
isc
a30e8e8d64c242fd699dadd1de970d0024edcbd4
crazyquark/gatewayd,Parkjeahwan/awegeeks,zealord/gatewayd,xdv/gatewayd,whotooktwarden/gatewayd,Parkjeahwan/awegeeks,xdv/gatewayd,crazyquark/gatewayd,zealord/gatewayd,whotooktwarden/gatewayd
config/initializers/sequelize.js
rejected_duplicate
Near-duplicate of sample 68668
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nQUnit.module('internal-test-helpers');\n\nQUnit.test('module present', function(assert) {\n assert.ok(true, 'each package needs at least one test to be able to run through `npm test`');\n});\n\n```\n\nApply this change: [CLEANUP] Conve...
javascript
edit
0
1
mit
65f772caa5aa0350ae0456e8bc2f447db1f21921
fpauser/ember.js,tildeio/ember.js,jaswilli/ember.js,asakusuma/ember.js,emberjs/ember.js,karthiick/ember.js,qaiken/ember.js,jaswilli/ember.js,xiujunma/ember.js,givanse/ember.js,Turbo87/ember.js,Gaurav0/ember.js,kellyselden/ember.js,givanse/ember.js,intercom/ember.js,jaswilli/ember.js,asakusuma/ember.js,miguelcobain/embe...
packages/internal-test-helpers/tests/index-test.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\r\n * Created by nkmathew on 05/07/2016.\r\n */\r\n\r\n$(document).ready(function () {\r\n $(\"#profile-form\").submit(function (e) {\r\n $(\"#btn-submit-profile\").spin(BIG_SPINNER);\r\n var url = '/site/profile';\...
javascript
edit
0
1
bsd-3-clause
2ad65976d5fbbea38e74004b4836c97d13394993
nkmathew/intern-portal,nkmathew/intern-portal
web/js/profile.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\n// This is a very simple interface\n// Used to fire up gulp task in your local project\nvar runner = require('../utils/runner'),\n cb = require('../utils/callback'),\n argv = require('minimist')(process.argv.slice...
javascript
edit
0
4
mit
69aed72d668bbe18883ce511a4b359c268c9c582
mattma/ember-rocks,mattma/ember-rocks,mattma/ember-rocks
src/commands/commands.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = (function () {\n 'use strict';\n\n var config = {\n development: {\n server: {\n port: 3000\n },\n wsapp: {\n port: 3334\n }\n },\n testing: {\n server: {\n port:...
javascript
edit
0
3
mit
51d3aa5289b62f4d6a602e7807ef934f4862525c
cr0cK/mockify,Gandi/mockify
app/config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// Use this file to change prototype configuration.\n\n// Note: prototype config can be overridden using environment variables (eg on heroku)\n\nmodule.exports = {\n\n // Service name used in header. Eg: 'Renew your passport'\n servic...
javascript
edit
0
0
mit
954fd1c7892d72ce9148a49554f49c8a554d5abe
tyfairclough/das-aml-beta-ui,SkillsFundingAgency/das-alpha-ui,SkillsFundingAgency/das-alpha-ui,tyfairclough/das-aml-beta-ui,tyfairclough/das-aml-beta-ui,tyfairclough/das-aml-beta-ui,SkillsFundingAgency/das-alpha-ui,tyfairclough/das-aml-beta-ui,SkillsFundingAgency/das-alpha-ui
app/config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nfunction SAbstractObject() {\n this.toString = function () {\n var clazz = getClass();\n if (clazz === null) {\n return \"an Object(clazz==null)\";\n }\n return \"a \" + clazz.g...
javascript
edit
0
2
mit
46014be39155d26a1b04d14485990a0a562b4695
smarr/JsSOM,smarr/JsSOM,SOM-st/JsSOM,smarr/JsSOM,smarr/JsSOM,SOM-st/JsSOM,SOM-st/JsSOM,SOM-st/JsSOM
src/som/vmobjects/SAbstractObject.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function (root) {\n \"use strict\";\n\n root.GOVUK.GDM = root.GOVUK.GDM || {};\n root.GOVUK.GDM.analytics = {\n 'register': function () {\n GOVUK.Analytics.load();\n var cookieDomain = (root.document.domain === 'www.dig...
javascript
edit
0
2
mit
57dd338eb6a7013eaace069ad8a5886ae16db57b
alphagov/digitalmarketplace-supplier-frontend,alphagov/digitalmarketplace-supplier-frontend,alphagov/digitalmarketplace-supplier-frontend,alphagov/digitalmarketplace-supplier-frontend
app/assets/javascripts/analytics/_register.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nlet task = require('./lib/task');\n\n\nif (process.platform === 'win32') {\n console.log('Windows is currently not supported. Please use');\n console.log(' npm run test:end2end:ldap');\n console.log(' npm run test:end2end...
javascript
edit
0
1
mit
99c8d2b74710d88b465b2cdaddc97216ce6404f4
RobNeXX/4minitz,4minitz/4minitz,Huggle77/4minitz,4minitz/4minitz,Huggle77/4minitz,4minitz/4minitz,RobNeXX/4minitz,RobNeXX/4minitz,Huggle77/4minitz
tests/support/end2end-server.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar elixir = require('laravel-elixir');\n\nelixir(function(mix) {\n\n mix.copy(\n 'node_modules/bootstrap/dist/fonts',\n 'public/build/fonts'\n );\n\n mix.copy(\n 'node_modules/font-awesome/fonts',\n ...
javascript
edit
0
1
mit
5cd19bdea12501dc8a2a8cf8255f132f2794046d
syahzul/admin-theme
src/gulpfile.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Index from 'appkit/routes/index';\nimport App from 'appkit/app';\n\nvar route;\n\nmodule(\"Unit - IndexRoute\", {\n setup: function(){\n route = App.__container__.lookup('route:index');\n }\n});\n\ntest(\"it exists\", functi...
javascript
edit
0
1
mit
8ffc94a2239933f0134cfc603d019da3a9b9a499
dierbro/ember-invoice
tests/unit/routes/index_test.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar webpack = require('webpack'),\n path = require('path'),\n yargs = require('yargs');\n\nvar libraryName = 'hdrhistogram',\n plugins = [],\n outputFile;\n\nif (yargs.argv.p) {\n //plugins.push(new webpack.optimize.UglifyJ...
javascript
edit
0
0
bsd-2-clause
738918c2cf2eb9d3d4f88798a6e57a200985abaf
alexvictoor/HdrHistogramJS,HdrHistogram/HdrHistogramJS,HdrHistogram/HdrHistogramJS,HdrHistogram/HdrHistogramJS,alexvictoor/HdrHistogramJS
webpack.config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { defaultCompileOptions } from 'ember-template-compiler';\nimport TransformOldBindingSyntax from 'ember-template-compiler/plugins/transform-old-binding-syntax';\nimport TransformItemClass from 'ember-template-compiler/plugins/tra...
javascript
edit
0
2
mit
8c36e50421438506ef24e5566761ebb30ec849fa
jherdman/ember.js,intercom/ember.js,mfeckie/ember.js,HeroicEric/ember.js,miguelcobain/ember.js,cibernox/ember.js,amk221/ember.js,emberjs/ember.js,code0100fun/ember.js,cbou/ember.js,nickiaconis/ember.js,xiujunma/ember.js,stefanpenner/ember.js,tsing80/ember.js,chadhietala/ember.js,kaeufl/ember.js,sandstrom/ember.js,inter...
packages/ember-template-compiler/tests/system/compile_options_test.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar gulp = require('gulp'),\n run = require('gulp-run'),\n\n del = require('del'),\n scrollrack = require('scroll-rack');\n\n\n// Config\nvar path = {\n files: 'docs/',\n dest: 'build'\n}\n\n\n/**\n * Cle...
javascript
edit
0
1
mit
1f727966e6416ca11789722552f52ee27297c2ab
sebald/guidelines,sebald/guidelines
gulpfile.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nconst gulp = require('gulp');\nconst tools = require('./src');\n\nconst unmockedModulePathPatterns = [\n 'node_modules/.*',\n 'utils/helper-tests.js'\n];\n\ntools.setGlobalConfiguration(defaults => {\n defaults.sourc...
javascript
edit
0
1
mit
48017f9a9135b16b47a0404dab9d4e30c19ef4e1
urbanjs/urbanjs-tools,urbanjs/urbanjs-tools,urbanjs/tools,urbanjs/tools,urbanjs/tools,urbanjs/urbanjs-tools
gulpfile.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\nconst gulp = require('gulp');\nconst jasmineNode = require('gulp-jasmine-node');\nconst livereload = require('gulp-livereload');\n\n// Loads Jasmine Browser\ngulp.task('test', () => gulp.src('jasmine/spec/*_spec.js').pipe(jasmineNode(...
javascript
edit
0
1
mit
a30c0038343c6ccdfbe78c7e31e787b701b02e0c
andela-wmaina/inverted-index,andela-wmaina/inverted-index
gulpfile.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar gulp = require('gulp');\nvar path = require('path');\nvar metal = require('gulp-metal');\nvar runSequence = require('run-sequence');\n\nvar codeFileGlobs = [\n\t'src/**/*.js',\n\t'test/**/*.js',\n\t'gulpfile.js',\n\...
javascript
edit
0
2
bsd-3-clause
30f768e24be58b83fed22847bc255dd3aaf68add
travisc5/metal.js,zsagia/metal.js,travisc5/metal.js,mairatma/metal.js,zsagia/metal.js
gulpfile.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use babel';\n\nimport $ from 'jquery';\nimport CONFIG from '../constants/AppConstants';\n\nlet RepositoryDataMapper = {\n parse: (data) => {\n let xml = $($.parseXML(data));\n return xml.find('Projects').map(function(){\n l...
javascript
edit
0
4
mit
f8d297353f33accefde38b9100cb877ca680af49
willmendesneto/build-checker-app,willmendesneto/build-checker-app
app/scripts/helpers/repository-data-mapper.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = {\n entry: './src/index.js',\n output: {\n path: './dist',\n filename: 'hyperline.js'\n },\n module: {\n loaders: [\n {\n test: /\\.js$/,\n loader: 'babel',\n exclude: /node_module...
javascript
edit
0
0
mit
3c450f8338cc14f2ecbc1f411f45084b7bbf0b65
Hyperline/hyperline,edoren/hyperline
webpack.config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nEnsembl.Panel.Piechart.prototype.getContent = function() {\n var panel = this;\n var visible = [];\n\n this.graphData = [];\n this.graphConfig = {};\n this.graphEls = {};\n this.dimensions = eval($('input.graph_dimensions'...
javascript
edit
0
4
apache-2.0
abc76d852c0ac8bc8e156cedea3b4a44c90e322f
EnsemblGenomes/eg-web-parasite,EnsemblGenomes/eg-web-parasite,EnsemblGenomes/eg-web-parasite,EnsemblGenomes/eg-web-parasite
htdocs/components/EG_10_Piechart.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst path = require('path');\nconst { BundleAnalyzerPlugin } = require('webpack-bundle-analyzer');\nconst CompressionPlugin = require('compression-webpack-plugin');\n\nconst config = {\n entry: path.resolve(__dirname, './src/index.j...
javascript
edit
0
0
mit
0ec06924f2c02763a6e21ca6b0e8e8a45644c0b7
arnav-aggarwal/react-boilerplate-setup
webpack.config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* eslint-env node */\n\nconst isProduction = process.env.NODE_ENV === 'production';\n\nmodule.exports = {\n entry: {\n daypicker: './DayPicker.dist.js',\n },\n output: {\n path: `${__dirname}/lib`,\n filename: `[name]${isPr...
javascript
edit
0
0
mit
7d42f49e80f1abdb8917363835dd9b372f281b0b
saenglert/react-day-picker,gpbl/react-day-picker,gpbl/react-day-picker,gpbl/react-day-picker
webpack.config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nangular.module(\"hyperContentFor\", [])\n .value(\"HYPER_CONTENT_FOR_IDS\", { })\n\n .directive(\"hyperContent\", function() {\n return {\n scope: { \"for\": \"@\" },\n\n restrict: \"E\",\n\n transclude: true,\n\n ...
javascript
edit
0
1
mit
17305541fff8cdf2ad709f16ecb6db1dfed325ca
hyperoslo/hyper-content-for-angular,hyperoslo/hyper-content-for-angular
src/hyper-content-for.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst path = require('path');\n\nmodule.exports = {\n devtool: 'cheap-module-eval-source-map',\n entry: {\n eventPage: './src/eventPage.js',\n contentScript: './src/contentScript.jsx',\n },\n output: {\n path: path.join(__d...
javascript
edit
0
0
mit
eb2caed8e729b35d4311c2e80b85b6981bb42f37
JohnAmadeo/fb-messenger-slackmoji,JohnAmadeo/fb-messenger-slackmoji
webpack.config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// ==UserScript==\n// @name Slickdeals Don't Track Me!\n// @version 1.0\n// @description Replaces outgoing Slickdeals tracking links with direct links.\n// @match http://slickdeals.net/f/*\n// @namespace https://github.co...
javascript
edit
0
4
mit
eced298af987ec1bc6e42392f80b9c6afc27e752
gg/slickdeals-dont-track-me
slickdeals-dont-track-me.user.js
rejected_duplicate
Near-duplicate of sample 99316
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar Debug = {\n init: function() {\n $( '.enable-profiling' ).click( function() {\n return toggleProfiling.bind( this )( true );\n } );\n $( '.disable-profiling' ).click( function() {\n retu...
javascript
edit
0
2
mit
17ab6c096163fffce68104d107a3e5abc868e414
dionyziz/endofcodes,VitSalis/endofcodes,dionyziz/endofcodes,VitSalis/endofcodes,VitSalis/endofcodes,dionyziz/endofcodes,VitSalis/endofcodes
static/script/debug.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = (function() {\n\n var def = require('./def');\n var util = require('./util');\n\n var guard_undef = util.guard_undef;\n\n var Message = def.type(function(raw_msg) {\n guard_undef(raw_msg);\n this.def_prop('raw...
javascript
edit
0
1
mit
71d93fec3444fc2813df4e93050eb1c5206ec6d9
bassettmb/slack-bot-dev
bin/message.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\ndescribe('PageClick', () => {\n const PageClickInjector = require('inject!../src/PageClick');\n let mock, PageClick;\n\n\n beforeEach(() => {\n mock = jasmine.createSpyObj('mock', ['']);\n });\n\n\n beforeEach(() => PageClick = ...
javascript
edit
0
1
mit
d855c11a138e15dde2582319c3f8ccc443910f7a
nkbt/react-page-click
test/PageClick-test.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport glob from 'glob';\n\n\nglob.sync('**/*-test.js', {realpath: true, cwd: __dirname}).forEach(require);\n\n```\n\nApply this change: Use test runner from react-component-template" }, { "role": "assistant", "content": "'u...
javascript
edit
0
0
mit
aafe773244155b0630eed62ae72014d8a471b001
nkbt/cf-react-component-template
template/test/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst path = require('path');\nconst options = require('../utils/commandOptions');\n\nmodule.exports = {\n commonn: {\n convertPxToRem: {\n enable: false,\n options: {\n rootValue: 108, // ...
javascript
edit
0
0
mit
b5b2d02b60c9db94b4fce6d7839832eb7b6a0356
yinxin630/fiora,yinxin630/fiora,yinxin630/fiora
config/webpack.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst userController = require('./users/userController.js');\nconst listingController = require('./listings/listingController.js');\n\nmodule.exports = (app, db) => {\n\n // Routes for all users\n app.get('/api/users', userController....
javascript
edit
0
1
mit
a49043204b258ae6e04038c69c40a4bb16ca18e8
bwuphan/raptor-ads,Darkrender/raptor-ads,bwuphan/raptor-ads,wolnewitz/raptor-ads,Velocies/raptor-ads,Darkrender/raptor-ads,Velocies/raptor-ads,wolnewitz/raptor-ads
server/config/routes.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React, { PureComponent } from 'react';\nimport PropTypes from 'prop-types';\nimport Box from '../box';\nimport { ButtonGroup } from '../button';\nimport cx from 'classnames';\nimport theme from './theme.css';\n\nclass Message ext...
javascript
edit
0
4
mit
1eb7f32e8bb7097cfca068dda7b339aca4691938
teamleadercrm/teamleader-ui
components/message/Message.js
rejected_duplicate
Near-duplicate of sample 94478
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { Router } from 'express'\nimport bodyParser from 'body-parser'\nimport Decision from './classes/Decision.js'\nvar router = Router()\n\nrouter.use(bodyParser.urlencoded({ extended: true }))\n\nrouter.post('/createDecision', funct...
javascript
edit
0
1
mit
eaa3fa7e5224932ccbcefdd26db81b384b3155fc
eellak/gsoc17-diavgeia,eellak/gsoc17-diavgeia,eellak/gsoc17-diavgeia,eellak/gsoc17-diavgeia
n3-composer/server/api/decisions.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function (tree) {\n\ntree.Extend = function Extend(selector, option, index) {\n this.selector = selector;\n this.option = option;\n this.index = index;\n\n switch(option) {\n case \"all\":\n this.allowBefo...
javascript
edit
0
5
apache-2.0
6ff68041de291f09753ef50f1c6d9b2b1f40b976
mcanthony/less.js,wjb12/less.js,demohi/less.js,PUSEN/less.js,nolanlawson/less.js,jjj117/less.js,wjb12/less.js,less/less.js,PUSEN/less.js,angeliaz/less.js,Nastarani1368/less.js,MrChen2015/less.js,bammoo/less.js,dyx/less.js,Nastarani1368/less.js,paladox/less.js,SomMeri/less-rhino.js,NaSymbol/less.js,seven-phases-max/less...
lib/less/tree/extend.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst express = require('express');\nconst logger = require('../logger').policy;\nconst schemas = require('../schemas');\nconst predefined = require('./predefined');\nconst conditions = {};\n\nfunction register ({ name, handler, schema ...
javascript
edit
0
2
apache-2.0
de314b6ba5fcc799090d328e379002e04e8fc10f
ExpressGateway/express-gateway
lib/conditions/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React, { PropTypes } from 'react';\nimport markdownIt from 'markdown-it';\nimport ast from './util/ast';\nimport renderTokens from './util/renderTokens';\nimport components from './components';\n\nconst md = new markdownIt();\n\n...
javascript
edit
0
1
mit
caedc16fc57aec421d711dbdac3ebc37ebfb3283
gakimball/meact,gakimball/meact
src/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nfunction FakeStorage() {\n this.clear();\n}\n\nFakeStorage.prototype = {\n key(index) {\n // sanitise index as int\n index = parseInt(index);\n // return early if index isn't a positive number or larger than length\n if (i...
javascript
edit
0
3
mit
190e5fb8e549493841b9bb9ffd7820ddb00e6d85
jacobbuck/fake-storage
src/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * __ _ __ ____\n * / / | |/ // __ \\\n * / / | // / / /\n * / /___/ |/ /_/ /\n * /_____/_/|_/_____/\n *\n * @author Alan Doherty (BattleCrate Ltd.)\n * @license MIT\n */\n\n// requires\nvar Client = require('./...
javascript
edit
0
1
mit
3ca2c46fef9c7b2339ca8df5e64044736f166ed0
alandoherty/node-lxd
src/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { showLoading, hideLoading } from './loading_bar_ducks'\n\nconst defaultTypeSuffixes = ['PENDING', 'FULFILLED', 'REJECTED']\n\nexport default function loadingBarMiddleware(config = {}) {\n const promiseTypeSuffixes = config.prom...
javascript
edit
0
5
mit
0c9d564d3733fa5807c36cb992e13026c0ec21c7
mironov/react-redux-loading-bar
src/loading_bar_middleware.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar http = require('http');\n\nexports.proxy = function(proxy_port, proxy_host, client_req, client_resp) {\n var proxy_req = http.createClient(proxy_port, proxy_host).request(\n\tclient_req.method, client_req.url, client_req.headers)...
javascript
edit
0
1
apache-2.0
977b87be2bd6d05ee626e09b5ec7faff0edf888b
tilgovi/lode,tilgovi/lode
src/proxy.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar ResponseBuilder = require('./ResponseBuilder');\n\nmodule.exports = function(promiseReturningHandlerFn, request, cb, CustomRespBuilderClass) {\n promiseReturningHandlerFn()\n .then(function(respBuilder) {\n ...
javascript
edit
0
2
mit
8de119d3bf8d14d30b71efe3af5a1bf41eaca220
silvermine/apigateway-utils
src/responseBuilderHandler.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\ndescribe('strong-api', function(){\n var StrongAPI = require('../lib/strong-api');\n var api;\n \n beforeEach(function () {\n api = new StrongAPI();\n });\n\n it('should translate in the default default locale', function() {\n ...
javascript
edit
0
1
mit
d5c4e9fe858c226b163114f6d9f5e2636c8a5589
fs-webdev/strong,timshadel/strong
spec/strong-api-spec.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*global desc, task, jake, fail, complete */\n(function() {\n\t\"use strict\";\n\n\ttask(\"default\", [\"lint\"]);\n\n\tdesc(\"Lint everything\");\n\ttask(\"lint\", [], function() {\n\t\tvar lint = require(\"./build/lint/lint_runner.js\...
javascript
edit
0
1
mit
6972b64ab05f7b66af8e512067a83cba0e0be917
kyroskoh/lets_code_javascript,kyroskoh/lets_code_javascript,halcwb/lets_code_javascript,halcwb/lets_code_javascript,halcwb/lets_code_javascript,kyroskoh/lets_code_javascript
jakefile.js
rejected_duplicate
Near-duplicate of sample 73503
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { isValidElement } from 'react'\n\nconst whitespacesRe = /\\s+/g\nconst _format = (str = '') => str.replace(whitespacesRe, ' ')\n\nconst elementToTextRec = x => {\n if (Array.isArray(x)) {\n return x.map(elementToTextRec).joi...
javascript
edit
0
5
mit
fa1180e20689c88f6e5db4023770cb51ba9d3e9a
styled-components/styled-components-website,styled-components/styled-components-website
utils/elementToText.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from \"react\";\nimport ReactTestUtils from \"react-addons-test-utils\";\n\nimport MenuScreen from \"src/components/MenuScreen/MenuScreen.js\";\n\ndescribe(\"MenuScreen\", () => {\n\n it(\"should exist\", () => {\n Menu...
javascript
edit
0
2
mit
65942a18a3050a4572a1200bbe69a0d146251c15
Lingvokot/Tic-Tac-Toe-React,Lingvokot/Tic-Tac-Toe-React,Lingvokot/Tic-Tac-Toe-React
test/components/MenuScreen/MenuScreen.spec.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// @flow\nimport baseStyles from '../../../styles/resets/baseStyles.css.js'\nimport styled from '../../styled'\n\nexport const config = {\n marginBottom: 100,\n padding: '12px 0',\n spacing: 5,\n}\n\nexport const ActionsUI = styled('...
javascript
edit
0
0
mit
8c8317d74cd996a2ea6d4fb014d51199108dbe01
helpscout/blue,helpscout/blue,helpscout/blue
src/components/Page/styles/Actions.css.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { NodeComponent } from '../../kit'\n\nexport default class BlockQuoteComponent extends NodeComponent {\n render ($$) {\n let node = this.props.node\n let el = $$('div')\n .addClass('sc-block-quote')\n .attr('data...
javascript
edit
0
1
mit
a5fd7493788a20e1175d66f23dde1fdde6ff7fd2
substance/texture,substance/texture
src/article/shared/BlockQuoteComponent.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// Filename: popup.js\n// Date: July 2017\n// Authors: Evgeni Dobranov & Thomas Binu\n// Purpose: Defines extension UI and functional behavior\n\n// Entry point into app functionality\nfunction onPopupLoad(){\n\n // Immediately...
javascript
edit
0
2
apache-2.0
62e6ed3baa6183897b1af121269d1dee9edb2704
our-sinc-topo/visable-marketplace,our-sinc-topo/visable-marketplace
js/popup.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar tape = require('tape');\n\ntape.test('transformer - should be a function', function (assert) {\n\tassert.equals(typeof require('../lib/transformer'), 'function');\n\tassert.end();\n});\n\ntape.test('transformer - should return a tem...
javascript
edit
0
1
mit
1a0c26c08f4c61db23fe5ad990b69e1da7579d16
nsand/newid
test/transformer.spec.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nfunction getMap(){\n var map = new OpenLayers.Map({\n layers: [\n new OpenLayers.Layer.WMS(\n \"OpenLayers WMS\", \n \"http://vmap0.tiles.osgeo.org/wms/vmap0\", \n {\n ...
javascript
edit
0
4
bsd-3-clause
53a9b2e2afbd83c76d007dacdb8bfc1491e6d34e
geoext/GXM,geoext/GXM
tests/helperfunctions.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict'\n\n// var util = require('util')\nvar console = require('better-console')\n// var renderNav = require('./compolib.renderNav')\nvar filetreeToJSON = require('./compolib.filetreeToJSON')\nvar components = require('./compolib....
javascript
edit
0
2
mit
da1be2ea51c8afa987e237216154f436fe0fa867
karlisup/chewingum,karlisup/chewingum
lib/compolib.build.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar iTunes = require('../')\n , conn = null\n\niTunes.createConnection(onConn);\n\nfunction onConn (err, c) {\n if (err) throw err;\n conn = c;\n conn.selection( onSelection );\n}\n\nfunction onSelection (err, selection) {\n if (...
javascript
edit
0
3
mit
493bfd49c7a7d45bb723a4108889c27afc6bddff
TooTallNate/node-iTunes,TooTallNate/node-iTunes,TooTallNate/node-iTunes
examples/artwork-of-selection.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport test from 'ava';\nimport { decoder } from '../../src';\nimport base from '../base';\n\ntest('should be able to compose decoder functions', t => {\n t.deepEqual(\n decoder.decode(\n [].concat(\n base.latLngBytes,\n...
javascript
edit
0
1
mit
9d8b30591611a56c2d6410eab501fcdb5997f3c3
thesolarnomad/lora-serialization,thesolarnomad/lora-serialization,thesolarnomad/lora-serialization,thesolarnomad/lora-serialization,thesolarnomad/lora-serialization,thesolarnomad/lora-serialization
test/decoder/decode.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst {\n optimize: { CommonsChunkPlugin },\n} = require('webpack');\n\nfunction isCss({ resource }) {\n return resource &&\n resource.match(/\\.(css|sss)$/);\n}\n\nfunction isVendor({ resource }) {\n return resource &&\n resou...
javascript
edit
0
3
mit
eb4c550d39d3231873e5dc059a062c052d3707de
AlexMasterov/webpack-kit,AlexMasterov/webpack-kit
webpack/plugins/commonsChunk.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport ApiEvents from './events/ApiEvents';\nimport { firebaseRef } from './appconfig';\n\nvar ref = firebaseRef.child('notes');\n\nvar API = {\n start() {\n ref.on('child_added', (snapshot) => {\n var noteName = snapshot.key()...
javascript
edit
0
1
mit
5c67a13bd8167183720cb8d39ff9e5630d8398e3
kentor/notejs-react,kentor/notejs-react,kentor/notejs-react
src/js/api.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar readline = require('readline');\nvar mineflayer = require('mineflayer');\n\nvar rl = readline.createInterface({\n\tinput: process.stdin,\n\toutput: process.stdout,\n\tterminal: false\n});\n\nvar bot = mineflayer.createBot({\n host:...
javascript
edit
0
2
mit
a012312485095fd894806b4070164f859bcab523
ut7/minechat,llbit/minechat
minechat.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// This should be the only file aware that we use Opbeat for error reporting.\nimport { opbeatAppId, opbeatOrgId } from './settings'\n\nconst init = () => {\n window._opbeat('config', {\n orgId: opbeatOrgId,\n appId: opbeatAppId\...
javascript
edit
0
3
mit
e204f56c778711d707589a96b0aff021f2efeda3
ovidner/bitket,ovidner/bitket,ovidner/bitket,ovidner/bitket
tickle-frontend/src/errorReporting.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nDropboxOAuth = {};\n\n// Request dropbox credentials for the user\n// @param options {optional}\n// @param callback {Function} Callback function to call on\n// completion. Takes one argument, credentialToken on success, or Error on\n/...
javascript
edit
0
5
mit
99057f25b5c98fb4ff89090f96dbcb112ab93c86
gcampax/meteor-dropbox-oauth,gcampax/meteor-dropbox-oauth
dropbox_client.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*global QUnit:false, module:false, test:false, asyncTest:false, expect:false*/\n/*global start:false, stop:false ok:false, equal:false, notEqual:false, deepEqual:false*/\n/*global notDeepEqual:false, strictEqual:false, notStrictEqual:f...
javascript
edit
0
1
mit
f2264fa5eab081f13ba87bf79eae1e1a6c64bf8f
webmat/sugar_dom
test/sugar_dom_test.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar Place = {};\n\n$(document).on('pageshow', '#select-place', function() {\n $('#select-place-map').css('height', 500);\n\n utils.getCurrentLocation().done(function(location) {\n\tPlace.map = Map.createMap('select-place-map',\n\t...
javascript
edit
0
1
mit
dbd02d4ae342e0b5797dc2cd4b7092daf20a1e73
otknoy/michishiki
js/select_place.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* eslint-disable */\nrequire('dotenv').config()\n\nmodule.exports = (on, config) => {\n if (config.testingType === 'component') {\n require('@cypress/react/plugins/load-webpack')(on, config, {webpackFilename: './webpack.config.js'}...
javascript
edit
0
2
mit
d0cf2ffa9ed5613bd6bb34c7cd6049d8b6304b27
uktrade/data-hub-fe-beta2,uktrade/data-hub-frontend,uktrade/data-hub-frontend,uktrade/data-hub-frontend,uktrade/data-hub-fe-beta2
test/cypress/plugins/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport EventPost from 'flarum/components/EventPost';\n\n/**\n * The `DiscussionRenamedPost` component displays a discussion event post\n * indicating that the discussion has been renamed.\n *\n * ### Props\n *\n * - All of the props for...
javascript
edit
0
1
mit
b3aa0298d5bdccd24a614f7a1194fae0762e4685
Albert221/core,flarum/core,malayladu/core,falconchen/core,renyuneyun/core,vuthaihoc/core,Luceos/core,flarum/core,dungphanxuan/core,datitisev/core,zaksoup/core,falconchen/core,datitisev/core,Albert221/core,Onyx47/core,Luceos/core,zaksoup/core,datitisev/core,Albert221/core,renyuneyun/core,kirkbushell/core,kidaa/core,zaks...
js/forum/src/components/DiscussionRenamedPost.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nfunction Dialogue(title,contents,buttons) {\n\n var Title;\n var Contents;\n var Buttons;\n\n /** Setters */\n function SetTitle(){\n\n }\n function SetButtons(){\n\n }\n function SetContents(){\n\n }\n ...
javascript
edit
0
3
mit
762e01365545b5eb2638fbe8efd9753fef907d92
lgoldstien/legacy.JS
app.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\nconst Foxx = require('org/arangodb/foxx');\nconst schema = require('./schema');\nconst graphql = require('graphql-sync').graphql;\n\nconst ctrl = new Foxx.Controller(applicationContext);\n\n// This is a regular Foxx HTTP ...
javascript
edit
0
2
apache-2.0
120096cd116a7dcd910ea5d887a6e969b206b53d
arangodb-foxx/demo-graphql
controller.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*\r\nCopyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.\r\nFor licensing, see LICENSE.html or http://ckeditor.com/license\r\n*/\r\n\r\nCKEDITOR.editorConfig = function( config )\r\n{\r\n\t// Define changes to ...
javascript
edit
0
1
bsd-3-clause
c02374368a35d3780d67d88c79e8bfef139fae80
ZG-Tennis/django-ckeditor,ZG-Tennis/django-ckeditor,ZG-Tennis/django-ckeditor,ZG-Tennis/django-ckeditor,ZG-Tennis/django-ckeditor
ckeditor/static/ckeditor/ckeditor/config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\"use strict\";\n/* @flow */\n\nconst Value = require('../Value');\n\nlet serial = 0;\n\n//TODO: We should call this a PropertyDescriptor, not a variable.\n\nclass PropertyDescriptor {\n\tconstructor(value) {\n\t\tthis.value = value;\n\...
javascript
edit
0
1
mit
5de73ce2cf93631bf48fee2ae5ae7c54bd500fba
codecombat/esper.js,codecombat/esper.js,codecombat/esper.js
src/values/PropertyDescriptor.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport TYPES from 'types';\n\nfunction isMember(element) {\n if (element.element) {\n return element.element === TYPES.MEMBER;\n }\n\n return element === TYPES.MEMBER;\n}\n\nfunction getValueType({element, content}) {\n if (isMem...
javascript
edit
null
null
mit
dbe6cea973ff30b9b5ca61f09b34b61b8cf5295d
apiaryio/attributes-kit,apiaryio/attributes-kit,apiaryio/attributes-kit
src/elements/element.js
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar browserify = require('browserify');\nvar cssify = require('cssify');\nvar watchify = require('watchify');\nvar through = require('through');\nvar fs = require('fs');\nvar path = require('path');\nvar cp = require('child_process');\n...
javascript
edit
0
2
bsd-2-clause
67eb630c11fe5ef0578411745d9734714ae39022
ahocevar/openlayers-app,ahocevar/openlayers-app
util/debug.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar http = require('http');\nvar os = require('os');\n\nvar handler = function(request, response) {\n response.writeHead(200);\n response.end(\"You've hit \" + os.hostname());\n}\n\nvar www = http.createServer(handler);\nwww.liste...
javascript
edit
0
1
mit
66d7acce7bf82ddc0a0afa5e1fae8e6a13214c47
Evalle/k8s-in-action,Evalle/k8s-in-action
Chapter_2/app.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// @flow\n\nimport { RANGE } from \"constants/controlTypes\";\n\nimport type { ColorRGBA } from \"types\";\n\nconst optionTypes = {\n levels: { type: RANGE, range: [1, 256], default: 2 }\n};\n\nconst defaults = {\n levels: optionTypes...
javascript
edit
null
null
mit
e4594662b73173fae86d3ad64351828421aae962
gyng/ditherer,gyng/ditherer,gyng/ditherer
src/palettes/nearest.js
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport CompleteBlock from './completeBlock.html';\nimport './completeBlock.scss';\n\nclass CompleteBlock {\n\tstatic detailsComponent() {\n\t\treturn {\n\t\t\ttemplateUrl: CompleteBlock,\n\t\t\tbindings: {\n\t\t\t\theaderImg: '@',\n\t\t...
javascript
edit
0
1
mit
8d479ed64e6e21445cfa8e5c60f46605bd8eea5a
kevincaradant/web-template-webpack,kevincaradant/web-template-webpack
lib/components/completeBlock/completeBlock.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n$(function() {\n var $friend_request_button = $(\"#send-friend-request-button\");\n var $friend_request_sent_message = $(\"#friend-request-sent-message\");\n\n $friend_request_button.on('click', function () {\n var $that...
javascript
edit
0
1
apache-2.0
26b3b8c32d8fd9a51e374f4cdd278a5fcec92daf
TeamAADGT/CMPUT404-project-socialdistribution,TeamAADGT/CMPUT404-project-socialdistribution,TeamAADGT/CMPUT404-project-socialdistribution
project/static/js/authors/friend-requests.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\"use strict\";\n\n/**\n * @ngdoc service\n * @name arethusa.core.arethusaLocalStorage\n *\n * @description\n * Arethusa's API to communicate with `localStorage`. All values stored are\n * prefixed with `arethusa.`.\n *\n * Performs typ...
javascript
edit
0
2
mit
b1416f9fabc1a6c17436eb443050ec8e997abc1a
Masoumeh/arethusa,fbaumgardt/arethusa,PonteIneptique/arethusa,alpheios-project/arethusa,alpheios-project/arethusa,latin-language-toolkit/arethusa,fbaumgardt/arethusa,Masoumeh/arethusa,PonteIneptique/arethusa,alpheios-project/arethusa,fbaumgardt/arethusa,latin-language-toolkit/arethusa
app/js/arethusa.core/arethusa_local_storage.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nexports.config = {\n specs: ['ui/**/*.spec.js'],\n sauceUser: process.env.SAUCE_USERNAME,\n sauceKey: process.env.SAUCE_ACCESS_KEY,\n baseUrl: 'http://localhost:3000',\n capabilities: {\n 'browserName': 'firefox',\n ...
javascript
edit
0
0
mit
46c3ec4c3eb99e3a8812e6674ce6940f4f15a5aa
agilejs/2014-10-code-red
test/client/ui-saucelabs.conf.js
accepted
null
true
[ { "role": "user", "content": "Write javascript code for the following: Add cliffton-server object & some base functionality" }, { "role": "assistant", "content": "//@Authors: Oliver Barnwell(ob6160) Harry Dalton(Hoolean)\n\n//Requires\nvar net = require(\"net\");\nvar util = require(\"util\");\n...
javascript
new_file
null
null
mit
f273fe7f02f95698fbb139aa63b9ceccf65ba8db
CliftonJS/clifton-smtp
lib/clifton-smtp.js
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```javascript\nexport function asyncHandler(handler) {\n return function(req, res, next) {\n if (!handler) {\n throw new Error(`Invalid handler ${handler}, it must be a function.`);\n }\n\n handler(req, res, next)\n .then(function(...
javascript
edit
0
3
mit
efbef4f393cd571b593b5aafb7cd3465f1102e62
arkakkar/electron-update-api,TakeN0/squirrel-updates-server,Aluxian/squirrel-updates-server
src/components/utils.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n//= require jquery\n//= require jquery_ujs\n//= require jquery.remotipart\n//= require select2\n//= require cocoon\n//= require dropzone\n//= require govuk/selection-buttons\n//= require moj\n//= require modules/moj.cookie-message.js\n/...
javascript
edit
0
2
mit
a1e25a3e10cc2ce7cbf9c07284981cd2cc5b85eb
ministryofjustice/advocate-defence-payments,ministryofjustice/advocate-defence-payments,ministryofjustice/advocate-defence-payments,ministryofjustice/advocate-defence-payments
app/assets/javascripts/application.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n function chart(selection) {\n\n // Merging the various user params\n vars.user_vars = vistk.utils.merge(vars.user_vars, vars._user_vars);\n\n // Merging with current charts parameters set by the user in the HTML file\n var...
javascript
edit
null
null
mit
b05972b6d8695469c655f89235773cea751e7410
cid-harvard/vis-toolkit,cid-harvard/vis-toolkit
src/star_constructor.js
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// This is a manifest file that'll be compiled into application.js, which will include all the files\n// listed below.\n//\n// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,\n// or v...
javascript
edit
0
0
mit
97b56dd8f09dbc18f4c57652fd665f325aec6bcb
ninabreznik/RefugeesWork,ninabreznik/RefugeesWork,ninabreznik/RefugeesWork
app/assets/javascripts/application.js
rejected_duplicate
Near-duplicate of sample 70934
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport ReactDOM from 'react-dom';\nimport React from 'react';\nimport { shallow, render } from 'enzyme';\nimport { expect } from 'chai';\nimport { Text } from 'recharts';\n\ndescribe('<Text />', () => {\n it('Does not wrap long text if...
javascript
edit
0
1
mit
650f4373a69a4af57def67ce53356ef8093e603b
recharts/recharts,sdoomz/recharts,recharts/recharts,sdoomz/recharts,thoqbk/recharts,thoqbk/recharts,sdoomz/recharts,recharts/recharts,recharts/recharts,thoqbk/recharts
test/specs/component/TextSpec.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// This is a manifest file that'll be compiled into application.js, which will include all the files\n// listed below.\n//\n// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,\n// or v...
javascript
edit
0
0
mit
15732c641dfbd0d814dff0bb6cfdc9c0d4293d2a
fma2/cfe-money,fma2/cfe-money,fma2/cfe-money
app/assets/javascripts/application.js
rejected_duplicate
Near-duplicate of sample 77977
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n#!/usr/bin/env node\n\n'use strict';\n\nvar childProcess = require('child_process');\n\n/**\n * play\n * To run the process to match the platform.\n * @param {string} filepath\n * @param {function} callback\n * @return {Object} childPro...
javascript
edit
0
5
mit
9df9040dfbb5004a3a3ff90287caed2d03c77c3f
MaxMEllon/simplayer
simplayer.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n//= require jquery\n//= require leaflet\n//= require leaflet-ajax\n//= require leaflet-routing-machine\n//= require osmtogeojson\n//= require maps\n\n\n$(\"#agua\").change(function () {\n if (this.checked) {\n showWindsLayer()...
javascript
edit
null
null
mit
bc85619117de88c6248f7652bb82a9396f35adc9
ForestGuardian/ForestGuardianBackend,ForestGuardian/ForestGuardianBackend,ForestGuardian/ForestGuardianBackend,ForestGuardian/ForestGuardianBackend,ForestGuardian/ForestGuardianBackend
app/assets/javascripts/web.js
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { danger, warn } from 'danger';\n\nconst packageChanged = danger.git.modified_files.includes('package.json');\nconst lockfileChanged = danger.git.modified_files.includes('package-lock.json');\nif (packageChanged && !lockfileChang...
javascript
edit
0
0
mit
9fe2fb9aed4fb4c8833443a4df400591d18976da
styleguidist/react-styleguidist,sapegin/react-styleguidist,sapegin/react-styleguidist,styleguidist/react-styleguidist,bluetidepro/react-styleguidist,styleguidist/react-styleguidist
dangerfile.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict'\n\nvar github = require('octonode')\nvar client = github.client()\nvar evRepo = client.repo('nodejs/evangelism')\n\nvar https = require('https')\nvar path = require('path')\nvar fs = require('fs')\n\n/* Currently proof-of-c...
javascript
edit
0
2
mit
fdedf38a1ccc570ca5ce30e4bf72a0927fa119b1
strawbrary/nodejs.org,marocchino/new.nodejs.org,abdelrahmansaeedhassan/yuri,boneskull/new.nodejs.org,nodejs/new.nodejs.org,rnsloan/new.nodejs.org,yous/new.nodejs.org,matthewloring/new.nodejs.org,rnsloan/new.nodejs.org,boneskull/new.nodejs.org,yous/new.nodejs.org,nodejs/new.nodejs.org,strawbrary/nodejs.org,phillipj/new....
scripts/tasks/download.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Promise from 'bluebird'\nimport { omit, defaults } from 'lodash/object'\nimport { partialRight } from 'lodash/partialRight'\nimport * as defaultTransformers from './transformers'\n\nconst spaceEntities = [\n 'contentTypes', 'ent...
javascript
edit
0
1
mit
5b3e52464bb32c64ba3c08a705c166a064fc537a
contentful/contentful-batch-libs
lib/transform/transform-space.js
rejected_duplicate
Near-duplicate of sample 79333
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar initialized = false;\nvar options = {};\n\nPebble.addEventListener(\"ready\", function() {\n console.log(\"ready called!\");\n initialized = true;\n});\n\nPebble.addEventListener(\"showConfiguration\", function() {\n console.log(...
javascript
edit
0
4
mit
4ffa7245d7f0cb5e053ff3219d8b586c62938819
pebble-hacks/js-configure-demo,pebble-hacks/js-configure-demo,pebble-hacks/js-configure-demo,pebble-hacks/js-configure-demo
src/js/pebble-js-app.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nclass ResultController {\n constructor(SocketService, GameService, toastr, _, GameFactory) {\n 'ngInject';\n\n this._ = _;\n this.GameService = GameService;\n this.players = GameService.players;\n this.toastr = toastr;\n...
javascript
edit
0
3
mit
22935d8ed0181fba9910f01d00a8c148de4be021
hendryl/Famous-Places-Web,hendryl/Famous-Places-Web
src/app/result/result.controller.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst P = require('bluebird');\nconst preq = require('preq');\nconst uuid = require('cassandra-uuid').TimeUuid;\n\nfunction getResourceChangeEvent(resourceUri, domain) {\n return {\n meta: {\n topic: 'resource_change',\n u...
javascript
edit
0
2
apache-2.0
93b91cb3ba328cc5da19b4eb13293dd7eb176a1f
kartotherian/kartotherian,kartotherian/kartotherian,nyurik/kartotherian,nyurik/kartotherian,nyurik/kartotherian,nyurik/kartotherian,kartotherian/kartotherian,kartotherian/kartotherian
packages/tilerator/lib/EventService.js
rejected_duplicate
Near-duplicate of sample 86063
true