conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "human", "value": "Add initial implementation for a data container entry\n\nThis will need to be decoupled from specific data and made generic\nlater.\n" }, { "from": "gpt", "value": "package io.sigpipe.sing.graph;\n\nimport java.io.IOException;\n\nimport io.sigpipe.sing.serialization....
java
chosen
[ { "from": "human", "value": "Add Ulbotech frame decoder test\n" }, { "from": "gpt", "value": "package org.traccar.protocol;\n\nimport org.junit.Assert;\nimport org.junit.Test;\nimport org.traccar.ProtocolDecoderTest;\n\npublic class UlbotechFrameDecoderTest extends ProtocolDecoderTest {\n\n @...
java
chosen
[ { "from": "human", "value": "Add test class for debugging\n\ngit-svn-id: 25fd0ab20f27615cbdee32316c52153b05ca259c@171 29edfd95-ebd2-fbaf-e2c1-6dcbdf81cba2\n" }, { "from": "gpt", "value": "/**\r\n * \r\n */\r\npackage net.winstone;\r\n\r\n/**\r\n * DebugApplication. \r\n *\r\n * @author JGT\r\n *...
java
chosen
[ { "from": "human", "value": "Add utility for testing IO performance" }, { "from": "gpt", "value": "package org.builditbreakit.seada.logappend.io;\r\n\r\nimport java.io.File;\r\nimport java.io.IOException;\r\n\r\nimport org.builditbreakit.seada.common.data.GalleryState;\r\nimport org.builditbreak...
java
chosen
[ { "from": "human", "value": "Add a program that just loads a wallet, runs through the block chain, and then saves/prints out the resulting wallet at the end.\n\ngit-svn-id: 222f534b05ab2d99128b129c3f2ba69c893481ce@97 a743e126-8abc-4207-e589-8f9b47be99bf\n" }, { "from": "gpt", "value": "/*\n * Co...
java
chosen
[ { "from": "human", "value": "Add example to compare chars\n" }, { "from": "gpt", "value": "package com.samovich.cop2800.chapter7;\n\nimport javax.swing.JOptionPane;\n\n/**\n * Filename YLoop.java\n * Created by Valery Samovich\n * Written on 6/17/16\n */\npublic class YLoop {\n\n public stati...
java
chosen
[ { "from": "human", "value": "Add generic rate limiter class to util subpackage\n" }, { "from": "gpt", "value": "package ca.szc.keratin.bot.util;\n\nimport java.util.concurrent.TimeUnit;\n\npublic class RateLimiter\n{\n private long lastSuccessMillis;\n\n private final long cooldownMillis;\...
java
chosen
[ { "from": "human", "value": "Create : 58 Length of Last Word\n" }, { "from": "gpt", "value": "public class Solution {\n\n public int lengthOfLastWord(String s) {\n\n String[] words = s.split(\" \");\n\n if (words.length == 0) {\n return 0;\n }\n\n String...
java
chosen
[ { "from": "human", "value": "Add utility class to read in a String from a Resource.\n" }, { "from": "gpt", "value": "\n/*\n * Copyright (C) 2011 Archie L. Cobbs. All rights reserved.\n *\n * $Id$\n */\n\npackage org.dellroad.stuff.spring;\n\nimport java.io.IOException;\nimport java.io.InputStrea...
java
chosen
[ { "from": "human", "value": "Check if any tables are partitioned. None should be yet, until their definitions are updated in table.sql.\n" }, { "from": "gpt", "value": "/*\n * Copyright (C) 2004 EBI, GRL\n * \n * This library is free software; you can redistribute it and/or modify it under the t...
java
chosen
[ { "from": "human", "value": "Add new test for table creation\n" }, { "from": "gpt", "value": "package com.salesforce.phoenix.end2end;\n\nimport java.sql.Connection;\nimport java.sql.DriverManager;\nimport java.util.Properties;\n\nimport org.junit.Test;\n\nimport com.salesforce.phoenix.util.Phoen...
java
chosen
[ { "from": "human", "value": "Add random query generator sample\n" }, { "from": "gpt", "value": "package galileo.samples;\n\nimport java.util.ArrayList;\n\nimport java.util.List;\nimport java.util.Random;\n\nimport galileo.dataset.feature.Feature;\nimport galileo.query.Expression;\nimport galileo...
java
chosen
[ { "from": "human", "value": "Add test cases for UdpBroadcastOnSubscribe\n" }, { "from": "gpt", "value": "package rxbroadcast;\n\nimport org.junit.After;\nimport org.junit.Rule;\nimport org.junit.Test;\nimport org.junit.rules.Timeout;\nimport rx.observers.TestSubscriber;\n\nimport java.io.Closeab...
java
chosen
[ { "from": "human", "value": "Add method to be able to copy MegaPushNotificationSettings (Android bindings)\n" }, { "from": "gpt", "value": "package nz.mega.sdk;\n\npublic class MegaPushNotificationSettingsAndroid {\n\n /**\n * Creates a copy of MegaPushNotificationSetting.\n *\n *...
java
chosen
[ { "from": "human", "value": "Add a program to play Set\n" }, { "from": "gpt", "value": "package com.tom_e_white.set_game;\n\nimport java.awt.image.BufferedImage;\nimport java.io.File;\nimport java.io.IOException;\nimport java.text.ParseException;\nimport java.util.List;\nimport java.util.Set;\ni...
java
chosen
[ { "from": "human", "value": "feat: Add helper class that will handle poster image storage\n" }, { "from": "gpt", "value": "package eu.redray.trevie.utility;\n\nimport android.content.Context;\nimport android.graphics.Bitmap;\nimport android.net.Uri;\nimport android.util.Log;\n\nimport java.io.Fi...
java
chosen
[ { "from": "human", "value": "Add unit tests for JsonReader class\n" }, { "from": "gpt", "value": "/*\n * Copyright (c) 2017 Farooq Khan\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"),...
java
chosen
[ { "from": "human", "value": "Test class for MathUtils with a test for binomialProbability().\n\ngit-svn-id: 4561c0a8f080806b19201efb9525134c00b76d40@519 348d0f76-0448-11de-a6fe-93d51630548a\n" }, { "from": "gpt", "value": "package org.broadinstitute.sting.utils;\n\nimport org.junit.Assert;\nimpo...
java
chosen
[ { "from": "human", "value": "Add infrastructure to write readable tests using a \"graphical\" board\n" }, { "from": "gpt", "value": "package de.fesere.tictactoe.players;\n\nimport de.fesere.tictactoe.Board;\nimport de.fesere.tictactoe.Marker;\nimport de.fesere.tictactoe.Move;\nimport de.fesere.t...
java
chosen
[ { "from": "human", "value": "Add a unit test for DefaultConsoleService\n" }, { "from": "gpt", "value": "/*\n * #%L\n * SciJava Common shared library for SciJava software.\n * %%\n * Copyright (C) 2009 - 2015 Board of Regents of the University of\n * Wisconsin-Madison, Broad Institute of MIT and ...
java
chosen
[ { "from": "human", "value": "Add Java solution to the overlapping rectangles problem\n" }, { "from": "gpt", "value": "import java.io.BufferedReader;\nimport java.io.File;\nimport java.io.FileReader;\nimport java.io.IOException;\n\nclass Point\n{\n private int m_x;\n private int m_y;\n\n ...
java
chosen
[ { "from": "human", "value": "Add gui package and a gui\n" }, { "from": "gpt", "value": "package com.alma.pay2bid.gui;\n\nimport javax.swing.*;\nimport java.awt.*;\nimport java.awt.event.ActionEvent;\nimport java.awt.event.ActionListener;\nimport java.awt.event.WindowAdapter;\nimport java.awt.eve...
java
chosen
[ { "from": "human", "value": "Add unit tests for commonly used regular expressions." }, { "from": "gpt", "value": "/**\n * Copyright (c) 2015 deniskir@gmail.com. All rights reserved.\n *\n * @author Denis Kiriusin\n */\n\npackage com.dksoftware.combo;\n\nimport java.util.regex.Pattern;\n\nimport ...
java
chosen
[ { "from": "system", "value": "Fix for RSF-42, binding to empty String\n" }, { "from": "human", "value": "/*\r\n * Created on 13-Jan-2006\r\n */\r\npackage uk.org.ponder.rsf.components;\r\n\r\nimport uk.org.ponder.beanutil.BeanUtil;\r\n\r\n/** A special class to hold EL references so they may be ...
java
chosen
[ { "from": "human", "value": "Add tests for SearchMovieByTitle class.\n" }, { "from": "gpt", "value": "/**\n * This source file is subject to the license that is bundled with this package in the file LICENSE.\n */\npackage com.codeup.movies.catalog;\n\nimport com.codeup.movies.Movies;\nimport org...
java
chosen
[ { "from": "human", "value": "Add code for queens puzzle\n" }, { "from": "gpt", "value": "package nl.ap.hillclimbing;\n\npublic class Queens {\n\n public static boolean isConsistent(int[] q, int n) {\n for (int i = 0; i < n; i++) {\n if (q[i] == q[n]) {\n retur...
java
chosen
[ { "from": "human", "value": "Add java solution for 201. Bitwise AND of Numbers Range\n\n201. Bitwise AND of Numbers Range: https://leetcode.com/problems/bitwise-and-of-numbers-range/" }, { "from": "gpt", "value": "package leetcode.bitwise_and_of_numbers_range;\n\npublic class Solution {\n pub...
java
chosen
[ { "from": "human", "value": "Add unit test for GelfCompressionEncoder\n" }, { "from": "gpt", "value": "/*\n * Copyright 2014 TORCH GmbH\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtai...
java
chosen
[ { "from": "human", "value": "Add Roboelectric Unit Test for MainActivity\n" }, { "from": "gpt", "value": "package com.abhi.fyberdemo;\n\nimport android.support.v4.app.Fragment;\nimport android.view.View;\n\nimport com.abhi.fyberdemo.fragments.FormFragment;\nimport com.abhi.fyberdemo.fragments.Of...
java
chosen
[ { "from": "human", "value": "Add controller for user's pages\n" }, { "from": "gpt", "value": "package stopheracleum.controller;\n\nimport org.springframework.beans.factory.annotation.Autowired;\nimport org.springframework.stereotype.Controller;\nimport org.springframework.ui.Model;\nimport org.s...
java
chosen
[ { "from": "human", "value": "Add key value finders for awards\n" }, { "from": "gpt", "value": "package org.kuali.kd2013.dataobject;\n\nimport java.util.ArrayList;\nimport java.util.Collections;\nimport java.util.List;\n\nimport org.kuali.rice.core.api.util.ConcreteKeyValue;\nimport org.kuali.ric...
java
chosen
[ { "from": "human", "value": "Add helper for working with ItemStacks.\n" }, { "from": "gpt", "value": "package net.darkhax.bookshelf.api.util;\n\nimport net.minecraft.world.entity.Entity;\nimport net.minecraft.world.entity.LivingEntity;\nimport net.minecraft.world.entity.MobType;\nimport net.mine...
java
chosen
[ { "from": "human", "value": "Update item helper recycler view class\n" }, { "from": "gpt", "value": "package org.app.material.widget;\n\nimport android.support.v7.widget.RecyclerView;\nimport android.support.v7.widget.helper.ItemTouchHelper;\n\npublic class ItemTouchHelperClass extends ItemTouch...
java
chosen
[ { "from": "human", "value": "Add tiny little unit test to ensure that the client can be autowired.\n" }, { "from": "gpt", "value": "/**\n * Copyright (C) 2016 Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in complianc...
java
chosen
[ { "from": "human", "value": "Add new functionality to store a customer without a payment" }, { "from": "gpt", "value": "package com.mpay24.payment;\n\nimport static org.junit.Assert.assertNotNull;\n\nimport java.text.ParseException;\nimport java.util.List;\n\nimport org.apache.log4j.Logger;\nimp...
java
chosen
[ { "from": "human", "value": "Add statement to problem 42\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 JUnit tests. See ticket:44.\n\nSigned-off-by: Raymond Audet <281aa2b19aab01efe2941a7da076ec0616a9b992@gmail.com>\nSigned-off-by: Etienne M. Gagnon <bf06ec0eb40152cd863534753d026b021022c851@j-meg.com>\n" }, { "from": "gpt", "value": "/* This file is part of SableC...
java
chosen
[ { "from": "human", "value": "Add test cases for joystick input scaling\n" }, { "from": "gpt", "value": "package com.easternedgerobotics.rov.control;\n\nimport com.easternedgerobotics.rov.value.MotionValue;\n\nimport org.junit.Assert;\nimport org.junit.Test;\nimport org.junit.runner.RunWith;\nimp...
java
chosen
[ { "from": "human", "value": "Create unit test to source.\n" }, { "from": "gpt", "value": "package co.omise.resources;\n\nimport co.omise.models.OmiseException;\nimport co.omise.models.Source;\nimport org.junit.Test;\n\nimport java.io.IOException;\n\npublic class SourceResourceTest extends Resour...
java
chosen
[ { "from": "human", "value": "Add the instantiate annotation (FELIX-1940)\n\ngit-svn-id: e057f57e93a604d3b43d277ae69bde5ebf332112@892614 13f79535-47bb-0310-9956-ffa450edef68\n" }, { "from": "gpt", "value": "/* \n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor...
java
chosen
[ { "from": "human", "value": "Add benchmarking of local message store.\n" }, { "from": "gpt", "value": "package com.alibaba.rocketmq.example.smoking;\n\nimport com.alibaba.rocketmq.client.store.DefaultLocalMessageStore;\nimport com.alibaba.rocketmq.client.store.LocalMessageStore;\nimport com.alib...
java
chosen
[ { "from": "human", "value": "Allow the use of the dot character in workflow IDs\n\nCloses #90\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 add...
java
chosen
[ { "from": "human", "value": "Print debug level warnings about unknown properties in the tests\n" }, { "from": "gpt", "value": "package com.github.shredder121.gh_event_api.testutil;\n\nimport org.slf4j.Logger;\nimport org.slf4j.LoggerFactory;\nimport org.springframework.stereotype.Component;\n\ni...
java
chosen
[ { "from": "human", "value": "Include a JUnit 4 with timeout example\n" }, { "from": "gpt", "value": "/*\n * (C) Copyright 2017 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 except in compliance w...
java
chosen
[ { "from": "human", "value": "Add Raft session event test.\n" }, { "from": "gpt", "value": "/*\n * Copyright 2017-present Open Networking Laboratory\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 * Y...
java
chosen
[ { "from": "human", "value": "Allow creating observables from `AbstractButton`s." }, { "from": "gpt", "value": "/**\n * Copyright 2013 Netflix, Inc.\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": "[TEST] Split Field to Rows LoadSaveTest\n" }, { "from": "gpt", "value": "/*! ******************************************************************************\n *\n * Pentaho Data Integration\n *\n * Copyright (C) 2002-2016 by Pentaho : http://www.pentaho.com\n *\n ****...
java
chosen
[ { "from": "human", "value": "Add iterator that is a subpart of another iterator\n" }, { "from": "gpt", "value": "/*\n * SubIterator.java\n *\n * Author: Ming Tsang\n * Copyright (c) 2015 Ming Tsang\n * Refer to LICENSE for details\n */\n\npackage com.nkming.utils.type;\n\nimport java.util.Iterat...
java
chosen
[ { "from": "human", "value": "Add statement to problem 47\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 a JavaBean based Spark SQL example\n" }, { "from": "gpt", "value": "package com.oreilly.learningsparkexamples.java;\nimport java.io.Serializable;\n\n\nclass HappyPerson implements Serializable {\n private String name;\n private String favouriteBeverage;\n publ...
java
chosen
[ { "from": "human", "value": "Add simple directory-traversing parser for quickly testing the parser.\n" }, { "from": "gpt", "value": "package com.squareup.protoparser;\n\nimport java.io.File;\nimport java.util.ArrayDeque;\nimport java.util.Collections;\nimport java.util.Deque;\n\n/** Recursively ...
java
chosen
[ { "from": "human", "value": "Include IExplorer browser test (disabled by default)\n" }, { "from": "gpt", "value": "/*\r\n * (C) Copyright 2015 Boni Garcia (http://bonigarcia.github.io/)\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file ...
java
chosen
[ { "from": "human", "value": "Optimize imports resolving by processing a name -> file maps instead of linear lists.\n" }, { "from": "gpt", "value": "/*\n * Copyright 2000-2011 JetBrains s.r.o.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file ...
java
chosen
[ { "from": "human", "value": "Add file missing from previous commit\n\ngit-svn-id: 5b9f2d9930f7dfb79b2654297310ec296e5fde68@1164069 13f79535-47bb-0310-9956-ffa450edef68\n" }, { "from": "gpt", "value": "/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license...
java
chosen
[ { "from": "system", "value": "Bring reconnect yaml handler setting in line with what we had before (only create if needed)\n" }, { "from": "human", "value": "package net.md_5.bungee.module.reconnect.yaml;\n\nimport net.md_5.bungee.api.plugin.Plugin;\n\npublic class PluginYaml extends Plugin\n{\n...
java
chosen
[ { "from": "human", "value": "Add Support to generate DSA-Ed25519 Pub/Priv Keys\n" }, { "from": "gpt", "value": "package org.interledger.everledger.common.util;\n\n//REF: http://stackoverflow.com/questions/9755057/converting-strings-to-encryption-keys-and-vice-versa-java\n\n// TODO:(0) Move to ja...
java
chosen
[ { "from": "human", "value": "Add an interface for chat servers\n" }, { "from": "gpt", "value": "package interfaces;\n\n/**\n * Chat interface for Servers\n */\npublic interface ChatServer {\n /**\n * Configures and start a chat server\n */\n void setupServer();\n\n /**\n * L...
java
chosen
[ { "from": "human", "value": "Add test suite for ordering tests\n" }, { "from": "gpt", "value": "/*\n * Copyright 2012-2014 the original author or authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License...
java
chosen
[ { "from": "human", "value": "Create a linter to migrate functions to externs\n\nPiperOrigin-RevId: 385612555\n" }, { "from": "gpt", "value": "/*\n * Copyright 2021 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compli...
java
chosen
[ { "from": "human", "value": "LKTLog: Add controller for LKTLog use case\n" }, { "from": "gpt", "value": "/**\n * Copyright (c) 2016, German Neuroinformatics Node (G-Node)\n *\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are...
java
chosen
[ { "from": "human", "value": "Add the oacs.issues test package for adding tests specific to an issue (and its fix, if any).\n\n" }, { "from": "gpt", "value": "/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distrib...
java
chosen
[ { "from": "human", "value": "Add methods to render beacon beams\n" }, { "from": "gpt", "value": "package me.deftware.client.framework.wrappers.render;\n\nimport me.deftware.client.framework.utils.TexUtil;\nimport me.deftware.client.framework.wrappers.IResourceLocation;\nimport me.deftware.client...
java
chosen
[ { "from": "human", "value": "Add specs for Clavier 2d attempt\n" }, { "from": "gpt", "value": "package ch.heigvd.res.lab00;\n\nimport org.junit.Assert;\nimport static org.junit.Assert.assertNotNull;\nimport org.junit.Test;\n\n/**\n * @author Abass MAHDAVI\n */\n\n\npublic class ClavierTest {\n ...
java
chosen
[ { "from": "human", "value": "Create class for EntityHistory aggregate.\n" }, { "from": "gpt", "value": "/*\n * Copyright 2018, TeamDev. All rights reserved.\n *\n * Redistribution and use in source and/or binary forms, with or without\n * modification, must retain the above copyright notice and ...
java
chosen
[ { "from": "human", "value": "Add new type of question\n" }, { "from": "gpt", "value": "/**\n * Copyright 2017 University of Victoria\n * \n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), t...
java
chosen
[ { "from": "human", "value": "Add small utility for reading vertex bundles\n" }, { "from": "gpt", "value": "package io.sigpipe.sing.adapters;\n\nimport io.sigpipe.sing.graph.Vertex;\nimport io.sigpipe.sing.serialization.Serializer;\n\npublic class ReadVertexBundle {\n\n public static void main...
java
chosen
[ { "from": "human", "value": "Add a job to report status of Steam profiles\n" }, { "from": "gpt", "value": "package top.quantic.sentry.job;\n\nimport com.codahale.metrics.Gauge;\nimport com.codahale.metrics.MetricRegistry;\nimport com.ibasco.agql.protocols.valve.steam.webapi.pojos.SteamPlayerProf...
java
chosen
[ { "from": "human", "value": "Add test to check respondTo\n" }, { "from": "gpt", "value": "package linenux.command;\n\nimport static org.junit.Assert.assertTrue;\n\nimport org.junit.Before;\nimport org.junit.Test;\n\nimport linenux.model.Schedule;\n\n/**\n * JUnit test for remind command.\n */\np...
java
chosen
[ { "from": "human", "value": "Add unit tests for JavaObjectCodec\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 may obtain a...
java
chosen
[ { "from": "human", "value": "Include Opera test using Selenium 4.1.3 and WebDriverManager 5.1.0\n" }, { "from": "gpt", "value": "/*\r\n * (C) Copyright 2022 Boni Garcia (https://bonigarcia.github.io/)\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not...
java
chosen
[ { "from": "human", "value": "Add AUTO tx policy test.\n" }, { "from": "gpt", "value": "/*\n * Copyright 2013 Google Inc. All Rights Reserved.\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obt...
java
chosen
[ { "from": "human", "value": "Add new class compile jasper report" }, { "from": "gpt", "value": "/**\n* OpenCPS is the open source Core Public Services software\n* Copyright (C) 2016-present OpenCPS community\n\n* This program is free software: you can redistribute it and/or modify\n* it under th...
java
chosen
[ { "from": "human", "value": "[SYNCOPE-752] Add console tests for realms\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 ...
java
chosen
[ { "from": "human", "value": "Add basic unit test for sigmet IOSP.\n" }, { "from": "gpt", "value": "package ucar.nc2.iosp.sigmet;\n\nimport org.apache.commons.io.filefilter.WildcardFileFilter;\n\nimport org.junit.Test;\nimport org.junit.runner.RunWith;\nimport org.junit.runners.Parameterized;\nim...
java
chosen
[ { "from": "human", "value": "Apply patch for HARMONY-3353([classlib][test] Refactor test for java.io.FileNotFoundException's constructor)\n\nsvn path=/harmony/; revision=517502\n" }, { "from": "gpt", "value": "/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contri...
java
chosen
[ { "from": "human", "value": "Add unit tests for AbstractShell\n" }, { "from": "gpt", "value": "/*\n * The Alluxio Open Foundation licenses this work under the Apache License, version 2.0\n * (the \"License\"). You may not use this work except in compliance with the License, which is\n * availabl...
java
chosen
[ { "from": "human", "value": "Add some tests to problem 74\n" }, { "from": "gpt", "value": "package com.github.pedrovgs.problem74;\n\nimport org.junit.Before;\nimport org.junit.Test;\n\nimport static org.junit.Assert.assertArrayEquals;\n\n/**\n * @author Pedro Vicente Gómez Sánchez.\n */\npublic ...
java
chosen
[ { "from": "human", "value": "Add a utility class for copying files\n" }, { "from": "gpt", "value": "package com.speedment.internal.util;\n\nimport com.speedment.exception.SpeedmentException;\nimport java.io.IOException;\nimport java.nio.file.Files;\nimport java.nio.file.Path;\nimport java.nio.fi...
java
chosen
[ { "from": "human", "value": "Add preprocessor which injects the OpEnvironment\n\nWhen running an op directly as a command via the CommandService,\nthe created Op instance will lack its usual OpEnvironment.\n\nThis preprocessor remedies that problem by injecting the\nOpService as the default OpEnvironment in...
java
chosen
[ { "from": "human", "value": "Add JUnit test for validating RawEvents to Boundary\n" }, { "from": "gpt", "value": "package com.boundary.sdk;\n\nimport java.io.File;\n\nimport org.apache.camel.Exchange;\nimport org.apache.camel.Produce;\nimport org.apache.camel.ProducerTemplate;\nimport org.apache...
java
chosen
[ { "from": "system", "value": "Simplify menu debugging logic a bit.\n" }, { "from": "human", "value": "package com.squareup.picasso.sample;\n\nimport android.app.Activity;\nimport android.os.Bundle;\nimport android.os.StrictMode;\nimport android.view.Menu;\nimport android.view.MenuItem;\nimport a...
java
chosen
[ { "from": "human", "value": "Test class for the UnorderedMaxPQ class.\n" }, { "from": "gpt", "value": "package com.jeffreydiaz.test.collections;\n\nimport com.jeffreydiaz.collections.UnorderedMaxPQ;\n\nimport org.junit.After;\nimport org.junit.Before;\nimport org.junit.Test;\n\nimport java.util....
java
chosen
[ { "from": "human", "value": "Add some tests to problem 54\n" }, { "from": "gpt", "value": "/*\n * Copyright (C) 2014 Pedro Vicente Gómez Sánchez.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You...
java
chosen
[ { "from": "human", "value": "Create : 21 Merge Two Sorted Lists\n" }, { "from": "gpt", "value": "/**\n * Definition for singly-linked list.\n * public class ListNode {\n * int val;\n * ListNode next;\n * ListNode(int x) { val = x; }\n * }\n */\n\npublic class Solution {\n\n public...
java
chosen
[ { "from": "human", "value": "Add unit test for message processor\n" }, { "from": "gpt", "value": "package com.semation.jstatsd.server.messaging.disruptor;\n\nimport org.junit.Before;\nimport org.junit.Test;\n\n/**\n * Created by IntelliJ IDEA.\n * User: jabourbih\n * Date: 09/04/2012\n * Time: 1...
java
chosen
[ { "from": "human", "value": "Add test for WebSSO \"username\" parser\n\ngit-svn-id: 4b387fe5ada7764508e2ca96c335714e4c1692c6@2239 0d517254-b314-0410-acde-c619094fa49f\n" }, { "from": "gpt", "value": "package edu.northwestern.bioinformatics.studycalendar.security;\n\nimport edu.northwestern.bioin...
java
chosen
[ { "from": "human", "value": "Add simple drawer open close test for ShowsActivity.\n" }, { "from": "gpt", "value": "/*\n * Copyright 2014 Uwe Trottmann\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": "Add an enum for positioning systems\n" }, { "from": "gpt", "value": "package org.openmhealth.schema.domain.omh;\n\nimport com.fasterxml.jackson.annotation.JsonCreator;\nimport com.fasterxml.jackson.annotation.JsonValue;\n\nimport javax.annotation.Nullable;\nimport ja...
java
chosen
[ { "from": "human", "value": "Copy to clipboard created in android api\n" }, { "from": "gpt", "value": "package com.bitdubai.fermat_android_api.layer.definition.wallet.Utils;\n\nimport android.app.Activity;\nimport android.content.ClipData;\nimport android.content.ClipboardManager;\nimport androi...
java
chosen
[ { "from": "human", "value": "Use trampolining for sub graph iteration.\n" }, { "from": "gpt", "value": "package uk.ac.ebi.quickgo.ontology.traversal;\n\nimport uk.ac.ebi.quickgo.ontology.model.AncestorGraph;\nimport uk.ac.ebi.quickgo.ontology.model.OntologyRelationType;\nimport uk.ac.ebi.quickgo...
java
chosen
[ { "from": "human", "value": "Add test setup and cleanup for PacmanRepo\n" }, { "from": "gpt", "value": "package com.pm.server.repository;\n\nimport static org.junit.Assert.fail;\n\nimport java.util.ArrayList;\nimport java.util.List;\n\nimport org.apache.logging.log4j.LogManager;\nimport org.apac...
java
chosen
[ { "from": "human", "value": "Add a simple test to verify created timestamp is serialized,\ndeserialized correctly\n" }, { "from": "gpt", "value": "package org.apache.cassandra.net;\n/*\n * \n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements....
java
chosen
[ { "from": "human", "value": "Add beginning of SmartBinder test.\n" }, { "from": "gpt", "value": "/*\n * Copyright 2013 headius.\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": "Create custom textarea for the sql launcher\n" }, { "from": "gpt", "value": "package com.codenvy.ide.ext.datasource.client.sqllauncher;\n\nimport com.google.gwt.user.client.ui.TextArea;\n\n// temporary class\npublic class SqlLauncherTextArea extends TextArea {\n\n ...
java
chosen
[ { "from": "human", "value": "Create downloader util to optimally download entire subtrees\n" }, { "from": "gpt", "value": "package peergos.server;\n\nimport peergos.shared.*;\nimport peergos.shared.crypto.random.*;\nimport peergos.shared.user.*;\nimport peergos.shared.user.fs.*;\n\nimport java.i...
java
chosen
[ { "from": "human", "value": "Add environment container state DTO\n" }, { "from": "gpt", "value": "package io.subutai.hub.share.dto.environment;\n\n\npublic enum EnvironmentContainerStateDto\n{\n PENDING, EMPTY, UNDER_MODIFICATION, HEALTHY, IMPORTING, UNHEALTHY\n}\n" } ]
java
chosen
[ { "from": "human", "value": "Add class Operadores Matematicos, Universidade XTI\n" }, { "from": "gpt", "value": "/**\n * Apresentar os conceitos de Operações Matemáticas\n * @author Fabrício Silva\n */\n\npublic class OperadorMatematico {\n public static void main(String[] args) {\n double s...
java
chosen
[ { "from": "human", "value": "Add tests for SearchMovieByTitleAction class.\n" }, { "from": "gpt", "value": "/**\n * This source file is subject to the license that is bundled with this package in the file LICENSE.\n */\npackage com.codeup.application.actions;\n\nimport com.codeup.application.Mov...
java
chosen
[ { "from": "human", "value": "Add test for Trip value class\n" }, { "from": "gpt", "value": "package com.google.sps;\n\nimport com.google.sps.data.Trip;\n\nimport java.util.ArrayList;\nimport java.util.Arrays;\nimport java.util.Collections;\n\nimport com.google.sps.data.Location;\n\nimport org.ju...
java
chosen
[ { "from": "human", "value": "Add integration test for list operations\n" }, { "from": "gpt", "value": "package io.orchestrate.client.integration;\n\nimport static org.junit.Assert.assertNotNull;\nimport io.orchestrate.client.KvList;\nimport io.orchestrate.client.KvListOperation;\nimport io.orche...
java
chosen