conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "human", "value": "Add taxonomy registration error class\n" }, { "from": "gpt", "value": "/*\n * Copyright 2018 EMBL - European Bioinformatics Institute\n * Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this\n * file except in compliance with the Lic...
java
chosen
[ { "from": "human", "value": "Add session manager for frequently used functions.\n" }, { "from": "gpt", "value": "package org.sana.android.app;\n\nimport android.content.Context;\n\nimport org.sana.android.Constants;\nimport org.sana.android.content.core.ObserverWrapper;\nimport org.sana.core.Obs...
java
chosen
[ { "from": "human", "value": "Create class for managing list of servers client can connect to.\n" }, { "from": "gpt", "value": "package cloudeventbus.client;\n\nimport java.net.SocketAddress;\nimport java.util.ArrayList;\nimport java.util.Iterator;\nimport java.util.List;\n\n/**\n * Keeps a list ...
java
chosen
[ { "from": "human", "value": "Add utility class for setters and getters in beans.\n" }, { "from": "gpt", "value": "/*\n * @(#) BeanUtils.java\n *\n * Copyright (C) 2016, Chris Wareham, All Rights Reserved\n */\n\npackage net.chriswareham.util;\n\nimport java.util.Collections;\nimport java.util.Da...
java
chosen
[ { "from": "human", "value": "Add java tests to confirmation servlet.\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 obtain a c...
java
chosen
[ { "from": "human", "value": "Add tests for 'getPlantByPlantID' in 'PlantController.java'\n\n'gson.fromJson(json, Plant.class)' creates a new object id for the plant even though there is already one.\n" }, { "from": "gpt", "value": "package umm3601.plant;\n\nimport com.google.gson.Gson;\nimport o...
java
chosen
[ { "from": "human", "value": "Implement backend unique usernames check.\n" }, { "from": "gpt", "value": "package com.google.sps;\n\nimport org.springframework.web.bind.annotation.PostMapping;\nimport org.springframework.web.bind.annotation.RequestBody;\n\nimport com.google.auth.oauth2.GoogleCrede...
java
chosen
[ { "from": "human", "value": "Upgrade version requests to full service to get access to json processing\n\n\nFormer-commit-id: 90bd46d3c3e8b472c266f9bb49d0b12eda107456" }, { "from": "gpt", "value": "package org.intermine.webservice.server;\n\n/*\n * Copyright (C) 2002-2011 FlyMine\n *\n * This co...
java
chosen
[ { "from": "human", "value": "Add blorm main class with builder static class\n" }, { "from": "gpt", "value": "package br.com.bloder.blorm;\n\n/**\n * Created by bloder on 05/06/16.\n */\npublic class Blorm {\n\n public static class Builder {\n \n }\n}\n" } ]
java
chosen
[ { "from": "human", "value": "Revert \"Revert \"Interface for holding configurable logic for determining acting principal\"\"\n\nThis reverts commit 574e50f3047b2ff3ab87a7900ce02c6dce7facb9.\n" }, { "from": "gpt", "value": "package org.codehaus.groovy.grails.plugins.orm.auditable;\n\nimport org.c...
java
chosen
[ { "from": "human", "value": "Add test case for transient field of nonserializable class\n\n\ngit-svn-id: e7d6bde23f017c9ff4efd468d79d66def666766b@6569 eae3c2d3-9b19-0410-a86e-396b6ccb6ab3\n" }, { "from": "gpt", "value": "import java.io.ByteArrayInputStream;\nimport java.io.ByteArrayOutputStream;...
java
chosen
[ { "from": "human", "value": "Add utility method for linking Focusable components of a GUI\n" }, { "from": "gpt", "value": "/*\n * This file is part of jGui API, licensed under the MIT License (MIT).\n *\n * Copyright (c) 2016 johni0702 <https://github.com/johni0702>\n * Copyright (c) contributor...
java
chosen
[ { "from": "human", "value": "Add a task to delete a workspace.\n" }, { "from": "gpt", "value": "package com.google.sps.tasks;\n\nimport java.io.IOException;\nimport java.util.concurrent.ExecutionException;\n\nimport javax.servlet.ServletException;\nimport javax.servlet.annotation.WebServlet;\nim...
java
chosen
[ { "from": "human", "value": "Add enum for biological sample group\n" }, { "from": "gpt", "value": "/**\n * Copyright © 2011-2014 EMBL - European Bioinformatics Institute\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance w...
java
chosen
[ { "from": "human", "value": "leetcode: Remove Nth Node From End of List\n" }, { "from": "gpt", "value": "package main.algorithm.leetcode;\n\nimport org.junit.Test;\n\n/**\n * Title : main.algorithm.leetcode <br>\n * Description :\n * <P> Runtime: 0 ms, faster than 100.00% of Java online submis...
java
chosen
[ { "from": "human", "value": "Add contact activity test with basic framework\n" }, { "from": "gpt", "value": "package com.cwainner.chris.recipecentral;\n\nimport android.os.Build;\nimport android.widget.TextView;\n\nimport org.junit.Before;\nimport org.junit.Test;\nimport org.junit.runner.RunWith...
java
chosen
[ { "from": "human", "value": "Add file which should have been checked in as part of 10560.\n\n\ngit-svn-id: 6bd94cac40bd5c1df74b384d972046d926de6ffa@10561 a8845c50-7012-0410-95d3-8e1449b9b1e4\n" }, { "from": "gpt", "value": "package org.mifos.application.customer.business;\r\n\r\nimport junit.fra...
java
chosen
[ { "from": "human", "value": "Add GitAPI.init() failure mode tests\n" }, { "from": "gpt", "value": "package hudson.plugins.git;\n\nimport hudson.EnvVars;\nimport hudson.model.TaskListener;\nimport hudson.util.StreamTaskListener;\nimport org.jenkinsci.plugins.gitclient.GitClient;\nimport org.jvnet...
java
chosen
[ { "from": "human", "value": "Add jpkorjar protocol decoder test" }, { "from": "gpt", "value": "package org.traccar.protocol;\n\n\nimport org.junit.Test;\nimport org.traccar.ProtocolTest;\n\npublic class JpKorjarProtocolDecoderTest extends ProtocolTest {\n\n @Test\n public void testDecode()...
java
chosen
[ { "from": "human", "value": "Add interface between activity and model.\n" }, { "from": "gpt", "value": "package eic.beike.projectx.model;\n\n/**\n * Interface called by the game activity.\n *\n * @author alex\n */\npublic interface IGameModel {\n /**\n * Try to claim the bonus points.\n ...
java
chosen
[ { "from": "human", "value": "Add our first simple unit test\n" }, { "from": "gpt", "value": "package org.sil.bloom.reader.models;\n\nimport org.junit.Test;\n\nimport java.util.Arrays;\nimport java.util.Collections;\nimport java.util.List;\n\nimport static org.hamcrest.core.Is.is;\nimport static ...
java
chosen
[ { "from": "human", "value": "Add a new scan that represents the outer loop coming into the inner for group operations.\n" }, { "from": "gpt", "value": "/**\n * END USER LICENSE AGREEMENT (“EULA”)\n *\n * READ THIS AGREEMENT CAREFULLY (date: 9/13/2011):\n * http://www.akiban.com/licensing/2011091...
java
chosen
[ { "from": "human", "value": "Add a package annotation to distancemetrics.\n" }, { "from": "gpt", "value": "/**\n * The {@code distancemetrics} package contains strategy classes to parametrize\n * the way self-organizing maps measure the distance from a neuron to an input\n * vector. The classes...
java
chosen
[ { "from": "human", "value": "Add unit test for SuperSpeed Endpoint Companion Descriptor" }, { "from": "gpt", "value": "/*\n * Copyright (C) 2013 Klaus Reimer <k@ailis.de>\n * See LICENSE.md for licensing information.\n */\n\npackage de.ailis.usb4java.libusb;\n\nimport static de.ailis.usb4java.te...
java
chosen
[ { "from": "human", "value": "Make a multidim test image plugin\n" }, { "from": "gpt", "value": "package imagej.core.plugins.debug;\n\nimport java.util.Arrays;\n\nimport net.imglib2.meta.Axes;\nimport net.imglib2.meta.AxisType;\nimport imagej.ImageJ;\nimport imagej.data.ChannelCollection;\nimport...
java
chosen
[ { "from": "human", "value": "feat(core): Add model for specifying client config options\n" }, { "from": "gpt", "value": "package com.ibm.watson.developer_cloud.http;\n\nimport java.net.Proxy;\n\n/**\n * Options class for configuring the HTTP client.\n */\npublic class HttpConfigOptions {\n priv...
java
chosen
[ { "from": "human", "value": "Add simple dataset service bean\n\nsave, find (by id) and find by owner\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 te...
java
chosen
[ { "from": "human", "value": "Test cases for whether we can correctly identify the path leading to the NPE\n\n\ngit-svn-id: e7d6bde23f017c9ff4efd468d79d66def666766b@5978 eae3c2d3-9b19-0410-a86e-396b6ccb6ab3\n" }, { "from": "gpt", "value": "package npe;\n\npublic class IdentifyCorrectBranchPlease ...
java
chosen
[ { "from": "human", "value": "Add a test for `Arrays`\n" }, { "from": "gpt", "value": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements. See the NOTICE file\n * distributed with this work for additional information\n * regarding cop...
java
chosen
[ { "from": "human", "value": "Add statement for problem 10\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 clause parameter padding\n" }, { "from": "gpt", "value": "package com.vladmihalcea.book.hpjp.hibernate.query;\n\nimport com.vladmihalcea.book.hpjp.util.AbstractTest;\nimport com.vladmihalcea.book.hpjp.util.providers.Database;\nimport org.junit.Test;\n\nimport ...
java
chosen
[ { "from": "human", "value": "Test creation and initialization of a Marker instance\n" }, { "from": "gpt", "value": "import com.google.appengine.api.datastore.Key;\nimport com.google.appengine.api.datastore.KeyFactory;\nimport com.google.apphosting.api.DatastorePb;\nimport com.google.sps.data.Mar...
java
chosen
[ { "from": "human", "value": "Add java solution for 86. Partition List\n\n86. Partition List: https://leetcode.com/problems/partition-list/" }, { "from": "gpt", "value": "package leetcode.partition_list;\n\nimport common.ListNode;\n\npublic class Solution {\n\tpublic ListNode partition(ListNode h...
java
chosen
[ { "from": "human", "value": "Add unit tests for JavaProcessManagerFactory\n" }, { "from": "gpt", "value": "/*\n * Copyright 2017 Viktor Csomor\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": "system", "value": "Add solution to problem 59\n" }, { "from": "human", "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 * Yo...
java
chosen
[ { "from": "human", "value": "Add a new transcoder for Long's.\n" }, { "from": "gpt", "value": "// Copyright (c) 2006 Dustin Sallings <dustin@spy.net>\n\npackage net.spy.memcached.transcoders;\n\nimport java.io.ObjectStreamClass;\n\nimport net.spy.SpyObject;\nimport net.spy.util.CloseUtil;\n\nim...
java
chosen
[ { "from": "human", "value": "Add junit test for Null Mailet\n\ngit-svn-id: 88158f914d5603334254b4adf21dfd50ec107162@420596 13f79535-47bb-0310-9956-ffa450edef68\n" }, { "from": "gpt", "value": "/***********************************************************************\n * Copyright (c) 2006 The Apa...
java
chosen
[ { "from": "human", "value": "Create test class for 'EKGSerialPort'\n" }, { "from": "gpt", "value": "/* *\\\n** SICU Stress Measurement System **\n** Project P04 | C38...
java
chosen
[ { "from": "human", "value": "Set up for undo/redo tests\n" }, { "from": "gpt", "value": "package seedu.todo.guitests;\n\nimport static org.junit.Assert.*;\nimport static seedu.todo.testutil.AssertUtil.assertSameDate;\n\nimport java.time.LocalDate;\nimport java.time.LocalDateTime;\n\nimport org.j...
java
chosen
[ { "from": "human", "value": "Add MemcachedCache unit test case" }, { "from": "gpt", "value": "package org.pinae.timon.cache.decorator.memcached;\n\nimport org.apache.log4j.Logger;\nimport org.junit.Before;\nimport org.junit.Test;\nimport org.pinae.timon.cache.Cache;\nimport org.pinae.timon.cache...
java
chosen
[ { "from": "human", "value": "Add statement to problem 41\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 utility for handling legacy tanks\n" }, { "from": "gpt", "value": "package openmods.utils;\n\nimport javax.annotation.Nullable;\nimport net.minecraft.tileentity.TileEntity;\nimport net.minecraft.util.EnumFacing;\nimport net.minecraftforge.fluids.capability.Capabi...
java
chosen
[ { "from": "human", "value": "Add utility for testing database\n" }, { "from": "gpt", "value": "package org.realityforge.jeo.geolatte.jpa.eclipselink;\n\nimport java.util.Properties;\nimport javax.persistence.EntityManager;\nimport javax.persistence.EntityManagerFactory;\nimport javax.persistence...
java
chosen
[ { "from": "human", "value": "Create class with attributes for haval algorithm,\n" }, { "from": "gpt", "value": "package com.m4gik;\n\n/**\n * \n * This class contains static fields, attributes for {@link Haval} class.\n * \n * @author Michał Szczygieł <michal.szczygiel@wp.pl>\n * \n */\npublic c...
java
chosen
[ { "from": "human", "value": "Add a unit test for the AsciidoctorFormatter\n\nChange-Id: Iceff1d61512b9489e3a0a2bee9e3c5b208635853\n" }, { "from": "gpt", "value": "// Copyright (C) 2016 The Android Open Source Project\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// y...
java
chosen
[ { "from": "human", "value": "Add unit test for ClassType.\n" }, { "from": "gpt", "value": "package mjc.types;\n\nimport static org.junit.Assert.*;\nimport static org.hamcrest.Matchers.is;\n\nimport org.junit.Test;\n\npublic class ClassTypeTest {\n\n final ClassType classA1 = new ClassType(\"C...
java
chosen
[ { "from": "human", "value": "Add component for automatically synchronising a Transform component between multiplayer clients\n" }, { "from": "gpt", "value": "package com.ezardlabs.dethsquare.multiplayer;\n\nimport java.nio.ByteBuffer;\n\npublic class NetworkTransform extends NetworkBehaviour {\n...
java
chosen
[ { "from": "human", "value": "Implement unit test for QueuedWorkflow delete by git details functionality\n" }, { "from": "gpt", "value": "package org.commonwl.view.workflow;\n\nimport org.apache.jena.base.Sys;\nimport org.commonwl.view.git.GitDetails;\nimport org.junit.Rule;\nimport org.junit.Tes...
java
chosen
[ { "from": "human", "value": "Test that field declaration order is kept\n" }, { "from": "gpt", "value": "package io.github.yurloc.autostring;\n\nimport static org.assertj.core.api.Assertions.assertThat;\n\nimport org.junit.Test;\n\npublic class FieldOrderingTest {\n\n /**\n * Reflection AP...
java
chosen
[ { "from": "human", "value": "Use simple test case for FieldSampleComparator.\n\ngit-svn-id: https://svn.apache.org/repos/asf/jmeter/trunk@1719686 13f79535-47bb-0310-9956-ffa450edef68\n\nFormer-commit-id: 81c1a02bcf426c48985909c4104d67c02346447f" }, { "from": "gpt", "value": "/*\n * Licensed to t...
java
chosen
[ { "from": "human", "value": "Create a constant angle layouter\n" }, { "from": "gpt", "value": "package nl.dvberkel.layout;\n\nimport nl.dvberkel.box.BoundingBox;\nimport nl.dvberkel.box.Translation;\n\nimport static nl.dvberkel.box.BoundingBox.mergeAll;\n\npublic class ConstantAngleLayouter impl...
java
chosen
[ { "from": "human", "value": "Add another shared noncompile test.\n" }, { "from": "gpt", "value": "/**\n * Check that return in main method is not accepted.\n *\n * @author Elvis Stansvik <elvstone@gmail.com>\n */\nclass ReturnInMainMethod {\n public static void main(String[] args) {\n ...
java
chosen
[ { "from": "human", "value": "Add announcement class as a model for announcement table\n" }, { "from": "gpt", "value": "/*\n * Copyright 2015 Ryan Gilera.\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 abstract builder for select dialogs\n" }, { "from": "gpt", "value": "/*\n * Copyright 2020 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 obtain...
java
chosen
[ { "from": "human", "value": "Add tool for dumping some metadata from repository\n" }, { "from": "gpt", "value": "package focusedCrawler.tools;\n\nimport java.io.PrintStream;\nimport java.util.HashMap;\nimport java.util.Map;\n\nimport com.fasterxml.jackson.databind.ObjectMapper;\nimport com.googl...
java
chosen
[ { "from": "human", "value": "Add persister which backs up the original file\n\nwas: bc5b18ff62f1dc71916a47a80c3fde2dd50b3bed\n" }, { "from": "gpt", "value": "/*\n * JBoss, Home of Professional Open Source.\n * Copyright 2011, Red Hat, Inc., and individual contributors\n * as indicated by the @au...
java
chosen
[ { "from": "human", "value": "Introduce a base type for providers that support injection\n" }, { "from": "gpt", "value": "/*\n * Copyright 2016 Michael Rozumyanskiy\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 an integration test for Beagle (one for ProduceBeagleInput and one for BeagleOutputToVCFWalker)\n\n\n\ngit-svn-id: 4561c0a8f080806b19201efb9525134c00b76d40@3897 348d0f76-0448-11de-a6fe-93d51630548a\n" }, { "from": "gpt", "value": "/*\n * Copyright (c) 2010.\n *\n...
java
chosen
[ { "from": "human", "value": "Add a JMS exception for transaction commit being in doubt." }, { "from": "gpt", "value": "/**\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional...
java
chosen
[ { "from": "human", "value": "Add the sketch of value bounded specification\n" }, { "from": "gpt", "value": "package io.github.uetoyo.patterns.specification;\n\nimport com.google.common.annotations.Beta;\n\n@Beta\nabstract class ValueBoundedSpecification<T, V> implements Specification<T> {\n\t\n\...
java
chosen
[ { "from": "human", "value": "Add basic test for the ListAccess REST endpoint\n\nListAccess is forwarding calls to GetAccess which populates the data in\nthe JSON. Since we already have tests for GetAccess\n(com.google.gerrit.acceptance.api.project.AccessIT) we do not need to\nvalidate the JSON once again in...
java
chosen
[ { "from": "human", "value": "Add auto smelt loot modifier" }, { "from": "gpt", "value": "package info.u_team.u_team_test.global_loot_modifier;\n\nimport java.util.List;\nimport java.util.stream.Collectors;\n\nimport com.google.gson.JsonObject;\n\nimport net.minecraft.inventory.Inventory;\nimport...
java
chosen
[ { "from": "human", "value": "Add quick implementation of Aufgabe 22\n" }, { "from": "gpt", "value": "public class Binom {\n private static int[][] coeff = null;\n\n public static void main (String[] args) {\n int threshold = 20;\n int i = 0;\n for (int n = 0; n < threshold; ++n) {\n ...
java
chosen
[ { "from": "human", "value": "JCR-3072: Add a factory for creating new sessions\n\nAdd an initial SessionFactory class. Work in progress.\n\ngit-svn-id: 02b679d096242155780e1604e997947d154ee04a@1176586 13f79535-47bb-0310-9956-ffa450edef68\n" }, { "from": "gpt", "value": "/*\n * Licensed to the Ap...
java
chosen
[ { "from": "human", "value": "Add singleton for getting link preview data\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 o...
java
chosen
[ { "from": "human", "value": "Add new file accidentally forgotten in 7b297f45.\n" }, { "from": "gpt", "value": "\n/*\n * Copyright (C) 2015 Archie L. Cobbs. All rights reserved.\n */\n\npackage org.jsimpledb.cli.cmd;\n\nimport java.util.Map;\n\nimport org.jsimpledb.SessionMode;\nimport org.jsimpl...
java
chosen
[ { "from": "human", "value": "Add new kind of exception\n" }, { "from": "gpt", "value": "package se.kth.csc.controller;\n\nimport org.springframework.http.HttpStatus;\nimport org.springframework.web.bind.annotation.ResponseStatus;\n\n@ResponseStatus(HttpStatus.NOT_FOUND)\npublic class BadNameExce...
java
chosen
[ { "from": "human", "value": "Add a testsuite for JUnit tests.\n" }, { "from": "gpt", "value": "/*\n * Copyright 2013 Daniel Kurka\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\"); you may not\n * use this file except in compliance with the License. You may obtain a copy o...
java
chosen
[ { "from": "human", "value": "Create dumb repository for events\n" }, { "from": "gpt", "value": "package fr.alecharp.picshare.repository;\n\nimport fr.alecharp.picshare.domain.Event;\n\nimport javax.inject.Singleton;\nimport java.util.HashMap;\nimport java.util.Map;\nimport java.util.Optional;\n\...
java
chosen
[ { "from": "human", "value": "Add basic block registry object" }, { "from": "gpt", "value": "package info.u_team.u_team_core.util.registry;\n\nimport java.util.function.Supplier;\n\nimport net.minecraft.block.Block;\nimport net.minecraft.item.Item;\nimport net.minecraftforge.fml.RegistryObject;\n...
java
chosen
[ { "from": "human", "value": "Add a list trimming storage container\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 without...
java
chosen
[ { "from": "human", "value": "Add example of slicewise op with median filter\n" }, { "from": "gpt", "value": "\npackage net.restlesscoder.sandbox.imagej;\n\nimport net.imagej.Dataset;\nimport net.imagej.ImageJ;\nimport net.imagej.ops.Ops;\nimport net.imagej.ops.special.computer.Computers;\nimport...
java
chosen
[ { "from": "human", "value": "Add test for authentication failure\n" }, { "from": "gpt", "value": "package com.github.pgasync.impl;\n\nimport com.github.pgasync.ConnectionPool;\nimport com.github.pgasync.SqlException;\nimport org.junit.Test;\n\nimport java.util.concurrent.ArrayBlockingQueue;\nimp...
java
chosen
[ { "from": "human", "value": "Add utility class for handling thumbnail size/spacing.\n" }, { "from": "gpt", "value": "package com.antew.redditinpictures.library.image;\n\nimport android.content.res.Resources;\n\nimport com.antew.redditinpictures.library.R;\n\npublic class ThumbnailInfo {\n pri...
java
chosen
[ { "from": "system", "value": "Change this back to private\n" }, { "from": "human", "value": "package com.gmail.nossr50.util.blockmeta;\n\npublic class PrimitiveChunkletStore implements ChunkletStore {\n private static final long serialVersionUID = -3453078050608607478L;\n\n /** X, Z, Y */\...
java
chosen
[ { "from": "human", "value": "Add weighted quick union union find.\n" }, { "from": "gpt", "value": "package me.alivecode.algs4;\n\nimport edu.princeton.cs.algs4.StdIn;\nimport edu.princeton.cs.algs4.StdOut;\n\n\npublic class WeightedQuickUnionUF {\n private int[] parent;\n private int[] siz...
java
chosen
[ { "from": "human", "value": "Move test code to ... test\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 org.scija...
java
chosen
[ { "from": "human", "value": "Add solution for 6. ZigZag Conversion" }, { "from": "gpt", "value": "// 6. ZigZag Conversion\n/**\n * The string \"PAYPALISHIRING\" is written in a zigzag pattern on a given number of rows like this: \n * (you may want to display this pattern in a fixed font for bett...
java
chosen
[ { "from": "human", "value": "Solve the counting sort 3 problem.\n" }, { "from": "gpt", "value": "import java.io.*;\nimport java.util.*;\n\n// https://www.hackerrank.com/challenges/countingsort3\npublic class CountingSort3 {\n\n private Integer[] getNumbersArray() throws IOException {\n ...
java
chosen
[ { "from": "human", "value": "Create command facade to encapsulate command execution.\n" }, { "from": "gpt", "value": "package com.github.aureliano.achmed.resources.exec;\n\nimport java.util.concurrent.ExecutionException;\nimport java.util.concurrent.ExecutorService;\nimport java.util.concurrent....
java
chosen
[ { "from": "human", "value": "Add concrete implementation for MailboxQuota matching. Thanks Barry. See JAMES-1196\n\ngit-svn-id: de9d04cf23151003780adc3e4ddb7078e3680318@1071533 13f79535-47bb-0310-9956-ffa450edef68\n" }, { "from": "gpt", "value": "/************************************************...
java
chosen
[ { "from": "human", "value": "Add gate up / flapper down command group." }, { "from": "gpt", "value": "package org.usfirst.frc.team3335.robot.commands;\r\n\r\nimport edu.wpi.first.wpilibj.command.CommandGroup;\r\n\r\npublic class GateUpFlapperDown extends CommandGroup {\r\n\t\r\n\tpublic GateUpFl...
java
chosen
[ { "from": "human", "value": "Add test for wrong behavior\n" }, { "from": "gpt", "value": "package de.retest.recheck.printer;\n\nimport static org.assertj.core.api.Assertions.assertThat;\nimport static org.mockito.Mockito.mock;\nimport static org.mockito.Mockito.when;\n\nimport org.junit.jupiter....
java
chosen
[ { "from": "human", "value": "Add history interface to store histories of recipe and scheduling info.\n" }, { "from": "gpt", "value": "/*\n * Copyright 2015 The Mashub Project\n *\n * The Mashub Project licenses this file to you under the Apache License,\n * version 2.0 (the \"License\"); you may...
java
chosen
[ { "from": "human", "value": "Add util class with botmove/dir converter\n" }, { "from": "gpt", "value": "package util;\n\nimport bot.Bender.BotMove;\nimport bot.Bender.DirectionType;\n\n/**\n * Created by Daniel Hofmeister on 21.11.2015.\n */\npublic class BotmoveDirectionConverter {\n\n publi...
java
chosen
[ { "from": "human", "value": "Make the Script Editor a proper plugin\n\nSigned-off-by: Johannes Schindelin <53fb8db7833fca1e1746dd8592f61048d350f64c@gmx.de>\n" }, { "from": "gpt", "value": "//\n// ScriptEditor.java\n//\n\n/*\nImageJ software for multidimensional image processing and analysis.\n\n...
java
chosen
[ { "from": "human", "value": "Add Daily verses writer (to bintex format).\n" }, { "from": "gpt", "value": "package yuku.alkitabconverter.daily_verse;\n\nimport yuku.alkitab.yes2.io.RandomOutputStream;\nimport yuku.bintex.BintexWriter;\n\nimport java.io.File;\nimport java.io.FileNotFoundException;...
java
chosen
[ { "from": "human", "value": "Add test for multithreaded expiration\n" }, { "from": "gpt", "value": "package org.mapdb;\n\n\nimport org.junit.Test;\n\nimport java.util.Map;\nimport java.util.Random;\nimport java.util.UUID;\nimport java.util.concurrent.Callable;\nimport java.util.concurrent.TimeUn...
java
chosen
[ { "from": "human", "value": "Add a simple BSON unit test." }, { "from": "gpt", "value": "/*\r\n * Licensed to the Apache Software Foundation (ASF) under one\r\n * or more contributor license agreements. See the NOTICE file\r\n * distributed with this work for additional information\r\n * regard...
java
chosen
[ { "from": "human", "value": "Add test for reply quoting in wikify()\n\nChange-Id: I273948bb67aa8069f4cbafea441ca27e8f70779f\n" }, { "from": "gpt", "value": "// Copyright (C) 2013 The Android Open Source Project\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may...
java
chosen
[ { "from": "human", "value": "Check binary tree whether it is a binary search tree\n" }, { "from": "gpt", "value": "/* Hidden stub code will pass a root argument to the function below. Complete the function to solve the challenge. Hint: you may want to write one or more helper functions.\n\nThe N...
java
chosen
[ { "from": "human", "value": "Create interface to package manager implementations.\n" }, { "from": "gpt", "value": "package com.github.aureliano.achmed.os.pkg;\n\nimport com.github.aureliano.achmed.command.CommandResponse;\nimport com.github.aureliano.achmed.resources.properties.PackageProperties...
java
chosen
[ { "from": "human", "value": "Add GELF TCP transport class.\n" }, { "from": "gpt", "value": "/*\n * Copyright 2012-2014 TORCH GmbH\n *\n * This file is part of Graylog2.\n *\n * Graylog2 is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public Licen...
java
chosen
[ { "from": "human", "value": "Add dagger module for SavingsAccountsDataManager\n" }, { "from": "gpt", "value": "package de.fau.amos.virtualledger.android.dagger.module;\n\nimport javax.inject.Singleton;\n\nimport dagger.Module;\nimport dagger.Provides;\nimport de.fau.amos.virtualledger.android.ap...
java
chosen
[ { "from": "human", "value": "Offline-Imagery: Add file download work manager\n\nThis change introduces a work manager for file download workers. This\nmanager is primarily a lightweight wrapper around WorkManager that makes\nit easier to make FileDownloadWorker requests and ensures requests to\nthe FileDown...
java
chosen
[ { "from": "human", "value": "Create : 633 Sum of Square Numbers\n" }, { "from": "gpt", "value": "public class Solution {\n\n public boolean judgeSquareSum(int c) {\n\n int low = 0;\n int high = (int) Math.sqrt(c);\n\n while (low <= high) {\n\n int sum = low * l...
java
chosen
[ { "from": "human", "value": "Solve Salary with Bonus in java\n" }, { "from": "gpt", "value": "import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\n\npublic class Main {\n public static void main(String args[]) throws IOException {\n InputStrea...
java
chosen
[ { "from": "human", "value": "Add collection helper methods\nAdds convenience methods for insertion into Map<?, List<?>> and Map<?, Set<?>>.\n" }, { "from": "gpt", "value": "package org.cyclops.cyclopscore.helper;\n\nimport com.google.common.collect.Lists;\nimport com.google.common.collect.Sets;\...
java
chosen
[ { "from": "system", "value": "Add some tests to problem 22\n" }, { "from": "human", "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 * ...
java
chosen
[ { "from": "human", "value": "Send flow through graph to easily detect what bubbles there are\n" }, { "from": "gpt", "value": "package parser.model;\n\nimport java.util.ArrayList;\n\npublic class FindBubbles {\n\t\n\tprivate Graph graph;\n\t\n\tpublic FindBubbles(Graph graph) {\n\t\tthis.graph = ...
java
chosen