conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "human", "value": "Add a double spending test program\n" }, { "from": "gpt", "value": "package com.google.bitcoin.examples;\n\nimport com.google.bitcoin.core.*;\nimport com.google.bitcoin.kits.WalletAppKit;\nimport com.google.bitcoin.params.RegTestParams;\nimport com.google.bitcoin.uti...
java
chosen
[ { "from": "human", "value": "Add a sample with Standard Mac menus\n\nStarting point only, most items are TBD.\n" }, { "from": "gpt", "value": "package de.codecentric.centerdevice.sample;\n\nimport de.codecentric.centerdevice.MenuToolkit;\nimport javafx.application.Application;\nimport javafx.sce...
java
chosen
[ { "from": "human", "value": "[misc] Add test (really this time)\n" }, { "from": "gpt", "value": "/*\n * See the NOTICE file distributed with this work for additional\n * information regarding copyright ownership.\n *\n * This is free software; you can redistribute it and/or modify it\n * under t...
java
chosen
[ { "from": "human", "value": "Move PhenotypeArchive to trunk\nRefactored to use generics.\nUse generics.\nlightweight object representation for HTML / JSON / XML export.\nList container. It is used for HTML rendering with jstl.\n" }, { "from": "gpt", "value": "/**\n * Copyright © 2011-2012 EMBL -...
java
chosen
[ { "from": "human", "value": "Revert \"Changed name to past tense\"\n\nThis reverts commit e6182cbd12ee45449b77bde0ee414787da3362b8.\n" }, { "from": "gpt", "value": "package com.cinnamon.gfx;\n\n/**\n * <p>\n * Listener to be called whenever the {@link ImageFactory}'s drawing data\n * may...
java
chosen
[ { "from": "human", "value": "Create class to encapsulate Command inputs\n" }, { "from": "gpt", "value": "package seedu.task.logic.commands;\n\nimport java.util.HashMap;\nimport java.util.Optional;\n\npublic class CommandInput {\n private String command;\n private String mainInput;\n pri...
java
chosen
[ { "from": "human", "value": "Add basic event log model\n" }, { "from": "gpt", "value": "package org.adaptlab.chpir.android.survey.Models;\n\nimport java.util.Date;\n\nimport com.activeandroid.Model;\nimport com.activeandroid.annotation.Column;\n\npublic class EventLog extends Model {\n privat...
java
chosen
[ { "from": "system", "value": "Copy result to out parameter\n" }, { "from": "human", "value": "package org.osmdroid.google.wrapper.v2;\r\n\r\nimport com.google.android.gms.maps.model.LatLng;\r\nimport org.osmdroid.api.IGeoPoint;\r\nimport org.osmdroid.api.IProjection;\r\nimport org.osmdroid.util....
java
chosen
[ { "from": "human", "value": "Check that we are doing the right thing for hashtable and properties nullness\n\ngit-svn-id: e7d6bde23f017c9ff4efd468d79d66def666766b@11578 eae3c2d3-9b19-0410-a86e-396b6ccb6ab3\n" }, { "from": "gpt", "value": "package bugIdeas;\n\nimport java.util.Hashtable;\nimport ...
java
chosen
[ { "from": "human", "value": "Add an interface for sending requests to sessions.\n" }, { "from": "gpt", "value": "/*******************************************************************************\n * Copyright (C) 2017 Push Technology Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (th...
java
chosen
[ { "from": "human", "value": "Add a class to get logger\n" }, { "from": "gpt", "value": "package com.bloatit.common;\n\nimport org.apache.log4j.Logger;\n\n// TRACE\n// DEBUG\n// INFO \n// WARN -> not correct behavior but non so serious\n// ERROR -> should be reported to the admin\n// FATAL -> sh...
java
chosen
[ { "from": "human", "value": "Add tests for simple api\n" }, { "from": "gpt", "value": "package tests;\n\nimport junit.framework.TestCase;\nimport api.SimpleAPI;\n\npublic class TestSimpleAPI extends TestCase {\n\t/**\n\t * Test method for {@link api.SimpleAPI#add(int, int)}.\n\t */\n\tpublic voi...
java
chosen
[ { "from": "human", "value": "Create stub to test MinterServiceImpl\n\nThis class was created to test the API provided by MinterService. All\nof the test cases are failing on purpose and will be updated at a later\ntime.\n" }, { "from": "gpt", "value": "package com.hida.service;\n\nimport com.hid...
java
chosen
[ { "from": "human", "value": "Add statement for problem 9\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 statement to problem 54\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 test case for URI\n" }, { "from": "gpt", "value": "package com.continuuity.passport.utils;\n\nimport org.junit.Test;\n\nimport java.net.MalformedURLException;\nimport java.net.URI;\nimport java.net.URISyntaxException;\n\n/**\n *\n */\npublic class TestURI {\n\n ...
java
chosen
[ { "from": "human", "value": "Add an I/O plugin for Datasets\n\nIt is short and sweet thanks to the new DatasetService I/O methods.\n" }, { "from": "gpt", "value": "/*\n * #%L\n * ImageJ software for multidimensional image processing and analysis.\n * %%\n * Copyright (C) 2009 - 2013 Board of Reg...
java
chosen
[ { "from": "human", "value": "Add solution for Counting valleys problem.\n" }, { "from": "gpt", "value": "import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\n\n// https://www.hackerrank.com/challenges/counting-valleys/problem\npublic class CountingValle...
java
chosen
[ { "from": "human", "value": "Check for blank (non-null) evidence statuses\n" }, { "from": "gpt", "value": "/*\n * Copyright (C) 2004 EBI, GRL\n * \n * This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by\...
java
chosen
[ { "from": "human", "value": "Add statement to problem 18\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 validator for user object\n" }, { "from": "gpt", "value": "package com.pollistics.models.validators;\n\nimport org.springframework.validation.Errors;\nimport org.springframework.validation.Validator;\nimport com.pollistics.models.*;\n\npublic class UserValidator ...
java
chosen
[ { "from": "human", "value": "Add support for loading a single torrent by id\n" }, { "from": "gpt", "value": "package api.torrents.torrents;\n\nimport api.son.MySon;\nimport api.soup.MySoup;\n\n/**\n * A standalone torrent request. contains information about the group the torrent\n * is in and th...
java
chosen
[ { "from": "human", "value": "Add skeleton for GhostRepository tests\n" }, { "from": "gpt", "value": "package com.pm.server.player;\n\nimport static org.junit.Assert.assertTrue;\nimport static org.junit.Assert.fail;\n\nimport java.util.List;\n\nimport org.apache.logging.log4j.LogManager;\nimport ...
java
chosen
[ { "from": "human", "value": "Add custom exception class for photo detection\n" }, { "from": "gpt", "value": "// Copyright 2019 Google LLC\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obt...
java
chosen
[ { "from": "human", "value": "Add basic test for emitting a point\n" }, { "from": "gpt", "value": "package fgis.server.support.geojson;\n\nimport java.io.ByteArrayOutputStream;\nimport java.io.StringReader;\nimport java.nio.charset.Charset;\nimport java.util.Arrays;\nimport javax.json.Json;\nimpo...
java
chosen
[ { "from": "human", "value": "Add day01 main file and set up for execution with IntelliJ\n" }, { "from": "gpt", "value": "package com.thoughtomaton.SamsJava21Days.day01;\n\nclass MarsApplication {\n public static void main(String[] args) {\n System.out.println(\"hello robot\");\n }\n...
java
chosen
[ { "from": "human", "value": "Create custom script tag component.\n" }, { "from": "gpt", "value": "package com.github.aureliano.verbum_domini.web.ui;\n\nimport java.io.IOException;\n\nimport javax.faces.component.FacesComponent;\nimport javax.faces.component.UIComponentBase;\nimport javax.faces.c...
java
chosen
[ { "from": "human", "value": "Add unit tests for ScientificNumberFormat\n" }, { "from": "gpt", "value": "//\n// TestJSONDecoding.java\n// xal\n//\n// Created by Tom Pelaia on 2/17/2011.\n// Copyright 2011 Oak Ridge National Lab. All rights reserved.\n//\n\npackage xal.tools.text;\n\nimport or...
java
chosen
[ { "from": "human", "value": "Add java solution for 173. Binary Search Tree Iterator\n\n173. Binary Search Tree Iterator: https://leetcode.com/problems/binary-search-tree-iterator/" }, { "from": "gpt", "value": "package leetcode.binary_search_tree_iterator;\n\nimport common.TreeNode;\n\npublic cl...
java
chosen
[ { "from": "human", "value": "Add statement to problem 76\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": "Change config to JSON (I2).\n" }, { "from": "gpt", "value": "package roart.service;\n\nimport java.time.LocalDate;\nimport java.util.ArrayList;\nimport java.util.HashMap;\nimport java.util.List;\nimport java.util.Map;\n\nimport roart.common.config.ConfigConstants;\ni...
java
chosen
[ { "from": "human", "value": "Add easy Vector String conversions\n" }, { "from": "gpt", "value": "/*\n * Copyright (c) 2015 Legend Zero LLC\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\...
java
chosen
[ { "from": "human", "value": "[ADD] Add class to get current opertive system" }, { "from": "gpt", "value": "/**\n * Copyright 2015 Alessandro Daniele, Fabio Cesarato, Andrea Giraldin\n * \n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in...
java
chosen
[ { "from": "human", "value": "Add preliminary command dispatcher service.\n" }, { "from": "gpt", "value": "/*\n * This file is part of Sponge, licensed under the MIT License (MIT).\n *\n * Copyright (c) SpongePowered.org <http://www.spongepowered.org>\n * Copyright (c) contributors\n *\n * Permis...
java
chosen
[ { "from": "human", "value": "Implement basic help command, which provides an overview over all registered commands\n" }, { "from": "gpt", "value": "package org.telegram.telegrambots.api.commands;\n\nimport org.telegram.telegrambots.BotLogger;\nimport org.telegram.telegrambots.TelegramApiExceptio...
java
chosen
[ { "from": "system", "value": "Make sure we ignore cancelled events." }, { "from": "human", "value": "package com.gmail.nossr50.listeners;\n\nimport org.bukkit.entity.Player;\nimport org.bukkit.event.EventHandler;\nimport org.bukkit.event.EventPriority;\nimport org.bukkit.event.Listener;\nimport ...
java
chosen
[ { "from": "human", "value": "Add generic click listener for AWT and SWT\n" }, { "from": "gpt", "value": "package com.samczsun.helios.gui;\n\nimport org.eclipse.swt.events.MouseEvent;\nimport org.eclipse.swt.events.MouseListener;\n\nimport java.util.function.BiConsumer;\n\n/**\n * @author DarkSer...
java
chosen
[ { "from": "human", "value": "Add zypper module support containing listProducts()\n" }, { "from": "gpt", "value": "package com.suse.salt.netapi.calls.modules;\n\nimport com.google.gson.reflect.TypeToken;\nimport com.suse.salt.netapi.calls.LocalCall;\n\nimport java.util.LinkedHashMap;\nimport java...
java
chosen
[ { "from": "human", "value": "Remove legend overrides from layers from Tilastokeskus\n" }, { "from": "gpt", "value": "package flyway.pti;\n\nimport fi.nls.oskari.util.JSONHelper;\nimport org.flywaydb.core.api.migration.BaseJavaMigration;\nimport org.flywaydb.core.api.migration.Context;\nimport or...
java
chosen
[ { "from": "human", "value": "Add class to group model-presentation conversion\n" }, { "from": "gpt", "value": "/*\n * Copyright 2016 Vladimir Kizelbashev\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": "human", "value": "Add java solution for 19. Remove Nth Node From End of List\n\n19. Remove Nth Node From End of List: https://leetcode.com/problems/remove-nth-node-from-end-of-list/" }, { "from": "gpt", "value": "package leetcode.remove_nth_node_from_end_of_list;\n\nimport java.util.A...
java
chosen
[ { "from": "human", "value": "Add OTLabbookManagerProvider and implementation, which provides a service which passes back a OTLabbookManager using the OTObjectService\n\ngit-svn-id: 8ebed0c25533aaea68ca43268d4d516467f97e6a@15264 6e01202a-0783-4428-890a-84243c50cc2b\n" }, { "from": "gpt", "value":...
java
chosen
[ { "from": "human", "value": "Add some tests to problem 60\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 service URI utility class\n" }, { "from": "gpt", "value": "package org.jboss.cx.remoting.core.util;\n\nimport java.net.URI;\nimport java.net.URISyntaxException;\nimport java.util.regex.Pattern;\nimport java.util.regex.Matcher;\n\n/**\n *\n */\npublic final class ...
java
chosen
[ { "from": "human", "value": "[YIL-53] Add factory to build the engine.\n" }, { "from": "gpt", "value": "// This file is part of the Yildiz-Online project, licenced under the MIT License\n// (MIT)\n//\n// Copyright (c) 2016 Grégory Van den Borre\n//\n// More infos avai...
java
chosen
[ { "from": "human", "value": "Add statement to problem 69\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": "Revert \"remove subsets for xu qian\"\n\nThis reverts commit e9277076a459a077a33e10b0394c65adc949ddca.\n" }, { "from": "gpt", "value": "import java.util.*;\npublic class Solution {\n public List<List<Integer>> result = new ArrayList<List<Integer>>();\n public L...
java
chosen
[ { "from": "system", "value": "Correct length in exe resource string tables\nthe change done by Matt Ellis (citizenmatt)\n" }, { "from": "human", "value": "/*\n * Copyright 2006 ProductiveMe Inc.\n * Copyright 2013 JetBrains s.r.o.\n *\n * Licensed under the Apache License, Version 2.0 (the \"Lic...
java
chosen
[ { "from": "human", "value": "Rearrange array in alternating positive & negative items with O(1) extra space\n" }, { "from": "gpt", "value": "package com.coderevisited.arrays;\n\nimport java.io.BufferedWriter;\nimport java.io.OutputStreamWriter;\nimport java.io.PrintWriter;\n\n/**\n * 1. start fr...
java
chosen
[ { "from": "human", "value": "Add delivery receipt test case\n" }, { "from": "gpt", "value": "package org.jsmpp.util;\n\nimport static org.testng.Assert.*;\nimport org.jsmpp.bean.DeliveryReceipt;\nimport org.testng.annotations.Test;\n\n/**\n * @author uudashr\n *\n */\npublic class DeliveryReceip...
java
chosen
[ { "from": "human", "value": "Implement MulticastChannelMessagePublisher class to handle Messages received via a multicast socket.\n" }, { "from": "gpt", "value": "package pt.up.fe.sdis.proj1.utils;\n\nimport java.io.IOException;\nimport java.net.DatagramPacket;\nimport java.net.InetAddress;\nimp...
java
chosen
[ { "from": "human", "value": "Test whether StateProxies are associated and disassociated correctly\n" }, { "from": "gpt", "value": "package com.fuzz.indicator;\n\nimport android.database.DataSetObserver;\nimport android.view.ViewTreeObserver;\n\nimport com.fuzz.indicator.proxy.StateProxy;\nimport...
java
chosen
[ { "from": "human", "value": "Add test for Android service\n" }, { "from": "gpt", "value": "package com.eqot.xray;\n\nimport android.content.Intent;\nimport android.test.ServiceTestCase;\n\nimport org.junit.Test;\n\npublic class SampleAndroidServiceTest extends ServiceTestCase<SampleAndroidServic...
java
chosen
[ { "from": "human", "value": "Add item slot with the IItemHandler that calls the onSlotChanged method" }, { "from": "gpt", "value": "package info.u_team.u_team_core.container;\n\nimport info.u_team.u_team_core.inventory.UItemStackHandler;\nimport net.minecraftforge.items.*;\n\npublic class ItemSl...
java
chosen
[ { "from": "human", "value": "Add task that stops the simulation if conditions are met to do so.\n" }, { "from": "gpt", "value": "/*\n * Copyright 2016 Will Knez <wbknez.dev@gmail.com>\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except i...
java
chosen
[ { "from": "human", "value": "Add tests for rAddCategoryAction class.\n" }, { "from": "gpt", "value": "/**\n * This source file is subject to the license that is bundled with this package in the file LICENSE.\n */\npackage com.codeup.application.actions;\n\nimport com.codeup.application.Categorie...
java
chosen
[ { "from": "human", "value": "Add AdditiveMapUtils and tests: addNumber(...)" }, { "from": "gpt", "value": "/**\n * \n */\npackage mathsquared.resultswizard2;\n\nimport static org.junit.Assert.assertEquals;\nimport static org.junit.Assert.fail;\n\nimport java.util.HashMap;\nimport java.util.Map;\...
java
chosen
[ { "from": "human", "value": "Add timer class for tests\n\nSigned-off-by: Andru Stefanescu <7ddc31439e278e07060dec99cf8ddedbee60ab4a@cam.ac.uk>\n" }, { "from": "gpt", "value": "package com.tngtech.jgiven.impl;\n\npublic class Timer {\n private long startNanoseconds;\n private long elapsedTime =...
java
chosen
[ { "from": "human", "value": "Solve No.10828 from Baekjoon Online Judge\n" }, { "from": "gpt", "value": "/*\n * Copyright 2017 haeun kim\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtai...
java
chosen
[ { "from": "human", "value": "Check for any retrotransposed transcripts that have translations (shouldn't be any).\n" }, { "from": "gpt", "value": "/*\n Copyright (C) 2003 EBI, GRL\n \n This library is free software; you can redistribute it and/or\n modify it under the terms of the GNU Lesser Gen...
java
chosen
[ { "from": "human", "value": "Add object to represent a cache of reusable, thread-local data.\n" }, { "from": "gpt", "value": "/*\n * Copyright 2016 Will Knez <wbknez.dev@gmail.com>\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in c...
java
chosen
[ { "from": "human", "value": "Create new annotation for experimental classes and methods\n" }, { "from": "gpt", "value": "/*\n* I don't know what to do with this.\n*/\n\npackage org.app.material.annotation;\n\nimport java.lang.annotation.Documented;\nimport java.lang.annotation.ElementType;\nimpo...
java
chosen
[ { "from": "human", "value": "Delete bulk request entity impl\n" }, { "from": "gpt", "value": "package com.epam.ta.reportportal.ws.model;\n\nimport com.fasterxml.jackson.annotation.JsonProperty;\n\nimport javax.validation.constraints.NotNull;\nimport java.util.List;\n\n/**\n * @author <a href=\"m...
java
chosen
[ { "from": "human", "value": "Add data conversion algorithm that transmutes lists of class data\n" }, { "from": "gpt", "value": "/*\n * Zorbage: an algebraic data hierarchy for use in numeric processing.\n *\n * Copyright (C) 2016-2017 Barry DeZonia\n * \n * Redistribution and use in source and b...
java
chosen
[ { "from": "human", "value": "Fix race conditions in the database helper. Fixes G Rank Tab crash.\n" }, { "from": "gpt", "value": "package com.daviancorp.android.data.database;\n\npublic class QueryHelper {\n\tpublic boolean Distinct;\n\tpublic String Table; \n\tpublic String[] Columns; \n\tpubli...
java
chosen
[ { "from": "human", "value": "leetcode: Remove Duplicates from Sorted Array\n" }, { "from": "gpt", "value": "package main.algorithm.leetcode;\n\nimport org.junit.Test;\n\n/**\n * Title : main.algorithm.leetcode <br>\n * Company : 北京华宇元典信息服务有限公司 <br>\n * Description :\n *\n *\n * @author chile\n *...
java
chosen
[ { "from": "human", "value": "Add annotation controlling debug naming of nexted observables and actions\n" }, { "from": "gpt", "value": "package org.realityforge.arez.annotations;\n\nimport java.lang.annotation.ElementType;\nimport java.lang.annotation.Retention;\nimport java.lang.annotation.Rete...
java
chosen
[ { "from": "human", "value": "Add a simple test for the FilterOperation that check that null values are handled as false\n" }, { "from": "gpt", "value": "package no.ssb.vtl.script.operations;\n\nimport com.google.common.collect.ImmutableMap;\nimport no.ssb.vtl.model.Component;\nimport no.ssb.vtl....
java
chosen
[ { "from": "human", "value": "Add test for the way the Lua functionality should work" }, { "from": "gpt", "value": "package com.github.ansell.csvmap;\n\nimport static org.junit.Assert.*;\n\nimport java.util.List;\n\nimport javax.script.Bindings;\nimport javax.script.Compilable;\nimport javax.scri...
java
chosen
[ { "from": "human", "value": "Add set tile entity nbt loot function" }, { "from": "gpt", "value": "package info.u_team.u_team_core.intern.loot;\n\nimport com.google.gson.*;\n\nimport info.u_team.u_team_core.UCoreMain;\nimport info.u_team.u_team_core.tileentity.UTileEntity;\nimport net.minecraft.i...
java
chosen
[ { "from": "human", "value": "Add method annotation to allow on demand indexing.\n" }, { "from": "gpt", "value": "package com.siirush.localwiki.search.annotation;\n\nimport static java.lang.annotation.ElementType.METHOD;\nimport static java.lang.annotation.RetentionPolicy.RUNTIME;\n\nimport java....
java
chosen
[ { "from": "human", "value": "Define how filter arguments will be modified.\n" }, { "from": "gpt", "value": "package uk.ac.ebi.quickgo.annotation.model;\n\n/**\n * @author Tony Wardell\n * Date: 24/05/2016\n * Time: 17:19\n * Created with IntelliJ IDEA.\n */\npublic interface FilterModifier {\n\n...
java
chosen
[ { "from": "human", "value": "Add unit test to backup qvcsos postgres database." }, { "from": "gpt", "value": "/*\n * Copyright 2022 Jim Voris.\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 ma...
java
chosen
[ { "from": "human", "value": "Test for admin login for lifecart app is created\n" }, { "from": "gpt", "value": "package ru.stqa.training.selenium;\n\nimport org.junit.After;\nimport org.junit.Before;\nimport org.junit.Test;\nimport org.openqa.selenium.By;\nimport org.openqa.selenium.WebDriver;\ni...
java
chosen
[ { "from": "human", "value": "Change pom to use log4j2 and add registry project.\n" }, { "from": "gpt", "value": "package io.tonny.regitry;\n\nimport org.springframework.boot.SpringApplication;\nimport org.springframework.boot.autoconfigure.SpringBootApplication;\nimport org.springframework.cloud...
java
chosen
[ { "from": "human", "value": "Add java solution for 102. Binary Tree Level Order Traversal\n\n102. Binary Tree Level Order Traversal: https://leetcode.com/problems/binary-tree-level-order-traversal/" }, { "from": "gpt", "value": "package leetcode.binary_tree_level_order_traversal;\n\nimport java....
java
chosen
[ { "from": "human", "value": "Add unit tests for MediaUtils\n" }, { "from": "gpt", "value": "/*\n * Copyright (c) 2015-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this sour...
java
chosen
[ { "from": "human", "value": "Unify Permission request rationale dialog.\n\nChange-Id: I55d304611277fb92856e8a75018579d71213ab69\n" }, { "from": "gpt", "value": "/*\n * Copyright (c) 2017 Mobvoi Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use thi...
java
chosen
[ { "from": "human", "value": "[JENKINS=57683] Test for PruneStaleBranchTrait class cast exception" }, { "from": "gpt", "value": "package jenkins.plugins.git.traits;\n\nimport hudson.model.TaskListener;\nimport jenkins.plugins.git.GitSCMSourceContext;\nimport jenkins.scm.api.SCMHeadObserver;\nimpo...
java
chosen
[ { "from": "human", "value": "Add JUnit tests for InternalException. See ticket:9.\n\nSigned-off-by: Patrick Pelletier <4307fca26d0353058fbfb17dc5f40867e5e6b8e6@gmail.com>\nSigned-off-by: Etienne M. Gagnon <bf06ec0eb40152cd863534753d026b021022c851@j-meg.com>\n" }, { "from": "gpt", "value": "/* Th...
java
chosen
[ { "from": "human", "value": "Add basic violation class for now\n" }, { "from": "gpt", "value": "package xyz.benw.plugins.fouriermc.Violations;\n\n/**\n * Super basic violation handling\n * //TODO Something useful\n */\npublic class Violation {\n\n // Fields for the cumulative violation valu...
java
chosen
[ { "from": "human", "value": "Add start of tests for Observer\n" }, { "from": "gpt", "value": "package org.realityforge.arez.api2;\n\nimport org.realityforge.guiceyloops.shared.ValueUtil;\nimport org.testng.annotations.Test;\nimport static org.testng.Assert.*;\n\npublic class ObserverTest\n exte...
java
chosen
[ { "from": "human", "value": "Implement extended player properties representing nutritional conditions" }, { "from": "gpt", "value": "package com.japlj.healthydiet.food.playerstats;\n\nimport com.japlj.healthydiet.ModConfig;\nimport com.japlj.healthydiet.food.FoodParameter;\n\nimport net.minecraf...
java
chosen
[ { "from": "human", "value": "Print right view of Binary Tree\n" }, { "from": "gpt", "value": "package com.practice.tree;\nimport java.util.Arrays;\n\n/**\n * Print Right View of a Binary Tree - http://www.geeksforgeeks.org/print-right-view-binary-tree-2/\n * \n * @author tsohil\n *\n */\npublic...
java
chosen
[ { "from": "human", "value": "Add a test of menus with many menu items\n\nSee:\nhttp://imagej.1557.x6.nabble.com/menus-are-off-the-screen-tt5016127.html\n" }, { "from": "gpt", "value": "\npackage net.restlesscoder.sandbox;\n\nimport java.awt.Button;\nimport java.awt.Frame;\nimport java.awt.Menu;\...
java
chosen
[ { "from": "human", "value": "Add JSON reverser unit tests\n" }, { "from": "gpt", "value": "package com.nika.web.java.rest;\n\nimport javax.ws.rs.core.Response;\nimport org.json.JSONObject;\nimport org.junit.Assert;\nimport org.junit.Before;\nimport org.junit.Test;\n\npublic class JSONBasedRevers...
java
chosen
[ { "from": "human", "value": "Add an integration test which checks if the application context loads\nwithout any errors." }, { "from": "gpt", "value": "package de.flux.playground.deckcompare;\r\n\r\nimport org.junit.Test;\r\nimport org.junit.runner.RunWith;\r\nimport org.springframework.boot.test...
java
chosen
[ { "from": "human", "value": "Add GraphQL subscription client example\n" }, { "from": "gpt", "value": "package io.vertx.example.web.graphql;\n\nimport io.vertx.core.AbstractVerticle;\nimport io.vertx.core.Launcher;\nimport io.vertx.core.http.HttpClient;\nimport io.vertx.core.http.HttpClientOption...
java
chosen
[ { "from": "human", "value": "Add subclass for creating mock ballots.\n" }, { "from": "gpt", "value": "package election.tally.mock;\n\npublic class MockBallot extends election.tally.Ballot {\n\n\tpublic void setFirstPreference(final int firstPreferenceID) {\n\t\tnumberOfPreferences = 1;\n\t\tthis...
java
chosen
[ { "from": "human", "value": "Add unit tests for utils.MimeType\nThese tests were written using Diffblue Cover.\n" }, { "from": "gpt", "value": "package org.jkiss.utils;\n\nimport org.jkiss.utils.MimeType;\nimport org.junit.Assert;\nimport org.junit.Rule;\nimport org.junit.Test;\nimport org.junit...
java
chosen
[ { "from": "human", "value": "Create a system wide holder for definitions.\n" }, { "from": "gpt", "value": "package uk.ac.ebi.quickgo.common;\n\n/**\n * QuickGOBE wide definitions\n *\n * @author Tony Wardell\n * Date: 02/06/2016\n * Time: 12:11\n * Created with IntelliJ IDEA.\n */\npublic class ...
java
chosen
[ { "from": "human", "value": "Add rest/util/tags to get all tags\n" }, { "from": "gpt", "value": "package fr.esiea.windmeal.controller.util;\n\nimport fr.esiea.windmeal.model.enumeration.Tag;\nimport org.springframework.stereotype.Controller;\nimport org.springframework.web.bind.annotation.Reques...
java
chosen
[ { "from": "human", "value": "Add test case for use of non hashable class in hash data structure\n\n\ngit-svn-id: e7d6bde23f017c9ff4efd468d79d66def666766b@6214 eae3c2d3-9b19-0410-a86e-396b6ccb6ab3\n" }, { "from": "gpt", "value": "import java.util.*;\n\npublic class UseOfNonHashableClassInHashData...
java
chosen
[ { "from": "human", "value": "Add some tests to problem 67\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 test case to analyzer module" }, { "from": "gpt", "value": "package eu.choreos.monitoring.platform.analyzer;\n\nimport static org.junit.Assert.*;\n\nimport org.junit.Before;\nimport org.junit.Test;\n\npublic class AnalyzerTest {\n\n\t@Before\n\tpublic void setUp(...
java
chosen
[ { "from": "human", "value": "Test Sample : Test Driver (1)\n테스트 대상 단위모듈 생성\n- 두개의 스트링을 생성하면 결과값을 반환하는 모듈\n" }, { "from": "gpt", "value": "package co.kr.godo.test.driver;\n\npublic class TestObject {\n\tprivate String appender = \"\";\n\tprivate String appendee = \"\";\n\t\n\tpublic String append...
java
chosen
[ { "from": "human", "value": "Add example code to display double[][] in Swing\n" }, { "from": "gpt", "value": "\npackage net.restlesscoder.sandbox.ui;\n\nimport java.awt.image.BufferedImage;\n\nimport javax.swing.ImageIcon;\nimport javax.swing.JFrame;\nimport javax.swing.JLabel;\nimport javax.swi...
java
chosen
[ { "from": "human", "value": "Add missing test for Gradle.\n" }, { "from": "gpt", "value": "package net.bytebuddy.test;\n\nimport net.bytebuddy.build.Plugin;\nimport net.bytebuddy.description.type.TypeDescription;\nimport net.bytebuddy.dynamic.ClassFileLocator;\nimport net.bytebuddy.dynamic.Dynam...
java
chosen
[ { "from": "human", "value": "Add in-mem root directory test\n" }, { "from": "gpt", "value": "/*\n * Copyright 2019, TeamDev. All rights reserved.\n *\n * Redistribution and use in source and/or binary forms, with or without\n * modification, must retain the above copyright notice and the followi...
java
chosen
[ { "from": "human", "value": "Add a servlet with which users can download a video, given a sessionId\n" }, { "from": "gpt", "value": "package com.mooo.aimmac23.hub.servlet;\n\nimport java.io.File;\nimport java.io.FileInputStream;\nimport java.io.IOException;\n\nimport javax.servlet.ServletExcepti...
java
chosen