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 path = require('path');\nconst webpack = require('webpack');\nconst CopyWebpackPlugin = require('copy-webpack-plugin');\n\nconst config = {\n entry: {\n 'bundle': './client/js/index.js'\n },\n output: {\n path: path.join(...
javascript
edit
0
0
mit
2ac1100d313c1bd80c4230dff605c51e39048009
flammenmensch/proverbs-and-sayings,flammenmensch/proverbs-and-sayings
webpack.config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nsetTimeout( function() {\n\n\tvar util = require( \"util\" );\n\n\tprocess.on('uncaughtException', function (err) {\n\t console.error(err);\n\t console.log(\"Node NOT Exiting...\");\n\t});\n\n\tvar audioEngineImpl = require( \"../Debu...
javascript
edit
0
2
mit
517f1514da2ee5ab1037badc574e1975ec386959
GeorgeStrakhov/node-core-audio,ZECTBynmo/node-core-audio,ZECTBynmo/node-core-audio,ZECTBynmo/node-core-audio,GeorgeStrakhov/node-core-audio,ZECTBynmo/node-core-audio,GeorgeStrakhov/node-core-audio,GeorgeStrakhov/node-core-audio
Test/AudioEngineTest.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React, {Component} from 'react';\nimport Chart from './Chart'\n\nclass HueResult extends Component {\n constructor(props) {\n super(props);\n }\n \n render(){\n return (\n <div>\n <h1>Results...
javascript
edit
0
1
mit
3839cf5bd8fa7b54ec3f06b2c27e97fbe2ccd0ec
FilmonFeMe/coloreyes,FilmonFeMe/coloreyes
src/components/HueResult.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Ember from 'ember';\nimport moment from 'moment';\nimport stringToHue from 'bus-detective/utils/string-to-hue';\nvar inject = Ember.inject;\n\nexport default Ember.Component.extend({\n tagName: 'li',\n clock: inject.service(),\...
javascript
edit
0
1
mit
0b03bc33b13dcf1a9deb4f4a7435ec77f3308371
bus-detective/web-client,bus-detective/web-client
app/components/bd-arrival.js
rejected_duplicate
Near-duplicate of sample 77711
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*\n * Copyright (C) 2013 salesforce.com, inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n ...
javascript
edit
0
4
apache-2.0
e905ad177f78ad40a7b8472c5e852ffc2de07471
badlogicmanpreet/aura,madmax983/aura,SalesforceSFDC/aura,TribeMedia/aura,lcnbala/aura,badlogicmanpreet/aura,SalesforceSFDC/aura,madmax983/aura,navyliu/aura,igor-sfdc/aura,DebalinaDey/AuraDevelopDeb,forcedotcom/aura,SalesforceSFDC/aura,madmax983/aura,navyliu/aura,igor-sfdc/aura,TribeMedia/aura,lhong375/aura,igor-sfdc/au...
aura-components/src/main/components/ui/outputText/outputTextRenderer.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Ember from 'ember';\nimport $ from 'jquery';\n\nexport default Ember.Controller.extend({\n spendingsMeter: 0.00,\n sumByCategory: null,\n\n watchAddSpending: function () {\n this.updateSpendingsMeter();\n }.observes('model...
javascript
edit
null
null
mit
2f9172dd0c6a5433592b97e5fc203640869654e6
pe1te3son/spendings-tracker,pe1te3son/spendings-tracker
app/controllers/home.js
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\n\tconst execute = require('../lib/executeCommand');\n\n\tmodule.exports = (vm) => {\n\n\t\treturn new Promise((resolve, reject) => {\n\n\t\t\texecute(['showvminfo', '\"' + vm + '\"']).then(stdout => {\n\n\t\t\t\tlet info = [];\n\n\t\t...
javascript
edit
0
4
mit
24310a75287aea1947f22c152d7966433d4d0bb3
VBoxNode/NodeVBox
actions/vmInfo.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nrequire(\n {\n paths: {\n assert: 'src/assert',\n bunit: 'src/bunit'\n }\n },\n ['bunit', 'tests/tests'],\n function(bunit, tests) {\n require.ready(function() {\n var r ...
javascript
edit
0
1
mit
658812bb2ec2a3423e7c3cb0ff676e1e7b5d1f35
bebraw/bunit.js
main.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Ember from 'ember';\nimport Navbar from 'ember-bootstrap/components/base/bs-navbar';\n\nexport default Navbar.extend({\n classNameBindings: ['breakpointClass', 'backgroundClass'],\n\n /**\n * Defines the responsive toggle bre...
javascript
edit
0
1
mit
867325b8ffd256a481983966da69edfc0981ef6c
kaliber5/ember-bootstrap,kaliber5/ember-bootstrap,jelhan/ember-bootstrap,jelhan/ember-bootstrap
addon/components/bs4/bs-navbar.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar schedule = require('node-schedule');\nvar syncTask = require('./tasks/sync');\n\n// Update entries every 30 minutes\nschedule.scheduleJob('0,30 * * * *', syncTask);\n\n```\n\nApply this change: Add sync to start up tasks" }, { ...
javascript
edit
0
0
mit
32db1c929c2a7bf2bd78acf2553cd74a30fde81e
web-audio-components/web-audio-components-service
lib/taskManager.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nexport default {\n input: 'bin/capnpc-es.js',\n output: {\n file: 'dist/bin/capnpc-es.js',\n format: 'cjs'\n }\n};\n\n```\n\nApply this change: Add shebang to the binary file" }, { "role": "assistant", "content": "e...
javascript
edit
0
0
mit
18fe24f19444d24f1b453e6fcd908eddcff4165a
mattyclarkson/capnp-es
rollup.binary.config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nconst bindings = process.atomBinding('shell');\n\nexports.beep = bindings.beep;\nexports.moveItemToTrash = bindings.moveItemToTrash;\nexports.openItem = bindings.openItem;\nexports.showItemInFolder = bindings.showItemIn...
javascript
edit
0
3
mit
5e5313d8b1659f9fbdee5ff3cf6198c696928005
wan-qy/electron,kokdemo/electron,aliib/electron,miniak/electron,minggo/electron,MaxWhere/electron,stevekinney/electron,brave/muon,posix4e/electron,minggo/electron,rajatsingla28/electron,voidbridge/electron,renaesop/electron,MaxWhere/electron,pombredanne/electron,kcrt/electron,wan-qy/electron,Floato/electron,thompsoneme...
atom/common/api/lib/shell.js
accepted
null
true
[ { "role": "user", "content": "Write javascript code for the following: Add the icon to the devtools panel\n\nRelated to #95." }, { "role": "assistant", "content": "chrome.devtools.panels.create(\n 'Redux', 'img/scalable.png', 'devpanel.html', function(panel) {}\n);\n" } ]
javascript
new_file
0
1
mit
a2eabdfe43c47342201466d0ded6392964bca4cb
zalmoxisus/redux-devtools-extension,zalmoxisus/redux-devtools-extension
src/browser/extension/devtools/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nFactoryBoy = {};\nFactoryBoy._factories = [];\n\nFactory = function (name, collection, attributes) {\n this.name = name;\n this.collection = collection;\n this.attributes = attributes;\n};\n\nFactoryBoy.define = function (name, colle...
javascript
edit
0
3
mit
4197b869b65dba800fbf16c5e96088735a6c4c35
sungwoncho/factory-boy
lib/factory_boy.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n*\n*\n* Shows: special features for models\n* Requires:\n**/\n\nshowcase.specials = {}\nshowcase.specials.inlinespace = 'inlinespace__'\n\nshowcase.specials.onLoaded = function () {\n\tvar skin_shape = $('x3d Shape#'+showcase.speci...
javascript
edit
0
3
apache-2.0
35ce9b283e9e19bc752a661ca608d5a3dacc292d
rwth-acis/Anatomy2.0,rwth-acis/Anatomy2.0,rwth-acis/Anatomy2.0,rwth-acis/Anatomy2.0
src/js/showcase-specials.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\ndefine(['backbone', 'core/views/MapView', 'hbs!core/templates/map-browse'], function(Backbone, MapView, mapBrowseTemplate) {\n\n var MapBrowseLayout = Backbone.View.extend({\n manage: true,\n template: mapBrowseTemplate...
javascript
edit
0
1
apache-2.0
6511caef65366b09792d566fc3184ba88fe6f211
ox-it/moxie-js-client,ox-it/moxie-js-client,ox-it/moxie-js-client,ox-it/moxie-js-client
app/core/views/MapBrowseLayout.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar mongoose = require('mongoose'),\n\tcrypto = require('crypto'),\n\n\tSchema = mongoose.Schema,\n\n\tUser = new Schema({\n\t\tusername: {\n\t\t\ttype: String,\n\t\t\tunique: true,\n\t\t\trequired: true\n\t\t},\n\t\thashedPassword: {\n...
javascript
edit
0
1
mit
cb8176a827b25f7e148606da45a62a312a1018a1
MichalTuleja/jdl-backend,ealeksandrov/NodeAPI
libs/model/user.js
rejected_duplicate
Near-duplicate of sample 85059
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar DefaultStack = require('./stacks/default');\nvar entityMap = require('html-tokenizer/entity-map');\n// @TODO examine other tokenizers or parsers\nvar Parser = require('html-tokenizer/parser');\n\nmodule.exports = fu...
javascript
edit
0
3
apache-2.0
7e9f1de81def0f6e02207edfba35173854f1d6e3
wayfair/tungstenjs,wayfair/tungstenjs
src/template/html_parser.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n{\n angular.module('meganote.users')\n .directive('userLinks', [\n\n 'CurrentUser',\n (CurrentUser) => {\n\n class UserLinksController {\n user() {\n return CurrentUser.get();\n }\n ...
javascript
edit
0
1
mit
a4cb20d83dab1560e42b4ff538b8971245ab20ef
xternbootcamp16/meganote,xternbootcamp16/meganote
app/users/user-links.directive.js
rejected_duplicate
Near-duplicate of sample 74175
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* global require, module, __dirname */\n\nconst path = require( 'path' );\n\nmodule.exports = {\n\tentry: {\n\t\t'./assets/js/amp-blocks-compiled': './blocks/index.js',\n\t\t'./assets/js/amp-block-editor-toggle-compiled': './assets/src...
javascript
edit
0
0
apache-2.0
9e80530cde993e07333bcdecde6cccf658c52a4a
GoogleForCreators/web-stories-wp,GoogleForCreators/web-stories-wp,GoogleForCreators/web-stories-wp,GoogleForCreators/web-stories-wp,GoogleForCreators/web-stories-wp
webpack.config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar webpack = require(\"webpack\");\nvar CopyWebpackPlugin = require(\"copy-webpack-plugin\");\nvar path = require(\"path\");\n\nmodule.exports = {\n entry: \"./src/com/mendix/widget/badge/Badge.ts\",\n output: {\n path: __...
javascript
edit
0
0
apache-2.0
2c2acda39035ee78daab8e3bcb658696533b1c36
mendixlabs/badge,mendixlabs/badge
webpack.config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst path = require('path');\nconst webpack = require('webpack');\n\nmodule.exports = {\n entry: {\n home: path.join(__dirname, 'app/src/home'),\n },\n\n module: {\n loaders: [\n {\n test: /\\.sass$/,\n load...
javascript
edit
0
0
mit
6da8f2e871e0b3c30debd93fe22df630a5b27db0
arkis/arkis.io,arkis/arkis.io
webpack.config.js
rejected_duplicate
Near-duplicate of sample 103680
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\nvar webpack = require('webpack');\nvar LodashModuleReplacementPlugin = require('lodash-webpack-plugin');\nvar env = process.env.NODE_ENV;\n\nvar reactExternal = {\n root: 'React',\n commonjs2: 'react',\n commonjs...
javascript
edit
0
0
mit
70bce90b7f1df2bbcbf9bfd4a638a20952b3bc33
RinconStrategies/react-web-animation,RinconStrategies/react-web-animation,bringking/react-web-animation
webpack.config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar should = require('chai').should();\nvar bitcoinlib = require('../../');\nvar sinon = require('sinon');\nvar Chain = bitcoinlib.RPCNode.Chain;\n\ndescribe('Bitcoind Chain', function() {\n\n describe('#_writeBlock', ...
javascript
edit
0
1
mit
f0aaff823cec2b5733397f0eff4fd22d14de48e2
bitpay/chainlib-bitcoin
test/bitcoind/chain.unit.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\ndefine(['react'], function(React) {\n var SearchResults = React.createClass({\n render: function() {\n return React.DOM.div({}, this.props.query);\n }\n });\n return SearchResults;\n});\n\n```\n\nApply ...
javascript
edit
0
1
apache-2.0
0ed54d51529f68fda56ad2da8f169e6dea8e5584
CCI-MOC/GUI-Frontend,CCI-MOC/GUI-Frontend,CCI-MOC/GUI-Frontend,CCI-MOC/GUI-Frontend,CCI-MOC/GUI-Frontend
troposphere/static/js/components/images/search_results.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst routeRegex = /^\\/(global-game-jam-2021|globalgamejam2021|ggj2021|ggj21)(?:\\/.*)?$/;\n\nconst githubUrl = 'https://levilindsey.github.io/global-game-jam-2021';\n\n// Attaches the route handlers for this app.\nexports.attachRoutes...
javascript
edit
0
4
mit
aa967b9335eb12b9af42abf9ee248b2c7b3aa9d9
levilindsey/levi.sl,levilindsey/levi.sl
apps/global-game-jam-2021/routes.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst {\n ActionController\n} = require('backrest')\n\nclass ApplicationController extends ActionController.Base {\n\n get before() {\n return [\n { action: this._setHeaders }\n ]\n }\n\n constructor() {\n super()\n }...
javascript
edit
0
1
mit
7700c7c436612517a03f2b7fdc7fabb7b0fd3863
passabilities/backrest
template/app/controllers/application_controller.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* @flow */\n\nimport path from 'path'\n\nimport State from '../State'\nimport File from '../File'\nimport Rule from '../Rule'\n\nimport type { Command, OptionsInterface, Phase } from '../types'\n\nexport default class CopyTargetsToRoot...
javascript
edit
null
null
mit
764258718d976aa826e16fd470954f18f8eabf65
yitzchak/ouroboros,yitzchak/ouroboros,yitzchak/dicy,yitzchak/dicy,yitzchak/dicy
packages/core/src/Rules/CopyTargetsToRoot.js
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```javascript\ndefine(['backbone'], function(Backbone) {\n \n return Backbone.Model.extend({\n idAttribute: 'SHIPPINGID',\n urlRoot: '/shipment/shipments',\n \n /*\n Validators for shipment, used for both editables and new shipme...
javascript
edit
0
1
apache-2.0
e325455147e4a0d9a02c10729a2cc45a66f149e9
DiamondLightSource/SynchWeb,DiamondLightSource/SynchWeb,tcspain/SynchWeb,DiamondLightSource/SynchWeb,tcspain/SynchWeb,tcspain/SynchWeb,tcspain/SynchWeb,tcspain/SynchWeb,tcspain/SynchWeb,DiamondLightSource/SynchWeb,DiamondLightSource/SynchWeb,DiamondLightSource/SynchWeb
client/js/models/shipment.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('search-result', 'Integration | Component | search result', {\n integration: true\n});\n\ntest('it renders', f...
javascript
edit
0
1
apache-2.0
80e679cd33528d8050097e681bad0020c2cf0a4c
laurenrevere/ember-preprints,pattisdr/ember-preprints,laurenrevere/ember-preprints,baylee-d/ember-preprints,pattisdr/ember-preprints,CenterForOpenScience/ember-preprints,caneruguz/ember-preprints,caneruguz/ember-preprints,CenterForOpenScience/ember-preprints,hmoco/ember-preprints,baylee-d/ember-preprints,hmoco/ember-pr...
tests/integration/components/search-result-test.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Model from 'ember-data/model';\nimport DS from 'ember-data';\nimport { validator, buildValidations } from 'ember-cp-validations';\n\nconst Validations = buildValidations({\n title: validator('presence', true),\n composers: vali...
javascript
edit
0
1
bsd-2-clause
75000c3d890987385e0c3a832dc0f8a5bc247146
barberscore/barberscore-web,barberscore/barberscore-web,barberscore/barberscore-web
app/models/chart.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\n/**\n * Module dependencies.\n */\nvar passport = require('passport'),\n refresh = require('passport-oauth2-refresh'),\n SpotifyStrategy = require('passport-spotify').Strategy,\n config = require('../config'),\n use...
javascript
edit
0
2
mit
aa58e823ae5f6ce86b71996a1014ad9aca01ea2b
mbukosky/SpotifyUnchained,mbukosky/SpotifyUnchained,mbukosky/SpotifyUnchained,mbukosky/SpotifyUnchained
config/strategies/spotify.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = function (context, statusChain) {\n context.log.debug(`Reducing status chain ${statusChain}`);\n\n const reduced = statusChain.reduce((overallStatus, currentStatus) => {\n if (currentStatus === 'error' || overallSt...
javascript
edit
0
4
mit
644fa033779995474b353d452c4384faaa3917a4
jarrodldavis/probot-gpg
lib/reduce-statuses.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar conjoiners = require('../lib/conjoiners');\n\nexports['simple inter-process communication'] = function(test) {\n test.expect(3);\n\n var value = 'test_value';\n var cj1 = {};\n var cj1Name = 'test';\n ...
javascript
edit
0
1
apache-2.0
b0e05495d46f45bea07de5bbdf359fdf8416c7f3
conjoiners/conjoiners-node.js
test/conjoiner.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\"use strict\";\n\nvar URLS = (function() {\n var BASE = 'https://raw.githubusercontent.com/robertpainsi/robertpainsi.github.data/master/';\n\n return {\n BASE: BASE,\n PROGRAM_STATISTICS: BASE + 'catrobat/statistics...
javascript
edit
0
2
mit
29b811034c553c20275231167c1c005d619be346
robertpainsi/robertpainsi.github.io,robertpainsi/robertpainsi.github.io
templates/urls.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nfunction runTest()\r\n{\r\n FBTest.sysout(\"issue6547.START\");\r\n\r\n FBTest.openNewTab(basePath + \"cookies/6547/issue6547.php\", function(win)\r\n {\r\n FBTest.openFirebug();\r\n FBTest.selectPanel(\"net\");\r...
javascript
edit
0
1
bsd-3-clause
b6a7938d97dfcbceca256292ad8f3d68742d576d
firebug/tracing-console,firebug/tracing-console
tests/content/cookies/6547/issue6547.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\n(function() {\n 'use strict';\n\n angular.module('dimApp').component('dimItemTag', {\n controller: ItemTagController,\n bindings: {\n item: '='\n },\n template: `\n <select ng-options=\"tag as tag.label | trans...
javascript
edit
0
2
mit
a75aa8e8c07652d7e4910b6d2e70e3d7f08fe569
chrisfried/DIM,bhollis/DIM,DestinyItemManager/DIM,delphiactual/DIM,DestinyItemManager/DIM,DestinyItemManager/DIM,chrisfried/DIM,48klocs/DIM,bhollis/DIM,bhollis/DIM,DestinyItemManager/DIM,bhollis/DIM,chrisfried/DIM,LouisFettet/DIM,LouisFettet/DIM,48klocs/DIM,delphiactual/DIM,delphiactual/DIM,chrisfried/DIM,48klocs/DIM,d...
app/scripts/move-popup/dimItemTag.directive.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar mongoose = require('mongoose');\n\nvar captionSchema = new mongoose.Schema({\n _id: { type: String, unique: true},\n url: String,\n captions: [{\n start: Number,\n dur: Number,\n value: String,\n extra_data: A...
javascript
edit
0
0
mit
0445f6472b615cd0915ed5b681dff162986e4903
yaskyj/fastcaption,yaskyj/fastcaption,yaskyj/fastcaptions,yaskyj/fastcaptions
models/Captions.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\"use strict\";\n\nconst dedent = require(\"dedent\");\n\nmodule.exports = filterOptions;\n\nfunction filterOptions(yargs) {\n // Only for 'run', 'exec', 'clean', 'ls', and 'bootstrap' commands\n const opts = {\n scope: {\n de...
javascript
edit
0
1
mit
21e134c3d11e3ce688735bf1b59d37f847c19b3c
lerna/lerna,sebmck/lerna,lerna/lerna,kittens/lerna,evocateur/lerna,lerna/lerna,evocateur/lerna
core/filter-options/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport express from 'express';\nimport extensions from './extensions';\n\nconst app = express();\n\napp.use('/extensions', extensions);\n\nexport default app;\n\n```\n\nApply this change: Add text to test the server is working" }, {...
javascript
edit
0
1
mit
3483929b3b5610bc2ff17369bdcf356c1d05cc9e
worona/worona-dashboard,worona/worona,worona/worona,worona/worona-core,worona/worona-dashboard,worona/worona-core,worona/worona
cdn/src/app.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar Tracer = require('tracer');\n\nfunction Logger (options) {\n this.options = options;\n this.tracer = this._setupTracer(options.enabled);\n}\n\nLogger.prototype.info = function () {\n this.tracer.info.apply(this.tracer, arguments)...
javascript
edit
0
2
mit
49f1da05920d4ab335ffcd7d1be9604845f23da5
madtrick/spr
lib/logging.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*\n * Serve content over a socket\n */\n\nmodule.exports = function (socket) {\n socket.emit('send:name', {\n name: 'Bob'\n });\n};\n\n```\n\nApply this change: Comment this out for now" }, { "role": "assistant", "cont...
javascript
edit
0
1
mit
01694cf1a26b9c869960a498e07c358f85cb7c71
projectweekend/Pi-Jukebox,projectweekend/Pi-Jukebox,projectweekend/Pi-Jukebox
web_app/routes/socket.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// @flow\nexport opaque type WideBar = \"W\"\nexport const WIDE_BAR: WideBar = \"W\"\n\nexport opaque type NarrowBar = \"N\"\nexport const NARROW_BAR: NarrowBar = \"N\"\n\nexport opaque type WideSpace = \"w\"\nexport const WIDE_SPACE: W...
javascript
edit
null
null
mit
e0a85c0e739f1d4b0b82380ec4092893f8fb996c
mormahr/barcode.js,mormahr/barcode.js
src/Core/Characters.js
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React, { PureComponent } from 'react';\nimport PropTypes from 'prop-types';\nimport BaseChart from '../../../src/components/BaseChart';\nimport { createMockChart } from '../../test-utils';\n\ndescribe('<BaseChart />', function ()...
javascript
edit
0
1
mit
f06ce668d3c3fb8e05139cf46e0d714f5e28aa35
whawker/react-jsx-highcharts,whawker/react-jsx-highcharts
packages/react-jsx-highcharts/test/components/BaseChart/BaseChart.spec.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\ndefine( function( require, exports, module ) {\n\t'use strict';\n\t\n\tmodule.exports = {\n\t\troot: true,\n\t\tde: true,\n\t\tes: true,\n\t\tfr: true,\n\t\tgl: true,\n\t\tit: true,\n\t\tsv: true,\n\t\tuk: true,\n\t\tru: true\n\t};\n} )...
javascript
edit
0
1
mit
3a642093d2344c91f1ebdbfcc73cbc2b74125fef
sensuigit/brackets-autoprefixer,sensuigit/brackets-autoprefixer,mikaeljorhult/brackets-autoprefixer,mikaeljorhult/brackets-autoprefixer
nls/Strings.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nconst { getOr, toNumber } = require('lodash/fp');\nconst bcrypt = require('bcrypt');\n\nconst transforms = {\n password(value, context) {\n const { action, attribute } = context;\n\n if (action !== 'create' && ac...
javascript
edit
0
5
mit
599c9c809d160f0562a5e6ca69d27332585e5bc4
wistityhq/strapi,wistityhq/strapi
packages/core/strapi/lib/services/entity-service/attributes/transforms.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar LegendFactory = require('../editor/layers/layer-content-views/legend/legend-factory');\n\nvar onChange = function (layerDefModel) {\n var styleModel = layerDefModel.styleModel;\n var canSuggestLegends = LegendFactory.hasMigratedLe...
javascript
edit
0
10
bsd-3-clause
8b15314c71e91b5c6f210915d53fb6c11a5cbce2
splashblot/dronedb,splashblot/dronedb,CartoDB/cartodb,CartoDB/cartodb,CartoDB/cartodb,splashblot/dronedb,CartoDB/cartodb,splashblot/dronedb,CartoDB/cartodb,splashblot/dronedb
lib/assets/javascripts/cartodb3/deep-insights-integration/legend-manager.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\ndescribe(\"Core Bliss\", function () {\n\t\"use strict\";\n\n\tbefore(function() {\n\t\tfixture.setBase('tests/fixtures');\n\t});\n\n\tbeforeEach(function () {\n\t\tthis.fixture = fixture.load('core.html');\n\t});\n\n\t// testing setup\...
javascript
edit
0
1
mit
0e98e25f857e8d0a6e01eb93b64f416679dedf4b
LeaVerou/bliss,LeaVerou/bliss,dperrymorrow/bliss,dperrymorrow/bliss
tests/CoreSpec.js
rejected_duplicate
Near-duplicate of sample 93597
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function() {\n var app = angular.module('notely', [\n 'ui.router',\n 'notely.notes',\n 'notely.notes.service'\n ]);\n\n function config($urlRouterProvider) {\n $urlRouterProvider.otherwise('/notes');\n }\n\n config['$i...
javascript
edit
0
1
mit
5124587953b57db865ec3a63af138e7e43ba6a9a
FretlessBecks/notely,williamrulon/notely-1,FretlessBecks/notely,williamrulon/notely-1
app/app.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nfunction clearEOIMarkers(scope) {\n // Remove existing markers.\n scope.placesOfInterestMarkers.forEach(function (markerObj) {\n scope.map.removeLayer(markerObj.marker);\n });\n\n scope.placesOfInterestMarkers = [];\n...
javascript
edit
0
2
mit
f7bd33c7211ed3d79f91da700c51379a26e64196
joseph-iussa/tour-planner,joseph-iussa/tour-planner,joseph-iussa/tour-planner
app/map/map.utils.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar path = require('path')\nvar marked = require('marked')\nvar nunjucks = require('nunjucks')\n\nvar parseDocumentation = function (files) {\n files.forEach(function (file) {\n nunjucks.configure([\n path.join(__dirname, '..',...
javascript
edit
0
1
apache-2.0
574d8ec4bb13661372284f703caa48e7b387feb2
hmrc/assets-frontend,hmrc/assets-frontend,hmrc/assets-frontend
gulpfile.js/util/pattern-library/lib/parseDocumentation.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// Copyright (c) 2012 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nchromespec.registerJasmineTest('chrome.app.runtime');\nchromes...
javascript
edit
0
0
bsd-3-clause
2ffb9af2862202068c7dc4c7144a3340bc1dd3df
xiaoyanit/mobile-chrome-apps,wudkj/mobile-chrome-apps,MobileChromeApps/mobile-chrome-apps,liqingzhu/mobile-chrome-apps,guozanhua/mobile-chrome-apps,guozanhua/mobile-chrome-apps,chirilo/mobile-chrome-apps,hgl888/mobile-chrome-apps,xiaoyanit/mobile-chrome-apps,hgl888/mobile-chrome-apps,liqingzhu/mobile-chrome-apps,chiril...
spec/www/background.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports.unit = {\n environment: 'node',\n rootPath: process.cwd(),\n sources: [\n 'lib/**/*.js'\n ],\n tests: [\n 'test/**/*.js'\n ],\n extensions: [\n require('buster-istanbul')\n ],\n 'buster-istanbul': {\n ...
javascript
edit
0
0
mit
483b0240eedfc44bb8105f0bdc218d16f754ccde
cliffano/bob
conf/buster-coverage.js
rejected_duplicate
Near-duplicate of sample 99946
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nexport const siteMapData = [\n {\n title: 'Tools',\n links: [\n { title: 'Country Profiles', href: '/countries' },\n { title: 'NDCs', href: '/ndcs-content' },\n { title: 'NDC-SDG Linkages', href: '/ndcs-sdg' },\n ...
javascript
edit
0
0
mit
46d12bb8b5a302922d9ef2c6e305c78a99876701
Vizzuality/climate-watch,Vizzuality/climate-watch,Vizzuality/climate-watch,Vizzuality/climate-watch
app/javascript/app/components/footer/site-map-footer/site-map-footer-data.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst path = require(\"path\");\n\nmodule.exports = {\n entry: path.resolve(__dirname, \"./source/index.js\"),\n\n externals: {\n buttercup: \"buttercup\"\n },\n\n module: {\n rules : [\n {\n ...
javascript
edit
0
0
mit
49ad1e4378f81738f8ed59ab94dc603c4d5c1938
perry-mitchell/buttercup-importer
webpack.config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar webpack = require('webpack');\n\nmodule.exports = {\n entry: [\n 'webpack-dev-server/client?http://localhost:3000',\n 'webpack/hot/dev-server',\n './scripts/index'\n ],\n output: {\n path: __dirname,\n filename: 'b...
javascript
edit
0
0
mit
f325b081a685c03b89f1b4a828757c670ff36442
michaelBenin/react-hot-boilerplate,j-der/pickmeup-ui,michaelBenin/react-hot-boilerplate,debarshri/react-logger,amysimmons/mememe,cpachomski/Lines,jxnblk/react-basscss-hot-boilerplate,buttercomponents/butter-component-show-detail,phosphene/react-d3-hotload-test-demo,gustavoguichard/react-image-uploader,phosphene/react-d...
webpack.config.js
rejected_duplicate
Near-duplicate of sample 68674
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst TerserJsPlugin = require('terser-webpack-plugin');\n\nconst serverBuild = {\n mode: 'production',\n entry: './src/twig.js',\n target: 'node',\n node: false,\n output: {\n path: __dirname,\n filename: '...
javascript
edit
0
0
bsd-2-clause
485af180a0407d2961e53609ab379bdd3bdb1c67
twigjs/twig.js,justjohn/twig.js,twigjs/twig.js,twigjs/twig.js,justjohn/twig.js,justjohn/twig.js
webpack.config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { ActionTypes } from '../config/constants';\nimport { ref } from '../config/constants';\n\nexport const addItem = payload => {\n\treturn {\n\t\ttype: ActionTypes.BUDGETS_ADD_ITEM,\n\t\tpayload,\n\t}\n}\n\nexport const removeItem ...
javascript
edit
0
1
mit
6a15410123e9650f003c7a97ef091e08145dc4eb
nadavspi/UnwiseConnect,nadavspi/UnwiseConnect,nadavspi/UnwiseConnect
src/actions/budgets.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = {\n navigateFallback: '/index.html',\n runtimeCaching: [{\n urlPattern: /\\/api\\/search\\/.*/,\n handler: 'networkFirst',\n options: {\n cache: {\n maxEntries: 100,\n name: 'search-cache',...
javascript
edit
0
0
apache-2.0
32acbf191be290f0eccf756f5f6dc28067e3c565
customelements/v2,webcomponents/webcomponents.org,andymutton/beta,customelements/v2,andymutton/beta,andymutton/v2,andymutton/beta,andymutton/v2,andymutton/beta,webcomponents/webcomponents.org,andymutton/v2,webcomponents/webcomponents.org,andymutton/v2,customelements/v2,customelements/v2
client/sw-precache-config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = {\n scenarios: [\n {\n name: 'default',\n dependencies: { }\n },\n {\n name: 'ember-1.13.8',\n dependencies: {\n 'ember': '1.13.8',\n 'ember-data': '1.13.9'\n }\n },\n...
javascript
edit
0
0
mit
818ff925d39f419a290ec46c28c5cea39de23906
mixonic/ember-cli-mirage,flexyford/ember-cli-mirage,martinmaillard/ember-cli-mirage,IAmJulianAcosta/ember-cli-mirage,oliverbarnes/ember-cli-mirage,lazybensch/ember-cli-mirage,mydea/ember-cli-mirage,constantm/ember-cli-mirage,oliverbarnes/ember-cli-mirage,IAmJulianAcosta/ember-cli-mirage,HeroicEric/ember-cli-mirage,ronc...
config/ember-try.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nnew Vue({\n el: '#app',\n\n // Using ES6 string litteral delimiters because\n // Go uses {{ . }} for its templates\n delimiters: ['${', '}'],\n\n data: {\n ws: null,\n message: '',\n chat: [],\n },\n\n created: function(...
javascript
edit
0
2
mit
826009860e444c74fbb20d668327a4f49e8f678d
AntonioVdlC/chat,AntonioVdlC/chat,AntonioVdlC/chat
public/scripts/chat.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nconst path = require('path');\nconst encryptor = require('./src/encryptor');\nconst argv = process.argv.slice(2);\n\nif(argv.length != 2) {\n console.log('Usage: node create-user.js USERNAME PASSWORD');\n process.exit...
javascript
edit
0
1
mit
c71f6d3aa4807e6d384846519f266a8bdb4c8e72
gustavopaes/password-manager,gustavopaes/password-manager,gustavopaes/password-manager
create-user.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use babel';\n\nimport { TextEditor } from 'atom';\n\nexport default class EditorInserter {\n setText(text) {\n this.insertionText = text;\n }\n\n performInsertion() {\n if (!this.insertionText) {\n con...
javascript
edit
0
7
mit
1d92c984fc1d0876b26378015a33ba1795733404
Coteh/syntaxdb-atom-plugin
lib/EditorInserter.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = function buildDistanceInWordsLocalizeFn () {\n var distanceInWordsLocale = {\n lessThanXSeconds: {\n one: 'less than a second',\n other: 'less than ${count} seconds'\n },\n\n halfAMinute: 'half a min...
javascript
edit
0
3
mit
a1daba2ef60ffb34c73932f68fefb727d45d4568
date-fns/date-fns,js-fns/date-fns,date-fns/date-fns,date-fns/date-fns,js-fns/date-fns
src/locale/en/build_distance_in_words_localize_fn/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar PointView = Backbone.View.extend({\n\n initialize:function (options) {\n this.model = options.model;\n this.gmap = options.gmap;\n\n this.marker = new google.maps.Marker({\n position:this.model.getGLocation(),\n ...
javascript
edit
0
1
bsd-3-clause
e8b3cb735567ebc27a842c275eab9aac306c8ea2
bwestlin/hermes,bwestlin/hermes,carllarsson/hermes,carllarsson/hermes,bwestlin/hermes,carllarsson/hermes
assets/www/map/js/views/point-view.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nlet db;\ntry {\n db = require(\"rethinkdbdash\")(require(\"../config\").connectionOpts);\n} catch (err) {\n console.error(\"You haven't installed rethinkdbdash npm module or you didn't have configured the bot yet! Please do so.\")...
javascript
edit
0
12
mit
c771edf30259bae85af719dc27fa5d07999160c8
TTtie/TTtie-Bot,TTtie/TTtie-Bot,TTtie/TTtie-Bot
scripts/dbsetup.js
rejected_complexity
Cyclomatic complexity too high: 12
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport _ from 'lodash';\n\nexport default function canBeAsserted(vdom) {\n return _.all([].concat(vdom), node =>\n node\n && typeof node === 'object'\n && typeof node.type === 'string'\n && (!node.props ||...
javascript
edit
0
6
mit
6053767e229e18cb4f416a44ede954c2a90ba5ee
electricmonk/chai-react-element
src/can-be-asserted.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = function(grunt) {\n\n // Project configuration.\n grunt.initConfig({\n pkg: grunt.file.readJSON('package.json')\n });\n\n grunt.loadNpmTasks('grunt-release');\n\n grunt.registerTask('message', function() {\n ...
javascript
edit
0
1
mit
248053f65310ee9e2702a16678f05b2076ca88f1
leszekhanusz/generator-knockout-bootstrap
Gruntfile.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nconst poolified = Symbol('poolified');\n\nconst mixFlag = { [poolified]: true };\n\nconst duplicate = (factory, n) => (\n new Array(n).fill().map(() => {\n const instance = factory();\n return Object.assign(insta...
javascript
edit
0
8
mit
afe38c01e268a04153e8a644b5e64c2fd4897d0e
metarhia/MetaSync,DzyubSpirit/MetaSync,DzyubSpirit/MetaSync
lib/poolify.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = function(grunt) {\n\n grunt.initConfig({\n pkg: grunt.file.readJSON('package.json'),\n qunit: {\n files: ['jstests/index.html']\n },\n jshint: {\n all: [\n 'Gruntfile.js',\n 'nbdiff/...
javascript
edit
0
1
mit
d9fb86986d77688bfe606dad153b4e0c26125c83
tarmstrong/nbdiff,tarmstrong/nbdiff,tarmstrong/nbdiff,tarmstrong/nbdiff
Gruntfile.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = function(grunt) {\n grunt.initConfig({\n pkg: grunt.file.readJSON('package.json'),\n shell: {\n rebuild: {\n command: 'npm install --build-from-source'\n }\n },\n jasmine_node: {\n all...
javascript
edit
0
1
bsd-2-clause
2fc93c70a7a674bed8a9d677d5ac5b4afd36e179
mross-pivotal/node-gemfire,gemfire/node-gemfire,gemfire/node-gemfire,mross-pivotal/node-gemfire,gemfire/node-gemfire,mross-pivotal/node-gemfire,gemfire/node-gemfire,mross-pivotal/node-gemfire,gemfire/node-gemfire,gemfire/node-gemfire,mross-pivotal/node-gemfire,mross-pivotal/node-gemfire
Gruntfile.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = function(grunt) {\n grunt.initConfig({\n qunit: {\n files: ['test/index.html']\n }\n });\n\n grunt.loadNpmTasks('grunt-contrib-qunit');\n\n // Default task.\n grunt.registerTask('test', 'qunit');\n // T...
javascript
edit
0
1
cc0-1.0
cab2faf71d7b8d0e0c8950b2315879b7f39e835f
sk4zuzu/yt-looper,sk4zuzu/yt-looper,sk4zuzu/yt-looper,lidel/yt-looper,lidel/yt-looper,lidel/yt-looper
Gruntfile.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\n/**\n * Finder Model - Main model that uses FinderJS\n *\n * @constructor\n */\nvar FinderModel = function (arg) {\n\n // Assign `this` through `riot.observable()`\n var self = riot.observable(this);\n\n // Sto...
javascript
edit
0
3
apache-2.0
b32664408a5c57f30a734da5c925ca9453696d1c
applait/finder,vasuki1996/finder,applait/finder,vasuki1996/finder
js/findermodel.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nmodule.exports = {\n input: 'src/*.css',\n dir: 'dist',\n use: [\n 'postcss-import',\n 'postcss-import-url',\n 'postcss-custom-properties',\n 'postcss-normalize-charset',\n 'autoprefixer',\n ...
javascript
edit
0
0
mit
b78927680317b26f44008debb33c2abc3db5712b
seamile4kairi/japanese-fonts-css
postcss.config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n//= require_self\n//= require_tree ./volume_fading\n\npageflow.mediaPlayer.volumeFading = function(player) {\n if (!pageflow.browser.has('volume control support')) {\n return pageflow.mediaPlayer.volumeFading.noop(player);\n }\n e...
javascript
edit
0
4
mit
f6d6955c6d459717a357872ae68a0b0eabc779bf
Modularfield/pageflow,Modularfield/pageflow,Modularfield/pageflow,tf/pageflow,codevise/pageflow,codevise/pageflow,codevise/pageflow,tf/pageflow,tf/pageflow,tf/pageflow,codevise/pageflow,Modularfield/pageflow
app/assets/javascripts/pageflow/media_player/volume_fading.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nSpree.ready(function() {\n $('.store-credit-memo-row').each(function() {\n var row = this;\n var field = row.querySelector('[name=\"store_credit[memo]\"]')\n var textDisplay = row.querySelector('.store-credit-memo-text')\n\n ...
javascript
edit
0
2
bsd-3-clause
1b20df7e99f846efc6f64c1fae20df5e6fdcd6e5
pervino/solidus,pervino/solidus,pervino/solidus,pervino/solidus
backend/app/assets/javascripts/spree/backend/store_credits.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*\n * A diff to be uploaded to a server.\n *\n * For now, this is used only for uploading new diffs.\n *\n * It is expected that parentObject will be set to a ReviewRequest instance.\n */\nRB.Diff = RB.BaseResource.extend({\n rspNam...
javascript
edit
0
2
mit
bb76add5adfe95e4b95b004bf64c871cde3aaca5
reviewboard/reviewboard,davidt/reviewboard,1tush/reviewboard,1tush/reviewboard,custode/reviewboard,1tush/reviewboard,bkochendorfer/reviewboard,davidt/reviewboard,KnowNo/reviewboard,reviewboard/reviewboard,sgallagher/reviewboard,KnowNo/reviewboard,1tush/reviewboard,chipx86/reviewboard,reviewboard/reviewboard,bkochendorf...
reviewboard/static/rb/js/models/diffModel.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// ==UserScript==\n// @name Google Service List\n// @namespace wsmwason.google.service.list\n// @description List all Google services on support page, and auto redirect to product url.\n// @include https://support.google.co...
javascript
edit
0
3
mit
c01248767fc5f6b2ffb755f02bd32287c21ae8e4
wsmwason/google-services-list
google-services-list.user.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar Bot = require( 'nodemw' ),\n\treadline = require( 'readline' ),\n\tc = require( 'ansi-colors' ),\n\trl = readline.createInterface( {\n\t\tinput: process.stdin,\n\t\toutput: process.stdout\n\t} ),\n\tclient = new Bot( {\n\t\tprotocol...
javascript
edit
0
3
bsd-2-clause
2be6aed059542216005f1fbd1b8f0b0ba53af1f4
macbre/nodemw
examples/scribuntoConsole.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function($) {\n/*\n\t\t======== A Handy Little QUnit Reference ========\n\t\thttp://docs.jquery.com/QUnit\n\n\t\tTest methods:\n\t\t\texpect(numAssertions)\n\t\t\tstop(increment)\n\t\t\tstart(decrement)\n\t\tTest assertions:\n\t\t\tok(...
javascript
edit
0
1
mit
86e08d1d638656ff5c655bb9af4d658330907edf
thorst/jquery-idletimer,amitabhaghosh197/jquery-idletimer,dpease/jquery-idletimer,amitabhaghosh197/jquery-idletimer,dpease/jquery-idletimer,thorst/jquery-idletimer
test/idle-timer_test.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n$.jlm.component('WriteNew', 'wild_posts.wf_index, wild_posts.wf_edit, wild_pages.wf_index, wild_pages.wf_edit', function() {\n \n $('#sidebar .add').click(function() {\n var buttonEl = $(this);\n var formAction = but...
javascript
edit
0
2
mit
58a5b2b5c69343b684ecb6db9cd9e43bb8f37747
klevo/wildflower,klevo/wildflower,klevo/wildflower
app/plugins/wildflower/jlm/controllers/components/write_new.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar assert = require('assert');\nvar buildTemplateCompiler = require('../helpers/template-compiler');\n\ndescribe('Ember template compiler', function() {\n var templateCompiler;\n\n beforeEach(function() {\n templa...
javascript
edit
0
1
mit
43906d08af184b3c20bb201dedf1d79de7dd8549
rwjblue/ember-cli-template-lint,oriSomething/ember-cli-template-lint,oriSomething/ember-template-lint,rwjblue/ember-cli-template-lint,rwjblue/ember-template-lint,oriSomething/ember-cli-template-lint
node-tests/unit/linting-compiler-test.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nexports.runWhenTableIs = function (tableName, desiredStatus, db, callback) {\n\n var describeParams = {};\n describeParams.TableName = tableName;\n\n db.describeTable(describeParams, function (err, data) {\n if (data.Tab...
javascript
edit
0
3
apache-2.0
26e229add96b3fbf67a15bb3465832881ced5023
timg456789/musical-octo-train,timg456789/musical-octo-train,timg456789/musical-octo-train
infrastructure/table-creation-wait.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * Finnish translation for bootstrap-datepicker\n * Jaakko Salonen <https://github.com/jsalonen>\n */\n;(function($){\n\t$.fn.datepicker.dates['fi'] = {\n\t\tdays: [\"sunnuntai\", \"maanantai\", \"tiistai\", \"keskiviikko\", \"tors...
javascript
edit
0
1
apache-2.0
470b44113fc07de8ada5b10a64a938177961347b
oller/foundation-datepicker-sass,abnovak/bootstrap-sass-datepicker,rocLv/bootstrap-datepicker,rstone770/bootstrap-datepicker,wetet2/bootstrap-datepicker,Azaret/bootstrap-datepicker,osama9/bootstrap-datepicker,zhaoyan158567/bootstrap-datepicker,bitzesty/bootstrap-datepicker,HNygard/bootstrap-datepicker,wetet2/bootstrap-...
js/locales/bootstrap-datepicker.fi.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * Macedonian translation for bootstrap-datepicker\n * Marko Aleksic <<EMAIL>>\n */\n;(function($){\n $.fn.datepicker.dates['mk'] = {\n days: [\"Недела\", \"Понеделник\", \"Вторник\", \"Среда\", \"Четврток\", \"Петок\", \...
javascript
edit
0
1
apache-2.0
caa5746cb434bfa17731d00e25f2272aed89ccd0
christophercaburog/bootstrap-datepicker,huang-x-h/bootstrap-datepicker,wearespindle/datepicker-js,joubertredrat/bootstrap-datepicker,riyan8250/bootstrap-datepicker,otnavle/bootstrap-datepicker,NFC-DITO/bootstrap-datepicker,osama9/bootstrap-datepicker,SimpleUpdates/bootstrap-datepicker,mfunkie/bootstrap-datepicker,defri...
js/locales/bootstrap-datepicker.mk.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { assertThat, equalTo, containsString } from 'hamjest';\n\ndescribe('The core function, `assertThat()`', () => {\n it('is a function', () => {\n const typeOfAssertThat = typeof assertThat;\n assertThat(typeOfAssertThat, eq...
javascript
edit
0
2
mit
e087fe25c546b1a142727b56da4751f18c46f2cb
tddbin/katas,tddbin/katas,tddbin/katas
katas/libraries/hamjest/assertThat.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Project from '../../src/project/project'\nimport Asset from '../../src/project/asset'\nimport Composition from '../../src/project/composition'\nimport TimeLane from '../../src/project/timelane'\nimport Layer from '../../src/proje...
javascript
edit
0
1
mit
b7d600cdf1d870e2ffba4fd7c64a94156fadb5b9
Ragg-/Delir,Ragg-/Delir,Ragg-/Delir,Ragg-/Delir
src/delir-core/tests/project/project-spec.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * Get a specified segment from the pathname.\n *\n * @param {String} pathname\n * @param {Number} segment\n * @return {Boolean}\n */\nexport function getPathnameSegment(pathname = window.location.pathname, segmentIndex = 0) {\n ...
javascript
edit
0
1
mit
be3aab27fb4ec87679a0734335fb5f67b1c691fe
DoSomething/dosomething,sergii-tkachenko/phoenix,mshmsh5000/dosomething-1,mshmsh5000/dosomething-1,DoSomething/dosomething,DoSomething/phoenix,sergii-tkachenko/phoenix,DoSomething/dosomething,deadlybutter/phoenix,deadlybutter/phoenix,sergii-tkachenko/phoenix,mshmsh5000/dosomething-1,DoSomething/dosomething,DoSomething/...
lib/themes/dosomething/paraneue_dosomething/js/url/helpers.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = {\n \"open index page\": function(browser) {\n browser\n .url(browser.globals.url)\n .waitForElementVisible(\"#index-view\", 3000)\n .assert.containsText(\"#header .logo:nth-ch...
javascript
edit
0
1
mit
499b227e4ec6bd00899363366c2520c9c2be151c
y-a-r-g/color-themes,y-a-r-g/color-themes
tests/frontend/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react'\nimport Head from 'next/head'\nimport {MDXProvider} from '@mdx-js/react'\n\nimport IndexMDX from './index.mdx'\nimport CodeBlock from '../doc-components/CodeBlock'\n\nconst components = {\n pre: props => <div ...
javascript
edit
0
2
mit
d2f7499fc65d63769027f2498dccb5d9b4924fd6
miduga/react-slidy
pages/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react'\nimport { Component } from 'react'\n\nclass InputHeader extends Component {\n focus = () => {\n this.refs.inputHeader.focus()\n }\n\n blur = () => {\n this.refs.inputHeader.blur()\n }\n\n render() {\...
javascript
edit
0
1
mit
3c95819895253b77edcfcdd6760a846f590c9210
andynoelker/react-data-select
src/InputHeader.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = {\n generateQueryString: function (data) {\n var ret = []\n for (var d in data)\n if (data[d])\n ret.push(encodeURIComponent(d) + \"=\" + encodeURIComponent(data[d]))\n return ret.join(\"&\")\n },...
javascript
edit
0
4
mit
d85d4bc34ad869b20b4027d5f32c5ca64e4e4c3e
Flieral/Publisher-Service,Flieral/Publisher-Service
public/utility.js
rejected_duplicate
Near-duplicate of sample 94093
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\n/**\n * WordPress dependencies\n */\nimport { activatePlugin, visitAdminPage } from '@wordpress/e2e-test-utils';\n\n/**\n * The allow list of AMP modes.\n */\nexport const allowedAMPModes = {\n\tstandard: 'standard',\n\ttransitional: ...
javascript
edit
0
1
apache-2.0
fba049eecf0689317634e892fd2f3c59f221d0f9
google/site-kit-wp,google/site-kit-wp,google/site-kit-wp,google/site-kit-wp
tests/e2e/utils/activate-amp-and-set-mode.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar UUID = require('./../uuid' );\n\nfunction forceLogin(keycloak, request, response) {\n var host = request.hostname;\n var headerHost = request.headers.host.split(':');\n var port = headerHost[1] || '';\n var protocol = request.pr...
javascript
edit
0
6
apache-2.0
83bea17aff9f4c3d6adcdf88b3f1661be9b92c15
keycloak/keycloak-nodejs-connect,keycloak/keycloak-nodejs-connect,abstractj/keycloak-nodejs-connect,abstractj/keycloak-nodejs-connect,abstractj/keycloak-nodejs-connect,keycloak/keycloak-nodejs-connect
middleware/protect.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n$(function() {\n var panelContent = $('#panel-content');\n\n /**\n * Toggles the ARIA expanded and hidden attributes' state.\n *\n * @param Object elem The element on which to toggle the attribute.\n */\n functi...
javascript
edit
0
3
mit
1352d718c2229c64dd6e981937efebfe6c3ddf60
pombredanne/dxr,pelmers/dxr,gartung/dxr,erikrose/dxr,jbradberry/dxr,jbradberry/dxr,kleintom/dxr,srenatus/dxr,srenatus/dxr,pombredanne/dxr,gartung/dxr,bozzmob/dxr,KiemVM/Mozilla--dxr,jay-z007/dxr,jbradberry/dxr,pombredanne/dxr,bozzmob/dxr,pombredanne/dxr,pelmers/dxr,jay-z007/dxr,nrc/dxr,jay-z007/dxr,kleintom/dxr,nrc/dxr...
dxr/static/js/panel.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport * as ACTION_TYPES from '../constants/action_types'\n\nfunction extractToken(hash, oldToken) {\n const match = hash.match(/access_token=([^&]+)/)\n let token = !!match && match[1]\n if (!token) {\n token = oldToken\n }\n r...
javascript
edit
0
4
mit
cf3d28d03ef9761001799e4224ce38f65c869de4
ello/webapp,ello/webapp,ello/webapp
src/networking/auth.js
accepted
null
true
[ { "role": "user", "content": "Write javascript code for the following: Use uglifyjs to minify instead" }, { "role": "assistant", "content": "javascript:!function(){$(\"tr.file-diff-line > td.diff-line-num-addition.empty-cell\").each(function(a,b){var c=$(b).parent().attr(\"data-line\"),d=$(b).pa...
javascript
new_file
0
1
mit
cd5790825ab7b3f3b57b1735f699c21c4a82fc35
nicolasartman/pullmate
bookmarklet.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*global chrome, console*/\n\nconsole.log(\"background.js\");\n\nchrome.runtime.getBackgroundPage(function() {\n console.log(\"getBackgroundPage\", arguments);\n});\n\nchrome.runtime.onMessageExternal.addListener(function(message, se...
javascript
edit
0
1
mit
41ffe8f6551fcf98eaba292a82e94a6bfa382486
gitgrimbo/settlersonlinesimulator,gitgrimbo/settlersonlinesimulator
chrome/background.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * Download FuckMyDom and call slowly()\n **/\n(function( window, document, undefined ) {\n\n var stag;\n\n if( !window.FuckMyDom ) {\n stag = document.createElement( 'script' );\n stag.setAttribute( 'src', 'http://mhgbrown...
javascript
edit
0
2
mit
975685740c083d4e3d73a238e8220ce7255777f1
mhgbrown/fuck-my-dom
bookmarklet.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React, { Component } from 'react'\nimport '../../css/style.css'\nimport FA from 'react-fontawesome'\n\n\n\nclass Footer extends Component {\n render(){\n return(\n <div className=\"Footer\" >\n\n <br...
javascript
edit
0
1
mit
04ff19fca9ffa556bed81950430b9f2257b13841
iankhor/medrefr,iankhor/medrefr
front-end/src/components/shared/Footer.js
accepted
null
true