messages
listlengths
2
2
language
stringclasses
8 values
prompt_type
stringclasses
2 values
lint_errors
int64
0
129
⌀
cyclomatic_complexity
int64
0
32
⌀
license
stringclasses
7 values
commit
stringlengths
40
40
repos
stringlengths
5
116k
new_file
stringlengths
4
220
status
stringclasses
6 values
error
stringlengths
26
74
⌀
is_valid_syntax
bool
2 classes
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Ember from 'ember';\nimport moment from 'moment';\n\nexport default Ember.Component.extend({\n /**\n * So what's the issue?\n *\n * Updating my data attribute doesn't trigger any changes\n * to the live-chart c...
javascript
edit
0
1
mit
954450756613209bf7f4b32909549af860bab3d1
UrbanCCD-UChicago/plenario-explorer,UrbanCCD-UChicago/plenario-explorer,UrbanCCD-UChicago/plenario-explorer
app/components/node-stream.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* eslint-env mocha */\nconst redisMock = require('redis-mock');\nconst chai = require('chai');\nchai.should();\n\nconst db = {\n redis: redisMock.createClient(),\n};\nconst fakeRedis = redisMock.createClient();\nconst wmata = require(...
javascript
edit
0
1
unlicense
2a1031d417e4a670da284222d52e94f92e8d1889
freestylebit/wmata-rails-tracker,freestylebit/wmata-rails-tracker
src/spec/controllers/wmata-spec.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * Copyright (c) 2015-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';\n\nvar path = require('path');\n\...
javascript
edit
0
3
bsd-3-clause
ad6938cda188f30e38d1aa9cbc30ca791ef2d45f
pandiaraj44/react-native,exponentjs/react-native,exponent/react-native,hammerandchisel/react-native,exponentjs/react-native,javache/react-native,exponent/react-native,pandiaraj44/react-native,hammerandchisel/react-native,facebook/react-native,facebook/react-native,hammerandchisel/react-native,javache/react-native,hoang...
babel-preset/configs/hmr.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// MulitpleProcess model\n// An abstract class that allows us to group some atomic process related entities\n// Like: registrations, requirements or processingSteps\n\n'use strict';\n\nvar memoize = require('memoizee/plain')\n , ensur...
javascript
edit
0
3
mit
4d863c899aee9f5023c15996781707de6dc41d09
egovernment/eregistrations,egovernment/eregistrations,egovernment/eregistrations
model/lib/multiple-process.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function(){\n 'use strict';\n\n angular.module('cla.controllers')\n .controller('DiagnosisSummaryCtrl',\n ['$scope', '$state',\n function($scope, $state) {\n $scope.delete = function() {\n $scope.di...
javascript
edit
0
2
mit
ebc10864cef8f73e5cc02353791760caae8189d0
ministryofjustice/cla_frontend,ministryofjustice/cla_frontend,ministryofjustice/cla_frontend,ministryofjustice/cla_frontend
cla_frontend/assets-src/javascripts/app/js/controllers/diagnosis_summary.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nconst Boom = require('boom');\nconst User = require('../models/user');\nconst Tweet = require('../models/tweet');\n\nconst utils = require('./utils.js');\nconst _ = require('lodash');\n\nexports.deleteMultipleTweets = {...
javascript
edit
0
2
mit
13af72430a3963ae7e26f3d39d8671ee45afab51
FritzFlorian/true-parrot,FritzFlorian/true-parrot
app/api/adminapi.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// Thank you Rob Dodson\n\n'use strict';\n\nvar path = require('path')\n , request = require('request')\n , fs = require('fs')\n , _ = require('underscore');\n\nmodule.exports = function(grunt) {\n grunt.registerMultiTask('toHTML', ...
javascript
edit
0
4
mit
e2a1385f3d47541f02c9807c7fcad6a70af6eaff
thegreatsunra/propeller
tasks/toHTML.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// @flow\n\nimport * as React from 'react';\nimport { Helmet } from 'react-helmet';\nimport config from 'app/config';\nimport { type ComponentType, createElement } from 'react';\n\n/**\n * A higher order component that wraps the given c...
javascript
edit
null
null
mit
f5144dc4b43f989714acc10ebb6c78cb3d135867
webkom/lego-webapp,webkom/lego-webapp,webkom/lego-webapp
app/utils/helmet.js
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Write javascript code for the following: Add baseline Complex JS type, non-asm.js" }, { "role": "assistant", "content": "(function(global) {\n /**\n * Complex prototype for computation with complex numbers\n */\n var Complex = function(real, imag) {\n ...
javascript
new_file
0
4
mit
357cde039a6669b4a09a0b308ef48d2edf74ca96
voithos/brot.js,voithos/brot.js
brot.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { CONSUMER_KEY, REDIRECT_URI } from 'react-native-dotenv'\n\nconst initialState = {\n requestToken: null,\n username: null,\n accessToken: null,\n}\n\nexport default function login(state = initialState, action = {}) {\n // co...
javascript
edit
0
4
mit
70ce4954fe8a3baab4b14f2325945413bae259fe
syon/chase-ios,syon/chase-ios,syon/chase-ios
Chase/app/reducers/login.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * @author alteredq / http://alteredqualia.com/\n */\n\nTHREE.RenderPass = function ( scene, camera, overrideMaterial, clearColor, clearAlpha ) {\n\n\tTHREE.Pass.call( this );\n\n\tthis.scene = scene;\n\tthis.camera = camera;\n\n\t...
javascript
edit
0
4
apache-2.0
b2e19072d81040f07e03767cf80cb1fc4b8f4000
ninjadev/nin,ninjadev/nin,ninjadev/nin
nin/dasBoot/lib/RenderPass.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*\n * grunt-node-deploy\n * https://github.com/ValeriiVasin/grunt-node-deploy\n *\n * Copyright (c) 2013 Valerii Vasin\n * Licensed under the MIT license.\n */\n\nmodule.exports = function (grunt) {\n 'use strict';\n\n var Deploy = r...
javascript
edit
0
4
mit
b7fbe147a375442a718e62dfcd1eeec9ff9c46e4
ValeriiVasin/grunt-node-deploy
tasks/deploy.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = {\n extends: [\"google\", \"plugin:react/all\", \"./index.js\", \"./react.js\"],\n plugins: [\"react\", \"prettier\"],\n env: {\n es6: true,\n node: true\n },\n rules: {\n \"require-jsdoc\": \"off\",\n ...
javascript
edit
0
0
mit
20f1d90aee76f1adda5ed97930bc22116b54ddec
lydell/eslint-config-prettier
.eslintrc.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nclass EventEmitter {\n constructor() {\n this.observers = {};\n }\n\n on(events, listener) {\n events.split(' ').forEach(event => {\n this.observers[event] = this.observers[event] || [];\n this.observers[event].push(l...
javascript
edit
0
4
mit
210f0b656b394516f44d0ecc9ab34d744cc6604c
i18next/i18next,i18next/i18next,i18next/i18next,i18next/i18next
src/EventEmitter.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport { Header } from 'components/Header/Header';\nimport { shallow } from 'enzyme';\n\ndescribe('(Component) Header', () => {\n let _wrapper;\n\n beforeEach(() => {\n _wrapper = shallow(\n <Header...
javascript
edit
0
1
mit
7d3c8cfc7b7fa9121f0fab20641fde51fee13114
City-of-Helsinki/helerm-ui,City-of-Helsinki/helerm-ui,City-of-Helsinki/helerm-ui
tests/components/Header/Header.spec.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// postcss.config.js\nconst path = require('path');\nconst purgecss = require('@fullhuman/postcss-purgecss')({\n\n // Specify the paths to all of the template files in your project\n content: [\n './src/index.php',\n './src/**/*...
javascript
edit
0
1
apache-2.0
e424a470ab6d2f785d962b6a18af9dea96d512fd
DiamondLightSource/SynchWeb,DiamondLightSource/SynchWeb,DiamondLightSource/SynchWeb,DiamondLightSource/SynchWeb,DiamondLightSource/SynchWeb,DiamondLightSource/SynchWeb
client/postcss.config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar LeaderboardView, RatView\n\nRatView = Marionette.ItemView.extend({\n tagName: 'tr',\n\n template: Handlebars.compile(\n '<td>{{CMDRname}}</td>' +\n '<td>{{successfulRescueCount}}</td>'\n )\n})\n\nLeaderboardView = Marionett...
javascript
edit
0
1
bsd-3-clause
a0d7622e46359e4512c93c1072152664a9e9e8ba
FuelRats/api.fuelrats.com,FuelRats/api.fuelrats.com,FuelRats/api.fuelrats.com
static/views/Leaderboard.js
accepted
null
true
[ { "role": "user", "content": "Write javascript code for the following: Add initial and refactored solutions" }, { "role": "assistant", "content": " // I worked on this challenge by myself.\n // This challenge took me 1 hours.\n\n // Pseudocode\n // 1.) Accept a number argument and set defaults f...
javascript
new_file
0
4
mit
dcd5a31cecfb10befe18128ba599b5cec73ee25c
DavidOKeefe/phase-0,DavidOKeefe/phase-0,DavidOKeefe/phase-0
week-9/js-review/review.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n#!/usr/bin/env node\n'use strict';\n\nvar pkg = require('./package.json');\nvar statsministerietSpeeches = require('./');\nvar argv = process.argv.slice(2);\n\nvar fs = require('fs');\n\nfunction help() {\n console.log([\n '',\n ...
javascript
edit
0
2
mit
97070212bafed9f2e91f6affffed3f1104464925
matiassingers/statsministeriet-speeches-scraper
cli.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar period = 1;\n\nchrome.runtime.onInstalled.addListener(function() {\n chrome.alarms.create(\"update\", {\n periodInMinutes: period\n });\n});\n\nchrome.runtime.onUpdateAvailable.addListener(function() {\n // Restart is for Kios...
javascript
edit
0
3
apache-2.0
eff4262d0077728c141fc0b6b295a878532f67eb
jlhughes/foam,jacksonic/foam,foam-framework/foam,mdittmer/foam,foam-framework/foam,mdittmer/foam,jlhughes/foam,foam-framework/foam,jacksonic/foam,jacksonic/foam,jlhughes/foam,mdittmer/foam,jlhughes/foam,mdittmer/foam,jacksonic/foam,foam-framework/foam,foam-framework/foam
apps/watlobby/bg.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar app = require('./web-server/app');\n\napp.listen(3000, () => {\n console.log(`Pong web-server!`);\n console.log(`Mode: ${app.get('env')}`);\n console.log(`Port: listening on port 3000`);\n console.log(`URL: http://localhost:3000...
javascript
edit
0
1
mit
a4136e17eb82816e5755a9e4cad01c0e80052915
nmoya/pong-game,nmoya/pong-game
app.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nfunction CurrentUser() {\n\t// 0 - guest, 1 - user, 2 - admin, 3 - root\n\tthis._typeAccount = 0; // default 0\n}\n\nCurrentUser.prototype.getTypeAccount = function () {\n\treturn this._typeAccount;\n};\n\nmodule.exports.CurrentUser = C...
javascript
edit
0
4
mit
7030032342a7aba2021510ac16c5c9a1e60477cd
rootsher/server-side-portal-framework
Architecture/CurrentUser.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Ember from 'ember';\nimport _ from 'lodash';\n\nexport default Ember.Route.extend({\n /**\n * @param {params.mailbox_name} The name of the mailbox ('Inbox', 'Archives')\n */\n model(params) {\n var mailboxName = params.m...
javascript
edit
0
2
mit
002aa5115658900657bfc08f58888153b1e14fea
roundcube-next/roundcube-mail,roundcube-next/roundcube-mail
addon/shell/mail/mailbox/route.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nfunction Metronome(tempo, beatsPerMeasure){\n this.tempo = Number(tempo);\n this.beatsPerMeasure = Number(beatsPerMeasure);\n this.interval = null;\n}\n\nMetronome.prototype.start = function(){\n var millisecondsToWait = this.tempoT...
javascript
edit
0
2
mit
b03e32b87428a8537f3e1782066e6d53993b9b86
dmilburn/beatrice,dmilburn/beatrice
js/metronome.js
rejected_duplicate
Near-duplicate of sample 89060
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n#!/usr/bin/env node\n'use strict'\n\nfunction convert(win, htmlRoot, jsonRoot) {\n\tif (!jsonRoot) jsonRoot = []\n\tfor (let i = 0; i < htmlRoot.childNodes.length; i++) {\n\t\tconst node = htmlRoot.childNodes[i]\n\t\tif (node.nodeType =...
javascript
edit
0
8
mit
37940577979f6f76f8196d6f812ce57093b59415
matatk/landmarks,matatk/landmarks,matatk/landmarks
scripts/html-to-json.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst $ = require('jquery');\n\nfunction reload() {\n $('#stats').load(`${location.href}stats`, ''); // eslint-disable-line\n $('#glider-rider-detail').load(`${location.href}?refresh=true`, ''); // eslint-disable-line\n}\n\nsetInterva...
javascript
edit
0
1
mit
f28dfd5253e5ab9262738260b18ef52118914dda
nathancashmore/Leaderboard
app/assets/javascript/_refresh.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar Templates = {};\n\nTemplates.ItemListingTemplate = _.template('\\\n\t<div class=\"item media\">\\\n\t\t<img class=\"pull-left\" src=\"<%= imageUrl %>\" />\\\n\t\t<div class=\"media-body\">\\\n\t\t\t<h3 class=\"media-heading\"><%= na...
javascript
edit
0
0
mit
e70348d20e7b8f7e822d9d534cbe70fe74c8c009
burnflare/CrowdBuy,burnflare/CrowdBuy
js/templates.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// @flow\nimport React from 'react'\nimport PrintIcon from '@material-ui/icons/Print'\nimport { defineMessages, FormattedMessage } from 'react-intl'\n\nimport ToolbarButton from '../internal/ToolbarButton'\n\nconst messages = defineMess...
javascript
edit
null
null
mit
836e03f54fcb7b3b8661c05d130a42a737db0599
digidem/ecuador-map-editor,digidem/ecuador-map-editor
src/renderer/components/MapFilter/ReportView/PrintButton.js
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst path = require('path');\n\nvar webpack = require('./webpack.config.js');\nwebpack.module.preLoaders = [\n {\n test: /\\.js$/,\n include: path.resolve('app/lib/'),\n loader: 'babel-istanbul',\n },\n];\n\nmodule.exports =...
javascript
edit
0
1
mit
bb682ba10a4784408d12429a1d527223dbe8ea5b
brianto/rekt,brianto/rekt,brianto/rekt,brianto/rekt,brianto/rekt
karma.config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*global chrome hashblot blotpw bloticon*/\n\nchrome.tabs.onUpdated.addListener(function(tabId, changeInfo, tab) {\n bloticon.updateTabIcon(tab);\n});\n\n```\n\nApply this change: Update all tab icons on install/extension reload" }, ...
javascript
edit
0
2
mit
4d49e630493514cbe0aed67f7ad1d4ce32469cbe
blotpass/blotpass-chrome-extension,blotpass/blotpass-chrome-extension
background.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n$(document).ready(function() {\n $('.add_child').click(function() {\n var assoc = $(this).attr('data-association');\n var content = $('#' + assoc + '_fields_template').html();\n var regexp = new RegExp('new_' + assoc, 'g')\...
javascript
edit
0
2
mit
516e2af441385f592d4dc51ae00dd8a555de0736
timriley/complex-form-examples,timriley/complex-form-examples
public/javascripts/application.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function() {\n if (!window.localStorage) {\n console.warn('Sorry, this example needs localStorage support');\n return;\n }\n\n // Get ProbabilityDrive and a localStorage data store\n var probabilitydrive = new...
javascript
edit
0
3
mit
5315273b0c953ea9b982d6c0e794bba11e939be0
JamesBarwell/probabilitydrive.js
example/persistent/script/main.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// Karma configuration\n// Generated on Fri Oct 17 2014 15:45:37 GMT-0400 (EDT)\n\nmodule.exports = function(config) {\n config.set({\n autoWatch: false,\n basePath: './',\n browserNoActivityTimeout: 60000,\n browserify: {\...
javascript
edit
0
1
mit
ec30954bb0dbe529fe159b6264926e3f92198e82
pivotal-cf/pivotal-ui,sjolicoeur/pivotal-ui,CanopyCloud/pivotal-ui,pivotal-cf/pivotal-ui,pivotal-cf/pivotal-ui,CanopyCloud/pivotal-ui,sjolicoeur/pivotal-ui,npm/pivotal-ui,npm/pivotal-ui,sjolicoeur/pivotal-ui,npm/pivotal-ui,CanopyCloud/pivotal-ui,sjolicoeur/pivotal-ui
karma.config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = VirtDate;\n\nfunction VirtDate(timeVirtualizer) {\n this._timeVirtualizer = timeVirtualizer;\n this._realDate = window.Date;\n this._realDateNow = window.Date.now;\n this._virtualized = false;\n};\n\nVirtDat...
javascript
edit
0
2
mit
0dbb80938019bd4cd0c97a55a5d5bbac927be3af
eabatalov/jstimevirtualizer,eabatalov/jstimevirtualizer,yanenkoa/jstimevirtualizer,yanenkoa/jstimevirtualizer
lib/VirtDate.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * @license\n * Copyright 2019 The FOAM Authors. All Rights Reserved.\n * http://www.apache.org/licenses/LICENSE-2.0\n */\n\nfoam.CLASS({\n package: 'foam.nanos.cron',\n name: 'TimeHMS',\n\n documentation: `\n Models a a time...
javascript
edit
0
0
apache-2.0
6b106fa6ae9fa013b36d26160f9395feb45f3ece
jacksonic/vjlofvhjfgm,foam-framework/foam2,foam-framework/foam2,foam-framework/foam2,foam-framework/foam2,jacksonic/vjlofvhjfgm,jacksonic/vjlofvhjfgm,foam-framework/foam2
src/foam/nanos/cron/TimeHMS.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function() {\n\tif(window.cordova || window.PhoneGap) {\n\t\tvar v = window.useCordovaTVVersion||\"3.0\";\n\t\tvar externalModules = [\n\t\t\t\"/usr/palm/frameworks/cordova-tv/\" + v + \"/advertisement.js\",\n\t\t\t\"/usr/palm/framewor...
javascript
edit
0
4
apache-2.0
71becd5263b17587f802a5da4d57951ddcdc610c
enyojs/enyo-cordova
tv/tv-module-loader.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nfunction msgReceived(info, tab) {\n chrome.tabs.create({'url': chrome.extension.getURL('newtab.html'), 'selected': true}, function(tab) {\n console.log('In create: ', tab);\n chrome.tabs.getSelected(null, function(tab) {\n c...
javascript
edit
0
1
mit
82b78a2a37d931193de1aeaf4dfb582ec3876adc
styx/crop-chrome-ext,styx/crop-chrome-ext
background.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/** @babel */\n\nimport { CompositeDisposable } from 'atom';\nimport TerminalView from './terminal-view';\n\nexport default {\n\n disposables: null,\n terminalViews: [],\n\n activate(state) {\n this.disposables = new CompositeDisp...
javascript
edit
0
2
mit
9a840bbc51b30d655df87a7b481c0bf378ec405b
jsmecham/atom-terminal-tab
lib/terminal.js
rejected_duplicate
Near-duplicate of sample 84629
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar TestHelper = require(\"../helpers/testHelper\");\n\ndescribe('app', function() {\n\n\tit('should register a user', function() {\n\t\tdriver.get(\"/\",{id:'viewEntries'});\n\t\tTestHelper.clickMenuItem('logout');\n\t\texpect(driver.g...
javascript
edit
null
null
mit
003532d132bedf5dce3fddedc0f4faef9dc75b5b
EqualExperts/minutedock,EqualExperts/minutedock
test/specs/registrationSpec.js
rejected_code_smell
Internal duplication: ~30% of the file is inside repeated 12+ line blocks
null
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport filePaths from '../utils/file-paths';\nimport cp from 'child_process';\nimport path from 'path';\nimport app from 'app';\n\nclass SquirrelEvents {\n\n check(options) {\n if (options.squirrelInstall) {\n this.spawnSquirre...
javascript
edit
0
5
mit
9cee04050285d0f0e5f380b0e4ddffc90bf80f3a
Aluxian/Messenger-for-Desktop,rafael-neri/whatsapp-webapp,Aluxian/Facebook-Messenger-Desktop,Hadisaeed/test-build,Aluxian/Facebook-Messenger-Desktop,rafael-neri/whatsapp-webapp,Hadisaeed/test-build,Aluxian/Messenger-for-Desktop,Hadisaeed/test-build,Aluxian/Facebook-Messenger-Desktop,Aluxian/Messenger-for-Desktop,rafael...
src/scripts/browser/components/squirrel-events.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport m from 'mithril';\nimport h from '../h';\nimport userVM from '../vms/user-vm';\nimport projectVM from '../vms/project-vm';\nimport youtubeLightbox from '../c/youtube-lightbox';\n\nconst I18nScope = _.partial(h.i18nScope, 'project...
javascript
edit
0
2
mit
886d384881936e701faf2ccd640290aa02f2336f
catarse/catarse.js,catarse/catarse_admin
src/root/project-edit-start.js
rejected_duplicate
Near-duplicate of sample 85998
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// Adapted from: http://bl.ocks.org/cpbotha/5200394\nexport function dropShadow (el, name, dx, dy, blur) {\n let defs = el.select('defs');\n\n if (defs.empty()) {\n defs = el.append('defs');\n }\n\n // create filter with id #drop...
javascript
edit
0
4
mit
af93ff96ad25e99b31376d0667c14c90c2a4dc74
flekschas/d3-list-graph,flekschas/d3-list-graph
src/scripts/commons/filters.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar express = require('express');\nvar app = module.exports = express();\n\napp.get('*', function(req, res) {\n console.log('404 ERROR:', req.url);\n res.redirect('/#' + req.url);\n});\n\napp.use(function(err, req, res, next) {\n ...
javascript
edit
0
1
mit
b6588bb8c0e8131ca14855dfa5f19c0e0729b1ee
brettshollenberger/mrl001,ericclemmons/ericclemmons.github.io,brettshollenberger/mrl001,ericclemmons/ericclemmons.github.io,genesis/angular,ericclemmons/genesis-skeleton,ericclemmons/genesis-skeleton,ericclemmons/genesis-skeleton.com,genesis/angular
src/server/lib/errors/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst utils = require('./../../utils.js');\n\nmodule.exports.info = {\n\tname: 'Playlist',\n\tdescription: 'List the current sounds and music that is stored within the playlist.',\n\tcategory: 'Music',\n\taliases: [\n\t\t'list',\n\t\t'p...
javascript
edit
0
6
mit
ac01eb61942ca149bb7ba6001f4d1ccabd067595
moustacheminer/MSS-Discord,moustacheminer/MSS-Discord,moustacheminer/MSS-Discord
server/discord/cogs/list/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*jshint node: true */\n'use strict';\n\nvar browserify = require('browserify'),\n es6ify = require('es6ify'),\n glob = require('glob');\n\nes6ify.traceurOverrides = { blockBinding: true };\n\nvar pipeline = browserify()...
javascript
edit
0
1
mit
2f731f2e21c82450d10865c234cec13ea89ea32e
TitoAgudelo/tangram,rosamcgee/tangram,rosamcgee/tangram,TitoAgudelo/tangram,rosamcgee/tangram,xvilan/tangram,DHaylock/tangram,xvilan/tangram,DHaylock/tangram,taylorhxu/tangram,zerebubuth/tangram,xvilan/tangram,TitoAgudelo/tangram,DHaylock/tangram,taylorhxu/tangram,taylorhxu/tangram,tangrams/tangram,ceseale/tangram,tang...
build_test.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar deps = {\n\tDrawHandler: {\n\t\tsrc: ['Handler.Draw.js'],\n\t\tdesc: 'The base class for drawing.',\n\t},\n\n\tPolys: {\n\t\tsrc: ['Polyline.Draw.js',\n\t\t 'Polygon.Draw.js'],\n\t\tdesc: 'Polyline and Polygon drawing handlers....
javascript
edit
0
0
mit
38ea56fe4be929b498478e21931220ba485dea5f
Leaflet/Leaflet.draw,psicomante/Leaflet.draw,Jingxi1011/Leaflet.draw,riboher/Leaflet.draw,Lemaf/Leaflet.draw,troygnichols/Leaflet.draw,Karttakeskus/Leaflet.draw,Lemaf/Leaflet.draw,arahansen/Leaflet.draw,nagyistoce/Leaflet.draw,ddproxy/Leaflet.draw,davenquinn/Leaflet.draw,kozer/Leaflet.draw,makinacorpus/Leaflet.draw,yey...
build/deps.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* Copyright (c) 2015-present, salesforce.com, inc. All rights reserved */\n/* Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license */\n\n/* eslint-disable no-console, global-require */\n\nimport path from 'path';\n\ncon...
javascript
edit
0
3
bsd-3-clause
d38ff4f1827914a2b3a9b01b04d1bedb1b9f27ed
salesforce/design-system-react,salesforce/design-system-react,salesforce/design-system-react
scripts/command-line-utilities.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * @module app.backgroundlayer.BlankLayer\n */\n/**\n * @fileoverview This file defines the Blank Layer service. This service\n * creates an empty layer and the corresponding spec.\n */\n\nimport appModule from '../module.js';\nimp...
javascript
edit
0
1
mit
e23723167a909e13a99c68e675ec4ae1c78e3c31
Geoportail-Luxembourg/geoportailv3,Geoportail-Luxembourg/geoportailv3,Geoportail-Luxembourg/geoportailv3,Geoportail-Luxembourg/geoportailv3,Geoportail-Luxembourg/geoportailv3
geoportal/geoportailv3_geoportal/static-ngeo/js/backgroundlayer/BlankLayer.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { default as articles } from './articles';\nimport { default as replyrequests } from './replyrequests';\nimport { default as articlereplyfeedbacks } from './articlereplyfeedbacks';\nimport { default as replies } from './replies';...
javascript
edit
0
0
mit
ce0b95ade0c943d4e4ebdd6e6fe549fa2c3adb0b
MrOrz/rumors-db
schema/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = function(r) {\n 'use strict';\n\n return {\n allByProject: allByProject\n };\n\n function allByProject() {\n return r.table('access').run().then(function(allAccess) {\n let byProject...
javascript
edit
0
2
mit
046d334917f33207d1459c0db5d93564dcfaaf88
materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org
backend/server/db/model/access.js
rejected_duplicate
Near-duplicate of sample 84621
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* AIDA Source Code */\n/* Contributors located at: github.com/2nd47/CSC309-A4 */\n\n// main app\n\n// server modules\nvar bcrypt = require('bcryptjs');\nvar express = require('express');\nvar mongoose = require('mongoose');\nvar sessio...
javascript
edit
0
1
mit
2ad30a1eb7b6210a49ab93632d929654541a0eae
2nd47/CSC309-A4,2nd47/CSC309-A4
app/server.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// listen for page navigations, detect if they're YT & include our disable\nchrome.webNavigation.onBeforeNavigate.addListener((details) => {\n if(detectYTURL(details.url) && details.url.indexOf(\"disable_polymer=true\") === -1){\n /...
javascript
edit
0
7
mit
a947cd4ae9499fa2e5b5e19d426d4d4c6cf33bb4
PatrickOBoyle/yt-revert
pageLoad.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport NBA from 'nba'\n\nmodule.exports = (playerName, dispatch) => {\n const playerToAdd = NBA.findPlayer(playerName)\n if(playerToAdd) {\n dispatch({type: \"TOGGLE_PLAYER_LOADING\"})\n dispatch({type: 'HANDLE_FORM_NAME_CHANGE'...
javascript
edit
0
3
mit
d69aac8612cdda875ce965df1d6681791fbbc960
michael-lowe-nz/NBA-battles,michael-lowe-nz/NBA-battles
api/getPlayer.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nfunction printError(e) {\n chrome.alarms.clearAll();\n webkitNotifications.createNotification('', \n e, '').show(); \n}\n\nfunction checkMail() {\n var xhr = new XMLHttpRequest();\n xhr.onreadystatechange = fun...
javascript
edit
0
5
bsd-2-clause
31f5c127ca903b526342e7d14c15d3682164536a
chradcliffe/owa-notifier-chrome
background.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst config = require('./config');\n\nif (config.isProduction || require('piping')(config.piping)) {\n if (!process.env.NODE_ENV)\n throw new Error('Environment variable NODE_ENV must be set.');\n\n // Load and use polyfill for EC...
javascript
edit
0
1
mit
49d93c51b42214e4ac7160f4fb9e2b6e3f03a614
skyuplam/debt_mgmt,christophediprima/este,XeeD/este,GarrettSmith/schizophrenia,SidhNor/este-cordova-starter-kit,zanj2006/este,skallet/este,estaub/my-este,neozhangthe1/framedrop-web,TheoMer/Gyms-Of-The-World,glaserp/Maturita-Project,AlesJiranek/este,GarrettSmith/schizophrenia,nason/este,puzzfuzz/othello-redux,XeeD/test,...
src/server/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nexport default {\n resizers: ['lt', 't', 'rt', 'l', 'r', 'lb', 'b', 'rb'],\n axis: [{\n value: 'lt',\n name: '左上对齐'\n },\n {\n value: 'rt',\n name: '右上对齐'\n },\n {\n value: 'lb',\n name: '左下对齐...
javascript
edit
0
0
mit
ec79970ddbfa92b0406fa73824a0a882be8cc681
Dafrok/Sanrise,Dafrok/Sanrise
src/config/quick-set.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\njest.unmock('../../src/actions/counter')\n\nimport {\n INCREMENT_COUNTER,\n DECREMENT_COUNTER,\n incrementCounter,\n decrementCounter,\n incrementCounterAsync\n} from '../../src/actions/counter'\n\ndescribe('Counter Actions', () =>...
javascript
edit
0
1
mit
5e0a1b5f10cf54b4888c71310fcdddef87e8dbda
epicsharp/react-boilerplate,RSS-Dev/live-html,epicsharp/react-boilerplate,RSS-Dev/live-html
__tests__/actions/counter.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst utilitiesMixin = {\n methods: {\n getStatus: function(job) {\n if (!job.pid && !job.start && !job.end && !job.message)\n return \"pending\";\n else if (job.pid && job.start && !job.end ...
javascript
edit
0
14
apache-2.0
f92d7a5ed276a2c32054aa943dc6fadaa6ec0e8b
uw-it-aca/canvas-analytics,uw-it-aca/canvas-analytics,uw-it-aca/canvas-analytics,uw-it-aca/canvas-analytics
data_aggregator/static/vue/mixins/utilities_mixin.js
rejected_complexity
Cyclomatic complexity too high: 14
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * Start app\n */\n\n'use strict';\n\nvar app = new (require('modules/app'))();\napp.init();\n\n```\n\nApply this change: Use relative path for modules/app" }, { "role": "assistant", "content": "/**\n * Start app\n */\n...
javascript
edit
0
0
mit
8d60aca70226c3c3a95bbad23c3626dc71d12bd0
colinrotherham/core
app/public/assets/js/main.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\ndefine(['./isImmutable'], function (isImmutable) {\n\n 'use strict';\n\n /**\n * Extract meta data from a property.\n *\n * @param {Mixed} prop The property\n * @param {String} name The name of the property\n *...
javascript
edit
0
5
mit
3e22fdd08d1edf6a4c5b7c0fdd9e248c7481a6c7
IndigoUnited/js-dejavu,IndigoUnited/js-dejavu
src/lib/propertyMeta.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React, { Component } from 'react';\nimport { Link } from 'react-router';\n\nimport NavBar from './NavBar';\nimport Footer from './Footer';\n\n\nexport default class MainLayout extends Component {\n constructor(props) {\n supe...
javascript
edit
0
1
mit
97ddc8b88f70716061be575a188f2d932c17b101
IsenrichO/DaviePoplarCapital,IsenrichO/DaviePoplarCapital
app/components/MainLayout.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*\n * Paper.js\n *\n * This file is part of Paper.js, a JavaScript Vector Graphics Library,\n * based on Scriptographer.org and designed to be largely API compatible.\n * http://paperjs.org/\n * http://scriptographer.org/\n *\n * Copyr...
javascript
edit
0
2
mit
151f7026e1e2a08e08e6dd931157f7677c3f9eec
byte-foundry/paper.js,ClaireRutkoske/paper.js,lehni/paper.js,iconexperience/paper.js,nancymark/paper.js,JunaidPaul/paper.js,Olegas/paper.js,baiyanghese/paper.js,fredoche/paper.js,superjudge/paper.js,lehni/paper.js,nancymark/paper.js,iconexperience/paper.js,superjudge/paper.js,JunaidPaul/paper.js,byte-foundry/paper.js,p...
src/item/PlacedItem.js
rejected_duplicate
Near-duplicate of sample 91876
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar myApp = angular.module('myApp',['ngRoute']);\n\nmyApp.config(function ($routeProvider) {\n $routeProvider.when('/',{\n controller: 'WomenController',\n templateUrl: 'views/women.html'\n })\n .when('/women',{\n controller...
javascript
edit
0
1
mit
565edde418e59cee1c7d35a3382fae20146bcde4
MartaL0b0/mqsc_web,MartaL0b0/mqsc_web
client/app.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport localeEN from \"./locales/locale-en.json\";\nimport localeDE from \"./locales/locale-de.json\";\n\nlet AppTranslate = ($translateProvider) => {\n \"ngInject\";\n $translateProvider\n .translations(\"en\", localeEN)\n .transla...
javascript
edit
0
1
mit
4b86e0f567578a67bf7dffbb61ab5f8aff2dafe0
yunity/karrot-frontend,yunity/foodsaving-frontend,yunity/karrot-frontend,yunity/karrot-frontend,yunity/karrot-frontend,yunity/foodsaving-frontend,yunity/foodsaving-frontend,yunity/foodsaving-frontend
client/app/app.translate.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*\n * Copyright 2018, Emanuel Rabina (http://www.ultraq.net.nz/)\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
3
apache-2.0
3f976c77e8ecffa613a4e0835dacb136ba3eb02e
ultraq/thymeleaf-js,ultraq/thymeleaf-js
src/standard/expressions/VariableExpression.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar classLayout = {\n\t'Paper.js': ['global paper scope:_global_'],\n\t'Basic Types': ['Point', 'Size', 'Rectangle', 'Matrix'],\n\t'Items': ['Item', 'Layer', 'Group', 'Raster', 'PlacedSymbol'],\n\t'Paths': ['Path', 'CompoundPath', 'Segm...
javascript
edit
0
0
mit
64eb189ea41e282dbca0b30401039dde9395571f
0/paper.js,0/paper.js
build/jsdoc-toolkit/templates/jsdoc/classLayout.js
rejected_duplicate
Near-duplicate of sample 85531
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nEmber.LinkView.reopen({\n active: Ember.computed('resolvedParams', 'routeArgs', function () {\n var isActive = this._super();\n\n Ember.set(this, 'alternateActive', isActive);\n\n return isActive;\n })\n});\n\...
javascript
edit
0
2
mit
3a2d76768bf53ad2d56b91e9881fb7cbe7802e5f
kevinansfield/Ghost-Admin,dbalders/Ghost-Admin,airycanon/Ghost-Admin,JohnONolan/Ghost-Admin,acburdine/Ghost-Admin,JohnONolan/Ghost-Admin,airycanon/Ghost-Admin,TryGhost/Ghost-Admin,kevinansfield/Ghost-Admin,dbalders/Ghost-Admin,acburdine/Ghost-Admin,TryGhost/Ghost-Admin
utils/link-view.js
rejected_duplicate
Near-duplicate of sample 89579
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar loadFileOnServer = require('../src/server/http-get.js');\n\nfunction GroupedKata(katasUrl) {\n \n this.load = function(onError, onSuccess) {\n function onLoaded(err, data) {\n var parsed;\n try {\n parsed = JSO...
javascript
edit
0
4
mit
b083f7d8b0bc2a1eb1c7ed3e28294429427e56e7
wolframkriesing/es6-react-workshop,wolframkriesing/es6-react-workshop
src/grouped-kata.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * Analytics Constants.\n *\n * Site Kit by Google, Copyright 2020 Google LLC\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 ma...
javascript
edit
0
0
apache-2.0
41f165995c5dc0546edac5447276760316e59b08
google/site-kit-wp,google/site-kit-wp,google/site-kit-wp,google/site-kit-wp
assets/js/modules/analytics/datastore/constants.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar chakram = require('chakram'),\n expect = chakram.expect;\n\ndescribe(\"mPayroll API\", function() {\n\n it(\"should support POST request\", function () {\n this.timeout(4000);\n expect(chakram.post(\"http://local...
javascript
edit
0
1
mit
a0eb67c0e17d2dba35d6390326ec5d9a34eeb7f0
Bill-A/Correctness-DrivenDevelopment
test/mpayrollAPI.js
rejected_duplicate
Near-duplicate of sample 94582
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React, { PropTypes } from 'react';\nimport { TouchableOpacity, Text, StyleSheet, View } from 'react-native';\n\nimport appStyle from '<%= appName %>/src/appStyle';\n\nconst styles = StyleSheet.create({\n container: {\n justif...
javascript
edit
null
null
mit
0dac5b52fdf4b2d9291d6fdb82ba5fc6495741f9
bamlab/generator-rn-toolbox,bamlab/generator-rn-toolbox,bamlab/generator-rn-toolbox
generators/base/templates/src/components/Button.js
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { settled } from '@ember/test-helpers';\nimport { next } from '@ember/runloop';\n\nexport default async function waitForResource(obj, keyname) {\n const start = performance.now();\n do {\n next(() => {});\n await settled(...
javascript
edit
0
5
mit
96abc6e2055c0cc84de76c21d4ad2923bb32a7d2
ilios/common,ilios/common
addon-test-support/ilios-common/helpers/wait-for-resource.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = function () {\n var outputPath = \"./<%= outFolder %>/\";\n var src = \"./<%= srcFolder %>/\";\n\n var config = {\n vendor: {\n destPath: outputPath + \"js\",\n src: [\n ...
javascript
edit
0
1
mit
6372c226095d5cbe8e6081f0efda081a694c7063
Kurtz1993/ngts-cli,Kurtz1993/ngts-cli,Kurtz1993/ngts-cli
templates/app/_gulpfile.config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// Copyright 2014-2015, University of Colorado Boulder\n\n/**\n * Base class for Nodes that represent energy system elements in the view\n * that use images as part of their representation.\n *\n * @author John Blanco\n * @author Andrew...
javascript
edit
0
1
mit
baf441eb9d9f9b3520a47489c7253ae34e8e627e
phetsims/energy-forms-and-changes,phetsims/energy-forms-and-changes,phetsims/energy-forms-and-changes
js/energy-systems/view/ImageBasedEnergySystemNode.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\nmodule.exports = {\n BranchDeleteSummary: require('./BranchDeleteSummary'),\n BranchSummary: require('./BranchSummary'),\n CommitSummary: require('./CommitSummary'),\n DiffSummary: require('./DiffSummary'),\n FetchSummary: r...
javascript
edit
0
0
mit
0eb59da7edbe6324ea450f8a68ddf6f4dc2ccf65
steveukx/git-js,steveukx/git-js
src/responses/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Ember from 'ember';\n\nexport default Ember.Test.registerAsyncHelper('pollParticipate', function(app, name, selections) {\n if (!Ember.isEmpty(name)) {\n fillIn('.participation .name input', name);\n }\n\n const isFreeText ...
javascript
edit
0
3
mit
0f3aa1bc5613d3e08b1cd7a672ac479f64bea63b
jelhan/croodle,jelhan/croodle,jelhan/croodle
tests/helpers/poll-participate.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar Readable = require('stream').Readable\n , data = require('./tree.json')\n\n/*\n * Returns a new stream that will emit all the nodes from tree.json.\n * Should be used to pass into a tree for testing\n */\nmodule.exports = function ...
javascript
edit
0
2
isc
7402407e4e564bbfd2a559e451555327f2697db3
SpiderStrategies/kalpa-tree,SpiderStrategies/kalpa-tree
test/tree-stream.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\ndefine(['backbone.marionette', 'hbs!../templates/filter'],\n function (Marionette, template) {\n 'use strict';\n\n return Marionette.ItemView.extend({\n tagName: 'label',\n className: 'checkbox-inline',\n template:...
javascript
edit
0
1
mit
28fff851aabcda7149d708f0fb453829eec90fe5
nathanajah/nusmods,nathanajah/nusmods,zhouyichen/nusmods,Yunheng/nusmods,nathanajah/nusmods,nathanajah/nusmods,chunqi/nusmods,nusmodifications/nusmods,chunqi/nusmods,zhouyichen/nusmods,nusmodifications/nusmods,zhouyichen/nusmods,mauris/nusmods,Yunheng/nusmods,mauris/nusmods,mauris/nusmods,zhouyichen/nusmods,chunqi/nusm...
app/scripts/modules/views/FilterView.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n#!/usr/bin/env node\n\nvar assert = require('../lib/assert').getAssertModule();\nvar exec = require('child_process').exec;\n\nvar sprintf = require('sprintf').sprintf;\n\nvar cwd = process.cwd();\n\nexec(sprintf('NODE_PATH=lib-cov %s/bi...
javascript
edit
0
4
apache-2.0
e15549fca5e0edbb40a61b1b08329e6232672192
cloudkick/whiskey,cloudkick/whiskey
example/test-coverage.js
rejected_duplicate
Near-duplicate of sample 73488
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\"use strict\";\n\nangular.module('arethusa').factory('GlobalErrorHandler', [\n '$window',\n '$analytics',\n function($window, $analytics) {\n var oldErrorHandler = $window.onerror;\n $window.onerror = function errorHandler(err...
javascript
edit
0
2
mit
c6a02a3fc40345ab2ceaecc98c483dbca3f67d56
PonteIneptique/arethusa,latin-language-toolkit/arethusa,Masoumeh/arethusa,alpheios-project/arethusa,fbaumgardt/arethusa,fbaumgardt/arethusa,fbaumgardt/arethusa,alpheios-project/arethusa,alpheios-project/arethusa,PonteIneptique/arethusa,latin-language-toolkit/arethusa,Masoumeh/arethusa
app/js/arethusa/global_error_handler.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nExt.define('SenchaFront.controller.ProfileListController', {\n extend: 'Ext.app.Controller',\n \n config: {\n refs: {\n \n },\n control: {\n \n }\n },\n \n //called whe...
javascript
edit
0
1
mit
d5c3e2443e9652573ea599cbdb5973cc282bda0c
CEPFU/sencha-front,CEPFU/sencha-front,CEPFU/sencha-front,CEPFU/sencha-front
SenchaFront/app/controller/ProfileListController.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst milieu = require('milieu');\n\nconst config = milieu('<%= serverName %>', {\n environment: 'dev',\n server: {\n port: 8080\n },\n mongo: {\n url: 'mongodb://localhost/<%= databaseName %>'\n }\n});\n\n\nmodule.exports = ...
javascript
edit
0
0
mit
688d85886900ccd2e04aa35267b51e91d74ed15f
ndelvalle/generator-api
generators/app/templates/config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\n/* global XMPP */\nvar client = new XMPP.Client({\n websocketsURL: \"ws://localhost:5280/xmpp-websocket/\",\n jid: '<EMAIL>',\n password: 'password'\n})\n\nclient.addListener(\n 'online',\n function() {\n...
javascript
edit
0
1
isc
cd78a890ac08076be69d8bf04fbfb1177f57192d
node-xmpp/node-xmpp,xmppjs/xmpp.js,capablemonkey/node-xmpp-client,capablemonkey/node-xmpp-client,ggozad/node-xmpp,xmppjs/xmpp.js,node-xmpp/node-xmpp,ggozad/node-xmpp,mweibel/node-xmpp-client
examples/browser/chat.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar tape = require(\"tape\"),\n jsdom = require(\"jsdom\"),\n d3 = Object.assign(\n require(\"../\"),\n require(\"d3-selection\")\n );\n\n// An example component.\nfunction Paragraph(){\n return function (context, d)...
javascript
edit
0
1
bsd-3-clause
3f9d505cdf0415fd2b5462a45e92243b06cfe058
curran/d3-component
test/component-test.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function(){\n \"use strict\";\n angular.module(\"noticeboard\", [])\n .controller(\"Noticeboard\", NoticeboardCtrl)\n .directive(\"noticeboard\", function(){\n return {\n restict: \"E\",\n templ...
javascript
edit
0
1
mit
306392ee003dd5f3aedf1cc2ccbb9d528423d558
dragonfi/noticeboard,dragonfi/noticeboard,dragonfi/noticeboard,dragonfi/noticeboard
noticeboard/static/noticeboard.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport { storiesOf } from '@storybook/react';\n\nstoriesOf('Addons|Options', module)\n .add('setting name', () => <div>This story should have changed the name of the storybook</div>, {\n options: {\n ...
javascript
edit
0
1
mit
deb174f533fba2bd66c48967c1a3c76cfbee8248
storybooks/storybook,storybooks/storybook,storybooks/storybook,storybooks/storybook,storybooks/storybook,storybooks/react-storybook,storybooks/react-storybook,storybooks/react-storybook,storybooks/react-storybook,storybooks/storybook,kadirahq/react-storybook,kadirahq/react-storybook,storybooks/storybook
examples/official-storybook/stories/addon-options.stories.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\napp.controller('HomeController', ['$scope', '$http', 'stocks', function($scope, $http, stocks) {\n\tstocks.getStocks().success(function(data) {\n\t\t$scope.stocks = data;\n\t});\n\n\t$scope.addStock = function() {\n\t\tif (!$scope.symbo...
javascript
edit
0
3
mit
a8fc6c0595f80fc5a104ae5d6eec35a3b4626f7b
zachloubier/stocks,zachloubier/stocks
app/controllers/HomeController.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n$.ajax({\n\turl: chrome.extension.getURL('scripts/' + location.hostname.replace(/^www\\./, '') + '.js'),\n\tdataType: 'text',\n\tsuccess: function(data){\n\t\t$(function(){\n\t\t\teval(data);\n\t\t})\n\t}\n});\n\n$.ajax({\n\turl: chrome...
javascript
edit
0
1
mit
3a94958029a0b6d2a3f430b1c83a2aec0e862a9c
p3lim/dotjs-universal,p3lim/dotjs-universal
source/dotjs.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// remove-resource.js\n/*\n Copyright (c) 2011 Talis Inc, Some Rights Reserved\n Licensed under the Apache License, Version 2.0, http://www.apache.org/licenses/LICENSE-2.0\n*/\n\n(function($){\n\ncalli.removeResource = function(even...
javascript
edit
0
3
apache-2.0
33e8305af2c4d8dca4413405642d6a4a10512237
Thellmann/callimachus,edwardsph/callimachus,jimmccusker/callimachus,3-Round-Stones/callimachus,3-Round-Stones/callimachus,Thellmann/callimachus,jimmccusker/callimachus,jimmccusker/callimachus,edwardsph/callimachus,jimmccusker/callimachus,Thellmann/callimachus,jimmccusker/callimachus,3-Round-Stones/callimachus,3-Round-S...
webapps/callimachus/scripts/remove-resource.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React, { Component, PropTypes } from 'react';\nimport {districtColors, partyData} from './Constants';\n\nclass Precinct extends Component {\n renderDots(dots, party) {\n const color = party ? partyData[party].color: \"black\"...
javascript
edit
0
3
mit
e17e672164ae034f9d13fe56b0e142a244d5da59
benjaminjkraft/elbridge,benjaminjkraft/elbridge,benjaminjkraft/elbridge
src/Precinct.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar D3CarrierLoadChart = (function () {\n 'use strict';\n\n D3CarrierLoadChart.prototype = $.extend({}, D3LoadChart.prototype, {\n emptyMessage: function () {\n return $(this.chartClass).parent().find(\".empty\")...
javascript
edit
0
2
mit
168ff3990c19e31aeef7d1d274cd3b4e1a57559e
quintel/etmoses,quintel/etmoses,quintel/etmoses,quintel/etmoses,quintel/etmoses
app/assets/javascripts/graphs/d3_carrier_load_chart.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst React = require('react');\n\nconst NodeControlButton = require('./node-control-button');\n\nconst NodeDetailsControls = React.createClass({\n\n render: function() {\n let spinnerClassName = 'fa fa-circle-o-notch fa-spin';\n ...
javascript
edit
0
5
apache-2.0
232a2ebe2a47b0a302ee1530410880d6db0a74cf
dilgerma/scope,kinvolk/scope,paulbellamy/scope,alban/scope,alban/scope,mbrukman/scope,mbrukman/scope,mbrukman/scope,mbrukman/scope,weaveworks/scope,weaveworks/scope,alban/scope,paulbellamy/scope,dilgerma/scope,dilgerma/scope,paulbellamy/scope,weaveworks/scope,alban/scope,weaveworks/scope,alban/scope,kinvolk/scope,kinvo...
client/app/scripts/components/node-details-controls.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*\nCopyright 2016 Mozilla\n\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use\nthis file except in compliance with the License. You may obtain a copy of the\nLicense at http://www.apache.org/licenses/LI...
javascript
edit
0
1
apache-2.0
7208cd1c8f26a404974b5f989611b2bc30203b47
victorporof/tofino,victorporof/tofino
src/browser-frontend/index.js
accepted
null
true
[ { "role": "user", "content": "Write javascript code for the following: [docs] Remove the Nimbus prefix from the index." }, { "role": "assistant", "content": "// Make the \"Modules\" section the root section.\nNAVTREE[0][2] = NAVTREE[0][2][0][2];\n\n// Remove the Nimbus prefix before every featur...
javascript
new_file
0
0
apache-2.0
127e1c750c4cc9f768dcd836e6566408d591e4a4
weiyanwu1984/nimbus,Arcank/nimbus,kviksilver/nimbus,Arcank/nimbus,zilaiyedaren/nimbus,marcobgoogle/nimbus,zaichang/nimbus,dmishe/nimbus,SuPair/nimbus,chanffdavid/nimbus,cnbin/nimbus,pilot34/nimbus_fork,0xced/nimbus,michaelShab/nimbus,dieface/nimbus,marcobgoogle/nimbus,bogardon/nimbus,treejames/nimbus,Guokr1991/nimbus,J...
docs/cleannavtree.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of 16-bit unsigned integers in the platform byte order.\n*\n* @module @stdlib/array/uint16\n*\n* @example\n* var ctor = require( '@stdlib/...
javascript
edit
0
0
apache-2.0
a4cb43bb8fef9f9821343d33a0c10b5e7b17d47b
stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib
lib/node_modules/@stdlib/array/uint16/lib/index.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://0.0.0.0:3000',\n 'webpack/hot/only-dev-server',\n './src/index.js'\n ],\n resolve: {\n root: __dirname + '/src'\n },\...
javascript
edit
0
0
mit
11f6a18e3a93955c4f9d8a4431a0dfb19e5b3da5
hellojwilde/rehash,hellojwilde/rehash,hellojwilde/rehash
client/webpack.config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use babel'\n\nexport const compiler = false\nexport const minifier = false\nexport function process(contents) {\n const chunks = contents.split(/\\r?\\n/)\n if (chunks[chunks.length - 1] !== '') {\n chunks.push('')\n }\n return ...
javascript
edit
0
2
mit
2a41a37d37dc01493db2354ce2b5a2f9646cfe5d
steelbrain/ucompiler-plugin-newline
src/main.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\"use strict\"\n\nRequest.prototype.options.isSuccess = function() {\n\tvar status = this.status;\n\treturn (status === 0 || (status >= 200 && status < 300));\n}\n```\n\nApply this change: FIX Request.isSuccess status code issue returni...
javascript
edit
0
4
mit
677851d8a0e0d08da8079f61a6a310d5e0e28022
jpdery/moobile-core,moobilejs/moobile-core,moobilejs/moobile-core,jpdery/moobile-core
utils/request/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport {Transform, ingest} from 'vega-dataflow';\nimport {inherits, isFunction} from 'vega-util';\nimport {geoGraticule} from 'd3-geo';\n\n/**\n * GeoJSON feature generator for creating graticules.\n * @constructor\n */\nexport default ...
javascript
edit
0
6
bsd-3-clause
50a83936bc67d8309d0851c88b4439f4b3897370
vega/vega,lgrammel/vega,vega/vega,vega/vega,vega/vega
packages/vega-geo/src/Graticule.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\"use strict\";\n\n\n/**\n * RegExp to find placeholders in the template\n *\n * http://regexr.com/3e1o7\n * @type {RegExp}\n */\nconst _re = /{([0-9a-zA-Z]+?)}/g;\n\n\n/**\n * Micro template compiler\n *\n * @param {string} template\n ...
javascript
edit
0
5
mit
cb899f08a0a17a5a91b380d041149fb2f8fbd77e
hendrysadrak/crouch
crouch.js
accepted
null
true