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 React from 'react';\n\nconst CreateFormHeader = () => {\n const discard = () => {\n window.history.back();\n };\n\n return (\n <header className=\"challenge-create__header\">\n <h1 className=\"ch...
javascript
edit
0
1
mit
fe95dc9d03ff164f9e2961df339e4aee827865ca
travel-and-help/start-kit,travel-and-help/start-kit
src/front/app/features/create/components/CreateFormHeader.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = function(grunt) {\n grunt.loadNpmTasks(\"grunt-mocha-test\");\n grunt.loadNpmTasks(\"grunt-mocha-istanbul\");\n\n var testOutputLocation = process.env.CIRCLE_TEST_REPORTS || \"test_output\";\n var artifactsL...
javascript
edit
0
3
mit
5e70a05c26a54e7e6dd5c8bb88e92ea966e36430
MantasSutula/todo-grad-project,stevenjob/todo-grad-project,RMcNeillSL/todo-grad-project,thullSL/todo-grad-project,seanworkcode/todo-grad-impl,MantasSutula/todo-grad-project,JMVHill/todo-grad-project,jdhodges431/todo-grad-project,seanworkcode/todo-grad-project,WPFerg/todo-grad-project,seanworkcode/todo-grad-impl,jdhodge...
Gruntfile.js
rejected_duplicate
Near-duplicate of sample 76600
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nmodule.exports = function(grunt) {\n\n\t// configure grunt\n\tgrunt.initConfig({\n\n\t\tpkg: grunt.file.readJSON('package.json'),\n\n\t});\n\n\t// Load plug-ins\n\t// grunt.loadNpmTasks('grunt-contrib-whatever');\n\n\t/...
javascript
edit
0
1
mit
c71d9b3ac800a88a335f1e271e62a1764aa84c9b
stefanweck/dungeongeneration
Gruntfile.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst getJSON = require('get-json');\nconst unique = require('array-unique');\n\n/** URL of the Overpass API being used */\nconst overpass = 'http://overpass-api.de/api/interpreter?data=';\n\n/**\n * \n * \n * @param {any} query \n * @p...
javascript
edit
0
2
mit
7147d3978ee491bb010feac8e228a0010686aa3a
mkhalila/nearest-roads
util/overpass.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst MiniCSSExtractPlugin = require('mini-css-extract-plugin');\n\nconst styleFunctions = require('../../src/styles/functions/index.js');\n\nmodule.exports = (env) => {\n const styleLoaders = {\n production: MiniCSSExtractPlugin.lo...
javascript
edit
0
1
mit
a2d3dea21c3aa90125cfe00ca70c0bab25de2147
CKGrafico/Frontend-Boilerplates,CKGrafico/Frontend-Boilerplates,CKGrafico/Gulp-Boilerplates,CKGrafico/Gulp-Boilerplates
tasks/rules/styles.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\n/**\n * Module dependencies.\n */\n\nvar browserify = require('browserify');\nvar path = require.resolve('../');\n\n/**\n * Module exports.\n */\n\nmodule.exports = build;\n\n/**\n * Make the build.\n *\n * @api public\n */\n\n\nfunct...
javascript
edit
0
1
mit
cde911c10b5c8a2999b1c4a035a4b844c762fb72
Automattic/socket.io-client,Alexandre-io/socket.io-client,Nibbler999/socket.io-client,socketio/socket.io-client,socketio/socket.io-client,nus-fboa2016-si/socket.io-client,socketio/socket.io-client,nkzawa/socket.io-client,ayhansalami/socket.io-client
support/browserify.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * Sends a Chrome message to all tabs that are Tiles tabs.\n * @param {String} message The message to send to each tab.\n */\nfunction sendMessageToExtensionTabs(message, ignoreCurrent) {\n\tif (ignoreCurrent == undefined) {\n\t\t...
javascript
edit
0
6
mit
8a85bb112f657826ce16ea903859e27cc7d0ce2e
AntarcticApps/Tiles,AntarcticApps/Tiles
shared/js/messaging.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar mongoose = require('mongoose');\nvar Schema = mongoose.Schema;\n\nvar incidentSchema = new Schema({\n date: {type: Date, index: true},\n type: {type: String, index: true},\n address: String,\n location: String,\n area: {type: S...
javascript
edit
null
null
mit
1e3fe5bc5e935656b442dd6a01b01bba615af8ff
keokilee/hitraffic-worker,hitraffic/worker
app/incidents/index.js
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```javascript\nexports.create = function (source) {\n var f = Function.apply(Function, [].concat(\n '$', '$qualifier', '$level', '$_',\n 'PANIC', 'EMERG', 'ALERT', 'CRIT', 'ERR', 'ERROR', 'WARN', 'WARNING',\n 'NOTICE', 'INFO', ...
javascript
edit
0
1
mit
a70448066346580bbd2f13f089de02dca742602d
bigeasy/prolific,bigeasy/prolific
prolific.evaluator/evaluator.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport proxyquire from 'proxyquire';\n\nexport default proxyquire('../../src/notifications/notify-of-new-blogs', {\n 'aws-sdk': {\n SNS: function SNS() {\n return {\n publish: function publish({ TargetArn, Subject, Messa...
javascript
edit
0
10
mit
ce93cd3353b34b4e89f2ae7131be104a41bb8d28
csblogs/feed-downloader
tests/mocks/sns-mocks.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\ndescribe(\"Accessibility Test\", function () {\n var originalTimeout;\n\n var testcasesHTML = window.__html__;\n\n for (var testFile in testcasesHTML) {\n\n (function (testFile) {\n describe(\...
javascript
edit
0
2
mit
83903f4dc55d071fd78ced8f3c460280aa787b4f
IBMa/Va11yS,IBMa/ta11y,IBMa/ta11y,IBMa/Va11yS
test/a11yScan.test.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport client from 'util/client';\n\n// fixtureMap:\n// {\n// '/articles/basic/1': { ... body of article 1 ... },\n// '/replies/basic/2': { ... body of reply 2 ... },\n// }\n//\n\nfunction wait(ms) {\n return new Promise((resolve) ...
javascript
edit
0
1
mit
4e37f848b27f68fee321c6d75c07e43b8a62a1bb
cofacts/rumors-api,MrOrz/rumors-api,MrOrz/rumors-api
test/util/fixtures.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// Written by Joshua Paul A. Chan\n(function() {\n\"use strict\";\n\n// Import variables if present (from env.js) (thanks @jvandemo)\nvar env = {};\nif(window){ Object.assign(env, window.__env); }\n\n// Initialize app\nangular.module('w...
javascript
edit
0
2
mit
51ab93ceb8f3575da8af4833d19a4e94887f91b4
joshpaulchan/wr-client,rutgers-ucm/wr-client,joshpaulchan/wr-client,rutgers-ucm/wr-client
app/app.module.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nangular.module('chemPhyWebApp')\n .config(['$routeProvider',\n function($routeProvider) {\n $routeProvider.\n when('/home', {\n templateUrl: require('./components/home/home.html')\n }).\n when('/ab...
javascript
edit
0
1
bsd-3-clause
d573e4ef6af00ea11425313710103c8f494c36d4
OpenChemistry/mongochemclient,OpenChemistry/mongochemclient
app/app.routes.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport locationFactory from '../mock/location';\n\nfunction noop() {}\n\nexport default function windowMockFactory() {\n let location = locationFactory();\n let holder = {};\n\n return new Proxy(window, {\n get(target, name) {\n ...
javascript
edit
0
11
mit
177d172f6616fad3b5d5b96ef396b1ebcc369847
kaliber5/ember-window-mock,kaliber5/ember-window-mock
addon-test-support/-private/services/window.js
rejected_complexity
Cyclomatic complexity too high: 11
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar React = require('react');\nvar ReactDOM = require('react-dom');\nvar sinon = require('sinon');\n\nfunction spyOnReactClass(reactClass, methodName) {\n var classProto = reactClassPrototype(reactClass);\n var spy = sinon.spy();\...
javascript
edit
0
3
mit
b03884099992bad40e50e0ea8e39b4995097eba2
levrik/sinon-spy-react,DerNivel/sinon-spy-react
sinon-spy-react.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nrequire('isomorphic-fetch')\n\nexport function checkStatus(response) {\n if (response.ok) {\n return response\n }\n\n if (response.body || response._bodyBlob) {\n return response.json().then(err => {\n const error = new Er...
javascript
edit
0
4
bsd-3-clause
836425f709023adaa26f06301b7de22e5fa784a7
spark-solutions/spark-starter-kit,spark-solutions/spark-starter-kit,spark-solutions/spark-starter-kit
client/js/libs/apiHelper.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nTemplate.results.events({\n 'submit form': function(event){\n var movie = document.querySelector('input[name=\"movie\"]:checked').value;\n var id = document.querySelector('input[name=\"movie\"]:checked').id;\n if...
javascript
edit
0
2
mit
050aadc0356226e320fb2a29e86c7082f5c01b19
reillyisawesome/Nectar,reillyisawesome/Nectar,Jeradin/plexrequests-meteor,reillyisawesome/Nectar,Jeradin/plexrequests-meteor,Jeradin/plexrequests-meteor
client/templates/results.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// Protractor configuration file, see link for more information\n// https://github.com/angular/protractor/blob/master/lib/config.ts\n\nconst { SpecReporter } = require('jasmine-spec-reporter');\n\nexports.config = {\n allScriptsTimeout...
javascript
edit
0
1
mit
4f997d20cead348be6159f458b4a3714bc0ddeed
drumonii/LeagueTrollBuild,drumonii/LeagueTrollBuild,drumonii/LeagueTrollBuild,drumonii/LeagueTrollBuild
frontend/e2e/protractor.conf.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// Copyright 2016, EMC, Inc.\n\n'use strict';\n\nmodule.exports = {\n friendlyName: 'Install Windows',\n injectableName: 'Task.Os.Install.Win',\n implementsTask: 'Task.Base.Os.Install',\n options: {\n osType: 'win...
javascript
edit
0
0
apache-2.0
355eb8debb6147dfc6207b8863dbb45551558681
nortonluo/on-tasks,AlaricChan/on-tasks,AlaricChan/on-tasks,bbcyyb/on-tasks,nortonluo/on-tasks,bbcyyb/on-tasks
lib/task-data/tasks/install-windows-2012.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport options from './options'\nimport { getCurrentManipulation } from './manipulation'\n\nconst nodes = new vis.DataSet([])\nconst edges = new vis.DataSet([])\n\nconst select = $('select')\nconst resetBtn = $('#reset-btn')\nconst te...
javascript
edit
0
3
mit
440852a82678b6e02fbfba1e165ea866e7599e4b
danielzy95/automaton-visualizer,danielzy95/automaton-visualizer
app/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport express from 'express'\nimport models from './models';\nimport bodyParser from 'body-parser';\nimport users from './routes/users';\nimport cookieParser from 'cookie-parser';\nimport cookieSession from 'cookie-session';\nimport en...
javascript
edit
0
1
mit
cd32bcdaae34b042562ab34e227c52c4e7e467a1
taodav/MicroSerfs,taodav/MicroSerfs
api/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nmodule.exports = function(County) {\n /**\n * Get county details including indicators\n * @param {Function(Error)} callback\n */\n\n County.prototype.details = function(callback) {\n County.findById(this.id, ...
javascript
edit
0
1
mit
79fe5b12a7483bd2fe6b828985b18dd44ebebc72
sivicencio/us-health-indicators,sivicencio/us-health-indicators
common/models/county.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst path = require('path')\nconst { DAGNode } = require('ipld-dag-pb')\n\n// Creates a DB manifest file and saves it in IPFS\nconst createDBManifest = async (ipfs, name, type, accessControllerAddress, onlyHash) => {\n const manifest ...
javascript
edit
0
2
mit
cab38cbb9ce3eb4af39cdf61c9b2fe062146d09f
haadcode/orbit-db,haadcode/orbit-db,orbitdb/orbit-db,orbitdb/orbit-db
src/db-manifest.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\"use strict\";\n\n\n/*global nodeca, _*/\n\n\n// stdlib\nvar crypto = require('crypto');\n\n\n// nodeca\nvar HashTree = require('nlib').Support.HashTree;\n\n\n// internal\nvar realtime = require('../../realtime');\n\n\n////////////////...
javascript
edit
0
2
mit
4d23ed7fc917bf925cf8e186b0c5737e73787274
nodeca/nodeca.core,nodeca/nodeca.core
lib/init/server/http/renderer/helpers.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst skills = require('./data/skills');\nconst inkipediaGear = require('./data/inkipediaGear');\n\nfunction getOriginalGear(gear) {\n if (!gear)\n return;\n\n let originalGear = inkipediaGear[gear.kind].find(ig => ig.name ...
javascript
edit
0
4
mit
a8a31dabd49d74443884052e4bc141ac3bca9b98
misenhower/splatoon2.ink,misenhower/splatoon2.ink,misenhower/splatoon2.ink
src/js/splatoon.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React, {Component} from 'react'\nimport {Redirect, Route, Switch} from 'react-router-dom'\nimport Users from \"./users/Users\";\nimport GroupRoutes from \"./groups/GroupRoutes\";\nimport MainMenu from \"./MainMenu\";\nimport Home...
javascript
edit
0
1
apache-2.0
0c321ffc4a4d5479d63b042e4313eb04af310027
anhem/urchin,anhem/urchin,anhem/urchin,anhem/urchin
src/main/app/src/component/MainContainer.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\n/* global BackgroundCheck:false */\n\nfunction convertImageToDataURI(img) {\n var canvas = document.createElement('canvas');\n canvas.width = img.width;\n canvas.height = img.height;\n\n var ctx = canvas.getContext('2d');\n ctx.d...
javascript
edit
0
1
mit
d441c0b576a40c5fccb02905693cca6934eea916
tokybd/background-check,marcomatteocci/background-check,kennethcachia/background-check,marcomatteocci/background-check
examples/build/scripts/cross-origin-css.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function(window)\n{\n var Gitana = window.Gitana;\n\n Gitana.Release = Gitana.AbstractRepositoryObject.extend(\n /** @lends Gitana.Release.prototype */\n {\n /**\n * @constructs\n * @augments Gitana.A...
javascript
edit
0
1
apache-2.0
6b16ff4223fbc3bea37938f6ef65e2ecce32168c
gitana/gitana-javascript-driver,gitana/gitana-javascript-driver,gitana/gitana-javascript-driver
js/gitana/repository/Release.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React, { Component } from 'react'\n\nexport default class extends Component {\n render() {\n return (\n <div className=\"block pt-3 pb-5 text-center\">\n <div className=\"row\">\n <div className=\"col-12\...
javascript
edit
0
1
mit
85f0368acc534eda7f7f6ec722c7e3ab46d74ff8
niceb5y/niceb5y.net,niceb5y/niceb5y.net,niceb5y/niceb5y.net
src/components/JEInformation.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\n/**\n* Test if a value is an anagram.\n*\n* @module @stdlib/utils/is-anagram\n*\n* @example\n* var isAnagram = require( '@stdlib/utils/is-anagram' );\n*\n* var bool = isAnagram( 'I am a weakish speller', 'William Shakes...
javascript
edit
0
0
apache-2.0
0272922fe160d8b80390e5b1cbd824c542265b99
stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib
lib/node_modules/@stdlib/utils/is-anagram/lib/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// This file is part of BenchExec, a framework for reliable benchmarking:\n// https://github.com/sosy-lab/benchexec\n//\n// SPDX-FileCopyrightText: 2019-2020 Dirk Beyer <https://www.sosy-lab.org>\n//\n// SPDX-License-Identifier: Apache-...
javascript
edit
0
1
apache-2.0
bcfeb5a7deaee3b3724fcd6a696f5a5cc097f6f2
sosy-lab/benchexec,sosy-lab/benchexec,ultimate-pa/benchexec,dbeyer/benchexec,dbeyer/benchexec,ultimate-pa/benchexec,ultimate-pa/benchexec,ultimate-pa/benchexec,dbeyer/benchexec,ultimate-pa/benchexec,ultimate-pa/benchexec,sosy-lab/benchexec,dbeyer/benchexec,sosy-lab/benchexec,sosy-lab/benchexec,sosy-lab/benchexec
benchexec/tablegenerator/react-table/src/tests/setup/setup.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport formatNumberHelper from 'accounting/helpers/format-number';\nimport formatMoneyHelper from 'accounting/helpers/format-money';\nimport Ember from 'ember';\n\nvar registerHelper = Ember.HTMLBars.registerHelper;\nvar makeBoundHelper...
javascript
edit
0
1
mit
60d55eda5dfe6bf59a21e56f8f5a8a19d37ad8ec
cibernox/ember-cli-accounting,cibernox/ember-cli-accounting,alexdiliberto/ember-cli-accounting,alexdiliberto/ember-cli-accounting
app/initializers/ember-cli-accounting.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\n/**\n * Module dependencies\n */\nvar surveysPolicy = require('../policies/surveys.server.policy'),\n\tsurveys = require('../controllers/surveys.server.controller');\n\nmodule.exports = function (app) {\n\t// Groups col...
javascript
edit
0
1
mit
10ab4d728b2251fd6f7be35131b812cfe6a1f3e2
ECAM-Brussels/PeacIn,ECAM-Brussels/PeacIn,ECAM-Brussels/PeacIn
modules/surveys/server/routes/surveys.server.routes.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar gulp = require( 'gulp' );\nvar $ = require( 'gulp-load-plugins' )();\nvar pkg = require( '../config' ).pkg;\nvar banner = require( '../config' ).banner;\nvar config = require( '../config' ).scripts;\nvar handleError...
javascript
edit
0
1
cc0-1.0
cf041404bfb123e87a63230afc9dbbc4f0e37583
contolini/generator-cf,contolini/generator-cf,Scotchester/generator-cf,contolini/generator-cf,Scotchester/generator-cf,Scotchester/generator-cf
app/templates/gulp/gulp/tasks/scripts.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nexports.config = {\n specs: ['**/*_spec.js'],\n\n baseUrl: 'http://localhost:8080/hawtio',\n\n onPrepare: function() {\n // The require statement must be down here, since jasmine-reporters@1.0\n // needs jasmine to be in the gl...
javascript
edit
0
1
apache-2.0
d1ba93fad5b63ac6a0eb5cfd60e8714992fbfb6f
andytaylor/hawtio,stalet/hawtio,Fatze/hawtio,grgrzybek/hawtio,fortyrunner/hawtio,tadayosi/hawtio,samkeeleyong/hawtio,jfbreault/hawtio,rajdavies/hawtio,rajdavies/hawtio,Fatze/hawtio,uguy/hawtio,stalet/hawtio,stalet/hawtio,skarsaune/hawtio,fortyrunner/hawtio,telefunken/hawtio,tadayosi/hawtio,voipme2/hawtio,jfbreault/hawt...
hawtio-web/src/test/e2e-specs/conf.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// Copyright (c) 2014 Readium Foundation and/or its licensees. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without modification,\n// are permitted provided that the following conditions are...
javascript
edit
0
4
bsd-3-clause
42b7f95a764c845c0ba885986f94a3ebccda76bf
kivuto/readium-js,ravn-no/readium-js,kivuto/readium-js,readium/readium-js,looknear/readium-js,bibliolabs/readium-js,ravn-no/readium-js,readium/readium-js,bibliolabs/readium-js,looknear/readium-js
build-config/RequireJS_config_browser.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* @flow */\nimport React from 'react';\nimport { StyleSheet, Text } from 'react-native';\nimport { TabNavigator, TabBarTop } from 'react-navigation';\nimport { FormattedMessage } from 'react-intl';\n\nimport tabsOptions from '../styles...
javascript
edit
0
1
apache-2.0
a6017d90d46877a8b34593bdd178fe86910e4e9a
vishwesh3/zulip-mobile,vishwesh3/zulip-mobile,vishwesh3/zulip-mobile,vishwesh3/zulip-mobile
src/main/StreamTabs.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\ndefine([\n 'underscore',\n 'backbone',\n 'models/core/BaseModel',\n], function(_, Backbone, BaseModel) {\n\n var ProjectModel = BaseModel.extend({\n\n urlRoot: 'api/projects',\n\n defaults: {\n id: n...
javascript
edit
0
2
mit
5c17fe3d2c01b78866ab7534f1f47645fab9a49f
kinow/nestor,nestor-qa/nestor,kinow/nestor,kinow/nestor,kinow/nestor,nestor-qa/nestor,nestor-qa/nestor,nestor-qa/nestor
public/js/models/project/ProjectModel.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar E;\r\n(function (E) {\r\n E[E[\"a\"] = 0] = \"a\";\r\n})(E || (E = {}));\r\nvar E;\r\n(function (E) {\r\n E[E[\"b\"] = 1] = \"b\";\r\n})(E || (E = {}));\r\nvar x = E;\r\nvar x;\r\nvar y = E;\r\nvar y; // two errors: the types ...
javascript
edit
0
1
apache-2.0
f62558bd3b5d86f12aeb692f90c63be1ba4bebb3
hippich/typescript,mbebenita/shumway.ts,hippich/typescript,popravich/typescript,popravich/typescript,mbebenita/shumway.ts,popravich/typescript,fdecampredon/jsx-typescript-old-version,fdecampredon/jsx-typescript-old-version,mbebenita/shumway.ts,fdecampredon/jsx-typescript-old-version,hippich/typescript
tests/baselines/reference/typeOfEnumAndVarRedeclarations.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// @flow\n/* eslint-disable flowtype/require-return-type */\n\nimport {\n CLEAN_NEW_DISK_DIALOG_SUBTREE,\n SET_NEW_DISK_DIALOG_PROGRESS_INDICATOR,\n SET_NEW_DISK_DIALOG_ERROR_TEXT,\n SET_NEW_DISK_DIALOG_DONE,\n} from '_/constants'\n...
javascript
edit
null
null
apache-2.0
78a3f1fb8736630499d9d6a1951e57ca18b447bc
oVirt/ovirt-web-ui,mareklibra/userportal,mareklibra/userportal,mareklibra/userportal,mareklibra/userportal,oVirt/ovirt-web-ui,oVirt/ovirt-web-ui
src/components/NewDiskDialog/actions.js
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// todo: add in some helpers!\n\nexport function dummyHelper(something) {\n return something;\n}\n\n```\n\nApply this change: Add polyglot template Helper from the userPage branch." }, { "role": "assistant", "content": "imp...
javascript
edit
0
1
mit
e8bf10525664b79d653805dfd389b5439baecc84
jashot7/openbazaar-desktop,srhoulam/openbazaar-desktop,OpenBazaar/openbazaar-desktop,tenthhuman/openbazaar-desktop,jashot7/openbazaar-desktop,jashot7/openbazaar-desktop,jjeffryes/openbazaar-desktop,jjeffryes/openbazaar-desktop,srhoulam/openbazaar-desktop,OpenBazaar/openbazaar-desktop,jjeffryes/openbazaar-desktop,tenthh...
js/utils/templateHelpers.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = function(){\n this.Given(/^I visit TODOMVC$/,function(){\n this.driver.get('http://todomvc.com/examples/backbone/')\n });\n\n this.When(/^I enter \\\"([^\\\"]*)\\\"$/, function(value){\n new this.Widget({\n ...
javascript
edit
0
1
mit
222720e9cb9b7979d31a0176873ff9b1756c249a
bruz/pioneer,bruz/pioneer,mojotech/pioneer,mojotech/pioneer,mojotech/pioneer,bruz/pioneer
src/scaffold/simple.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n/* global require */\n/* global process */\n\nvar fs = require ('fs');\nvar path = require ('path');\n\nvar mkdirSync = function (path) {\n try {\n fs.mkdirSync (path);\n } catch (e) {\n if (e.code !== 'EEXIST') {...
javascript
edit
0
3
mit
8cf44a69b067f262d9cd13e4477de9e2776ca75c
epsitec-sa/mai-chai
bin/mai-chai-init.js
rejected_duplicate
Near-duplicate of sample 83594
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport { storiesOf } from '@storybook/react';\nimport { withInfo } from '@storybook/addon-info';\n\n// For props table\nimport HeaderRow from '@ichef/gypcrete/src/HeaderRow';\n\nimport BasicUsage from './Basi...
javascript
edit
0
1
apache-2.0
cae8cf395886f192e2c348f230bea8371e5cf2b5
iCHEF/gypcrete,iCHEF/gypcrete
packages/storybook/examples/HeaderRow/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst PropTypes = require('prop-types')\nconst UppyCore = require('@uppy/core').Uppy\n\n// The `uppy` prop receives the Uppy core instance.\nconst uppy = PropTypes.instanceOf(UppyCore).isRequired\n\n// A list of plugins to mount inside ...
javascript
edit
0
0
mit
c1594eb0f9a039c74432f0b0d2aaf3df905d819b
transloadit/uppy,transloadit/uppy,transloadit/uppy,transloadit/uppy
packages/@uppy/react/src/propTypes.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport {\n GeometryPipelineStage,\n ModelExperimentalSceneMeshPrimitive,\n} from \"../../../Source/Cesium.js\";\n\ndescribe(\"Scene/ModelExperimental/ModelExperimentalSceneMeshPrimitive\", function () {\n var mockPrimitive = {};\n\n ...
javascript
edit
0
1
apache-2.0
15952be4a768055f4f5d8abfb8fb2525cdf1cb6a
CesiumGS/cesium,likangning93/cesium,likangning93/cesium,AnalyticalGraphicsInc/cesium,CesiumGS/cesium,AnalyticalGraphicsInc/cesium,likangning93/cesium,CesiumGS/cesium,likangning93/cesium,CesiumGS/cesium,likangning93/cesium,CesiumGS/cesium
Specs/Scene/ModelExperimental/ModelExperimentalSceneMeshPrimitiveSpec.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport cx from 'classnames';\n\nimport Octicon from './octicon';\n\nconst typeAndStateToIcon = {\n Issue: {\n OPEN: 'issue-opened',\n CLOSED: 'issue-closed',\n },\...
javascript
edit
0
3
mit
3701c6768ef7c8e4bbe97a5b130ed17f4f24d442
atom/github,atom/github,atom/github
lib/views/issueish-badge.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { StackNavigator } from 'react-navigation';\nimport * as Pages from './pages';\n\nexport default StackNavigator(\n {\n home: {\n screen: Pages.Home,\n navigationOptions: {\n title: 'HOW MANY',\n },\n ...
javascript
edit
0
0
mit
b07ec2aee0e988a6bed3c07511942a969e2e971d
pleportz/HowMany,pleportz/HowMany,pleportz/HowMany
src/Routing.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// Hot loading HRM Patch\nimport \"react-hot-loader/patch\"\n\n// fetch polyfill\nimport \"whatwg-fetch\"\n\nimport metadata from \"../src/metadata.js\"\nimport routes from \"../src/routes.js\"\nimport store from \"../src/store.js\"\nim...
javascript
edit
0
1
mit
8a2c12b589dfeb048697521ab4bc8749e7743ad2
phenomic/phenomic,MoOx/statinamic,pelhage/phenomic,phenomic/phenomic,MoOx/phenomic,MoOx/phenomic,phenomic/phenomic,MoOx/phenomic
themes/phenomic-theme-base/scripts/phenomic.browser.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nexport default function (req, res, next) {\n\tconsole.log(\"Sending dashboard\")\n\tconsole.log(__dirname)\n\tconsole.log(process.env.PWD)\n\tconsole.log(global.root)\n\tconsole.log(\"\")\n res.sendFile('index.html', { root: global.r...
javascript
edit
0
2
mit
3b9a8b2a0094007750302361330afed2c89fdea1
AdamSalma/Lurka,AdamSalma/Lurka
src/server/routes/dashboard/getDashboard.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar createExpHelperInst = window.optly.mrkt.form.createExp({formId: 'create-exp-form'});\n\n$(createExpHelperInst.formElm).on('submit', function(e) {\n var uri,\n validationError = false;\n\n e.preventDefault();\n\n validationErro...
javascript
edit
0
2
mit
37139788ca17a8789677b95bfbb0189a8051eeac
CilantroOrg/CilantroVegOrg,CilantroOrg/CilantroVegOrg,CilantroOrg/CilantroVegOrg
website-guts/assets/js/components/create-experiment.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst DrawCard = require('../../drawcard.js');\n\nclass ShinjoTrailblazer extends DrawCard {\n setupCardAbilities(ability) {\n this.reaction({\n title: 'Gain +2/+2',\n when: {\n onCardRevea...
javascript
edit
0
3
mit
b06befbfe3f2e019c0bba92e077890fd5efc2917
gryffon/ringteki,jeremylarner/ringteki,gryffon/ringteki,jeremylarner/ringteki,jeremylarner/ringteki,gryffon/ringteki
server/game/cards/07-WotW/ShinjoTrailblazer.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar interactiveBrowse_overview = d3.select(\"#interactiveBrowse_overview\");\n\nvar ecology = interactiveBrowse_overview.append(\"rect\")\n .attr(\"x\", 680)\n .attr(\"y\", 90)\n .attr(\"width\", 600)\n .attr...
javascript
edit
null
null
mit
aeadb2b9780b86cc1772b6a377d901b15bca1e3d
molbiodiv/fennec,molbiodiv/fennec,molbiodiv/fennec,molbiodiv/fennec,molbiodiv/fennec
src/webroot/js/interactiveTraitBrowse.js
rejected_code_smell
Internal duplication: ~26% of the file is inside repeated 12+ line blocks
null
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar yeoman = require('yeoman-generator');\n\nmodule.exports = yeoman.generators.Base.extend({\n constructor: function () {\n yeoman.generators.Base.apply(this, arguments);\n\n var options = require('./options/index');\n...
javascript
edit
0
1
mit
645015e7e54ea287bac0dcdc1b142e25babf69c9
eithewliter5518/generator-sails-rest-api,tnunes/generator-trails,jaumard/generator-trails,ghaiklor/generator-sails-rest-api,konstantinzolotarev/generator-trails,ghaiklor/generator-sails-rest-api,IncoCode/generator-sails-rest-api,italoag/generator-sails-rest-api,mhipo1364/generator-sails-rest-api,synergycns/generator-sa...
generators/app/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nlet Gelato = {};\n\nif ($ === undefined) {\n throw 'Gelato requires jQuery as a dependency.'\n} else {\n window.jQuery = window.$ = $;\n}\n\nif (_ === undefined) {\n throw 'Gelato requires Lodash as a dependency.'\n}...
javascript
edit
0
2
mit
2d034d40996231f93c02e08922078a9c79af1840
mcfarljw/backbone-gelato,jernung/gelato,mcfarljw/gelato-framework,mcfarljw/gelato-framework,jernung/gelato,mcfarljw/backbone-gelato
src/gelato.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = () => {\n return `module.exports = {\n hotkey: 'alt+space',\n theme: 'tinytacoteam/zazu-light-theme',\n plugins: [\n 'tinytacoteam/zazu-calculator',\n 'tinytacoteam/zazu-file-finder',\n 'tinytacoteam/zazu-c...
javascript
edit
0
1
mit
393c3baaa65913cb7ad25954ee328ba33bdc3d72
tinytacoteam/zazu,tinytacoteam/zazu
app/templates/zazurc.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// Minify JS\nmodule.exports = function(grunt) {\n grunt.config('uglify', {\n options: {\n sourceMap: true\n },\n deploy: {\n src: 'src/scripts/master.js',\n dest: 'dist/scripts/m...
javascript
edit
0
1
mit
9ec2a0bc06914b14a872f9bc9ee1ddd07852689a
yellowled/yl-bp,yellowled/yl-bp
grunt/contrib-uglify.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* eslint-env mocha */\nimport Chai from 'chai';\nimport ChaiString from 'chai-string';\nimport Sinon from 'sinon';\nimport SinonChai from 'sinon-chai';\n\nChai.use(ChaiString);\nChai.use(SinonChai);\n\nbeforeEach(function() {\n this.s...
javascript
edit
0
1
mit
cfb724e0b8cdf5cb48ebf12b7f785c57b941db4d
kpdecker/linoleum-electron,kpdecker/linoleum-node,kpdecker/linoleum-webpack,kpdecker/linoleum,kpdecker/linoleum-electron
src/sandbox.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\nclass Storage {\n constructor(connection) {\n this._connection = connection;\n }\n\n merge() {\n \n }\n}\n\nmodule.exports = {\n Storage\n};\n\n```\n\nApply this change: feat: Add model saving and data transformation" }, ...
javascript
edit
0
1
mit
d7f9c01abe2e0ae0db53a413f530c38df3e0de55
NSAppsTeam/nickel-bot
src/storage.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport textures from 'textures'\n\nexport const colorTextures = {\n '#ffd300': () => {\n return textures.lines()\n .stroke('#f48335')\n .background('#f36d20')\n },\n '#f56d00': () => {\n return textures.lines()\n .stro...
javascript
edit
0
1
mit
bce2fb79934e4d26d7e8a77f73735f1db32ed269
bengler/imdikator,bengler/imdikator
data/colorPalette.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react'\n\nimport GameCard from './GameCard'\n\nexport default (props) => {\n const userId = props.userId\n const teams = props.teams\n const games = []\n const gamesObj = props.games\n console.log('teams', teams)...
javascript
edit
0
12
mit
310f7f0568c59da19eb3c501ded0805c6dfe2471
georgeF105/handball-scoring,georgeF105/handball-scoring
app/components/Games.js
rejected_complexity
Cyclomatic complexity too high: 12
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n$(document).ready(function() {\n // This is called after the document has loaded in its entirety\n // This guarantees that any elements we bind to will exist on the page\n // when we try to bind to them\n\n // See: http://docs.jquer...
javascript
edit
0
1
mit
283e8012bb6f35239c1e7b51e56303bfc85c475f
kevalwell/SurveyCaptain,kevalwell/SurveyCaptain,kevalwell/SurveyCaptain
public/js/application.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n$('#add_moderador').on(\n \"click\",\n function () {\n var id = $('#id').val();\n var laboratorio_id = $('#laboratorio_id').val();\n $.post(\n \"/admin/moderadores/nuevo\",\n {\n ...
javascript
edit
0
3
mit
ddd69af971aa27a107cd09f66229ce50a164fcda
trivialbox/aluc,trivialbox/aluc
public/js/moderadores.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport {loadViaAjax, loadViaNode} from './katas.js';\nimport Page from './components/page.js';\nimport GithubSearchResult from './github-search-result.js';\n\nfunction githubJsonToKataGroups(githubJson) {\n ...
javascript
edit
0
2
mit
e26594ccd1a39eea76f984faa12bc497a8525ab1
tddbin/es6katas.org
src/render.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*!\n * Start Bootstrap - Freelancer Bootstrap Theme (http://startbootstrap.com)\n * Code licensed under the Apache License v2.0.\n * For details, see http://www.apache.org/licenses/LICENSE-2.0.\n */\n\n// jQuery for page scrolling feat...
javascript
edit
0
1
apache-2.0
922f234a04f7ac9fd134b1badeba2157bca6a16d
taylorstib/taylorstib.github.io
js/freelancer.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport addable from 'flockn/mixins/addable';\nimport renderable from 'flockn/mixins/renderable';\nimport updateable from 'flockn/mixins/updateable';\nimport serializable from 'flockn/mixins/serializable';\n\nexport {addable, renderable,...
javascript
edit
0
0
mit
72df88fadf1b99e2618a7f9bacc0a7f56975eb38
freezedev/flockn,freezedev/flockn
src/mixins/index.js
accepted
null
true
[ { "role": "user", "content": "Write javascript code for the following: Add file for solo challenge" }, { "role": "assistant", "content": "<!DOCTYPE html>\n<html>\n<head>\n\t<title></title>\n</head>\n<body>\n<textarea id=\"box\" rows=\"4\" cols=\"80\"></textarea>\n<textarea id =\"display-area\"><...
javascript
new_file
null
null
mit
aca2f24527d354fdef8ac8df0767730eb535ce8a
superboyblue/phase-0,superboyblue/phase-0,superboyblue/phase-0
week-7/game.js
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*!\n * Ext JS Connect 0.0.1\n * Copyright(c) 2010 Ext JS, Inc.\n * MIT Licensed\n */\n\nvar child_process = require('child_process'),\n sys = require('sys');\n\nmodule.exports = {\n\n handle: function (err, req, res) {\n v...
javascript
edit
0
6
mit
b39445f8d835e37fefcaab8e4fbdc3bcfbf439d1
lian774739140/connect,dkfiresky/connect,khirayama/connect,qitianchan/connect,llwanghong/connect,RoseTHERESA/connect,senchalabs/connect,chinazhaghai/connect,keenwon/connect,liuwei9413/connect,brianloveswords/connect,austincitylimits/connect,wghust/connect,davehorton/drachtio,tanveer12332/connect,gtomitsuka/connect,mi2oo...
lib/connect/filters/gzip.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*jshint node:true, laxcomma:true */\n/* global describe, it */\n'use strict';\nvar assert = require('assert')\n , JBJ = require('jbj')\n , examples = require('./examples.json');\n\n// JBJ.use(require('../lib/'));\n\n\ndescribe('Async...
javascript
edit
0
2
mit
ab0901e7b5fcd14b6d37d8ba352f497993b24c52
Inist-CNRS/node-jbj-ist
test/async.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar d = require('es5-ext/lib/Object/descriptor')\n , DOMInput = require('../date-time').DOMInput\n\n , DateType = require('dbjs/lib/objects')._get('Date')\n , Input;\n\nrequire('../');\n\nInput = function (doc...
javascript
edit
0
5
mit
ba5f3a345d0faadb4303973d8f1f49611c6b8b4c
medikoo/dbjs-dom
input/date-time/date.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\n/**\n * Module dependencies\n */\n\n// Node.js core.\nconst path = require('path');\n\n// Local dependencies.\nconst packageJSON = require('../json/package.json.js');\nconst database = require('../json/database.json.js'...
javascript
edit
0
0
mit
15544528dc140e698233e8d2f8f99a741439b457
wistityhq/strapi,wistityhq/strapi
packages/strapi-generate-new/lib/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar _ = require('lodash');\n\nfunction Parameter(id, type, defaultValue, description, options) {\n this.id = id;\n this.node = {\n Type: type\n };\n if (description) {\n this.node.Description =...
javascript
edit
0
3
apache-2.0
d735ae9cca196295c67afaed2638dce54cebfb19
owap/scenery,OpenWhere/scenery,OpenWhere/scenery
lib/Parameter.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport {\n report,\n ruleMessages\n} from \"../../utils\"\n\nexport const ruleName = \"comment-space-inside\"\n\nexport const messages = ruleMessages(ruleName, {\n expectedOpening: `Expected single space after \"/*`,\n rejectedOpeni...
javascript
edit
0
9
mit
7cec93663f75377a8dd52b89ed40d78db1e8f205
gucong3000/stylelint,mahtd/stylelint,gaidarenko/stylelint,stylelint/stylelint,gaidarenko/stylelint,stylelint/stylelint,stylelint/stylelint,evilebottnawi/stylelint,gaidarenko/stylelint,teryaew/stylelint,heatwaveo8/stylelint,heatwaveo8/stylelint,MadLittleMods/stylelint,heatwaveo8/stylelint,gucong3000/stylelint,m-allanson...
src/rules/comment-space-inside/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar cordova = require('cordova')\nvar rs = [\"Royal Progress\", \"RSUP Dr Cipto Mangunkusumo\", \"RSUP Fatmawati\", \"RSUP Persahabatan\"]\n\nvar input = document.getElementbyId('hospital-form').value;\n\nfunction checkTextField(input) ...
javascript
edit
null
null
mit
0bddb99d4edc599389f5baef1c287e53a645cfc1
cepatsembuh/cordova,cepatsembuh/cordova,cepatsembuh/cordova,mercysmart/cepatsembuh,mercysmart/cepatsembuh,mercysmart/cepatsembuh,cepatsembuh/cordova,mercysmart/cepatsembuh,mercysmart/cepatsembuh,cepatsembuh/cordova
www/js/main.js
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Ember from 'ember';\n\nexport default Ember.Controller.extend({\n current: 2,\n dynamicCount: 10,\n dynamicCurrent: 5,\n\n actions: {\n pageChanged(direction, page, last) {\n console.log(direction, page, last);\n }...
javascript
edit
0
1
mit
b7469b553d4eade2e84728eed93730d559ca809c
knownasilya/pagination-pager,knownasilya/pagination-pager
tests/dummy/app/controllers/application.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar socketio = require('socket.io');\nvar Proto = require('uberproto');\nvar debug = require('debug')('feathers:primus');\nvar commons = require('feathers-commons').socket;\n\nmodule.exports = function (config) {\n ret...
javascript
edit
0
3
mit
5acfbbed75c5b39d9f79b96db03fdc3bb8bd01f7
feathersjs/feathers,marshallswain/feathers,feathersjs/feathers,feathersjs/feathers,loris/feathers
lib/providers/socket/socketio.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function(){\n 'use strict';\n\n angular.module('application', [\n 'ui.router',\n 'ngAnimate',\n\n //foundation\n 'foundation',\n 'foundation.dynamicRouting',\n 'foundation.dynamicRouting.animations',\n\n // Fusio...
javascript
edit
0
1
apache-2.0
2f491e90841901b5b0bfb141a1a77491837bd513
AlexKolonitsky/lucidworks-view,lucidworks/lucidworks-view,AlexKolonitsky/lucidworks-view,lucidworks/lucidworks-view,lucidworks/lucidworks-view,AlexKolonitsky/lucidworks-view
client/assets/js/app.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React, { Component, PropTypes } from 'react';\nimport Annotation from './Annotation';\nimport AddAnnotation from './AddAnnotation';\nimport Can, { can } from '../Can';\n\nclass Annotations extends Component {\n render() {\n c...
javascript
edit
0
2
mit
7325210081093e8de7aeb298d2de99e32eb51bb6
meedan/check-web,meedan/check-web,meedan/check-web
src/app/components/source/Annotations.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\n'use strict';\n\nvar mtg = function(opts) {\n /*code*/\n};\n\nmtg.card = require('./card');\n\nmtg.cache = require('./deck');\n\nmtg.db = require('./db');\n\nmodule.exports = mtg;\n\n```\n\nApply this change: docs: Add docblock heade...
javascript
edit
0
1
mit
4af029434f49d84a72beaae9769c3bc6dbddc681
jtrussell/node-mtg
lib/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* @flow */\n\nimport {sync as resolve} from 'resolve';\nimport {dirname} from 'path';\n\nimport type {AssertionLocation} from './assertions/assertionTypes';\n\n\n/* We need to use source-map-support in order to extract the right locati...
javascript
edit
null
null
mit
83039b9b2383ada5962a47b0858fadfdae6ddceb
JonathanUsername/flow,claudiopro/flow,jamesgpearce/flow,mroch/flow,TiddoLangerak/flow,samwgoldman/flow,JonathanUsername/flow,gabelevi/flow,mroch/flow,nmote/flow,facebook/flow,samwgoldman/flow,facebook/flow,TiddoLangerak/flow,facebook/flow,jamesgpearce/flow,mroch/flow,claudiopro/flow,MichaelDeBoey/flow,facebook/flow,Mic...
tsrc/test/searchStackForTestAssertion.js
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar bcrypt = require('bcrypt'),\n db = require('./db');\n\nmodule.exports = {\n insert: function(options, callback) {\n var users = db.coll('users'),\n data = options.user,\n password = options.passwor...
javascript
edit
0
3
mit
c945e8c3e108c30be2258112a7f5ffb0e07a2f5f
okfn/aquarium,okfn/aquarium
lib/users.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Ember from 'ember';\n\nexport function renderComponentTimeString(payload) {\n return `${payload.object} (Rendering: ${payload.initialRender ? 'initial' : 'update' })`;\n}\n\nexport function renderOutletTimeString(payload) {\n r...
javascript
edit
0
1
mit
56085b314c6afec7be233b31f2f4192bfc5fb34c
ember-best-practices/ember-perf-timeline,ember-best-practices/ember-perf-timeline
addon/initializers/ember-perf-timeline.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * jQuery if-else plugin\n *\n * Creates if(), else() and fi() methods that can be used in\n * a chain of methods on jQuery objects\n * \n * @author Vegard Løkken <<EMAIL>>\n * @copyright 2013\n * @version 0.2\n * @licence MIT\n */...
javascript
edit
0
3
mit
f45697922d6dc45338e832f74a1c551ede11a984
veloek/jquery.if-else
jquery.if-else.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nif(module.hot) {\n\tfunction check() {\n\t\tmodule.hot.check(function(err, updatedModules) {\n\t\t\tif(err) {\n\t\t\t\tif(module.hot.status() in {abort:1,fail:1})\n\t\t\t\t\twindow.location.reload();\n\t\t\t\telse\n\t\t\t\t\tconsole.war...
javascript
edit
0
6
mit
b84b3486b76552d401c91694a80c09ab4b99d3ac
VANITAX/webpack,SimenB/webpack,stephan83/webpack,jamestautges/webpack,shaunstanislaus/webpack,imjerrybao/webpack,jamestautges/webpack,zenlambda/webpack,widgetic/webpack,Teino1978-Corp/Teino1978-Corp-webpack-bundled-assets,Zeratul5/webpack,ZECTBynmo/webpack,nagyistoce/webpack,djchie/webpack,rf-/webpack,loganlinn/webpack...
hot/dev-server.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// chai is an assertion library\nlet chai = require('chai');\n\n// @see http://chaijs.com/api/assert/\nlet assert = chai.assert;\n\n// register alternative styles\n// @see http://chaijs.com/api/bdd/\nchai.expect();\nchai.should();\n\n//...
javascript
edit
0
1
mit
d763415c6c954db175edec8dde582671a4712927
molbiodiv/fennec,molbiodiv/fennec,molbiodiv/fennec,molbiodiv/fennec,molbiodiv/fennec
tests/js/helpers/organismDetailsSpec.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\ndefine( [\"app\", \"scribbler\"], function( app, scribbler ) {\n var container = document.getElementById( 'buttons-container' );\n var buttons = {\n \"Toggle auto-rotate\": function() {\n app.spin = !app.spin;\n },\n \"T...
javascript
edit
0
2
mit
3552d19410b5857e5e3101a69c583535932035e9
felixpalmer/webgl-tombstone,felixpalmer/webgl-tombstone,felixpalmer/webgl-tombstone
js/app/buttons.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n//TODO:Javacsript can check if checked Ids hasv the same scale ID\r\nfunction extractSelectedItems(submitButton) {\r\n\tsourceForm = document.getElementById(\"modifyFormRows\");\r\n\tdestinationForm = submitButton.form;\r\n\tvar count =...
javascript
edit
0
8
apache-2.0
7acde78987e63460bf6ab1b3ed048aa324104ea4
sakaiproject/evaluation,csev/evaluation,csev/evaluation,buckett/evaluation,sakaiproject/evaluation,buckett/evaluation,buckett/evaluation,csev/evaluation,sakaiproject/evaluation
tool/src/webapp/content/js/blockUtils.js
rejected_duplicate
Near-duplicate of sample 90872
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar Class = require('std/Class')\n\nmodule.exports = Class(function() {\n\t\n\tthis.init = function(x, y, w, h) {\n\t\tthis.x = x\n\t\tthis.y = y\n\t\tthis._x2 = x + w\n\t\tthis._y2 = y + h\n\t}\n\t\n\tthis.pad = function(amount) {\n\t\...
javascript
edit
0
4
mit
f5081aab682ec7c6e6086c4923bb4f550e6c53bf
ASAPPinc/std.js,marcuswestin/std.js
math/Rect.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport TextArea from '@ember/component/text-area';\nimport { isNone } from '@ember/utils';\nimport { get, computed } from '@ember/object';\nimport AutoResize from \"../mixins/autoresize\";\n\n/**\n @element text-area\n */\nTextArea.reo...
javascript
edit
0
0
mit
4262da412da5c2ef592a73171fce0fb5cf9a7f1d
paddle8/ember-autoresize,tim-evans/ember-autoresize,tim-evans/ember-autoresize,paddle8/ember-autoresize
addon/ext/text-area.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nwindow.onload = function() {\n var xScale = new Plottable.LinearScale();\n var yScale = new Plottable.LinearScale();\n\n var xAxis = new Plottable.XAxis(xScale, \"bottom\");\n var yAxis = new Plottable.YAxis(yScale, \"left\");\n va...
javascript
edit
0
2
mit
1d03959e9fdb26b0764cac567cf85b34d1b23db2
alyssaq/plottable,gdseller/plottable,softwords/plottable,onaio/plottable,onaio/plottable,palantir/plottable,NextTuesday/plottable,palantir/plottable,jacqt/plottable,danmane/plottable,gdseller/plottable,softwords/plottable,NextTuesday/plottable,danmane/plottable,softwords/plottable,RobertoMalatesta/plottable,NextTuesday...
tutorials/customProjectors/customProjectors.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// Command-line arguments passed to npm when rebuilding binary packages.\nvar args = [\n \"rebuild\",\n\n // The --no-bin-links flag tells npm not to create symlinks in the\n // node_modules/.bin/ directory when rebuilding packages, ...
javascript
edit
0
2
mit
5e874bec93846beb53d49831b5ea1bc3fdac994e
chasertech/meteor,Hansoft/meteor,Hansoft/meteor,mjmasn/meteor,chasertech/meteor,Hansoft/meteor,mjmasn/meteor,chasertech/meteor,Hansoft/meteor,mjmasn/meteor,mjmasn/meteor,chasertech/meteor,Hansoft/meteor,mjmasn/meteor,mjmasn/meteor,chasertech/meteor,Hansoft/meteor,chasertech/meteor,Hansoft/meteor,chasertech/meteor,mjmas...
tools/static-assets/server/npm-rebuild-args.js
rejected_duplicate
Near-duplicate of sample 87890
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*\nToDo:\n\t-Implement photo gallery\n\t-About me page\n\t- Filter print gallery by type?\n\t-Update print details page with pictures\n\t- ADMIN options - add photos, galleries, pages, etc...\n\t-RESTful API\n*/\n\n/* Need to get these...
javascript
edit
0
3
mit
3a94f7608ce8eb21d06086d7cbf835ffb5530b00
mahonrig/glry,mahonrig/glry,mahonrig/glry
js/application.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function(document, housewarming){\n\n var playground = document.getElementById('playground');\n playground.width = document.body.clientWidth;\n playground.height = document.body.clientHeight;\n\n var options = {\n\tdistance...
javascript
edit
0
1
mit
cd1f9f81364ff48a5aff11ca21ec53632046626c
dvberkel/housewarming,dvberkel/housewarming
js/application.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n$(document).ready(function(){\n\n 'use strict';\n\n function load_new_items(){\n var sign = load_path.indexOf('?') >= 0 ? '&' : '?'\n $.get(load_path + sign + 'page=' + (++page_num), function(data, e) {\n if(data.length < 5...
javascript
edit
0
4
mit
4eb87b7544e38d594e3b0c7891cab94652393922
HeeL/scrollinity
vendor/assets/javascripts/scrollinity.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Ember from 'ember';\n\nexport default Ember.Controller.extend({\n identification: null,\n password: null,\n\n supportedBrowers: [\n { name: 'Chrome', url: 'http://www.google.com/chrome', icon: '/assets/images/chrome.png' },...
javascript
edit
0
1
mit
858925c132258eb33c599c5005cedf091cc14ab1
emberjs-cn/gloit-component,emberjs-cn/gloit-component
tests/dummy/app/controllers/login-form.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// Load Active Admin's styles into Webpacker,\n// see `active_admin.scss` for customization.\nimport \"../stylesheets/active_admin\";\n\nimport \"@activeadmin/activeadmin\";\nimport 'arctic_admin'\n\n```\n\nApply this change: Fix missin...
javascript
edit
0
0
mit
dd98706bc2007a3441f01dc0f6abbf99556e66d7
rootstrap/rails_api_base,rootstrap/rails_api_base,rootstrap/rails_api_base,rootstrap/rails_api_base
app/javascript/packs/active_admin.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport classNames from 'classnames';\nimport Row from './../row';\n\nclass InlineInputs extends React.Component {\n static propTypes = {\n /**\n * Defines the label text for the heading.\n *\n ...
javascript
edit
0
1
apache-2.0
878686210e2e097c468e0a2cca79f58b55306286
Sage/carbon,Sage/carbon,Sage/carbon
src/components/inline-inputs/inline-inputs.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = function ( opt )\r\n{\r\n\topt = opt || {};\r\n\r\n\tvar vfs = require('vinyl-fs'),\r\n\t\tPromise = require('promise');\r\n\r\n\t// Hook function\r\n\treturn function ( context )\r\n\t{\r\n\t\tvar targetPath = opt.targ...
javascript
edit
0
2
mit
f3820218203f859ab3e4f302cc5dae91baaf523c
pavetra/packetizer
lib/hooks/copy.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst ResearchDAO = require(\"../data/research-dao\").ResearchDAO;\nconst needle = require(\"needle\");\nconst {\n environmentalScripts\n} = require(\"../../config/config\");\n\nfunction ResearchHandler(db) {\n \"use strict\";\n\n...
javascript
edit
0
4
apache-2.0
4a4d1db74c63fb4ff8d366551c3af006c25ead12
OWASP/NodeGoat,OWASP/NodeGoat
app/routes/research.js
accepted
null
true