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\nconst makeDancer = (mass, x, y, z) => ({ mass, position: [x, y, z] });\nconst dancerData = [\n makeDancer(100, -3, 4, -8),\n makeDancer(200, -2, -1, -12),\n makeDancer(700, 3, 2, -8),\n makeDancer(1200, 1, -2, -7),\n];\n\nmodule.exp...
javascript
edit
0
1
mit
4297ec2bcefba6cad2cce80bc4fef4a740081db5
elliotaplant/celestial-dance,elliotaplant/celestial-dance
src/js/Helpers/dancerData.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport rgba from './rgba';\nimport {\n ART\n} from 'react-native';\n\nlet {\n LinearGradient,\n RadialGradient\n } = ART;\n\nlet fillPatterns = {};\nlet fillReg = /^url\\(#(\\w+?)\\)$/;\n\nfunction isGradient(obj) {\n ret...
javascript
edit
0
9
mit
4350deed70609577bf99bdd5ffaa7a8aa18983e1
msand/react-native-svg,msand/react-native-svg,react-native-community/react-native-svg,magicismight/react-native-svg,react-native-community/react-native-svg,magicismight/react-native-svg,msand/react-native-svg,magicismight/react-native-svg,react-native-community/react-native-svg,udfalkso/react-native-svg,udfalkso/react-...
lib/fillFilter.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar Q = require('q');\nvar _ = require('lodash');\nvar path = require('path');\nvar fs = require('fs');\nvar sass = require('node-sass');\n\n// Compile a SASS file into a css\nfunction renderSASS(input, output) {\n var d = Q.defer();...
javascript
edit
0
3
apache-2.0
75ccbc817164d660af9bc3755f5dc93b15c9a1c8
GitbookIO/plugin-styles-sass
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar util = require('util');\nvar extend = require('extend');\n\nfunction RippleError(code, message) {\n switch (typeof code) {\n case 'object':\n extend(this, code);\n break;\n case 'string':\n this.result ...
javascript
edit
0
10
isc
ab1c4090229c470ca81db5e02a30836f3d9277a6
ripple/ripple-lib,wilsonianb/ripple-lib,darkdarkdragon/ripple-lib,ripple/ripple-lib,ripple/ripple-lib,darkdarkdragon/ripple-lib,ripple/ripple-lib,wilsonianb/ripple-lib,darkdarkdragon/ripple-lib,wilsonianb/ripple-lib
src/js/ripple/rippleerror.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { request } from '../../http';\n\nexport function follow(userId) {\n return request('/rel/follow/' + userId, { method: 'POST' });\n}\n\nexport function unfollow(userId) {\n return request('/rel/unfollow/' + userId, { method: 'P...
javascript
edit
0
1
mit
02a3c6c15e54a930af8e5c974e5e937f28c6123b
garawaa/lichobile,garawaa/lichobile,btrent/lichobile,btrent/lichobile,btrent/lichobile,garawaa/lichobile,btrent/lichobile
project/src/js/ui/user/userXhr.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst loaders = require('loaders');\nmodule.exports = {\n\tcomponents: 'lib/components/**/[A-Z]*.js',\n\tdefaultExample: true,\n\twebpackConfigFile: false,\n\twebpackConfig: {\n\t\tmodule: {\n\t\t\tloaders: loaders.all,\n\t\t},\n\t},\n}...
javascript
edit
0
0
mit
df7f96d266fe24dfd7ba807b1decc5b01afe2992
sapegin/react-styleguidist,styleguidist/react-styleguidist,styleguidist/react-styleguidist,bluetidepro/react-styleguidist,styleguidist/react-styleguidist,sapegin/react-styleguidist
examples/basic/styleguide.config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport { TabNavigator } from 'react-navigation';\nimport BaseNavigator from './BaseNavigator'\n\n\nconst ReactovaNavigator = (navigationSchema,LoadingScreen) => {\n\tconst routerRouteConfig = {\n\t\tLoading: ...
javascript
edit
0
3
mit
6923ed54ce033722f20e3fafab67258b5a412d96
Digitova/reactova-framework
src/components/Navigation/ReactovaNavigator.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nexport default ({ className, onCommit, property, value }) => {\n function getValue(checked, newValue) {\n if (!property.isArray) {\n return newValue\n }\n\n const values = [...value]\n\n if (checked) {\n values.pu...
javascript
edit
0
4
mit
3e7c2715b98ecde94e510c9ba7e91f4ed9439926
cignium/hypermedia-client,cignium/hypermedia-client
src/components/elements/inputs/boolean-list.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nconst { getReason } = require('../../error');\nconst { MODEL_TYPES } = require('../../constants');\nconst { DEFAULT_FORMAT } = require('../../formats');\nconst { normalizeCompress } = require('../../compress');\n\n// Bu...
javascript
edit
0
3
apache-2.0
ad5ae91fa7a1c6bc5259f9e185b98feee3713858
autoserver-org/autoserver,autoserver-org/autoserver
src/events/request_info/builder.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst path = require('path')\nconst material = path.resolve('node_modules/@material')\n\nmodule.exports = {\n title: 'Material Components Vue',\n description: 'Material Design components for Vue.js',\n base: '/material-components-vue...
javascript
edit
0
0
mit
c68e95718bb9b7a5c42527e94745e65ae6e793fc
matsp/material-components-vue
docs/.vuepress/config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n{% load djblets_utils %}\n /*\n * Initial state from the server. These should all be thought of as\n * constants, not state.\n */\n{% if not error %}\n var gBugTrackerURL = \"{{review_request.repository.bug_tracker}}\";\n var g...
javascript
edit
null
null
mit
603dbc81d639391a8c873a8e1096d661e814448b
asutherland/opc-reviewboard,chazy/reviewboard,1tush/reviewboard,sgallagher/reviewboard,custode/reviewboard,custode/reviewboard,1tush/reviewboard,beol/reviewboard,Khan/reviewboard,sgallagher/reviewboard,chipx86/reviewboard,beol/reviewboard,atagar/ReviewBoard,reviewboard/reviewboard,asutherland/opc-reviewboard,chazy/revi...
templates/reviews/review_flags.js
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar fs = require('graceful-fs')\n\nvar BUF_LENGTH = 64 * 1024\nvar _buff = new Buffer(BUF_LENGTH)\n\nfunction copyFileSync (srcFile, destFile, options) {\n var clobber = options.clobber\n var preserveTimestamps = options.preserveTimes...
javascript
edit
0
5
mit
ac6f688d10fc520536aed9c5d482b7ccc6080597
jprichardson/node-fs-extra
lib/copy-sync/copy-file-sync.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar _ = require('lodash'),\n _s = require('underscore.string');\n\nfunction getOutput(output, groups, taskOptions) {\n var hasGroup = false;\n\n _.each(Object.keys(groups), function(group) {\n // Use co...
javascript
edit
0
3
mit
4ce9e69bea5a5bacda343f320763490aa3074920
ben-eb/grunt-available-tasks
lib/get_output.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from \"react\";\nimport { View } from \"react-native-web\";\n\nimport styles from \"./Layout.module.scss\";\n\nconst layoutWidth = {\n small: 480,\n medium: 760,\n large: 980\n};\n\nexport function FullWidth(props) {\n ...
javascript
edit
0
1
mit
e71eaf932fc268caf8e5cc55d2ebae55626f4842
yanglinz/reddio-next,yanglinz/reddio-next,yanglinz/reddio-next
src/components/Layout.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar EC = protractor.ExpectedConditions;\n\ndescribe('con10t pages', function() {\n\n\n function click() {\n \n browser.waitForAngular();\n return element.all(by.css('.leaflet-control-zoom-in')).get(0).getText().c...
javascript
edit
0
1
apache-2.0
cbfbf3838cad1a890e85fd79d8854f8627c9b9f9
codarchlab/arachnefrontend,dainst/arachnefrontend,dainst/arachnefrontend,codarchlab/arachnefrontend
e2e/map.spec.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Socket from 'src/socket'\nimport {LongPoll} from 'src/transports'\nimport {pause, resume} from 'tests/utils'\n\nQUnit.test('can connect', function(assert){\n assert.expect(1)\n\n let socket = new Socket(\"ws://localhost:4000/so...
javascript
edit
null
null
mit
c722958694b0098345995b5c59a7aeeac7ec6262
jerel/phoenix_js
tests/integration/connect-test.js
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function(Perseus) {\n\nrequire(\"./widgets/categorization.jsx\");\nrequire(\"./widgets/dropdown.jsx\");\nrequire(\"./widgets/example-widget.jsx\");\nrequire(\"./widgets/expression.jsx\");\nrequire(\"./widgets/input-number.jsx\");\nrequ...
javascript
edit
0
1
mit
0219c79eb85081056dd4ff009b4945a0617937bd
alexristich/perseus,sachgits/perseus,chirilo/perseus,abe4mvp/perseus,junyiacademy/perseus,iamchenxin/perseus,iamchenxin/perseus,daukantas/perseus,junyiacademy/perseus,chirilo/perseus,huangins/perseus,alexristich/perseus,daukantas/perseus,ariabuckles/perseus,sachgits/perseus,learningequality/perseus,ariabuckles/perseus,...
src/all-widgets.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Promise from 'bluebird'\nimport BaseWorker from '../../base'\n\nimport rota from '../../rota.json'\n\nimport redis from 'redis'\nPromise.promisifyAll(redis.RedisClient.prototype)\n\nexport class AlertWorker extends BaseWorker {\n...
javascript
edit
0
3
mit
7f479e8caa288b55dccb9f092cb2f61991fd46fb
craftship/phonebox,craftship/phonebox,craftship/phonebox
src/workers/ingress/alert/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nMeteor.methods({\n 'channels.remove': function(channelId) {\n check(channelId, String);\n \n Messages.remove({channelId: channelId});\n Channels.remove({_id: channelId});\n }\n});\n\n```\n\nApply this change: Secure checks...
javascript
edit
0
3
mit
2587d6b87e75b8268ad0160962e77fa0e0959ab2
foysalit/SpaceTalk,mGhassen/SpaceTalk,tamzi/SpaceTalk,SpaceTalk/SpaceTalk,redanium/SpaceTalk,bright-sparks/SpaceTalk,MarkBandilla/SpaceTalk,mauricionr/SpaceTalk,redanium/SpaceTalk,dannypaton/SpaceTalk,tamzi/SpaceTalk,syrenio/SpaceTalk,mGhassen/SpaceTalk,TribeMedia/SpaceTalk,SpaceTalk/SpaceTalk,yanisIk/SpaceTalk,bright-...
server/methods/channels/remove.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/** @jsx React.DOM */\n\nvar React = require('react'),\n ReactPolyselect = require('../src/javascripts/main'),\n Polyselect = ReactPolyselect.Polyselect,\n Polyoption = ReactPolyselect.Polyoption;\n\nvar App = React.createClass...
javascript
edit
0
1
mit
1c62ea5b06c8437bfd94c7a2d12fd000e6b4b362
jarsbe/react-polyselect
example/main.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nfunction Game() {\n\n var plugins = [];\n var temporary_instance = undefined;\n\n this.addPluginInstance = function(instance) {\n plugins.push(instance);\n }\n\n this.redraw = function(draw_info) {\n for (p ...
javascript
edit
0
3
mit
8be6736f843fe1a1944ff00c3e2bc04f1615ebfe
sirjeppe/WebGameMaker,sirjeppe/WebGameMaker,sirjeppe/WebGameMaker
game.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport app from 'flarum/app';\n\nimport AkismetSettingsModal from './components/AkismetSettingsModal';\n\napp.initializers.add('flarum-akismet', () => {\n app.extensionSettings['flarum-akismet'] = () => app.modal.show(new AkismetSettin...
javascript
edit
0
1
mit
e4fa9a38d761df687b5a87f69af015cb74030412
flarum/akismet,flarum/akismet,flarum/akismet
js/src/admin/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 CountUp from '../../lib/CountUp';\n\nReactDOM.render(\n <CountUp start={0} end={210987} />,\n document.getElementById('root')\n);\n\n```\n\nApply this change: Chang...
javascript
edit
0
0
mit
a1259fa67c5f8d8575ebffcbd65c4c0ac74cdbda
glennreyes/react-countup,glennreyes/react-countup
examples/simple/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nexport { default as symbol } from './symbol';\nexport { getOwner, setOwner, OWNER } from './owner';\nexport { default as assign } from './assign';\nexport { default as EmptyObject } from './empty-object';\nexport { default as dictionary...
javascript
edit
0
0
mit
9cbda8f9ad059a98f08faf72f0df1468963eeb49
elwayman02/ember.js,mike-north/ember.js,kennethdavidbuck/ember.js,sivakumar-kailasam/ember.js,bantic/ember.js,asakusuma/ember.js,Gaurav0/ember.js,rfsv/ember.js,jasonmit/ember.js,csantero/ember.js,alexdiliberto/ember.js,GavinJoyce/ember.js,gfvcastro/ember.js,alexdiliberto/ember.js,patricksrobertson/ember.js,trentmwillis...
packages/ember-utils/lib/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar fs = require( 'fs' );\nvar path = require( 'path');\n\nvar tape = require( 'tape' );\nvar event_stream = require( 'event-stream' );\nvar deep = require( 'deep-diff' );\n\nvar importModule = require( '../lib/tasks/import' );\n\nvar b...
javascript
edit
0
2
mit
be69b4ab6857334fd3b7ff6faed99435d6538d20
pelias/geonames,pelias/geonames
test/importTest.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { moduleForComponent, test } from 'ember-qunit';\nimport hbs from 'htmlbars-inline-precompile';\n\nmoduleForComponent('project-settings-form', 'Integration | Component | project settings form', {\n integration: true\n});\n\ntest...
javascript
edit
0
1
mit
485493c3b7e8a3ef46c4cf0722d1ce8d8c379ed1
jderr-mx/code-corps-ember,eablack/code-corps-ember,jderr-mx/code-corps-ember,code-corps/code-corps-ember,eablack/code-corps-ember,code-corps/code-corps-ember
tests/integration/components/project-settings-form-test.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\ndescribe(\"About Expects\", function() {\n\n //We shall contemplate truth by testing reality, via spec expectations. \n it(\"should expect true\", function() {\n expect(false).toBeTruthy(); //This should be true\n });\n\n //To u...
javascript
edit
0
1
mit
4c682adbd2888bc410eee6a6e719100c2f03d447
arianf/javascript-koans,arianf/javascript-koans,arianf/javascript-koans
koans/AboutExpects.js
rejected_duplicate
Near-duplicate of sample 71488
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use babel';\n/**\n Eval Console\n @description Provides a console where user can enter input in order to\n evaluate Go expressions within the current scope of the debugger in\n a REPL-esque style\n\n TODO: We will need to list...
javascript
edit
null
null
mit
608a5d3ac04764ffada4884cc14e04a0e2d3d763
tylerFowler/atom-delve
lib/views/evalConsole.js
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React, {Component} from 'react';\nimport $ from 'jquery';\nimport CurrentWeatherCard from './CurrentWeatherCard';\n\nexport default class App extends Component {\n constructor(){\n super()\n this.state = {\n location:...
javascript
edit
0
1
mit
fff18f85c5559671e5c28a1cfe9de75e9659e87c
thatPamIAm/weathrly,thatPamIAm/weathrly
lib/components/App.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport gravatar from '../../../utils/gravatar';\nimport { module, test } from 'qunit';\n\nmodule('gravatar');\n\n// Replace this with your real tests.\ntest('it works', function(assert) {\n var result = gravatar();\n assert.ok(result)...
javascript
edit
0
1
mit
cb781d86a40f0f3f9ada71cbe482b52ad9abd454
Dhaulagiri/ember-purple-form,Dhaulagiri/ember-purple-form
tests/unit/utils/gravatar-test.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/** @babel */\n/** @jsx etch.dom */\n\nimport {Emitter} from 'atom'\nimport etch from 'etch'\n\nexport default class EtchComponent {\n constructor (props) {\n this.props = props\n\n etch.initialize(this)\n this.setScheduler(at...
javascript
edit
0
1
mit
e2aa9b3202ad30f5eee17f8315b7c767ef5bdf62
atom/about,mnquintana/atom-about
lib/etch-component.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict'\n\nconst modifyBabelPreset = require('modify-babel-preset')\n\nconst mergeByEnv = require('./lib/mergeByEnv')\n\nconst modifiedReactPreset = modifyBabelPreset('babel-preset-react', {\n 'babel-plugin-transform-react-jsx': {...
javascript
edit
0
0
mit
749a789a44e0bf0e93d17b2c3065f856290b3e08
foray1010/babel-preset-foray1010
react.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n$().ready(function () {\n\n $(\"form.comment\").on(\"submit\", function (event) {\n event.preventDefault();\n var $form = $(this);\n var $comments = $(\".comment-group\");\n var $input = $(\"textarea.comment\");\n $.ajax...
javascript
edit
0
1
mit
339a8b2b11ff48721d6bf2dba41311c9351b28d3
kxxoling/Programmer-Sign,kxxoling/Programmer-Sign,kxxoling/Programmer-Sign
sigh/static/js/sigh.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = function(config) {\n ['MONGO_URL', 'MONGO_USERNAME', 'MONGO_PASSWORD'].forEach(function(envvar) {\n if (config[envvar] === undefined) {\n throw new Error('Mongo is missing ' + envvar);\n }\n });\n\n var mo...
javascript
edit
0
2
mit
4e8483470b1d748c8c5284f701593b72f5329f61
volontario/volontario-server
server/app/mongoose-connection.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport _ from 'lodash';\nimport objectAssign from 'object-assign';\nimport * as fields from './fields';\n\nexport function items(item) {\n return _.forEach(item.fields, (field) => {\n return field;\n });\n}\n\nexport function itemT...
javascript
edit
0
2
mit
0e858e01a588c9b820b97454c5e066997a72df20
albertfdp/react-podio-universal,albertfdp/react-podio-universal
src/api/podio/items.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar async = require('async');\n\nvar context;\nvar publishTimer;\n\nfunction publishToDashboard() {\n async.waterfall([\n function(callback) {\n context.consuler.getKeyValue(context.keys.request, function(result) {\...
javascript
edit
0
3
bsd-3-clause
28ac04d3ec796c5932370ac06a621cd225a92da0
smartdevicelink/manticore,smartdevicelink/manticore
server/lib/CloudWatchDashboard.js
accepted
null
true
[ { "role": "user", "content": "Write javascript code for the following: Add infinite scroll feature to Qiita's feed" }, { "role": "assistant", "content": "\"use strict\";\nwindow.addEventListener(\"load\", () => {\n let htmlHeight = document.documentElement.scrollHeight;\n const moreButtons...
javascript
new_file
0
3
mit
95f6bd38e8334b706125dc913a2f51b00b93585e
hinamiyagk/qiita-infinite-scroll-firefox,hinamiyagk/qiita-infinite-scroll-firefox
qiita-infinite-scroll.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Ember from 'ember';\nimport Base from 'ember-validations/validators/base';\n\nexport default Base.extend({\n call: function() {\n var prop = this.model.get(this.property);\n var backtick = \"`\";\n var endingPunctuation...
javascript
edit
0
1
mit
3eace736a0c8ee1428cf07a1ae0ee386c254b44d
BryanCode/wordset-ui,BryanCode/wordset-ui,wordset/wordset-ui,BryanCode/wordset-ui,wordset/wordset-ui,wordset/wordset-ui
app/validators/definitionlike.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React, { PropTypes } from 'react';\nimport ReactDOM from 'react-dom';\nimport echarts from 'echarts';\nimport { arrayEqual } from '../_utils/ArrayUtils';\n\nexport default class EChart extends React.Component {\n\n static prop...
javascript
edit
0
2
mit
8f4e3b91e6f5912f12f4b0d6b8ccdd6dd6b52464
binary-com/binary-next-gen,nazaninreihani/binary-next-gen,qingweibinary/binary-next-gen,nuruddeensalihu/binary-next-gen,qingweibinary/binary-next-gen,nuruddeensalihu/binary-next-gen,nazaninreihani/binary-next-gen,binary-com/binary-next-gen,nuruddeensalihu/binary-next-gen,qingweibinary/binary-next-gen,nazaninreihani/bin...
src/charting/EChart.js
rejected_duplicate
Near-duplicate of sample 75016
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport {\n ifElse,\n isFunction,\n filter,\n compose\n} from '1-liners';\n\nconst castBool = (val) => val === true;\nconst throwError = (msg) => () => { throw new Error(msg); };\n\nconst filterCurried = (filterFn) => ifElse(\n Arra...
javascript
edit
0
1
mit
183cb3cef73f6ff022f4a545e9cbf31eccbe22df
studio-b12/doxie.filter
module/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React, { Component } from 'react';\nimport { View } from 'react-native';\nimport RepoSearchBar from './components/RepoSearchBar';\nimport RepoSearchButton from './components/RepoSearchButton';\nimport RepoList from './components/...
javascript
edit
0
1
mit
e8a242ece6080fb6dc0db4f8325503bf1a4472cf
msanatan/GitHubProjects,msanatan/GitHubProjects,msanatan/GitHubProjects
app/scenes/SearchScreen/index.js
rejected_duplicate
Near-duplicate of sample 71831
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * WordPress dependencies\n */\nimport { render } from '@wordpress/element';\nimport domReady from '@wordpress/dom-ready';\n\n/**\n * Internal dependencies\n */\nimport Container from './components/container';\n\ndomReady( () => {\...
javascript
edit
0
2
apache-2.0
eb4d3b089895831094fad22e432c252ec6cb1acb
ampproject/amp-wp-qa-tester,ampproject/amp-wp-qa-tester,ampproject/amp-wp-qa-tester
assets/src/js/admin-bar/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict'\n\n/**\n * Top level program- it is responsible for launching everything else.\n */\n\nclass Player extends kernel.process {\n constructor (...args) {\n super(...args)\n this.priority = PRIORITIES_PLAYER\n }\n\n ma...
javascript
edit
0
4
mit
bb8c6d71f67adac3cd295b27989c4e117c0a0a1c
ScreepsQuorum/screeps-quorum
src/programs/player.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nHospitalCheckup.Behaviors = {\n HospitalSelect: Marionette.Behavior.extend({\n events: {\n \"click .bar\": \"displayHospital\",\n \"click .range-bar\": \"displayHospital\",\n \"click .stat-circle\": \"displayHospital\...
javascript
edit
0
2
mit
7749becaf38240f84fee2026a1c9d93c5dd91b0f
NewsappAJC/hospitalCheckup,NewsappAJC/hospitalCheckup,NewsappAJC/hospitalCheckup
src/assets/js/common/behaviors.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = function models(r) {\n return {\n projects: require('./projects')(r),\n users: require('./users')(r),\n samples: require('./samples')(r),\n access: require('./access')(r),\n files: ...
javascript
edit
0
1
mit
aed58e5b3d16adbcae22b3b3776be49dde2c87cb
materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org
backend/server/db/model/index.js
rejected_duplicate
Near-duplicate of sample 75259
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\n/**\n * Copyright 2013-2014, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of ...
javascript
edit
0
1
mit
52b32d83d0a85540eebe5caafd5409fc028c7ba2
jameszhan/react,maxschmeling/react,andreypopp/react,zyt01/react,zenlambda/react,lucius-feng/react,yhagio/react,haoxutong/react,aaron-goshine/react,8398a7/react,pwmckenna/react,Jonekee/react,BreemsEmporiumMensToiletriesFragrances/react,prometheansacrifice/react,andreypopp/react,PeterWangPo/react,manl1100/react,isathish/...
src/browser/ui/dom/components/__tests__/ReactDOMIframe-test.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n$(document).ready( function () {\n $(\".upvote\").click( function() {\n var commentId = $(\".upvote\").data(\"id\");\n event.preventDefault();\n $.ajax({\n url: '/response/up_vote',\n method: 'POST',\n data: { i...
javascript
edit
0
2
mit
a33ac2d257846b01894199a96f05104810b7f413
great-horned-owls-2014/dbc-what-is-this,great-horned-owls-2014/dbc-what-is-this
app/assets/javascripts/responses.js
rejected_duplicate
Near-duplicate of sample 79014
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * Copyright (c) 2015-present, Viro, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of...
javascript
edit
0
1
mit
adc63338915beeae56600bbe0eda81b6fa540dba
viromedia/viro,viromedia/viro,viromedia/viro,viromedia/viro
components/ViroSceneNavigator.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst chai = require('chai');\nconst chaiHttp = require('chai-http');\nconst cheerio = require('cheerio');\nconst app = require('../../server');\nconst constants = require('../../app/lib/constants');\n\nconst expect = chai.expect;\n\nch...
javascript
edit
0
1
mit
e0409c7dd4a82c5d2d9c1078702c8a9756cf77f2
nhsuk/profiles,nhsuk/profiles
test/integration/onlineTasks.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React, { PropTypes } from 'react'\nimport { List, ListItem } from 'material-ui/List';\n\nexport default class Project extends React.Component {\n static propTypes = {\n project: PropTypes.object.isRequired,\n loc...
javascript
edit
0
2
mit
ee4601b4d8a200c09482140e95c33486eb7857da
anthonynsimon/parrot,todes1/parrot,todes1/parrot,todes1/parrot,anthonynsimon/parrot,todes1/parrot,todes1/parrot,anthonynsimon/parrot,anthonynsimon/parrot,todes1/parrot,anthonynsimon/parrot,anthonynsimon/parrot
app/src/views/components/Project.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar wompt = require(\"../includes\"),\nmongoose = wompt.mongoose,\nObjectId = mongoose.Schema.ObjectId;\n\nvar Account = new mongoose.Schema({\n\t'display_name' : String\n\t,'name' : String\n\t,'owner_ids' : [ObjectId]...
javascript
edit
0
2
mit
762c4eec98c0895c57fe8556258acaeddfa4f6f4
iFixit/wompt.com,iFixit/wompt.com,Wompt/wompt.com,iFixit/wompt.com,iFixit/wompt.com,Wompt/wompt.com,Wompt/wompt.com
nodejs/lib/models/account.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * Created by aknauss on 6/21/17.\n */\n\n\nvar jwt = require('jsonwebtoken');\n\nmodule.exports = {\n login: ctx => {\n let request = ctx.request.body;\n console.log(request);\n if (!(request.username && re...
javascript
edit
0
3
mit
dc3ccc68f65a5f126f34f0135b990ce64ad26492
pandemos/presence,pandemos/presence
presence-api/app/auth.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar dimTimer;\n\nangular.module('onmote')\n .controller('DeviceListCtrl', function ($scope, $timeout, socket) {\n\n\tsocket.on('telldus:*',function(event, data) {\n\t console.log(event, data);\n\t});\n\n socket.on('telldus:device...
javascript
edit
0
1
mit
1c35ed1569d0f1140d11414ad62dd69a12b96c2b
nilzen/onmote
public/js/controllers.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = {\n normalizeEntityName: function() {\n // this prevents an error when the entityName is\n // not specified (since that doesn't actually matter\n // to us\n },\n\n afterInstall: function() {\n return this...
javascript
edit
0
1
mit
290c68db15f0462c8fce9bb420941035d522f506
nathanhammond/ember-cli-qunit,ember-cli/ember-cli-qunit,ember-cli/ember-cli-qunit,nathanhammond/ember-cli-qunit
blueprints/ember-cli-qunit/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* ***********************************************************************************************\n\n Unify Project\n\n Homepage: unify-project.org\n License: MIT + Apache (V2)\n Copyright: 2012, Sebastian Fastner, Mainz, G...
javascript
edit
0
1
mit
b5eae55e5d4b405150ffc67c0e5a9d376e666535
unify/unify,unify/unify,unify/unify,unify/unify,unify/unify,unify/unify
unify/framework/source/class/unify/ui/core/MChildrenHandling.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport ODataSerializer from 'ember-flexberry/serializers/odata';\n\nexport default ODataSerializer.extend({\n});\n\n```\n\nApply this change: Add models and serializers unit tests" }, { "role": "assistant", "content": "impor...
javascript
edit
0
0
mit
23550aa77bf9380511756a75386bcde64ca1a4ba
Flexberry/ember-flexberry,Flexberry/ember-flexberry,Flexberry/ember-flexberry,Flexberry/ember-flexberry
blueprints/flexberry-application/files/__root__/serializers/application.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React, { Component } from 'react'\nimport pureRender from 'pure-render-decorator'\n\nimport '../../css/data-fetch-error.less'\n\n@pureRender\nexport default class DataFetchError extends Component {\n renderUnauthorized() {\n r...
javascript
edit
0
2
mit
bc153e4c6d95e0bf9c38f0d275bf473b42025d85
concord-consortium/portal-report,concord-consortium/portal-report,concord-consortium/portal-report,concord-consortium/portal-report
js/components/data-fetch-error.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar express = require('express');\nvar router = express.Router();\nvar fs = require('fs');\n\n/* GET home page. */\nrouter.get('/', function(req, res, next) {\n res.render('index', { title: 'Express' });\n});\n\nfs.readdir(__dirname + ...
javascript
edit
0
2
mit
139cf17271185442a1c824858840fcf3c71bcfb6
portlandcodeschool-jsi/static-charge,portlandcodeschool-jsi/static-charge
routes/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// Adds a button to hide the input part of the currently selected cells\n\n// Prevent this script from cluttering the IPython namespace\n(function (IPython) {\n \"use strict\";\n\n\n var hide_input = function () {\n\n // Fi...
javascript
edit
0
2
bsd-3-clause
4e63254ab554934e61a3a998735ce9411f86ee66
Konubinix/IPython-notebook-extensions,Konubinix/IPython-notebook-extensions,Konubinix/IPython-notebook-extensions
usability/hide_input/main.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar IsIoJS = parseInt(process.version.substr(1)) > 0;\nif(IsIoJS){\n var v8 = require('v8');\n v8.setFlagsFromString('--harmony_classes');\n v8.setFlagsFromString('--harmony_object_literals');\n v8.setFlagsFromString('--harmony_tost...
javascript
edit
0
0
mit
4c16ae9d60bbe309c2f466ef243159819766e31e
steelbrain/mariasql-promise
Main.js
accepted
null
true
[ { "role": "user", "content": "Write javascript code for the following: v1.0.0: Write initial tests for the ogmneo operation." }, { "role": "assistant", "content": "'use strict';\n\nconst test = require('tape');\nconst OGMNeoOperation = require('../lib/ogmneo-operation');\nconst _ = require('loda...
javascript
new_file
0
1
mit
7141336694aed0d88da646989d965e163f0e81c5
LucianoPAlmeida/OGMNeo,LucianoPAlmeida/OGMNeo
__test__/operation-tests.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar registry = require('registry');\nvar exec = require('process').exec;\n\nregistry.addDevice(registry.createDevice('Testing', registry.DimmableLamp, function (state, cb) {\n console.log('State changed - ' + JSON.stringify(state));\n ...
javascript
edit
0
1
mit
4655b4ab5bbc41bdd38555864662213b404f15b9
orktes/huealexa,orktes/huealexa
examples/simple.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nfunction pad(num, size) {\n var s = '0000' + num\n return s.substring(s.length - size)\n}\n\n\nfunction capitalize(s) {\n return s[0].toUpperCase() + s.slice(1)\n}\n\n\nexport function formatTime(time) {\n let h, m, s, ms = 0\n var...
javascript
edit
0
2
mit
2d16f2645adb9666ff7e760a54206fb17bc83ad3
jsza/tempus-website,jsza/tempus-website
src/utils/TempusUtils.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst http = require('http');\nconst nodeStatic = require('node-static');\nconst port = 3000;\n\nconst demo = new nodeStatic.Server('../demo');\nconst server = http.createServer((request, response) => {\n request.addListener('end', (...
javascript
edit
0
1
mit
9564fb6822e163ee2fe1102f325cf3b90722c060
siddharthkp/vhs
remote/test-server.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * External dependencies\n */\nimport { storiesOf } from '@storybook/react';\n\n/**\n * Internal dependencies\n */\nimport Setup from '../assets/js/components/setup';\n\nstoriesOf( 'Setup', module )\n\t.add( 'Step one', () => {\n\t...
javascript
edit
0
1
apache-2.0
6f633ec582fc063e583057fe18676b35be5b6d89
google/site-kit-wp,google/site-kit-wp,google/site-kit-wp,google/site-kit-wp
stories/setup.stories.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\ndefine(['jquery'],\n function ($) {\n return {\n createLiveRegion: function() {\n var $liveRegionContainer = $('.live-region-container');\n if ($liveRegionContainer.length === 0) {\n return $('<div class=...
javascript
edit
0
3
mit
a823ed3c3d93c39132943d529cda57ca9d7cd593
alphagov/spotlight,alphagov/spotlight,keithiopia/spotlight,keithiopia/spotlight,tijmenb/spotlight,tijmenb/spotlight,keithiopia/spotlight,alphagov/spotlight,tijmenb/spotlight
app/client/accessibility.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar assert = require('chai').assert;\nvar Context = require('../headless-context');\nvar context;\n\ndescribe('Core window events', function() {\n beforeEach(function() {\n context = new Context();\n });\n\n afterEach(function() {...
javascript
edit
0
1
mit
415841700421405242f64fba30c9638725d69fcf
asakusuma/ventana,asakusuma/ventana,asakusuma/ventana,asakusuma/ventana
tests/headless/window.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React, { Children } from 'react';\nimport PropTypes from 'prop-types';\n\nimport Context from './context';\nimport Notification from './notification';\n\nclass Provider extends React.PureComponent {\n constructor(props) {\n s...
javascript
edit
0
2
mit
78abc0e772682d00b79135ca4ebd032eee2b5a0f
robcalcroft/react-native-in-app-notification
src/provider.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n$(document).ready(function(){\n\n $(\".button-collapse\").sideNav();\n $('.parallax').parallax();\n\n});\n\n```\n\nApply this change: Add dropdown menu functionality plugin." }, { "role": "assistant", "content": "$(doc...
javascript
edit
0
1
mit
a8c12cc13841192fb266643beb9d474708d07429
JuanHenriquez/yelp-camp,JuanHenriquez/yelp-camp
public/js/main.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar almost = (function() {\n function lookupWord(id)\n {\n // TODO: Return the specified entry from our words list.\n return 'word' + id;\n }\n\n return {\n getWords : function(howMany) {\n if...
javascript
edit
0
6
mit
3bdfe58d3fab6dc7bf3f69dd6f371672dbce0a9e
robert-claypool/almost-rw,robert-claypool/almost-rw
almost.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst got = require('got');\n\nconst API_VERSION = 1;\nconst GOT_OPTIONS = { json: true };\n\nconst searchUrl = query => (\n `https://rubygems.org/api/v${API_VERSION}/search.json?query=${query}`\n);\n\nmodule.exports.search = query => ...
javascript
edit
0
2
mit
b6c94899ba78e7c0f80235de9a6f18f98f4b3acc
danielbayerlein/zazu-rubygems
src/rubygems.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nAccounts.validateNewUser(function (user) {\n if (Meteor.users.findOne({username: user.username}))\n throw new Meteor.Error(403, \"User already exists.\");\n return true;\n});\n\nAccounts.validateNewUser(function (user) {\n if (Met...
javascript
edit
0
5
mit
59086b9856320eeb9d8ce9500f4d5712e6af6bc3
waartaa/waartaa,waartaa/waartaa,waartaa/waartaa
waartaa/server/accounts.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport {Data} from 'Framework/Data';\n\nconst dataData = new Data();\n\nexport class Locale\n{\n constructor()\n {\n this.isInitialized = false;\n this.data = null;\n }\n\n initialize()\n {\n $.ajax(\n '/' + dataData....
javascript
edit
0
1
mit
f2149ff19e9f3ead771fe19d0dedd20640af67a4
jonasdekeukelaere/Framework,jonasdekeukelaere/Framework,sumocoders/Framework,sumocoders/Framework,jonasdekeukelaere/Framework,sumocoders/Framework,jonasdekeukelaere/Framework,sumocoders/Framework
src/SumoCoders/FrameworkCoreBundle/Resources/assets/js/Framework/Locale.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react'\n\nimport ComponentRenderer from './src/components/component-renderer-with-pagination'\n\nexport const replaceComponentRenderer = ({ props, loader }) => {\n if (props.layout) {\n return null\n }\n\n retur...
javascript
edit
0
1
mit
b8ccdea2458feba31ff0355c9c38c334b08ba1bb
LuisLoureiro/placard-wrapper
gatsby-browser.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports =\n{\n mutationFunction: function(phenotype)\n {\n // make a random change to phenotype\n var count = phenotype.nmos + phenotype.pmos\n var randNumb = Math.floor(Math.random() * (count + 1))\n\n if (randNumb...
javascript
edit
0
2
mit
3304ac39989bc7de6777f21ca24abe5852f80d3c
MrWooJ/WJChipDesign,MrWooJ/WJChipDesign
Workspace/Project/MutationModule.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nfunction MtkLabel (settings) {\n MtkXaml.call (this, \"<TextBlock/>\", settings);\n \n this.MapProperties ([ \n [ \"Text\", \"QueueResize\" ], \n [ \"FontFamily\", \"QueueResize\" ],\n [ \"FontSize\", \"Queue...
javascript
edit
0
2
mit
2e0edbf8ef4b89f88331e2095edb88320e8ce386
abock/moonshine,abock/moonshine,abock/moonshine,abock/moonshine
toolkit/mtk/mtk-label.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport expect from 'expect.js'\nimport {fix, check} from '../../../src/typography-fixer'\nimport rules from '../../../src/rules/en-UK/html'\n\nconst fixString = fix(rules)\nconst checkString = check(rules)\n\ndescribe('en-UK html rules'...
javascript
edit
0
1
mit
0374d3d033d42b287aeb6bf72fce7eddfc0ebe81
abe33/typography-fixer
test/rules/en-UK/html.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// ==========================================================================\n// Project: MySystem.Activity Fixtures\n// Copyright: ©2011 Concord Consortium\n// ========================================================================...
javascript
edit
0
0
mit
34f77c71ea2a06ea100386175fa2268718398723
concord-consortium/mysystem_sc,concord-consortium/mysystem_sc,concord-consortium/mysystem_sc
apps/my_system/fixtures/activity.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict'\n\nconst assert = require('assert')\nconst defaultOptions = require(__source + 'config/default')\nconst RunnerInterface = require(__source + 'runner-interface')\nconst LoggerFactory = require(__source + 'logger/logger-facto...
javascript
edit
0
1
mit
2844b7620d9f1f3ab55a740704fb9be001ec2f10
dgaubert/punky,dgaubert/node-api-bootstrap
test/integration/cluster/master/master-factory-test.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from \"react\";\nimport { Link } from \"react-router-dom\";\nimport fetchContainer from \"../../containers/fetch-container\";\nimport \"./Controls.css\";\n\nconst handleSignOut = (props) => {\n localStorage.removeItem('use...
javascript
edit
0
2
mit
b7424746fd8930da8a9071df94760ffe51553a9f
christielynam/do-you,christielynam/do-you
lib/components/Controls/Controls.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar _ = require('lodash');\n\nexports.formatNumber = function(dialect) {\n return {\n mysql: _.identity,\n sqlite3: _.identity,\n postgresql: function(count) { return count.toString() }\n }[dialect];\n}\n\nexports.countModels...
javascript
edit
0
2
mit
548c59ad9971c50d1a4f8f1b481b097afb96c1eb
tgriesser/bookshelf,bookshelf/bookshelf,tgriesser/bookshelf,bookshelf/bookshelf
test/integration/helpers/index.js
accepted
null
true
[ { "role": "user", "content": "Write javascript code for the following: Add ui.bootstrap to paperworkNotes module" }, { "role": "assistant", "content": "angular.module('paperworkNotes', ['ngRoute', 'ngSanitize', 'ngAnimate', 'angularFileUpload', 'ab-base64', 'ui.bootstrap'])\n.constant('paperwork...
javascript
new_file
0
0
mit
646fd73c7e796866813d4024059b3fb2573959ba
bartuspan/paperwork,JJediny/paperwork,sillvan/paperwork,PixelVibe/paperwork,Liongold/paperwork,sylvanmist/paperwork,sbilly/paperwork,hilerchyn/paperwork,vaikan/paperwork,cnbin/paperwork,suxinde2009/paperwork,7brend7/paperwork,wolut/paperwork,lulufei/paperwork,fromeflow/paperwork,zhangjingpu/paperwork,zhangjingpu/paperw...
frontend/app/js/paperwork/app.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport uaLocale from 'date-fns/locale/ua';\nimport DateFnsUtils from '../../src/utils/date-fns-utils';\n\ndescribe('DateFnsUtils', () => {\n const enUtils = new DateFnsUtils();\n const uaUtils = new DateFnsUtils({ locale: uaLocale });...
javascript
edit
0
1
mit
79804e437f54b0486d371c0f408306ceaafd28fa
oliviertassinari/material-ui,dmtrKovalenko/material-ui-pickers,oliviertassinari/material-ui,mui-org/material-ui,mbrookes/material-ui,callemall/material-ui,mbrookes/material-ui,callemall/material-ui,callemall/material-ui,mui-org/material-ui,rscnt/material-ui,rscnt/material-ui,oliviertassinari/material-ui,mui-org/materia...
lib/__tests__/utils/date-fns-utils.test.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* jshint node: true */\n\nmodule.exports = function(environment) {\n var ENV = {\n modulePrefix: 'dummy',\n environment: environment,\n baseURL: '/',\n locationType: 'auto',\n EmberENV: {\n FEATURES: {\n // ...
javascript
edit
0
4
mit
78a744c15c48a57cd5e421d420e46a91febdb133
Dhaulagiri/ember-purple-form,Dhaulagiri/ember-purple-form
tests/dummy/config/environment.js
rejected_duplicate
Near-duplicate of sample 80006
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Ember from 'ember';\nimport layout from '../templates/components/with-service';\nimport getOwner from 'ember-getowner-polyfill';\n\nexport default Ember.Component.extend({\n layout,\n\n service: Ember.computed('serviceName', fu...
javascript
edit
0
1
mit
113387cff3d08698b205717f89ccd3dbc74d52e5
rtablada/ember-with-service,rtablada/ember-with-service
addon/components/with-service.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar expect = require('chai').expect;\n\ndescribe('LineChart', function() {\n it('renders linechart', function() {\n var React = require('react/addons');\n var LineChart = require('../src/linechart').LineChart;\n ...
javascript
edit
0
1
mit
96ecb0ebdfd32ae7ffe6525c6b047cd60475781a
TannerRogalsky/react-d3,mwhite/react-d3,reactiva/react-d3,sprintly/react-d3,nnnnathann/react-d3,orls/react-d3,yang-wei/rd3,reactiva/react-d3,nightlyop/react-d3,yashprit/react-d3,Keepsite/react-d3,tobyredd/rd3,TannerRogalsky/react-d3,nightlyop/react-d3,sprintly/react-d3,Clemency10/react-d3,Keepsite/react-d3,orls/react-d...
tests/linechart-tests.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nfunction annotateEngine(src, rules, ruleTypes, ruleMap) {\n var tokens = [];\n\n while(src) {\n // Pick rule\n var rule = ruleTypes.filter(function(ruleName, idx) {\n var regex = rules[ruleName];\n ...
javascript
edit
0
6
mit
d4dd16ab58c9146813c3af48e045a88aa6ed669d
emilbayes/kramed,gdbooks/kramed,GerHobbelt/kramed,Ponyshow/pony-render,GitbookIO/kramed,gdbooks/kramed,martindale/kramed,GerHobbelt/kramed,emilbayes/kramed,martindale/kramed,GitbookIO/kramed
lib/annotate/engine.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst expect = require('chai').expect;\n\nimport { TopicObserver } from \"../topic-observer\";\n\ndescribe('topic observer', () => {\n\n const observer = new TopicObserver();\n const fn1 = () => {};\n\n it('should observe all',...
javascript
edit
0
1
bsd-3-clause
764a851dec16f226fc1875f2d7491e2486f3ea10
EMSTrack/WebServerAndClient,EMSTrack/WebServerAndClient,EMSTrack/WebServerAndClient
static/js/tests/topic-observer.test.js
rejected_duplicate
Near-duplicate of sample 72970
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* jshint node: true */\n\nvar EOL = require('os').EOL;\n\nmodule.exports = {\n description: 'Generates ember-cli-flash test helper',\n\n afterInstall: function() {\n var TEST_HELPER_PATH = 'tests/test-helper.js';\n var IMPORT_S...
javascript
edit
0
1
mit
50eaf1b629a4aeb3af46329182616a052b9f9b30
elwayman02/ember-cli-flash,imanhodjaev/ember-cli-flash,poteto/ember-cli-flash,poteto/ember-cli-flash,elwayman02/ember-cli-flash,imanhodjaev/ember-cli-flash,david-duncan/ember-cli-flash,david-duncan/ember-cli-flash
blueprints/ember-cli-flash/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nrequire('../helper');\n\nconst Backbone = require('backbone');\nconst _ = require('underscore');\n\nconst Factotum = require('../../src/backbone.factotum');\n\n// =====\n// Backbone types\n// =====\n\nconst Job = Backbo...
javascript
edit
0
1
mit
b1b2a7a069171f9e302d001cb9513e1064ed8b53
sergioalvz/backbone.factotum,sergioalvz/backbone.factotum
tests/acceptance/backbone.spec.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = function*() {\n\tthis.time('Linter')\n\tthis.separator()\n\n\tlet methods = {}\n\n\tfor(let tuple of this.pages) {\n\t\tlet page = tuple[1]\n\n\t\tfor(let method of page.httpVerbs) {\n\t\t\tlet check = () => this.checkR...
javascript
edit
0
5
mit
f05861d8206ad96f519817a1828b5a67efcaf59c
aerojs/aero,aerojs/aero
lib/App/checkRoutes.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// @flow\n\nimport * as React from 'react'\nimport moment from 'moment-timezone'\nimport {Alert} from 'react-native'\nimport {Column, Row} from '../components/layout'\nimport {ListRow, Detail, Title} from '../components/list'\nimport ty...
javascript
edit
null
null
mit
36f4f4508b44f01406635d13727aed491124f928
carls-app/carls,carls-app/carls,carls-app/carls,carls-app/carls,carls-app/carls,carls-app/carls,carls-app/carls
source/views/covid/updates-row.js
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar _ = require('lodash');\n\nfunction arrayToQueryString(args) {\n var queryString = '?q=' + args.join('+');\n return queryString.substring(0, queryString.length - 1);\n}\n\nmodule.exports = function(config, request,...
javascript
edit
0
1
mit
4ba5b778b13dee34fbc5b8ff2e78a8180ed79d5c
stillesjo/buh
lib/commands/search.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar Promise = require('bluebird'),\n \tmongoose = Promise.promisifyAll(require('mongoose')),\n \tUser = mongoose.model('User');\n authUtils = require('utils/auth');\n\nmodule.exports = {\n\tlogin : Login\n};\n\nfunction Login(reque...
javascript
edit
0
1
mit
fb377c68bede1bb79abfb227af7a0e59c8152861
Pranay92/collaborate,Pranay92/lets-chat
modules/authorization/controller.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nfunction extractJSON(rawJson) {\n return rawJson\n .replace(/\\s*while\\((1|true)\\)\\s*;?/, '')\n .replace(/\\s*for\\(;;\\)\\s*;?/, '')\n .replace(/^[^{\\[].+\\({/, '{')\n .replace(/}\\);?\\s*$/, '}');\n}\n\nmodule.exports...
javascript
edit
0
1
mit
e74dcb676bceea81def3fb0d40efed3efd8a0bf4
tulios/json-viewer,tulios/json-viewer
extension/src/json-viewer/extract-json.js
rejected_duplicate
Near-duplicate of sample 80352
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\nfunction NavbarCtrl($scope, $rootScope, $route, $location, Data) {\n $scope.data = Data;\n\n $scope.isActive = function(route) {\n\n var path = $location.path();\n\n\n if (path === '/')\n path = '/querie...
javascript
edit
0
2
apache-2.0
89e1e48f48bf7083ec8692b86f84ce0b0b10b510
polyfractal/elasticsearch-inquisitor,polyfractal/elasticsearch-inquisitor,AlphaStaxLLC/elasticsearch-inquisitor,AlphaStaxLLC/elasticsearch-inquisitor
_site/js/controllers/NavbarCtrl.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n$(function() {\n\n $('#side-menu').metisMenu();\n\n});\n\n//Loads the correct sidebar on window load,\n//collapses the sidebar on window resize.\n// Sets the min-height of #page-wrapper to window size\n$(function() {\n $(window).o...
javascript
edit
0
3
mit
5f1189b442b0acb8c0198b58232cc1b75cb65870
p2made/yii2-sb-admin-theme,p2made/yii2-sb-admin-theme,p2made/yii2-sb-admin-theme
assets/lib/js/sb-admin-2.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { toArray, Class } from './lib/objects';\nimport { normalizeOperations } from './lib/operations';\nimport { uuid } from './lib/uuid';\n\n/**\n Transforms represent a set of operations that are applied against a\n source. After a ...
javascript
edit
0
3
mit
7d0d1816be246c43c1c41fbe01a9b8b680f57ba2
beni55/orbit.js,rollokb/orbit.js,orbitjs/orbit.js,opsb/orbit.js,orbitjs/orbit-core,SmuliS/orbit.js,jpvanhal/orbit-core,jpvanhal/orbit-core,rollokb/orbit.js,greyhwndz/orbit.js,jpvanhal/orbit.js,jpvanhal/orbit.js,greyhwndz/orbit.js,opsb/orbit.js,SmuliS/orbit.js,beni55/orbit.js,orbitjs/orbit.js
lib/orbit/transform.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar async = require( \"async\" );\nvar _ = require( \"lodash\" );\nvar cta = require( \"cta-bus-tracker\" );\n\n\nvar busTracker = cta( process.env.CHICAGO_CTA_BUS_API_KEY );\n\n\nvar getRoutes = function ( done ) {\n\n busTracker.ro...
javascript
edit
0
1
mit
53bfe6d39175df850f27ef017de01b74fb714b6e
projectweekend/Transit-Stop-Collector
lib/jobs/chicago-cta-bus-data.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react';\n\nexport default class SparklinesBars extends React.Component {\n\n static propTypes = {\n points: React.PropTypes.arrayOf(React.PropTypes.number).isRequired,\n height: React.PropTypes.number...
javascript
edit
0
2
mit
40cc506c86dd03b31979ed4c49e2ccf4bd65cfa8
okonet/react-sparklines,okonet/react-sparklines,borisyankov/react-sparklines
src/SparklinesBars.js
accepted
null
true