messages
listlengths
2
2
language
stringclasses
8 values
prompt_type
stringclasses
2 values
lint_errors
int64
0
129
⌀
cyclomatic_complexity
int64
0
32
⌀
license
stringclasses
7 values
commit
stringlengths
40
40
repos
stringlengths
5
116k
new_file
stringlengths
4
220
status
stringclasses
6 values
error
stringlengths
26
74
⌀
is_valid_syntax
bool
2 classes
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function() {\n 'use strict';\n\n angular\n .module('app.auth')\n .controller('AuthController', AuthController);\n\n AuthController.$inject = ['$location', 'authService'];\n\n function AuthController($location, authService) {\...
javascript
edit
0
2
mit
8382d5c2147188eea4c1a78971a91abbfce32ef9
anthonybrown/angular-course-demo-app-v2,anthonybrown/angular-course-demo-app-v2
src/app/auth/auth.controller.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n$(function() {\n var $loadMore = $('#load-more');\n\n if ($loadMore.length) {\n\n var $spinner = $('#spinner');\n\n function init() {\n $spinner.hide();\n $.ajaxPrefilter(function(options, _, xhr) {\n if (!xhr.c...
javascript
edit
0
2
mit
b71557376bb31512ba96a81621b5051166b01f60
CreaturePhil/Usub,CreaturePhil/Usub
public/js/channel.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport _ from 'lodash';\nimport React, { Component } from 'react';\nimport { connect } from 'react-redux';\nimport { fetchPosts } from '../actions';\n\nclass PostsIndex extends Component {\n componentDidMount() {\n this.props.fetchP...
javascript
edit
0
1
mit
d5855f3e4fc63f120af56a94f0842fae2ffd4871
heatherpark/blog,heatherpark/blog
src/components/posts_index.js
rejected_duplicate
Near-duplicate of sample 78620
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n<!--[if lt IE 9]>\ndocument.createElement('video');\n<!--[endif]-->\n\n$(window).unload(function() {\n $.rails.enableFormElements($($.rails.formSubmitSelector));\n});\n\n// Cool title effect for \"community favorites\"\n$(window).load(...
javascript
edit
0
2
mit
e53a2b05fc41bf36e85cc4a2fa297d77d29ed1d8
tomazin/OpenFarm,tomazin/OpenFarm,roryaronson/OpenFarm,simonv3/OpenFarm,RickCarlino/OpenFarm,slacker87/OpenFarm,openfarmcc/OpenFarm,CloCkWeRX/OpenFarm,roryaronson/OpenFarm,tomazin/OpenFarm,roryaronson/OpenFarm,slacker87/OpenFarm,CloCkWeRX/OpenFarm,CloCkWeRX/OpenFarm,simonv3/OpenFarm,openfarmcc/OpenFarm,RickCarlino/Open...
app/assets/javascripts/home.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// This module loads and exposes an object of all available schemas, using\n// the schema key as the object key.\n//\n// The schemas are loaded from the extension plugin directory. We therefore need\n// to have a checkout of the extensi...
javascript
edit
0
0
cc0-1.0
9a9c348c05850beb1f3ad7a73bde54eb2d45bab1
eloquence/freeyourstuff.cc,eloquence/freeyourstuff.cc
service/load-schemas.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* eslint-disable react/no-danger */\n\nimport React, { Component, PropTypes } from 'react'\nimport Block from './Block'\n\nexport function reloadPlayers() {\n if (typeof window !== 'undefined' && window.embetter) {\n window.embette...
javascript
edit
0
3
mit
69b467a039b0b8e9ae21d1d06025a793f6f7f865
ello/webapp,ello/webapp,ello/webapp
src/components/editor/EmbedBlock.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport initialState from './initialState';\nimport { \n BOARD_REQUESTED, \n BOARD_LOADED, \n BOARD_DESTROYED, \n BOARD_SCROLLED_BOTTOM\n} from '../constants'\n\nexport default function (state = initialState.board, action) {\...
javascript
edit
0
7
mit
de48510fa5b038cbdda7d2386bba0419af1b8542
AdamSalma/Lurka,AdamSalma/Lurka
src/client/reducers/BoardReducer.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*\n * Copyright 2014-2015 Hewlett-Packard Development Company, L.P.\n * Licensed under the MIT License (the \"License\"); you may not use this file except in compliance with the License.\n */\n\ndefine([\n 'find/app/find-pages',\n ...
javascript
edit
0
1
mit
1dcacbc8a960279db61610185b7155719f5046d5
hpautonomy/find,hpautonomy/find,LinkPowerHK/find,hpe-idol/find,hpe-idol/find,LinkPowerHK/find,hpe-idol/find,hpautonomy/find,LinkPowerHK/find,LinkPowerHK/find,hpe-idol/find,hpautonomy/find,hpe-idol/java-powerpoint-report,hpe-idol/java-powerpoint-report,LinkPowerHK/find,hpautonomy/find,hpe-idol/find
find-core/src/main/public/static/js/find/app/pages.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nfunction resizeTaelContainer() {\n $('.tael-container').css('bottom', 16);\n}\n\n$(document).ready(function () {\n var header_bbox = $('.header')[0].getBoundingClientRect();\n $('.tael-container').css('top', header_bbox.bottom ...
javascript
edit
0
1
mit
2e4fa079ee4b0a870ce3e1a530ffcfccecac7dfd
hinsley-it/maestro,hinsley-it/maestro
src/js/tael_sizing.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { connect } from 'react-redux';\n\nimport { buildJKFPlayerFromState } from \"../playerUtils\";\nimport { inputMove, changeComments } from '../actions';\nimport BoardSet from '../components/BoardSet';\n\nconst mapStateToProps = (s...
javascript
edit
0
1
mit
73cf297ca3b83bbdc73f8122423fba7d2ea95926
orangain/kifu-notebook,orangain/kifu-notebook,orangain/kifu-notebook,orangain/kifu-notebook,orangain/kifu-notebook
src/containers/BoardSetContainer.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React, { Component } from 'react';\nimport { connect } from 'react-redux'\nimport Modal from 'react-modal'\nimport { closeDialog } from './actions';\n\nconst reduxDialog = (dialogProps) => {\n\n const {\n name,\n onAfterOp...
javascript
edit
0
3
mit
12be4f8e9b60a9577246ed0fce6b5c47f28f01d3
JakeDluhy/redux-dialog,JakeDluhy/redux-dialog
src/redux-dialog.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport SocketIONamespace from \"./namespace\";\n\nexport default class SocketIOServer {\n constructor(io) {\n this._io = io;\n this._sockets = this.of(\"/\");\n this._nsps = Object.create(null);\n }\n\n\n g...
javascript
edit
0
2
mit
8e0c34795e11dc229a87277379de9b8da4afa9f4
Ragg-/rektia,Ragg-/maya.js,Ragg-/rektia,Ragg-/rektia,Ragg-/maya.js
src-server/socket.io-wrapper/server.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar MongoClient = require('mongodb').MongoClient;\nvar URICS = \"mongodb://tonyli139:<EMAIL>:27017,p2cluster-shard-00-01-ccvtw.mongodb.net:27017,p2cluster-shard-00-02-ccvtw.mongodb.net:27017/<DATABASE>?ssl=true&replicaSet=p2Cluster-shar...
javascript
edit
0
2
bsd-3-clause
38b3c5224a33328a433d881a97be232c78983370
aXises/portfolio-2,aXises/portfolio-2,aXises/portfolio-2
database.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * `linkAssetsBuildProd`\n *\n * ---------------------------------------------------------------\n *\n * This Grunt tasklist is not designed to be used directly-- rather\n * it is a helper called by the `buildProd` tasklist.\n *\n ...
javascript
edit
0
1
mit
37e4796c4fd9e7ac3c81f4e75ddebb29ad85c680
pantsel/konga,pantsel/konga,pantsel/konga
tasks/register/linkAssetsBuildProd.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { extend } from 'flarum/extend';\nimport app from 'flarum/app';\nimport PostControls from 'flarum/utils/PostControls';\nimport Button from 'flarum/components/Button';\n\nimport FlagPostModal from './components/FlagPostModal';\n\n...
javascript
edit
0
4
mit
caa5eacf06d8c10433768b177236638aed092aa9
flarum/reports,flarum/reports,flarum/reports
js/src/forum/addFlagControl.js
rejected_duplicate
Near-duplicate of sample 93649
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// Karme Edge Launcher\n// =================\n\n// Dependencies\n// ------------\n\nvar urlparse = require('url').parse\nvar urlformat = require('url').format\nvar exec = require('child_process').exec\n\n// Constants\n// ---------\n\nva...
javascript
edit
0
1
mit
e5f246b56bb3efe9567c587739dbb0c65032a57a
nicolasmccurdy/karma-edge-launcher,karma-runner/karma-edge-launcher
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nfunction renderCat(catGifId) {\n var container = document.getElementById('cat');\n container.innerHTML =\n \"<img \" +\n \"src='http://iconka.com/wp-content/uploads/edd/2015/10/\" + catGifId +\".gif' \" +\n \"style='width:90%...
javascript
edit
0
3
apache-2.0
0bc5a286de1afefc26b32599bfec8ff550a73cf8
mariyadavydova/youtrack-cats-widget,mariyadavydova/youtrack-cats-widget
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n#!/usr/bin/env iojs\n\nvar program = require('commander'),\n fs = require('fs'),\n sequoria = require('sequoria'),\n createBot = require('./lib').createBot;\n\nfunction main() {\n program\n .version(require('./package').version)\...
javascript
edit
0
2
mit
f65c93b109e2005bea1daaac1494a93f6fc5205b
elvinyung/botstrap,lvn/botstrap
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar es = require('event-stream'),\n clone = require('clone'),\n path = require('path');\n\nmodule.exports = function(opt){\n // clone options\n opt = opt ? clone(opt) : {};\n if (!opt.splitter && opt.splitter !== \"\") opt.splitter...
javascript
edit
0
4
mit
9310026c8cbc4af5f4326a27cfc27121e5636323
wearefractal/gulp-concat,queckezz/gulp-concat,KenanY/gulp-concat,BinaryMuse/gulp-concat,contra/gulp-concat,colynb/gulp-concat,stevelacy/gulp-concat,callumacrae/gulp-concat,abdurrachman-habibi/gulp-concat
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// @flow\nimport type {Store, Dispatch, Action} from 'redux';\n\nexport const save = (store: Store) => (next: Dispatch) => (action: Action) => {\n\tsetImmediate(() => {\n\t\tlocalStorage.setItem('store', JSON.stringify(store.getState())...
javascript
edit
null
null
mit
3f96581aa2df3892d673a3ef175bf8e76f321075
akameco/PixivDeck,akameco/PixivDeck
renderer/middleware/index.js
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\n/**\n * Module dependenices\n */\n\nconst clone = require('shallow-clone');\nconst typeOf = require('kind-of');\n\nfunction cloneDeep(val, instanceClone) {\n switch (typeOf(val)) {\n case 'object':\n return clo...
javascript
edit
0
4
mit
65ea3439f67a9081ff4fddd573f3505c01461253
jonschlinkert/clone-deep
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = reviewersEditionCompare\n\nvar ordinal = require('number-to-words').toWordsOrdinal\nvar parse = require('reviewers-edition-parse')\nvar numbers = require('reviewers-edition-parse/numbers')\n\nfunction reviewersEditionCo...
javascript
edit
0
3
mit
89aa3813432083bc4bc192a27167f7a48d3a482f
kemitchell/reviewers-edition-spell.js
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar rimraf = require('rimraf')\nvar path = require('path');\nvar join = path.join;\n\nfunction Plugin(paths) {\n // determine webpack root\n this.context = path.dirname(module.parent.filename);\n\n // allows for a single string entry...
javascript
edit
0
4
mit
4021d99786f51646633cf9d15fead8c3a58bef7c
chrisblossom/clean-webpack-plugin,mhuggins/clean-webpack-plugin,johnagan/clean-webpack-plugin,chrisblossom/clean-webpack-plugin,johnagan/clean-webpack-plugin
index.js
rejected_duplicate
Near-duplicate of sample 84840
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nfunction Alternate() {\n this.values = arguments;\n this.index = 0;\n}\n\nAlternate.prototype.next = function() {\n var returnValue = this.values[this.index];\n\n if (this.index < this.values.length) {\n this.index++;\n } else {...
javascript
edit
0
2
mit
4bf4680c186dd7e21292e7efc2431547f51ac11b
sgnh/alternate
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar addElevation = require('geojson-elevation').addElevation,\n TileSet = require('node-hgt').TileSet,\n express = require('express'),\n bodyParser = require('body-parser'),\n app = express(),\n tiles = new TileSet('./dat...
javascript
edit
0
3
isc
628a1e56241fd82104d69ac7e8e4b751ff85e34b
perliedman/elevation-service,JesseCrocker/elevation-service
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*!\n * tweensy - Copyright (c) 2017 Jacob Buck\n * https://github.com/jacobbuck/tweensy\n * Licensed under the terms of the MIT license.\n */\n'use strict';\n\nvar assign = require('lodash/assign');\nvar now = require('performance-now'...
javascript
edit
0
5
mit
43204c269a394d1805d9ddc208ea6a524729c7cf
jacobbuck/tweensy,jacobbuck/tweenie
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nmodule.exports = {\n name: 'ember-cli-uglify',\n\n included(app) {\n this._super.included.apply(this, arguments);\n\n const defaults = require('lodash.defaultsdeep');\n\n let defaultOptions = {\n enabled...
javascript
edit
0
4
mit
73707d6455b0f4758c61a5c573aec6ad987259de
ember-cli/ember-cli-uglify,ember-cli/ember-cli-uglify
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport _ from 'lodash'\nimport defaultConfig from '../config/defaults'\n\nlet globalConfig = _.assign({}, _.cloneDeep(defaultConfig))\n\nexport default class Config {\n static load(cfg) {\n globalConfig = _.cloneDeep(cfg)\n }\n\n ...
javascript
edit
0
1
mit
f4d7e0d0917f7af388c75b4b4816591c4f7410b5
thinktopography/reframe,thinktopography/reframe
src/utils/config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* eslint-disable import/prefer-default-export */\n/**\n * mSupply Mobile\n * Sustainable Solutions (NZ) Ltd. 2019\n */\n\nconst HOURS_PER_DAY = 24;\nconst MINUTES_PER_HOUR = 60;\nconst SECONDS_PER_MINUTE = 60;\nconst MILLISECONDS_PER_S...
javascript
edit
0
0
mit
7c953aa414ea16fd831a11b3be4d74f5c52b5653
sussol/mobile,sussol/mobile,sussol/mobile,sussol/mobile
src/database/utilities/constants.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*\n * Copyright 2012, Mozilla Foundation and contributors\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 L...
javascript
edit
0
1
apache-2.0
546e2733e51106975f7b167f3b690771ebd6dcfb
mozilla/gcli,mozilla/gcli,joewalker/gcli,joewalker/gcli,mozilla/gcli
lib/gcli/test/testFail.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nlet chokidar = require('chokidar');\nlet glob = require('glob');\n\n/**\n * Create a new plugin instance.\n *\n * @param {Array} files\n */\nfunction FileVersioningPlugin(files = []) {\n this.files = files;\n}\n\n\n/**\n * Apply the ...
javascript
edit
0
3
mit
56e76553bb5a4f6e44a4739fb4f9eb46dfbfa463
JeffreyWay/laravel-mix
src/plugins/FileVersioningPlugin.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * render-mustache\n *\n * This module implements support for rendering [Mustache](http://mustache.github.com/)\n * templates using [mustache.js](https://github.com/janl/mustache.js).\n */\ndefine(['mustache'],\nfunction(Mustache) ...
javascript
edit
0
1
mit
7af80538c9232f5bf0d929d4164076a44cb2b704
sailjs/render-mustache
render-mustache.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar bodyParser = require('body-parser');\nvar express = require('express');\nvar app = express();\nvar router = express.Router();\nvar Sequelize = require('sequelize');\nvar sequelize = new Sequelize(process.env.DATABASE_URL);\n\nvar ma...
javascript
edit
0
1
mit
a4acc1c3dbd3d77104f39c957051f2f38884224c
andereld/progark,andereld/progark
server/app.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport module from '../../module'\nimport command from '../../components/command'\nimport axios from 'axios'\nimport humanize from '../../utils/humanize'\n\nexport default module(\n command('getprice', 'Gets the Jita price of a given...
javascript
edit
0
2
mit
6288e418a248e997f1e6830d8bfa4e09d33a3717
emensch/thonk9k
src/modules/getPrice/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react'\nimport PropTypes from 'prop-types'\nimport { Map, TileLayer, GeoJSON } from 'react-leaflet'\n\nclass CenteredMap extends React.PureComponent {\n static propTypes = {\n vectors: PropTypes.object.isRequired,...
javascript
edit
0
2
mit
ad1554d353a332c2eed047b86c3ddbe5f4e3a6c4
sgmap/inspire,sgmap/inspire
src/components/CenteredMap.js
rejected_duplicate
Near-duplicate of sample 93356
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar util = require('util');\nvar Duplex = require('stream').Duplex;\n\nvar LoadAverage = module.exports = function LoadAverage(options) {\n this.warn = options.warn;\n this.critical = options.critical;\n\n Duplex.call(this, { objectM...
javascript
edit
0
6
isc
6e95c2af465fc296984e86b73192eca1c32c8f9d
numbat-metrics/numbat-analyzer,ceejbot/numbat-analyzer
lib/rules/load-average.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// @flow\nimport { Record } from 'immutable';\n\nimport { Type } from './tm';\nimport EvaluationResult from './evaluation';\n\n\nconst EqualityShape = Record({\n of: null, // Tm\n type: Type.singleton,\n}, 'equality');\n\n\n// Proposi...
javascript
edit
null
null
mit
8506adb0cd6e8dc13a2deefcd349a1826be6f567
joelburget/pigment
src/aspects/equality.js
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```javascript\nexport default class Constants {\n static get USER_ACCOUNT_KEY() { return btoa('blipSdkUAccount'); }\n static get IFRAMEURL_LOCAL() { return 'http://localhost:3000/'; }\n static get IFRAMEURL_HMG() { return 'https://hmg-sdkcomm...
javascript
edit
0
1
apache-2.0
fff63aaf393903aa0830f1cf521b3edc775a152e
takenet/blip-chat-web,takenet/blip-chat-web,takenet/blip-sdk-web,takenet/blip-sdk-web
sdk/src/Constants.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar expect = require('chai').expect;\nvar isPalindrome = require('../src/palindrome');\n\ndescribe('palindrome-test', function() {\n\tit('should pass the canary test', function() {\n\t\texpect(true).to.be.true;\n\t});\n\n\tit('should re...
javascript
edit
0
1
apache-2.0
dc9a45d38a5857472b7d9a72f7c2363276cc4efc
mrwizard82d1/tdjsa
tdd/server/palindrome/test/palindrome-test.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* global Entity */\n(function() {\n 'use strict';\n\n function Player(x, y, speed) {\n this.base = Entity;\n this.base(\n x,\n y,\n Player.width,\n Player.height,\n 'public/images/sprites/heroes.png',\n...
javascript
edit
0
2
mit
60fbc2e4405a2168223266f950488dfacb8b2f0a
handrus/zombies-game,brunops/zombies-game,brunops/zombies-game
Player.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = {\n default: {\n available_providers: [\"ens\", \"ipns\"],\n provider: \"ens\",\n register: {\n rootDomain: \"embark.eth\",\n subdomains: {\n 'status': '0x1a2f3b98e434c02363f3dac3174af93c1d690...
javascript
edit
0
0
mit
aa9717b62f1a0c0e41f06e9f54393d8cd55769f9
iurimatias/embark-framework,iurimatias/embark-framework
templates/demo/config/namesystem.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * Copyright (c) 2015-present, Nicolas Gallagher.\n * Copyright (c) 2015-present, Facebook, Inc.\n * All rights reserved.\n *\n * @flow\n */\n\nimport ExecutionEnvironment from 'fbjs/lib/ExecutionEnvironment'\nimport invariant from...
javascript
edit
null
null
mit
ac04ecd69e559d018f7d9e24d7f6de617aac3a26
necolas/react-native-web,necolas/react-native-web,necolas/react-native-web
src/apis/Dimensions/index.js
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\n/*\nconfig\n->read from file, holds values and supplies as needed\n*/\nrequire('chai').should()\n\nvar config = require('../lib/config')()\n\ndescribe('Config', () => {\n\n describe('#getLayers', () => {\n it('shoul...
javascript
edit
0
1
mit
8a970c6b9bf037c10cdc55dc7fa27bcf20d393dc
mediasuitenz/mappy,mediasuitenz/mappy
test/config.spec.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * Created by anonymous on 13/12/15 11:09.\n */\n\n(function() {\n 'use strict';\n\n angular\n .module('appFoundation', [\n /* Angularjs */\n 'ngMaterial',\n 'ngMessages',\n ...
javascript
edit
0
1
mit
2d14e852c9c833eeec7b63a76102ce4dc29bd2cb
onderdelen/app-foundation,componeint/app-foundation,onderdelen/app-foundation,onderdelen/app-foundation,componeint/app-foundation,componeint/app-foundation,consigliere/app-foundation,consigliere/app-foundation,consigliere/app-foundation
angular/app-foundation.module.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nconst preq = require('preq');\nconst assert = require('../../utils/assert');\nconst mwapi = require('../../../lib/mwapi');\n\nconst logger = require('bunyan').createLogger({\n name: 'test-logger',\n level: 'warn...
javascript
edit
0
1
apache-2.0
0492af81a8140b89347ea721f46fcc71088466d8
wikimedia/mediawiki-services-mobileapps,wikimedia/mediawiki-services-mobileapps,wikimedia/mediawiki-services-mobileapps,wikimedia/mediawiki-services-mobileapps,wikimedia/mediawiki-services-mobileapps,wikimedia/mediawiki-services-mobileapps
test/lib/api-util/api-util-test.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Em from 'ember';\n\nvar get = Em.get;\n\nvar defaultFilter = function(value) { return value; };\n\nexport default function(dependentKey, filter) {\n filter = filter || defaultFilter;\n\n var computed = Em.computed(function hand...
javascript
edit
0
2
mit
9eaa53c31ddb5170a9cd3d81e4fc4846a370b6ba
givanse/ember-computed-change-gate,GavinJoyce/ember-computed-change-gate,givanse/ember-computed-change-gate,GavinJoyce/ember-computed-change-gate
addon/change-gate.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict'\n\nconst tap = require('tap')\nconst getDokumenter = require('../lib/journals/getDokumenter')\n\ntap.test('Requires options to be specified', function (test) {\n const options = false\n const expectedErrorMessage = 'Missi...
javascript
edit
0
1
mit
fa449ed86a6bfde93654bba283a8c7cc4788bc61
zrrrzzt/edemokrati
test/journals-getDokumenter-test.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst {TextView, device, ui} = require('tabris');\n\n// Display available device information\n\n['platform', 'version', 'model', 'language', 'orientation'].forEach((property) => {\n new TextView({\n id: property,\n left: 10, righ...
javascript
edit
0
1
bsd-3-clause
daf08f7840abf24d076c604fb58ca0771c79a25c
eclipsesource/tabris-js,eclipsesource/tabris-js,eclipsesource/tabris-js
snippets/device.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict'\n\nvar extract = require('../../extract')\nvar lodash = require('lodash')\n\nvar CONST = {\n SOURCE_NAME: 'totalwind',\n IGNORE_LOG_PROPS: ['updatedAt', 'createdAt', 'link', 'title', 'provider']\n}\n\nfunction createExtra...
javascript
edit
0
3
mit
ced91cef769326b288b6741f3e1474ee9cb89a29
windtoday/windtoday-core,windtoday/windtoday-core
core/providers/totalwind/extractor.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/** @jsx createElement */\n\nconst {createElement, createEventHandler, render} = Yolk\n\nfunction Counter () {\n const handlePlus = createEventHandler(1, 0)\n const handleMinus = createEventHandler(-1, 0)\n const count = handlePlus.m...
javascript
edit
0
1
mit
c62191bfcb066f9f544f3df019db32da48dbbeee
StateFarmIns/yolk,garbles/yolk,KenPowers/yolk,yolkjs/yolk,jadbox/yolk,brandonpayton/yolk,kamilogorek/yolk,BrewhouseTeam/yolk,knpwrs/yolk
test/examples/Counter-test.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nconst path = require('path');\nconst gulp = require('gulp');\nconst eslint = require('gulp-eslint');\nconst spawn = require('cross-spawn');\nconst excludeGitignore = require('gulp-exclude-gitignore');\nconst nsp = requi...
javascript
edit
0
1
mit
9ad30d7fb666403f0a74e5905ef928be13547a7b
FountainJS/generator-fountain-systemjs,FountainJS/generator-fountain-systemjs
gulpfile.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar gulp = require('gulp'),\n jsdoc = require('gulp-jsdoc'),\n docsSrcDir = './assets/js/**/*.js',\n docsDestDir = './docs/js',\n jsDocTask;\n\njsDocTask = function() {\n return gulp.src(docsSrcDir)\n .pipe(\n jsdoc...
javascript
edit
0
1
mit
1ed8856f1a4861213c73b857582a18e6c836a7ef
moneyadviceservice/dough,moneyadviceservice/dough,moneyadviceservice/dough,moneyadviceservice/dough
gulpfile.js
rejected_duplicate
Near-duplicate of sample 102160
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport module from '../../module'\nimport command from '../../components/command'\nimport loader from '../../components/loader'\nimport axios from 'axios'\nimport humanize from '../../utils/humanize'\n\nexport default module(\n loade...
javascript
edit
0
2
mit
e5fb18d4a59e707f075d76310af2ec919ca5716c
emensch/thonk9k
src/modules/getPrice/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * Prints a random programmer joke.\n * @author Vitor Cortez <<EMAIL>>\n */\nvar jokeMeUpBoy = function() {\n const jokes = getListOfJokes();\n let rand = Math.floor(Math.random() * jokes.length);\n console.log(jokes[rand]...
javascript
edit
0
1
mit
d02ef235fb382ff749a41561518c18c7ebd81f2f
Rabrennie/anything.js,Sha-Grisha/anything.js,Rabrennie/anything.js,Rabrennie/anything.js,Rabrennie/anything.js,Sha-Grisha/anything.js,Sha-Grisha/anything.js,Sha-Grisha/anything.js
src/JokeMeUpBoy.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar gulp = require(\"gulp\");\nvar sass = require(\"gulp-sass\");\nvar postcss = require(\"gulp-postcss\");\nvar autoprefixer = require(\"autoprefixer\");\nvar cssnano = require(\"cssnano\");\nvar uglify = require(\"gulp-uglify\");\nvar...
javascript
edit
0
1
mit
af37455fed835172c2e533a60f2e65f3833058a9
mohouyizme/minimado,mohouyizme/minimado
gulpfile.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst $answer = $('.answer')\nconst {makeRichText} = require('./rich-text-editor')\n\nconst save = ($elem, async = true) => $.post({\n url: '/save',\n data: {text: $elem.html(), answerId: $elem.attr('id')},\n async\n})\n\nfunct...
javascript
edit
0
5
mit
6801d288ec728671330a6881306753abd30e0a8f
digabi/math-editor,digabi/rich-text-editor,digabi/rich-text-editor,digabi/rich-text-editor,digabi/math-editor
app/student.front.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Cycle from '@cycle/core';\nimport {div, button, h1, h4, a, makeDOMDriver} from '@cycle/dom';\nimport {makeHTTPDriver} from '@cycle/http';\n\nfunction main(sources) {\n const getRandomUser$ = sources.DOM.select('.get-random').eve...
javascript
edit
0
2
mit
10693276f09beaf3cc46782a8b698fa8fb4f7a70
mikekidder/cycle-examples,cyclejs/cycle-examples,mikekidder/cycle-examples,cyclejs/cycle-examples,mikekidder/cycle-examples
http-random-user/src/main.js
rejected_duplicate
Near-duplicate of sample 102680
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nlet Octokat = require('octokat');\nlet octo = new Octokat({});\n\nclass GithubApi {\n constructor(){\n this.octo = new Octokat({});\n }\n\n static newOctokatNoToken(){\n this.octo = new Octokat({});\n }\n\n static newOctokatW...
javascript
edit
0
1
mit
39c4271933e1392d20483aa3e1c6e7287fb3d820
compumike08/GitHub_Status_API_GUI,compumike08/GitHub_Status_API_GUI
src/api/githubAPI.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\ndefine(function() {\n var LoginController = function($location, AuthenticationService) {\n\n // reset login status\n AuthenticationService.clearCredentials();\n\n this.login = function() {\n ...
javascript
edit
0
1
mit
86cef9310543200502e822cbfbc39066e3f91967
tenevdev/idiot,tenevdev/idiot
public/app/user-account/user-login/user-login-controller.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * mSupply Mobile\n * Sustainable Solutions (NZ) Ltd. 2019\n */\n\nimport { createSelector } from 'reselect';\nimport { pageStateSelector } from './pageSelectors';\n\nimport currency from '../localization/currency';\n\n/**\n * Deri...
javascript
edit
0
1
mit
5e850fc85216fed6848878eaf66841c8dc25fc1b
sussol/mobile,sussol/mobile,sussol/mobile,sussol/mobile
src/selectors/cashRegister.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = {\n extends: [\"./index.js\", \"plugin:react/recommended\"],\n env: {\n browser: true\n },\n plugins: [\n \"react\"\n ],\n parserOptions: {\n sourceType: 'module',\n ecmaVer...
javascript
edit
0
0
mit
60f02a26c5857e28e268cbfdd242644089c6626c
netconomy/eslint-config-netconomy
react.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport webpack from \"webpack\";\nimport path from \"path\";\n\nexport default {\n module: {\n rules: [\n {\n test: /\\.((png)|(eot)|(woff)|(woff2)|(ttf)|(svg)|(gif))(\\?v=\\d+\\.\\d+\\.\\d+)?$/,\n loader: \"file-...
javascript
edit
0
0
mit
30d5c4942db0ccdb2f5ee4de0d4405d456ff3ed9
doudigit/doudigit.github.io,BeitouSafeHome/btsh,netlify-templates/one-click-hugo-cms,netlify-templates/one-click-hugo-cms,emiaj/blog,chromicant/blog,doudigit/doudigit.github.io,jcrincon/jcrincon.github.io,chromicant/blog,BeitouSafeHome/btsh,emiaj/blog,jcrincon/jcrincon.github.io,emiaj/blog
webpack.conf.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// Load configurations file\nvar config = require('../configs/config.json');\n\n// Validate settings\nif (!config.mpd || !config.mpd.host || !config.mpd.port) {\n throw new Error(\"You must specify MPD host and port\");\n}\n\nif (!co...
javascript
edit
0
0
apache-2.0
9017acd8ec8e0aaf9cf95d0b64385fb18fff0dcc
JustBlackBird/bluethroat,JustBlackBird/bluethroat,JustBlackBird/bluethroat
lib/config.js
accepted
null
true
[ { "role": "user", "content": "Write javascript code for the following: Allow SIRIUS_PROXY_PATH override by global var" }, { "role": "assistant", "content": "export const TZ = 'Europe/Prague'\n\nexport const SIRIUS_PROXY_PATH = global.SIRIUS_PROXY_PATH || process.env.SIRIUS_PROXY_PATH\n" } ]
javascript
new_file
0
0
mit
48ef57b90e8567574199dddb5b6cee78b6b039b0
cvut/fittable-widget,cvut/fittable,cvut/fittable-widget,cvut/fittable-widget,cvut/fittable,cvut/fittable
src/config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nlet spawn = require('cross-spawn');\n\nmodule.exports = function spawnAsync() {\n let args = Array.prototype.slice.call(arguments, 0);\n let child;\n let promise = new Promise((fulfill, reject) => {\n child = spaw...
javascript
edit
0
3
mit
55e44ff76a4baae8214cd89c498868b661d99049
exponentjs/spawn-async,650Industries/spawn-async
spawnAsync.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n AuthGW Custom Errors\n @author tylerFowler\n**/\n\n/**\n @name InvalidRoleError\n @desc Thrown when a role is given that is not in the list of roles\n @param { String } invalidRole\n**/\nfunction InvalidRoleError(invalidRole)...
javascript
edit
0
1
mit
ee5a87db22b7e527d7d0102072bba5de91ac38fb
tylerFowler/authgw
lib/errors.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { configure } from '@storybook/vue';\n\n// automatically import all files ending in *.stories.js\nconst req = require.context('../stories', true, /\\.stories\\.js$/);\nfunction loadStories() {\n req.keys().forEach(filename => re...
javascript
edit
0
1
mit
57789e5d40c448ab1138dad987f7d8f9595966ee
BKWLD/vue-visual
.storybook/config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst gpio = require('raspi-gpio')\n\nmodule.exports = class Switch {\n constructor (pinId) {\n this.nInput = new gpio.DigitalInput(pinId, gpio.PULL_UP)\n }\n\n on (changeListener) {\n this.nInput.on('change', (value) => {\n ...
javascript
edit
0
1
mit
ad16587294c3186a89e84105fb2e390b36f26ca0
DanStough/josl
lib/switch.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// Pullquotes\ndocument.addEventListener(\"DOMContentLoaded\", function(event) {\n function pullQuote(el){\n var parentParagraph = el.parentNode;\n parentParagraph.style.position = 'relative';\n var clone = el.cloneNode(true);...
javascript
edit
0
2
mit
b9e214312ec055e7e6d64fcc6a75b108c6176657
curiositry/sassisfy,curiositry/sassisfy
js/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar app = require('electron').app\n\napp.on('ready', function () {\n app.exit(123)\n})\n\nprocess.on('exit', function (code) {\n console.log('Exit event with code: ' + code)\n})\n\n```\n\nApply this change: Exit from a setImmediate ca...
javascript
edit
0
1
mit
f5774e3fb24ca403de481e446c3bf68fa78b2c47
seanchas116/electron,felixrieseberg/electron,pombredanne/electron,bpasero/electron,wan-qy/electron,leftstick/electron,the-ress/electron,jaanus/electron,deed02392/electron,thomsonreuters/electron,brave/muon,tonyganch/electron,tinydew4/electron,thomsonreuters/electron,gerhardberger/electron,roadev/electron,simongregory/e...
spec/fixtures/api/quit-app/main.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nconst application = 'io.github.deathcap.nodeachrome';\n\nfunction decodeResponse(response, cb) {\n console.log('decodeResponse',response);\n if (typeof cb !== 'function') { console.error('??? decodeResponse non-string...
javascript
edit
0
4
mit
234138b3a81e6db0439851c131448eb3f030f146
deathcap/nodeachrome,deathcap/nodeachrome,deathcap/nodeachrome
app/send-native.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar acquires = {};\nvar Responder = require('cote').Responder;\n\nvar autoReleaseTimeout = 30000;\nvar counts = {\n acquires: 0,\n releases: 0\n};\n\nfunction acquire(req, cb) {\n console.log('acquire', req.id);\n counts.acq...
javascript
edit
0
4
apache-2.0
2de18a5628f1acf45a5884c93bd985d4f6f367a3
tart/semaver
lib/server.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// @flow\n\nexport type Navigation = {\n navigate: (screen: string, parameters?: Object) => void,\n state: {\n params: Object,\n },\n};\n\n```\n\nApply this change: Improve Flow type of the navigation" }, { "role": "assist...
javascript
edit
null
null
mit
ef259591d22d303c351b419f130b13061e28771a
mrtnzlml/native,mrtnzlml/native
app/native/src/types/Navigation.js
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* eslint-env node */\nconst 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 /*\n This build file speci...
javascript
edit
0
1
mit
a6a42353b20a9282bdb83cf45c0111954b9d6888
amiel/ember-data-url-templates,amiel/ember-data-url-templates
ember-cli-build.js
rejected_duplicate
Near-duplicate of sample 94221
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar webpackConfig = require('./webpack.config');\n\nmodule.exports = function (config) {\n config.set({\n basePath: '',\n frameworks: ['mocha', 'chai'],\n files: [\n 'test/**/*.ts'\n ],\n exclude: [\n ],\n pre...
javascript
edit
0
1
apache-2.0
1db74f03479538911f1c9336df233aea3c7cc622
proteus-h2020/proteic,proteus-h2020/proteic,proteus-h2020/proteus-charts,proteus-h2020/proteic
karma.conf.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * isUndefined\n * Checks if a value is undefined or not.\n *\n * @name isUndefined\n * @function\n * @param {Anything} input The input value.\n * @returns {Boolean} `true`, if the input is `undefined`, `false` otherwise.\n */\nmod...
javascript
edit
0
1
mit
e24f9da2e1b107767453a8693be90cfb97ebe76c
IonicaBizau/is-undefined
lib/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst moment = require('moment');\n\nexport const dateFormat = (utcDate) => {\n return moment(utcDate, 'YYYY-MM-DD hh:mm:ss z').format('LLL');\n};\n\n```\n\nApply this change: Use Date function to help parse timezone." }, { "ro...
javascript
edit
0
1
mit
a551c502c03f0e324aa0765d36799f3c8305b2f2
FuBoTeam/fubo-flea-market,FuBoTeam/fubo-flea-market
app/utils/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport {describe, it} from 'mocha';\nimport {\n assertThat, equalTo,\n} from 'hamjest';\n\nconst toSrcDestPairs = (files, {sourcePath, destinationPath}) =>\n files.map(file => ({\n sourceFileName: file,\n destinationFilename: fi...
javascript
edit
0
1
mit
cbfb5044b5d16a826f98104f52c8588fffbfb6c0
tddbin/katas,tddbin/katas,tddbin/katas
src/deploy.spec.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar request = require('request');\nvar yaml = require('js-yaml');\n\nmodule.exports = function (callback) {\n var languagesURL = 'https://raw.githubusercontent.com/github/linguist/master/lib/linguist/languages.yml';\n\n request(langua...
javascript
edit
0
3
mit
ec5401d64467628fa318a96363dcd4ae85ff1d98
nicolasmccurdy/language-colors,nicolasmccurdy/language-colors
get_languages.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nexport const messages = {\n post: {\n name: 'Article',\n all: 'Articles',\n list: {\n search: 'Recherche',\n title: 'Titre',\n published_at: 'Publié le',\n commentable:...
javascript
edit
0
0
mit
5aff66da9b38b94fe0e6b453ecb2678e0f743d8a
matteolc/admin-on-rest,matteolc/admin-on-rest,marmelab/admin-on-rest,marmelab/admin-on-rest
example/i18n/fr.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar app = angular.module(\"blogApp\", []);\nvar posts = [];\n\napp.config(function($routeProvider)\n{\n\t$routeProvider\n\t\t.when('/', {\n\t\t\ttemplateUrl: 'views/home.html',\n\t\t\tcontroller: 'BlogCtrl'\n\t\t})\n\t\t.when('/post/:po...
javascript
edit
0
1
mit
26325efdf4836d0eb44a4f987830c38562222cda
Somojojojo/blog
public/javascripts/app.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\nvar cp = require('child_process');\nvar child = cp.fork(__dirname + '/child.js');\nvar passport = require('passport');\nvar DropboxOAuth2Strategy = require('passport-dropbox-oauth2').Strategy;\nvar active = false;\n\nmodu...
javascript
edit
0
2
mit
6621c6e7cc5fb3d62d8a5fabb08cf870b72ed5fe
svacha/jsbin,filamentgroup/jsbin,eggheadio/jsbin,late-warrior/jsbin,thsunmy/jsbin,pandoraui/jsbin,ilyes14/jsbin,digideskio/jsbin,saikota/jsbin,AverageMarcus/jsbin,fgrillo21/NPA-Exam,late-warrior/jsbin,peterblazejewicz/jsbin,juliankrispel/jsbin,francoisp/jsbin,ctide/jsbin,juliankrispel/jsbin,KenPowers/jsbin,mdo/jsbin,mi...
lib/dropbox/index.js
rejected_duplicate
Near-duplicate of sample 100573
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport \"es6-symbol\";\nimport \"weakmap\";\n\nimport svgLoader from \"./loader.js\";\nimport Icon from \"./components/Icon.js\";\nimport Sprite from \"./components/Sprite.js\";\nimport Theme from \"./components/Theme.js\";\n\nvar callb...
javascript
edit
0
5
mit
bb9858b1edbc7f8fe7a2abd70110adb50055ff8c
vuzonp/uxon
lib/main.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Ember from \"ember\";\n\nconst { $, inject, run } = Ember;\n\nexport default Ember.Service.extend({\n fastboot: inject.service(),\n\n init() {\n this._super(...arguments);\n if (!this.get('fastboot.isFastBoot')) {\n ...
javascript
edit
0
5
mit
1b6904a33c0f83eddf6c759ebe4243d54eb1f54f
ember-cli/ember-twiddle,ember-cli/ember-twiddle,Gaurav0/ember-twiddle,Gaurav0/ember-twiddle,knownasilya/ember-twiddle,knownasilya/ember-twiddle,knownasilya/ember-twiddle,ember-cli/ember-twiddle,Gaurav0/ember-twiddle
app/services/resizeable-columns.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nlet ivm = require('isolated-vm');\nlet isolate = new ivm.Isolate;\n\nfunction makeContext() {\n\tlet context = isolate.createContextSync();\n\tlet global = context.globalReference();\n\tglobal.setSync('ivm', ivm);\n\tisolate.compileScri...
javascript
edit
0
3
isc
19e3dc49302a635f51bcd552fb70b434c0968520
laverdet/isolated-vm,laverdet/isolated-vm,laverdet/isolated-vm,laverdet/isolated-vm
tests/cross-context-instance.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport loadersWithAuthentication from \"./loaders_with_authentication\"\nimport loadersWithoutAuthentication from \"./loaders_without_authentication\"\n\nexport default (accessToken, userID) => {\n const loaders = loadersWithoutAuthent...
javascript
edit
0
2
mit
78874dcdad510e76c2ee6d47c6b0ac72073b3e7c
craigspaeth/metaphysics,mzikherman/metaphysics-1,artsy/metaphysics,artsy/metaphysics,craigspaeth/metaphysics,mzikherman/metaphysics-1,artsy/metaphysics,mzikherman/metaphysics-1,mzikherman/metaphysics-1
lib/loaders/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar DOM = (function(){\n var entityMap = {\n \"&\": \"&amp;\",\n \"<\": \"&lt;\",\n \">\": \"&gt;\",\n '\"': '&quot;',\n \"'\": '&#39;',\n \"/\": '&#x2F;'\n };\n \n var entityRegex = /[&<>\"'\\/]/g;\n \n return {...
javascript
edit
0
2
mit
da8027163e556a84e60d0c41bd61ea4b8a42ef05
chylex/Discord-History-Tracker,chylex/Discord-History-Tracker,chylex/Discord-History-Tracker,chylex/Discord-History-Tracker,chylex/Discord-History-Tracker,chylex/Discord-History-Tracker
src/renderer/scr.dom.js
rejected_duplicate
Near-duplicate of sample 84915
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar onReady = require('kwf/on-ready');\nvar $ = require('jQuery');\nvar getKwcRenderUrl = require('kwf/get-kwc-render-url');\n\nonReady.onRender('.kwcClass',function(el) {\n var url = getKwcRenderUrl();\n\n $.each($('.kwfUp-addToC...
javascript
edit
0
1
bsd-2-clause
9520ab1f9e7020879c8e3c2e8f6faad31fd572ef
koala-framework/koala-framework,koala-framework/koala-framework
Kwc/Shop/Box/Cart/Component.defer.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use babel';\n\nexport default class Parser {\n\n source: null\n editor: null\n\n parse(source, editor) {\n this.source = source;\n this.editor = editor;\n return this.scan();\n }\n\n scan() {\n let result = [], count =...
javascript
edit
null
null
mit
9bbcea12f0db82cf583d9fcc42998b2b79ef4372
chiragchoudhary66/test-list-maker
lib/parser.js
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\nconst fs = require('fs');\nconst Promise = require('bluebird');\nconst readFile = Promise.promisify(fs.readFile, { context: fs });\nconst cache = require('./cache');\n\nmodule.exports = readTemplate;\n\nfunction readTempl...
javascript
edit
0
2
apache-2.0
d111e99ba98e357e1f13eb8b8e83da5e188b9d0a
carsdotcom/windshieldjs,carsdotcom/windshieldjs
lib/readTemplate.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\ndescribe('Controller: MainCtrl', function () {\n\n // load the controller's module\n beforeEach(module('quakeStatsApp'));\n\n var MainCtrl,\n scope;\n\n // Initialize the controller and a mock scope\n beforeEach...
javascript
edit
0
1
mit
2b261f89e9820a4697e0a812defaec05385fad51
mbarzeev/quake-stats,mbarzeev/quake-stats
test/spec/controllers/main.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * Load all the Views.\n */\n\nrequire([\n 'models/user',\n 'controllers/home',\n 'outer'\n], function (User, Home, Router) {\n\n var users = [new User('Barney'),\n new User('Cartman'),\n new User('Sheldon')];\n\n localS...
javascript
edit
0
1
mit
fa1c80fabddcf07bc6a81f581b36a3a26578fc02
quantumtom/rainbow-dash,quantumtom/rainbow-dash,quantumtom/ash,quantumtom/ash
src/js/app/main.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n//\n// nav-controller.js\n// Contains the controller for the nav-bar.\n//\n\n(function () {\n 'use strict';\n\n angular.module('movieFinder.controllers')\n .controller('NavCtrl', function ($scope, $modal, user) {\n ...
javascript
edit
0
1
mit
25ecb5e4f4bfeac33198913ec49bdb8b2412f462
we4sz/DAT076,we4sz/DAT076
MovieFinder/src/main/webapp/public/src/controllers/nav-controller.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar Fs = require('fs');\n\nvar config = module.exports = {};\n\n// Configuring TLS\nconfig.tls = {\n key: Fs.readFileSync('./lib/certs/key.key'),\n cert: Fs.readFileSync('./lib/certs/cert.crt'),\n\n // Only necessary if using t...
javascript
edit
0
0
bsd-3-clause
25376ac4975c5d5021b40438f8954a6faa24e21d
jd73/university,jd73/university
lib/config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nSpree.createEncryptedAdyenForm = function(paymentMethodId) { \n document.addEventListener(\"DOMContentLoaded\", function() {\n var checkout_form = document.getElementById(\"checkout_form_payment\")\n // See adyen.encrypt.simple...
javascript
edit
0
1
mit
62624f36608eb495e18050fdff395b39bd69fd22
freerunningtech/solidus-adyen,StemboltHQ/solidus-adyen,freerunningtech/solidus-adyen,StemboltHQ/solidus-adyen,StemboltHQ/solidus-adyen,freerunningtech/solidus-adyen,StemboltHQ/solidus-adyen,freerunningtech/solidus-adyen
app/assets/javascripts/spree/checkout/payment/adyen_encrypted_credit_card.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nlet lastPachiIndex = -1\nlet lastCaptureIndex = -1\n\nlet captureSounds = Object.keys(new Int8Array(5)).map(x => new Audio(`./data/capture${x}.mp3`))\nlet pachiSounds = Object.keys(new Int8Array(5)).map(x => new Audio(`./data/${x}.mp3`)...
javascript
edit
0
2
mit
633dd358d078e50503406f15f8b46b8ba9fce951
yishn/Sabaki,yishn/Goban,yishn/Goban,yishn/Sabaki
src/modules/sound.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar express = require('express');\nvar app = express();\n\napp.use('/game', express.static(__dirname + '/public'));\n\nvar server = app.listen(3000, function () {\n var host = server.address().address;\n var port = server.address().po...
javascript
edit
0
1
apache-2.0
c1a1f8f3ddf1485016c3d70c2ceca66be42608f3
gameontext/gameon-webapp,gameontext/gameon-webapp,gameontext/gameon-webapp
src/server.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar geoip = require('geoip');\n\nfunction Point(latitude, longitude) {\n this.latitude = latitude;\n this.longitude = longitude;\n}\n\nmodule.exports = {\n /*\n * Returns geoloc Point from the requester's ip adress\n * ...
javascript
edit
0
2
mit
87407f3dbd25b823d05f2f5b03475a7ecc391438
Jumplead/GeonamesServer,Jumplead/GeonamesServer,xjewer/GeonamesServer,xjewer/GeonamesServer,xjewer/GeonamesServer,Jumplead/GeonamesServer,Jumplead/GeonamesServer
lib/geoloc.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nif (process && process.env && process.env.NODE_ENV === 'production') {\n console.warn([\n 'You are running Mimic in production mode,',\n 'in most cases you only want to run Mimic in development environments.\\r\\n',\n 'For more info...
javascript
edit
0
0
mit
152c0faec45c4b754b3496a37de0884df11eb5bb
500tech/bdsm,500tech/mimic,500tech/mimic,500tech/bdsm
isProduction.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n//Get required modules\nvar Connection = require( 'ssh2' );\nvar domain = require( 'domain' );\n\n//Add my libs\nvar handlers = require( './handlers.js' );\n\n//Auxiliary function to initialize/re-initialize ssh connection\nfuncti...
javascript
edit
0
1
mit
7a2e50e7634ead72e8301fb99da246f20e92c961
ctimoteo/syncmaster
libs/connections.js
accepted
null
true