__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/29290050
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeQuestionChoice(QuestionChoiceCMPData data) throws EJBException { try { QuestionChoiceCMPLocal questionChoiceLocal = getQuestionChoiceCMPLocalHome() .findByPrimaryKey(data.getChoice_id()); questionChoiceLocal.remove(); } catch (FinderException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (RemoveException e) { // TODO Auto-generated catch block e.printStackTrace(); } } COM: <s> remove question choice busines method </s>
funcom_train/18874514
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JRadioButton getSourceButton() { if (sourceButton == null) { sourceButton = new JRadioButton(); sourceButton.setText("Half Life 2 (Source)"); sourceButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { portField.setText("27015"); } }); } return sourceButton; } COM: <s> this method initializes source button </s>
funcom_train/4717570
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testRelPitch() { SynMessage msg = new SYN().synth(1).voice(1).pitch(-10).relative(); assertEquals("TTi", msg.getTypetag()); assertEquals(new Integer(-655360), msg.getArguments()[2]); assertEquals("/SYN/ID1/V1/PITCH", msg.getAddress()); } COM: <s> voice pitch in hz relative </s>
funcom_train/21263702
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void save(Ambitos entity) { EntityManagerHelper.log("saving Ambitos instance", Level.INFO, null); try { getEntityManager().persist(entity); EntityManagerHelper.log("save successful", Level.INFO, null); } catch (RuntimeException re) { EntityManagerHelper.log("save failed", Level.SEVERE, re); throw re; } } COM: <s> perform an initial save of a previously unsaved ambitos entity </s>
funcom_train/14025431
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private class Subtract2FromState extends UndoableCommand { public String getDescription() { return(CMD_SUBTRACT2); } public String getName() { return(CMD_SUBTRACT2); } public Command createRepeat() { return(new Subtract2FromState()); } public boolean isRepeatable() { return(true); } protected void doWork() { setState(_state - 2); } } COM: <s> demo command undoable </s>
funcom_train/26233435
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Group ensure(String name) { Group group = (Group)getNameColumn().firstWhereEq(name); if (group != null) return group; else { group = (Group) newPersistent(); group.setName(name); return (Group)getNameColumn().ensure(group); } } COM: <s> make sure that a record exists </s>
funcom_train/18551553
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setUpResultsPanel() { gResultsPanel = new JPanel(); // Hack shaneo gResultsPanel.setPreferredSize(new Dimension(200, 200)); // //Here we will add our JTree; // axisResultsTree = new AXISResultsTree(); // resultsPanel.setLayout(new BorderLayout()); // resultsPanel.add(BorderLayout.CENTER, axisResultsTree); gResultsPanel.setBorder(BorderFactory.createTitledBorder("Results")); } COM: <s> this method sets up the results panel to the left of the frame </s>
funcom_train/12837212
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeValue(SessionID sessionID, SessionKey key) throws SessionException { // No need to check for a return value. If the sessionID is null or if the session // does not exist, a SessionException will be thrown. BaseSession session = getSession(sessionID); session.removeValue(key); } COM: <s> a convenience method that removes the key value from </s>
funcom_train/27720302
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object clone() { try { User cloned = (User)super.clone(); cloned.transportUniqueName = this.transportUniqueName; cloned.suggestedNick = this.suggestedNick; cloned.transportName = this.transportName; cloned.status = this.status; cloned.uniqueNumber = this.uniqueNumber; return cloned; } catch (CloneNotSupportedException e) {} // Should never happen return null; } COM: <s> clones the object </s>
funcom_train/20365121
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void assertChildPanel(SkillData namedSkill) throws ComponentNotFoundException, MultipleComponentsFoundException { assertNotNull( namedSkill ); findChildListPanel(); assertTrue( childSkillsPanel.isShowing() ); assertEquals(namedSkill.getName(), childSkillsPanel.getSkillData().getName() ); for ( String childSkillName : namedSkill.getChildren() ) { ValuePanel vpanel = getChildSkillValuePanel(childSkillName); assertNotNull( vpanel ); } } COM: <s> assert that the child skills panel is both showing </s>
funcom_train/46789970
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public PDPage getPage(PDDocument doc) { COSArray definition = cosGetArray(); COSObject page = definition.get(0); if (page.asNumber() != null) { int pageIndex = page.asNumber().intValue(); return doc.getPageTree().getPageAt(pageIndex); } if (page.asDictionary() != null) { return (PDPage) PDPageNode.META.createFromCos(page.asDictionary()); } return null; } COM: <s> the destination page </s>
funcom_train/8608248
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void changePermissions(Legion legion, int lP2, int cP1, int cP2) { if (legion.setLegionPermissions(lP2, cP1, cP2)) { PacketSendUtility.broadcastPacketToLegion(legion, new SM_LEGION_EDIT(0x02, legion)); } } COM: <s> this method will handle the changement of permissions </s>
funcom_train/25282874
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void btnOkAction() { try { /** * this piece of code will be executed in case of 1 or 2: 1. we * haven't chosen JMyron 2. we have chosen JMyron, but haven't set * it's advanced settings */ unloadAndLoadLibProcedures(); show(false); } catch (final NumberFormatException e1) { System.out.print("Error in user input ... aborting !\n"); } } COM: <s> unloads then loads the video library </s>
funcom_train/31900947
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void paintBorder(Component c, Graphics g, int x, int y, int width, int height) { switch (bevelType) { case RAISED: paintRaisedBevel(c, g, x, y, width, height); break; case LOWERED: paintLoweredBevel(c, g, x, y, width, height); break; } } COM: <s> paints the border for the specified component with the specified </s>
funcom_train/4695335
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setEndpointAddress(java.lang.String portName, java.lang.String address) throws javax.xml.rpc.ServiceException { if ("RallyService".equals(portName)) { setRallyServiceEndpointAddress(address); } else { // Unknown Port Name throw new javax.xml.rpc.ServiceException(" Cannot set Endpoint Address for Unknown Port" + portName); } } COM: <s> set the endpoint address for the specified port name </s>
funcom_train/13312987
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testHashCode() { // Repeatition constraint. assertEquals(char1.hashCode(), char1.hashCode()); // Equal objects, equal hashcodes constraint. assertEquals(char1.hashCode(), char1Copy.hashCode()); // Test non-mutation. assertEquals(char1, char1Copy); } COM: <s> test method for dcharacter </s>
funcom_train/13275643
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void modifyPageSetup() { HomePrint oldHomePrint = this.home.getPrint(); HomePrint homePrint = getPrint(); this.home.setPrint(homePrint); UndoableEdit undoableEdit = new HomePrintModificationUndoableEdit( this.home, this.preferences,oldHomePrint, homePrint); this.undoSupport.postEdit(undoableEdit); } COM: <s> controls the modification of home print attributes </s>
funcom_train/7531378
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isLocalHost(PGridHost host) { if (host.equals(getLocalHost())) { return true; } if (((host.getIP().getCanonicalHostName().equals(getLocalPeer().getIP().getCanonicalHostName()))) && (host.getPort() == getLocalHost().getPort())) { return true; } return false; } COM: <s> checks if the given host is the local host </s>
funcom_train/803536
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getPropertyByAccountType(String accountTypeName, String propertyName) { for ( Account a : loggedInSuperUser.getAccounts().values() ) { if( accountTypeName.equals( a.getAccountType().getName() ) ) { return getProperty(a.getAccountId(), propertyName); } } throw new IllegalArgumentException("There is no such account type"); } COM: <s> returns a property by name of an account of an account type </s>
funcom_train/34501830
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSave() { Session s = new Session(); s.setName("Test"); s.setPage("testPage.jsp"); s.setComment("Test Comment"); SessionDao sd = (SessionDao)ctx.getBean("sessionDao"); sd.save(s); SubSession ss = new SubSession(); ss.setName("Test"); ss.setPage("testPage.jsp"); ss.setComment("test comment"); ss.setIdSession(s); ssd.save(ss); assertNotNull(s); } COM: <s> test save method testing fk </s>
funcom_train/19846005
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void getClosestPoint(Vector2f point, Vector2f result) { loc.set(point); loc.sub(start); float projDistance = vec.dot(loc); projDistance /= vec.lengthSquared(); if (projDistance < 0) { result.set(start); return; } if (projDistance > 1) { result.set(end); return; } result.x = start.getX() + projDistance * vec.getX(); result.y = start.getY() + projDistance * vec.getY(); } COM: <s> get the closest point on the line to a given point </s>
funcom_train/25382491
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setExecutionTime(AbstractJobTask jobTask, int executionTime) throws UniversalWorkerException { if (Util.isSet(jobTask) && executionTime >= 0) { this.tasksMap.get(jobTask.getJobTaskId()).setExecutionDuration(executionTime); } else { throw new UniversalWorkerException(Status.CLIENT_ERROR_NOT_FOUND, "The job does not exist."); } } COM: <s> set the execution time </s>
funcom_train/18032183
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int getYear() { Object userObject = null; switch (m_type) { case YEAR: userObject = getUserObject(); break; case MONTH: userObject = ((CalendarTreeNode)getParent()).getUserObject(); break; case DAY: userObject = ((CalendarTreeNode)getParent().getParent()).getUserObject(); break; default: return -1; } return ((Long)userObject).intValue(); } COM: <s> returns the year this node belongs to </s>
funcom_train/4439935
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void add(Widget w, String styleClass) { // create a DOM element <li> Element item = DOM.createElement("li"); // style the <li> DOM.setElementAttribute(item, "class", styleClass); // wrap the Widget w into the <li> Element DOM.appendChild(item, w.getElement()); // wrap the <li> Element into the UnorderedList DOM.appendChild(this.list, item); // let ComplexPanel save this widget in a WidgetCollection super.add(w, item); } COM: <s> adds a widget to the list as a new list item li </s>
funcom_train/21018797
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean remove(T element) { boolean result = false; Rectangle2D boundingBox = _geometryProvider.getBoundingBox(element); int index = getTargetNodeIndex(boundingBox); if (index != -1) { Node node = _subNodes[index]; if (node != null) { result = node.remove(element); if (node.isEmpty()) { _subNodes[index] = null; } } } else { if (_elements != null) { result = _elements.remove(element); if (_elements.isEmpty()) { _elements = null; } } } return result; } COM: <s> removes the given element from the node or a sub node </s>
funcom_train/241897
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void saveIdentifiers(String[] fields) throws SQLException { for (int i = 0; fields != null && i < fields.length; i++) { Matcher matcher = PATTERN.matcher(fields[i]); while (matcher.find()) { saveIdentifier(matcher.group(1)); } } } COM: <s> saves all the message identifiers in the given undecoded header </s>
funcom_train/31781677
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void actionPerformed(ActionEvent e) { try { windID = appsrv.getApplicationWindowID( app.getSelectedItem().toString() ); nameOfSharedApp = app.getSelectedItem().toString(); System.out.println("Selected a new Window!"); } catch (Exception e2) {} } COM: <s> processes a combo box selection change to pick a new window to share </s>
funcom_train/51000315
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: /* public void Person(String id) throws SQLException { PersonVO vo = new PersonVO(); String query = "SELECT * FROM person WHERE person_id = id "; Connection conn = getConnection(); PreparedStatement ps = conn.prepareStatement(query); ResultSet rs = ps.executeQuery(query); ps.close(); rs.close(); return vo; } COM: <s> search an existing person data </s>
funcom_train/32963763
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void marshalToDirectory( List<Application> applications, String directory ) throws IOException, JAXBException { for (Application application : applications ) { File of = new File( directory+ "/"+ application.getName()+EXTENSION); if (of.exists()) { String backupName = directory+ "/"+ application.getName()+EXTENSION+".bak"; File backupFile = new File(backupName ); of.renameTo(backupFile); } marshalToFile( application, of); } } COM: <s> marshal a list of application files to a directory </s>
funcom_train/38724258
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void init(String[] argv) { parseParameters(argv); if (parameters.containsKey("--config")) { net.sf.wwusmart.configuration.ConfigManager.init(parameters.get("--config")); } else { net.sf.wwusmart.configuration.ConfigManager.init(""); } } COM: <s> parses prompt parameters initializes the config manager </s>
funcom_train/29699028
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public HitData getTransferLocation(HitData hit) { // If any trooper lives, the unit isn't destroyed. for ( int loop = 1; loop < this.locations(); loop++ ) { if ( 0 < this.getInternal(loop) ) { return new HitData(Entity.LOC_NONE); } } // No surviving troopers, so we're toast. return new HitData(Entity.LOC_DESTROYED); } COM: <s> battle armor units dont transfer damage </s>
funcom_train/32057651
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetGraphLayoutCache() { System.out.println("testGetGraphLayoutCache"); GPGraphpad pad = new GPGraphpad(); GPGraph graph = new GPGraph(); GraphUndoManager undo = new GraphUndoManager(); GPDocument newDoc = new GPDocument(pad, "test", null, graph, null, undo); assertEquals("getGraphLayoutCache failed", newDoc.getGraphLayoutCache() != null, true); } COM: <s> test of get graph layout cache method of class gpdocument </s>
funcom_train/19968304
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void deallocatePage(int pageNumber, int memoryType) { BitMap bitMap = getBitMap(memoryType); // deallocate the page bitMap.clear(pageNumber); Debug.printf('x', "[MemoryManagement.deallocatePage] Deallocating page %d from %s\n", new Integer(pageNumber), (memoryType == MEMORY_TYPE_SWAP ? "Swapping Partition" : "Main Memory")); } COM: <s> deallocates a page </s>
funcom_train/5525724
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void pageDown (boolean repaint) { for (int i=0; i<PageSize; i++) { if (CursorLine.next()==null) break; CursorLine=CursorLine.next(); } CursorPos=0; if (repaint) { for (int i=0; i<PageSize; i++) { if (TopLine.next()==null) break; TopLine=TopLine.next(); } paintlines(); V.setVerticalScrollbar(); testCursor(); copy(); } } COM: <s> goes down a page adjusting the cursor position and the </s>
funcom_train/40793997
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getOkCommand5() { if (okCommand5 == null) {//GEN-END:|190-getter|0|190-preInit // write pre-init user code here okCommand5 = new Command("Ok", Command.OK, 0);//GEN-LINE:|190-getter|1|190-postInit // write post-init user code here }//GEN-BEGIN:|190-getter|2| return okCommand5; } COM: <s> returns an initiliazed instance of ok command5 component </s>
funcom_train/34620989
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void createInitialLayout(IPageLayout layout) { String editorArea = layout.getEditorArea(); layout.addView("org.deft.gui.view.project", IPageLayout.LEFT, 0.25f, editorArea); layout.addView("org.deft.guidance.views.TaskView", IPageLayout.BOTTOM, 0.75f, editorArea); } COM: <s> creates the initial layout </s>
funcom_train/35766828
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testExecutionFromList() throws Exception { ZosUploadMojo mojo = new ZosUploadMojo(); configureMojo(mojo, "zosjes-maven-plugin", getTestPom()); mojo.jclFileNames = new LinkedList < String >(); mojo.jclFileNames.add("LISTCAT"); mojo.execute(); } COM: <s> test that we are able to submit actual jobs when explicitly selected </s>
funcom_train/31010574
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void prepareAccountCustomerIdMap() { accountCustomerIdMap = new HashMap<Long, Long>(); long customerIdCounter = initialCustomerId; int accountIdCounter = 0; for (Integer acctCount : accountCount) { for (int i = 0; i < acctCount; i++) { // for all accounts of a // certain customer accountCustomerIdMap.put(accountId.get(accountIdCounter), customerIdCounter); accountIdCounter++; } customerIdCounter++; } } COM: <s> prepares a map that maps each account id to the valid customer id </s>
funcom_train/22210144
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addEntry(Object entry) { while (hasNext()) { stack.remove(stack.size() - 1); } // remove the oldest entries while(stack.size() >= maxsize && maxsize > 0){ stack.remove(0); } stack.add(entry); current = stack.size() - 1; } COM: <s> adds the entry after the current item </s>
funcom_train/21125098
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: /* private void saveStatement(Connection conn) throws SQLException { String repInsertStatement = "INSERT INTO Rep.Statements VALUES ('"+transaction.getTaId().toString()+"', '"+getInsertStatement(false)+"', '"+this.getStmtId().toString()+"')"; logger.info("repInsertStatement: "+repInsertStatement); Statement stmt = conn.createStatement(); stmt.executeUpdate(repInsertStatement); stmt.close(); } COM: <s> saves this statement to the database in the statement tables </s>
funcom_train/41163840
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public CoMatrixQuestion update(CoMatrixQuestion entity) { EntityManagerHelper.log("updating CoMatrixQuestion instance", Level.INFO, null); try { CoMatrixQuestion result = getEntityManager().merge(entity); EntityManagerHelper.log("update successful", Level.INFO, null); return result; } catch (RuntimeException re) { EntityManagerHelper.log("update failed", Level.SEVERE, re); throw re; } } COM: <s> persist a previously saved co matrix question entity and return it or a </s>
funcom_train/42061561
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void parseSensorID(Document d) throws SALDocumentException { try { sid = Integer.parseInt(XMLhelper.getAttributeFromName(XPATH_SENSOR_DESC, SMLConstants.SENSOR_ID_ATTRIBUTE_NODE, d)); } catch (Exception e) { logger.error("Cant find attr '"+SMLConstants.SENSOR_ID_ATTRIBUTE_NODE+"' in SMLdescriptor XML doc"); throw new SALDocumentException("Cant find the sensor ID", e); } } COM: <s> this method parses the given sml description document and extracts the sensor id </s>
funcom_train/39220604
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getBtnPlay() { if(btnPlay == null) { btnPlay = new JButton(); btnPlay.setIcon(new ImageIcon(Toolkit.getDefaultToolkit().getImage(Thread.currentThread().getContextClassLoader().getResource("images/media-playback-start.png")))); btnPlay.setText("Play"); btnPlay.setSize(110, 25); btnPlay.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { play(); } }); } return btnPlay; } COM: <s> return and create play button </s>
funcom_train/30225505
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void generate(IDataProvider dataProvider, ITypesFilter typeFilter) { Collection<IType> types = dataProvider.getTypes(typeFilter); Iterator<Pair<String, ITemplateHolder>> itTH = getTemplateHoldersMap().iterator(); while (itTH.hasNext()) itTH.next().getValue().generate(null, types); } COM: <s> generates output data using spceified data provider and types filter </s>
funcom_train/33943253
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public T getDatasetByCategoryAndName(String category, String name) { ArrayList<T> undeletedDatasets = getActiveDatasets(); for (T dataset : undeletedDatasets) { UniDataSet uds = (UniDataSet) dataset; if (uds.getStringValueByKey("category").equalsIgnoreCase(category) && uds.getStringValueByKey("name").equalsIgnoreCase(name)) { return (dataset); } } return null; } COM: <s> get the data sets with a specified category and name </s>
funcom_train/23280646
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addFundToProject(Project project, Contact contact, int classification, double amount, int fType, int typeofFund, String ispfId, String dateGrantedString) throws Exception { fundingDao.addFundToProject(project,contact, classification, amount, fType, typeofFund, ispfId, dateGrantedString); } COM: <s> adds the given fund to the given project </s>
funcom_train/32944538
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ArcHarvestResourceDTO buildDTO() { ArcHarvestResourceDTO dto = new ArcHarvestResourceDTO(); dto.setLength(this.getLength()); dto.setName(this.getName()); dto.setOid(this.getOid()); dto.setArcFileName(this.arcFileName); dto.setCompressed(this.compressed); dto.setResourceLength(this.resourceLength); dto.setResourceOffset(this.resourceOffset); dto.setStatusCode(this.statusCode); return dto; } COM: <s> builds an arc harvest resource dto from this object </s>
funcom_train/44392696
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void close() throws IOException { byte[] hash = digest.digest(); char[] hex = new char[2 * hash.length]; for (int i = 0; i < hash.length; i++) { hex[2 * i] = HEX[hash[i] / 16]; hex[2 * i + 1] = HEX[hash[i] % 16]; } contentHash = new String(hex); } COM: <s> calculates the hex encoded content hash of all the data written to </s>
funcom_train/3064156
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { int max = size() - 1; StringBuffer buf = new StringBuffer(); Iterator i = entrySet().iterator(); buf.append("{"); for (int j = 0; j <= max; j++) { Entry e = (Entry) (i.next()); buf.append(e.getKey() + "=" + e.getValue()); if (j < max) buf.append(", "); } buf.append("}"); return buf.toString(); } COM: <s> returns a string representation of this map </s>
funcom_train/8086589
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setKeys(String keys){ m_Keys = keys; m_orderBy.removeAllElements(); StringTokenizer st = new StringTokenizer(keys, ","); while (st.hasMoreTokens()) { String column = st.nextToken(); column = column.replaceAll(" ",""); m_orderBy.addElement(column); } } COM: <s> sets the key columns of a database table </s>
funcom_train/46189191
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TrackBack getTrackBack(long id) { Iterator it = getTrackBacks().iterator(); while (it.hasNext()) { TrackBack trackBack = (TrackBack)it.next(); if (trackBack.getId() == id) { return trackBack; } } return null; } COM: <s> gets the specified track back </s>
funcom_train/19825176
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void unregister() { synchronized (eventLock) { if(!Framework.UNREGISTERSERVICE_VALID_DURING_UNREGISTERING) { unregister_removeService(); } bundle.framework.listeners.serviceChanged(new ServiceEvent(ServiceEvent.UNREGISTERING, reference)); if(Framework.UNREGISTERSERVICE_VALID_DURING_UNREGISTERING) { unregister_removeService(); } } bundle.framework.perm.callUnregister0(this); synchronized (properties) { bundle = null; dependents = null; reference = null; service = null; serviceInstances = null; } } COM: <s> unregister the service </s>
funcom_train/32754237
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setValueAt( final Object value, final int row, final int column ) { final BpmAgent bpmAgent = getBpmAgent( row ); if ( bpmAgent == null ) return; switch( column ) { case ENABLE_COLUMN: final boolean enabled = ((Boolean)value).booleanValue(); bpmAgent.setEnabled( enabled ); ORBIT_MODEL.refreshEnabledBPMs(); break; default: break; } } COM: <s> set the value associated with the specified cell </s>
funcom_train/4008613
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void convertStringToVector() { messageVector = new Vector(); int start = 0; int index = message.indexOf(' '); while (index > 0) { messageVector.addElement(message.substring(start, index)); start = index + 1; index = message.indexOf(" ", index + 1); } messageVector.addElement(message.substring(start, message.length())); } COM: <s> converts the string into a vector of strings </s>
funcom_train/41489823
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Class resolveByElementName(Element element) { if (element == null) { throw new IllegalArgumentException("The element is null"); } try { return Class.forName(element.getName()); } catch (ClassNotFoundException ex) { logger.debug("Persistent class for {} not found on the classpath", element.getName()); } return null; } COM: <s> resolves the persistent class by the element name being a valid </s>
funcom_train/44287370
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Menu addCascadeMenu(final Menu parent, final String text) { Menu cascade = new Menu(parent.getShell(), SWT.DROP_DOWN); MenuItem cascadeMenuItem = new MenuItem(parent, SWT.CASCADE); cascadeMenuItem.setText(text); cascadeMenuItem.setMenu(cascade); return cascade; } COM: <s> adds a new cascade menu to the parent menu </s>
funcom_train/43827737
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addRefPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_RefPlace_ref_feature"), getString("_UI_PropertyDescriptor_description", "_UI_RefPlace_ref_feature", "_UI_RefPlace_type"), ModelPackage.Literals.REF_PLACE__REF, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the ref feature </s>
funcom_train/50273339
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void fetchDescriptor() { // download descriptor(s) String newDescriptor = downloadSingleDescriptor( nodesDigests.toString(), loadFrom, lowerDirConnectionNetLayer); if (newDescriptor != null) { resolved = true; } else { failed = true; descriptor = "error"; } } COM: <s> keep up to date with the directory informations </s>
funcom_train/14273705
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void writeDocument(BufferedWriter outputfile) throws java.io.IOException { for (int row = 0; row < document.size(); row++) { writeDataRow(outputfile, row); outputfile.write(System.getProperty("line.separator")); outputfile.flush(); } } // end-method COM: <s> write the current document to the given buffered writer stream </s>
funcom_train/23047426
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean validate(EObject obj) { Process proc = getProcess(obj); if (proc == null) return false; String impl = getImplementation(obj); if (impl == null || impl == "") return false; if (!JavaConventions.validatePackageName(impl, null, null).isOK()) return false; if (qualifiedRequired(proc) && !isQualified(impl)) return false; return true; } COM: <s> takes any object of following types process actor </s>
funcom_train/48926207
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void startConversion(){ ExchangeConversionManager convManager = ExchangeConversionManager.getInstance(); convManager.addNoMoreConversionsListener(this); // convManager.addExchangeConversionStartListener(this); // convManager.addExchangeConversionCompleteListener(this); ExchangeConversionFactory convFactory = ExchangeConversionFactory.getInstance(); convFactory.setCleaner(isCleaner); for(User user : getUsers()){ ExchangeConversion conv = convFactory.makeExchangeConversion(user); conv.setFinalRun(isFinal); convManager.addConversion(conv); } } COM: <s> starts the conversion manager and add the users defined at the command line </s>
funcom_train/41157682
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void registerVisit(int slideId, long dur) { visit.setVisitId(visitNbr); visitNbr++; visit.setDuration(dur); visit.setSlideId(slideId); visit.setTimestamp(System.currentTimeMillis() - this.time0); visitList.add(visit); visit = new Visit(); strokeList = visit.getStroke(); } COM: <s> registers a slide visit </s>
funcom_train/31702795
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void zoomBegin(int iX, int iY) { if (isZoomOngoing) { return; } isZoomOngoing = true; zoomRect.x = zoomStart.x = iX; zoomRect.y = zoomStart.y = iY; zoomRect.width = 1; zoomRect.height = 1; swingPane.setInteractedGraph(zoomStart.x, zoomStart.y); zoomMiddlePaint(null); } COM: <s> starts a zoom event </s>
funcom_train/1677529
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean validateHomeDir() { for (int i = 0; i < nEnvs; i++) { File f = new File(homeDirPrefix + i); if (f.isDirectory()) { continue; } else if (initOnly) { f.mkdirs(); } else { return false; } } return true; } COM: <s> precheck if database files exist before starting the run </s>
funcom_train/25524854
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void focusTextInput(char c) { if(getJtfInput().isEnabled()) { // Request focus. getJtfInput().requestFocusInWindow(); // If this is not a control character... if(!Character.isISOControl(c) && (c >= 32 && c <= 126)) { // Append the character that was typed. getJtfInput().setText(getJtfInput().getText() + c); } } } COM: <s> focus on the text input box </s>
funcom_train/21778174
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void createRaiseContentSpecItem( JMenuItem raiseContentSpecItem) { raiseContentSpecItem.addActionListener( new ActionListener() { public void actionPerformed( ActionEvent evt) { MDIInternalFrame contentSpecWindow = viewSet.getContentSpecWindow(); ViewGenerics.raiseFrame( contentSpecWindow); } }); } // end createRaiseContentSpecItem COM: <s> code create raise content spec item code partial plan background mouse right item </s>
funcom_train/34523689
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Expression append(Expression expression) { List<Expression> stmts = new ArrayList<Expression>(); add_to_list(stmts, this); add_to_list(stmts, expression); return new CompoundExpression(stmts.toArray(new Expression[stmts.size()])); } COM: <s> appends two expression to create a compound expression </s>
funcom_train/1239
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: final public boolean isEveryCorralBoxOnAGoal() { // check all boxes for (int boxNo = 0; boxNo < boxCount; boxNo++) { // ignore deactivated and non-corral boxes if (isBoxInactive(boxNo) || isBoxInCorral(boxNo) == false) { continue; } if (board.isBoxOnGoal(boxPositions[boxNo]) == false) { return false; } } return true; } COM: <s> tell whether all corral boxes are located on goals </s>
funcom_train/2712071
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void applyCustomKeyBindings(MenuNode coreMenuTree) { if (getMenuKeyBindings() == null || getMenuKeyBindings(). getMenuKeyBindings() == null || getMenuKeyBindings(). getMenuKeyBindings(). isEmpty()) { return; } Logger.logInfo("Applying custom key bindings."); applyKeyBindingsRecursively(coreMenuTree); } COM: <s> applies custom key bindings to all menus </s>
funcom_train/36852131
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public FileConfig getFile() throws ConfigException { if (fileConfig == null) { if (fileName == null) { throw new ConfigException(text.get("noFileName")); } fileConfig = new FileConfig(); fileConfig.setName(fileName); if (charset != null) { fileConfig.setCharset(charset); } } return fileConfig; } COM: <s> returns a tt file config tt </s>
funcom_train/40377430
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int checkForChanges(){ if(!mapPane.hasBeenSaved()){ int o = JOptionPane.showConfirmDialog(this, "This map instance hasn't been saved.\n"+ "Do you want to save this map instance?", "Map Editor", JOptionPane.YES_NO_CANCEL_OPTION,JOptionPane.WARNING_MESSAGE); switch(o){ case JOptionPane.YES_OPTION: saveMap(chooseSaveLocation()); return JOptionPane.YES_OPTION; case JOptionPane.CANCEL_OPTION: return JOptionPane.CANCEL_OPTION; case JOptionPane.NO_OPTION: return JOptionPane.NO_OPTION; } } return JOptionPane.UNDEFINED_CONDITION; } COM: <s> returns the appropriate joption pane integer for when user </s>
funcom_train/29723374
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JTabbedPane getJTabbedPane() { if (jTabbedPane == null) { jTabbedPane = new JTabbedPane(); jTabbedPane.addTab("General", null, getJPanelGeneral(), null); jTabbedPane.addTab("Extensions", null, getPanel(), null); } return jTabbedPane; } COM: <s> this method initializes j tabbed pane </s>
funcom_train/43245185
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetNOKTwoPhoneNumber() { System.out.println("setNOKTwoPhoneNumber"); String nOKTwoPhoneNumber = ""; EmergencyContactDG2Object instance = new EmergencyContactDG2Object(); instance.setNOKTwoPhoneNumber(nOKTwoPhoneNumber); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); } COM: <s> test of set noktwo phone number method of class org </s>
funcom_train/13345045
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String toURI(String gafLocation) throws GafDbOperationsException{ if(gafLocation == null ) throw new GafDbOperationsException("Gaf location is not provided in the input"); gafLocation = gafLocation.trim(); if(!(gafLocation.startsWith("http:") || gafLocation.startsWith("ftp:") || gafLocation.startsWith("file:"))){ File f = new File(gafLocation); gafLocation= f.toURI().toString(); } return gafLocation; } COM: <s> converts file location to uri </s>
funcom_train/32746213
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void paint(Graphics g) { if(selected_) g.setColor(selectedCol_); else g.setColor(getBackground()); Dimension d = size(); g.fillRoundRect(0, 0 , d.width, d.height, 5, 5); } COM: <s> draws clears the rectangle depending on the </s>
funcom_train/49318792
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString(boolean showSeconds) { if (showSeconds) { return toString(); } // sign String signStr; if (sign == -1) { signStr = "-"; } else { signStr = "+"; } return signStr + NF.format(degrees) + ":" + NF.format(min); } COM: <s> return the value as a string in the form dd mm ss </s>
funcom_train/9143494
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ClassNode getOuterClass() { if (!this.isInnerClass()) return null; Set<Relation> isDeclaredOn = super.getRelations(TypesOfRelation.IS_DECLARED_ON); for (Relation relation : isDeclaredOn) { Entity outer = relation.getCalledEntity(); if (outer.getTypeOfEntity().equals(TypesOfEntities.CLASS)) return (ClassNode) outer; } //this line will never be processed, but i had to put this return statement here return null; } COM: <s> returns the code class node code representing the outer class of the entity </s>
funcom_train/3417722
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(Object obj) { if (obj instanceof VMID) { VMID vmid = (VMID) obj; if (!uid.equals(vmid.uid)) return false; if ((addr == null) ^ (vmid.addr == null)) return false; if (addr != null) { if (addr.length != vmid.addr.length) return false; for (int i = 0; i < addr.length; ++ i) if (addr[i] != vmid.addr[i]) return false; } return true; } else { return false; } } COM: <s> compare this vmid to another and return true if they are the </s>
funcom_train/48406872
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addIsEventDrivenPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_WorkBreakdownElement_isEventDriven_feature"), getString("_UI_PropertyDescriptor_description", "_UI_WorkBreakdownElement_isEventDriven_feature", "_UI_WorkBreakdownElement_type"), SpemxtcompletePackage.eINSTANCE.getWorkBreakdownElement_IsEventDriven(), true, false, false, ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the is event driven feature </s>
funcom_train/42876717
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setClips(List<Long> oids) { logger.entering("ListView", "getClips()"); logger.info("DnD - got " + oids.size() + " clips to drop"); logger.exiting("ListView", "getClips()"); } COM: <s> sets clips to the list view </s>
funcom_train/50323139
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Element xpathSelectElement(String xpath) throws ParseException { try { String slashXpath = (xpath.charAt(0) != '/') ? "/" + xpath : xpath; XPath parseTree = XPath.get(slashXpath); monitor(parseTree); return visitor(parseTree, false).getFirstResultElement(); } catch (XPathException e) { throw new XPathParseException(e); } } COM: <s> select the first element that matches the absolute xpath expression in </s>
funcom_train/46760391
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public OrderModel getOrder(final long orderId, final ServiceCall call) throws Exception { IBeanMethod method = new IBeanMethod() { public Object execute() throws Exception { if (call.isStoreAudit()) { BaseData.getSecurity().storeAudit(call.getUserRefId(), orderId, "Viewed Order", call); } return OrderData.getOrder(orderId, call); }}; return (OrderModel) call(method, call); } COM: <s> return the single order model for the primary key </s>
funcom_train/34424356
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void sendNickChange(String oldNick, String newNick) { Client[] cArray; synchronized (clients) { cArray = clients.toArray(new Client[0]); } for (Client c : cArray) { c.send("ISAUTHED " + oldNick + ": FALSE"); c.send("NEWNICK " + oldNick + ": " + newNick); } } COM: <s> notify all clients that someone has changed the nick and remind everyone </s>
funcom_train/11319971
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void renderMenuHref(HtmlStringBuffer buffer) { String href = getHref(); buffer.appendAttribute("href", href); if ("#".equals(href)) { // If hyperlink does not return false, clicking on it will // scroll to the top of the page. buffer.appendAttribute("onclick", "return false;"); } } COM: <s> render the menu tt href tt attribute </s>
funcom_train/7347741
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private BottomPanel getBottomPanel() { if (ivjBottomPanel == null) { try { ivjBottomPanel = new com.ibm.network.ftp.ui.BottomPanel(); ivjBottomPanel.setName("BottomPanel"); // user code begin {1} // user code end } catch (java.lang.Throwable ivjExc) { // user code begin {2} // user code end handleException(ivjExc); } }; return ivjBottomPanel; } COM: <s> return the bottom panel property value </s>
funcom_train/11707640
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testTsDescriptor() throws Exception { File tsDescFile = JUnitExtension.getFile(TEST_FOLDER + "/" + TS_DESC_NAME); if (!tsDescFile.isFile()) throw new FileNotFoundException("TS descriptor not found"); Assert.assertTrue(UIMAUtil.TYPE_SYSTEM_CTG.equals(UIMAUtil .identifyUimaComponentCategory(tsDescFile))); } COM: <s> runs test case for type system descriptor </s>
funcom_train/5080063
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void remove(IFigure figure) { if ((figure.getParent() != this)) throw new IllegalArgumentException( "Figure is not a child"); //$NON-NLS-1$ if (getFlag(FLAG_REALIZED)) figure.removeNotify(); if (layoutManager != null) layoutManager.remove(figure); // The updates in the UpdateManager *have* to be // done asynchronously, else will result in // incorrect dirty region corrections. figure.erase(); figure.setParent(null); children.remove(figure); revalidate(); } COM: <s> removes the given child figure from this figures hierarchy and revalidates this </s>
funcom_train/25050230
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSimpleNumberSubtraction() throws Exception { // Parse from code String basicWorkflow = "workflow { " + "def job helloWorld() { " + "var = 5 - 2;" + "}" + "}"; Workflow workflow = new SparkWorkflowParser(mockDbAccessor).loadWorkflow(new StringReader(basicWorkflow)); Expression expr = getExpression(workflow); // Test run VariableStore context = new VariableStore(); Primitive result = expr.evaluate(context); assertTrue(result instanceof NumberPrimitive); assertEquals("3", result.evaluate()); } COM: <s> test integer subtraction </s>
funcom_train/18758693
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void finish( TransRow row, boolean bIgnoreFailure ) { boolean bRowValid = row.validate(); try { if ( row.isValid() ) row.commit(); vRow.remove( row ); } catch ( Exception e ) { config.log( Config.FATAL, e ); bRowValid = false; } if ( !bRowValid && !bIgnoreFailure ) { cancel(); throw new Message( "sy.error" ); } } COM: <s> save and clear out this row to save space in batch mode </s>
funcom_train/16352890
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean childNodeExists(Node parentNode, String nodeToLookFor) { boolean nodeExists; try { nodeExists = (Boolean) xpath.evaluate(nodeToLookFor, parentNode, XPathConstants.BOOLEAN); } catch (XPathExpressionException ex) { // If an exception occours, it probably doesn't exist. nodeExists = false; } return nodeExists; } COM: <s> check if a node exists below the parent node </s>
funcom_train/4362694
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { if( hasStrValue ) return strValue; switch (type) { case T_CHARS: strValue=charC.toString(); hasStrValue=true; return strValue; case T_BYTES: strValue=byteC.toString(); hasStrValue=true; return strValue; } return null; } COM: <s> compute the string value </s>
funcom_train/20385063
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getFullDefaultInterceptorRef() { if ((defaultInterceptorRef == null) && !parents.isEmpty()) { for (Iterator<PackageConfig> iterator = parents.iterator(); iterator.hasNext();) { PackageConfig parent = iterator.next(); String parentDefault = parent.getFullDefaultInterceptorRef(); if (parentDefault != null) { return parentDefault; } } } return defaultInterceptorRef; } COM: <s> gets the default interceptor ref name </s>
funcom_train/24564795
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isAncestor(Contribution ancestor) { boolean returnValue = false; for (Relationship relationship : getRelationshipsFromSuperiors()) { if (!RelationshipTypes.MEMBER_OF.equals(relationship.getType())) { returnValue = relationship.getSuperior().getUtility().isAncestor(ancestor, new HashSet<String>()); if (returnValue) { break; } } } return returnValue; } COM: <s> checks if ancestor is an ancestor to this contribution </s>
funcom_train/40926434
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getMensajeRecibidoVolverCommand() { if (mensajeRecibidoVolverCommand == null) {//GEN-END:|60-getter|0|60-preInit // write pre-init user code here mensajeRecibidoVolverCommand = new Command("Volver", Command.OK, 0);//GEN-LINE:|60-getter|1|60-postInit // write post-init user code here }//GEN-BEGIN:|60-getter|2| return mensajeRecibidoVolverCommand; } COM: <s> returns an initiliazed instance of mensaje recibido volver command component </s>
funcom_train/7981204
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void importFrom(Reader r) { BufferedReader reader = new BufferedReader(r); String s; Iterator iter = new RegexpLineIterator( new LineReadingIterator(reader), RegexpLineIterator.COMMENT_LINE, RegexpLineIterator.NONWHITESPACE_ENTRY_TRAILING_COMMENT, RegexpLineIterator.ENTRY); while (iter.hasNext()) { s = (String) iter.next(); add(s.toLowerCase()); } } COM: <s> read a set of surt prefixes from a reader source keep sorted and </s>
funcom_train/26016969
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setQValue(float q) throws InvalidArgumentException { if (q < 0.0 || q > 1.0) throw new InvalidArgumentException("qvalue out of range!"); if (q == -1) this.removeParameter("q"); else this.setParameter(new NameValue("q", Float.valueOf(q))); } COM: <s> sets q value for media range in accept language header </s>
funcom_train/5344322
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addImpl(LongInterval i) { int point = Collections.binarySearch(intervals, i, LongIntervalComparator.INSTANCE); if(point >= 0) throw new IllegalStateException("interval (" + i + ") already in list: " + intervals); point = -(point + 1); intervals.add(point, i); } COM: <s> adds into the list in order </s>
funcom_train/16526764
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String findStepTrail(PasStep findStep) { PasActivity[] activities = pasProject.getActivities(); for (int i = 0; i < activities.length; i++) { PasActivity pasActivity = activities[i]; PasStep[] steps = pasActivity.getSteps(); for (int j = 0; j < steps.length; j++) { PasStep pasStep = steps[j]; if( pasStep.equals(findStep)) { return "/" + i + "/" + j; } } } return null; } COM: <s> finds it trail </s>
funcom_train/17560980
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TemplateDictionary addChildDict(String key) { TemplateDictionary td = new TemplateDictionary(this); if (!subs.containsKey(key.toUpperCase())) { List<TemplateDictionary> dicts = new LinkedList<TemplateDictionary>(); dicts.add(td); subs.put(key.toUpperCase(), dicts); } else { subs.get(key.toUpperCase()).add(td); } return td; } COM: <s> adds a dictionary with a given name </s>
funcom_train/12547571
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public State stateAtPoint(Point point) { State[] states = getAutomaton().getStates(); // Work backwards, since we want to select the "top" state, // and states are drawn forwards so later is on top. for (int i = states.length - 1; i >= 0; i--) if (point.distance(states[i].getPoint()) <= StateDrawer.STATE_RADIUS) return states[i]; // Not found. Drat! return null; } COM: <s> gets the state at a particular point </s>