messages
listlengths
2
2
language
stringclasses
8 values
prompt_type
stringclasses
2 values
lint_errors
int64
0
129
⌀
cyclomatic_complexity
int64
0
32
⌀
license
stringclasses
7 values
commit
stringlengths
40
40
repos
stringlengths
5
116k
new_file
stringlengths
4
220
status
stringclasses
6 values
error
stringlengths
26
74
⌀
is_valid_syntax
bool
2 classes
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport ReactDOM from 'react-dom';\n\n/**\n * @param {ReactClass} Target The component that defines `onOutsideEvent` handler.\n * @param {String[]} supportedEvents A list of valid DOM event names. Default: ['m...
javascript
edit
0
3
bsd-3-clause
ff777c17169fc950a8bf4af026aada5df206716d
gajus/react-outside-event,gajus/react-outside-event
src/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* @flow */\n\nimport React, {Component} from 'react';\n\nimport StyleKeeper from '../style-keeper';\n\nexport default class StyleSheet extends Component {\n static contextTypes = {\n _radiumStyleKeeper: React.PropTypes.instanceOf(S...
javascript
edit
null
null
mit
535c7bc47ea61a9aaf5f2d4c2fd577136c551005
MicheleBertoli/radium,FormidableLabs/radium,nfl/radium
src/components/style-sheet.js
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar minify = require('html-minifier');\nvar fs = require('fs');\n\nvar html = fs.readFileSync('build/frontend.vulcan.html').toString();\n\nvar minifiedHtml = minify.minify(html, {\n customAttrAssign: [/\\$=/],\n \"removeComments\"...
javascript
edit
0
0
apache-2.0
b97996be23de374f0e47b42c0518c05f6250cf41
sdague/home-assistant-polymer,sdague/home-assistant-polymer
scripts/minify.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar app = require('express').createServer();\nvar sys = require('sys');\n\nvar client = require(\"./lib/redis-client\").createClient();\nvar books = require(\"./books\");\n\napp.listen(8124);\n\napp.get('/', function(req, res){\n res...
javascript
edit
0
1
bsd-3-clause
ae19ea22af4c7dd62768c23e128ef5dbb2729c61
scsibug/read52,scsibug/read52
52-in-52.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nwindow.FactRelationView = Backbone.View.extend({\n tagName: \"li\",\n className: \"fact-relation\",\n\n events: {\n \"click .relation-actions>.weakening\": \"disbelieveFactRelation\",\n \"click .relation-actions>.supporting\": ...
javascript
edit
0
1
mit
f57d340b0c484175c7c10fb7478377fa2f69a58f
Factlink/factlink-core,daukantas/factlink-core,daukantas/factlink-core,Factlink/factlink-core,Factlink/factlink-core,Factlink/factlink-core,daukantas/factlink-core,daukantas/factlink-core
core/app/assets/javascripts/backbone/views/fact_relation_view.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * SQLite client library for Node.js applications\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE.txt file in the root directory of this source tree.\n */\n\nfunction prepareParams(args, { offset...
javascript
edit
0
1
mit
9296e97e12acffef1ce166affe1a1fedc3511a32
kriasoft/node-sqlite,kriasoft/node-sqlite,kriasoft/node-sqlite,lguzzon/node-sqlite
src/utils.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar isCallable = require('es5-ext/lib/Object/is-callable')\n\n , name, now, round, dateNow;\n\nif ((typeof performance !== 'undefined') && performance) {\n\tif (isCallable(performance.now)) {\n\t\tname = 'now';\n\t} el...
javascript
edit
0
1
mit
cf13d0003b4da44f51686619df68ab126af05e91
medikoo/dbjs
node_modules/time-uuid/node_modules/microtime-x/lib/microtime.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst net = require('net')\nconst readline = require('readline')\nconst { app, BrowserWindow } = require('electron')\napp.commandLine.appendSwitch('--disable-http-cache')\n\nrequire('electron-reload')(\n `${__dirname}/renderer`,\n { e...
javascript
edit
0
3
mit
f49c2effcc8f857ec20b2b3666a2d697319f33d4
mattwynne/cucumber-gui-spike,mattwynne/cucumber-gui-spike
main.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nrequire('./src/app/global');\nvar app = require('app');\nvar BrowserWindow = require('browser-window');\nvar winston = require(\"winston\");\nvar Proxtop = require('./src/app/proxtop');\nvar utils = require('./src/app/utils');\n\nutils....
javascript
edit
0
2
mit
dc01d723c8e1f6bb156f206c36b6aae65a8bfcfb
kumpelblase2/proxtop,kumpelblase2/proxtop,kumpelblase2/proxtop,kumpelblase2/proxtop
main.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
2a67bd9bcb18d57bd811cd38ab96bbc0091ad078
RSSchermer/ember-spinner-button,RSSchermer/ember-spinner-button
config/ember-try.js
rejected_duplicate
Near-duplicate of sample 76064
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar EOL = '\\n';\nvar compile = require('./utils/json/compiler');\n\nmodule.exports = function(serializers) {\n var f = compile(serializers || {});\n return function(record) {\n return f(record) + EOL;\n };\n};\n\n```\n\nApply thi...
javascript
edit
0
2
mit
ae7f863f4d809d60f368dc5b555536c9b25db37f
btd/huzzah
json-format.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport test from 'blue-tape';\nimport request from 'superagent';\nimport mocker from 'superagent-mocker';\n\nimport cli from '../src/cli';\nimport mockProcess from './process';\n\nconst mock = mocker(request);\n\ntest('should post the i...
javascript
edit
0
2
mit
1d73157c2c99ebadb50e42f2742df9ec035ef1a7
depcheck/depcheck-web
test/cli.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function(w, d){\n\tvar identificator = 'fucking-eu-cookies';\n\n\tvar config = <%= JSON.stringify({\n\t\t\t\tversion: pkg.version,\n\t\t\t\tl18n: l18n\n\t\t\t}, null, '\\t') %>;\n\n\tfunction shutdownAlert() {\n\t\tvar message = config...
javascript
edit
null
null
mit
f5acccaac3a6269b35a7e7448b42967225538411
jakubboucek/fucking-eu-cookies,jakubboucek/fucking-eu-cookies,jakubboucek/fucking-eu-cookies
source/cookies.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(function() {\n\tvar app = angular.module('idleTown');\n\n\tapp.controller('ResourceController', ['resourceService', function(resourceService) {\n\t\tthis.resources = resourceService.resources;\n\t}]);\n})();\n```\n\nAp...
javascript
edit
0
1
mit
19e10aa90241f3b02cd8ace1f5060dc7560eb2bf
SoggyNoose/IdleTown
app/js/resource-controller.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// @format\nimport { shallow, mount } from 'enzyme'\nimport React from 'react'\nimport Chip from 'material-ui/Chip'\n\nimport { ChipsArray } from './ChipsArray'\n\ndescribe('ChipsArray', () => {\n it('renders ChipsArray without crash',...
javascript
edit
0
1
mit
2ee22016312b3fb0ce7e4ce60deb825ed84a19a1
shirasudon/chat,shirasudon/chat
src/components/ChipsArray.spec.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar assert = require(\"chai\").assert;\nvar Init = require(\"../lib/init\");\nvar fs = require(\"fs\");\nvar path = require('path');\n\ndescribe('init', function() {\n var config;\n\n before(\"Create a sandbox\", function(done) {\n ...
javascript
edit
0
2
mit
d5bb4da1c35b34d91087640e36f97bf750f31567
ConsenSys/truffle
packages/truffle-core/test/init.js
rejected_duplicate
Near-duplicate of sample 78462
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst { describe, it, beforeEach } = require('mocha')\nconst assert = require('assert')\n\nconst ECPair = require('../src/ecpair')\nconst Psbt = require('..').Psbt\n\nconst fixtures = require('./fixtures/psbt')\n\ndescribe(`Psbt`, () =>...
javascript
edit
0
1
mit
6562ee96a48f49d80f4b66ade10b6b17c982f8c7
bitcoinjs/bitcoinjs-lib,BitGo/bitcoinjs-lib,visvirial/bitcoinjs-lib,bitcoinjs/bitcoinjs-lib,visvirial/bitcoinjs-lib,BitGo/bitcoinjs-lib,junderw/bitcoinjs-lib,junderw/bitcoinjs-lib
test/psbt.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar createBetNotification = function(bet){\n var bet = Bets.findOne({ _id: bet });\n\n BetNotifications.insert({\n toNotify: bet.bettors[1],\n betBy: bet.bettors[0]\n });\n}\n\nTemplate.createBetForm.events({\n \"submit .creat...
javascript
edit
0
1
mit
a1d44c8f42825ccc39c05ed56825e3197e7b889d
nmmascia/webet,nmmascia/webet
client/templates/bets/create.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar chai = require('chai');\nvar assert = chai.assert;\n\nvar caniuse = require('../lib/api.js');\n\ndescribe('Supported Features', function () {\n it('window.atob',\n function (done) {\n var opts = {\n ...
javascript
edit
0
1
mit
4e226f2ca91b750d9bd4004cf9d534f7ec98f52b
caniuse-js/caniuse-js
test/supported-features.spec.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\nvar affix = require('./affix');\n\n/**\n * Creates an alias for the chapter.\n * @param {!{title: ?string}} series\n * @param {!{number: number, volume: number}} chapter\n * @param {string=} extension\n * @return {?string...
javascript
edit
0
4
mit
1af9e1f7ddbb81602f6506ec42e6051acde9dd78
Deathspike/mangarack.js,MangaRack/mangarack,MangaRack/mangarack,MangaRack/mangarack,Deathspike/mangarack.js,Deathspike/mangarack.js
src/shared/common/alias.js
rejected_duplicate
Near-duplicate of sample 88604
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\n/**\n * Module for all communication with libre.fm\n */\ndefine([\n\t'scrobblers/baseScrobbler'\n], function (BaseScrobbler) {\n\n\tvar LibreFM = new BaseScrobbler({\n\t\tlabel: 'Libre.FM',\n\t\tstorage: 'LibreFM',\n\t\...
javascript
edit
0
6
mit
f5d0f140f8042cbaeb9bc4aba515889e07ebc148
carpet-berlin/web-scrobbler,inverse/web-scrobbler,fakelbst/Chrome-Last.fm-Scrobbler,inverse/web-scrobbler,galeksandrp/web-scrobbler,alexesprit/web-scrobbler,david-sabata/web-scrobbler,fakelbst/Chrome-Last.fm-Scrobbler,alexesprit/web-scrobbler,david-sabata/web-scrobbler,galeksandrp/web-scrobbler,Paszt/web-scrobbler,Pasz...
core/background/scrobblers/librefm.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar request = require(\"request\");\nvar assert = require('assert');\nvar origin = \"http://localhost:3000/\"\nvar http = require('http');\nvar app = require('../app');\nvar cheerio = require('cheerio');\n\nvar server = http.createServe...
javascript
edit
0
1
bsd-3-clause
7918c31d4ef9a9eac70c606f576f682f78303052
aXises/portfolio-2,aXises/portfolio-2,aXises/portfolio-2
test/test.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport _ from 'lodash'\nimport spark from 'spark'\n\nconst debug = require('debug')('sentry:routes:devices:publish')\nconst Membership = require('mongoose').model('Membership')\n\nexport default async (req, res) => {\n\n const accessTo...
javascript
edit
0
1
mit
a5a9e58b418ff5453dc795bf8db14e18cc7872ae
danawoodman/sentry,danawoodman/sentry,danawoodman/sentry,danawoodman/sentry
src/routes/devices/publish.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nlet styles = {\n\n overlay(isOpen) {\n return {\n position: 'fixed',\n zIndex: 1,\n width: '100%',\n height: '100%',\n background: 'rgba(0, 0, 0, 0.3)',\n opacity: isOpen ? 1 : 0,\n ...
javascript
edit
0
4
mit
484630a148beaa475506fdbae87fce2fdf8814f6
negomi/react-burger-menu,negomi/react-burger-menu
src/baseStyles.js
rejected_duplicate
Near-duplicate of sample 90361
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*\n\n ___ usage ___ en_US ___\n mingle static [address:port, address:port...]\n\n options:\n\n -b, --bind <address:port> address and port to bind to\n --help display help message\n\...
javascript
edit
0
1
mit
daf4a39b5077e24cf207e30e5fbde13f07a6825b
bigeasy/mingle
mingle.static/static.bin.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n( function() {\n\n var runMaker = new RunMaker();\n var fileDropArea = document.getElementById( 'drop_zone' );\n\n fileDropArea.addEventListener( 'drop', dropFile, false );\n fileDropArea.addEventListener( 'dragover', cancel...
javascript
edit
0
3
mit
cb37d223652f2a58a8c2393eaf5b1cead672031a
CharlesHouston/run-three,CharlesHouston/run-three
js/run-three.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = {\n \"env\": {\n \"es6\": true,\n \"node\": true\n },\n \"extends\": \"airbnb-base\",\n \"parserOptions\": {\n \"sourceType\": \"module\"\n },\n \"rules\": {\n \"indent\": [...
javascript
edit
0
0
mit
8387abb850183b7d95dbaa678a5b9f655f9a770d
nus-mtp/sashimi-note,nus-mtp/sashimi-note,nus-mtp/sashimi-note
.eslintrc.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// Require this file to load all the models into the \n// interactive note console\n\nprocess.env.NODE_ENV = 'development'\nrequire('coffee-script')\no = require('./models/organization')\nb = require('./models/badge')\nu = require('./mo...
javascript
edit
0
0
mit
96d6f8d8110bc2ea8d32a5e205b705f4933f1e48
EverFi/Sash,EverFi/Sash,EverFi/Sash
load_models.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nimport cache from 'gulp-cached';\nimport gulp from 'gulp';\nimport remember from 'gulp-remember';\nimport size from 'gulp-size';\nimport vulcanize from 'gulp-vulcanize';\n\nimport {config, browserSync} from './_config.b...
javascript
edit
0
2
bsd-3-clause
97b921fd5713537984469fcc36306ddc7633dceb
cookadlib/www.cookadlib.com,cookadlib/www.cookadlib.com,cookadlib/www.cookadlib.com
gulp_tasks/vulcanize.babel.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar generators = require('yeoman-generator');\n\nmodule.exports = generators.Base.extend({\n\n constructor: function () {\n generators.Base.apply(this, arguments);\n },\n\n prompting: function () {\n var done = this.async();\n ...
javascript
edit
0
1
mit
c80f75443ac858462b4fed6c7e5617d1ae0b9826
kompot/generator-rjanko,kompot/generator-rjanko
generators/app/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Knex from 'knex';\n\nimport dotenv from 'dotenv';\ndotenv.config()\n\nconst dbs = {\n get public() {\n // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/get#smart_self-overwriting_lazy_gette...
javascript
edit
0
9
mit
728c6edc4d2c9b0a3a66a7f4f526ff1332193b6e
sillsdev/web-languagedepot-api,sillsdev/web-languagedepot-api,sillsdev/web-languagedepot-api,sillsdev/web-languagedepot-api
src/db/dbsetup.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport run from 'ember-metal/run_loop';\n\nQUnit.module('system/run_loop/run_bind_test');\n\ntest('Ember.run.bind builds a run-loop wrapped callback handler', function() {\n expect(3);\n\n var obj = {\n value: 0,\n increment: fu...
javascript
edit
0
1
mit
b2d86a3cfcca0d8b0974169fede63ed872b92fde
chadhietala/ember.js,mixonic/ember.js,jmurphyau/ember.js,kigsmtua/ember.js,seanjohnson08/ember.js,visualjeff/ember.js,Patsy-issa/ember.js,soulcutter/ember.js,cjc343/ember.js,sly7-7/ember.js,cesarizu/ember.js,njagadeesh/ember.js,practicefusion/ember.js,cowboyd/ember.js,Zagorakiss/ember.js,marcioj/ember.js,toddjordan/emb...
packages/ember-metal/tests/run_loop/run_bind_test.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 */\nconst models = require('../models/index')\nconst fuzz = require('fuzzball')\n\nasync function productPrice (query, user) {\n const [products] = awa...
javascript
edit
0
2
mit
a02b5d4068f61dd9577239bb221bde7fedbdfb16
bkimminich/juice-shop,bkimminich/juice-shop,bkimminich/juice-shop,bkimminich/juice-shop,bkimminich/juice-shop,bkimminich/juice-shop
lib/botUtils.js
rejected_duplicate
Near-duplicate of sample 107972
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*global require: false */\nrequire('babel-polyfill');\n// This needs refactor. Might want to return mutationVector methods in exports,\n// and call widget.*.add elsewhere, so we can test the methods w/o widgets.\n//require('./mutationV...
javascript
edit
0
0
apache-2.0
8eff032390c49e17fab892d03591bf6b53bdca3d
ucscXena/ucsc-xena-client,acthp/ucsc-xena-client,ucscXena/ucsc-xena-client,acthp/ucsc-xena-client,ucscXena/ucsc-xena-client,ucscXena/ucsc-xena-client,acthp/ucsc-xena-client,ucscXena/ucsc-xena-client
test/all.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\n/**\n* Sample elements from an array-like object.\n*\n* @module @stdlib/math/generics/random/sample\n*\n* @example\n* var sample = require( '@stdlib/math/generics/random/sample' );\n*\n* var out = sample( 'abc' );\n* //...
javascript
edit
0
0
apache-2.0
1a794ad9b64c769d5021529723aa985a4d79d435
stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib
lib/node_modules/@stdlib/math/generics/random/sample/lib/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = function parse(auth) {\n var result = {}, parts, decoded, credentials;\n\n parts = auth.split(' ');\n\n result.scheme = parts[0];\n if (result.scheme !== 'Basic') {\n return result;\n }\n\n decoded ...
javascript
edit
0
5
mit
b64369b91ee8415c934250674fb4c5e5d39c3617
mmalecki/basic-auth-parser
lib/basic-auth-parser.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nrequire('../initialize-globals').load();\nvar listMetadataParser = require('../../lib/core/list_metadata_parser');\ndescribe('# list_metadata_parser', function() {\n describe(\"##createListMetadatasOptions\", function() {\n it('GET'...
javascript
edit
0
2
mit
11e47eb87016b2ca09591bf3b37920ad2b672b63
Jerom138/focus,KleeGroup/focus-core,Jerom138/focus,Jerom138/focus
test/core/list_metadata_parser.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = {\n options: {\n // Options we might want to enable in the future.\n diff: false,\n map: false\n },\n multiple_files: {\n // Prefix all CSS files found in `src/static/css` and overwrite.\n expand: true...
javascript
edit
0
0
cc0-1.0
4dd519ee8697a699b79d3f7dbaae29c2dc4b6b84
cfpb/cf-grunt-config,ascott1/cf-grunt-config,Scotchester/cf-grunt-config
tasks/options/autoprefixer.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar Promise = require('bluebird'),\n mongoose = Promise.promisifyAll(require('mongoose')),\n Message = mongoose.model('Message'),\n UserUtils = require('utils/users'),\n MessageUtils = require('utils/messages'),\n GroupMe...
javascript
edit
0
3
mit
c0102233fb7528891569113e73d7af9f33a07b7c
Pranay92/lets-chat,Pranay92/collaborate
modules/messages/validator.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// Import libraries\nimport 'rxjs'\nimport { Provider } from 'react-redux'\nimport React, { PureComponent } from 'react'\nimport { syncHistoryWithStore } from 'react-router-redux'\nimport { Router, Route, browserHistory, IndexRoute } fr...
javascript
edit
0
1
mit
a244849572e671865cfa28171d567a15d318b38d
Entake/acuity,Entake/acuity,Entake/acuity
client/src/App/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n;(function($) {\n \n $.fn.externalLinkWarning = function() {\n $('a').on('click', function(e) {\n // create temporary anchor\n var tmpLink = document.createElement('a');\n tmpLink.href = thi...
javascript
edit
0
2
mit
8cf72e8a622aef28778487738de8fa03c4023014
martinbean/external-link-warning
jquery.externalLinkWarning.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport undoable from 'redux-undo-immutable';\nimport { fromJS } from 'immutable';\nimport { findPathByNodeId } from '../utils/vertTreeUtils';\n\nconst defaultState = fromJS([{ value: undefined, children: [], _id: 1000 }]);\n\nconst vert...
javascript
edit
0
8
mit
5a53fd6dab930c9b3e3984c369ada0d0e9410207
ivtpz/brancher,ivtpz/brancher
app/reducers/verticalTreeReducers.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function ($) {\n var settings = {},\n defaults = {\n api: \"http://api.ihackernews.com/post/%s?format=jsonp\",\n };\n\n $.fn.ycomments = function (options) {\n $.extend(settings, defaults, options)...
javascript
edit
0
1
isc
8325ecf62128b33ca43fd188fcefe524e17c38f3
whilp/ycomments
ycomments.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* jshint node: true */\n\nmodule.exports = function(environment) {\n var ENV = {\n modulePrefix: 'dummy',\n environment: environment,\n baseURL: '/',\n locationType: 'hash',\n EmberENV: {\n FEATURES: {\n // ...
javascript
edit
0
4
mit
5eca351cf8a562dcd00f671db68b80ea64265131
gloit/gloit-component,gloit/gloit-component
tests/dummy/config/environment.js
rejected_duplicate
Near-duplicate of sample 110100
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function () {\n var _fb = false;\n var _pc = false;\n var _inst = null;\n var app = null;\n \n window.fbAsyncInit = function() {\n FB.init({\n appId : '1238816002812487',\n xfbml ...
javascript
edit
0
3
mit
9fcc31c97cdc01ce38e7ac5f5151837fa5ea1b18
playcanvas/playcanvas-facebook
lib/facebook-setup.js
rejected_duplicate
Near-duplicate of sample 83998
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\nmodule.exports = (provider, body, session) => {\n\n if (!/^[a-zA-Z0-9\\-_]+?\\.[a-zA-Z0-9\\-_]+?\\.([a-zA-Z0-9\\-_]+)?$/.test(body.id_token)) {\n return {error: 'Grant: OpenID Connect invalid id_token format'}\n }\n var [header,...
javascript
edit
0
7
mit
bcaa28358534bee8f5e0bfe40f33e05ac09fcd6f
simov/grant
lib/id_token.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst { DataTypes, Model } = require('sequelize');\n\n/**\n * This class represents a barman.\n */\nclass Barman extends Model {\n\n /**\n * Initialization function.\n *\n * @param sequelize\n * @returns {Model}\n ...
javascript
edit
0
1
apache-2.0
ec95831e70ae13816a6ad88cb5113f31a87b525f
K-Fet/K-App,K-Fet/K-App,K-Fet/K-App,K-Fet/K-App
server/app/models/barman.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\ndefine(function(require) {\n\n var test = require('../../../test')\n var n = 0\n\n\n // 404\n var a = require('./a')\n test.assert(a === null, '404 a')\n\n // exec error\n setTimeout(function() {\n var b = require('./b')\n },...
javascript
edit
0
3
mit
7a89eb48c8486235cd9d197fc2ad7c84ef0201a6
yuhualingfeng/seajs,judastree/seajs,LzhElite/seajs,mosoft521/seajs,ysxlinux/seajs,sheldonzf/seajs,jishichang/seajs,jishichang/seajs,chinakids/seajs,yern/seajs,longze/seajs,imcys/seajs,mosoft521/seajs,mosoft521/seajs,zaoli/seajs,LzhElite/seajs,Lyfme/seajs,AlvinWei1024/seajs,moccen/seajs,twoubt/seajs,seajs/seajs,chinakid...
tests/specs/misc/on-error/main.js
rejected_duplicate
Near-duplicate of sample 109134
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\"use strict\";\n\nmodule.exports = function(config) {\n config.set({\n frameworks: [ \"mocha\" ],\n files: [ \"dist/jsonapi-client-test.js\" ],\n reporters: [ \"spec\" ],\n plugins: [ \"karma-mocha\", \"karma-firefox-launc...
javascript
edit
0
1
mit
71ddf05f43903a0549ec74e46e71a59e57c88ccd
holidayextras/jsonapi-client
karma.local.conf.js
rejected_duplicate
Near-duplicate of sample 90497
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar questions = [\n Q1 = {\n\t\tquestion: \"What does HTML means?\",\n\t\tanswer: \"HyperText Markup Language\"\n },\n Q2 = {\n\t\tquestion: \"What does CSS means?\",\n\t\tanswer: \"Cascading Style Sheet\"\n },\n Q3 = {\n\t\tquesti...
javascript
edit
0
2
mit
473ec082e5f0bcb8279a4e6c2c16bec7f11cd592
vinescarlan/FlashCards,vinescarlan/FlashCards
js/main.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconsole.log('1..4');\nconsole.log([1,2,3].join() == '1,2,3' ? 'ok' : 'not ok');\nconsole.log([1,2,3].join('###') == '1###2###3' ? 'ok' : 'not ok');\nconsole.log([1,2,3].join(1) == '11213' ? 'ok' : 'not ok');\nconsole.log([1,2,3].join(nu...
javascript
edit
0
0
apache-2.0
177405e72f0057fe6953833325e8342e8a2b1dca
tessel/t1-runtime,tessel/t1-runtime,tessel/t1-runtime,tessel/t1-runtime,tessel/t1-runtime
test/issues/issue-beta-352.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar tabs = document.querySelectorAll('.tab');\nvar allPanels = document.querySelectorAll(\".schedule\");\n\nfunction activateTab(tab) {\n //remove active de todas as outras tabs\n tabs.forEach(function(tab) {\n tab.classList.remove...
javascript
edit
0
2
cc0-1.0
7f444a4bc172e88fe0e0466d4103189c4b8d32dc
FatecSorocaba/semana-da-tecnologia,FatecSorocaba/semana-da-tecnologia
js/main.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar assert = require('assert'),\n Selector = require('./');\n\ndescribe('Selector', function () {\n it('should return an object', function () {\n var selector = new Selector('body', [ 0, 0, 0, 1 ]);\n ...
javascript
edit
0
1
mit
95876f17f96cf06542e050643c12f93731837ae1
jonkemp/style-selector
test.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar config = require('./config')\n\nvar logStack = []\n\nmodule.exports = {\n getLogStack: function () {\n return logStack\n },\n\n log: function (message, data) {\n var isDebugMode = config.get('debug') == 'true'\n var hasC...
javascript
edit
0
4
mit
e7c19ff1ab2ceefea9968c5587487fa10f539ab5
opbeat/opbeat-angular,opbeat/opbeat-js-core,opbeat/opbeat-angular,opbeat/opbeat-react,opbeat/opbeat-react,jahtalab/opbeat-js,opbeat/opbeat-js-core,jahtalab/opbeat-js,opbeat/opbeat-react,opbeat/opbeat-angular,jahtalab/opbeat-js
src/lib/logger.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Ember from 'ember';\nimport Application from '../../app';\nimport config from '../../config/environment';\n\nexport default function startApp(attrs) {\n let application;\n\n // use defaults, but you can override\n let attribut...
javascript
edit
0
1
mit
9f1604e38dfeb88a9c327a0c0096b7712738da5a
jkusa/ember-cli-clipboard,jkusa/ember-cli-clipboard
tests/helpers/start-app.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { endpoint } from 'app/api';\nimport asyncActionCreator from './asyncActionCreator';\n\nexport const ingestDocument = asyncActionCreator(\n (collectionId, metadata, file, onUploadProgress, cancelToken) => async () => {\n cons...
javascript
edit
0
1
mit
63fd3aa92c0d659e577cee39db72914951b5d9fa
alephdata/aleph,alephdata/aleph,alephdata/aleph,alephdata/aleph,alephdata/aleph
ui/src/actions/documentActions.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar Node = require('../node');\nvar dot = require('dot');\n\nvar TYPE = 'weighted-centroid';\n\nvar PARAMS = {\n source : Node.PARAM.NODE(Node.GEOMETRY.POINT),\n weight_column : Node.PARAM.STRING,\n category_co...
javascript
edit
0
1
bsd-3-clause
fc66fd3761ba8231e49a7045cd5290b619dfc0e0
CartoDB/camshaft
lib/node/nodes/weighted-centroid.js
accepted
null
true
[ { "role": "user", "content": "Write javascript code for the following: Fix for active nav links when URL has hash" }, { "role": "assistant", "content": "$(function(){$(\"#side-menu\").metisMenu()}),$(function(){$(window).bind(\"load resize\",function(){topOffset=50,width=this.window.innerWidth>0...
javascript
new_file
0
3
mit
9db45c50489d852c0a40167f59dee4720712c78c
p2made/yii2-sb-admin-theme,p2made/yii2-sb-admin-theme,p2made/yii2-sb-admin-theme
assets/lib/js/sb-admin-2.min.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use babel';\n\nconst init = () => {\n const copyEnabled = () => atom.config.get('remote-ftp.context.enableCopyFilename');\n const contextMenu = {\n '.remote-ftp-view .entries.list-tree:not(.multi-select) .directory .header': {\n ...
javascript
edit
0
1
mit
8823acb41f9810e07f09ea9fe660deebc657f451
mgrenier/remote-ftp,icetee/remote-ftp
lib/menus/contextMenu.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst defaults = {\n idField: '_id',\n as: 'userId'\n};\n\nexport default function(options = {}) {\n return function(hook) {\n if (hook.type !== 'before') {\n throw new Error(`The 'associateCurrentUser' hook should only be us...
javascript
edit
0
4
mit
57edac53919b5d94ac9d32a6689efe6ba393dab9
m1ch3lcl/feathers-authentication,eblin/feathers-authentication,eblin/feathers-authentication,feathersjs/feathers-authentication,feathersjs/feathers-passport-jwt,feathersjs/feathers-passport-jwt,m1ch3lcl/feathers-authentication
src/hooks/query-with-current-user.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function (angular) {\n \"use strict\";\n\n\tvar module = angular.module('net.enzey.services', []);\n\n\tmodule.service('nzService', function ($document, $timeout) {\n\t\t// position flyout\n\n\t\tvar getChildElems = function(elem) {...
javascript
edit
0
2
apache-2.0
95c874d1a0f53bc15bba2c3e141560e20fc8ee3b
EnzeyNet/Services
src/nzServices.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = function (licenseContent, done) {\n var thisYear = (new Date()).getFullYear();\n var latestYear, originalYearInfo, updatedYearInfo, match, updatedLicenseContent;\n\n\n match = licenseContent.match(/Copyright \\(c\\) ...
javascript
edit
0
1
mit
bd565f9c1131a432028da2de89646c80b2420aa3
sungwoncho/license-up
lib/update-license.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\n/**\n * @ngdoc function\n * @name dockstore.ui.controller:NavbarCtrl\n * @description\n * # NavbarCtrl\n * Controller of the dockstore.ui\n */\nangular.module('dockstore.ui')\n .controller('NavbarCtrl', [\n '$scope'...
javascript
edit
0
3
apache-2.0
116724c9e7dfdbd528f98cf435abe6d1a2255c94
ga4gh/dockstore-ui,ga4gh/dockstore-ui,ga4gh/dockstore-ui
app/scripts/controllers/navbar.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport {Table} from 'apache-arrow';\n\nconst RowIndex = Symbol('rowIndex');\n\nexport default function arrow(data) {\n const table = Table.from(Array.isArray(data) ? data : [data]),\n proxy = rowProxy(table),\n rows = Arr...
javascript
edit
0
2
bsd-3-clause
e986b21056f79b7632f6854d31f0f2dd352ae1d1
vega/vega-loader-arrow
src/arrow.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst util = require('util');\nconst express = require('express');\nconst app = express();\nconst router = express.Router();\n\nconst Config = require('./Config');\n\n\nclass WebInterface {\n \n constructor(state) {\n this....
javascript
edit
0
2
mit
aca17ece6baa27b604a46116a8aaeb034d042286
shawncplus/ranviermud,seanohue/ranviermud,seanohue/ranviermud
src/WebInterface.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*jshint node:true*/\n\nvar RSVP = require('rsvp');\n\nmodule.exports = {\n description: 'Install ember-cli-react dependencies into your app.',\n\n normalizeEntityName: function() {},\n\n // Install react into host app\n afterInstal...
javascript
edit
0
2
mit
dae676daebaca628db83a769ca6cba03f3b8727b
pswai/ember-cli-react,pswai/ember-cli-react
blueprints/ember-cli-react/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function (context) {\n var _SEMAPOHRES = {};\n\n var Semaphore = function (key) {\n this.key = key;\n if (_SEMAPOHRES[this.key] == undefined)\n _SEMAPOHRES[this.key] = false;\n return this;\n };\n\n Semaphore.prototyp...
javascript
edit
0
2
mit
e735a093caade4c4106307935e25a42d7361c49a
RyanMcG/semaphore-js
semaphore.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React, { Component, PropTypes } from 'react';\nimport Panel from './Panel';\nimport idSafeName from '../helpers/idSafeName';\n\nclass Panels extends Component {\n render () {\n const { data, selectedIndex } = this.props...
javascript
edit
0
2
mit
2aa678272232db394988884c2eabbeba50f84f36
stowball/react-accessible-tabs
src/components/Panels.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { polygonCentroid, distance } from \"./math.js\";\n\n// With 8 or fewer shapes, find the best permutation\n// Skip if array is huge (9+ shapes)\nexport default function(start, end) {\n let distances = start.map(p1 => end.map(p2 ...
javascript
edit
0
5
mit
ab2c01ed76f5e55b82736eb5cf7314c6524fd05d
veltman/flubber
src/order.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar Timer = (function(Util) {\n 'use strict';\n\n // Internal constants for the various timer states.\n var Waiting = 0, Inspecting = 1, Ready = 2, Running = 3, Delay = 4;\n\n var state = Waiting;\n var startTime = undefined, endTi...
javascript
edit
0
4
mit
cc6b9e82123d9a9f75075ed0e843227ea9c74e4d
jjtimer/jjtimer-core
src/timer.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Component from './class/Component';\nimport render from './core/render';\nimport renderToString from './core/renderToString';\nimport unmountComponentAtNode from './core/unmountComponentAtNode';\nimport FragmentValueTypes from '....
javascript
edit
0
0
mit
490db713beee28b626237aab95fd70ead87a6ac5
trueadm/inferno,infernojs/inferno,trueadm/inferno,infernojs/inferno
src/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport {Configure} from './configure';\n\nexport function configure(aurelia, configCallback) {\n var instance = aurelia.container.get(Configure);\n\n // Do we have a callback function?\n if (configCallback !== undefined && type...
javascript
edit
0
4
mit
da16e7386042b77c942924fcab6114116bc52ec8
Vheissu/Aurelia-Configuration,JeroenVinke/Aurelia-Configuration,JoshMcCullough/Aurelia-Configuration,Vheissu/Aurelia-Configuration
src/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*\n * CS3283/4 storage.js\n * This is a facade class for other components\n */\n\n\n```\n\nApply this change: Add initializeDatabase function facade class" }, { "role": "assistant", "content": "/**\n *\n * CS3283/4 storage...
javascript
edit
0
1
mit
6a6df1b256978c460ec823ee019c2028806d5bd1
nus-mtp/sashimi-note,nus-mtp/sashimi-note,nus-mtp/sashimi-note
sashimi-webapp/src/database/storage.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst express = require('express')\nconst ERRORS = require('../../errors')\nconst User = require('../../models/User')\nconst utils = require('../../utils')\nconst router = express.Router()\n\nrouter.post('/', register)\nfunction registe...
javascript
edit
0
4
mit
60bd0a8274ec5e922bdaaba82c8c9e1054cea5f5
14Plumes/Hexode,14Plumes/Hexode,KtorZ/Hexode,14Plumes/Hexode,KtorZ/Hexode,KtorZ/Hexode
backend/src/routes/users/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\ndescribe(\"Core Bliss\", function () {\n\t\"use strict\";\n\n\tbefore(function() {\n\t\tfixture.setBase('tests/fixtures');\n\t});\n\n\tbeforeEach(function () {\n\t\tthis.fixture = fixture.load('core.html');\n\t\tdocument.body.innerHTML ...
javascript
edit
0
1
mit
0e98e25f857e8d0a6e01eb93b64f416679dedf4b
LeaVerou/bliss,LeaVerou/bliss,dperrymorrow/bliss,dperrymorrow/bliss
tests/CoreSpec.js
rejected_duplicate
Near-duplicate of sample 93597
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// This is the Link API\nimport Link from 'next/link'\n\nconst Index = () => (\n <div>\n <Link href=\"/about\">\n <a>About Page</a>\n </Link>\n <p>Hello Next.js</p>\n </div>\n)\n\nexport default Index\n\n```\n\nApply thi...
javascript
edit
0
1
mit
3f85aa402425340b7476aba9873af2bb3bc3534e
yukihirai0505/tutorial-program,yukihirai0505/tutorial-program,yukihirai0505/tutorial-program,yukihirai0505/tutorial-program,yukihirai0505/tutorial-program,yukihirai0505/tutorial-program,yukihirai0505/tutorial-program,yukihirai0505/tutorial-program,yukihirai0505/tutorial-program
next/pages/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport hopp from 'hopp'\n\nexport const css =\n hopp([ 'src/css/*.css' ])\n .dest('dist/css')\n\nexport const js =\n hopp([ 'src/js/*.js' ]) // create fs streams\n // .babel() // pipe to (create babel stream)\n ....
javascript
edit
0
0
mit
2ad2196880708ceaf1870c89a5080f65efb66e8b
hoppjs/hopp
example/hoppfile.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React, { Component } from 'react';\nimport ReactDOM from 'react-dom';\nimport { Form, Label, Input } from 'semantic-ui-react';\n\nclass FormInput extends Component {\n componentWillReceiveProps(nextProps) {\n const {\n i...
javascript
edit
0
8
mit
b268879770a80c260b68e7a5925f988b713bea09
mariusespejo/semantic-redux-form-fields
src/components/FormInput.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react';\n\nclass PostsNew extends React.Component {\n render() {\n return (\n <div className='posts-new'>\n Posts new\n </div>\n );\n }\n}\n\nexport default PostsNew;\n\n```\n\nApply this chan...
javascript
edit
0
1
mit
e3a8c773cc63a8263f8fe9bb98be8326671bbdcc
monsteronfire/redux-learning-blog,monsteronfire/redux-learning-blog
src/components/posts_new.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport bunyan from 'bunyan';\nimport Promise from 'bluebird';\nimport SDC from 'statsd-client';\n\nconst logger = bunyan.createLogger({name: 'Stats'});\n\nexport default class Stats {\n constructor(config) {\n const stats = config.s...
javascript
edit
0
1
mit
b1030675d9b6432dfaf2bd76b395c28491bc32a8
ssube/eveningdriver,ssube/eveningdriver
src/main/server/Stats.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nTestHelpers.commonWidgetTests( \"tooltip\", {\n\tdefaults: {\n\t\tcontent: function() {},\n\t\tdisabled: false,\n\t\thide: true,\n\t\titems: \"[title]:not([disabled])\",\n\t\tposition: {\n\t\t\tmy: \"left top+15\",\n\t\t\tat: \"left bot...
javascript
edit
0
1
mit
6874f190611009228ea9d6901fcdd6b951c66198
GrayYoung/jQuery.UI.Extension,GrayYoung/jQuery.UI.Extension
tests/unit/tooltip/tooltip_common.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar path = require('path');\r\n\r\nmodule.exports = {\r\n /**\r\n * Path from which all relative webpack paths will be resolved.\r\n */\r\n context: path.resolve(__dirname),\r\n /**\r\n * Entry point to the applicat...
javascript
edit
0
1
mit
20f511a5e77972396b3ba9496283900bcbb6cbf6
Baasic/baasic-sdk-javascript,Baasic/baasic-sdk-javascript
webpack.common.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport * as action from '../../action/';\nimport Switch from '@material-ui/core/Switch';\nimport Typography from '@material-ui/core/Typography';\nimport { connect } from '...
javascript
edit
0
2
apache-2.0
b8a2c85d3191879b74520499dbe768ddf487adc0
doemski/cblocks,doemski/cblocks
src/frontend/container/Resources/SwitchResource.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * @copyright 2015, Prometheus Research, LLC\n */\n\nimport {createValue} from './Value';\n\nexport Fieldset from './Fieldset';\nexport Field from './Field';\nexport {createValue};\nexport WithFormValue from './With...
javascript
edit
null
null
mit
11086bca7cb8b43fb099e70ab70fc548bcba9683
prometheusresearch/react-forms
src/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\nconst file = require(\"./file\");\n\nmodule.exports = function testExecutions(data, formatForSonar56 = false) {\n const aTestExecution = [{ _attr: { version: \"1\" } }];\n const testResults = data.testResults.map(fi...
javascript
edit
0
2
mit
8c7a1ff64829876ee7d3815a7dd2bc32c6d7ec44
3dmind/jest-sonar-reporter,3dmind/jest-sonar-reporter
lib/testExecutions.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar DocsParser = require(\"../docsparser\");\nvar xregexp = require('../xregexp').XRegExp;\n\nfunction RustParser(settings) {\n DocsParser.call(this, settings);\n}\n\nRustParser.prototype = Object.create(DocsParser.prototype);\n\nRus...
javascript
edit
0
3
mit
06b3319ea0b7add2e69eecc473927034521bd7e5
NikhilKalige/docblockr
lib/languages/rust.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar fs = require('fs');\n\n/*\n * read *.<type> files at given `path',\n * return array of files and their\n * textual content\n */\nexports.read = function (path, type, callback) {\n\n var textFiles = {};\n var r...
javascript
edit
null
null
mit
b44c58ba61808077ae22d1e4e3030d0aeb84c97a
jm-janzen/EC2-facer,jm-janzen/EC2-facer,jm-janzen/EC2-facer
face-read.js
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * @author {{{author}}}\n * @since {{{date}}}\n */\n\n(function () {\n 'use strict';\n\n angular\n .module({{{moduleName}}})\n .constant({{{elementName}}},\n // Add your values here\n );\n });\n...
javascript
edit
null
null
mit
db859ac95909fe575ffeab45892c67b4f910f6c4
natete/angular-file-templates,natete/angular-file-templates
config/_constant.js
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```javascript\nexport function onConnect(respond, connections = {}, tab, error) {\n chrome.runtime.onConnect.addListener(function(port) {\n function extensionListener(message) {\n if (message.name === 'init') {\n connections[message.ta...
javascript
edit
0
5
mit
fe71f0ef2c920712e3b33f5002a18ab87ff52544
zalmoxisus/crossmessaging
src/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst https = require(\"https\");\nconst fs = require(\"fs\");\n\nmodule.exports = class Artist {\n constructor(artistObject) {\n this.id = artistObject.id;\n this.name = artistObject.name;\n this.tracks = [];\n ...
javascript
edit
0
4
mit
e2925bec159f6fc40317b40b3036cd669a23ddfb
okonek/tidal-cli-client,okonek/tidal-cli-client
app/Artist.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar gulp = require('gulp');\nvar sass = require('gulp-sass');\n\ngulp.task('compile', function () {\n return gulp.src('./scss/*.scss')\n .pipe(gulp.dest('./dist/'));\n});\n\ngulp.task('watch', function () {\n gulp....
javascript
edit
0
1
mit
128f6c14cc4562a43bd929080691a4c764cb9b8d
MikeBallan/Amazium,aoimedia/Amazium,aoimedia/Amazium,catchamonkey/amazium,OwlyStuff/Amazium,OwlyStuff/Amazium
gulpfile.js
rejected_duplicate
Near-duplicate of sample 101001
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\nvar gulp = require('gulp');\nvar sass = require('gulp-sass');\nvar minifycss = require('gulp-minify-css');\nvar autoprefixer = require('gulp-autoprefixer');\nvar sourcemaps = require('gulp-sourcemaps');\n\nvar paths = {\n...
javascript
edit
0
1
mit
13526036cd2f742c1ef744cbd87debdcea70e1ea
pythonindia/wye,pythonindia/wye,pythonindia/wye,pythonindia/wye
gulpfile.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*\n * grunt-css-flip\n * https://github.com/twbs/grunt-css-flip\n *\n * Copyright (c) 2014 Chris Rebert\n * Licensed under the MIT License.\n */\n\n'use strict';\n\nvar flip = require('css-flip');\n\n\nmodule.exports = function(grunt) ...
javascript
edit
0
2
mit
f9089bd10a8283fb2cd9f9914c39dc61f5c670fa
twbs/grunt-css-flip
tasks/css_flip.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * Parse task and return task info if\n * the task is valid, otherwise throw\n * error.\n * @param {string} query Enetered task\n * @return {object} Task info containing\n * task text, start time\n ...
javascript
edit
0
5
mit
80469cdd650849ad6775f5d0a2bfad6a1cb445db
mkermani144/wanna,mkermani144/wanna
desktop/app/shared/database/parse.js
rejected_duplicate
Near-duplicate of sample 100192
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar gulp = require('gulp'),\n gulpCopy = require('gulp-file-copy');\n\ngulp.task('copy', function() {\n gulp.src('./bower_components/jquery/jquery.min.js')\n .pipe(gulp.dest('./js/lib/'));\n\n gulp.src('./jquery-mobile/jquery....
javascript
edit
0
1
mit
0f21e31f84a1fececa6b8220eb2049651630e58e
jeremy5189/payWhichClient,jeremy5189/payWhichClient
gulpfile.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar express = require('express');\nvar supertest = require('supertest');\nvar logger = require('log4js').getLogger('Unit-Test');\nvar nconf = require('nconf');\nnconf.argv()\n\t\t .env()\n\t\t .file({ file: 'config.json...
javascript
edit
null
null
apache-2.0
1b36979ac15068f7072fb1cc4d36318fdc805a44
dollars0427/ATMessager,dollars0427/ATMessager
test/view.sendmessage.js
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```javascript\nexport default function({ types }) {\n return {\n visitor: {\n Function: function parseFunctionPath(path) {\n (path.get('params') || []).reverse().forEach(function(param) {\n const ...
javascript
edit
0
2
mit
286b7f561655fdf75e0fe53d888d95082605ef3f
benderTheCrime/babel-plugin-transform-function-parameter-decorators
src/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * Create a copy of an object, omitting provided keys.\n * @param {Object} obj Object to copy\n * @param {Array} arr Keys to omit\n * @returns {Object}\n */\nexport const omit = (obj, arr) => Object.keys(obj).reduce((res, key) => {...
javascript
edit
0
3
mit
b394877b0b152d43656c5dfc18e667111273668e
nicolas-goudry/react-social-login,deepakaggarwal7/react-social-login,deepakaggarwal7/react-social-login,nicolas-goudry/react-social-login,deepakaggarwal7/react-social-login,nicolas-goudry/react-social-login
src/utils.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Promise from 'bluebird';\nimport process from 'process';\nimport util from 'util';\nimport { withRetries } from 'killrvideo-nodejs-common';\nimport { Scheduler } from './scheduler';\nimport * as availableTasks from './tasks';\nim...
javascript
edit
0
3
apache-2.0
45263d5abdd81c9ce15c52835d98b4998ccbe337
KillrVideo/killrvideo-generator,KillrVideo/killrvideo-generator
src/index.js
rejected_duplicate
Near-duplicate of sample 73447
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*global mocha, mochaPhantomJS, sinon:true, window */\n'use strict';\n\nvar $ = require('jquery'),\n chai = require('chai'),\n sinon = require('sinon'),\n sinonChai = require('sinon-chai'),\n toggles;\n\n// Expose jQuery glo...
javascript
edit
0
0
mit
edc62580aaa114c7b87938a2e275acdef3562981
jadu/pulsar,jadu/pulsar,jadu/pulsar
tests/js/index.js
accepted
null
true