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": "Write javascript code for the following: Fix error \"connection error to wss://tracker.webtorrent.io?1fe16837ed\"" }, { "role": "assistant", "content": "global.WRTC = require('wrtc')\nglobal.WEBTORRENT_ANNOUNCE = [ 'wss://tracker.webtorrent.io/' ]\n" } ]
javascript
new_file
0
0
mit
5cf5083c97d2189a75c1124581c40c30cf3921dc
feross/webtorrent-hybrid,yciabaud/webtorrent-hybrid,feross/webtorrent-hybrid
lib/global.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*jshint node: true */\n\nvar Promise = require(\"bluebird\");\nvar fs = require(\"fs\");\n\n\n\n\n\n/**\n * Maps file paths to their contents. Filled in by readTemplate() if the\n * disableCache argument is not set to true.\n */\nvar c...
javascript
edit
0
4
mit
06309a28546f22db3ada5c67a363e7062914c701
JangoBrick/teval,JangoBrick/teval
lib/loader.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nangular\n .module('fitnessTracker', ['ui.router', 'templates', 'Devise'])\n .config(function($stateProvider, $urlRouterProvider) {\n $stateProvider\n .state('signup', {\n url: '/signup',\n templateUrl: ...
javascript
edit
0
1
mit
751c2642026e2e6aabd62e1661d7ee01dfb82b4c
viparthasarathy/fitness-tracker,viparthasarathy/fitness-tracker,viparthasarathy/fitness-tracker
app/assets/javascripts/app.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar Assert = require('test/assert').Assert\n , bindMethods = require('es5-ext/lib/Object/bind-methods').call\n , merge = require('es5-ext/lib/Object/plain/merge').call\n\n , never, neverBind;\n\nnever = function (me...
javascript
edit
0
1
isc
b90abb59cc56d6ec0f0adf381e73f4901d5cfbee
medikoo/tad
lib/assert.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar updatePreviewTarget = function(data, status) {\n $('.spinner').hide();\n $('#preview-target').html(data);\n renderLatexExpressions();\n}\n\nvar renderLatexExpressions = function() {\n $('.latex-container').each(\n function(in...
javascript
edit
0
1
mit
96e722264b46887d4127cf23d3e472783fba777e
erettsegik/erettsegik.hu,erettsegik/erettsegik.hu,erettsegik/erettsegik.hu
js/main.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react'\n\nimport { Project } from './Project'\n\nconst Projects = ({ projects = [], feature }) => {\n if (!projects.length) return null\n\n const featuredProjects = projects.filter((project) => project.feature)\n c...
javascript
edit
0
3
mit
f070ba58f9d8fe367284a9c82fd9e8ec75829584
dtjv/dtjv.github.io
src/components/Projects.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React, { Component } from 'react';\nimport style from './style';\nimport CommentItem from '../CommentItem';\n\nexport default class CommentList extends Component {\n componentDidMount() {\n this.wrapper.scrollTop = this.wrapp...
javascript
edit
0
2
mit
db55033e85b3c87ba45b1d5fdb28120cbc526208
kadirahq/react-storybook,nfl/react-storybook,shilman/storybook,storybooks/storybook,storybooks/storybook,storybooks/react-storybook,storybooks/storybook,jribeiro/storybook,enjoylife/storybook,storybooks/storybook,rhalff/storybook,rhalff/storybook,rhalff/storybook,bigassdragon/storybook,jribeiro/storybook,storybooks/sto...
src/manager/components/CommentList/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar request = require('supertest');\nvar assert = require('assert');\nvar storageFactory = require('../lib/storage/storage-factory');\n\nvar storage = storageFactory.getStorageInstance('test');\nvar app = require('../webserver/app')(sto...
javascript
edit
0
2
mit
42af1e835e8ffd80e6772a8dc7694ad81b425dc5
corinis/watchmen,corinis/watchmen,ravi/watchmen,iloire/WatchMen,Cellington1/Status,iloire/WatchMen,Cellington1/Status,iloire/WatchMen,Cellington1/Status,NotyIm/WatchMen,ravi/watchmen,corinis/watchmen,NotyIm/WatchMen,NotyIm/WatchMen,plyo/watchmen,plyo/watchmen,labianchin/WatchMen,labianchin/WatchMen,ravi/watchmen,labian...
test/test-api-ping-plugins-route.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nPackage.describe({\n name: \"practicalmeteor:loglevel\",\n summary: \"Simple logger with app and per-package log levels and line number preserving output.\",\n version: \"1.2.0_2\",\n git: \"https://github.com/practicalmeteor/meteor...
javascript
edit
0
1
mit
81a144daaf912e9e9692f558b1ce0fb521575db1
practicalmeteor/meteor-loglevel,solderzzc/meteor-loglevel
package.js
rejected_duplicate
Near-duplicate of sample 69170
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n$(function() {\n\tyourCollection = new Models.ItemListings();\n\tfriendCollection = new Models.ItemListings();\n\tfeaturedCollection = new Models.ItemListings();\n\tpublicCollection = new Models.ItemListings();\n\n\tyourView = new Views...
javascript
edit
0
1
mit
0f874d8c12778c07c93526a84a8e0a43d4d27e3b
burnflare/CrowdBuy,burnflare/CrowdBuy
js/main.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst { detectPackageFiles } = require('../../../../manager');\nconst { createOnboardingBranch } = require('./create');\nconst { rebaseOnboardingBranch } = require('./rebase');\nconst { isOnboarded, onboardingPrExists } = require('./che...
javascript
edit
0
6
mit
d0d62e6e7bcf78e7955ac693b36084d3dc94b725
singapore/renovate,singapore/renovate,singapore/renovate
lib/workers/repository/onboarding/branch/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nMathJax.Hub.Config({\n \"tex2jax\": {\n inlineMath: [['$','$'], ['\\\\(','\\\\)']],\n processEscapes: true\n }\n});\nMathJax.Hub.Config({\n config: [\"MMLorHTML.js\"],\n jax: [\"input/TeX\", \"output/HTML-CSS\", \"output/Nativ...
javascript
edit
0
0
mit
e1693cbc3e8f27a15109e128d17b675845f16166
mortenpi/Documenter.jl,MichaelHatherly/Documenter.jl,MichaelHatherly/Lapidary.jl,JuliaDocs/Documenter.jl
assets/mathjaxhelper.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar path = require(\"path\");\nvar devBundleDir = path.resolve(__dirname, \"..\", \"..\", \"dev_bundle\");\nvar binDir = path.join(devBundleDir, \"bin\");\n\nexports.getCommandPath = function (command) {\n return path.join(binDir, comm...
javascript
edit
0
6
mit
fdce895bbaa4c08431d173edd286cb9b6670f2c2
Hansoft/meteor,Hansoft/meteor,4commerce-technologies-AG/meteor,jdivy/meteor,mjmasn/meteor,Hansoft/meteor,4commerce-technologies-AG/meteor,chasertech/meteor,chasertech/meteor,4commerce-technologies-AG/meteor,chasertech/meteor,chasertech/meteor,4commerce-technologies-AG/meteor,Hansoft/meteor,4commerce-technologies-AG/met...
tools/cli/dev-bundle-bin-helpers.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport defaults from 'defaults'\n\nconst API_GLOBAL = '_IMDIKATOR'\n\nconst env = process.env.NODE_ENV || 'development'\n\nconst DEFAULTS = {\n port: 3000,\n reduxDevTools: false\n}\n\nconst globalConfig = (typeof window !== 'undefine...
javascript
edit
0
0
mit
2aed51e0cddadbf600421ae56587a2b1fceb6198
bengler/imdikator,bengler/imdikator
config/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar set = Ember.set;\n\nEmber.onLoad('Ember.Application', function(Application) {\n Application.registerInjection({\n name: \"store\",\n before: \"controllers\",\n\n injection: function(app, stateManager, property) {\n if...
javascript
edit
0
4
mit
2c1660c07e516d96dbdf8000a766fd6b63f3ef73
BookingSync/data,EmberSherpa/data,Eric-Guo/data,funtusov/data,sebastianseilund/data,topaxi/data,courajs/data,tarzan/data,sammcgrail/data,Turbo87/ember-data,kimroen/data,courajs/data,greyhwndz/data,sebastianseilund/data,gniquil/data,hibariya/data,Robdel12/data,fpauser/data,lostinpatterns/data,yaymukund/data,gabriel-leta...
packages/ember-data/lib/system/application_ext.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// Aurelia\nimport {\n bindable,\n bindingMode\n} from 'aurelia-framework';\n\nimport icons from 'configs/icons';\n\nexport class SvgIcon {\n @bindable({ defaultBindingMode: bindingMode.oneWay }) iconId;\n\n attached () {\n const...
javascript
edit
0
2
mit
26d55a74b3f302f3803f8e87d05866bab81cb5ed
flekschas/hipiler,flekschas/hipiler,flekschas/hipiler
src/components/svg-icon/svg-icon.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\ndescribe('home page', () => {\n before(() => {\n cy.visit('/')\n })\n\n it('content', () => {\n cy.get('.dashboard-section__info-feed-date').hideElement()\n cy.get('.grid-row').compareSnapshot('homePageContent')\n })\n\n i...
javascript
edit
0
1
mit
7e6697514f6f2596ebcc9227c730effc72783c06
uktrade/data-hub-fe-beta2,uktrade/data-hub-fe-beta2,uktrade/data-hub-frontend,uktrade/data-hub-frontend,uktrade/data-hub-frontend
test/visual/cypress/specs/home-page-spec.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// ==UserScript==\n// @name EPFL People\n// @namespace none\n// @description A script to improve browsing on people.epfl.ch\n// @include http://people.epfl.ch/*\n// @version 1\n// @grant none\n// @require http...
javascript
edit
0
1
unlicense
62b43e17c7f22f339b9d0e84792a63dbcaf6d83c
epfl-dojo/EPFL_People_UserScript
EPFL_People.user.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar cfg = require('../app-config').config;\n\n//\n// Controller\n//\n\nvar AboutCtrl = function($scope) {\n\n $scope.state.about = {\n toggle: function(to) {\n $scope.state.lightbox = (to) ? 'about'...
javascript
edit
0
2
mit
c85b6344fcaaa605fb5aa58de659a0e5e042d1e3
whiteout-io/mail-html5,kalatestimine/mail-html5,halitalf/mail-html5,sheafferusa/mail-html5,whiteout-io/mail,b-deng/mail-html5,dopry/mail-html5,dopry/mail-html5,kalatestimine/mail-html5,clochix/mail-html5,tanx/hoodiecrow,dopry/mail-html5,b-deng/mail-html5,whiteout-io/mail,dopry/mail-html5,halitalf/mail-html5,halitalf/ma...
src/js/controller/about.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar app = require('app');\nvar BrowserWindow = require('browser-window');\nvar glob = require('glob');\n\nvar mainWindow = null;\n\n// Require and setup each JS file in the main-process dir\nglob('main-process/**/*.js', function (error,...
javascript
edit
0
2
mit
b36005ed996391dbf9502aaffbed6e0fc1297d28
PanCheng111/XDF_Personal_Analysis,electron/electron-api-demos,electron/electron-api-demos,electron/electron-api-demos,blep/electron-api-demos,blep/electron-api-demos,blep/electron-api-demos,blep/electron-api-demos,PanCheng111/XDF_Personal_Analysis,PanCheng111/XDF_Personal_Analysis
main.js
accepted
null
true
[ { "role": "user", "content": "Write javascript code for the following: Make sure Canvas is supported on the browser" }, { "role": "assistant", "content": "// Init the app after page loaded.\nwindow.onload = initPage;\n\n// The entry function.\nfunction initPage() {\n if (!canvasSupport()) { // ...
javascript
new_file
0
2
mit
9f5a15819d2f6503f33e5b27b0d30be239e5e72a
rainyjune/canvas-guesstheletter,rainyjune/canvas-guesstheletter
main.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// Do not delete or move this file.\n// Many fiddles reference it so we have to keep it here.\n(function() {\n var tag = document.querySelector(\n 'script[type=\"application/javascript;version=1.7\"]'\n );\n if (!tag || tag.textCo...
javascript
edit
0
3
mit
5cb17c421ddbb9cc6ddf46b22db5255042c6f7d8
apaatsio/react,pyitphyoaung/react,maxschmeling/react,krasimir/react,billfeller/react,empyrical/react,yangshun/react,ericyang321/react,aickin/react,brigand/react,jdlehman/react,VioletLife/react,mjackson/react,jorrit/react,mhhegazy/react,camsong/react,pyitphyoaung/react,pyitphyoaung/react,Simek/react,jzmq/react,acdlite/r...
www/static/js/jsfiddle-integration-babel.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* eslint-disable */\nconst path = require('path');\nconst webpack = require('webpack');\n\nconst makeConfig = require('./config.base');\n\n\n// The app/ dir\nconst app_root = path.resolve(__dirname, '..');\nconst filenameTemplate = 'we...
javascript
edit
0
0
isc
b77e8e11e199428578ca8074a6367d9c740d1182
thorgate/django-project-template,thorgate/django-project-template,thorgate/django-project-template,thorgate/django-project-template,thorgate/django-project-template
{{cookiecutter.repo_name}}/webapp/webapp/webpack/config.dev.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function() {\n let height = 15,\n block = '#',\n space = ' ';\n\n if (height<2 || height>12) {\n return console.log('Error! Height must be >= 2 and <= 12');\n }\n\n for (let i = 0; i < height; i++) {\n ...
javascript
edit
0
4
mit
7d961ab16ca4db0bd91419cdfed8bb7f873ab36b
MastersAcademy/js-course-2017,MastersAcademy/js-course-2017,MastersAcademy/js-course-2017
homeworks/dmitry.minchenko_wer1Kua/homework_2/script.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar dir = require('node-dir');\n\ndir.readFiles(__dirname, {\n exclude: ['LICENSE', '.gitignore', '.DS_Store'],\n excludeDir: ['node_modules', '.git']\n }, function(err, content, next) {\n if (err) throw err;\n ...
javascript
edit
0
4
mit
0a4d8a5b194a5c636b0aa6225dadd2ab9ff7e150
DevOps-HeadBangers/target-project-node
parseFiles.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst jsonMask = require('json-mask')\n\nconst badCode = code => code >= 300 || code < 200\n\nmodule.exports = function (opt) {\n opt = opt || {}\n\n function partialResponse(obj, fields) {\n if (!fields) return obj\n return jso...
javascript
edit
0
8
mit
53fd5fdf4afa38fd732728c283e9bc2277b7a5cb
nemtsov/express-partial-response
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function () {\n Meteor.loginWithMeetup = function (options, callback) {\n // support both (options, callback) and (callback).\n if (!callback && typeof options === 'function') {\n callback = options;\n options = {};\n ...
javascript
edit
0
6
mit
429aa690a42e8f0f9282ca4a63bff052e45ea25e
aldeed/meteor,sunny-g/meteor,pjump/meteor,shmiko/meteor,esteedqueen/meteor,wmkcc/meteor,framewr/meteor,Profab/meteor,ndarilek/meteor,steedos/meteor,allanalexandre/meteor,daltonrenaldo/meteor,Jonekee/meteor,vjau/meteor,Jeremy017/meteor,devgrok/meteor,jdivy/meteor,allanalexandre/meteor,Prithvi-A/meteor,joannekoong/meteor...
packages/accounts-meetup/meetup_client.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* jshint node: true */\n'use strict';\n\n// var path = require('path');\n\nmodule.exports = {\n name: 'ember-power-select',\n contentFor: function(type, config) {\n if (config.environment !== 'test' && type === 'body-footer') {\n ...
javascript
edit
0
3
mit
7b50be2427d450460b9b8c8ae8be6c81743bbf48
cibernox/ember-power-select,esbanarango/ember-power-select,chrisgame/ember-power-select,esbanarango/ember-power-select,cibernox/ember-power-select,Dremora/ember-power-select,chrisgame/ember-power-select,cibernox/ember-power-select,Dremora/ember-power-select,cibernox/ember-power-select,esbanarango/ember-power-select
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * Created by tshen on 16/7/15.\n */\n'use strict'\n\nimport {NativeModules} from 'react-native';\nconst NativeSimpleFetch = NativeModules.SimpleFetch;\n\nconst fetch = function (url, options) {\n const params = {\n url: ...
javascript
edit
0
3
mit
4cfecfa2d4734c968ca6d3d1b65ec7e720f63081
liaoyuan-io/react-native-simple-fetch
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar elixir = require('laravel-elixir');\nvar gulp = require('gulp');\nvar imagemin = require('gulp-imagemin');\nvar pngquant = require('imagemin-pngquant');\nvar notify = require('gulp-notify');\nvar _ = require('underscore');\nvar util...
javascript
edit
0
2
mit
5317b7fb100af66af865bcd82ed32c2dc3a1643c
waldemarfm/laravel-elixir-imagemin,nathanmac/laravel-elixir-imagemin
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nangular.module('materialscommons').component('mcExperimentNotes', {\n templateUrl: 'app/project/experiments/experiment/components/notes/mc-experiment-notes.html',\n bindings: {\n experiment: '='\n }\n});\n\n```\n\nApply ...
javascript
edit
0
1
mit
2db0ace0ed6dd9c869ace773dc2b0aaf03a39a49
materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org
website/src/app/project/experiments/experiment/components/notes/mc-experiment-notes.component.js
rejected_duplicate
Near-duplicate of sample 89973
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst vm = require('vm')\n\nmodule.exports = class Guards {\n constructor () {\n this.guardRegex = /[^=<>!']=[^=]/\n\n this.templateRegex = /[^|]\\|[^|]/\n\n this.optionsVM = {\n displayErrors: true,\n filename: 'gua...
javascript
edit
0
1
mit
a91e08c79733eac0ff55f16840bbefc39adb6aa8
yamafaktory/pattern-guard
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * Add shim config for configuring the dependencies and exports for\n * older, traditional \"browser globals\" scripts that do not use define()\n * to declare the dependencies and set a module value.\n */\n(function(seajs, global) ...
javascript
edit
0
3
mit
a3fd89525c5eb04e8bdcc5289fbe1e907d038821
moccen/seajs,Lyfme/seajs,coolyhx/seajs,zaoli/seajs,baiduoduo/seajs,twoubt/seajs,tonny-zhang/seajs,mosoft521/seajs,wenber/seajs,miusuncle/seajs,yern/seajs,Gatsbyy/seajs,imcys/seajs,angelLYK/seajs,kuier/seajs,MrZhengliang/seajs,twoubt/seajs,JeffLi1993/seajs,lianggaolin/seajs,yern/seajs,uestcNaldo/seajs,121595113/seajs,ue...
src/plugins/plugin-shim.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar extend = require('extend');\nvar express = require('express');\nvar bodyParser = require('body-parser');\n\nvar router = express.Router();\nvar defaults = {\n loginEndpoint: '/login',\n logoutEndpoint: '/logout',\...
javascript
edit
0
5
isc
e3a2c979b160201b53cb38660733f495be2b449a
knownasilya/just-auth
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n;(_ => {\n 'use strict';\n var tagContent = 'router2-content';\n\n function matchHash() {\n var containers = document.querySelectorAll(`${tagContent}:not([hidden])`);\n var container;\n for (var i = 0; i < containers.length;...
javascript
edit
0
9
isc
d54150b9a86c3cc0a08376e3b1cf9c223a7c0096
m3co/router3,m3co/router3
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\nvar server = require('./lib/server/')();\nvar config = require('config');\n\nfunction ngrokIsAvailable() {\n try {\n require.resolve('ngrok');\n return true;\n } catch (e) {\n return false;\n }\n}\n\nif (confi...
javascript
edit
0
3
mit
4840f0296869dc9e78856cf577d766e3ce3ccabe
syjulian/Frontier,codeforhuntsville/Frontier
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\nrequire('whatwg-fetch');\n\nconst path = require('path'),\n querystring = require('querystring').parse;\n\nconst registry = 'http://npm-registry.herokuapp.com';\n\n\nconst query = querystring(window.location.search.s...
javascript
edit
0
1
mit
8aca8785d53d7c0568020a128df8e4fcb7865d2b
npmdocs/www
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar find = require('reactor/find'),\n serializer = require('./serializer'),\n url = require('url');\n\nfunction say () {\n var all = [].slice.call(arguments),\n filtered = all.filter(function (argument) { return argument !==...
javascript
edit
0
2
mit
349a44df9340accdccbf829317dce9e359442e8c
bigeasy/stencil,bigeasy/stencil,bigeasy/stencil
service.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar Promise = require('bluebird');\nvar mapObj = require('map-obj');\nvar assign = require('object-assign');\n\nfunction FileWebpackPlugin(files) {\n this.files = files || {};\n}\n\nFileWebpackPlugin.prototype.apply = function(compiler...
javascript
edit
0
2
mit
1d0bbe6b09e8c2beeb4cf4cb9c9c20944f194275
markdalgleish/file-webpack-plugin
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport electron from 'electron';\nimport path from 'path';\n\nimport Menu from './remote/Menu';\n\nimport config from './config';\n\nconst app = electron.app;\n\n// Report crashes to our server.\n// electron.CrashReporter.start();\n\n//...
javascript
edit
0
2
mit
5570a14c93b71af910e89fc4f2a6f8d7435451ed
exponentjs/xde,exponentjs/xde
src/main.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport App from './App';\nimport config from './config';\n\nvar mountNode = document.getElementById('main');\n\nReact.render(<App config={config.params} />, mountNode);\n```\n\nApply this change: Use glob...
javascript
edit
0
0
apache-2.0
5afa8d8796312b693964d133e626f23f3ba3a67c
naltaki/naltaki-front,naltaki/naltaki-front
src/main.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst apiPutMqttMessage = {\n schema: {\n summary: 'Retrieve a list of all keys present in the specified namespace.',\n description: '',\n body: {\n type: 'object',\n properties: {\n ...
javascript
edit
0
0
mit
a84c9a76cbb4b65bf6c8a4f3483025a509bfab76
mountaindude/butler
src/api/mqttPublishMessage.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Web3 from 'web3';\n\nconst web3 = new Web3();\n\nexport default web3;\n\nexport const initWeb3 = (web3) => {\n if (window.web3) {\n web3.setProvider(window.web3.currentProvider);\n } else {\n web3.setProvider(new Web3.pro...
javascript
edit
0
2
mit
ff95f103ac755324d36b4d3a60a61ad8014e9ce9
nanexcool/feeds,nanexcool/feeds
src/web3.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nfunction Scratch3MotionBlocks(runtime) {\n /**\n * The runtime instantiating this block package.\n * @type {Runtime}\n */\n this.runtime = runtime;\n}\n\n/**\n * Retrieve the block primitives implemented by this packag...
javascript
edit
0
1
bsd-3-clause
42f0f66acdef27a58599d59f72c6b8ae784975ab
TheBrokenRail/scratch-vm,LLK/scratch-vm,LLK/scratch-vm,LLK/scratch-vm,TheBrokenRail/scratch-vm
src/blocks/scratch3_motion.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport css from './Breadcrumbs.css';\n\nconst propTypes = {\n links: React.PropTypes.array,\n};\n\nfunction Breadcrumbs(props) {\n const links = props.links.map((link, i) => {\n const linkElem = <li key=...
javascript
edit
0
2
apache-2.0
ba64925e6c6b07b42f8a28b9a141e1ada42c3550
folio-org/stripes-core,folio-org/stripes-core,folio-org/stripes-core
src/components/MainNav/Breadcrumbs/Breadcrumbs.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n//makes the bdd interface available (describe, it before, after, etc\nif(Meteor.settings.public.mocha_setup_args) {\n mocha.setup(Meteor.settings.public.mocha_setup_args);\n} else {\n mocha.setup(\"bdd\");\n}\n\n```\n\nApply this ...
javascript
edit
0
0
mit
d3296125920a838a56c68ca2da1e9f9b4216bc03
kelbongoo/meteor-mocha-web,abernix/meteor-mocha-web,mad-eye/meteor-mocha-web,mad-eye/meteor-mocha-web,kelbongoo/meteor-mocha-web,abernix/meteor-mocha-web
preTest.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nconst hookModule = require(\"../src/\");\nclass TallyHook extends hookModule.Hook {\n\n preProcess(thing) {\n thing.preTally = thing.preTally + 1;\n return true;\n }\n\n postProcess(thing) {\n thing.postTall...
javascript
edit
0
2
mit
470c616cf598fb14842d8326d6fe416952b79d8a
StevenBlack/hooks-and-anchors
test/common.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar test = require(\"tape\")\n\nvar crypto = require('crypto')\nvar cryptoB = require('../')\nvar assert = require('assert')\n\nfunction assertSame (fn) {\n test(fn.name, function (t) {\n fn(crypto, function (err, expected) {\n ...
javascript
edit
0
1
mit
e49fd692e1281f91164d216708befd81a1a3c102
crypto-browserify/crypto-browserify,crypto-browserify/crypto-browserify
test/simple.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst hexWidth = 50;\nconst hexPadding = 2;\n\nexport default ({ width, height, columns, rows, renderSector }) => {\n const hexWidthUnit = hexWidth / 4;\n const hexHeight = (Math.sqrt(3) / 2) * hexWidth;\n const hexHeightUnit = hexHe...
javascript
edit
0
2
mit
4da17d2e30b07b73de2a5d7b548ca8ed4b9bc4f2
mpigsley/sectors-without-number,mpigsley/sectors-without-number
src/utils/hex-generator.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * This script keeps the height set on elements with regard to their\n * width for a given aspect ratio. Great for \"display:block\" elements\n *\n * Example usage:\n *\n * <div data-keep-aspect-ratio=\"16:9\">\n *\n * Author: Rod ...
javascript
edit
0
1
bsd-3-clause
31663486624635748d6f2202504b0a187a102fcd
jerv13/RcmPlugins,jerv13/RcmPlugins,bjanish/RcmPlugins,jerv13/RcmPlugins,innaDa/RcmPlugins,innaDa/RcmPlugins,innaDa/RcmPlugins,bjanish/RcmPlugins,bjanish/RcmPlugins
RcmBrightCoveLib/public/keep-aspect-ratio.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * @author Titus Wormer\n * @copyright 2015 Titus Wormer\n * @license MIT\n * @module mdast:cli:log\n * @fileoverview Log a file context on successful completion.\n */\n\n'use strict';\n\n/*\n * Dependencies.\n */\n\nvar report = r...
javascript
edit
0
2
mit
daed42ff845baa2abf1e0fd180d7fb0eb2a13b3d
ulrikaugustsson/mdast,eush77/remark,chcokr/mdast,ulrikaugustsson/mdast,yukkurisinai/mdast,tanzania82/remarks,yukkurisinai/mdast,wooorm/remark,chcokr/mdast,eush77/remark
lib/cli/file-set-pipeline/log.js
rejected_duplicate
Near-duplicate of sample 68701
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React, { Component, PropTypes } from 'react';\n\nrequire('./slide.scss');\n\nclass Slide extends Component {\n render() {\n return (\n <div className=\"slide\">\n <header className=\"slide__hea...
javascript
edit
0
2
mit
62b292ddf6a6fb71097c5cfa527b625366c46a3f
leadiv/react-slides,leadiv/react-slides
src/components/slide/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*\n * This file is part of the Sylius package.\n *\n * (c) Paweł Jędrzejewski\n *\n * For the full copyright and license information, please view the LICENSE\n * file that was distributed with this source code.\n */\n\n(function ( $ ) ...
javascript
edit
0
1
mit
c57a584a3bc781db629ae15dd2912f62992f98f3
Sylius/SyliusUiBundle,Sylius/SyliusUiBundle
Resources/private/js/sylius-auto-complete.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* @flow */\n\nexport const inMemory = (data : Object, transition : Function) => {\n let rootState = data;\n const read = () => rootState;\n const write = (fn : Function) => {\n const oldState = read();\n const newState = fn(ol...
javascript
edit
null
null
mit
f0e7098f88d7ceeae02ba60bb484f4cfa266bce7
jameshopkins/atom-store,jameshopkins/atom-store
src/plugins.js
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { action, computed } from 'mobx'\nimport { moveTabs, tabComparator } from '../libs'\n\nexport default class ArrangeStore {\n constructor (store) {\n this.store = store\n }\n\n @computed\n get urlTabMap () {\n return thi...
javascript
edit
0
2
mit
38c8a46baee9cd61571cf26ba9c3942a98f3ce92
xcv58/Tab-Manager-v2,xcv58/Tab-Manager-v2,xcv58/Tab-Manager-v2,xcv58/Tab-Manager-v2
src/js/stores/ArrangeStore.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// ===================================================\n// DOM Outline with event handlers\n// ===================================================\n$(function(){\n var $selector_box = $(\"#selector\");\n var selector_val = \"\";\n...
javascript
edit
0
1
mit
a7f6773184b6a08d6fcc62ed82e331e114f731b8
joequery/JSON-Selector-Generator,joequery/JSON-Selector-Generator,joequery/JSON-Selector-Generator
static/js/json_selector.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport theme from 'react/styles/theme';\nimport GenericButton from 'react/components/UI/GenericButton';\nimport styled from 'styled-components';\n\nconst CTAButton = styled(GenericButton).attrs({\n f: 6,\n})`\n margin-top: ${theme.spa...
javascript
edit
0
0
mit
821c2eb8303bee9897c130f98731295736d5c54a
aredotna/ervell,aredotna/ervell,aredotna/ervell,aredotna/ervell,aredotna/ervell
react/components/Onboarding/components/UI/CTAButton/index.js
rejected_duplicate
Near-duplicate of sample 72577
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { makeGetSet } from '../moment/get-set';\nimport { addFormatToken } from '../format/format';\nimport { addUnitAlias } from './aliases';\nimport { addUnitPriority } from './priorities';\nimport { addRegexToken, match1to2, match2 }...
javascript
edit
0
3
mit
07bffcd4d825b86dbd3386c2f3866f770671c6cb
PKRoma/moment,Oire/moment,julionc/moment,OtkurBiz/moment,ze-pequeno/moment,julionc/moment,OtkurBiz/moment,moment/moment,joelmheim/moment,xkxx/moment,monoblaine/moment,ze-pequeno/moment,moment/moment,Oire/moment,OtkurBiz/moment,xkxx/moment,monoblaine/moment,xkxx/moment,PKRoma/moment,joelmheim/moment,calebcauthon/moment,...
src/lib/units/day-of-month.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * Dependencies.\n */\n\nlet NullAnalytics = require('./NullAnalytics');\nlet Tracker = require('./Tracker');\n\n/**\n * Constants.\n */\n\nconst ANALYTICS_KEY = process.env.ANALYTICS_KEY;\n\n/**\n * Locals.\n */\n\nlet enableAnaly...
javascript
edit
0
0
isc
5afa1a697da48fb473d0e19fe6e5dbfc6913ca75
producthunt/producthunt-chrome-extension,producthunt/producthunt-chrome-extension
src/common/analytics/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// This route will save the given url into the database\n// returning its \"shorter\" version\nvar router = require('express').Router();\nvar isValid = require('valid-url').isWebUri;\n\nrouter.get('/http://:url', function(req, res) {\n ...
javascript
edit
0
2
mit
998601c34ba9537fa6230232379c1efad84e17bb
clobrano/fcc-url-shortener-microservice,clobrano/fcc-url-shortener-microservice
routes/new.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * React Static Boilerplate\n * https://github.com/kriasoft/react-static-boilerplate\n *\n * Copyright © 2015-present Kriasoft, LLC. All rights reserved.\n *\n * This source code is licensed under the MIT license found in the\n * L...
javascript
edit
0
1
mit
06b9ff1d0759d289ae70fbd9717cf8129e3485bc
raffidil/garnanain,koistya/react-static-boilerplate,jamesrf/weddingwebsite,kyoyadmoon/fuzzy-hw1,gadflying/profileSite,RyanGosden/react-poll,srossross-tableau/hackathon,kyoyadmoon/fuzzy-hw1,leo60228/HouseRuler,jamesrf/weddingwebsite,gadflying/profileSite,leo60228/HouseRuler,RyanGosden/react-poll,kriasoft/react-static-bo...
pages/home/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport assign from 'object-assign';\n\nimport { store } from './helpers';\n\nexport const MENU_SHOW = 'REACT_CONTEXTMENU_SHOW';\nexport const MENU_HIDE = 'REACT_CONTEXTMENU_HIDE';\n\n\nexport function dispatchGlobalEvent(eventName, opts...
javascript
edit
0
3
mit
92dfcaa6e03959bc6b88701d8f269c0e344bad76
codeart1st/react-contextmenu,vkbansal/react-contextmenu,vkbansal/react-contextmenu,codeart1st/react-contextmenu,danbovey/react-contextmenu,danbovey/react-contextmenu
src/actions.js
rejected_duplicate
Near-duplicate of sample 101409
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function($){\n $(function(){\n\n $('.button-collapse').sideNav();\n\n }); // end of document ready\n})(jQuery); // end of jQuery name space\n\n// Keep one tab expanded while editing profile\n$('li div.collapsible-header').on('clic...
javascript
edit
0
1
mit
8712432a2c9d555ecdbae0b9c549f6554dd9be6d
VoodooWorks/profile-cms,VoodooWorks/profile-cms,VoodooWorks/profile-cms
assets/materialize/js/init.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconsole.time('Starting server');\n\nrequire('promise-helpers');\nvar fs = require('fs');\nvar path = require('path');\nvar express = require('express');\nvar app = express();\n\n/**\n * Serve static files such as css, js, images\n */\na...
javascript
edit
0
2
mit
ede5962c9926c8a852ccbc307e3a970ede4d6954
LandRegistry/land-registry-elements,LandRegistry/land-registry-elements,LandRegistry/land-registry-elements,LandRegistry/land-registry-elements,LandRegistry/land-registry-elements
build/server.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\nimport { Col } from 'react-bootstrap';\n\nconst PTCustomCheckbox = ({ title, name, isChecked, disabled = false, onChange }) => {\n c...
javascript
edit
0
2
apache-2.0
4e7eaa000c897c36ed6cdbea6e5e53d49b2b2a76
PulseTile/PulseTile-React,PulseTile/PulseTile-React,PulseTile/PulseTile-React
src/components/pages/PatientsSummary/header/PTCustomCheckbox.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React, { PropTypes } from 'react';\nimport { StyleSheet, css } from 'aphrodite';\n\nconst styles = StyleSheet.create({\n node: {\n cursor: 'move',\n },\n});\n\nconst renderState = (state, index) => (\n <text key={state} x=\...
javascript
edit
0
1
mit
6505b754bc31ce4062d1a4c2eecc172636dbba64
fhelwanger/bayesjs-editor,fhelwanger/bayesjs-editor
src/components/Node.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport './App.css';\nimport logo from './logo.png';\n\nexport default function App() {\n return (\n <div>\n <h1>\n Welcome to\n <img src={logo} className=\"App--logo\" alt=\"React logo\...
javascript
edit
0
1
bsd-3-clause
ec5e284f43cd890a2d24f775f77f0fc5f3810dfc
emvu/create-react-app,HelpfulHuman/helpful-react-scripts,Timer/create-react-app,christiantinauer/create-react-app,yosharepoint/react-scripts-ts-sp,powerreviews/create-react-app,CodingZeal/create-react-app,lolaent/create-react-app,xiaohu-developer/create-react-app,HelpfulHuman/helpful-react-scripts,andyeskridge/create-r...
src/App.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\nimport Ember from 'ember'\nimport layout from './template'\nimport PropTypeMixin, { PropTypes } from 'ember-prop-types'\n\nconst { K } = Ember\n\nexport default Ember.Component.extend(PropTypeMixin, {\n layout,\n\n propTypes: {\n ...
javascript
edit
0
4
mit
bbf64c4d45fc83b5143951f79f2a9c25d757cd65
nucleartide/ember-outside-click,nucleartide/ember-outside-click
addon/components/outside-click/component.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\nvar fixedWidth = 220;\nvar minWidth = 660;\nvar fixedPadding = 100;\n\nfunction layoutWidth()\n{\n var wWidth = $(window).width();\n var bodyPadding = Math.max(Math.floor(wWidth / fixedWidth)-3, 1) * 100;\n if ($(\".container...
javascript
edit
0
3
mit
e96df96e13e47ab983fbdbcf58bd00ebd0ff9e5b
hernantas/MangaReader,hernantas/MangaReader,hernantas/MangaReader
public/js/layout.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nMeteor.startup(function () {\n Tiqs._ensureIndex({text: 1});\n});\n\nMeteor.methods({\n associateTags: function(text, tags) {\n Tiqs.upsert({text: text}, {$addToSet: {tags: {$each: tags}}});\n\n _.each(tags, function(tag) {\n ...
javascript
edit
0
1
mit
3fd410806d1f9cc2f922efde78539671306bd739
imiric/tiq-web,imiric/tiq-web
server/app.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport gravity from '../../lib/loaders/gravity';\nimport { GraphQLString, GraphQLBoolean } from 'graphql';\nimport { mutationWithClientMutationId } from 'graphql-relay';\nimport { artworkFields } from '../artwork/index';\n\nexport defau...
javascript
edit
0
3
mit
2f61e76a50034cd06611bf0086d57deeaf61a2dd
mzikherman/metaphysics-1,craigspaeth/metaphysics,artsy/metaphysics,craigspaeth/metaphysics,artsy/metaphysics,mzikherman/metaphysics-1,artsy/metaphysics,mzikherman/metaphysics-1,broskoski/metaphysics,mzikherman/metaphysics-1
schema/me/save_artwork.js
rejected_duplicate
Near-duplicate of sample 69722
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { Component } from '../../../src';\n\ndescribe('api/Component', () => {\n if (!classStaticsInheritance()) {\n return;\n }\n\n describe('property getters', () => {\n it('observedAttributes', () => {\n class Test exte...
javascript
edit
0
2
mit
9f26f41123b6fcda8ade34325161d8d433f4ec61
skatejs/skatejs,skatejs/skatejs,skatejs/skatejs,chrisdarroch/skatejs,chrisdarroch/skatejs
test/unit/api/component.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\ndescribe('pingPong', function() {\n it(\"is true for a number that is divisible by 3\", function() {\n expect(pingPong(6)).to.equal(true);\n });\n\n it(\"is true for a number that is divisible by 5\", function() {\n expect(ping...
javascript
edit
null
null
mit
ff2bb7a079a88eb9a60061de9f4481cee1141889
kcmdouglas/pingpong,kcmdouglas/pingpong
spec/specs.js
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst React = require('react')\nconst should = require('should')\nconst { shallow } = require('enzyme')\nconst { expect } = require('chai')\n\nimport DropdownAlert from '../DropdownAlert'\nimport {\n View,\n Text,\n StyleSheet,\n To...
javascript
edit
0
1
mit
27e1d21c375b16697c4ca4eef0f6c14193262797
testshallpass/react-native-dropdownalert,testshallpass/react-native-dropdownalert,shotozuro/react-native-dropdownalert,devBrian/react-native-dropdownalert,devBrian/react-native-dropdownalert,shotozuro/react-native-dropdownalert,shotozuro/react-native-dropdownalert,devBrian/react-native-dropdownalert,testshallpass/react...
test/DropdownAlert-test.js
rejected_duplicate
Near-duplicate of sample 79267
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar should = require('chai').should();\n\nvar LocationUtil = require('../src/location-util.js').LocationUtil;\n\n\ndescribe('#absUrl', function () {\n it('should get full URL', function () {\n var l = new LocationUtil('http://...
javascript
edit
0
1
mit
ea22ee1596e2f9d93ce01349f06a3c99143f21bb
moznion/location-util
test/absUrl.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar readFile = require( './../lib' );\n\n// Sync //\n\nvar file = readFile.sync( __filename, 'utf8' );\n// returns <string>\n\nconsole.log( file instanceof Error );\n// => false\n\nfile = readFile.sync( 'beepboop', {\n\...
javascript
edit
0
3
apache-2.0
cb04c26b0819fe742c80bc8f05ce3af3c32823e3
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/fs/read-file/examples/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * Check If Image Path Exists\n */\nvar http = require('http'),\n\turl = 'http://sirocco.accuweather.com/adc_images2/english/feature/400x300/worstwx.jpg'\n;\n\nhttp.get(url, function(response) {\n\tif (response.statusCode == '200')...
javascript
edit
0
2
apache-2.0
ef773f16dbaf0d2ef922f061d50fb1462c98036b
matthewspencer/worstweather
tests/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\n(function($) {\n\t$.entwine('ss', function($){\n\t\t$('.ss-gridfield-orderable tbody .handle').entwine({\n\t\t\tonmousedown: function () {\n\t\t\t\tthis.closest('tbody').addClass('ss-gridfield-sorting');\n\t\t\t},\n\t\t\tonmouseup: fu...
javascript
edit
0
3
mit
56efaa7f095ffef29decbb0942f37f24851b4847
heyday/silverstripe-dataobjectpreview,heyday/silverstripe-dataobjectpreview
js/DataObjectPreviewer.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport Hls from 'hls.js';\n\nconst propTypes = {\n src: PropTypes.string.isRequired,\n type: PropTypes.string,\n video: PropTypes.object,\n};\n\nexport d...
javascript
edit
0
2
mit
cadc76aaac836b8a13fd0c6da5b36b70d8c54ad7
video-react/video-react,video-react/video-react
example/examples/HLSSource.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport { Image } from 'react-bootstrap'\nimport CandidateCounter from './CandidateCounter'\n\nimport styles from './candidatethumbnail.css'\n\nexport default class CandidateThumbnail extends React.Component {...
javascript
edit
0
1
mit
995d2be6e56ba2b2f1b44e1e0f05c56d842da448
imrenagi/rojak-web-frontend,imrenagi/rojak-web-frontend
src/components/candidatethumbnail/CandidateThumbnail.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React, { Component } from 'react';\nimport { View } from 'react-native';\nimport RepoSearchBar from './components/RepoSearchBar';\nimport RepoSearchButton from './components/RepoSearchButton';\nimport RepoList from './components/...
javascript
edit
0
1
mit
317f7ca114f80cf2c4d995938b9f262b50fa02fb
msanatan/GitHubProjects,msanatan/GitHubProjects,msanatan/GitHubProjects
app/scenes/SearchScreen/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = [\n 'https://upload.wikimedia.org/wikipedia/en/e/e7/Cscr-featured.svg',\n '.webm',\n 'https://upload.wikimedia.org/wikipedia/en/4/4a/Commons-logo.svg',\n 'https://upload.wikimedia.org/wikipedia/en/f/fd/Portal-puzzle...
javascript
edit
0
0
mit
ed0df4c15952d3b00ca0de3b01cc4697ee6e9570
WikiEducationFoundation/Wiki-Playlist,WikiEducationFoundation/Wiki-Playlist,WikiEducationFoundation/Wiki-Playlist
app/react/data/exclude_images.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\ndefine(['lib/def', 'handler'], function(Def, Handler) {\n\n var HandlerAdaptor = Def.type(Handler, function(handler) {\n Handler.call(this);\n this.def_prop('handler', handler);\n });\n\n HandlerAdaptor.def_method(function on_m...
javascript
edit
0
2
mit
4036b9f7009c65aa1889b80ddbb81f2ad95dc873
bassettmb/slack-bot-dev
src/handler_adaptor.js
rejected_duplicate
Near-duplicate of sample 80311
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * Since IRIDA can be served within a container, all requests need to have\n * the correct base url. This will add, if required, the base url.\n *\n * NOTE: THIS ONLY NEEDS TO BE CALLED FOR LINKS, ASYNCHRONOUS REQUESTS WILL\n * BE...
javascript
edit
0
4
apache-2.0
2b82c65e398a66d3dc23f0fdf366549e5565219f
phac-nml/irida,phac-nml/irida,phac-nml/irida,phac-nml/irida,phac-nml/irida,phac-nml/irida,phac-nml/irida,phac-nml/irida
src/main/webapp/resources/js/utilities/url-utilities.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react';\n\nimport {\n HashRouter as Router,\n Switch,\n Route,\n Link\n} from \"react-router-dom\";\nimport ComponentsPage from './pages/Components';\nimport ContentPage from './pages/Content';\nimport UtilsPage f...
javascript
edit
0
2
mit
1dde5df3c6fdfe555f7258d1a697735bc6f3b7a8
FindawayWorld/gateway,FindawayWorld/gateway
src/App.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport ReactDom from 'react-dom';\nimport { Link } from 'react-router';\nimport _ from 'lodash';\nimport client from '../../common/store/Contentful';\nimport marked from 'marked';\n\nimport styles from \"./st...
javascript
edit
0
2
mit
22d63bf978e351a22515248600a8cd7a1d56a07d
mhgbrown/typography-karaoke,mhgbrown/typography-karaoke
src/pages/home/page.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport { BrowserRouter, Match, Miss } from 'react-router'\nimport Header from './components/Header';\nimport CTA from './components/CTA';\nimport Footer from './components/Footer';\nimport routes from './conf...
javascript
edit
0
1
mit
3a6dafd545da6f7ccb271915eb1b9a5f76cfe277
emyarod/afw,emyarod/afw
src/App.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport { BrowserRouter as Router, Route } from 'react-router-dom';\nimport Home from './Home';\n\nconst App = () => (\n <React.Fragment>\n <Router>\n <Route exact path=\"/\" component={Home} />\n ...
javascript
edit
0
1
mit
1ebfc2f9d228811b45955e1d7ddd1f61407a3809
jasongforbes/jforbes.io,jasongforbes/jforbes.io,jasongforbes/jforbes.io
src/App.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n#!/usr/bin/env node\n\nimport yargs from 'yargs';\nimport path from 'path';\nimport fs from 'fs';\nimport * as pose from '.';\nimport actions from './actions';\n\nconst opts = yargs\n.usage('$ pose <action> [options]')\n.help('help')\n....
javascript
edit
0
1
mit
1f79c994d96907273b45b36fe1cbf06340e71c41
seanc/pose
src/cli.js
rejected_duplicate
Near-duplicate of sample 96202
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = function(config) {\n var commonConfig = (require(\"./karma-common.conf\"))(config);\n var customLaunchers = {\n sl_chrome: {\n base: \"SauceLabs\",\n browserName: \"chrome\",\n ...
javascript
edit
0
1
apache-2.0
5d3474ab83dcf9931ee480fbe7d1119642e7355f
kuad9/vivliostyle.js_study,vivliostyle/vivliostyle.js,nulltask/vivliostyle.js,vivliostyle/vivliostyle.js,kuad9/vivliostyle.js_study,vivliostyle/vivliostyle.js,nulltask/vivliostyle.js,kuad9/vivliostyle.js_study,nulltask/vivliostyle.js,vivliostyle/vivliostyle.js,kuad9/vivliostyle.js_study,nulltask/vivliostyle.js
test/conf/karma-sauce.conf.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * Has Vowels\n * \n * hasVowel tests if the String calling the function has a vowels\n * \n * @param {void}\n * @return {Boolean} returns true or false indicating if the string\n * has a vowel or not\n */\nString.prototype.hasVowe...
javascript
edit
0
1
mit
f4c10acf35c802049cb59fec2af813766821c83f
andela-oolutola/string-class,andela-oolutola/string-class
src/String.js
rejected_duplicate
Near-duplicate of sample 73455
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar test = require('tap').test,\n ecstatic = require('../lib/ecstatic'),\n http = require('http'),\n request = require('request'),\n path = require('path');\n\nvar root = __dirname + '/public',\n baseDir = 'base';\n\ntest...
javascript
edit
0
1
mit
8e4e5ef743051f64d41e6e3e027faf6daaf10b89
mk-pmb/node-ecstatic,krikx/node-ecstatic,mk-pmb/node-ecstatic,jfhbrook/node-ecstatic,dotnetCarpenter/node-ecstatic,mk-pmb/node-ecstatic,dotnetCarpenter/node-ecstatic,krikx/node-ecstatic,dotnetCarpenter/node-ecstatic,ngs/node-ecstatic,jfhbrook/node-ecstatic,ngs/node-ecstatic,jfhbrook/node-ecstatic
test/showdir-href-encoding.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nfunction initMap() {\n var map;\n var $business_object;\n var biz_loc_collection;\n var i;\n\n $business_object = $('#businesses').data('url');\n biz_loc_collection = [];\n for (i = 0; i < $business_object.length; ++i) {\n biz...
javascript
edit
0
2
mit
242dff01801b14ea10df218d0d967e9afef2b144
DBC-Huskies/flight-app,DBC-Huskies/flight-app,DBC-Huskies/flight-app
app/assets/javascripts/displayMap.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* @flow */\n\nimport engine from '../engine'\nimport {notifyCtlSetNotificationsRpc} from '../constants/types/flow-types'\n\ntype NotificationChannels = {\n session?: true,\n users?: true,\n kbfs?: true,\n tracking?: true,\n favori...
javascript
edit
null
null
bsd-3-clause
8b6b89e438c963ed0f3cb563cdfd60b6c0d0a7e0
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/util/set-notifications.js
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```javascript\n$(document).foundation();\n\n$('a.disabled').click(function(e) {\n e.preventDefault();\n});\n\n\n// Show shadow when content slides under the page header\n$(document).ready(function() {\n var $content = $('#site-body .content');\n va...
javascript
edit
0
2
bsd-3-clause
a59413dc688077d0f1c4d8ae26fce464b837faa6
flipside-org/aw-datacollection,flipside-org/aw-datacollection,flipside-org/aw-datacollection
src/scripts/scripts.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport ReactDom from 'react-dom';\n\nclass Portal extends Component {\n componentWillMount() {\n this.popup = document.createElement('div');\n document.body...
javascript
edit
0
2
mit
ba8371191ca468d1648e83324455d24a314725f8
pradel/react-minimalist-portal
src/portal.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use babel'\n\nimport {getPath} from 'consistent-path'\nimport {BufferedProcess} from 'atom'\n\nexport default (command, args, cwd = null) => new Promise((resolve, reject) => {\n let output = null\n const stdout = (_output) => output ...
javascript
edit
0
2
mit
8dc0bd8327a0acef05a611fa57a7b256951db69f
timdp/atom-npm-helper
lib/util/spawn-promise.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport {parse, Source} from 'graphql';\n\nimport {createSpecBuilderClass} from './base';\n\nimport {RepositoryBuilder} from './repository';\nimport {PullRequestBuilder} from './pr';\n\nclass SearchResultItemBuilder {\n static resolve()...
javascript
edit
0
2
mit
9cadbca18e044b0b20b7a3316c7007eb1540711b
atom/github,atom/github,atom/github
test/builder/graphql/query.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function($) {\n $(\"#pl_map path\").on(\"click\", function() {\n document.location.pathname = $(this).data(\"href\")\n });\n $('[data-toggle=\"tooltip\"]').tooltip({'container': 'body'});\n})(jQuery);\n```\n\nApply this...
javascript
edit
0
1
mit
d2d68cb5ff8982f897b2805f57b73724def65208
watchdogpolska/feder,watchdogpolska/feder,watchdogpolska/feder,watchdogpolska/feder
feder/main/static/init_map.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst mysql = require('mysql')\nconst qBuilder = require('./QueryBuilder')\n\nlet query = ''\nlet params = []\n\nmodule.exports = (dbSetting) => {\n let connection = mysql.createConnection({\n host: dbSetting.hostname,\n user: db...
javascript
edit
0
1
mit
2561471eea20a9d1ca762d402ba538661cfd2f64
evelikov92/mysql-qbuilder
module/Connector.js
accepted
null
true