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\njsio('from shared.javascript import Class')\njsio('import fan.ui.Button')\njsio('import fan.ui.RadioButtons')\njsio('import fan.tasks.views.View')\n\nexports = Class(fan.tasks.views.View, function(supr) {\n\t\n\tthis._className += ' Tas...
javascript
edit
0
1
mit
c21f621b2f0ca63bef1ca210e85a8f0d4b8a572b
marcuswestin/Focus
fan/tasks/views/TaskItemView.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nexport default {\n data () {\n return {\n windowWidth: 0,\n currentBreakpoint: '',\n breakpoints: {\n small: 767, // MUST MATCH VARIABLES IN assets/stylesheets/_settings\n medium: 1024,\n large: 1...
javascript
edit
0
5
bsd-3-clause
d9817ae2aee7bbf7621cd967ea7b57b9ffda94d1
unepwcmc/ProtectedPlanet,unepwcmc/ProtectedPlanet,unepwcmc/ProtectedPlanet,unepwcmc/ProtectedPlanet,unepwcmc/ProtectedPlanet
app/javascript/mixins/mixin-responsive.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n$(document).ready(function () {\n var showSlave = function ($master, showOn) {\n if ($master.is(':checkbox')) {\n return (+$master.is(':checked')).toString() === showOn;\n }\n\n var value = $master.val...
javascript
edit
0
4
mit
a26a5bf49f41ed034f96ea3498fc1bfdd22d9eae
DarvinStudio/DarvinAdminBundle,DarvinStudio/DarvinAdminBundle,DarvinStudio/DarvinAdminBundle
Resources/public/scripts/master-slave-inputs.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*globals $, Morris, gettext*/\n$(function () {\n $(\".chart\").css(\"height\", \"250px\");\n new Morris.Area({\n element: 'obd_chart',\n data: JSON.parse($(\"#obd-data\").html()),\n xkey: 'date',\n yke...
javascript
edit
0
1
apache-2.0
bcfd1dcf3b4854c867ab0db3b5f34a9d6a7f13c5
Flamacue/pretix,Flamacue/pretix,Flamacue/pretix,Flamacue/pretix
src/pretix/plugins/statistics/static/pretixplugins/statistics/statistics.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\ndescribe('pattyApp', function() {\n\n beforeEach(function() {\n browser.get('index.html');\n });\n\n it('should have patty title', function() {\n expect(browser.getTitle()).toMatch('Project Patty Visualisation'...
javascript
edit
0
1
apache-2.0
9feb7573074410e8be405dfb54c7b586448b7a5f
NLeSC/PattyVis,NLeSC/PattyVis
e2e/scenario.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n#!/usr/bin/env node\n\nconst flos = require('../lib/api');\nconst FlosRunner = flos.Runner;\n\n// load config\nconst config = {};\n// load linters\nconst linters = [];\n// create runner\nconst runner = new FlosRunner(linters);\n// confi...
javascript
edit
0
0
mit
e99a0ecedc7109634c16fa47bb365146d9dabe9a
abogaart/flos
bin/flos.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = function(grunt){\n grunt.config('sass', {\n sass: {\n options: {\n sourceMap: 'true'\n }, //options\n dist: {\n files: {\n 'dist/css/main.css': 'src/scss/main.scss',\n }\...
javascript
edit
0
1
mit
f60a1676ea68fece10c6579e49732fa479adace4
joeHillman/boilerplate,joeHillman/boilerplate
grunt/sassTasks.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nfunction openCourse(Course) {\n var i, x;\n x = document.getElementsByClassName(\"schedule\");\n for(i=0;i<x.length;i++){\n x[i].style.display = 'none';\n }\n document.getElementById(Course).style.display = \"block...
javascript
edit
0
2
cc0-1.0
8be5f534f42691942e74ed98f5eaa327df684fe6
FatecSorocaba/semana-da-tecnologia,FatecSorocaba/semana-da-tecnologia
js/main.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react';\n\nlet Trigger; // eslint-disable-line\n\nif (process.env.REACT === '15') {\n const ActualTrigger = require.requireActual('rc-trigger');\n const { render } = ActualTrigger.prototype;\n\n ActualTrigger.proto...
javascript
edit
0
3
mit
ec625b35cc589d006ee43882abad45d3c291df37
zheeeng/ant-design,ant-design/ant-design,elevensky/ant-design,icaife/ant-design,elevensky/ant-design,ant-design/ant-design,icaife/ant-design,zheeeng/ant-design,icaife/ant-design,ant-design/ant-design,elevensky/ant-design,ant-design/ant-design,elevensky/ant-design,icaife/ant-design,zheeeng/ant-design,zheeeng/ant-design
tests/__mocks__/rc-trigger.js
rejected_duplicate
Near-duplicate of sample 91507
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar exportGeoJson = require('osm-p2p-geojson')\nvar pump = require('pump')\nvar defork = require('osm-p2p-defork')\nvar collect = require('collect-transform-stream')\n\nvar userConfig = require('./user-config')\nvar presets = userConfig...
javascript
edit
0
2
mit
9cad1c51285b18da82c376989d079d47c20e96a3
digidem/ecuador-map-editor,digidem/ecuador-map-editor
lib/export-geojson.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*\n * Author: Jerome Renaux\n * E-mail: <EMAIL>\n */\n\nvar Game = {};\n\nGame.init = function(){\n game.stage.disableVisibilityChange = true;\n};\n\nGame.preload = function() {\n game.load.tilemap('map', 'assets/map/example_map....
javascript
edit
0
1
mit
30343d093cd2424d849e3c36d5021a82b09222a6
marycourtland/pyramid-sea-game,marycourtland/pyramid-sea-game
js/game.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport {\n View,\n Text,\n} from 'react-native';\n// import { Actions } from 'react-native-router-flux';\nimport { RoomView } from './RoomView';\n\nimport { AppStyles, AppSizes } from '../../../theme/';\nim...
javascript
edit
0
3
apache-2.0
d273c211916541bc2a9fd7e4edb5f3260a0d3d26
elarasu/roverz-chat,elarasu/roverz-chat
src/chat/ui/room/SupportGroup.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * Created by Tomasz Gabrysiak @ Infermedica on 08/02/2017.\n */\n\nimport View from '../../base/view';\nimport template from './template';\n\nexport default class GeoRisksView extends View {\n constructor (el, context) {\n con...
javascript
edit
0
1
mit
e3a6aa64f47b65aba6a1d612c468c52b213f4546
infermedica/js-symptom-checker-example,infermedica/js-symptom-checker-example
src/components/geo-risks/view.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React, { Component } from 'react';\nimport { faintBlack, cyan500 } from 'material-ui/styles/colors';\nimport MenuItem from 'material-ui/MenuItem';\nimport IconMenu from 'material-ui/IconMenu';\nimport IconButton from 'material-ui...
javascript
edit
0
1
apache-2.0
0a8f1e5704a56eddeac9a7d3ed3e0a0b2e744a29
blobor/buka,blobor/buka,blobor/skipass.site,blobor/skipass.site
src/components/TestCardNumber.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport cx from 'classnames';\nimport React from 'react';\nimport PropTypes from 'prop-types';\n\nconst Avatar = ({ className, user }) => (\n <div className={cx('Avatar', className)}>\n <img\n className=\"Avatar-image\"\n s...
javascript
edit
0
2
mit
f9c6df86c3998f1d7625ad472b57f8c0a34df0ec
welovekpop/uwave-web-welovekpop.club,welovekpop/uwave-web-welovekpop.club
src/components/Avatar/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { randomId } from './util';\n\nconst s = typeof Symbol === 'function';\nexport const vueFormConfig = s ? Symbol() : `VueFormProviderConfig${randomId}`;\nexport const vueFormState = s ? Symbol() : `VueFormProviderState${randomId}...
javascript
edit
0
0
mit
38f0c75f83c1d864adee5f7006eb66446228406a
fergaldoyle/vue-form,fergaldoyle/vue-form
src/providers.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar React = require( \"react\" );\nvar MorningScreen = require( \"./morning-screen\" );\nvar PlayScreen = require( \"./play-screen\" );\n\nmodule.exports = React.createClass({\n\tdisplayName: \"RepubliaTimes\",\n\n\tgetInitialState() {\...
javascript
edit
0
2
isc
ab1a77facf8a5f0d34e1ef61e8abce65ccfe772f
bjohn465/republia-times,bjohn465/republia-times
src/components/republia-times.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar core = require('../../core');\n\n/**\n * @author Vico @vicocotea\n * original shader : https://www.shadertoy.com/view/lssGDj by @movAX13h\n */\n\n/**\n * An ASCII filter.\n *\n * @class\n * @extends AbstractFilter\n * @namespace PIX...
javascript
edit
0
1
mit
aa06dc2086eb43845d86d229ed57e235abeeadfe
falihakz/pixi.js,leonardo-silva/pixi.js,TrevorSayre/pixi.js,finscn/pixi.js,twhitbeck/pixi.js,sfinktah/pixi.js,jpweeks/pixi.js,DarkEngineer/pixi.js,lucap86/pixi.js,jojuntune/pixi.js,out-of-band/pixi.js,bdero/pixi.js,GoodBoyDigital/pixi.js,SUNFOXGames/pixi.js,trehnert23/pixi.js,Mgonand/pixi.js,sfinktah/pixi.js,NikkiKoole...
src/filters/ascii/AsciiFilter.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nrequire('find-java-home')(function(err, home){\n if(err){\n console.error(\"[node-java] \"+err);\n process.exit(1);\n }\n process.stdout.write(home);\n});\n\n```\n\nApply this change: Exit with error if Java home can't be found...
javascript
edit
0
4
mit
88168d12446d91540a00ed78c18f144df2c9e234
joeferner/node-java,joeferner/node-java,joeferner/node-java,joeferner/node-java,joeferner/node-java,joeferner/node-java
findJavaHome.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* global legacyConvert, module, project */\n\nmodule.exports = function(grunt) {\n\tgrunt.registerTask('convertLegacy', function(task) {\n\t\tvar dest = legacyConvert[task],\n\t\t\tcontent = grunt.file.read(dest),\n\t\t\trootSize = pro...
javascript
edit
0
4
apache-2.0
26d6e669462517abdbd2906785657f14da8cc555
janusnic/wee,weepower/wee,weepower/wee,janusnic/wee
public/assets/wee/build/tasks/legacy-convert.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport {Entity} from 'aframe-react';\nimport React from 'react';\nimport Wsgamepad from './Wsgamepad';\n\nexport default ({\n position=[0, 0, 5],\n id=\"camera\",\n active=\"false\",\n userHeight=\"4.8\",\n rotation=[...
javascript
edit
0
1
mit
91854c84fe969d6622b5c9bf3fe87818750f9c1f
maniart/darkpatterns,maniart/darkpatterns
src/js/components/Camera.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\n/* eslint-env node */\n\nlet TEST_SELECTOR_PREFIX = /data-test-.*/;\n\nfunction isTestSelector(attribute) {\n return TEST_SELECTOR_PREFIX.test(attribute);\n}\n\nfunction stripTestSelectors(node) {\n if ('sexpr' in nod...
javascript
edit
0
2
mit
ceea32dc631efab5c5b00722ec331f16a1751a4e
simplabs/ember-test-selectors,simplabs/ember-test-selectors
strip-test-selectors.js
rejected_duplicate
Near-duplicate of sample 86744
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n 'use strict';\n\n L.Control.Angular = L.Control.extend({\n options: {\n position: 'bottomleft',\n template: ''\n },\n onAdd: function(map) {\n var that = this;\n var container = L.DomUtil.crea...
javascript
edit
0
3
mit
47dcd35d3834834d7e46b274c0828b82602df5a2
grantHarris/leaflet-control-angular
src/L.Control.Angular.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * Message for errors when some method is not implemented\n * @type {String}\n * @private\n */\nvar NEED_IMPLEMENT_MESSAGE = \"This method need to implement\";\n\n/**\n * BaseHash class\n * @constructor\n */\nfunction BaseHash(opti...
javascript
edit
0
3
mit
a936197d853cf9309aa23b712a51853376c7bb13
ghaiklor/data-2-hash
lib/BaseHash.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n$(function() {\n var $tabs = $('#search-results-tabs'),\n $searchForm = $('.js-search-hash');\n\n if($tabs.length > 0){\n $tabs.tabs({ 'defaultTab' : getDefaultSearchTabIndex(), scrollOnload: true });\n }\n\n function getDef...
javascript
edit
0
3
mit
1aaeff5c1d3709948b6f6f6435635b339fc5d83c
alphagov/frontend,alphagov/frontend,alphagov/frontend,alphagov/frontend
app/assets/javascripts/search.js
rejected_duplicate
Near-duplicate of sample 78930
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Ember from 'ember';\nimport EmberValidations from 'ember-validations';\n\nexport default Ember.Component.extend(EmberValidations, {\n classNames: [\"edit-interface\"],\n validations: {\n 'changes': {\n changeset: true,\...
javascript
edit
0
1
mit
3af3831986136005504d4db5580e886ab83b2a35
wordset/wordset-ui,BryanCode/wordset-ui,BryanCode/wordset-ui,wordset/wordset-ui,BryanCode/wordset-ui,wordset/wordset-ui
app/components/edit-interface.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react'\nimport MuiDrawer from 'material-ui/Drawer'\nimport MenuItem from 'material-ui/MenuItem'\nimport muiThemeable from 'material-ui/styles/muiThemeable';\nimport { connect } from 'react-redux'\nimport { bindActionC...
javascript
edit
0
2
apache-2.0
988845fff293580680805c952ad6842e7f9b3dc3
davidharting/react-redux-example,davidharting/react-redux-example
src/modules/drawer/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst cheerio = require('cheerio');\nconst url = require('url');\n\nfunction hrefIsIcon(href) {\n return /\\w\\.(png|jpg|ico)/.test(href);\n}\n\nfunction getIconLinks(rootUrl, dom) {\n var $ = cheerio.load(dom);\n const icons =...
javascript
edit
0
2
mit
4973763838d745cdc236f3bb985f8ef107d03476
jiahaog/page-icon
src/modules/getIconLinks.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n$(function() {\n function update() {\n var name = $('#boxes #name').val();\n var id = $('#boxes #id').val();\n if (name || id) {\n if (!name) { name = \"{name}\"; }\n if (!id) { id = \"{id}\...
javascript
edit
0
5
bsd-3-clause
aad4f74eeaac1bd4428bcd74a3627209ac477b8e
boothale/faexport,boothale/faexport,boothale/faexport
lib/faexport/public/js/faexport.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { Immutable } from 'nuclear-js';\nimport { getters as entityGetters } from '../entity';\n\nconst DEFAULT_VIEW_ENTITY_ID = 'group.default_view';\n\nexport const currentView = [\n 'currentView',\n];\n\nexport const views = [\n en...
javascript
edit
0
6
mit
5fc5dab5c4a2a7972cac711b562bd4f981b9215c
balloob/home-assistant-js
src/modules/view/getters.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport columnAccessor from './columnAccessor';\n\ndescribe('Util:columnAccessor', () => {\n it('should run this test', () => {\n const accessor = columnAccessor({ column: 'foo' });\n const d = { foo: 5 };\n expec...
javascript
edit
0
1
bsd-3-clause
4bfb7f5c8e80b9c7009ac388f55843aec7dc8f12
nuagenetworks/visualization-framework,nuagenetworks/visualization-framework,nuagenetworks/visualization-framework,nuagenetworks/visualization-framework,nuagenetworks/visualization-framework
src/utils/columnAccessor.spec.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport * as types from '../actions/action-types';\n\nexport default (state = [], action) => {\n switch (action.type) {\n case types.CREATE_COURSE:\n return [\n ...state,\n Object.assign({}, action.cour...
javascript
edit
0
2
mit
ec6597383ddfcae4e0a0c4015b7315aef0e5caf3
joilson-cisne/react-redux-es6,joilson-cisne/react-redux-es6
src/reducers/course-reducer.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n[\n {\n \"name\": \"Textstring\",\n \"path\": \"/umbraco/views/propertyeditors/textbox/textbox.html\"\n },\n {\n \"name\": \"Content Picker\",\n \"path\": \"/umbraco/views/propertyeditors/contentpick...
javascript
edit
0
0
mit
f27949cfbb5eaf7d7517cc1c15cdbe9dc4c09e1f
imulus/Archetype,tomfulton/Archetype,imulus/Archetype,Nicholas-Westby/Archetype,Nicholas-Westby/Archetype,kgiszewski/Archetype,tomfulton/Archetype,kjac/Archetype,tomfulton/Archetype,imulus/Archetype,Nicholas-Westby/Archetype,kjac/Archetype,kgiszewski/Archetype,kipusoep/Archetype,kgiszewski/Archetype,kipusoep/Archetype,...
app/config/config.views.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\ndefine([\n\n 'lateralus'\n\n ,'./model'\n ,'./view'\n ,'text!./template.mustache'\n\n], function (\n\n Lateralus\n\n ,Model\n ,View\n ,template\n\n) {\n 'use strict';\n\n var {{componentClassName}}Component = Lateralus.Compone...
javascript
edit
null
null
mit
8cc92420c4b8313c2826cdfef88e160e1323bf21
Jellyvision/lateralus,Jellyvision/lateralus
generator-lateralus/component/templates/main.js
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```javascript\nchrome\n .runtime\n .sendMessage({ msg: 'getStatus' }, function (response) {\n if (response.status) {\n let storage = chrome.storage.local;\n storage.get(['type', 'freq', 'q', 'gain'], function (items) {\n\n type =...
javascript
edit
0
5
apache-2.0
a3f29a4d4e2f7ebe98461c92da50cc3a914360e7
ubeacsec/Silverdog,ubeacsec/Silverdog
content.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = {\n loadPlugins: false\n , cms_methods: true\n , plugins: []\n , pluginConfigs: {}\n , metadata: {\n siteTitle: \"No name\"\n , description: \"Foo\"\n }\n , corePlugins: [\n \"bloggify-rout...
javascript
edit
0
0
mit
60603f0620732a9bf3fe9697ebbd8427be89d8ac
Bloggify/Bloggify
lib/defaults.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst babel = require('gulp-babel');\nconst gulp = require('gulp');\nconst pug = require('gulp-pug');\nconst uglify = require('gulp-uglify');\n\ngulp.task('build', () => {\n\tgulp.src('app/src/pug/*')\n\t\t.pipe(pug())\n\t\t.pipe(gulp.d...
javascript
edit
0
1
mit
ab612a1e43f7d66ecef3dd08745868c827c158cf
wulkano/kap,albinekb/kap,albinekb/kap,albinekb/kap
gulpfile.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\nimportScripts(\"/app/bower_components/videogular-questions/questions-worker.js\");\n\nloadAnnotations({\n\t\"first-question\": {\n\t\ttime: 4,\n\t\tquestions: [\n\t\t\t{\n\t\t\t\tid: \"first-question\",\n\t\t\t\ttype: \"single\",\n\t\...
javascript
edit
0
2
mit
17f13f03b0efabbc865bb093061c07aef7231fd2
soton-ecs-2014-gdp-12/videogular-questions-example,soton-ecs-2014-gdp-12/videogular-questions-example
app/simple-example/simple-test.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar gulp = require('gulp'),\n browserSync = require('browser-sync'),\n sass = require('gulp-sass'),\n bower = require('gulp-bower'),\n notify = require('gulp-notify'),\n reload = browserSync....
javascript
edit
0
1
mit
73d920d2b938af78ed5a6828fd303ba7486af3c7
chrisjlee/hexo-theme-zurb-foundation,wakermahmud/Moretaza
gulpfile.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* global Promise */\nvar Reference = require('../models/reference');\nvar reference = new Reference();\n// var References = require('../models/references');\n// var references = new References();\nvar Promisify = require('../models/pro...
javascript
edit
0
1
mit
dec3f18d5411344e652329ba439589b4c62fbbbd
KleeGroup/front-end-spa,pierr/front-end-spa,KleeGroup/front-end-spa,pierr/front-end-spa
app/service/ServiceReferential.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst API_URL = 'https://d07a5522.ngrok.io'\n\nexport const saveTokenForPush = subscription =>\n fetch(`${API_URL}/token`, {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json'\n },\n ...
javascript
edit
0
1
mit
5810a06a5db9e393b1a5bd163eb1df398cd5e564
addityasingh/build-notification-app,addityasingh/build-notification-app
src/api/token-api.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar gulp = require('gulp');\nvar sass = require('gulp-sass');\nvar sassLint = require('gulp-sass-lint');\nvar concat = require('gulp-concat');\nvar sourcemaps = require('gulp-sourcemaps');\nvar babel = require('gulp-bab...
javascript
edit
0
1
mit
1da97a23950b7248b493d391ea916f907236297f
molbiodiv/fennec,molbiodiv/fennec,molbiodiv/fennec,molbiodiv/fennec,molbiodiv/fennec
gulpfile.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar _ = require('lodash')\nvar fs = require('fs')\nvar gzip = require('gzip-size')\nvar filesize = require('filesize')\nvar cssstats = require('cssstats')\n\nvar module = require('tachyons-clears/package.json')\nvar moduleCss = fs.readF...
javascript
edit
0
0
mit
2da4cdcfb0617c1a13b9740aa8a9025a1f67a048
matyikriszta/moonlit-landing-page,cwonrails/tachyons,fenderdigital/css-utilities,fenderdigital/css-utilities,topherauyeung/portfolio,getfrank/tachyons,topherauyeung/portfolio,topherauyeung/portfolio,tachyons-css/tachyons,pietgeursen/pietgeursen.github.io
lib/clearfix.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n//Get the begin and end coordinates of selction\r\nfunction getSelectionEnds() {\r\n var success = false, x1 = 0, y1 = 0, x2 = 0, y2 = 0;\r\n var sel = window.getSelection()\r\n if (sel.rangeCount > 0){\r\n var range_rec...
javascript
edit
0
3
mit
85f9bb332079ba9012713c4ae2793a657b5529e7
glgh/perfect-reader,glgh/perfect-reader
content.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// TODO: To decide and adopt to some logging utility like winston\nmodule.exports = {\n info: function(message,context) {\n if(context) {\n console.log(message,JSON.stringify(context, null, 2));\n }\n else {\n consol...
javascript
edit
0
2
apache-2.0
8f9a3159f14ca9b04098485628e8b199ccba3738
pradyutsarma/app-autoscaler,cloudfoundry-incubator/app-autoscaler,cloudfoundry-incubator/app-autoscaler,pradyutsarma/app-autoscaler,qibobo/app-autoscaler,qibobo/app-autoscaler,pradyutsarma/app-autoscaler,cloudfoundry-incubator/app-autoscaler,pradyutsarma/app-autoscaler,qibobo/app-autoscaler,cloudfoundry-incubator/app-a...
api/lib/log/logger.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = function models(r) {\n return {\n projects: require('./projects')(r),\n users: require('./users')(r),\n samples: require('./samples')(r),\n access: require('./access')(r),\n files: ...
javascript
edit
0
1
mit
aed58e5b3d16adbcae22b3b3776be49dde2c87cb
materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org
backend/server/db/model/index.js
rejected_duplicate
Near-duplicate of sample 75259
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * Main entry point for budget web app\n */\n\nimport React from 'react';\nimport { AppContainer } from 'react-hot-loader';\nimport { render } from 'react-dom';\nimport { BrowserRouter } from 'react-router-dom';\n\nimport store fro...
javascript
edit
0
1
mit
63cd82ee1b085968de51be944dbc65b431418c87
felamaslen/budget,felamaslen/budget,felamaslen/budget,felamaslen/budget,felamaslen/budget,felamaslen/budget
web/src/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * Scroll to element\n * @param element\n */\nfunction scrollTo(element, duration) {\n duration = duration || 500;\n if (!element) return false;\n var elem = $(element).offset();\n if (elem.top) {\n $('html, body...
javascript
edit
0
4
bsd-3-clause
6ba32e797ea1037726eeea0501bf7f5bc5032433
hiqdev/hipanel-core,hiqdev/hipanel-core,hiqdev/hipanel-core,hiqdev/hipanel-core
src/assets/AppAssetFiles/js/panel.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport {createStore, applyMiddleware} from \"redux\";\nimport { composeWithDevTools } from 'redux-devtools-extension/developmentOnly';\n\nimport thunk from \"redux-thunk\";\n\nimport rootReducer from \"../reducers/rootReducer\";\n\nexpo...
javascript
edit
0
3
mit
5f8ad093e4a856d0d32542226259524acfd7f22a
markerikson/project-minimek,markerikson/project-minimek
src/store/configureStore.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { expect } from 'chai';\n\nimport { updateCellSource, executeCell } from '../../../src/notebook/actions';\nimport { liveStore, dispatchQueuePromise, waitForOutputs } from '../../utils';\n\ndescribe('agendas.executeCell', function...
javascript
edit
0
1
bsd-3-clause
9a34bf400a045a469ee32ed3e80002d9d9db8223
captainsafia/nteract,0u812/nteract,0u812/nteract,jdfreder/nteract,jdetle/nteract,captainsafia/nteract,jdetle/nteract,nteract/nteract,nteract/composition,rgbkrk/nteract,nteract/nteract,0u812/nteract,captainsafia/nteract,jdfreder/nteract,rgbkrk/nteract,temogen/nteract,jdfreder/nteract,jdetle/nteract,nteract/nteract,jdfre...
test/renderer/agendas/index_spec.js
rejected_duplicate
Near-duplicate of sample 89518
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst spawnSync = require('child_process').spawnSync;\n\nclass Linguist {\n\n /**\n * Returns the languages found in the project. \n * Associate Array of language String to Array of filenames that are written in that language\n *...
javascript
edit
0
2
apache-2.0
a742374a5b0878c23de946e9aadf4a78593e68e8
todogroup/repolinter,trevmex/repolinter,todogroup/repolinter,trevmex/repolinter
lib/linguist.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * @file init.js\n * Custom initialization for your app. Use this space to attach any pre/post\n * hooks your setup will need. This is executed after the Router and\n * AutoLoader have been set up, but before drive() is called.\n *...
javascript
edit
0
1
mit
04dba251aa62d44da1bdec120db116091ebb0d64
jay-depot/turnpike,jay-depot/turnpike
bin/skeletons/project/api/init.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst _ = require('lodash');\nconst uuidV4 = require('uuid/v4');\nconst Sentence = require('./sentence');\n\nclass Text {\n constructor(text) {\n let paragraphs = _.chain(text).split('\\n').compact()\n .map((text, index) => new...
javascript
edit
0
1
mit
88da7f4c79a6abf8589dfcc53ca507086e831abb
raitucarp/paratree
paragraph.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport path from 'path';\r\nimport mixins from 'postcss-mixins';\r\nimport nested from 'postcss-nested';\r\nimport extend from 'postcss-extend';\r\nimport repeat from 'postcss-for';\r\nimport simpleVars from 'postcss-simple-vars';\r\nim...
javascript
edit
0
1
mit
97ee55c563de51d4a5612092c211c537f140b316
sunya9/castella,sunya9/castella
gulpfile.babel.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// In a real use case, the endpoint could point to another origin.\nvar LOG_ENDPOINT = 'report/logs';\n\n// The code in `oninstall` and `onactive` force the service worker to\n// control the clients ASAP.\nself.oninstall = function(even...
javascript
edit
0
1
mit
4d30906bf9300438e6a421dc69d278a8e3549271
mozilla/serviceworker-cookbook,mozilla/serviceworker-cookbook
api-analytics/service-worker.js
rejected_duplicate
Near-duplicate of sample 76110
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React, { PropTypes } from 'react';\nimport {\n Text,\n TouchableHighlight\n} from 'react-native';\n\nconst Button = ({theme, disabled}) => {\n const {styles} = theme;\n const btnStyles = [styles.button];\n if (disabled) ...
javascript
edit
0
2
mit
66a8fd70d78cf502f3916686dbf097139e617a94
uiheros/react-native-redux-todo-list,uiheros/react-native-redux-todo-list,uiheros/react-native-redux-todo-list
app/components/shared/Button.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\n/*\n * Module for playing audio, now the Angular way!\n */\n\nangular.module('audiohandler', [])\n.factory('audioFactory', function ($ionicPlatform, $window, $cordovaNativeAudio) {\n $ionicPlatform.ready(function () ...
javascript
edit
0
2
mit
4c4bd258b2bd4a3ef1b57bd0c020fbabe23ecb59
learning-layers/sardroid,learning-layers/sardroid,learning-layers/sardroid
app/js/services/audiohandler.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * @name jquery-steamytext\n * @version 1.0.0\n * @description jQuery SteamyText animation plugin\n * @author Maxim Zalysin <<EMAIL>>\n */\n(function($){\n $.fn.steamyText = function(data){\n var defaults = {\n ...
javascript
edit
0
5
mit
883ec525c2d19d95fbf07e4c9317fa6e93ff0201
magna-z/jquery-steamytext
jquery.steamytext.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function() {\n \n function onPlayerReady() {\n var overlay = videoPlayer.overlay();\n $(overlay).html('<img id=\"overlaylogo\" src=\"http://cs1.brightcodes.net/ben/img/genericlogo.png\" />')\n .css({\n ...
javascript
edit
0
2
apache-2.0
7b0c689275bc9cacc1c98edda482c76f62c26e54
mister-ben/Brightcove-Player-Logo
js/htmlPlayerLogo.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function() {\n \"use strict\";\n\n angular\n .module('VinculacionApp')\n .directive('tbHeaderbar', tbHeaderbar);\n\n function tbHeaderbar() {\n var directive = \n {\n restrict: 'E',\n ...
javascript
edit
0
1
mit
2a13d8a04cf0f15955ff605e00c22f4cd4150dc8
Tribu-Anal/Vinculacion-Front-End,Tribu-Anal/Manejo-Horas-de-Vinculacion-UNITEC,Tribu-Anal/Vinculacion-Front-End,Tribu-Anal/Manejo-Horas-de-Vinculacion-UNITEC
dev/app/shared/TB-Headerbar/tb-headerbar.directive.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar _ = require('underscore');\nvar getSlug = require('speakingurl');\nvar SLUG_MAP_FILE = \"src/data/slug_map.json\";\n\nmodule.exports = function(grunt) {\n\n function readMap() {\n try {\n return grunt.file...
javascript
edit
0
3
mit
abbead374f1dd20232a3c4275d5f52e5c4fd9e25
collective-archive/collective-archive-site-generator
lib/slug_mapper.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* eslint-disable no-console */\nimport vue from 'vue';\nimport vuex from 'vuex';\nimport router from 'vue-router';\nimport vueintl from 'vue-intl';\nimport 'intl';\nimport 'intl/locale-data/jsonp/en.js';\nimport kRouter from 'kolibri.c...
javascript
edit
0
0
mit
2c3a36930b35aec59c31ffa726a49cec00012570
jonboiser/kolibri,learningequality/kolibri,benjaoming/kolibri,learningequality/kolibri,indirectlylit/kolibri,lyw07/kolibri,jonboiser/kolibri,learningequality/kolibri,christianmemije/kolibri,benjaoming/kolibri,indirectlylit/kolibri,DXCanas/kolibri,lyw07/kolibri,benjaoming/kolibri,benjaoming/kolibri,DXCanas/kolibri,chris...
karma_config/vueLocal.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport Archive from '../../component/archive/archive-list-container';\nimport PropTypes from 'prop-types';\n\nconst render = ({ match }) => <Archive name={match.params.name} />;\nrender.propTypes = {\n mat...
javascript
edit
0
1
apache-2.0
c9b3c797373fc4b83a84551bfb56459f8c36f50a
Unleash/unleash-frontend,Unleash/unleash-frontend,Unleash/unleash-frontend,Unleash/unleash-frontend
src/page/archive/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// eg.\n// 3 -> 0.001\n// 2 -> 0.01\n// 1 -> 0.1\nexport default pipSize => {\n const zeros = Array(pipSize).join('0');\n const stepStr = '0.' + zeros + 1;\n return stepStr;\n};\n\n```\n\nApply this change: Improve comment to c...
javascript
edit
0
1
mit
6bf3c7a5eb8fa1e73e8f8d65e1d25f05800efe37
qingweibinary/binary-next-gen,qingweibinary/binary-next-gen,nuruddeensalihu/binary-next-gen,nazaninreihani/binary-next-gen,binary-com/binary-next-gen,binary-com/binary-next-gen,nazaninreihani/binary-next-gen,nuruddeensalihu/binary-next-gen,nuruddeensalihu/binary-next-gen,binary-com/binary-next-gen,nazaninreihani/binary...
src/_utils/pipSizeToStepSize.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport './AddressList.less';\nimport AddrLine from './AddrLine.react';\nimport React, { PropTypes } from 'react';\nimport Component from 'react-pure-render/component';\nimport { connect } from 'react-redux';\n\nclass AddressList extends...
javascript
edit
0
1
mit
eaf6e5a623157a48026b0d4b0f52505fa32e1acc
cjk/smart-home-app
src/browser/home/AddressList.react.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst sum = require('./sum');\n\ntest('adds 1 + 2 to equal 3', () => {\n expect(sum(1, 2)).toBe(4);\n});\n```\n\nApply this change: Fix test for travis ci" }, { "role": "assistant", "content": "const sum = require('./sum');...
javascript
edit
0
1
mit
9a3001e968777044972db72bccd6e0ff8fdab936
FermORG/FermionJS,FermORG/FermionJS
test/reducers/sum.spec.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { SET_COMPLETION, SET_BODY, SET_PAGE, SET_RESULTS_PER_PAGE } from '../actions/Search'\n\nconst initialState = {\n completion: '',\n body: '',\n page: 1,\n resultsPerPage: 10\n}\n\nfunction search(state = initialState, action)...
javascript
edit
0
6
mit
6ad2673b940ffa0f58788aa543050457619053db
sajari/sajari-sdk-react,sajari/sajari-sdk-react
src/ui/reducers/Search.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport preInit from '../common/pre-init';\n\npreInit().then(() => {\n require('./init-render'); // eslint-disable-line global-require\n});\n\n```\n\nApply this change: Print error on clients that do not support printing on unhandledRej...
javascript
edit
0
1
mit
2b59d7eba876977825f57886f55f6b4c9519efa5
reworkjs/reworkjs,reworkjs/reworkjs,foobarhq/reworkjs,foobarhq/reworkjs,reworkjs/reworkjs
src/framework/client/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport BaseApp from '../../lib/javascripts/base_app';\n\n// remove these if not needed\nimport Base64 from 'base64';\nimport helpers from 'helpers';\n\nvar App = {\n\n defaultState: 'loading',\n\n requests: {\n getMe: {\n url:...
javascript
edit
0
1
apache-2.0
6d1c3b1d1039d695ad274c2f558e63e19ef41420
sinanuozdemir/kylie-zendesk-app-v2,fbvilela/auspost
src/javascripts/legacy_app.js
rejected_duplicate
Near-duplicate of sample 72410
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst JobStates = {\n active: {\n stateTypes: ['active'],\n displayName: 'Running'\n },\n failed: {\n stateTypes: ['completed', 'failure'],\n displayName: 'Failed'\n },\n success: {\n stateTypes: ['success'],\n di...
javascript
edit
0
0
apache-2.0
feb155ed1d2098e6ccd86327c8f72b3c3b9ad5d9
dcos/dcos-ui,dcos/dcos-ui,dcos/dcos-ui,dcos/dcos-ui,dcos/dcos-ui
src/js/constants/JobStates.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\ndefine(['react'], function (React) {\n 'use strict';\n\n var ul = React.DOM.ul\n , li = React.DOM.li\n , span = React.DOM.span\n , a = React.DOM.a;\n\n var Pager = React.createClass({\n displayName: 'Pager',\n render:...
javascript
edit
0
3
apache-2.0
f371f003749ce24b3050033beb9ad22fac782e0d
yochannah/show-list-tool,intermine-tools/show-list-tool,alexkalderimis/show-list-tool,intermine-tools/show-list-tool,intermine-tools/show-list-tool,yochannah/show-list-tool,alexkalderimis/steps-export-tool,alexkalderimis/tool-template-react,yochannah/show-list-tool
js/pager.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * mSupply Mobile\n * Sustainable Solutions (NZ) Ltd. 2019\n */\n\nimport { authStrings } from './authStrings';\nimport { buttonStrings } from './buttonStrings';\nimport { generalStrings } from './generalStrings';\nimport { modalSt...
javascript
edit
0
1
mit
8fc4e62ca1ec5e7327a18e0e0a39132bd02e77e5
sussol/mobile,sussol/mobile,sussol/mobile,sussol/mobile
src/localization/utilities.js
rejected_duplicate
Near-duplicate of sample 75352
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Ember from 'ember';\nimport AuthenticatedRouteMixin from 'ember-simple-auth/mixins/authenticated-route-mixin';\n\nexport default Ember.Route.extend(AuthenticatedRouteMixin, {\n session: Ember.inject.service(),\n\n model() {\n ...
javascript
edit
0
2
mit
56bd10ce9b8fe226e9b7f0d5f403d96cc8fc1584
code-corps/code-corps-ember,jderr-mx/code-corps-ember,eablack/code-corps-ember,jderr-mx/code-corps-ember,code-corps/code-corps-ember,eablack/code-corps-ember
app/routes/project/posts/new.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nSchema = {};\n\nSchema.UserProfile = new SimpleSchema({\n name: {\n type: String,\n optional: true\n },\n body: orion.attribute('summernote', {\n label: 'Body',\n optional: true,\n autoform: {\n summernoteOptions:...
javascript
edit
0
0
apache-2.0
9786e5cacf393f4458a69b19ed5ff6fa08f150cc
GeoMakers/geomakers.org,GeoMakers/geomakers.org
lib/collections/users.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function (module) {\n module.controller('ProjectHomeController', ProjectHomeController);\n ProjectHomeController.$inject = [\"project\", \"mcmodal\", \"templates\", \"$state\"];\n\n function ProjectHomeController(project, mcmo...
javascript
edit
0
2
mit
ea4973edb952f0f30126b989c29f2e9e746ba18d
materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org
website/app/application/core/projects/project/home/home.js
rejected_duplicate
Near-duplicate of sample 73075
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar rawFeedService = require('../database/raw_feed.js');\n\nthis.load = function(app, io, gcm, logger) {\n\tapp.get('/rawfeed/?', function(req, res){\n\t\tif(logger.DO_LOG){\n\t\t\tlogger.info('Request for list of events');\n\t\t}\n\t\t...
javascript
edit
0
2
mit
5359334bfb7fc85eb8cb26bde9f7d20b9e0da789
NextCenturyCorporation/EVEREST
services/rest/raw_feed.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\nmodule.exports = {\n options: {\n 'v': {\n type: 'boolean',\n description: 'Verbose logging',\n alias: 'verbose'\n },\n 'd': {\n type: 'string',\n descript...
javascript
edit
0
0
mit
9d36653e14ae3d584b7130f2cc96b4f427f7b8d0
zillow/mustache-wax,zillow/mustache-wax
lib/argv.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar RecipeService = function() {\n\n this.initialize = function() {\n // No Initialization required\n var deferred = $.Deferred();\n deferred.resolve();\n return deferred.promise();\n }\n\n this.find...
javascript
edit
0
3
mit
8e0bd311388c5544545e3298426a39ac9bed7764
enoliglesias/wpreader,enoliglesias/wpreader
www/js/services/RecipeService.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n$('document').ready(function () {\n showOrHideRecurrenceFields();\n});\n\n$('#IsRecurring').on('click', function () {\n addOrRemoveOneOffOption();\n showOrHideRecurrenceFields();\n});\n\n\nfunction addOrRemoveOneOffOption() {\...
javascript
edit
0
3
mit
acc3276e94a0722e575562c0ee30ae17be28883d
hubbardgary/TaskScheduler,hubbardgary/TaskScheduler,hubbardgary/TaskScheduler
TaskScheduler.Web/Scripts/Shared/Create.js
accepted
null
true
[ { "role": "user", "content": "Write javascript code for the following: Add initial tests for Registry.check" }, { "role": "assistant", "content": "import test from 'ava';\nimport Registry from '../src/registry';\n\nwindow.innerWidth = 1280;\nwindow.innerHeight = 700;\n\ntest('Registry.check upda...
javascript
new_file
0
1
mit
1bc649248819bda6dce5297e97ec74f2958896eb
kudago/in-view,camwiegert/in-view
test/registry.check.spec.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar CONTENT_TYPE = 'Content-Type';\nvar JSON_CONTENT_TYPE = 'application/json';\nvar _ = require('../../../../utils/mindash');\n\nmodule.exports = {\n id: 'parseJSON',\n after: function (res) {\n if (isJson(res)) {\n return re...
javascript
edit
0
4
mit
96b5cdbeac49c9acd6c77236e5a2dc3ba831906b
Driftt/marty,thredup/marty,martyjs/marty,martyjs/marty,thredup/marty-lib,KeKs0r/marty-lib,goldensunliu/marty-lib,oliverwoodings/marty,kwangkim/marty,kwangkim/marty,oliverwoodings/marty,Driftt/marty,kwangkim/marty,CumpsD/marty-lib,martyjs/marty-lib,gmccrackin/marty-lib,thredup/marty
lib/stateSource/inbuilt/http/hooks/parseJSON.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport lists from '../core/lists';\n\nexport default class Clipboard {\n constructor(context) {\n this.context = context;\n this.$editable = context.layoutInfo.editable;\n }\n\n initialize() {\n this.$editable.on('paste', th...
javascript
edit
0
11
mit
1f0f2622b528cc69fab42c6f9ce7820af1de9bf3
summernote/summernote,summernote/summernote,summernote/summernote
src/js/base/module/Clipboard.js
rejected_complexity
Cyclomatic complexity too high: 11
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// Copyright (c) 2010 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\n//////////////////////////////////////////////////////////////...
javascript
edit
0
2
bsd-3-clause
4935b7b5ffaa1b64db0726dcfdc3c63622fc78e2
meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-u...
chrome/browser/resources/options/chromeos_system_options.js
rejected_duplicate
Near-duplicate of sample 96961
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { createStore, applyMiddleware, compose } from 'redux'\nimport thunkMiddleware from 'redux-thunk'\nimport createLogger from 'redux-logger'\n\nconst loggerMiddleware = createLogger()\n\nexport default function configureStore(mainR...
javascript
edit
0
2
mit
896c262bb499d5cca51c50a380b10125ddd74a77
FranckCo/Operation-Explorer,FranckCo/Operation-Explorer
src/js/utils/configure-store.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function(window, Models) {\n\n function Browser() {\n var self = this;\n\n self._isMobileSafariStandalone = function() {\n return self.isMobileSafari && window.navigator.standalone;\n };\n\n }\n\n Browser.prototype.isM...
javascript
edit
0
4
mit
1d4501b91346c2f379aa2fa379d11d841c80acce
enriquez/coinpocketapp.com,MrBluePotato/Dogepocket,enriquez/coinpocketapp.com,MrBluePotato/Dogepocket,enriquez/coinpocketapp.com
app/js/models/browser.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nconst server = require('./app/server');\n\nserver.listen(80, () => {\n console.info('Server listening on port 80');\n});\n\n```\n\nApply this change: Allow Heroku to specify a port" }, { "role": "assistant", ...
javascript
edit
0
1
mit
781354830ddb7906fdf08f1f7cf86e6015e9016f
antonio-muniz/chat,antonio-muniz/chat
start.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\nvar walk = require('walk'),\n path = require('path'),\n fs = require('fs');\n\nclass FileSystemSourceRepository {\n // Awaiting resolution of https://github.com/jscs-dev/node-jscs/issues/1890\n // jscs:disable...
javascript
edit
0
2
isc
68825ed55c87a77f4179d40ef9e12272f2530d5d
jtheriault/code-copter,jtheriault/code-copter
src/source-repositories/fs.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\ndefine(\n [\n 'jquery',\n 'backbone',\n 'underscore',\n 'moment'\n ],\n function ($, Backbone, _, moment) {\n \"use strict\";\n\n return Backbone.Model.extend({\n\n url : fun...
javascript
edit
0
3
mit
1f3309cb55954954f24c71de1ece97e1a01af64c
willdurand/TravisLight,willdurand/TravisLight,willdurand/TravisLight
js/models/Repo.js
rejected_duplicate
Near-duplicate of sample 69647
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React, { Component } from 'react';\n\nimport Summary from './sections/Summary';\nimport Table from './sections/Table';\n\nimport { processLicense } from './licenseProcessor';\n\nexport class App extends Component {\n state = {\n...
javascript
edit
0
4
cc0-1.0
656e95aa9aa74737087f9d89f206539bcd82ff29
ksmithbaylor/emc-license-summarizer,ksmithbaylor/emc-license-summarizer,ksmithbaylor/emc-license-summarizer
src/App.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar mongoose = require('mongoose');\n\nvar db = require('../config/db');\nvar helper = require('../lib/helper');\n\nvar ContentsScheme = new mongoose.Schema({\n\turl_id: String,\n\turl: String, \n\tcontent: String\n});\...
javascript
edit
0
0
mit
dfc2fe8c8a445278d0e8e0e7bb1aef088c6a1783
duyetdev/DCrawler
models/contents.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React, { Component, PropTypes } from \"react\"\nimport styles from \"./index.css\"\nimport { Treebeard } from \"react-treebeard\"\nimport treeStyle from \"./treeStyle\"\nimport decorators from \"./decorators\"\n// import Link fro...
javascript
edit
0
4
mit
1685c4b8463727ff00bd55fb3181261bd2deb68f
thangngoc89/dnh-cpp
web_modules/Menu/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nlet express = require('express');\nlet bodyParser = require('body-parser');\n\nlet index = require('./routes/index');\n\nlet app = express();\n\napp.use(bodyParser.json());\napp.use(bodyParser.urlencoded({ extended: false }));\napp.use(...
javascript
edit
0
3
mit
34c126183f75c7d855a58ba98cc53d9f676a25bb
jlundan/spacy-nodejs-alpine,jlundan/spacy-nodejs-alpine
src/app.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst logger = require('../logger')\r\n\r\nmodule.exports = (controller) => {\r\n\r\n controller.hears([/encode base64 (.*)$/i,], ['direct_message','direct_mention'], (bot, message) => {\r\n let encoded = Buffer.from(message.match[1...
javascript
edit
0
1
mit
6d57b2b4e86b01b3713add12839121313dfd1202
allan-stewart/jarvis
src/skills/encode.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { Observable } from 'rxjs/Observable'\nimport { merge } from 'rxjs/observable/merge'\nimport { takeUntil } from 'rxjs/operator/takeUntil'\nimport { share } from 'rxjs/operator/share'\n\nconst makeVirtualEmission = (scheduler, val...
javascript
edit
null
null
cc0-1.0
c37c50319b666a09d79f7fe5014c91856c8190db
philpl/rxjs-diagrams
src/models/emissions/makeVirtualStream.js
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Write javascript code for the following: Add code for the smooth scroll on page" }, { "role": "assistant", "content": "$('a[href^=\"#\"]').on('click', function(event) {\n\tvar target = $(this.getAttribute('href'));\n\tif (target.length) {\n\t\tevent.preventDefault()...
javascript
new_file
0
2
mit
edc187d253724aeb7ecb7153275e202ea34a5578
ederchristian/ederchristian.github.io
assets/js/main.js
rejected_duplicate
Near-duplicate of sample 70563
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport './Options.css';\n\nexport default class Options extends React.Component {\n\n constructor() {\n super();\n\n this.state = {\n filename: ''\n };\n }\n\n componentDidMount() {\n this...
javascript
edit
0
2
mit
77e73c9570abeaa23efa18df1076edfb04647859
schultyy/spreadsheet,schultyy/spreadsheet
src/Components/Options.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimportScripts('localforage.min.js');\n\nself.addEventListener('push', function(event) {\n var data = event.data ? event.data.json() : null;\n\n var title = data ? data.title : 'Mercurius';\n var body = data ? data.body : 'Notificatio...
javascript
edit
0
3
apache-2.0
4ad2bfda968ccc5fdfa0a36931e21ca3611df62e
marco-c/mercurius,marco-c/mercurius,zalun/mercurius,marco-c/mercurius,zalun/mercurius
static/service-worker.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function ( views ) {\n\n views.AppView = Backbone.View.extend({\n el : '#content',\n\n initialize : function () {\n\n var tags = this.collection;\n\n tags.on('add', this.addOne, this);\n tags.on('reset', this.addA...
javascript
edit
0
1
mit
66c6aad8dba337fcf58ea9fbd9df0bb2ad3536aa
lenniboy/paginator-pageable-merge
examples/netflix-request-paging/views/AppView.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst fetch = require('node-fetch');\nconst composeDictionaryEntry = require('./utils/composeDictionaryEntry.js');\nconst fs = require('fs');\n\nfs.readFile('./words.txt', 'utf8', function (err, data) {\n if (err) {\n throw err;\n ...
javascript
edit
0
3
mit
b58ead87329eb2cd197414709c0c58fc34183324
yakhinvadim/longman-to-anki-local,yakhinvadim/longman-to-anki-plus
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nfunction r() {\n\tvar strings = arguments[0];\t\t\t\t\t\t\t\t\t// template strings\n\tvar values = Array.prototype.slice.call(arguments, 1);\t// interpolation values \n\t\n\t// concentrate strings and interpolations\n\tvar str = strings...
javascript
edit
0
5
mit
d79bc0412bfb85a46ed7e6eacf1a944266259f2a
Wooooo/remove-tabs
index.js
accepted
null
true