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/*global seqJS:true */\n\n(function() {\n /*\n ======== A Handy Little QUnit Reference ========\n http://api.qunitjs.com/\n\n Test methods:\n module(name, {[setup][ ,teardown]})\n test(name, callback)\n expect(...
javascript
edit
0
1
mit
1810afeeeb0f678d6968f8849a1932a547e966eb
haydnKing/seqJS,haydnKing/seqJS
test/test_ss.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar bcrypt = require('bcrypt');\nvar mongoose = require('mongoose');\nvar Schema = mongoose.Schema;\n// export a mongoose model\n\nvar userSchema = new Schema({\n\tuserName : String,\n\tpasswordDigest : String\n});\n\nu...
javascript
edit
0
2
mit
62513397441fd0af5614a18e4cb6037479b744f2
dhuddell/teachers-lounge-back-end
models/User.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar mongo = require('mongodb').MongoClient;\n\nmongo.connect('mongodb://localhost:27017/akkavsnode', function(err, db) {\n var http = require('http');\n\n http.createServer(function (req, res) {\n if (req.url === '/api/user') {\n ...
javascript
edit
0
2
mit
53cf51e0c7671750985ee2b88ddf51905897d9c7
choffmeister/akka-vs-node,choffmeister/akka-vs-node
node/server.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { $$ } from '../dom'\nimport { Form, FormRow, Modal, MultiSelect } from '../ui'\n\nexport default function CitationModal (props) {\n const { document, node, mode } = props\n const confirmLabel = mode === 'edit' ? 'Update' : 'Cr...
javascript
edit
0
3
mit
a8f98d8df125bbfaade27e606d5e75f72b158228
michael/substance-1,substance/substance,substance/substance,michael/substance-1
commons/CitationModal.js
rejected_duplicate
Near-duplicate of sample 78846
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\n/* global Connector */\n\nConnector.artistSelector = '.track-title .artist';\n\nConnector.trackSelector = '.track-title .title';\n\nConnector.isPlaying = function () {\n\treturn $('.playback-button > div').attr('title')...
javascript
edit
0
2
mit
d9f7edd951b7c69db4623ade722f71b751a65143
alexesprit/web-scrobbler,inverse/web-scrobbler,usdivad/web-scrobbler,fakelbst/Chrome-Last.fm-Scrobbler,ex47/web-scrobbler,galeksandrp/web-scrobbler,ex47/web-scrobbler,carpet-berlin/web-scrobbler,alexesprit/web-scrobbler,Paszt/web-scrobbler,carpet-berlin/web-scrobbler,inverse/web-scrobbler,david-sabata/web-scrobbler,gal...
connectors/v2/pitchfork.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* eslint-disable max-len */\nexports.extensions = {\n supported: [\n { icon: 'dist', extensions: ['dist', 'out'] },\n { icon: 'git', extensions: ['git', 'github'] },\n { icon: 'node', extensions: ['node_modules'] },\n { ic...
javascript
edit
0
0
mit
76842f742608a29d5bd1460aeb983265e807d197
robertohuertasm/vscode-icons,jens1o/vscode-icons,JimiC/vscode-icons,vscode-icons/vscode-icons,vscode-icons/vscode-icons,JimiC/vscode-icons,olzaragoza/vscode-icons
src/build/supportedFolders.js
rejected_duplicate
Near-duplicate of sample 94511
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function ($) {\n $.fn.clone_form_template = function (options) {\n if (!options) {\n options = {};\n }\n return $(this).map(function () {\n return update($(this).clone(), options)[0];\n });\n };\n\n // updates ...
javascript
edit
0
7
mit
b5efd8cd8eeab78442e210ab7d51d4a310a1678d
samuelcole/jquery-livesearch,samuelcole/jquery-livesearch
src/jquery.clone_form_template.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst CleanCSS = require(\"clean-css\");\n\nmodule.exports = function (eleventyConfig) {\n\televentyConfig.addPassthroughCopy(\"src/img\");\n\televentyConfig.addPassthroughCopy(\"src/webfonts\");\n\n\televentyConfig.addFilter(\"cssmin\"...
javascript
edit
0
1
mit
af85171d2c488bbaa851815ffd8a8aafb0e52f8e
stevecochrane/stevecochrane.com,stevecochrane/stevecochrane.com
.eleventy.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\njest.autoMockOff();\njest.unmock('../base.js');\n\nconst base = require('../base.js');\n\ndescribe('Base', () => {\n it('does a lot of cool stuff', () => {\n });\n});\n\n```\n\nApply this change: Add tests for Base fs" }, { "r...
javascript
edit
0
1
mit
f2fd025793df508f7980c5c4f21bfc5745cf9d08
LivelyKernel/lively4-core,LivelyKernel/lively4-core
src/fs/__tests__/test-base.js
accepted
null
true
[ { "role": "user", "content": "Write javascript code for the following: Update HTML files with the updates." }, { "role": "assistant", "content": "require(['gitbook', 'jquery'], function(gitbook, $) {\n var SITES = {\n 'facebook': {\n 'label': 'Facebook',\n 'icon':...
javascript
new_file
0
2
mit
f1992db7234513a86b07e53b30a160342e0bb9fc
HIT2GAP-EU-PROJECT/HIT2GAPOnt
docs/_book/gitbook/gitbook-plugin-sharing/buttons.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar ContactModel = require('../model/Contacts');\nvar ContactView = require('../view/Contact');\nvar AddContactForm = require('../view/AddContactForm');\n\n/**\n * Controller Object to dispatch actions to view/Contact and model/Contacts...
javascript
edit
0
3
isc
c09772fb4d1523f2171ddfe0858605e79d4516a3
bitfyre/contacts
src/js/controller/Contacts.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * Macedonian translation for bootstrap-datepicker\n * Marko Aleksic <<EMAIL>>\n */\n;(function($){\n $.fn.datepicker.dates['mk'] = {\n days: [\"Недела\", \"Понеделник\", \"Вторник\", \"Среда\", \"Четврток\", \"Петок\", \...
javascript
edit
0
1
apache-2.0
be8ed28b34bcd1b9a7666b9dc9ec0da64ff28a30
bitzesty/bootstrap-datepicker,HNygard/bootstrap-datepicker,gn0st1k4m/bootstrap-datepicker,aldano/bootstrap-datepicker,zhaoyan158567/bootstrap-datepicker,acrobat/bootstrap-datepicker,TheJumpCloud/bootstrap-datepicker,cherylyan/bootstrap-datepicker,huang-x-h/bootstrap-datepicker,cherylyan/bootstrap-datepicker,defrian8/bo...
js/locales/bootstrap-datepicker.mk.js
rejected_duplicate
Near-duplicate of sample 108876
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst pkg = require('../package.json');\nconst Identify = require('./identifyPeople.js');\n\nfunction handlers() {\n function index(req, reply) {\n reply.view('index', {\n users: [\n 'hello'\n ...
javascript
edit
0
4
mit
890bdbb025bcf7ec6121c58d6b6882cdbd6dd6ee
alsalo1/walls-have-ears,alsalo1/walls-have-ears
src/handlers.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport express from 'express';\nimport * as controller from '../controllers/product-group.controller';\nimport { createAuthMiddleware } from '../auth';\nimport { MODERATOR } from '../auth/constants';\n\nconst router = express.Router();\...
javascript
edit
0
0
mit
76b57bed027fb3cb16bd24f9bb6fef4011fd9ebd
abakusbackup/abacash-api,abakusbackup/abacash-api
src/routes/product-group.routes.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// auth_seed.js\nconst User = require('./../../database/models').User;\n\nmodule.exports = {\n emptyDB(done) {\n User.destroy({ truncate: true })\n .then((rows) => {\n console.log(rows);\n return done();\n ...
javascript
edit
0
2
mit
6c504b7a54518d498d256caa3801df0df49a4a87
johadi10/PostIt,johadi10/PostIt
server/tests/seed/auth_seed.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Config from './app-config.module';\nimport './base.config';\n\n/**\n * Optionally include a file\n */\n((_require) => {\n if (_require.keys().find(x => x.indexOf('local.config.js') > -1)) {\n _require('./local.config.js');\n ...
javascript
edit
0
2
mit
3287baeccd0530844e9b1dca28a8a429e2402398
tijhaart/webpack-foundation,tijhaart/webpack-foundation
src/config/app-config.index.js
rejected_duplicate
Near-duplicate of sample 75383
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport * as IncrementalDOM from 'incremental-dom';\nimport { vdom } from '../../../src/index';\n\ndescribe('IncrementalDOM', function () {\n it('should export all the same members as the incremental-dom we consume', function () {\n ...
javascript
edit
0
1
mit
f1cd45736986db9362750ac3061ee4113c8ba3f2
chrisdarroch/skatejs,skatejs/skatejs,skatejs/skatejs,chrisdarroch/skatejs,skatejs/skatejs
test/unit/vdom/incremental-dom.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst assert = require('assert')\n\nfunction createGL (opts) {\n assert(!opts || (typeof opts === 'object'), 'pex-gl: createGL requires opts argument to be null or an object')\n if (!opts) opts = {}\n\n let canvas = opts.canvas\n\n ...
javascript
edit
0
7
mit
933d14bd3764d570477af932604f8243ff406aa3
pex-gl/pex-gl
index-browser.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport './index.css';\nimport React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport Viewer from '../Viewer';\n\nclass Editor extends Component {\n render() {\n const { presId } = this.props;\n ...
javascript
edit
0
2
mit
da2614a96f6e78133ae6e7441557a470dc27fde0
jacobwindsor/pathway-presenter,jacobwindsor/pathway-presenter
src/components/Editor/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar replace = require( \"../src/str-replace\" );\n\nmodule.exports = {\n replaceAll: function( assert ) {\n var actual = replace.all( \"/\" ).from( \"/home/dir\" ).to( \"\\\\\" );\n var expected = \"\\\\home\\\\dir\";\n assert...
javascript
edit
0
1
mit
cc43c6c9e5be06cd77a26015e519f72ae4f3e918
FagnerMartinsBrack/str-replace
test/replace.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\nvar loadTemplate = require('../loadTemplate')\n\nvar getRepository = require('./getRepository')\n\nfunction UploadEndpoint(req, res, next) {\n\n var repo = getRepository(req)\n\n repo.post(req.body, 'application/rdf+xml', (err, ...
javascript
edit
0
2
bsd-2-clause
16479fe5e89eb332f015eaba6344140142a5959f
ICO2S/sbolstack-api,ICO2S/sbolstack-api,ICO2S/sbolstack-api
lib/endpoint/UploadEndpoint.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nexport class Tabs {\n initEventListeners () {\n this.loadTab()\n $('.nav-tabs a').on('click', $.proxy(this.changeTab, this))\n }\n\n changeTab (event) {\n let $current = $(event.currentTarget)\n /* if the browser supports...
javascript
edit
0
3
mit
d6761e50b6285b3ba0d7371a61be6712cdc6fac3
sumocoders/Framework,jonasdekeukelaere/Framework,sumocoders/Framework,jonasdekeukelaere/Framework,jonasdekeukelaere/Framework,sumocoders/Framework,sumocoders/Framework,jonasdekeukelaere/Framework
src/SumoCoders/FrameworkCoreBundle/Resources/assets/js/Framework/Tabs.js
rejected_duplicate
Near-duplicate of sample 83124
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\nmodule.exports = function (grunt) {\n // Show elapsed time at the end\n require('time-grunt')(grunt);\n // Load all grunt tasks\n require('load-grunt-tasks')(grunt);\n\n grunt.initConfig({\n jshint: {\n optio...
javascript
edit
0
1
mit
6bce932ca8d3b10cfa00231f0719c92262282dc9
hakatashi/japanese.js,hakatashi/japanese.js
Gruntfile.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// @flow\nimport { PureComponent } from 'react'\nimport Lowlight from 'react-lowlight'\nimport js from 'highlight.js/lib/languages/javascript'\n\nimport type { Children } from 'react'\n\ntype Props = {\n className:string,\n children: ...
javascript
edit
null
null
mit
ccc12a7dae4b01674f9bc76efaefef5f901852e2
izumin5210/OHP,izumin5210/OHP
src/components/preview/Code.js
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { combineReducers } from 'redux'\n\nimport counter from './counter'\n\nconst reducer = combineReducers({\n counter\n})\n\nexport default reducer\n\n```\n\nApply this change: Put the todos reducer into the root reducer" }, { ...
javascript
edit
0
0
mit
1d16098e3bba07210d0e561124a67a0c1c2b139c
RSS-Dev/live-html,epicsharp/react-boilerplate,epicsharp/react-boilerplate,RSS-Dev/live-html
src/reducers/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Audio from './specimens/Audio';\nimport Code from './specimens/Code';\nimport Color from './specimens/Color';\nimport Html from './specimens/Html';\nimport Hint from './specimens/Hint';\nimport Image from './specimens/Image';\nim...
javascript
edit
0
0
bsd-3-clause
abec1e3b7b21eb8a7fc4ca301050f5703c3b61d7
interactivethings/catalog,interactivethings/catalog,interactivethings/catalog,interactivethings/catalog
src/DefaultSpecimens.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = function(grunt) {\n 'use strict';\n\n // Project configuration.\n grunt.initConfig({\n\n pkg: grunt.file.readJSON('package.json'),\n\n // Task configuration.\n aws: grunt.file.readJSON('.aws-deploy.json'),\n...
javascript
edit
0
1
mit
2bbe6c91c53b871e6c2aad0b3c26508db3a0cf3f
gamekeller/next,gamekeller/next
Gruntfile.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar Mocha = require('mocha');\nvar colors = require('colors');\nvar build = require('./build.js');\nvar mocha = new Mocha({ui: 'bdd', reporter: 'list'});\n\nmocha.addFile('test/test-optipng-path.js');\n\nmocha.run(funct...
javascript
edit
0
2
mit
59195df3b093746478e0077bddbc913ebb63cb45
jmnarloch/optipng-bin,imagemin/optipng-bin,inversion/optipng-bin
pre-build.js
rejected_duplicate
Near-duplicate of sample 91027
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * Copyright (c) Ajay Sreedhar. All rights reserved.\n *\n * Licensed under the MIT License.\n * Please see LICENSE file located in the project root for more information.\n */\n\n'use strict';\n\nconst loadTasks = require('load-gru...
javascript
edit
0
1
mit
56abe6dc632ece6f1cb2518f654c6da499798a28
ajaysreedhar/kongdash,ajaysreedhar/kongdash,ajaysreedhar/kongdash
Gruntfile.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = function (grunt) {\n\n require('load-grunt-tasks')(grunt);\n\n grunt.initConfig({\n\n handlebars: {\n\n compile: {\n\n options: {\n amd: ['handlebars', 'handleba...
javascript
edit
0
1
mit
3ab63bdd39ba71a9ad8a7cd0dbb768dc26daec64
neogeek/nodejs-starter-kit
Gruntfile.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst zipFileName = 'extension.zip';\nmodule.exports = function (grunt) {\n\tgrunt.initConfig({\n\t\tpkg: grunt.file.readJSON('package.json'),\n\t\twebstoreUpload: {\n\t\t\taccounts: {\n\t\t\t\tdefault: {\n\t\t\t\t\tcli_auth: true, // e...
javascript
edit
0
1
mit
0cfe946a2394d1f3def3c55763b856c15ab29892
sindresorhus/refined-github,busches/refined-github,jgierer12/refined-github,busches/refined-github,sindresorhus/refined-github,jgierer12/refined-github
Gruntfile.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = function(grunt) {\n\n // load grunt tasks from package.json\n require('load-grunt-tasks')(grunt);\n\n // Project configuration.\n grunt.initConfig({\n\n clean: {\n dist: [\n 'dist',\n 'robert/*...
javascript
edit
0
1
mit
1d7088cfae8aa64ff834e1d20911df15af06f745
thusoy/robertblag,thusoy/robertblag,thusoy/robertblag
Gruntfile.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar mongoose, RatSchema, Schema;\n\nmongoose = require( 'mongoose' );\nSchema = mongoose.Schema;\n\nRatSchema = new Schema({\n 'archive': {\n default: false,\n type: Boolean\n },\n 'CMDRname': {\n type: String\n },\n 'crea...
javascript
edit
0
2
bsd-3-clause
1e421c03fce6c4b1e167c232838b3273249f0fc9
FuelRats/api.fuelrats.com,FuelRats/api.fuelrats.com,FuelRats/api.fuelrats.com
api/models/rat.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React, {PropTypes} from 'react'\nimport injectSheet from '../../utils/jss'\n\nfunction Iframe({src, sheet: {classes}}) {\n return <iframe src={src} className={classes.iframe} />\n}\n\nIframe.propTypes = {\n src: PropTypes.strin...
javascript
edit
0
1
mit
0e854b660501e3bcdf01071392b9ab0ec8b9a5f0
cssinjs/cssinjs
src/components/Iframe/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react'\nimport ReactDOM from 'react-dom'\nimport { Provider } from 'react-redux'\n\nimport Routes from './routes'\nimport Store from './store'\n\nReactDOM.render(\n <Provider store={Store}>\n <Routes />\n </Provi...
javascript
edit
0
0
mit
b0fc06384fcddaf293c5c9f66b4a49b8f2f7c56b
rhberro/the-react-client,rhberro/the-react-client
app/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\"use strict\";\n\n\nvar Promise = require(\"../../js/debug/bluebird.js\");\nPromise.longStackTraces();\nvar assert = require(\"assert\");\n\ndescribe(\"github276 - stack trace cleaner\", function(){\n specify(\"message with newline ...
javascript
edit
0
1
mit
1433d3379014c115636cf0d472fb085c5397b4a7
tpphu/bluebird,joemcelroy/bluebird,lindenle/bluebird,BigDSK/bluebird,cwhatley/bluebird,avinoamr/bluebird,Wanderfalke/bluebird,tesfaldet/bluebird,paulcbetts/bluebird,timnew/bluebird,techniq/bluebird,robertn702/bluebird,atom-morgan/bluebird,Scientifik/bluebird,perfecting/bluebird,javraindawn/bluebird,RobinQu/bluebird,vla...
test/mocha/github-2xx-76.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar slice = [].slice\n\nexports = function mouseDispatcher(name, fn) {\n return function(x, y) {\n var target = document.elementFromPoint(x, y) || document\n var event = new MouseEvent(name, {\n bubbles: true,\n clientX...
javascript
edit
0
2
unlicense
92334651e178d2760434e8e1923ba691c69f448c
freedraw/core,freedraw/core
src/events/mouse-dispatcher.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar keystone = require('keystone');\nvar Types = keystone.Field.Types;\n\n/**\n * Author Model\n * ==========\n */\nvar Author = new keystone.List('Author');\n\nAuthor.add({\n firstName: { type: Types.Text, initial: true, required: tru...
javascript
edit
0
0
mit
112f786717f405f0b2b708fe67d4b6df780386ea
zharley/papers,zharley/papers
models/Author.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar ping = require(\"../index\");\n\nvar hosts = ['192.168.1.1', 'google.com', 'yahoo.com'];\n\nhosts.forEach(function (host) {\n ping.promise.probe(host)\n .then(function (res) {\n console.log(res);\n })\n ...
javascript
edit
0
1
mit
f768f26e0b1da687a04da7256047d12d34b11f1c
alexgervais/node-ping,danielzzz/node-ping
examples/example2.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*!\n Copyright (C) 2017 Google Inc., authors, and contributors\n Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>\n */\n\n(function (can, GGRC) {\n 'use strict';\n var tpl = can.view(GGRC.mustache_path +\n...
javascript
edit
0
1
apache-2.0
4012357932dc0d9acb17076cd321affa6d94cb81
AleksNeStu/ggrc-core,AleksNeStu/ggrc-core,AleksNeStu/ggrc-core,AleksNeStu/ggrc-core
src/ggrc/assets/javascripts/components/assessment/info-pane/info-pane.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar path = require('path');\nvar webpack = require('webpack');\nvar Clean = require('clean-webpack-plugin');\n\nvar webpackConfig = require(\"./webpack-base-config\");\nwebpackConfig.entry = path.resolve(__dirname, 'src/main.js');\n\nif...
javascript
edit
0
0
bsd-3-clause
2ba85374c28132da84e6f7679bb1bb4f487db14d
flavioribeiro/clappr,clappr/clappr,flavioribeiro/clappr,clappr/clappr,clappr/clappr,flavioribeiro/clappr
webpack.config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\"use strict\";\n\nvar _ = require('mori');\nvar Router = require('react-router');\nvar React = require('react');\nvar mori = require(\"mori\");\nvar UnitCell = require('../board/UnitCell.react.js');\nvar GameStore = require('../../stor...
javascript
edit
0
4
mit
d341843ff99eeb5b3371e8e13420363366f2d8bf
orionsbelt-battlegrounds/frontend,orionsbelt-battlegrounds/frontend,orionsbelt-battlegrounds/frontend
js/components/games/DeployButton.react.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// apikey module validates the apikey argument used in the call. It\n// caches the list of users to make lookups faster.\nmodule.exports = function(users) {\n 'use strict';\n let apikeyCache = require('./apikey-cache')(users);\n ...
javascript
edit
0
4
mit
87a04be5baae1d73c0ad2e490bd305aa127ec44c
materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org
backend/server/apikey.js
rejected_duplicate
Near-duplicate of sample 81948
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nangular.module('toggle-switch', ['ng']).directive('toggleSwitch', function() {\n return {\n restrict: 'EA',\n replace: true,\n scope: {\n model: '='\n },\n template: '<div class=\"switch\" ng-click=\"toggle()\"><div...
javascript
edit
0
2
mit
e2fb55b5ff165df0f58e4cdeffeb1c34f49fe382
JeromeSadou/angular-toggle-switch,cgarvis/angular-toggle-switch,JumpLink/angular-toggle-switch,nilpath/angular-toggle-switch,razvanz/angular-toggle-switch,zachlysobey/angular-toggle-switch,ProtonMail/angular-toggle-switch,nilpath/angular-toggle-switch,JeromeSadou/angular-toggle-switch,chris110408/angular-toggle-switch,...
angular-toggle-switch.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar Backbone = require('backbone');\n\nmodule.exports = Backbone.Model.extend({\n defaults: {\n username: '',\n avatar_url: ''\n },\n\n url: function () {\n return '//' + this.getHost() + '/api/v3/me';\n },\n\n getHost: fu...
javascript
edit
0
2
bsd-3-clause
0222a20e870c475b0d3c979ad3d09d0c0ea69706
CartoDB/cartodb,CartoDB/cartodb,CartoDB/cartodb,CartoDB/cartodb,CartoDB/cartodb
lib/assets/javascripts/dashboard/data/authenticated-user-model.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * NOTE: This file must only use node v0.12 features + ES modules.\n */\n\nimport babel from 'rollup-plugin-babel';\nimport json from 'rollup-plugin-json';\nimport babelrc from 'babelrc-rollup';\n\nconst pkg = require('./package.js...
javascript
edit
0
0
mit
a939f2794cac08ee94baf53c3fe5587b3f122725
alangpierce/decaffeinate,decaffeinate/decaffeinate,alangpierce/decaffeinate,eventualbuddha/decaffeinate,decaffeinate/decaffeinate,alangpierce/decaffeinate,eventualbuddha/decaffeinate
rollup.config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* eslint-disable no-process-env */\n\nexport const NODE_ENV = process.env.NODE_ENV || 'development';\nexport const isDevelopment = () => NODE_ENV === 'development';\nexport const isProduction = () => NODE_ENV === 'production';\n\nexpor...
javascript
edit
0
1
mit
80e664a171286279828e2bb62781a8d5b3c8e881
golmansax/my-site-in-express,golmansax/my-site-in-express
server/config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport commonjs from 'rollup-plugin-commonjs';\nimport babel from 'rollup-plugin-babel';\nimport uglify from 'rollup-plugin-uglify';\nimport replace from 'rollup-plugin-replace';\nimport resolve from 'rollup-plugin-node-resolve';\n\ncon...
javascript
edit
0
0
mit
df4079541ec0ca698bbabedf176b164f25833551
ericvaladas/formwood
rollup.config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar assert = require('assert');\nvar config = require('config');\nvar express = require('express');\nvar mongoose = require('mongoose');\n\nvar db = mongoose.connection;\n\nvar locationSchema = new mongoose.Schema({\n 'category': Strin...
javascript
edit
0
1
mit
3b07035c1790c787899044c44c89b84e048deadd
volontario/volontario-server
server/server.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\ndefine([\n \"text!src/welcome.md\"\n], function(welcomeMessage) {\n var commands = codebox.require(\"core/commands\");\n var dialogs = codebox.require(\"utils/dialogs\");\n var File = codebox.require(\"models/file\");\n\n ...
javascript
edit
0
1
apache-2.0
e2ce6b77eabc0cfabe06e443298734e8629ad8c2
etopian/codebox-package-about,etopian/codebox-package-about,CodeboxIDE/package-about,CodeboxIDE/package-about
src/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n#!/usr/bin/env node --harmony\n\nvar inquirer = require(\"inquirer\");\nvar makeLicense = require(\"./make-license.js\")\n\nconsole.log(\"make-license\");\n\n\nvar questions = [\n {\n type: \"list\",\n name: \"license\",\n mes...
javascript
edit
0
1
mit
124e478cf6849a523910e2bd58d98b8d645bcd43
accraze/make-license,accraze/make-license
src/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// Return Promise\nconst imageMerge = (sources = []) => new Promise(resolve => {\n\t// Load sources\n\tconst images = sources.map(source => new Promise(resolve => {\n\t\tconst img = new Image();\n\t\timg.onload = () => resolve(Object.as...
javascript
edit
0
3
mit
ee50f51a89fc140102d3b6d576762d453443299e
lukechilds/merge-images
src/index.js
rejected_duplicate
Near-duplicate of sample 84755
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* @flow */\nimport './vendor';\nimport ReactDOM from 'react-dom';\nimport routes from './routes';\n\nsetTimeout(() => {\n ReactDOM.render(routes, document.querySelector('#webedit'));\n}, 500);\n\n```\n\nApply this change: Use a dom re...
javascript
edit
0
1
mit
22bab20dd6ef60c7a372257c41d8a026c73b477a
blinkenrocket/webedit-react,blinkenrocket/webedit-react
src/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { certificates, certificatesAsync } from './certificates';\nimport { sign, signAsync } from './sign';\nimport {\n paramsForDetachedSignature,\n paramsForDetachedSignatureAsync,\n} from './params_for_detached_signature';\nimport...
javascript
edit
0
2
mit
5e86a4ba2ebe27b0971d8cb1b569c27dbe3fba37
VMashanov/crypto-pro-provider,VMashanov/crypto-pro-provider
src/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport ReactDOM from 'react-dom';\nimport { BrowserRouter, Route } from 'react-router-dom';\nimport './styles/index.css';\nimport Background from './components/Background';\nimport Footer from './components/F...
javascript
edit
0
0
mit
aabdea65e3187b6b267896464b86333dcc3233d5
ELTCOIN/website
src/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nmodule.exports = function(app) {\n app.service('FriendService', ['$rootScope', '$http', function($rs, $http) {\n let allFriends = {};\n\n let getAllFriends = function(emailOrUsername) {\n return new Promise(...
javascript
edit
0
2
mit
7d299640acbdb594561f493bd78868a5281e7e4d
sendjmoon/GolfFourFriends,sendjmoon/GolfFourFriends
app/angular/services/friend_service.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React, { Component } from 'react'\n\nclass {{file}} extends Component {\n render () {\n return (\n <div className=\"{{file}}\">\n\n </div>\n )\n }\n}\n\nexport default {{file}}\n\n```\n\nApply this change: Add C...
javascript
edit
null
null
isc
445300182d2217a85dbb16ca2cee9522ce2c43a0
tu4mo/teg
templates/react-class/index.js
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```javascript\nwindow.onload = function() {\n d3.json(\"../examples/data/gitstats.json\", function(data) {\n data.forEach(function(d) {\n d.date = new Date(d.date);\n d.name = d.name === \"ashwinraman9\" ? \"aramaswamy\" : d.name;\n }...
javascript
edit
0
2
mit
b3cb93f4b798e08841d9681cf06a783bab62de41
palantir/plottable,gdseller/plottable,jacqt/plottable,danmane/plottable,RobertoMalatesta/plottable,RobertoMalatesta/plottable,iobeam/plottable,gdseller/plottable,iobeam/plottable,NextTuesday/plottable,palantir/plottable,softwords/plottable,palantir/plottable,danmane/plottable,RobertoMalatesta/plottable,NextTuesday/plot...
examples/main-page/main.js
rejected_duplicate
Near-duplicate of sample 103616
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React, { Component, findDOMNode } from 'react';\nimport styles from './GlobalSearch.scss';\n\nexport default class GlobalSearch extends Component {\n render () {\n return (\n <input\n ref='searchBox'\n plac...
javascript
edit
0
1
bsd-3-clause
db8294dc10fb9240bacbdc65e724d884d81b74c7
FiviumAustralia/RNSH-Pilot,FiviumAustralia/RNSH-Pilot,FiviumAustralia/RNSH-Pilot
src/components/GlobalSearch.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nexport default {\n setup,\n};\n\n/**\n * Module dependencies.\n */\n\nimport SequelizeStore from 'koa-generic-session-sequelize';\n// import convert from 'koa-convert';\nimport session from 'koa-generic-session';\n\n/*...
javascript
edit
0
1
mit
6e712d8ded370fea4b7f1a8df6d896a3ae4472c4
HiFaraz/identity-desk
src/authentication/sessions.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport gtr from './global-translation.js'\nimport GraphicsHandler from './graphics-handler.js'\nimport MouseHandler from './mouse-handler.js'\nimport {getIsometricCoordinate} from './isometric-math.js'\n\nconst CONTAINER = document.quer...
javascript
edit
null
null
apache-2.0
6e69926de990faac1132b2f434c493750766b101
drpentagon/isometric-paint,drpentagon/isometric-paint
src/grid-interaction.js
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { getKeys } from 'pmcrypto';\n\nimport { readFileAsString } from '../helpers/file';\n\nconst PRIVATE_KEY_EXPR = /-----BEGIN PGP PRIVATE KEY BLOCK-----(?:(?!-----)[\\s\\S])*-----END PGP PRIVATE KEY BLOCK-----/g;\n\nexport const pa...
javascript
edit
0
2
mit
13351bc9c4dc36a27251ed9147ab35b7c771fce5
ProtonMail/WebClient,ProtonMail/WebClient,ProtonMail/WebClient
packages/shared/lib/keys/keyImport.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Messages from 'ember-cp-validations/validators/messages';\n\nexport default Messages.extend({\n blank: 'Поле не может быть пустым',\n email: 'Значение должно быть адресом электронной почты',\n emailNotFound: 'Адрес не найден',...
javascript
edit
0
0
mit
31488615c3bd0a3b9ae1399c479dee95d503273e
yandex-shri-minsk-2016/yummy-time,yandex-shri-minsk-2016/yummy-time,yandex-shri-minsk-2016/yummy-time
client/app/validators/messages.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nexport default class AutoCompleteSubjects {\n\n constructor(wrapper) {\n this.wrapper = wrapper;\n }\n\n initialize(selector) {\n const $input = this.wrapper.find('input[type=text]');\n const $realInput = t...
javascript
edit
0
1
mit
b791de38894ffa04c66a8c8c7164da1bb3cb4dc6
university-information-system/uis,university-information-system/uis,university-information-system/uis,university-information-system/uis
src/main/resources/static/js/autocomplete-lecturer-for-subject.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React, {Component} from 'react';\nimport Mousetrap from 'mousetrap';\n\nclass StatusBar extends Component {\n\n componentDidMount() {\n Mousetrap.bind(['alt+a'], this.toggleSearchAllWindows);\n }\n\n render() {\n return ...
javascript
edit
0
1
mit
69d8e29ba6c802699c38bec0c9ec65ccdbfa0d95
fewhnhouse/chrome-tab-switcher
src/client/StatusBar.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\"use strict\";\n/*jshint node: true*/\n/*eslint-env node*/\n\nmodule.exports = function (grunt) {\n\n require(\"time-grunt\")(grunt);\n\n // Since the tasks are split using load-grunt-config, a global object contains the configur...
javascript
edit
0
2
mit
878b9eeb01b579bf30ab30d5d8f1e76f34aa4aee
ArnaudBuchholz/gpf-js,ArnaudBuchholz/gpf-js
gruntfile.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar assert = require('chai').assert;\nvar string = require('../../util/string');\n\ndescribe('util/string', function () {\n\tdescribe('#isEmpty', function () {\n\t\tit('should return true', function () {\n\t\t\tassert(true, string.isEmp...
javascript
edit
0
1
mit
fa117ab8cfa2a82fd20ee9312a8719d604dc010b
pmu-tech/grunt-erb
test/util/string.js
rejected_duplicate
Near-duplicate of sample 79456
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst models = require('./models')\nconst Course = models.Course\nconst path = require('path')\nconst url = require('url')\n\nconst uri = url.format({\n pathname: path.join(__dirname, 'data.db'),\n protocol: 'nedb:',\n slashes:...
javascript
edit
0
2
mit
59bdb85cdaa72829024108e3fc1fb71777e389f6
nilenso/dhobi-seva-electron,nilenso/dhobi-seva-electron
persistance.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
5d973ab69edbf2618020bab1b764838f4d17ef47
alex-shnayder/comanche
src/plugins/configure/index.js
rejected_duplicate
Near-duplicate of sample 108331
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n$(function() {\n\n $('form').preventDoubleSubmission();\n $('form').on('submit', function(e){\n $(this).find('button').text('Processing...')\n });\n\n select_profiles_tab_from_url_hash();\n disable_modal_links();\n\n});\n\nfunct...
javascript
edit
0
2
mit
8b153821c3a8348a4a54442af453fd61b6e3d51f
tleish/ruby-prof-rails,tleish/ruby-prof-rails,tleish/ruby-prof-rails
app/assets/javascripts/ruby_prof_rails/home.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar native = require('../build/Release/dhcurve'),\n common = require('./common.js'),\n Promise = require('es6-promises'),\n _ = require('goal');\n\nfunction generateKeyPair() {\n\n}\n\nmodule.exports = _.mixin({\n generateKeyP...
javascript
edit
0
1
mit
c3ebe5ba281de674c18c47130df3aabfac1cd0c8
mbullington/dhcurve
lib/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport resolve from 'rollup-plugin-node-resolve'\nimport minify from 'rollup-plugin-minify-es'\nimport license from 'rollup-plugin-license'\n\nexport default {\n\tinput: 'src/micro-panel-all.js',\n\toutput: [\n\t\t{\n\t\t\tformat: 'iife...
javascript
edit
0
0
unlicense
5a0f409a488a4a5d3fed358fda6f71cd7dc66676
myfreeweb/micro-panel,myfreeweb/micro-panel
rollup.config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar audio = document.getElementById(\"chris\");\n\nfunction pauseChris() {\n\tif (audio.currentTime >= 331000) {\n\t\taudio.pause();\n\t\talert(interval);\n\t}\n}\n\nfunction playChris() {\n\taudio.currentTime = 952;\n\taudio.play();\n\...
javascript
edit
0
2
mit
ac64d509ed40712a7c10c265b642560c0a8a0b6e
nvdaes/nvdaes.github.io,nvdaes/nvdaes.github.io
scripts/chris.js
rejected_duplicate
Near-duplicate of sample 74535
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport {\n SET_RESOURCE,\n MARK_DASHBOARD_DIRTY,\n RESET_RESOURCE_CACHE\n} from './actions';\n\nconst markAllDirty = (keys, state) => {\n const dirty = {};\n\n keys.forEach((key) => {\n dirty[key] = { ...state[key]...
javascript
edit
0
4
mit
8436bfbd641fd92d85116a4f6683d18fc23282a7
nathanhood/mmdb,nathanhood/mmdb
app/common/resourceCache/reducer.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport $ from 'jquery';\n\nexport default class ToggleFeatureNotifier {\n constructor({chromeWrapper}) {\n this._chromeWrapper = chromeWrapper;\n\n this.notify = this.notify.bind(this);\n }\n notify() {\n const optionsUrl = ...
javascript
edit
0
1
isc
9adb52b6fd343ca01b4d706a0b87be7fe09b3e7b
oliverswitzer/wwltw-for-pivotal-tracker,oliverswitzer/wwltw-for-pivotal-tracker
src/content_scripts/pivotal_tracker/view/toggle_feature_notifier.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// This is a manifest file that'll be compiled into application.js, which will include all the files\n// listed below.\n//\n// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,\n// or v...
javascript
edit
0
0
mit
bee4589cdd421a33aad2d5f25fbd97f777bf2e58
timmykat/openeffects.org,timmykat/openeffects.org,timmykat/openeffects.org,ofxa/openeffects.org,timmykat/openeffects.org,ofxa/openeffects.org,ofxa/openeffects.org,ofxa/openeffects.org
app/assets/javascripts/application.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* @flow */\n\nimport { CompositeDisposable } from \"atom\";\nimport ResizeObserver from \"resize-observer-polyfill\";\n\nimport React from \"react\";\n\nimport { reactFactory, OUTPUT_AREA_URI } from \"./../utils\";\nimport typeof store...
javascript
edit
null
null
mit
21cd7291094b7b03a5571287bf3673db3b13006e
nteract/hydrogen,nteract/hydrogen,xanecs/hydrogen,rgbkrk/hydrogen
lib/panes/output-area.js
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar util = require('util');\n\nmodule.exports = function (name, defaultMessage, status) {\n\n util.inherits(Constructor, Error);\n\n return Constructor;\n\n function Constructor (message, code) {\n Error.call(this);\n Error.cap...
javascript
edit
0
3
mit
931fa47355cb7f5d5bce4d77affb7313211ac043
aantthony/errors
base.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n//\n// General\n//\n\n//= require underscore\n//= require underscore.string\n//= require jquery\n//= require angular\n//= require angularytics\n//= require bootstrap-sass-official\n//= require validity\n\n//\n// Angular specific\n//\n\n...
javascript
edit
0
0
mit
c2c520b16f46f94d9b82251b344f0ef7de158903
sprangular/sprangular,sprangular/sprangular,sprangular/sprangular
app/assets/javascripts/sprangular.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n//var Teachers = require('../models/teachers');\n//var TeacherClasses = require('../models/Teacher_classes');\n//var Classes = require('../models/classes');\n//var ClassLessons = require('../models/class_lessons');\n// var Lessons = req...
javascript
edit
0
1
mit
aea4582982e586365f788ed0d886262da7ab325f
Jakeyrob/thumbroll,shanemcgraw/thumbroll,Jakeyrob/thumbroll,absurdSquid/thumbroll,shanemcgraw/thumbroll,shanemcgraw/thumbroll,absurdSquid/thumbroll,Jakeyrob/thumbroll
server/controllers/students.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\"use strict\";\nvar Anyfetch = require('anyfetch');\n\nmodule.exports.get = function get(req, res, next) {\n var anyfetchClient = new Anyfetch(req.accessToken.token);\n anyfetchClient.getDocuments({\n fields: 'facets.providers'\n ...
javascript
edit
null
null
mit
c488bae8b97a3a9207d1aa0bbea424c92d493df0
AnyFetch/companion-server
lib/handlers/providers/index.js
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// This is a manifest file that'll be compiled into including all the files listed below.\n// Add new JavaScript/Coffee code in separate files in this directory and they'll automatically\n// be included in the compiled file accessible f...
javascript
edit
0
0
mit
cbeaf1c062caa2262ab7dc0553069f8708a0d472
cyclestreets/cyclescape,auto-mat/toolkit,cyclestreets/cyclescape,auto-mat/toolkit,cyclestreets/cyclescape
app/assets/javascripts/application.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// This is a manifest file that'll be compiled into application.js, which will include all the files\n// listed below.\n//\n// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,\n// or v...
javascript
edit
0
0
mit
7db436acaad26f648be77abea89f726e2677434f
joshmcarthur/inquest,joshmcarthur/inquest
app/assets/javascripts/application.js
rejected_duplicate
Near-duplicate of sample 85414
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nVtTracker.DistrictModalController = Ember.ObjectController.extend({\n needs: ['index'],\n\n modalTitle: function() {\n if (this.get('isNew')) {\n return 'New District';\n } else {\n return 'Edit District';\n }\n }....
javascript
edit
0
2
mit
ae50e4f695c7f68ce839332cc548696d1692e5c0
bfcoder/vt-ht-tracker,bfcoder/vt-ht-tracker,bfcoder/vt-ht-tracker
app/assets/javascripts/districts/controllers/district_modal_controller.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*\n * Copyright 2014 BlackBerry Ltd.\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 * htt...
javascript
edit
0
3
apache-2.0
3af0ea079e7710f16599de9565c9c9f07f666d4c
blackberry/webworks-gui,blackberry-webworks/webworks-gui,blackberry/webworks-gui,blackberry-webworks/webworks-gui
lib/ui/views/targetSelector.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n$(\"div.entry\").live('click', function( e ) {\n var item = $(e.target).closest('.entry');\n\n if (!item.find('.entry-actions span.google-plus').length) {\n item.find(\".entry-actions span.tag\").after($('<span class=\"link google-...
javascript
edit
0
2
mit
b28a11df9533f9fa91945264bb34e51ea977c417
felipeelias/reader_to_plus
javascripts/extension.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar _ = require('lodash')\nvar assert = require('assert')\n\nmodule.exports = function () {\n var log = []\n\n return {\n write: function () {\n log.push(_(arguments).toArray().join(' '))\n },\n read: function () { retur...
javascript
edit
0
2
mit
994654819859ddb726b92d0f4d571bb75bbcbe91
testdouble/teenytest,testdouble/teenytest
test/support/logger-factory.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * Admin Controller\n * @module AdminController\n */\nvar rfr = require('rfr');\nvar Joi = require('joi');\nvar Boom = require('boom');\n\nvar Utility = rfr('app/util/Utility');\nvar Service = rfr('app/services/Service');\n\nvar lo...
javascript
edit
0
3
mit
faa007e535289ee435df9ec4a92f3b229bbd9227
nus-mtp/worldscope,nus-mtp/worldscope,nus-mtp/worldscope,nus-mtp/worldscope
app_server/app/controllers/AdminController.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar Node = require('../node');\n\nvar TYPE = 'source';\nvar PARAMS = {\n query: Node.PARAM.STRING()\n};\n\nvar Source = Node.create(TYPE, PARAMS);\n\nmodule.exports = Source;\nmodule.exports.TYPE = TYPE;\nmodule.expo...
javascript
edit
0
2
bsd-3-clause
d01f5941fa4a017d3b4434ba2a4f58b98364ba43
CartoDB/camshaft
lib/node/nodes/source.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nAV.ComparisonSetCollection = Backbone.Collection.extend({\n url: AV.URL('set.json'),\n updateURL: function() {\n this.url = AV.URL('set.json');\n }\n});\n\n```\n\nApply this change: Remove .json from the set url" }, ...
javascript
edit
0
1
bsd-3-clause
a5f3d39929b4886ae28711d607c05275bfab74ca
Swarthmore/juxtaphor,Swarthmore/juxtaphor
dev/_/components/js/comparisonSetCollection.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function () {\n 'use strict';\n\n /* ngInject */\n function RowDetail($compile) {\n // TODO: Animate the row appearing\n var template = [\n '<tr ng-show=\"visible\"><td colspan=\"2\">',\n ...
javascript
edit
0
3
apache-2.0
521c7e73b09e71d34d8966f35952cb26ce010bd0
azavea/nih-wayfinding,azavea/nih-wayfinding
src/nih_wayfinding/app/scripts/views/routing/directions/row-detail-directive.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar config = {\n clientId: '',\n clientSecret: '',\n hashTag: 'ruisrock2014' \n}\n\nvar getIg = function(){\n var ig = require('instagram-node').instagram();\n ig.use({ client_id: config.clientId,\n client_secret: config....
javascript
edit
0
2
mit
616729f152d9f513bf02ad3b0f41a21fbc89761a
futurice/festapp-server,futurice/sec-conference-server,0is1/festapp-server,futurice/sec-conference-server
lib/instagram.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n#! /usr/bin/env node\nconst args = require('./args') // TODO\nconst path = require('path')\nconst { graphql: config } = require(path.join(process.cwd(), 'package.json'))\nconst { sendQuery, readFile, checkPath, REPL } = require('./src/a...
javascript
edit
0
1
mit
98148ba689955cd9f07a55e6360207f613ceb6aa
mfix22/graphicli
gest.js
accepted
null
true
[ { "role": "user", "content": "Write javascript code for the following: Add initial global JS solution for problem 6" }, { "role": "assistant", "content": "var _ = require('lazy.js');\n\nvar square = function square (n) {\n return Math.pow(n, 2);\n};\n\nvar sum = function sum (n, m) {\n return ...
javascript
new_file
0
1
mit
4505a470372a5d4df66d6945039000a3da9f0358
jrhorn424/euler,jrhorn424/euler
006.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar app = angular.module('plugD', [\n 'angularUtils.directives.dirPagination'\n]);\n\napp.controller(\"PluginController\",function(){\n});\n\napp.directive(\"pluginList\", ['$http',function($http){\n return {\n restrict:\"E...
javascript
edit
null
null
bsd-2-clause
dbe567f5ce926657ecca94b48ab32666777ecffd
vivekkrish/jbrowse-registry,GMOD/jbrowse-registry,vivekkrish/jbrowse-registry,vivekkrish/jbrowse-registry,GMOD/jbrowse-registry,GMOD/jbrowse-registry,GMOD/jbrowse-registry
app/js/app.js
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\n/**\n * Imports.\n */\nconst express = require('express');\n\n/**\n * Initialize Express.\n */\nconst app = express();\n\n// Setup locals variable in config/index.js.\napp.locals = require('./config');\n\n// Configure e...
javascript
edit
0
1
mit
bb6c53c86c6f9aabf70fd3cd70a885f2083ed790
DoSomething/blink,DoSomething/blink
app.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// Copyright 2011 The Closure Library Authors. All Rights Reserved.\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...
javascript
edit
0
1
apache-2.0
548752eb79981114a01b764924be0eb1843ef68d
ikabirov/closure-library,Medium/closure-library,redforks/closure-library,platinumpixs/google-closure-library,redforks/closure-library,google/closure-library,ChadKillingsworth/closure-library,teppeis/closure-library,codyebberson/closure-library,google/closure-library,google/closure-library,ikabirov/closure-library,teppe...
closure/goog/disposable/idisposable.js
rejected_duplicate
Near-duplicate of sample 78339
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n#!/usr/bin/env node\n\n/*\n* SQL API loader\n* ===============\n*\n* node app [environment] \n*\n* environments: [development, test, production]\n*\n*/\nvar _ = require('underscore');\n\n// sanity check arguments\nvar ENV = process.argv...
javascript
edit
0
1
bsd-3-clause
650756852a9ff4011afe2e662495066fdce079e8
calvinmetcalf/CartoDB-SQL-API,dbirchak/CartoDB-SQL-API,calvinmetcalf/CartoDB-SQL-API,calvinmetcalf/CartoDB-SQL-API,CartoDB/CartoDB-SQL-API,dbirchak/CartoDB-SQL-API,dbirchak/CartoDB-SQL-API,CartoDB/CartoDB-SQL-API,calvinmetcalf/CartoDB-SQL-API,dbirchak/CartoDB-SQL-API
app.js
rejected_duplicate
Near-duplicate of sample 89346
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nexport default [\n 'config',\n 'hs.common.laymanService',\n function (config, laymanService) {\n const me = this;\n\n function getItemsPerPageConfig(ds) {\n return angular.isDefined(ds.paging) &&\n angular.isDefined...
javascript
edit
0
4
mit
61eb38969435727ff074b1a95253b577c88c4dfb
hslayers/hslayers-ng,hslayers/hslayers-ng,hslayers/hslayers-ng,hslayers/hslayers-ng
common/endpoints/endpoints.service.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Vue from 'vue';\nimport Vuex from 'vuex';\nimport component from '~/reports/components/modal_open_name.vue';\nimport { mountComponentWithStore } from 'spec/helpers/vue_mount_component_helper';\n\ndescribe('Modal open name', () =>...
javascript
edit
0
1
mit
c3352aa312e75183b629c3fb7b5948ccf4c2d080
stoplightio/gitlabhq,stoplightio/gitlabhq,mmkassem/gitlabhq,stoplightio/gitlabhq,mmkassem/gitlabhq,mmkassem/gitlabhq,stoplightio/gitlabhq,mmkassem/gitlabhq
spec/javascripts/reports/components/modal_open_name_spec.js
accepted
null
true