conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Include log warn message for uncaught exceptions\n\nChange-Id: Ia7b43a42e3c0519b27c25467bc65bc405bcd541c\n" }, { "from": "human", "value": "/*\n * (C) Copyright 2013 Kurento (http://kurento.org/)\n *\n * All rights reserved. This program and the accompanying materia...
java
chosen
[ { "from": "system", "value": "Create a separate entry for the EVENT_STORAGE." }, { "from": "human", "value": "package de.ppi.samples.fuwesta.selophane.base;\n\nimport org.junit.rules.RuleChain;\n\nimport de.ppi.selenium.junit.DelegatingWebServer;\nimport de.ppi.selenium.junit.EventLogRule;\nimpo...
java
chosen
[ { "from": "system", "value": "Use a random server port in the Couchbase sample’s tests" }, { "from": "human", "value": "package sample.data.couchbase;\n\nimport java.net.ConnectException;\n\nimport org.junit.Rule;\nimport org.junit.Test;\n\nimport org.springframework.boot.builder.SpringApplicati...
java
chosen
[ { "from": "system", "value": "Remove import that is only used in JavaDoc\n\n+review REVIEW-6257\n" }, { "from": "human", "value": "/*\n * Copyright 2016 the original author or authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except ...
java
chosen
[ { "from": "system", "value": "Fix crash on boot (Android 8.0 or later)\n" }, { "from": "human", "value": "package jp.takke.datastats;\n\nimport android.content.BroadcastReceiver;\nimport android.content.Context;\nimport android.content.Intent;\nimport android.content.SharedPreferences;\nimport a...
java
chosen
[ { "from": "system", "value": "Add the stack as it might be useful :P\n" }, { "from": "human", "value": "package reborncore.api;\n\nimport net.minecraft.entity.player.EntityPlayer;\nimport net.minecraft.util.EnumFacing;\nimport net.minecraft.util.math.BlockPos;\nimport net.minecraft.world.World;...
java
chosen
[ { "from": "system", "value": "Set up intial JFrame stuff, ish laid out skeleton for the lulz.\n" }, { "from": "human", "value": "/**\n * Lolifier.class\n * Created: 16-09-2013\n * @author Allek\n * @since 0.0.0\n **/\npublic class Lolifier {\n\n}" }, { "from": "gpt", "value": "/*\n *...
java
chosen
[ { "from": "system", "value": "Split call into two lines\n" }, { "from": "human", "value": "package beaform.gui;\n\nimport java.awt.BorderLayout;\nimport java.awt.Component;\n\nimport javax.swing.JPanel;\nimport javax.swing.JScrollPane;\n\nimport beaform.gui.debug.DebugUtilities;\n\n/**\n * This ...
java
chosen
[ { "from": "system", "value": "Fix temporary files remaining after execution\n\nFor each run of the plugin, a temporary file is created, but never cleaned. This check ensure that the temporary file is deleted at the JVM exit.\n" }, { "from": "human", "value": "package net_alchim31_maven_yuicompre...
java
chosen
[ { "from": "system", "value": "Improve the greeting template validation and messages.\n" }, { "from": "human", "value": "package hello.models;\n\nimport java.io.Serializable;\n\nimport javax.persistence.Entity;\nimport javax.persistence.GeneratedValue;\nimport javax.persistence.Id;\nimport javax....
java
chosen
[ { "from": "system", "value": "Modify prop generation to encompass the whole chunk instead of each of the 16x16 blocks.\n" }, { "from": "human", "value": "/*\n * Trident - A Multithreaded Server Alternative\n * Copyright 2016 The TridentSDK Team\n *\n * Licensed under the Apache License, Version ...
java
chosen
[ { "from": "system", "value": "Change the conveyor speed when shooting to max speed.\n\nWhen shooting the discs the conveyor will run at full speed.\n" }, { "from": "human", "value": "package com.edinarobotics.zed.subsystems;\n\nimport com.edinarobotics.utils.subsystems.Subsystem1816;\nimport edu...
java
chosen
[ { "from": "system", "value": "Increase util package version for API minor change\n" }, { "from": "human", "value": "@org.osgi.annotation.versioning.Version(\"1.0.0\")\npackage io.primeval.codex.util;\n" }, { "from": "gpt", "value": "@org.osgi.annotation.versioning.Version(\"1.1.0\")\...
java
chosen
[ { "from": "system", "value": "Add custom radius constructor with view\n" }, { "from": "human", "value": "package com.takusemba.spotlight.shapes;\n\nimport android.graphics.Canvas;\nimport android.graphics.Paint;\nimport android.graphics.PointF;\nimport android.view.View;\n\npublic class Circle e...
java
chosen
[ { "from": "system", "value": "Increase splash screen delay and finish splash screen activity.\n" }, { "from": "human", "value": "package de.fu_berlin.cdv.chasingpictures.activity;\n\nimport android.app.Activity;\nimport android.content.Intent;\nimport android.os.Bundle;\nimport android.os.Handle...
java
chosen
[ { "from": "system", "value": "Add an example for a nonstrict named parameter method" }, { "from": "human", "value": "/**\n * Copyright 2010-2014 Ralph Schaer <ralphschaer@gmail.com>\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in ...
java
chosen
[ { "from": "system", "value": "Fix for RPC calls in Kafka actions\n" }, { "from": "human", "value": "/**\n * Copyright © 2016-2018 The Thingsboard Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License....
java
chosen
[ { "from": "system", "value": "Test refactoring (Main reason: Trigger a travis build)\n" }, { "from": "human", "value": "package com.xaadin;\n\nimport com.vaadin.ui.*;\nimport org.junit.Test;\n\nimport java.net.URL;\n\nimport static org.fest.assertions.api.Assertions.assertThat;\n\npublic class P...
java
chosen
[ { "from": "system", "value": "Enable StrictMode in debug build\n\n" }, { "from": "human", "value": "package com.github.ayltai.newspaper;\n\nimport android.app.Application;\n\nimport com.facebook.common.logging.FLog;\nimport com.facebook.stetho.Stetho;\nimport com.github.ayltai.newspaper.util.Tes...
java
chosen
[ { "from": "system", "value": "Add remove from List method\n" }, { "from": "human", "value": "import java.util.HashMap;\nimport java.util.Iterator;\nimport java.util.Map;\n\n/**\n * Created by mazhuang on 2016/9/13.\n */\npublic class CollectionsOperate {\n public static void main(String[] arg...
java
chosen
[ { "from": "system", "value": "Make sure pipes are called in order\n" }, { "from": "human", "value": "package nl.fifth.postulate.circuit;\n\nimport org.junit.Test;\n\nimport static org.mockito.Mockito.mock;\nimport static org.mockito.Mockito.verify;\n\npublic class PipeAssemblyTest {\n @Test\n...
java
chosen
[ { "from": "system", "value": "Make sure that connection is timed out\n" }, { "from": "human", "value": "package name.webdizz.jeeconf.fault.tolerance.timeout;\n\nimport org.apache.http.client.config.RequestConfig;\nimport org.apache.http.client.methods.HttpGet;\nimport org.apache.http.conn.Connec...
java
chosen
[ { "from": "system", "value": "Add environment to newly-generated task IDs.\n\n\n\n\n" }, { "from": "human", "value": "package com.twitter.aurora.scheduler;\n\nimport java.util.UUID;\n\nimport com.google.common.base.Function;\nimport com.google.common.base.Preconditions;\nimport com.google.inject...
java
chosen
[ { "from": "system", "value": "Fix errors with Free version.\n" }, { "from": "human", "value": "package com.antew.redditinpictures;\n\nimport com.antew.redditinpictures.library.service.RedditService;\nimport com.antew.redditinpictures.ui.ImageDetailActivityFree;\nimport com.antew.redditinpictures...
java
chosen
[ { "from": "system", "value": "Make email and password have default values\n\n* which must be overriden" }, { "from": "human", "value": "package com.fns.xlator.client.impl;\n\nimport org.hibernate.validator.constraints.NotEmpty;\nimport org.springframework.beans.factory.annotation.Value;\nimport ...
java
chosen
[ { "from": "system", "value": "Remove excessive empty line after copyright header" }, { "from": "human", "value": "/*\n * Copyright (c) 2000-2016 TeamDev Ltd. All rights reserved.\n * TeamDev PROPRIETARY and CONFIDENTIAL.\n * Use is subject to license terms.\n */\n\npackage com.teamdev.jxmaps.dem...
java
chosen
[ { "from": "system", "value": "Refactor Date to a String for compatibility purposes\n" }, { "from": "human", "value": "package com.litmus.worldscope.model;\n\nimport java.util.Date;\n\n/**\n * Stream object returned from WorldScope App Server when creating a new stream\n */\npublic class WorldSco...
java
chosen
[ { "from": "system", "value": "Insert new files, Alura, Projeto de Algoritmos 1, Aula 20\n" }, { "from": "human", "value": "public class TestaOrdenacao {\n\n public static void main(String[] args) {\n\n Produto produtos[] = {\n new Produto(\"Lamborghini\", 1000000),\n new Produto(\"...
java
chosen
[ { "from": "system", "value": "Refactor to use GridIdentifiableDao interface from CTMS commons (in prep for moving it up there)\n\n\nSVN-Revision: 1592\n" }, { "from": "human", "value": "package gov.nih.nci.cabig.caaers.tools.editors;\n\nimport gov.nih.nci.cabig.caaers.dao.GridIdentifiableDao;\ni...
java
chosen
[ { "from": "system", "value": "Refactor and make it a bit easier to read" }, { "from": "human", "value": "package info.u_team.u_team_core.util.registry;\n\nimport java.util.function.Consumer;\n\nimport net.minecraftforge.common.MinecraftForge;\nimport net.minecraftforge.eventbus.api.IEventBus;\ni...
java
chosen
[ { "from": "system", "value": "Fix bug ao criar novas instâncias no getBooks. Adicionando sleep para se poder ver as animações.\n" }, { "from": "human", "value": "package br.ufu.renova.scraper;\n\nimport java.io.IOException;\nimport java.util.*;\n\n/**\n * Created by yassin on 10/19/16.\n */\npub...
java
chosen
[ { "from": "system", "value": "Change argument name to configurationName\n" }, { "from": "human", "value": "package com.github.blindpirate.gogradle.core.dependency.produce.strategy;\n\nimport com.github.blindpirate.gogradle.core.dependency.GolangDependencySet;\nimport com.github.blindpirate.gogra...
java
chosen
[ { "from": "system", "value": "Add any/every, and optimize some functions (knowing it's empty string)\n" }, { "from": "human", "value": "package ceylon.language;\n\nimport com.redhat.ceylon.compiler.java.metadata.Ceylon;\nimport com.redhat.ceylon.compiler.java.metadata.Ignore;\n\n@Ignore\n@Ceylon...
java
chosen
[ { "from": "system", "value": "Fix variable conflict in source condition.\n" }, { "from": "human", "value": "/*\n* Copyright 2013 the original author or authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the Lice...
java
chosen
[ { "from": "system", "value": "Fix IDE nag (unused variable)\n\ngit-svn-id: 79cef5a5a257cc9dbe40a45ac190115b4780e2d0@1842706 13f79535-47bb-0310-9956-ffa450edef68\n" }, { "from": "human", "value": "/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license ...
java
chosen
[ { "from": "system", "value": "Make public - otherwise not visible to the UI (JSP)\n" }, { "from": "human", "value": "/*\r\n * Copyright 2000-2013 JetBrains s.r.o.\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance wi...
java
chosen
[ { "from": "system", "value": "Add tests for incorrect input\n" }, { "from": "human", "value": "package org.jstanier;\n\nimport static org.mockito.Mockito.when;\n\nimport java.io.StringReader;\n\nimport org.junit.Test;\nimport org.junit.runner.RunWith;\nimport org.mockito.InjectMocks;\nimport org...
java
chosen
[ { "from": "system", "value": "[SMALLFIX] Use static import for standard test utilities\n\n\n\npr-link: Alluxio/alluxio#8981\nchange-id: cid-e8e2596b0f3cb68489b88cbf42646844098151dc" }, { "from": "human", "value": "/*\n * The Alluxio Open Foundation licenses this work under the Apache License, ve...
java
chosen
[ { "from": "system", "value": "Change assert, because the order of filepath is not guaranteed.\n" }, { "from": "human", "value": "package net.unit8.falchion;\n\nimport org.junit.Test;\n\nimport java.io.File;\n\nimport static org.hamcrest.CoreMatchers.*;\nimport static org.junit.Assert.*;\n\n/**\n...
java
chosen
[ { "from": "system", "value": "Handle empty list reversal corner case\n" }, { "from": "human", "value": "package org.metaborg.meta.lang.dynsem.interpreter.utils;\n\nimport java.util.LinkedList;\n\nimport com.github.krukow.clj_lang.IPersistentStack;\nimport com.github.krukow.clj_lang.PersistentLis...
java
chosen
[ { "from": "system", "value": "Remove accidentally committed debug code\n" }, { "from": "human", "value": "/*\n * Copyright 2012-2019 the original author or authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with t...
java
chosen
[ { "from": "system", "value": "Include branch name in fetch\n" }, { "from": "human", "value": "package zielu.gittoolbox.ui.statusBar;\n\nimport com.intellij.openapi.actionSystem.AnActionEvent;\nimport com.intellij.openapi.project.DumbAwareAction;\nimport git4idea.i18n.GitBundle;\nimport git4idea....
java
chosen
[ { "from": "system", "value": "Access to computation context service through actors was implemented.\n" }, { "from": "human", "value": "package org.cat.eye.engine.container.unit.deployment;\n\nimport org.cat.eye.engine.common.deployment.BundleClassLoader;\nimport org.cat.eye.engine.common.deploym...
java
chosen
[ { "from": "system", "value": "XWIKI-7161: Add support for classifier in Maven/Aether repository\nhandler\nSet proper dependency id\n" }, { "from": "human", "value": "/*\n * See the NOTICE file distributed with this work for additional\n * information regarding copyright ownership.\n *\n * This i...
java
chosen
[ { "from": "system", "value": "Change behaviour to fail on number string of length 0 (zero)\n" }, { "from": "human", "value": "package foam.lib.json;\n\nimport foam.lib.parse.*;\n\npublic class FloatParser implements Parser {\n public PStream parse(PStream ps, ParserContext x) {\n StringBuild...
java
chosen
[ { "from": "system", "value": "Add number of sub items to model\n" }, { "from": "human", "value": "package com.placeholder.rich.todotreeprototype.model;\n\npublic class Item {\n private final String name;\n private boolean complete;\n\n public Item(String name) {\n this(name, fals...
java
chosen
[ { "from": "system", "value": "Improve metric http client to deal with missing report data list.\n" }, { "from": "human", "value": "package io.sphere.sdk.play.metrics;\n\nimport io.sphere.sdk.http.HttpClient;\nimport io.sphere.sdk.http.HttpRequest;\nimport io.sphere.sdk.http.HttpResponse;\nimport...
java
chosen
[ { "from": "system", "value": "Revert \"Test failing build with buck-out/cache on Travis.\"\n\nThis reverts commit 8652fa31199b01fb01dc92646d0ba2dbec658474.\n" }, { "from": "human", "value": "package ca.junctionbox.cljbuck.build;\n\nimport org.junit.Test;\n\nimport static org.hamcrest.CoreMatcher...
java
chosen
[ { "from": "system", "value": "Add a map to promoting priorities.\n" }, { "from": "human", "value": "package org.nwapw.abacus.number;\n\npublic abstract class Function {\n\n protected abstract boolean matchesParams(Number[] params);\n protected abstract Number applyInternal(Number[] params)...
java
chosen
[ { "from": "system", "value": "Add null url on close\n" }, { "from": "human", "value": "package com.freshplanet.ane.AirAACPlayer.functions;\n\nimport com.adobe.fre.FREContext;\nimport com.adobe.fre.FREFunction;\nimport com.adobe.fre.FREObject;\nimport com.freshplanet.ane.AirAACPlayer.Extension;\n...
java
chosen
[ { "from": "system", "value": "Correct path to the activation link\n" }, { "from": "human", "value": "package toolbox;\n\nimport java.util.ArrayList;\n\npublic class ActivationEmail implements IContentProvider\n{\n\n private String activationKey;\n\n public ActivationEmail(String activation...
java
chosen
[ { "from": "system", "value": "Make small change in panel size" }, { "from": "human", "value": "package de.tudresden.inf.lat.born.main;\n\nimport java.awt.Dimension;\nimport java.util.Objects;\n\nimport javax.swing.JFrame;\n\nimport org.semanticweb.owlapi.apibinding.OWLManager;\n\n/**\n * This is...
java
chosen
[ { "from": "system", "value": "Check if the UIService is already visible before setting it to visible.\n" }, { "from": "human", "value": "package net.java.sip.communicator.impl.osdependent.macosx;\n\nimport net.java.sip.communicator.impl.osdependent.*;\n\nimport com.apple.eawt.*;\n\n/**\n * MacOS...
java
chosen
[ { "from": "system", "value": "Modify using Google Java code style and format\n" }, { "from": "human", "value": "package org.mydalayer.parsing.builder;\n\nimport java.util.Arrays;\nimport java.util.HashSet;\nimport java.util.Set;\n\nimport org.mydalayer.client.support.Configuration;\n\n/**\n *\n ...
java
chosen
[ { "from": "system", "value": "Set fade duration to 1\n" }, { "from": "human", "value": "package me.eddiep.lifxbulb.rave.system;\r\n\r\nimport com.github.besherman.lifx.LFXHSBKColor;\r\nimport com.github.besherman.lifx.LFXLight;\r\n\r\nimport java.awt.*;\r\n\r\npublic class LightHolder {\r\n p...
java
chosen
[ { "from": "system", "value": "Increase the AsyncStorage capacity fromm 5mb to 100mb\n" }, { "from": "human", "value": "package com.ebudgie;\n\nimport android.app.Application;\nimport android.util.Log;\n\nimport com.facebook.react.ReactApplication;\nimport io.underscope.react.fbak.RNAccountKitPac...
java
chosen
[ { "from": "system", "value": "Add src set data class for media-list endpoint\n" }, { "from": "human", "value": "package org.wikipedia.gallery;\n\nimport androidx.annotation.NonNull;\nimport androidx.annotation.Nullable;\n\nimport com.google.gson.annotations.SerializedName;\n\nimport org.apache.c...
java
chosen
[ { "from": "system", "value": "Fix test for empty summation.\n" }, { "from": "human", "value": "package org.clafer.ir;\n\nimport org.clafer.ir.IrQuickTest.Solution;\nimport static org.clafer.ir.Irs.*;\nimport org.junit.Test;\nimport org.junit.runner.RunWith;\nimport org.chocosolver.solver.constra...
java
chosen
[ { "from": "system", "value": "Load the missing image synchronously, improve assert error messages.\n\nWe need to load sync so that the error is logged while our log collector is in\nplace. Yay testing.\n" }, { "from": "human", "value": "//\n// $Id$\n\npackage playn.java;\n\nimport org.junit.Test...
java
chosen
[ { "from": "system", "value": "Change host name to ml.jaseg.net\n" }, { "from": "human", "value": "package de.cketti.matelight;\n\nimport java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStream;\nimport java.io.InputStreamReader;\nimport java.io.OutputStream;\nimport java...
java
chosen
[ { "from": "system", "value": "Fix ALL failures in Java\n" }, { "from": "human", "value": "package fp.grados.tipos;\n\nimport java.time.LocalDate;\nimport java.util.Comparator;\nimport java.util.Optional;\nimport java.util.SortedMap;\nimport java.util.TreeMap;\nimport java.util.stream.Collectors;...
java
chosen
[ { "from": "system", "value": "Implement doGet for location servlet (not yet tested.\n" }, { "from": "human", "value": "import javax.servlet.annotation.WebServlet;\nimport javax.servlet.http.HttpServlet;\nimport javax.servlet.http.HttpServletRequest;\nimport javax.servlet.http.HttpServletResponse...
java
chosen
[ { "from": "system", "value": "Remove only unused files from cache" }, { "from": "human", "value": "package com.coreoz.plume.file.services.cache;\n\nimport java.util.concurrent.TimeUnit;\nimport java.util.function.Function;\n\nimport javax.inject.Singleton;\n\nimport com.google.common.cache.Cache...
java
chosen
[ { "from": "system", "value": "Make the problems/generated directory usage relative\n" }, { "from": "human", "value": "/*\n * Author: Filip Dvořák <filip.dvorak@runbox.com>\n *\n * Copyright (c) 2013 Filip Dvořák <filip.dvorak@runbox.com>, all rights reserved\n *\n * Publishing, providing furthe...
java
chosen
[ { "from": "system", "value": "Make security util to work for mock dashboard server mode.\n" }, { "from": "human", "value": "package org.slc.sli.util;\r\n\r\nimport org.springframework.security.core.context.SecurityContextHolder;\r\nimport org.springframework.security.core.userdetails.UserDetails...
java
chosen
[ { "from": "system", "value": "Add support for end-marker token\n" }, { "from": "human", "value": "package com.fasterxml.sort.util;\n\nimport java.io.IOException;\nimport java.io.InterruptedIOException;\nimport java.util.concurrent.BlockingQueue;\n\nimport com.fasterxml.sort.DataReader;\n\n/**\n ...
java
chosen
[ { "from": "system", "value": "Add method to allow ungenericed map to genericed map fudge\n" }, { "from": "human", "value": "package net.darkmist.alib.generics;\n\npublic class GenericFudge\n{\n\t@SuppressWarnings(\"unchecked\")\n\tstatic public <T> Class<? extends T> getClass(T obj)\n\t{\n\t\tre...
java
chosen
[ { "from": "system", "value": "Allow multiple types to be imported with single call\n\nSince both the command line client and the Gradle task support\nspecifying multiple imports from a module with a shorthand syntax, it\nmakes things simpler for callers to allow passing multiple types in a\nsingle addImport...
java
chosen
[ { "from": "system", "value": "Add comments to GenericsPlugin, refactor GenericsPlugin.getSettings to getDataNode\n" }, { "from": "human", "value": "package com.jcwhatever.bukkit.musical;\n\nimport com.jcwhatever.bukkit.generic.GenericsPlugin;\nimport com.jcwhatever.bukkit.musical.commands.Comman...
java
chosen
[ { "from": "system", "value": "Clarify comments for columns of the ontology relations datafiles\n" }, { "from": "human", "value": "package uk.ac.ebi.quickgo.ontology.traversal.read;\n\n/**\n * Enumeration representing the columns of the relationship source files.\n *\n * CHILD_ID, PARENT_ID, RELA...
java
chosen
[ { "from": "system", "value": "Throw IllegalArgumentException if constructor is called with a null argument\n" }, { "from": "human", "value": "package com.google.maps.android.data.kml;\r\n\r\nimport com.google.maps.android.data.Geometry;\r\n\r\nimport java.util.ArrayList;\r\n\r\n/**\r\n * Created...
java
chosen
[ { "from": "system", "value": "Fix the build to test Hudson\n\ngit-svn-id: ec6ef1d57ec0831ce4cbff3b75527511e63bfbe3@736937 13f79535-47bb-0310-9956-ffa450edef68\n" }, { "from": "human", "value": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agre...
java
chosen
[ { "from": "system", "value": "Change clear command success message\n" }, { "from": "human", "value": "package guitests;\n\nimport static org.junit.Assert.assertTrue;\n\nimport org.junit.Test;\n\npublic class ClearCommandTest extends TaskManagerGuiTest {\n\n @Test\n public void clear() {\n\...
java
chosen
[ { "from": "human", "value": "Add repo for form attribute\n" }, { "from": "gpt", "value": "package com.ushahidi.android.domain.repository;\n\nimport com.ushahidi.android.domain.entity.FormAttribute;\nimport com.ushahidi.android.domain.entity.From;\n\nimport java.util.List;\n\nimport rx.Observable...
java
chosen
[ { "from": "system", "value": "Add some more data points to ChangeEvent check\n" }, { "from": "human", "value": "/**\n * Copyright (C) 2010-2011 LShift Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the Licens...
java
chosen
[ { "from": "human", "value": "Add test class for prims MST\n" }, { "from": "gpt", "value": "package prims;\n\nimport prims.Prims;\n\n/*\n\tThis class tests class Prims (Minimum Spanning Tree Algorithm)\n*/\n\nclass TestPrims{\n\n\t// Tests MST and prints MST edges\n\n\tpublic static void testMST1...
java
chosen
[ { "from": "human", "value": "Add test for Gitiles repo browser\n" }, { "from": "gpt", "value": "package hudson.plugins.git.browser;\n\nimport hudson.plugins.git.GitChangeSet;\nimport java.net.URL;\nimport java.util.ArrayList;\nimport java.util.Collection;\nimport java.util.List;\nimport org.juni...
java
chosen
[ { "from": "human", "value": "Add test for updateSql. Far from complete, but a start..\n\ngit-svn-id: b9063b25153de5216c397e252c209c32bc9c47ff@331927 13f79535-47bb-0310-9956-ffa450edef68\n" }, { "from": "gpt", "value": "package org.apache.ddlutils.platform;\r\n\r\n/*\r\n * Copyright 1999-2005 The...
java
chosen
[ { "from": "human", "value": "Add test for hasCapability* methods of ConnectableDevice\n" }, { "from": "gpt", "value": "package com.connectsdk.device;\n\nimport java.util.ArrayList;\nimport java.util.List;\n\nimport junit.framework.Assert;\n\nimport org.junit.Before;\nimport org.junit.Test;\nimpo...
java
chosen
[ { "from": "human", "value": "Add test to insure mergeWith does not throw Exception\n" }, { "from": "gpt", "value": "package org.fxmisc.richtext.model;\n\nimport org.fxmisc.richtext.InlineCssTextArea;\nimport org.junit.Test;\n\npublic class AreaTest {\n\n private InlineCssTextArea area = new I...
java
chosen
[ { "from": "human", "value": "Test case for interrupt deferral\n" }, { "from": "gpt", "value": "/*\n * JBoss, Home of Professional Open Source.\n * Copyright 2014, Red Hat, Inc., and individual contributors\n * as indicated by the @author tags. See the copyright.txt file in the\n * distribution f...
java
chosen
[ { "from": "human", "value": "Add unit test for common utilities\n" }, { "from": "gpt", "value": "// default package\n\nimport static org.junit.jupiter.api.Assertions.assertArrayEquals;\nimport static org.junit.jupiter.api.Assertions.assertEquals;\nimport static org.junit.jupiter.api.Assertions.a...
java
chosen
[ { "from": "human", "value": "Add tests to the sorted set commands\n" }, { "from": "gpt", "value": "package org.sagebionetworks.bridge.redis;\n\nimport static org.mockito.Mockito.mock;\nimport static org.mockito.Mockito.times;\nimport static org.mockito.Mockito.verify;\nimport static org.mockito....
java
chosen
[ { "from": "human", "value": "Fix a programming contest template for Java8\n" }, { "from": "gpt", "value": "import java.io.*;\nimport java.util.*;\n\npublic class <+FILEBASE+> {\n\tpublic static void main(String[] args) throws Exception {\n\t\ttry (BufferedReader br = new BufferedReader(new Input...
java
chosen
[ { "from": "human", "value": "Add an object pool to cache immutable or shared objects.\n" }, { "from": "gpt", "value": "/* **********************************************************************\n Copyright 2006 Rensselaer Polytechnic Institute. All worldwide rights reserved.\n\n Redistribut...
java
chosen
[ { "from": "human", "value": "Add java solution for 153. Find Minimum in Rotated Sorted Array\n\n153. Find Minimum in Rotated Sorted Array: https://leetcode.com/problems/find-minimum-in-rotated-sorted-array/" }, { "from": "gpt", "value": "package leetcode.find_minimum_in_rotated_sorted_array;\n\n...
java
chosen
[ { "from": "human", "value": "Add proper unit tests for composite pattern\n" }, { "from": "gpt", "value": "package com.iluwatar.composite;\n\nimport org.junit.After;\nimport org.junit.Before;\nimport org.junit.Test;\n\nimport java.io.ByteArrayOutputStream;\nimport java.io.PrintStream;\n\nimport s...
java
chosen
[ { "from": "human", "value": "Revert \"delete unused class\". Only unused within the project itself.\n\nThis reverts commit f1830a3726e7393eb89b02cd0092c7d2f6f2991a.\n" }, { "from": "gpt", "value": "/*\n * Copyright 2015-2016 LMAX Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (th...
java
chosen
[ { "from": "human", "value": "Add utiltiy class for making HTML tables\n" }, { "from": "gpt", "value": "\npackage org.scijava.notebook.converter;\n\npublic class HTMLTableBuilder {\n\n /** Returns the style tag used to style HTML tables */\n public static String getTableStyle(final boolean ...
java
chosen
[ { "from": "human", "value": "Add Third Exercise Veritcal Line\n" }, { "from": "gpt", "value": "import java.util.Scanner;\n\n/**\n * Created by Nathan_Zeplowitz on 4/11/15.\n */\npublic class VerticalLine {\n public static void main(String[] args) {\n Scanner in = new Scanner(System.in)...
java
chosen
[ { "from": "human", "value": "Add test case for custom type qualifiers\n\ngit-svn-id: e7d6bde23f017c9ff4efd468d79d66def666766b@8436 eae3c2d3-9b19-0410-a86e-396b6ccb6ab3\n" }, { "from": "gpt", "value": "package jsr305;\n\nimport javax.annotation.meta.When;\n\n\n\npublic class TestFooNoControlFlow ...
java
chosen
[ { "from": "human", "value": "Add source files that consumes generated sources files\n" }, { "from": "gpt", "value": "import com.fizzed.rocker.RockerModel;\nimport com.fizzed.rocker.runtime.StringBuilderOutput;\n\npublic class Main {\n\n public static void main(String[] args) {\n Rocker...
java
chosen
[ { "from": "human", "value": "Add Test case for CardInfo class" }, { "from": "gpt", "value": "package net.wisedog.android.whooing.advsms.test;\n\nimport java.util.ArrayList;\n\nimport net.wisedog.android.whooing.advsms.CardInfo;\nimport junit.framework.TestCase;\n\npublic class CardInfoTest exten...
java
chosen
[ { "from": "human", "value": "Add statement to problem 30\n" }, { "from": "gpt", "value": "/*\n * Copyright (C) 2014 Pedro Vicente Gómez Sánchez.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You ...
java
chosen
[ { "from": "human", "value": "Add blank test for disk equilibrium allocator\n" }, { "from": "gpt", "value": "package com.sonian.elasticsearch;\n\nimport org.testng.annotations.Test;\n\nimport static org.hamcrest.MatcherAssert.assertThat;\nimport static org.hamcrest.Matchers.equalTo;\n\n/**\n * @a...
java
chosen
[ { "from": "human", "value": "Add trick or treat problem\n" }, { "from": "gpt", "value": "/**\n * You and your friends are going trick-or-treating. Like everyone else, you want to \n * get as much candy as possible. Like a true engineer, you want to optimize the route so that you\n * don't have t...
java
chosen
[ { "from": "human", "value": "Add an example of a menu system in a while loop\n" }, { "from": "gpt", "value": "/*\n An example of a menu system in a while loop\n*/\n\nimport java.util.Scanner;\n\npublic class WhileMenu\n{\n public static void main(String[] args)\n {\n Scanner inpu...
java
chosen
[ { "from": "human", "value": "Allow to wrap another SslContext implementation and do extra init steps on the SSLEngine.\n\nMotivation:\n\nSometimes its needed to customize the SSLEngine (like setting protocols etc). For this it would be useful if the user could wrap an SslContext and do init steps on the SSL...
java
chosen
[ { "from": "human", "value": "Add test to ensure there are no duplicates\n" }, { "from": "gpt", "value": "package de.retest.recheck.meta;\n\nimport static org.assertj.core.api.Assertions.assertThatCode;\n\nimport org.junit.jupiter.api.Test;\n\nclass GlobalMetadataProviderTest {\n\n\t@Test\n\tvoid...
java
chosen
[ { "from": "human", "value": "Add test case; could not reproduce false positive report\n\ngit-svn-id: e7d6bde23f017c9ff4efd468d79d66def666766b@14758 eae3c2d3-9b19-0410-a86e-396b6ccb6ab3\n" }, { "from": "gpt", "value": "package sfBugsNew;\n\nimport java.sql.Connection;\nimport java.sql.PreparedSta...
java
chosen