query
stringlengths
8
1.54M
document
stringlengths
9
312k
negatives
listlengths
19
20
metadata
dict
Gets the machine block location X offset.
public double getXOffset() { return getOffset("x"); }
[ "public Integer getXOffset() {\n\t\tdouble frameWidth = this.pixy.getFrameWidth() / 2;\n\t\tdouble blockX = this.getX();\n\n\t\treturn (int) (blockX + frameWidth / 2);\n\t}", "public int getXOffset();", "Integer getXOFFSET();", "public int getxOffset() {\r\n\t\treturn xOffset;\r\n\t}", "public final int get...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Kafka offset containing nextOffset and nextEventTime.
public KafkaOffset(long nextOffset, long nextEventTime) { this.nextOffset = nextOffset; this.nextEventTime = nextEventTime; }
[ "public long getNextOffset();", "long getOffset();", "public Integer nextOffset() {\n return this.nextOffset;\n }", "public OffsetAndMetadata findNextCommitOffset(final String commitMetadata) {\n boolean found = false;\n long currOffset;\n long nextCommitOffset = committedOffset...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Hide the Closed Captioning TextView
private void hideClosedCaptioning() { try { TextView subTitlesTv = (TextView) getActivity().findViewById(R.id.txtSubtitles_tv); if (subTitlesTv != null) { subTitlesTv.setVisibility(View.GONE); } } catch (Exception e) { logger.error(e); ...
[ "private void resetClosedCaptioning() {\n try {\n TextView subTitlesTv = (TextView) getActivity().findViewById(R.id.txtSubtitles_tv);\n if (subTitlesTv != null) {\n subTitlesTv.setText(\"\");\n subTitlesTv.setVisibility(View.INVISIBLE);\n }\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the plannedEvent value for this EventType.
public void setPlannedEvent(com.vmail.external.remoteAction.ws.PlannedEventType[] plannedEvent) { this.plannedEvent = plannedEvent; }
[ "public void setUnplannedEvent(com.vmail.external.remoteAction.ws.UnplannedEventType[] unplannedEvent) {\n this.unplannedEvent = unplannedEvent;\n }", "public void setPlannedDate (java.util.Date plannedDate) {\n\t\tthis.plannedDate = plannedDate;\n\t}", "public com.vmail.external.remoteAction.ws.Plann...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Finds the constant definition that contains aAST.
private static DetailAST findContainingConstantDef(DetailAST ast) { DetailAST varDefAST = ast; while (varDefAST != null && varDefAST.getType() != TokenTypes.VARIABLE_DEF && varDefAST.getType() != TokenTypes.ENUM_CONSTANT_DEF) { varDefAST = varDefAST.getParent(...
[ "Object getRelevantAST();", "private boolean isMagicNumberExists(DetailAST ast, DetailAST constantDefAST) {\n boolean found = false;\n DetailAST astNode = ast.getParent();\n while (astNode != constantDefAST) {\n final int type = astNode.getType();\n if (Arrays.binarySear...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the default SAX, XSLT, and DOM implementations to use on the XmlFactoryLifecycle for those that are not already set. To override any of these defaults, create a chain that runs before this one and sets the factories as desired on the XmlFactoryLifecycle.
@StartStep(localName="default-xml-factory", before={"xml-factory-lifecycle"}) public static void startDefaultXmlFactory(LifecycleContext context) { // add the default xml parser factory step. if( getSaxParserFactoryFactory(DEFAULT_SAX_PARSER_FACTORY_NAME) == null ) { saxParserFactoryCreated = true; ...
[ "@StopStep(localName=\"default-xml-factory\")\n public static void stopDefaultXmlFactory(LifecycleContext context)\n {\n // remove the joost transformer factory if it was created by this step.\n if( joostFactoryCreated ) {\n joostFactoryCreated = false;\n removeTransformerFactoryFactory(JOOST_FACT...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get all booked tickets for specified event id.
public List<Ticket> getBookedTicketsForEvent(long eventId, int pageSize, int pageNum) { return storage.entrySet().stream() .filter(TICKET_PREDICATE) .map(entry -> (Ticket) entry.getValue()) .filter(ticket -> Objects.equals(eventId, ticket.getEventId())) ...
[ "public List<Ticket> getTicketsForEvent(Event event, Date date) {\n return eventDAO.getTicketsForEvent(event, date);\n }", "public List<Ticket> findTicketsByBookingId(int bookingId){\n\n String sql = \"SELECT * FROM tickets WHERE booking_id = \" + bookingId;\n\n List<Ticket> tickets = jdbc...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Obtains a Lineage between the supplied dates, inclusively.
public Lineage getLineageForDateRange(String entity_id, long startDate, long endDate);
[ "public Lineage getLineageForEntityRange(String first_entity_id, String second_entity_id);", "public LineageEntry getEntryForDate(String entity_id, long date);", "alluxio.proto.journal.Lineage.LineageEntryOrBuilder getLineageOrBuilder();", "alluxio.proto.journal.Lineage.LineageEntry getLineage();", "public ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Abort the given transaction, release all the locks it holds And erase the data it has written
public void abort(int tid) { List<Lock> lockList = null; for (Integer varIndex : _lockTable.keySet()) { lockList = _lockTable.get(varIndex); int size = lockList.size(); for (int i = size - 1; i >= 0; i--) { if (lockList.get(i).getTranId() == tid) { if (lockList.get(i).getType...
[ "abstract public void abortTransaction();", "protected abstract void abortTxn(Txn txn) throws PersistException;", "private void abortTransactions() {\n if (transactionRegister.isEmpty()) {\n return;\n }\n\n TransactionCoordinatorClient coordinatorClient =\n ((Pulsa...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
! Returns the index of the face within the shape.
public int getFaceIndex() { return faceIndex; }
[ "public int getFace() {\n return face;\n }", "public int getShapePointIndex();", "public int getFace(){\n\t\treturn this.verdi;\n\t}", "public int cardIndex(Card[] cardArr, String face){\n\n for(int index = 0; index < 6;index ++){\n if(cardArr[index].face.equals(face)){\n ret...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the player choice To make it even easier get the player to enter a number instead of a letter So rock = 0, P = 1, S = 2 & Q = 3.
private String getPlayerChoice() { Scanner userInput = new Scanner(System.in); // Create a Scanner object System.out.println("Enter choice:\nr = rock\np = paper\ns = scissors\nq = quit"); return userInput.nextLine().toUpperCase(); }
[ "public String getComputerChoice() {\n return generateRockPaperScissors(1, 3);\n }", "public static char playRound() {\n\n String playerChoice = playerChoice();\n System.out.println(\"You chose: \" + playerChoice);\n\n Random rand = new Random();\n int compRand = rand.nextInt...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Resets values after attempting to update a password hash
public void endUpdateHashMethod() { // ended attempt to update their password hash, reset values to default updatePasswordHashMethod = false; lastUsername = ""; lastPassword = ""; }
[ "public void resetPasswords() {\r\n \r\n // load the user roles to the conversation \r\n this.selectedRoles = userService.getRoles(selectedUser);\r\n // reset the password and the repeated Password\r\n newPassword = null;\r\n repeatedPassword = null;\r\n }", "public voi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Persists the given ID and outcomes to local storage.
void persistInteractions( long eventId, Map</* @Feature */ Integer, /* Boolean */ Object> outcomesMap);
[ "public void save() {\r\n\t\tGame.getInstance().getInventory().add(id);\r\n\t}", "public boolean saveActivityOutcome(int activityID, String outcomeText);", "public void saveStorage() throws IOException {\n\t\tuserItemList.setTaskArray(taskList);\n\t\tuserItemList.setIdCounter(idCounter);\n\t\tfinal String json ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns whether or not the challenge we want to add is valid. Since the key for a challenge is the challenger, the challenged, and the time, we make sure there is no other challenge with the same parameters.
public static boolean isValidChallenge(String challenger, String challenged, Timestamp time) { return getChallenge(challenger, challenged, time) == null; }
[ "public static boolean addChallenge(Callouts.ChallengeForm challenge) {\n\t\tString fromUsername = getCurrentUsername();\n\n\t\tboolean wasSuccessful = true;\n\t\t/* Checks that we have all the necessary info and that the person is sending\n\t\t * a challenge from themselves (not hacking and sending a challenge fro...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Run the byte hw1_1000000LOC31method7(long,hw1_1000000LOC5,long,char,hw1_1000000LOC31) method test.
@Test public void testHw1_1000000LOC31method7_4() throws Exception { long var0 = 1L; hw1_1000000LOC5 var1 = new hw1_1000000LOC5(); long var2 = 1L; char var3 = ''; hw1_1000000LOC31 var4 = new hw1_1000000LOC31(); byte result = hw1_1000000LOC31.hw1_1000000LOC31method7(var0, var1, var2, var3, var4); // ...
[ "@Test\n\tpublic void testHw1_1000000LOC31method7_1()\n\t\tthrows Exception {\n\t\tlong var0 = 1L;\n\t\thw1_1000000LOC5 var1 = new hw1_1000000LOC5();\n\t\tlong var2 = 1L;\n\t\tchar var3 = '\u0001';\n\t\thw1_1000000LOC31 var4 = new hw1_1000000LOC31();\n\n\t\tbyte result = hw1_1000000LOC31.hw1_1000000LOC31method7(var...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
returns the key of the element whose id is id in the heap;
public Node key(int id) { return heap[id]; }
[ "public Node min_key() {\n\t\treturn heap[1];\n\t}", "public boolean in_heap(int id) {\n\t\tfor (Node node : heap) {\n\t\t\tif (node.getVertex() == id) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "boolean in_heap(Edge id);", "UUID getHeapId(final Model model);", "public int getHashCode...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Removes a score from the list.
public void remove(Score s) { scores.removeValue(s, true); scores.sort(); }
[ "public void deleteScore(Score scoreRemove) {\n Iterator<Score> itt = scores.iterator();\n while (itt.hasNext()) {\n Score s = itt.next();\n if (s.getScoreId().equals(scoreRemove.getScoreId())) {\n System.out.println(\"found scoreID\" + s.getScoreId() + \" in score...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the value of the 'field415' field
public java.lang.CharSequence getField415() { return field415; }
[ "public java.lang.CharSequence getField415() {\n return field415;\n }", "java.lang.String getField1504();", "java.lang.String getField1532();", "java.lang.String getField1558();", "java.lang.String getField1534();", "java.lang.String getField1531();", "java.lang.String getField1548();", "java.lang...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
For this test, try creating a phonemic inventory for a language. Make sure that the phonemic inventory is what you would expect it to be. Create multiple phonemic inventories, and use multiple different seeds. Here are seeds that I think are kinda cool: 1234, 36, 3342 (<)
@Test (timeout = 1000) public void testPhonemicInventory() { SimplePhonology tester = new SimplePhonology(1); // I kinda like 1234's phonemic inv. String[][] consonants = tester.consonantGrid(); //DOES NOT INCLUDE ASPIRATED CONSONANTS for (int i = 0; i < consonants.length; i++) { ...
[ "public static void populateTestData() {\n // Populate parts into Inventory\n Inventory.addPart(new InHouse(Inventory.generatePartID(), \"Prefabulated amulite base plate\", 1125.23, 5, 1, 5, 100));\n Inventory.addPart(new InHouse(Inventory.generatePartID(), \"Maleable logarithmic casing\", 500....
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method returns the Euler angles of all 3 axes from quaternion orientation.
private void getEulerAngles(double[] angles) { Quaternion q = imu.getQuaternionOrientation(); // // 0: roll (x-axis rotation) // 1: pitch (y-axis rotation) // 2: yaw (z-axis rotation) // angles[0] = Math.toDegrees(Math.atan2(2.0*(q.w*q.x + q.y*q.z), 1.0 - 2.0...
[ "private void getEulerAngles(double[] angles)\n {\n Quaternion q = imu.getQuaternionOrientation();\n //\n // 0: roll (x-axis rotation)\n // 1: pitch (y-axis rotation)\n // 2: yaw (z-axis rotation)\n //\n angles[0] = Math.toDegrees(M...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Method to print list of n elements of list
public static void printN(List<Student> data, int n){ for (int r = 0; r < n; r++) { System.out.println(data.get(r)); } System.out.println(); }
[ "public static void printTopNItems(ArrayList<Item> items, int n) {\n for (Item item : getTopNItems(items, n)) {\n System.out.println(item);\n }\n }", "public static void printList(List<Long> x) {\r\n\t\t//doest attempt if there is elements in the list\r\n\t\tif(x == null)\r\n\t\t\tretu...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Appends and returns a new empty "MI_EnvironmentalRecord" element
public org.isotc211.x2005.gmi.MIEnvironmentalRecordType addNewMIEnvironmentalRecord() { synchronized (monitor()) { check_orphaned(); org.isotc211.x2005.gmi.MIEnvironmentalRecordType target = null; target = (org.isotc211.x2005.gmi.MIEnvironmentalRecordType)get_stor...
[ "public org.isotc211.x2005.gmi.MIEnvironmentalRecordType getMIEnvironmentalRecord()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.isotc211.x2005.gmi.MIEnvironmentalRecordType target = null;\n target = (org.isotc211.x2005.gmi.MIEnvironmentalRecordType)...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the bounding box of this GTFS feed. We use a Rectangle2D rather than a Geotools envelope because GTFS is always in WGS 84. Note that stops do not have agencies in GTFS.
public Rectangle2D getBounds () { Rectangle2D ret = null; for (Stop stop : gtfsDao.getAllStops()) { if (ret == null) { ret = new Rectangle2D.Double(stop.getLon(), stop.getLat(), 0, 0); } else { ret.add(new Point2D.Double(stop.getLon(), stop.ge...
[ "public ReferencedEnvelope getBounds(){\n if(bounds==null){\n // Create Null envelope\n this.bounds = new ReferencedEnvelope(getCRS());\n // First try to find the BBOX definition in the gisNode directly\n try{\n if(gisNode.hasProperty(INeoConst...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Update tags of the specified connection monitor.
@ServiceMethod(returns = ReturnType.SINGLE) public ConnectionMonitorResult updateTags( String resourceGroupName, String networkWatcherName, String connectionMonitorName, Map<String, String> tags) { return this.serviceClient.updateTags(resourceGroupName, networkWatcherName, connectionMonitorName, tag...
[ "@ServiceMethod(returns = ReturnType.SINGLE)\n public ConnectionMonitorResult updateTags(\n String resourceGroupName,\n String networkWatcherName,\n String connectionMonitorName,\n Map<String, String> tags,\n Context context) {\n return this\n .serviceClient\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
add photo to album in library if the photo is in library and also if the album does not already have the photo
public boolean addPhotoToAlbum(Photo p, String albumName) { boolean photoInAlbum = false; for (Photo a : this.photos) { // checking if the photo is inside the library if (a.equals(p)) { photoInAlbum = true; } } if (photoInAlbum) { for (...
[ "public void addPhoto(Photo photo) {\n\t\tString parentPath = photo.getParentFile().getAbsolutePath();\n\t\t// Check if folder containing image already exist in library\n\t\tif (library.containsKey(parentPath)) {\n\t\t\tif (!library.get(parentPath).contains(photo)) {\n\t\t\t\t// If image does not already exist, add...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns a ClassFileReader instance of a given path.
public static ClassFileReader newInstance(Path path) throws IOException { if (!Files.exists(path)) { throw new FileNotFoundException(path.toString()); } if (Files.isDirectory(path)) { return new DirectoryReader(path); } else if (path.getFileName().toString().ends...
[ "public static ClassFileReader newInstance(Path path, JarFile jf) throws IOException {\n return new JarFileReader(path, jf);\n }", "private ClassReader getClassReader(final String name) throws IOException {\r\n \r\n // Check for an existing entry.\r\n URL classURL = classNameToURLCa...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ Reset the number of reply
private synchronized void resetReply(){ numberOfReply = 0; }
[ "public void setReplyCount(int tmp) {\n this.replyCount = tmp;\n }", "private synchronized void increReply(){\n numberOfReply ++;\n }", "private void initializeReply() {\r\n reply = new MessageSequence();\r\n }", "void increaseHttpReply() {\n\t\ttotalHttpReply++;\n\t}", "void resetMe...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Instantiates a new udp packet sender.
public UdpPacketSender() { try { this.socket = new DatagramSocket(); } catch (final SocketException e) { log.log(Level.SEVERE, e.getMessage(), e); } }
[ "public HelloUDPClient() {\n }", "public Packet createPacket(int recipientID);", "public static void startUDP() {\n\n\t\t// UDP communication\n\t\tRunnable task = () -> {\n\t\t\treceive();\n\t\t};\n\n\t\tThread thread = new Thread(task);\n\t\tthread.start();\n\n\t}", "Builder setUdpSrc(TpPort port);", "D...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns an ArrayList of all BObjects in the model.
public ArrayList<BObject> toArrayList() { // Maybe you should cache the current ArrayList in an object variable so all of // this stuff doesn't have to be called for so often in main view. ArrayList<BObject> objectList = new ArrayList<BObject>(); for (BBall ball : balls) { ob...
[ "public List<BidListModel> getAllBids() {\n return bidListRep.findAll();\n }", "public ArrayList<BBall> getAllBalls() {\n return balls;\n }", "public ArrayList<Bomb> getBombs()\n\t{\n\t\treturn bombs;\n\t}", "public Collection<? extends Boat> getAllBoatInstances() {\n\t\treturn delegate.ge...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns a factory function for instances of the random sampling algorithm.
BiFunction<Integer, Random, RandomSampling<T>> implementation();
[ "Randomizer getRandomizer();", "abstract Truerandomness newInstance();", "public FastRandom createRandomGenerator(){\n return new FastRandom();\n }", "public static final Randomizer getRandomizer() {return instance;}", "BiFunction<Integer, Random, RandomSamplingCollector<T>> collector();", "T sa...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
setter for the column
public void setCol(int column) { this.column = column; }
[ "void setColumn(int newCol) {\n\t\tthis.column = newCol;\n\t}", "public void setcolumn(int column) {\r\n this.column = column;\r\n }", "public void setCol(int value) {\n this.col = value;\n }", "public void setColumn(SQLColumn column) {\r\n this.column = column;\r\n }", "void s...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the size of the subtitle.
public int getSubtitleFontSize() { return this.subtitle_fontsize; }
[ "public String getSizeText() {\n\t\treturn sizeText;\n\t}", "public VideoSize getSize() {\n\t\treturn size;\n\t}", "public double getTextSize ()\n {\n return textSize;\n }", "public String getSongLengthText();", "public int getTextSize()\n {\n return textSize;\n }", "public int g...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Alternative toString method that provides associated dates with each food entry. Only returns entries within the bounds of a start and end date.
public String toDatedString(LocalDateTime start, LocalDateTime end) { List<FoodEntry> entriesInRange = FoodListManager.filterListByDate(foodEntries, start, end); return FoodListManager.convertListToDatedString(entriesInRange); }
[ "@Override\n public String toString() {\n return date.getMonth() + \"/\" + date.getDay() + \"/\" + date.getYear() + \" \" + start + \"--\" + end + \":\" + description;\n }", "public String toDatedString(LocalDateTime start) {\n List<FoodEntry> entriesInRange = FoodListManager.filterListByDate(...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Helper method for cloning arrays. Migrates the items from src to target and clones them, if deep=true. This is done by reflectively invoking the clone method on the item. If this fails, an exception is thrown if throwExceptionOnUnCloneable=true If the lengths of the two arrays are distinct, an exception is thrown!
@SuppressWarnings("unchecked") public static <T> void migrateArray(T[] src, T[] target, boolean deep, boolean throwExceptionOnUnCloneable) { if (target.length!=src.length) throw new RuntimeException("Arrays must have identical size!"); for (int i=0; i<src.length; i++) { T t = src[i]; T clone = t; if (d...
[ "public static void main(String[] args) {\n System.out.println(\"TEST-CASE for int[][] deepCopy\");\n int[][] a1 = new int[][]{{1,2,3}, {4,5,6}};\n int[][] b1 = DeepCloneAndConcatArrayUtil.deepClone(a1);\n a1[0][0] = 999999;\n for(int i=0; i<a1.length; i++) {\n System.o...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set up a MapReduce Job to use Accumulo as input.
static void configureAccumuloInput(Job job) throws AccumuloSecurityException { Configuration conf = job.getConfiguration(); String username = conf.get(MRUtils.AC_USERNAME_PROP, "root"); String password = conf.get(MRUtils.AC_PWD_PROP, ""); String instance = conf.get(MRUtils.AC...
[ "@Override\n public void setup(Context context) throws IOException, InterruptedException{\n // getting configuration\n Configuration conf = context.getConfiguration();\n // initialiating cluster\n Cluster cluster = new Cluster(conf);\n // getting current job settings\n org.apache.hadoop.mapreduce...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Clamp a float to the range 0..255
private static int clamp255(float val) { return (val < 0) ? 0 : (val > 255) ? 255 : Math.round(val); }
[ "private int clamp(int value) {\r\n\t\tif (value < 0)\r\n\t\t{\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t\telse if (value > 255)\r\n\t\t{\r\n\t\t\treturn 255;\r\n\t\t}\r\n\t\t\r\n\t\treturn value;\r\n\t\t\t\r\n\t}", "private static final float clamp(float value)\n {\n return clamp(value, 0.0f, 1.0f);\n }", "public ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Adds games to the store via a JSON file. Done with JSON.simple.
public void addGameByFile(String filename) throws IOException, GameStationException { JSONArray jsonArray = new JSONArray(new String(Files.readAllBytes(Paths.get(filename)))); for (int i = 0; i < jsonArray.length(); i++) { JSONObject jsonObject = jsonArray.getJSONObject(i); if (...
[ "private void saveJSON() {\n try {\n Writer writer = new FileWriter(npcFilePath);\n Gson gson = new GsonBuilder() //man könnte noch den gleichen gson von dem readJson nehmen, aber geht auch so\n .excludeFieldsWithoutExposeAnnotation()\n .create();\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Draw feet, four dark gray small rectangles
public static void drawFeet(Graphics g) { g.setColor(Color.darkGray); g.fillRect(225, 475, 50, 25); g.fillRect(300, 475, 50, 25); g.fillRect(450, 475, 50, 25); g.fillRect(525, 475, 50, 25); }
[ "private void drawFences(Graphics g){\n\t\tg.setColor(Color.BLACK);\n\t\tdrawInteriorFences(g);\n\t\tdrawPerimeterFences(g);\n\t}", "public void draw(){\n int i, j;\n for(i = 0; i < height; i++){\n if(i == 0 || i == (height-1)){\n for(j = 0; j < width; j++){\n System.out...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Constructs a BandMergeOpImage. The layout parameter may optionally contain the tile grid layout, sample model, and/or color model. The image dimension is determined by the intersection of the bounding boxes of the source images. The image layout of the first source image, source1, is used as the fallback for the image ...
public BandMergeOpImage(List sources, Map config, Range[] noData, ROI roi, double destinationNoData, boolean setAlpha, ImageLayout layout) { super(vectorize(sources), layoutHelper(sources, layout, setAlpha), config, true); // Set flag to permit in-place operation. permitInPlaceOper...
[ "public RenderedImage create(ParameterBlock args,\n RenderingHints hints) {\n // Get ImageLayout from renderHints if any.\n ImageLayout layout = RIFUtil.getImageLayoutHint(hints);\n\n\n return new LCBandCombineOpImage(args.getRenderedSource(0),\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Use LesenRPCResponse.newBuilder() to construct.
private LesenRPCResponse(com.google.protobuf.GeneratedMessage.Builder<?> builder) { super(builder); this.unknownFields = builder.getUnknownFields(); }
[ "private LivestockResponse(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "private LesenRPCResult(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n super(builder);\n this.unknownFields = builder.getUnknownFields();\n }", "private HelloResponse(co...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Use this method if you need the JAINSIP response event associated with a response received by high level SipUnit classes like SipCall and Subscription.
public ResponseEvent getResponseEvent() { return responseEvent; }
[ "public SipResponse(ResponseEvent event) {\n super(event.getResponse());\n this.responseEvent = event;\n }", "void ice_response();", "public String receiveResponse()\n\t{\n\t\t\n\t}", "public String getResponseMessage();", "void onServiceResponse(Request_e signalId, Response_e response, Bundle data);...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Create a parser, setting the debug to true or false.
public Parser(boolean debugMe) { yydebug=debugMe; }
[ "public Parser(boolean debugMe) {\r\n\t\tyydebug = debugMe;\r\n\t}", "public Parser(boolean debugMe)\r\n {\r\n yydebug=debugMe;\r\n }", "public Parser(boolean debugMe)\n{\n yydebug=debugMe;\n}", "public Parser(boolean debugMe)\r\n{\r\n yydebug=debugMe;\r\n}", "protected abstract Parser createParser();",...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
If certain Android classes are required to be loaded in a particular order, do so here. Android's Zygote has a class preloading mechanism, and there have been obscure crashes caused by Android bugs requiring a specific initialization order.
private void preloadClasses(int apiLevel) { if (apiLevel >= Q) { // Preload URI to avoid a static initializer cycle that can be caused by using Uri.Builder // before Uri.EMPTY. try { Class.forName("android.net.Uri", true, this.getClass().getClassLoader()); } catch (ClassNotFoundExcep...
[ "public static void forceClassLoad()\n {\n }", "void injectorClassLoader() {\n\t\t//To get the package name\n\t\tString pkgName = context.getPackageName();\n\t\t//To get the context\n\t\tContext contextImpl = ((ContextWrapper) context).getBaseContext();\n\t\t//Access to the Activity of the main thread\n\t\t...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Check the method inheritance of the class.
public List<SemanticError> checkMethodInheritance() { List<SemanticError> errors = new LinkedList<>(); if (superClass == null) return errors; int max = -1; for (String key : superClass.methods.keySet()) { VSOPMethod m = superClass.methods.get(key); max = Math.max(max, m.ord); VSOPMethod old = m...
[ "protected void checkSubclass() {\n }", "public boolean isInherited();", "@Override\r\n\tprotected void checkSubclass() {\n\t}", "@Override\r\n\tprotected void checkSubclass()\r\n\t{\n\t}", "public void polymorphicCheck() throws PopulatorException {\n MethodContents superMethod = ownerClass.getInhe...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get players on this server across all known proxies
Collection<RemotePlayer> getRemotePlayers();
[ "public List<Player> getRemotePlayers(){\n List<Player> remotePlayerList = new ArrayList<Player>();\n for(PlayerSession ps: playerSessions){\n remotePlayerList.add(ps.remotePlayer);\n }\n return remotePlayerList;\n \n }", "private ArrayList<Player> loadPlayers(){\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the CDMA ERI text for particular subId,
String getCdmaEriTextForSubscriber(int subId, String callingPackage);
[ "public VoogaFrontEndText getText(Object id) {\n\t\treturn (VoogaFrontEndText) myElements.get(id);\n\t}", "java.lang.String getSubSubSubDisplay();", "java.lang.String getSubSubDisplay();", "public String getMessageForStatusAndSubStatus(Integer StatusId,Integer subStatusId) throws DataServiceException {\r\n\t\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Constructs a Vertex at (x,y,z).
public Vertex3D(double x, double y, double z) { this.x = x; this.y = y; this.z = z; }
[ "private void createVertex(float x, float y, float z) {\n vertexBuffer.put(x);\n vertexBuffer.put(y);\n vertexBuffer.put(z);\n }", "Vertex(double x, double y, double z){\n this(new Point(x, y, z));\n }", "Vertex createVertex();", "public Vertex()\n\t { pnt = new Point3d();\n\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Check DataType of value on stack and add conditional jump to end of file(condition is not fulfilled)
@Override public void enterWhilestatement(CParser.WhilestatementContext ctx) { if(Error.inError() == true) { // when error in previous parsing occurred, popping data type will cause EmptyStackException return; } //method is called AFTER parser processed block 'if(condition)' so conditi...
[ "private void stmt(){\n \n if(token == \"datatype\"){\n \n if(declarition()){\n System.out.println(\"right declarition in line \" + linesz);\n nextToken();\n stmt();\n }else{\n ski...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Constructor for objects of class PriorityQueue
public PriorityQueue() { // initialise instance variables heap = new PriorityCustomer[100]; size = 0; }
[ "public PriorityQueue() {\n this(DEFAULT_PRIORITY_COUNT);\n }", "public PriorityQueue()\r\n\t{\r\n\t\tcurrentSize = 0;\r\n\t\tlowestCurrentPriority = Integer.MAX_VALUE;\r\n\t\tpq = new DLL[MAXIMUM_PRIORITY + 1];\r\n\t\tfor (int i = 0; i < pq.length; i++)\r\n\t\t{\r\n\t\t\tpq[i] = new DLL();\r\n\t\t}\r\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set the values for the useradjustable parameters in the specified row in the parmater table.
private void setParmRow(TableRow row, int volume, int brewSecs, int vacSecs) { Checker.notNull(row); Checker.inRange(volume, Cycle.MIN_VOLUME, Cycle.MAX_VOLUME); Checker.inRange(brewSecs, Cycle.MIN_TIME, Cycle.MAX_TIME); Checker.inRange(vacSecs, Cycle.MIN_TIME, Cycle.MAX_TIME); ...
[ "public void setEntry(final int row, final int column,\n final ValueField value) {\n if (row >= tableau.getRowDimension() && row < tableau.getRowDimension() + artificialRows.size()) {\n artificialRows.get(row - tableau.getRowDimension())[column] = value;\n return;\n }\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Constructor with initialization of the member variables. A test case instance should not be instantiated directly. Access TestCaseInstances using the getTestCasesInstancesInMethod() method of JTestCase class.
public TestCaseInstance(String method, String testcase, JTestCase jtestcase) { this.method = method; this.testcase = testcase; this.jTestCase = jtestcase; this.assertFailureReason = new AssertFailureReason(); if (jTestCase != null) { this.mClassName = jtestcase.getMClassName(); this.mapper = jtes...
[ "public TestCase() {\n\t\tthis.title = null;\n\t\tthis.steps = new ArrayList<TestCaseStep>();\n\t\tthis.valid = true;\n\t\tthis.selfLayer = null;\n\t}", "public TestSuite01() {\n initComponents();\n }", "public SwerveAutoTest() {\n // Initialize base classes.\n // All via self-constructi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
======================================================================================== CALCULATE THE NEXT FIBONACCI NUMBER ========================================================================================
public static int nextF(int fib[]) { int tmp = fib[0]; fib[0] = fib[1]; fib[1] += tmp; return fib[0]; }
[ "protected abstract void calculateNextFactor();", "public void Fibonacciseries()\r\n\t{\r\n\t\tint firstNo=0,secondNo=1,sum;\r\n\t\tint count;\r\n\t\t\r\n\t\tSystem.out.println(\"Enter the Number\");\r\n\t\tcount = sc.nextInt();//Read the number to calculate fibonacci\r\n\t\t\r\n\t\tSystem.out.println(firstNo);\r...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Testing ACOS v2 trunk conversion warnings
@Test public void testTrunkAcos2ConversionWarn() throws IOException { String hostname = "trunk_acos2_convert_warn"; Batfish batfish = getBatfishForConfigurationNames(hostname); Warnings warnings = batfish .loadConvertConfigurationAnswerElementOrReparse(batfish.getSnapshot()) ...
[ "public void testCanConvert_Accuracy5() throws Exception {\n assertEquals(\"canConvert is incorrect.\", true,\n converter.canConvert(VALUE, 1, AccuracyTestHelper.getCRMD(), Timestamp.class));\n }", "@Test\n public void testTrunkVlanAcos2Conversion() {\n String hostname = \"trunk_acos2_con...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets up the email context menu.
private void prepareEmailContextMenu() { Log.d(getLocalClassName(), "prepareEmailContextMenu"); emailContextMenu = new PunchInQuickActionGrid(this); editEmailMenuItem = new BasicQuickAction(this, R.drawable.gd_action_bar_edit, R.string.label_edit_email); sendEmailMenuItem = new BasicQuickAction(this...
[ "private void setUpContextMenus() {\n if (baseGrid.getSide() == game.getHumanSide()) {\n\n ContextMenu contextMenu = new ContextMenu();\n\n airfieldMenuItem = new MenuItem(\"Airfield...\");\n airfieldMenuItem.setUserData(getBaseGrid().getAirfield());\n airfieldMen...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the living province.
public Province getLivingProvince() { return livingProvince; }
[ "public String getProvince() {\r\n return province;\r\n }", "String getProvince();", "public Integer getProvince() {\n return province;\n }", "public String getLocationProvince() {\n return locationProvince;\n }", "public java.lang.String getProvince()\n {\n synchroni...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method sets from which side the toast will be dropped
public void setSideToDrop(int whichSide){ this.dropSide=whichSide; }
[ "public void setToastLocation (int toastType, GPGToastPlacement placement) {\n\t\tswitch (toastType) {\n\t\tcase TOAST_ACHIEVEMENTS:\n\t\t\tGPGManager.sharedInstance().setAchievementUnlockedToastPlacement(placement);\n\t\t\tbreak;\n\n\t\tcase TOAST_WELCOME:\n\t\t\tGPGManager.sharedInstance().setWelcomeBackToastPlac...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__System__Group__4" $ANTLR start "rule__System__Group__4__Impl" ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/srcgen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:2486:1: rule__System__Group__4__Impl : ( '}' ) ;
public final void rule__System__Group__4__Impl() throws RecognitionException { int stackSize = keepStackSize(); try { // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:2490:1: ( ( '}' ) ) ...
[ "public final void rule__System__Group__4() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:2479:1: ( rule__System...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets service options from the database.
public ObservableList<String> getServiceOptions() { ResultSet resultSet = Utils.getInstance().executeQuery("SELECT name FROM service"); ObservableList<String> row = FXCollections.observableArrayList(); try { while (resultSet.next()) { row.add(resultSet.getString("name...
[ "private void getServices() {\n\t \n\t connector.query(\"SELECT * FROM service\").setHandler(res -> {\n\t if (res.succeeded()) {\n\t List<JsonObject> retrievedServices = res.result().getRows();\n\n\t \n\t \n\t for (JsonObject service: retrievedServices) {\n\t...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
"Supports anonymous blocks" flag.
boolean supportsAnonymousBlocks();
[ "boolean supportsParamsInAnonymousBlocks();", "private IgnoreBlock()\n {\n }", "public boolean isAnonymous();", "boolean isAnonymous();", "BAnyBlock createBAnyBlock();", "protected boolean inSomeBlock() {\n return !enclosingBlocks.isEmpty();\n }", "public void dirtyblock(int block) {}", "pub...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Modifies this collection so that it contains only the elements where collectionFilter.filter() returns true. All other elements are omitted.
public BCollection inplaceFilter(BCollectionFilter collectionFilter);
[ "public BCollection filter(BCollectionFilter collectionFilter);", "public void filter() {\n for (int i = 0; i < list.size(); i++) {\n filterElement(i);\n }\n }", "public Predicate<CollectionId> collectionFilter() {\n return collectionFilter;\n }", "public void filter()\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__DeclareNode__Group__0" $ANTLR start "rule__DeclareNode__Group__0__Impl" InternalAst.g:2446:1: rule__DeclareNode__Group__0__Impl : ( ( ( rule__DeclareNode__NamesAssignment_0 ) ) ( ( rule__DeclareNode__NamesAssignment_0 ) ) ) ;
public final void rule__DeclareNode__Group__0__Impl() throws RecognitionException { int stackSize = keepStackSize(); try { // InternalAst.g:2450:1: ( ( ( ( rule__DeclareNode__NamesAssignment_0 ) ) ( ( rule__DeclareNode__NamesAssignment_0 )* ) ) ) // InternalAst.g:245...
[ "public final void rule__DeclareNode__Group__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalAst.g:2438:1: ( rule__DeclareNode__Group__0__Impl rule__DeclareNode__Group__1 )\n // InternalAst.g:2439:2: rule__DeclareNode__G...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returned expression results in True if expression is a string, otherwise returns MISSING, NULL or false.
public static Expression isString(String expression) { return isString(x(expression)); }
[ "public boolean isExpression(String expression);", "public static Expression isString(Expression expression) {\n return x(\"ISSTRING(\" + expression.toString() + \")\");\n }", "boolean hasValue(String expression);", "static boolean isStringLiteral(final Expr expr)\n {\n return (expr.isLiteral() ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Projects the source elements into a nonoverlapping consecutive windows. The first window opens immediately, The current window is closed when the boundary observable sequence has sent a value. The finish of the boundary will finish both inner and outer observables. Exception semantics: exception thrown by the source or...
public static <T, U> Observable<Observable<T>> window( @Nonnull final Observable<? extends T> source, @Nonnull final Observable<U> boundary ) { return new Windowing.WithBoundary<T, U>(source, boundary); }
[ "public static Iterator getWindows() { return windowList.iterator(); }", "public BlazeWindow groupsBetween(Expression<Integer> start, BlazeWindowFrameKind startKind, Expression<Integer> end, BlazeWindowFrameKind endKind);", "private Set<W> getReadyWindows() {\n Set<W> readyWindows = new HashSet<>();\n\n f...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns all the solicitud requerimientos where estado = &63;.
public java.util.List<com.rec.hitss.layer.model.SolicitudRequerimiento> findByEstado( long estado) throws com.liferay.portal.kernel.exception.SystemException;
[ "public List<Solicitud> obtenerSolicitudesPorEstado(String estado);", "public List< Estudiante > ReadByState( int estado ){\n List< Estudiante > estudiantes = new ArrayList<>();\n MySqlConnection connection = new MySqlConnection();\n connection.StartConnection();\n\n try {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__RTCTL__Group_10__1__Impl" $ANTLR start "rule__RTCTL__Group_10__2" InternalDsl.g:18308:1: rule__RTCTL__Group_10__2 : rule__RTCTL__Group_10__2__Impl rule__RTCTL__Group_10__3 ;
public final void rule__RTCTL__Group_10__2() throws RecognitionException { int stackSize = keepStackSize(); try { // InternalDsl.g:18312:1: ( rule__RTCTL__Group_10__2__Impl rule__RTCTL__Group_10__3 ) // InternalDsl.g:18313:2: rule__RTCTL__Group_10__2__Impl rule__RTCT...
[ "public final void rule__RTCTL__Group_2__2() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalDsl.g:17718:1: ( rule__RTCTL__Group_2__2__Impl )\n // InternalDsl.g:17719:2: rule__RTCTL__Group_2__2__Impl\n {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the geodesic control panel.
public JPanelGeodesic getGeodesicPanel() { return geodesicPanel; }
[ "public JPanel getPanel() {\n return positionMapPanel;\n }", "public FunctionGraphsJPanel getGraphPanel() {\n\t\treturn GP;\n\t}", "public JMapPanel getMapPanel() {\n return mapPanel;\n }", "public ControlPanel getControlPanel()\n\t{\n\t\treturn cPanel;\n\t}", "public ControlPanelSimple get...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Transfers credit balance from first selection card to second selection card
public void TransferCreditBalance(Card a, Card b) { try { System.out.println("How many credits would you like to transfer?"); try { int creditTransfer = sc.nextInt(); int aCreditBalance = a.getCreditBalance(); int bCreditBalance = b.ge...
[ "public void transfer(int sourceAccount, int destinationAccount, double amount);", "public void transfer(BankAccount other, double amount) {\n if (balance < 5 || amount <= 0 || other == null)\n return;\n\n balance -= 5;\n other.balance += Math.min(amount, balance);\n balance = Math.max(balance - ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
public constructor to create a DrawStaff object sets up paint and also gets the size of the current display
public DrawStaff(final Context context, int currentDifficulty) { super(context); currentLives = 4; lives = new Drawable[currentLives - 1]; currentScore = 0; nextToPlay = new LinkedList<>(); noteClicked = false; this.currentDifficulty = currentDifficulty; ...
[ "Drawing() { \r\n this(40, 40);\r\n }", "private void setUpPaint() {\n mPaint = new Paint();\n // Set the paint's style, used for controlling how primitives's geometries are interpreted.\n mPaint.setStyle(Paint.Style.FILL);\n // Set the paint's color.\n mPaint.setCo...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method returns the possible moves for a certain position of the maze3d
List<Position> getPossibleMovesPositions(Position pos);
[ "@Override\n public Map<Direction, List<Coordinate>> getPossibleMoves() {\n\n Map<Direction, List<Coordinate>> moves = new HashMap<>();\n\n Coordinate coordinate = this.getCoordinate();\n int row = coordinate.getRow();\n int col = coordinate.getCol();\n\n //Jumps\n List<...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the value of the partKey property.
public void setPartKey(long value) { this.partKey = value; }
[ "public void setPart(final int aIndex, final String aKeyPart);", "public void setPartitionNumber(int part) {\n\tpartitionNumber = part;\n }", "public long getPartKey() {\n\t\treturn partKey;\n\t}", "public void setPartProducedKey(long value) {\n\t\tthis.partProducedKey = value;\n\t}", "public void setPar...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
returns a DataSet provided by a WPVS with the given name
public Dataset findDataset( String name ) { if ( name == null ) return null; if ( dataset.getName() != null && name.equals( dataset.getName() ) ) { return dataset; } return findDataset( name, dataset.getDatasets() ); }
[ "public DataSet getData(String name) \n\t{\n\t\treturn getData(getDataIndex(name));\n\t}", "public String getDataSetName();", "DataSet getDataSet(String id);", "public Dataset getDataset(String name) throws CKANException {\n\t\tString returned_json = this._connection.Post(\"/api/action/package_show\", \"{\\\"...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
The method that tests three words that start with a vowel, then consonant, then vowel
@Test public void testVowelConsonantVowel() { //this will test a consonant word, followed by a vowel word assertEquals("iway ebay awesomeway", EnglishToPigLatin.toPigLatin("i be awesome")); }
[ "@Test public void test2WordsConsonantVowel()\n {\n\t//this will test a consonant word, followed by a vowel word\n\tassertEquals(\"oldcay iceway\", EnglishToPigLatin.toPigLatin(\"cold ice\"));\n }", "@Test public void test2WordsVowelConsonant()\n {\n\t//this will test a consonant word, followed by a vowe...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Request permissions from the user. NB: the permissions requested here must match the "dangerous permissions" requested in the Manifest. If permissions are not requested in the manifest then the system will not prompt for them. Run adb shell pm list permissions d g to get a list of the permissions considered dangerous O...
public void requestPermissionsIfNeeded() { ArrayList<String> requiredPermissions = new ArrayList<String>(); checkIfPermissionGranted(requiredPermissions, Manifest.permission.WRITE_EXTERNAL_STORAGE); checkIfPermissionGranted(requiredPermissions, Manifest.permission.CAMERA); if(requiredPe...
[ "private void requestPermissions() {\n if (checkSelfPermission(REQUESTED_PERMISSIONS[0], PERMISSION_REQ_ID) &&\n checkSelfPermission(REQUESTED_PERMISSIONS[1], PERMISSION_REQ_ID) &&\n checkSelfPermission(REQUESTED_PERMISSIONS[2], PERMISSION_REQ_ID)) {\n Log.e(TAG, \"re...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method sets the value of the database column production_statement.fabric
public void setFabric(String fabric) { this.fabric = fabric; }
[ "public String getFabric() {\n return fabric;\n }", "public void setFabricId(String fabricId) {\n this.fabricId = fabricId;\n }", "public void setProduction(boolean production) {\n this.production = production;\n }", "public void setDESIGN(BigDecimal DESIGN) {\r\n this.DES...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
A user who is authenticated as an polyglot must be able to manage the LanguageExchange. Managing implies creating, modifying, or deleting them. POSITIVE TEST CASE: An polyglot can edit a languageExchange
@Transactional @Test public void testEditLanguageExchange() { authentificate("polyglot1"); Polyglot pol=polyglotService.findByUserAccountUsername("polyglot1"); LanguageExchange langExch=null; Collection <LanguageExchange> languageExchanges = languageExchangeService.findAllPolyglotLogin(pol.getId()); for...
[ "@Transactional\n\t@Test(expected = IllegalArgumentException.class)\n\tpublic void testCreateLanguageExchangeNotAutehntificated() {\n\t\tdesauthentificate();\n\t\n\t\tPolyglot pol=polyglotService.findByUserAccountUsername(\"polyglot1\");\n\t\tLanguageExchange langExch=null;\n\t\tCollection <LanguageExchange> langua...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Porque estamos sacando a los soldados que esten por debajo de staminaCritica
public boolean combatir() { Soldado defensorSoldado; Soldado atacanteSoldado; while (hayaSoldados()) { defensorSoldado = defensor.getSoldado(); atacanteSoldado = atacante.getSoldado(); Refriega refriega = new Refriega(defensorSoldado, atacanteSoldado); refriega.lucha(); defensor.tratarSoldad...
[ "public void haySugerenciaNueva() {\n List<Atuendo> sugerencias = guardarropasPropios.stream().map(guardarropa -> ((AsesorImagen) ServiceLocator.getInstance()\r\n .get(AsesorImagen.class)).sugerirAtuendo(guardarropa, \"Buenos Aires\")).collect(Collectors.toList());\r\n\r\n sugerenciasAtuendos.clear();\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
construct a new NotEmptyException with a given message.
public NotEmptyException(String msg) { super(msg); }
[ "public NotEmptyException() {\n \tsuper(\"Object was occupied.\");\n }", "public EmptyQueueException(String message) {\n super(message);\n }", "public WAFNonEmptyEntityException(String message) {\n super(message);\n }", "public EmptyQueueException (String message)\n {\n sup...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ varish This method is used to insert values to studentordernumber table used to generate order number
public boolean insertStudentOrderNumber(SchoolBean sb) { int schid = getSchoolId(sb.getShortCode()); String sql = "insert into studentordernumber (schsname,yr,seqno,schid) values (?,?,?,?)"; GetConnection gc = new GetConnection(); try { gc.ps1 = GetConnection.getMySQLConnect...
[ "int insertGenDetail(Integer uid, Integer merid, Double paymoney, Double sendmoney, Double tomoney, Double balance, Double topupbalance, Double givebalance, String ordernum, Date createTime, Integer paysource, String remark);", "@Insert({\n \"insert into SALEORDERDETAIL (SOID, LINENO, \",\n \"MID, M...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates new form BuscarYDetalles
public BuscarYDetalles() { initComponents(); item(); }
[ "public creacionempresa() {\n initComponents();\n mostrardatos();\n }", "public DetalleFormBean() {\r\n unDetalle = new Detalle();\r\n listadoDetalles= new ArrayList<>();\r\n listadoDetalleCompra = new ArrayList<>();\r\n usuario= new Usuario();\r\n modoPago = n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Finds out bonds in current mapping that have been mapped Append any bonds that are not in the mapping to the hyperstructure. For all bonds in the query, if the bond is not in the mapping then add it to the hyperstructure. To find a bond in the hyperstructure from the query, get the 2 atoms from the bond, put into the a...
public IQueryAtomContainer createHyperstructure( Map<IAtom, IAtom> mapping ) { /* * Construct a hash which translates the "old" index from the chromosome to the newly assigned * index in the hyperstructure, for an unmapped atom that's been added to the hyperstructure */ Map<IBond, IBond> mappedBond...
[ "private void addMapping(CommsObject co, boolean received) {\n\t\t\n\t\t// Now handle the mapping that was exchanged in the message\n\t\tCandidateAlignment localAlignment = null;\n\t\tif (received) {\n\t\t\tlocalAlignment = opponentsAlignment;\n\t\t} else {\n\t\t\tlocalAlignment = myAlignment;\n\t\t}\n\t\t\t\t\n\t\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method sets the value of the database column cabinet_info.alarm_value_two
public void setAlarmValueTwo(Integer alarmValueTwo) { this.alarmValueTwo = alarmValueTwo; }
[ "public Integer getAlarmValueTwo() {\n return alarmValueTwo;\n }", "public void setAlarmValueOne(Integer alarmValueOne) {\n this.alarmValueOne = alarmValueOne;\n }", "public void setValueTwo(Integer valueTwo) {\n this.valueTwo = valueTwo;\n }", "public void setUserValue2(java.lan...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Create a writer builder for TransportProgressStatus.
@Nonnull public static UBL23WriterBuilder <TransportProgressStatusType> transportProgressStatus () { return UBL23WriterBuilder.create (TransportProgressStatusType.class); }
[ "@Nonnull\n public static UBL23WriterBuilder <TransportProgressStatusRequestType> transportProgressStatusRequest ()\n {\n return UBL23WriterBuilder.create (TransportProgressStatusRequestType.class);\n }", "@Nonnull public static UBL23ReaderBuilder<TransportProgressStatusType> transportProgressStatus(){retur...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set the email property from a Contact instance.
public Contact email(final String email) { this.email = email; return this; }
[ "public void setContactEmail(String contactEmail) {\r\n this.contactEmail = contactEmail;\r\n }", "public void setEmail(String value) {\r\n email = value;\r\n }", "public void setContactEmail(String contactEmail) {\n this.contactEmail = contactEmail;\n }", "public void setEmail(S...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Runner method. Creates User interface menu to choose encrypted file from local storage or URL. Creates Workers to process the file and decrypt the text contained. User interruption listener thread listen to users RETURN key to stop workers, display the best resutl and save the decrypted text to file user specified.
public static void main(String[] args) { boolean dev = false; int sampleSize = 300; int transitions = 100000; int temp = 11; int numOfWorkers = 3; String sample = ""; ArrayBlockingQueue<String> servLog = new ArrayBlockingQueue<>(numOfWorkers); char[] block...
[ "public DecryptAndRun() {\n initComponents();\n addWindowListener(new WindowAdapter() {\n\n public void windowClosing(WindowEvent we) {\n File decyptDir = new File(\"D:\\\\demo\\\\Decypt\");\n DirDel.Del(decyptDir);\n System.exit(0);\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
required .nhl.containing.networking.protobuf.SimulationItem.SimulationItemType type = 2;
public nhl.containing.networking.protobuf.SimulationItemProto.SimulationItem.SimulationItemType getType() { return type_; }
[ "nhl.containing.networking.protobuf.SimulationItemProto.SimulationItem.SimulationItemType getType();", "public nhl.containing.networking.protobuf.SimulationItemProto.SimulationItem.SimulationItemType getType() {\n return type_;\n }", "com.protobuftest.protobuf.GameProbuf.Game.MsgType getType();", "com...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gives the wsdl:service/wsdl:port default name computed from the endpoint implementaiton class
public static @NotNull QName getDefaultPortName(@NotNull QName serviceName, Class endpointClass) { return getDefaultPortName(serviceName, endpointClass, null); }
[ "Endpoint getDefaultEndpoint();", "public static @NotNull QName getDefaultServiceName(Class endpointClass){\n return getDefaultServiceName(endpointClass, true, null);\n }", "public String getDefaultEndpoint() {\n return getEndpoint(SERVERS.PORT_0);\n }", "void setDefaultEndpoint(Endpoint d...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
UPDATE updateMonthlyPass() PUT update an existing monthlypass
@RequestMapping(value = "/monthlypasses", method = RequestMethod.PUT) public void updateMonthlyPass(@RequestBody MonthlyPass monthlyPass) { monthPathService.updateMonthlyPassById(monthlyPass); }
[ "@RequestMapping(value = \"/monthlypasses\", method = RequestMethod.POST)\n\tpublic void addMonthlyPass(@RequestBody MonthlyPass monthlyPass) {\n\t\tmonthPathService.addMonthlyPass(monthlyPass);\n\t}", "public void updatePassword(Customer customer);", "public void updatePassword(String externalId, String passwo...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Setter method for the COM property "SmallGrid"
@VTID(103) void setSmallGrid( boolean rhs);
[ "@VTID(102)\r\n boolean getSmallGrid();", "public void setGrid(Grid grid)\r\n \t{\r\n \t\tthis.grid = grid;\r\n \t}", "public void setGrid(boolean value) {\n\t\tgrid = value;\n\t}", "public void setNumberOfXGridLines(int xGrid) {xGridLines = xGrid;}", "public void setQualityGrid( QualityGridBO pQuality...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Computes the ratio of the length of the spline from the ith key frame to the position specified by u to the length of the entire spline segment from the ith key frame to the (i+1) th key frame. When the (i+1)th key frame's linear value is equal to 1, this is meaninful otherwise it should return u.
public float getInterpolatedValue (float u) { return (computeLength(u)/this.length); }
[ "public float getInterpolatedPitch (float u) {\r\n\r\n float newPitch;\r\n \r\n // if linear interpolation\r\n if (this.linear == 1) {\r\n\r\n newPitch = keyFrame[1].pitch + \r\n ((keyFrame[2].pitch - keyFrame[1].pitch) * u);\r\n } else {\r\n\r\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Double memorycache 's size to increase number of bitmap being kept in memory. Call this method before creating any instance.
public static void doubleCacheSize() { if (sBitmapCache != null) { throw new RuntimeException("doubleCacheSize() must be called before first instance of this class being created"); } sDoubleCacheSize = true; }
[ "@Override\n public int getCacheSize() {\n return 4 * 1024 * 1024;\n }", "private void init() {\n mMemoryCache = new LruCache<String, Bitmap>(DEFAULT_MEM_CACHE_SIZE) {\n /**\n * Measure item size in kilobytes rather than units which is more\n * practical for a bitmap...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
GENLAST:event_clearJMenuItemActionPerformed Event handler: printJMenuItemActionPerformed
private void printJMenuItemActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_printJMenuItemActionPerformed // TODO add your handling code here: PrintUtilities.printComponent(this); }
[ "private void printFormJMenuItemActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_printFormJMenuItemActionPerformed\n //Credit to: Marty Hall\n //print form as GUI image\n PrintUtilities.printComponent(this);\n }", "private void clearJMenuItemActionPerformed(java.awt.event...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method returns a reply containing the message sent by the source. It sets sourceIPAddress to the incoming address of the source that sent the message This ipAddress is not sent by the source through the parameter but through the message that goes on the network line. This method is particularly designed for the em...
public String receiveRequest (String[] sourceIPAddress) { ServerSocket me; Socket connection; DataInputStream input; DataOutputStream output; String message = new String (Constants.NULL_STR); try { me = new ServerSocket (Constants.LOCAL_PORT, 100)...
[ "byte[] getReplyAddress();", "ReplyMessage createReplyMessage();", "public String recvMessage() throws IOException {\n\t\n String fromServer = null;\n fromServer = inFromServer.readLine();\n String recvMsg = fromServer;\n \n return recvMsg;\n }", "public String getReplyString()\n {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates new form ParticipantPage
public ParticipantPage(RegistrationManager rm) { this.rm = rm; initComponents(); }
[ "Participants createParticipants();", "public void transitionToNewParticipantPage(){\n removeAll();\n newParticipantPanel = new NewParticipantPanel(contr);\n add(newParticipantPanel, \"span 1\");\n }", "Participant createParticipant();", "public void onAddParticipant() {\n Parti...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the auth token being used by this client.
String getAuthToken() { return (authToken.get()); }
[ "public String authToken() {\n return authToken;\n }", "public String authToken() {\n return this.authToken;\n }", "public String getClientToken() {\n return (String) get(\"client_token\");\n }", "public OAuthTokenResponse getToken() {\n return token;\n }", "private String ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the ridesharing cost.
public void setRidesharingCost(double ridesharingCost) { this.ridesharingCost = ridesharingCost; }
[ "void setCost(double cost);", "@Override\n public void setRoyalty_cost(double royalty_cost) {\n _parts.setRoyalty_cost(royalty_cost);\n }", "double setCost(double cost);", "public void setRoyalty_cost(double royalty_cost);", "public void setCost(double cost)\n\t{\n\t\tthis.cost=cost;\t\n\t}", ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "RULE_SKW_OR" $ANTLR start "RULE_SKW_OROR"
public final void mRULE_SKW_OROR() throws RecognitionException { try { int _type = RULE_SKW_OROR; int _channel = DEFAULT_TOKEN_CHANNEL; // InternalParser.g:29944:15: ( RULE_SKW_OR RULE_SKW_OR ) // InternalParser.g:29944:17: RULE_SKW_OR RULE_SKW_OR { ...
[ "public final void mRULE_SKW_OR() throws RecognitionException {\n try {\n int _type = RULE_SKW_OR;\n int _channel = DEFAULT_TOKEN_CHANNEL;\n // InternalParser.g:29942:13: ( '|' )\n // InternalParser.g:29942:15: '|'\n {\n match('|'); \n\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Converts an APHEntry to a visit list (Commons version)
private List<APDVisit> aphEntryToVisitsMarkII(List<APHEntry> entries, Map<String, APDevice> apdCache, Map<String, APDAssignation> assignmentsCache, List<String> blackListMacs, List<String> employeeListMacs, TimeZone tz, String date) throws ASException { // Validates entries if( CollectionUtils.isEmpty(entrie...
[ "void visit(Entry entry);", "List<? extends BareAnnotationEntry> getEntries();", "@Override\n\tpublic List<APDVisit> aphEntryToVisits(List<APHEntry> entries, Map<String, APDevice> apdCache,\n\t\t\tMap<String, APDAssignation> assignmentsCache, List<String> blackListMacs,\n\t\t\tList<String> employeeListMacs, Tim...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
The list of contact people for the entry. repeated .google.cloud.datacatalog.v1.Contacts.Person people = 1;
@java.lang.Override public java.util.List<? extends com.google.cloud.datacatalog.v1.Contacts.PersonOrBuilder> getPeopleOrBuilderList() { return people_; }
[ "@java.lang.Override\n public java.util.List<com.google.cloud.datacatalog.v1.Contacts.Person> getPeopleList() {\n return people_;\n }", "public java.util.List<com.google.cloud.datacatalog.v1.Contacts.Person> getPeopleList() {\n if (peopleBuilder_ == null) {\n return java.util.Collections.unmodifi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Display next player on team
public void nextPlayer(View v) { playerNum++; currentPlayer = data.playerNum(playerNum, getSelectedteam()); if(currentPlayer == null) { currentPlayer = data.playerNum(0,getSelectedteam()); playerNum=0; if(currentPlayer == null) { return; ...
[ "public void next() {\r\n\t\tArrayList<Team> teams = world.getTeams();\r\n\t\tif (teams.size() == currentIndex + 1) {\r\n\t\t\tJOptionPane.showMessageDialog(this, \"There are no more teams\", \"Next team\",\r\n\t\t\t JOptionPane.ERROR_MESSAGE);\r\n\t\t} else {\r\n\t\t\tcurrentIndex++;\r...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ Name: testYts_798 Notes: in of singlerow select! FB SQL is slightly different here we don't like the AS in the select clause.
public void testYts_798() throws SQLException { // TEST:7559 <scalar subquery> in <select list> of single-row select! String dialect = System.getProperty("DB_DIALECT", "FirebirdSQL"); String query; stmt.executeUpdate("CREATE TABLE TV (A INTEGER, B CHAR);"); stmt.executeUpdate("CREATE TABLE TW (D CHAR, E INTE...
[ "SELECT createSELECT();", "public void testYts_764() throws SQLException {\n\t\tString dialect = System.getProperty(\"DB_DIALECT\", \"FirebirdSQL\");\n\n\t\t// TEST:7519 <query expression> with UNION ALL CORRESPONDING BY!\n\n\t\ttry {\n\t\t\tstmt.executeUpdate(\"DROP TABLE ET\");\n\t\t} catch (SQLException sqle) ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }