messages
listlengths
2
2
language
stringclasses
8 values
prompt_type
stringclasses
2 values
lint_errors
int64
0
129
⌀
cyclomatic_complexity
int64
0
32
⌀
license
stringclasses
7 values
commit
stringlengths
40
40
repos
stringlengths
5
116k
new_file
stringlengths
4
220
status
stringclasses
6 values
error
stringlengths
26
74
⌀
is_valid_syntax
bool
2 classes
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar Util = require('./util.js');\n\nmodule.exports = Track = function(vid, info) {\n this.vid = vid;\n this.title = info.title;\n this.author = info.author;\n this.viewCount = info.viewCount || info.view_count;\n this.lengthSeconds...
javascript
edit
0
3
mit
ecb93921a112556a307505aec1d249b9fcc27f1d
meew0/Lethe
lib/track.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar url = require('url');\n\nvar getHost = require('./get-host');\n\nmodule.exports = function redirectToOrganization(req, res, organization) {\n res.redirect(req.protocol + '://' + organization.nameKey + '.' + getHost...
javascript
edit
0
2
apache-2.0
63618d2180dfc52c922857eb6aabb2e195b637da
stormpath/express-stormpath,stormpath/express-stormpath,stormpath/express-stormpath
lib/helpers/redirect-to-organization.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport _ from 'lodash';\nimport React from 'react';\nimport Settings from '@folio/stripes-components/lib/Settings';\n\nimport PermissionSets from './permissions/PermissionSets';\nimport PatronGroupsSettings from './PatronGroupsSettings'...
javascript
edit
0
1
apache-2.0
abfd3076f555807bd43fc2733573056afda9d089
folio-org/ui-users,folio-org/ui-users
settings/index.js
rejected_duplicate
Near-duplicate of sample 71296
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport Playground from './index.js';\nimport express from 'express';\nimport ReactDOMServer from 'react-dom/server';\n\nconst app = express();\nconst port = 8000;\n\napp.get('/', function(req, resp) {\n cons...
javascript
edit
0
1
mit
689b3bc608f4892686b0330f30dca188b59c04a9
benox3/react-pic
playground/server.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React, {PropTypes} from 'react'\nimport resolveRefType from './resolveRefType'\nimport {resolver as previewResolver} from 'part:@sanity/base/preview'\nexport default class SanityPreview extends React.PureComponent {\n\n static p...
javascript
edit
0
3
mit
8ffe7ba8783c85de062299f709a4a8d8a68eeef5
sanity-io/sanity,sanity-io/sanity,sanity-io/sanity,sanity-io/sanity
packages/@sanity/base/src/preview/ReferencePreview.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar renderPng = require('../../app/render_png');\ndescribe('renderPng', function () {\n describe('getScreenshotPath', function () {\n\n it('creates the URL for the screenshot service call', function () {\n renderPng.screenshotS...
javascript
edit
0
1
mit
1c42a6e807b644a246b62c43f1494a906c130447
keithiopia/spotlight,alphagov/spotlight,alphagov/spotlight,keithiopia/spotlight,alphagov/spotlight,tijmenb/spotlight,keithiopia/spotlight,tijmenb/spotlight,tijmenb/spotlight
spec/server-pure/spec.render_png.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nfunction JobQueue(metadataBackend, jobPublisher) {\n this.metadataBackend = metadataBackend;\n this.jobPublisher = jobPublisher;\n}\n\nmodule.exports = JobQueue;\n\nvar QUEUE = {\n DB: 5,\n PREFIX: 'batch:qu...
javascript
edit
0
2
bsd-3-clause
a8e03f01c9b67d6b39c627d94f1f95ee706f7284
CartoDB/CartoDB-SQL-API,CartoDB/CartoDB-SQL-API
batch/job_queue.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = function (grunt) {\n var allJSFilesInJSFolder = \"js/**/*.js\";\n\n var distFolder = '../wikipedia/assets/';\n\n grunt.loadNpmTasks( 'grunt-browserify' );\n grunt.loadNpmTasks( 'gruntify-eslint' );\n grunt.loadNpmT...
javascript
edit
0
1
mit
6c3cd606ff1dd948a8a1b51eb5525da4881945d1
wikimedia/apps-ios-wikipedia,josve05a/wikipedia-ios,julienbodet/wikipedia-ios,montehurd/apps-ios-wikipedia,josve05a/wikipedia-ios,wikimedia/wikipedia-ios,julienbodet/wikipedia-ios,josve05a/wikipedia-ios,wikimedia/apps-ios-wikipedia,josve05a/wikipedia-ios,wikimedia/apps-ios-wikipedia,julienbodet/wikipedia-ios,josve05a/w...
www/Gruntfile.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n#!/usr/bin/env node\n\nconst generate = require('./generator')\nconst program = require('commander')\n\nprogram\n .version('1.0.0')\n .option('-w, --words [num]', 'number of words [2]', 2)\n .option('-n, --numbers', 'use number...
javascript
edit
0
0
isc
5eb4b643651673dac89f53b5cc016b47ff852157
aceakash/project-name-generator
src/generator-bin.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nfunction dform(formElement) {\n var eventEmitter = {\n on: function (name, handler) {\n this[name] = this[name] || [];\n this[name].push(handler);\n return this;\n },\n trigger: function (name, event) {\n i...
javascript
edit
0
2
mit
9e77430c1f309444c1990877d237cdf991d36d72
dnode/dform,dnode/dform
src/dform.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst timetrack = require('./timetrack');\nconst calculateDuration = require('./calculateDuration');\n\nmodule.exports = (pluginContext) => {\n return (project, env = {}) => {\n return new Promise((resolve, reject) => {\n ...
javascript
edit
0
4
mit
f7d9d0a57f691a4d9104ab00c75e1cca8cb2142f
jnstr/zazu-timetracker
src/history.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nimport bunyan from 'bunyan';\nimport http from 'http';\nimport { createApp } from './app.js';\n\nconst logger = bunyan.createLogger({name: \"Graphql-Swapi\"});\n\nlogger.info('Server initialisation...');\ncreateApp()\n\...
javascript
edit
0
1
mit
a39453fdbfcc397839583d1b695e0476962f9879
franckLdx/GraphqlSwapi,franckLdx/GraphqlSwapi
src/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport $ from 'jquery'\nimport Alert from './alert'\nimport Button from './button'\nimport Carousel from './carousel'\nimport Collapse from './collapse'\nimport Dropdown from './dropdown'\nimport Modal from './modal'\nimport Popover fro...
javascript
edit
null
null
mit
b33316dba3ce7ab8dc2c99d4ba17c700c3f4da74
creativewebjp/bootstrap,seanwu99/bootstrap,coliff/bootstrap,Hemphill/bootstrap-docs,stanwmusic/bootstrap,Lyricalz/bootstrap,GerHobbelt/bootstrap,peterblazejewicz/bootstrap,inway/bootstrap,stanwmusic/bootstrap,inway/bootstrap,tagliala/bootstrap,yuyokk/bootstrap,kvlsrg/bootstrap,creativewebjp/bootstrap,GerHobbelt/bootstr...
js/src/index.js
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```javascript\nfunction transform(line) {\n var values = line.split(',');\n\n var obj = new Object();\n obj.name = values[0];\n obj.surname = values[1];\n obj.timestamp = values[2];\n var jsonString = JSON.stringify(obj);\n\n return jsonString;...
javascript
edit
0
1
apache-2.0
fc617bc90f25c5e7102c0e76c71d4790599ff23b
GoogleCloudPlatform/deploystack-gcs-to-bq-with-least-privileges
data-demo/person_udf.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nconst childProcess = require('child-process-promise');\nconst express = require('express');\nconst path = require('path');\nconst fs = require('fs');\n\nconst configPath = path.resolve(process.cwd(), process.argv.slice(...
javascript
edit
0
4
mit
c6bb66a01539a85c6011eb1c6bd92fb4b7253ca4
jwilsson/deployy-mcdeployface
src/index.js
rejected_duplicate
Near-duplicate of sample 83867
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport {addLocaleData} from 'react-intl';\nimport {updateIntl as superUpdateIntl} from 'react-intl-redux';\nimport languages from '../languages.json';\nimport messages from '../../locale/messages.json';\nimport {IntlProvider, intlReduce...
javascript
edit
0
2
bsd-3-clause
e68b54812c9245304433d5799252da87db7a4074
LLK/scratch-gui,cwillisf/scratch-gui,cwillisf/scratch-gui,cwillisf/scratch-gui,LLK/scratch-gui
src/reducers/intl.js
rejected_duplicate
Near-duplicate of sample 97003
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst DEFAULT_IN = 'fadeIn'\nconst DEFAULT_OUT = 'fadeOut'\n\nclass Slide extends BaseElement {\n static get observedAttributes () {\n return ['active', 'in', 'out']\n }\n\n get active () {\n return this.hasAttribute('active')\...
javascript
edit
0
2
mit
5927b98e608128152adafed5435fd2ec47a04237
ricardocasares/using-custom-elements,ricardocasares/using-custom-elements
src/slide.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React, { Component, PropTypes } from 'react';\nimport Relay from 'react-relay';\n\nimport ProductPrice from './ProductPrice';\n\nclass ProductItem extends Component {\n\n static propTypes = {\n product: PropTypes.object\n };...
javascript
edit
0
1
bsd-3-clause
85b926b56baa0f29b71b5edea3e83479d1252f69
jreigel/saleor,UITools/saleor,tfroehlich82/saleor,UITools/saleor,KenMutemi/saleor,UITools/saleor,tfroehlich82/saleor,HyperManTT/ECommerceSaleor,HyperManTT/ECommerceSaleor,jreigel/saleor,mociepka/saleor,KenMutemi/saleor,mociepka/saleor,maferelo/saleor,car3oon/saleor,maferelo/saleor,mociepka/saleor,maferelo/saleor,UITool...
saleor/static/js/components/categoryPage/ProductItem.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nangular\n .module('app')\n .directive('projectQuickView', function() {\n return {\n restrict: 'EA',\n replace: false,\n templateUrl: 'app/templates/partials/projectQuickView.html',\n link: function(scope, elemen...
javascript
edit
0
3
mit
b47017282e23be837d469378e5d1ac307f8d99c1
brettshollenberger/rootstrikers,brettshollenberger/rootstrikers
client/app/scripts/directive/projectQuickView.js
rejected_duplicate
Near-duplicate of sample 90126
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar get = Ember.get,\n set = Ember.set,\n meta = Ember.meta;\n\nEmber.attr = function(type) {\n return Ember.computed(function(key, value) {\n var data = get(this, 'data'),\n dataValue = data && get(data, key),\n ...
javascript
edit
0
11
mit
b0924f63b065016bfe073797c7bba4ed844268ab
julkiewicz/ember-model,ipavelpetrov/ember-model,ckung/ember-model,zenefits/ember-model,c0achmcguirk/ember-model,sohara/ember-model,GavinJoyce/ember-model,Swrve/ember-model,asquet/ember-model,gmedina/ember-model,CondeNast/ember-model,igorgoroshit/ember-model,asquet/ember-model,juggy/ember-model,greyhwndz/ember-model,ebr...
packages/ember-model/lib/attr.js
rejected_complexity
Cyclomatic complexity too high: 11
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function (env) {\n \"use strict\";\n env.ddg_spice_arxiv = function(api_result){\n\n if (!api_result) {\n return Spice.failed('arxiv');\n }\n\n Spice.add({\n id: \"arxiv\",\n\n ...
javascript
edit
0
2
apache-2.0
769ceb537eec6642fd039ea7ad0fa074029759b1
bigcurl/zeroclickinfo-spice,cylgom/zeroclickinfo-spice,iambibhas/zeroclickinfo-spice,whalenrp/zeroclickinfo-spice,iambibhas/zeroclickinfo-spice,dogomedia/zeroclickinfo-spice,dogomedia/zeroclickinfo-spice,kevintab95/zeroclickinfo-spice,levaly/zeroclickinfo-spice,bigcurl/zeroclickinfo-spice,bigcurl/zeroclickinfo-spice,xa...
share/spice/arxiv/arxiv.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nfunction cookieValueHandler() {\n Cookies.set(this.name, this.value, 365)\n window.location.reload()\n}\n\nfunction registerSpecialInputs() {\n $$(\"input\").each(function(input) {\n if (input.getAttribute(\"special\") =...
javascript
edit
0
4
bsd-3-clause
2897631e9330289d95ddbab0aa3b13f5d24d1d81
NUBIC/psc-mirror,NUBIC/psc-mirror,NUBIC/psc-mirror,NUBIC/psc-mirror
web/js/calendar-template.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict'\n\nconst TelegramBot = require('node-telegram-bot-api');\n\nconst config = require('../config');\nconst utils = require('./utils');\nconst Kinospartak = require('./Kinospartak/Kinospartak');\n\nconst bot = new TelegramBot(c...
javascript
edit
0
3
mit
d2ba5543a42f23167628cef002e7df9be8a6b2f0
TheBeastOfCaerbannog/kinospartak-bot
app/updateChannel.js
rejected_duplicate
Near-duplicate of sample 67439
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport {VM} from 'vm2'\nimport SensorData from './SensorData'\n\nexport default class Calibrator {\n\tcalibrate (data, cb) {\n\t\tif ( ! (data instanceof SensorData)) return cb('Invalid SensorData given.')\n\n\t\tvar meta = data.getMeta...
javascript
edit
0
2
mit
ae93a807f90a0b59101443d28a88cf934e536e4e
kukua/concava
src/Calibrator.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar gulp = require('gulp');\nvar $ = require('gulp-load-plugins')({ lazy: false });\n\nvar source = require('vinyl-source-stream2');\nvar browserify = require('browserify');\n\nvar path = require('path');\n\nvar pkg = require('./package...
javascript
edit
0
1
mit
1bc6d05e92432dbf503483e3f74d8a3fd456b4a6
ngot/should.js,Lucifier129/should.js,Qix-/should.js,shouldjs/should.js,shouldjs/should.js,hakatashi/wa.js,enicholson/should.js
gulpfile.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar gulp = require('gulp');\nvar shell = require('gulp-shell')\nvar sass = require('gulp-sass');\nvar electron = require('electron-connect').server.create();\n\ngulp.task('serve', function () {\n\n // Compile the sass\...
javascript
edit
0
1
apache-2.0
4156b07d63af7e23ac8138bc233747727310d407
opsdroid/opsdroid-desktop,opsdroid/opsdroid-desktop
gulpfile.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar gulp = require('gulp'),\n coffee = require('gulp-coffee'),\n concat = require('gulp-concat'),\n uglify = require('gulp-uglify'),\n sourcemaps = require('gulp-sourcemaps'),\n del = require('del...
javascript
edit
0
1
mit
f7bd0b4865f0dadc77a33c1168c5239916b05614
mkawalec/latte-art
gulpfile.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n$(document).ready(function () {\n $.fn.select24entity = function (action) {\n // Create the parameters array with basic values\n var select24entityParam = {\n ajax: {\n data: function (params) {\n return {\n ...
javascript
edit
0
2
mit
b7d67f8a8581df15bf526f0e493b9ab626cab924
sharky98/select24entity-bundle,sharky98/select24entity-bundle,sharky98/select24entity-bundle
Resources/public/js/select24entity.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// This is a simple test that is meant to demonstrate the ability\n// interact with the 'document' instance from the global scope.\n//\n// Thus, the line: `exports.document = document;`\n// or something similar should be done in your m...
javascript
edit
0
1
mit
b46ae05b9622867dfdbfe30402f2848b2770fee8
TooTallNate/ModuleJS
test/DOM/main.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar expr = require('vega-expression'),\n args = ['datum', 'event', 'signals'];\n\nmodule.exports = expr.compiler(args, {\n idWhiteList: args,\n fieldVar: args[0],\n globalVar: args[2],\n functions: function(codegen) {\n ...
javascript
edit
0
1
bsd-3-clause
66b15d29269455a5cf24164bd1982f7f01c323f3
chiu/vega,smclements/vega,seyfert/vega,mathisonian/vega-browserify,carabina/vega,mcanthony/vega,shaunstanislaus/vega,Jerrythafast/vega,Jerrythafast/vega,cesine/vega,shaunstanislaus/vega,lgrammel/vega,Applied-Duality/vega,smclements/vega,smartpcr/vega,smartpcr/vega,mcanthony/vega,mathisonian/vega-browserify,pingjiang/ve...
src/parse/expr.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*global describe, beforeEach, it*/\n'use strict';\n\nvar path = require('path');\nvar assert = require('yeoman-generator').assert;\nvar helpers = require('yeoman-generator').test;\nvar os = require('os');\n\ndescribe('hubot:app', funct...
javascript
edit
0
1
mit
5f8631362875b2cafe042c7121cc293615cfffe0
ArLEquiN64/generator-hubot-gulp,m-seldin/generator-hubot-enterprise,eedevops/generator-hubot-enterprise,eedevops/generator-hubot-enterprise,ArLEquiN64/generator-hubot-gulp,zarqin/generator-hubot,github/generator-hubot,mal/generator-hubot,zarqin/generator-hubot,mal/generator-hubot,m-seldin/generator-hubot-enterprise,Cla...
test/test-app.js
rejected_duplicate
Near-duplicate of sample 81378
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// Api Routes --\n// RESTful API cheat sheet : http://ricostacruz.com/cheatsheets/rest-api.html\n\nvar express = require('express'),\n router = express.Router(),\n db = require('../modules/database');\n\n/* GET users listing. */\n...
javascript
edit
0
1
mit
e89d777b928d212b95ce639256de4e38c1788a77
AnimalTracker/AnimalTracker,AnimalTracker/AnimalTracker
src/routes/api.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// Copyright (C) 2006 Google Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// ht...
javascript
edit
0
0
apache-2.0
451813a77b10040e9bf82e31f55aa5e16041795a
ProjectSoft-STUDIONIONS/prettify,ProjectSoft-STUDIONIONS/prettify
src/lang-proto.js
rejected_duplicate
Near-duplicate of sample 95584
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nexport function safariGCBugWorkaround() {\n if (customElements.polyfillWrapFlushCallback === undefined) {\n console.warn('The custom elements polyfill was reinstalled.');\n window.__CE_installPolyfill();\n }\n}\n\n```\n\nApply t...
javascript
edit
0
2
bsd-3-clause
5f336dc64d8d7137e22e30e8799be6215fd9d45e
webcomponents/polyfills,webcomponents/polyfills,webcomponents/polyfills
packages/custom-elements/tests/safari-gc-bug-workaround.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function() {\n chrome.browserAction.onClicked.addListener(function() {\n var newURL = \"chrome-extension://\" + chrome.runtime.id + \"/index.html\";\n chrome.tabs.create({ url: newURL });\n });\n})();\n\n```\n\nApply this chang...
javascript
edit
0
1
mit
53a27ad98440fb40c5d13f0415ee0ac348289ca1
chrisfried/DIM,bhollis/DIM,DestinyItemManager/DIM,48klocs/DIM,bhollis/DIM,delphiactual/DIM,chrisfried/DIM,bhollis/DIM,DestinyItemManager/DIM,LouisFettet/DIM,48klocs/DIM,delphiactual/DIM,bhollis/DIM,LouisFettet/DIM,DestinyItemManager/DIM,chrisfried/DIM,48klocs/DIM,delphiactual/DIM,chrisfried/DIM,delphiactual/DIM,Destiny...
app/extension-scripts/main.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { remote } from 'electron'\n\nexport default async function takeScreenshot (html, deviceWidth) {\n return new Promise(resolve => {\n const win = new remote.BrowserWindow({\n width: deviceWidth,\n show: false,\n }...
javascript
edit
0
1
mit
7b6f45b5970766e1ce85c51c0e3d471b41f6a7d6
mjmlio/mjml-app,mjmlio/mjml-app,mjmlio/mjml-app
app/helpers/takeScreenshot.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// based on the qs module, but handles null objects as expected\n// fixes by Tomas Pollak.\n\nfunction stringify(obj, prefix) {\n if (prefix && (obj === null || typeof obj == 'undefined')) {\n return prefix + '=';\n } else if (obj....
javascript
edit
0
9
mit
b7f05eeb90ceeb53ce14d2a23ee73300cce61f92
tomas/needle,tomas/needle
lib/querystring.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar Struct = require('../base/Struct');\nvar Data = require('../base/Data');\nvar Text = require('../base/Text');\nvar List = require('../base/List');\nvar AnyPointer = require('../base/AnyPointer');\n\n/*\n * Primary use case is testin...
javascript
edit
0
8
mit
ca3c29206187ec6a892e36c649602f39648b445c
xygroup/node-capnp-plugin
src/decode/objectify.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = function ({\n returnLink,\n errors = [],\n}) {\n return {\n buttonText: 'Continue',\n errors,\n children: [\n {\n macroName: 'MultipleChoiceField',\n type: 'radio',\n label: 'What w...
javascript
edit
0
1
mit
2106cfa5b5905945ae2899441995c6c6451717ab
uktrade/data-hub-fe-beta2,uktrade/data-hub-frontend,uktrade/data-hub-frontend,uktrade/data-hub-fe-beta2,uktrade/data-hub-frontend
src/apps/interactions/macros/kind-form.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n$(document).ready(function(){\n\t$('.swipeGal').each(function(i, obj){\n\t\t\n\t});\n});\n\n```\n\nApply this change: Make request to flickr for group images and parse results into a standard json format." }, { "role": "assistan...
javascript
edit
0
1
mit
0734e87bfa82d268366a46b29d3f54f14754d09d
neilvallon/Swipe-Gallery,neilvallon/Swipe-Gallery
js/swipe.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar $ = require('jquery');\nvar _ = require('lodash');\n\nvar BASE_URL = '/api/todos/';\n\nvar TodoApi = {\n destroy: function(_id, success, failure) {\n $.ajax({\n url: BASE_URL + _id,\n type: 'DELETE',\n dataType: '...
javascript
edit
0
1
mit
1ec78af6c450fabb206e4da6035d1b69696c9e77
haner199401/React-Node-Project-Seed,mattpetrie/React-Node-Project-Seed,mattpetrie/React-Node-Project-Seed,haner199401/React-Node-Project-Seed
src/js/apis/todo-api.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\n//\n// TODO: Window resizing needs finer-grain control\n// TODO: Take into account where user has moved the windows\n// TODO: Controls need automatic resizing within their parent windows\n//\n\nRemotery = (function()\n{\n\tfunction Re...
javascript
edit
0
2
apache-2.0
46ca249428c86877ee515c89ccfc6bdf81a43f79
nil-ableton/Remotery,floooh/Remotery,dougbinks/Remotery,nil-ableton/Remotery,island-org/Remotery,nil-ableton/Remotery,dougbinks/Remotery,Celtoys/Remotery,floooh/Remotery,island-org/Remotery,Celtoys/Remotery,island-org/Remotery,barrettcolin/Remotery,dougbinks/Remotery,island-org/Remotery,barrettcolin/Remotery,dougbinks/...
vis/Code/Remotery.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = [\n {name:'C++', mode:'c_cpp'},\n {name:'CSS', mode:'css'},\n {name:'HTML', mode:'html'},\n {name:'JavaScript', mode:'javascript'},\n {name:'Perl', mode:'perl'},\n {name:'Python', mod...
javascript
edit
0
0
unlicense
b9e61516e633e79909371d6c185818e3579085d2
briangreenery/gist
languages.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\ndescribe('asking if a visible div scrolled', function() {\n require('./fixtures/bootstrap.js');\n beforeEach(h.clean);\n afterEach(h.clean);\n\n var visible = false;\n var element;\n var watcher;\n\n beforeEach(function(done) {\n...
javascript
edit
0
1
mit
94a0a48971adbd1583707bd4ed9f874db0b82385
tzi/in-viewport,tzi/in-viewport,vvo/in-viewport,vvo/in-viewport,fasterize/in-viewport,fasterize/in-viewport,ipy/in-viewport,ipy/in-viewport
test/dispose.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar email = require('emailjs')\n , debug = require('debug')('wifi-chat:mailer')\n\nvar config = null\n , server = null\n\nvar connect = function() {\n debug('Connecting to mail server', config.email.connection)\n server = email.se...
javascript
edit
0
2
apache-2.0
b989f178fe4fa05a7422a5f36a0b8291d35bb621
project-isizwe/wifi-chat,webhost/wifi-chat,project-isizwe/wifi-chat,project-isizwe/wifi-chat,webhost/wifi-chat,webhost/wifi-chat
src/mailer.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar domElementValue = require('dom-element-value');\nvar EventManager = require('dom-event-manager');\n\nvar eventManager;\n\nfunction eventHandler(name, e) {\n var element = e.delegateTarget, eventName = 'on' + name;\n if (!element.d...
javascript
edit
0
11
mit
a0501d86dcee4ef1ddad9e7e65db93b7e0b8b10b
crysalead-js/dom-layer,crysalead-js/dom-layer
src/events.js
rejected_complexity
Cyclomatic complexity too high: 11
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * Comma number formatter\n * @param {Number} number Number to format\n * @param {String} [separator=','] Value used to separate numbers\n * @returns {String} Comma formatted number\n */\nmodule.exports = function commaNumber (numb...
javascript
edit
0
5
mit
3e89abf57c2242f8bef493eb0dc8fa053bec9e48
cesarandreu/comma-number
lib/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport manifest from '../../../../package.json';\nimport filePaths from '../../utils/file-paths';\nimport Winreg from 'winreg';\n\nimport BaseAutoLauncher from './base';\n\nclass Win32AutoLauncher extends BaseAutoLauncher {\n\n static ...
javascript
edit
0
2
mit
5cb52c0c7d5149048fdc0f36c18e033a48f33fad
Hadisaeed/test-build,Aluxian/Messenger-for-Desktop,Aluxian/Facebook-Messenger-Desktop,Aluxian/Facebook-Messenger-Desktop,Aluxian/Messenger-for-Desktop,Aluxian/Facebook-Messenger-Desktop,Hadisaeed/test-build,Hadisaeed/test-build,rafael-neri/whatsapp-webapp,rafael-neri/whatsapp-webapp,rafael-neri/whatsapp-webapp,Aluxian/...
src/scripts/browser/components/auto-launcher/impl-win32.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nHandlebarsIntl.registerWith(Handlebars);\n\n$(function() {\n\twindow.state = {};\n\tvar source = $(\"#stats-template\").html();\n\tvar template = Handlebars.compile(source);\n\trefreshStats(template);\n\n\tsetInterval(function() {\n\t\t...
javascript
edit
0
3
mit
099d30fdb02e4e69edc07529b9630f51b9e2dc4e
sammy007/ether-proxy,sammy007/ether-proxy,sammy007/ether-proxy,sammy007/ether-proxy
www/script.js
rejected_duplicate
Near-duplicate of sample 107146
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\nif (!Function.prototype.bind) {\n // PhantomJS doesn't support bind yet\n Function.prototype.bind = Function.prototype.bind || function(thisp) {\n var fn = this;\n return function() {\n retu...
javascript
edit
0
1
mit
2a1121c856f387c164e5239e6a7dacf2d2f29330
goliatone/gsocket
test/test-main.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar _noCaptchaFields=_noCaptchaFields || [];\n\nfunction noCaptchaFieldRender() {\n for(var i=0;i<_noCaptchaFields.length;i++) {\n var field=document.getElementById('Nocaptcha-'+_noCaptchaFields[i]);\n var options={\n ...
javascript
edit
0
3
bsd-3-clause
14e97545ba507765cd186b549981e0ebc55f1dff
UndefinedOffset/silverstripe-nocaptcha,UndefinedOffset/silverstripe-nocaptcha
javascript/NocaptchaField.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar Store = module.exports = function () {\n\n};\n\nStore.prototype.hit = function (req, configuration, callback) {\n var self = this;\n\n\tvar ip = req.ip;\n\tvar path;\n\tif (configuration.pathLimiter) {\n\t\tpath = (req.baseUrl) ?...
javascript
edit
0
4
mit
2ebe898d9f2284ee0f25d8ac927bef4e7bb730de
StevenThuriot/express-rate-limiter
lib/store.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* Magic Mirror Config Sample\n *\n * By Michael Teeuw http://michaelteeuw.nl\n * MIT Licensed.\n */\n\nvar config = {\n port: 8080,\n\n language: 'en',\n timeFormat: 12,\n units: 'imperial',\n\n modules: [\n {\n module: 'c...
javascript
edit
0
0
apache-2.0
df1807f823332d076a0dff7e6ec0b49b8a42e8ad
jhurstus/mirror,jhurstus/mirror
config-SAMPLE.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// @flow\n// RobotSettings card for wifi status\nimport * as React from 'react'\nimport {type StateInstrument} from '../../robot'\nimport InstrumentInfo from './InstrumentInfo'\nimport {Card} from '@opentrons/components'\n\ntype Props =...
javascript
edit
0
1
apache-2.0
ead9142a9701300da3021e79155a9717ec4c3683
OpenTrons/opentrons-api,OpenTrons/opentrons-api,OpenTrons/opentrons-api,OpenTrons/opentrons-api,OpenTrons/opentrons-api,Opentrons/labware,OpenTrons/opentrons_sdk
app/src/components/RobotSettings/AttachedInstrumentsCard.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* globals module */\nmodule.exports = {\n afterInstall: function () {\n this.addBowerPackageToProject('git://github.com/BreadMaker/semantic-ui-daterangepicker.git#5d46ed2e6e5a0bf398bb6a5df82e06036dfc46be');\n this.addBowerPackag...
javascript
edit
0
1
mit
904ec5fd379bf47f66794af36ffcd5ecbf5d3ec5
Flexberry/ember-flexberry,Flexberry/ember-flexberry,Flexberry/ember-flexberry,Flexberry/ember-flexberry
blueprints/ember-flexberry/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React, { PropTypes } from 'react'\nimport classNames from 'classnames'\n\nexport const SVGComponent = ({ children, ...rest }) =>\n <svg {...rest}>\n {children}\n </svg>\n\nSVGComponent.propTypes = {\n children: PropTypes.no...
javascript
edit
0
1
mit
761977b9c98bd5f92d6c90981fff16fec2df4893
ello/webapp,ello/webapp,ello/webapp
src/components/svg/SVGComponents.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = {\n normalizeEntityName: function() {},\n\n afterInstall: function(options) {\n // We assume that handlebars, ember, and jquery already exist\n // FIXME(azirbel): Do we need to install lodash too?\n return th...
javascript
edit
0
1
mit
06296e083225aab969d009cb0bf312872a18e504
zenefits/ember-table-addon,Addepar/ember-table-addon,zenefits/ember-table-addon,Addepar/ember-table-addon
blueprints/ember-table/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar patch = require(\"../lib/patch\")\n , net = require(\"net\")\n , https = require(\"https\")\n , fs = require(\"fs\");\n\n// This is probably THE most ugliest code I've ever written\nvar responseRegExp = /^([0-9a-z-]{36}) (.*)$/i;...
javascript
edit
0
2
mit
ae5d7724d279e3d1feb1c696d70f6a030407053e
buschtoens/distroy
test/patch.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst path = require('path');\r\nconst webpack = require(\"webpack\");\r\n\r\nconst DEBUG = process.argv.includes('--debug'); // `webpack --debug` or NOT\r\nconst plugins = [\r\n new webpack.optimize.OccurrenceOrderPlugin(),\r\n];\r\...
javascript
edit
0
0
mit
fcaba4d5f8df8562dabeacbdcdb4f20abe9fcafd
stereocat/ipcalc_js,stereocat/ipcalc_js
webpack.config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n#!/usr/bin/env node\n\nprocess.on('exit', function sendCoverage() {\n process.send({'coverage': global.__coverage__});\n});\n\n```\n\nApply this change: Use beforeExit event to send coverage" }, { "role": "assistant", "cont...
javascript
edit
0
1
mit
349bad1afc06c0af44ff42ab7358e393f3ec4fd9
rtsao/unitest
lib/ipc-helpers/dump-node.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nconst path = require('path');\nconst webpack = require('webpack');\n\nmodule.exports = {\n cache: true,\n\n devtool: '#source-map',\n\n entry: [\n path.resolve(__dirname, 'src', 'index.js')\n ],\n\n module: {\n ...
javascript
edit
0
0
mit
a7b3e2edaa8f1f2791f3cf8c88d210ca7f3b06c1
planttheidea/moize,planttheidea/moize
webpack.config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\nfunction Matrix(options) {\n options = options || {};\n \n var values;\n \n if (options.values)\n values = options.values;\n \n if (options.rows && options.columns && !values) {\n values = [];\n ...
javascript
edit
0
9
mit
7d8145fce09a92004fbf302953d37863d2bc202b
ajlopez/MathelJS
lib/matrices.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n//\n// This file talks to the main process by fetching the path to the user data.\n// It also writes updates to the user-data file.\n//\n\nvar ipc = require('electron').ipcRenderer\nvar fs = require('fs')\n\nvar getData = function () {\...
javascript
edit
0
2
bsd-2-clause
ade0cebb2c7edcacb2f0e83a103e55529fa024cc
jlord/git-it-electron,jlord/git-it-electron,shiftkey/git-it-electron,vongola12324/git-it-electron,vongola12324/git-it-electron,shiftkey/git-it-electron,shiftkey/git-it-electron,vongola12324/git-it-electron,vongola12324/git-it-electron,vongola12324/git-it-electron,vongola12324/git-it-electron,shiftkey/git-it-electron,jl...
lib/user-data.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\n// Default amount of devices required to run tests.\n\nmodule.exports = {\n devices: {\n // This is a list of required platforms.\n // All required platform should have minDevices entry.\n // So all required p...
javascript
edit
0
0
mit
61f575559be7c973e2fa4bb816221dc63112bffd
thaliproject/Thali_CordovaPlugin,thaliproject/Thali_CordovaPlugin,thaliproject/Thali_CordovaPlugin,thaliproject/Thali_CordovaPlugin,thaliproject/Thali_CordovaPlugin
test/TestServer/config/UnitTest.js
accepted
null
true
[ { "role": "user", "content": "Write javascript code for the following: Define where to find the component stories" }, { "role": "assistant", "content": "module.exports = {\n stories: ['../**/*.stories.js'],\n addons: ['@storybook/addon-backgrounds', '@storybook/addon-knobs'],\n};\n" } ]
javascript
new_file
0
0
mit
c29d3a670722b2f4d0a394e6a72ecb647687893a
teamleadercrm/teamleader-ui
.storybook/main.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { sqlectron } from '../../browser/remote';\n\n\nexport const CONNECTION_REQUEST = 'CONNECTION_REQUEST';\nexport const CONNECTION_SUCCESS = 'CONNECTION_SUCCESS';\nexport const CONNECTION_FAILURE = 'CONNECTION_FAILURE';\n\n\nexport...
javascript
edit
0
2
mit
b1da47403f4871313e0759a21091ace04151cb84
sqlectron/sqlectron-gui,sqlectron/sqlectron-gui,sqlectron/sqlectron-gui,sqlectron/sqlectron-gui
src/renderer/actions/connections.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar webpack = require('webpack')\n , glob = require('glob').sync\n , ExtractTextPlugin = require('extract-text-webpack-plugin');\n\n// Find all the css files but sort the common ones first\nvar cssFiles = glob('./src/common/**/*.css')...
javascript
edit
0
0
mit
00d07f1f24af00950908b79e8670697d3b8f3a17
Upplication/sir-trevor-blocks,Upplication/sir-trevor-blocks
webpack.config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst path = require('path')\n\nmodule.exports = {\n context: __dirname,\n entry: './js/ClientApp.js',\n devtool: 'source-map',\n output: {\n path: path.join(__dirname, '/public'),\n filename: 'bundle.js'\n },\n resolve: {\n...
javascript
edit
0
0
mit
d2eeb477b2925e6e83e63f75b497cc2b24d5e9d5
sheamunion/fem_intro_react_code_along,sheamunion/fem_intro_react_code_along
webpack.config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nPG = ( typeof PG == 'undefined' ? {} : PG );\nPG.FB = {\n init: function(apiKey) {\n PhoneGap.exec(function(e) {\n console.log(\"init: \" + e);\n }, null, 'com.facebook.phonegap.Conn...
javascript
edit
0
2
mit
0ebb23201bc8364368cb77c5b502a345d3144f0e
barfight/phonegap-plugin-facebook-connect,irnc/phonegap-plugin-facebook-connect,AntonDobrev/phonegap-plugin-facebook-connect,totoo74/phonegap-plugin-facebook-connect,AntonDobrev/phonegap-plugin-facebook-connect,irnc/phonegap-plugin-facebook-connect,totoo74/phonegap-plugin-facebook-connect,barfight/phonegap-plugin-faceb...
www/pg-plugin-fb-connect.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar command = {\n command: \"help\",\n description:\n \"List all commands or provide information about a specific command\",\n help: {\n usage: \"truffle help [<command>]\",\n options: [\n {\n option: \"<command>...
javascript
edit
0
4
mit
a7dd9961d9350fc38ad2ad679c6e6b1d1e85e6e9
ConsenSys/truffle
packages/core/lib/commands/help.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport Popper from '../Popper';\n\nconst OptionsListWrapper = React.forwardRef(({\n useLegacy,\n children,\n controlRef,\n isOpen,\n renderToOverlay,\n menuPropGette...
javascript
edit
0
3
apache-2.0
e1495b4a57c88e50ad1cb817372502f59c51b596
folio-org/stripes-components,folio-org/stripes-components
lib/MultiSelection/OptionsListWrapper.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*import * as reactRouter3 from 'react-router';\n\nexport const Link = reactRouter3.Link;\n\nexport const withRouter = reactRouter3.withRouter;*/\n\nimport React from 'react';\n\nimport * as reactRouter from 'react-router';\nimport * as...
javascript
edit
0
3
mit
35c3457c31087a85103c9729279343775511c7e4
Discordius/Telescope,Discordius/Lesswrong2,Discordius/Lesswrong2,Discordius/Telescope,Discordius/Telescope,Discordius/Lesswrong2,Discordius/Telescope,Discordius/Lesswrong2
packages/lesswrong/lib/reactRouterWrapper.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst initialState = {\n count: 0,\n redditReactjsList: [],\n // navTreeData: null,\n // projectData: null,\n elementById: {},\n fileContentById: {},\n features: null,\n projectDataNeedReload: false,\n projectFileChanged: false...
javascript
edit
0
0
mit
3b4ee7102882f6e629828ac1e3e44d8f343d4012
supnate/rekit-portal,supnate/rekit-portal
src/features/home/redux/initialState.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n//must have a blank option one for question of type dropdown\n\nstandard('qTypes',[\"\",\"Drop Down\", \"Multidrop-down\", \"Number Fillin\", \"Essay\", \"Code\"]);\n\nstandard('qTypes2',[\"\",\"dropdowns\", \"multidropdowns\", \"numfil...
javascript
edit
0
5
mit
0e1e23a2754c56869c9abf1ec058f69ac047905b
stephenjoro/QuizEngine
FrontEndCreator/questions.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport restate from 'regular-state';\nimport { Component } from 'nek-ui';\nimport App from './modules/app';\nimport Home from './modules/home';\nimport Detail from './modules/detail';\nimport Setting from './modules/setting';\n\nconst s...
javascript
edit
0
1
mit
b56a1cc01d007d1221c3ec5ac66cbd2fc50fc601
kaola-fed/nek-server,kaola-fed/nek-server
public/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* eslint-env commonjs */\n/* eslint-disable global-require */\n\nmodule.exports = function buildPreset () {\n\treturn {\n\t\tpresets: [\n\t\t\trequire('babel-preset-env').default(null, {\n\t\t\t\ttargets: {\n\t\t\t\t\tbrowsers: ['last ...
javascript
edit
0
1
bsd-3-clause
618bef5d2607cf6bc854c94fcea5095f31844d71
salesforce/design-system-react,salesforce/design-system-react,salesforce/design-system-react
preset/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst url = require('url');\nconst express = require('express');\n\nconst router = express.Router();\n\nmodule.exports = (app, auth) => {\n router.post('/', auth.authenticate('saml', {\n failureFlash: true,\n failureRedirect: app...
javascript
edit
0
3
mit
fa48474a1860ab76a38cb0de737e48262dcd1bef
rapid7/awsaml,rapid7/awsaml,rapid7/awsaml
api/routes/auth.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar jerk = require( '../lib/jerk' ), sys=require('sys');\nvar options =\n { server: 'localhost'\n , port: 6667\n , nick: 'Bot9121'\n , channels: [ '#jerkbot' ]\n };\n\njerk( function( j ) {\n j.watch_for( 'soup', function( message...
javascript
edit
0
1
unlicense
37822557c035ca41a6e9243f77d03a69351fc65c
gf3/Jerk
examples/simple.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar express = require('express');\nvar router = express.Router();\nvar trip = require('../lib/trip')\n\nrouter.post('/', function(req, res, next) {\n var trip_path = trip.generate_trip(req.body.startPoint, req.body.endPoint);\n res.se...
javascript
edit
0
1
mit
8031a913ef64945e15d6cd4e06c91dfbfa16e27c
Ecotaco/bumblebee-bot,Ecotaco/bumblebee-bot
routes/trips.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict'\n\nangular\n .module('serinaApp', [\n 'ngAnimate',\n 'ngCookies',\n 'ngResource',\n 'ngRoute',\n 'ngSanitize',\n 'ngMaterial'\n ])\n .config(function ($routeProvider) {\n $routeProvider\n .when(...
javascript
edit
0
1
mit
20fbda8f219d58a64380841ddd972e59b0eb416e
foxdog05000/serina,foxdog05000/serina
app/scripts/app.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\"use strict\";\n\nconst WebSocket = require(\"ws\");\nconst Constants = require(\"../../Constants\");\n\nconst heartbeat = new WeakMap();\n\nclass BaseSocket extends WebSocket {\n constructor(url) {\n super(url);\n this.readySta...
javascript
edit
0
3
bsd-2-clause
1dfde5055467da45665db268a68e72866aef60e2
qeled/discordie
lib/networking/ws/BaseSocket.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar fs = require('fs')\n , request = require('request')\n\nmodule.exports = function (pliers) {\n\n pliers('npmSecurityCheck', function (done) {\n fs.createReadStream('./npm-shrinkwrap.json').pipe(\n request.post('https://node...
javascript
edit
0
3
bsd-3-clause
e1c49c2c2c1e8e8661a079b6e7acd598bd6123d3
pliersjs/pliers-npm-security-check
pliers-npm-security-check.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * User\n *\n * @module :: Model\n * @description :: A short summary of how this model works and what it represents.\n * @docs\t\t:: http://sailsjs.org/#!documentation/models\n */\n\nmodule.exports = {\n\n attributes: {\n ...
javascript
edit
null
null
mit
fdd9ce07ece40caee51c093254ec232348ef2908
thomaslangston/sailsnode
api/models/User.js
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```javascript\nexport default function(a, b) {\n var ab = new a.constructor(a.length + b.length);\n ab.set(a, 0);\n ab.set(b, a.length);\n return ab;\n}\n\n```\n\nApply this change: Fix for older versions of Node.\n\nOlder versions of Node had a c...
javascript
edit
0
1
bsd-3-clause
c671f90b3877273d18ba22351e1e8b9a63a925c3
mbostock/shapefile
shp/concat.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar\n express = require('express'),\n router = express.Router();\n\nrouter.get('/', function (req, res, next) {\n res.json([\"users\"]);\n return next();\n});\n\nmodule.exports = router;\n\n```\n\nApply this change: Add simple sampl...
javascript
edit
0
1
mit
42a81f023f954e4eb01f5c0b32e3575dc22d7654
givery-technology/bloom-backend
routes/users.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// ==UserScript==\n// @name Steam Review filter\n// @namespace https://github.com/somoso/steam_user_review_filter/raw/master/steam_user_review_filter.user.js\n// @version 0.31\n// @description try to filter out the crap...
javascript
edit
null
null
unlicense
9a5cdc88c83364d9ca91be189b9b36828b35ede2
somoso/steam_user_review_filter,somoso/steam_user_review_filter
steam_user_review_filter.user.js
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar global = {\n host: 'http://subdomain.yourdomain.com',\n port: 8461,\n secretUrlSuffix: 'putSomeAlphanumericSecretCharsHere'\n};\n\nvar projects = [\n {\n repo: {\n owner: 'yourbitbucketusername',\n slug: 'your-bitbu...
javascript
edit
0
0
mit
bcad6341b9d6bf85712de73bbe8e19990d174633
mplewis/statichook
sampleConfig.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nangular.module('h54sNavbar', ['sasAdapter', 'h54sDebugWindow'])\n\n.controller('NavbarCtrl', ['$scope', 'sasAdapter', '$rootScope', '$sce', function($scope, sasAdapter, $rootScope, $sce) {\n $scope.openDebugWindow = function() {\n $...
javascript
edit
0
1
mit
7e5e14847e2232fd89e2dcd18cce2c16b05e88fc
Boemska/sas-hot-editor,Boemska/sas-hot-editor
app/navbar/navbar.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar CurrentAppID,\n\tGetCurrentAppID = function()\n\t{\n\t\tif( !CurrentAppID )\n\t\t{\n\t\t\tCurrentAppID = location.pathname.match( /\\/([0-9]{1,6})(?:\\/|$)/ );\n\t\t\t\n\t\t\tif( CurrentAppID )\n\t\t\t{\n\t\t\t\tCur...
javascript
edit
0
4
bsd-3-clause
c8d5aeca835d8ddd53c8026620561f6568d29041
GoeGaming/SteamDatabase,i3ongmeester/SteamDatabase,GoeGaming/SteamDatabase,SteamDatabase/SteamDatabase,SteamDatabase/SteamDatabase,i3ongmeester/SteamDatabase,i3ongmeester/SteamDatabase,GoeGaming/SteamDatabase,SteamDatabase/SteamDatabase
BrowserExtension/scripts/steamdb.js
rejected_duplicate
Near-duplicate of sample 89064
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar Db = require('dbjs')\n , relation = module.exports = require('dbjs/lib/_relation');\n\nrequire('./base');\n\nrelation.set('toDOMInputBox', function (document/*, options*/) {\n\tvar box, options = arguments[1]...
javascript
edit
0
4
mit
a72cc8137b0159b1d0246eb0e5aecf338cbd19f0
medikoo/dbjs-dom
input/_relation.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar React = require('react-native');\n\nvar {\n Animated,\n Easing,\n StyleSheet,\n View\n} = React;\n\nvar styles = StyleSheet.create({\n background: {\n backgroundColor: '#bbbbbb',\n height: 5,\n overflow: 'hidden'\n },...
javascript
edit
0
3
mit
221f6da58e1190b97ab3c6310d3e9b699e512ea0
lwansbrough/react-native-progress-bar
ProgressBar.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\ndescribe (\"Read book data\",function(){\n\n\tit(\"assert JSON file is not empty\",function(){\n\t\tvar isNotEmpty = function IsJsonString(filePath) {\n \t\ttry {\n \t\tJSON.parse(filePath);\n \t\t} catch (e) {\n \t\...
javascript
edit
0
2
mit
5b6f3ac716e37b9d03bff3da826dca24826b24eb
andela-pbirir/inverted-index,andela-pbirir/inverted-index
jasmine/spec/inverted-index-test.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * Global Navigation Handler\n */\nAlloy.Globals.Navigator = {\n\t\n\t/**\n\t * Handle to the Navigation Controller\n\t */\n\tnavGroup: $.nav,\n\t\n\topen: function(controller, payload){\n\t\tvar win = Alloy.createController(contro...
javascript
edit
0
5
apache-2.0
1a4c8c303dcfa0e9a49ff554ba540da638a8a6ab
egregori/HADA,egregori/HADA
app/controllers/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst dotenv = require('dotenv');\ndotenv.config({silent: true});\nconst config = {\n \"development\": {\n \"username\": process.env.DB_DEV_USER,\n \"password\": process.env.DB_DEV_PASS,\n \"database\": process.env.DB_DEV_NAME...
javascript
edit
0
0
mit
94701f09422ed9536463afc7dc2e48463af2301e
cyrielo/document-manager
app/config/config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * require dependencies\n */\nWebdriverIO = require('webdriverio');\nWebdriverCSS = require('../index.js');\nfs = require('fs-extra');\ngm = require('gm');\nglob = require('glob');\nasync = require('async');\nshould = require('ch...
javascript
edit
0
1
mit
fab2943412258c0a55c7d127cc67798f30587551
JustinTulloss/webdrivercss,JustinTulloss/webdrivercss
test/bootstrap.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst mapbox_token = 'pk.eyJ1IjoiaG90IiwiYSI6ImNpbmx4bWN6ajAwYTd3OW0ycjh3bTZvc3QifQ.KtikS4sFO95Jm8nyiOR4gQ'\n\nexport default {\n 'vt-source': 'http://osm-analytics.vizzuality.com', // source of current vector tiles\n 'vt-hist-source'...
javascript
edit
0
0
bsd-3-clause
7f45b377171d4cffb3f83602b4a6f4025a58ac11
hotosm/osm-analytics,hotosm/osm-analytics,hotosm/osm-analytics
app/settings/settings.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function (<bridge>) {\n // unsafeWindow\n with ({ unsafeWindow: window, document: window.document, location: window.location, window: undefined }) {\n // define GM functions\n var GM_log = function (s) {\n ...
javascript
edit
null
null
mit
86ae144cccd8cdca5125acc66319e7194640970d
torezzz/greasekit
template.js
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Axios from 'axios';\nimport {\n PROVIDER_CHANGE,\n FILTER_BOARD, FILTER_THREAD,\n SERACH_BOARD, SEARCH_THREAD,\n STATUS_UPDATE\n} from '../constants';\n// TODO: Filter + Search actions\n\nexport function changeProvide...
javascript
edit
0
2
mit
3a0a5f2f9e2b2ba62da6013ba238c3783039c71c
AdamSalma/Lurka,AdamSalma/Lurka
src/client/actions/StatusActions.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport BabelRootImportPlugin from '../plugin';\nimport * as babel from 'babel-core';\n\ndescribe('Babel Root Import - Plugin', () => {\n describe('Babel Plugin', () => {\n it('transforms the relative path into an absolute path', () ...
javascript
edit
0
1
mit
86d8c0168182a23b75bdd62135231b9292b881af
michaelzoidl/babel-root-import,Quadric/babel-plugin-inline-import
test/plugin.spec.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// @flow\n\nimport React, {Component} from 'react'\nimport resolveRoot from '../../desktop/resolve-root'\nimport type {Props} from './avatar'\n\nconst noAvatar = `file:///${resolveRoot('shared/images/<EMAIL>')}`\n\nexport default class ...
javascript
edit
null
null
bsd-3-clause
f9221c7e28915de2fd3f253c78c1f7f24e960937
keybase/client,keybase/client,keybase/client,keybase/client,keybase/client,keybase/client,keybase/client,keybase/client,keybase/client,keybase/client,keybase/client,keybase/client
shared/common-adapters/avatar.desktop.js
rejected_syntax
Syntax error detected by tree-sitter
false