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\nPackage.describe({\n summary: \"Good defaults for the mobile status bar\",\n version: \"1.0.14\"\n});\n\nCordova.depends({\n 'cordova-plugin-statusbar': '2.3.0'\n});\n\n```\n\nApply this change: Update cordova-plugin-statusbar from 2...
javascript
edit
0
0
mit
b9f34201ddb64378f10320b7a0f9e4ef1d29bb5e
Hansoft/meteor,Hansoft/meteor,Hansoft/meteor,Hansoft/meteor,Hansoft/meteor,Hansoft/meteor,Hansoft/meteor
packages/mobile-status-bar/package.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar path = require('path'),\n fs = require('fs');\n\nvar routes = function (app) {\n fs.readdirSync(__dirname).filter(function (file) {\n return path.join(__dirname, file) != __filename;\n }).forEach(function (file) {\n requi...
javascript
edit
0
1
mit
0605be68fa516a167f6519c238952a23e005bc4d
saintedlama/bumm,saintedlama/bumm,the-diamond-dogs-group-oss/bumm
templates/app/routes/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nthis.mmooc = this.mmooc || {};\n\n// Course ID for selected course, which frontend page\n// will be swapped with All Courses list\nconst allCoursesFrontpageCourseID = 14;\n\nthis.mmooc.settings = {\n CanvaBadgeProtocolAndHost: 'https:/...
javascript
edit
0
0
mit
fd626a11bcb51fd499cab6aa24ba3c1ac1f4603a
matematikk-mooc/frontend,matematikk-mooc/frontend
src/js/settings.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar performImage = function() {\n var t=[];\n function prepareString(withUrl) {\n return '<a href=\"' + withUrl + '\"><img title=\"'+ withUrl +'\" src=\"' + withUrl + '\"></a>';\n }\n\n // Image tags are the easiest t...
javascript
edit
0
1
mit
626ce2749810d9386c1ae8454796c0ee7cafc23c
booc0mtaco/image-sourcer,booc0mtaco/image-sourcer,booc0mtaco/image-sourcer
src/link_engine.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport { expect } from 'chai';\nimport { List as ImmutableList, Map } from 'immutable';\nimport reducer from '../src/reducer';\n\ndescribe('reducer', () => {\n\n it('should return the initial state', () => {...
javascript
edit
0
1
mit
871c29ed5273a08ca0f4a3413a62ac513c574974
marlonbernardes/coding-stickers,marlonbernardes/coding-stickers
client/test/reducer.spec.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar menubar = require('menubar');\nvar ipc = require('ipc');\nvar shell = require('shell')\n\nvar mb = menubar({\n dir: __dirname,\n width: 280,\n height: 87\n});\n\nmb.on('ready', function ready () {\n require('../server');\n...
javascript
edit
0
1
mit
1b5f10b9c975b8a055d830e8ac5e112dd059c7d5
origingod/lightning,karissa/lightning,lightning-viz/lightning,cournape/lightning,cournape/lightning,lightning-viz/lightning,origingod/lightning,karissa/lightning
electron/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n//= require spree/frontend/viewport\n\nSpree.fetchProductCarousel = function (taxonId, htmlContainer) {\n return $.ajax({\n url: Spree.routes.product_carousel(taxonId)\n }).done(function (data) {\n htmlContainer.html(data);\n ...
javascript
edit
0
4
bsd-3-clause
bb5b1ebe76361ccf064f96d4c0036e29017946e9
imella/spree,imella/spree,ayb/spree,imella/spree,ayb/spree,ayb/spree,ayb/spree
frontend/app/assets/javascripts/spree/frontend/views/spree/home/product_carousels.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar exec = require('child_process').exec;\n\nvar self = module.exports;\n\nself.eject = function(id) {\n\t// are we running on mac?\n\tif (process.platform === 'darwin') {\n\t\t// setup optional argument, on mac, will default to 1\n\t\t...
javascript
edit
0
4
mit
8587e62d184bcc6f28988c6a25b4bbf227d85ed8
brendanashworth/diskdrive
src/diskdrive.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nwindow.__i10c = {};\n\nwindow.__i10c.getInputValue = (inputEle) => {\n return inputEle.val;\n}\n\nwindow.__i10c.setInputValue = (inputEle, val) => {\n inputEle.value = val;\n}\n\nwindow.__i10c.allInputValue = () => {\n var elem...
javascript
edit
0
2
mit
cce7d2b09c0b50300a5c85eefd80f53bae39e7a1
instartlogic/instartlogic.github.io
demo/read-input.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst React = require('react');\nconst { Link } = require('react-router');\nconst { connect } = require('react-redux');\nconst { updatePath } = require('redux-simple-router');\n\nfunction App({ updatePath, children }) {\n return (\n ...
javascript
edit
0
1
mit
af9f12582e288bd2dc1a21a3075d706919b441b3
rackt/redux-simple-router,reactjs/react-router-redux
examples/basic/components/App.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*\n---\n\nname: Event.CSS3\n\ndescription: Provides CSS3 events.\n\nlicense: MIT-style license.\n\nauthors:\n\t- Jean-Philippe Dery (<EMAIL>)\n\nrequires:\n\t- Custom-Event/Element.defineCustomEvent\n\nprovides:\n\t- Event.CSS3\n\n...\...
javascript
edit
0
1
mit
fa56b7a00fc9d56cfea11f9dce754f9d5e5859f8
moobilejs/moobile-core,jpdery/moobile-core,moobilejs/moobile-core,jpdery/moobile-core
src/event/css.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// @flow\n/* eslint-disable arrow-body-style */\nimport { applyMiddleware, createStore } from 'redux'\nimport { createEpicMiddleware } from 'redux-observable'\nimport thunk from 'redux-thunk'\nimport promiseMiddleware from 'redux-promis...
javascript
edit
null
null
apache-2.0
bfa5e93efef1b135edb4cf1807391b5bfc3646fe
tribou/react-template,tribou/react-template,tribou/react-template,tribou/react-template,tribou/react-template
src/redux/store.js
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar http = require('http')\nvar moment = require('moment')\nvar url = require('url')\n\nfunction stringifyTime(now) {\n var timeString = '{\"hour\":' + now.hour() +\n ',\"minute\":' + now.minute() +\n ...
javascript
edit
0
4
mit
fc5c76afa4402477d7cc70010d253a05e5688603
nmarley/node-playground,nmarley/node-playground
learnyounode/json-api-server.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*!\n * qwebs\n * Copyright(c) 2016 Benoît Claveau\n * MIT Licensed\n */\n\"use strict\";\n\nconst Qwebs = require(\"../../lib/qwebs\");\nconst AssetsLoader = require(\"../../lib/loaders/assets\");\n\ndescribe(\"assetsLoader\", () => {\...
javascript
edit
0
2
mit
cb2a18f55784f2b5ce0305d68dee0a4835430435
BenoitClaveau/qwebs,beny78/qwebs,BenoitClaveau/qwebs,beny78/qwebs
tests/loaders/assets.spec.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport moment from 'moment';\nimport { maxPages } from '../../data/config';\n\n// Prevent webpack window problem\nconst isBrowser = () => typeof window !== 'undefined';\n\nconst isPage = () => (isBrowser() ? window.location.pathname.ind...
javascript
edit
0
3
mit
c8f91cf8b2d5b1d0c59e80b3c0fb9f25a49d935e
calpa/blog
src/api/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\ndefine([\"lib/reqwest\", \"lib/lodash\", \"lib/knockout\", \"githubEvent\"],\n function (reqwest, _, ko, GithubEvent) {\n var githubApi = {};\n\n var rootUrl = \"https://api.github.com\";\n\n function getOrganisationMembers(or...
javascript
edit
0
1
mit
4cc9f1f6ede2f3d1b428e7422fd4767c50c5eab3
pimterry/github-org-feed-page,pimterry/github-org-feed-page
src/githubApi.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* eslint-disable prefer-arrow-callback */\n/* eslint-env node, mocha, browser */\n\nconst assert = require('assert');\nconst test = require('../src/index').test;\nconst item = require('./harness/component-data');\nconst path = require(...
javascript
edit
0
1
mit
3c3515ca7d264f4fa1d58047d60d4522a8eb21a2
peripateticus/vue-test-utils
test/index-spec.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = {\n getViewPortInfo: function getViewPort () {\n var e = document.documentElement\n var g = document.getElementsByTagName('body')[0]\n var x = window.innerWidth || e.clientWidth || g.clientWidth\n var y = w...
javascript
edit
0
5
mit
8c23d570176a529519ac869508b1db59c5485a1e
opbeat/opbeat-angular,jahtalab/opbeat-js,opbeat/opbeat-js-core,opbeat/opbeat-angular,opbeat/opbeat-react,opbeat/opbeat-react,jahtalab/opbeat-js,opbeat/opbeat-react,jahtalab/opbeat-js,opbeat/opbeat-angular,opbeat/opbeat-js-core
src/lib/utils.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* globals Stripe */\nimport Ember from 'ember';\nvar $ = Ember.$;\n\nfunction registrationDataFromUrl(url) {\n var matches = url.match(/\\?code=(\\d+)/);\n\n if (matches && matches.length === 2) {\n return {registration_code: matc...
javascript
edit
0
3
mit
29d78768f62444fbba32cab9e2ebf8aa3450991a
mitchlloyd/training,mitchlloyd/training,mitchlloyd/training
client/app/services/session.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n$(document).ready(function() {\n\t\n\tmodule(\"Canvas presentations\");\n\t\n\ttest(\"Check Canvas Presentations\", function() {\n\t\texpect(1);\n\t\tok(MITHGrid.Presentation.RaphSVG !== undefined, \"RaphSVG Presentation exists\");\n\t\...
javascript
edit
0
4
apache-2.0
c3e1fa56c7b2690a59a2c6790eb83dd068746da0
umd-mith/OACVideoAnnotator,umd-mith/OACVideoAnnotator,umd-mith/OACVideoAnnotator
tests/canvas.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*jshint node:true*/\n/* global require, module */\nvar EmberAddon = require('ember-cli/lib/broccoli/ember-addon');\n\nmodule.exports = function(defaults) {\n var app = new EmberAddon(defaults, {\n // Add options here\n });\n\n /*...
javascript
edit
0
1
mit
1e2f798a9a67e57350180e4ac847eac504f11d57
prototypal-io/ui-tomato-theme,prototypal-io/ui-tomato-theme
ember-cli-build.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar $ = require('../')\n , assert = require('assert')\n\n$.import('Foundation')\n$.NSAutoreleasePool('alloc')('init')\n\n// Subclass 'NSObject', creating a new class named 'NRTest'\nvar NRTest = $.NSObject.extend('NRTest')\n , counter...
javascript
edit
0
1
mit
a8bec029798389b68fe5081ff6736605cdc613a7
telerik/NodObjC,mralexgray/NodObjC,TooTallNate/NodObjC,TooTallNate/NodObjC,jerson/NodObjC,jerson/NodObjC,telerik/NodObjC,jerson/NodObjC,mralexgray/NodObjC
tests/extend.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport path from 'path'\n\nexport default {\n name: 'eslint',\n configure ({ projectPath }) {\n return {\n eslint: {\n configFile: path.join(projectPath, '.eslintrc')\n },\n\n module: {\n preLoaders: [\...
javascript
edit
0
2
mit
6ece176a96ddcc80e681ae668f5bdbf865fec567
saguijs/sagui,saguijs/sagui
src/webpack/presets/eslint.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar articles = require('../controllers/articles');\n\n// Article authorization helpers\nvar hasAuthorization = function(req, res, next) {\n if (req.article.user.id !== req.user.id) {\n return res.send(401, 'Us...
javascript
edit
0
4
mit
316152ea0fed4dca0b38276bdbf94884a2363b5a
rpalacios/preach-lander,paperdev7/web-project,suyesh/mean,Cneubauern/Test,Tukaiz/vmi,pavitlabs/mindappt,webapp-angularjs/football,MericGarcia/deployment-mean,reergymerej/counts,Edifice/OctoDo,dhivyaprp/Lets-Fix,szrobinli/mean,ngEdmundas/mean-user-management,cyberTrebuchet/this_is_forOM,Chien19861128/qa-app,kmdr/farmy,j...
packages/articles/server/routes/articles.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Mixin from '@ember/object/mixin';\nimport { inject } from '@ember/service';\nimport { get, computed } from '@ember/object';\nimport { isEmpty } from '@ember/utils';\nimport config from 'ember-get-config';\nimport DataAdapterMixin...
javascript
edit
0
6
mit
3784330b114e5e5b03c7bf1ab854c6865c0079ef
jpadilla/ember-simple-auth-token,jpadilla/ember-cli-simple-auth-token,jpadilla/ember-simple-auth-token,jpadilla/ember-cli-simple-auth-token
addon/mixins/token-adapter.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * util-lang.js - The minimal language enhancement\n */\n\nfunction isType(type) {\n return function(obj) {\n return {}.toString.call(obj) == \"[object \" + type + \"]\"\n }\n}\n\nvar isObject = isType(\"Object\")\nvar isStrin...
javascript
edit
0
1
mit
6d76e2009091d9997c0a692b4fc983112d889653
PUSEN/seajs,121595113/seajs,kuier/seajs,liupeng110112/seajs,evilemon/seajs,twoubt/seajs,treejames/seajs,seajs/seajs,mosoft521/seajs,Gatsbyy/seajs,lianggaolin/seajs,kaijiemo/seajs,coolyhx/seajs,imcys/seajs,sheldonzf/seajs,baiduoduo/seajs,liupeng110112/seajs,hbdrawn/seajs,judastree/seajs,yuhualingfeng/seajs,JeffLi1993/se...
src/util-lang.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar currentTip = null;\nvar currentTipElement = null;\n\nfunction hideTip(evt, name, unique)\n{\n var el = document.getElementById(name);\n el.style.display = \"none\";\n currentTip = null;\n}\n\nfunction findPos(obj)\n{\n // no ide...
javascript
edit
0
4
apache-2.0
f0144914bb08c8ffd3cd99a35fc9c4d4137b933c
NaseUkolyCZ/FunScript,NaseUkolyCZ/FunScript,mcgee/FunScript,ZachBray/FunScript,mcgee/FunScript,cloudRoutine/FunScript,tpetricek/FunScript,mcgee/FunScript,ovatsus/FunScript,nwolverson/FunScript,ZachBray/FunScript,ovatsus/FunScript,nwolverson/FunScript,ovatsus/FunScript,alfonsogarciacaro/FunScript,mcgee/FunScript,nwolver...
Docs/static/custom/tooltips.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\ndescribe('Controller: FormDropAreaCtrl', function () {\n\n // load the controller's module\n beforeEach(module('confRegistrationWebApp'));\n\n var FormDropAreaCtrl,\n scope;\n\n // Initialize the controller and a...
javascript
edit
0
1
mit
b8a59f454394bcc271966a5ffea5d086c4207ce7
CruGlobal/conf-registration-web,CruGlobal/conf-registration-web,CruGlobal/conf-registration-web,CruGlobal/conf-registration-web
test/spec/controllers/formDropArea.js
rejected_duplicate
Near-duplicate of sample 94595
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Ember from 'ember';\n\nexport default Ember.Component.extend({\n userSettings: Ember.inject.service(),\n\n init () {\n this._super();\n this.get('userSettings').timePeriods().then(response => {\n // Sort by latest on...
javascript
edit
0
1
mit
bac969961ad951c10d0cdfa1d8b622c0d121d26f
pe1te3son/spendings-tracker,pe1te3son/spendings-tracker
app/components/select-date.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Ember from 'ember';\n\nexport default Ember.Route.extend({\n model: function() {\n var person_id = this.controllerFor('application').get('attrs.person.id');\n return this.apijax.GET('/identifier.json', { 'person_id': perso...
javascript
edit
0
2
mit
a2361ee313e42f3b3446fa4baf3c0bbd4e072c48
opengovernment/person-widget,opengovernment/person-widget
app/routes/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\nvar _ = require('lodash');\nvar convert = require('./convert.js');\n\nvar context = {\n getDefaults: getDefaults\n};\n\nfunction getDefaults(name, module) {\n var folderName = convert.moduleToFolder(module);\n return {...
javascript
edit
0
1
mit
ce6666eace0a1b6f0d50db3f751fedf3bf1153a7
sysgarage/generator-sys-angular,sysgarage/generator-sys-angular
utils/context.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Ember from 'ember';\nimport SortableItems from 'sortable-items/components/sortable-items';\n\nexport default SortableItems;\n\n```\n\nApply this change: Update import for the app with the correct ember-addon name" }, { "r...
javascript
edit
0
0
mit
0591ffecc36e9b5daebb284de7b74737749c3040
Cryrivers/ember-cli-sortable,JennieJi/ember-cli-sortable,jqyu/ember-cli-sortable,JennieJi/ember-cli-sortable,laantorchaweb/ember-cli-sortable,laantorchaweb/ember-cli-sortable,MaazAli/ember-cli-sortable,Cryrivers/ember-cli-sortable,MaazAli/ember-cli-sortable,jqyu/ember-cli-sortable
app/components/sortable-items.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// Install the configuration interface and set default values\nrequire('configuration.js');\n\n// Use DIM styling overrides and our own custom styling\nrequire('beautification.js');\n\n// Stores weapons pulled from our custom database\n...
javascript
edit
0
1
mit
3480438a6698868c7cdcd743489d5e597e318cbe
rslifka/fate_of_all_fools,rslifka/fate_of_all_fools
app/main.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// ==UserScript==\n// @name Rakuten Mail Magazine Unchecker\n// @namespace https://github.com/takamario/gm_script\n// @description Rakuten Mail Magazine Unchecker\n// @include https://order.step.rakuten.co.jp/rm...
javascript
edit
0
3
mit
fad9ff7971146796207687d03df30c8f41d77290
takamario/gm_script
rakuten_mail_unchecker.user.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Ember from \"ember\";\n\nvar container = '<g transform=\"scale(%s)\">%h</g>';\n\nexport default Ember.Mixin.create({\n exportToSvg: function(){\n var svg = this.$(\"svg\").clone(),\n width = +svg.find(\"desc.width\")[0...
javascript
edit
0
1
apache-2.0
fb0857c7e26ec7d3f9e1e3dca474769d52fc5cef
porkepic/squiggle,porkepic/squiggle
addon/mixins/export-to-svg.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Ember from 'ember';\n// import $ from 'jquery';\n\nexport default Ember.Component.extend({\n expense: {\n sum: '',\n category: '',\n name: ''\n },\n currency: '£',\n expenseCategories: [\n 'Charity',\n 'Clothin...
javascript
edit
0
2
mit
3690a15fc48242d95456fabd1f923f121dc0a2db
pe1te3son/spendings-tracker,pe1te3son/spendings-tracker
app/components/add-expense.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\n(function(app) {\n\n app.directive('twitterBtn', [function() {\n var link = function() {\n !function(d,s,id){\n var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';\n ...
javascript
edit
0
3
mit
829354e73febe532252c48c171537db3b38eb749
clamstew/timer
public/angular/directives/twitter-button.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nmodule.exports = function(grunt) {\n // Configuration.\n grunt.initConfig({\n jscs: {\n options: {\n config: '.jscsrc'\n },\n grunt: 'Gruntfile.js',\n ...
javascript
edit
0
1
mit
dfbde5dcd59fce8101bdebf51d0b7489a07e209e
joshuaspence/grunt-npm-validate
Gruntfile.js
rejected_duplicate
Near-duplicate of sample 91005
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar path = require('path');\n\nmodule.exports = function(grunt) {\n grunt.initConfig({\n 'pkg': grunt.file.readJSON('package.json'),\n 'dtsGenerator': {\n options: {\n baseDir: './',\n name: 'core-components',\...
javascript
edit
0
1
mit
631aeb8a4b81645ad36852dc1076396a625208d1
debugworkbench/core-components,debugworkbench/core-components,debugworkbench/core-components
Gruntfile.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nmodule.exports = function (grunt) {\n require('time-grunt')(grunt);\n\n grunt.initConfig({\n eslint: {\n all: {\n src: [\n '*.js',\n 'bin/grun...
javascript
edit
0
3
mit
0bf04823deb5eb3c673ae8cd7663e5f8ff59de90
EE/grunth-cli
Gruntfile.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nmodule.exports = function (grunt) {\n grunt.initConfig({\n jshint: {\n options: {\n jshintrc: '.jshintrc'\n },\n gruntfile: {\n src: 'Gruntfile.js'\n },\n lib: {\n src: ...
javascript
edit
0
1
mit
196a15dca3290f4fed10470516840a29b1af3588
GuusK/disruptIT,GuusK/disruptIT,GuusK/disruptIT,GuusK/disruptIT
Gruntfile.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\ndefine(['backbone', 'cilantro', 'text!/mock/fields.json'], function (Backbone, c, fieldsJSON) {\n var fields = new Backbone.Collection(JSON.parse(fieldsJSON));\n\n describe('FieldControl', function() {\n var control;\n\n ...
javascript
edit
0
1
bsd-2-clause
d7b23057f03f2af55e032999f8161b6458d8dd77
chop-dbhi/cilantro,chop-dbhi/cilantro,chop-dbhi/cilantro
spec/ui/control.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport crypto from 'crypto';\n\nimport { accountsKeyedbyAccessKey } from './vault.json';\n\nexport function hashSignature(stringToSign, secretKey, algorithm) {\n const hmacObject = crypto.createHmac(algorithm, secretKey);\n return...
javascript
edit
0
4
apache-2.0
1e6dd2f89b973d9fb1dc8e23d1cd77bb0dce24e4
truststamp/S3,truststamp/S3,tomateos/S3,tomateos/S3,tomateos/S3,truststamp/S3,lucisilv/Silviu_S3-Antidote,lucisilv/Silviu_S3-Antidote,lucisilv/Silviu_S3-Antidote,lucisilv/Silviu_S3-Antidote,scality/S3,lucisilv/Silviu_S3-Antidote,tomateos/S3,tomateos/S3,truststamp/S3,scality/S3,scality/S3,truststamp/S3,lucisilv/Silviu_S...
lib/auth/vault.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar TiVoRemote = require('./TiVoRemote');\nvar readline = require('readline');\n\nvar config = {\n ip: '192.168.1.100',\n port: 31339\n}\nvar remote = new TiVoRemote(config);\n\nvar rl = readline.createInterface({ input: process.stdin...
javascript
edit
0
1
mit
0b69c73dfa7f9873176aac684f8e5800ce48b308
mattjgalloway/homebridge-tivo
example-loop.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport {ArrayExtensions} from './arrayextensions';\nimport {Letter} from './letter';\nimport {moveBefore, DIRECTION} from 'aurelia-dragula';\n\nexport class Welcome {\n\n constructor() {\n this.dragDirection = DIRECTION.HORIZONTAL;\...
javascript
edit
0
3
apache-2.0
4a67c4969fc66dd10d9fc6fb7c07be91c5ac2838
michaelmalonenz/aurelia-dragula-example,michaelmalonenz/aurelia-dragula-example
src/welcome.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n$(function handleSimpleIntegration() {\n\n cookieChoices.showCookieBar({\n linkHref: '#',\n cookieText: 'spine.io uses cookies to help operate the site and gather analytics data. You can read more about it in our',\n ...
javascript
edit
0
1
apache-2.0
33d989b7a73129a9198da4c0147995cb19500364
SpineEventEngine/SpineEventEngine.github.io,SpineEventEngine/SpineEventEngine.github.io,SpineEventEngine/SpineEventEngine.github.io,SpineEventEngine/SpineEventEngine.github.io,SpineEventEngine/SpineEventEngine.github.io,SpineEventEngine/SpineEventEngine.github.io
js/cookies-init.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\n//supress log messages\nprocess.env.LOG_LEVEL = 'fatal';\n\nvar chai = require('chai'),\n cap = require('chai-as-promised');\n\nglobal.sinon = require('sinon');\nglobal.fs = require('fs');\nglobal.u...
javascript
edit
0
3
apache-2.0
ccac850fcd3878adbb54e9ae8f92e08f29c81d6f
radiodan/magic-button,radiodan/magic-button
test/helper.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar path = require(\"path\");\nvar stealTools = require(\"steal-tools\");\n\nvar promise = stealTools.bundle({\n config: path.join(__dirname, \"package.json!npm\")\n}, {\n filter: [ \"**/*\", \"package.json\" ],\n minify: true\n});\n...
javascript
edit
0
1
mit
92538b650ec1da071fe6be0697234c6236b118a1
bitovi/canjs,bitovi/canjs,bitovi/canjs,bitovi/canjs
build-dev-bundle.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Realm from 'realm';\n\nexport class InsuranceProvider extends Realm.Object {}\n\nInsuranceProvider.schema = {\n name: 'InsuranceProvider',\n primaryKey: 'id',\n properties: {\n id: 'string',\n name: 'string',\n commen...
javascript
edit
0
0
mit
22b7b0759a48eadbb3268f30d34926e43ee7d2ca
sussol/mobile,sussol/mobile,sussol/mobile,sussol/mobile
src/database/DataTypes/InsuranceProvider.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport DocumentConfigurator from './DocumentConfigurator'\nimport DocumentModel from './DocumentModel'\nimport DocumentJSONConverter from './DocumentJSONConverter'\nimport DocumentHTMLImporter from './DocumentHTMLImporter'\nimport Docum...
javascript
edit
0
1
apache-2.0
083c74399f6c260d1738272c60b282d83b2a0b44
stencila/stencila,stencila/stencila,stencila/stencila,stencila/stencila,stencila/stencila,stencila/stencila,stencila/stencila
document/documentConversion.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nwindow.addEventListener(\"load\", function() {\n\tconst EXTRA_IMAGES = document.getElementsByClassName(\"alt-logo-img\");\n\tEXTRA_IMAGES[0].classList.toggle(\"active\");\n\tEXTRA_IMAGES[EXTRA_IMAGES.length - 1].classList.toggle(\"activ...
javascript
edit
0
2
mit
6552de30288ec17a669a949f1808bd6bb817a1ae
nabijaczleweli/nabijaczleweli.github.io,nabijaczleweli/nabijaczleweli.github.io
js/change_logos.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconsole.log(\"=================================\");\nconsole.log(\"Creating search index...\");\nconsole.log(\"=================================\");\n\n// Scan through all content/ directories\n// For each markdown file\n// Create...
javascript
edit
0
1
mit
299868764c1340bc5cec893ea1081b8947d14838
govau/service-manual
scripts/createsearchindex.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nconst router = require('express').Router();\nconst brewery = require('./breweryController');\n\nrouter.route('/')\n .get(brewery.get)\n .post(brewery.post);\n\nmodule.exports = router;\n\n\n```\n\nApply this change: A...
javascript
edit
0
0
mit
30273baa75c1319034d46f254176b5701125a3b5
ntoung/beer.ly,ntoung/beer.ly
server/api/breweries/breweryRoutes.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar PromiseConstructor = typeof Promise === 'undefined' ? require('promise') : Promise;\n\nmodule.exports = function(environment, ParseTree, ImportManager) {\n var render = function (input, options, callback) {\n var parse = r...
javascript
edit
0
3
apache-2.0
c4c365e613a68109aa33d7a14fc0041b3cf5c148
foresthz/less.js,chenxiaoxing1992/less.js,wjb12/less.js,NaSymbol/less.js,evocateur/less.js,less/less.js,seven-phases-max/less.js,MrChen2015/less.js,SkReD/less.js,deciament/less.js,christer155/less.js,yuhualingfeng/less.js,xiaoyanit/less.js,NirViaje/less.js,royriojas/less.js,royriojas/less.js,less/less.js,bendroid/less....
lib/less/render.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar r = require('rethinkdb');\n\n// Number of seconds after which Reddit will archive an article\n// (180 days): https://github.com/reddit/reddit/commit/b7b24d2e9fa06ba37ea78e0275dce86d95158e64\nvar archiveLimit = 180 * 24 * 60 * 60;\n\...
javascript
edit
0
1
mit
8de8572bcb78739bc25f471dfbfec3ab7e75964c
stuartpb/QIKlaxonBot,stuartpb/QIKlaxonBot
lib/bot/queries.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar path = require('path')\nvar loaderUtils = require('loader-utils')\nvar HtmlbarsCompiler = require('ember-cli-htmlbars')\n\nvar DEFAULT_TEMPLATE_COMPILER = 'components-ember/ember-template-compiler.js'\nvar templateTree\nvar appPath\...
javascript
edit
0
4
mit
12f75878ccc243dbd40a8f755133fb19a97f9954
tulios/ember-webpack-loaders
htmlbars-loader.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar util = require('util');\n\nvar sax = require('sax');\n\nvar TreeBuilder = require('./../treebuilder').TreeBuilder;\n\nfunction XMLParser(target) {\n var self = this;\n this.parser = sax.parser(true);\n\n this.target = (target) ? ...
javascript
edit
0
2
apache-2.0
f7032ee4eb1b17cdab455259ea46e4bba055b5da
racker/node-elementtree
lib/parsers/sax.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { describe } from 'riteway';\n\nimport dsm from '../dsm';\n\nconst SIGNED_OUT = 'signed_out';\nconst AUTHENTICATING = 'authenticating';\n\nconst actionStates = [\n ['initialize', SIGNED_OUT,\n ['sign in', AUTHENTICATING\n ...
javascript
edit
0
1
mit
73d49ad830e028c64d5a68754757dcfc38d34792
ericelliott/redux-dsm
source/test/authenticate-flow-test.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar div = React.DOM.div;\nvar h1 = React.DOM.h1; \n\nvar MyTitle = React.createClass({\n render: function() {\n return (\n div(null, h1(null, this.props.title))\n )\n }\n})\n\nvar MyTitleFactory = React.createFactory(MyTitl...
javascript
edit
0
1
mit
de51636cdf89ae16ab0f9070127acffad5c3b277
jbarbettini/intro-to-react-workshop,jbarbettini/intro-to-react-workshop
js/ClientApp.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar mongoose = require('mongoose');\nvar Schema = mongoose.Schema;\n\nvar analysisSchema = new Schema({\n user_id: {type: Schema.Types.ObjectId, ref: 'User', required: true},\n analysis_name: {type: String, required: true},\n ana...
javascript
edit
0
0
mit
8fc701cdda3fe6bb65d17b854787be36d5236d92
rigatoni/linguine-node,rigatoni/linguine-node,Pastafarians/linguine-node,Pastafarians/linguine-node
models/analysis.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n#! /usr/bin/env node\n'use strict';\n\nvar yarnOrNpm = require('../index');\n\n// Execute the command\ntry {\n const { status } = yarnOrNpm.spawn.sync(\n process.argv.slice(2), { stdio: 'inherit' }\n );\n process.exit(status);\n} ...
javascript
edit
0
0
mit
3a352b8f2d9795eebf2d106dada7cca026c42035
camacho/yarn-or-npm
bin/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar path = require('path');\n\nvar config = require('../config');\n\nmodule.exports = function (req, res, next) {\n var app = req.app,\n locales = app.get('locales'),\n locale = req.acceptsLangu...
javascript
edit
0
3
bsd-3-clause
197029775986b12767f07084b269f6174e85b988
ericf/formatjs-site,okuryu/formatjs-site,ericf/formatjs-site
middleware/intl.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = DOMText\n\nfunction DOMText(value, owner) {\n if (!(this instanceof DOMText)) {\n return new DOMText(value)\n }\n\n this.data = value || \"\"\n this.length = this.data.length\n this.ownerDocument =...
javascript
edit
0
4
mit
eb95bb8ff136c601257b3143f9f2c9ecee7b8fc1
Raynos/min-document,Raynos/min-document
dom-text.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\ndescribe('Users', function() {\n\n describe('Creation', function () {\n\n context('When creating a new user', function() {\n it('Should have an id', function() {\n var some_guy = jsf(mocks.user);\n // ADD SHOULD.J...
javascript
edit
null
null
mit
4532ca7d069d433b2494945e4ed42cf1759541c5
facundovictor/mocha-testing
test/unit/users.js
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```javascript\nclass JsonFormatter {\n static stringify(object, options) {\n options = {\n space: options.prettify ? ' ' : null\n }\n return JSON.stringify(object, null, options.space)\n }\n\n static parse(string) {\n return JSO...
javascript
edit
0
1
mit
64bb2784ffa12a6ae67596dcc98c129bca81f1f6
lujjjh/ea-utils
src/formatter.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar parts = window.location.hash.slice(1).split('&');\n\nparts.forEach(function (value) {\n if (value.substr(0, 12) === \"access_token\") {\n var token = value.substr(13);\n $.ajax({\n type: 'get',\n ...
javascript
edit
0
2
mit
6be75b7f6ce6ee69251ee59f8295e2f1e6bd0356
heyLu/kaiwa,unam3/kaiwa,birkb/kaiwa,warcode/kaiwa,unam3/kaiwa,digicoop/kaiwa,rogervaas/otalk-im-client,birkb/kaiwa,weiss/kaiwa,nsg/kaiwa,lasombra/kaiwa,nsg/kaiwa,syci/kaiwa,digicoop/kaiwa,heyLu/kaiwa,otalk/otalk-im-client,otalk/otalk-im-client,weiss/kaiwa,birkb/kaiwa,nsg/kaiwa,rogervaas/otalk-im-client,warcode/kaiwa,di...
public/js/oauthLogin.js
rejected_duplicate
Near-duplicate of sample 82969
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport cuid from 'cuid';\nimport {database, auth} from '@/config/firebase';\n\nexport default function (post = {}) {\n\n // Properties\n this.id = post.id || cuid();\n this.title = post.title || '';\n this.created = post.created || ...
javascript
edit
0
11
mit
11ad49c32359d07e95487e27651968cd9300e822
tuelsch/bolg,tuelsch/bolg
src/models/Post.js
rejected_complexity
Cyclomatic complexity too high: 11
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\ndescribe(\"ReverseController\", function () {\n var fakeReverseFilter;\n\n // See: https://docs.angularjs.org/api/ng/provider/$filterProvider\n beforeEach(module(\"app.controllers\", function ($filterProvider) {\n consol...
javascript
edit
0
1
mit
996ed3e9977489df473230cadc3973ba24d0ea6d
mariojvargas/angularjs-stringcalc,mariojvargas/angularjs-stringcalc
tests/controllers/reverseControllerTests.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nconst Rx = require('rx');\nrequire('isomorphic-fetch');\n\nconst rxResponse = function (promiseResponse) {\n this._promiseResponse = promiseResponse;\n this.status = promiseResponse.status;\n this.ok = promiseRespons...
javascript
edit
0
1
mit
c8af2b414debcbafc0f87012da0ee3a23f44a107
tangledfruit/rxjs-fetch,tangledfruit/rx-fetch
lib/rx-fetch.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;// noinspection CommaExpressionJS\r\n i[r]=i[r]||function(){\r\n (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();// noinspection CommaExpressionJS\r\n a=s.createE...
javascript
edit
0
2
mit
8e0a36fc602135fd1ec6318c8cc7ee0f7576499d
samg2014/VirtualHand,samg2014/VirtualHand
client/js/google_analytics.js
rejected_duplicate
Near-duplicate of sample 73111
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar d = require('d/d')\n\n , defineProperty = Object.defineProperty;\n\nmodule.exports = function () {\n\tvar text;\n\tif (!this.parentNode) return;\n\tif (!this._domExtLocation) {\n\t\tdefineProperty(this, '_domExtLoc...
javascript
edit
0
3
mit
30895bdd709819dbc7c8f2ec0d4398fb377f00f6
medikoo/dom-ext
node/#/_exclude.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = {\n selector: ['.source.python'],\n id: 'aligner-python',\n config: {\n ':-alignment': {\n title: 'Padding for :',\n description: 'Pad left or right of the character',\n type: 'string',\n \"enu...
javascript
edit
0
0
mit
cb35b30799405a9b43f1736758efd463652a0206
adrianlee44/atom-aligner-python
lib/provider.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar mongoose = require('mongoose'),\n async = require('async'),\n config = require('./config'),\n Schema = mongoose.Schema,\n mongoosastic = require('../lib/mongoosastic');\n\nvar CommentSchema = new Schema({\n user: String,\n pos...
javascript
edit
0
1
mit
fe3639819bbc7bb2c6143c670157912b10ad9330
francesconero/mongoosastic,guumaster/mongoosastic,mongoosastic/mongoosastic,hdngr/mongoosastic,teambition/mongoosastic,hdngr/mongoosastic,francesconero/mongoosastic,avastms/mongoosastic,guumaster/mongoosastic,ennosol/mongoosastic,mongoosastic/mongoosastic,mallzee/mongoosastic,mallzee/mongoosastic,mallzee/mongoosastic,m...
test/count-test.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * Copyright 2019 Google Inc. All Rights Reserved.\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 ...
javascript
edit
0
2
apache-2.0
5ed29e091ef3f24b2f5c9720da5b38ec67e5548c
GoogleChromeLabs/wasm-feature-detect
src/detectors/threads/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar Promise = require('bluebird'),\n dbUtils = require('utils/database'),\n socketUtils = require('utils/socket');\n\nmodule.exports = {\n all : All,\n add : Add,\n rename : Rename,\n delete : Delete\n};\n\nfunction All(reques...
javascript
edit
0
2
mit
730bd53bf36ce19ab57d70aef3992a69bc77636d
code-pool/Easy-Mongo-Server
modules/database/controller.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\n/* global Connector, Util */\n\nConnector.playerSelector = '#player';\n\nConnector.artistTrackSelector = '.player-current-title';\n\nConnector.getArtistTrack = function() {\n\tvar text = $(Connector.artistTrackSelector)...
javascript
edit
0
3
mit
7018847ded01cd7c338b23eafc72935d60938264
usdivad/web-scrobbler,david-sabata/web-scrobbler,Paszt/web-scrobbler,galeksandrp/web-scrobbler,fakelbst/Chrome-Last.fm-Scrobbler,inverse/web-scrobbler,fakelbst/Chrome-Last.fm-Scrobbler,david-sabata/web-scrobbler,carpet-berlin/web-scrobbler,alexesprit/web-scrobbler,alexesprit/web-scrobbler,inverse/web-scrobbler,carpet-b...
connectors/byte.fm.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nconst Promise = require('bluebird');\nconst i18next = Promise.promisifyAll(require('i18next'));\n\nconst MentionableCommandMiddleware = require('../../middleware/MentionableCommandMiddleware');\nconst RestrictChannelsMi...
javascript
edit
0
5
mit
20bfcc8c2dba1ccc5d848bbd321f47067e036418
Archomeda/kormir-discord-bot,Archomeda/kormir-discord-bot
src/modules/schedule/CommandEvents.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport ModalDialog from 'ghost/components/gh-modal-dialog';\nimport upload from 'ghost/assets/lib/uploader';\n\nvar UploadModal = ModalDialog.extend({\n layoutName: 'components/gh-modal-dialog',\n\n didInsertElement: function () {...
javascript
edit
0
2
mit
e31c5e39f3775e2278f7bdb1b8e4de919c97266e
TryGhost/Ghost,TryGhost/Ghost,TryGhost/Ghost
ghost/admin/components/gh-upload-modal.js
rejected_duplicate
Near-duplicate of sample 102368
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar where = 'client';\n\nPackage.describe({\n name: 'lookback:dropdowns',\n summary: 'Reactive dropdowns for Meteor.',\n version: '1.1.0',\n git: 'http://github.com/lookback/meteor-dropdowns'\n});\n\nPackage.onUse(function(api) {\n ...
javascript
edit
0
1
mit
05acc2bfdd8ed19b586ebeaf830c03a8b8456722
lookback/meteor-dropdowns,lookback/meteor-dropdowns
package.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// To use https://github.com/KyleAMathews/typefaces\n// import \"typeface-nunito\";\n\n\nimport \"./js/polyfills.js\"; //MUST GO AT TOP\nimport \"./js/lazysizes.js\";\nimport \"./js/quicklink.js\";\nimport \"./js/nojs.js\";\n\nimport Vu...
javascript
edit
0
0
mit
00a3cfa32ebd0e7c2a2940fa7b881c7c30b03990
budparr/thenewdynamic,budparr/thenewdynamic,budparr/thenewdynamic
assets/index.js
accepted
null
true
[ { "role": "user", "content": "Write javascript code for the following: CHANGE the `set` event of storysource addon, to prevent confusion\n\n`story-event` is very unclear IMHO" }, { "role": "assistant", "content": "export const ADDON_ID = 'storybook/storysource';\nexport const PANEL_ID = `${ADDON...
javascript
new_file
0
0
mit
50c48e8d59b08c01a58f7b5918a6d99dd1ae5755
storybooks/react-storybook,storybooks/storybook,storybooks/storybook,storybooks/storybook,kadirahq/react-storybook,storybooks/react-storybook,storybooks/storybook,kadirahq/react-storybook,storybooks/react-storybook,storybooks/react-storybook,storybooks/storybook,storybooks/storybook,storybooks/storybook
addons/storysource/src/events.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = (() => {\n\n 'use strict';\n\n const Nodal = require('nodal');\n\n class ExampleTest extends Nodal.Test {\n\n test(expect) {\n\n it('Should compare 1 and 1', () => {\n\n expect(1).to.equal(1);\n\n ...
javascript
edit
0
1
mit
8dc0cfa1768a7dcee8dbfacc27e617dbd74ae966
rlugojr/nodal,keithwhor/nodal,IrregularShed/nodal,abossard/nodal,nsipplswezey/nodal,nsipplswezey/nodal,abossard/nodal,nsipplswezey/nodal,IrregularShed/nodal
src/test/tests/example_test.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nrequire('./demo.module.js')\n .config(Routes);\n\n/**\n * @ngInject\n */\nfunction Routes($stateProvider, $locationProvider, $urlRouterProvider) {\n\n $locationProvider.html5Mode(true);\n\n $stateProvider\n ...
javascript
edit
0
1
mit
8d197c49b89665981b90fa7b43b73516ed6a67bc
rogerhutchings/ng-davai,rogerhutchings/ng-davai
app/modules/demo/demo.routes.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar program = require('commander');\nvar hap = require(\"hap-nodejs\");\nvar version = require('./version');\nvar Server = require('./server').Server;\nvar Plugin = require('./plugin').Plugin;\nvar User = require('./user').User;\nvar lo...
javascript
edit
0
1
apache-2.0
cf80e4f2dac2617236eead8bc94fb0d4c2b81eb5
nfarina/homebridge,felixekman/homebridge,inonprince/homebridge,nfarina/homebridge,chrisi21/homebridge,snowdd1/homebridge
lib/cli.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { createStore, applyMiddleware } from 'redux';\nimport thunkMiddleware from 'redux-thunk';\nimport rootReducer from '../reducers';\nimport { createLogger } from '../../browser/remote';\n\n\nconst middlewares = [thunkMiddleware];\...
javascript
edit
0
2
mit
ce720652f2be50886165eb07b856bf85fb22bd67
sqlectron/sqlectron-gui,sqlectron/sqlectron-gui,sqlectron/sqlectron-gui,sqlectron/sqlectron-gui
src/renderer/store/configure.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Ember from 'ember';\n\nexport default Ember.Route.extend({\n title: function(tokens) {\n var base = 'My Blog';\n var hasTokens = tokens && tokens.length;\n\n return hasTokens ? tokens.reverse().join(' - ') + ' - ' + bas...
javascript
edit
0
1
mit
e33da7f293c1dc45e2121b5dd881773c8716c76a
ronco/ember-cli-document-title,kimroen/ember-cli-document-title,kimroen/ember-cli-document-title,ronco/ember-cli-document-title
tests/dummy/app/routes/application.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n//\n// Adapted from: \n// http://stackoverflow.com/questions/22330103/how-to-include-node-modules-in-a-separate-browserify-vendor-bundle\n//\n\nvar gulp = require('gulp');\nvar browserify = require('browserify');\n//var handl...
javascript
edit
0
1
mit
f733cbcb5881b7d137931d8c9c16e5e8f1386c82
pafalium/gd-web-env,pafalium/gd-web-env
gulpfile.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * @constructor\n */\nwebfont.FontApiUrlBuilder = function(apiUrl) {\n if (apiUrl) {\n this.apiUrl_ = apiUrl;\n } else {\n var protocol = 'https:' == window.location.protocol ? 'https:' : 'http:';\n\n this.apiUrl_ = prot...
javascript
edit
0
4
apache-2.0
e8d18d8b96361c0ba06f3e540fdf7717e8b1025c
typekit/webfontloader,zeixcom/webfontloader,kevinrodbe/webfontloader,mettjus/webfontloader,sapics/webfontloader,Monotype/webfontloader,typekit/webfontloader,omo/webfontloader,sapics/webfontloader,digideskio/webfontloader,armandocanals/webfontloader,omo/webfontloader,ahmadruhaifi/webfontloader,JBusch/webfontloader,joelr...
src/google/fontapiurlbuilder.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst babel = require('gulp-babel');\nconst gulp = require('gulp');\nconst print = require('gulp-print');\n\n\ngulp.task('js', () => {\n return gulp.src('src/*.js')\n .pipe(print())\n .pipe( babel({ presets: ['es2015'] ...
javascript
edit
0
1
mit
d1ccfc9a672c42c9fe3967f657ad1213d7288abd
keenanamigos/es6-js-helper-functions
gulpfile.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nenyo.kind({\n\tname: \"enyo.AppMenu\",\n\tkind: onyx.Menu,\n\tclasses: \"enyo-appmenu\",\n\tdefaultKind: \"enyo.AppMenuItem\",\n\tpublished: {\n\t\tmaxHeight: 400\n\t},\n\tcomponents: [\n\t\t{\n\t\t\tkind: enyo.Signals,\n\t\t\tonmenubut...
javascript
edit
0
2
apache-2.0
4ff3cccc2379de1df8dda1723a34789c507a6ad1
JayCanuck/enyo-luneos
source/AppMenu.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\ndefine([\n 'jquery',\n 'DoughBaseComponent',\n 'InsertManager',\n 'eventsWithPromises'\n], function (\n $,\n DoughBaseComponent,\n InsertManager,\n eventsWithPromises\n) {\n 'use strict';\n\n var LinkManagerProto,\n defau...
javascript
edit
0
2
mit
f4ad01bf552e757b0afe515b4d5f0603403f7922
moneyadviceservice/cms,moneyadviceservice/cms,moneyadviceservice/cms,moneyadviceservice/cms
app/assets/javascripts/comfortable_mexican_sofa/admin/modules/LinkManager.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// Hello page\n//\nexports.View =\n{\n title: \"Hello World\",\n elements:\n [\n { control: \"stackpanel\", orientation: \"Horizontal\", contents: [\n { control: \"text\", value: \"First name:\", fontsize: 12...
javascript
edit
0
1
mit
01b0c0c8a2d5c78d81cd0532fe837c14550fdf50
SynchroLabs/SynchroSamples
hello.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nfunction checkWindowSize(){\n var w = document.documentElement.clientWidth;\n var panel = document.getElementById(\"help-panel\");\n if (w < 978) {\n panel.style.position = \"static\";\n panel.style.width = \"auto...
javascript
edit
0
5
mit
106c51e36add35f2b98bcf940c98363e707d2acb
ProjectSidewalk/SidewalkWebpage,ProjectSidewalk/SidewalkWebpage,ProjectSidewalk/SidewalkWebpage,ProjectSidewalk/SidewalkWebpage,ProjectSidewalk/SidewalkWebpage,ProjectSidewalk/SidewalkWebpage
public/javascripts/labelingGuidePanelResize.js
rejected_duplicate
Near-duplicate of sample 103714
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
159ad3bafaa5ed4aa892267e887a24622bee385b
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\nimport Ember from 'ember';\n\nexport default Ember.Component.extend({\n\n tagName: 'form',\n classNameBindings: [ 'isValid:valid:invalid' ],\n\n cancel: 'cancel',\n isValid: Ember.computed.alias('formModel.isValid'),\n notify: 'not...
javascript
edit
0
3
mit
5111ce507cea494abc1a7f896af15d81349473cf
dollarshaveclub/ember-uni-form,dollarshaveclub/ember-uni-form
app/components/validated-form.js
rejected_duplicate
Near-duplicate of sample 101547
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nconst builder = require('botbuilder');\n\nmodule.exports = exports = [(session) => {\n\n const card = new builder.HeroCard(session)\n .title('JIRA Journal Bot')\n .text('Your bullet journal - whatever y...
javascript
edit
0
1
mit
03e248c9803b16c6c1cd8bad5524b668f3ac987e
99xt/jira-journal,99xt/jira-journal
modules/help.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\"use strict\"\n\nconst Characters = {\n\tWIDE_BAR: \"W\",\n\tNARROW_BAR: \"N\",\n\tWIDE_SPACE: \"w\",\n\tNARROW_SPACE: \"n\",\n}\n\nmodule.exports = Characters\n\n```\n\nApply this change: Use es6 imports / exports" }, { "role"...
javascript
edit
0
0
mit
49af20920479ecd2772c929e301dbe48623f4a07
mormahr/barcode.js,mormahr/barcode.js
src/Characters.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\ndefine([\n 'config',\n 'angular',\n 'controller/<%= _.slugify(name) %>-controller'\n], function(cfg, A) {\n return describe('<%= _.humanize(name) %> controller', function() {\n var $scope,\n createController;\n\n before...
javascript
edit
0
1
mit
f9a5b3dcdef34dcca69c5f152db43626cf683945
ahmednuaman/generator-radian
controller/templates/_spec.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use babel'\n\nimport {fork} from 'child_process'\nimport * as Communication from '../src/main'\n\nconst WORKER_PATH = __dirname + '/fixtures/worker.js'\n\ndescribe('Process-Communication', function() {\n\n describe('createFromProcess'...
javascript
edit
0
1
mit
c517504edce5d6767a353abc088e5084ad1a7e2a
steelbrain/process-communication
spec/main-spec.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nTemplate.nav.onRendered(function() {\n this.$('.button-collapse').sideNav({\n closeOnClick: true\n });\n});\n\nTemplate.nav.events({\n 'click .logout': function(e){\n e.preventDefault();\n Meteor.logout(function(){\n sA...
javascript
edit
0
1
mit
764df7490dd131106a62bea47469aa171f283cdb
mtr-cherish/cherish,mtr-cherish/cherish
client/templates/app/nav/nav.js
accepted
null
true