conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "human", "value": "Add abstract activities for navigation drawer implementation\n" }, { "from": "gpt", "value": "package com.alsash.reciper.ui;\n\nimport android.os.Bundle;\nimport android.support.annotation.NonNull;\nimport android.support.design.widget.FloatingActionButton;\nimport a...
java
chosen
[ { "from": "system", "value": "Use 127.0.0.1 instead of localhost\n" }, { "from": "human", "value": "package org.zeromq.czmq;\n\nimport org.junit.Assert;\nimport org.junit.Test;\n\npublic class ZSockTest {\n @Test\n public void testZSockSendRecv() {\n try (final ZSock push = new ZSoc...
java
chosen
[ { "from": "human", "value": "Add a test for MapFeature\n" }, { "from": "gpt", "value": "package jfoley.vocabpress.feature;\n\nimport jfoley.vocabpress.movement.Mover;\nimport jfoley.vocabpress.scoring.CountPosting;\nimport jfoley.vocabpress.scoring.impl.SimpleCountPosting;\nimport org.junit.Test...
java
chosen
[ { "from": "human", "value": "Add some tests to problem 70\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 in an interface to map changes to a particular world. It will ultimately be implemented for each world\n" }, { "from": "gpt", "value": "package org.realityforge.replicant.client;\n\nimport java.io.Serializable;\nimport java.util.Map;\nimport javax.annotation.Null...
java
chosen
[ { "from": "human", "value": "Create skeleton for problem 48\n" }, { "from": "gpt", "value": "package leetcode;\n\nimport java.util.Arrays;\n\n/**\n * https://leetcode.com/problems/rotate-image/\n */\npublic class Problem48 {\n public void rotate(int[][] matrix) {\n \n }\n \n p...
java
chosen
[ { "from": "human", "value": "Add a marker interface for the storage field names.\n" }, { "from": "gpt", "value": "/*\n * Copyright 2017, TeamDev Ltd. All rights reserved.\n *\n * Redistribution and use in source and/or binary forms, with or without\n * modification, must retain the above copyrig...
java
chosen
[ { "from": "human", "value": "Add class for operations regarding PID.\n" }, { "from": "gpt", "value": "package helpers;\n\nimport org.slf4j.Logger;\nimport org.slf4j.LoggerFactory;\n\nimport java.io.BufferedWriter;\nimport java.io.File;\nimport java.io.FileWriter;\nimport java.io.IOException;\n\n...
java
chosen
[ { "from": "human", "value": "Add prehashing for NaBL2 constraints.\n" }, { "from": "gpt", "value": "@Value.Style(\n // @formatter:off\n typeAbstract = { \"*\" },\n get = { \"is*\", \"get*\" },\n with = \"with*\",\n defaults = @Value.Immutable(builder = false, prehash = true)\n ...
java
chosen
[ { "from": "human", "value": "Add utility to print the extracted text of a file\n" }, { "from": "gpt", "value": "package com.mattbachmann.nlpexperiments.apps;\n\nimport com.mattbachmann.nlpexperiments.extraction.ExtractionException;\nimport com.mattbachmann.nlpexperiments.extraction.TextExtractor...
java
chosen
[ { "from": "system", "value": "Remove unused methods from signature\n" }, { "from": "human", "value": "/*\n * Copyright (C) 2013 Brett Wooldridge\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 generic class that's an adapter for Keys and Mouse input\n" }, { "from": "gpt", "value": "package com.kgp.core;\n\nimport java.awt.event.KeyEvent;\nimport java.awt.event.KeyListener;\nimport java.awt.event.MouseEvent;\nimport java.awt.event.MouseListener;\nimport...
java
chosen
[ { "from": "human", "value": "Create test suite to run 6 test classes at once." }, { "from": "gpt", "value": "package com.codingbat.test;\r\n\r\nimport org.junit.runner.RunWith;\r\nimport org.junit.runners.Suite;\r\nimport org.junit.runners.Suite.SuiteClasses;\r\n\r\nimport com.codingbat.array1.A...
java
chosen
[ { "from": "human", "value": "Add unit test for SmartCheckBox\n" }, { "from": "gpt", "value": "package pro.extsoft.comments.elements;\n\n\nimport org.testng.annotations.Test;\n\n\n/**\n * @author Dmytro Serdiuk (dmytro.serdiuk@gmail.com)\n * @version $Id$\n * @since 0.1\n */\npublic class SmartCh...
java
chosen
[ { "from": "human", "value": "Add util for calculating global public stats\n" }, { "from": "gpt", "value": "package peergos.server;\n\nimport peergos.shared.*;\nimport peergos.shared.corenode.*;\nimport peergos.shared.crypto.hash.*;\nimport peergos.shared.merklebtree.*;\nimport peergos.shared.use...
java
chosen
[ { "from": "human", "value": "Add new solution but StackOverflowError exists\n" }, { "from": "gpt", "value": "import java.math.BigInteger;\n\n/**\n * Problem: #278 First Bad Version\n *\n * Idea:\n *\n * Solutions:\n * firstBadVersion: uses basic binary search, but StackOverflowError occurs.\n *...
java
chosen
[ { "from": "human", "value": "Add simple test for Type\n" }, { "from": "gpt", "value": "/*\n * To change this license header, choose License Headers in Project Properties.\n * To change this template file, choose Tools | Templates\n * and open the template in the editor.\n */\npackage fi.jgke.tag...
java
chosen
[ { "from": "human", "value": "Use groups to separate packages in javadoc's index\n" }, { "from": "gpt", "value": "/*\n * Copyright 2016 Google Inc. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance wit...
java
chosen
[ { "from": "human", "value": "Add generic unique QI validator for entities by field\n" }, { "from": "gpt", "value": "package org.jpos.qi.util;\n\nimport com.vaadin.data.ValidationResult;\nimport com.vaadin.data.Validator;\nimport com.vaadin.data.ValueContext;\nimport org.jpos.ee.DB;\nimport org.j...
java
chosen
[ { "from": "human", "value": "Add java solution for 146. LRU Cache\n\n146. LRU Cache: https://leetcode.com/problems/lru-cache/" }, { "from": "gpt", "value": "package leetcode.lru_cache;\n\nimport java.util.HashMap;\nimport java.util.Map;\n\npublic class LRUCache {\n\tprivate static class CacheEnt...
java
chosen
[ { "from": "human", "value": "Add infinite client benchmark for profiling.\n" }, { "from": "gpt", "value": "package jocket.bench;\n\nimport java.io.DataInputStream;\nimport java.io.DataOutputStream;\nimport java.io.IOException;\n\nimport jocket.net.JocketSocket;\n\n/**\n * Infinite benchmark, mea...
java
chosen
[ { "from": "human", "value": "Add a test case showing that SqlObject finalize() calls open Connections.\n" }, { "from": "gpt", "value": "/*\n * Copyright (C) 2004 - 2013 Brian McCallister\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file excep...
java
chosen
[ { "from": "human", "value": "Check that certain views/tables required for the Biomart build are present.\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 General Publ...
java
chosen
[ { "from": "human", "value": "Create a util class to handle turning the input stream into a string\n" }, { "from": "gpt", "value": "package com.expidev.gcmapp.utils;\n\nimport java.io.ByteArrayOutputStream;\nimport java.io.IOException;\nimport java.io.InputStream;\n\n/**\n * Created by William.Ra...
java
chosen
[ { "from": "human", "value": "Add first draft of Game test\n" }, { "from": "gpt", "value": "package org.luxons.sevenwonders.game;\n\nimport java.util.Collection;\n\nimport org.junit.Test;\nimport org.luxons.sevenwonders.game.api.Action;\nimport org.luxons.sevenwonders.game.api.CustomizableSetting...
java
chosen
[ { "from": "human", "value": "Add serializable Subsytem base class\n\nThis class will reflect all of its members and add them to\nthe system manager.\n" }, { "from": "gpt", "value": "package com.team254.lib.util;\n\nimport java.lang.reflect.Field;\nimport java.util.ArrayList;\nimport java.util.Co...
java
chosen
[ { "from": "human", "value": "Add new class to provide package info.\n" }, { "from": "gpt", "value": "/*******************************************************************************\n * Copyright (c) 2013 Benjamin Pabst and others.\n * All rights reserved. This program and the accompanying mater...
java
chosen
[ { "from": "human", "value": "Define a matrix direct product algorithm\n" }, { "from": "gpt", "value": "/*\n * Zorbage: an algebraic data hierarchy for use in numeric processing.\n *\n * Copyright (C) 2016-2018 Barry DeZonia\n * \n * Redistribution and use in source and binary forms, with or with...
java
chosen
[ { "from": "human", "value": "Create a skeleton for problem 64\n" }, { "from": "gpt", "value": "package leetcode;\n\n/**\n * https://leetcode.com/problems/minimum-path-sum/\n */\npublic class Problem64 {\n public int minPathSum(int[][] grid) {\n \t// TODO: to be implemented\n return ...
java
chosen
[ { "from": "human", "value": "Dana: Add initial series blanco server\n" }, { "from": "gpt", "value": "package com.sferadev.danacast.servers;\n\nimport org.jsoup.Jsoup;\nimport org.jsoup.nodes.Document;\nimport org.jsoup.select.Elements;\n\nimport java.io.IOException;\n\npublic class Seriesblanco ...
java
chosen
[ { "from": "system", "value": "Make into a real object instead of lots of static methods.\n" }, { "from": "human", "value": "package net.happygiraffe.jslint;\n\nimport java.io.BufferedReader;\nimport java.io.FileInputStream;\nimport java.io.FileNotFoundException;\nimport java.io.IOException;\nimp...
java
chosen
[ { "from": "human", "value": "Add missing an util file" }, { "from": "gpt", "value": "package net.wisedog.android.whooing.utils;\n\nimport java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStream;\nimport java.io.InputStreamReader;\n\npublic class StringUtil {\n\tpublic st...
java
chosen
[ { "from": "human", "value": "Add sample test cases for user api\n" }, { "from": "gpt", "value": "package se.lth.cs.connect;\n\nimport org.junit.Rule;\nimport org.junit.Test;\n\nimport com.jayway.restassured.response.Response;\n\nimport ro.pippo.test.PippoRule;\nimport ro.pippo.test.PippoTest;\n\...
java
chosen
[ { "from": "human", "value": "Add test for CardBack initialization (coverage frenzy)\n" }, { "from": "gpt", "value": "package org.luxons.sevenwonders.game.cards;\n\nimport org.junit.Test;\n\nimport static org.junit.Assert.assertEquals;\n\npublic class CardBackTest {\n\n @Test\n public void ...
java
chosen
[ { "from": "human", "value": "Add package for episodes requests\n" }, { "from": "gpt", "value": "/**\n * Package for the requests regarding the episodes.<br />\n * The associated documentation for these methods is available at\n * <a href=\"http://www.betaseries.com/api/methodes/episodes\">this a...
java
chosen
[ { "from": "human", "value": "Add java solution for 87. Scramble String\n\n87. Scramble String: https://leetcode.com/problems/scramble-string/" }, { "from": "gpt", "value": "package leetcode.scramble_string;\n\npublic class Solution {\n\tpublic static class MyLetterHash{\n\t\tpublic static final ...
java
chosen
[ { "from": "human", "value": "Add tests for match() and consume() in Meter.Type\n" }, { "from": "gpt", "value": "/**\n * Copyright 2017 Pivotal Software, Inc.\n * <p>\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the ...
java
chosen
[ { "from": "human", "value": "Add save data to SharePreferences util class\n" }, { "from": "gpt", "value": "\npackage com.jun.common.util;\n\nimport android.content.Context;\nimport android.content.SharedPreferences;\n\n/**\n * Created by Jun on 2016/5/3.\n * 描述:保存到 SharedPreferences 的数据\n *\n * ...
java
chosen
[ { "from": "human", "value": "Add some tests for new algorithm\n" }, { "from": "gpt", "value": "/*\n * Copyright 2010-2015 Allette Systems (Australia)\n * http://www.allette.com.au\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in co...
java
chosen
[ { "from": "human", "value": "Add generic combo box model.\n\nFixes issue 4230\n\nChange-Id: I30cf8d2b3cc7e67357dd42cf0b320e1097983fba\nReviewed-on: http://gerrit.dmdirc.com/1312\nAutomatic-Compile: DMDirc Local Commits <fd7610eb81751244add0a62da2de7da51cfdce47@googlemail.com>\nReviewed-by: Chris Smith <711c...
java
chosen
[ { "from": "human", "value": "Add controllerUtil for common methods among controllers\n\ngit-svn-id: 7f9817d80667deac6042fd45474745cdc98fb3cd@1770 3364c4cd-9065-40b6-aee7-261f90ce6533\n" }, { "from": "gpt", "value": "/*\n * Copyright 2011 SURFnet bv, The Netherlands\n *\n * Licensed under the Apa...
java
chosen
[ { "from": "human", "value": "Add Servlet for dispatch test" }, { "from": "gpt", "value": "/**\n * \n */\npackage jetty.async.test;\n\nimport java.io.IOException;\nimport java.util.concurrent.TimeUnit;\n\nimport javax.servlet.AsyncContext;\nimport javax.servlet.ServletException;\nimport javax.ser...
java
chosen
[ { "from": "human", "value": "Add fake database read call\n" }, { "from": "gpt", "value": "package com.cdrussell.caster.rx.casterrxjava;\n\n\nimport android.os.SystemClock;\nimport android.util.Log;\n\nclass Database {\n\n private static final String TAG = Database.class.getSimpleName();\n\n ...
java
chosen
[ { "from": "human", "value": "BPT-162: Configure flyway to create schema even though tables already exist.\n" }, { "from": "gpt", "value": "package info.novatec.tr.config;\n\nimport org.flywaydb.core.Flyway;\nimport org.springframework.boot.autoconfigure.flyway.FlywayMigrationStrategy;\nimport or...
java
chosen
[ { "from": "human", "value": "Add a text field which doesn’t trim content by default.\n" }, { "from": "gpt", "value": "package lemming.api.ui;\n\nimport org.apache.wicket.markup.html.form.TextField;\n\n/**\n * A non-trimming text field.\n */\npublic class NonTrimmingTextField extends TextField<St...
java
chosen
[ { "from": "human", "value": "Sort a stack using auxillary stack.\n" }, { "from": "gpt", "value": "package com.sunny.grokkingalgorithms.fasttrack.week6;\n\nimport java.util.Stack;\n\n/**\n * Created by sundas on 7/26/2018.\n */\npublic class StackSorter {\n\n /*\n Given a stack sort it in ascen...
java
chosen
[ { "from": "human", "value": "Add enum argument type for commands\n" }, { "from": "gpt", "value": "package org.cyclops.cyclopscore.command.argument;\n\nimport com.mojang.brigadier.StringReader;\nimport com.mojang.brigadier.arguments.ArgumentType;\nimport com.mojang.brigadier.context.CommandContex...
java
chosen
[ { "from": "human", "value": "Add problem 6 to unit 2\n" }, { "from": "gpt", "value": "import java.util.Scanner;\n\n/**\n * This program creates an array of unique, inputted integers.\n **/\npublic class Array_Distinct_Insert {\n public static void main(String[] args) {\n System.out.pri...
java
chosen
[ { "from": "human", "value": "Create a test suite for testing.\n\ncommitter: Joe LaPenna <16a9a54ddf4259952e3c118c763138e83693d7fd@joelapenna.com>\n" }, { "from": "gpt", "value": "/**\n * Copyright 2009 Joe LaPenna\n */\n\npackage com.joelapenna.foursquared.test;\n\nimport android.test.suitebuild...
java
chosen
[ { "from": "human", "value": "Include @Isolated test in junit5-parallel-execution project\n" }, { "from": "gpt", "value": "/*\n * (C) Copyright 2020 Boni Garcia (http://bonigarcia.github.io/)\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file e...
java
chosen
[ { "from": "human", "value": "Add a new generator for encapsulating the basic TextView stuff\n" }, { "from": "gpt", "value": "/*\n * Copyright 2016 Philip Cohn-Cort\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with th...
java
chosen
[ { "from": "human", "value": "Add test double for EventTarget\n" }, { "from": "gpt", "value": "package arez.windowsize.util;\n\nimport elemental2.dom.Event;\nimport elemental2.dom.EventListener;\nimport elemental2.dom.EventTarget;\nimport java.util.ArrayList;\nimport java.util.HashMap;\nimport ja...
java
chosen
[ { "from": "human", "value": "Add test for PDF Attachment\n\ngit-svn-id: 102839466c3b40dd9c7e25c0a1a6d26afc40150a@1726835 13f79535-47bb-0310-9956-ffa450edef68\n" }, { "from": "gpt", "value": "/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreeme...
java
chosen
[ { "from": "human", "value": "Add Enum for document type\n" }, { "from": "gpt", "value": "package edu.chl.proton.model;\n\n/**\n * Anton Levholm\n * Created by antonlevholm on 2017-05-02.\n */\npublic enum DocumentType {\n MARKDOWN, PLAIN\n}\n" } ]
java
chosen
[ { "from": "human", "value": "Add an annotation indicating that a type should not be converted when serialized for sending to IDOL OnDemand.\n" }, { "from": "gpt", "value": "/*\n * Copyright 2015 Hewlett-Packard Development Company, L.P.\n * Licensed under the MIT License (the \"License\"); you m...
java
chosen
[ { "from": "human", "value": "Add helper to get and set properties\n" }, { "from": "gpt", "value": "package org.realityforge.arez.browser.extras;\n\nfinal class JsObjects\n{\n static native <T> T get( Object object, String propertyName ) /*-{\n return object[ propertyName ];\n }-*/;\n\n sta...
java
chosen
[ { "from": "human", "value": "Refactor the video download functionality to be more flexible, and better at cleaning up things\n" }, { "from": "gpt", "value": "package com.mooo.aimmac23.hub.videostorage;\n\nimport java.io.IOException;\nimport java.io.InputStream;\n\npublic interface StoredVideoDow...
java
chosen
[ { "from": "human", "value": "Add exception type for truncated response\n" }, { "from": "gpt", "value": "/*\n * JBoss, Home of Professional Open Source.\n * Copyright 2012, Red Hat, Inc., and individual contributors\n * as indicated by the @author tags. See the copyright.txt file in the\n * distr...
java
chosen
[ { "from": "human", "value": "Reduce delay of gene page requests\n" }, { "from": "gpt", "value": "package uk.ac.ebi.phenotype.web.util;\n\nimport io.github.bucket4j.*;\nimport org.apache.commons.lang3.StringUtils;\nimport org.slf4j.Logger;\nimport org.slf4j.LoggerFactory;\nimport org.springframew...
java
chosen
[ { "from": "human", "value": "Add util class to record audio\n" }, { "from": "gpt", "value": "/*\n * Copyright (c) 2016 Qiscus.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy ...
java
chosen
[ { "from": "human", "value": "Add grouping identifiers to selectors.\n" }, { "from": "gpt", "value": "package net.kuujo.vertigo.output.selector;\n\nimport org.vertx.java.core.json.JsonObject;\n\n/**\n * An abstract selector implementation.\n *\n * @author Jordan Halterman\n */\npublic abstract cl...
java
chosen
[ { "from": "human", "value": "Add existing file helper with the forge resources included" }, { "from": "gpt", "value": "package info.u_team.u_team_core.data;\n\nimport java.io.IOException;\nimport java.util.Arrays;\n\nimport net.minecraft.resources.*;\nimport net.minecraft.util.ResourceLocation;\...
java
chosen
[ { "from": "system", "value": "Make server tests work again\n\nChange-Id: Ie0097cef628ef013579067443d4a52be049cf1da\n" }, { "from": "human", "value": "/*\n * Copyright 2000-2014 Vaadin Ltd.\n * \n * Licensed under the Apache License, Version 2.0 (the \"License\"); you may not\n * use this file ex...
java
chosen
[ { "from": "human", "value": "Add a simple example that has uses a proxy." }, { "from": "gpt", "value": "/*\n * Copyright 2013 OrgSync\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain ...
java
chosen
[ { "from": "system", "value": "Add missing setters for handshake.\n" }, { "from": "human", "value": "package net.md_5.bungee.protocol.packet;\n\nimport io.netty.buffer.ByteBuf;\nimport lombok.EqualsAndHashCode;\nimport lombok.Getter;\nimport lombok.ToString;\n\n@Getter\n@ToString\n@EqualsAndHashC...
java
chosen
[ { "from": "human", "value": "Add test class for JSONTool\n" }, { "from": "gpt", "value": "package com.nitorcreations.willow.auth;\n\nimport static org.junit.Assert.assertArrayEquals;\n\nimport java.util.Arrays;\nimport java.util.List;\nimport java.util.Set;\n\nimport org.json.JSONArray;\nimport ...
java
chosen
[ { "from": "human", "value": "Add test for monitor blocker utility\n" }, { "from": "gpt", "value": "/*\n * LensKit, an open source recommender systems toolkit.\n * Copyright 2010-2016 LensKit Contributors. See CONTRIBUTORS.md.\n * Work on LensKit has been funded by the National Science Foundatio...
java
chosen
[ { "from": "human", "value": "FEATURE/MAJOR: Add a prototype for writing bytecode directly\n\nThis code just create a class GenBCode with a method\nint run() that return 42\n" }, { "from": "gpt", "value": "import org.objectweb.asm.ClassWriter;\nimport org.objectweb.asm.Opcodes;\nimport org.object...
java
chosen
[ { "from": "human", "value": "Create : 566 Reshape the Matrix\n" }, { "from": "gpt", "value": "public class Solution {\n\n public int[][] matrixReshape(int[][] nums, int r, int c) {\n\n int rowLen = nums.length;\n int colLen = nums[0].length;\n\n if (rowLen * colLen != r *...
java
chosen
[ { "from": "human", "value": "Add core feature tests for indexes\n" }, { "from": "gpt", "value": "package com.autonomy.abc.indexes;\n\nimport com.autonomy.abc.config.HostedTestBase;\nimport com.autonomy.abc.config.TestConfig;\nimport com.autonomy.abc.framework.categories.CoreFeature;\nimport com....
java
chosen
[ { "from": "human", "value": "Add Container with Most Water\n" }, { "from": "gpt", "value": "package problems;\n\npublic class ContainerWithMostWater {\n public int maxArea(int[] height) {\n if (height.length <= 1)\n return 0;\n\n int a = 0, b = height.length - 1;\n ...
java
chosen
[ { "from": "human", "value": "PIG-3431: Return more information for parsing related exceptions.\n\ngit-svn-id: c4d08399a8c07badad33cbf13a0909bacb78f41f@1521222 13f79535-47bb-0310-9956-ffa450edef68\n" }, { "from": "gpt", "value": "package org.apache.pig.tools.parameters;\n\n\npublic class Paramete...
java
chosen
[ { "from": "human", "value": "Create skeleton for problem 260\n" }, { "from": "gpt", "value": "package leetcode;\n\nimport java.util.Arrays;\n\n/**\n * https://leetcode.com/problems/single-number-iii/\n */\npublic class Problem260 {\n public int[] singleNumber(int[] nums) {\n return nul...
java
chosen
[ { "from": "human", "value": "Create a skeleton for problem 154\n" }, { "from": "gpt", "value": "package leetcode;\n\n/**\n * https://leetcode.com/problems/find-minimum-in-rotated-sorted-array-ii/\n */\npublic class Problem154 {\n public int findMin(int[] nums) {\n // TODO\n retu...
java
chosen
[ { "from": "human", "value": "Add test class for Folder\n" }, { "from": "gpt", "value": "package edu.chl.proton.model;\n\nimport org.junit.Test;\n\nimport static org.junit.Assert.assertTrue;\n\n\n/**\n * @author Stina Werme\n * Created by stinawerme on 11/05/17.\n */\npublic class FolderTest {\n\...
java
chosen
[ { "from": "human", "value": "Test of perl server side issue." }, { "from": "gpt", "value": "package us.kbase.kbasetrees.test;\n\nimport java.net.URL;\nimport java.util.List;\n\nimport us.kbase.tree.TreeClient;\n\npublic class TempMikesProblem {\n\tpublic static void main(String[] args) throws Ex...
java
chosen
[ { "from": "human", "value": "Add WiFiInfo shadow for testing\n" }, { "from": "gpt", "value": "package com.connectsdk.shadow;\n\nimport java.net.InetAddress;\nimport java.net.UnknownHostException;\n\nimport org.robolectric.annotation.Implements;\nimport org.robolectric.shadows.ShadowWifiInfo;\n\n...
java
chosen
[ { "from": "human", "value": "vertosphere/java: Add controller class of the daemon, of rudimentary implementation.\n" }, { "from": "gpt", "value": "/*\n * src/java/dns_resolv/DnsLookupController.java\n * ============================================================================\n * DNS Resolver...
java
chosen
[ { "from": "human", "value": "Solve problem 231 (my 100th problem, yay!)\n" }, { "from": "gpt", "value": "package leetcode;\n\n/**\n * https://leetcode.com/problems/power-of-two/\n */\npublic class Problem231 {\n public boolean isPowerOfTwo(int n) {\n double m = Math.log10(n) / Math.log...
java
chosen
[ { "from": "human", "value": "Add JSONTransmformer to response with JSON :)\n" }, { "from": "gpt", "value": "/*\n * In The Name Of God\n * ======================================\n * [] Project Name : JLamp \n * \n * [] Package Name : ir.ac.aut.ceit.aolab.jlamp.rest.helper\n *\n * [] Creation Date...
java
chosen
[ { "from": "human", "value": "Add simple espresso test case\n" }, { "from": "gpt", "value": "package de.eightbitboy.hijacr.activities;\n\nimport android.support.test.rule.ActivityTestRule;\nimport android.support.test.runner.AndroidJUnit4;\n\nimport org.junit.Rule;\nimport org.junit.Test;\nimport...
java
chosen
[ { "from": "human", "value": "Add enum for skill java type mapping\n" }, { "from": "gpt", "value": "package creator;\n\nimport java.util.HashMap;\n\npublic enum SKilLTypes {\n\tBool(\"skill.lang.bool\", \"boolean\"),\n\tInteger8(\"skill.lang.i8\",\"byte\"),\n\tInteger16(\"skill.lang.i16\",\"short...
java
chosen
[ { "from": "human", "value": "Add a simple interactive test for the script editor\n\nSigned-off-by: Johannes Schindelin <53fb8db7833fca1e1746dd8592f61048d350f64c@gmx.de>\n" }, { "from": "gpt", "value": "/*\n * #%L\n * ImageJ software for multidimensional image processing and analysis.\n * %%\n * ...
java
chosen
[ { "from": "human", "value": "Write a skeleton for problem 134\n" }, { "from": "gpt", "value": "package leetcode;\n\n/**\n * https://leetcode.com/problems/gas-station/\n */\npublic class Problem134 {\n public int canCompleteCircuit(int[] gas, int[] cost) {\n // TODO: to be implemented\n...
java
chosen
[ { "from": "human", "value": "Fix maven-gpg-plugin erroring out on commonmark-integration-test module\n" }, { "from": "gpt", "value": "package org.commonmark.integration;\n\n// Prevent maven-gpg-plugin from failing with this error:\n// The project artifact has not been assembled yet.\n// ...
java
chosen
[ { "from": "human", "value": "Add a skeleton for problem 130\n" }, { "from": "gpt", "value": "package leetcode;\n\n/**\n * https://leetcode.com/problems/surrounded-regions/\n */\npublic class Problem130 {\n public void solve(char[][] board) {\n // TODO\n }\n\n public static void m...
java
chosen
[ { "from": "human", "value": "Create a skeleton for problem 187\n" }, { "from": "gpt", "value": "package leetcode;\n\nimport java.util.ArrayList;\nimport java.util.List;\n\n/**\n * https://leetcode.com/problems/repeated-dna-sequences/\n */\npublic class Problem187 {\n public List<String> findR...
java
chosen
[ { "from": "human", "value": "Add package javadoc for observer package\n" }, { "from": "gpt", "value": "/*\n * Copyright 2016-2019 Talsma ICT\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 ...
java
chosen
[ { "from": "system", "value": "Add TIMEOUT status and document statuses.\n" }, { "from": "human", "value": "package com.collective.celos;\n\n/**\n * The execution status of a slot.\n */\npublic class SlotState extends ValueObject {\n \n protected final SlotID slotID;\n protected final St...
java
chosen
[ { "from": "human", "value": "Test for the query builder\n" }, { "from": "gpt", "value": "package uk.ac.ebi.atlas.search.analyticsindex.baseline;\n\nimport com.google.common.collect.ImmutableList;\nimport com.google.common.collect.ImmutableMap;\nimport org.apache.commons.lang3.tuple.Pair;\nimport...
java
chosen
[ { "from": "human", "value": "Add a non-curved n-point path class for libGdx's math\n" }, { "from": "gpt", "value": "package com.badlogic.gdx.math;\n\nimport com.badlogic.gdx.math.Path;\nimport com.badlogic.gdx.utils.Array;\n\n/**\n * A linear track path with many points. Distance between 0 and ...
java
chosen
[ { "from": "human", "value": "Implement zlib:compress/1 as a BIF (drawback: compressing large binaries may block)" }, { "from": "gpt", "value": "/** -*- tab-width: 4 -*-\n * This file is part of Erjang - A JVM-based Erlang VM\n *\n * Copyright (c) 2010 by Trifork\n *\n * Licensed under the Apache...
java
chosen
[ { "from": "human", "value": "Add 2D running stats class\n\nSupports simple linear regression and calculating Pearson’s correlation\ncoefficient\n" }, { "from": "gpt", "value": "package galileo.stat;\n\n/**\n * Expanding on the {@link RunningStatistics} class, this class supports\n * two dimensio...
java
chosen
[ { "from": "human", "value": "Add a common interface for objects that do logging\n" }, { "from": "gpt", "value": "/*\n * #%L\n * SciJava Common shared library for SciJava software.\n * %%\n * Copyright (C) 2009 - 2016 Board of Regents of the University of\n * Wisconsin-Madison, Broad Institute of...
java
chosen
[ { "from": "human", "value": "Add an integration tests for KeyValueFile Reader and Writer\n" }, { "from": "gpt", "value": "/*\n * Licensed to the University of California, Berkeley under one or more contributor license\n * agreements. See the NOTICE file distributed with this work for additional ...
java
chosen
[ { "from": "human", "value": "Add a listener starting a UDP socket\n" }, { "from": "gpt", "value": "package net.kencochrane.raven.sentrystub;\n\nimport javax.servlet.ServletContextEvent;\nimport javax.servlet.ServletContextListener;\nimport javax.servlet.annotation.WebListener;\nimport java.io.By...
java
chosen
[ { "from": "human", "value": "Add unit test of BindingFactory.\n" }, { "from": "gpt", "value": "package no.ntnu.capgeminitest.binding.android;\n\nimport static org.junit.Assert.*;\nimport static org.hamcrest.CoreMatchers.*;\n\nimport java.util.HashMap;\nimport java.util.Map;\n\nimport no.ntnu.cap...
java
chosen
[ { "from": "human", "value": "Add Class and Instance Variables.\n" }, { "from": "gpt", "value": "/**\n * @file IdentifyMyParts.java\n * @author Valery Samovich\n * @version 1\n * @date 2015/01/14\n */\n\npackage com.samovich.java.basics.concepts.objects.exercises;\n\npublic class IdentifyMyParts ...
java
chosen
[ { "from": "human", "value": "Add tests for properties files\n\ngit-svn-id: 5ccfe34f605a6c2f9041ff2965ab60012c62539a@1742704 13f79535-47bb-0310-9956-ffa450edef68\n" }, { "from": "gpt", "value": "/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agre...
java
chosen
[ { "from": "human", "value": "Add a skeletal request entity builder\n" }, { "from": "gpt", "value": "/*\n * Copyright 2015 Open mHealth\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain...
java
chosen