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\nvar path = require('path')\nvar command = process.argv[2]\nvar restArguments = process.argv.slice(2)\n\nvar root = path.join(__dirname, '..')\n\nvar execute = require('./execute')({\n BIN: path.join(root, 'node_modules', '.bin'),\n JS...
javascript
edit
0
2
mit
49c6c49ad5934b45de95571a6ecb31223cda589a
scriptype/salinger,scriptype/salinger
run/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { Vue, firebase, firestore, VueTick, randomString } from './TestCase'\n\nlet vm, collection, doc\nlet collectionName = randomString()\nlet documentName = randomString()\ndescribe('Manual binding', () => {\n beforeEach(async () =...
javascript
edit
0
1
mit
f8b68dae34c8f3308531bb2c28a3ff7047c0f4e1
gdg-tangier/vue-firestore
tests/bind.spec.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nAlchemy.PageSorter = function () {\n var $sortables = $(\"ul#sitemap\").find(\"ul.level_1_children\")\n\n $sortables.nestedSortable({\n disableNesting: \"no-nest\",\n forcePlaceholderSize: true,\n handle: \".handle\",\n it...
javascript
edit
0
1
bsd-3-clause
87b264835136852a5aa0832d1ea75a04a0172817
mamhoff/alchemy_cms,robinboening/alchemy_cms,AlchemyCMS/alchemy_cms,robinboening/alchemy_cms,AlchemyCMS/alchemy_cms,robinboening/alchemy_cms,AlchemyCMS/alchemy_cms,mamhoff/alchemy_cms,mamhoff/alchemy_cms
app/assets/javascripts/alchemy/alchemy.page_sorter.js
rejected_duplicate
Near-duplicate of sample 96668
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar csv = require('./lib/csv.js');\n\n//Object to hold all the data\nvar vendors = {};\n\n\nvar init = function(callback) {\n\tcsv.each(__dirname + '/macVendor/vendors.csv').on('data', function(data) {\n\t\tvendors[data[1]] = {\n\t\t\t'...
javascript
edit
0
3
mit
49006a90b6ed3184f706a2688b3a51fa34de8d8f
jannickfahlbusch/node-routerpwn
routerpwn.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar express = require('express');\nvar router = express.Router();\n\n/* GET home page. */\nrouter.get('/', function(req, res, next) {\n res.render('index');\n});\n\n/* Mode selection page. */\nrouter.get('/select', function(req, res, n...
javascript
edit
0
1
mit
3be1f95dcaafb09e8836979d79b02aeede891487
nashkevin/Turing-Party,nashkevin/Turing-Party
routes/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n$(document).ready(function () {\n\nfunction AppViewModel() {\n\n var self = this;\n self.FirstName = ko.observable(\"\");\n self.SecondName = ko.observable(\"\");\n self.About = ko.observable(\"\");\n self.Picture = ko.o...
javascript
edit
0
1
mit
d88889401bf3f1532ee55eb3cf3f157fb4a47719
BikeMates/bike-mates,BikeMates/bike-mates,BikeMates/bike-mates
BikeMates/BikeMates.Web/Scripts/App_Scripts/ProfileScript.js
accepted
null
true
[ { "role": "user", "content": "Write javascript code for the following: Outro: Fix formatting and improve the comment" }, { "role": "assistant", "content": "\n// Get a reference to the global object, like window in browsers\n}( (function() {\n\treturn this;\n}.call()) ));\n" } ]
javascript
new_file
null
null
mit
cffe6c5880fec9e421bd2d9cc654ae91b1536d16
qunitjs/qunit,qunitjs/qunit,danielgindi/qunit
src/outro.js
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = {\n env: {\n browser: true,\n es2021: true,\n },\n extends: [\n 'standard',\n ],\n parserOptions: {\n ecmaVersion: 12,\n sourceType: 'module',\n },\n plugins: [\n ...
javascript
edit
0
0
mit
5c110374d1c75c8892f074a9ea15dbb73744924e
peterhil/ninhursag,peterhil/ninhursag,peterhil/ninhursag,peterhil/ninhursag
.eslintrc.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// ELMO.Views.DashboardReport\n//\n// View model for the dashboard report\nELMO.Views.DashboardReportView = class DashboardReportView extends ELMO.Views.ApplicationView {\n get el() {\n return '.report';\n }\n\n get events() {\n ...
javascript
edit
0
2
apache-2.0
da6a95170c50d33180da30775d460ce160f2101b
thecartercenter/elmo,thecartercenter/elmo,thecartercenter/elmo
app/assets/javascripts/views/dashboard_report_view.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar gpio = require('pi-gpio');\n\ngpio.open(7, \"in\");\n\nsetInterval(function () {\n\n gpio.read(7, function (err, value) {\n if(err) {\n console.log(err);\n }\n else {\n console.log(value...
javascript
edit
0
2
mit
bdeeb9cc823025cfed65340caeb69ae6cde91e22
Sephizor/openboiler,Sephizor/openboiler,Sephizor/openboiler
server/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport fontawesome from '@fortawesome/fontawesome'\n\nimport faCustomIcons from './_fontawesome-harrix-icons.js'\n\n//import fontawesomeFreeRegular from '@fortawesome/fontawesome-free-regular'\nimport faSearch from '@fortawesome/fontawe...
javascript
edit
0
0
mit
f696511e83678c4fcc7fd78b8590ef859c61f8ac
Harrix/Harrix-Html-Template
src/js/_fontawesome-collection.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*\n * grunt-check-clean\n * https://github.com/the-software-factory/grunt-check-clean\n *\n * Copyright (c) 2015 Stéphane Bisinger\n * Licensed under the MIT license.\n */\n\n'use strict';\n\nmodule.exports = function(grunt) {\n\n // ...
javascript
edit
0
3
mit
db872fe4b98311d5ee3e459268e9d2ec133871b5
the-software-factory/grunt-check-clean
tasks/check_clean.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = {\n BarChart: require('./components/BarChart'),\n Button: require('./components/Button'),\n ButtonGroup: require('./components/ButtonGroup'),\n Calendar: require('./components/Calendar'),\n Column: require('./compo...
javascript
edit
0
0
mit
90af5bbbf68e061030a8b671978d7999f9088c4c
mxenabled/mx-react-components,derek-boman/mx-react-components
src/Index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\ntry {\n require('external:electron-react-devtools').install();\n} catch (e) {}\n\nimport React from 'react';\nimport ReactDOM from 'react-dom';\n\nimport RecorderUI from './ui/RecorderUI';\n\n\nReactDOM.render(\n <div>\n <R...
javascript
edit
0
0
mit
82c8799e9ae313c00e042d9943855bea9ee3e5c2
mattbasta/pinecast-studio,mattbasta/pinecast-studio
src/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport pluralize, { singular } from 'pluralize';\n\nfunction normalize(slug: string): string {\n return singular(slug.toLowerCase()).replace(/(-|_|\\.|\\s)+/g, '_');\n}\n\nfunction urlify(slug: string): string {\n return pluralize(slu...
javascript
edit
null
null
mit
5ce278078201707cd8f308e06475f55c7793c8fd
mb3online/slugizoid
src/index.js
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports.getUser = function(name) {\n return {\n username: name,\n password: name,\n };\n};\n\nmodule.exports.login = function(user) {\n browser.driver.manage().window().setSize(1600, 900);\n browser.get('/#/login/');\n\...
javascript
edit
0
1
mit
49f59fea35e8753ebeca12b88ab2cf5d54bc8cfc
opennode/waldur-homeport,opennode/waldur-homeport,opennode/waldur-homeport,opennode/waldur-homeport
test/helpers/auth.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\njest.autoMockOff();\n\nconst findProject = require('../../src/config/ios/findProject');\nconst mockFs = require('mock-fs');\nconst projects = require('../fixtures/projects');\n\ndescribe('ios::findProject', () => {\n\n beforeEach(() =>...
javascript
edit
0
1
mit
6306c7760de7e15a3e32143e19c0662d554d2091
rnpm/rnpm
test/ios/findProject.spec.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar assert = require('assert')\nvar fs = require('fs')\nvar writeNewHtml = require('./../writeNewHtml')\n\ndescribe('writeNewHtml', () => {\n it('should write html file to wf/',done => {\n var html = `<!DOCTYPE>\n<html>\n <body>\n ...
javascript
edit
0
1
mit
c3d816f009b81291a93d3d3c8d976c37e537d67a
CarolAG/WebFlight,coryc5/WebFlight
test/writeNewHtml.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*\n * Copyright (c) 2015-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant...
javascript
edit
0
5
mit
56c7c34c64b3fac897c02e583562f2472319dadb
fkling/jscodeshift,facebook/jscodeshift
src/matchNode.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Bounds from './Bounds';\nimport GroupItem from './GroupItem';\n\nexport default function Scenegraph() {\n this.root = createMark({\n marktype: 'group',\n interactive: false\n });\n this.root.items = [new GroupItem(this.r...
javascript
edit
0
6
bsd-3-clause
007c357d7f3fe9a8e14e495fab5f166ac4c9b84a
vega/vega,vega/vega,vega/vega,lgrammel/vega,vega/vega
packages/vega-scenegraph/src/Scenegraph.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React, { Component, PropTypes } from 'react'\nimport { Link } from 'react-router'\n\nimport 'normalize.css/normalize.css'\nimport '../styles/defaults.scss'\nimport classNames from './App.scss'\nimport { trackTiming } from '../ana...
javascript
edit
0
2
cc0-1.0
cf2487ba7929bf33695a16aebdc98f5e0ee412d0
CookPete/reddit-player,CookPete/rplayr,CookPete/rplayr,CookPete/reddit-player
src/pages/App.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport fetch from 'isomorphic-fetch'\n\nexport default function fetchDispatch(url, action) {\n\treturn (dispatch) => {\n\t\treturn fetch(url, {\n\t\t\tcredentials: 'include'\n\t\t})\n\t\t\t.then( (response) => {\n\t\t\t\treturn response...
javascript
edit
0
3
mit
117753105085c46615ff9de6ed273df200abb8fa
KaleoSoftware/redux-fetch-dispatch
src/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst path = require('path')\nconst webpack = require('webpack')\n\nmodule.exports = {\n entry: './src/index.js',\n output: {\n filename: './bundle.js',\n path: path.resolve('public')\n },\n\n module: {\n rules: [\n {\...
javascript
edit
0
0
mit
d24f4d335470d664a019763e9f3780f339120de2
lingui/js-lingui,lingui/js-lingui
packages/example-usecase/webpack.config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { createStore, applyMiddleware, compose } from 'redux'\nimport createSagaMiddleware from 'redux-saga'\n\nimport reducer from './reducers'\n\n// create the saga middleware\nexport const sagaMiddleware = createSagaMiddleware()\n\nc...
javascript
edit
0
0
apache-2.0
b2fd712c21080cd38d367ee856f3212a21aa7340
mkrajnak/ovirt-web-ui,mareklibra/userportal,oVirt/ovirt-web-ui,oVirt/ovirt-web-ui,matobet/userportal,matobet/userportal,mkrajnak/ovirt-web-ui,mkrajnak/ovirt-web-ui,mareklibra/userportal,matobet/userportal,mkrajnak/ovirt-web-ui,oVirt/ovirt-web-ui,mareklibra/userportal,matobet/userportal,mareklibra/userportal
src/store.js
rejected_duplicate
Near-duplicate of sample 69769
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React, { Component, PropTypes } from 'react'\nimport ReactDOM from 'react-dom'\nimport ReactDOMServer from 'react-dom/server'\nimport SVGInjector from 'svg-injector'\n\nexport default class ReactSVG extends Component {\n\n stati...
javascript
edit
0
2
mit
14d6537cd2000ae28320366934d769846f3610cf
atomic-app/react-svg
src/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport AsyncStorage from '@react-native-community/async-storage';\nimport { persistStore, persistReducer } from 'redux-persist';\nimport { applyMiddleware, createStore } from 'redux';\nimport thunk from 'redux-thunk';\nimport { createRe...
javascript
edit
0
1
mit
a7848664c8c5d80f8bf98e93523daec60c54512b
sussol/mobile,sussol/mobile,sussol/mobile,sussol/mobile
src/Store.js
rejected_duplicate
Near-duplicate of sample 90502
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport express from 'express';\nimport leagueTips from 'league-tooltips';\nimport runTask from './cronTask';\nimport taskGenerator from './cronTasks/generator';\nimport config from './config';\nimport routes from './routes';\n\n// ==== ...
javascript
edit
0
1
mit
295e757a4b9b1f0947a89bca41ac0e777deeac9f
league-of-legends-devs/feeder.lol-item-sets-generator.org,league-of-legends-devs/feeder.lol-item-sets-generator.org
src/index.js
rejected_duplicate
Near-duplicate of sample 76959
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * External imports\n */\nimport koa from 'koa';\nimport route from 'koa-route';\nimport libdebug from 'debug';\n\n// create debug logger\nconst debug = libdebug('lgho:root');\n\n/**\n * Routes\n */\nfunction* root() {\n this.resp...
javascript
edit
0
1
isc
d8aac8b081f5df7c7c331d78d25e25958cfe5676
francisbrito/let-go-hold-on-api
src/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport _merge from 'lodash/merge'\nimport moment from 'moment'\n\nlet today = moment().format('YYYY-MM-DD')\n\nexport default {\n loading: true,\n schedule: {},\n // Restore saved preferences to over default lunches and classes\n lu...
javascript
edit
0
0
mit
ee0297dc6068c1e0cdec22e73f84cb6dfae2cde6
Foo-Bear/beartime-web,Foo-Bear/beartime-web
src/store.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport fs from 'fs'\nimport _ from 'lodash'\nimport postcss from 'postcss'\nimport stylefmt from 'stylefmt'\n\nimport defaultConfig from './defaultConfig'\nimport mergeConfig from './util/mergeConfig'\n\nimport generateUtilities from '....
javascript
edit
0
1
mit
decd9e03343b62f2de598bbdb2a51794b71176f0
tailwindcss/tailwindcss,tailwindlabs/tailwindcss,tailwindlabs/tailwindcss,tailwindlabs/tailwindcss
src/index.js
rejected_duplicate
Near-duplicate of sample 74503
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar coffeeScript = require(\"coffee-script\");\n\nvar commands = codebox.require(\"core/commands\");\nvar File = codebox.require(\"models/file\");\n\ncommands.register({\n id: \"coffeescript.preview\",\n title: \"CoffeeScript: Pre...
javascript
edit
0
2
apache-2.0
ceb46510b3dba3846a51ea9a96983338ac349250
CodeboxIDE/package-coffeescript
src/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// @flow\n\nimport * as t from '@babel/types'\n\n// Empty out bodies of falsy parts of if/else statements\n// to avoid requiring modules that aren't needed aka\n// if (process.env.NODE_ENV === 'production') module.exports = require('./p...
javascript
edit
null
null
mit
86e7de3cb692cc025512546876e4bb733f130d7c
steelbrain/pundle,motion/pundle,steelbrain/pundle,steelbrain/pundle
packages/pundle-transformer-js/lib/plugin-remove-dead-nodes.js
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport * as components from './components'\n\nimport config, { setOptions } from './utils/config'\nimport { use, registerComponentProgrammatic } from './utils/plugins'\n\nconst Buefy = {\n install(Vue, options = {}) {\n // Opt...
javascript
edit
0
2
mit
bfc138deca8d789387fb12e91a874948c440b29c
rafaelpimpa/buefy,rafaelpimpa/buefy,rafaelpimpa/buefy
src/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst baseConfig = require('tdd-buffet/config/jest.config');\nconst path = require('path');\nconst { pathsToModuleNameMapper } = require('ts-jest/utils');\nconst { compilerOptions } = require('../tsconfig');\n\nconst rootDir = path.join...
javascript
edit
0
0
mit
9e50914060d36a4f6836280ba1d70d08e255ff23
uberVU/mugshot,uberVU/mugshot
tests/jest.config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar HtmlWebpackPlugin = require('html-webpack-plugin');\nvar HtmlWebpackPluginConfig = new HtmlWebpackPlugin({\n template: __dirname + '/app/index.html',\n filename: 'index.html',\n inject: 'body'\n});\n\nmodule.exports = {\n entry:...
javascript
edit
0
0
mit
7abca73b600af4152b0108cd44767dbd5fbc0980
guilsa/javascript-stuff,guilsa/javascript-stuff
react-github-battle/webpack.config.js
rejected_duplicate
Near-duplicate of sample 70929
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*\n Copyright 2015 Leafbird\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apac...
javascript
edit
0
1
apache-2.0
95a364f75062d73bc219c21debb69de7ca2c016c
bscherer/leafbird,bscherer/leafbird,lucasb/leafbird,lucasb/leafbird,leafbirdjs/leafbird,leafbirdjs/leafbird
test/spec/leafbird.spec.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from \"react\";\nimport ReactDOM from \"react-dom\";\nimport { RoutingApp } from \"./modules/RoutingApp\";\nimport store from \"./store\";\nimport { Provider } from \"react-redux\";\nimport { STUY_SPEC_API_URL } from \"./co...
javascript
edit
0
1
mit
abea4b81b50c55fa2fdda58804dcab30a4c5d65e
stuyspec/client-app
src/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n$(document).ready(function(){\n var arrayOfColumnNames = [\n \"c0\",\n \"c1\",\n \"c2\",\n \"c3\",\n \"c4\",\n \"c5\",\n \"c6\",\n ];\n\n for (var i=0; i<7; i++) {\n $(\"#board\").append(\"<div class='column-d...
javascript
edit
0
3
mit
bab883be3f5f8eb4969021fe4924253090d58614
RNBrandt/Connect-4,RNBrandt/Connect-4
js/application.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React, { Component } from \"react\";\nimport PropTypes from \"prop-types\";\nimport BUI, { VaultProvider, VaultUI } from \"@buttercup/ui\";\n\nclass VaultPage extends Component {\n static propTypes = {\n sourceID: PropT...
javascript
edit
0
1
mit
7b7c5befdb6404705ca905bf3e2ae8c8aebe4271
buttercup-pw/buttercup-browser-extension,buttercup-pw/buttercup-browser-extension,perry-mitchell/buttercup-chrome,perry-mitchell/buttercup-chrome
source/setup/components/VaultPage.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar links = inDocument.getElementsByTagName('a');\n\nvar candidateLinks = $A(links).select(function(candidateLink) {\n var textMatched = PatternMatcher.matches(locator, getText(candidateLink));\n var idMatched = PatternMatcher.m...
javascript
edit
0
6
mit
03f2023117163b855f447ef842712f549e6235a4
brynary/webrat,jacksonfish/webrat,irfanah/webrat,johnbintz/webrat,jacksonfish/webrat,irfanah/webrat,johnbintz/webrat,irfanah/webrat,brynary/webrat
lib/webrat/selenium/location_strategy_javascript/webratlink.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar TC = require('tangram.cartodb');\nvar LeafletLayerView = require('./leaflet-layer-view');\n\nvar LeafletCartoDBVectorLayerGroupView = window.L.TileLayer.extend({\n includes: [\n LeafletLayerView.prototype\n ],\n\n options: {\n...
javascript
edit
0
1
bsd-3-clause
282a542462c9a738aa150c8fe785e264f42cf98a
splashblot/cartodb.js,splashblot/cartodb.js,splashblot/cartodb.js,splashblot/cartodb.js
src/geo/leaflet/leaflet-cartodb-webgl-layer-group-view.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimportScripts('common.js');\n\nfunction continuouslyGenerateRsaKey()\n{\n var extractable = false;\n var usages = ['encrypt', 'decrypt'];\n // Note that the modulus length is small.\n var algorithm = {name: \"RSAES-PKCS1-v1_...
javascript
edit
0
1
bsd-3-clause
63b7714347e0e7793c19ccae2e7d96cd834bd7bd
jtg-gg/blink,modulexcite/blink,modulexcite/blink,nwjs/blink,PeterWangIntel/blink-crosswalk,hgl888/blink-crosswalk-efl,smishenk/blink-crosswalk,modulexcite/blink,kurli/blink-crosswalk,XiaosongWei/blink-crosswalk,nwjs/blink,Pluto-tv/blink-crosswalk,hgl888/blink-crosswalk-efl,ondra-novak/blink,hgl888/blink-crosswalk-efl,o...
LayoutTests/crypto/resources/worker-infinite-loop-generateKey.js
rejected_duplicate
Near-duplicate of sample 100643
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * Copyright 2015 Jaime Pajuelo\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * ...
javascript
edit
0
1
apache-2.0
8cd66a00388b06bf6744c0be19eb38a20bc7fc59
jpajuelo/js-form-validator
src/validators/ValidationError.js
rejected_duplicate
Near-duplicate of sample 99750
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = {\n extends: \"eslint:recommended\",\n rules: {\n \"no-console\": 0,\n \"object-curly-spacing\": [\"error\", \"always\"],\n \"comma-dangle\": [\"error\", \"always-multiline\"],\n quotes: [\"error\", \"back...
javascript
edit
0
0
mit
4bc5e394580543c2f31ac2d4d7424fef6e47a21a
mattdean1/contentful-text-search
.eslintrc.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* global jasmineImporter */\n\nconst {GLib} = imports.gi;\n\nconst Utils = jasmineImporter.utils;\n\nfunction Node(name) {\n this.name = name;\n this.attrs = {};\n this.children = [];\n this.text = '';\n}\n\nfunction _attrs...
javascript
edit
0
4
mit
fa1bcd93bb50dfed00a56e908270a1338ca36b67
ptomato/jasmine-gjs,ptomato/jasmine-gjs
src/xmlWriter.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar $ = $ || function() {}; // Keeps from throwing ref errors.\n\nfunction swapselected(from, to) {\n\t$(to).html(options[$(from).val()]);\n}\n\nfunction detailselected(from, to) {\n\t$(to).text(details[$(from).val()]);\n}\n\n$(function...
javascript
edit
0
1
bsd-3-clause
771fab04d9efe490ed513a194a4a1c7dfe06884c
AeroNotix/django-timetracker,AeroNotix/django-timetracker,AeroNotix/django-timetracker
static/js/vcs.js
rejected_duplicate
Near-duplicate of sample 83306
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport { Link } from 'react-router-dom';\nimport { Button } from 'react-bootstrap';\nimport ModifyTitle from '../containers/ModifyTitle';\nimport ModifyIngredients from '../containers/ModifyIngredients';\nimp...
javascript
edit
0
2
mit
a2603a86697b856749a1df9027505adf11908cad
phuchle/recipeas,phuchle/recipeas
src/components/ReviewRecipe.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nfunction Mixin(proto, properties) {\n for (const property in properties) {\n const value = properties[property];\n if (proto[property] && typeof value == \"function\") {\n inherit(proto, property, value);\n } else {\n ...
javascript
edit
0
4
mit
17d2056799f9560f0340efa18447a6ea7dd52e56
iFixit/node-markup,iFixit/node-markup,iFixit/node-markup
src/mixin.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nfunction cityElectionsController($scope, ballot) {\n $scope.ballot = ballot;\n\n $scope.isOffice = isOffice;\n $scope.isReferendum = isReferendum;\n\n function isOffice(contest) {\n return contest.type === 'offic...
javascript
edit
0
1
mit
0a3273bbb40e2c7c9c84f2df01ce53a8b379a86e
KyleW/disclosure-frontend,caciviclab/disclosure-frontend,caciviclab/disclosure-frontend,KyleW/disclosure-frontend,caciviclab/disclosure-frontend-alpha,KyleW/disclosure-frontend,caciviclab/disclosure-frontend,caciviclab/disclosure-frontend-alpha,caciviclab/disclosure-frontend-alpha
app/components/common/cityModule/cityElectionsController.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = function(React) {\n return {\n propTypes: {\n flux: React.PropTypes.object.isRequired\n },\n\n childContextTypes: {\n flux: React.PropTypes.object\n },\n\n getChildContext: function() {\n ...
javascript
edit
0
1
mit
0165ba27355a4ea2125abf4875a212257bf2567e
hoanglamhuynh/fluxxor,STRML/fluxxor,alcedo/fluxxor,davesag/fluxxor,nagyistoce/fluxxor,BinaryMuse/fluxxor,VincentHoang/fluxxor,davesag/fluxxor,chimpinano/fluxxor,davesag/fluxxor,dantman/fluxxor,nagyistoce/fluxxor,andrewslater/fluxxor,webcoding/fluxxor,chimpinano/fluxxor,SqREL/fluxxor,dantman/fluxxor,hoanglamhuynh/fluxxo...
lib/flux_mixin.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n#!/usr/bin/env node\n\n// Modules\nvar connect = require('connect'),\n fs = require('fs'),\n http = require('http'),\n path = require('path'),\n serveStatic = require('serve-static'),\n serveIndex = require('serve-index')...
javascript
edit
0
5
mit
b32b1eb4acda8ea21328f8056666ec22421a038e
itsananderson/node-web-server-cli
lib/web-server.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport styles from './UserInputError.less';\n\nimport React, { Component, PropTypes } from 'react';\nimport { MIN_FONT_SIZE, MAX_FONT_SIZE } from 'flux/constants/config';\n\nexport default class UserInputError extends Component {\n sta...
javascript
edit
0
3
mit
865c601b1b0fb542733e854087581f12b142c59e
moroshko/accessible-colors,moroshko/accessible-colors
src/components/App/components/UserInputError/UserInputError.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar game = require('../game.js');\nvar chai = require('chai');\n\nchai.should();\n\ndescribe('Game', function() {\n describe('createPack', function() {\n it('has 52 cards', function() {\n var p = game.createPack();\n p.sho...
javascript
edit
0
1
mit
29d0e65927d34f8077c56321c4c145b0fd9d87b3
psmarshall/500,psmarshall/500
test/gameSpec.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// Small jQuery plugin to get dates from server.\n(function($){\n\n var serverDate;\n var init = function(){\n if (!serverDate) {\n $.ajax({\n \"url\": \"/course-signup/rest/user/current\",\n ...
javascript
edit
0
2
apache-2.0
d0c8e97a68089b2fcd94b9921b976a4ff9619fad
ox-it/wl-course-signup,ox-it/wl-course-signup,ox-it/wl-course-signup,ox-it/wl-course-signup,ox-it/wl-course-signup
tool/src/main/webapp/static/lib/serverDate.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react'\nimport moment from 'moment'\nimport { theme } from '../../tools'\n\nlet styles = {\n chip: {},\n}\n\nconst LastHarvestStatus = ({harvest}) => {\n const date = new Date(harvest.finished || harvest.finishedAt)...
javascript
edit
0
3
mit
f9f7ba4eb96ff7bcadfd2c7859d315ff3418e084
sgmap/inspire,sgmap/inspire
src/components/LastHarvestStatus/LastHarvestStatus.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// An example configuration file.\nexports.config = {\n // The address of a running selenium server.\n //seleniumAddress: 'http://localhost:4444/wd/hub',\n\n // Capabilities to be passed to the webdriver instance.\n capabilities: {\...
javascript
edit
0
0
mit
21c33458f27ade177cdced1f2f9adba321883274
petebacondarwin/angularjs-testing-presentation
protractor-demo/conf.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst { next, hookStart, hookEnd } = require('hooter/effects')\nconst assignDefaults = require('./assignDefaults')\nconst validateConfig = require('./validateConfig')\n\n\nconst EVENTS_WITH_CONFIG = ['start', 'execute', 'process', 'hand...
javascript
edit
0
3
isc
b60d3007afcddbe61f1aa3a78bacf284907ffcf6
alex-shnayder/comanche
src/plugins/configure/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// Manage the SHA of the latest control repository commit.\n\nvar restify = require('restify');\n\nvar storage = require('../storage');\nvar log = require('../logging').getLogger();\n\nexports.store = function (req, res, next) {\n if (...
javascript
edit
0
3
mit
a51a480ac80d7123451ed45dca816d445c92d20e
deconst/content-service,deconst/content-service
src/routes/control.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar Trie = require('../app/trie');\n\ndescribe('Trie', function() {\n var trie;\n\n beforeEach(function() {\n trie = new Trie();\n });\n\n it('should be an object', function() {\n expect(trie).to.be.ok;\n });\n\n it('should ...
javascript
edit
0
1
mit
0123500c30cb7acf695d5486b161f3b4ecd3b545
mgarbacz/nordrassil,mgarbacz/nordrassil
test/trie.js
rejected_duplicate
Near-duplicate of sample 87685
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Ember from 'ember';\nimport DS from 'ember-data';\nimport { Offline } from 'ember-flexberry-data';\n\nexport default Offline.Store.extend({\n init() {\n this._super(...arguments);\n let owner = Ember.getOwner(this);\n l...
javascript
edit
0
1
mit
37952efe4b53a791028e72ac9419864fcaf6a4f8
Flexberry/ember-flexberry-projections,Flexberry/ember-flexberry-data,Flexberry/ember-flexberry-projections,Flexberry/ember-flexberry-data,Flexberry/ember-flexberry-data
tests/dummy/app/services/store.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\nvar starsky = require('..');\n\nsetInterval(function () {\n starsky.publish('starsky.test', {\n subject: 'test message'\n });\n}, 1000);\n\nstarsky.connect();\n```\n\nApply this change: Add confirm callback to example" }, { ...
javascript
edit
0
2
mit
802462643c25d33f0632b0a58671094277f8a541
recurly/starsky
examples/producer.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst { pick, mapValues, isArray, pickBy, get } = require('lodash')\n\nconst { search } = require('../../search/services')\nconst { transformApiResponseToSearchCollection } = require('../../search/transformers')\nconst { transformContac...
javascript
edit
0
2
mit
b1e159223635a33ba2c3e5ad239b0dd50baa5bad
uktrade/data-hub-fe-beta2,uktrade/data-hub-frontend,uktrade/data-hub-frontend,uktrade/data-hub-fe-beta2,uktrade/data-hub-frontend
src/apps/contacts/middleware/collection.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\n\nfunction isObject(/* subjects... */) {\n var index,\n length = arguments.length,\n current;\n\n if (length < 1) {\n return false;\n }\n\n for (index = 0; index < length; index += 1) {\n current = a...
javascript
edit
0
5
mit
ca2cbd5b3f051ac74922da0fa7ab7b3d1f5630a8
dervus/assert-paranoid-equal
lib/assert-full-equal/utilities.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* global window */\n/* @jsx createElement */\n// @flow\n\n// eslint-disable-next-line no-unused-vars\nimport { createElement } from 'jsx-dom';\nimport { watch } from '../core';\n// $FlowFixMe\nimport cardInfoHeader from '../assets/tool...
javascript
edit
null
null
mit
d3ced289507adb4840c6bfdbb53dc015c864e190
Soreine/hyper-gwent,Soreine/hyper-gwent,Soreine/hyper-gwent
website/index.js
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// Profile Model\nmodule.exports = function(sequelize, DataTypes) {\n var Profile = sequelize.define('Profile', {\n tagLine: {\n type: DataTypes.STRING,\n allowNull: false\n },\n description: {\n type: DataTypes...
javascript
edit
0
1
mit
e235cdc5790481504b81622b52b9049cb97ef5a0
kocsenc/nodejs-tutorme,kocsenc/nodejs-tutorme
models/profile.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst DocumentedItem = require('./item');\n\nclass DocumentedVarType extends DocumentedItem {\n\tregisterMetaInfo(data) {\n\t\tthis.directData = data;\n\t}\n\n\tserialize() {\n\t\tconst names = [];\n\t\tfor(const name of this.directData...
javascript
edit
0
4
apache-2.0
57addfba221451214ed59738f528c5febfc5265b
hydrabolt/discord.js-docgen
src/types/var-type.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nwindow.onload = function() {\n\n createChart('.ct-chart', true);\n\n document.getElementById('button1').onclick = function () {\n\n var chartDivNode = document.getElementById('chart');\n var chartSvgNode = chartDivNode.children[...
javascript
edit
0
1
apache-2.0
dcd4c2c790536ee755b42f9cc0a51b5cdb6f04e7
giraone/chartist2image,giraone/chartist2image
js/chartist2image-with-svg2bitmap.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* globals jQuery,QUnit */\n\njQuery(document).ready(function() {\n var TestLoader = require('ember-cli/test-loader')['default'];\n TestLoader.prototype.shouldLoadModule = function(moduleName) {\n return moduleName.match(/\\/.*[-_]...
javascript
edit
0
4
mit
097e4552a3f47a38bc4ae97eb53993f13106904e
ember-cli/ember-cli-qunit,nathanhammond/ember-cli-qunit,ember-cli/ember-cli-qunit,nathanhammond/ember-cli-qunit
vendor/ember-cli-qunit/test-loader.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { test } from 'qunit';\nimport moduleForAcceptance from '../../tests/helpers/module-for-acceptance';\n\nmoduleForAcceptance('Acceptance | css styles');\n\ntest('check that Octicons scss is being applied', function(assert) {\n vi...
javascript
edit
0
1
mit
4da68c1db54090b480551211563610d9a4c45713
kpfefferle/ember-octicons,kpfefferle/ember-cli-octicons,kpfefferle/ember-cli-octicons,kpfefferle/ember-octicons
tests/acceptance/css-styles-test.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// Copyright 2018, Google, Inc.\n// Licensed under the Apache License, Version 2.0 (the 'License');\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.a...
javascript
edit
0
1
apache-2.0
2c8a9fb5fe88c71970af1ad428221251136307eb
actions-on-google/dialogflow-helper-intents-nodejs
functions/helper-intents/ask-for-datetime.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar MAX_FILE_SIZE = 1048576;\n\n$(function() {\n $('#pluginFile').on('change', function() {\n var alert = $('.alert-file');\n var fileName = $(this).val().trim();\n var fileSize = this.files[0].size;\n if ...
javascript
edit
0
3
mit
407de35036baf8aec2cca3f0bf6dede8870fa327
SpongePowered/Ore,SpongePowered/Ore,SpongePowered/Ore,SpongePowered/Ore,SpongePowered/Ore
public/javascripts/pluginUpload.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar config = require('../config');\nvar gulp = require('gulp');\nvar sass = require('gulp-sass');\nvar gulpif = require('gulp-if');\nvar handleErrors = require('../util/handleErrors');\nvar b...
javascript
edit
0
3
mit
33619ceac4f7453c87c02610ef297af0d76beee9
loklak/loklak_webclient,loklak/loklak_webclient,aayusharora/loklak_webclient,aayusharora/loklak_webclient,codethejason/loklak_webclient,loklak/loklak_webclient,codethejason/loklak_webclient,codethejason/loklak_webclient,aayusharora/loklak_webclient
gulp/tasks/styles.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar Deffy = require(\"deffy\")\n\nfunction SubElm(data, parent) {\n this.name = data.name;\n this.label = Deffy(data.label, this.name);\n this.type = data.type;\n this.id = [this.type, parent.name, this.name].join(\"_\");\n}...
javascript
edit
0
4
mit
fe70897411c2109d1cbc725068e96ae177dfdbb9
jillix/engine-builder
lib/composition/node/subelm/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React, { PropTypes } from 'react';\n\nexport default class DashboardProjects extends React.Component { // eslint-disable-line\n render() {\n return (\n <div className=\"projects\">\n <div className=\"page-header c...
javascript
edit
0
1
mit
4e7632351780a9fe7ba52616313e7a1b31b410ac
MRN-Code/coinstac,MRN-Code/coinstac,MRN-Code/coinstac
packages/coinstac-ui/app/render/components/projects/dashboard-projects.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function() {\n if (typeof FastBoot === 'undefined') {\n var current = document.getElementById('fastboot-body-start');\n\n if (\n current &&\n typeof Ember.ViewUtils.isSerializationFirstNode === 'function' &&\n Emb...
javascript
edit
0
6
mit
edfeb5b06100df3c2ccc46eb56edc9224624b96b
ember-fastboot/ember-cli-fastboot,ember-fastboot/ember-cli-fastboot
packages/ember-cli-fastboot/vendor/experimental-render-mode-rehydrate.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// @flow\n\nimport * as React from 'react';\nimport { View, Text, StyleSheet } from 'react-native';\nimport Icon from 'react-native-vector-icons/MaterialIcons';\n\nimport { threadTypes, type ThreadType } from 'lib/types/thread-types';\n...
javascript
edit
null
null
bsd-3-clause
7050035874fdd5d42d5e74617011201f9595065d
Ashoat/squadcal,Ashoat/squadcal,Ashoat/squadcal,Ashoat/squadcal,Ashoat/squadcal,Ashoat/squadcal,Ashoat/squadcal
native/components/thread-visibility.react.js
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst esbuild = require(\"esbuild\");\n\nconst isProduction = false;\n\nesbuild.buildSync({\n entryPoints: ['./src/platform/current/server/serverStartup.ts'],\n bundle: true,\n outfile: './build/server/js/bundle2.js',\n platform: \"...
javascript
edit
0
0
mit
84a40d835cb1f4d6abcfd44db26b342a6ba8dbb3
Discordius/Lesswrong2,Discordius/Lesswrong2,Discordius/Lesswrong2,Discordius/Lesswrong2
webpack/build.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*\n This is an example factory definition. Factories are\n used inside acceptance tests.\n\n Create more files in this directory to define additional factories.\n*/\nimport Mirage from 'ember-cli-mirage';\n\nexport default Mirage.Fa...
javascript
edit
0
0
mit
c210a34a20955ac96f5d8bc0913f5aa8e2aa6634
unchartedcode/ember-cli-mirage,martinmaillard/ember-cli-mirage,PrecisionNutrition/ember-cli-mirage,mixonic/ember-cli-mirage,kategengler/ember-cli-mirage,flexyford/ember-cli-mirage,rubygiulioni/testing-waffle,lazybensch/ember-cli-mirage,andrei1089/ember-cli-mirage,samselikoff/ember-cli-mirage,alecho/ember-cli-mirage,mak...
blueprints/ember-cli-mirage/files/app/mirage/factories/contact.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function(){\n'use strict';\n\nangular\n .module('secondLead')\n \n .factory('ReviewModel',['Restangular', 'store', function(Restangular, store) {\n var currentUser = store.get('user');\n return {\n \n getAll: functio...
javascript
edit
0
1
mit
a169d2ecdb6e7d4457eadfc15f33129847c370ec
ac-adekunle/secondlead,ac-adekunle/secondlead,ac-adekunle/secondlead
app/assets/javascripts/angular/common/models/review-model.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst {\n spawn\n} = require(\"child_process\");\n\nconst gitCommand = \"git\";\nconst gitDiff = \"diff\";\nconst statOption = \"--numstat\";\n\nfunction promisify(child_process) {\n return new Promise((resolve, reject) => {\n ...
javascript
edit
0
1
mit
7e950ec73d741059adb354a6d65d564a7b27ab5a
ovidiup13/L5-ProjectSource
scripts/clients/git_diff.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport BaseProvider from \"torii/providers/base\";\nimport ajax from \"../utils/ajax\";\nimport config from \"../config/environment\";\n\nexport default BaseProvider.extend({\n open: function(credentials){\n return ajax(config.authB...
javascript
edit
0
3
mit
5f80a1d7d6737168e211e8e04f70a0baaf2864b5
blakepettersson/dashboard.aptible.com,blakepettersson/dashboard.aptible.com,aptible/dashboard.aptible.com,aptible/dashboard.aptible.com,aptible/dashboard.aptible.com,blakepettersson/dashboard.aptible.com,chasballew/dashboard.aptible.com,chasballew/dashboard.aptible.com,chasballew/dashboard.aptible.com
app/aptible/torii-provider.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react'\n\nclass NewQuestion extends React.Component {\n render () {\n return <div>\n <h2>Create a New Question</h2>\n </div>\n }\n}\n\nexport default NewQuestion\n\n```\n\nApply this change: Add form for ...
javascript
edit
0
2
mit
eb26baf49634cc1547b2a8a9be0befac551c11ac
Charterhouse/NextBuild2017,Charterhouse/NextBuild2017,Charterhouse/NextBuild2017
src/app-webapp/app/components/new-question/new-question.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst chai = require('chai')\nconst exec = require('child_process').exec\n\nvar assert = chai.assert\n\nconsole.log('Testing the app')\n\ndescribe('Conversion Params', function () {\n // Further code for tests goes here\n it('If no pa...
javascript
edit
0
1
mit
07a30d57ac292bbb630a78eb58f4995c702222f2
duvanmonsa/currency_conversor_cli
test/conversorTest.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// Code goes here\n\n/*\n * Time to display not just simple data, but data from an object.\n */\nvar MainController = function($scope, $http) {\n\n\t$scope.message = \"Hello, Angular World!\";\n\n\tvar whenGetComplete = function(respons...
javascript
edit
0
1
mit
2a138502bf320dcf7b25bfb7340aa6ac00d7e8aa
mrwizard82d1/angular_js_getting_started,mrwizard82d1/angular_js_getting_started
first_controller/script.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nconst assert = require('assert');\nconst Dashycode = require('./../../.lib-dist/dashycode');\n\ndescribe('Dashycode', function () {\n\t// Technically we should be testing for values up to 0x10FFFF, but we will\n\t// nev...
javascript
edit
0
1
mit
f5822d9e9fd386b46194fd719e6b4b6f8dfcec42
sirDonovan/Pokemon-Showdown,sirDonovan/Pokemon-Showdown,svivian/Pokemon-Showdown,QuiteQuiet/Pokemon-Showdown,xfix/Pokemon-Showdown,urkerab/Pokemon-Showdown,panpawn/Gold-Server,Zarel/Pokemon-Showdown,urkerab/Pokemon-Showdown,jumbowhales/Pokemon-Showdown,Enigami/Pokemon-Showdown,Zarel/Pokemon-Showdown,Zarel/Pokemon-Showd...
test/lib/dashycode.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport {\n connect\n} from \"react-redux\";\nimport FormViewer from \"./FormViewer\";\n\nconst mapStateToProps = (state) => {\n\t\tconst points = state.waterlines.filter((offset) => {\n\t\t\treturn offset && offset.x != undefined && ...
javascript
edit
0
3
apache-2.0
b4181ef46197cdaf830014e57f42d97efdebec92
sel129/lofter,sel129/lofter
src/components/FormViewerContainer.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*\n * Copyright 2015 Hewlett-Packard Development Company, L.P.\n * Licensed under the MIT License (the \"License\"); you may not use this file except in compliance with the License.\n */\n\ndefine([], function () {\n \"use strict\";...
javascript
edit
0
1
mit
3223750e3abc0b941331c960b6c3afa027ef31dc
LinkPowerHK/find,hpe-idol/find,LinkPowerHK/find,LinkPowerHK/find,hpe-idol/java-powerpoint-report,hpautonomy/find,hpautonomy/find,LinkPowerHK/find,hpautonomy/find,hpautonomy/find,hpe-idol/java-powerpoint-report,hpe-idol/find,hpe-idol/find,LinkPowerHK/find,hpe-idol/find,hpe-idol/find,hpautonomy/find
find-core/src/main/public/static/js/find/app/page/search/results/query-strategy.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nclass Middleware {\n constructor() {\n\n }\n\n before(event) {\n\n }\n\n after(event) {\n \n }\n}\n\nmodule.exports = Middleware\n```\n\nApply this change: Make sure stub methods return event." }, { "rol...
javascript
edit
0
1
mit
bc077131bfdef8a35e54bdb61089914d376fdc59
surebot/Eventline,surebot/Eventline
src/middleware.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport roundNumber from 'dummy/utils/round-number';\nimport { module, test } from 'qunit';\n\nmodule('Unit | Utility | round number');\n\ntest('it rounds a number to two decimal places by default', function(assert) {\n let result = rou...
javascript
edit
0
1
mit
475b9aa8146e6e4307c0fac0df76e3810c4eb9d3
PrecisionNutrition/unit-utils,PrecisionNutrition/unit-utils
tests/unit/utils/round-number-test.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nangular.module('ticketbox.boxoffice.block', [\n 'ngRoute',\n 'ticketbox.config',\n 'ticketbox.components.api',\n 'ticketbox.common.seatplan.handlers',\n 'ticketbox.components.seatplan',\n 'ticketbox.co...
javascript
edit
0
1
mit
25519614f435bc1f0e277e823fe17ffd9a89f240
ssigg/ticketbox-client-angularjs,ssigg/ticketbox-client-angularjs
app/boxoffice.block/boxoffice.block.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar context = require('../../src/exceptions/context')\n\ndescribe(\"Minified code detection\", function() {\n\n it(\"Empty source returns false\", function() {\n\t\texpect(context.isSourceMinified('')).toBe(false)\n })\n\n it(\"Minif...
javascript
edit
0
1
mit
dc51280c20545b07c9dc7bb0cd11dd60384e9b79
opbeat/opbeat-angular,opbeat/opbeat-react,opbeat/opbeat-angular,jahtalab/opbeat-js,opbeat/opbeat-angular,opbeat/opbeat-react,opbeat/opbeat-react,opbeat/opbeat-js-core,opbeat/opbeat-js-core,jahtalab/opbeat-js,jahtalab/opbeat-js
test/exceptions/minified_code.spec.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nlogMessage(\"Script Begins!\");\nvar Galileo = require(\"galileo-io\");\nvar board = new Galileo();\nvar previousData = 0;\n\nlogMessage(\"Setting Ready event for the Galileo Board\");\nboard.on(\"ready\", galileoReadyHandler);\nlogMess...
javascript
edit
0
4
mit
ee7042ed28b7e15087543b59609e74276bf5befa
janunezc/GALILEO,janunezc/GALILEO,janunezc/GALILEO
nodejs_projects/basic_nodejs_samples/read.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// eslint-disable-next-line import/prefer-default-export\nexport const createInputChanged = actionPrefix => (name, event) => ({\n type: `${actionPrefix}_INPUT_CHANGED`,\n name,\n id: event.target.id,\n startovne: event.target.nonce,...
javascript
edit
0
4
mit
5897c870fa46c8844c3f0bc92d8888377eb0f2ce
ivosh/jcm2018,ivosh/jcm2018,ivosh/jcm2018
ui/src/registrator/PrihlaskyDohlasky/Input/InputActions.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar inspect = require(\"util\").inspect\nvar path = require(\"path\")\n\nmodule.exports = function (callback) {\n try_in_order([\n function (callback) {\n if (process.env.RUN_SWF_VERBOSE) {\n console.warn(\"run-swf: look...
javascript
edit
0
3
mit
79885e0a2710b2be0bad18c2fac206e129cbdbf6
dbrock/stdio.as,dbrock/stdio.as,dbrock/stdio.as
get-flashplayer-program.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar assert = require('chai').assert;\nvar StorageService = require('../');\nvar AmazonStorage = StorageService.AmazonStorage;\n\ndescribe('Factory Method', function () {\n it('Should properly export', function () {\n assert.isObject...
javascript
edit
0
1
mit
09a038dde6ea453fafad4899c43746e461c24a40
ghaiklor/sails-service-storage
test/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// start the web server. (we'll soon write a dedicated script to do this.)\nif (module.id === require.main) {\n require('ringo/httpserver').start();\n}\n\n```\n\nApply this change: Make jsgi demo app run again" }, { "role": "...
javascript
edit
0
0
apache-2.0
160ea44513d40317bc94135d123a9c11f8bb4503
ashwinrayaprolu1984/ringojs,ringo/ringojs,Transcordia/ringojs,ashwinrayaprolu1984/ringojs,ashwinrayaprolu1984/ringojs,ashwinrayaprolu1984/ringojs,Transcordia/ringojs,ringo/ringojs,ringo/ringojs,oberhamsi/ringojs,ringo/ringojs,Transcordia/ringojs,oberhamsi/ringojs,oberhamsi/ringojs,Transcordia/ringojs
apps/jsgi/main.js
rejected_duplicate
Near-duplicate of sample 93916
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nclass MCProjectHomeRemindersComponentController {\n /*@ngInject*/\n constructor(projectsAPI) {\n this.projectsAPI = projectsAPI;\n }\n\n removeReminder(index) {\n this.project.reminders.splice(index, 1);\n }...
javascript
edit
0
1
mit
6d3ae8de4e99fc2fb925b3a645b8549756ccdb11
materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org
website/mcapp.projects/src/app/project/home/mc-project-home-reminders.components.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { useEffect, useMemo } from 'react';\nimport { connect } from 'react-redux';\nimport PropTypes from 'prop-types';\nimport reducerRegistry from 'redux/registry';\n\nimport * as actions from './actions';\nimport { getLatestProps } ...
javascript
edit
0
2
mit
fe00fb8e58535abb1818bcbe3dfb4a780c4d8558
Vizzuality/gfw,Vizzuality/gfw
providers/latest-provider/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * In order to support reload-and-profile functionality, the renderer needs to be injected before any other scripts.\n * Since it is a complex file (with imports) we can't just toString() it like we do with the hook itself,\n * So ...
javascript
edit
null
null
mit
5ec387aa829d0f9bef9b1e2871491c4c30fcf188
rickbeerendonk/react,billfeller/react,chenglou/react,billfeller/react,acdlite/react,acdlite/react,trueadm/react,flarnie/react,acdlite/react,glenjamin/react,yungsters/react,terminatorheart/react,camsong/react,tomocchino/react,Simek/react,mjackson/react,tomocchino/react,trueadm/react,TheBlasfem/react,rickbeerendonk/react...
shells/browser/shared/src/renderer.js
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react'\nimport RestaurantModel from './RestaurantModel'\n\nclass Restaurant extends React.Component {\n constructor(props) {\n super(props)\n this.displayName = \"Restaurant\"\n }\n\n render() {\n // helpe...
javascript
edit
0
3
apache-2.0
eb0bf2ff537bf74fc8027074380870d473af03b7
maximveksler/EatWell,maximveksler/EatWell
Restaurant.js
accepted
null
true