messages
listlengths
2
2
language
stringclasses
8 values
prompt_type
stringclasses
2 values
lint_errors
int64
0
129
⌀
cyclomatic_complexity
int64
0
32
⌀
license
stringclasses
7 values
commit
stringlengths
40
40
repos
stringlengths
5
116k
new_file
stringlengths
4
220
status
stringclasses
6 values
error
stringlengths
26
74
⌀
is_valid_syntax
bool
2 classes
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* jshint node: true */\n'use strict';\n\nconst REFLECT_JS_VERSION = '0.1.59',\n REFLECT_JAVASCRIPT = 'https://cdn.reflect.io/' + REFLECT_JS_VERSION +'/reflect.js',\n REFLECT_CSS = 'https://cdn.reflect.io/' + REFLECT_JS_VERSIO...
javascript
edit
0
3
mit
5445265dda092ef114c92a414e7d3692cf062bc2
reflect/ember-cli-reflect,reflect/ember-cli-reflect
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict'\nconst app = require('app')\nconst BrowserWindow = require('browser-window')\nconst Menu = require('menu')\nconst menuTemplate = require('./menu-template.js')\n\nrequire('electron-debug')()\n\nlet mainWindow = null\n\nfunct...
javascript
edit
0
2
mit
81e0be8d31feb28a7d13ab64542f7537fea93c76
bloxparty/bloxparty,kvnneff/bloxparty,bloxparty/bloxparty,kvnneff/bloxparty
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\ndefine(function() {\n var ProjectsFeaturedController = function(ProjectResource) {\n this.projects = ProjectResource.list({\n // Add feature tags here\n 'tags[]': []\n })\n }\n\n ProjectsFeat...
javascript
edit
0
1
mit
81ae02b295ea2dabdc94c81c0aa5afcc8aa9b9b0
tenevdev/idiot,tenevdev/idiot
public/app/project-list/project-featured-controller.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = function (opts={}) {\n var isJsonFile = opts.filter || /\\.json$/;\n\n return function (override, transform, control) {\n transform(\"readSource\", function (source) {\n const asset = this.args[0];\n if (...
javascript
edit
0
2
mit
fa6f27dabf3c50895e9f7a0703e40962b0e1056c
interlockjs/plugins,interlockjs/plugins
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// Lifted from Atom\n\nexports.beforeEach = function (fn) {\n global.beforeEach(function () {\n var result = fn()\n if (result instanceof Promise) {\n waitsForPromise(function () { return result })\n }\n })\n}\n\nexports...
javascript
edit
0
2
mit
02d15a7a06435db9769cac4ae4dccbc756b0b8e4
atom/github,atom/github,atom/github
spec/async-spec-helpers.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport R from 'ramda';\nimport compose from './util/compose.js';\nimport join from './util/join.js';\nimport upperCase from './util/upper-case.js';\nimport lowerCase from './util/lower-case.js';\nimport isUpperCase from '../src/is-upper...
javascript
edit
0
0
mit
8ea9755b10f7ee7a6e4b06c757c8105a4237e0aa
restrung/restrung-js
src/swap-case.js
rejected_duplicate
Near-duplicate of sample 108701
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar expect = require('chai').expect;\nvar validator = require('../');\n\ndescribe('Date validator', function () {\n var simpleRules = {\n birthday: ['date-format:YYYY-MM-DD']\n };\n\n var getTestObject = function ...
javascript
edit
0
1
mit
853a002aed8dfaf42e42918cc6d291d4744ffcee
cermati/satpam,sendyhalim/satpam
tests/date-format.spec.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\ndefine([\n 'underscore',\n 'jquery',\n 'models/resource',\n 'collections/bullet',\n 'collections/paragraph'\n], function (_, $, Resource, BulletCollection, ParagraphCollection) {\n 'use strict';\n\n var ItemModel = Resource.exten...
javascript
edit
0
2
mit
e97915274bcbf7c202656257645884a5c3b1adcb
jmflannery/jackflannery.me,jmflannery/jackflannery.me,jmflannery/rez-backbone,jmflannery/rez-backbone
app/scripts/models/item.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport fetch from 'node-fetch';\nimport { hashToHypen } from './formatText';\nimport { API_URL, HTTP_HEADERS } from '../constants';\n\nconst headers = HTTP_HEADERS;\n\nconst fetchStats = (battletag) => {\n const url = `${API_URL}/${has...
javascript
edit
0
2
mit
a46ff61e935bd029ddde1a6610fea27479e47777
chesterhow/overwatch-telegram-bot
src/services/fetchStats.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nexport default [\n {title: 'Animal'},\n {title: 'Effects'},\n {title: 'Loops'},\n {title: 'Notes'},\n {title: 'Percussion'},\n {title: 'Space'},\n {title: 'Sports'},\n {title: 'Voice'},\n {title: 'Wacky'}\n];\...
javascript
edit
0
0
bsd-3-clause
dfaacd1183f244f94b190084a882dc6038bfcd9e
LLK/scratch-gui,cwillisf/scratch-gui,LLK/scratch-gui,cwillisf/scratch-gui,cwillisf/scratch-gui
src/lib/libraries/sound-tags.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nangular.module('horizonApp').directive('hrNumberPicker', function() {\n return {\n restrict: 'A',\n replace: true,\n scope: { initial_value: '=value' },\n templateUrl: '../../static/infrastructure/angular_templates/numberpi...
javascript
edit
0
3
apache-2.0
fedf316d123fe5d6037cdbbcf24e512ea72acf38
rdo-management/tuskar-ui,rdo-management/tuskar-ui,rdo-management/tuskar-ui,rdo-management/tuskar-ui
tuskar_ui/infrastructure/static/infrastructure/js/angular/horizon.number_picker.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\n/**\n * Configuration module\n */\nvar path = require('path');\nvar fs = require('fs');\nvar lodash = require('lodash');\nvar jsonlint = require('json-lint');\n\nvar print = require('./print.js');\n\nmodu...
javascript
edit
0
3
mit
b4d669c8bc71f7938475130ade97e041d847f077
fians/situs
src/config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n$(function () {\n 'use strict';\n $.fn.getDateRangeSeparator = function () {\n return ' to ';\n };\n $.fn.createBootstrap3DateRangePicker = function(\n range_labels, separator, startdate, enddate\n ) {\n ...
javascript
edit
0
4
bsd-3-clause
a266f3dd6007a87ae96e31f847c6768dc7e2e807
dimagi/commcare-hq,dimagi/commcare-hq,qedsoftware/commcare-hq,qedsoftware/commcare-hq,dimagi/commcare-hq,qedsoftware/commcare-hq,dimagi/commcare-hq,qedsoftware/commcare-hq,dimagi/commcare-hq,qedsoftware/commcare-hq
corehq/apps/style/static/style/js/daterangepicker.config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport './sal.scss';\n\nlet options = {\n rootMargin: '0px',\n threshold: 0,\n animateClassName: 'sal-animate',\n selector: '[data-sal]',\n disableFor: null,\n};\n\nlet elements = [];\nlet intersectionObserver = null;\n\nconst anim...
javascript
edit
0
4
mit
abd5c2ec804e65cc621b4f82f67992b3cf1b24f8
mciastek/sal,mciastek/sal
src/sal.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = function (creator, fixtureName) {\r\n return creator.createFixture('/episodes/p00y1h7j/recommendations').then(function (fixture) {\r\n fixture.save(fixtureName);\r\n });\r\n};\r\n\n```\n\nApply this change:...
javascript
edit
0
1
mit
d53ad4bf24b431086605670c73b78f743d2bb9cc
DaMouse404/bamboo,DaMouse404/bamboo,DaMouse404/bamboo
tests/Bamboo/Fixtures/episodes_recommendations.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*global module:false*/\nmodule.exports = function(grunt) {\n\n // Project configuration.\n grunt.initConfig({\n // Task configuration.\n watch: {\n lib_test: {\n files: [ 'styles/**/*.css', '*.html' ],\n task...
javascript
edit
0
1
mit
6a3d5e602529c7991a94ae5c9df79083bca6829c
hkdobrev/softuni-html-exam
04-responsive/Gruntfile.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst BaseAbility = require('./baseability.js');\nconst Costs = require('./costs.js');\n\nclass PlayAttachmentAction extends BaseAbility {\n constructor() {\n super({\n cost: [\n Costs.payReduceableFa...
javascript
edit
0
4
mit
61909991a69685cc68625f98223337b1cdfd2770
gryffon/ringteki,jeremylarner/ringteki,jeremylarner/ringteki,jeremylarner/ringteki,gryffon/ringteki,gryffon/ringteki
server/game/playattachmentaction.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * Settings notice component.\n *\n * Site Kit by Google, Copyright 2020 Google LLC\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 * ...
javascript
edit
0
2
apache-2.0
1f1d8af3e6e8a98113daeec8f3e554b47c876ce0
google/site-kit-wp,google/site-kit-wp,google/site-kit-wp,google/site-kit-wp
assets/js/components/settings-notice.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar logger = require('../utils/logger')('MessageComparator'),\n Response = require('./response');\n\n/**\n * Represents a MessageComparator capable of determining whether an\n * incoming message must be relayed to a module or not.\n ...
javascript
edit
0
3
mit
14689228a91934327620537a8930a005d020ef79
victorgama/Giskard,victorgama/Giskard,victorgama/Giskard
src/models/message_comparator.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar path = require('path');\nvar child_process = require('child_process');\n\nmodule.exports = function(newWindow) {\n if (newWindow) {\n var launchPackagerScript =\n path.resolve(__dirname, '..', 'packager', '...
javascript
edit
0
5
bsd-3-clause
a5463c4c1021009be6958c3821605e8b803edc45
machard/react-native,Tredsite/react-native,cdlewis/react-native,myntra/react-native,ankitsinghania94/react-native,mrngoitall/react-native,hzgnpu/react-native,negativetwelve/react-native,CntChen/react-native,Maxwell2022/react-native,lprhodes/react-native,makadaw/react-native,philonpang/react-native,wesley1001/react-nati...
local-cli/run-packager.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar download = require('./download').download;\nvar path = require('path');\nvar fs = require('fs');\n\nvar TAR_URL = 'https://github.com/nteract/zmq-prebuilt/releases/download/win-libzmq-4.1.5-v140/libzmq-' + process.arch + '.lib';\nva...
javascript
edit
0
0
mit
3bdb76d839b7f9424136e791f581cf1c473615c7
lgeiger/zmq-prebuilt,lgeiger/zmq-prebuilt,interpretor/zeromq.js,lgeiger/zmq-prebuilt,interpretor/zeromq.js,interpretor/zeromq.js,interpretor/zeromq.js,lgeiger/zmq-prebuilt,lgeiger/zmq-prebuilt,interpretor/zeromq.js
scripts/download-win-lib.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport promiseProps from 'promise-props-recursive'\nimport getLocalVersion from '../../npm-bridge/getLocalVersion'\nimport getGlobalSanityCliVersion from '../../util/getGlobalSanityCliVersion'\nimport pkg from '../../../package.json'\n\...
javascript
edit
0
3
mit
c2bb3dff75eb411d13f34831259d24f5955cc04e
sanity-io/sanity,sanity-io/sanity,sanity-io/sanity,sanity-io/sanity
packages/@sanity/cli/src/commands/version/versionCommand.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\ngoogle.load('search', '1', {style : google.loader.themes.V2_DEFAULT});\ngoogle.setOnLoadCallback(function() {\n var customSearchOptions = {};\n var customSearchControl = new google.search.CustomSearchControl(\n '00372171835...
javascript
edit
0
3
bsd-3-clause
4c758e6856af13f199660bcfc74874fe06928bff
mozilla/betafarm,mozilla/betafarm,mozilla/betafarm,mozilla/betafarm
media/js/google-search.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/** ngInject **/\nfunction StationListCtrl($scope, $interval, EventBus, PvlService) {\n let vm = this;\n\n vm.imgUrls = {};\n vm.nowPlaying = {};\n vm.currentIndex = null;\n vm.setSelected = setSelected;\n\n var refreshDataBinding...
javascript
edit
0
1
mit
216e7e7026f515d95a4c2a1f3dc4f1858d4bf4a3
berwyn/Ponyville-Live--Desktop-App,Poniverse/PVLive-Chrome-Desktop-App,berwyn/Ponyville-Live--Desktop-App,BravelyBlue/PVLive-Chrome-Desktop-App,berwyn/Ponyville-Live--Desktop-App,Poniverse/PVLive-Chrome-Desktop-App,BravelyBlue/PVLive-Chrome-Desktop-App
src/scripts/StationList.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = {\n props: {\n chartData: {\n required: true\n }\n },\n\n watch: {\n 'chartData': {\n handler (newData, oldData) {\n if (oldData) {\n let chart = this._chart\n\n // Get new...
javascript
edit
0
4
mit
ceb5988e1c62a500f3bd70def008e350ff066bb6
apertureless/vue-chartjs,apertureless/vue-chartjs,apertureless/vue-chartjs
src/mixins/reactiveProp.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\npref(\"extensions.rspamd-spamness.header\", \"x-spamd-result\");\npref(\"extensions.rspamd-spamness.display.column\", 0);\npref(\"extensions.rspamd-spamness.display.messageScore\", true);\npref(\"extensions.rspamd-spamness.display.messa...
javascript
edit
0
0
bsd-3-clause
dd22023e3c6aa064b1e5881cfd7f48a2e79e894e
moisseev/spamness,moisseev/rspamd-spamness,moisseev/rspamd-spamness
defaults/preferences/spamness.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* OutsideClickable only accepts one top-level child */\nimport React, { Component, Children, cloneElement } from \"react\";\nimport ReactDOM from \"react-dom\";\nimport PropTypes from \"prop-types\";\n\nexport default class OutsideClic...
javascript
edit
0
3
mit
89fc255726bb2073f095bfd82ba05f00b217e3e2
tutti-ch/react-styleguide,tutti-ch/react-styleguide
src/components/OutsideClickable/OutsideClickable.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// @flow\nimport path from 'path';\nimport PluginRegistory from '../../src/services/plugin-registory'\n\ndescribe('PluginRegistory', () => {\n it('exporting: PluginFeatures', () => {\n expect(PluginRegistory.PluginFeatures).to...
javascript
edit
0
1
mit
ac20f325b34bc952d89d0073e036aa2f87e79388
Ragg-/Delir,Ragg-/Delir,Ragg-/Delir,Ragg-/Delir
src/delir-core/tests/delir/plugin-registory-spec.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst fs = require('fs');\nconst process = require('process');\nconst assert = require('assert');\nconst buffer = fs.readFileSync(process.argv[2]);\n\nlet m = new WebAssembly.Module(buffer);\nlet list = WebAssembly.Module.exports(m);\nc...
javascript
edit
0
0
apache-2.0
f1fb384cd62dc13d0b4647c9f988f6f46cbf4b6f
aidancully/rust,graydon/rust,aidancully/rust,aidancully/rust,graydon/rust,graydon/rust,graydon/rust,graydon/rust,aidancully/rust,aidancully/rust,aidancully/rust,graydon/rust
src/test/run-make/wasm-export-all-symbols/verify.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*\n * Avoiding Object Mutations.\n *\n * @author: Francisco Maria Calisto\n *\n */\n\nconst toggleTodo = (todo) => {\n\n return {\n\n id: todo.id,\n text: todo.text,\n completed: !todo.completed\n\n };\n\n};\...
javascript
edit
0
1
mit
2fffa35bd7aef3a2117b1804914c9fdb13749a44
FMCalisto/redux-get-started,FMCalisto/redux-get-started
course/object_mutations.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React, { Fragment, PureComponent } from 'react';\nimport PropTypes from 'prop-types';\nimport cx from 'classnames';\nimport theme from './theme.css';\n\nclass Link extends PureComponent {\n render() {\n const { children, clas...
javascript
edit
0
6
mit
beeeec389b04ae44852b3388afa760bbc7f1a3df
teamleadercrm/teamleader-ui
components/link/Link.js
rejected_duplicate
Near-duplicate of sample 74319
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nPackage.describe({\n name: 'svelte:core',\n version: '1.40.1_1',\n summary: 'Svelte compiler core',\n git: 'https://github.com/meteor-svelte/meteor-svelte.git'\n});\n\nNpm.depends({\n htmlparser2: '3.9.2',\n 'source-map': '0.5.6',...
javascript
edit
0
1
mit
4efc08fcf1bc7ed6b0c74b29d6c1fc7373d3c2ad
meteor-svelte/meteor-svelte
core/package.js
accepted
null
true
[ { "role": "user", "content": "Write javascript code for the following: Make less use async mode in the browser\n\nThis makes less use async mode in the browser. We were already doing\nthis for our less requests, but now we also set it before less executes,\n\t otherwise it tries to do some weird display: no...
javascript
new_file
0
0
mit
f27ace3130340b9b3ca2c452d9973a5b685c207a
stealjs/steal-less,stealjs/steal-less
less-engine.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar path = require('path');\nvar fs = require('fs');\nvar _ = require('underscore');\nvar debug = require('debug')('carcass:Index');\n\nmodule.exports = function(obj) {\n\n // Register every file in a dir plus a namespace.\n obj.r...
javascript
edit
0
3
mit
11e3f029e325582d106637959240f7a55e22a8e4
Wiredcraft/carcass
lib/carcass.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar testCase = require('nodeunit').testCase,\n\tparser = require('../language/parser'),\n\ttokenizer = require('../language/tokenizer')\n\ntest('TextLiteral', '\"hello world\"', static(\"hello world\"))\ntest('NumberLiteral', '1', stati...
javascript
edit
0
4
mit
8d379ebcb0ac8087fe1f4ead76722db46efc913f
marcuswestin/fun
test/parser.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport SocketIO from 'socket.io';\nimport { createClient } from 'redis';\n\nimport { redisUrl } from './config';\n\nconst io = SocketIO();\n\nio.use((socket, next) => {\n return next();\n});\n\nio.of('/live-chatroom')\n .use((socket, ...
javascript
edit
0
1
mit
8a677340e99b15271f6db7404f56295a2b1f6bd6
Calvin-Huang/LiveAPIExplore-Server,Calvin-Huang/LiveAPIExplore-Server
src/socket.js
rejected_duplicate
Near-duplicate of sample 88486
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport test from 'ava';\nimport plugin from '../lib/forms';\n\nconst formResponse = {\n body: {\n 'service-name': 'Foo Service One',\n 'service-desciption': 'Foo service lorem ipsum description',\n 'service-url': '<EMAIL>',\n ...
javascript
edit
0
1
apache-2.0
cc417b88c26628c4c68033d40d1bbc600b19aac8
scottnath/punchcard,poofichu/punchcard,scottnath/punchcard,punchcard-cms/punchcard,Snugug/punchcard,Snugug/punchcard,punchcard-cms/punchcard,poofichu/punchcard
tests/forms.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*\n * literal-test.js: Tests for the nconf literal store.\n *\n * (C) 2011, Charlie Robbins\n *\n */\n\nvar vows = require('vows'),\n assert = require('assert'),\n helpers = require('../helpers'),\n nconf = require('../../lib/...
javascript
edit
0
1
mit
90b029782ef2e7d0ba10c005931b79b9b06f7723
olalonde/nconf,philip1986/nconf,ChristianMurphy/nconf,HansHammel/nconf,remy/nconf,bryce-gibson/nconf,imjerrybao/nconf,indexzero/nconf,NickHeiner/nconf,Dependencies/nconf
test/stores/literal-test.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\n\nexport async function onDocumentReady() {\n\n //[START rtdb_emulator_connect]\n let firebaseConfig = {\n // Point to the RTDB emulator running on localhost.\n // Here we supply database namespace 'foo'.\n databaseURL: \"h...
javascript
edit
0
1
apache-2.0
07493a4b131cf0185f1b653f12d6d9f1129626e4
firebase/snippets-web,firebase/snippets-web,firebase/snippets-web,firebase/snippets-web
database/emulator-suite.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar fs = require('fs');\nvar path = require('path');\nvar cjson = require('cjson');\nvar _ = require('lodash');\n\nvar data = null;\n\nvar OPTS_FILE = 'supersamples.opts';\n\nvar DEFAULTS = {\n output: './tmp',\n renderer: {\n...
javascript
edit
0
3
mit
19647ac3394e4c5e266d99cb6c476d1ee505b974
GranitB/supersamples,mehdivk/supersamples,vickvu/supersamples,vickvu/supersamples,rprieto/supersamples,rprieto/supersamples,mehdivk/supersamples,GranitB/supersamples
lib/options.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\n'use strict';\n\nconst path = require('path');\n\nmodule.exports = (() => {\n // const akasha = require('../index');\n const Command = require('cmnd').Command;\n \n class CopyAssetsCommand extends Command {\n \n ...
javascript
edit
0
3
apache-2.0
31c98ed24c50375890e579efaac52e53762c6b89
akashacms/akasharender,akashacms/akasharender,akashacms/akasharender
commands/copy-assets.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// app.menuCategoriesController.js\n\n(function() {\n \"use strict\";\n\n angular.module(\"MenuCategoriesApp\")\n .controller(\"MenuCategoriesController\", MenuCategoriesController);\n\n MenuCategoriesController.$inject = [\"MenuC...
javascript
edit
0
3
mit
ae1e8915d76d4bd983d5a743bbb32dcb7369b985
var-bin/angularjs-training,var-bin/angularjs-training,var-bin/angularjs-training,var-bin/angularjs-training
SPAWithAngularJS/module3/httpService/js/app.menuCategoriesController.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// @flow\nimport getWindow from './getWindow';\n\n/*:: declare function isElement(node: mixed): boolean %checks(node instanceof\n Element); */\n\nfunction isElement(node) {\n const OwnElement = getWindow(node).Element;\n return node ...
javascript
edit
0
2
mit
712e512cfb33c897a9a7dd8cea0e1001f39b1bea
floating-ui/floating-ui,FezVrasta/popper.js,FezVrasta/popper.js,floating-ui/floating-ui,FezVrasta/popper.js,floating-ui/floating-ui,FezVrasta/popper.js
src/dom-utils/instanceOf.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\nmodule.exports = {\n up: (queryInterface, Sequelize) => {\n return queryInterface.createTable('DiscordInteractions', {\n id: {\n primaryKey: true,\n type: Sequelize.INTEGER,\n autoIncrement: ...
javascript
edit
0
1
mit
737f1e96233bdd477a4dc932f82118c9f746ea13
steers/lanodized,steers/lanodized
src/migrations/20171114034422-create-discord-interaction.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\"use strict\";\n\nrequire.config({\n shim: {\n backbone: {\n deps: ['underscore', 'jquery'],\n exports: 'Backbone'\n },\n underscore: {\n exports: '_'\n },\n handlebars: {\n exports: 'Handlebars'\n ...
javascript
edit
0
2
mit
23a39bf923f64fbcf590f9fd7f1998c1bd55dad0
reitti/reittiopas,reitti/reittiopas
web/js/main.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar FusebillResource = require('../FusebillResource');\nvar utils = require('../utils');\nvar fusebillMethod = FusebillResource.method;\n\nmodule.exports = FusebillResource.extend({\n\n path: 'customers',\n includeBas...
javascript
edit
0
0
mit
d813789dd4a515e6f3db9f7303ffdaf1c2c0083d
DanielAudino/fusebill-node,fingerfoodstudios/fusebill-node,bradcavanagh-ffs/fusebill-node
lib/resources/Customers.js
rejected_duplicate
Near-duplicate of sample 86186
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// @flow\n\nimport { expect } from \"chai\";\n\nimport {\n\tGame,\n\tGameDescriptor,\n\tDefaultDeck\n} from \"stormtide-core\";\n\nimport type {\n\tPlayerDescriptor\n} from \"stormtide-core\";\n\ndescribe(\"Scenario: Game Start\", () =>...
javascript
edit
null
null
mit
8d4d2eb1b16bb5e527aeb051931d6f834da8b21b
StormtideGame/stormtide-core
test/scenario/game-start.js
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```javascript\nfunction hallwayType1(length) {\n var space = new THREE.Group();\n space.add(makeArrowHelper(0,0,0,0,1,0));\n // Lighting\n for (var i = -length/2; i <= length/2; i+=10) {\n space.add(makePointLight(i,0,2.5, space));\n }\n // F...
javascript
edit
0
2
mit
b49edd06baa6d7326f58cf319bfd41cd61147f71
oliverodaa/cs184-final-proj,oliverodaa/cs184-final-proj,oliverodaa/cs184-final-proj
dwinelle/web/js/spaces.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nexports.files = {\n javascripts: {\n joinTo: {\n 'fateOfAllFools.js': /^(?!test)/\n }\n },\n stylesheets: {\n joinTo: 'fateOfAllFools.css'\n }\n};\n\n// Tests are handled by Karma\nexports.conventions = {\n ignored: /...
javascript
edit
0
0
mit
0cb49fd90bf58848859a1e8626cf88ee3158b132
rslifka/fate_of_all_fools,rslifka/fate_of_all_fools
brunch-config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport IdProxy from '../utils/idproxy';\nimport ProjectedModelRoute from '../routes/base/projected-model-route';\n\nexport default ProjectedModelRoute.extend({\n model: function(params, transition) {\n this._super.apply(this, argume...
javascript
edit
0
3
mit
a28ca526a35216f276eb7529d0cf1b1b78f2d994
Flexberry/ember-flexberry,Flexberry/ember-flexberry,Flexberry/ember-flexberry,Flexberry/ember-flexberry
app/routes/edit-form.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * model/fancy/location.js\n */\n\nfunction changePathGen (method) {\n return function changePath(path) {\n root.history[method + 'State'](EMPTY_OBJECT, '', path);\n $(root).trigger(method + 'state');\n };\n}\n\...
javascript
edit
0
4
mit
7e7d86162597794f3452ab69d177300df1cadefd
appneta/tbone,appneta/tbone,rachellaserzhao/tbone,tillberg/tbone,tillberg/tbone,rachellaserzhao/tbone
src/model/fancy/location.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\napp\n\n.factory(\"gitlab\",\n [\"$http\", \"$q\", \"Config\",\n function($http, $q, Config) {\n\n function gitlab() {}\n\n gitlab.prototype.imageUrl = function(path) {\n return Config.gitlabUrl + path;\n };...
javascript
edit
0
1
mit
ee3fb6243a6a49c1cc0d5d3f78aec555089885d5
kfei/gitlab-auditor,kfei/gitlab-auditor,kfei/gitlab-auditor
public/services/gitlab.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst minecraftItems = require('../')\nconst tap = require('tap')\n\nconst testItem = (test, item, name) => {\n test.type(item, 'object')\n test.equal(item.name, name)\n test.end()\n}\n\ntap.test('should be able to get an item by num...
javascript
edit
0
1
mit
88da1a072569a503afb157e83e6759779c700da8
pandapaul/minecraft-items
test/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\"use strict\";\n\nvar TextView = require('../text/text_view');\n\n// Substance.Heading.View\n// ==========================================================================\n\nvar HeadingView = function(node) {\n TextView.call(this, nod...
javascript
edit
0
1
mit
0d17ee888f562ba70d678d9ad9b412704bc2d3af
substance/nodes
src/heading/heading_view.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar vCard = require( '..' )\nvar fs = require( 'fs' )\nvar assert = require( 'assert' )\n\nsuite( 'vCard', function() {\n \n suite( 'Character Sets', function() {\n \n test( 'charset should not be part of value', function() {\n ...
javascript
edit
0
1
mit
adcc739f86f2bb24dc0f2ebe0d7d6bba1501b81c
jhermsmeier/node-vcf
test/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// import { getDocument } from './lib/couchdb';\n// getDocument('3cfc9a96341c0e24')\n// .then(d => console.log(d))\n// .catch(d => console.log(d))\n\nexport default (bot) => {\n return async (payload, reply) => {\n let text = pa...
javascript
edit
0
2
mit
cd3b76de38f6d050c8c3c927c06f4575ab456cd2
nikolay-radkov/ebudgie-server,nikolay-radkov/ebudgie-server
src/bot/postback.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\ndefine([\n 'backbone', 'handlebars', 'moment',\n 'connect/collections/Subscriptions',\n 'connect/views/SubscriptionListItemView',\n 'text!connect/templates/subscriptionList.handlebars'\n], function(Backbone, Handlebars, moment, Subs...
javascript
edit
0
1
mit
dbdc7968923e320677f3e61f0f381f15d0ddb757
Vizzuality/gfw,Vizzuality/gfw
app/assets/javascripts/connect/views/SubscriptionListView.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport transformCss from '../..'\n\nit('textShadow with all values', () => {\n expect(transformCss([['text-shadow', '10px 20px 30px red']])).toEqual({\n textShadowOffset: { width: 10, height: 20 },\n textShadowRadius: 30,\n te...
javascript
edit
0
1
mit
346cd3bd917ef642ed8d132d559e4b16342b29b7
styled-components/css-to-react-native
src/transforms/__tests__/textShadow.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nrequire('ember-runtime/system/object_proxy');\nrequire('ember-runtime/controllers/controller');\n\n/**\n@module ember\n@submodule ember-runtime\n*/\n\n/**\n `Ember.ObjectController` is part of Ember's Controller layer. A single shared\...
javascript
edit
0
0
mit
ea02da4f1d26c736d04b83dfdabde3297bba8dc7
trentmwillis/ember.js,mitchlloyd/ember.js,kidaa/ember.js,seanpdoyle/ember.js,cyberkoi/ember.js,csantero/ember.js,kellyselden/ember.js,michaelBenin/ember.js,cesarizu/ember.js,JesseQin/ember.js,xcambar/ember.js,jmurphyau/ember.js,nruth/ember.js,Trendy/ember.js,seanjohnson08/ember.js,knownasilya/ember.js,rwjblue/ember.js,...
packages/ember-runtime/lib/controllers/object_controller.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Phaser from 'phaser';\n\nimport frames from '../../sprite-frames';\n\nimport update from './update';\n\nexport default class extends Phaser.Sprite {\n constructor({ game, x, y }) {\n super(game, x, y, 'guy', frames.GUY.STAND_...
javascript
edit
0
1
mit
3cf539e029290331c735da82b1c0dc3189eeff6b
ThomasMays/incremental-forest,ThomasMays/incremental-forest
src/sprites/Player/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar TreeSitter = function() {\n var initPromise;\n class Parser {\n constructor() {\n this.initialize();\n }\n\n initialize() {\n throw new Error(\"cannot construct a Parser before calling `init()`\");\n }\n\n ...
javascript
edit
null
null
mit
224e79ca27a2d1d7c0ea4b312ba850ea69e37c40
tree-sitter/tree-sitter,tree-sitter/tree-sitter,tree-sitter/tree-sitter,tree-sitter/tree-sitter,tree-sitter/tree-sitter,tree-sitter/tree-sitter,tree-sitter/tree-sitter
lib/binding_web/prefix.js
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* jshint node:true */\n'use strict';\n\nmodule.exports = {\n 'bare-strings': true,\n 'block-indentation': 2,\n 'html-comments': true,\n 'nested-interactive': true,\n 'lint-self-closing-void-elements': true,\n 'triple-curlies': tr...
javascript
edit
0
0
mit
ba1b1ddf5181e78d3220c5e3d1d880bcf775c9ea
rwjblue/ember-cli-template-lint,rwjblue/ember-cli-template-lint
blueprints/ember-cli-template-lint/files/.template-lintrc.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react'\nimport { NavLink } from 'react-router-dom'\n\nimport styles from './navigation.module.styl'\n\nexport default ({ sports }) => (\n <nav>\n <ol className={`${styles['sports-list']}`}>\n {\n sport...
javascript
edit
0
1
mit
bf85e9c098f4223c23c86ff3626bf8e36917b46c
LuisLoureiro/placard-wrapper
src/templates/navigation.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport DS from 'ember-data';\n\nexport default DS.Model.extend({\n title: DS.attr('string'),\n sessionTypeCssClass: DS.attr('string'),\n assessment: DS.attr('boolean'),\n assessmentOption: DS.belongsTo('assessment-option', {async: t...
javascript
edit
0
0
mit
5c1cee5e80329595c654e95be79888b9d11387cc
jrjohnson/frontend,dartajax/frontend,dartajax/frontend,gboushey/frontend,jrjohnson/frontend,djvoa12/frontend,thecoolestguy/frontend,ilios/frontend,stopfstedt/frontend,thecoolestguy/frontend,ilios/frontend,stopfstedt/frontend,gboushey/frontend,djvoa12/frontend,gabycampagna/frontend,gabycampagna/frontend
app/models/session-type.js
accepted
null
true
[ { "role": "user", "content": "Write javascript code for the following: Use typeof for checking globals." }, { "role": "assistant", "content": "\nvar ws = null\n\nif (typeof WebSocket !== 'undefined') {\n ws = WebSocket\n} else if (typeof MozWebSocket !== 'undefined') {\n ws = MozWebSocket\n} e...
javascript
new_file
0
0
bsd-2-clause
6a2776fef20474fdcd75abb063ba76b830ea82b3
maxogden/websocket-stream,maxogden/websocket-stream
ws-fallback.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nrequire('./check-versions')();\n\nvar config = require('../config');\nif (!process.env.NODE_ENV) {\n process.env.NODE_ENV = JSON.parse(config.dev.env.NODE_ENV);\n}\n\nvar webpack = require('webpack');\nvar webpackConfig = require('./we...
javascript
edit
0
2
mit
0640d35ab77d16c24db7e9b889723ab7f093df2f
nextgensparx/quantum-router,nextgensparx/quantum-router
build/dev-server-chrome.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar KeyImporterController = function() {\n\t\n\tthis.sendArmor = function() {\n\t\tarmorContainer = $('#import-armor');\n\t\tdata = \"armor=\"+armorContainer.val();\n\n\t\t$.post(\n\t\t '/node/api/keyring/post/import',\n\t\t data,...
javascript
edit
0
2
apache-2.0
4874126c3445112d491f091be13eb999bf9f8fa3
SpringDVS/php.web.node,SpringDVS/nodeweb_php,SpringDVS/php.web.node,SpringDVS/nodeweb_php
system/res/js/key_import.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\"use strict\";\n\n// Serves the imprint for the application\n\nmodule.exports = 'controllers/imprint';\nvar dependencies = [];\n\nangular.module(module.exports, dependencies)\n .controller('ImprintCtrl', function ($scope, $http) {\n...
javascript
edit
0
1
mit
43bf846321bdbfed04a3f2338805013342bb84d9
dragonservice/sso-client,dragonservice/sso-client
js/controllers/imprint.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar XSSI_PREFIX = \")]}'\";\n\nfunction parseJson(s) {\n return JSON.parse(s.replace(XSSI_PREFIX, \"\"));\n}\n\n$(function(){\n $('div[data-delete-url]').each(function(index, element){\n var groupName = $(element).data('group-name'...
javascript
edit
0
4
apache-2.0
96ab389bb9a363adecec8241bc4c71e95c71d4c8
andela-angene/coursebuilder-core,andela-angene/coursebuilder-core,andela-angene/coursebuilder-core,andela-angene/coursebuilder-core
coursebuilder/modules/student_groups/_static/js/student_groups_list.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = {\n stories: ['../stories/**/*.stories.js'],\n addons: ['@storybook/addon-actions', '@storybook/addon-links'],\n};\n\n```\n\nApply this change: Support Both js and jsx or ts and tsx" }, { "role": "assistant", ...
javascript
edit
0
0
mit
644b2a98ded16b7268f0cd2f28b20cbfb4814505
kadirahq/react-storybook,storybooks/storybook,storybooks/react-storybook,storybooks/storybook,storybooks/react-storybook,kadirahq/react-storybook,storybooks/storybook,storybooks/storybook,storybooks/storybook,storybooks/storybook,storybooks/storybook,storybooks/react-storybook,storybooks/react-storybook
lib/cli/src/generators/REACT/template-csf/.storybook/main.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// Parse CloudCode\nParse.Cloud.beforeSave(Parse.Installation, function(request, response) {\n Parse.Cloud.useMasterKey();\n \n var androidId = request.object.get(\"androidId\");\n if (androidId == null || androidId == \"\") {\n c...
javascript
edit
0
3
mit
6fb67b0a4047610c067b2e118a695bca742a6201
timanrebel/Parse,DouglasHennrich/Parse,gimdongwoo/Parse,timanrebel/Parse,DouglasHennrich/Parse,DouglasHennrich/Parse,DouglasHennrich/Parse,timanrebel/Parse,gimdongwoo/Parse,DouglasHennrich/Parse,timanrebel/Parse,gimdongwoo/Parse,gimdongwoo/Parse
cloudcode/cloud/main.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\"use strict\";\n\nangular.module('arethusa.relation').directive('nestedMenuCollection', function() {\n return {\n restrict: 'A',\n replace: 'true',\n scope: {\n current: '=',\n all: '=',\n property: '=',\n ...
javascript
edit
0
2
mit
429317e11c1c9f4394b3fc27de0b5da23bdbb0d5
Masoumeh/arethusa,Masoumeh/arethusa,alpheios-project/arethusa,alpheios-project/arethusa,alpheios-project/arethusa,latin-language-toolkit/arethusa,fbaumgardt/arethusa,fbaumgardt/arethusa,PonteIneptique/arethusa,fbaumgardt/arethusa,latin-language-toolkit/arethusa,PonteIneptique/arethusa
app/js/arethusa.relation/directives/nested_menu_collection.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n.import \"../applicationShared.js\" as Globals\n\nfunction workerOnMessage(messageObject) {\n if(messageObject.apiMethod === 'channels.history') {\n addMessagesToModel(messageObject.data);\n } else if(messageObject.apiMetho...
javascript
edit
null
null
mit
2e79e9b49dd49fb72923a45f44ced0608394c409
neversun/Slackfish,neversun/Slackfish
qml/js/logic/channelPageLogic.js
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\"use strict\";\n(function (cornerstoneWADOImageLoader) {\n\n function decodeJPEGLossless(imageFrame, pixelData) {\n // check to make sure codec is loaded\n if(typeof jpeg === 'undefined' ||\n typeof jpeg.lossless === 'undef...
javascript
edit
0
7
mit
a8cf1c8156c2c87cf8a68a5cc362797a29cf760c
mikewolfd/cornerstoneWADOImageLoader,google/cornerstoneWADOImageLoader,google/cornerstoneWADOImageLoader,chafey/cornerstoneWADOImageLoader,cornerstonejs/cornerstoneWADOImageLoader,mikewolfd/cornerstoneWADOImageLoader,chafey/cornerstoneWADOImageLoader,cornerstonejs/cornerstoneWADOImageLoader,google/cornerstoneWADOImageL...
src/webWorker/decodeTask/decoders/decodeJPEGLossless.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport template from './issue-comments-form.html';\n\nclass IssueCommentsFormController {\n // @ngInject\n constructor($rootScope, issueCommentsService) {\n this.$rootScope = $rootScope;\n this.issueCommentsService = issueCommen...
javascript
edit
0
2
mit
b740bdf7394e7325e174d7d4ccab1e1c185240f7
opennode/waldur-homeport,opennode/waldur-homeport,opennode/waldur-homeport,opennode/waldur-homeport
app/scripts/components/issues/comments/issue-comments-form.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar m = require('mithril');\n\nvar Fangorn = require('fangorn');\n\n\n// Although this is empty it should stay here. Fangorn is going to look for figshare in it's config file. \nFangorn.config.figshare = {\n \n \n};\n\n```\n\nAppl...
javascript
edit
0
8
apache-2.0
8b321a6c8a960f222477682e447e405971c4548e
hmoco/osf.io,cldershem/osf.io,barbour-em/osf.io,binoculars/osf.io,bdyetton/prettychart,sbt9uc/osf.io,SSJohns/osf.io,brandonPurvis/osf.io,samchrisinger/osf.io,bdyetton/prettychart,mfraezz/osf.io,baylee-d/osf.io,asanfilippo7/osf.io,felliott/osf.io,binoculars/osf.io,brandonPurvis/osf.io,wearpants/osf.io,monikagrabowska/os...
website/addons/figshare/static/figshareFangornConfig.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport createGraph from './lib/createGraph.js';\nimport prepareForProcess from './lib/prepareForProcess.js';\nimport hypernova from './hypernova/hypernova.js';\nimport Base from './query.base';\n\nexport default class Query extends Base...
javascript
edit
0
2
mit
05eb13e445bd7adb0a7ca0d0fbb44968093a3f9f
cult-of-coders/grapher
lib/query/query.server.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n#pragma strict\n\nprivate var _gameManager : GameManager;\nprivate var _isTriggered = false;\n\nfunction Start() {\n _gameManager = GameManager.Instance();\n}\n\nfunction Update() {\n\n}\n\nfunction OnMouseDown() {\n if (!_isTriggered...
javascript
edit
null
null
mit
fa5c360cd1b642ea6ebc696052e321a7b5e62de1
mildmojo/bombay-intervention,mildmojo/bombay-intervention
Assets/scripts/SplashClickHandler.js
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport md from 'components/md'\n\nconst Refs = () => md`\n ## Refs\n\n Passing a \\`ref\\` prop to a styled component will give you an instance of\n the \\`StyledComponent\\` wrapper, but not to the underlying DOM node.\n This is du...
javascript
edit
0
1
mit
0ab09a056a19f798fae9582f92da5087b79b67a8
styled-components/styled-components-website,styled-components/styled-components-website
sections/advanced/refs.js
rejected_duplicate
Near-duplicate of sample 97204
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar ui = require('tresdb-ui');\nvar emitter = require('component-emitter');\nvar template = require('./template.ejs');\nvar FormView = require('../../../Entry/Form');\n\n// Remember contents of unsubmitted forms during the session.\n// ...
javascript
edit
0
1
mit
7e9b2abdd8fb3fbd799f8300a4b22269643831f0
axelpale/tresdb,axelpale/tresdb
client/components/Location/Entriex/Creation/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Backbone from 'backbone';\nimport myTemplate from './index.jade';\n\nlet MappingView = Backbone.View.extend({\n initialize: function () {\n },\n render: function () {\n this.$el.html(myTemplate());\n }\n});\n\nexport defau...
javascript
edit
0
2
apache-2.0
a3a3118b2d8b04a5de451557eb9d2130dfb24daf
ronichoudhury-work/resonantlab,ronichoudhury-work/resonantlab,ronichoudhury-work/resonantlab,ronichoudhury-work/resonantlab
views/widgets/MappingView/index.js
rejected_duplicate
Near-duplicate of sample 80298
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { expect } from 'chai';\nimport u from '../lib';\n\ndescribe('u.reject', () => {\n it('freezes the result', () => {\n expect(Object.isFrozen(u.reject('a', []))).to.be.true;\n });\n});\n\n```\n\nApply this change: Add spec fo...
javascript
edit
0
1
mit
358406f12becb20701ad28ec28da3fd974fd4e95
substantial/updeep,substantial/updeep
test/reject-spec.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// For a detailed explanation regarding each configuration property, visit:\n// https://jestjs.io/docs/en/configuration.html\n\nmodule.exports = {\n roots: [\"<rootDir>/src/main/javascript\"],\n collectCoverage: false,\n collectCover...
javascript
edit
0
0
apache-2.0
b0966f22c8ff90a61d87215f3f1e588f4171895c
synyx/urlaubsverwaltung,synyx/urlaubsverwaltung,synyx/urlaubsverwaltung,synyx/urlaubsverwaltung
jest.config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst path = (props, obj) => {\n let nested = obj;\n const properties = typeof props === 'string' ? props.split('.') : props;\n\n for (let i = 0; i < properties.length; i++) {\n nested = nested[properties[i]];\n if (nested === ...
javascript
edit
0
4
mit
1c99a4bcf99b3af5563bed97beedca61727ae3b7
adrice727/accelerator-core-js,opentok/accelerator-core-js,opentok/accelerator-core-js,adrice727/accelerator-core-js
js/src/util.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nfind();\r\nwindow.addEventListener(\"focus\", find);\r\n\r\nfunction find() {\r\n if (window == top) {\r\n // Find all the RSS link elements.\r\n var result = document.evaluate(\r\n '//link[@rel=\"alternate\"][contains(@ty...
javascript
edit
0
3
bsd-3-clause
9aeaa777c6d54e9eab162f82c72691d959695f2b
meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-u...
chrome/test/data/extensions/samples/subscribe/feed_finder.js
rejected_duplicate
Near-duplicate of sample 70670
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar gulp = require('gulp');\nvar concat = require('gulp-concat');\nvar uglify = require('gulp-uglify');\nvar rename = require('gulp-rename');\nvar template = require('gulp-template');\n\nvar bower = require('./bower.json');\n\nvar dist_...
javascript
edit
0
1
mit
b26979135e1d39a8294abd664b8bb23c8b135748
dvberkel/LaunchpadJS
Gulpfile.js
rejected_duplicate
Near-duplicate of sample 98303
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function() {\n window.shared || (window.shared = {});\n var dom = window.shared.ReactHelpers.dom;\n var createEl = window.shared.ReactHelpers.createEl;\n var merge = window.shared.ReactHelpers.merge;\n var PropTypes = window.share...
javascript
edit
0
2
mit
3a270f06122001df0204cce8dbd7697748659183
studentinsights/studentinsights,studentinsights/studentinsights,jhilde/studentinsights,erose/studentinsights,erose/studentinsights,jhilde/studentinsights,erose/studentinsights,studentinsights/studentinsights,erose/studentinsights,jhilde/studentinsights,jhilde/studentinsights,studentinsights/studentinsights
app/assets/javascripts/student_profile_v2/academic_summary.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * Splits the aggregated JSON file into individual JSON files per EIN\n * Files are then available to Jekyll in the _data folder\n * \n * TODO Lots of opportunities to simplify - good first pull request 😉\n */\nconst {chain} = re...
javascript
edit
0
1
mit
f45f0d1e7420f22d92382eb58422c990d8e913d9
grantmakers/profiles,grantmakers/profiles,grantmakers/profiles
_data/split-aggregated.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst path = require('path');\nconst CopyWebpackPlugin = require('copy-webpack-plugin');\n\nmodule.exports = {\n entry: './app/src/app.js',\n output: {\n path: path.resolve(__dirname, 'build'),\n filename: 'app.js'\n...
javascript
edit
0
0
mit
32697b5e5783148d518017943077814c63725257
Neufund/Contracts
webpack.config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar compression = require(\"compression\");\nvar express = require(\"express\");\nvar handlebars = require(\"express-handlebars\");\n\n//\tInitialize Express\nvar app = express();\n\n//\tTreat \"/foo\" and \"/Foo\" as different URL...
javascript
edit
0
1
mit
7da24658d59dcb5c64d0777c147ebeba80071489
stevecochrane/express-web-app-example,stevecochrane/express-web-app-example
express-web-app-example.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\ndefine(function() {\n 'use strict';\n\n var moduleNameTemplate = 'oro/filter/{{type}}-filter';\n var types = {\n string: 'choice',\n choice: 'select',\n single_choice: 'select',\n ...
javascript
edit
0
2
mit
725c60ab2f75a085cde14843ad2f6a73eab8cb76
geoffroycochard/platform,orocrm/platform,hugeval/platform,Djamy/platform,hugeval/platform,northdakota/platform,ramunasd/platform,trustify/oroplatform,trustify/oroplatform,2ndkauboy/platform,northdakota/platform,ramunasd/platform,orocrm/platform,trustify/oroplatform,Djamy/platform,geoffroycochard/platform,2ndkauboy/plat...
src/Oro/Bundle/FilterBundle/Resources/public/js/map-filter-module-name.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * Disproperty: Disposable properties.\n * Copyright (c) 2015 Vladislav Zarakovsky\n * MIT license https://github.com/vlazar/disproperty/blob/master/LICENSE\n */\n(function(root) {\n\n function disproperty(obj, prop, value) {\n ...
javascript
edit
0
4
mit
f0b4e3cc48e61b221fe2db7aa8be38d506dfd69e
vlazar/disproperty
lib/disproperty.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar\n _ = require('underscore'),\n async = require('async'),\n curry = require('curry'),\n Dependency = require('../models').Dependency,\n compHelper = require('./componentHelper'),\n compInstall = compHelp...
javascript
edit
0
3
mit
adc14a177ba3c37618b2f63f8f4ca272cdc94586
web-audio-components/web-audio-components-service
lib/updateModel.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function() {\n\t\n\tvar rule = data.rules[parseInt(request.param.num, 10)] || null;\n\t\n\tif (rule === null) return response.error(404);\n\t\n\tswitch (request.method) {\n\t\tcase 'GET':\n\t\t\tresponse.head(200);\n\t\t\tresponse.end(...
javascript
edit
0
9
mit
347d62cc1eac9d5b58729000df03dc43313708cd
polamjag/Chinachu,kanreisa/Chinachu,kounoike/Chinachu,wangjun/Chinachu,tdenc/Chinachu,wangjun/Chinachu,valda/Chinachu,upsilon/Chinachu,xtne6f/Chinachu,xtne6f/Chinachu,miyukki/Chinachu,kounoike/Chinachu,upsilon/Chinachu,wangjun/Chinachu,xtne6f/Chinachu,polamjag/Chinachu,tdenc/Chinachu,miyukki/Chinachu,valda/Chinachu,ups...
api/script-rules-rule.vm.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * Poster v0.1.0\n * A React webapp to list upcoming movies and maintain a watchlist, powered by TMDb\n *\n * Author: Kushal Pandya <<EMAIL>> (https://doublslash.com)\n * Date: 01 June, 2016\n * License: MIT\n *\n * React App Main ...
javascript
edit
null
null
mit
b3ee9cd866a0669bfe3776b66a2e2edc7f64931d
kushalpandya/poster,kushalpandya/poster
app/components/Views/Home.js
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Write javascript code for the following: Add JS class to html element" }, { "role": "assistant", "content": "/**\n * main.js\n *\n * Only runs in modern browsers via feature detection\n * Requires support for querySelector, classList and addEventListener\n */\n\nif(...
javascript
new_file
0
0
isc
505fd5d747f1be4c35397b2821559d21147f5fdb
frippz/valleoptik-prototype,frippz/valleoptik-prototype
gui/js/main.js
rejected_duplicate
Near-duplicate of sample 86781
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nmodule.exports = {\n\n 'browserPort' : 3000,\n 'UIPort' : 3001,\n 'serverPort' : 3002,\n\n 'styles': {\n 'src' : 'app/styles/**/*.scss',\n 'dest': 'build/css',\n 'prodSourcemap' : true\n },\n\n '...
javascript
edit
0
0
mit
4b25bf1240a13fec21cb6a2b1b4a48aa54588716
jakemmarsh/angularjs-gulp-browserify-boilerplate,dandiellie/starter,Mojility/angularjs-gulp-browserify-boilerplate,hoodsy/resurgent,dkim-95112/infosys,shoaibkalsekar/angularjs-gulp-browserify-boilerplate,jakemmarsh/angularjs-gulp-browserify-boilerplate,jfarribillaga/angular16,mjpoteet/youtubeapi,Deftunk/TestCircleCi,da...
gulp/config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport DS from \"ember-data\";\n\nexport default DS.Model.extend({\n page: DS.belongsTo('page'),\n section: DS.belongsTo('section'),\n sequence: DS.belongsTo('sequence'),\n title: DS.attr('string'),\n commentary: DS.hasOneFragment(...
javascript
edit
0
0
mit
8ccebea0f071952a40efe56b55853df7b5e21246
artzte/fightbook-app
app/models/sequence-item.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nReportsController.$inject = [ '$rootScope', 'TbUtils', 'reports' ];\n\nfunction ReportsController ($rootScope, TbUtils, reports) {\n\tvar vm = this;\n\n\tvm.reports = [\n\t\t{ title: 'Reporte de Costos', url: 'http://fiasps.unitec.edu:8...
javascript
edit
0
2
mit
fe04cf7da47cb7cec0f127d54dcaa3ad17a960bb
Tribu-Anal/Vinculacion-Front-End,Tribu-Anal/Vinculacion-Front-End,Tribu-Anal/Manejo-Horas-de-Vinculacion-UNITEC,Tribu-Anal/Manejo-Horas-de-Vinculacion-UNITEC
dev/app/components/main/reports/reports.controller.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Engine from 'ember-engines/engine';\nimport Resolver from 'ember-resolver';\nimport loadInitializers from 'ember-load-initializers';\nimport config from './config/environment';\n\nconst { modulePrefix } = config;\nconst Eng = Eng...
javascript
edit
0
0
mit
0c410708be0bd112391b0f6f34d0a1cfca39ea85
scottharris86/external-admin,scottharris86/external-admin
addon/engine.js
accepted
null
true