conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "human", "value": "Add DefaultNonnull annotation to jst305 crap\n" }, { "from": "gpt", "value": "/*\n * DomUI Java User Interface - shared code\n * Copyright (c) 2010 by Frits Jalvingh, Itris B.V.\n *\n * This library is free software; you can redistribute it and/or\n * modify it under...
java
chosen
[ { "from": "human", "value": "Create a test for `Queries` utility class.\n" }, { "from": "gpt", "value": "/*\n *\n * Copyright 2016, 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 copyright no...
java
chosen
[ { "from": "human", "value": "Add simple example of transformation class\n" }, { "from": "gpt", "value": "/*\n * This file is released under terms of BSD license\n * See LICENSE file for more information\n */\npackage cx2x.translator.transformation;\n\nimport cx2x.translator.language.base.ClawLan...
java
chosen
[ { "from": "human", "value": "Add delivery receipt test case" }, { "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 DeliveryReceiptP...
java
chosen
[ { "from": "human", "value": "Add simple test case for the \"scene not updated\" crash in the SDK\n" }, { "from": "gpt", "value": "package jme3test.scene;\n\nimport com.jme3.app.SimpleApplication;\nimport com.jme3.material.Material;\nimport com.jme3.scene.Geometry;\nimport com.jme3.scene.Node;\ni...
java
chosen
[ { "from": "human", "value": "Add a test for detecting the blazeproject filetype.\n\nPiperOrigin-RevId: 369601112\n" }, { "from": "gpt", "value": "/*\n * Copyright 2021 The Bazel Authors. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may no...
java
chosen
[ { "from": "human", "value": "Add test assertion helper class\n\nSigned-off-by: Fred Bricon <3278c038c93c729ae96f0d035919e3fb69e9cff7@gmail.com>\n" }, { "from": "gpt", "value": "/*******************************************************************************\n * Copyright (c) 2016 Red Hat Inc. an...
java
chosen
[ { "from": "human", "value": "Add engine for common use of asynch LDAP requests\n" }, { "from": "gpt", "value": "package org.csstudio.utility.ldap.engine;\n\npublic class Engine extends Thread {\n\n\tprivate static Engine thisEngine = null;\n\t/**\n\t * @param args\n\t */\n\tpublic void run () {\...
java
chosen
[ { "from": "human", "value": "Add helpers for rendering fluid tanks in guis\n" }, { "from": "gpt", "value": "package org.cyclops.cyclopscore.helper;\n\nimport net.minecraft.client.gui.Gui;\nimport net.minecraft.client.renderer.GlStateManager;\nimport net.minecraft.client.renderer.texture.TextureA...
java
chosen
[ { "from": "human", "value": "Add basic tests for calculating span count\n" }, { "from": "gpt", "value": "package ca.antonious.viewcelladapter.utilstests;\n\nimport org.junit.Test;\n\nimport ca.antonious.viewcelladapter.TestViewCell;\nimport ca.antonious.viewcelladapter.utils.ViewCellUtils;\nimpo...
java
chosen
[ { "from": "human", "value": "Add a descriptor for parameterized types\n" }, { "from": "gpt", "value": "/*\n * Copyright 2015 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 the License.\n * You...
java
chosen
[ { "from": "human", "value": "Add test fro UnicastProcessor rejecting second Subscriber properly" }, { "from": "gpt", "value": "package rsc.processor;\n\nimport java.util.concurrent.ConcurrentLinkedQueue;\n\nimport org.junit.Test;\n\nimport rsc.test.TestSubscriber;\n\npublic class UnicastProcesso...
java
chosen
[ { "from": "human", "value": "Add unit test for FixedPoint\n" }, { "from": "gpt", "value": "package fm.last.commons.kyoto;\n\nimport static org.junit.Assert.assertEquals;\n\nimport java.util.ArrayList;\nimport java.util.Collection;\nimport java.util.List;\n\nimport org.junit.Test;\nimport org.jun...
java
chosen
[ { "from": "human", "value": "Create a skeleton for problem 81\n" }, { "from": "gpt", "value": "package leetcode;\n\n/**\n * https://leetcode.com/problems/search-in-rotated-sorted-array-ii/\n */\npublic class Problem81 {\n public boolean search(int[] nums, int target) {\n return false;\...
java
chosen
[ { "from": "human", "value": "Increase of-renderer coverage on RedirectExecutor.\n\n RedirectExecutor.java\n\nChange-Id: Icdedc03106f5a1f31d22d968ac6aa53de1ffe296\nSigned-off-by: Victor Mota <a399842758ce81a1b2704ada69a36369cee4aa4d@atlantico.com.br>\n" }, { "from": "gpt", "value": "/*\n * Cop...
java
chosen
[ { "from": "human", "value": "Add integration tests for non-arez dependencies\n" }, { "from": "gpt", "value": "package arez.integration.observed;\n\nimport arez.Arez;\nimport arez.Observer;\nimport arez.annotations.ArezComponent;\nimport arez.annotations.Observable;\nimport arez.annotations.Obser...
java
chosen
[ { "from": "human", "value": "Add top-level package info to javadoc\n" }, { "from": "gpt", "value": "/**\n * An implementation of the HTTP Digest authentication scheme for Android.\n *\n * With a small effort you can use it to get HTTP digest working with HttpURLConnection or any\n * other HTTP s...
java
chosen
[ { "from": "human", "value": "Add handler for timeseries parameter\n" }, { "from": "gpt", "value": "package fi.nls.oskari.control.view.modifier.param;\n\nimport fi.nls.oskari.annotation.OskariViewModifier;\nimport fi.nls.oskari.util.JSONHelper;\nimport fi.nls.oskari.view.modifier.ModifierExceptio...
java
chosen
[ { "from": "human", "value": "Remove DocumentProvider from native image\n\nThis is done since the Provider is very unlikely to be needed and it\ncontributes a non trivial amount of code to the image.\nA future implementation might be more sophisticated about the cases\nunder which the DocumentProvider is rem...
java
chosen
[ { "from": "human", "value": "Define generic storage based upon a group\n" }, { "from": "gpt", "value": "/*\n * Zorbage: an algebraic data hierarchy for use in numeric processing.\n *\n * Copyright (C) 2016 Barry DeZonia\n * \n * Redistribution and use in source and binary forms, with or without\...
java
chosen
[ { "from": "human", "value": "Add view with a toolbar (but without minimize button as in BaseView)\n" }, { "from": "gpt", "value": "package com.codenvy.ide.ext.datasource.client.common;\n\nimport com.codenvy.ide.api.mvp.View;\nimport com.codenvy.ide.api.parts.PartStackUIResources;\nimport com.goo...
java
chosen
[ { "from": "human", "value": "Test that JTA is disabled for Hibernate Reactive persistence units\n\nSigned-off-by: Yoann Rodière <be2a24d2f52a7ba2aca48263378b2614d5b68cd6@hibernate.org>\n" }, { "from": "gpt", "value": "package io.quarkus.hibernate.reactive;\n\nimport static org.assertj.core.api.A...
java
chosen
[ { "from": "human", "value": "Add utility class to inspect Guice wiring\n\nIt is known that it is not so easy to troubleshoot Guice wiring problems.\nThankfully the Guice authors added java util logging facility. This change\nintroduces the Guice logger activator to easily enable/disable Guice logging.\n\nTo...
java
chosen
[ { "from": "human", "value": "Implement a descriptor for enum values\n" }, { "from": "gpt", "value": "/*\n * Copyright 2015 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 the License.\n * You m...
java
chosen
[ { "from": "human", "value": "Add @Generated to protobuf package file.\n" }, { "from": "gpt", "value": "/*\n * Copyright 2016 MovingBlocks\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": "Create skeleton for problem 215\n" }, { "from": "gpt", "value": "package leetcode;\n\n/**\n * https://leetcode.com/problems/kth-largest-element-in-an-array/\n */\npublic class Problem215 {\n public int findKthLargest(int[] nums, int k) {\n \n }\n \n ...
java
chosen
[ { "from": "human", "value": "Add test case for setting the preferred pooled optimizer strategy\n" }, { "from": "gpt", "value": "package com.vladmihalcea.book.hpjp.hibernate.identifier;\n\nimport org.hibernate.cfg.AvailableSettings;\nimport org.junit.Test;\n\nimport javax.persistence.*;\nimport j...
java
chosen
[ { "from": "human", "value": "Add test with try and column with at sign\n" }, { "from": "gpt", "value": "/*\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 of the License at\n *\n ...
java
chosen
[ { "from": "human", "value": "Add UniqueTagList test to account for duplicateTagException thrown to improve test coverage\n" }, { "from": "gpt", "value": "package seedu.taskitty.model;\n\nimport java.util.ArrayList;\nimport java.util.Collection;\n\nimport org.junit.Rule;\nimport org.junit.Test;\n...
java
chosen
[ { "from": "human", "value": "Allow dynamic conversion of import sql for SQL Server compatibility\n" }, { "from": "gpt", "value": "/*\n * Copyright 2008-2013 the original author or authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file exc...
java
chosen
[ { "from": "human", "value": "Add class for storing status of ship placement\n\nStores size, direction and activation of placement\n" }, { "from": "gpt", "value": "package ships.model;\n\n/**\n *\n * @author r4pt0r\n */\npublic class ShipPlacementMode {\n\n private Ship.Size size = Ship.Size.O...
java
chosen
[ { "from": "human", "value": "Add a top-level test suite to run all tests at once.\n\nThis test suite lists all test classes, including those in sub-packages.\n" }, { "from": "gpt", "value": "/*\n * Copyright (c) 2012 The University of Manchester, UK.\n *\n * All rights reserved.\n *\n * Redistri...
java
chosen
[ { "from": "human", "value": "XWIKI-3105: Use the same Range implementation for all browsers\n\n\ngit-svn-id: 04343649e741710b2e0f622af6defd1ac33e5ca5@15390 f329d543-caf0-0310-9063-dda96c69346f\n" }, { "from": "gpt", "value": "/*\n * See the NOTICE file distributed with this work for additional\n...
java
chosen
[ { "from": "human", "value": "Add tests for the ConferenceAdapter\n" }, { "from": "gpt", "value": "package me.proxer.library.api;\n\nimport me.proxer.library.api.ConferenceAdapter.IntermediateConference;\nimport me.proxer.library.entitiy.messenger.Conference;\nimport org.junit.Before;\nimport org...
java
chosen
[ { "from": "human", "value": "Add more unit test from Oracle NIO documentation." }, { "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 informati...
java
chosen
[ { "from": "human", "value": "Add Executor implementation which executes tasks in Swing event thread\n" }, { "from": "gpt", "value": "package me.izstas.rfs.client.util;\n\nimport java.util.concurrent.Executor;\nimport javax.swing.SwingUtilities;\n\n/**\n * An executor whose {@link Executor#execut...
java
chosen
[ { "from": "human", "value": "Add parser for Brakeman JSON reports\n" }, { "from": "gpt", "value": "package edu.hm.hafner.analysis.parser;\n\nimport java.io.IOException;\nimport java.io.Reader;\n\nimport org.json.JSONArray;\nimport org.json.JSONException;\nimport org.json.JSONObject;\nimport org....
java
chosen
[ { "from": "human", "value": "Implement servlet for fetching user shopping list\n" }, { "from": "gpt", "value": "import com.google.appengine.api.datastore.DatastoreService;\nimport com.google.appengine.api.datastore.DatastoreServiceFactory;\nimport com.google.appengine.api.datastore.Entity;\nimpo...
java
chosen
[ { "from": "human", "value": "Add null checking by default\n" }, { "from": "gpt", "value": "@ParametersAreNonnullByDefault\n@DefaultAnnotation(Nonnull.class)\npackage com.swrve.logging;\n\nimport edu.umd.cs.findbugs.annotations.DefaultAnnotation;\nimport javax.annotation.Nonnull;\nimport javax.an...
java
chosen
[ { "from": "human", "value": "Add SQLProperites class for storing simple key value properties\n" }, { "from": "gpt", "value": "package com.brewtab.ircbot.util;\n\nimport java.io.IOException;\nimport java.io.InputStream;\nimport java.io.ObjectInputStream;\nimport java.io.ObjectOutputStream;\nimpor...
java
chosen
[ { "from": "human", "value": "Add a unit test class for the new cli client\n" }, { "from": "gpt", "value": "package brooklyn.cli;\n\nimport brooklyn.rest.BrooklynService;\nimport org.testng.annotations.AfterClass;\nimport org.testng.annotations.BeforeClass;\nimport org.testng.annotations.Test;\n\...
java
chosen
[ { "from": "system", "value": "Remove param that is no longer used.\n" }, { "from": "human", "value": "package rabbit.filter.authenticate;\n\nimport rabbit.http.HttpHeader;\nimport rabbit.proxy.Connection;\n\n/** Something that can authenticate users using some kind of database. \n */\npublic int...
java
chosen
[ { "from": "human", "value": "Add solution for deepest node in a BinaryTree :smile:\n" }, { "from": "gpt", "value": "package algorithms.problems;\n\nimport java.util.HashMap;\nimport java.util.Map;\n\nimport datastructures.tree.BinaryTree;\nimport datastructures.tree.TreeNode;\n\npublic class Dee...
java
chosen
[ { "from": "human", "value": "Add sum two in sorted array" }, { "from": "gpt", "value": "package org.pilgrim.leetcode.y2022;\n\nimport java.util.Arrays;\n\npublic class SumTwoInSorterArray {\n\n\tpublic static void main(String[] args) {\n\t\t// TODO Auto-generated method stub\n\n\t\tint[] indexes...
java
chosen
[ { "from": "human", "value": "Add an async task to parse the json.\n" }, { "from": "gpt", "value": "package fr.tvbarthel.apps.simpleweatherforcast.openweathermap;\n\n\nimport android.os.AsyncTask;\n\nimport org.json.JSONArray;\nimport org.json.JSONException;\nimport org.json.JSONObject;\n\nimport...
java
chosen
[ { "from": "human", "value": "Add test for Square (from the video)\n" }, { "from": "gpt", "value": "package ua.qa.training.sandbox;\n\nimport org.testng.Assert;\nimport org.testng.annotations.Test;\n\n/**\n * Created by osoboleva on 9/18/2016.\n */\npublic class SquareTests {\n\n @Test\n public...
java
chosen
[ { "from": "human", "value": "Add begining of alarm sending in monitoring service" }, { "from": "gpt", "value": "package org.bitrepository.monitoringservice;\n\nimport java.math.BigInteger;\nimport java.util.ArrayList;\nimport java.util.HashMap;\nimport java.util.List;\nimport java.util.Map;\n\ni...
java
chosen
[ { "from": "human", "value": "TEst pro marker třídu pokrývá 50%" }, { "from": "gpt", "value": "package cz.eeg.data;\r\n\r\nimport static org.junit.Assert.assertEquals;\r\nimport static org.junit.Assert.assertNotNull;\r\nimport static org.junit.Assert.fail;\r\n\r\nimport org.junit.Test;\r\n\r\npub...
java
chosen
[ { "from": "human", "value": "Add solution for review loop" }, { "from": "gpt", "value": "package se.movlin.hackerrank.reviewloop;\n\nimport java.util.ArrayList;\nimport java.util.List;\nimport java.util.Scanner;\nimport java.util.function.IntPredicate;\n\npublic class Solution {\n\n\tpublic stat...
java
chosen
[ { "from": "human", "value": "Add support for ERROR messages\n" }, { "from": "gpt", "value": "/*\n * Copyright 2017 Ivaylo Stoyanov <me@ivkos.com>\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": "Create initial class for library\n" }, { "from": "gpt", "value": "/*\n * Licensed Materials - Property of IBM\n * © Copyright IBM Corporation 2015. All Rights Reserved.\n */\n\npackage com.ibm.mil.cafejava;\n\npublic class CafeJava {\n}\n" } ]
java
chosen
[ { "from": "human", "value": "Test for the new cluster extraction method." }, { "from": "gpt", "value": "/*\n * This file is part of ELKI:\n * Environment for Developing KDD-Applications Supported by Index-Structures\n *\n * Copyright (C) 2017\n * ELKI Development Team\n *\n * This program is fre...
java
chosen
[ { "from": "human", "value": "SO-2881: Add enum for maintaining organization type\n\nThis controls whether \"INT\", an ISO3166 country code or an empty prefix\nshould appear in the CountryNamespace element of each exported file." }, { "from": "gpt", "value": "/*\n * Copyright 2018 B2i Healthcare ...
java
chosen
[ { "from": "human", "value": "Add statement to problem 22\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 leaf segment key generator related functions and modify registry center implementation class.\n" }, { "from": "gpt", "value": "/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distr...
java
chosen
[ { "from": "human", "value": "Add interface for io devices such as i2c or spi\n" }, { "from": "gpt", "value": "package com.easternedgerobotics.rov.io;\n\nimport java.io.IOException;\n\npublic interface Device {\n void write(byte writeAddress, byte[] buffer) throws IOException;\n\n byte[] re...
java
chosen
[ { "from": "system", "value": "Make test apples to apples with other framework tests that have started caching the response buffer\n" }, { "from": "human", "value": "package hello;\n\nimport com.google.common.net.MediaType;\nimport io.undertow.server.HttpHandler;\nimport io.undertow.server.HttpSe...
java
chosen
[ { "from": "human", "value": "Add simple test to try codecov.io\n" }, { "from": "gpt", "value": "/*\n * Copyright 2014 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a ...
java
chosen
[ { "from": "human", "value": "Verify JIT behaviour on empty loops\n" }, { "from": "gpt", "value": "package pl.ciruk.blog.jitest;\n\nimport com.google.common.base.Stopwatch;\nimport org.junit.Test;\n\nimport java.util.concurrent.TimeUnit;\n\npublic class EmptyLoopTest {\n @Test(timeout = 100_00...
java
chosen
[ { "from": "human", "value": "Remove infinite testCase + introduce new log pattern inherited from Docker 1.9\n" }, { "from": "gpt", "value": "package fr.treeptik.cloudunit.dto;\n\nimport java.text.SimpleDateFormat;\nimport java.util.Date;\n\n/**\n * Created by nicolas on 25/08/2014.\n */\nfinal p...
java
chosen
[ { "from": "human", "value": "Create dao for associated ministries\n" }, { "from": "gpt", "value": "package com.expidev.gcmapp.db;\n\nimport android.content.Context;\nimport android.database.Cursor;\nimport android.database.sqlite.SQLiteDatabase;\nimport android.database.sqlite.SQLiteOpenHelper;\...
java
chosen
[ { "from": "human", "value": "Add a mime mapper for webfonts" }, { "from": "gpt", "value": "package ch.rasc.eds.starter.config;\n\nimport org.springframework.boot.context.embedded.ConfigurableEmbeddedServletContainer;\nimport org.springframework.boot.context.embedded.EmbeddedServletContainerCusto...
java
chosen
[ { "from": "human", "value": "Add annotation for summarization scores" }, { "from": "gpt", "value": "package gr.iti.mklab.simmo.core.annotations;\n\nimport gr.iti.mklab.simmo.core.Annotation;\n\npublic class SummaryScore implements Annotation {\n\n\t /** The prior of the item */\n private doub...
java
chosen
[ { "from": "human", "value": "Add test for IEEETranBstCtl type fields\n" }, { "from": "gpt", "value": "package net.sf.jabref.model.entry;\n\nimport junit.framework.Assert;\nimport org.junit.Test;\n\nimport java.util.Arrays;\nimport java.util.List;\nimport java.util.stream.Collectors;\n\nimport st...
java
chosen
[ { "from": "human", "value": "Add Word Break Problem in Java." }, { "from": "gpt", "value": "import java.io.*;\r\nimport java.util.*;\r\n\r\npublic class harshitmalik03_Word_Break{\r\n\r\n public static void main(String[] args)throws Exception{\r\n System.out.println(\"Hello\");\r\n ...
java
chosen
[ { "from": "human", "value": "Add default implementation of ExtendZero interface.\n" }, { "from": "gpt", "value": "package net.imagej.ops.viewOp;\n\nimport net.imagej.ops.view.ViewOps;\nimport net.imagej.ops.view.ViewOps.ExtendZero;\nimport net.imglib2.RandomAccessibleInterval;\nimport net.imglib...
java
chosen
[ { "from": "human", "value": "Add A Readable Radix Sort\n\nImplemented In Java" }, { "from": "gpt", "value": "public static void RadixSort(ArrayList<Integer> list) {\n \n final int NUM_BASE = 10;\n \n int maximum = 0;\n \n ArrayList<ArrayList<Integer>> bu...
java
chosen
[ { "from": "human", "value": "Add a minimal test suite for the Server class.\n\nThis only tests the connect methods as these are the only methods that do things\nthat might be incorrect independently of the server. Testing other methods would\nbe effectively be merely testing the remote server.\n\nThe connec...
java
chosen
[ { "from": "human", "value": "Add investment Servlets to sent all users investments to the frontend\n" }, { "from": "gpt", "value": "// Copyright 2021 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 L...
java
chosen
[ { "from": "human", "value": "Add tests for problem 2.\n" }, { "from": "gpt", "value": "package com.github.pedrovgs.app.problem2;\n\nimport org.junit.Before;\nimport org.junit.Test;\n\nimport static org.junit.Assert.assertEquals;\n\n/**\n * @author Pedro Vicente Gómez Sánchez.\n */\npublic class ...
java
chosen
[ { "from": "human", "value": "Add integration tests for JUL\n" }, { "from": "gpt", "value": "package net.kencochrane.raven.jul;\n\nimport net.kencochrane.raven.SentryStub;\nimport org.junit.After;\nimport org.junit.Before;\nimport org.junit.Test;\n\nimport java.util.logging.Logger;\n\nimport stat...
java
chosen
[ { "from": "human", "value": "Add utility class loads VMWare adapter configuration file\n" }, { "from": "gpt", "value": "package com.boundary.metrics.vmware;\n\nimport io.dropwizard.configuration.ConfigurationFactory;\nimport io.dropwizard.jackson.Jackson;\n\nimport java.io.File;\nimport java.io....
java
chosen
[ { "from": "system", "value": "Update the error values generated (and returned over the wire) to match those expected by MySQL." }, { "from": "human", "value": "package com.akiba.cserver;\n\npublic interface CServerConstants {\n\n\tpublic final static short OK = 1;\n\tpublic final static short EN...
java
chosen
[ { "from": "human", "value": "Add missing file for range query constructor.\n" }, { "from": "gpt", "value": "package com.sensei.search.query;\n\nimport org.apache.lucene.search.ConstantScoreQuery;\nimport org.apache.lucene.search.Filter;\nimport org.apache.lucene.search.Query;\n\nimport org.json....
java
chosen
[ { "from": "human", "value": "Add csv pairtree file system checker script\n" }, { "from": "gpt", "value": "\npackage info.freelibrary.jiiify.util;\n\nimport java.awt.Dimension;\nimport java.io.File;\nimport java.io.FileReader;\nimport java.io.FileWriter;\nimport java.io.IOException;\n\nimport org...
java
chosen
[ { "from": "human", "value": "Create dynamic table with result set\n" }, { "from": "gpt", "value": "/*\n * Copyright (c) 2017 Falko Schumann\n * Released under the terms of the MIT License.\n */\n\npackage de.muspellheim.jdbc;\n\nimport com.mysql.jdbc.jdbc2.optional.*;\nimport javafx.application....
java
chosen
[ { "from": "human", "value": "Add Test cases for passport client\n" }, { "from": "gpt", "value": "package com.continuuity.passport.passportClient;\n\nimport com.continuuity.common.utils.PortDetector;\nimport com.continuuity.passport.http.client.AccountProvider;\nimport com.continuuity.passport.ht...
java
chosen
[ { "from": "human", "value": "Load and save motion power values to disk\n" }, { "from": "gpt", "value": "package com.easternedgerobotics.rov.io;\n\nimport com.easternedgerobotics.rov.value.MotionPowerValue;\n\nimport com.fasterxml.jackson.databind.ObjectMapper;\nimport org.pmw.tinylog.Logger;\n\n...
java
chosen
[ { "from": "human", "value": "Add Application class for manage Context\n" }, { "from": "gpt", "value": "package pabix.chickens.una;\n\nimport android.app.Application;\nimport android.content.Context;\n\nimport com.facebook.FacebookSdk;\nimport com.facebook.appevents.AppEventsLogger;\n\n/**\n * Cr...
java
chosen
[ { "from": "human", "value": "Create the Profile Product class\n" }, { "from": "gpt", "value": "package sizebay.catalog.client.model;\n\nimport com.fasterxml.jackson.annotation.JsonIgnoreProperties;\nimport lombok.Data;\nimport lombok.NoArgsConstructor;\nimport lombok.experimental.Accessors;\n\ni...
java
chosen
[ { "from": "human", "value": "Add some tests 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": "Add Substring with Concatenation of All Words\n" }, { "from": "gpt", "value": "package problems;\n\nimport java.util.ArrayList;\nimport java.util.HashMap;\nimport java.util.List;\n\npublic class SubstringWithConcatenationOfAllWords {\n public List<Integer> findSub...
java
chosen
[ { "from": "human", "value": "Test scenario to start with\n" }, { "from": "gpt", "value": "package uk.ac.ebi.gxa.loader.service;\n\nimport org.junit.Test;\n\n/**\n */\npublic class TestNcdfConversion {\n @Test\n public void testExportExperiment() {\n // Get an experiment from DB/NetC...
java
chosen
[ { "from": "human", "value": "Add more thorough tests for put()\n" }, { "from": "gpt", "value": "package com.github.kratorius.cuckoohash;\n\nimport junit.framework.TestCase;\n\nimport java.util.ArrayList;\nimport java.util.Random;\n\n/**\n * Tests for the put() method of the Cuckoo hash map.\n */...
java
chosen
[ { "from": "human", "value": "Create test case for DynamicObjectModule.\n" }, { "from": "gpt", "value": "package tests.dynamicObjectModule;\n\nimport static org.junit.Assert.*;\n\nimport org.junit.After;\nimport org.junit.AfterClass;\nimport org.junit.Before;\nimport org.junit.BeforeClass;\nimpor...
java
chosen
[ { "from": "human", "value": "Add statement to problem 71\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": "Move constants into dedicated file.\n" }, { "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 information regarding...
java
chosen
[ { "from": "human", "value": "Test to repo the error.\n" }, { "from": "gpt", "value": "package com.salesforce.phoenix.arithmetic;\n\nimport java.math.BigDecimal;\n\nimport com.salesforce.phoenix.schema.PDataType;\n\npublic class DecimalSumTest {\n\n private final static byte[][] rawBytesValues...
java
chosen
[ { "from": "human", "value": "Add mapper for internal server exceptions.\n" }, { "from": "gpt", "value": "package ru.fitgraph.rest.exceptions;\nimport org.apache.log4j.Logger;\nimport ru.fitgraph.rest.elements.ErrorResponse;\n\nimport javax.ws.rs.core.Response;\nimport javax.ws.rs.ext.ExceptionMa...
java
chosen
[ { "from": "human", "value": "Test the readonliness of MemcachedNodeROImpl.\n" }, { "from": "gpt", "value": "package net.spy.memcached;\n\nimport java.lang.reflect.InvocationTargetException;\nimport java.lang.reflect.Method;\nimport java.net.InetSocketAddress;\nimport java.net.SocketAddress;\n\ni...
java
chosen
[ { "from": "human", "value": "Add test which runs all sims to check they don't crash\n\nGathers and constructs simulation classes on the classpath, finds\nthe field of type Integrator, and runs the integrator for 1 second.\nCurrently a few like OsmosisSim crash with overlap exception because\nthey don't actu...
java
chosen
[ { "from": "human", "value": "sdack-19: Implement an entity modification synchronization service" }, { "from": "gpt", "value": "//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n// This file is a part of the 'esoco-business' project.\n// Copyright 2017 Elmar Sonnensc...
java
chosen
[ { "from": "human", "value": "Add class for representing founded devices from discovery service\n" }, { "from": "gpt", "value": "package edu.cmu.cs.cloudlet.android.discovery;\n\nimport java.net.URL;\n\nimport org.json.JSONException;\nimport org.json.JSONObject;\nimport org.teleal.cling.model.met...
java
chosen
[ { "from": "human", "value": "Enable serialization of adaptability scores to a LaTeX longtable\n\n\nFormer-commit-id: c74ca5dab9d8df1370a4b25f91c09a2fb398b4c9" }, { "from": "gpt", "value": "package prope.metrics.adaptability.elements;\n\nimport java.io.FileNotFoundException;\nimport java.io.Print...
java
chosen
[ { "from": "human", "value": "Add check for going off board\n" }, { "from": "gpt", "value": "package gamecontrollers.checks;\n\nimport models.board.Direction;\nimport models.board.Space;\nimport models.board.TileComponent;\n\nimport java.util.ArrayList;\nimport java.util.Iterator;\nimport java.ut...
java
chosen
[ { "from": "human", "value": "Add executor to retry calls synchronously upon failure\n" }, { "from": "gpt", "value": "package com.mv.hr.client;\n\nimport org.apache.log4j.Logger;\n\nimport com.mv.base.exception.ThirdPartyBadResponseException;\nimport com.mv.base.exception.ThirdPartyConnectivityFa...
java
chosen
[ { "from": "human", "value": "Add unit tests for HACAM." }, { "from": "gpt", "value": "/*\n * This file is part of ELKI:\n * Environment for Developing KDD-Applications Supported by Index-Structures\n *\n * Copyright (C) 2019\n * ELKI Development Team\n *\n * This program is free software: you ca...
java
chosen
[ { "from": "human", "value": "Add java solution for 104. Maximum Depth of Binary Tree\n\n104. Maximum Depth of Binary Tree: https://leetcode.com/problems/maximum-depth-of-binary-tree/" }, { "from": "gpt", "value": "package leetcode.maximum_depth_of_binary_tree;\n\nimport common.TreeNode;\n\npubli...
java
chosen
[ { "from": "human", "value": "Add java solution for 111. Minimum Depth of Binary Tree\n\n111. Minimum Depth of Binary Tree: https://leetcode.com/problems/minimum-depth-of-binary-tree/" }, { "from": "gpt", "value": "package leetcode.minimum_depth_of_binary_tree;\n\nimport common.TreeNode;\n\npubli...
java
chosen
[ { "from": "human", "value": "Add mechanism for an agent to compute her happiness with her current neighborhood.\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 th...
java
chosen