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\nimport DefaultContainer from './DefaultContainer'\nimport {getFieldType} from '../utils/getFieldType'\nconst noop = () => {}\n\nexport function createFieldValue(value, context) {\n\n const {schema, field, resolveContainer} = context\n\...
javascript
edit
0
4
mit
20c23bb1482b7bf2498baa46db2b97fba6ff701d
sanity-io/sanity,sanity-io/sanity,sanity-io/sanity,sanity-io/sanity
src/state/FormBuilderState.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nangular.module('mean.system').controller('IndexController', ['$scope', 'Global', 'socket', function ($scope, Global, socket) {\n $scope.global = Global;\n socket.on('test', function() {\n console.log('test!');\n });\n}]);\...
javascript
edit
0
3
mit
782f9a4018618fc0615b7857848a0f7d918a77bf
andela/kissa-cfh-project,andela/kiba-cfh,andela/temari-cfh,andela/kissa-cfh-project,cardsforhumanity/cardsforhumanity,andela/kiba-cfh,cardsforhumanity/cardsforhumanity,andela/temari-cfh
public/js/controllers/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar gulp = require('gulp');\nvar paths = require('./_paths');\nvar concat = require('gulp-concat');\n\ngulp.task('scripts', ['clean-js', 'lint'], function() {\n var scripts = paths.vendor_scripts.concat(paths.scripts);...
javascript
edit
0
1
mit
1264e8cea2ee7a0289344b516f064ac0f5329fdb
ministryofjustice/cla_public,ministryofjustice/cla_public,ministryofjustice/cla_public,ministryofjustice/cla_public
tasks/scripts.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/** @jsx React.DOM */\n'use strict'\n\nvar React = require('react-tools/build/modules/React');\n\nvar statusForm = React.createClass({\n render: function(){\n return <form class=\"form-horizontal\" role=\"form\">\n <di...
javascript
edit
null
null
mit
c09a44b92c9d689e80f6c0492614dc56705bbfb0
thomasboyt/JSXHint,STRML/JSXHint,henricavalcante/JSXHint,Shriken/JSXHint
test/fixtures/test_article.js
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport candela from './../../src/candela';\nimport indexContent from './index.jade';\nimport 'javascript-detect-element-resize/detect-element-resize';\nimport './index.styl';\n\nfunction showPage () {\n [...document.getElementsByClassN...
javascript
edit
0
2
apache-2.0
e11cdbfdf605225184acbc48a7af45a719d0a832
Kitware/candela,Kitware/candela,Kitware/candela,Kitware/candela,Kitware/candela
app/resize/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport gulp from 'gulp';\nimport del from 'del';\n\nconst list = [\n 'src/web/**/*.css',\n 'src/web/**/*.css.map',\n 'src/web/**/*.js.map',\n 'dist/**/*',\n // exclusion\n '!src/web/vendor/**'\n];\n\nexport default (op...
javascript
edit
0
1
mit
29ec5b25a9a10568e98eee4bd6964e58090ac470
cheton/cnc,cncjs/cncjs,cncjs/cncjs,cheton/piduino-grbl,cncjs/cncjs,cheton/piduino-grbl,cheton/cnc.js,cheton/cnc,cheton/cnc.js,cheton/piduino-grbl,cheton/cnc,cheton/cnc.js
gulp/tasks/clean.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar ids = ['yeka52', 'maboyong', 'datouma', 'gaizhilizcw', 'tianhao', 'qinnan', 'lianghuan', 'talich', \n'loveletter', 'zenithdie', 'Glasschurch', 'nosensedigit', 'oldplusnew', 'negative2', \n'taosay', 'DKLearnsPop', 'mactalk', 'lswlsw'...
javascript
edit
0
0
apache-2.0
66bea3348e4c84a9a9d45eddbc1cf1e8c0932d3a
songchenwen/zhuanlan-rss,songchenwen/zhuanlan-rss
index.js
rejected_duplicate
Near-duplicate of sample 96014
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nfunction successMessage(message) {\n new PNotify({\n title: 'Success!!',\n text: message,\n type: 'success'\n });\n}\n\nfunction errorMessage(message) {\n new PNotify({\n title: 'Failed!!',\n ...
javascript
edit
0
4
mit
2fc2997ac3f47d4101a96d39e6850ff620e976d3
gctomakin/renTRMNL,gctomakin/renTRMNL,gctomakin/renTRMNL
assets/js/common.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\"use strict\";\n\nmodule.exports = {\n\n twitter: {\n consumer_key: \"\",\n consumer_secret: \"\",\n access_token: \"\",\n access_token_secret: \"\"\n },\n\n timezone: \"Asia/Tokyo\",\n\n themeCount: 4,\n\n themes: [\n...
javascript
edit
0
0
mit
d73050a1e157f1786a0361cec00768f170fad647
rot1024/gochiusa-onedraw-bot
config-sample.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { createAction } from 'redux-actions';\nimport backend from '../service/backend.js';\n\n\nexport default createAction(\n 'GET_CARDATA',\n async (searchQuery) => await backend.getCarData(searchQuery)\n);\n\n```\n\nApply this ch...
javascript
edit
0
1
mit
6d702bff33fc8da1f8063219674ac4f2d02aa103
InconspicuousPaprika/Car.ly,Biletnikoff/Car.ly,Biletnikoff/Car.ly,dgilroy77/Car.ly,cehsu/Car.ly,dgilroy77/Car.ly,cehsu/Car.ly,InconspicuousPaprika/Car.ly,Biletnikoff/Car.ly,cehsu/Car.ly,Jzucca/Car.ly,Jzucca/Car.ly,dgilroy77/Car.ly,InconspicuousPaprika/Car.ly,Jzucca/Car.ly
src/actions/searchActions.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// config/initializers/database.js\n\nvar config = require('nconf');\nvar mongoose = require('mongoose');\n\nmodule.exports = function(cb) {\n 'use strict';\n // Initialize the component here then call the callback\n mongoose.connect...
javascript
edit
0
2
mit
a03b6f2c8c34123f1213cfc790fc4b06ee94bef0
hamehta3/aaa-drivinglaws-api
config/initializers/database.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * Validate if the application is in beta\n * and the user has the access token to\n * view the beta version.\n *\n * If not authorized session, then display coming soon\n */\nconst env = require('../env')\n\nmodule.exports = (app)...
javascript
edit
0
6
mit
95a5b7ae3438ae47aff3102077dce77464a5430c
ferreiro/website,ferreiro/website
setup/setupBeta.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport HomeRoute from 'routes/Home'\n\ndescribe('(Route) Home', () => {\n let _component\n\n beforeEach(() => {\n _component = HomeRoute.component()\n })\n\n it('Should return a route configuration object', () => {\n expect(ty...
javascript
edit
0
1
mit
d7ef13680371c6ca8176826a5f140cd1fe6eea13
techcoop/techcoop.group,techcoop/techcoop.group
tests/routes/Home/index.spec.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React, { Component } from 'react'\n\n//class-based component (ES6)\nclass SearchBar extends Component {\n constructor(props) {\n super(props);\n\n this.state = { term: '' }\n }\n\n render() { //method definition in ES6\n...
javascript
edit
0
1
mit
5fe6d82e9acbdd8baed5bd8d8e3e0eb182c5fd19
phirefly/react-redux-starter,phirefly/react-redux-starter
src/components/search_bar.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst {Record} = require('immutable');\n\nconst MonitorRecord = Record({\n id: null, // Block Id\n /** Present only if the monitor is sprite-specific, such as x position */\n spriteName: null,\n /** Present only if the monit...
javascript
edit
0
0
bsd-3-clause
13dfef553e22433d89800c6a2d90dadc8a968fcd
LLK/scratch-vm,LLK/scratch-vm,LLK/scratch-vm
src/engine/monitor-record.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\nrequire('../helpers');\nconst assert = require('assert');\nconst Ironium = require('../..');\n\n\ndescribe('Queue with delay', function() {\n\n const captureQueue = Ironium.queue('capture');\n\n // Capture processed jo...
javascript
edit
0
1
mit
88799cb55ee1b65f89469cee296fc40d51ac05d4
assaf/ironium
test/queue/with_delay_test.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nexport class Enemy extends Phaser.Sprite {\n constructor(game, x, y) {\n super(game, x, y, 'enemy');\n this.anchor.setTo(0.5);\n this.game.add.existing(this);\n this.game.physics.arcade.enable(this);\n\n ...
javascript
edit
0
1
mit
9346e4bdabedbd3f5e97152577dbaaa3c9fd0779
themadknights/wellofeternity,themadknights/wellofeternity
src/js/sprites/enemy.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// Expose plugin as an AMD module if AMD loader is present:\n(function (factory) {\n 'use strict';\n\n if (typeof define === 'function' && define.amd) {\n define(['knockout', 'jquery'], factory);\n } else {\n window.ko.bindingH...
javascript
edit
0
3
mit
0f39be8e6d579dca27d371545a6e1f53658da8a6
janfoeh/veiljs,janfoeh/veiljs,janfoeh/veiljs
veil-knockout.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\r\n$(document).ready(function () {\r\n\talert('page loaded.');\r\n\tmixpanel.track(\"Page loaded\");\r\n\t\r\n\t$(\"#my_button\").click(function() {\r\n // This sends us an event every time a user clicks the button\r\n mixpanel.t...
javascript
edit
0
1
mit
1309a7fbab4fd501b2280f48357b24632a0f8337
stefanhapper/politix,stefanhapper/politix,stefanhapper/politix
web/js/script.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function (context) {\n var λ = {};\n\n λ.map = function (coll, func) {\n var output = [];\n for (var index in coll) {\n output.push(func(coll[index]));\n }\n return output;\n };\n\n λ.reduce = function (coll, func)...
javascript
edit
0
4
unlicense
aeac97437c856d08a5bc545c966b5701004d82d0
CWDG/Functional-JavaScript-Talk
js/lambda.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar buttons = require('sdk/ui/button/action');\nvar panels = require(\"sdk/panel\");\nvar self = require(\"sdk/self\");\nconst {Cu} = require(\"chrome\");\n\nCu.import(self.data.url('freedom-for-firefox.jsm'));\n\n// Main uProxy button....
javascript
edit
0
1
apache-2.0
cbbce1c48f784449a4210e4eefc5dff339649eb6
chinarustin/uproxy,jpevarnek/uproxy,qida/uproxy,itplanes/uproxy,uProxy/uproxy,qida/uproxy,chinarustin/uproxy,roceys/uproxy,jpevarnek/uproxy,MinFu/uproxy,chinarustin/uproxy,dhkong88/uproxy,IveWong/uproxy,roceys/uproxy,dhkong88/uproxy,dhkong88/uproxy,chinarustin/uproxy,uProxy/uproxy,itplanes/uproxy,roceys/uproxy,dhkong88...
src/firefox/lib/main.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\"use strict\";\n\nmodule.exports = function(ecs, data) { // eslint-disable-line no-unused-vars\n\tecs.addEach(function(entity, context) { // eslint-disable-line no-unused-vars\n\t\tvar position = data.entities.get(entity, \"position\")...
javascript
edit
0
1
mit
7eb522b3cd72bb584d7b053cde79b9ca08f0ec22
CaldwellYSR/Bug_Catcher,RiseAndShineGames/LudumDare35,RiseAndShineGames/BugCatcher,RiseAndShineGames/BugCatcher,RiseAndShineGames/LudumDare35,RiseAndShineGames/Polymorphic,SplatJS/splat-ecs-starter-project,RiseAndShineGames/Polymorphic,SplatJS/splat-ecs-starter-project,CaldwellYSR/Bug_Catcher
src/systems/renderer/sample-renderer-system.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\n/**\n * An asynchronous bootstrap function that runs before\n * your application gets started.\n *\n * This gives you an opportunity to set up your data model,\n * run jobs, or perform some special logic.\n */\n\nmodule...
javascript
edit
0
1
mit
ac95603a12c5b49e073b019c462ebad714159c5e
wistityhq/strapi,wistityhq/strapi
packages/strapi-generate-new/lib/resources/files/config/functions/bootstrap.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\njQuery(document).ready(function() {\n\tjQuery('.field-upload').each(function() {\n\t\tvar field = jQuery(this);\n\t\tvar file = field.find('.file');\n\t\tvar upload = field.find('.upload');\n\t\tvar hidden = upload.find('input[type = \"...
javascript
edit
0
2
mit
0fc2d4b516a5534184e2ff7e3bcd89c2e5e579ff
embarknow/journey-cms,symphonycms/symphony-3,psychoticmeow/journey-cms,embarknow/journey-cms,embarknow/journey-cms,psychoticmeow/journey-cms,embarknow/journey-cms,embarknow/journey-cms,psychoticmeow/journey-cms,psychoticmeow/journey-cms,psychoticmeow/journey-cms,symphonycms/symphony-3
extensions/field_upload/assets/publish.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*global define*/\ndefine([\n 'underscore',\n 'backgrid'\n], function (_, Backgrid) {\n 'use strict';\n\n var SelectCellRadioEditor;\n\n SelectCellRadioEditor = Backgrid.SelectCellEditor.extend({\n /**\n * ...
javascript
edit
0
1
mit
b6db9444b7bb99d519c47baae311c7db005c07e8
2ndkauboy/platform,trustify/oroplatform,ramunasd/platform,trustify/oroplatform,ramunasd/platform,ramunasd/platform,orocrm/platform,Djamy/platform,northdakota/platform,2ndkauboy/platform,geoffroycochard/platform,hugeval/platform,trustify/oroplatform,orocrm/platform,Djamy/platform,geoffroycochard/platform,hugeval/platfor...
src/Oro/Bundle/DataGridBundle/Resources/public/js/datagrid/editor/select-cell-radio-editor.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nexport default date => {\n const diff = new Date(date).getTime() - Date.now();\n const days = Math.floor(diff / 86400 / 1000);\n\n return `${days} days`;\n};\n\n```\n\nApply this change: Change wording for 0 and 1 day" }, { "...
javascript
edit
0
3
mit
070e31a447ec330c25609dd2f88c0ee0e06fd70e
jenovs/bears-team-14,jenovs/bears-team-14
client/src/helpers/getRemainingTime.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\ndescribe(\"My demo suite\", function() {\n\tit(\"contains spec with my demo expectation\", function() {\n\t\texpect(1).toBe(1);\n\t});\n});\n\n\n```\n\nApply this change: Use toBe and not.toBe matcher. Look spec as a function" }, { ...
javascript
edit
0
1
mit
1bbd5bcc31fe2f812d559378ee598742faa3a2e9
philipdai/myjasminedemo,philipdai/myjasminedemo
spec/MydemoSpec.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nfunction createSleepPromise(timeout) {\n return new Promise(function(resolve) {\n setTimeout(resolve, timeout);\n });\n}\n\nfunction sleep(timeout) {\n // Pass value through, if used in a promise chain\n function prom...
javascript
edit
0
3
mit
678557cd57ef1bbad3d46af3219e78ef619198dc
brummelte/sleep-promise
lib/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict'\n\nvar BridgeObservable = require('vigour-native/lib/bridge/BridgeObservable')\nvar Plugin = require('vigour-native/lib/bridge/Plugin')\nvar name = require('../package.json').name\n\nvar AlphaColor = new BridgeObservable({\...
javascript
edit
0
0
bsd-2-clause
6afaf2ee4bce41abc100ca69745a95e768d0e9b5
vigour-io/statusbar,vigour-io/statusbar
lib/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nangular\n .module('app')\n .controller('featureNewController', [\n '$scope',\n '$location',\n '$routeParams',\n 'userService',\n 'featureService',\n 'actionKitService',\n '$rootScope',\n function($scope, $locat...
javascript
edit
0
1
mit
2b7306be7ce8b2a003494239ba3b72150171d0de
brettshollenberger/rootstrikers,brettshollenberger/rootstrikers
client/app/scripts/controllers/admin/features/new.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar $ = require('jQuery');\nvar componentEvent = require('kwf/component-event');\nvar cookies = require('js-cookie');\n\nvar onOptChangedCb = [];\nvar api = {\n getDefaultOpt: function() {\n var defaultOpt = $('body').data('co...
javascript
edit
0
3
bsd-2-clause
45428b90917b117a32d21e4c762037953c3a65dd
koala-framework/koala-framework,koala-framework/koala-framework
commonjs/cookie-opt/adapter.js
rejected_duplicate
Near-duplicate of sample 94204
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* jslint node: true */\n'use strict'\n\nvar utils = require('../lib/utils')\nvar challenges = require('../data/datacache').challenges\n\nmodule.exports = function (sequelize, DataTypes) {\n var Complaint = sequelize.define('Complaint'...
javascript
edit
0
4
mit
ee8233732cb43aa0a5aa638a55ac7dabb67e3732
bonze/juice-shop,oviroman/disertatieiap2017,oviroman/disertatieiap2017,bonze/juice-shop,bonze/juice-shop,m4l1c3/juice-shop,bkimminich/juice-shop,bkimminich/juice-shop,m4l1c3/juice-shop,bkimminich/juice-shop,bonze/juice-shop,bonze/juice-shop,m4l1c3/juice-shop,m4l1c3/juice-shop,oviroman/disertatieiap2017,oviroman/diserta...
models/complaint.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = function(grunt) {\n\n grunt.initConfig({\n pkg: grunt.file.readJSON('package.json'),\n\n sass: {\n dist: {\n files: {\n 'css/application.css': '../application.sass'\n }\n }\n }...
javascript
edit
0
1
mit
64e11acbe71330da23c162b0907d8e0e3ca98e10
mvcss/mvcss,mvcss/mvcss
_build/Gruntfile.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React, { Component } from 'react';\nimport { Link } from 'react-router';\nimport gamepad from '../dependencies/img/gamepad.png';\nimport keyboard from '../dependencies/img/keyboard.png';\n\nexport default class Index extends Comp...
javascript
edit
0
1
mit
bd8053484844208b72f825dd4c41fda41b9ea2d9
DjLeChuck/recalbox-manager,DjLeChuck/recalbox-manager,DjLeChuck/recalbox-manager
client/src/components/Index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar config = require(\"./config.js\");\n\nvar express = require('express');\nvar http = require('http');\nvar path = require('path');\n\nvar app = express();\nvar server = http.createServer(app);\nvar io = require('socket.io').listen(se...
javascript
edit
0
1
mit
97ed59bcd2f80b4ed03e144bc7e7e9badfed09fb
jimguys/poemlab,jimguys/poemlab
app.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar Runner = require('./runner').Runner;\n\nmodule.exports = function (ws) {\n\n /*var id = setInterval(function() {\n ws.send(JSON.stringify(process.memoryUsage()), function() { });\n }, 1000);\n console.log('started cl...
javascript
edit
0
1
apache-2.0
bb899803405e9f3bb24008d0019ddc9c931c81d0
AI-comp/AILovers,AI-comp/AILovers,AI-comp/AILovers,AI-comp/AILovers,AI-comp/AILovers,AI-comp/AILovers
server/wsEvents.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n;(function(root) {\n 'use strict';\n\n var blankshield = function(ele) {\n addEvent(ele, 'click', function(e) {\n var href, usedModifier, child;\n\n href = e.target.getAttribute('href');\n if (!href) return;\n\n ...
javascript
edit
0
7
mit
c2cab2cafb54106a5f0b5b185d1ff2614e70ae7b
danielstjules/blankshield
blankshield.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n#!/usr/bin/env node\n\n'use strict';\n\nvar fs = require('fs');\nvar path = require('path');\nvar log = require('verbalize');\nvar argv = require('minimist')(process.argv.slice(2));\nvar parser = require('./');\n\nlog.runner = 'npmignor...
javascript
edit
0
2
mit
ba530e5b88e07b5e6df70da60283f4d70567ac19
jonschlinkert/npmignore
cli.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nfunction r7d_selectDocument(documentId, checked, value) {\n var values = JSON.parse(value);\n var index = values.indexOf(documentId);\n if (checked) {\n if (index < 0) {\n values.push(documentId);\n }\n...
javascript
edit
0
4
mit
d3bdcaf614aa877ed102ff1041a7884d6eee84f0
roman-yagodin/R7.Documents,roman-yagodin/R7.Documents,roman-yagodin/R7.Documents
R7.Documents.Dnn/js/selectDocuments.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar assign = require('es5-ext/object/assign')\n , promisify = require('deferred').promisify\n , bcrypt = require('bcrypt')\n , dbjsCreate = require('mano/lib/utils/dbjs-form-create')\n , rou...
javascript
edit
0
2
mit
a451e50a75d7ee01d72d34c680c9d948c4fde14f
egovernment/eregistrations,egovernment/eregistrations,egovernment/eregistrations
controller/users-admin/server.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// @flow\n\nimport chokidar from 'chokidar'\n\nexport default class AdapterChokdiar {\n handle: Object\n rootDirectory: string\n constructor(rootDirectory: string, onChange: (path: string) => void) {\n this.rootDirectory = rootDir...
javascript
edit
null
null
mit
fb7f50252c31c503e1ebe65561fa03f5a868ce56
steelbrain/pundle,steelbrain/pundle,steelbrain/pundle,motion/pundle
packages/pundle-core/lib/watcher/adapter-chokidar.js
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar HtmlWebpackPlugin = require('html-webpack-plugin');\nvar HTMLWebpackPluginConfig = new HtmlWebpackPlugin({\n template: __dirname + '/app/index.html',\n filename: 'index.html',\n inject: 'body'\n});\n\nmodule.exports = {\n entry:...
javascript
edit
0
0
mit
b345f6212f3c783a4736914b19f411dadf90b0c4
cimm/blathy,cimm/blathy
webpack.config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* global __dirname */\n\n'use strict';\n\nvar webpack = require('webpack');\n\nvar commonsPlugin = new webpack.optimize.CommonsChunkPlugin('common.js');\n\nmodule.exports = {\n context: __dirname + '/client',\n entry: {\n index: '...
javascript
edit
0
0
mit
cbd66e8256e91941e91eebb999ea65e2250c5d7f
ebertmi/webbox,ebertmi/webbox,ebertmi/webbox
webpack.config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { GraphQLObjectType, GraphQLID } from 'graphql';\nimport buildAttributes from './buildAttributes';\nimport buildRelationships from './buildRelationships';\nimport titleizeType from './titleizeType';\n\nconst getDefaultDescription...
javascript
edit
0
4
mit
8f41cbedd9afca3c812e8c98cfd8e50d7394ae4c
dylnslck/micrograph
src/instantiateObjectTypes.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n\n*/\n(function($) {\n \n $.fn.inputFileText = function(userOptions) {\n var MARKER_ATTRIBUTE = 'data-inputFileText';\n\n if(this.attr(MARKER_ATTRIBUTE) === 'true') {\n // Plugin has already been applied...
javascript
edit
0
2
mit
7074cfd271da781ded38d612a88881c882e193dd
datchung/jquery.inputFileText,datchung/jquery.inputFileText
src/jquery-input-file-text.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n$.fn.storeAutocomplete = function() {\n this.select2({\n minimumInputLength: 1,\n multiple: true,\n initSelection: function(element, callback) {\n $.get(Spree.routes.store_search, { ids: element.val() }, function(data) {\...
javascript
edit
0
1
bsd-3-clause
fd8013b3e7635940abba3382940792c41316aacf
solidusio/solidus_multi_domain,solidusio/solidus_multi_domain,solidusio/solidus_multi_domain
lib/assets/javascripts/spree/backend/store_picker.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar EDSN_THRESHOLD = 30;\n\nvar EdsnSwitch = (function(){\n var editing;\n var validBaseLoads = /^(base_load|base_load_edsn)$/;\n\n EdsnSwitch.prototype = {\n enable: function(){\n if(editing){\n swapEdsnBaseLoadSelect...
javascript
edit
0
2
mit
07500b1d868a4c623233b54c9cf8c29048cc732e
quintel/etmoses,quintel/etmoses,quintel/etmoses,quintel/etmoses,quintel/etmoses
app/assets/javascripts/edsn.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react'\nimport PropTypes from 'prop-types'\nimport { Sticky } from 'react-sticky'\n\nimport styles from './Warning.scss'\n\nclass Warning extends React.PureComponent {\n static propTypes = {\n error: PropTypes.boo...
javascript
edit
0
3
mit
01828cfc40451604b00b7e2380ef3d10bd4714a3
sgmap/inspire,sgmap/inspire
src/components/Warning/Warning.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst path = require('path');\n\nconst BUILD_DIR = 'build';\n\nmodule.exports = {\n globDirectory: BUILD_DIR,\n globPatterns: ['/', '**/*.{html,js,css,woff2,webmanifest}'],\n swSrc: path.join(BUILD_DIR, 'service-worker.js'),\n swDes...
javascript
edit
0
0
mit
f6f772cf69611eaadc29527b230a62c66af2a8cd
esviji/esviji,esviji/esviji
workbox.config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst Disposable = require('event-kit').Disposable\nlet ipcRenderer = null\nlet ipcMain = null\nlet BrowserWindow = null\n\nexports.on = function (emitter, eventName, callback) {\n emitter.on(eventName, callback)\n return new Disposab...
javascript
edit
0
2
mit
9694448f9d41dec92e9cb901e6aa1df163c09d30
PKRoma/atom,Mokolea/atom,Mokolea/atom,PKRoma/atom,andrewleverette/atom,stinsonga/atom,Arcanemagus/atom,Arcanemagus/atom,atom/atom,PKRoma/atom,ardeshirj/atom,andrewleverette/atom,t9md/atom,Mokolea/atom,atom/atom,brettle/atom,brettle/atom,t9md/atom,liuderchi/atom,liuderchi/atom,liuderchi/atom,brettle/atom,ardeshirj/atom,...
src/ipc-helpers.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\"use strict\";\n\nvar View = require(\"./view\");\nvar Router = require(\"./router\");\nvar util = require(\"substance-util\");\nvar _ = require(\"underscore\");\n\n// Substance.Application\n// =========================================...
javascript
edit
0
1
mit
1a444d80b0d5538063cc78477f89034c83271056
substance/application
src/application.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar debug = require('debug')('navigateAction');\n\nmodule.exports = function (context, payload, done) {\n if (!context.router || !context.router.getRoute) {\n debug('no router available for navigate handling');\n return...
javascript
edit
0
6
bsd-3-clause
e4a2d9412379274d43851f7983dcb3056227f273
yahoo/flux-router-component
actions/navigate.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar dbHelpers = require('../database_queries/database_queries.js');\n\nmodule.exports = function(app){\n\tapp.post('/users', function(req, res){\n\t\tvar packet = req.body;\n\t\tif(packet.userId){\n\t\t\tconsole.log('SENDER post event')...
javascript
edit
0
2
mit
4fcfb59b100274a49f5d0e1690d00f042a919b97
MAKE-SITY/MKSTream,MAKE-SITY/MKSTream,SimonDing87/MKSTream,SimonDing87/MKSTream
server/routes/webRTC_routes.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport cheerio from 'cheerio';\nimport moment from 'moment-timezone';\n\nconst originalTimeZone = 'Europe/Kiev';\nconst skiLiftDateFormat = 'DD.MM.YYYY HH:mm:ss';\n\nexport default function proceed(data) {\n\n if (data.error) {\n re...
javascript
edit
0
2
apache-2.0
4853ca160e8d11e536249db120fce4a556be08df
blobor/buka,blobor/skipass.site,blobor/skipass.site,blobor/buka
src/data-access/bukovelAdapter.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * Created by elisahilprecht on 09/04/15.\n */\n(function(){\n var clickOnErrorMessage = function(e) {\n e.toElement.setAttribute('class','help-inline display-none');\n document.getElementById(e.toElement.id.replace('ErrorTe...
javascript
edit
0
6
mit
529811b2a3ca5fd1293a31cf9a18d1c4aa2da1a4
yetu/oauth2-provider,yetu/oauth2-provider,yetu/oauth2-provider,yetu/oauth2-provider
app/assets/javascripts/FormMessageController.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React, { Children, Component, PropTypes } from 'react';\nimport { connect } from 'react-redux';\nimport LoadingView from '../loading-view/LoadingView';\nimport { appStateSelector } from '../_selectors/AppStateSelectors';\n\n/**\n...
javascript
edit
0
3
mit
7dbb7b7bdf33ed50f6e2a719a32e79a91f031e77
binary-com/binary-next-gen,nazaninreihani/binary-next-gen,binary-com/binary-next-gen,qingweibinary/binary-next-gen,nuruddeensalihu/binary-next-gen,nazaninreihani/binary-next-gen,binary-com/binary-next-gen,qingweibinary/binary-next-gen,nuruddeensalihu/binary-next-gen,nazaninreihani/binary-next-gen,nuruddeensalihu/binary...
src/_store/AppStateProvider.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react'\n\nexport default (props) => (\n <div>\n {props.name}\n </div>\n)\n```\n\nApply this change: Add url to meal index" }, { "role": "assistant", "content": "import React from 'react'\n\nexport def...
javascript
edit
0
1
mit
2be2bf5058c3d0fc8d340b851dac267fd8805c47
cernanb/personal-chef-react-app,cernanb/personal-chef-react-app
src/views/Meal.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport stripStyle from '../src/stripStyle';\n\ndescribe('stripStyle', () => {\n it('should ignore `undefined`', () => {\n expect(stripStyle({a: undefined})).toEqual({a: undefined});\n });\n});\n\n```\n\nApply this change: Add some ...
javascript
edit
0
1
mit
9af7f30985a280c6b697f552efdb595752ac2b83
bishopZ/react-motion,chenglou/react-motion,BenoitZugmeyer/preact-motion,keyanzhang/react-motion,threepointone/react-motion,keyanzhang/react-motion,threepointone/react-motion,dieface/react-motion,dieface/react-motion,chenglou/react-motion,bishopZ/react-motion,BenoitZugmeyer/preact-motion
test/stripStyle-test.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nfunction r_d(a) {\n \"use strict\";\n var b = a.slice(), //copy array\n i = 0,\n k = 0,\n length = b.length,\n j,\n buffer = [];\n\n //splicing same elements\n for (i; i < length; i++) {\n ...
javascript
edit
0
7
mit
980856c30e0f0d63a6235d82b7d04960bec5f741
monkeyraptor/remove_duplicates
remove_duplicate_shorter.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * example ebay API request to Trading:GetOrders\n */\n\nvar ebay = require('../index.js');\n\nebay.xmlRequest({\n serviceName : 'Trading',\n opType : 'GetOrders',\n\n // app/environment\n devId: '...........',\n certId: '.......
javascript
edit
0
1
mit
dd9d5a3b9d9d6a03f955dfa23e35d8a73d14b611
benbuckman/nodejs-ebay-api
examples/Trading-GetOrders.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n* Event.js\n*\n* @description :: TODO: You might write a short summary of how this model works and what it represents here.\n* @docs :: http://sailsjs.org/#!documentation/models\n*/\n\nmodule.exports = {\n\n autoWatch: fals...
javascript
edit
0
4
mit
561fae2e6e5786c8e885e0ff9e6ac10ecc606b94
wallaceicy06/Betrayal,wallaceicy06/Betrayal,wallaceicy06/Betrayal
api/models/Event.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*\n Copyright 2013 Weswit Srl\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.ap...
javascript
edit
0
1
apache-2.0
1ad83da4b627cd7e6c33068ee48cc76d6592265e
Lightstreamer/Lightstreamer-example-ChatTile-client-javascript,Weswit/Lightstreamer-example-ChatTile-client-javascript,Weswit/Lightstreamer-example-ChatTile-client-javascript,Lightstreamer/Lightstreamer-example-ChatTile-client-javascript
src/js/lsClient.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar spawn = require('child_process').spawn;\n\nfunction Runner() {\n}\n\nRunner.prototype.init = function(bosco, next) {\n this.bosco = bosco;\n next();\n};\n\nRunner.prototype.list = function(options, next) {\n var installed = true;...
javascript
edit
0
2
mit
dffda50a1cad5dd6ac8f6c6f0db45b702ac54f5b
tes/bosco,tes/bosco
src/RunWrappers/DockerCompose.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst express = require('express');\nconst pg = require('pg');\n\nconst router = express.Router();\n\n// SSL must be used to connect to the DB\nconst DB_URL = process.env.DATABASE_URL + '?ssl=true';\n\nrouter.get('/db', (req, res) => {\...
javascript
edit
0
3
mit
20894c85aea4ea577dd5c5566dd30d7f9acabf8b
jmeas/moolah,jmeas/moolah,jmeas/finance-app,jmeas/finance-app
server/api/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * Copyright 2013-2014 Facebook, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n ...
javascript
edit
0
5
bsd-3-clause
26179d2b79fd1eba4a9db10cb4a5ce615f6b6c51
S0lahart-AIRpanas-081905220200-Service/react,ArunTesco/react,RReverser/react,skyFi/react,billfeller/react,reggi/react,zigi74/react,pandoraui/react,dmitriiabramov/react,jeromjoy/react,nhunzaker/react,ashwin01/react,it33/react,ZhouYong10/react,tomv564/react,orzyang/react,atom/react,arasmussen/react,eoin/react,jmacman007/...
src/vendor/core/dom/isNode.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst Hooter = require('hooter')\n\n\nconst EVENTS = [\n ['init', 'sync'],\n ['start', 'sync'],\n ['execute', 'async'],\n ['execute.batch', 'async'],\n ['execute.one', 'async'],\n ['execute.handle', 'async'],\n ['error', 'sync'],...
javascript
edit
0
2
isc
447a892ba1c6f4b6c6d50a0ca94b041a1eccc3e2
alex-shnayder/comanche
src/comanche.js
rejected_duplicate
Near-duplicate of sample 84346
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar main = require('./main');\nvar extend = require('extend');\nvar defaultOptions = {\n\tdefinitions: false,\n quotes: '\"'\n};\n\nmodule.exports = function (data, options) {\n var regexOptions = options.parserConfig.regex || {};\n\...
javascript
edit
0
4
mit
f8a02fad40dde2daa0600e17e3a44dc132b2981c
apsdehal/qunit-migrate
src/regex/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nif (typeof define !== 'function') { var define = require('amdefine')(module); }\ndefine(['./deferred', './tools'], function(Deferred, tools) {\n\n return {\n asVal: asVal,\n create: create\n };\n\n function create...
javascript
edit
0
2
mit
c90523eae80f211105fd7e2905a549455a544716
gradecam/firewyrm-js,gradecam/firewyrm-js
src/firewyrm.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*global define:false */\ndefine([\"underscore\", \"backbone\"], function (_, Backbone) {\n \"use strict\";\n\n var views = {\n\n BookListItem: Backbone.View.extend({\n tagName: 'li',\n tem...
javascript
edit
0
1
mit
8ca59435d4e2827171d3428db821da6e70111139
biril/backbone-faux-server
examples/books-AMD/app/views.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport Image from './Image';\n\nimport { Link } from 'react-router';\n\nconst NotFoundPage = () => {\n const locations = [\n 'Sahasrahla\\'s pocket',\n 'sick kid\\'s bed',\n 'Hera basement',\n 'k...
javascript
edit
0
3
mit
c6856449d0b69e0199e842458028d04f51668e36
easymac/alttp-map-tracker,easymac/alttp-map-tracker
src/components/NotFoundPage.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar assert = require('assert'),\n Lapidus = require('../index.js'),\n spawnSync = require('child_process').spawnSync,\n fs = require('fs');\n\ndescribe('MySQL', function () {\n var output;\n\n before(function(done) {\n ...
javascript
edit
0
1
mit
12d843dc88533f6db7b43bb72d654053a57ca307
JarvusInnovations/lapidus
test/mysql.test.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nDate; //doc: Creates JavaScript Date instances which let you work with dates and times.\nnew Date; //doc: Creates JavaScript Date instances which let you work with dates and times.\n\nvar myalias = Date;\n\nmyalias; //doc: Creates JavaS...
javascript
edit
0
1
mit
2fcd149b6418298ed41be1bb5167ceca681426a1
emacsmirror/tern,neoclide/tern,neoclide/tern,emallson/tern,neoclide/tern,jgiles/tern,othree/tern,rustemferreira/tern,ryanstewart/tern,marijnh/tern,talyian/tern,ternjs/tern,anandthakker/tern,talyian/tern,talyian/tern,adrianton3/tern,MarcelGerber/tern,messfairy/tern,cdosborn/tern,angelozerr/tern,mcanthony/tern,pombredann...
test/docstrings.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function(window, document, undefined) {\n \"use strict\";\n\n require.config({\n paths: {\n // Libraries\n \"jquery\": \"../../libraries/jquery/jquery\",\n \"hljs\": \"../../libraries/highlightjs/highlight.pack\",\n...
javascript
edit
0
1
mit
5f98bffa11b065ac1b075d30b0ce5be2fe453a2b
rishabhsrao/voxel,rishabhsrao/voxel,rishabhsrao/voxel
app/scripts/main.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// we don't need to use a variable\n// or the from keyword when importing a css/styl file\n// thanks the the styles loader it gets added as a\n// <style> tag in the head by default but can be changed\nimport 'normalize.css';\nimport {ap...
javascript
edit
0
0
mit
28de0bd2815c0abe4a9cef56d4707f78ede3ee1f
kbeloborodko/angular-blog,kbeloborodko/angular-blog
client/app/app.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* global React */\n/* jslint esnext:true */\n\nimport escape from '../escape';\nimport IntlMixin from '../mixin';\n\nfunction escapeProps(props) {\n return Object.keys(props).reduce(function (escapedProps, name) {\n var value...
javascript
edit
0
2
bsd-3-clause
381b357f0bf25d9f345f70d3b8c55a16e4fac166
btd/react-intl,ryan1234/react-intl,btd/react-intl,CumpsD/react-intl,Jonekee/react-intl,hukka/react-intl,keppelen/react-intl,keppelen/react-intl,ryan1234/react-intl,mattikl/react-intl,ericf/react-intl,CumpsD/react-intl,baer/react-intl,tsironis/react-intl,Vungle/react-intl,mattikl/react-intl,tsironis/react-intl,tsironis/...
src/components/html-message.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// This function generates the five statuses from a single CRUD action.\n// For instance, you'd probably pass \"CREATE\", \"READ\", \"UPDATE\", or \"DELETE\"\n// as `crudAction`.\nconst mapConstant = (resourceName, crudAction) => ({\n ...
javascript
edit
0
1
mit
49f8abc62323c6384345e370a5330e477cc1eb64
jmeas/resourceful-redux,jmeas/resourceful-redux
src/action-types.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*\n==================================================================================================\n Lowland - JavaScript low level functions\n Copyright (C) 2012 Sebatian Fastner\n=================================================...
javascript
edit
0
4
mit
1be130e89f07ac9d28ddc133ba9f7d335e4e83e5
fastner/lowland,fastner/lowland
src/ext/Function.js
rejected_duplicate
Near-duplicate of sample 75627
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// L-System Rule Parser\nfunction RuleParser(str) {\n this.str = str;\n this.rules = {};\n\n this.parse = function() {\n var c, d;\n var env = 0;\n var rule_str;\n var variable;\n\n for (var i = 0; i < this.str.length;...
javascript
edit
0
13
bsd-3-clause
98e25d04c5fd4541a66cae07fe8043ba5605676a
dwjackson/html_fractals
express/models/rule_parser.js
rejected_complexity
Cyclomatic complexity too high: 13
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar express = require('express');\nvar router = express.Router();\nvar pipe = require('../transformers/pipe');\n\nrouter.post('/\\\\$cds-hook', function(req, res, next) {\n\n var context = {\n requestParams: req.query || {},\n...
javascript
edit
0
2
mit
cee19b9e8c5c9f3901aa061c066cffe8d37bb88a
ebmeds/ebmeds-fhir,ebmeds/ebmeds-fhir
app/controllers/patient-view.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nrequire('buster').spec.expose();\nvar expect = require('buster').expect;\n\nvar await = require('../lib/combinators/await').await;\nvar observe = require('../lib/combinators/observe').observe;\nvar Stream = require('../lib/Stream');\nva...
javascript
edit
0
1
mit
8a841f7c7501c9085f32a3c08c448f6f102737d2
mostjs/core,mostjs/core,axefrog/most,axefrog/core,nissoh/core,cujojs/most
test/await-test.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\n/* This was necessary to priorize Star Wars: The Clone Wars (2008) over Star Wars: Clone Wars (2003).\n I left this object because it could be useful for other movies/shows */\nvar fullTitles = {\n 'Star Wars: The Clo...
javascript
edit
0
3
mit
dbf35e2f20a7b543d021449611d1e630dca01c67
tegon/traktflix,MrMamen/traktflix,tegon/traktflix,MrMamen/traktflix
app/scripts/src/content/item.js
rejected_duplicate
Near-duplicate of sample 97453
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\n// Initialize express.\nconst config = {};\n\n// Port\nconfig.port = process.env.LISTEN_PORT || 5050;\n\nmodule.exports = config;\n\n```\n\nApply this change: Use PORT env variable for compatibility with Heroku" }, ...
javascript
edit
0
0
mit
e4445e5850d68d02059c3280fe29aa1f70690a1b
DoSomething/blink,DoSomething/blink
config/express.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = function (config) {\n\tvar CI = process.env.CI;\n\n\tconfig.set({\n\t\tbasePath: '..',\n\t\tframeworks: ['mocha', 'chai'],\n\t\tbrowsers: CI ? ['PhantomJS'] : ['Chrome', 'Firefox', 'IE'],\n\t\tfiles: [\n\t\t\t'http://jd...
javascript
edit
0
4
mit
da8c91153b1eb24b14927ad8b49f4ebf5465340d
dark5un/jBinary,jDataView/jBinary,dark5un/jBinary,npmcomponent/jDataView-jBinary
test/karma.conf.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\n// Blank the document so the 404 page doesn't show up visibly.\ndocument.documentElement.style.display = 'none';\n\n// Can't use DOMContentLoaded, calling document.write or document.close inside it from\n// inside an extension causes ...
javascript
edit
0
1
bsd-3-clause
ea2f8dce2e4c331f69aaca71823e12593ad25d6f
esprehn/chromium-codereview,esprehn/chromium-codereview
ui/main.js
rejected_duplicate
Near-duplicate of sample 103795
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst fs = require('fs')\nconst glob = require('glob')\n\nconst outputDirectory = [process.env.CIRCLE_ARTIFACTS, 'snapshots']\n .filter(x => x)\n .join('/')\n\nconst createDir = dir => {\n const splitPath = dir.split('/')\n splitPat...
javascript
edit
0
2
mit
edf7ecdcc5d6a2bd6268be7b9bf213edb4baa9ca
Ciunkos/ciunkos.com
jest/moveSnapshots.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = function (config) {\n config.set({\n frameworks: ['browserify', 'mocha'],\n reporters: ['mocha'],\n preprocessors: { 'build/karma.js': ['browserify'] },\n browserify: { debug: true },\n client: { mocha: ...
javascript
edit
0
1
bsd-3-clause
6b3018fdece04e9c8328a4609ab34c20ad012598
jupyter/jupyter-js-services,jupyterlab/services,blink1073/services,blink1073/jupyter-js-services,minrk/jupyter-js-services,jupyter/jupyter-js-services,blink1073/jupyter-js-services,blink1073/services,blink1073/services,minrk/jupyter-js-services,blink1073/jupyter-js-services,blink1073/services,jupyterlab/services,jupyte...
test/karma.conf.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar util = require('util');\n\n/**\n * @param {secret} SLACK_WEBHOOK_URL\n * @param {secret} SLACK_CHANNEL_NAME\n */\nmodule.exports = function(ctx, cb) {\n var params = ctx.body;\n\n if (!ctx.secrets.SLACK_WEBHOO...
javascript
edit
0
1
mit
8f290015079b2c2dcf46077afc75c19b6dad655c
radekk/webtask-mfa-monitor,radekk/webtask-tfa-monitor,radekk/mfa-monitor
src/notifiers/slack/webtask.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nfunction createElement (el) {\n const realNode = document.createElement(el.tagName);\n\n if (el.attributes) {\n for (let a = 0; a < el.attributes.length; a++) {\n const attr = el.attributes[a];\n const name = attr.name;\n...
javascript
edit
0
11
mit
7f4821f63a9eb0679191b0cae6057b62ec4b0572
skatejs/dom-diff
src/vdom/dom.js
rejected_complexity
Cyclomatic complexity too high: 11
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\napp.service(\"cardService\", function() {\n this.getCardUrl = function(name) {\n return \"http://gatherer.wizards.com/Pages/Card/Details.aspx?name=\" + name;\n };\n \n this.getCardImage = function(name) {\n return \"http://gat...
javascript
edit
0
1
mit
9790f7aa9215185dbec94f20187962e0bb0af7b6
kevinpang/edhrec-site
app/card/card_service.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React, { Component } from 'react';\nimport PropTypes from 'prop-types'\n\nclass Web3Provider extends Component {\n render() {\n if (window.web3) {\n return this.props.children\n }\n\n return <this.props.web3Unavail...
javascript
edit
0
10
mit
9eb190f80faceee9a431925207049fcbc5cf0a38
oraclesorg/ico-wizard,oraclesorg/ico-wizard,oraclesorg/ico-wizard
src/react-web3/Web3Provider.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst testsContext = require.context('./specs', true, /\\.spec$/);\ntestsContext.keys().forEach(testsContext);\n\nconst srcContext = require.context('../../src', true, /^\\/(?!index(\\.js)?$)/);\nsrcContext.keys().forEach(srcContext);\n...
javascript
edit
0
4
mit
b5a5dcf506c4be39afdc9a9a0700272f9807efaf
PeachScript/vue-infinite-loading,PeachScript/vue-infinite-loading
test/unit/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = {\n store_url: 'http://localhost:8080',\n account_user: 'test:tester',\n account_password: 'testing',\n account_name: 'AUTH_test',\n container_name: 'test_container',\n object_name: 'test_object',\n ...
javascript
edit
0
0
mit
8efe68d397b3416d196009178e26c46194c81b27
Tezirg/os2
tests/test.config.circle-ci.js
rejected_duplicate
Near-duplicate of sample 102848
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar test = require('tape')\nvar error = require('../')\n\ntest('message', function(t) {\n t.plan(3)\n var MyError = error('MyError')\n t.equals(MyError().name, 'MyError', 'name should be correct')\n t.equals(MyError('rawr').message,...
javascript
edit
0
2
mit
63d03c065b816bedace4756350fa4c49b6da18b1
andrezsanchez/custom-error
test/message.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* @flow */\nimport React from 'react';\nimport ReactDOM from 'react-dom';\nimport createBrowserHistory from 'history/lib/createBrowserHistory';\nimport { useRouterHistory } from 'react-router';\nimport { syncHistoryWithStore } from 're...
javascript
edit
0
0
mit
9b123e9cca657c4167d91526a768e90654b514bd
felixSchl/try-neodoc,felixSchl/try-neodoc
src/main.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar ThemingContext = require('./ThemingContext');\nvar lessParser = require('./less-parser');\nvar logger = require('raptor-logging').logger(module);\n\nmodule.exports = function create(config) {\n\n return {\n properties: {\n...
javascript
edit
0
2
apache-2.0
9d9d48d9df942fe3697726351791e3ccd02cce40
lasso-js/lasso-theming
lib/dependency-theme-import.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\n// MODULES //\n\nvar test = require( 'tape' );\nvar lib = require( './../lib' );\n\n\n// TESTS //\n\ntest( 'main export is a function', function test( t ) {\n\tt.ok( typeof lib === 'function', 'main export is a function...
javascript
edit
0
1
mit
7aafe74a946594994027c6439c18135291aad82d
kgryte/test-snippet
lib/tape/test.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nexports = module.exports = function (UI) {\n\n var setHistoryHeight = function () {\n // Set the history component dynamic height\n UI.components.history.height = UI.screen.height - UI.components.input.height;\n };\n\n UI.scree...
javascript
edit
0
1
mit
d3589b80adc8d1f358e297d880cf6404bae469c8
KillerDesigner/gitter-cli,RodrigoEspinosa/gitter-cli,leohmoraes/gitter-cli,Acidburn0zzz/gitter-cli,juliosueiras/gitter-cli
lib/ui/events.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar Templates = {};\n\nTemplates.ItemListingTemplate = _.template('\\\n\t<div class=\"item media\">\\\n\t\t<img class=\"pull-left\" src=\"<%= imageUrl %>\" />\\\n\t\t<div class=\"media-body\">\\\n\t\t\t<h3 class=\"media-heading\"><%= na...
javascript
edit
0
0
mit
49078f5d1c8bfd2510ba39414279dd1756dff22e
burnflare/CrowdBuy,burnflare/CrowdBuy
js/templates.js
rejected_duplicate
Near-duplicate of sample 96558
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use babel';\n\nexport default {\n \"prerelease\": {\n \"title\": \"Level of prerelease\",\n \"description\": \"Set the level maximum to check for the libraries versions\",\n \"type\": \"string\",\n \"default\": \"stable\",...
javascript
edit
0
0
mit
d1e99478d6fc5b296b511e389da0352372262fa4
kilian-ito/atom-npm-outdated
lib/configuration.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst passportJWT = require('passport-jwt');\n\nmodule.exports = {\n 'header': passportJWT.ExtractJwt.fromHeader,\n 'body': passportJWT.ExtractJwt.fromBodyField,\n 'query': passportJWT.ExtractJwt.fromUrlQueryParameter,\n 'authScheme...
javascript
edit
0
0
apache-2.0
4b87a36448f78a70138dcd8110074ac518fb9dbe
ExpressGateway/express-gateway
lib/policies/jwt/extractors.js
accepted
null
true