conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "human", "value": "Add derived post for image attachment.\n" }, { "from": "gpt", "value": "/*\n * Copyright 2016 Attribyte, LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obt...
java
chosen
[ { "from": "human", "value": "Test SQLFile with all the possible (handled) use cases\n" }, { "from": "gpt", "value": "package com.novoda.sqlite.impl;\n\nimport java.io.IOException;\nimport java.io.StringReader;\nimport java.util.List;\n\nimport org.junit.Assert;\nimport org.junit.Test;\n\npublic ...
java
chosen
[ { "from": "human", "value": "Add reaction useful during testing\n" }, { "from": "gpt", "value": "package org.realityforge.arez;\n\nimport java.util.ArrayList;\nimport javax.annotation.Nonnull;\nimport static org.testng.Assert.*;\n\nfinal class TestReaction\n implements Reaction\n{\n private fi...
java
chosen
[ { "from": "human", "value": "Add java solution for 106. Construct Binary Tree from Inorder and Postorder Traversal\n\n106. Construct Binary Tree from Inorder and Postorder Traversal: https://leetcode.com/problems/construct-binary-tree-from-inorder-and-postorder-traversal/" }, { "from": "gpt", "v...
java
chosen
[ { "from": "human", "value": "Add example with byte int manipulations\n" }, { "from": "gpt", "value": "package org.egorlitvinenko.other;\n\nimport java.nio.ByteBuffer;\n\n/**\n *\n * https://docs.oracle.com/javase/specs/jls/se11/html/jls-3.html#jls-3.10.1\n * https://docs.oracle.com/javase/specs/...
java
chosen
[ { "from": "human", "value": "Add a model for class 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.\n * You may obtain a copy of...
java
chosen
[ { "from": "human", "value": "Add statement to problem 73\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": "FOP-2553: Support PDF shading to PS\n\ngit-svn-id: 102839466c3b40dd9c7e25c0a1a6d26afc40150a@1724037 13f79535-47bb-0310-9956-ffa450edef68\n" }, { "from": "gpt", "value": "/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license...
java
chosen
[ { "from": "human", "value": "Add interface for things which can be initialized\n\nIn the future, this will move to SciJava Common.\n" }, { "from": "gpt", "value": "/*\n * #%L\n * ImageJ software for multidimensional image processing and analysis.\n * %%\n * Copyright (C) 2014 - 2015 Board of Reg...
java
chosen
[ { "from": "human", "value": "Add basic object for ranking purposes\n" }, { "from": "gpt", "value": "\n// 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 License.\n// You may obtain a c...
java
chosen
[ { "from": "human", "value": "Add new unit test class stub" }, { "from": "gpt", "value": "package com.andreistraut.gaps.datamodel.translator;\r\n\r\nimport com.andreistraut.gaps.datamodel.genetics.EdgeGene;\r\nimport com.andreistraut.gaps.datamodel.genetics.GeneticConfiguration;\r\nimport com.and...
java
chosen
[ { "from": "human", "value": "Test for NexmlMatrixConverter class for function fromTreeBaseToXml(CharacterMatrix). This is the function that calls the poplulateXmlMatrix() function\n" }, { "from": "gpt", "value": "package org.cipres.treebase.domain.nexus;\n\nimport junit.framework.Assert;\n\nimpo...
java
chosen
[ { "from": "human", "value": "Add placeholder java class to fcrepo-jcr\n\nResolves: https://www.pivotaltracker.com/story/show/68682794\n" }, { "from": "gpt", "value": "/**\n * Copyright 2013 DuraSpace, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not ...
java
chosen
[ { "from": "human", "value": "Define a new command to register an email request" }, { "from": "gpt", "value": "// Copyright 2014 Tool Inc.\n\npackage com.tool.emailbot.application.command;\n\nimport com.tool.emailbot.common.application.command.Command;\n\nimport java.util.Date;\n\n/**\n * Command...
java
chosen
[ { "from": "human", "value": "Include test using JUnit 4's RuleChain\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 use this file except in com...
java
chosen
[ { "from": "human", "value": "Add Stop and Start Nova Compute Server Example.\nImplemented example code of shutdown and srart nova compute server(instance).\n" }, { "from": "gpt", "value": "package com.woorea.openstack.examples.compute;\n\nimport com.woorea.openstack.examples.ExamplesConfiguratio...
java
chosen
[ { "from": "human", "value": "Add authenticator class to handle servlet authentication.\n" }, { "from": "gpt", "value": "package com.google.sps.authentication;\n\nimport java.io.IOException;\nimport java.util.List;\nimport java.util.Objects;\n\nimport com.google.appengine.api.datastore.DatastoreS...
java
chosen
[ { "from": "human", "value": "Add another future test data point\n" }, { "from": "gpt", "value": "import org.realityforge.arez.annotations.Container;\nimport org.realityforge.arez.annotations.Observable;\n\n@Container\npublic class BasicObservableModel\n{\n private long _time;\n\n @Observable\n...
java
chosen
[ { "from": "human", "value": "Add a tool for back-porting English translations" }, { "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 r...
java
chosen
[ { "from": "human", "value": "Add IFluidHandler for simple bucket items\n" }, { "from": "gpt", "value": "package openmods.liquids;\n\nimport javax.annotation.Nullable;\nimport net.minecraft.item.ItemStack;\nimport net.minecraftforge.fluids.Fluid;\nimport net.minecraftforge.fluids.FluidRegistry;\n...
java
chosen
[ { "from": "human", "value": "Make the plugin list command\n" }, { "from": "gpt", "value": "package online.pizzacrust.lukkitplus;\n\nimport org.bukkit.ChatColor;\nimport org.bukkit.command.Command;\nimport org.bukkit.command.CommandExecutor;\nimport org.bukkit.command.CommandSender;\n\nimport onl...
java
chosen
[ { "from": "human", "value": "Revert \"Prepare for the 0.2.0 release.\"\n\nThis reverts commit d8b8f6edd066bc929b8438ed03703babd856907e.\n" }, { "from": "gpt", "value": "package de.teiesti.postie;\n\nimport org.pmw.tinylog.Logger;\n\nimport java.io.IOException;\nimport java.net.ServerSocket;\nimp...
java
chosen
[ { "from": "human", "value": "Test cases for Undo Command" }, { "from": "gpt", "value": "package guitests;\n\n//@@author A0125221Y\nimport static org.junit.Assert.assertTrue;\n\nimport org.junit.Test;\n\nimport seedu.address.testutil.TestTask;\nimport seedu.address.testutil.TestUtil;\n\npublic cl...
java
chosen
[ { "from": "human", "value": "Add solution for another Easy problem week of code 30\n" }, { "from": "gpt", "value": "package week_of_code_30;\n\nimport java.util.Scanner;\n\npublic class FindTheMinimumNumber {\n\n private static String findMin(int n) {\n return findMin(0, n);\n }\n\n privat...
java
chosen
[ { "from": "human", "value": "Add Talk example for Voice API\n" }, { "from": "gpt", "value": "package com.nexmo.quickstart.voice;\n\nimport com.nexmo.client.NexmoClient;\nimport com.nexmo.client.auth.AuthMethod;\nimport com.nexmo.client.auth.JWTAuthMethod;\nimport com.nexmo.client.voice.Call;\nim...
java
chosen
[ { "from": "human", "value": "Define a test for the NonNanValues algorithm\n" }, { "from": "gpt", "value": "/*\n * Zorbage: an algebraic data hierarchy for use in numeric processing.\n *\n * Copyright (C) 2016-2019 Barry DeZonia\n * \n * Redistribution and use in source and binary forms, with or ...
java
chosen
[ { "from": "human", "value": "Test case tidy-up, no functional changes.\n\nsvn path=/harmony/; revision=810963\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 * ...
java
chosen
[ { "from": "human", "value": "Add the event for the IssueRetrieved\n" }, { "from": "gpt", "value": "package com.genymobile.pr.bus;\n\nimport com.genymobile.pr.model.Issue;\n\npublic class IssueRetrievedEvent {\n\n public IssueRetrievedEvent(Issue issue) {\n this.issue = issue;\n }\n\...
java
chosen
[ { "from": "human", "value": "Add an iConomy handler that automatically detects the version. More intuitive, no?\n" }, { "from": "gpt", "value": "package net.craftstars.general.money;\n\nimport net.craftstars.general.General;\n\nimport org.bukkit.entity.Player;\nimport org.bukkit.plugin.Plugin;\n...
java
chosen
[ { "from": "human", "value": "Add example test for WebRTC and Chrome\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 factory for creating specific correspondence model views" }, { "from": "gpt", "value": "package tools.vitruv.framework.correspondence;\n\n/**\n * Generic interface for factories generating {@link CorrespondenceModelView}s\n * for special correspondence types.\n *...
java
chosen
[ { "from": "human", "value": "Add unit test for 350" }, { "from": "gpt", "value": "package io.github.classgraph.issues.issue350;\n\nimport static org.assertj.core.api.Assertions.assertThat;\n\nimport java.lang.annotation.Retention;\nimport java.lang.annotation.RetentionPolicy;\n\nimport org.junit...
java
chosen
[ { "from": "human", "value": "Add JSON serializion support for definitions and contexts.\n" }, { "from": "gpt", "value": "/*\n * Copyright 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 complia...
java
chosen
[ { "from": "human", "value": "Create servlet that returns student position on queue\n" }, { "from": "gpt", "value": "package com.google.sps.servlets;\n\nimport com.google.appengine.api.datastore.DatastoreService;\nimport com.google.appengine.api.datastore.DatastoreServiceConfig;\nimport com.googl...
java
chosen
[ { "from": "human", "value": "Move sensibleConfig back into MineLP. This was a mistake. The static makes it less useful to other projects\n" }, { "from": "gpt", "value": "package com.minelittlepony.settings;\n\nimport com.minelittlepony.common.client.gui.IField.IChangeCallback;\n\n/**\n * A sensi...
java
chosen
[ { "from": "human", "value": "Add stub for serializable reservoir\n" }, { "from": "gpt", "value": "package io.sigpipe.sing.stat;\n\nimport io.sigpipe.sing.serialization.ByteSerializable;\nimport io.sigpipe.sing.serialization.SerializationInputStream;\nimport io.sigpipe.sing.serialization.Serializ...
java
chosen
[ { "from": "human", "value": "Create a class to pass all parameter to search tasks\n" }, { "from": "gpt", "value": "package com.jmb.springfactory.model.bo;\n\nimport java.util.Date;\n\nimport com.jmb.springfactory.model.enumeration.TaskStatusEnum;\n\nimport lombok.Builder;\nimport lombok.Data;\n\...
java
chosen
[ { "from": "human", "value": "Add a unit test trying to reproduce the issue related on the mailling list\n" }, { "from": "gpt", "value": "/*\n * Copyright 2010 Ning, Inc.\n *\n * Ning licenses this file to you under the Apache License, version 2.0\n * (the \"License\"); you may not use this file ...
java
chosen
[ { "from": "human", "value": "Add unit tests for IDataComparisonType\n" }, { "from": "gpt", "value": "/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2015 Lachlan Dowding\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated do...
java
chosen
[ { "from": "system", "value": "Revert: Correct length in exe resource string tables the change done by Matt Ellis (citizenmatt)\n" }, { "from": "human", "value": "/*\n * Copyright 2006 ProductiveMe Inc.\n * Copyright 2013 JetBrains s.r.o.\n *\n * Licensed under the Apache License, Version 2.0 (th...
java
chosen
[ { "from": "human", "value": "Bring in the email validation test too.\n" }, { "from": "gpt", "value": "package data;\n\nimport static org.junit.Assert.assertSame;\n\nimport java.util.Arrays;\nimport java.util.List;\n\nimport org.junit.Test;\nimport org.junit.runner.RunWith;\nimport org.junit.runn...
java
chosen
[ { "from": "human", "value": "Add Test runner for DrawLine, TODO: Cleanup\n" }, { "from": "gpt", "value": "package chapter_5;\n\nimport static org.hamcrest.MatcherAssert.assertThat;\nimport static org.hamcrest.collection.IsIterableContainingInOrder.contains;\n\nimport java.util.ArrayList;\nimport...
java
chosen
[ { "from": "system", "value": "Change to extend RTE not ant exception\n" }, { "from": "human", "value": "/*\n * Copyright 2010 DTO Labs, Inc. (http://dtolabs.com)\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 a test for htmlTextToPlainText\n" }, { "from": "gpt", "value": "/*\n * Copyright 2016 EuregJUG.\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 cop...
java
chosen
[ { "from": "human", "value": "Move complicated parsing of dataType and available JNI libraries into a factory class" }, { "from": "gpt", "value": "/**\n * \n */\npackage dr.evomodel.newtreelikelihood;\n\nimport dr.evomodel.newtreelikelihood.GeneralLikelihoodCore;\n\n/**\n * @author Marc Suchard\n...
java
chosen
[ { "from": "human", "value": "Add some helpful construction functions\n" }, { "from": "gpt", "value": "package com.ljs.ai.search.hillclimbing;\n\nimport com.google.common.base.Predicate;\nimport com.google.common.base.Predicates;\n\n/**\n *\n * @author lstephen\n */\npublic final class Validators...
java
chosen
[ { "from": "human", "value": "Add simple command to kill mobs of a certain type.\n" }, { "from": "gpt", "value": "package com.skcraft.plume.module.perf;\n\nimport com.sk89q.intake.Command;\nimport com.sk89q.intake.Require;\nimport com.skcraft.plume.command.Sender;\nimport com.skcraft.plume.common...
java
chosen
[ { "from": "human", "value": "Create a skeleton for problem 76\n" }, { "from": "gpt", "value": "package leetcode;\n\n/**\n * https://leetcode.com/problems/minimum-window-substring/\n */\npublic class Problem76 {\n public String minWindow(String s, String t) {\n // TODO\n return \...
java
chosen
[ { "from": "human", "value": "Add Introduction.java example from Team Treehouse Tutorial.\n" }, { "from": "gpt", "value": "/**\n * @file Introductions.java\n * @author Valery Samovich\n * @version 1\n * @date 2015/04/07\n */\n\npackage com.samovich.basics.introduction;\n\n/**\n * Created by Samov...
java
chosen
[ { "from": "human", "value": "Add simple script locator that reads files from a path\n" }, { "from": "gpt", "value": "/*\n * Copyright 2012 the hegemon 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 Li...
java
chosen
[ { "from": "human", "value": "Add class representing a music resource\n" }, { "from": "gpt", "value": "package starpunk.services;\n\nimport com.badlogic.gdx.audio.Music;\n\npublic final class MusicReference\n{\n private final String _filename;\n private Music _resource;\n\n public MusicReferen...
java
chosen
[ { "from": "human", "value": "Add unit tests for MatchAccumulator.\n" }, { "from": "gpt", "value": "package com.mistraltech.smog.core;\n\n\nimport org.hamcrest.StringDescription;\nimport org.junit.Before;\nimport org.junit.Test;\n\nimport static org.hamcrest.CoreMatchers.*;\nimport static org.jun...
java
chosen
[ { "from": "human", "value": "Add Digital Root (2014) solution\n" }, { "from": "gpt", "value": "package year2014;\n\nimport java.util.Scanner;\nimport java.util.stream.IntStream;\n\n/**\n * <h3>Digital Root</h3>\n * <p>The digital root of a number is obtained by summing its individual digits,\n *...
java
chosen
[ { "from": "human", "value": "Test case for [ 1926397 ] Return of variable not considered a read\n\ngit-svn-id: e7d6bde23f017c9ff4efd468d79d66def666766b@9463 eae3c2d3-9b19-0410-a86e-396b6ccb6ab3\n" }, { "from": "gpt", "value": "package sfBugs;\r\n\r\nimport java.io.BufferedReader;\r\nimport java....
java
chosen
[ { "from": "human", "value": "Add test to compare output with pcg32-global-demo\n" }, { "from": "gpt", "value": "package com.github.alexeyr.pcg;\n\nimport org.junit.Assert;\nimport org.junit.Test;\n\npublic class Pcg32CDemoComparison {\n @Test\n public void compareWithCBasicDemo() {\n ...
java
chosen
[ { "from": "human", "value": "Add test for benchmarking large JCA array.\n" }, { "from": "gpt", "value": "package org.epics.pvmanager.tests;\r\n\r\n/*\r\n * Copyright 2011 Brookhaven National Laboratory\r\n * All rights reserved. Use is subject to license terms.\r\n */\r\n\r\n\r\nimport org.epics...
java
chosen
[ { "from": "human", "value": "Add a topological layout manager\n" }, { "from": "gpt", "value": "package nl.tudelft.dnainator.ui.layouts;\n\nimport javafx.geometry.Point2D;\n\n/**\n * A topologically sorted layout.\n */\npublic final class TopoLayout {\n\tprivate static final double WIDTH = 60;\n\...
java
chosen
[ { "from": "human", "value": "Add test suite for DefaultNodeStore\n" }, { "from": "gpt", "value": "/*\n * Copyright (c) 2012 Mateusz Parzonka, Eric Bodden\n * All rights reserved. This program and the accompanying materials\n * are made available under the terms of the Eclipse Public License v1.0...
java
chosen
[ { "from": "human", "value": "Add some unit tests to check solver statistics" }, { "from": "gpt", "value": "/**\n * Copyright (c) 2017 Siemens AG\n * All rights reserved.\n * \n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the ...
java
chosen
[ { "from": "human", "value": "Add some tests for TraceRendererBuilder\n" }, { "from": "gpt", "value": "/*\n * Copyright (C) 2015 Pedro Vicente Gomez Sanchez.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the Licen...
java
chosen
[ { "from": "human", "value": "Add land owner verification software\n" }, { "from": "gpt", "value": "java import.util.scanner\n\n\tpublic class LandVerificator (){\n\t\tpublic static Scanner in = new Scanner(System.in);\n\n\n\n\n\n\n\n\n\t\tpublic static void main(){\n\t\t\tSystem.out.println(\"'1...
java
chosen
[ { "from": "human", "value": "Add type to manage sequence files with different keys and values.\n\nSigned-off-by: Xavier Sumba <0fd2c724be8d72d40d80fb8f95590990de457265@ucuenca.ec>" }, { "from": "gpt", "value": "/*\n * To change this license header, choose License Headers in Project Properties.\n...
java
chosen
[ { "from": "human", "value": "Add maintainer to do GC\n" }, { "from": "gpt", "value": "package com.yahoo.vespa.hosted.controller.maintenance;\n\nimport com.yahoo.vespa.hosted.controller.Controller;\n\nimport java.time.Duration;\nimport java.util.logging.Level;\nimport java.util.logging.Logger;\n\...
java
chosen
[ { "from": "human", "value": "Add test for help command output.\n" }, { "from": "gpt", "value": "package com.maddenabbott.jenny.command.help;\n\nimport com.maddenabbott.jenny.Application;\nimport org.junit.Rule;\nimport org.junit.Test;\nimport org.junit.contrib.java.lang.system.StandardOutputStre...
java
chosen
[ { "from": "system", "value": "Update the license year to 2017" }, { "from": "human", "value": "/*\n * Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.\n *\n * WSO2 Inc. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use ...
java
chosen
[ { "from": "human", "value": "storage: Add migration to add default status at sample-index-configurations. TASK-512\n" }, { "from": "gpt", "value": "package org.opencb.opencga.app.migrations.v2_2_1.storage;\n\nimport org.opencb.opencga.app.migrations.StorageMigrationTool;\nimport org.opencb.openc...
java
chosen
[ { "from": "human", "value": "Read team member from db\n" }, { "from": "gpt", "value": "package jira.tool.report.processor;\n\nimport org.junit.Test;\n\npublic class TeamEnumTest {\n @Test\n public void testCheckTeamMemberCount() {\n TeamEnum.checkTeamMemberCount();\n }\n}\n" } ...
java
chosen
[ { "from": "system", "value": "Support nested exceptions, implement Loggeable\n\n" }, { "from": "human", "value": "package org.jpos.iso;\n\n/**\n * Signals that an ISO exception of some sort has occurred. \n *\n * @author apr@cs.com.uy\n * @version $Id$\n */\npublic\nclass ISOException extends E...
java
chosen
[ { "from": "human", "value": "Add default implementation of MeanFilterOp\n\nSigned-off-by: squareys <b4e1335d2c774058f7a95112f52894dcc752fd3f@googlemail.com>\n" }, { "from": "gpt", "value": "\npackage net.imagej.ops.filter.mean;\n\nimport net.imagej.ops.ComputerOp;\nimport net.imagej.ops.Ops;\nim...
java
chosen
[ { "from": "human", "value": "Add unit tests for ScratchReferenceTable\n" }, { "from": "gpt", "value": "package scratchlib.objects;\n\nimport static org.junit.Assert.assertEquals;\nimport static org.junit.Assert.assertFalse;\nimport static org.junit.Assert.assertNull;\nimport static org.junit.Ass...
java
chosen
[ { "from": "human", "value": "Add failing test for nepali calendar calculations\n" }, { "from": "gpt", "value": "package org.commcare.utils;\n\nimport org.commcare.CommCareApplication;\nimport org.commcare.android.CommCareTestRunner;\nimport org.commcare.dalvik.BuildConfig;\nimport org.junit.Asse...
java
chosen
[ { "from": "human", "value": "Add solution for problem Java Output Formatting\n\nJava Output Formatting from HackerRank/Introduction/Java Output Formatting\n" }, { "from": "gpt", "value": "package javaOutputFormatting;\n\nimport java.util.Scanner;\n\npublic class Solution {\n\n\tpublic static Str...
java
chosen
[ { "from": "human", "value": "Add Default class for use in configurations\n" }, { "from": "gpt", "value": "/* ********************************************************************\n Appropriate copyright notice\n*/\npackage org.bedework.util.config;\n\n/** A holder for a defaulted value\n *\n *...
java
chosen
[ { "from": "human", "value": "Create : 237 Delete Node in a Linked List\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 ...
java
chosen
[ { "from": "human", "value": "Solve No.10172 from Baekjoon Online Judge\n" }, { "from": "gpt", "value": "/*\n * Copyright 2017 haeun kim\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtai...
java
chosen
[ { "from": "human", "value": "Add a missing type of box for completeness when using the editor framework\n" }, { "from": "gpt", "value": "package org.gwtbootstrap3.client.ui;\n\n/*\n * #%L\n * GwtBootstrap3\n * %%\n * Copyright (C) 2013 GwtBootstrap3\n * %%\n * Licensed under the Apache License, ...
java
chosen
[ { "from": "human", "value": "Add function for getting AllianceFriendlyFire\n" }, { "from": "gpt", "value": "package io.github.aquerr.eaglefactions.logic;\n\nimport io.github.aquerr.eaglefactions.config.ConfigAccess;\nimport io.github.aquerr.eaglefactions.config.IConfig;\nimport io.github.aquerr....
java
chosen
[ { "from": "human", "value": "Add unit test for withStrictOrdering() and withExtensible()\n" }, { "from": "gpt", "value": "package org.skyscreamer.jsonassert;\n\nimport static junit.framework.Assert.assertEquals;\nimport static junit.framework.Assert.assertFalse;\nimport static junit.framework.As...
java
chosen
[ { "from": "human", "value": "Create : 231 Power of Two\n" }, { "from": "gpt", "value": "public class Solution {\n\n public boolean isPowerOfTwo(int n) {\n\n if (n <= 0) {\n return false;\n }\n\n while (n != 1) {\n\n if ( n % 2 == 0) {\n ...
java
chosen
[ { "from": "human", "value": "Add example for reproducible GA.\n" }, { "from": "gpt", "value": "/*\n * Java Genetic Algorithm Library (@__identifier__@).\n * Copyright (c) @__year__@ Franz Wilhelmstötter\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use...
java
chosen
[ { "from": "human", "value": "Add subsystem for pneumatics stuff" }, { "from": "gpt", "value": "package org.usfirst.frc.team4761.robot.subsystems;\n\nimport edu.wpi.first.wpilibj.command.Subsystem;\n\n/**\n *\n */\npublic class PneumaticsSubsystem extends Subsystem {\n \n // Put methods for...
java
chosen
[ { "from": "human", "value": "Add test class for PocketFormationException.\n" }, { "from": "gpt", "value": "package com.skraylabs.poker.model;\n\nimport static com.skraylabs.poker.model.PokerFormatExceptionTest.assertMessageAndInvalidString;\n\nimport org.junit.Test;\n\npublic class PocketFormatE...
java
chosen
[ { "from": "human", "value": "Create interface to validation types.\n" }, { "from": "gpt", "value": "package com.github.aureliano.achmed.validation;\n\nimport java.lang.annotation.Annotation;\nimport java.lang.reflect.Method;\nimport java.util.Set;\n\npublic interface IValidation {\n\n\tpublic ab...
java
chosen
[ { "from": "human", "value": "Add method to get IC2 reactor core from chamber\n" }, { "from": "gpt", "value": "package org.squiddev.plethora.integration.ic2;\n\nimport dan200.computercraft.api.lua.LuaException;\nimport ic2.api.reactor.IReactor;\nimport ic2.api.reactor.IReactorChamber;\nimport ic2...
java
chosen
[ { "from": "human", "value": "Add key pair generation utility\n" }, { "from": "gpt", "value": "package com.ft.membership.crypto.util;\n\nimport com.ft.membership.crypto.signature.Encoder;\nimport sun.security.ec.ECKeyPairGenerator;\n\nimport java.security.KeyPair;\n\n/**\n * A utility class to ge...
java
chosen
[ { "from": "human", "value": "Add Elsie-Deetect Feign Client to allow language identification.\n" }, { "from": "gpt", "value": "package nl.ekholabs.nlp.client;\n\nimport nl.ekholabs.nlp.model.Language;\nimport org.springframework.cloud.netflix.feign.FeignClient;\nimport org.springframework.web.bi...
java
chosen
[ { "from": "human", "value": "Test for binary array in linear time\n" }, { "from": "gpt", "value": "package com.problems.test;\n\nimport com.problems.SortBinaryArrayInLinearTime;\nimport org.junit.Assert;\nimport org.junit.Test;\n\n/**\n * Created by Maks on 4/19/2017.\n */\npublic class SortBina...
java
chosen
[ { "from": "human", "value": "Add java solution for 198. House Robber\n\n198. House Robber: https://leetcode.com/problems/house-robber/" }, { "from": "gpt", "value": "package leetcode.house_robber;\n\npublic class Solution {\n public int rob(int[] num) {\n int rob = 0, notrob = 0;\n ...
java
chosen
[ { "from": "human", "value": "Implement manual string interning class.\n" }, { "from": "gpt", "value": "/**\n * Copyright (C) 2015 The Authors.\n */\npackage dk.itu.kelvin.util;\n\n// I/O utilities\nimport java.io.Serializable;\n\n/**\n * String pool class.\n *\n * @see <a href=\"http://en.wikipe...
java
chosen
[ { "from": "human", "value": "Make a list class that concatenates two lists\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...
java
chosen
[ { "from": "human", "value": "Create base class for ordering keys to use with caching\n\nCacheSortableKeyBase serves as a base class for keys to\nConcurrentSkipListMap when creating applications that involves\ncaching more data than just the beans or keeping the cache\nin a certain order.\n" }, { "fr...
java
chosen
[ { "from": "human", "value": "Add native mapped interface for crypt()" }, { "from": "gpt", "value": "/*\n * Copyright 2011 Rudolf Biczok\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 Espresso Test for MainActivity\n" }, { "from": "gpt", "value": "package com.abhi.fyberdemo;\n\nimport android.support.test.espresso.assertion.ViewAssertions;\nimport android.support.test.rule.ActivityTestRule;\n\nimport org.junit.Before;\nimport org.junit.Rule;\n...
java
chosen
[ { "from": "human", "value": "Add an interface to listen on various of events regarding block store\n" }, { "from": "gpt", "value": "/*\n * Licensed to the University of California, Berkeley under one or more contributor license\n * agreements. See the NOTICE file distributed with this work for a...
java
chosen
[ { "from": "human", "value": "Add command group for automatically moving to pickup position and turning on pickup, while managing wings." }, { "from": "gpt", "value": "// RobotBuilder Version: 1.0\n//\n// This file was generated by RobotBuilder. It contains sections of\n// code that are automatic...
java
chosen
[ { "from": "human", "value": "Add a little utility to do HTTP requests.\n" }, { "from": "gpt", "value": "package edu.brown.hackathon.fifteenminutes;\n\nimport java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\nimport java.net.URL;\n\nimport com.google.gson.Js...
java
chosen
[ { "from": "human", "value": "ROUT-4: Add google directions utility class\n" }, { "from": "gpt", "value": "package com.routeme.utility.directions;\n\nimport com.google.maps.model.DirectionsResult;\nimport com.google.maps.model.TravelMode;\nimport com.google.maps.model.Vehicle;\nimport com.routeme...
java
chosen
[ { "from": "human", "value": "Resolve distribution detail to a specific archive and file set\n" }, { "from": "gpt", "value": "package ahlers.phantom.embedded;\n\nimport de.flapdoodle.embed.process.config.store.FileSet;\nimport de.flapdoodle.embed.process.config.store.FileType;\nimport de.flapdood...
java
chosen
[ { "from": "human", "value": "Add test for remove command.\n" }, { "from": "gpt", "value": "package com.maddenabbott.jenny.command;\n\nimport com.maddenabbott.jenny.Application;\nimport org.junit.After;\nimport org.junit.Rule;\nimport org.junit.Test;\nimport org.junit.contrib.java.lang.system.Sta...
java
chosen
[ { "from": "human", "value": "Add class for haval algorithm.\n" }, { "from": "gpt", "value": "package com.m4gik;\n\npublic class Haval extends BaseHash {\n\n protected Haval(String name, int hashSize, int blockSize) {\n super(name, hashSize, blockSize);\n // TODO Auto-generated c...
java
chosen