conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "human",
"value": "MT: Test case for Jira OIM-82\n"
},
{
"from": "gpt",
"value": "package edu.iu.grid.oim.test;\r\n\r\nimport static org.junit.Assert.*;\r\n/**\r\n * MT\r\n * Unit Test Cases for CNValidator\r\n */\r\n\r\nimport org.junit.Test;\r\nimport edu.iu.grid.oim.view.divrep.form... | java | chosen |
[
{
"from": "human",
"value": "Test for lazy evaluations is added (failing at the moment)\n"
},
{
"from": "gpt",
"value": "package integration;\n\nimport com.codeborne.selenide.*;\nimport org.junit.Before;\nimport org.junit.Test;\n\nimport static com.codeborne.selenide.CollectionCondition.*;\nimpo... | java | chosen |
[
{
"from": "human",
"value": "KRACOEUS-939: Update budget versions page flow\n\n"
},
{
"from": "gpt",
"value": "/*\n * Copyright 2008 The Kuali Foundation.\n * \n * Licensed under the Educational Community License, Version 1.0 (the \"License\");\n * you may not use this file except in compliance ... | java | chosen |
[
{
"from": "human",
"value": "Add initial unit tests for Definition class\n"
},
{
"from": "gpt",
"value": "import org.junit.*;\nimport static org.junit.Assert.*;\n\npublic class DefinitionTest {\n\n @Rule\n public ClearRule clearRule = new ClearRule();\n\n @Test\n public void definiti... | java | chosen |
[
{
"from": "human",
"value": "Add other test case (uses render).\n"
},
{
"from": "gpt",
"value": "package yaz4jtest;\nimport org.junit.*;\nimport static org.junit.Assert.*;\nimport org.yaz4j.*;\n\n/**\n * @author adam\n */\npublic class DinosaurTest {\n @Test\n public void test() {\n ... | java | chosen |
[
{
"from": "human",
"value": "Add java solution for 205. Isomorphic Strings\n\n205. Isomorphic Strings: https://leetcode.com/problems/isomorphic-strings/"
},
{
"from": "gpt",
"value": "package leetcode.isomorphic_strings;\n\npublic class Solution {\n public boolean isIsomorphic(String s, Strin... | java | chosen |
[
{
"from": "human",
"value": "Extend reporter to be used by the IDE.\n"
},
{
"from": "gpt",
"value": "/* sbt -- Simple Build Tool\n * Copyright 2012 Eugene Vigdorchik\n */\npackage xsbti;\n\n/** An addition to standard reporter. Used by the IDE. */\npublic interface ExtendedReporter extends Repor... | java | chosen |
[
{
"from": "human",
"value": "Add a simple smoke test used to validate some of the Javascript rendering.\n"
},
{
"from": "gpt",
"value": "/*******************************************************************************\n * This file is part of OpenNMS(R).\n *\n * Copyright (C) 2016 The OpenNMS Gr... | java | chosen |
[
{
"from": "human",
"value": "Add java solution for 34. Search for a Range\n\n34. Search for a Range: https://leetcode.com/problems/search-for-a-range/"
},
{
"from": "gpt",
"value": "package leetcode.search_for_a_range;\n\npublic class Solution {\n public int[] searchRange(int[] A, int target)... | java | chosen |
[
{
"from": "human",
"value": "Test the attributes of Book class\n"
},
{
"from": "gpt",
"value": "package com.twu.biblioteca;\n\nimport org.junit.Test;\n\nimport static org.junit.Assert.assertEquals;\n\npublic class BookTest {\n\n @Test\n public void shouldReturnBookName() {\n Book bo... | java | chosen |
[
{
"from": "human",
"value": "Add a stack of calls.\n"
},
{
"from": "gpt",
"value": "/**\n * END USER LICENSE AGREEMENT (“EULA”)\n *\n * READ THIS AGREEMENT CAREFULLY (date: 9/13/2011):\n * http://www.akiban.com/licensing/20110913\n *\n * BY INSTALLING OR USING ALL OR ANY PORTION OF THE SOFTWARE,... | java | chosen |
[
{
"from": "human",
"value": "Create servlet to handle displaying a tutor's availability.\n"
},
{
"from": "gpt",
"value": "// Copyright 2019 Google LLC\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n/... | java | chosen |
[
{
"from": "human",
"value": "Add main to print list of rules.\n\n--\nMOS_MIGRATED_REVID=94762936\n"
},
{
"from": "gpt",
"value": "// Copyright 2014 Google Inc. All rights reserved.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in c... | java | chosen |
[
{
"from": "human",
"value": "Add hybrid sort java implementation\n"
},
{
"from": "gpt",
"value": "public class HybridSort {\n\n private static final int number = 154; // use insertion sort if size < number\n\n public static void hybridSort(int[] arr, int start, int end) {\n if ( end... | java | chosen |
[
{
"from": "human",
"value": "Add test of JSON parsing"
},
{
"from": "gpt",
"value": "package au.org.ands.vocabs.toolkit.db;\n\nimport com.fasterxml.jackson.databind.JsonNode;\nimport com.fasterxml.jackson.databind.node.ArrayNode;\nimport com.fasterxml.jackson.databind.node.ObjectNode;\n\n/** Tes... | java | chosen |
[
{
"from": "human",
"value": "Add junit test to check the fund data extraction is not empty."
},
{
"from": "gpt",
"value": "package cl.fatman.capital.fund;\n\nimport static org.junit.Assert.*;\n\nimport java.time.LocalDate;\n\nimport org.junit.Test;\n\npublic class ExtractFundDataTest {\n\n\t@Tes... | java | chosen |
[
{
"from": "human",
"value": "Add style render for JUnit tests\n"
},
{
"from": "gpt",
"value": "package org.tinylog.impl.test;\n\nimport org.tinylog.impl.format.style.Style;\n\n/**\n * Renderer for {@link Style Styles}.\n */\npublic class StyleRenderer {\n\n\tprivate final Style style;\n\n\t/**\n... | java | chosen |
[
{
"from": "human",
"value": "Add interface that was moved up\n"
},
{
"from": "gpt",
"value": "// Copyright Verizon Media. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.\npackage ai.vespa.feed.client;\n\nimport java.util.concurrent.CompletableFuture;\n\n/**\n... | java | chosen |
[
{
"from": "human",
"value": "Add class to detect collision on layouts\n"
},
{
"from": "gpt",
"value": "package com.andela.voluminotesapp.utilities;\n\n\nimport android.graphics.Region;\nimport android.view.View;\n\nimport com.andela.voluminotesapp.callbacks.OnIntersectListener;\n\n\npublic class... | java | chosen |
[
{
"from": "human",
"value": "Check in solution to problem 1 in java\n"
},
{
"from": "gpt",
"value": "/*\n * Multiples of 3 or 5\n * Problem 1\n * If we list all the natural numbers below 10 that are multiples of 3 or 5,\n * we get 3, 5, 6 and 9. The sum of these multiples is 23.\n * Find the sum... | java | chosen |
[
{
"from": "human",
"value": "Add validator based on JSON annotation\n"
},
{
"from": "gpt",
"value": "/**\n *\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *\n */\n\npackage com.micr... | java | chosen |
[
{
"from": "human",
"value": "Test program for the uid fiddly business.\n\n\ngit-svn-id: a1a4b28b82a3276cc491891159dd9963a0a72fae@3654 542714f4-19e9-0310-aa3c-eee0fc999fb1\n"
},
{
"from": "gpt",
"value": "//\n// $Id$\n\npackage com.threerings.util;\n\nimport com.threerings.util.unsafe.Unsafe;\n\n... | java | chosen |
[
{
"from": "human",
"value": "Add a wrapper for OTObjectMap.\n\ngit-svn-id: fdf63cc6b6871a635be2b727c8623e4c3a9a9ed7@18003 6e01202a-0783-4428-890a-84243c50cc2b\n"
},
{
"from": "gpt",
"value": "package org.concord.framework.otrunk.wrapper;\n\nimport org.concord.framework.otrunk.OTObjectInterface;\... | java | chosen |
[
{
"from": "human",
"value": "Add 3 point auton drive to fender.\n"
},
{
"from": "gpt",
"value": "package edu.stuy.commands;\n\n/**\n * Drives to fender, shoots balls at two point hoop.\n * @author 694\n */\n\nimport edu.stuy.subsystems.Flywheel;\nimport edu.wpi.first.wpilibj.command.CommandGroup... | java | chosen |
[
{
"from": "human",
"value": "Add (overly) simple IJ1 discovery code, using ij.Menus.\n\n\nThis used to be revision r1679.\n"
},
{
"from": "gpt",
"value": "package imagej2.ij1bridge.plugin;\n\nimport ij.IJ;\nimport ij.ImageJ;\nimport ij.Menus;\nimport imagej2.plugin.PluginEntry;\nimport imagej2.p... | java | chosen |
[
{
"from": "human",
"value": "Add test for updateSql. Far from complete, but a start..\n\ngit-svn-id: 9ba7b058a3825ad085cc988a898da8cc978da7ce@331927 13f79535-47bb-0310-9956-ffa450edef68\n"
},
{
"from": "gpt",
"value": "package org.apache.ddlutils.platform;\r\n\r\n/*\r\n * Copyright 1999-2005 The... | java | chosen |
[
{
"from": "human",
"value": "Add java solution to q2\n"
},
{
"from": "gpt",
"value": "public class Solution {\n public static boolean isAbbr(String name, String abbr) {\n int namePos = 0;\n int abbrPos = 0;\n while (namePos < name.length() && abbrPos < abbr.length()) {\n ... | java | chosen |
[
{
"from": "human",
"value": "Create util for fetching/caching EVS data\n\n\nSVN-Revision: 416\n"
},
{
"from": "gpt",
"value": "/**\n * @author georgeda \n * \n * $Id: EvsTreeUtil.java,v 1.1 2005-09-21 20:34:59 georgeda Exp $ \n * \n * $Log: not supported by cvs2svn $\n * \n */\npackage go... | java | chosen |
[
{
"from": "human",
"value": "Use constants for header field keys."
},
{
"from": "gpt",
"value": "package io.miti.shortstop.util;\n\npublic final class HeaderField\n{\n public static final String HK_CONTENT_LENGTH = \"Content-Length\";\n public static final String HK_ACCEPT_ENCODING = \"Accept-... | java | chosen |
[
{
"from": "human",
"value": "Add CheckBlock action, for conditionally cancelling a spell\n"
},
{
"from": "gpt",
"value": "package com.elmakers.mine.bukkit.action.builtin;\n\nimport com.elmakers.mine.bukkit.action.BaseSpellAction;\nimport com.elmakers.mine.bukkit.api.action.CastContext;\nimport c... | java | chosen |
[
{
"from": "human",
"value": "Add class for representation of Java installations\n"
},
{
"from": "gpt",
"value": "package org.svetovid.installer;\r\n\r\nimport java.io.File;\r\nimport java.nio.file.Files;\r\nimport java.nio.file.Path;\r\nimport java.nio.file.Paths;\r\n\r\npublic final class JavaI... | java | chosen |
[
{
"from": "human",
"value": "Fix for invoke@Reflection, part 2\n\n\nFormer-commit-id: 776857b21442ba09a1c3944411dac07eb18b2f73"
},
{
"from": "gpt",
"value": "/***************************************************************************\n * Copyright (C) 2015 by Fabrizio Montesi <famontesi@gmail... | java | chosen |
[
{
"from": "human",
"value": "Implement a tuple data type based on class AbstractMap.SimpleEntry.\n"
},
{
"from": "gpt",
"value": "package lemming.data;\n\nimport java.util.AbstractMap;\n\n/**\n * An Entry maintaining a key and a value. The value may be changed using the setValue method.\n *\n * ... | java | chosen |
[
{
"from": "human",
"value": "Add java solution for 120. Triangle\n\n120. Triangle: https://leetcode.com/problems/triangle/"
},
{
"from": "gpt",
"value": "package leetcode.triangle;\n\nimport java.util.ArrayList;\nimport java.util.Arrays;\n\npublic class Solution {\n public int minimumTotal(Ar... | java | chosen |
[
{
"from": "human",
"value": "Add class that handles error\n"
},
{
"from": "gpt",
"value": "package com.google.sps.tool;\n\nimport java.io.IOException;\nimport javax.servlet.http.HttpServletResponse;\nimport com.google.gson.Gson;\nimport java.util.Map;\nimport java.util.HashMap;\n\npublic class R... | java | chosen |
[
{
"from": "human",
"value": "Add example showing basic session usage\n"
},
{
"from": "gpt",
"value": "package com.vtence.molecule.examples.session;\n\nimport com.vtence.molecule.Application;\nimport com.vtence.molecule.Request;\nimport com.vtence.molecule.Response;\nimport com.vtence.molecule.Se... | java | chosen |
[
{
"from": "human",
"value": "Add test class for dijkstras algorithm\n"
},
{
"from": "gpt",
"value": "package dijkstras;\n\nimport dijkstras.Dijkstras;\t\t// My implementation of Dijkstras algorithm in package dijkstras\n\n/*\n\tThis class test Dijkstras shortest path algorithm\n*/\n\nclass TestD... | java | chosen |
[
{
"from": "human",
"value": "Add java solution for 85. Maximal Rectangle\n\n85. Maximal Rectangle: https://leetcode.com/problems/maximal-rectangle/"
},
{
"from": "gpt",
"value": "package leetcode.maximal_rectangle;\n\nimport java.util.Random;\nimport java.util.Stack;\n\npublic class Solution {\n... | java | chosen |
[
{
"from": "human",
"value": "Increase coverage of `Versions` tests\n"
},
{
"from": "gpt",
"value": "/*\n * Copyright 2017, TeamDev Ltd. All rights reserved.\n *\n * Redistribution and use in source and/or binary forms, with or without\n * modification, must retain the above copyright notice and ... | java | chosen |
[
{
"from": "human",
"value": "Add a bare data point request\n"
},
{
"from": "gpt",
"value": "/*\n * Copyright 2015 Open mHealth\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy ... | java | chosen |
[
{
"from": "human",
"value": "Add test class for File\n"
},
{
"from": "gpt",
"value": "package edu.chl.proton.model;\n\nimport org.testng.annotations.Test;\nimport static org.junit.Assert.assertTrue;\n\n/**\n * @author Stina Werme\n * Created by stinawerme on 09/05/17.\n */\npublic class FileTest... | java | chosen |
[
{
"from": "human",
"value": "Add skeleton for problem 51\n"
},
{
"from": "gpt",
"value": "package leetcode;\n\nimport java.util.ArrayList;\nimport java.util.List;\n\n/**\n * https://leetcode.com/problems/n-queens/\n */\npublic class Problem51 {\n public List<List<String>> solveNQueens(int n) ... | java | chosen |
[
{
"from": "human",
"value": "Add puzzle from OrionHealth interview question taken from codility.com\n"
},
{
"from": "gpt",
"value": "package mylab.puzzles;\n\n/**\n * Minimum Horizontal Strokes\n *\n * Sample input:\n * A[] = new int[]{1,1,1,1}\n * Output:\n * 1\n *\n * Sample input:\n * A[] = n... | java | chosen |
[
{
"from": "human",
"value": "GUACAMOLE-208: Define missing exception for the RESOURCE_CLOSED status code."
},
{
"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 wo... | java | chosen |
[
{
"from": "human",
"value": "Add ZelBar component implementation Unknown userzelbar\n\nAdds the ZelBar component into hr.fer.java.vjezbe.zadatak4.component package that implements the abstract CoreComponent and implements the setStudentName returning the student's name.\n"
},
{
"from": "gpt",
"v... | java | chosen |
[
{
"from": "human",
"value": "Add problem 6 to unit 3\n"
},
{
"from": "gpt",
"value": "import java.util.Scanner;\n\n/**\n * This program strips words of repeating letters, or reports if there are none.\n **/\npublic class RemoveDuplicateLetters {\n public static void main(String[] args) {\n ... | java | chosen |
[
{
"from": "human",
"value": "chore: Add version class used to read data from a properties file available from classloader\n"
},
{
"from": "gpt",
"value": "/**\n * Copyright (C) 2015 The Gravitee team (http://gravitee.io)\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n... | java | chosen |
[
{
"from": "human",
"value": "Create class to convert graph to GaphML\n"
},
{
"from": "gpt",
"value": "package uk.me.graphe.client;\r\n\r\nimport java.util.Collection;\r\n\r\npublic class DrawingGraphML{ \r\n\r\n private static Collection<EdgeDrawable> mEdgesToDraw;\r\n private static Colle... | java | chosen |
[
{
"from": "human",
"value": "Create a skeleton for problem 337\n"
},
{
"from": "gpt",
"value": "package leetcode;\n\n/**\n * https://leetcode.com/problems/house-robber-iii/\n */\npublic class Problem337 {\n public static class TreeNode {\n int val;\n TreeNode left;\n Tree... | java | chosen |
[
{
"from": "human",
"value": "Test for checking that all configured (in the annotations) sequences for oracle are less than 30 characters\n\ngit-svn-id: 4b387fe5ada7764508e2ca96c335714e4c1692c6@1695 0d517254-b314-0410-acde-c619094fa49f\n"
},
{
"from": "gpt",
"value": "package edu.northwestern.bio... | java | chosen |
[
{
"from": "human",
"value": "Create activity for the new crime pager\n"
},
{
"from": "gpt",
"value": "package com.bignerdranch.android.criminalintent;\n\nimport android.os.Bundle;\nimport android.support.v4.app.FragmentActivity;\n\npublic class CrimePagerActivity extends FragmentActivity {\n\n ... | java | chosen |
[
{
"from": "human",
"value": "Add utility class for printing binary GeoHashes\n"
},
{
"from": "gpt",
"value": "/*\nCopyright (c) 2016, Colorado State University\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or without modification,\nare permitted provided that t... | java | chosen |
[
{
"from": "human",
"value": "CDK-237: Add utility to nicely indent and format a morphline config file\n"
},
{
"from": "gpt",
"value": "/*\n * Copyright 2013 Cloudera Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance ... | java | chosen |
[
{
"from": "human",
"value": "Add a Jenkins User-Agent header to outgoing HTTP requests\n"
},
{
"from": "gpt",
"value": "/*\n * The MIT License\n *\n * Copyright (c) 2021, Daniel Beck\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and ass... | java | chosen |
[
{
"from": "human",
"value": "Add Second Exercise Horizontal Line\n"
},
{
"from": "gpt",
"value": "import java.util.Scanner;\n\n/**\n * Created by Nathan_Zeplowitz on 4/11/15.\n */\npublic class HorizontalLine {\n public static void main(String[] args) {\n Scanner in = new Scanner(Syste... | java | chosen |
[
{
"from": "human",
"value": "Add dividable interface for translator which could get divided translation result"
},
{
"from": "gpt",
"value": "package org.agmip.core.types;\n\nimport java.util.Map;\n\n/**\n *\n * @author Meng Zhang\n */\npublic interface DividableOutputTranslator {\n public vo... | java | chosen |
[
{
"from": "human",
"value": "Add ignored test to show that blitz4j is not responding\n\nBlitz4j is definitely preventing the log levels from being changed at runtime\nthrough the normal Spring boot channels.\n\nFixes gh-48\n"
},
{
"from": "gpt",
"value": "/*\n * Copyright 2012-2014 the original ... | java | chosen |
[
{
"from": "human",
"value": "Add netconf-mapping-api test for HandlingPriority\n\nChange-Id: I29a6fdaab266acd42c5355101769bb82c14135fc\nSigned-off-by: Tomas Cere <0a8853d56a412aee48c4c5a5a6d548b976ff286c@cisco.com>\n"
},
{
"from": "gpt",
"value": "/*\n * Copyright (c) 2015 Cisco Systems, Inc. an... | java | chosen |
[
{
"from": "human",
"value": "Add java solution for 91. Decode Ways\n\n91. Decode Ways: https://leetcode.com/problems/decode-ways/"
},
{
"from": "gpt",
"value": "package leetcode.decode_ways;\n\npublic class Solution {\n public int numDecodings(String s) {\n \tchar[] chars = s.toCharArray()... | java | chosen |
[
{
"from": "human",
"value": "Add the exception class that implements the semantic exception."
},
{
"from": "gpt",
"value": "package it.unibg.alasc.examples;\r\n\r\npublic class SemanticException extends Exception {\r\n\r\n\tpublic SemanticException() {\r\n\t\t// TODO Auto-generated constructor s... | java | chosen |
[
{
"from": "human",
"value": "Add simple random text generator\n"
},
{
"from": "gpt",
"value": "package bullshit_paper;\n\nimport java.util.Collections;\nimport java.util.HashMap;\nimport java.util.LinkedList;\nimport java.util.List;\nimport java.util.Map.Entry;\nimport java.util.Random;\n\npubli... | java | chosen |
[
{
"from": "human",
"value": "Create a program that countdown to Christmas (December 24th)\n"
},
{
"from": "gpt",
"value": "package christmas;\n\nimport java.awt.Dimension;\nimport java.awt.event.ActionEvent;\nimport java.awt.event.ActionListener;\nimport java.util.Calendar;\nimport javax.swing.J... | java | chosen |
[
{
"from": "human",
"value": "Add a way to mark a field within a processor to have the data injected\ninto the field from the JMS message."
},
{
"from": "gpt",
"value": "package forklift.decorators;\n\nimport java.lang.annotation.Documented;\nimport java.lang.annotation.ElementType;\nimport java.... | java | chosen |
[
{
"from": "human",
"value": "Add data class for storing image recognition data\n"
},
{
"from": "gpt",
"value": "// Copyright 2019 Google LLC\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may ... | java | chosen |
[
{
"from": "human",
"value": "Add XML loader for jME3 asset loader architecture\n"
},
{
"from": "gpt",
"value": "package sed;\n\nimport java.io.IOException;\n\nimport org.jdom.JDOMException;\nimport org.jdom.input.SAXBuilder;\n\nimport com.jme3.asset.AssetInfo;\nimport com.jme3.asset.AssetLoader;... | java | chosen |
[
{
"from": "human",
"value": "Add new test case which serialize nested list.\n"
},
{
"from": "gpt",
"value": "package org.msgpack;\n\nimport junit.framework.Assert;\nimport org.junit.Before;\nimport org.junit.Test;\nimport org.msgpack.annotation.Message;\nimport org.msgpack.type.ArrayValue;\nimpo... | java | chosen |
[
{
"from": "human",
"value": "Add java solution for 189. Rotate Array\n\n189. Rotate Array: https://leetcode.com/problems/rotate-array/"
},
{
"from": "gpt",
"value": "package leetcode.rotate_array;\n\npublic class Solution {\n int gcd(int a, int b){\n while(b != 0){\n int tmp... | java | chosen |
[
{
"from": "human",
"value": "Add cheaper calculator (no need to save results)\n\ngit-svn-id: https://svn.apache.org/repos/asf/jakarta/jmeter/branches/rel-2-1@405491 13f79535-47bb-0310-9956-ffa450edef68\n\nFormer-commit-id: fa4fc7c5dfae488de7844dac26466d681ce216c8"
},
{
"from": "gpt",
"value": "/... | java | chosen |
[
{
"from": "human",
"value": "Test program for testing speed on retrieving DomainConfigs for snapshot harvests\n"
},
{
"from": "gpt",
"value": "import java.util.Iterator;\nimport java.util.Date;\nimport java.util.ArrayList;\nimport java.util.List;\nimport dk.netarkivet.common.utils.FilterIterator... | java | chosen |
[
{
"from": "system",
"value": "Destroy units properly using Custom Abilities\n"
},
{
"from": "human",
"value": "package model.effects;\n\nimport model.Effect;\nimport model.stats.Stat;\nimport model.unit.Unit;\n\npublic class ModifyAttribute extends Effect {\n\t\n\tpublic ModifyAttribute(String n... | java | chosen |
[
{
"from": "human",
"value": "Use a BufferedReader to read characters from the console\n\nhttp://ideone.com/qYOd8p"
},
{
"from": "gpt",
"value": "// Use a BufferedReader to read characters from the console.\nimport java.io.*;\n\nclass ReadChars {\n\tpublic static void main(String args[]) throws I... | java | chosen |
[
{
"from": "human",
"value": "Add unit test for Config\n"
},
{
"from": "gpt",
"value": "package org.jstanier.tweetscheduler.main;\n\nimport org.junit.Test;\nimport org.junit.runner.RunWith;\nimport org.mockito.runners.MockitoJUnitRunner;\n\nimport com.jstanier.tweetscheduler.main.Config;\n\n@RunW... | java | chosen |
[
{
"from": "human",
"value": "Check if array has duplicate values\n"
},
{
"from": "gpt",
"value": "import java.util.HashMap;\n\npublic class ContainsDuplicates {\n public boolean containsDuplicate(int[] nums) {\n HashMap<Integer, Integer> occurrenceCountMap = new HashMap<>();\n f... | java | chosen |
[
{
"from": "human",
"value": "Add unit test for ConcreteAsyncTask\n"
},
{
"from": "gpt",
"value": "package retryable.asyncTask;\n\nimport org.junit.Before;\nimport org.junit.Test;\nimport org.junit.runner.RunWith;\nimport org.mockito.Mock;\nimport org.robolectric.RobolectricGradleTestRunner;\nimp... | java | chosen |
[
{
"from": "human",
"value": "Add initial tests for MinimalMap\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\n ... | java | chosen |
[
{
"from": "human",
"value": "Implement a robust soliton random number generator\n"
},
{
"from": "gpt",
"value": "package com.k13n.soliton;\n\nimport java.util.Random;\n\npublic class RobustSolitonGenerator implements SolitonGenerator {\n private Random random;\n private int k;\n private doubl... | java | chosen |
[
{
"from": "human",
"value": "Include HtmlUnit test (to check void driver manager)\n"
},
{
"from": "gpt",
"value": "/*\n * (C) Copyright 2018 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 i... | java | chosen |
[
{
"from": "human",
"value": "Add solution for CheckBST has dead end\n"
},
{
"from": "gpt",
"value": "package binarytree;\n\nimport datastructures.tree.BinarySearchTree;\nimport datastructures.tree.TreeNode;\n\npublic class CheckBSTHasDeadEnd {\n private BinarySearchTree<Integer> tree = null;\n ... | java | chosen |
[
{
"from": "human",
"value": "Add Timber lint failure examples\n\nLint failures should display in the IDE again once the fix discussed here\nis released: https://issuetracker.google.com/issues/62914381#comment10\n\nThis commit showcases the current suite of checks with some failure\nexamples.\n"
},
{
... | java | chosen |
[
{
"from": "human",
"value": "Add statement to problem 58\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 base test for PhotometricInterpreterLogLuv\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 informatio... | java | chosen |
[
{
"from": "human",
"value": "Add a class representing IdP identifier\n"
},
{
"from": "gpt",
"value": "package io.github.saidie.plantuml_api;\n\nimport java.io.Serializable;\nimport javax.persistence.Column;\nimport javax.persistence.Embeddable;\nimport javax.persistence.EnumType;\nimport javax.p... | java | chosen |
[
{
"from": "human",
"value": "Test the XMLWriter and SAXReader classes\n\n\ngit-svn-id: 5afc437a751a4ff2ced778146f5faadda0b504ab@1173 75d07b2b-3a1a-0410-a2c5-0572b91ccdca\n"
},
{
"from": "gpt",
"value": "package jmetest.renderer.loader;\n\nimport com.jme.app.SimpleGame;\nimport com.jme.scene.mode... | java | chosen |
[
{
"from": "human",
"value": "Add http request support and first snippet to perform game registration inside the Engine.\n"
},
{
"from": "gpt",
"value": "package com.utilities;\n\n\nimport org.apache.http.HttpEntity;\nimport org.apache.http.NameValuePair;\nimport org.apache.http.client.ClientProt... | java | chosen |
[
{
"from": "human",
"value": "Add the optional transient annotation"
},
{
"from": "gpt",
"value": "/*\r\n * Transient.java June 2007\r\n *\r\n * Copyright (C) 2007, Niall Gallagher <niallg@users.sf.net>\r\n *\r\n * This library is free software; you can redistribute it and/or\r\n * modify it unde... | java | chosen |
[
{
"from": "human",
"value": "Add Batik helper to replace a named node in the SVG tree.\n"
},
{
"from": "gpt",
"value": "package de.lmu.ifi.dbs.elki.visualization.batikutil;\n\nimport org.w3c.dom.Element;\n\nimport de.lmu.ifi.dbs.elki.visualization.svg.SVGPlot;\n\n/**\n * This helper class will r... | java | chosen |
[
{
"from": "human",
"value": "Add abstract class with TaskBuilder.Builder getter.\n"
},
{
"from": "gpt",
"value": "package com.google.sps.servlets;\n\nimport com.google.sps.tasks.TaskScheduler;\nimport javax.servlet.http.HttpServlet;\n\npublic abstract class QueueServlet extends HttpServlet {\n ... | java | chosen |
[
{
"from": "human",
"value": "Add simple test for /health\n"
},
{
"from": "gpt",
"value": "package fi.jgke.tagger.controller;\n\nimport com.fasterxml.jackson.databind.ObjectMapper;\nimport fi.jgke.tagger.domain.Tag;\nimport fi.jgke.tagger.domain.Type;\nimport fi.jgke.tagger.repository.TagReposito... | java | chosen |
[
{
"from": "human",
"value": "Add annotation for identifying a getter method (a method that returns the\nValueContainer for a property).\n"
},
{
"from": "gpt",
"value": "package com.mistraltech.bog.core.annotation;\n\nimport java.lang.annotation.Retention;\nimport java.lang.annotation.Target;\n\n... | java | chosen |
[
{
"from": "system",
"value": "JasonLeyba: Remove unnecessary modifiers and cleanup whitespace.\n\nr12481\n"
},
{
"from": "human",
"value": "/*\nCopyright 2007-2009 WebDriver committers\nCopyright 2007-2009 Google Inc.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may ... | java | chosen |
[
{
"from": "human",
"value": "Move this class out of JsCompiler into its own\n"
},
{
"from": "gpt",
"value": "package com.redhat.ceylon.compiler.js;\n\nimport java.io.File;\nimport java.io.FileWriter;\nimport java.io.IOException;\nimport java.io.Writer;\nimport java.util.HashMap;\nimport java.uti... | java | chosen |
[
{
"from": "human",
"value": "Add util to enable json pretty print"
},
{
"from": "gpt",
"value": "package com.sec.ax.restful.utils;\r\n\r\nimport org.apache.log4j.Logger;\r\n\r\nimport com.google.gson.Gson;\r\nimport com.google.gson.GsonBuilder;\r\n\r\n/**\r\n *\r\n * @author heesik.jeon\r\n *\r\... | java | chosen |
[
{
"from": "human",
"value": "Validate references against OK list of databases.\n"
},
{
"from": "gpt",
"value": "package uk.ac.ebi.quickgo.annotation.validation;\n\nimport java.util.Arrays;\nimport java.util.List;\nimport java.util.stream.Stream;\nimport javax.validation.ConstraintValidator;\nimp... | java | chosen |
[
{
"from": "human",
"value": "Add unit test for Disgracer class.\n"
},
{
"from": "gpt",
"value": "package fitnesse.testsystems.slim.tables;\n\nimport org.junit.Test;\n\nimport static org.junit.Assert.*;\n\npublic class DisgracerTest {\n\n @Test\n public void disgraceClassName() {\n assertEqu... | java | chosen |
[
{
"from": "human",
"value": "[7] Create Job task for TaskClient\n"
},
{
"from": "gpt",
"value": "/*\n * Copyright © 2015 John H Uckele. All rights reserved.\n */\n\npackage io.vivarium.client.task;\n\nimport java.nio.channels.NotYetConnectedException;\n\nimport org.java_websocket.handshake.Serve... | java | chosen |
[
{
"from": "human",
"value": "Solve homework2-problem7: Count of Bits One\n"
},
{
"from": "gpt",
"value": "import java.util.Scanner;\n\npublic class CountBitsOne {\n\n public static void main(String[] args) {\n Scanner scan = new Scanner(System.in);\n\n int n = scan.nextInt();\n ... | java | chosen |
[
{
"from": "human",
"value": "Add java solution for 93. Restore IP Addresses\n\n93. Restore IP Addresses: https://leetcode.com/problems/restore-ip-addresses/"
},
{
"from": "gpt",
"value": "package leetcode.restore_ip_addresses;\n\nimport java.util.ArrayList;\n\npublic class Solution {\n\tpublic s... | java | chosen |
[
{
"from": "human",
"value": "Implement the lease manager for DF\n\n"
},
{
"from": "gpt",
"value": "/*****************************************************************\nJADE - Java Agent DEvelopment Framework is a framework to develop \nmulti-agent systems in compliance with the FIPA specification... | java | chosen |
[
{
"from": "human",
"value": "Create a skeleton for problem 146\n"
},
{
"from": "gpt",
"value": "package leetcode;\n\nimport java.util.HashMap;\nimport java.util.LinkedList;\nimport java.util.Map;\n\n/**\n * https://leetcode.com/problems/lru-cache/\n */\npublic class Problem146 {\n public stat... | java | chosen |
[
{
"from": "human",
"value": "Define interface for actions to run with custom analytics\n"
},
{
"from": "gpt",
"value": "/*\n * Copyright 2017 The Chromium Authors. All rights reserved.\n * Use of this source code is governed by a BSD-style license that can be\n * found in the LICENSE file.\n */\... | java | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.