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\nvar codes = document.getElementsByTagName(\"code\");\nvar title, elTitle, elPre;\nfor (var i=0, l=codes.length ; i<l ; i++) {\n elPre = codes[i].parentNode;\n if (elPre.tagName != \"PRE\") continue;\n\n // Prepare for highlighting\n ...
javascript
edit
0
0
bsd-3-clause
a439b552acbd586615b15b86d79ed003979aeaed
MasseR/Blog,MasseR/Blog
static/js/sh_init.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// Set up testing enviroment to run like a browser in the command line \n\n\n// Build 'renderComponent' helper that should render a given react class\n\n\n// Build helper for simulating events\n\n\n// Set up chai-jquery\n```\n\nApply th...
javascript
edit
0
1
mit
e13f0ea5f5e21d63d367e61f4b247ba2a60cfd48
Branimir123/Learning-React,Branimir123/Learning-React
5.AdvancedReactAndRedux/test/test_helper.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar util = require('util'),\n webdriver = require('selenium-webdriver'),\n chrome = require('selenium-webdriver/chrome'),\n retry = require('./index.js');\n\nvar driver = chrome.createDriver(\n new webdriver.Capabilities({'b...
javascript
edit
0
1
mit
a0045dd29b77217ed86dbf2f1d26925d5416b0ad
bbc/webdriverjs-retry,bbc/webdriverjs-retry,juliemr/webdriverjs-retry
example_test.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Logger from 'ember-console';\nimport { isTesting } from './testing';\n\nlet onerror;\n// Ember.onerror getter\nexport function getOnerror() {\n return onerror;\n}\n// Ember.onerror setter\nexport function setOnerror(handler) {\n...
javascript
edit
0
3
mit
6a97907ccc0ceeadcbbef6c66fda080e926c42b2
johanneswuerbach/ember.js,elwayman02/ember.js,kanongil/ember.js,patricksrobertson/ember.js,intercom/ember.js,Patsy-issa/ember.js,sivakumar-kailasam/ember.js,thoov/ember.js,mixonic/ember.js,kennethdavidbuck/ember.js,sivakumar-kailasam/ember.js,bekzod/ember.js,rfsv/ember.js,kaeufl/ember.js,pixelhandler/ember.js,mike-nort...
packages/ember-metal/lib/error_handler.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport * as jsonCallFunctions from './calls/index';\n\nconst jsonCalls = {\n 1: jsonCallFunctions.toggleWaitCursor,\n 2: jsonCallFunctions.selectTapp,\n 4: jsonCallFunctions.showPictures,\n 14: jsonCallFunctions.requestGeoL...
javascript
edit
0
0
mit
c06c26a6987da66dc1722be92625065cacf73603
TobitSoftware/chayns-web-light,TobitSoftware/chayns-web-light
src/json-chayns-call/json-calls.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\n'use strict';\n\n(function() {\n angular.module('fireStation.homeController', [])\n\n .controller('home', function($scope, map, $filter) {\n var homeMap = map.initMap('map', {scrollWheelZoom: false});\n hom...
javascript
edit
0
5
mit
61a7bad245a6b365ff7162421545b9004d79b2d5
meilinger/firecares,HunterConnelly/firecares,garnertb/firecares,FireCARES/firecares,ROGUE-JCTD/vida,garnertb/firecares,HunterConnelly/firecares,ROGUE-JCTD/vida,ROGUE-JCTD/vida,ROGUE-JCTD/vida,HunterConnelly/firecares,FireCARES/firecares,meilinger/firecares,garnertb/firecares,FireCARES/firecares,FireCARES/firecares,Fire...
firecares/firestation/static/firestation/js/controllers/home.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* global beforeEach, describe, it */\n\nvar watch = require('..');\nvar join = require('path').join;\nvar fs = require('fs');\nvar rimraf = require('rimraf');\nrequire('should');\n\nfunction fixtures(glob) {\n return join(__dirname,...
javascript
edit
0
1
mit
0f3a4183d62b62f288cc9614fe52bc03ba33d01b
devm33/gulp-watch,UltCombo/gulp-watch,operatino/gulp-watch,moander/gulp-watch,floatdrop/gulp-watch
test/directory.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * Adds the ID of the user object stored on our database\n * to the token returned from Auth0\n */\nfunction (user, context, callback) {\n var namespace = 'https://techbikers.com/';\n context.idToken[namespace + 'user_id'] = user...
javascript
edit
0
2
mit
cd70ccc9aeb8cb3e26315cd627863ff67e5759f5
Techbikers/authentication
rules/inject-local-id.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*\n * Copyright (c) 2012 Adobe Systems Incorporated. All rights reserved.\n * \n * Permission is hereby granted, free of charge, to any person obtaining a\n * copy of this software and associated documentation files (the \"Software\")...
javascript
edit
0
0
mit
6bbea72f596cfa83b8cf50d3f546fff1bb3ff900
Cartman0/brackets,ralic/brackets,MantisWare/brackets,y12uc231/brackets,Mosoc/brackets,iamchathu/brackets,nucliweb/brackets,flukeout/brackets,sophiacaspar/brackets,fronzec/brackets,pkdevbox/brackets,riselabs-ufba/RiPLE-HC-ExperimentalData,zaggino/brackets-electron,mjurczyk/brackets,82488059/brackets,2youyouo2/cocoslite,...
src/nls/de/urls.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// use level-dyno and open a new datastore\nvar dyno = require('../level-dyno.js');\nvar flake = require('flake')('eth0');\n\n// open a new database\nvar db = dyno('/tmp/users');\n\n// do the above sequence\ndb.putItem('chilts', { nick ...
javascript
edit
0
1
mit
e4b0d2b5ef01904c7206e855f730a5f3b31a0988
chilts/modb-dyno-leveldb
examples/01-add-user.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar spdyPush = require('..')\n , spdy = require('spdy')\n , express = require('express')\n , path = require('path')\n , fs = require('fs');\n\nvar app = express();\napp.use(spdyPush.referrer());\napp.use(express.sta...
javascript
edit
0
0
mit
7e84c0227dd793591188454e9cc1e3b63d6b8b9f
halvards/spdy-referrer-push
examples/example.tls.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst fs = require('fs');\nconst { promisify } = require('util');\nconst mongodb = require('mongodb');\nconst request = require('request');\n\nasync function readMongoDocuments(file) {\n const ISODate = (d) => new Date(d);\n const Obj...
javascript
edit
0
1
mit
884def1c71c748655bc294e2b3084c627973a848
openwhyd/openwhyd,openwhyd/openwhyd,openwhyd/openwhyd,openwhyd/openwhyd,openwhyd/openwhyd
test/db-helpers.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar pathwayApp = angular.module('pathwayApp', ['ui.router', 'templates']);\n\npathwayApp.config(function($stateProvider, $urlRouterProvider, $locationProvider) {\n //Default route\n $urlRouterProvider.otherwise('/');\...
javascript
edit
0
1
mit
2b37f7f163fa4eec831e72e1f876ffad3894e1df
aattsai/Pathway,aattsai/Pathway,aattsai/Pathway
pipeline/app/assets/javascripts/app.js
rejected_duplicate
Near-duplicate of sample 83171
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\n/**\n * fetch-error.js\n *\n * FetchError interface for operational errors\n */\n\n/**\n * Create FetchError instance\n *\n * @param String message Error message for human\n * @param String type Error type f...
javascript
edit
0
2
mit
4a9a3246f633c3ddb358d3e79a38b39bb2a61bb1
jkantr/node-fetch,bitinn/node-fetch
src/fetch-error.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*\n * Copyright (c) 2014-2020 Bjoern Kimminich.\n * SPDX-License-Identifier: MIT\n */\n\n/* jslint node: true */\nconst fs = require('fs')\nconst path = require('path')\nconst sequelizeNoUpdateAttributes = require('sequelize-noupdate-a...
javascript
edit
0
2
mit
0ab2cd8f17982662da8e659972746b617983eb53
bkimminich/juice-shop,bkimminich/juice-shop,bkimminich/juice-shop,bkimminich/juice-shop,bkimminich/juice-shop,bkimminich/juice-shop
models/index.js
rejected_duplicate
Near-duplicate of sample 81086
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * Production environment settings\n *\n * This file can include shared settings for a production environment,\n * such as API keys or remote database passwords. If you're using\n * a version control solution for your Sails app, t...
javascript
edit
0
0
mit
de74589c0323ad7d0323345fd9e214fb42498e8c
aug70/redrum-js-client,aug70/redrum-js-client
config/env/production.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*\n * In order to prevent errors caused by e2e tests running too fast you can slow them down by calling the following\n * function. Use higher values for slower tests.\n *\n * utils.delayPromises(30);\n *\n */\nvar promisesDelay = 50;\...
javascript
edit
0
1
apache-2.0
8114331a8425621e2eb98f39045289ed08bb2e0d
codarchlab/idai-field-client,codarchlab/idai-field-client,codarchlab/idai-field-client,codarchlab/idai-field-client
test/e2e/config/delays.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar <%= classedName %> = {\n\n}\n\n<% if (es6) { %> export default <%= classedName %>; <% }\nelse { %>module.exports = <%= classedName %>; <% } %>\n\n```\n\nApply this change: Add missing semicolon to avoid warnings" ...
javascript
edit
null
null
mit
ccd35fed533ac20783ccf70a09a81c1aaf611341
mattludwigs/generator-react-redux-kit,mattludwigs/generator-react-redux-kit,react-webpack-generators/generator-react-webpack,newtriks/generator-react-webpack
templates/javascript/FluxAction.js
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst parseTime = (s) => {\n const re = /(\\d{2}):(\\d{2}):(\\d{2}),(\\d{3})/;\n const [, hours, mins, seconds, ms] = re.exec(s);\n return 3600*(+hours) + 60*(+mins) + (+seconds) + 0.001*(+ms);\n};\n\nexport const parseSRT = (text) =...
javascript
edit
0
4
mit
d761c33ce8effc9640fccfb4e409bf6a6ee33a91
rsimmons/voracious,rsimmons/immersion-player,rsimmons/immersion-player,rsimmons/voracious,rsimmons/voracious
util/subtitles.js
rejected_duplicate
Near-duplicate of sample 99882
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport { expect } from 'chai';\nimport { mount } from 'enzyme';\nimport MarkupFrame from '../src';\n\ndescribe( '<MarkupFrame />', () => {\n\tit( 'renders an iframe', () => {\n\t\tconst wrapper = mount( <Mark...
javascript
edit
0
1
mit
e5c01d6b96b1aec411017bf20069d6706623ff60
sirbrillig/markup-frame
test/markup-frame-test.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*\n * Refresh rendered file through mfr\n */\n\n'use strict';\n\nvar $ = require('jquery');\nvar $osf = require('js/osfHelpers');\n\nvar FileRenderer = {\n start: function(url, selector){\n this.url = url;\n this.tries...
javascript
edit
0
2
apache-2.0
54315706195e9280beccdaa7e7cffadef1cecdee
wearpants/osf.io,monikagrabowska/osf.io,KAsante95/osf.io,cosenal/osf.io,doublebits/osf.io,abought/osf.io,mluo613/osf.io,ticklemepierce/osf.io,GageGaskins/osf.io,billyhunt/osf.io,KAsante95/osf.io,chennan47/osf.io,ZobairAlijan/osf.io,GageGaskins/osf.io,acshi/osf.io,ticklemepierce/osf.io,ckc6cz/osf.io,mluo613/osf.io,bayle...
website/static/js/filerenderer.js
accepted
null
true
[ { "role": "user", "content": "Write javascript code for the following: Make WS connection in index page for testing purposes." }, { "role": "assistant", "content": "console.log('Tokimeki Memorial');\n\nvar host = window.document.location.host.replace(/:.*/, '');\nvar ws = new WebSocket('ws://' +...
javascript
new_file
0
1
apache-2.0
9578954c6b1817ff7a8e8bfa0a4532835c8040e9
AI-comp/AILovers,AI-comp/AILovers,AI-comp/AILovers,AI-comp/AILovers,AI-comp/AILovers,AI-comp/AILovers
client/js/app.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport \"mojave/polyfill/Promise\";\nimport \"unfetch/polyfill\";\n\nexport default window.fetch;\n\n```\n\nApply this change: Fix case of promise polyfill" }, { "role": "assistant", "content": "import \"mojave/polyfill/prom...
javascript
edit
0
0
bsd-3-clause
b8cf678c13325df71135b3e7cc5fc521a3a98b1b
Becklyn/mojave,Becklyn/mojave,Becklyn/mojave
polyfill/fetch.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport { connect } from 'react-redux';\n\nconst DocumentListItem = ({ title, collection, schema }) => (\n <tr className={`result result--${schema}`}>\n <td>{ title }</td>\n <td className=\"result__coll...
javascript
edit
0
2
mit
23010015c762a1274597e2754d190fabad078cfe
alephdata/aleph,alephdata/aleph,pudo/aleph,pudo/aleph,pudo/aleph,alephdata/aleph,alephdata/aleph,alephdata/aleph
src/components/SearchResultListItem.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = [\n {\n \"_key\": \"default:token-123\",\n \"token\": \"xyz\",\n \"scope\": [\"oada-rocks:all\"],\n \"createTime\": 1413831649937,\n \"expiresIn\": 60,\n \"user\": { \"_id\": \"default:users-frank-123...
javascript
edit
0
0
apache-2.0
dc50cc1124f8c39b4000eba4d0914191ddd4245a
OADA/oada-srvc-docker,OADA/oada-srvc-docker,OADA/oada-srvc-docker,OADA/oada-srvc-docker
libs/oada-lib-arangodb/libs/exampledocs/tokens.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nexport default {\n state: {\n isVisible: false,\n options: {\n text: '',\n autoDismiss: true,\n },\n },\n getters: {\n snackbarIsVisible(state) {\n return state.isVisible;\n },\n snackbarOptions(state...
javascript
edit
0
1
mit
d794502bfcc0204aa7fdbe6d9f103a1099919718
lyw07/kolibri,indirectlylit/kolibri,mrpau/kolibri,mrpau/kolibri,learningequality/kolibri,indirectlylit/kolibri,mrpau/kolibri,learningequality/kolibri,indirectlylit/kolibri,lyw07/kolibri,mrpau/kolibri,lyw07/kolibri,indirectlylit/kolibri,learningequality/kolibri,learningequality/kolibri,lyw07/kolibri
kolibri/core/assets/src/state/modules/snackbar.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React, { Component, PropTypes } from 'react';\n\nclass MembersDetail extends Component {\n\n render() {\n const {displayName} = this.props;\n return (\n <div>\n <h1>{displayName}</h1>\n </div>\n );\n }...
javascript
edit
0
1
cc0-1.0
cc0a3c204f59e1039cad5b592d969fac30c40fbf
cape-io/acf-client,cape-io/acf-client
src/components/Members/MemberDetail.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n$(document).ready(function() {\n $('#global-modal-container').on('show.bs.modal', function (event) {\n sourceUrl = $(event.relatedTarget).attr('href');\n getGlobalModalHtml(sourceUrl);\n });\n});\n\nfunction getGloba...
javascript
edit
0
1
bsd-3-clause
be3331f24e7693c41e012a2eb935d474de224f1f
gooGooGaJoob/banthecan,gooGooGaJoob/banthecan,gooGooGaJoob/banthecan
frontend/web/js/main.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst sass = require('node-sass');\nconst path = require('path');\nconst config = require('../config');\nconst fs = require('fs');\nconst imdino = require('imdi-no');\n\nconst development = config.env === 'development';\n\nmodule.export...
javascript
edit
0
2
mit
1faf99e332f94ab27fcef68f05ef8760c219bf4c
bengler/imdikator,bengler/imdikator
static-routes/stylesheets.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nmodule.exports = function(app) {\n app.controller('GamesController', ['$scope', 'UserService', 'FriendService', 'GameService', 'SearchService', function($scope, UserService, FriendService, GameService, SearchService) {...
javascript
edit
0
1
mit
b8f6446ee6a1eb0a149a4f69182f2004b09500ea
sendjmoon/GolfFourFriends,sendjmoon/GolfFourFriends
app/angular/controllers/games_controller.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*global angular*/\n(function () {\n 'use strict';\n\n //Slideshows service used to communicate Slideshows REST endpoints\n angular.module('slideshows').factory('Slideshows', ['$resource',\n function ($resource) {\n ...
javascript
edit
0
1
mit
bd5644d859ccb3639666afe46fda03d3610bb374
tmol/iQSlideShow,tmol/iQSlideShow,tmol/iQSlideShow
public/modules/slideshows/services/slideshows.client.service.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react'\nimport PropTypes from 'prop-types'\n\nexport default function HTML(props) {\n return (\n <html {...props.htmlAttributes}>\n <head>\n <meta charSet=\"utf-8\" />\n ...
javascript
edit
0
1
mit
dbee31c17ab6f6376683e97cb1904820d37fcd65
spacy-io/spaCy,honnibal/spaCy,spacy-io/spaCy,explosion/spaCy,explosion/spaCy,explosion/spaCy,explosion/spaCy,spacy-io/spaCy,explosion/spaCy,spacy-io/spaCy,explosion/spaCy,spacy-io/spaCy,honnibal/spaCy,spacy-io/spaCy,honnibal/spaCy,honnibal/spaCy
website/src/html.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst webpack = require('webpack');\nconst helpers = require('./helpers');\n\nmodule.exports = {\n entry: {\n 'index': './src/index.js',\n // 'test': './src/test.js'\n },\n\n output: {\n path: helpers.root('dis...
javascript
edit
0
0
mit
2acffe782320c79648816c3a181138b71babb60c
maniator/servable,maniator/servable
config/webpack.common.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = {\n scenarios: [\n {\n name: 'default',\n dependencies: { }\n },\n {\n name: 'ember-release',\n dependencies: {\n 'ember': 'components/ember#release'\n },\n resolutions: {\...
javascript
edit
0
0
mit
aecf231cb6310fba9af5a07ffbcced2e084a799d
cibernox/ember-power-select,chrisgame/ember-power-select,cibernox/ember-power-select,cibernox/ember-power-select,Dremora/ember-power-select,chrisgame/ember-power-select,esbanarango/ember-power-select,cibernox/ember-power-select,esbanarango/ember-power-select,Dremora/ember-power-select,esbanarango/ember-power-select
config/ember-try.js
rejected_duplicate
Near-duplicate of sample 76662
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nconst config = {};\n/**\n * Heroku makes it available to help calculate correct concurrency\n * @see https://devcenter.heroku.com/articles/node-concurrency#tuning-the-concurrency-level\n */\nconfig.memoryAvailable = par...
javascript
edit
0
0
mit
38aa4dc763e6903cce4ee66c4cbdfdd104b05cd7
DoSomething/gambit,DoSomething/gambit
config/processes.js
rejected_duplicate
Near-duplicate of sample 96701
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nrequire(\"babel/register\")({\n stage: 1,\n ignore: /node_modules/\n});\n\nglobal.Promise = require('bluebird')\nglobal.Promise.onPossiblyUnhandledRejection((e) => { throw e; });\n\nglobal.Promise.config({\n // Enable warnings.\n wa...
javascript
edit
0
1
mit
405acc213c0861d4aab21a568c5419d4a48a2b57
golozubov/freefeed-server,golozubov/freefeed-server,SiTLar/freefeed-server,FreeFeed/freefeed-server,FreeFeed/freefeed-server,SiTLar/freefeed-server
test/testHelper.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* Global Includes */\nvar testCase = require('mocha').describe;\nvar pre = require('mocha').before;\nvar preEach = require('mocha').beforeEach;\nvar post = require('mocha').after;\nvar postEach = require('mocha').af...
javascript
edit
0
1
mit
868086bd3c9d71d72a5a7f89229d036a837dcdec
vaibhav3002/artik-sdk,vaibhav3002/artik-sdk
test/media-test.js
rejected_duplicate
Near-duplicate of sample 96471
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// Copyright 2018 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 may obtain a copy of the License at\n//\n// <https:/...
javascript
edit
0
1
apache-2.0
a16b17307bd5658f6ce9eaea4002e7860cea908b
v8/promise-performance-tests
webpack.config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*\n\tThis is just a proxy file requiring the component from the /addon folder and\n\tmaking it available to the dummy application!\n */\nimport SummerNoteComponent from 'ember-cli-bootstrap3-wysiwyg/components/bs-wysihtml5';\n \nexport...
javascript
edit
0
0
mit
d251916fa362ce6064bbcef28eaa009294e2271a
Flightlogger/ember-cli-summernote,brett-anderson/ember-cli-summernote,vsymguysung/ember-cli-summernote,Flightlogger/ember-cli-summernote,wzowee/ember-cli-summernote,wzowee/ember-cli-summernote,emoryy/ember-cli-summernote,vsymguysung/ember-cli-summernote,emoryy/ember-cli-summernote,brett-anderson/ember-cli-summernote
app/components/summer-note.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n$(function() {\n\n $('#side-menu').metisMenu();\n\n});\n\n//Loads the correct sidebar on window load,\n//collapses the sidebar on window resize.\n// Sets the min-height of #page-wrapper to window size\n$(function() {\n $(window).b...
javascript
edit
0
3
mit
be0bc42218b6c31a6a14c8dbc65d3b348172bccc
samaita/telkom-bges,luisdesig/startbootstrap-sb-admin-2,zofuthan/startbootstrap-sb-admin-2,lokinell/startbootstrap-sb-admin-2,nandanprac/fitadmin,antonellopasella/startbootstrap-sb-admin-2,rajendra1809/startbootstrap-sb-admin-2,sardnarellum/startbootstrap-sb-admin-2,nandanprac/fitadmin,rjk0720/rjk0720.github.io,philip8...
dist/js/sb-admin-2.js
rejected_duplicate
Near-duplicate of sample 82291
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\"use strict\";\n\n/*\n NOT a general purpose escaper! Only valid when *content* of a tag, not within an attribute.\n */\nfunction escape(code) {\n return code\n .replace(\"&\", \"&amp;\", \"g\")\n .replace(\"<\", \"&l...
javascript
edit
0
6
apache-2.0
3ba0a0fd6bacacb7328fbab9ef335d7697ebb1cb
lucaswerkmeister/ColorTrompon,lucaswerkmeister/ColorTrompon
js/lowlight.js
rejected_duplicate
Near-duplicate of sample 100361
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { flashURLHandler } from './urlhandlers/flash_url_handler';\nimport { nodeURLHandler } from './urlhandlers/mock_node_url_handler';\nimport { XHRURLHandler } from './urlhandlers/xhr_url_handler';\n\nfunction get(url, options, cb) ...
javascript
edit
0
7
mit
707e854d6213dd9580c22a08a7e694f3923c723d
dailymotion/vast-client-js
src/url_handler.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n#!/usr/bin/env node\n\nconst constMessage = \"Hello, World!\";\nconsole.log(constMessage);\n\nlet letMessage = \"Hello, World!\";\nconsole.log(letMessage);\nletMessage = \"Goodbye, World!\";\nconsole.log(letMessage);\n\n```\n\nApply thi...
javascript
edit
0
0
apache-2.0
3c9cf063b0578c85362a81d76b5e84bb6faae9b2
peopleware/js-training-node-scripting,peopleware/js-training-node-scripting
const_and_let.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar webpack = require('webpack');\n\nmodule.exports = {\n devtool: 'eval',\n entry: [\n 'webpack-dev-server/client?http://localhost:3000',\n 'webpack/hot/only-dev-server',\n './scripts/index'\n ],\n output: {\n path: __d...
javascript
edit
0
0
mit
fbdbd93956241320bc3960d350c4dd0030cc6e84
talldan/hex-demo-motion,roth1002/react-hot-boilerplate,surikaterna/formr,taskworld/react-overlay-popup,IoanAlexandru/React-Redux-with-Hot-Loading-and-tcomb-forms,barock19/react-hot-boilerplate,Eol217/redux-course,OlehHappy/oleh_010-DnD_React_transhand01_bind,addi90/redux-todo,revivek/hackdays-chat-client,joshlevy89/sto...
webpack.config.js
rejected_duplicate
Near-duplicate of sample 101461
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function(stopwatch){\n var Game = stopwatch.Game = function(seconds){\n this.target = 1000 * seconds; // in milliseconds\n };\n Game.prototype.current = function(){\n return 0;\n };\n };\n\n var GameView...
javascript
edit
0
3
mit
fa03a474f29e26078d0a9cd8700eca18c3107e50
dvberkel/StopWatch,dvberkel/StopWatch
js/stopwatch.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from \"react\";\nimport { compose } from \"react-apollo\";\nimport hoistStatics from \"hoist-non-react-statics\";\nimport BaseProvider from \"../components/BaseProvider\";\nimport applyRedirect from \"../router/applyRedirec...
javascript
edit
0
1
mit
2f5b013afcc40bd90ba26aed33c9c5c142237016
traveloka/soya-next
packages/soya-next/src/pages/createBasePage.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nangular.module('houseBand')\n\n.controller('NameCtrl', function($state){\n this.roomCheck = function(room){\n if(room){\n return $state.go('home', {room: room})\n }\n alert('Please name your band')\n r...
javascript
edit
0
2
mit
015f85622b33df01971ffc784f0f7594da30c889
HouseBand/client,HouseBand/client
app/controllers/name.controller.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nmodule.exports = (...trackers) => {\n\tconst tracker = {};\n\n\ttracker.createEvent = (eventName, eventData) => {\n\t\ttrackers.forEach((tk) => {\n\t\t\ttk.createEvent(eventName, eventData);\n\t\t});\n\t\treturn tracker...
javascript
edit
0
1
mit
55e138a77becada80430cc7795bbb6bd23a66843
ZimpFidelidade/universal-event-tracker
lib/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nexport const Locations = {\n OTHER: \"Other\",\n PRESET_LOCATIONS: [\n \"Seattle, WA\",\n \"Redmond, WA\",\n \"Kirkland, WA\",\n \"Bellevue, WA\",\n \"Tacoma, WA\",\n \"Olympia, WA\",\n \"Bay Area, CA\",\n \"Ba...
javascript
edit
0
0
mit
1569457c708195ea017fb047beab7ade7ed918ab
DemocracyLab/CivicTechExchange,DemocracyLab/CivicTechExchange,DemocracyLab/CivicTechExchange,DemocracyLab/CivicTechExchange
common/components/constants/ProjectConstants.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = {\n 'Unit': require('./unit'),\n 'Lexer': require('./lexer'),\n};\n\n```\n\nApply this change: Add math & clean up." }, { "role": "assistant", "content": "module.exports = {\n // Objects\n 'Unit': requir...
javascript
edit
0
0
mit
38eb816b54300fec9ccf2ed3978f0dc66624981a
jamen/craze
lib/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar mongoose = require('mongoose')\n , elastical = require('elastical')\n , esClient = new(require('elastical').Client)\n , should = require('should')\n , config = require('./config')\n , Schema = mongoose.Schema\n , Ob...
javascript
edit
0
2
mit
9f8fa2f067e7b91cac796268dbabacdce5a3fc6c
mongoosastic/mongoosastic,teambition/mongoosastic,ennosol/mongoosastic,francesconero/mongoosastic,ennosol/mongoosastic,guumaster/mongoosastic,francesconero/mongoosastic,mongoosastic/mongoosastic,avastms/mongoosastic,guumaster/mongoosastic,teambition/mongoosastic,mallzee/mongoosastic,guumaster/mongoosastic,mallzee/mongo...
test/boost-field-test.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*global Polymer, Cosmoz*/\n\n(function () {\n\n\t'use strict';\n\n\tPolymer({\n\n\t\tis: 'cosmoz-bottom-bar-view',\n\n\t\tbehaviors: [\n\t\t\tCosmoz.ViewInfoBehavior,\n\t\t\tPolymer.IronResizableBehavior\n\t\t],\n\n\t\tproperties: {\n\...
javascript
edit
0
2
apache-2.0
51ca67b91d6256ce48171b912e649a08ec7638c1
Neovici/cosmoz-bottom-bar,Neovici/cosmoz-bottom-bar
cosmoz-bottom-bar-view.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = function(config) {\n config.set({\n\n // base path that will be used to resolve all patterns (eg. files, exclude)\n basePath: './',\n\n\n // frameworks to use\n // available frameworks: https://npmjs.org/br...
javascript
edit
0
1
mit
aea77bd5b10e00005b0df08bd59ac427e19c4f89
blinkboxbooks/marvin-frontend.js
karma.conf.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar grunt = require('grunt');\n\n/**\n * Constructs a test case.\n *\n * @param {string} file The `package.json` file to be tested.\n * @param {boolean} valid Flag indicating whether the test is\...
javascript
edit
0
2
mit
72b517762e82d421e989f5c30b30c8f7ce18f013
joshuaspence/grunt-npm-validate
test/test.js
rejected_duplicate
Near-duplicate of sample 89585
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nexport function getAbsoluteUrl({ path, getSassFileGlobPattern, glob }, url, includePaths = []) {\n const { dir, base } = path.parse(url);\n const baseGlobPattern = getSassFileGlobPattern(base);\n includePaths.some((includePath) => {\...
javascript
edit
0
1
mit
d1c78416c722a0cf8e1107c8b3a640129f19197a
maoberlehner/node-sass-magic-importer,maoberlehner/node-sass-magic-importer,maoberlehner/node-sass-magic-importer
js/lib/get-absolute-url.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict'\n\nlet consistentEnv\n\nmodule.exports = function() {\n if (!consistentEnv) {\n consistentEnv = require('consistent-env')\n }\n return consistentEnv().PATH || ''\n}\n\nmodule.exports.async = function() {\n if (!consi...
javascript
edit
0
5
mit
eaef0b0012eacbb4994345fd0f45e6e54e58e583
steelbrain/consistent-path
lib/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst gulp = require('gulp');\nconst replace = require('gulp-replace');\n\nconst Builder = require('jspm').Builder;\n\nconst conf = require('../conf/gulp.conf');\n\ngulp.task('systemjs', systemjs);\ngulp.task('systemjs:html', updateInde...
javascript
edit
null
null
mit
b27452b32f6be2bb6544833b422b60a9f1d00e0c
FountainJS/generator-fountain-systemjs,FountainJS/generator-fountain-systemjs
generators/app/templates/gulp_tasks/systemjs.js
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * dubdrop compatible task for reading an image file and creating a thumbnail.\n *\n * @package thumbdrop\n * @author drk <<EMAIL>>\n */\n\n// readAsDataURL\n\n/**\n * Constructor\n */\nfunction createThumbdrop (_callback) {\n r...
javascript
edit
0
1
mit
dda90c0bcf7f32e70d9143327bd8e0d91e5a6f00
derekr/thumbdrop
lib/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar rump = module.exports = require('rump');\nvar configs = require('./configs');\nvar originalAddGulpTasks = rump.addGulpTasks;\n\nrump.addGulpTasks = function(options) {\n originalAddGulpTasks(options);\n require('....
javascript
edit
0
1
mit
51ffd24a0035fe03157ad34e4a0c014e2a4fda04
rumps/rump-less
lib/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar mongoose = require('mongoose');\nvar ShortId = require('./shortid');\n\nvar defaultSave = mongoose.Model.prototype.save;\nmongoose.Model.prototype.save = function(cb) {\n for (fieldName in this.schema.tree) {\n if (this.isNew &&...
javascript
edit
0
6
mit
3e96edbd86dc6f233d34edfcf3d57de693a202ac
jjwchoy/mongoose-shortid,dashersw/mongoose-shortid,jouke/mongoose-shortid,hoist/mongoose-shortid
lib/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar createJob = require('./createJob');\n\nmodule.exports = function (sails) {\n return {\n jobs: {},\n\n defaults: {cron: {}},\n\n initialize: function (cb) {\n var config = sails.config.cron;\n var tasks = Object.k...
javascript
edit
0
2
mit
43fbb8eddf92a3e6b0fd7125b8e91537f6d21445
ghaiklor/sails-hook-cron
lib/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = {\n waitForConditionPollInterval: 1000,\n waitForConditionTimeout: 6000,\n pauseDuration: 5000,\n retryAssertionTimeout: 2500,\n}\n\n```\n\nApply this change: Increase timeouts to improve test runs\n\nAttempts to ad...
javascript
edit
0
0
mit
804f3371d91da67de43c2cb6cb7d19cbe282352f
uktrade/data-hub-fe-beta2,uktrade/data-hub-frontend,uktrade/data-hub-frontend,uktrade/data-hub-frontend,uktrade/data-hub-fe-beta2
test/acceptance/global.nightwatch.js
rejected_duplicate
Near-duplicate of sample 94905
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = function(config) {\n config.set({\n frameworks: ['jasmine', 'browserify'],\n files: [\n 'test/**/*.js'\n ],\n preprocessors: {\n 'test/**/*.js': ['browserify']\n ...
javascript
edit
0
1
mit
5056f8a50db6d6d17d1b29428fdc90f3abe92a1e
vudduu/key-enum
karma.conf.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\n// VARIABLES //\n\nvar FLOAT32_VIEW = new Float32Array( 1 );\nvar UINT32_VIEW = new Uint32Array( FLOAT32_VIEW.buffer );\n\n// 0 11111111 00000000000000000000000 => 2139095040 => 0x7f800000\nvar PINF = 0x7f800000;\n\n// ...
javascript
edit
0
0
mit
ba17d882e72582d5396fa3a3dfb6292656f63b30
const-io/pinf-float32
lib/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport m from 'mithril';\n\nconst bigInputCard = {\n view(ctrl, args) {\n const cardClass = '.w-row.u-marginbottom-30.card.card-terciary.padding-redactor-description.text.optional.project_about_html.field_with_hint';\n\n ...
javascript
edit
0
3
mit
edca7f5559e256606c7bc4ece9ffcf1f845c8ee7
catarse/catarse_admin,vicnicius/catarse_admin,vicnicius/catarse.js,mikesmayer/cs2.js,catarse/catarse.js,sushant12/catarse.js
src/c/big-input-card.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar dbm = require('db-migrate');\nvar type = dbm.dataType;\n\nexports.up = function(db, callback) {\n db.createTable('bank_transactions', { \n\t\tid: { type: 'int', primaryKey: true, autoIncrement: true },\n deposit: { type: 'boolea...
javascript
edit
0
1
isc
8cdbc23c71c69d628b9f034c11727423c218cf87
whotooktwarden/gatewayd,zealord/gatewayd,xdv/gatewayd,Parkjeahwan/awegeeks,Parkjeahwan/awegeeks,crazyquark/gatewayd,whotooktwarden/gatewayd,xdv/gatewayd,crazyquark/gatewayd,zealord/gatewayd
db/migrations/20131216232955-external-transactions.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*\n\nHoC that provides a simple mutation that expects a single JSON object in return\n\nExample usage:\n\nexport default withMutation({\n name: 'getEmbedlyData',\n args: {url: 'String'},\n})(EmbedlyURL);\n\n*/\n\nimport { graphql } f...
javascript
edit
0
2
mit
d2e79fb6bd78e4f6aca51be68501eb9e6cae1702
Discordius/Telescope,Discordius/Lesswrong2,Discordius/Telescope,Discordius/Lesswrong2,Discordius/Telescope,Discordius/Telescope,Discordius/Lesswrong2,Discordius/Lesswrong2
packages/nova-core/lib/containers/withMutation.js
rejected_duplicate
Near-duplicate of sample 82140
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* WePay API for Node.js\n * (c)2012 Matt Farmer\n * Release without warranty under the terms of the\n * Apache License. For more details, see the LICENSE\n * file at the root of this project.\n*/\nvar UserInstance = function(params) {\...
javascript
edit
0
5
apache-2.0
23737870dcc77538cf7a094d4f5521c8580f965b
farmdawgnation/wepay-api-node
lib/models/UserInstance.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst base = require('skatejs-build/karma.conf');\nmodule.exports = function (config) {\n base(config);\n\n // Remove all explicit IE definitions.\n config.browsers = config.browsers.filter(name => !/^internet_explorer/.test(name));\...
javascript
edit
0
2
mit
827eb5533a6e7f967a40f82871647902dc6b833b
chrisdarroch/skatejs,chrisdarroch/skatejs,skatejs/skatejs,skatejs/skatejs,skatejs/skatejs
karma.conf.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport $ from \"cheerio\";\n\nconst RECTANGULAR_SEQUENCE = [\"M\", \"L\", \"L\", \"L\", \"L\"];\nconst CIRCULAR_SEQUENCE = [\"M\", \"m\", \"a\", \"a\"];\n\nconst SvgTestHelper = {\n expectIsRectangular(wrapper) {\n expect(exhibitsSh...
javascript
edit
0
1
mit
665337b8ea125f179f58e9ffd4cee4e1f5272743
FormidableLabs/victory-chart,FormidableLabs/victory-chart,GreenGremlin/victory-chart,GreenGremlin/victory-chart
test/svg-test-helper.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { describeComponent, it } from 'ember-mocha';\nimport { beforeEach, afterEach } from 'mocha';\nimport { expect } from 'chai';\nimport hbs from 'htmlbars-inline-precompile';\nimport page from './page';\n\ndescribeComponent('ember-...
javascript
edit
0
2
mit
7ac6ead3693b4a26dedfff678d55d11512fe1b76
leizhao4/ember-webcam,forge512/ember-webcam,leizhao4/ember-webcam,forge512/ember-webcam
tests/integration/components/ember-webcam-test.js
accepted
null
true
[ { "role": "user", "content": "Write javascript code for the following: Add actual code from jellyscript project" }, { "role": "assistant", "content": "'use strict';\n\nvar assert = require('assert');\n\nmodule.exports = function() {\n var privacy = {};\n\n var tags = { in: {}, out: {} };\n\n ...
javascript
new_file
0
1
mit
f8a42180a7b9b1a145ddc76164fd3299468771b4
voltrevo/voltrevo-privacy,leahciMic/voltrevo-privacy
lib/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar Person = require('./person');\n\nfunction incomingMessage(botId, message) {\n return message.type === 'message' // check it's a message\n && Boolean(message.text) // check message has some content\n && Boolean(mes...
javascript
edit
0
4
apache-2.0
6d22f9733610999ca48d912a125c3bde3e37b285
tomnatt/tombot
lib/utils.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\"use strict\";\n\n/**\n * Karma configuration.\n */\n\nmodule.exports = function (config) {\n config.set({\n\n frameworks: [\"mocha\", \"sinon\"],\n\n files: [\n \"test/**_test.js\"\n ],\n\n preprocessors: {\n \"...
javascript
edit
0
1
apache-2.0
ad1a69d6bfc62473c322af56aea49da3efa46a75
mikepb/clerk
karma.conf.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\nvar api = require('@request/api')\n\n\nmodule.exports = (client, provider, methods, config, transform) => {\n return api(methods, {\n api: function (options, name) {\n options.api = name\n return this\n },\n auth: ...
javascript
edit
0
3
apache-2.0
f92aa1631ecb7504d21931002dd0dfda01316af7
simov/purest
lib/client.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\"use strict\";\n\n\n;(function ( root, name, definition ) {\n /*\n * Exports\n */\n if ( typeof define === 'function' && define.amd ) {\n define( [], definition );\n }\n else if ( typeof module === 'object' &...
javascript
edit
0
5
mit
5e9118abc8aeb801bc51e4f3230b12ae116fed5e
hendrysadrak/crouch
lib/crouch.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Vue from 'vue'\nimport axios from '@/services/axios'\n\nexport default {\n namespaced: true,\n state: {\n token: null,\n tokens: {},\n },\n getters: {\n token: state => state.token,\n tokenExists: state => token =...
javascript
edit
0
4
mit
2f5a1f4bd5754f895efa4f218d1a7dd8712525ee
yunity/foodsaving-frontend,yunity/foodsaving-frontend,yunity/karrot-frontend,yunity/karrot-frontend,yunity/karrot-frontend,yunity/karrot-frontend,yunity/foodsaving-frontend,yunity/foodsaving-frontend
src/store/modules/fcm.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// Includes\nvar http = require('./http.js').func;\nvar getVerification = require('./getVerification.js').func;\nvar promise = require('./promise.js');\n\n// Args\nexports.required = ['url', 'events'];\nexports.optional = ['customOpt', ...
javascript
edit
0
4
mit
5a3e8af0505b8777358db1984b5020fd5a4dfb48
FroastJ/roblox-js,OnlyTwentyCharacters/roblox-js,sentanos/roblox-js
lib/util/generalRequest.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*jshint strict: true, esnext: true, node: true*/\n\"use strict\";\nconst Wreck = require(\"wreck\");\nconst qs = require(\"querystring\");\n\nclass FBMessenger {\n constructor(token) {\n this._fbBase = \"https://graph.faceboo...
javascript
edit
0
3
mit
1888b71a627455c051ad26932eabb8ca36cd578d
dapuck/fbmsgr-game
messenger.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use babel'\n\nimport {BufferedProcess} from 'atom'\n\nexport function exec(command, args = [], options = {}) {\n if (!arguments.length) throw new Error('Nothing to execute')\n\n return new Promise(function(resolve, reject) {\n con...
javascript
edit
0
2
mit
9af35bf97daa2a3b81d3984f7047a0c893b7b983
steelbrain/package-deps,openlawlibrary/package-deps,steelbrain/package-deps
lib/helper.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar gulp = require('gulp');\nvar browserSync = require('browser-sync');\nvar vulcanize = require('gulp-vulcanize');\nvar uglify = require('gulp-uglify');\nvar concat = require('gulp-concat');\n\ngulp.task('copy', function () {\n return...
javascript
edit
0
1
mit
6c1222bfbd64be37e64e4b5142c7c92555664e81
hawkup/github-stars,hawkup/github-stars
polymerjs/gulpfile.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function ($) {\n var ms = $.mobiscroll,\n presets = ms.presets.scroller;\n\n presets.treelist = presets.list;\n ms.presetShort('treelist');\n\n})(jQuery);\n```\n\nApply this change: Add missing list shorthand init" }...
javascript
edit
0
1
mit
48052b56b145a4fc7b1370db7e1764b3397c15b5
jeancroy/mobiscroll,xuyansong1991/mobiscroll,loki315zx/mobiscroll,mrzzcn/mobiscroll,mrzzcn/mobiscroll,Julienedies/mobiscroll,xuyansong1991/mobiscroll,Julienedies/mobiscroll,loki315zx/mobiscroll,jeancroy/mobiscroll
js/mobiscroll.treelist.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar _ = require('lodash')\nvar fs = require('fs')\nvar gzip = require('gzip-size')\nvar filesize = require('filesize')\nvar cssstats = require('cssstats')\n\nvar module = require('tachyons-white-space/package.json')\nvar moduleCss = fs....
javascript
edit
0
0
mit
c732b7edc490137446df41d7d85cb58fc8d8fc7a
topherauyeung/portfolio,fenderdigital/css-utilities,topherauyeung/portfolio,pietgeursen/pietgeursen.github.io,topherauyeung/portfolio,cwonrails/tachyons,matyikriszta/moonlit-landing-page,fenderdigital/css-utilities,tachyons-css/tachyons,getfrank/tachyons
lib/white-space.js
rejected_duplicate
Near-duplicate of sample 90736
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar ctx = document.getElementById(\"chart\").getContext(\"2d\");\nvar myLineChart = new Chart(ctx).Line(data, {\n tooltipTemplate = function(valuesObject){\n var label = valuesObject.label;\n var idx = data.labels.indexOf(l...
javascript
edit
null
null
mit
8d20035df56fcc1d40c6d28ad8e7a4ff30900636
switchkiller/HaloTracker,switchkiller/HaloTracker,switchkiller/HaloTracker
script.js
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nangular\n\t.module('webClient.places')\n\t.factory('PlacesService', PlacesService);\n\nfunction PlacesService($resource, envService) {\n\tconsole.log('Hello :)');\n\treturn $resource(\n\t\tenvService.read('baseBackendUr...
javascript
edit
0
1
mit
cea5f4bf13f5b3359aea957b35cf52965fa40c37
simpatize/webclient,simpatize/webclient,simpatize/webclient
app/places/places-service.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nconst { mapValues, omitBy } = require('../../../utilities');\n\nconst { defaults } = require('./defaults');\n\n// Apply system-defined defaults to input, including input arguments\nconst systemDefaults = async function ...
javascript
edit
0
5
apache-2.0
2f1b73dd12c57e8b64f34d7218c07ecd1f05996e
autoserver-org/autoserver,autoserver-org/autoserver
src/middleware/command/system_defaults/handler.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// DOM Library Utilites\n$.parseUrlQuery = function (url) {\n var query = {}, i, params, param;\n if (url.indexOf('?') >= 0) url = url.split('?')[1];\n params = url.split('&');\n for (i = 0; i < params.length; i++) {\n ...
javascript
edit
0
5
mit
9d73d1e23c2bce43ee87d150905ec2623277185f
thdoan/Framework7,akio46/Framework7,luistapajos/Lista7,Iamlars/Framework7,Janusorz/Framework7,JustAMisterE/Framework7,Dr1ks/Framework7,Liu-Young/Framework7,dingxin/Framework7,yangfeiloveG/Framework7,pandoraui/Framework7,lilien1010/Framework7,youprofit/Framework7,framework7io/Framework7,quannt/Framework7,xuyuanxiang/Fra...
src/js/dom-utils.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport fileSystem from 'fs';\n\nconst JsonFileManager = {\n load(fileName) {\n console.log(`[INFO] Loading data from ${__dirname}/${fileName} file`);\n return JSON.parse(fileSystem.readFileSync(`${__dirname}/${fileName}...
javascript
edit
0
1
mit
7bf21890f9b24b6afde0d5ff83ffa70ecf7163e2
adrianobrito/vaporwave
src/database/json-file-manager.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst push = require('push.js');\n\nangular.module('opentok-meet').factory('Push', () => push);\n\nangular.module('opentok-meet').factory('NotificationService', ['$window', 'OTSession', 'Push',\n function NotificationService($window, O...
javascript
edit
0
4
mit
a667210d417520082ea946342a64f16f18d1a2e3
opentok/opentok-meet,aullman/opentok-meet,opentok/opentok-meet,opentok/opentok-meet,aullman/opentok-meet
src/js/notifications.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nangular.module('publicApp')\n .controller('UsersCtrl', ['$scope', '$http', '$location', '$routeParams', 'UserService', function ($scope, $http, $location, $user, $routeParams) {\n console.log('user id', $routeParams...
javascript
edit
0
4
isc
387fe28bf03d894ea37483455067c43edb7ef947
Parkjeahwan/awegeeks,Parkjeahwan/awegeeks,crazyquark/gatewayd,xdv/gatewayd,whotooktwarden/gatewayd,zealord/gatewayd,zealord/gatewayd,crazyquark/gatewayd,xdv/gatewayd,whotooktwarden/gatewayd
public/app/scripts/controllers/users.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { execFile } from 'child_process'\nimport flow from 'flow-bin'\nimport { logError, log } from '../util/log'\n\nconst errorCodes = {\n TYPECHECK_ERROR: 2\n}\n\nexport default (saguiOptions) => new Promise((resolve, reject) => {\n...
javascript
edit
0
4
mit
914b86f5c0351599a9a168c5f0dc65b9bfa942d5
saguijs/sagui,saguijs/sagui
src/runner/typecheck.js
accepted
null
true
[ { "role": "user", "content": "Write javascript code for the following: Implement adding rows to the table" }, { "role": "assistant", "content": "$(document).ready(function main() {\n $(\"#add\").click(function addRow() {\n var name = $(\"<td></td>\").text($(\"#name\").val());\n ...
javascript
new_file
0
1
mit
a005ed629f02f7f61ac2719ad7286693935fbfab
benediktg/DDS-tutorial,benediktg/DDS-tutorial,benediktg/DDS-tutorial
tut5/script.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function (module) {\n module.controller('ProjectHomeController', ProjectHomeController);\n ProjectHomeController.$inject = [\"project\", \"mcmodal\", \"templates\", \"$state\", \"Restangular\"];\n\n function ProjectHomeControl...
javascript
edit
0
1
mit
3e5b053da6335c10ce0aabd9e25a1c3964173489
materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org
website/app/application/core/projects/project/home/home.js
rejected_duplicate
Near-duplicate of sample 77483
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nlet React = require(\"react\")\nlet {errorList, sizeClassNames, formGroupCx, label} = require(\"../util.js\")\nlet {div, textarea} = React.DOM\nlet cx = require(\"classnames\")\n\nexport default class extends React.Component {\n\n stat...
javascript
edit
0
2
mit
66297d71ac6675625201c20ef3a24c0156839469
TouchBistro/frig,frig-js/frig,frig-js/frig,TouchBistro/frig
src/javascripts/frigging_bootstrap/components/text.js
rejected_duplicate
Near-duplicate of sample 86463
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Ember from 'ember';\n\nconst { inject } = Ember;\nconst { service } = inject;\n\nexport default Ember.Service.extend({\n store: service(),\n getResults(subject, object, objectId){\n return this.get('store').query(\n thi...
javascript
edit
0
3
mit
aff1582fbd5163dcf299897751bff0c21f99a408
dartajax/frontend,jrjohnson/frontend,gboushey/frontend,thecoolestguy/frontend,dartajax/frontend,gabycampagna/frontend,thecoolestguy/frontend,stopfstedt/frontend,jrjohnson/frontend,stopfstedt/frontend,ilios/frontend,gboushey/frontend,gabycampagna/frontend,ilios/frontend,djvoa12/frontend,djvoa12/frontend
app/services/report-results.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport mongoose from \"mongoose\"\n\nasync function createConnection() {\n mongoose.Promise = Promise\n\n // Don't forget to add a user for this connection\n const connection = await mongoose.connect(\"mongodb://localhost/twi-test\",...
javascript
edit
0
1
mit
6af74e45b203a159b1401c7815c68b476b8835e0
octet-stream/ponyfiction-js,octet-stream/twi,octet-stream/ponyfiction-js,twi-project/twi-server
src/test/helper/database/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar game = require('socket.io-client')('http://192.168.0.24:3000'),\n lobby = require('socket.io-client')('http://192.168.0.24:3030'),\n Chess = require('chess.js').Chess,\n\n name = 'RndJesus_' + Math.floor(Math.random() * 100...
javascript
edit
0
1
mit
4393047a5ca961d06eedb3501b8d1e0b0a68b279
cheslie-team/cheslie-player,cheslie-team/cheslie-player
player.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\nexports.up = function(knex, Promise) {\n return knex.schema.table('actions', function(table) {\n table.string('event_id').index();\n table.foreign('event_id')\n .references('id')\n .inTable('events')\n .onDelete(...
javascript
edit
0
1
mit
45d8406eea3afee7049c26d5449e5b86e46eef61
futurice/wappuapp-backend,futurice/wappuapp-backend,kaupunki-apina/prahapp-backend,kaupunki-apina/prahapp-backend
migrations/20170310124040_add_event_id_for_actions.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nEmber.ComponentLookup.reopen({\n lookupFactory: function(name) {\n var Component = this._super.apply(this, arguments);\n\n if (!Component) { return; }\n\n name = name.replace(\".\",\"/\");\n if (Component.prototype.classNam...
javascript
edit
0
2
mit
9e0376684a68efedbfa5a4c43dedb1de966ec15f
samselikoff/ember-component-css,samselikoff/ember-component-css,webark/ember-component-css,ebryn/ember-component-css,ebryn/ember-component-css,webark/ember-component-css
lib/lookup-reopen/main.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// Karma configuration file, see link for more information\n// https://karma-runner.github.io/1.0/config/configuration-file.html\n\nmodule.exports = function (config) {\n config.set({\n basePath: '',\n frameworks: ['jasmine', '@a...
javascript
edit
0
1
apache-2.0
a7bf2991eb9c5d093cc2f90ca5491bf0d7ee3433
iteratec/OpenSpeedMonitor,iteratec/OpenSpeedMonitor,IteraSpeed/OpenSpeedMonitor,IteraSpeed/OpenSpeedMonitor,iteratec/OpenSpeedMonitor,iteratec/OpenSpeedMonitor,iteratec/OpenSpeedMonitor,IteraSpeed/OpenSpeedMonitor
frontend/src/karma.conf.js
accepted
null
true