messages
listlengths
2
2
language
stringclasses
8 values
prompt_type
stringclasses
2 values
lint_errors
int64
0
129
⌀
cyclomatic_complexity
int64
0
32
⌀
license
stringclasses
7 values
commit
stringlengths
40
40
repos
stringlengths
5
116k
new_file
stringlengths
4
220
status
stringclasses
6 values
error
stringlengths
26
74
⌀
is_valid_syntax
bool
2 classes
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* jshint node: true */\n'use strict';\n\nvar VersionChecker = require('ember-cli-version-checker');\n\nmodule.exports = {\n name: 'ember-changeset-cp-validations',\n\n init: function() {\n if (this._super.init) { this._super.init....
javascript
edit
0
3
mit
98d5e2297869af0c3c1a0fbc6ccae482140d50bc
offirgolan/ember-changeset-cp-validations,offirgolan/ember-changeset-cp-validations
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nimport express from 'express';\nimport ip from 'ip';\n\nlet app = express();\nlet port = process.ENV_PORT || 9000;\n\nlet server = app.listen(port);\n\n\n\nlet options = {\n debug: true,\n port: 9000,\n al...
javascript
edit
0
1
mit
155ba39e50a0b2e20959797fd319f596115cdaca
learning-layers/sardroid-server,learning-layers/sardroid-server
server.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nexports.onHandleCode = function onHandleCode(ev) {\n ev.data.code = ev.data.code\n .replace(/module\\s*\\.\\s*exports\\s*=\\s?/g,\n 'export default ')\n .replace(/exports\\s*\\.\\s*([_\\d\\w]+)\\s*=\\...
javascript
edit
0
1
mit
eda74ce4396b6e832bdcab659cdf204d32b396e3
ddude/esdoc-node,lcodes/esdoc-node
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\"use strict\";\n\nvar express = require('express');\nvar compress = require('compression')();\nvar errorHandler = require('errorhandler')({\n dumpExceptions: true,\n showStack: true\n});\nvar api = require('./modules/api.js');\nvar m...
javascript
edit
0
1
apache-2.0
11a834f57953de423ecf775796ce430f6f5c2daf
with-regard/regard-website-api
server.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*eslint-disable no-console*/\nconst logsColorScheme = require(\"./logsColorScheme\");\n\nfunction success(...args){\n console.log(...args.map(arg => logsColorScheme.success(arg)));\n}\n\nfunction info(...args){\n console.log(...args....
javascript
edit
0
1
mit
ae1621abf4ea57593c35e4026fb356c2e2438736
TrueCar/gluestick,TrueCar/gluestick,TrueCar/gluestick
src/lib/logger.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nfunction prepareQuery(sql) {\n var affectedTableRegexCache = {\n bbox: /!bbox!/g,\n scale_denominator: /!scale_denominator!/g,\n pixel_width: /!pixel_width!/g,\n pixel_height: /!pixel_height!/g\n }...
javascript
edit
0
2
bsd-3-clause
c9c83707cb64ebb8f5be3162b79232b24cce6d82
CartoDB/Windshaft,CartoDB/Windshaft,CartoDB/Windshaft
lib/windshaft/utils/query_utils.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar assign = require('object-assign');\nvar chalk = require('chalk');\nvar ProgressBar = require('progress');\n\n/**\n * Progress bar download plugin\n *\n * @param {Object} opts\n * @api public\n */\n\nmodule.exports =...
javascript
edit
0
4
mit
4ef3aa227c4d6609ccdf0c493cad0ef10359bb51
kevva/download-status
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React, { PropTypes } from 'react';\nimport { List } from 'immutable';\nimport Polyline from './Polyline';\nimport Marker from './Marker';\n\nfunction TaskPlot(props) {\n const { task } = props;\n const positions = task.map(wayp...
javascript
edit
0
3
mit
f1b548b1c8ab036cd6d176d0d70ac6c1f470eb9f
alistairmgreen/soaring-analyst,alistairmgreen/soaring-analyst
src/components/googlemap/TaskPlot.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport connectionManager from './connectionManager';\nimport mapEvents from './utilities/mapEvents';\nimport client from 'node-eventstore-client';\nimport debugModule from 'debug';\nimport assert from 'assert';\n\nconst debug = debugMod...
javascript
edit
0
2
mit
9b2bdcdf4fb0c724684e8dc9994420e78ecbeaef
RemoteMetering/geteventstore-promise,RemoteMetering/geteventstore-promise
lib/tcpClient/subscribeToStream.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport classnames from 'classnames';\nimport Form from './Item/Form';\nimport React, { Component } from 'react';\n\nclass EditColumn extends Component {\n constructor() {\n super();\n\n this.state = { isEditing: false };\n\n t...
javascript
edit
0
1
mit
9c12030a56c6c59125888074f3a77dba43534310
nadavspi/UnwiseConnect,nadavspi/UnwiseConnect,nadavspi/UnwiseConnect
src/components/Budgets/EditColumn.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nconst express = require('express');\nconst socketIO = require('socket.io');\nconst path = require('path');\n\nconst PORT = process.env.PORT || 3000;\nconst INDEX = path.join(__dirname, 'index.html');\n\nconst server = e...
javascript
edit
0
2
mit
8dad995f9ec554883f8842f8976618fe9bd354ba
willdavidc/SimonServes,willdavidc/SimonServes
server.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nwindow.addEventListener('load', function (){\n\n// WebGPIO LED Blink\n navigator.requestGPIOAccess().then(\n function(gpioAccess) {\n console.log(\"GPIO ready!\");\n return gpioAccess;\n }).then(gpi...
javascript
edit
0
2
mit
3e00c56e3a426b57c0a7173bb141cfa65b89caf2
chirimen-oh/examples,chirimen-oh/examples
LEDblink/js/main.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport NativeMarkerIndex from '../../build/Release/marker_index'\n\nNativeMarkerIndex.prototype.getRange = function (id) {\n return [this.getStart(id), this.getEnd(id)]\n}\n\nNativeMarkerIndex.prototype.findIntersecting = function (sta...
javascript
edit
0
1
mit
61bf03abdab8f033d395683b0e8d8d8a49ca2cb1
atom/superstring,atom/superstring,atom/superstring,atom/superstring,atom/superstring
src/native/marker-index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\ndefine(function() {\n /**\n * If the browsers follow the spec, then they would expose vendor-specific style as:\n * elem.style.WebkitBorderRadius\n * instead of something like the following, which would be technically incorrect...
javascript
edit
0
1
mit
0f92c927ee36c9dbdda399402123a10c677bff55
Modernizr/Modernizr,Modernizr/Modernizr
src/omPrefixes.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = new AppUtil();\n\nvar util = require(\"util\");\nvar FrameInputStream = require(\"./frame_input_stream\");\n\nfunction AppUtil(){\n \n}\n\nAppUtil.prototype.init = function(argv){\n this.argv = argv;\n return t...
javascript
edit
0
6
mit
8e3a4fd8a71b21e57fe7504e55a5c29dbf8e03d2
gdaws/node-stomp
lib/app_util.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n#!/usr/bin/env node\nvar prerender = require('./lib');\nprocess.env.PORT = process.env.PORT || 4000\n\nvar server = prerender({\n workers: process.env.PHANTOM_CLUSTER_NUM_WORKERS,\n iterations: process.env.PHANTOM_WORKER_ITERATION...
javascript
edit
0
0
mit
bc2f391635d5b4fd1ff3b179066975efb5a84788
GrabCAD/prerender
server.js
rejected_duplicate
Near-duplicate of sample 77286
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar _ = require('lodash')\nvar fs = require('fs')\nvar gzip = require('gzip-size')\nvar filesize = require('filesize')\nvar postcss = require('postcss')\nvar cssstats = require('cssstats')\n\nvar display = require('tachyons-display/pack...
javascript
edit
0
0
mit
cd8b21f64f8863df3ad34fbc4f9bd74ffc692494
topherauyeung/portfolio,cwonrails/tachyons,pietgeursen/pietgeursen.github.io,topherauyeung/portfolio,fenderdigital/css-utilities,topherauyeung/portfolio,matyikriszta/moonlit-landing-page,fenderdigital/css-utilities,getfrank/tachyons,tachyons-css/tachyons
lib/display.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\nimport { Screen } from '../screen';\n\nexport class LoadScreen extends Screen {\n\n // also try deploying and seeing if extended browsersync time is the reason for the memory leak\n\n static enter(/* display */) {\n // this.flick...
javascript
edit
0
1
mit
0d9693fe9692c6eee1c3d1389bd75476cd9896a7
Rabrennie/Roguathia,Rabrennie/Roguathia
src/js/rogue/display/screens/load.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport gql from 'graphql-tag';\nimport { graphql } from 'react-apollo';\n\nimport ProjectList from '../components/ProjectList';\n\nconst MyAppsQuery = gql`\n query MyApps($limit: Int!, $offset: Int!){\n viewer {\n me {\n ...
javascript
edit
0
3
bsd-3-clause
65dc32a3c4a9651112c0fd62add6ded9cd4a20f7
exponentjs/exponent,exponentjs/exponent,exponent/exponent,exponent/exponent,exponentjs/exponent,exponentjs/exponent,exponent/exponent,exponentjs/exponent,exponent/exponent,exponentjs/exponent,exponentjs/exponent,exponent/exponent,exponentjs/exponent,exponent/exponent,exponent/exponent,exponent/exponent,exponent/exponen...
js/Home/containers/MyProjectsListContainer.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// @flow\nimport {isEmpty, isArray, isNil, get, map, filter, includes} from \"lodash\";\n\nimport type {RuleOptions} from \"../types\";\n\nfunction duplicateValuesExist(array): boolean {\n return !isEmpty(filter(array, (value, index, i...
javascript
edit
null
null
mit
354901477144e14145fe7cfbc8c551058a6b4dbb
relekang/validator,cicerono/validator
src/rules/uniqueInArray.js
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport {assert} from 'chai';\n\nimport {jsdom} from 'jsdom';\n\nimport {ImageTransformer} from '../src/imagetransformer';\n\ndescribe('image transformer', function() {\n beforeEach(function() {\n this.document = jsdom();\n ...
javascript
edit
0
1
bsd-3-clause
b49b3c599e1d11847193ab9ca8c79ca22f8e9890
rgbkrk/transformime,rgbkrk/transformime,jdfreder/transformime,jdfreder/transformime,lgeiger/transformime,lgeiger/transformime
test/imageTransformerTest.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst {\n FuseBox,\n SVGPlugin,\n CSSPlugin,\n BabelPlugin,\n WebIndexPlugin,\n} = require(\"fuse-box\");\n\nconst path = require('path')\n\n\nlet fuse, app, vendor, isProduction;\n\n\nfuse = FuseBox.init({\n homeDir: \"src\",\n ...
javascript
edit
0
2
mit
fb25c4937ae08d1557e68d669720ea70c0c4003d
Todolab/frontend,Todolab/frontend
fuse.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// @flow\n\nimport fs from 'fs'\nimport path from 'path'\n\nimport chalk from 'chalk'\nimport stableStringify from 'json-stable-stringify-without-jsonify'\nimport { table } from 'table'\n\nimport { messages as englishMessages } from '.....
javascript
edit
0
2
apache-2.0
4df04efdfbedd9bbf4265c3c24579b01130ac568
oVirt/ovirt-web-ui,oVirt/ovirt-web-ui,oVirt/ovirt-web-ui
scripts/intl/normalize-messages.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\ndefine(function(require) {\n 'use strict';\n\n var TransitionDialogWidget;\n var DialogWidget = require('oro/dialog-widget');\n var TransitionEventHandlers = require('oroworkflow/js/transition-event-handlers');\n var $ = ...
javascript
edit
0
2
mit
df84cf5db5887a180ab96f1278d5d628c0a27bb0
orocrm/platform,orocrm/platform,orocrm/platform
src/Oro/Bundle/WorkflowBundle/Resources/public/js/app/widget/transition-dialog-widget.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// @flow\n\nexport { default as Col } from './Col';\nexport { default as Row } from './Row';\n\n```\n\nApply this change: Revert \"chore(general): expose flex grid row and column as separate components\"\n\nThis reverts commit 7b257071b...
javascript
edit
0
0
mit
eadd7741eb52b7895e68ffa9b46961a436c09966
guzart/fain
packages/fain-src/src/general/FlexGrid/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*!\n * hackerone.reports.comment.create (https://github.com/xc0d3rz/hackerone)\n * Copyright 2016-2017 xc0d3rz(<EMAIL>)\n * Licensed under the MIT license\n */\n\n/**\n *\n * @param id\n * @param param\n * @param callback\n */\nmodule....
javascript
edit
0
1
mit
d096cfad3fe72ccce3f54cbec14c91d9f24a0ea3
xc0d3rz/hackerone
list/reports/comments/close.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict'; // eslint-disable-line\n\nconst compiler = require('marko/compiler');\n\nmodule.exports = {\n process(src, filePath) {\n return compiler.compileFile(filePath);\n },\n};\n\n```\n\nApply this change: Add options to mark...
javascript
edit
0
1
isc
18a8ed79652b2a3dac16a2f8ca1d9506906e481b
WeAreGenki/wag-ui
packages/test/lib/marko/transform.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport debounce from 'lodash.debounce'\n\nclass ResizeHandler {\n constructor() {\n this._queue = []\n this.update = debounce(this.update.bind(this), 150)\n window.addEventListener('resize', this.update)\n }\n\n destroy() {\...
javascript
edit
0
2
mit
847ad988e2f48cea42c3bd1c64e9cad8219417d4
Philipp91/react-measure,souporserious/react-measure,Philipp91/react-measure
src/Resize-Handler.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* Global Includes */\nvar testCase = require('mocha').describe;\nvar pre = require('mocha').before;\nvar preEach = require('mocha').beforeEach;\nvar post = require('mocha').after;\nvar postEach = require('mocha').af...
javascript
edit
0
1
mit
868086bd3c9d71d72a5a7f89229d036a837dcdec
vaibhav3002/artik-sdk,vaibhav3002/artik-sdk
test/media-test.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// Back-end\n\n// Front-end\n$(document).ready(function () {\n // Make about section clickable and open about overlay\n $(\".about\").on('click', function (event) {\n event.preventDefault();\n $('.overlay').addClass('open');\n...
javascript
edit
0
2
mit
c96c3e7d4fdbbbe7dc79194131493df75ab850d8
jonnygovish/Bubble-Blaster-Game,jonnygovish/Bubble-Blaster-Game
js/scripts.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// Karma configuration file, see link for more information\n// https://karma-runner.github.io/0.13/config/configuration-file.html\n\nmodule.exports = function (config) {\n var configuration = {\n basePath: '',\n frameworks: ['jas...
javascript
edit
0
2
mit
0745e71b36992c82ddb13d679c13767be427bd23
gund/ng-http-interceptor,gund/ng2-http-interceptor,gund/ng2-http-interceptor,gund/ng2-http-interceptor,gund/ng-http-interceptor,gund/ng-http-interceptor
karma.conf.js
rejected_duplicate
Near-duplicate of sample 93914
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport path from \"path\";\nimport chalk from \"chalk\";\nimport mergeOptions from \"./mergeOptions\"\nimport findOptionsInFiles from \"./findOptionsInFiles\"\nimport defaultOptions from \"./defaultOptions\"\nimport ConfigurationError f...
javascript
edit
0
6
apache-2.0
d9141e06e7bd3b6e844a7eb56c06e322bf03570a
szhou8813/react-server,emecell/react-server,emecell/react-server,doug-wade/react-server,redfin/react-server,redfin/react-server,doug-wade/react-server,lidawang/react-server,lidawang/react-server,szhou8813/react-server
packages/react-server-cli/src/run.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* eslint-env node */\nmodule.exports = {\n framework: 'qunit',\n test_page: 'tests/index.html?hidepassed',\n disable_watching: true,\n reporter: 'dot',\n launch_in_ci: ['Chrome'],\n launch_in_dev: ['Chrome'],\n browser_args: {\n...
javascript
edit
0
0
mit
515498d74e1268595182f4d8e3bd6f828ee0e88b
danielspaniel/ember-data-change-tracker,danielspaniel/ember-data-change-tracker
testem.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar chai = require('chai');\n\nchai.config.includeStack = true;\n\nglobal.expect = chai.expect;\nglobal.AssertionError = chai.AssertionError;\nglobal.Assertion = chai.Assertion;\nglobal.assert = chai.assert;\n\nvar styleguide = require(...
javascript
edit
0
1
mit
b06e4220506f5f172cd6a69e8299332d94f27b2a
varya/sc5-styleguide,hence-io/sc5-styleguide,junaidrsd/sc5-styleguide,jkarttunen/sc5-styleguide,patriziosotgiu/sc5-styleguide,SC5/sc5-styleguide,ifeelgoods/sc5-styleguide,lewiscowper/sc5-styleguide,lewiscowper/sc5-styleguide,kraftner/sc5-styleguide,varya/sc5-styleguide,patriziosotgiu/sc5-styleguide,ifeelgoods/sc5-style...
test/structure.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * @package assets\n */\n\n(function($) {\n\n\t/**\n\t * This plugin shows and hides elements based on the value of a select box. \n\t * If there is only one option, the select box will be hidden and \n\t * the single element will ...
javascript
edit
0
2
mit
537d4ebf94a5e69d627bef46585a3c3cb1f5ad8c
pixelninja/imagick_effects,avanteweb/symphony-2,bauhouse/sym-pears,mazedigital/jcilearn,wastemobile/Symphony2.3.6,mazedigital/jcilearn,Titch/Symph-test,BloodBrother/symphony-2,ayellowraven/projectplaten,allen/auth.getsymphony.com,symphonycms/symphony-2,symphonycms/sym-getsymphony,bauhouse/Bugaroo,bauhouse/Bugaroo,jdsim...
symphony/assets/symphony.pickable.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { createStore } from 'redux';\nimport Shogi from '../reducers';\n\nlet store = createStore(Shogi);\n\n// debug\nstore.subscribe(\n () => console.log(store.getState())\n);\n\nexport default store;\n\n```\n\nApply this change: Enh...
javascript
edit
0
1
mit
4b39cc8e166e52d3b575df72fa8f32675ea7f6f5
mgi166/usi-front,mgi166/usi-front
frontend/stores/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function(env){\n \"use strict\";\n\n env.ddg_spice_expand_url = function(api_result) {\n\n\t // Get original query.\n var script = $('[src*=\"/js/spice/expand_url/\"]')[0],\n source = $(script).attr(\"src\"),...
javascript
edit
0
3
apache-2.0
920a8af0b549074484078abb4c5c63cd239b9efd
levaly/zeroclickinfo-spice,kevintab95/zeroclickinfo-spice,bigcurl/zeroclickinfo-spice,lernae/zeroclickinfo-spice,iambibhas/zeroclickinfo-spice,lerna/zeroclickinfo-spice,whalenrp/zeroclickinfo-spice,deserted/zeroclickinfo-spice,soleo/zeroclickinfo-spice,iambibhas/zeroclickinfo-spice,xaviervalarino/zeroclickinfo-spice,le...
share/spice/expand_url/expand_url.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport documentFormatter from 'src/logic/documentPackager/documentFormatter';\nimport base64OfSimplePdf from './reference/base64OfSimplePdf';\n\ndescribe('DocumentFormatter', () => {\n describe('format', () => {\n it('should returns...
javascript
edit
0
2
mit
b22d2113f3c724eee62f35690c0a4d8ff3ddf98a
nus-mtp/sashimi-note,nus-mtp/sashimi-note,nus-mtp/sashimi-note
sashimi-webapp/test/unit/specs/logic/formatter/documentFormatter.spec.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nwindow.addEventListener(\"load\", pageFullyLoaded, false);\n\n\nfunction pageFullyLoaded(e) {\n\n//reposition the close button\n//var bar = document.getElementsByClassName(\"titleButton close\");\n//bar[0].style.backgroundPosition = \"-...
javascript
edit
0
1
mit
bd931209163732fff6767c54fb8053bafdf22aef
sjcliffe/Lighthouse,sjcliffe/Lighthouse
Lighthouse/lighthouse-SituationalAwarenessContent.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Controller from '@ember/controller';\nimport { computed } from '@ember/object';\n\nexport default Controller.extend({\n isUpcoming: computed('model.endsAt', function() {\n let endAt = this.get('model.endsAt');\n if (endAt ...
javascript
edit
0
2
apache-2.0
e4c0c3495b404194f29945426ca4148900684c97
ritikamotwani/open-event-frontend,CosmicCoder96/open-event-frontend,CosmicCoder96/open-event-frontend,CosmicCoder96/open-event-frontend,ritikamotwani/open-event-frontend,ritikamotwani/open-event-frontend
app/controllers/my-sessions/view.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * Copy all properties from `props` onto `obj`.\n * @param {object} obj Object onto which properties should be copied.\n * @param {object} props Object from which to copy properties.\n * @returns {object}\n * @private\n */\nexport ...
javascript
edit
0
3
mit
c735ac229eb5abc71c15c66ef1c5a8f76b43790d
developit/preact,developit/preact
src/util.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict'\n\nconst CountdownTimer = (props) => {\n\n const dayString = props.days\n const hourString = props.hours\n\n return (\n <span className=\"banner-timer-wrap\">\n <span className=\"banner-time\">{dayString}</span> ...
javascript
edit
0
3
mit
d2c045a8f98dafcd1993c44f17199630703c2e2e
blockstack/blockstack-site,blockstack/blockstack-site
app/js/components/CountdownTimer.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nfunction runTest()\n{\n FBTest.sysout(\"issue5504.START\");\n\n FBTest.openNewTab(basePath + \"html/5504/issue5504.html\", function(win)\n {\n FBTest.openFirebug();\n var panel = FBTest.selectPanel(\"html\");\n\n ...
javascript
edit
0
1
bsd-3-clause
b3adae5c4082f610b1e6891ed00f6142816edcfc
firebug/tracing-console,firebug/tracing-console
tests/content/html/5504/issue5504.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// gerber file output component\n'use strict'\n\nconst {h} = require('deku')\n\nconst GerberSettings = require('./gerber-settings')\nconst {LayerDefs} = require('../../layer/component')\n\nmodule.exports = function renderGerberOutput({p...
javascript
edit
0
1
mit
2217c1e1a5dcab364f7e56a69c713dfddf69a511
tracespace/viewer,tracespace/viewer
src/app/component/gerber-output.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst {Command} = require('./index.js');\nconst {wotblitz: {default_region}} = require('../../blitzbot.json');\nconst options = {\n\targCount: 1,\n\tdescription: 'Update your personal default region.',\n\tsignatures: ['@BOTNAME set-regi...
javascript
edit
0
10
isc
8c7924d4882e821904b3928a657bae2b99901c0a
CodeMan99/blitzbot
lib/command/setRegion.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport { View } from 'react-native';\n\nimport { Wizard } from '../../widgets';\n\nimport { NewSensorStepOne } from './NewSensorStepOne';\nimport { NewSensorStepTwo } from './NewSensorStepTwo';\n\nconst TabTh...
javascript
edit
0
1
mit
c783b8def6766f25ff9c57c1ec9f1b084cde87d2
sussol/mobile,sussol/mobile,sussol/mobile,sussol/mobile
src/pages/NewSensor/NewSensorPage.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar sync = require('./lib/sync.js');\nvar cron = require('cron');\n\nvar cronJob = cron.job(\"0 */5 * * * *\", function(){\n console.log(\"START!\");\n sync.synchronizeCrmToUmas();\n console.info('cron job completed'...
javascript
edit
0
1
mit
68adac3a9ce3bbdbf5e7c644751a1ccc05e35d29
jimibustamante/ipg-sync
schedule.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// These URL paths will be transformed to CN mirrors.\nvar mirrors = {\n \"//developers.google.com\" : \"//developers.google.cn\",\n \"//firebase.google.com\" : \"//firebase.google.cn\",\n \"//developer.android.com\" : \"//develope...
javascript
edit
0
5
apache-2.0
e614521acb5ee9984c11b42c3faf385c6c1910e8
chenzhuo914/google-cn-devsites-extension
mirrors.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n//= require jquery\n//= require dataTables/jquery.dataTables\n//= require_tree .\n\n$(function() {\n $(document).on('click', '.mail a.preview', function() {\n console.log(this);\n $(this).colorbox({width:\"80%\", height:\"80%\", ...
javascript
edit
0
1
mit
612e2f16ce0f18d60b190517fb89803b844a9ef9
munky69rock/mails_viewer,munky69rock/mails_viewer,pragmaticly/mails_viewer,munky69rock/mails_viewer,pragmaticly/mails_viewer,pragmaticly/mails_viewer
app/assets/javascripts/mails_viewer.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nfunction runTest()\n{\n FBTest.sysout(\"issue5755.START\");\n FBTest.openNewTab(basePath + \"html/5755/issue5755.html\", function (win)\n {\n FBTest.openFirebug();\n var panel = FBTest.selectPanel(\"html\");\n ...
javascript
edit
0
2
bsd-3-clause
2fde4be4450e3e4ceb8a10938b8ae472773e1845
firebug/tracing-console,firebug/tracing-console
tests/content/html/5755/issue5755.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Abstract from './Abstract'\nimport { STRING, TEXT } from 'substance'\nimport { RICH_TEXT_ANNOS } from './modelConstants'\n\nexport default class CustomAbstract extends Abstract {\n static getTemplate () {\n return {\n ty...
javascript
edit
0
2
mit
ead680609ee0ce3361951a3842e4801f3a64b138
substance/texture,substance/texture
src/article/models/CustomAbstract.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst $ = require('jquery');\nimport { getPlayer } from './player/player';\nimport { insertTimestamp, convertTimestampToSeconds, formatMilliseconds } from './timestamps';\n\nlet timeSelectionModalActive = false;\nconst $timeSelection = ...
javascript
edit
0
3
mit
3a8b2a097fb4eafbdb8628a91bc83598bdedd08c
oTranscribe/oTranscribe,oTranscribe/oTranscribe,oTranscribe/oTranscribe
src/js/app/time-selection-modal.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar _ = require(\"lodash\")\nvar publicRoutes = require(\"./public\");\nvar authenticated = require(\"./authenticated\");\nvar routes = [];\n\npublicRoutes.concat(authenticated).forEach(function(route) {\n\n // If route defines an arra...
javascript
edit
0
2
isc
b085f536a556d647ef21fd6af2304b82c39131bd
amilaonbitlab/newww,aredridel/newww,nexdrew/newww,rutaihwa/newww,aredridel/newww,jonathanmarvens/npm-newww,amilaonbitlab/newww,nexdrew/newww,jonathanmarvens/npm-newww,aredridel/newww,kemitchell/newww,watilde/newww,amilaonbitlab/newww,nexdrew/newww,kemitchell/newww,rutaihwa/newww,kemitchell/newww,jonathanmarvens/npm-new...
routes/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nfunction validateJoin (username, email, password) {\n return validateUsername(username, \"join\") && validateEmail(email, \"join\") && validatePassword(password, \"join\");\n}\n\nfunction validateLogin (usernameOrEmail, password) {\n...
javascript
edit
0
3
mit
11bc1b57f20293591709b2a66dbe7416322665ad
shakeelmohamed/egress-bootstrap
public/js/egress-validators.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* @flow */\n/**\n * @jsx React.DOM\n\n\n */\n'use strict';\n\nvar React = require('react');\nvar EditorBase = require('./EditorBase');\n\nclass DropDownEditor extends EditorBase {\n\n getInputNode(): HTMLInputElement{\n return Reac...
javascript
edit
null
null
mit
ffde30ed08f4d79ecf8653ca4e1d99f5f5672e57
somethingnew2-0/react-data-grid
src/addons/editors/DropDownEditor.js
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\"use strict\";\n\nangular.module('arethusa.core').directive('arethusaGrid', [\n 'arethusaGrid',\n 'plugins',\n function(arethusaGrid, plugins) {\n return {\n restrict: 'A',\n scope: {},\n link: function(scope, elem...
javascript
edit
0
1
mit
be39a414139f89119697aff4c3c64ef62ac6de4e
Masoumeh/arethusa,PonteIneptique/arethusa,alpheios-project/arethusa,Masoumeh/arethusa,PonteIneptique/arethusa,fbaumgardt/arethusa,alpheios-project/arethusa,latin-language-toolkit/arethusa,fbaumgardt/arethusa,alpheios-project/arethusa,latin-language-toolkit/arethusa,fbaumgardt/arethusa
app/js/arethusa.core/directives/arethusa_grid.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n//@flow\n\nimport styled from \"styled-components\";\n\nexport const Svg = styled.svg.attrs({\n viewBox: \"0 0 24 24\"\n})`\n ${({ theme, isActive, stateful }: { theme: Theme, isActive: boolean, stateful: boolean }): string => `\n \n...
javascript
edit
null
null
mit
5cdd49cdeb393faca68e3458ec045bd2cf187428
slightly-askew/portfolio-2017,slightly-askew/portfolio-2017
src/elements/chevron/styled-components/Svg.js
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "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 let id = 0;\n\n const now = () => prevTime;\n\n const raf = (cb: Callback) => {\n allCal...
javascript
edit
null
null
mit
7d20fc3e812c04efaf398ffa758479d9256be095
threepointone/react-motion,BenoitZugmeyer/preact-motion,BenoitZugmeyer/preact-motion,threepointone/react-motion,chenglou/react-motion,keyanzhang/react-motion,chenglou/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 router = module.exports = new (require('koa-router'))();\n\nfunction *renderIndex(next) {\n this.locals.me = yield this.api.users('me').get();\n this.locals.projects = yield this.api.projects.get();\n\n if (this.locals.projects.l...
javascript
edit
0
1
mit
bcf14fcf0d2098d73afe8d5fd9e4e9cb6c3ed40f
luin/doclab,luin/doclab
routes/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar exports = {};\n\nexports.simplePrint = function(video) {\n return `**${video.title}**`;\n};\n\nexports.prettyPrint = function(video) {\n try {\n viewCount = video.view_count.replace(/\\B(?=(\\d{3})+(?!\\d))/g, ',');\n } catch ...
javascript
edit
0
2
mit
dfd961e5225eab631fa57c059c26a38960987d36
meew0/Lethe
lib/video-format.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { tracked } from '@glimmer/tracking';\nimport { Resource } from 'ember-could-get-used-to-this';\n\nexport default class ResolveFlatMapBy extends Resource {\n @tracked data;\n\n get value() {\n return this.dataUnpacked?.flat(...
javascript
edit
0
4
mit
34d32dc1e0bc618a9922971f453e7b2f4e7058df
ilios/common,ilios/common
addon/classes/resolve-flat-map-by.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar $ = require('jquery');\nvar m = require('mithril');\nvar $osf = require('js/osfHelpers');\nvar FileViewPage = require('js/filepage');\nvar waterbutler = require('js/waterbutler');\n\nm.mount(document.getElementsByClassName('file-vie...
javascript
edit
0
0
apache-2.0
4054788cd0d17b4b8ee1274bb509914a7fc32db9
emetsger/osf.io,KAsante95/osf.io,TomBaxter/osf.io,zamattiac/osf.io,hmoco/osf.io,Nesiehr/osf.io,amyshi188/osf.io,KAsante95/osf.io,kch8qx/osf.io,brianjgeiger/osf.io,zamattiac/osf.io,mattclark/osf.io,crcresearch/osf.io,brandonPurvis/osf.io,adlius/osf.io,sloria/osf.io,cwisecarver/osf.io,caseyrygt/osf.io,binoculars/osf.io,a...
website/static/js/pages/file-page.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar events = require('events');\nvar Parser = require('./parser');\n\n/**\n * Handles responses from they hyperdeck.\n */\nfunction ResponseHandler(clientSocket) {\n var destroyed = false;\n var notifier = new events.EventEmitter();\n...
javascript
edit
0
5
mit
363fb38389e75b64925f6d17fe2cea5cb6f13941
LA1TV/Hyperdeck-JS-Lib
src/hyperdeck/response-handler.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = {\n 'Demo: GitHub URL Test' : function (browser) {\n browser\n .url('https://github.com')\n .assert.urlEquals('https://github.com/')\n .end();\n },\n 'Demo: GitHub Title Test' : function (browser) {...
javascript
edit
0
1
mit
da85b604bff113872142e731b29123f0c7de1a8e
tatsuyafw/gulp-nightwatch,StoneCypher/gulp-nightwatch
examples/tests/github.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar injectParams = ['$mdToast','websiteDataService'];\n\nvar WebsiteListController = function($mdToast, websiteDataService)\n{\n var vm = this;\n\n vm.websites = [];\n\n vm.$onInit = function()\n {\n ...
javascript
edit
0
3
mit
8fd28995c25e6b032c130371af4921ca8fba6872
RaiTamarindo/HTTPWatchdog,RaiTamarindo/HTTPWatchdog
webapp/src/app/website-list/website-list.controller.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Ember from 'ember';\nimport moment from 'npm:moment';\n\nexport default Ember.Component.extend({\n btnActive: false,\n didReceiveAttrs () {\n this.set('timePeriodChanged', this.get('currentDate'));\n },\n\n init () {\n ...
javascript
edit
null
null
mit
c51290bdc8ea3443cf61862df6c5bb641ff611df
pe1te3son/spendings-tracker,pe1te3son/spendings-tracker
app/components/select-date.js
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst { ERROR } = require('../common/actionTypes/error');\n\nconst mergePermanentAndMetadata = (perm, meta) => Object.assign(perm, meta);\n\nconst createSocketObject = (channel, payload, metadata) => {\n const obj = mergePermanentAndMe...
javascript
edit
0
2
mit
d42f86398539c5078e25cc1aef4a15926de77ac5
dotkom/super-duper-fiesta,dotkom/super-duper-fiesta,dotkom/super-duper-fiesta
server/utils.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\nvar moment = require('moment');\n\n// note that month indices are zero-based\n\nmodule.exports.DATA_START_YEAR = 2012;\nmodule.exports.DATA_START_MONTH = 0;\n\nmodule.exports.DATA_END_YEAR = 2015;\nmodule.exports.DATA_END_MONTH = 9;\n...
javascript
edit
0
0
mit
a2ac4e1b7e30d1ede7247344379ee3fa2d98e6c9
lucified/lucify-refugees,lucified/lucify-refugees,lucified/lucify-refugees,lucified/lucify-refugees
src/js/model/refugee-constants.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = {\n \"extends\": \"airbnb\",\n \"plugins\": [\n \"react\"\n ],\n \"parser\": \"babel-eslint\", // support for decorators etc\n \"rules\": {\n \"import/no-extraneous-dependencies\": [0, {\n \"devDependenc...
javascript
edit
0
0
mit
104f2a631d3a1991752adea1af2df69fe3704372
markreid/scrumdog,markreid/scrumdog
.eslintrc.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar path = require('path');\nvar parseBundle = require('nodecg-bundle-parser');\nvar express = require('express');\nvar app = express();\nvar injectScripts = require('./script_injector');\n\nmodule.exports = function(bu...
javascript
edit
0
2
mit
6508b8ebe888ea7bad813a3427983e53fbfb4dc7
nodecg/nodecg-stubs
lib/server.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar vows = require('vows'),\n\tassert = require('assert'),\n\tbot = require('../lib/bot');\n\nvar client = new bot({\n\t\tserver: 'en.wikipedia.org',\n\t\tpath: '/w'\n\t});\n\nvows.describe('URL fetching').addBatch({\n\t'client,fetchUrl...
javascript
edit
0
1
bsd-2-clause
ff2781171fcff9f79ce42a4549c31a2c358edd96
nandy-andy/nodemw,macbre/nodemw
test/fetchurl-test.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* global self, global, window */\nfunction ifDefined(o) {\n return typeof o !== 'undefined' ? o : false;\n}\n\nvar GlobalContext = ifDefined(self) || ifDefined(global) || ifDefined(window);\n\nif (!GlobalContext) {\n throw new Error(...
javascript
edit
0
0
mit
e8c415b7225e057b3ed0a227197084ae85dc96d6
BackburnerJS/backburner.js,BackburnerJS/backburner.js,ebryn/backburner.js,BackburnerJS/backburner.js,ebryn/backburner.js
lib/backburner/platform.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\n/**\n * @ngdoc function\n * @name SubSnoopApp.controller:StatsCtrl\n * @description\n * # UserStatsCtrl\n * Controller of the SubSnoopApp\n */\nangular.module('SubSnoopApp')\n .controller('UserStatsCtrl', ['$scope', 's...
javascript
edit
0
1
mit
7eb9f513f6d460ac60d6e7079d99b56152cd06d8
sharibarboza/SubSnoop,sharibarboza/SubSnoop
app/scripts/controllers/userstats.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\"use strict\";\nvar R = require('ramda');\nvar errors = require('../errors');\nvar bcrypt = require('bcrypt-nodejs');\nvar Promise = require('bluebird');\n\nmodule.exports = {\n encryptPassword: function encryptPassword(password) {\n ...
javascript
edit
0
2
mit
aa53de544793bdd5c042af69c6cc709376195fac
kdelemme/skeleton-api
lib/directives/password.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar exec = require('child_process').exec,\n lumbar = require('lumbar');\n\nmodule.exports = {\n generateToken: function(command, callback) {\n exec(command, {cwd: lumbar.fileUtil.lookupPath()}, function(err, stdout, stderr) {\n ...
javascript
edit
0
3
mit
1e17d06b8bef2f94198b95ca7294f522b814e74e
walmartlabs/lumbar-long-expires
lib/lumbar-long-expires.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\ndescribe('after storing garbage data', () => {\n // This is the key from storage.js.\n const runsKey = 'playbyplay_runs_A*O%y21#Q1WSh^f09YO!';\n\n beforeEach(() => {\n localStorage[runsKey] = 'Not JSON!';\n });\n\n ...
javascript
edit
0
1
mit
df9cd8a484cc58f468e2544a193dc66a228a7f5f
peferron/localhistory,peferron/localhistory
test/tests/garbage.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict'\n\nangular.module('soundmist').service('API', function ($http, $q) {\n const API_BASE = 'https://api-v2.soundcloud.com/';\n let self = this\n\n this.getStream = function () {\n let config = {\n method: 'GET',\n ...
javascript
edit
0
3
cc0-1.0
8b47e56edd313fa1f0b0d1ef95a9d21f1c0f3016
Kattjakt/soundmist,Kattjakt/soundmist
app/services/api.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport test from \"ava\";\nimport {runKaba} from \"./lib/runner\";\n\n\n/**\n * @typedef {{\n * status: number,\n * dir?: string,\n * args?: string[],\n * match?: RegExp,\n * noMatch?: RegExp,\n * }} FixtureConf...
javascript
edit
0
6
bsd-3-clause
aac8a4a4a160900992f93a317b0a20edcdae8378
Becklyn/kaba,Becklyn/kaba
tests/all_fixtures.js
rejected_duplicate
Near-duplicate of sample 88937
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nexports = module.exports = function(keyGenerator) {\n var api = {};\n \n api.generateKey = function(options, cb) {\n keyGenerator.generate(options, cb);\n }\n \n return api;\n};\n\nexports['@implements'] = 'http://i.bixbyjs.org...
javascript
edit
0
1
mit
3a6956d1b62dbc6ac7a432e9ecc1e78ed4d07278
bixbyjs/bixby-crypto
xom/main.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\njQuery(document).ready(function() {\n var loginToken = window.localStorage.getItem(\"token\");\n\n setTimeout(function() {\n keepAliveTwo(loginToken);\n }, 500);\n\n displayAllUsersForCoach();\n\n function displayA...
javascript
edit
0
1
mit
387764d2d9116155381c973c72cb6ab9247e1047
pyre101/PJC-App,pyre101/PJC-App,pyre101/PJC-App,pyre101/PJC-App,pyre101/PJC-App
www/js/userlist.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport {\n Environment,\n Network,\n RecordSource,\n Store,\n} from 'relay-runtime';\nimport { getToken } from 'app/utils/token';\n\nconst GRAPHQL_PORT = process.env.GRAPHQL_PORT;\nconst GRAPHQL_HOST = process.env.GRAPHQL_HOST;\n\n/...
javascript
edit
0
3
mit
ecefe8fba8d628310411dc7839d8539a38d28c0e
VineRelay/VineRelayStore,VineRelay/VineRelayStore
app/config/relay.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * Copyright 2021 The AMP HTML Authors. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy o...
javascript
edit
0
1
apache-2.0
ceb38d8536f8e650e506fca4b2acd4e6c097ab0f
ampproject/bentojs.dev,ampproject/bentojs.dev
gulpfile.js/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { fromJS } from 'immutable';\nimport {\n SERVER_DATA_ACTIVE_SYMBOLS,\n} from '../_constants/ActionTypes';\n\nconst initialState = fromJS([]);\n\nexport default (state = initialState, action) => {\n switch (action.type) {\n ...
javascript
edit
0
2
mit
8b9c10ca230de112666acd1c449f4e64e1a9f580
binary-com/binary-next-gen,nuruddeensalihu/binary-next-gen,nuruddeensalihu/binary-next-gen,qingweibinary/binary-next-gen,qingweibinary/binary-next-gen,binary-com/binary-next-gen,qingweibinary/binary-next-gen,nazaninreihani/binary-next-gen,nuruddeensalihu/binary-next-gen,binary-com/binary-next-gen,nazaninreihani/binary-...
src/_reducers/AssetsReducer.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React, { PropTypes } from 'react';\n\nimport './index.css';\n\nconst Pit = React.createClass({\n propTypes: {\n pit: PropTypes.object.isRequired,\n },\n\n render() {\n const { pit } = this.props;\n\n return (\n <...
javascript
edit
0
2
mit
3ec7070176754812f1945bc149892871ae514742
transparantnederland/relationizer,transparantnederland/browser,transparantnederland/relationizer,waagsociety/tnl-relationizer,waagsociety/tnl-relationizer,transparantnederland/browser
app/components/Pit/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport dateUtil from '../common/date-util';\n\nconst dateMap = {\n days: 1,\n weeks: 7\n};\n\nexport default function({ referenceDate, back, forward, scale = 'days' }) {\n // The \"1\" here accounts for the referenceDate itself.\n v...
javascript
edit
0
6
mit
2e983162406645b93f1949ebedf088466c532b57
jmeas/cal,jmeas/cal
src/cal-view/timeline-generator.js
rejected_duplicate
Near-duplicate of sample 86128
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nexport const initialState = {\n user: {\n isAuthenticated: false,\n email: '',\n userType: '',\n isAdmin: false\n },\n global: {\n workingOn: {}\n },\n rootPath: \"/florence\",\n team...
javascript
edit
0
0
mit
5113d62ea4f4118ceee86f0310a10b582e8eb679
ONSdigital/florence,ONSdigital/florence,ONSdigital/florence,ONSdigital/florence
src/app/config/initialState.js
rejected_duplicate
Near-duplicate of sample 68107
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nconst React = require('react');\nconst {string} = React.PropTypes;\n\nconst InventoryDetail = React.createClass({\n displayName: 'InventoryDetail',\n propTypes: {\n\n // state\n name: string.isRequired,\n typ...
javascript
edit
0
1
mit
15a89a4537f331e72fa600dd1250063c2a719032
jevakallio/blackout,jevakallio/blackout
src/components/inventory-detail.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*\n * @module Clickable\n * @namespace component\n * @desc Used to make a game component perfom an action when she's clicked\n * @copyright (C) SpilGames\n * @author Jeroen Reurings\n * @license BSD 3-Clause License (see LICENSE ...
javascript
edit
0
3
bsd-3-clause
0772e60e65419027d0761d7c174af098f7fc79a3
spilgames/glue,spilgames/glue
js/modules/glue/component/clickable.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\"use strict\";\n\nvar $ = require(\"jquery\");\nvar Plugin = require(\"../modules/Plugin\");\nvar Utils = require(\"../modules/Utilities\");\nvar bandcamp = Object.create(Plugin);\n\nbandcamp.init(\"bandcamp\", \"Bandcamp\"...
javascript
edit
0
7
mit
190a71eed1e158ad61b44f8f7c51b764f52264fe
m9x/np2file,nsue/scroblr,nwalker/scroblr,Nicholi/scroblr,Amir-Saeed/scroblr,Nicholi/scroblr,nsue/scroblr,m9x/np2file,mziyut/scroblr,cgravolet/scroblr,Amir-Saeed/scroblr,cgravolet/scroblr,nwalker/scroblr,bdukes/scroblr,mziyut/scroblr,bdukes/scroblr
src/js/plugins/bandcamp.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar page = require(\"webpage\").create();\r\nvar system = require(\"system\");\r\n\r\npage.paperSize = {\r\n width: '6in',\r\n height: '4in',\r\n margin: {\r\n top: '10px',\r\n left: '15px',\r\n right: '15p...
javascript
edit
0
1
mit
bc8091335f931aa5f7a899997552ec90951b9221
mediathread/mdtprint,mediathread/mdtprint,mediathread/mdtprint
app/js/rasterize.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React, { Component } from 'react'\n\nimport ResponseFields from './ResponseFields.js'\n\nexport default class ResponseList extends Component {\n render () {\n return (\n <div className=\"response-list\">\n { this....
javascript
edit
0
1
mit
a2df0767a1dd2d783260d31a75c482117d100bcc
ONSdigital/eq-author,ONSdigital/eq-author,ONSdigital/eq-author
src/components/ResponseList.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// Include needed files\nvar fluffbot = require('../lib/fluffbot')\nvar discord = require('discord.js')\nvar event = require('../lib/event')\n\n// Instantiate bots\nvar fluffbot = new fluffbot()\ndiscord = new discord.Client({autoReconn...
javascript
edit
0
3
mit
42db1fe428fec30e0d9ff8dbe2e5e57b8ef31533
FluffyMatt/fluffbot
bin/bot.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// This is a manifest file that'll be compiled into application.js, which will include all the files\n// listed below.\n//\n// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,\n// or a...
javascript
edit
0
0
apache-2.0
1c15bfc35540bef03a535ffa49ba43ee629d0ae1
gtrujillop/RealEstateWeb,gtrujillop/RealEstateWeb,gtrujillop/RealEstateWeb
app/assets/javascripts/application.js
rejected_duplicate
Near-duplicate of sample 95329
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* eslint-env es6 */\n/* global THREE, VertexIndices */\nfunction transformBoxVertices( method ) {\n 'use strict';\n\n const vector = new THREE.Vector3();\n const zero = new THREE.Vector3();\n\n return function transform( geometry, ...
javascript
edit
0
5
mit
9edc67b651c5a55dc0c1645e49a695e831313a5b
razh/experiments-three.js,razh/experiments-three.js
lathe/js/box-geometry.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar depositCallbackJob = require(__dirname+'/../jobs/deposit_completion_callback.js');\nvar OutgoingPayment = require(__dirname+'/outgoing_payment.js');\n\nfunction OutgoingPaymentProcessor(payment) {\n this.outgoingPayment = new Outgo...
javascript
edit
0
2
isc
fc4cefa5fbf5f0d4172b3164cc4fba6e2cc53c98
crazyquark/gatewayd,zealord/gatewayd,whotooktwarden/gatewayd,crazyquark/gatewayd,zealord/gatewayd,xdv/gatewayd,Parkjeahwan/awegeeks,whotooktwarden/gatewayd,Parkjeahwan/awegeeks,xdv/gatewayd
lib/core/outgoing_payment_processor.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar AdminPanel = function() {\n var self = this;\n $('.admin_toggle').change(function() {\n self.togglePrivileges(this, $(this).data('url'), 'admin', this.checked);\n });\n $('.instructor_toggle').change(function() {\...
javascript
edit
0
1
mit
bccb1bbca876ac094c5d950d08803e8b9159716f
jolting/anacapa-grader-alpha,pconrad/anacapa-grader-alpha,project-anacapa/anacapa-grader-alpha,jolting/anacapa-grader-alpha,pconrad/anacapa-grader-alpha,project-anacapa/anacapa-grader-alpha,jolting/anacapa-grader-alpha,project-anacapa/anacapa-grader-alpha,pconrad/anacapa-grader-alpha
app/assets/javascripts/admin_panel.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// Make all tables striped by default.\n$(\"table\").addClass(\"table table-striped\");\n\n\n// Handle foldable challenges and solutions (on click and at start).\n$(\".challenge,.discussion,.solution\").click(function(event) {\n var ...
javascript
edit
0
3
cc0-1.0
6f6cba4dfd9457e8e81a838f485b869dff2b242d
Reproducible-Science-Curriculum/rr-literate-programming,Reproducible-Science-Curriculum/rr-automation,Reproducible-Science-Curriculum/rr-literate-programming,Reproducible-Science-Curriculum/rr-automation
assets/js/lesson.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { defaultTemplate } from './basic-grid-template'\nimport { appendIfMissing } from '@zambezi/d3-utils'\nimport { select } from 'd3-selection'\n\nexport function createSetupGridTemplate() {\n\n const appendStirrup = appendIfMissin...
javascript
edit
0
2
mit
223c0c3a17f8deaf57bc4a67c4b452ed313d89b8
zambezi/grid
src/setup-grid-template.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar webpack = require('webpack');\nvar path = require('path');\nvar common = require('../webpack.common.config.js');\nvar assign = require('object-assign');\nvar BundleTracker = require('webpack-bundle-tracker');\n\nvar websiteRoot = pa...
javascript
edit
0
1
apache-2.0
3bb552080ff1dd94e4dc8be3e1e5306931d46cd2
mluo613/osf.io,adlius/osf.io,hmoco/osf.io,CenterForOpenScience/osf.io,monikagrabowska/osf.io,alexschiller/osf.io,felliott/osf.io,mluo613/osf.io,icereval/osf.io,baylee-d/osf.io,chennan47/osf.io,binoculars/osf.io,Nesiehr/osf.io,mfraezz/osf.io,cslzchen/osf.io,mfraezz/osf.io,sloria/osf.io,brianjgeiger/osf.io,hmoco/osf.io,m...
admin/webpack.admin.config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Ember from 'ember';\nimport DS from 'ember-data';\nexport default DS.RESTAdapter.extend({\n defaultSerializer: '-fhir',\n\n pathForType: function(type){\n return Ember.String.capitalize(Ember.String.camelize(type));\n },\n\...
javascript
edit
0
2
mit
99b12ecb915676f2f391e674ccc30b915204741b
intervention-engine/ember-fhir-adapter,intervention-engine/ember-fhir-adapter
addon/adapters/application.js
accepted
null
true