messages
listlengths
2
2
language
stringclasses
8 values
prompt_type
stringclasses
2 values
lint_errors
int64
0
129
⌀
cyclomatic_complexity
int64
0
32
⌀
license
stringclasses
7 values
commit
stringlengths
40
40
repos
stringlengths
5
116k
new_file
stringlengths
4
220
status
stringclasses
6 values
error
stringlengths
26
74
⌀
is_valid_syntax
bool
2 classes
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react'\nimport AceEditor from 'react-ace'\nimport 'brace/mode/yaml'\nimport 'brace/theme/github'\n\nimport './ConfigEditor.scss'\n\nexport default function ConfigEditor(props) {\n return (\n <AceEditor mode=\"yaml...
javascript
edit
0
1
mit
922f03384944e0c3e6664ffae4ed476efbfccc67
slice/dogbot,sliceofcode/dogbot,slice/dogbot,slice/dogbot,sliceofcode/dogbot
web/src/components/ConfigEditor.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport DS from 'ember-data';\n\nexport default DS.Transform.extend({\n deserialize(serialized) {\n const date = moment(serialized).format('DD MMMM YYYY');\n \n return date;\n },\n\n serialize(deserialized) {\n const date = ...
javascript
edit
0
1
mit
9d10a9713b0adb5c93d7e1eacc6c67230ab9fbac
msm-app-devs/intranet-app,msm-app-devs/intranet-app
app/transforms/isodate.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar events = [];\nvar requestInterval = 5000;\n\nwindow.addEventListener('click', function(e) {\n e = event || window.event;\n\n events.push(processEvent(e));\n});\n\nvar processEvent = function(e) {\n\n // Event...
javascript
edit
0
2
mit
0714797f65ce689f5bad2066e82ebd162dc598a7
Sextant-WDB/sextant-ng
app/public/sa-tracking.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Ember from 'ember';\n\n/* global moment */\nexport default Ember.Route.extend({\n model: function() {\n return this.store.filter('raid', { 'current': true }, function(raid) {\n return moment(raid.get('date')).subtract(6,...
javascript
edit
0
1
mit
ab4c92508eefce6ed440c18a0cbaebd5aa29b731
kelsin/coretheloothound,kelsin/coretheloothound
app/routes/raids/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { DefaultDOMElement } from 'substance'\n\nconst EMPTY_JATS = `<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE article PUBLIC \"-//NLM//DTD JATS (Z39.96) Journal Archiving DTD v1.0 20120330//EN\" \"JATS-journalarchiving.dtd\...
javascript
edit
0
1
mit
49f1853be6835fd0a4ec8d8689141723b608c21c
substance/texture,substance/texture
src/article/converter/util/createEmptyJATS.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport test from 'ava';\nimport { search, searchContinuously } from '..';\n\ntest('it makes a request', t =>\n search()\n .then(items => {\n t.true(Array.isArray(items));\n })\n);\n\ntest('it subscribes to a stream', t =>\n ...
javascript
edit
0
1
mit
5a5973935137f7b666f87b56d45922a20f5b9915
maxdavidson/apartmentor
test/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*\n *\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements. See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership. The ASF...
javascript
edit
0
2
apache-2.0
d84f0a56b4c0827e1fc296b400e5170b98518496
corimf/cordova-mobile-spec,ollie314/cordova-mobile-spec,apache/cordova-mobile-spec,apache/cordova-mobile-spec,apache/cordova-mobile-spec,ollie314/cordova-mobile-spec,ollie314/cordova-mobile-spec,corimf/cordova-mobile-spec,ollie314/cordova-mobile-spec,apache/cordova-mobile-spec,corimf/cordova-mobile-spec,ollie314/cordov...
www/autotest/tests/bridge.tests.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar chai = require('chai');\nchai.should();\n// var expect = chai.expect;\n// var should = chai.should();\n\nvar jetconfig = require('../index.js');\n\n\ndescribe('#get()', function (){\n it(\"should return a default value\", functio...
javascript
edit
0
1
apache-2.0
0724d01d034a3eb3ea8e0158058d366d87b1fbc7
shakefu/jetconfig
test/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport {dest} from 'vinyl-fs';\nimport drFrankenstyle from './dr-frankenstyle';\n\nconst argv = require('yargs')\n .usage('Usage: dr-frankenstyle <output-dir>')\n .example('dr-frankenstyle my_assets_dir')\n .demand(1, 'Please provide...
javascript
edit
0
0
mit
9811418bc7619f10522342b8eb0c7b360f1cb7c2
bartvde/dr-frankenstyle,pivotal-cf/dr-frankenstyle
src/cli.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// Copyright (c) Rotorz Limited. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root.\n\nimport given from \"mocha-testdata\";\nimport should from \"should\";\n\nimport webreed from \"../src\";\...
javascript
edit
0
1
mit
5f5ebcfc868e1c3690890a11cc16be94c41e9919
webreed/webreed,webreed/webreed
test/setup.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React, { Component } from 'react';\nimport ReactDOM from 'react-dom';\n\nimport { Board } from './containers';\nimport './styles/app.scss';\n\nclass App extends Component {\n render() {\n return <Board />;\n }\n}\n\nReactDOM...
javascript
edit
0
1
mit
ec512a22188219c4538b39b46def0eb1e14fcbb9
inooid/react-redux-card-game,inooid/react-redux-card-game
src/app.js
accepted
null
true
[ { "role": "user", "content": "Write javascript code for the following: Add the tentative schema for the redux store" }, { "role": "assistant", "content": "// Tentative schema for the overall app store:\n//\n// \n// interface Media {\n// id: string;\n// kind: 'audio' | 'video';\n// ...
javascript
new_file
0
1
apache-2.0
db269537a14f6c3be00d681d9e8c5666cf5806af
jitsi/jitsi-meet-react,jitsi/jitsi-meet-react,jitsi/jitsi-meet-react,jitsi/jitsi-meet-react
src/reducers/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * autocompleteme.js\n * Chrome extension to remove autocomplete=off attributes from all elements on the page.\n *\n * https://github.com/martone/autocompleteme\n * Andy Martone (<EMAIL>)\n */\n(function() {\n var elements = docum...
javascript
edit
0
2
mit
f6b99704f6a48eabc2622cf020813023413a7fa3
martone/autocompleteme
autocompleteme.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport url from \"url\";\nimport mixin from \"merge-descriptors\";\nimport wildcard from \"wildcard-named\";\n\nexport default {\n callbacks : {},\n\n when( uri ) {\n return new Promise( resolve => {\n th...
javascript
edit
0
4
mit
87a28a1e8466e46129a746691763a2e2642e3fa8
Bartozzz/crawlerr
src/routing/router.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Dependency from './Dependency'\n\n\nexport default class Composer extends Dependency {\n\n default()\n {\n this.dependencyName = 'PHP Composer'\n this.required = true\n }\n\n mac() {\n this.depend...
javascript
edit
0
1
mit
ddedb7d7f88553dfbfcbd494996c2b451997fac2
baublet/lagniappe,baublet/lagniappe
app/lagniappe/dependencies/Composer.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport EventEmitter from 'events';\nimport { RESIZE } from '../constants/AppConstants';\n\nclass RendererStore extends EventEmitter {\n\n constructor(...args) {\n super(...args);\n\n this.data = {\n width: 0,\n height: ...
javascript
edit
0
1
mit
243696b8ca118b29a2af95070b613800738b9cc2
edwinwebb/pixi-seed,edwinwebb/pixi-seed,edwinwebb/three-seed
app/stores/RendererStore.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\n/* jasmine specs for controllers go here */\n\ndescribe('RootCtrl', function(){\n var scope;\n\n beforeEach(module('swiftBrowser.controllers'));\n\n beforeEach(inject(function($controller) {\n scope = {}...
javascript
edit
0
1
apache-2.0
35ca195d9e207577f92e128a70f835949023b29c
mindware/swift-browser,mgeisler/swift-browser,mindware/swift-browser,zerovm/swift-browser,zerovm/swift-browser,mgeisler/swift-browser
test/unit/controllersSpec.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\nvar sdk = require('flowxo-sdk'),\n service = require('../');\n\nvar credentials = {};\ntry {\n credentials = require('../credentials');\n} catch(e) {}\n\nbeforeEach(function() {\n this.service = service;\n this.creden...
javascript
edit
0
1
mit
68b599377c3906ea90c14957a5601cd57d6276a5
flowxo/generator-flowxo
app/templates/_bootstrap.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nexport Tuttolino404 from \"./tuttolino-404.png\"\nexport TuttolinoCompetitor from \"./tuttolino-competitor.svg\"\nexport TuttolinoErrorMobile from \"./tuttolino-error-mobile.png\"\nexport TuttolinoError from \"./tuttolino-error.svg\"\ne...
javascript
edit
null
null
mit
dfaa44f8e585ca1faa67214d8991d7e710e1e20f
tutti-ch/react-styleguide,tutti-ch/react-styleguide
src/styles/Illustrations/assets/tuttolino/index.js
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar Reflux = require('reflux');\nvar objectAssign = require('object-assign');\n\nvar MessageActions = require('./MessageActions');\n\nvar _stack = []; // Container for the each object of message\nvar _counter = 0;\n/**\n * Registry of a...
javascript
edit
null
null
mit
88fcafc8839304ca8bc3a77f74f25d5542cec342
srph/reflux-flash
src/MessageStore.js
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```javascript\n//\n// See https://github.com/jenkinsci/js-builder\n//\nvar builder = require('@jenkins-cd/js-builder');\n\n// Disable js-builder based linting for now.\n// Will get fixed with https://github.com/cloudbees/blueocean/pull/55\nbuilder.lin...
javascript
edit
0
0
mit
40e9232ec550c322153e4212344b9d35722cd2e7
jenkinsci/blueocean-plugin,jenkinsci/blueocean-plugin,jenkinsci/blueocean-plugin,ModuloM/blueocean-plugin,kzantow/blueocean-plugin,kzantow/blueocean-plugin,tfennelly/blueocean-plugin,alvarolobato/blueocean-plugin,alvarolobato/blueocean-plugin,kzantow/blueocean-plugin,tfennelly/blueocean-plugin,tfennelly/blueocean-plugi...
blueocean-web/gulpfile.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar ancestralBlueprint = require('../../lib/ancestral-blueprint');\n\nmodule.exports = {\n description: 'Generates a route and registers it with the router',\n\n availableOptions: [\n {\n name: 'type',\n type: String,\n ...
javascript
edit
0
0
mit
8ab80e4c485ae19ad63704e3096492dc9426457f
ntippie/ember-cli-emblem,Vestorly/ember-cli-emblem,Vestorly/ember-cli-emblem,ntippie/ember-cli-emblem
blueprints/route/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*global Ember */\n\n// ensure we don't share routes between all Router instances\nvar Router = Ember.Router.extend();\n\nRouter.reopen({\n //location: 'history', // use HTML5 History API instead of hash-tag based URLs\n rootURL: ...
javascript
edit
0
1
mit
5313eb7bce2ebb1b8dae3c2359cc6520465e01c1
TryGhost/Ghost,TryGhost/Ghost,TryGhost/Ghost
ghost/admin/router.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { SET_SEARCH_TERM } from './actions'\n\nconst DEFAULT_STATE = {\n searchTerm: ''\n}\n\nconst setSearchTerm = (state, action) => {\n const newState = {}\n Object.assign(newState, state, {searchTerm: action.searchTerm})\n}\n\nco...
javascript
edit
0
2
mit
953a4fff7b28fb74e3ce862b480d89a675c32e12
galaxode/ubiquitous-eureka,galaxode/ubiquitous-eureka
js/reducers.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\njest.mock('../../internal/ESIAgent');\n\nconst Api = require('../../Api');\n\nlet api = new Api();\nlet agent = api._esiAgent;\n\nafterEach(() => {\n agent.__reset();\n});\n\ntest('Killmail.get', () => {\n agent.__expectRoute('get_kil...
javascript
edit
0
1
bsd-3-clause
54599eb33226086a80b233fc896785a55b16fa40
lhkbob/eve-swagger-js,lhkbob/eve-swagger-js
src/api/__tests__/Killmail.spec.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = {\n options: {\n dir: 'dist',\n commit: true,\n push: true,\n message: 'Built %sourceName% from commit %sourceCommit% on branch %sourceBranch%'\n },\n pages: {\n options: {\n remote: 'https://gith...
javascript
edit
0
0
mit
66cc7304305fc034074b0c63a64437af2c9e3c0d
lewisnyman/lewisnyman.co.uk-source,lewisnyman/lewisnyman.co.uk-source,lewisnyman/lewisnyman.co.uk-source
grunt/buildcontrol.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar ContribBox = React.createClass({\n render: function() {\n return <div />;\n }\n});\n\nvar SearchBox = React.createClass({\n getInitialState: function () {\n console.log(this.props);\n return {\n ...
javascript
edit
0
2
apache-2.0
dcfd13351222b68e3647657ed3874ce189c45676
ssut/namuhub,ssut/namuhub,ssut/namuhub
namuhub/static/namuhub.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react'\nimport { Text } from 'react-native'\nimport { withNavigation } from 'react-navigation'\n\nimport ShuttleOverview from './ShuttleOverview'\nimport ScrollCard from '../common/ScrollCard'\nimport Touchable from '...
javascript
edit
0
1
mit
ce6c6d06b71fad04f7909ddf0d5a3fc7f13318cb
UCSD/campus-mobile,UCSD/campus-mobile,UCSD/now-mobile,UCSD/now-mobile,UCSD/campus-mobile,UCSD/campus-mobile,UCSD/campus-mobile,UCSD/campus-mobile,UCSD/now-mobile
app/views/shuttle/ShuttleCard.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react'\n\nfunction Footer() {\n return (\n <div className=\"fix-bottom\">\n <p className=\"tc\">All rigths reserved</p>\n <style jsx>{`\n .fix-bottom {\n position: relative;\n bo...
javascript
edit
0
1
mit
0fce5bee89ea2a81a295a80531d42fef675dd02b
efleurine/alumnus
components/Footer.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar spawn = require('child_process').spawn;\nvar path = require('path');\n\nmodule.exports = function (options) {\n options = options || {};\n options.url = options.url || 'http://nodejs.org';\n options.name = options.name || '...
javascript
edit
0
7
mit
7074918dbe7a713898a670b5e3f67441a89ac11a
creationix/topcube,creationix/topcube,creationix/topcube
topcube.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar AlexaAppServer = require('alexa-app-server');\n\n\n\nvar MpdInterface = require('./apps/alexa-mpd-control/mpd_interface');\nvar mpd = new MpdInterface();\n\n\nAlexaAppServer.start({\n// server_root:__dirname, // Path to root\...
javascript
edit
0
3
mit
046d25e5a18444acc9f745054b772ab5c316717d
guikubivan/alexa-mpd-control,guikubivan/alexa-mpd-control
server.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar http = require('http')\n , url = require('url')\n , express = require('express')\n , rest = express()\n , path = require('path')\n , server = http.createServer(rest)\n , ap = require('argparse').ArgumentParser\n , colors = re...
javascript
edit
0
2
apache-2.0
60a48a5a5cd959efccc3dfcbed735a1e8fc5e47a
appium/appium,appium/appium,appium/appium,appium/appium,appium/appium,Sw0rdstream/appium,appium/appium
server.js
accepted
null
true
[ { "role": "user", "content": "Write javascript code for the following: Fix exporting pass & shaders" }, { "role": "assistant", "content": "export * from './controls/FirstPersonControls';\nexport * from './controls/OrbitControlsModule';\nexport * from './pass/index';\nexport * from './shader/inde...
javascript
new_file
0
0
mit
b72629954037ab28368c4c9cbea7006bcf9f86f2
WhitestormJS/whs.js,WhitestormJS/whs.js
src/extras/index.js
rejected_duplicate
Near-duplicate of sample 98527
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nfunction runTest()\n{\n FBTest.sysout(\"issue5525.START\");\n FBTest.openNewTab(basePath + \"script/breakpoints/5525/issue5525.html\", function(win)\n {\n FBTest.openFirebug();\n FBTest.enableScriptPanel()\n ...
javascript
edit
0
1
bsd-3-clause
d419673a07062390431dd7ff4f5ac526b1c252bd
firebug/tracing-console,firebug/tracing-console
tests/content/script/breakpoints/5525/issue5525.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nmodule.exports = key => ({\n [`${key}-day`]: {\n label: 'Day'\n },\n [`${key}-month`]: {\n label: 'Month'\n },\n [`${key}-year`]: {\n label: 'Year'\n }\n});\n\n```\n\nApply this change: Add autocomplete t...
javascript
edit
0
1
mit
22b0f1d407cceb44c7736dea7f42c9aa88d72f74
UKHomeOfficeForms/hof-bootstrap,UKHomeOfficeForms/hof,UKHomeOfficeForms/hof-bootstrap,UKHomeOfficeForms/hof
components/date/fields.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nString.prototype.replaceAll = function(search, replace)\n{\n //if replace is not sent, return original string otherwise it will\n //replace search string with 'undefined'.\n if (replace === undefined) {\n return this.toS...
javascript
edit
0
4
mit
3bf56355eee5d7091f1596f10efa404af28bbeb9
NunoPinheiro/commitissuelinker,NunoPinheiro/commitissuelinker
src/handleGitHub.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Item from \"./graphql/types/item\"\nimport Update from \"./graphql/types/update\"\nimport { makeExecutableSchema } from \"graphql-tools\"\n\nconst RuneScapeQuery = `\n type RuneScapeQuery {\n items: [Item]\n item(id: Int!)...
javascript
edit
0
1
mit
72d15313741b7c06721c9f5638674e43a9a52cb6
DevNebulae/ads-pt-api
src/graphql.js
rejected_duplicate
Near-duplicate of sample 82545
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// Zepto.js\n// (c) 2010-2013 Thomas Fuchs\n// Zepto.js may be freely distributed under the MIT license.\n\n;(function(){\n // __proto__ doesn't exist on IE<11, so redefine\n // the Z function to use object extension inste...
javascript
edit
0
3
mit
d9cc719e8c1eeb1290ba5df986d1b89050a3b12e
xuechunL/zepto,chenruixuan/zepto,zhengdai/zepto,SallyRice/zepto,JimmyVV/zepto,huaziHear/zepto,wyfyyy818818/zepto,yinchuandong/zepto,wanglam/zepto,nerdgore/zepto,zhangbg/zepto,mmcai/zepto,Genie77998/zepto,rayrc/zepto,wubian0517/zepto,alatvanas9/zepto,mscienski/zepto,webcoding/zepto,wubian0517/zepto,GerHobbelt/zepto,huaz...
src/ie.js
rejected_duplicate
Near-duplicate of sample 74732
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nfunction findStations(callback) {\n $.ajax({\n type: 'GET',\n url: 'http://localhost:8765/mockdata/veturilo.xml',\n dataType: 'xml',\n success: function (xml) {\n var stations = [];\n ...
javascript
edit
0
4
mit
af23ebea023e24437457d534c58f45e8ceffaeba
janisz/bikeday,janisz/bikeday,Freeport-Metrics/bikeday
src/js/veturilo.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n$(function(){\n var url = 'https://storage.googleapis.com/rutracker-rss.appspot.com/category_map.json';\n var url = 'https://dl.dropboxusercontent.com/u/660127/category_map.json'; // TODO\n\n $.getJSON(url, {}, function(data...
javascript
edit
0
1
apache-2.0
93f5f27fd4c56ffc69be517f0fed021e9fcaefd8
notapresent/rutracker_rss,notapresent/rutracker_rss,notapresent/rutracker_rss
static/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* global test, expect */\nimport fakeEvents from './fakeEvents';\n\ntest('calling fakeEvents should generate an array containing btw. 60 and 120 objects', () => {\n\texpect(fakeEvents.length)\n\t\t.toBeGreaterThanOrEqual(60);\n\texpect...
javascript
edit
0
1
mit
7492a1890a216e2cc72a57d7736932c490c21461
vogelino/design-timeline,vogelino/design-timeline
src/redux/state/fakeEvents.test.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* @flow */\n\ntype Callback = (now: number) => void;\n\nexport default function(): Object {\n let allCallbacks = [];\n let prevTime = 0;\n\n const now = () => prevTime;\n\n const raf = (cb: Callback) => {\n allCallbacks.push(cb)...
javascript
edit
null
null
mit
c136fb4191a5e9e5052ef778dce1fb0bad785b2a
keyanzhang/react-motion,threepointone/react-motion,chenglou/react-motion,BenoitZugmeyer/preact-motion,BenoitZugmeyer/preact-motion,chenglou/react-motion,threepointone/react-motion,keyanzhang/react-motion
test/createMockRaf.js
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar http = require(\"http\");\n\nfunction onRequest(request, response) {\n\tconsole.log(\"Request received.\");\n\tresponse.writeHead(200, {\"Content-Type\": \"text/plain\"});\n\tresponse.write(\"Hello World\");\n\tresponse.end();\n}\n\...
javascript
edit
0
1
apache-2.0
feb0ecd14c35c5694803db38e0d1f5644a5b7d3d
Rholais/txfs,Rholais/txfs,Rholais/txfs
src/node/server.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict'\n\n// Chess board\n// Write a program that creates a string that represents an 8×8 grid, using newline characters to separate lines. At each position of the grid there is either a space or a “#” character. The characters sh...
javascript
edit
0
0
mit
fdc725c500c0fe63a930dcee19d87bfc2831933a
OperationCode/eloquent-js
Chapter-2-Exercises/jjhampton-ch2-ex3-chessboard.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { Map } from 'immutable';\nimport { FILTER_MARKETS, UPDATE_MARKETS, SERVER_DATA_ACTIVE_SYMBOLS } from '../_constants/ActionTypes';\n\nconst initialState = new Map({\n active: [],\n query: '',\n shownMarkets: [],\n});\n\n...
javascript
edit
0
4
mit
85d62a542b153523eba52ccf0b869b7c8fd64c87
nuruddeensalihu/binary-next-gen,binary-com/binary-next-gen,nazaninreihani/binary-next-gen,nazaninreihani/binary-next-gen,nazaninreihani/binary-next-gen,qingweibinary/binary-next-gen,binary-com/binary-next-gen,qingweibinary/binary-next-gen,nuruddeensalihu/binary-next-gen,qingweibinary/binary-next-gen,binary-com/binary-n...
app/_reducers/marketsReducers.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function(karma, window) {\n var createClojureScriptTest = function (tc, runnerPassedIn) {\n return function () {\n if (goog && goog.dependencies_ && goog.dependencies_.nameToPath) {\n for(var namespace in goog.dependenc...
javascript
edit
0
5
mit
077e0ac53af3506f4d11d8bd157bf9de89761a9e
circleci/karma-cljs.test
lib/adapter.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar config = module.exports;\n\nconfig[\"Browser tests\"] = {\n rootPath: \"../\",\n environment: \"browser\",\n extensions: [require(\"buster-coffee\")],\n sources: [\n \"test/ext/*.js\",\n \"dist/caman.full.js\"\n ],\n tes...
javascript
edit
0
0
bsd-3-clause
65e00c407ad40f279ca25aa0f54b1a753a5f593f
prashen/CamanJS,purposeindustries/CamanJS,mcanthony/CamanJS,mcanthony/CamanJS,arschmitz/caman-dist-only,meltingice/CamanJS,ckfinder/CamanJS,rn2dy/CamanJS,rn2dy/CamanJS,purposeindustries/CamanJS,mcanthony/CamanJS,meltingice/CamanJS,prashen/CamanJS,rn2dy/CamanJS,meltingice/CamanJS,ckfinder/CamanJS,prashen/CamanJS,ckfinde...
test/buster.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport UserPicture from './User/UserPicture';\n\nexport default class UserList extends React.Component {\n\n render() {\n const users = this.props.users.map((user) => {\n return (\n <a data-us...
javascript
edit
0
1
mit
58366dc23b55c0256633d1d9abb4fba7e475a13c
crow-misia/crowi,crowi/crowi,crowi/crowi,crow-misia/crowi,crowi/crowi
resource/js/components/UserList.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React, { Component } from 'react';\nimport {\n StyleSheet,\n Text,\n View\n} from 'react-native';\n\nexport default class SearchScreen extends Component {\n render() {\n return (\n <View style={styles.container}>\n ...
javascript
edit
0
1
mit
3c5cf643d11d44ede31f212a5af683b4785d13bc
msanatan/GitHubProjects,msanatan/GitHubProjects,msanatan/GitHubProjects
app/scenes/SearchScreen/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar wifiManager = require('../../lib/WifiManager');\nvar hb = require('handlebars');\nvar fs = require('fs');\nconst path = require('path');\n\nvar subApp = function(){\n this.staticFolder = \"assets\";\n\n this.setup = function(route...
javascript
edit
0
4
isc
f320562f84d8e23d8d78d7a01ab8464f69b135fc
headlessPi/headlessPi,headlessPi/headlessPi,headlessPi/headlessPi
apps-builtin/wifi-setup/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react';\n\nimport toVoid from '../utils/to-void';\n\nconst fake = {\n __fake__: true,\n publish: toVoid,\n subscribe: toVoid,\n unsubscribe: toVoid\n};\n\nconst { Provider, Consumer } = React.createContext(fake);\...
javascript
edit
0
1
mit
f030906e54e9e569b7a12a05d369746a5fc7024f
hms-dbmi/higlass,hms-dbmi/higlass,hms-dbmi/higlass,hms-dbmi/4DN_matrix-viewer,hms-dbmi/4DN_matrix-viewer,hms-dbmi/higlass,hms-dbmi/4DN_matrix-viewer
app/scripts/hocs/with-pub-sub.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst logger = require('logger');\nconst ctRegisterMicroservice = require('ct-register-microservice-node');\n\nclass UserService {\n static async getEmailById(userId) {\n logger.info('Get user by user id', userId);\n try {\n ...
javascript
edit
0
5
mit
7069dd332481662adc09252ce65c9796c2d6abed
gfw-api/fw-teams,gfw-api/fw-teams
app/src/services/user.service.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst repl = require(\"repl\");\n\nclass REPL {\n constructor(options) {\n this.env = options.env;\n this.plugins = options.plugins;\n }\n\n start(done) {\n this.replServer = repl.start({\n prompt: \"Embark (\" + this.e...
javascript
edit
0
1
mit
f7c280b693f36b1a797bec51eea6eb139d5f1bc1
iurimatias/embark-framework,iurimatias/embark-framework
lib/dashboard/repl.js
rejected_duplicate
Near-duplicate of sample 78055
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar through = require('through')\n , loader = require('./loader')\n , async = require('async');\n\nfunction angularify() {\n var buf = '';\n\n return through(function(chunk) {\n buf += chunk.toString();\n }, fun...
javascript
edit
0
2
mit
812910a3916d73e4728bc483312bebe900b1d99c
evanshortiss/angularify
lib/wrapper.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// Dependencies\nvar ParseMethod = require(\"./method\")\n , Enny = require(\"enny\")\n , Ul = require(\"ul\")\n , Typpy = require(\"typpy\")\n ;\n\nmodule.exports = function (_input, instName) {\n var input = Ul.clone(_input);\n...
javascript
edit
0
6
mit
790c99ea4cca145835d067ffe7c4052122c596fd
jillix/engine-builder
lib/composition/parsers/flow-component.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar _kmq = _kmq || [];\n$(function() {\n\n // No need to do a timeout for default case, if KM times out just don't show ad.\n _kmq.push(function(){\n // Set up the experiment (this is the meat and potatoes)\n var type = KM.ab(...
javascript
edit
0
1
mit
afcbd88b545b285128ac7f8d4a8cff605edfb3d2
jeromelebleu/foundation-sites,Owlbertz/foundation,BerndtGroup/TBG-foundation-sites,IamManchanda/foundation-sites,DaSchTour/foundation-sites,jaylensoeur/foundation-sites-6,colin-marshall/foundation-sites,Owlbertz/foundation,zurb/foundation,abdullahsalem/foundation-sites,aoimedia/foundation,dragthor/foundation-sites,zurb...
docs/assets/js/docs.ad.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nclass CircularBuffer {\n\n constructor(length){\n this.buffer = new Int32Array(length);\n this.maxSize = length;\n this.currentSize = 0;\n this.openIndex = 0;\n this.lastFilledIndex = -1;\n }\n\n get(index){\n retur...
javascript
edit
0
1
mit
4c0fbae213ddc64943b361ab000c63866a4c4863
krauzer/canvas-sandbox,krauzer/canvas-sandbox
app/assets/javascripts/utilities/circular_buffer.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n$(document).ready(function() {\n $(\"[data-behaviour='highlight'] tbody tr a\").click(function(){\n $(this).closest(\"tr\").addClass(\"is-selected\").siblings().removeClass(\"is-selected\");\n });\n\n $(\"[data-behaviour='submit...
javascript
edit
0
1
mit
8edfdd9a267d30f667348f4806b330bb9b038b5b
airslie/renalware-core,airslie/renalware-core,airslie/renalware-core,airslie/renalware-core
app/assets/javascripts/renalware/behaviours.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*\n\tMIT License http://www.opensource.org/licenses/mit-license.php\n\tAuthor Simen Brekken @simenbrekken\n*/\nvar DefinePlugin = require(\"./DefinePlugin\");\n\n\n\tthis.keys = Array.isArray(keys) ? keys : Object.keys(keys);\n\tthis.d...
javascript
edit
0
5
mit
062daaef9cbe78a5f37874237c4f2e36dd43d3e4
SimenB/webpack,webpack/webpack,SimenB/webpack,ts-webpack/webpack,SimenB/webpack,webpack/webpack,NekR/webpack,rlugojr/webpack,ts-webpack/webpack,webpack/webpack,webpack/webpack,g0ddish/webpack,jescalan/webpack,ts-webpack/webpack,jescalan/webpack,jescalan/webpack,NekR/webpack,g0ddish/webpack,SimenB/webpack,g0ddish/webpac...
lib/EnvironmentPlugin.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nconst has = require('has');\n\nfunction collectPoolStatus(stats, { type, host, pool }) {\n const poolStats = [\n ['_allConnections', 'open'],\n ['_freeConnections', 'sleeping'],\n ['_acquiringCon...
javascript
edit
0
2
mit
616e06a8e1adacc5738f3ce67c234af20e87e4c0
godmodelabs/flora-mysql,godmodelabs/flora-mysql
lib/connection-status.js
rejected_duplicate
Near-duplicate of sample 77462
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar config = {\n\t// For internal server or proxying webserver.\n\turl : {\n\t\tconfiguration : 'up/configuration',\n\t\tupdate : 'up/world/{world}/{timestamp}',\n\t\tsendmessage : 'up/sendmessage'\n\t},\n\n\t// For proxying webserver t...
javascript
edit
0
0
apache-2.0
e9dc82402fac6e17478f00fff1259b0b3bfe5197
webbukkit/dynmap,webbukkit/dynmap,mg-1999/dynmap,KovuTheHusky/dynmap,webbukkit/dynmap,webbukkit/dynmap
web/config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nDashboard.TickerWidget = Dashboard.Widget.extend({\n sourceData: \"\",\n\n templateName: 'ticker_widget',\n classNames: ['widget', 'widget-ticker'],\n\n widgetView: function() {\n var widget = this;\n\n \treturn this._super().re...
javascript
edit
0
1
mit
27029f760791efd65c0008a9bdc4e13830d4cc1d
ShiftForward/mucuchies,kloudsio/mucuchies,ShiftForward/mucuchies,kloudsio/mucuchies
app/models/widgets/ticker_widget.js
rejected_duplicate
Near-duplicate of sample 106040
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nlet experiments = {\n BUILD_INSTRUMENTATION: symbol('build-instrumentation'),\n INSTRUMENTATION: symbol('instrumentation'),\n ADDON_TREE_CACHING: symbol('addon-tree-caching'),\n};\n\nObject.freeze(experiments);\n\nmo...
javascript
edit
0
0
mit
a24950265ff87515da7bc6a0b306f8569707cabc
gfvcastro/ember-cli,rtablada/ember-cli,calderas/ember-cli,elwayman02/ember-cli,thoov/ember-cli,asakusuma/ember-cli,HeroicEric/ember-cli,ef4/ember-cli,kanongil/ember-cli,twokul/ember-cli,kategengler/ember-cli,kanongil/ember-cli,Turbo87/ember-cli,twokul/ember-cli,buschtoens/ember-cli,akatov/ember-cli,mike-north/ember-cli...
lib/experiments/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * Keep live updates from service.\n * @constructor\n */\ng.live = function() {\n var socket;\n\n /**\n * Open the websocket connection.\n */\n var open = function() {\n if (g.isEncrypted()) {\n s...
javascript
edit
0
2
mit
e9483a99ec4ff2b46df813cb3425cc2ef11d07ef
gansoi/gansoi,gansoi/gansoi,gansoi/gansoi,gansoi/gansoi
web/g-live.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nangular.module('scratchApp')\n .controller('ContractCtrl', function ($scope, $http, $location) {\n var serversPublicKey,\n wallet,\n paymentTx,\n refundTx,\n signedT...
javascript
edit
0
1
mit
729e714347790520e0543d144704113f64aa167e
baleato/bitcoin-hackathon
app/scripts/controllers/contract.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar l10n_file = __dirname + '/../l10n/commands/say.yml';\nvar l10n = require('../src/l10n')(l10n_file);\nvar CommandUtil = require('../src/command_util').CommandUtil;\nexports.command = function(rooms, items, players, npcs, Commands) {\...
javascript
edit
0
3
mit
412466f9d11f229d5a118028292c69c2b1b3814f
seanohue/ranviermud,seanohue/ranviermud,shawncplus/ranviermud
commands/say.js
rejected_duplicate
Near-duplicate of sample 88378
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nangular\n\t.module('ngSharepoint')\n\t.provider('$sp', function() {\n\t\tvar siteUrl = '';\n\t\tvar connMode = 'JSOM'; //possible values: JSOM, REST\n\t\tvar token = '';\n\t\tvar autoload = true;\n\n\t\treturn {\n\t\t\tsetSiteUrl: funct...
javascript
edit
0
3
apache-2.0
0ddb22881705535445aec6258da604278cac75e1
maxjoehnk/ngSharepoint
src/modules/ngSharepoint/services/spProvider.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar _ = require('lodash');\n\nvar all = {\n // define nodejs runtime environment\n server: {\n port : process.env.NODE_IP || 8080, //OPENSHIFT_NODEJS_PORT\n host : process.env.NODE_PORT || '127.0.0...
javascript
edit
0
0
mit
cfd13a2df960ac6421d27651688b6dbd5f5f1030
markoch/dev-news-os,markoch/dev-news-os
server/config/environment/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nrequire(\"babel-polyfill\");\n\n/**\n * Configure babel using the require hook\n * More details here: https://babeljs.io/docs/setup/#babel_register\n */\nrequire(\"babel-core/register\")({\n only: /src/,\n presets: [\"es2015\", \"...
javascript
edit
0
0
mit
4adeb41a333ad6218fc8450b765c2afa33b20238
alexchiri/minimalistic-blog,alexchiri/minimalistic-blog,alexchiri/minimalistic-blog
babel.server.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar app = require('app');\nvar BrowserWindow = require('browser-window');\n\nvar mainWindow = null;\n\napp.on('window-all-closed', function() {\n if (process.platform != 'darwin')\n app.quit();\n});\n\napp.on('ready', function() {\n...
javascript
edit
0
2
mit
491dce4e0a8e839ef375017ff77669fb06e482f4
greenheartgames/greenworks,greenheartgames/greenworks,greenheartgames/greenworks,greenheartgames/greenworks,greenheartgames/greenworks
samples/electron/start.js
rejected_duplicate
Near-duplicate of sample 76525
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { assignPolyfill as assign } from '..';\n\nQUnit.module('Ember.assign');\n\nQUnit.test('Ember.assign', function() {\n let a = { a: 1 };\n let b = { b: 2 };\n let c = { c: 3 };\n let a2 = { a: 4 };\n\n assign(a, b, c, a2);\n\...
javascript
edit
0
1
mit
0f1db78ce5ed9370482331b8668aa7057384935c
amk221/ember.js,qaiken/ember.js,nickiaconis/ember.js,patricksrobertson/ember.js,tildeio/ember.js,thoov/ember.js,amk221/ember.js,bantic/ember.js,nickiaconis/ember.js,jherdman/ember.js,mixonic/ember.js,xiujunma/ember.js,jasonmit/ember.js,thoov/ember.js,mfeckie/ember.js,csantero/ember.js,jherdman/ember.js,sandstrom/ember....
packages/ember-utils/tests/assign_test.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar path = require('path');\nvar loader = path.join(__dirname, '..', '..', 'index.js');\nvar __DEV__ = process.env.NODE_ENV !== 'production';\n\nmodule.exports = {\n entry: path.join(__dirname, 'index.js'),\n output: {\n path: path...
javascript
edit
0
0
apache-2.0
9bdf5459f7001353f779980ffabc24c470179cdc
boopathi/image-size-loader
example/webpack.config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { HeaderService } from \"./header.service.js\";\n\nexport class HeaderTemplate {\n static update(render) {\n const start = Date.now();\n\n /* eslint-disable indent */\n render`\n <nav class=\"fl...
javascript
edit
0
0
mit
e35d2be4041b62ede59bbfd3ff9ea4016fc3582e
albertosantini/node-conpa,albertosantini/node-conpa
src/client/app/components/header/header.template.js
rejected_duplicate
Near-duplicate of sample 98461
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst moment = require('moment');\n\nconst plannedWork = require('./plannedWork');\nconst { baseURL, routes, imgMap } = require('./constants.js');\n\nfunction buildLink({ route, datetime }) {\n const date = moment(datetime);\n return ...
javascript
edit
0
1
mit
4886982fa7108c0cc5aa68c43f75e8cbc3b1903e
geoffreyyip/mta-dashboard,geoffreyyip/mta-dashboard
getPlannedWork/crawler.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function () {\n 'use strict';\n\n angular\n .module('fusionSeedApp.services.landingPage', [])\n .factory('LandingPageService', LandingPageService);\n\n function LandingPageService($log, Orwell, $window, ConfigService) {\n '...
javascript
edit
0
3
apache-2.0
1c2e692e5770bdf66f6801f90a6f7cbcaf048969
AlexKolonitsky/lucidworks-view,AlexKolonitsky/lucidworks-view,lucidworks/lucidworks-view,lucidworks/lucidworks-view,lucidworks/lucidworks-view,AlexKolonitsky/lucidworks-view
client/assets/js/services/LandingPageService.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\n\nfunction isNothing(subject) {\n return (undefined === subject) || (null === subject);\n}\n\n\nfunction isObject(subject) {\n return ('object' === typeof subject) && (null !== subject);\n}\n\n\nfunction isNaNConstant...
javascript
edit
0
4
mit
5953b9dc1aeb7edc6b8b524870e70b6af83fb776
cesarmarinhorj/js-yaml,doowb/js-yaml,djchie/js-yaml,jonnor/js-yaml,pombredanne/js-yaml,jonnor/js-yaml,jonnor/js-yaml,deltreey/js-yaml,nodeca/js-yaml,prose/js-yaml,denji/js-yaml,vogelsgesang/js-yaml,vogelsgesang/js-yaml,bjlxj2008/js-yaml,minj/js-yaml,bjlxj2008/js-yaml,denji/js-yaml,djchie/js-yaml,nodeca/js-yaml,doowb/js...
test/support/assert-paranoid-equal/utilities.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n/* Configurable navbar\n *\n * The following variables can be declared in a conf file\n * disable - Boolean\n * search - Boolean\n * navigation - Boolean\n * notifier - Boolean\n * template - String\n *\n * Exam...
javascript
edit
0
1
mit
e8b67dea98931e469a1b1d741abbfbed73b2ec23
fbaumgardt/arethusa,alpheios-project/arethusa,fbaumgardt/arethusa,PonteIneptique/arethusa,PonteIneptique/arethusa,fbaumgardt/arethusa,alpheios-project/arethusa,Masoumeh/arethusa,Masoumeh/arethusa,alpheios-project/arethusa,latin-language-toolkit/arethusa,latin-language-toolkit/arethusa
app/js/arethusa.core/directives/arethusa_navbar.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nclass THREENode extends NIN.Node {\n constructor(id, options) {\n if(!('render' in options.outputs)) {\n options.outputs.render = new NIN.TextureOutput();\n }\n super(id, {\n inputs: options.inputs,\n outputs: o...
javascript
edit
0
4
apache-2.0
c3907ccc5aa74b7186f020fa3671a2e66f2ef683
ninjadev/nin,ninjadev/nin,ninjadev/nin
nin/dasBoot/THREENode.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*!\n{\n \"name\": \"CSS Transform Style preserve-3d\",\n \"property\": \"preserve3d\",\n \"authors\": [\"denyskoch\", \"aFarkas\"],\n \"tags\": [\"css\"],\n \"notes\": [{\n \"name\": \"MDN Docs\",\n \"href\": \"https://devel...
javascript
edit
0
5
mit
92aed6c12583ca9f56dd4bc703193beffed84da5
Modernizr/Modernizr,Modernizr/Modernizr
feature-detects/css/transformstylepreserve3d.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*\n Block Quote\n*/\n\nSirTrevor.Blocks.Quote = (function(){\n\n var template = _.template([\n '<blockquote class=\"st-required st-text-block\" contenteditable=\"true\"></blockquote>',\n '<label class=\"st-input-label\"> <%= i1...
javascript
edit
0
1
mit
53ff5ddff1c8e95f74405cbbc557e02574c6557e
Shorthand/sir-trevor-js,Shorthand/sir-trevor-js,Shorthand/sir-trevor-js
src/blocks/block-quote.js
rejected_duplicate
Near-duplicate of sample 84521
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nlet React = require(\"react\")\nlet cx = require(\"classnames\")\nlet {errorList, sizeClassNames, formGroupCx, label} = require(\"../util.js\")\nlet {div, input} = React.DOM\n\nexport default class extends React.Component {\n\n static ...
javascript
edit
0
1
mit
ff334dfa7d1687a923f476db1166acd47e7ee059
frig-js/frig,TouchBistro/frig,frig-js/frig,TouchBistro/frig
src/javascripts/frigging_bootstrap/components/timepicker.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\ndescribe('The List Page', () => {\n beforeEach(() => {\n cy.visit('/list.html')\n })\n it('successfully loads', () => {})\n context('navbar', () => {\n it(\"the 'Home' link works\", () => {\n cy.contains('Home').click({fo...
javascript
edit
null
null
mit
a96ef266eaf8fe8b1248fe69a6cd51d790f170c0
itzsaga/slack-list
cypress/integration/list_spec.js
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```javascript\nfunction NoteApplication (author) {\n\tthis.author = author;\n\tthis.notes = [];\n\n\tthis.create = function(note_content) {\n\t\tif (note_content.length > 0) {\n \t\tthis.notes.push(note_content);\n \t\treturn \"You have crea...
javascript
edit
null
null
mit
4ea7ec98ad1b490b3a031f183dab0efc2feaa1d7
Mayowa-Adegbola/NotesApp,Mayowa-Adegbola/NotesApp
NotesApp.js
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```javascript\nwebui.directive(\"textarea\", function() {\n return {\n restrict: \"E\",\n link: function(scope, element) {\n element.attr(\n \"placeholder\",\n element.attr(\"placeholder\").replace(/\\\\n/g, \"\\n\")\n )...
javascript
edit
0
3
mit
f6793e5fb331d1091702aa2055cb801e133c387f
ziahamza/webui-aria2,ghostry/webui-aria2,ghostry/webui-aria2,kuoruan/webui-aria2,kuoruan/webui-aria2,ziahamza/webui-aria2
js/directives/textarea.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { spawn } from \"cross-spawn\";\nimport path from \"path\";\nimport process from \"process\";\nimport commandExists from \"command-exists\";\n\nmodule.exports = function (name) {\n // Check if docker is installed first\n comman...
javascript
edit
0
2
mit
16d9bbe0e294d817a6cc6ce8b9db64049b317f75
TrueCar/gluestick,TrueCar/gluestick,TrueCar/gluestick
src/commands/dockerize.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nwindow._trackJs = {\n onError: function(payload, error) {\n\n function itemExistInList(item, list) {\n for (var i = 0; i < list.length; i++) {\n if (item.indexOf(list[i]) > -1) {\n ...
javascript
edit
0
3
apache-2.0
ebeeb1a8a0871467b9b7597c3bd82b8b67829364
borisyankov/binary-static,borisyankov/binary-static,einhverfr/binary-static,animeshsaxena/binary-static,brodiecapel16/binary-static,einhverfr/binary-static,animeshsaxena/binary-static,brodiecapel16/binary-static,tfoertsch/binary-static,tfoertsch/binary-static,massihx/binary-static,massihx/binary-static,brodiecapel16/bi...
src/javascript/binary/components/trackjs_onerror.js
rejected_duplicate
Near-duplicate of sample 78553
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nwindow._trackJs = {\n onError: function(payload, error) {\n\n function itemExistInList(item, list) {\n for (var i = 0; i < list.length; i++) {\n if (item.indexOf(list[i]) > -1) {\n ...
javascript
edit
0
3
apache-2.0
3bd270f245b5e98a4784548d40959337dd050625
animeshsaxena/binary-static,tfoertsch/binary-static,einhverfr/binary-static,einhverfr/binary-static,tfoertsch/binary-static,borisyankov/binary-static,einhverfr/binary-static,massihx/binary-static,animeshsaxena/binary-static,animeshsaxena/binary-static,brodiecapel16/binary-static,brodiecapel16/binary-static,borisyankov/...
src/javascript/binary/components/trackjs_onerror.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport Relay from 'react-relay/classic';\n\nconst exampleQuery = (slug) => `query {\n organization(slug: \"${slug}\") {\n auditEvents(first: 500) {\n edges {\n ...
javascript
edit
0
2
mit
ee0a0699a9804c485e464f521e5c95d506d0fa29
buildkite/frontend,fotinakis/buildkite-frontend,buildkite/frontend,fotinakis/buildkite-frontend
app/components/audit_log/Export.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport {find, isEqual, uniqueId} from 'lodash';\nimport getOptionLabel from './getOptionLabel';\n\n/**\n * Filter out options that don't match the input string or, if multiple\n * selections are allowed, that have already been selected....
javascript
edit
0
6
mit
db978592bc49e4a1e2ea6a4ebb1921c2d2439db0
ericgio/react-bootstrap-typeahead,Neophy7e/react-bootstrap-typeahead,ericgio/react-bootstrap-typeahead,ericgio/react-bootstrap-typeahead,Neophy7e/react-bootstrap-typeahead,ericgio/react-bootstrap-typeahead,Neophy7e/react-bootstrap-typeahead
src/getFilteredOptions.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function() {\n const mode = window.location.href.match(/mode=([a-z0-9\\-]+)\\&?/i);\n const DIST = false;\n const isDev = mode && mode[1] === 'dev';\n const cs = isDev ? 'CesiumUnminified/Cesium.js' : 'Cesium/Cesium.js';\n const o...
javascript
edit
0
4
bsd-2-clause
3eed8db76786b5c9441cd76aadbf4f94c61ac421
openlayers/ol-cesium,openlayers/ol-cesium,oterral/ol3-cesium,oterral/ol3-cesium,openlayers/ol3-cesium,openlayers/ol3-cesium
examples/inject_ol_cesium.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* globals desc:false, task: false, complete: fase, jake: false */\n(function (desc, task, complete, jake) {\n \"use strict\";\n\n desc('The default task. Runs tests.');\n task('default', ['tests'], function () {\n });\n\n ...
javascript
edit
0
1
mit
df5964d6f790513e9b3a8fd9311c1eec13b96b92
ustyme/site-manager,jolira/site-manager,ustyme/site-manager
Jakefile.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 = 'buffer';\nvar PARAMS = {\n source: Node.PARAM.NODE,\n radio: Node.PARAM.NUMBER\n};\n\nvar Buffer = Node.create(TYPE, PARAMS);\n\nmodule.exports = Buffer;\nmodule.expor...
javascript
edit
0
1
bsd-3-clause
aa32378fd966b72ec91fa440ba68c079c98e303b
CartoDB/camshaft
lib/node/buffer/buffer.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar mapSketcherClient;\njQuery(function() {\n jQuery.getJSON('/config.json', function(config) {\n config.hostname = window.location.hostname\n mapSketcherClient = new MapSketcherClient(config);\n mapSketcherClient.launch();\n ...
javascript
edit
0
5
mit
246e6599f31ef09f5de204f87d6b10d28e15bc58
sagmor/mapsketcher
public/js/application.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nangular.module('app').config(function ($translateProvider) {\n $translateProvider.useStaticFilesLoader({\n prefix: '/locale/locale-',\n suffix: '.json'\n });\n\n $translateProvider.preferredLanguage('fr_FR');\n});\n```\n\nApply...
javascript
edit
0
1
mit
6e5d872baaa1e4e72bfe95a32e2ebf55ea594dde
BenjaminBini/dilemme,BenjaminBini/dilemme
public/app/config/translationConfig.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\"use strict\";\n\nconst electron = require(\"electron\");\nconst {app} = electron;\nconst {Menu} = electron;\nconst {BrowserWindow} = electron;\n\nmodule.exports.setDevMenu = function () {\n var devMenu = Menu.buildFromTemplate([{\n...
javascript
edit
0
1
mit
af6a7b20d7332817af15c891d307ff262d886158
petschekr/Chocolate-Shell,petschekr/Chocolate-Shell
core/devMenu.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { createSelector } from 'reselect';\n\nimport ActionTypes from 'constants/ActionTypes';\nimport ModalTypes from 'constants/ModalTypes';\nimport modalIsOpenSelectorFactory from 'selectors/factories/modalIsOpenSelectorFactory';\nim...
javascript
edit
0
1
mit
85a03e97fa83d4fbb37c598db4272a5865b90520
fastmonkeys/respa-ui
app/selectors/containers/reservationDeleteModalSelector.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n#!/usr/bin/node\n\nvar convert = require('../'),\n localProj = require('local-proj'),\n fs = require('fs'),\n geojson = JSON.parse(fs.readFileSync(process.argv[2])),\n mtl = process.argv[3],\n mtllibs = process.argv.slice...
javascript
edit
0
2
isc
982fb15759b79e9ec91799c0b841fdd65cf8ccc1
perliedman/geojson2obj
examples/cli.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict'\n\nlet imponderous = require('../../index')\n\nclass User extends imponderous.Model {\n static get schema () {\n return {\n name: {\n index: true\n },\n email: {\n unique: true,\n req...
javascript
edit
0
1
mit
7003aada95cfe06d1a89843de4c09d1e4ceae3f4
benhutchins/imponderous
test/models/user.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar helpers = require('./../helpers.js')\n\nmodule.exports = {\n 'Test Sending Message' : function (browser) {\n helpers.setupTest(browser)\n helpers.enterText('textarea._1eY_aSnr3MDhZqacV8fugZ', 'test', browser)\n browser.end...
javascript
edit
0
1
mit
063bf15bfa562f3708f8608c92095010b12180d5
TheLocust3/Drift-Nightwatch
tests/chat_tests.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n#!/usr/bin/env node\n'use strict';\n\nvar net = require('net');\nvar fs = require('fs');\nvar eslint = require('eslint');\n\nvar engine = new eslint.CLIEngine();\nvar formatter = engine.getFormatter('compact');\n\nvar server = net.creat...
javascript
edit
0
1
mit
2445cb9f2d7c216c357943932074c5b23b99ead3
mantoni/eslint_d.js,mantoni/eslint_d.js,clessg/eslint_d.js,ruanyl/eslint_d.js
bin/eslint_d.js
accepted
null
true