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/* @flow */\nimport { createSelector } from 'reselect';\n\nimport type { Narrow, Selector } from '../types';\nimport { getSubscriptions } from '../directSelectors';\nimport { isStreamOrTopicNarrow } from '../utils/narrow';\nimport { NUL...
javascript
edit
null
null
apache-2.0
e7baf889484a4caab746de6d9859c4ed7fe0d84f
vishwesh3/zulip-mobile,vishwesh3/zulip-mobile,vishwesh3/zulip-mobile,vishwesh3/zulip-mobile
src/title/titleSelectors.js
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport path from 'path';\nimport SeleniumHelper from '../helpers/selenium-helper';\n\nconst {\n clickText,\n getDriver,\n getLogs,\n loadUri\n} = new SeleniumHelper();\n\nconst uri = path.resolve(__dirname, '../../build/inde...
javascript
edit
0
1
bsd-3-clause
c5290a26407e8120afcf84621ad12559fbedb468
LLK/scratch-gui,LLK/scratch-gui
test/integration/backpack.test.js
accepted
null
true
[ { "role": "user", "content": "Write javascript code for the following: Select all blocks with the same selector for speed" }, { "role": "assistant", "content": "scratchblocks.renderMatching(\"pre.blocks, code.blocks\", {languages: [\"en\", \"de\", \"es\", \"el\", \"nl\", \"pt\", \"zh_CN\", \"tr\...
javascript
new_file
0
0
mit
865f3f3b21c67df4d1604dfacf3a2b6d3f039797
LLK/mw-ScratchBlocks2,tjvr/wiki-scratchblocks,Choco31415/wiki-scratchblocks,tjvr/wiki-scratchblocks,Choco31415/wiki-scratchblocks,LLK/mw-ScratchBlocks2
run_scratchblocks.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\"use strict\";\n\nvar path = require(\"path\");\nvar _ = require(\"lodash\");\nvar assert = require(\"chai\").assert;\nvar request = require(\"supertest\");\nvar fork = require(\"child_process\").fork;\n\nvar index = pat...
javascript
edit
0
1
apache-2.0
f95d5715d26957d4832fdb555137d1b09e19d917
BrowserSync/browser-sync,Iced-Tea/browser-sync,portned/browser-sync,naoyak/browser-sync,schmod/browser-sync,Plou/browser-sync,syarul/browser-sync,lookfirst/browser-sync,Teino1978-Corp/Teino1978-Corp-browser-sync,syarul/browser-sync,EdwonLim/browser-sync,zhelezko/browser-sync,chengky/browser-sync,mcanthony/browser-sync,...
test/specs/e2e/e2e.cli.snippet.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* Look up which admin fields should be populated for a record in a given layer.\n *\n * The logic is: look up eveything above in the WOF heirarchy, ignoring things like\n * 'dependency'\n *\n * Note: this filtering really only matters ...
javascript
edit
0
6
mit
369c5783d7daeef6422752eb7d109f08dbea1526
tadjik1/wof-admin-lookup,tadjik1/wof-admin-lookup
src/getAdminLayers.js
rejected_duplicate
Near-duplicate of sample 70986
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar EmberEncore = {};\n\nEmber.onLoad('Ember.Application', function(Application) {\n Application.initializer({\n name: 'EmberEncore',\n after: 'ember-data',\n initialize: function(container) {\n container.register('serial...
javascript
edit
0
1
bsd-3-clause
887b48e89ef5c7fda4a2a2a42a5f72d4464934d2
mirego/ember-encore
lib/initializer.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport { BrowserRouter, Route, Switch } from 'react-router-dom';\n\nimport TopBar from './top-bar/top-bar';\nimport LandingPage from './landing-page/landing-page';\nimport ContactPage from './contact-page/con...
javascript
edit
0
1
apache-2.0
ef0e2d96a50ac4cd539b9e332fc884b05302fd40
cozzbp/example-react-app,cozzbp/example-react-app
src/Root.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = {\n commands: {\n random: {\n help: 'Selects a random choice or number',\n command: function (bot, msg) {\n if (msg.args.length > 2) {\n msg.args.shift()\n return msg.args[Math.flo...
javascript
edit
0
4
isc
6135992dd4ef65d02581a2091e7b9b84a72de31a
zuzakistan/civilservant,zuzakistan/civilservant
modules/random.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar _ = require('lodash')\nvar fs = require('fs')\nvar gzip = require('gzip-size')\nvar filesize = require('filesize')\nvar cssstats = require('cssstats')\n\nvar module = require('tachyons-type-scale/package.json')\nvar moduleCss = fs.r...
javascript
edit
0
0
mit
cbc03e8d0c873d9211611408dcc084117d177262
topherauyeung/portfolio,getfrank/tachyons,tachyons-css/tachyons,cwonrails/tachyons,pietgeursen/pietgeursen.github.io,fenderdigital/css-utilities,fenderdigital/css-utilities,matyikriszta/moonlit-landing-page,topherauyeung/portfolio,topherauyeung/portfolio
lib/type-scale.js
rejected_duplicate
Near-duplicate of sample 70922
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// response manager\nvar response = function(req, res, err, rsp){\n if(err){ return res.json(500, {message: err}); }\n if(!rsp){ return res.send(404); }\n res.json(rsp);\n};\n\nmodule.exports.response = response;\n\n\n```\n\nApply th...
javascript
edit
0
4
mit
7866993bc6e164daea5e7a3a87e537fe2625a6bc
janusnic/deck,MoNoApps/core,MoNoApps/deck,MoNoApps/core,MoNoApps/core,janusnic/deck,MoNoApps/deck,janusnic/deck,MoNoApps/deck
helpers/manager.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar secret = require('./mup-secrets.json');\n\nmodule.exports = {\n servers: {\n one: {\n host: '167.71.2.39',\n username: 'deploy',\n password: secret.password,\n }\n },\n app: {\n name: 'publichappinessmovem...
javascript
edit
0
0
mit
abd18bb472d617564c254098eeb034acaf951943
mordka/fl-events,focallocal/fl-maps,focallocal/fl-maps,mordka/fl-events,mordka/fl-events,focallocal/fl-maps
deployment/publichappinessmovement/mup.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function() {\n 'use strict;'\n\n angular.module('app', ['ng', 'ngTouch', 'restangular', 'ui.router', 'LocalStorageModule', 'matchmedia-ng', 'SignalR', 'ui.bootstrap', 'ngSanitize', 'ui.select']).config(['RestangularProvider', '$u...
javascript
edit
0
1
mit
8ffdceae52c80219d0e303f85be8508f56bb628b
jorupp/conference-room,RightpointLabs/conference-room,jorupp/conference-room,jorupp/conference-room,RightpointLabs/conference-room,jorupp/conference-room,RightpointLabs/conference-room,RightpointLabs/conference-room
RightpointLabs.ConferenceRoom.WebUI/src/app.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar mongoose = require(\"mongoose\");\n\nvar ArtworkSchema = new mongoose.Schema({\n \"P43_has_dimension\": [\n {\n \"@type\": String,\n \"P90_has_value\": String,\n \"P91_has_unit\": {\n ...
javascript
edit
0
0
mit
e6c84b70a4fbd6bc58f7715b432d55f774f8ca28
jeresig/pharos-images
models/Artwork.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst CleanWebpackPlugin = require(\"clean-webpack-plugin\")\nconst fs = require(\"fs\")\nconst path = require(\"path\")\nconst webpack = require(\"webpack\")\n\nconst dist = path.join(process.cwd(), \"public\")\nconst src = path.join(p...
javascript
edit
0
1
mit
d6a094cfa836b9d9c26e72e0523c56e4519f9c09
DevNebulae/ads-pt-api
webpack/shared.config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nApp.module(\"Predictor\", function(Mod, App, Backbone, Marionette, $, _) {\n\n Mod.views.FlightLocationEditor = Marionette.ItemView.extend({\n template: 'flightLocationEditor',\n model: Mod.FlightModel,\n tagName: 'form',\n ...
javascript
edit
0
1
bsd-3-clause
efe4227bdeac05fea0dac21354dbe6b746d49aad
AerodyneLabs/Stratocast,AerodyneLabs/Stratocast,AerodyneLabs/Stratocast,AerodyneLabs/Stratocast,AerodyneLabs/Stratocast
app/modules/predictor/views/flightLocationEditor.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n{\n mainConfigFile: 'output/javascripts/common.js',\n optimize: 'none',\n baseUrl: 'output/javascripts', // was full canonical path\n findNestedDependencies: true,\n include: [ 'common' ],\n insertRequire: [ 'common' ]...
javascript
edit
0
0
apache-2.0
180fd901302c238d3a033c2620a8a1d61909a9c4
semperos/screwdriver,semperos/screwdriver
src/test/resources/com/semperos/screwdriver/sample/hardcoded-build.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport { Route } from 'react-router';\n\n/* containers */\nimport { App } from 'containers/App';\nimport { Home } from 'containers/Home';\nimport { List } from 'containers/List';\n\nexport default (\n <Route...
javascript
edit
0
0
mit
f11384c49b033e247b24e17fd7740ebb30fd6a1a
anorudes/redux-easy-boilerplate
src/routes.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\nvar Support = require('../support');\n\nbefore(function() {\n var dialect = Support.getTestDialect();\n\n if (dialect !== 'postgres' && dialect !== 'postgres-native') {\n return;\n }\n return Support.sequelize.quer...
javascript
edit
0
3
mit
32474460ed150cc88a512a7af6b23f77e0c75499
eddieajau/sequelize,cschwarz/sequelize,gintsgints/sequelize,scottty881/sequelize,codyrigney92/sequelize,Wsiegenthaler/sequelize,mikeringrose/sequelize,skv-headless/sequelize,sequelize/sequelize,dantman/sequelize,inDream/sequelize,mliszewski/sequelize,Daimonos/sequelize,jingpei/sequelize,keik/sequelize,sobotklp/sequeliz...
test/integration/support.js
rejected_duplicate
Near-duplicate of sample 77758
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* eslint-env node */\nconst path = require('path');\n\nmodule.exports = {\n context: path.resolve(__dirname, 'src'),\n entry: './index.js',\n output: {\n path: path.resolve(__dirname, 'dist'),\n filename: 'vuex-connect.js',\n ...
javascript
edit
0
0
mit
f5d62f6539c71ebe3121a6895802f45d02093a97
ktsn/vuex-connect,ktsn/vuex-connect
webpack.config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function () {\n 'use strict';\n\n angular\n .module('scrum_retroboard')\n .controller('UserController', ['$scope', '$http', 'sessionService', 'userService', UserController]);\n\n function UserController($scope, $...
javascript
edit
0
1
mit
7299d2c21c023a8d9a76eba4d47a5efcb87b1519
Endava-Interns/ScrumRetroBoardFrontEnd,Endava-Interns/ScrumRetroBoardFrontEnd
app/components/controllers/UserController.js
rejected_duplicate
Near-duplicate of sample 83249
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nfunction FeedErrorOverview51Ctrl($scope, $rootScope, $routeParams, $feedDataPaths, $location) {\n var publicId = $routeParams.vipfeed;\n $scope.publicId = publicId;\n $scope.pageHeader.title = 'Errors';\n\n $rootSc...
javascript
edit
0
2
bsd-3-clause
d4ad2a3e93ea12385c2ed62a4a273d3a4b608d6b
votinginfoproject/Metis,votinginfoproject/Metis,votinginfoproject/Metis
public/assets/js/app/controllers/5.1/feedErrorOverview51Controller.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\"use strict\";\n\nangular.module('arethusa.core').constant('MAIN_ROUTE', {\n controller: 'MainCtrl',\n template: '<div ng-include=\"template\"></div>',\n resolve: {\n loadConfiguration: function($q, $http, $route, configurator) {...
javascript
edit
0
3
mit
85a16b43bec92ef5635ccac5f5110fbfec405741
alpheios-project/arethusa,PonteIneptique/arethusa,Masoumeh/arethusa,fbaumgardt/arethusa,PonteIneptique/arethusa,latin-language-toolkit/arethusa,alpheios-project/arethusa,latin-language-toolkit/arethusa,Masoumeh/arethusa,fbaumgardt/arethusa,alpheios-project/arethusa,fbaumgardt/arethusa
app/js/arethusa.core/routes/main.constant.js
rejected_duplicate
Near-duplicate of sample 85659
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar Q = require('Q');\nvar request = Q.denodeify(require('request'));\nvar _ = require('underscore');\n\nfunction CampaignModel(name) {\n // @todo Can probably clean this up?\n _.bindAll.apply(_, [this].concat(_.functi...
javascript
edit
0
4
mit
fda7b6c01955b3dc80d55e4c48c29a56b8a04405
LK/CharityWatcher
models/campaign.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// Shim to avoid requiring Velocity in Node environments, since it\n// requires window. Note that this just no-ops the components so\n// that they'll render, rather than doing something clever like\n// statically rendering the end state...
javascript
edit
0
1
mit
f8309f7f31dc395c412b4bd58b058032251c7e03
google-fabric/velocity-react,twitter-fabric/velocity-react
lib/velocity-animate-shim.js
rejected_duplicate
Near-duplicate of sample 72098
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * Has Vowels\n * \n * hasVowel tests if the String calling the function has a vowels\n * \n * @param {void}\n * @return {Boolean} returns true or false indicating if the string\n * has a vowel or not\n */\nString.prototype.hasVowe...
javascript
edit
0
1
mit
54db7d18b2674d48f1b7a935ac66fa7f4109d87c
andela-oolutola/string-class,andela-oolutola/string-class
src/String.js
rejected_duplicate
Near-duplicate of sample 73455
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* eslint-disable func-names, no-use-before-define */\n\nimport co from 'co';\nimport test from 'blue-tape';\nimport agent from 'promisify-supertest';\n\nimport createApplication from '../src';\n\nconst setup = () => {\n return agent(c...
javascript
edit
0
1
isc
20adcf2d1c43df8ffa27dfcbe67e6443adadc353
francisbrito/let-go-hold-on-api
test/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * Passed to transforms so they can log warnings.\n */\nexport default class Logger {\n constructor() {\n this.warnings = [];\n }\n\n /**\n * Logs a warning.\n * @param {Object} node AAST node that caused the warning\n ...
javascript
edit
0
2
mit
4f77357c2d28b0bc131f7ae0760a1517a3508c7e
mohebifar/xto6,lebab/lebab,mohebifar/lebab
src/Logger.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\"use strict\";\n\nvar fs = require('fs');\nvar should = require('chai').should();\nvar pdf2img = require('../index.js');\n\nvar input = __dirname + '/test.pdf';\n\npdf2img.setOptions({\n outputdir: __dirname + '/output',\n ta...
javascript
edit
0
2
mit
22532419e697fe681d0b3e8347086b0a52c7520c
MidEndProject/node-pdf2img,fitraditya/node-pdf2img
test/index.js
rejected_duplicate
Near-duplicate of sample 97102
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react';\n\nexport default function SourceCode({\n def,\n start,\n end,\n}) {\n return (\n <pre>\n <span>\n {def.slice(0, start)}\n </span>\n <span style={{ backgroundColor: 'yellow' }}>\n ...
javascript
edit
0
4
mit
d9ddfa6bb40600c6e78399659dad6728c9de4835
skidding/illustrated-algorithms
components/source-code.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport {\n\tView,\n\tText,\n\tStyleSheet,\n} from 'react-native';\nimport moment from 'moment';\n\nimport {\n\tCOLOR_LGREY,\n\tCOLOR_BLACK,\n} from '../../styles/ColorConstants';\n\nconst SpecialEventsHeader ...
javascript
edit
0
1
mit
9c4d2e7ce8ff7c2c9a3ea2edbcaa1e8878519cc4
UCSD/campus-mobile,UCSD/campus-mobile,UCSD/now-mobile,UCSD/now-mobile,UCSD/campus-mobile,UCSD/campus-mobile,UCSD/now-mobile,UCSD/campus-mobile,UCSD/campus-mobile
app/views/specialEvents/SpecialEventsHeader.js
rejected_duplicate
Near-duplicate of sample 76719
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nEnableStudentController.$inject = ['$rootScope', 'toaster', 'TbUtils', '$state', 'students'];\n\nfunction EnableStudentController ($rootScope, toaster, TbUtils, $state, students) {\n\tconst vm = this;\n\n vm.email = \"\";\n vm.account...
javascript
edit
0
1
mit
0649df37b147a55050be0d3a73f20e3eae390572
Tribu-Anal/Vinculacion-Front-End,Tribu-Anal/Manejo-Horas-de-Vinculacion-UNITEC,Tribu-Anal/Vinculacion-Front-End,Tribu-Anal/Manejo-Horas-de-Vinculacion-UNITEC
dev/app/components/landing/enable-student/enable-student.controller.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n$(document).ready(function() {\n $switcherFieldGroup = $(\"#request_personal_switch\");\n\n if ($switcherFieldGroup.length) {\n $switcherFieldGroup.addClass(\"personal_request_switcher_focused\");\n\n $(\"#request_personal_switc...
javascript
edit
0
3
mit
f279a11f415e82eab819c43e7e4c8e008c969998
openaustralia/righttoknow,openaustralia/righttoknow,openaustralia/righttoknow
assets/javascripts/personal_message_toggler.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nexports = module.exports = function(negotiateTokenContent, negotiateTokenType, Tokens) {\n \n return function issueToken(ctx, options, cb) {\n console.log('ISSUE TOKEN!');\n console.log(ctx);\n \n if (typeof options == 'fu...
javascript
edit
0
4
mit
94c0c0ee68ae54311ddd35b317c96364701fc398
authnomicon/nodex-aaa-oauth2
app/util/issuetoken.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use babel';\n\nimport Controller from './controller.js';\n\nexport default {\n config: {\n grammars: {\n order : 1,\n type : 'array',\n default: ['source.gfm', 'text.md'],\n items : {\n type: 'string'...
javascript
edit
0
1
mit
c1ea9973285fab3725be7d685902b0195589850d
susisu/markdown-table-editor
lib/markdown-table-editor.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport matreshkaError from './matreshkaerror';\n\n// checks type of a variable and throws an error if its type is not an object\nexport default function checkObjectType(object, method) {\n const typeofObject = object === null ? 'null...
javascript
edit
0
4
mit
52c3649c732a61378515f0bfea239cf3cfb59340
finom/matreshka,finom/matreshka,matreshkajs/matreshka,matreshkajs/matreshka
src/_helpers/checkobjecttype.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar _ = require('underscore');\n\nvar deepSet = function (obj, pathString, value) {\n var path = pathString.split('.');\n var len = path.length;\n for (var i = 0; i < len; i++) {\n if (i == len - 1) {\n obj[path[i]] = value;\...
javascript
edit
0
4
mit
f1d0ad979c72801881d19743fe036158b7183cc2
bitterulf/joist
lib/dataManager.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * Common utilities\n * @module glMatrix\n */\n\n// Configuration Constants\nexport const EPSILON = 0.000001;\nexport let ARRAY_TYPE = (typeof Float32Array !== 'undefined') ? Float32Array : Array;\nexport const RANDOM = Math.random...
javascript
edit
0
1
mit
80cfe0097ed61a05c8129809f4e1b33906649515
toji/gl-matrix,toji/gl-matrix
src/common.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nclass ImageFactory {\n constructor($http, baseURLConfig) {\n 'ngInject';\n\n this.getList = function(query, count) {\n query = query.replace(' ', '+');\n return $http.get(baseURLConfig.rootAPI + '/flickr/photos?q=' + qu...
javascript
edit
0
1
mit
3364630d607fd6467a008de2c3784decdfc86c13
hendryl/Famous-Places-CMS,hendryl/Famous-Places-CMS
src/app/places/image.factory.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React, {PropTypes} from 'react';\nimport Paper from 'material-ui/lib/paper';\n\nexport default class ResumeHeader extends React.Component {\n static propTypes = {\n body: PropTypes.string\n }\n\n static contextTypes = {\n ...
javascript
edit
0
1
mit
ea37b35ee39cd6af38370af4d7e10b9498cc9ae4
sujaypatel16/fear-the-repo,dont-fear-the-repo/fear-the-repo,sujaypatel16/fear-the-repo,dont-fear-the-repo/fear-the-repo,AndrewTHuang/fear-the-repo,AndrewTHuang/fear-the-repo,ericsonmichaelj/fear-the-repo,ericsonmichaelj/fear-the-repo
src/components/ResumeHeader.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// Sieve of Eratosthenes\n\n/*RULES:\n Function takes one parameter\n Return an array of all prime numbers from 0-parameter\n*/\n\n/*PSEUDOCODE:\n 1) Find square root of parameter\n 2) Create an array of numbers from 0-parameter\n ...
javascript
edit
0
6
mit
48b944170991c58980da07eb11497ee7875b4676
benjaminhyw/javascript_algorithms
sieve-of-eratosthenes.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React, { PropTypes } from 'react'\nimport { connect } from 'react-redux'\n\nimport { incrementCounter, decrementCounter } from '../../actions/counter'\n\nimport {} from './app.css'\n\nlet Counter = ({ counter, onIncrementCounter,...
javascript
edit
0
1
mit
9f4ba58a3c3baf958dce5fc49167edac4b506439
epicsharp/react-boilerplate,RSS-Dev/live-html,RSS-Dev/live-html,epicsharp/react-boilerplate
src/containers/Counter/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * Allows users to see what screen readers would see.\n */\n\nlet $ = require(\"jquery\");\nlet Plugin = require(\"../base\");\n\nrequire(\"./style.less\");\n\nclass A11yTextWand extends Plugin {\n getTitle() {\n return \...
javascript
edit
0
2
mit
fbcd66549a115a77a306246f723dd680976b14d3
Khan/tota11y,Khan/tota11y
plugins/a11y-text-wand/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar TrieNode = require('trie-node');\n\nvar Trie = (function() {\n function Trie() {\n this.root = new TrieNode();\n }\n\n Trie.prototype.add = function(string) {\n this.root.add(string.trim(), 0);\n };\n\n Trie.prototype.sea...
javascript
edit
0
1
mit
07547e000b6bc09d917de07623e74bd864f2fa52
mgarbacz/nordrassil,mgarbacz/nordrassil
app/trie.js
rejected_duplicate
Near-duplicate of sample 74738
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Ember from 'ember';\n\n/**\n * @module components\n * @class sl-loading-icon\n */\nexport default Ember.Component.extend({\n\n /**\n * Class name bindings for the root element\n *\n * @property {array} classNameBin...
javascript
edit
0
0
mit
c845d2f8409a8b4b5e40598b15bd6c6d8875b2ca
juwara0/sl-ember-components,alxyuu/sl-ember-components,Suven/sl-ember-components,notmessenger/sl-ember-components,softlayer/sl-ember-components,erangeles/sl-ember-components,juwara0/sl-ember-components,azizpunjani/sl-ember-components,theoshu/sl-ember-components,erangeles/sl-ember-components,alxyuu/sl-ember-components,S...
addon/components/sl-loading-icon.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// Stopgap atom.js file for handling normal browser things that atom\n// does not yet have stable from the browser-side API.\n// - Opening external links in default web browser\n// - Saving files/downloads to disk\n$(document).ready(fun...
javascript
edit
0
5
bsd-3-clause
1454f24a07d7014dfb2075753e0ea5d22d8751ca
AbelSu131/mapbox-studio,mapbox/mapbox-studio,AbelSu131/mapbox-studio,tizzybec/mapbox-studio,tizzybec/mapbox-studio,Zhao-Qi/mapbox-studio-classic,wakermahmud/mapbox-studio,tizzybec/mapbox-studio,xrwang/mapbox-studio,xrwang/mapbox-studio,Zhao-Qi/mapbox-studio-classic,mapbox/mapbox-studio,Zhao-Qi/mapbox-studio-classic,wak...
app/atom.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*\r\n Extension helper for generating a CurvePath from an array of supplied points.\r\n Accepts an array of [Vector3] points to contruct the path from.\r\n ---\r\n\r\n points Array List of Vector3 points\r\n s...
javascript
edit
0
3
mit
eaa15eb0fc107a491d8239cbca45517c7b8b733d
kellymilligan/utils-three
curve_path_from_points.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React, { useState } from 'react';\nimport { IconExternalLinkSmallOutline } from '@teamleader/ui-icons';\n\nimport Box from '../../box';\nimport Link from '../../link';\n\nimport theme from './theme.css';\n\nconst findLinkEntities...
javascript
edit
0
2
mit
211d099ed611090ba64580a2f5ae74cd13bbb30a
teamleadercrm/teamleader-ui
src/components/wysiwygEditor/decorators/linkDecorator.js
rejected_duplicate
Near-duplicate of sample 68151
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * React Starter Kit (https://www.reactstarterkit.com/)\n *\n * Copyright © 2014-present Kriasoft, LLC. All rights reserved.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE.txt file in the root d...
javascript
edit
0
1
mit
77be797fc02b092d8bbdb2c7b1f68eca08b431ed
labzero/lunch
src/routes/main/about/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar srcDir = __dirname + \"/../\";\n\nmodule.exports = {\n all: {\n src: [\n srcDir + \"*.js\",\n srcDir + \"lib/*.js\",\n srcDir + \"adapter/example/*.js\",\n srcD...
javascript
edit
0
0
mit
095050321b181476b5aa7c83254bac9576c9bc98
ioBroker/ioBroker.admin,Steiger04/ioBroker.admin,Steiger04/ioBroker.admin,ioBroker/ioBroker.admin
tasks/jscs.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport * as path from 'path'\n\nimport { Loader } from './loader'\n\nvar loader\n\nconst system = () => {\n if (typeof loader === 'undefined') {\n let scope = new URL(self.registration.scope)\n let base = new URL(path.join(scope....
javascript
edit
0
4
mit
97fee45062e16b9d4d5cd35e10f9ca11b73dfb48
jgraichen/lively4-kernel,LivelyKernel/lively4-core,LivelyKernel/lively4-core
src/worker.js
accepted
null
true
[ { "role": "user", "content": "Write javascript code for the following: Add beforeAll to setup redisPool" }, { "role": "assistant", "content": "var config = require('../config.json');\nvar RedisPool = require('../../index');\n\n\nvar redisPool;\n\nbeforeAll(function() {\n redisPool = new RedisPo...
javascript
new_file
0
1
bsd-3-clause
21334f1388cc0034a9ea89f001ba47ebd999f011
joshuah/sol-redis-pool
spec/lib/redis-pool-spec.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = {\n extends: [\"matrix-org\"],\n plugins: [\n \"babel\",\n ],\n env: {\n browser: true,\n node: true,\n },\n\n rules: {\n \"no-var\": [\"warn\"],\n \"prefer-rest-para...
javascript
edit
0
0
apache-2.0
66237e1ea6eca69952083c03f8386098bd6a5636
matrix-org/matrix-js-sdk,matrix-org/matrix-js-sdk,matrix-org/matrix-js-sdk,matrix-org/matrix-js-sdk
.eslintrc.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\nlet expect = require('chai').expect;\nlet errorHandler = require('../Utils/errorHandler.js');\ndescribe('Error handling', function() {\n it('converts error string to error number', function() {\n let validStringToNumb...
javascript
edit
0
1
isc
301bc58e63510ce57d3211bd6a3d00ed350fa60b
Kurimizumi/Honeybee-Hive
test/utils.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nKwf.Utils.ResponsiveEl('.kwcBasicTable.responsiveFlipScroll', function(el) {\n var addArrow = function(el) {\n if (el.hasClass('flipScroll')) {\n var tbody = el.children('tbody');\n if (tbody.scrollLeft =...
javascript
edit
0
6
bsd-2-clause
febe1c77effee2d5606fd75017666f5fbf6024ab
koala-framework/koala-framework,nsams/koala-framework,yacon/koala-framework,yacon/koala-framework,kaufmo/koala-framework,yacon/koala-framework,nsams/koala-framework,kaufmo/koala-framework,kaufmo/koala-framework,nsams/koala-framework,koala-framework/koala-framework
Kwc/Basic/Table/Component.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport {\n isArray,\n validateIsArray,\n combine,\n createValidateMinCount,\n createValidateMaxCount,\n} from '../validators.js';\n\nconst pluginArray = {\n compile(compiler, schemaDef, schemaOptions) {\n if (isArray(schemaDef)...
javascript
edit
0
5
mit
84439fe73592e483e80215ccd92dc8bf337f4f56
apendua/very-simple-schema
src/plugins/array.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport cli from 'cli';\nimport {Gpio} from 'chip-gpio';\nimport temp from 'ds18x20';\n\nvar options = cli.parse();\n\nvar interval = 2000;\nvar threshold = 25;\n\nvar heater = new Gpio(0, 'out');\n\nfunction setHeater(on) {\n console.l...
javascript
edit
0
3
mit
852f33df50cd1fc137b70ca8e94a4cd5595416b6
cinderblock/thermostat
thermostat.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport express from 'express'\nimport webpack from 'webpack'\nimport { logError, log } from '../util/log'\n\n\nexport default function startDevelop (webpackConfig) {\n const app = express()\n const compiler = webpack(webpackConfig)\n\...
javascript
edit
0
2
mit
8dbe617cca24bfe5904777662ff00da359da8703
saguijs/sagui,saguijs/sagui
src/action/start-develop.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// Main script\n// -----------\n\nvar blackbird = blackbird || {};\n\nblackbird.player = {};\n\n$(document).ready(function() {\n\n blackbird.player = new blackbird.Player(blackbird.api_root);\n\n // First play\n blackbird.playe...
javascript
edit
0
3
mit
b794427cf32ece187456bb61e8914880f1d2336a
lepisma/blackbird,lepisma/blackbird,lepisma/blackbird
src/app/js/main.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar myArray = [];\ndocument.write(\"<ul style='list-style-type: none'>\");\ndocument.write(\"</ul>\");\n$(\"#submit\").on('click', function(value) {\n\tmyArray = $('textarea').val().split('\\n');\n\tfor( var i = 0; i<myArray.length; i++...
javascript
edit
0
2
apache-2.0
08d734ac2265d512ecb967c56028e0351db5b2fb
shakilsultan/url-slug-generator,shakilsultan/url-slug-generator
url-slug-generator.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar User = require('../models/user.js'),\n utils = require('../../lib/utils.js');\n\nmodule.exports = (function(){\n\tfunction destroy(req, res) {\n\t\tres.send({\n success: true,\n\t\t\tsession: req.session\n\t\t})\n\t}\n\n\t...
javascript
edit
0
3
isc
6ea88ba59ae0c8dc74af4701e351dee5bf4e3708
xdv/gatewayd,crazyquark/gatewayd,zealord/gatewayd,whotooktwarden/gatewayd,whotooktwarden/gatewayd,zealord/gatewayd,Parkjeahwan/awegeeks,crazyquark/gatewayd,xdv/gatewayd,Parkjeahwan/awegeeks
app/controllers/sessions.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\ndefine(function(require) {\n var DateTime = require('../main/DateTime')\n var DateFormat = require('../main/DateFormat')\n var jQuery = $ = require('jquery')\n\n return {\n toHaveLength : function(length) {\n var...
javascript
edit
0
2
apache-2.0
a369a9bbabadb11b9ae1dc0e0b509cef2bb0478c
continuouscalendar/dateutils,continuouscalendar/dateutils
src/test/matchers.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n#!/usr/bin/env node\n'use strict';\n\nconst minimist = require('minimist');\n\nconst init = require('../lib/init');\nconst { showHelp, showVersion } = require('../lib/interactions');\n\nconst minimistConfig = {\n boolean: ['ssh'],\n d...
javascript
edit
0
1
mit
b6174c142a8aab6b4133a868cd6bac51851c7820
churris/preact-init
bin/preact-init.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Notification from 'flarum/components/Notification';\nimport username from 'flarum/helpers/username';\n\nexport default class NewPostNotification extends Notification {\n icon() {\n return 'star';\n }\n\n href() {\n const...
javascript
edit
0
2
mit
a441c8a3c7dc7d6a97ff71e8fc9c248b618dcfb5
flarum/subscriptions,flarum/subscriptions,flarum/subscriptions
js/forum/src/components/NewPostNotification.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\ngoog.provide('ol.format.filter.Spatial');\n\ngoog.require('ol');\ngoog.require('ol.format.filter.Filter');\n\n\n/**\n * @classdesc\n * Represents a spatial operator to test whether a geometry-valued property\n * relates to a given geome...
javascript
edit
0
2
bsd-2-clause
e63214a2cc7669900ca0a4e3bc9b21887a668d94
oterral/ol3,oterral/ol3,tschaub/ol3,fredj/ol3,ahocevar/openlayers,gingerik/ol3,tschaub/ol3,ahocevar/openlayers,bjornharrtell/ol3,adube/ol3,bjornharrtell/ol3,planetlabs/ol3,geekdenz/ol3,planetlabs/ol3,mzur/ol3,oterral/ol3,fredj/ol3,geekdenz/openlayers,adube/ol3,stweil/ol3,tschaub/ol3,stweil/openlayers,mzur/ol3,stweil/ol...
src/ol/format/filter/spatial.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport last from '../util/last'\n\nexport default class SimpleChangeHistory {\n constructor (editorSession) {\n this._editorSession = editorSession\n this._done = []\n this._undone = []\n }\n\n canUndo () {\n return this....
javascript
edit
0
2
mit
2e328fdbb8c5b09248f72a842e7a25c5189c56fe
michael/substance-1,substance/substance,substance/substance,michael/substance-1
model/SimpleChangeHistory.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* eslint-disable prefer-arrow-callback, func-names */\nimport loader from 'graphql-tag/loader';\n\nfunction GraphQLCompiler() {}\nGraphQLCompiler.prototype.processFilesForTarget = function (files) {\n files.forEach(function (file) {\n...
javascript
edit
0
2
mit
d313aa28a02d6a8a0d06bb29f1ade8410cd9c715
Swydo/meteor-graphql
compiler.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nPackage.describe({\n name: 'meteortesting:mocha',\n summary: 'Run Meteor package or app tests with Mocha',\n git: 'https://github.com/meteortesting/meteor-mocha.git',\n documentation: '../README.md',\n version: '1.1.5',\n testOnly...
javascript
edit
0
1
mit
20499e877cefa4f390e1a23af3e752373b60ab5e
meteortesting/meteor-mocha,meteortesting/meteor-mocha,meteortesting/meteor-mocha
package/package.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nidClock = 0;\nfunction getId() {\n\tidClock++;\n\treturn \"attribute-list-\" + idClock;\n}\n\nfunction parentIdCleanup(parentId) {\n\tparentId = parentId.replace(/:/g, \"\\\\:\");\n\tparentId = parentId.replace(/\\$/g, \"\\\\$\");\n\tpa...
javascript
edit
0
7
bsd-3-clause
d0f74fa53e53979de6e4bce4528b11be2dab27a1
usgin/resources
static/js/editor/read-record.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nexport default {\n name: 'authentication',\n \n initialize: function(container, application) {\n application.inject('model', 'session', 'simple-auth-session:main');\n } \n};\n```\n\nApply this change: Make sure ada...
javascript
edit
0
1
mit
e74f97ac7e36e279bebd956efef709e281521f17
HospitalRun/hospitalrun-frontend,HospitalRun/hospitalrun-frontend,HospitalRun/hospitalrun-frontend,HospitalRun/hospitalrun-frontend
app/initializers/authentication.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nrequire.config({\n\tbaseUrl: 'app',\n\n\tpaths : {\n\t\tjquery: '../components/jquery/jquery.min',\n\t\tmodernizr: '../components/modernizer/modernizr'\n\t}\n});\n\nrequire(['jquery', 'modernizr'], function($, modernizer) {\n\t// use ap...
javascript
edit
0
1
mit
f091f95a21fefbd21ba6e5e661e74432f1d6f3e8
anttisykari/backbone-fileedit,anttisykari/angular-fileedit,SC5/grunt-boreless-boilerplate,SC5/grunt-boreless-boilerplate
client/app/main.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// see http://vuejs-templates.github.io/webpack for documentation.\nvar path = require('path')\n\nmodule.exports = {\n build: {\n env: require('./prod.env'),\n index: path.resolve(__dirname, '../dist/index.html'),\n assetsRoot...
javascript
edit
0
0
mit
77b2edf79616ce83721b7d50e99931dc9b078d20
jakeprem/codemash-vue,jakeprem/codemash-vue
config/index.js
rejected_duplicate
Near-duplicate of sample 70059
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*global Playground*/\n\n(function() {\n \"use strict\";\n\n Playground.VideoService = Conductor.Oasis.Service.extend({\n initialize: function (port) {\n this.sandbox.videoPort = port;\n },\n\n events: {\n videoWatc...
javascript
edit
0
1
mit
b793919dbb8d73672652c03899a518e1ee4480b8
tildeio/conductor.js
example/playground/js/playground-services.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nmodule.exports = [\n 'webmap.cgi',\n 'helpdesk.cgi',\n 'info.cgi',\n 'administrator.cgi',\n 'index.cgi',\n 'admin.cgi',\n 'whois.cgi',\n 'report.cgi',\n 'main.cgi',\n 'index2.cgi',\n 're...
javascript
edit
0
0
mit
d57d422513fb07ecac9deaa4d6c8cea9db345f59
kokarn/web-vuln-scan-list
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nconst Server = require('./server');\n\nclass ServersManager {\n constructor() {\n this.servers = [];\n }\n\n addServer(options) {\n if (this.servers.filter(s => s.port === options.port).length > 0) {\n thr...
javascript
edit
0
7
mit
76f2c91709ade13fe0debf7d44e384e4210cd614
BenjaminBini/barmaid,BenjaminBini/barmaid
src/main/servers-manager.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\nvar assert = require('assert');\n\nexports = module.exports = promissory;\n\nfunction promissory(fn) {\n\tassert(typeof fn == 'function', 'function required');\n\n\treturn function() {\n\t\tvar args = arrayFrom(arguments)...
javascript
edit
0
4
mit
101653731efb0cd68cb1be4e3454d2f789d55824
basicdays/node-promissory
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n$(function() {\n const $tool = $('#id_tool');\n const $toolOptions = $('#row-tool_options');\n\n if ($tool.length === 1 && $toolOptions.length === 1) {\n const $itemAboveOptions = $toolOptions.prev();\n\n function...
javascript
edit
0
3
mit
3eb551673de501d48882bb10096920e970a0c67a
reviewboard/ReviewBot,reviewboard/ReviewBot,reviewboard/ReviewBot,reviewboard/ReviewBot
extension/reviewbotext/static/js/integrationConfig.es6.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { HeaderService } from \"./header.service.js\";\n\nexport class HeaderTemplate {\n static update(render) {\n const start = Date.now();\n\n /* eslint-disable indent */\n render`\n <nav class=\"fl...
javascript
edit
0
0
mit
183936b9cbe79d91920c63d2b6c9390281cb62a6
albertosantini/node-conpa,albertosantini/node-conpa
src/client/app/components/header/header.template.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n//\n// Tests for basecoin\n//\n\nconst Promise = require('bluebird');\nconst co = Promise.coroutine;\nconst _ = require('lodash');\n\nrequire('should');\n\nconst TestV2BitGo = require('../../lib/test_bitgo');\nconst bitgo = new TestV2Bi...
javascript
edit
0
2
apache-2.0
542773e033fb6a311f6a403691dd8049d4e230f8
BitGo/BitGoJS,BitGo/BitGoJS,BitGo/BitGoJS,BitGo/BitGoJS
test/v2/integration/baseCoin.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport cluster from \"cluster\";\n\nexport default class StartServerPlugin {\n constructor() {\n this.afterEmit = this.afterEmit.bind(this);\n this.apply = this.apply.bind(this);\n this.startServer = this.startServer.bind(this...
javascript
edit
null
null
mit
18817e47df5ff9241568d3012eec6f8198541694
ericclemmons/start-server-webpack-plugin
src/StartServerPlugin.js
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// !!\n// This module defines ProseMirror's document model, the data\n// structure used to define and inspect content documents. It\n// includes:\n//\n// * The [node](#Node) type that represents document elements\n//\n// * The [schema](...
javascript
edit
0
0
mit
b907cb665cf6faa46c6741eb01c95227fcfc5e9c
ProseMirror/prosemirror-model
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*!\n * ${copyright}\n */\n\n// Provides the Design Time Metadata for the sap.m.Select control\nsap.ui.define([],\n\tfunction() {\n\t\"use strict\";\n\n\treturn {\n\t\tpalette: {\n\t\t\tgroup: \"INPUT\",\n\t\t\ticons: {\n\t\t\t\tsvg: \"...
javascript
edit
0
1
apache-2.0
dc64dcaee579bf7b09ee04b7da8948f68b1691d5
SAP/openui5,SAP/openui5,SAP/openui5,SAP/openui5
src/sap.m/src/sap/m/designtime/Select.designtime.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n$(document).ready(function() {\n\tcurrent_url = window.location.href\n\tif (current_url.match(\"&closewin=true\")) {\n\t\twindow.close();\n\t}\n});\n\n```\n\nApply this change: Send postMessage to opener before autoclose" }, { "...
javascript
edit
0
4
mit
a7991b2d4c8ca35ed421af62f47e558fce0f8fff
mubassirhayat/wallabag,kwangkim/wallabag,ekospinach/wallabag,kwangkim/wallabag,wangjun/wallabag,kwangkim/wallabag,antoniosejas/wallabag,antoniosejas/wallabag,modos189/wallabag,ekospinach/wallabag,mubassirhayat/wallabag,wangjun/wallabag,harikt/wallabag,modos189/wallabag,wangjun/wallabag,harikt/wallabag,ekospinach/wallab...
themes/_global/js/autoClose.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\ndeclare module 'tabbable' {\n declare type TabbableOptions = {|\n includeContainer?: ?boolean,\n |};\n\n declare interface UntouchabilityChecker {\n hasDisplayNone(node: Node, nodeComputedStyle: any): boolean;\n isUntouchabl...
javascript
edit
null
null
mit
fb9b25bc821257e4778e7cae070abe1ef3da40b0
splodingsocks/FlowTyped,splodingsocks/FlowTyped,flowtype/flow-typed,flowtype/flow-typed
definitions/npm/tabbable_v3.x.x/flow_v0.54.x-v0.103.x/tabbable_v3.x.x.js
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```javascript\njA.fn.formExplode = function()\n{\n var formData = {};\n\n this.find('[name]').each(function()\n {\n formData[this.name] = this.value == '' ? undefined : this.value;\n });\n\n return formData;\n}\n```\n\nApply this...
javascript
edit
0
3
mit
c8187e3d3cea8a24cdf7dc16f2d82114a0b2b4c2
TeaMeow/TocasJS,TeaMeow/TocasJS,TeaMeow/Tocas,TeaMeow/Tocas,TeaMeow/jAsper,TeaMeow/jAsper,TeaMeow/TocasJS,TeaMeow/Tocas
src/form/form-explode.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst assert = require('assert');\nconst expect = require('chai').expect;\n\nconst Doorman = require('../lib/doorman');\nconst Service = require('../lib/service');\n\nconst EventEmitter = require('events').EventEmitter;\n\ndescribe('Doo...
javascript
edit
0
1
mit
18dab9f7cbb5d573d744eca1a9c619df14880988
FabricLabs/doorman
test/doorman.unit.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* global exports, console */\n\"use strict\";\n\n// module Debug.Trace\n\nexports.traceAny = function (x) {\n return function (k) {\n console.log(x);\n return k({});\n };\n};\n\n```\n\nApply this change: Use util.inspect with d...
javascript
edit
0
2
mit
c99794736af713501167a42c7e23138b347366cb
garyb/purescript-debug
src/Debug/Trace.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = {\n content: ['frontend/javascript/*.js','./output/**/*.html'],\n output: \"./output/_bridgetown/static\"\n}\n```\n\nApply this change: CHANGED: Add tailwind specific extractor to purgeCSS" }, { "role": "assis...
javascript
edit
0
3
mit
fbf8e2affbf9d1809b41b40c562509deb30aec38
tarellel/theworkaround.com,tarellel/theworkaround.com,tarellel/theworkaround.com
purgecss.config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\njest.dontMock('../Util');\n\nvar Util = require('../Util');\n\ndescribe('Util', function() {\n\n describe('#extend', function () {\n beforeEach(function () {\n this.originalObj = {\n a: 5,\n b: 10,\n c: 15\...
javascript
edit
0
2
apache-2.0
055e45109816d7f080892b551cfc2611e946bc5e
mesosphere/reactjs-components,mesosphere/reactjs-components
src/Util/__tests__/Util-test.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nl = console.log();\n\nmodule.exports = {\n\n VERSION: \"Jofogas's Zsozsobot v3\",\n\n compute_avg_stack: function(players) {\n var sum = 0;\n for (var i in players) {\n sum += players.stack;\n }\n return...
javascript
edit
0
5
mit
5b13127cc35f52a243e592c395820c25b0c5edd7
sinisterstuf/poker-player-zsozsobot,sinisterstuf/poker-player-zsozsobot
player.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { moduleForComponent, test } from 'ember-qunit';\nimport hbs from 'htmlbars-inline-precompile';\n\n\nmoduleForComponent('editable-field', 'Integration | Component | editable field', {\n integration: true\n});\n\ntest('it renders...
javascript
edit
0
1
mit
0f4a4ef25db0548fb3150e6a418f73f02ca5101b
openHPI/ember-form-components,openHPI/ember-form-components
tests/integration/components/editable-field-test.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react'\nimport './style.css'\n\nconst Button = (props) => {\n \n const buttonStyle = {\n backgroundColor: props.backgroundColor\n }\n\n return(\n <button id={props.id} style={buttonStyle} onClick...
javascript
edit
0
1
mit
d97bd811e7ed96c97993ca1c2f22ae1fc725938c
severnsc/brewing-app,severnsc/brewing-app
src/Components/Button/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport TestUtils from 'react-dom/test-utils';\nimport Fieldset from './fieldset';\nimport Textbox from './../textbox';\nimport { shallow } from 'enzyme';\nimport { elementsTagTest, rootTagTest } from '../../u...
javascript
edit
0
1
apache-2.0
e0ea61ddab7f9175a943564c22a20aa9bdb9d7ea
Sage/carbon,Sage/carbon,Sage/carbon
src/__experimental__/components/fieldset/fieldset.spec.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*global State, Config, Phaser*/\n\nState.HowToPlay = function (game) {\n\t\"use strict\";\n\tthis.game = game;\n};\nState.HowToPlay.prototype = {\n\tpreload: function () {\n\t\t\"use strict\";\n\t},\n\tcreate: function () {\n\t\t\"use ...
javascript
edit
0
1
mit
9caa16cba1efe3bcc8ec8eb1c5febd392c38ae40
jucimarjr/posueagames,jucimarjr/posueagames
renanbrg/dropstory/js/states/HowToPlay.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar Reflux = require('reflux');\nvar userDataActions = require('actions/user-data');\n\nfunction extractJson (response) {\n var result = response;\n if (response.json) {\n result = response.json();\n }\n return result;\n}\n\nvar ...
javascript
edit
0
2
mit
70f5a4bdf54cdcaea32250a694cd0a3aa66b1545
yetu/controlcenter,yetu/controlcenter,yetu/controlcenter
public/app/stores/user-data/user-store.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { StyleSheet, Dimensions } from 'react-native';\n\nexport default StyleSheet.create({\n\tgeneralButton: {\n\t\theight: 60,\n\t\tborderRadius: 5,\n\t\tmarginHorizontal: 20,\n\t\tbackgroundColor: 'black',\n\t\tjustifyContent: 'cent...
javascript
edit
0
0
mit
ab9763c6c7cdbbba54deab10496433eed66578dc
fridl8/cold-bacon-client,fridl8/cold-bacon-client,fridl8/cold-bacon-client
components/styles/ButtonStyle.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar http = require('http');\nvar socketio = require('socket.io');\nvar express = require('express');\nvar path = require('path');\nvar fs = require('fs');\nvar _ = require('underscore');\nvar util = require('./lib/util.js');\nrequire('....
javascript
edit
0
0
bsd-2-clause
f1144d31c22d1eb8cf2e3cb61526c0d0e33ff7bf
Yonet/TweetMigration,Yonet/TweetMigration
server.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// Require the Express module (https://npmjs.com/package/express)\n\n\n// Create a new express application instance by calling `express()`\n\n\n// Serve files in the 'public' directory with Express's built-in static file server\n\n\n// ...
javascript
edit
0
0
mit
e2d9a5aea2971c5f103f3957fd49184c3c3acec1
unioncollege-webtech/puppies-vs-kittens,keawade/puppies-vs-kittens,keawade/puppies-vs-kittens,unioncollege-webtech/puppies-vs-kittens
server.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nL.LockAction = L.EditAction.extend({\n initialize: function(map, overlay, options) {\n var edit = overlay.editing;\n var use;\n var tooltip;\n\n if (edit instanceof L.DistortableImage.Edit) {\n L.DistortableImage.actio...
javascript
edit
0
4
bsd-2-clause
e6596016d44090edc88d2ad1a622d345e9a42549
publiclab/Leaflet.DistortableImage,publiclab/Leaflet.DistortableImage
src/edit/actions/LockAction.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* See license.txt for terms of usage */\n\ndefine([\n],\nfunction() {\n\n// ********************************************************************************************* //\n// Default Preferences\n\n/**\n * HTTP Monitor extension is r...
javascript
edit
0
1
bsd-3-clause
69f4cf57f5ad74a7bcaa17259f96ead4dc8335cc
firebug/httpmonitor
content/app/defaultPrefs.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * ServeStaticMiddleware.js\n *\n * @author: Harish Anchu <<EMAIL>>\n * @copyright 2015, QuorraJS. All rights reserved.\n * @license Licensed under MIT\n */\n\nvar serveStatic = require('serve-static');\n\nfunction ServeStatic(app,...
javascript
edit
0
2
mit
1af8c1f2eaa8bfba25317c5bcd1bffe8586884c4
quorrajs/Positron,quorrajs/Positron
lib/http/ServeStaticMiddleware.js
accepted
null
true